From 9115044b23c4443c156d2ee47e8916278d3682d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Sun, 23 Aug 2026 08:57:49 +0200 Subject: [PATCH 01/45] docs: define distributed output ownership --- docs/make.jl | 1 + docs/src/dev/distributed_output_ownership.md | 245 +++++++++++++++++++ 2 files changed, 246 insertions(+) create mode 100644 docs/src/dev/distributed_output_ownership.md diff --git a/docs/make.jl b/docs/make.jl index 9d3640e97..fc4a2163c 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -115,6 +115,7 @@ makedocs(; "Public API refinement decisions" => "./dev/public_api_refinement_decisions.md", "Public API refinement completion audit" => "./dev/public_api_refinement_completion_audit.md", "Composite model/object design" => "./dev/composite_model_design.md", + "Distributed output ownership" => "./dev/distributed_output_ownership.md", "Composite model/object implementation plan" => "./dev/composite_model_implementation_plan.md", "Composite model/object completion audit" => "./dev/composite_model_completion_audit.md", "MAESPA-style composite-model example handoff" => "./dev/maespa_model_handoff.md", diff --git a/docs/src/dev/distributed_output_ownership.md b/docs/src/dev/distributed_output_ownership.md new file mode 100644 index 000000000..e4ac40768 --- /dev/null +++ b/docs/src/dev/distributed_output_ownership.md @@ -0,0 +1,245 @@ +# Distributed output ownership + +Status: design contract for the `distributed-output-targets` implementation. +Public names shown below remain provisional until the focused prototype and +performance gates pass. + +## Problem + +Most PlantSimEngine applications compute outputs on the same objects on which +they execute. Some scientifically useful models have a different shape: + +- one radiative-transfer model executes once on a complete scene and computes + values for every simulated organ; +- one plant allocation model executes once per plant and computes allocation + and reserve values for many organs; or +- one soil or microclimate model executes on a shared domain and computes local + values for several plant objects. + +These are not hard calls to per-object models. The scene or plant application +owns the computation and cadence, while each destination object owns its local +state value. + +Passing writable `Many(...; from_status=true)` carriers can modify those values, +but it does not declare the producing application as their writer. Producer +inference, scheduling, diagnostics, lifecycle refresh, and output retention +therefore cannot recover the scientific ownership of the result. + +## Terms + +- **Execution target:** the object on which an application runs. A scene light + model has one `Scene` execution target. +- **Output destination:** an object whose status owns one output computed by + that application. The same scene light application can have many `Leaf` and + `Internode` destinations. +- **Output binding:** the compiled relationship between one application, + execution target, destination selector, destination object IDs, and declared + output variables. +- **Destination ownership:** the writer relationship + `(destination_object_id, variable) => application_id`. + +Execution targets and output destinations are deliberately distinct. A model +must not be mounted on fake per-organ applications merely to publish values +computed elsewhere. + +## Indicative declaration + +The proposed scenario spelling is: + +```julia +ModelSpec( + SceneLightModel(); + name=:scene_light, + on=One(scale=:Scene), + outputs_to=( + organs=OutputTo( + Many( + scale=(:Leaf, :Internode), + within=SceneScope(), + ), + vars=( + :incident_par, + :absorbed_par, + :sky_fraction, + ), + ), + ), +) +``` + +Inside the kernel, the application obtains its already compiled destinations: + +```julia +targets = output_targets(context, :organs) +assign_outputs!(targets, result_columns; id=:object_id) +``` + +`outputs_to`, `OutputTo`, `OutputTargets`, `output_targets`, and +`assign_outputs!` are working names, not yet stabilized API. + +## Identity contract + +PlantSimEngine already stores each compiled `Many` binding as aligned object IDs +and a carrier. Selector results use stable `ObjectId` order; collection position +has no botanical or scientific meaning and may change when lifecycle refresh +rebuilds a binding. + +An output result must therefore be associated by `ObjectId`, never by MTG +traversal order or an independently declared ID selector. A model-facing +identity-aware view may expose: + +```julia +values = bound_input(context, :organ_values) +object_ids(values) +``` + +The first implementation should leave the ordinary `RefVector` status carrier +unchanged. Identity-aware access is opt-in until explicit `RefVector` dispatches +and performance have been audited. + +## Compilation and initialization + +For every output binding, compilation must determine: + +1. the producing application and execution object; +2. the destination selector and compiled matcher; +3. destination `ObjectId` values in stable order; +4. declared destination variables and their initial values or requirements; +5. concrete, reference-backed destination columns; and +6. writer ownership for every `(destination_id, variable)` pair. + +Destination status initialization occurs before consumer input compilation. +The compiler must reject a destination variable that cannot be initialized or +validated under the selected policy. + +Ordinary same-object outputs stay on their current fast path. They may later be +represented internally as implicit `Self()` output bindings only if that +unification has no common-path cost. + +## Writer ownership and scheduling + +Producer inference must query destination ownership rather than only the +applications mounted on the source object. Consequently, a leaf input can find +a scene application that owns `(leaf_id, :absorbed_par)` and schedule after it +without `from_status=true` or a manual `after=` declaration. + +Two applications may not own the same `(destination_id, variable)` unless an +existing, explicit update policy correctly defines their order. Combining +independent producers through a reduction is a separate concept and is outside +this design. + +## Coverage and assignment + +The default assignment policy is exact coverage: + +- every result ID is known; +- IDs are unique; +- every destination expected by the binding is present; and +- every assigned variable was declared. + +Subset coverage may be added only with an explicit missing-value policy. It +must not silently convert a missing result to zero or retain an old value. +Scientific adapters decide whether a dead, abscised, filtered, or +non-geometrized object should remain a destination. + +`assign_outputs!` has two paths: + +1. a checked Tables.jl-compatible path that validates IDs, columns, and + coverage and compiles a row-to-destination permutation; and +2. a stable bound path that reuses a previously validated identity/order plan + and performs one typed pass over the result columns. + +Validation should finish before status mutation where possible. A complete copy +of every result column is not required. + +## Lifecycle + +The scenario application graph and selectors remain immutable. Object +membership may change. + +At a lifecycle barrier, PlantSimEngine refreshes only affected output bindings: + +- add or remove destination IDs and reference columns; +- update the ID-to-position index; +- invalidate a cached result permutation when membership changed; +- update writer ownership and consumer scheduling metadata; +- initialize newly declared destination status; and +- add or close retained streams as required. + +Ordinary timesteps then return to the cached execution plan without selector +resolution or graph traversal. + +## Output retention and diagnostics + +Retained streams remain keyed by producing application, destination object, and +variable. Distributed destinations change which object IDs are enumerated, not +the scientific identity of the producer. + +Diagnostics must show: + +- execution targets separately from output destinations; +- the destination selector and current destination count; +- every distributed writer and any collision; +- lifecycle refreshes and invalidated assignment plans; and +- retention policy and streams for destination objects. + +`outputs=:none` must not allocate destination-history streams. Final status +inspection remains available because destination statuses are updated directly. + +## Performance contract + +The implementation must preserve these properties: + +- no selector resolution, ID-vector copy, dictionary construction, or table + materialization in the steady-state model call; +- no new work for applications without distributed outputs; +- concrete, columnar destination carriers rather than one type-level tuple + entry per destination object; +- ID indexes and result permutations built at compilation or lifecycle + barriers, not per timestep; +- zero-allocation sequential iteration over homogeneous identity-aware views; + and +- separate measurements for compilation, lifecycle refresh, steady-state + execution, and output collection. + +The baseline and candidate must be measured on the same Julia version, hardware, +thread count, output policy, and repository revisions. Investigate a median +steady-state regression above 2%; do not accept an end-to-end regression above +5% without explicit review. + +## Alternatives rejected + +### A second `Many` of IDs + +This duplicates compiler-owned identity, lets selectors diverge, and treats +identity as a biological input. It also does not solve writer ownership, +scheduling, or retention. + +### Fake per-object applications + +These misrepresent computation and cadence, enlarge the application graph, and +make bookkeeping models appear scientifically meaningful. + +### Public `CallTargets` reuse + +`CallTargets` represents executable callee applications and includes model, +environment, status-view, and hard-call state. Distributed outputs need a +lighter columnar destination view. Internal selector and lifecycle cache +patterns can still be shared. + +### Per-step table join + +A table join or MTG traversal in every model execution is avoidable work and +makes ordering errors possible. Compile identity mapping once and invalidate it +only when membership changes. + +## Open implementation decisions + +- Final public names after prototype use. +- Whether identity-aware `Many` becomes the default carrier in a later breaking + release. +- Exact subset and missing-value policies. +- Whether local outputs become implicit `Self()` bindings in the first + implementation or a later internal refactor. +- The smallest concrete destination/index representation that preserves current + compiler and runtime performance. From 2b6ac846388516bb2b5c0371228b6cec6e37f327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Sun, 23 Aug 2026 08:58:13 +0200 Subject: [PATCH 02/45] benchmark: establish distributed output baselines --- benchmark/benchmarks.jl | 32 ++++ .../test-distributed-output-benchmark.jl | 148 ++++++++++++++++++ benchmark/test/runtests.jl | 72 +++++++++ 3 files changed, 252 insertions(+) create mode 100644 benchmark/test-distributed-output-benchmark.jl diff --git a/benchmark/benchmarks.jl b/benchmark/benchmarks.jl index b1948c9d8..7cdf3b1df 100644 --- a/benchmark/benchmarks.jl +++ b/benchmark/benchmarks.jl @@ -82,6 +82,38 @@ if SUPPORTS_COMPOSITE_OBJECT_BENCHMARKS ) setup = ((simulation, nsteps) = setup_many_cadence_schedule_benchmark()) evals = 1 + include(joinpath(@__DIR__, "test-distributed-output-benchmark.jl")) + for nobjects in (1_000, 100_000) + SUITE[suite_name]["PSE_refvector_sum_$(nobjects)"] = + @benchmarkable benchmark_distributed_output_sum( + values, + ) setup = (values = setup_distributed_output_benchmark( + $nobjects, + ).ref_values) + SUITE[suite_name]["PSE_bound_many_sum_$(nobjects)"] = + @benchmarkable benchmark_distributed_output_sum( + values, + ) setup = (values = setup_distributed_output_benchmark( + $nobjects, + ).bound_values) + SUITE[suite_name]["PSE_distributed_assign_exact_$(nobjects)"] = + @benchmarkable benchmark_assign_distributed_outputs_exact!( + data.exact_targets, + data.exact_values, + ) setup = (data = setup_distributed_output_benchmark($nobjects)) + SUITE[suite_name]["PSE_distributed_assign_permuted_$(nobjects)"] = + @benchmarkable benchmark_assign_distributed_outputs_permuted!( + data.permuted_targets, + data.permuted_values, + data.result_to_destination, + ) setup = (data = setup_distributed_output_benchmark($nobjects)) + end + SUITE[suite_name]["PSE_distributed_compile_permutation_1000"] = + @benchmarkable compile_distributed_output_benchmark_permutation( + data.object_ids, + data.permuted_result_ids, + ) setup = (data = setup_distributed_output_benchmark(1_000)) + include(joinpath(@__DIR__, "test-hard-call-path-benchmark.jl")) for usage in (:zero, :sparse, :dense) SUITE[suite_name]["PSE_hard_calls_$(usage)"] = diff --git a/benchmark/test-distributed-output-benchmark.jl b/benchmark/test-distributed-output-benchmark.jl new file mode 100644 index 000000000..445a3f5a8 --- /dev/null +++ b/benchmark/test-distributed-output-benchmark.jl @@ -0,0 +1,148 @@ +using PlantSimEngine + +""" +Benchmark-only identity-aware view over an existing vector carrier. + +This prototype measures the cost of carrying compiler-owned object IDs beside +the current carrier. It is deliberately not part of the public API. +""" +struct DistributedOutputBenchmarkBoundMany{T,I,V} <: AbstractVector{T} + object_ids::I + values::V +end + +function DistributedOutputBenchmarkBoundMany(object_ids::I, values::V) where {I,V} + length(object_ids) == length(values) || throw( + DimensionMismatch( + "Object IDs and values must have the same length.", + ), + ) + return DistributedOutputBenchmarkBoundMany{eltype(V),I,V}( + object_ids, + values, + ) +end + +Base.IndexStyle(::Type{<:DistributedOutputBenchmarkBoundMany}) = IndexLinear() +Base.size(values::DistributedOutputBenchmarkBoundMany) = size(values.values) +Base.length(values::DistributedOutputBenchmarkBoundMany) = length(values.values) +@inline Base.getindex(values::DistributedOutputBenchmarkBoundMany, index::Int) = + @inbounds values.values[index] + +function benchmark_distributed_output_sum(values) + total = 0.0 + @inbounds for index in eachindex(values) + total += values[index] + end + return total +end + +function benchmark_assign_distributed_outputs_exact!(targets, values) + @boundscheck length(targets) == length(values) || throw( + DimensionMismatch("Output targets and values must have the same length."), + ) + @inbounds for index in eachindex(values) + targets[index] = values[index] + end + return targets +end + +function benchmark_assign_distributed_outputs_permuted!( + targets, + values, + result_to_destination, +) + @boundscheck length(result_to_destination) == length(values) || throw( + DimensionMismatch( + "The compiled output permutation and values must have the same length.", + ), + ) + @inbounds for result_index in eachindex(values) + targets[result_to_destination[result_index]] = values[result_index] + end + return targets +end + +""" + compile_distributed_output_benchmark_permutation(destination_ids, result_ids) + +Compile and validate the result-row to destination-position mapping used by the +benchmark. This intentionally allocating operation represents compilation or a +lifecycle barrier, never a steady-state model call. +""" +function compile_distributed_output_benchmark_permutation( + destination_ids, + result_ids, +) + length(destination_ids) == length(result_ids) || throw( + DimensionMismatch( + "Exact output coverage requires one result per destination.", + ), + ) + position_by_id = Dict{eltype(destination_ids),Int}() + sizehint!(position_by_id, length(destination_ids)) + for (position, object_id) in pairs(destination_ids) + haskey(position_by_id, object_id) && throw( + ArgumentError("Duplicate destination object ID `$(object_id)`."), + ) + position_by_id[object_id] = position + end + + result_to_destination = Vector{Int}(undef, length(result_ids)) + seen = falses(length(destination_ids)) + for (result_index, object_id) in pairs(result_ids) + destination_index = get(position_by_id, object_id, 0) + iszero(destination_index) && throw( + ArgumentError("Unknown result object ID `$(object_id)`."), + ) + seen[destination_index] && throw( + ArgumentError("Duplicate result object ID `$(object_id)`."), + ) + seen[destination_index] = true + result_to_destination[result_index] = destination_index + end + all(seen) || throw( + ArgumentError("Exact output coverage is missing destination object IDs."), + ) + return result_to_destination +end + +function setup_distributed_output_benchmark(nobjects::Int=1_000) + nobjects > 0 || throw(ArgumentError("`nobjects` must be positive.")) + object_ids = [ObjectId(Symbol(:object_, index)) for index in 1:nobjects] + references = [Ref(Float64(index)) for index in 1:nobjects] + ref_values = PlantSimEngine.RefVector(references) + bound_values = + DistributedOutputBenchmarkBoundMany(object_ids, ref_values) + heterogeneous_values = PlantSimEngine.ObjectRefVector( + [Ref{Any}(Float64(index)) for index in 1:nobjects], + ) + + exact_values = collect(Float64, 1:nobjects) + permuted_result_ids = reverse(object_ids) + permuted_values = reverse(exact_values) + result_to_destination = + compile_distributed_output_benchmark_permutation( + object_ids, + permuted_result_ids, + ) + exact_targets = PlantSimEngine.RefVector( + [Ref(0.0) for _ in 1:nobjects], + ) + permuted_targets = PlantSimEngine.RefVector( + [Ref(0.0) for _ in 1:nobjects], + ) + + return ( + object_ids=object_ids, + ref_values=ref_values, + bound_values=bound_values, + heterogeneous_values=heterogeneous_values, + exact_values=exact_values, + permuted_result_ids=permuted_result_ids, + permuted_values=permuted_values, + result_to_destination=result_to_destination, + exact_targets=exact_targets, + permuted_targets=permuted_targets, + ) +end diff --git a/benchmark/test/runtests.jl b/benchmark/test/runtests.jl index 6a1296985..992315ffb 100644 --- a/benchmark/test/runtests.jl +++ b/benchmark/test/runtests.jl @@ -223,6 +223,78 @@ if benchmark_test_enabled("immutable scenario benchmark API smoke") end end +if benchmark_test_enabled("distributed output benchmark API smoke") + @testset "distributed output benchmark API smoke" begin + include( + joinpath( + @__DIR__, + "..", + "test-distributed-output-benchmark.jl", + ), + ) + data = setup_distributed_output_benchmark(16) + expected_sum = sum(data.exact_values) + @test benchmark_distributed_output_sum(data.ref_values) == expected_sum + @test benchmark_distributed_output_sum(data.bound_values) == expected_sum + @test benchmark_distributed_output_sum(data.heterogeneous_values) == + expected_sum + @test data.bound_values.object_ids === data.object_ids + @test data.bound_values.values === data.ref_values + + benchmark_distributed_output_sum(data.ref_values) + benchmark_distributed_output_sum(data.bound_values) + @test @allocated(benchmark_distributed_output_sum(data.ref_values)) == 0 + @test @allocated(benchmark_distributed_output_sum(data.bound_values)) == 0 + + benchmark_assign_distributed_outputs_exact!( + data.exact_targets, + data.exact_values, + ) + benchmark_assign_distributed_outputs_permuted!( + data.permuted_targets, + data.permuted_values, + data.result_to_destination, + ) + @test collect(data.exact_targets) == data.exact_values + @test collect(data.permuted_targets) == data.exact_values + @test @allocated( + benchmark_assign_distributed_outputs_exact!( + data.exact_targets, + data.exact_values, + ) + ) == 0 + @test @allocated( + benchmark_assign_distributed_outputs_permuted!( + data.permuted_targets, + data.permuted_values, + data.result_to_destination, + ) + ) == 0 + + @test_throws DimensionMismatch begin + compile_distributed_output_benchmark_permutation( + data.object_ids, + data.permuted_result_ids[2:end], + ) + end + @test_throws ArgumentError begin + compile_distributed_output_benchmark_permutation( + data.object_ids, + [data.permuted_result_ids[1:end-1]; ObjectId(:unknown)], + ) + end + @test_throws ArgumentError begin + compile_distributed_output_benchmark_permutation( + data.object_ids, + [ + data.permuted_result_ids[1:end-1]; + data.permuted_result_ids[1] + ], + ) + end + end +end + if benchmark_test_enabled("lifecycle benchmark API smoke") @testset "lifecycle benchmark API smoke" begin isdefined(@__MODULE__, :BenchmarkCallSourceModel) || From 6e7350d004b1baa90787fa73cdfd1bf4181d899d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Sun, 23 Aug 2026 09:47:40 +0200 Subject: [PATCH 03/45] feat: expose identities for compiled many bindings --- src/PlantSimEngine.jl | 3 +- src/composite_model/bound_many.jl | 160 +++++++ src/composite_model/compilation.jl | 8 +- src/composite_model/runtime_outputs.jl | 121 +++++- src/composite_model_api.jl | 1 + test/runtests.jl | 4 + test/test-model-api-stabilization.jl | 2 + test/test-model-bound-many.jl | 576 +++++++++++++++++++++++++ 8 files changed, 868 insertions(+), 7 deletions(-) create mode 100644 src/composite_model/bound_many.jl create mode 100644 test/test-model-bound-many.jl diff --git a/src/PlantSimEngine.jl b/src/PlantSimEngine.jl index 205c43818..b3573f465 100644 --- a/src/PlantSimEngine.jl +++ b/src/PlantSimEngine.jl @@ -308,7 +308,7 @@ export add_organ!, register_object!, remove_object!, reparent_object!, move_obje export mark_environment_binding_dirty! export objects_from_mtg, object_ids, model_object, model_objects, resolve_object_ids, resolve_objects export geometry, position, bounds -export RunContext, CallTarget, CallTargets, Simulation +export RunContext, CallTarget, CallTargets, Simulation, BoundMany export runtime_model, current_step, final_state, outputs export SceneScope, Self, Subtree, SelfPlant, Ancestor, Scope, Relation export One, OptionalOne, Many @@ -316,6 +316,7 @@ export Input, Call, Environment export application_name, applies_to, value_inputs, model_calls, environment_config export ModelSpec, Updates export call_targets, call_model, run_call!, commit_environment! +export bound_input export Status export Required, Default export @process, process diff --git a/src/composite_model/bound_many.jl b/src/composite_model/bound_many.jl new file mode 100644 index 000000000..2ade1385e --- /dev/null +++ b/src/composite_model/bound_many.jl @@ -0,0 +1,160 @@ +struct BoundManyObjectIds{T,I<:AbstractVector{T}} <: AbstractVector{T} + ids::I +end + +Base.IndexStyle(::Type{<:BoundManyObjectIds}) = IndexLinear() +Base.size(ids::BoundManyObjectIds) = size(ids.ids) +Base.length(ids::BoundManyObjectIds) = length(ids.ids) +Base.axes(ids::BoundManyObjectIds) = axes(ids.ids) +Base.eachindex(ids::BoundManyObjectIds) = eachindex(ids.ids) +Base.@propagate_inbounds Base.getindex(ids::BoundManyObjectIds, index::Int) = + ids.ids[index] + +""" + BoundMany <: AbstractVector + +Identity-aware, reference-backed view of a compiled `Many` input. + +Use [`bound_input`](@ref) inside a model kernel to obtain this view. Ordinary +positional indexing, iteration, broadcasting, and mutation operate on the same +carrier already installed in the model status. [`object_ids`](@ref) returns the +aligned, read-only object identities without copying them. Wrap an identity in +[`ObjectId`](@ref) for unambiguous identity-based indexing; integer indexing +remains positional. + +Both aligned carriers use the one-based indexing contract of PlantSimEngine's +compiled input storage. +""" +struct BoundMany{T,I,V} <: AbstractVector{T} + ids::I + values::V +end + +function _new_bound_many(ids::I, values::V) where { + I<:AbstractVector{<:ObjectId}, + V<:AbstractVector, +} + length(ids) == length(values) || throw( + DimensionMismatch( + "Compiled Many identities and values must have the same length.", + ), + ) + axes(ids) == axes(values) || throw( + DimensionMismatch( + "Compiled Many identities and values must use the same axes.", + ), + ) + Base.require_one_based_indexing(ids, values) + id_view = BoundManyObjectIds(ids) + return BoundMany{eltype(V),typeof(id_view),V}(id_view, values) +end + +function _validate_bound_many_ids(ids) + for index in (firstindex(ids) + 1):lastindex(ids) + previous = ids[index - 1] + current = ids[index] + previous == current && throw( + ArgumentError( + "BoundMany object identities must be unique; duplicate " * + "`$(current)`.", + ), + ) + _object_id_isless(previous, current) || throw( + ArgumentError( + "BoundMany object identities must use compiled ObjectId order; " * + "`$(previous)` must sort before `$(current)`.", + ), + ) + end + return ids +end + +function BoundMany(ids::I, values::V) where { + I<:AbstractVector{<:ObjectId}, + V<:AbstractVector, +} + _validate_bound_many_ids(ids) + return _new_bound_many(ids, values) +end + +_compiled_bound_many(ids, values) = _new_bound_many(ids, values) + +Base.IndexStyle(::Type{<:BoundMany}) = IndexLinear() +Base.size(values::BoundMany) = size(values.values) +Base.length(values::BoundMany) = length(values.values) +Base.axes(values::BoundMany) = axes(values.values) +Base.eachindex(values::BoundMany) = eachindex(values.values) +Base.parent(values::BoundMany) = values.values +Base.@propagate_inbounds Base.getindex(values::BoundMany, index::Int) = + values.values[index] +Base.@propagate_inbounds Base.setindex!(values::BoundMany, value, index::Int) = + setindex!(values.values, value, index) + +""" + object_ids(values::BoundMany) + +Return the live, read-only `ObjectId` view aligned with `values`. The view is +maintained by compiled lifecycle refresh and does not copy the identity vector. +""" +object_ids(values::BoundMany) = values.ids + +@inline function _bound_many_object_position( + values::BoundMany, + object_id::ObjectId, +) + found, position = _sorted_object_id_position(values.ids.ids, object_id) + found || throw(KeyError(object_id)) + return position +end + +@inline Base.getindex(values::BoundMany, object_id::ObjectId) = + values.values[_bound_many_object_position(values, object_id)] + +@inline Base.setindex!( + values::BoundMany, + value, + object_id::ObjectId, +) = setindex!( + values.values, + value, + _bound_many_object_position(values, object_id), +) + +_compiled_bound_many_inputs(::Tuple{}, ::Status) = NamedTuple() + +function _compiled_bound_many_inputs(bindings::Tuple, status::Status) + any(binding -> binding.multiplicity == :many, bindings) || + return NamedTuple() + names = Symbol[] + values = Any[] + for binding in bindings + binding.multiplicity == :many || continue + input = binding.input + input in names && error( + "Compiled application input `$(input)` has more than one Many binding.", + ) + carrier = getproperty(status, input) + carrier isa AbstractVector || error( + "Compiled Many input `$(input)` has non-vector runtime value " * + "`$(typeof(carrier))`.", + ) + push!(names, input) + push!(values, _compiled_bound_many(binding.source_ids, carrier)) + end + return NamedTuple{Tuple(names)}(Tuple(values)) +end + +_rebind_compiled_bound_many_inputs(::NamedTuple{()}, ::Status) = NamedTuple() + +function _rebind_compiled_bound_many_inputs( + bound_inputs::NamedTuple, + status::Status, +) + names = propertynames(bound_inputs) + values = ntuple(length(names)) do index + name = names[index] + current = getproperty(bound_inputs, name) + _compiled_bound_many(current.ids.ids, getproperty(status, name)) + end + return NamedTuple{names}(values) +end diff --git a/src/composite_model/compilation.jl b/src/composite_model/compilation.jl index 5ea2a6a71..cfc3886c0 100644 --- a/src/composite_model/compilation.jl +++ b/src/composite_model/compilation.jl @@ -675,11 +675,12 @@ struct CompiledTemporalInput{B,S,I,R} reference::R end -struct CompiledModelStatusView{S,C,T,P} +struct CompiledModelStatusView{S,C,T,P,BI} status::S canonical_status::C temporal_inputs::T private_outputs::P + bound_inputs::BI end struct CompiledModelCallBinding{P} @@ -1492,6 +1493,10 @@ function _preserve_model_status_view_temporal_state!( current.canonical_status, temporal_inputs, private_outputs, + _rebind_compiled_bound_many_inputs( + current.bound_inputs, + status, + ), ) end @@ -3439,6 +3444,7 @@ function _compile_model_status_view( canonical_status, temporal_inputs, private_outputs, + _compiled_bound_many_inputs(input_bindings, status), ) end diff --git a/src/composite_model/runtime_outputs.jl b/src/composite_model/runtime_outputs.jl index 8b83cb492..d98ca4f92 100644 --- a/src/composite_model/runtime_outputs.jl +++ b/src/composite_model/runtime_outputs.jl @@ -210,15 +210,16 @@ const _NO_ENVIRONMENT_OVERRIDE = NoEnvironmentOverride() RunContext Runtime context passed as the final argument to model kernels. Use -[`runtime_model`](@ref), [`call_targets`](@ref), and [`run_call!`](@ref) -instead of inspecting its fields. +[`runtime_model`](@ref), [`bound_input`](@ref), [`call_targets`](@ref), and +[`run_call!`](@ref) instead of inspecting its fields. """ -mutable struct RunContext{CS,A,CT,TS,OR,C,E} +mutable struct RunContext{CS,A,CT,BI,TS,OR,C,E} compiled::CS environment_bindings::CompiledEnvironmentBindings application::A object_id::ObjectId calls::CT + bound_inputs::BI temporal_streams::TS output_retention::OR time::Float64 @@ -247,6 +248,7 @@ function RunContext( application, object_id, calls, + NamedTuple(), temporal_streams, output_retention, time, @@ -257,7 +259,87 @@ function RunContext( ) end -struct CallTarget{CS,EB,A,M,S,VS,TI,OB,CT,ENV,TS,OR,C,E} +function RunContext( + compiled, + environment_bindings, + application, + object_id, + calls, + bound_inputs, + temporal_streams, + output_retention, + time, + constants, + publication_allowed, + environment, +) + return RunContext( + compiled, + environment_bindings, + application, + object_id, + calls, + bound_inputs, + temporal_streams, + output_retention, + time, + constants, + publication_allowed, + environment, + nothing, + ) +end + +""" + bound_input(context::RunContext, input) + +Return an identity-aware [`BoundMany`](@ref) view for the declared `Many` +input named `input` on the application currently executing. The view reuses +the compiler-owned object identities and the live vector already installed in +the model status. +""" +@inline Base.@constprop :aggressive function bound_input( + context::RunContext, + input::Symbol, +) + return bound_input(context, Val(input)) +end + +@inline function bound_input( + context::RunContext, + ::Val{input}, +) where {input} + hasproperty(context.bound_inputs, input) || throw( + ArgumentError( + "Application `$(context.application.id)` on object " * + "`$(context.object_id.value)` has no declared Many input " * + "`$(input)`. Available identity-aware inputs: " * + "`$(propertynames(context.bound_inputs))`.", + ), + ) + return getproperty(context.bound_inputs, input) +end + +function bound_input(context::RunContext, input) + throw( + ArgumentError( + "`bound_input` expects a declared Many input name as a Symbol; " * + "got `$(repr(input))` of type `$(typeof(input))` for application " * + "`$(context.application.id)`.", + ), + ) +end + +function bound_input(context, input) + throw( + ArgumentError( + "`bound_input` requires the compiled RunContext passed to a model " * + "kernel; got `$(typeof(context))` for input `$(input)`.", + ), + ) +end + +struct CallTarget{CS,EB,A,M,S,VS,TI,OB,CT,BI,ENV,TS,OR,C,E} compiled::CS environment_bindings::EB application::A @@ -268,6 +350,7 @@ struct CallTarget{CS,EB,A,M,S,VS,TI,OB,CT,ENV,TS,OR,C,E} temporal_inputs::TI output_bindings::OB calls::CT + bound_inputs::BI environment_binding::ENV temporal_streams::TS output_retention::OR @@ -434,12 +517,13 @@ struct CachedGlobalModelEnvironment{B} binding::B end -mutable struct CompiledExecutionTarget{M,S,CS,IB,OB,CB,EB,RC} +mutable struct CompiledExecutionTarget{M,S,CS,IB,BI,OB,CB,EB,RC} object_id::ObjectId model::M status::S canonical_status::CS input_bindings::IB + bound_inputs::BI output_bindings::OB call_bindings::CB call_bindings_signature::UInt @@ -1689,6 +1773,7 @@ end environment_bindings, application, object_id, + bound_inputs, temporal_streams, output_retention, time, @@ -1704,6 +1789,7 @@ end context.environment_bindings = environment_bindings context.application = application context.object_id = object_id + context.bound_inputs = bound_inputs context.temporal_streams = temporal_streams context.output_retention = output_retention context.constants = constants @@ -1734,6 +1820,7 @@ end environment_bindings, application, object_id, + bound_inputs, temporal_streams, output_retention, time, @@ -1745,6 +1832,7 @@ end environment_bindings, application, object_id, + bound_inputs, temporal_streams, output_retention, time, @@ -1760,6 +1848,7 @@ end environment_bindings, application, object_id, + bound_inputs, temporal_streams, output_retention, time, @@ -1789,6 +1878,7 @@ end application, object_id, calls, + bound_inputs, temporal_streams, output_retention, float(time), @@ -1804,6 +1894,7 @@ end environment_bindings, application, object_id, + bound_inputs, temporal_streams, output_retention, time, @@ -1815,6 +1906,7 @@ end environment_bindings, application, object_id, + bound_inputs, temporal_streams, output_retention, time, @@ -1860,6 +1952,7 @@ end env_bindings, application, target.object_id, + target.bound_inputs, temporal_streams, output_retention, time, @@ -1872,6 +1965,7 @@ end application, target.object_id, (), + target.bound_inputs, temporal_streams, output_retention, float(time), @@ -1935,6 +2029,7 @@ end env_bindings, application, target.object_id, + target.bound_inputs, temporal_streams, output_retention, time, @@ -2056,6 +2151,7 @@ end env_bindings, batch.application, target.object_id, + target.bound_inputs, temporal_streams, output_retention, time, @@ -2068,6 +2164,7 @@ end env_bindings, batch.application, target.object_id, + target.bound_inputs, temporal_streams, output_retention, time, @@ -2170,6 +2267,7 @@ function _run_model_execution_batch_profiled!( env_bindings, batch.application, target.object_id, + target.bound_inputs, temporal_streams, output_retention, time, @@ -2374,6 +2472,7 @@ function _compiled_model_execution_context( env_bindings, application, object_id, + bound_inputs, call_bindings, temporal_streams, output_retention, @@ -2397,6 +2496,7 @@ function _compiled_model_execution_context( application, object_id, calls, + bound_inputs, temporal_streams, output_retention, 0.0, @@ -2421,6 +2521,7 @@ function _compiled_model_execution_target( object_id, ) model = _application_model(application, object_id) + bound_inputs = status_view.bound_inputs call_bindings = get( compiled.call_bindings_by_target, (application.id, object_id), @@ -2436,6 +2537,7 @@ function _compiled_model_execution_target( env_bindings, application, object_id, + bound_inputs, call_bindings, temporal_streams, output_retention, @@ -2457,6 +2559,7 @@ function _compiled_model_execution_target( status_view.temporal_inputs, temporal_streams, ), + bound_inputs, output_bindings, call_bindings, _call_bindings_signature(call_bindings), @@ -2699,6 +2802,8 @@ function _model_execution_target_change_reason( target.status === status_view.status || return :status_view target.canonical_status === status_view.canonical_status || return :canonical_status + target.bound_inputs === status_view.bound_inputs || + return :bound_inputs _model_execution_inputs_match( target.input_bindings, status_view.temporal_inputs, @@ -2745,6 +2850,8 @@ function _count_model_execution_target_rebuild!( :execution_target_rebuild_model_bundle elseif reason === :temporal_inputs :execution_target_rebuild_temporal_inputs + elseif reason === :bound_inputs + :execution_target_rebuild_bound_inputs elseif reason === :output_bindings :execution_target_rebuild_output_bindings elseif reason === :call_bindings @@ -3533,6 +3640,7 @@ function _materialize_call( target.input_bindings, target.output_bindings, calls, + target.bound_inputs, target.environment_binding, targets.temporal_streams, targets.output_retention, @@ -4029,6 +4137,7 @@ function _targeted_new_object_call_targets( true, ), (), + status_view.bound_inputs, _environment_binding_for( environment_bindings, application.id, @@ -4243,6 +4352,7 @@ end target.application, target.object_id, target.calls, + target.bound_inputs, target.temporal_streams, target.output_retention, target.time, @@ -4314,6 +4424,7 @@ end targets.environment_bindings, application, target.object_id, + target.bound_inputs, targets.temporal_streams, targets.output_retention, targets.time, diff --git a/src/composite_model_api.jl b/src/composite_model_api.jl index d63961ed5..d8c741232 100644 --- a/src/composite_model_api.jl +++ b/src/composite_model_api.jl @@ -4,6 +4,7 @@ include("composite_model/registry_topology.jl") include("composite_model/selectors.jl") include("composite_model/compilation.jl") +include("composite_model/bound_many.jl") include("composite_model/environment_bindings.jl") include("composite_model/runtime_outputs.jl") include("composite_model/scenario_dsl.jl") diff --git a/test/runtests.jl b/test/runtests.jl index 986c8b2a8..ac4bd36ca 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -78,6 +78,10 @@ else include("test-model-binding-inference.jl") end + @testset "Identity-aware Many inputs" begin + include("test-model-bound-many.jl") + end + @testset "Composite model multirate integration" begin include("test-model-multirate-integration.jl") end diff --git a/test/test-model-api-stabilization.jl b/test/test-model-api-stabilization.jl index f1332968b..ab859ee7a 100644 --- a/test/test-model-api-stabilization.jl +++ b/test/test-model-api-stabilization.jl @@ -187,6 +187,7 @@ end :Aggregate, :Ancestor, :Atmosphere, + :BoundMany, :Call, :CallTarget, :CallTargets, @@ -232,6 +233,7 @@ end :application_name, :applies_to, :bounds, + :bound_input, :call_model, :call_targets, :collect_outputs, diff --git a/test/test-model-bound-many.jl b/test/test-model-bound-many.jl new file mode 100644 index 000000000..4b0a886ad --- /dev/null +++ b/test/test-model-bound-many.jl @@ -0,0 +1,576 @@ +using PlantSimEngine +using Test + +PlantSimEngine.@process "bound_many_probe" verbose = false +PlantSimEngine.@process "bound_many_source" verbose = false +PlantSimEngine.@process "bound_many_signal_probe" verbose = false +PlantSimEngine.@process "bound_many_hard_call_controller" verbose = false + +struct BoundManyProbeToken + value::Int +end + +struct BoundManyProbeModel <: AbstractBound_Many_ProbeModel end +struct BoundManySourceModel <: AbstractBound_Many_SourceModel end +struct BoundManySignalProbeModel <: AbstractBound_Many_Signal_ProbeModel end +struct BoundManyHardCallControllerModel <: + AbstractBound_Many_Hard_Call_ControllerModel end + +PlantSimEngine.inputs_(::BoundManySourceModel) = NamedTuple() +PlantSimEngine.outputs_(::BoundManySourceModel) = (signal=0.0,) + +function PlantSimEngine.run!( + ::BoundManySourceModel, + status, + environment, + constants, + context, +) + return nothing +end + +PlantSimEngine.inputs_(::BoundManySignalProbeModel) = ( + signals=Required(Vector{Float64}), +) +PlantSimEngine.outputs_(::BoundManySignalProbeModel) = ( + seen_ids=ObjectId[], + seen_signals=Float64[], + total=0.0, +) + +function PlantSimEngine.run!( + ::BoundManySignalProbeModel, + status, + environment, + constants, + context, +) + signals = bound_input(context, :signals) + status.seen_ids = collect(object_ids(signals)) + status.seen_signals = collect(signals) + status.total = sum(signals; init=0.0) + return nothing +end + +PlantSimEngine.inputs_(::BoundManyHardCallControllerModel) = NamedTuple() +PlantSimEngine.outputs_(::BoundManyHardCallControllerModel) = (callee_total=0.0,) + +function PlantSimEngine.run!( + ::BoundManyHardCallControllerModel, + status, + environment, + constants, + context, +) + status.callee_total = only(run_call!(context, :probe)).status.total + return nothing +end + +PlantSimEngine.inputs_(::BoundManyProbeModel) = ( + signals=Required(Vector{Float64}), + tokens=Required(Vector{Any}), +) +PlantSimEngine.outputs_(::BoundManyProbeModel) = ( + seen_ids=ObjectId[], + seen_signals=Float64[], + seen_tokens=Any[], + total=0.0, +) + +function PlantSimEngine.run!( + ::BoundManyProbeModel, + status, + environment, + constants, + context, +) + signals = bound_input(context, :signals) + tokens = bound_input(context, :tokens) + @assert object_ids(signals) == object_ids(tokens) + status.seen_ids = collect(object_ids(signals)) + status.seen_signals = collect(signals) + status.seen_tokens = collect(tokens) + total = 0.0 + @inbounds for index in eachindex(signals) + total += signals[index] + end + status.total = total + return nothing +end + +function bound_many_probe_target( + simulation, + object_id; + application=:bound_probe, +) + id = ObjectId(object_id) + return only( + target + for batch in simulation.execution_plan.batches + if batch.application.id == application + for target in batch.targets + if target.object_id == id + ) +end + +function sum_bound_many_input(context) + values = bound_input(context, :signals) + total = 0.0 + @inbounds for index in eachindex(values) + total += values[index] + end + return total +end + +refvector_dispatch(::PlantSimEngine.RefVector) = :ref_vector + +struct BoundManyShiftedVector{T} <: AbstractVector{T} + values::Vector{T} + offset::Int +end + +Base.size(values::BoundManyShiftedVector) = size(values.values) +Base.axes(values::BoundManyShiftedVector) = ( + values.offset:(values.offset + length(values.values) - 1), +) +Base.IndexStyle(::Type{<:BoundManyShiftedVector}) = IndexLinear() +Base.getindex(values::BoundManyShiftedVector, index::Int) = + values.values[index - values.offset + 1] + +@testset "BoundMany vector and identity interface" begin + ids = ObjectId[ObjectId(:leaf_a), ObjectId(:leaf_b)] + carrier = PlantSimEngine.RefVector([Ref(1.0), Ref(2.0)]) + values = BoundMany(ids, carrier) + + @test values isa AbstractVector{Float64} + @test parent(values) === carrier + @test object_ids(values) == ids + @test object_ids(values) !== ids + @test collect(values) == [1.0, 2.0] + @test values[1] == 1.0 + @test values[ObjectId(:leaf_b)] == 2.0 + @test values .+ 1.0 == [2.0, 3.0] + @test_throws BoundsError values[3] + @test_throws BoundsError (values[3] = 5.0) + + values[1] = 3.0 + values[ObjectId(:leaf_b)] = 4.0 + @test collect(carrier) == [3.0, 4.0] + @test_throws KeyError values[ObjectId(:missing)] + @test_throws DimensionMismatch BoundMany(ids[1:1], carrier) + @test_throws DimensionMismatch BoundMany( + ids, + BoundManyShiftedVector([1.0, 2.0], 0), + ) + @test_throws ArgumentError BoundMany( + BoundManyShiftedVector(ids, 0), + BoundManyShiftedVector([1.0, 2.0], 0), + ) + @test_throws ArgumentError BoundMany(reverse(ids), carrier) + @test_throws ArgumentError BoundMany( + ObjectId[ObjectId(:leaf_a), ObjectId(:leaf_a)], + carrier, + ) + + heterogeneous = PlantSimEngine.ObjectRefVector( + Base.RefValue[Ref{Any}(BoundManyProbeToken(1)), Ref{Any}(2)], + ) + heterogeneous_values = BoundMany(ids, heterogeneous) + @test eltype(heterogeneous_values) == Any + @test heterogeneous_values[ObjectId(:leaf_a)] == + BoundManyProbeToken(1) + heterogeneous_values[ObjectId(:leaf_b)] = :updated + @test heterogeneous[2] == :updated +end + +@testset "compiled BoundMany lifecycle alignment" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant_a; scale=:Plant, parent=:scene), + Object(:plant_b; scale=:Plant, parent=:scene), + Object( + :leaf_b; + scale=:Leaf, + parent=:plant_a, + status=Status( + signal=2.0, + token=BoundManyProbeToken(2), + ), + ), + Object( + :leaf_d; + scale=:Leaf, + parent=:plant_a, + status=Status(signal=4.0, token=4), + ), + Object( + :leaf_c; + scale=:Leaf, + parent=:plant_b, + status=Status(signal=30.0, token=30), + ); + applications=( + ModelSpec( + BoundManyProbeModel(); + name=:bound_probe, + on=Many(scale=:Plant), + inputs=( + :signals => Many( + scale=:Leaf, + within=Subtree(), + var=:signal, + from_status=true, + ), + :tokens => Many( + scale=:Leaf, + within=Subtree(), + var=:token, + from_status=true, + ), + ), + ), + ), + ) + + simulation = run!(model; outputs=:none) + plant_a = model_object(model, :plant_a).status + plant_b = model_object(model, :plant_b).status + @test plant_a.seen_ids == ObjectId[ObjectId(:leaf_b), ObjectId(:leaf_d)] + @test plant_a.seen_signals == [2.0, 4.0] + @test plant_a.seen_tokens == [BoundManyProbeToken(2), 4] + @test plant_a.total == 6.0 + @test plant_b.seen_ids == ObjectId[ObjectId(:leaf_c)] + @test plant_b.total == 30.0 + @test refvector_dispatch(plant_a.signals) == :ref_vector + @test plant_a.tokens isa PlantSimEngine.ObjectRefVector + + initial_target = bound_many_probe_target(simulation, :plant_a) + initial_values = initial_target.bound_inputs.signals + @test bound_input(initial_target.context, :signals) === initial_values + @test @inferred(bound_input( + initial_target.context, + Val(:signals), + )) === initial_values + @test @inferred(sum_bound_many_input(initial_target.context)) == 6.0 + sum_bound_many_input(initial_target.context) + @test @allocated(sum_bound_many_input(initial_target.context)) == 0 + @test_throws ArgumentError bound_input(initial_target.context, "signals") + + register_object!( + model, + Object( + :leaf_z; + scale=:Leaf, + status=Status(signal=26.0, token=26), + ); + parent=:plant_a, + ) + continue!(simulation) + appended_target = bound_many_probe_target(simulation, :plant_a) + @test appended_target.bound_inputs.signals === initial_values + @test object_ids(initial_values) == + ObjectId[ObjectId(:leaf_b), ObjectId(:leaf_d), ObjectId(:leaf_z)] + @test plant_a.seen_signals == [2.0, 4.0, 26.0] + + register_object!( + model, + Object( + :leaf_a; + scale=:Leaf, + status=Status(signal=1.0, token=1), + ); + parent=:plant_a, + ) + continue!(simulation) + inserted_target = bound_many_probe_target(simulation, :plant_a) + inserted_values = inserted_target.bound_inputs.signals + @test inserted_values !== initial_values + @test object_ids(inserted_values) == ObjectId[ + ObjectId(:leaf_a), + ObjectId(:leaf_b), + ObjectId(:leaf_d), + ObjectId(:leaf_z), + ] + @test plant_a.seen_signals == [1.0, 2.0, 4.0, 26.0] + + remove_object!(model, :leaf_b) + continue!(simulation) + @test plant_a.seen_ids == ObjectId[ + ObjectId(:leaf_a), + ObjectId(:leaf_d), + ObjectId(:leaf_z), + ] + @test plant_a.seen_signals == [1.0, 4.0, 26.0] + + reparent_object!(model, :leaf_d, :plant_b) + continue!(simulation) + @test plant_a.seen_ids == + ObjectId[ObjectId(:leaf_a), ObjectId(:leaf_z)] + @test plant_a.seen_signals == [1.0, 26.0] + @test plant_b.seen_ids == + ObjectId[ObjectId(:leaf_c), ObjectId(:leaf_d)] + @test plant_b.seen_signals == [30.0, 4.0] + + remove_object!(model, :leaf_a) + remove_object!(model, :leaf_z) + continue!(simulation) + @test isempty(plant_a.seen_ids) + @test isempty(plant_a.seen_signals) + @test plant_a.total == 0.0 +end + +@testset "producer-qualified BoundMany updates in place" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant_a; scale=:Plant, parent=:scene), + Object(:plant_b; scale=:Plant, parent=:scene), + Object( + :leaf_a; + scale=:Leaf, + parent=:plant_a, + status=Status(signal=1.0), + ), + Object( + :leaf_b; + scale=:Leaf, + parent=:plant_a, + status=Status(signal=2.0), + ), + Object( + :leaf_c; + scale=:Leaf, + parent=:plant_b, + status=Status(signal=3.0), + ); + applications=( + ModelSpec( + BoundManySourceModel(); + name=:bound_source, + on=Many(scale=:Leaf), + ), + ModelSpec( + BoundManySignalProbeModel(); + name=:bound_signal_probe, + on=Many(scale=:Plant), + inputs=( + :signals => Many( + scale=:Leaf, + within=Subtree(), + application=:bound_source, + var=:signal, + ), + ), + ), + ), + ) + + simulation = run!(model; outputs=:none) + target_a = bound_many_probe_target( + simulation, + :plant_a; + application=:bound_signal_probe, + ) + target_b = bound_many_probe_target( + simulation, + :plant_b; + application=:bound_signal_probe, + ) + values_a = target_a.bound_inputs.signals + values_b = target_b.bound_inputs.signals + + register_object!( + model, + Object(:leaf_z; scale=:Leaf, status=Status(signal=26.0)); + parent=:plant_a, + ) + continue!(simulation) + @test bound_many_probe_target( + simulation, + :plant_a; + application=:bound_signal_probe, + ) === target_a + @test target_a.bound_inputs.signals === values_a + @test object_ids(values_a) == ObjectId[ + ObjectId(:leaf_a), + ObjectId(:leaf_b), + ObjectId(:leaf_z), + ] + + remove_object!(model, :leaf_b) + continue!(simulation) + @test bound_many_probe_target( + simulation, + :plant_a; + application=:bound_signal_probe, + ) === target_a + @test target_a.bound_inputs.signals === values_a + @test object_ids(values_a) == + ObjectId[ObjectId(:leaf_a), ObjectId(:leaf_z)] + + reparent_object!(model, :leaf_z, :plant_b) + continue!(simulation) + @test bound_many_probe_target( + simulation, + :plant_a; + application=:bound_signal_probe, + ) === target_a + @test bound_many_probe_target( + simulation, + :plant_b; + application=:bound_signal_probe, + ) === target_b + @test target_a.bound_inputs.signals === values_a + @test target_b.bound_inputs.signals === values_b + @test object_ids(values_a) == ObjectId[ObjectId(:leaf_a)] + @test object_ids(values_b) == + ObjectId[ObjectId(:leaf_c), ObjectId(:leaf_z)] +end + +@testset "BoundMany empty, temporal, and hard-call paths" begin + empty_model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene); + applications=( + ModelSpec( + BoundManySourceModel(); + name=:bound_source, + on=Many(scale=:Leaf), + ), + ModelSpec( + BoundManySignalProbeModel(); + name=:bound_signal_probe, + on=One(scale=:Plant), + inputs=( + :signals => Many( + scale=:Leaf, + within=Subtree(), + application=:bound_source, + var=:signal, + ), + ), + ), + ), + ) + empty_simulation = run!(empty_model; outputs=:none) + @test isempty(model_object(empty_model, :plant).status.seen_ids) + register_object!( + empty_model, + Object(:leaf_first; scale=:Leaf, status=Status(signal=1.5)); + parent=:plant, + ) + continue!(empty_simulation) + typed_target = bound_many_probe_target( + empty_simulation, + :plant; + application=:bound_signal_probe, + ) + @test eltype(typed_target.bound_inputs.signals) == Float64 + @test model_object(empty_model, :plant).status.seen_ids == + ObjectId[ObjectId(:leaf_first)] + + temporal_model = CompositeModel( + Object( + :scene; + scale=:Scene, + status=Status(signals=[0.0, 0.0]), + ), + Object( + :leaf_a; + scale=:Leaf, + parent=:scene, + status=Status(signal=1.0), + ), + Object( + :leaf_b; + scale=:Leaf, + parent=:scene, + status=Status(signal=2.0), + ); + applications=( + ModelSpec( + BoundManySourceModel(); + name=:bound_source, + on=Many(scale=:Leaf), + ), + ModelSpec( + BoundManySignalProbeModel(); + name=:temporal_probe, + on=One(scale=:Scene), + inputs=( + PreviousTimeStep(:signals) => Many( + scale=:Leaf, + within=SceneScope(), + application=:bound_source, + var=:signal, + ), + ), + ), + ), + ) + temporal_simulation = run!(temporal_model; steps=2, outputs=:none) + temporal_target = bound_many_probe_target( + temporal_simulation, + :scene; + application=:temporal_probe, + ) + @test object_ids(temporal_target.bound_inputs.signals) == + ObjectId[ObjectId(:leaf_a), ObjectId(:leaf_b)] + @test model_object(temporal_model, :scene).status.seen_signals == [1.0, 2.0] + + hard_call_model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene), + Object( + :leaf_a; + scale=:Leaf, + parent=:plant, + status=Status(signal=4.0), + ), + Object( + :leaf_b; + scale=:Leaf, + parent=:plant, + status=Status(signal=6.0), + ); + applications=( + ModelSpec( + BoundManySourceModel(); + name=:bound_source, + on=Many(scale=:Leaf), + ), + ModelSpec( + BoundManySignalProbeModel(); + name=:called_probe, + on=One(scale=:Plant), + inputs=( + :signals => Many( + scale=:Leaf, + within=Subtree(), + application=:bound_source, + var=:signal, + ), + ), + ), + ModelSpec( + BoundManyHardCallControllerModel(); + name=:controller, + on=One(scale=:Scene), + calls=( + :probe => One( + scale=:Plant, + within=Subtree(), + application=:called_probe, + ), + ), + ), + ), + ) + run!(hard_call_model; outputs=:none) + @test model_object(hard_call_model, :scene).status.callee_total == 10.0 + @test model_object(hard_call_model, :plant).status.seen_ids == + ObjectId[ObjectId(:leaf_a), ObjectId(:leaf_b)] +end + +@testset "bound_input errors name the compiled context" begin + @test_throws ArgumentError bound_input(nothing, :signals) +end From 657980da8def975a2c5a04ded01873f06098a314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Sun, 23 Aug 2026 09:57:35 +0200 Subject: [PATCH 04/45] benchmark: cover compiled many identity access --- benchmark/benchmarks.jl | 24 +++ .../test-distributed-output-benchmark.jl | 156 ++++++++++++++---- benchmark/test/runtests.jl | 41 ++++- 3 files changed, 189 insertions(+), 32 deletions(-) diff --git a/benchmark/benchmarks.jl b/benchmark/benchmarks.jl index 7cdf3b1df..fe15675ab 100644 --- a/benchmark/benchmarks.jl +++ b/benchmark/benchmarks.jl @@ -96,6 +96,18 @@ if SUPPORTS_COMPOSITE_OBJECT_BENCHMARKS ) setup = (values = setup_distributed_output_benchmark( $nobjects, ).bound_values) + SUITE[suite_name]["PSE_objectref_sum_$(nobjects)"] = + @benchmarkable benchmark_distributed_output_sum( + values, + ) setup = (values = setup_distributed_output_benchmark( + $nobjects, + ).heterogeneous_values) + SUITE[suite_name]["PSE_bound_objectref_sum_$(nobjects)"] = + @benchmarkable benchmark_distributed_output_sum( + values, + ) setup = (values = setup_distributed_output_benchmark( + $nobjects, + ).bound_heterogeneous_values) SUITE[suite_name]["PSE_distributed_assign_exact_$(nobjects)"] = @benchmarkable benchmark_assign_distributed_outputs_exact!( data.exact_targets, @@ -113,6 +125,18 @@ if SUPPORTS_COMPOSITE_OBJECT_BENCHMARKS data.object_ids, data.permuted_result_ids, ) setup = (data = setup_distributed_output_benchmark(1_000)) + for identity_aware in (false, true) + input_kind = identity_aware ? "bound" : "status" + SUITE[suite_name]["PSE_$(input_kind)_many_input_steps_1000"] = + @benchmarkable benchmark_distributed_output_input_steps( + simulation, + nsteps, + ) setup = ((simulation, nsteps) = + setup_distributed_output_input_step_benchmark( + 1_000; + identity_aware=$identity_aware, + )) evals = 1 + end include(joinpath(@__DIR__, "test-hard-call-path-benchmark.jl")) for usage in (:zero, :sparse, :dense) diff --git a/benchmark/test-distributed-output-benchmark.jl b/benchmark/test-distributed-output-benchmark.jl index 445a3f5a8..04f4b5f88 100644 --- a/benchmark/test-distributed-output-benchmark.jl +++ b/benchmark/test-distributed-output-benchmark.jl @@ -1,33 +1,56 @@ using PlantSimEngine -""" -Benchmark-only identity-aware view over an existing vector carrier. +PlantSimEngine.@process "distributed_output_benchmark_bound_input" verbose = false +PlantSimEngine.@process "distributed_output_benchmark_status_input" verbose = false -This prototype measures the cost of carrying compiler-owned object IDs beside -the current carrier. It is deliberately not part of the public API. -""" -struct DistributedOutputBenchmarkBoundMany{T,I,V} <: AbstractVector{T} - object_ids::I - values::V -end +struct DistributedOutputBenchmarkBoundInputModel <: + AbstractDistributed_Output_Benchmark_Bound_InputModel end +struct DistributedOutputBenchmarkStatusInputModel <: + AbstractDistributed_Output_Benchmark_Status_InputModel end -function DistributedOutputBenchmarkBoundMany(object_ids::I, values::V) where {I,V} - length(object_ids) == length(values) || throw( - DimensionMismatch( - "Object IDs and values must have the same length.", - ), - ) - return DistributedOutputBenchmarkBoundMany{eltype(V),I,V}( - object_ids, - values, - ) +PlantSimEngine.inputs_(::DistributedOutputBenchmarkBoundInputModel) = ( + signals=Required(Vector{Float64}), +) +PlantSimEngine.outputs_(::DistributedOutputBenchmarkBoundInputModel) = ( + total=0.0, +) +PlantSimEngine.inputs_(::DistributedOutputBenchmarkStatusInputModel) = ( + signals=Required(Vector{Float64}), +) +PlantSimEngine.outputs_(::DistributedOutputBenchmarkStatusInputModel) = ( + total=0.0, +) + +function PlantSimEngine.run!( + ::DistributedOutputBenchmarkBoundInputModel, + status, + environment, + constants, + context, +) + signals = bound_input(context, :signals) + total = 0.0 + @inbounds for index in eachindex(signals) + total += signals[index] + end + status.total = total + return nothing end -Base.IndexStyle(::Type{<:DistributedOutputBenchmarkBoundMany}) = IndexLinear() -Base.size(values::DistributedOutputBenchmarkBoundMany) = size(values.values) -Base.length(values::DistributedOutputBenchmarkBoundMany) = length(values.values) -@inline Base.getindex(values::DistributedOutputBenchmarkBoundMany, index::Int) = - @inbounds values.values[index] +function PlantSimEngine.run!( + ::DistributedOutputBenchmarkStatusInputModel, + status, + environment, + constants, + context, +) + total = 0.0 + @inbounds for index in eachindex(status.signals) + total += status.signals[index] + end + status.total = total + return nothing +end function benchmark_distributed_output_sum(values) total = 0.0 @@ -109,16 +132,27 @@ end function setup_distributed_output_benchmark(nobjects::Int=1_000) nobjects > 0 || throw(ArgumentError("`nobjects` must be positive.")) - object_ids = [ObjectId(Symbol(:object_, index)) for index in 1:nobjects] - references = [Ref(Float64(index)) for index in 1:nobjects] + pairs = [ + ( + id=ObjectId(Symbol(:object_, index)), + reference=Ref(Float64(index)), + heterogeneous_reference=Ref{Any}(Float64(index)), + ) for index in 1:nobjects + ] + sort!(pairs; by=pair -> string(pair.id.value)) + object_ids = getproperty.(pairs, :id) + references = getproperty.(pairs, :reference) ref_values = PlantSimEngine.RefVector(references) - bound_values = - DistributedOutputBenchmarkBoundMany(object_ids, ref_values) + bound_values = BoundMany(object_ids, ref_values) heterogeneous_values = PlantSimEngine.ObjectRefVector( - [Ref{Any}(Float64(index)) for index in 1:nobjects], + getproperty.(pairs, :heterogeneous_reference), + ) + bound_heterogeneous_values = BoundMany( + object_ids, + heterogeneous_values, ) - exact_values = collect(Float64, 1:nobjects) + exact_values = getindex.(references) permuted_result_ids = reverse(object_ids) permuted_values = reverse(exact_values) result_to_destination = @@ -138,6 +172,7 @@ function setup_distributed_output_benchmark(nobjects::Int=1_000) ref_values=ref_values, bound_values=bound_values, heterogeneous_values=heterogeneous_values, + bound_heterogeneous_values=bound_heterogeneous_values, exact_values=exact_values, permuted_result_ids=permuted_result_ids, permuted_values=permuted_values, @@ -146,3 +181,64 @@ function setup_distributed_output_benchmark(nobjects::Int=1_000) permuted_targets=permuted_targets, ) end + +function setup_distributed_output_input_benchmark( + nobjects::Int=1_000; + identity_aware::Bool, +) + nobjects > 0 || throw(ArgumentError("`nobjects` must be positive.")) + objects = Object[Object(:scene; scale=:Scene)] + sizehint!(objects, nobjects + 1) + for index in 1:nobjects + push!( + objects, + Object( + Symbol(:leaf_, index); + scale=:Leaf, + parent=:scene, + status=Status(signal=Float64(index)), + ), + ) + end + input_model = identity_aware ? + DistributedOutputBenchmarkBoundInputModel() : + DistributedOutputBenchmarkStatusInputModel() + model = CompositeModel( + objects...; + applications=( + ModelSpec( + input_model; + name=:input_benchmark, + on=One(scale=:Scene), + inputs=( + :signals => Many( + scale=:Leaf, + within=SceneScope(), + var=:signal, + from_status=true, + ), + ), + ), + ), + ) + simulation = run!(model; outputs=:none) + return ( + simulation=simulation, + nsteps=100, + expected_total=sum(Float64, 1:nobjects), + ) +end + +benchmark_distributed_output_input_steps(simulation, nsteps) = + continue!(simulation; steps=nsteps) + +function setup_distributed_output_input_step_benchmark( + nobjects::Int=1_000; + identity_aware::Bool, +) + data = setup_distributed_output_input_benchmark( + nobjects; + identity_aware=identity_aware, + ) + return data.simulation, data.nsteps +end diff --git a/benchmark/test/runtests.jl b/benchmark/test/runtests.jl index 992315ffb..f22f183ab 100644 --- a/benchmark/test/runtests.jl +++ b/benchmark/test/runtests.jl @@ -238,14 +238,51 @@ if benchmark_test_enabled("distributed output benchmark API smoke") @test benchmark_distributed_output_sum(data.bound_values) == expected_sum @test benchmark_distributed_output_sum(data.heterogeneous_values) == expected_sum - @test data.bound_values.object_ids === data.object_ids - @test data.bound_values.values === data.ref_values + @test benchmark_distributed_output_sum( + data.bound_heterogeneous_values, + ) == expected_sum + @test getfield(object_ids(data.bound_values), :ids) === data.object_ids + @test parent(data.bound_values) === data.ref_values + @test parent(data.bound_heterogeneous_values) === + data.heterogeneous_values benchmark_distributed_output_sum(data.ref_values) benchmark_distributed_output_sum(data.bound_values) @test @allocated(benchmark_distributed_output_sum(data.ref_values)) == 0 @test @allocated(benchmark_distributed_output_sum(data.bound_values)) == 0 + status_input_data = setup_distributed_output_input_benchmark( + 16; + identity_aware=false, + ) + bound_input_data = setup_distributed_output_input_benchmark( + 16; + identity_aware=true, + ) + @test model_object( + status_input_data.simulation.model, + :scene, + ).status.total == status_input_data.expected_total + @test model_object( + bound_input_data.simulation.model, + :scene, + ).status.total == bound_input_data.expected_total + benchmark_distributed_output_input_steps( + status_input_data.simulation, + 2, + ) + benchmark_distributed_output_input_steps( + bound_input_data.simulation, + 2, + ) + @test model_object( + bound_input_data.simulation.model, + :scene, + ).status.total == model_object( + status_input_data.simulation.model, + :scene, + ).status.total + benchmark_assign_distributed_outputs_exact!( data.exact_targets, data.exact_values, From ef1436b1e7e17922cb475225880210ac05dc59ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Sun, 23 Aug 2026 09:58:02 +0200 Subject: [PATCH 05/45] docs: explain identity-aware many inputs --- docs/src/API/API_public.md | 3 ++ docs/src/API/public_symbols.md | 2 ++ docs/src/dev/distributed_output_ownership.md | 17 +++++++---- docs/src/guides/multiscale/value_coupling.md | 30 ++++++++++++++++++++ 4 files changed, 47 insertions(+), 5 deletions(-) diff --git a/docs/src/API/API_public.md b/docs/src/API/API_public.md index 0aa29605d..82757fd7b 100644 --- a/docs/src/API/API_public.md +++ b/docs/src/API/API_public.md @@ -16,6 +16,9 @@ ### Coupling - `ModelSpec(...; inputs=...)` declares value dependencies. +- `bound_input(context, :name)` opts a model kernel into an identity-aware + `BoundMany` view for one of its declared `Many` inputs; `object_ids(view)` + returns the aligned object identities without copying them. - `ModelSpec(...; calls=...)` declares manually executable child models. - `Updates(:variable; after=:application_id)` orders intentional duplicate writers. - `Input(...)` and `Call(...)` express model defaults through `dep(model)`. diff --git a/docs/src/API/public_symbols.md b/docs/src/API/public_symbols.md index b66a721cc..83bca7265 100644 --- a/docs/src/API/public_symbols.md +++ b/docs/src/API/public_symbols.md @@ -66,6 +66,8 @@ inspection: - Model IO inspection: `inputs`, `outputs`, `variables`, `environment_inputs`, `environment_outputs`, `validate_environment_inputs`. +- Identity-aware many-input access: `bound_input`, `BoundMany`, and + `object_ids`. - Timing and routing traits: `timespec`, `output_policy`, `timestep_hint`, `environment_hint`, `environment_bindings`, `environment_window`. diff --git a/docs/src/dev/distributed_output_ownership.md b/docs/src/dev/distributed_output_ownership.md index e4ac40768..032a74ab2 100644 --- a/docs/src/dev/distributed_output_ownership.md +++ b/docs/src/dev/distributed_output_ownership.md @@ -85,17 +85,24 @@ has no botanical or scientific meaning and may change when lifecycle refresh rebuilds a binding. An output result must therefore be associated by `ObjectId`, never by MTG -traversal order or an independently declared ID selector. A model-facing -identity-aware view may expose: +traversal order or an independently declared ID selector. The first +model-facing identity-aware view is: ```julia values = bound_input(context, :organ_values) object_ids(values) ``` -The first implementation should leave the ordinary `RefVector` status carrier -unchanged. Identity-aware access is opt-in until explicit `RefVector` dispatches -and performance have been audited. +`BoundMany` preserves ordinary positional vector behavior. Identity indexing is +explicit (`values[ObjectId(:leaf_1)]`), so an integer remains a positional +index. The aligned identity view is live and read-only; it does not copy the +compiler's ID vector. Public construction validates that identities are unique +and use compiled `ObjectId` order, while compiler-owned construction reuses the +already validated binding. + +The ordinary `RefVector` or `ObjectRefVector` installed in model status remains +unchanged. Identity-aware access is opt-in through `RunContext`, so existing +model dispatch and the common status path retain their current semantics. ## Compilation and initialization diff --git a/docs/src/guides/multiscale/value_coupling.md b/docs/src/guides/multiscale/value_coupling.md index 9fe7675a7..54d48478b 100644 --- a/docs/src/guides/multiscale/value_coupling.md +++ b/docs/src/guides/multiscale/value_coupling.md @@ -8,3 +8,33 @@ Use `var=` to rename a source and `application=` to distinguish repeated processes. Homogeneous many-source values use a `RefVector`; heterogeneous values use an object-aware reference carrier. Inspect both through `Diagnostics.input_carrier`, `Diagnostics.input_value`, and `Diagnostics.explain_bindings`, not internal fields. + +## Keep identities aligned with values + +A model that only reduces or broadcasts over a `Many` input can keep using the +ordinary status field. When a model must associate a value with the object that +owns it, request the identity-aware view from the current `RunContext`: + +```julia +function PlantSimEngine.run!(model, status, environment, constants, context) + irradiance = bound_input(context, :irradiance) + + @inbounds for index in eachindex(irradiance) + object_id = object_ids(irradiance)[index] + value = irradiance[index] + # Use object_id and value as one aligned pair. + end + return nothing +end +``` + +`BoundMany` wraps the same live `RefVector` or heterogeneous carrier already +installed in `status.irradiance`; it does not copy values or identities. +Positions follow compiled `ObjectId` order and have no botanical meaning. +Identity lookup is unambiguous when written as +`irradiance[ObjectId(:leaf_12)]`; integer indexing remains positional. + +Obtain the view during each model invocation. Lifecycle refresh keeps the +current view aligned when possible and may replace it after insertion, +removal, or reparenting, so model code must not cache a `BoundMany` across a +lifecycle barrier. From 5e59a73e0ddfce8d9e232e9500108f5cb9392abf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Sun, 23 Aug 2026 10:31:22 +0200 Subject: [PATCH 06/45] feat: compile cross-object output targets --- src/ModelSpec.jl | 121 +++- src/PlantSimEngine.jl | 14 +- src/composite_model/compilation.jl | 628 +++++++++++++++++- src/composite_model/registry_topology.jl | 4 +- src/composite_model/selectors.jl | 4 +- src/processes/models_inputs_outputs.jl | 8 + src/visualization/model_graph_view.jl | 10 + test/runtests.jl | 4 + test/test-model-api-stabilization.jl | 7 + ...t-model-output-destination-declarations.jl | 474 +++++++++++++ 10 files changed, 1255 insertions(+), 19 deletions(-) create mode 100644 test/test-model-output-destination-declarations.jl diff --git a/src/ModelSpec.jl b/src/ModelSpec.jl index 5a4dc2024..81efb4698 100644 --- a/src/ModelSpec.jl +++ b/src/ModelSpec.jl @@ -1,16 +1,19 @@ """ ModelSpec(model; name=nothing, on=nothing, inputs=NamedTuple(), - calls=NamedTuple(), environment=nothing, every=nothing, + calls=NamedTuple(), outputs_to=NamedTuple(), + environment=nothing, every=nothing, environment_bindings=NamedTuple(), environment_window=nothing, output_routing=NamedTuple(), updates=()) Configuration for one model application in a `CompositeModel`. `ModelSpec` is the single scenario-construction form. `on` selects the target -objects, `inputs` and `calls` declare coupling, `every` selects application -cadence, and `environment` accepts an [`Environment`](@ref) configuration. -Output routing and intentional duplicate-writer ordering are declared directly -with `output_routing` and `updates`. +objects, `inputs` and `calls` declare coupling, `outputs_to` declares status +outputs owned by this application but stored on selected destination objects, +`every` selects application cadence, and `environment` accepts an +[`Environment`](@ref) configuration. Output routing and intentional +duplicate-writer ordering are declared directly with `output_routing` and +`updates`. # Example @@ -28,7 +31,7 @@ ModelSpec( ) ``` """ -struct ModelSpec{M,N,AT,IN,IO,CA,CO,EV,TS,MB,MW,OR,UP} +struct ModelSpec{M,N,AT,IN,IO,CA,CO,OT,EV,TS,MB,MW,OR,UP} model::M name::N applies_to::AT @@ -36,6 +39,7 @@ struct ModelSpec{M,N,AT,IN,IO,CA,CO,EV,TS,MB,MW,OR,UP} input_origins::IO calls::CA call_origins::CO + outputs_to::OT environment::EV timestep::TS environment_bindings::MB @@ -44,6 +48,102 @@ struct ModelSpec{M,N,AT,IN,IO,CA,CO,EV,TS,MB,MW,OR,UP} updates::UP end +function _normalize_output_to_variables(vars::NamedTuple) + isempty(vars) && error( + "`OutputTo(...; vars=...)` requires at least one destination variable." + ) + _has_only_input_declarations(values(vars)) && return vars + invalid = Pair{Symbol,Any}[ + Symbol(name) => declaration + for (name, declaration) in pairs(vars) + if !_is_input_declaration(declaration) + ] + isempty(invalid) || error( + "`OutputTo(...; vars=...)` must declare every destination variable with ", + "`Required(T)` or `Default(value)`. Invalid declaration(s): ", + join( + ["`$(name)=$(repr(declaration))`" for (name, declaration) in invalid], + ", ", + ), + ".", + ) + return vars +end + +function _normalize_output_to_variables(vars) + error( + "`OutputTo(...; vars=...)` requires a non-empty `NamedTuple` of ", + "`Required(T)` and `Default(value)` declarations; got `$(typeof(vars))`." + ) +end + +function _normalize_output_to_coverage(coverage) + coverage === :exact || error( + "Unsupported `OutputTo` coverage `$(repr(coverage))`. Only `coverage=:exact` ", + "is currently supported." + ) + return coverage +end + +""" + OutputTo(selector; vars, coverage=:exact) + +Declare status outputs computed by one model application and stored on other +objects selected by `selector`. + +`vars` is a non-empty `NamedTuple` whose values are [`Required`](@ref) or +[`Default`](@ref) declarations. `coverage=:exact` requires the application to +publish every declared variable for every selected destination; no partial +coverage policy is currently supported. + +# Example + +```julia +OutputTo( + Many(scale=(:Leaf, :Internode), within=SceneScope()); + vars=( + incident_par=Default(0.0), + absorbed_par=Required(Float64), + ), +) +``` +""" +struct OutputTo{S,V,C} + selector::S + vars::V + coverage::C + + function OutputTo(selector; vars, coverage=:exact) + normalized_selector = _validate_selector_context(selector, :output_destination) + normalized_vars = _normalize_output_to_variables(vars) + normalized_coverage = _normalize_output_to_coverage(coverage) + return new{ + typeof(normalized_selector), + typeof(normalized_vars), + typeof(normalized_coverage), + }(normalized_selector, normalized_vars, normalized_coverage) + end +end + +function _normalize_outputs_to(outputs_to::NamedTuple) + for (name, destination) in pairs(outputs_to) + destination isa OutputTo || error( + "Unsupported output destination `$(name)=$(repr(destination))`. ", + "Every `ModelSpec(...; outputs_to=...)` entry must be an `OutputTo(...)` ", + "declaration." + ) + end + return outputs_to +end + +function _normalize_outputs_to(outputs_to) + error( + "Unsupported `outputs_to` value `$(repr(outputs_to))` of type ", + "`$(typeof(outputs_to))`. Use a `NamedTuple` of named `OutputTo(...)` ", + "declarations." + ) +end + """ Updates(vars...; after=nothing) @@ -102,6 +202,7 @@ function ModelSpec( on=nothing, inputs=NamedTuple(), calls=NamedTuple(), + outputs_to=NamedTuple(), environment=nothing, every=nothing, environment_bindings=NamedTuple(), @@ -115,6 +216,7 @@ function ModelSpec( on=on, inputs=inputs, calls=calls, + outputs_to=outputs_to, environment=environment, every=every, environment_bindings=environment_bindings, @@ -132,6 +234,7 @@ function _build_model_spec( input_origins=nothing, calls=NamedTuple(), call_origins=nothing, + outputs_to=NamedTuple(), environment=nothing, every=nothing, environment_bindings=NamedTuple(), @@ -170,12 +273,13 @@ function _build_model_spec( normalized_call_origins, :calls, ) + normalized_outputs_to = _normalize_outputs_to(outputs_to) normalized_environment = _normalize_model_environment(environment) normalized_environment_bindings = _normalize_environment_bindings(environment_bindings) normalized_environment_window = _normalize_environment_window(environment_window) normalized_output_routing = _normalize_output_routing(output_routing) normalized_updates = _normalize_updates(updates) - return ModelSpec{typeof(base_model),typeof(normalized_name),typeof(normalized_on),typeof(normalized_inputs),typeof(normalized_input_origins),typeof(normalized_calls),typeof(normalized_call_origins),typeof(normalized_environment),typeof(every),typeof(normalized_environment_bindings),typeof(normalized_environment_window),typeof(normalized_output_routing),typeof(normalized_updates)}( + return ModelSpec{typeof(base_model),typeof(normalized_name),typeof(normalized_on),typeof(normalized_inputs),typeof(normalized_input_origins),typeof(normalized_calls),typeof(normalized_call_origins),typeof(normalized_outputs_to),typeof(normalized_environment),typeof(every),typeof(normalized_environment_bindings),typeof(normalized_environment_window),typeof(normalized_output_routing),typeof(normalized_updates)}( base_model, normalized_name, normalized_on, @@ -183,6 +287,7 @@ function _build_model_spec( normalized_input_origins, normalized_calls, normalized_call_origins, + normalized_outputs_to, normalized_environment, every, normalized_environment_bindings, @@ -224,6 +329,7 @@ function _replace_model_spec( input_origins=spec.input_origins, calls=spec.calls, call_origins=spec.call_origins, + outputs_to=spec.outputs_to, environment=spec.environment, every=spec.timestep, environment_bindings=spec.environment_bindings, @@ -239,6 +345,7 @@ function _replace_model_spec( input_origins=input_origins, calls=calls, call_origins=call_origins, + outputs_to=outputs_to, environment=environment, every=every, environment_bindings=environment_bindings, diff --git a/src/PlantSimEngine.jl b/src/PlantSimEngine.jl index b3573f465..7e1ad4b2d 100644 --- a/src/PlantSimEngine.jl +++ b/src/PlantSimEngine.jl @@ -91,11 +91,15 @@ import ..PlantSimEngine: CompiledApplicationPlan, CompiledModelInputPlan, CompiledModelCallPlan, + CompiledModelOutputDestinationPlan, CompiledScenarioPlan, CompiledCompositeModel, CompiledModelApplication, CompiledModelInputBinding, CompiledModelCallBinding, + CompiledModelOutputDestinationBinding, + CompiledDistributedOutputPlans, + CompiledDistributedOutputs, CompiledEnvironmentBinding, CompiledEnvironmentBindings, ObjectRefVector, @@ -118,9 +122,12 @@ export ObjectRegistry export LifecycleObjectSnapshot, LifecycleReparentEvent, LifecycleMoveEvent export LifecycleDelta, lifecycle_delta export CompiledApplicationPlan, CompiledModelInputPlan, CompiledModelCallPlan +export CompiledModelOutputDestinationPlan export CompiledScenarioPlan export CompiledCompositeModel, CompiledModelApplication export CompiledModelInputBinding, CompiledModelCallBinding +export CompiledModelOutputDestinationBinding +export CompiledDistributedOutputPlans, CompiledDistributedOutputs export CompiledEnvironmentBinding, CompiledEnvironmentBindings export ObjectRefVector, TimeStepTable export compile_composite_model, refresh_bindings!, refresh_environment_bindings! @@ -146,6 +153,7 @@ import ..PlantSimEngine: explain_applications, explain_bindings, explain_calls, + explain_output_bindings, explain_writers, input_carrier, input_value, @@ -162,6 +170,7 @@ import ..PlantSimEngine: export ObjectAddress, object_address export explain_objects, explain_instances, explain_scopes export explain_applications, explain_bindings, explain_calls, explain_writers +export explain_output_bindings export input_carrier, input_value, has_reference_carrier export explain_outputs, explain_initialization, explain_execution_plan export explain_runtime_performance @@ -313,8 +322,9 @@ export runtime_model, current_step, final_state, outputs export SceneScope, Self, Subtree, SelfPlant, Ancestor, Scope, Relation export One, OptionalOne, Many export Input, Call, Environment -export application_name, applies_to, value_inputs, model_calls, environment_config -export ModelSpec, Updates +export application_name, applies_to, value_inputs, model_calls, outputs_to +export environment_config +export ModelSpec, OutputTo, Updates export call_targets, call_model, run_call!, commit_environment! export bound_input export Status diff --git a/src/composite_model/compilation.jl b/src/composite_model/compilation.jl index cfc3886c0..7a4152371 100644 --- a/src/composite_model/compilation.jl +++ b/src/composite_model/compilation.jl @@ -115,6 +115,124 @@ end _compiled_call_name(::CompiledModelCallPlan{NAME}) where {NAME} = NAME +"""Immutable authored cross-object output declaration for one application.""" +struct CompiledModelOutputDestinationPlan{GROUP,SEL,M,D,C} + slot::Int + application_slot::Int + application_id::Symbol + group::Symbol + selector::SEL + matcher::M + declarations::D + multiplicity::Symbol + coverage::C +end + +function CompiledModelOutputDestinationPlan( + slot, + application_slot, + application_id, + group::Symbol, + selector, + matcher, + declarations, + multiplicity, + coverage, +) + return CompiledModelOutputDestinationPlan{ + group, + typeof(selector), + typeof(matcher), + typeof(declarations), + typeof(coverage), + }( + slot, + application_slot, + application_id, + group, + selector, + matcher, + declarations, + multiplicity, + coverage, + ) +end + +"""Resolved destination membership before status references are constructed.""" +struct ResolvedModelOutputDestination{P} + plan::P + execution_object_id::ObjectId + destination_ids::Vector{ObjectId} +end + +"""Compiled columnar references for one execution object and output group.""" +mutable struct CompiledModelOutputDestinationBinding{P,C} + const plan::P + const execution_object_id::ObjectId + destination_ids::Vector{ObjectId} + columns::C + membership_generation::UInt64 +end + +@inline function Base.getproperty( + binding::CompiledModelOutputDestinationBinding, + name::Symbol, +) + name === :plan && return getfield(binding, :plan) + name === :execution_object_id && + return getfield(binding, :execution_object_id) + name === :destination_ids && return getfield(binding, :destination_ids) + name === :columns && return getfield(binding, :columns) + name === :membership_generation && + return getfield(binding, :membership_generation) + plan = getfield(binding, :plan) + name === :slot && return getfield(plan, :slot) + name === :application_slot && return getfield(plan, :application_slot) + name === :application_id && return getfield(plan, :application_id) + name === :group && return getfield(plan, :group) + name === :selector && return getfield(plan, :selector) + name === :matcher && return getfield(plan, :matcher) + name === :declarations && return getfield(plan, :declarations) + name === :multiplicity && return getfield(plan, :multiplicity) + name === :coverage && return getfield(plan, :coverage) + return getproperty(plan, name) +end + +Base.propertynames(binding::CompiledModelOutputDestinationBinding) = ( + :plan, + :execution_object_id, + :destination_ids, + :columns, + :membership_generation, + propertynames(binding.plan)..., +) + +"""One declared owner of a status variable on a destination object.""" +struct CompiledWriterOwner + application_slot::Int + application_id::Symbol + execution_object_id::ObjectId + group::Union{Nothing,Symbol} + kind::Symbol +end + +"""Zero-cost marker used when a scenario has no distributed outputs.""" +struct NoCompiledDistributedOutputPlans end + +"""Zero-cost marker used when a compiled scene has no distributed outputs.""" +struct NoCompiledDistributedOutputs end + +struct CompiledDistributedOutputPlans{P,I} + plans::P + by_application::I +end + +struct CompiledDistributedOutputs{B,I,W} + bindings::B + by_execution_target::I + writer_ownership::W +end + """One immutable root-scheduler rule in stable topological order.""" struct CompiledApplicationScheduleEntry slot::Int @@ -367,7 +485,7 @@ end Immutable application, dependency-declaration, and timeline metadata shared by every lifecycle refresh of a compiled scenario. """ -struct CompiledScenarioPlan{AP,AI,ATI,IP,IPI,CP,CPI,CO,MA,AC,AO,OAP,AS,TL} +struct CompiledScenarioPlan{AP,AI,ATI,IP,IPI,CP,CPI,DOP,CO,MA,AC,AO,OAP,AS,TL} applications::AP applications_by_id::AI application_target_candidates::ATI @@ -375,6 +493,7 @@ struct CompiledScenarioPlan{AP,AI,ATI,IP,IPI,CP,CPI,CO,MA,AC,AO,OAP,AS,TL} input_plans_by_application::IPI call_plans::CP call_plans_by_application::CPI + distributed_output_plans::DOP call_owners::CO manual_application_ids::MA application_children::AC @@ -563,6 +682,7 @@ function _compiled_scenario_plan( applications, input_plans, call_plans, + distributed_output_plans, timeline, ) application_plans = Tuple(application.plan for application in applications) @@ -600,6 +720,7 @@ function _compiled_scenario_plan( _plans_by_application(applications, input_plans), Tuple(call_plans), _plans_by_application(applications, call_plans), + distributed_output_plans, call_owners, manual_application_ids, application_children, @@ -810,7 +931,7 @@ end # scenario plan and application plans remain immutable values; only their # runtime shell is reference-backed so passing it across a batch boundary does # not box and copy the complete typed scenario-plan tuple. -mutable struct CompiledCompositeModel{SC,SP,AP,AI,OA,ABO,IB,CB,IBI,CBI,DBI,DCBI,MBC,CO,AC,SVI,CE,CET,PA,AO} +mutable struct CompiledCompositeModel{SC,SP,AP,AI,OA,ABO,IB,CB,IBI,CBI,DBI,DCBI,MBC,DO,CO,AC,SVI,CE,CET,PA,AO} model::SC scenario_plan::SP applications::AP @@ -824,6 +945,7 @@ mutable struct CompiledCompositeModel{SC,SP,AP,AI,OA,ABO,IB,CB,IBI,CBI,DBI,DCBI, dynamic_input_binding_indices::DBI dynamic_call_binding_indices::DCBI many_input_binding_cache::MBC + distributed_outputs::DO call_owners::CO application_children::AC status_views_by_target::SVI @@ -932,11 +1054,14 @@ function _compile_scene( started_at = _runtime_performance_start(performance) input_plans = _compile_model_input_plans(model, applications) call_plans = _compile_model_call_plans(model, applications) + distributed_output_plans = + _compile_model_output_destination_plans(model, applications) scenario_plan = _compiled_scenario_plan( model, applications, input_plans, call_plans, + distributed_output_plans, timeline, ) _runtime_performance_finish!( @@ -960,13 +1085,12 @@ function _compile_scene( :call_binding_compile, started_at, ) - _validate_model_writer_groups!( - _model_writer_groups( - applications, - scenario_plan.manual_application_ids, - ), + distributed_outputs = _compile_model_distributed_outputs( + model, + applications, + scenario_plan.manual_application_ids, + scenario_plan.distributed_output_plans, ) - _prepare_model_output_statuses!(model, applications) started_at = _runtime_performance_start(performance) input_bindings = _compile_model_input_bindings( model, @@ -1036,6 +1160,7 @@ function _compile_scene( _index_dynamic_input_bindings(model, input_bindings), _index_dynamic_call_bindings(model, call_bindings), many_input_binding_cache, + distributed_outputs, call_owners, application_children, status_views_by_target, @@ -1716,6 +1841,7 @@ function _prepare_structural_compiled_delta( _index_dynamic_input_bindings(model, input_bindings), _index_dynamic_call_bindings(model, call_bindings), _many_input_binding_cache(model, input_bindings), + compiled.distributed_outputs, compiled.call_owners, compiled.application_children, compiled.status_views_by_target, @@ -2327,6 +2453,7 @@ function _extend_compiled_scene( dynamic_input_binding_indices, dynamic_call_binding_indices, many_binding_cache, + compiled.distributed_outputs, call_owners, application_children, status_views_by_target, @@ -2870,6 +2997,155 @@ function _validate_model_writer_groups!(writer_groups) return nothing end +_resolve_model_output_destinations( + ::CompositeModel, + applications, + ::NoCompiledDistributedOutputPlans, +) = () + +function _resolve_model_output_destinations( + model::CompositeModel, + applications, + compiled_plans::CompiledDistributedOutputPlans, +) + resolved = ResolvedModelOutputDestination[] + for plan in compiled_plans.plans + application = applications[plan.application_slot] + for execution_object_id in application.target_ids + destination_ids = _dependency_object_ids( + model, + plan.selector, + plan.matcher, + execution_object_id, + ) + sizehint!(destination_ids, length(destination_ids) + 1) + push!( + resolved, + ResolvedModelOutputDestination( + plan, + execution_object_id, + destination_ids, + ), + ) + end + end + return Tuple(resolved) +end + +function _push_compiled_writer_owner!( + ownership, + object_id::ObjectId, + variable::Symbol, + owner::CompiledWriterOwner, +) + push!( + get!( + ownership, + (object_id, variable), + CompiledWriterOwner[], + ), + owner, + ) + return ownership +end + +function _validate_compiled_writer_ownership!(ownership, applications) + groups = Dict{Tuple{ObjectId,Symbol},Vector{Tuple{Int,Any}}}() + for ((object_id, variable), owners) in ownership + sort!(owners; by=owner -> owner.application_slot) + seen_application_slots = Set{Int}() + for owner in owners + if owner.application_slot in seen_application_slots + error( + "Application `$(owner.application_id)` declares more than one canonical " * + "writer for `$(variable)` on object `$(object_id.value)`. Ensure its " * + "`on=...` targets and named `outputs_to` destinations do not overlap.", + ) + end + push!(seen_application_slots, owner.application_slot) + push!( + get!( + groups, + (object_id, variable), + Tuple{Int,Any}[], + ), + ( + owner.application_slot, + applications[owner.application_slot], + ), + ) + end + end + _validate_model_writer_groups!(groups) + return ownership +end + +function _compile_model_writer_ownership( + applications, + manual_application_ids, + resolved_destinations, +) + ownership = Dict{ + Tuple{ObjectId,Symbol}, + Vector{CompiledWriterOwner}, + }() + for application in applications + application.id in manual_application_ids && continue + for object_id in application.target_ids + for variable in _model_canonical_output_names(application) + _push_compiled_writer_owner!( + ownership, + object_id, + variable, + CompiledWriterOwner( + application.plan.slot, + application.id, + object_id, + nothing, + :application_target, + ), + ) + end + end + end + for resolved in resolved_destinations + plan = resolved.plan + for destination_id in resolved.destination_ids + for variable_ in keys(plan.declarations) + variable = Symbol(variable_) + _push_compiled_writer_owner!( + ownership, + destination_id, + variable, + CompiledWriterOwner( + plan.application_slot, + plan.application_id, + resolved.execution_object_id, + plan.group, + :output_destination, + ), + ) + end + end + end + return _validate_compiled_writer_ownership!(ownership, applications) +end + +function _validate_manual_model_output_destination_plans!( + plans::CompiledDistributedOutputPlans, + manual_application_ids, +) + for plan in plans.plans + plan.application_id in manual_application_ids || continue + error( + "Application `$(plan.application_id)` declares distributed outputs but is " * + "manual-call-only. Distributed outputs on hard-called applications are not " * + "supported yet; declare the application as root-scheduled instead.", + ) + end + return plans +end + function _validate_model_writers!(applications, call_bindings=()) manual_application_ids = _manual_call_application_ids(call_bindings) return _validate_model_writer_groups!( @@ -3218,6 +3494,199 @@ function _prepare_model_output_statuses!(model::CompositeModel, applications) return model end +function _validate_required_model_output_destinations!( + model::CompositeModel, + resolved_destinations, +) + missing = NamedTuple[] + for resolved in resolved_destinations + for destination_id in resolved.destination_ids + for (variable_, declaration) in pairs(resolved.plan.declarations) + declaration isa Required || continue + variable = Symbol(variable_) + _status_has_variable(model, destination_id, variable) && continue + push!( + missing, + ( + application_id=resolved.plan.application_id, + execution_object_id=resolved.execution_object_id.value, + group=resolved.plan.group, + destination_id=destination_id.value, + variable=variable, + ), + ) + end + end + end + isempty(missing) && return nothing + details = join( + [ + "`$(row.application_id).$(row.group)` requires `$(row.variable)` on " * + "destination object `$(row.destination_id)`" + for row in missing + ], + "; ", + ) + error( + "Missing required distributed-output destination variable(s): ", + details, + ". Add the variable to each destination `Status` or declare it with ", + "`Default(value)` in `OutputTo(...; vars=...)`.", + ) +end + +function _validate_model_output_destination_statuses!( + model::CompositeModel, + resolved_destinations, +) + for resolved in resolved_destinations + for destination_id in resolved.destination_ids + status = _model_object(model, destination_id).status + (isnothing(status) || status isa Status) && continue + error( + "Output destination `$(resolved.plan.application_id).$(resolved.plan.group)` " * + "selected object `$(destination_id.value)` with status type " * + "`$(typeof(status))`. Use `Status(...)` or leave status as `nothing`.", + ) + end + end + return nothing +end + +function _prepare_model_output_destination_statuses!( + model::CompositeModel, + resolved_destinations, +) + for resolved in resolved_destinations + for destination_id in resolved.destination_ids + status = _ensure_model_object_status!(model, destination_id) + for (variable_, declaration) in pairs(resolved.plan.declarations) + declaration isa Default || continue + variable = Symbol(variable_) + status = _status_with_default( + status, + variable, + _private_initial_value(_input_default(declaration)), + ) + end + _model_object(model, destination_id).status = status + end + end + return model +end + +function _model_output_destination_columns( + model::CompositeModel, + resolved::ResolvedModelOutputDestination, +) + declarations = resolved.plan.declarations + names = Tuple(Symbol.(keys(declarations))) + columns = map(names) do variable + refs = Base.RefValue[ + refvalue( + _model_object(model, destination_id).status, + variable, + ) + for destination_id in resolved.destination_ids + ] + isempty(refs) ? RefVector{Any}() : _ref_vector_carrier(refs) + end + return NamedTuple{names}(Tuple(columns)) +end + +function _compile_model_output_destination_bindings( + model::CompositeModel, + resolved_destinations, +) + bindings = Any[] + sizehint!(bindings, length(resolved_destinations)) + by_execution_pairs = Dict{ + Tuple{Symbol,ObjectId}, + Vector{Pair{Symbol,Any}}, + }() + for resolved in resolved_destinations + binding = CompiledModelOutputDestinationBinding( + resolved.plan, + resolved.execution_object_id, + resolved.destination_ids, + _model_output_destination_columns(model, resolved), + UInt64(model.revision), + ) + push!(bindings, binding) + push!( + get!( + by_execution_pairs, + ( + resolved.plan.application_id, + resolved.execution_object_id, + ), + Pair{Symbol,Any}[], + ), + resolved.plan.group => binding, + ) + end + by_execution_target = Dict{Tuple{Symbol,ObjectId},Any}() + for (key, group_bindings) in by_execution_pairs + names = Tuple(first(pair) for pair in group_bindings) + values = Tuple(last(pair) for pair in group_bindings) + by_execution_target[key] = NamedTuple{names}(values) + end + # Keep the cache shell type stable across lifecycle refreshes. Membership + # can change both the number of bindings and an initially empty column's + # concrete carrier type. Concrete bindings are installed on execution + # targets later; the scene-wide lifecycle cache deliberately stays widened. + return bindings, by_execution_target +end + +function _compile_model_distributed_outputs( + model::CompositeModel, + applications, + manual_application_ids, + ::NoCompiledDistributedOutputPlans, +) + _validate_model_writer_groups!( + _model_writer_groups(applications, manual_application_ids), + ) + _prepare_model_output_statuses!(model, applications) + return NoCompiledDistributedOutputs() +end + +function _compile_model_distributed_outputs( + model::CompositeModel, + applications, + manual_application_ids, + plans::CompiledDistributedOutputPlans, +) + _validate_manual_model_output_destination_plans!( + plans, + manual_application_ids, + ) + resolved = _resolve_model_output_destinations( + model, + applications, + plans, + ) + ownership = _compile_model_writer_ownership( + applications, + manual_application_ids, + resolved, + ) + # All fallible ownership/required-state validation happens before any + # status initialization, so an invalid declaration cannot leave partial + # destination state behind. + _validate_model_output_destination_statuses!(model, resolved) + _validate_required_model_output_destinations!(model, resolved) + _prepare_model_output_statuses!(model, applications) + _prepare_model_output_destination_statuses!(model, resolved) + bindings, by_execution_target = + _compile_model_output_destination_bindings(model, resolved) + return CompiledDistributedOutputs( + bindings, + by_execution_target, + ownership, + ) +end + function _prepare_model_input_defaults!(model::CompositeModel, applications) for application in applications schema = _input_schema(application.spec) @@ -3731,6 +4200,43 @@ function _compile_model_call_plans(model::CompositeModel, applications) return plans end +function _compile_model_output_destination_plans( + model::CompositeModel, + applications, +) + plans = CompiledModelOutputDestinationPlan[] + for application in applications + destinations = outputs_to(application.spec) + destinations isa NamedTuple || continue + for (group_name, destination) in pairs(destinations) + selector = getproperty(destination, :selector) + selector isa AbstractObjectMultiplicity || error( + "Output destination `$(group_name)` on application `$(application.id)` " * + "must use an object selector.", + ) + push!( + plans, + CompiledModelOutputDestinationPlan( + length(plans) + 1, + application.plan.slot, + application.id, + Symbol(group_name), + selector, + _compile_selector_matcher(model, selector), + getproperty(destination, :vars), + multiplicity(selector), + getproperty(destination, :coverage), + ), + ) + end + end + isempty(plans) && return NoCompiledDistributedOutputPlans() + return CompiledDistributedOutputPlans( + Tuple(plans), + _plans_by_application(applications, plans), + ) +end + _application_plans(plans_by_application, application_slot::Integer) = getfield(plans_by_application, application_slot) @@ -4253,6 +4759,16 @@ function explain_applications(compiled::CompiledCompositeModel) application.slot, ), ), + output_destination_plan_count= + compiled.scenario_plan.distributed_output_plans isa + NoCompiledDistributedOutputPlans ? + 0 : + length( + _application_plans( + compiled.scenario_plan.distributed_output_plans.by_application, + application.slot, + ), + ), current_target_count=length(application.target_ids), target_ids=[id.value for id in application.target_ids], target_scales=sort!(unique!(Symbol[ @@ -4416,7 +4932,63 @@ end explain_calls(model::CompositeModel) = explain_calls(refresh_bindings!(model)) +""" + Diagnostics.explain_output_bindings(model_or_compiled) + +Return one structured row per compiled cross-object output destination. Rows +separate the application execution object from current destination object IDs +and report declared variables, carrier types, coverage, and lifecycle +generation. +""" +function explain_output_bindings(compiled::CompiledCompositeModel) + return _explain_output_bindings(compiled.distributed_outputs) +end + +_explain_output_bindings(::NoCompiledDistributedOutputs) = NamedTuple[] + +function _explain_output_bindings(outputs::CompiledDistributedOutputs) + rows = NamedTuple[] + for binding in outputs.bindings + push!( + rows, + ( + output_plan_slot=binding.plan.slot, + application_slot=binding.plan.application_slot, + application_id=binding.application_id, + execution_object_id=binding.execution_object_id.value, + group=binding.group, + destination_ids=[id.value for id in binding.destination_ids], + destination_count=length(binding.destination_ids), + variables=Tuple(Symbol.(keys(binding.declarations))), + column_types=NamedTuple{Tuple(keys(binding.columns))}( + Tuple(typeof(column) for column in values(binding.columns)), + ), + multiplicity=binding.multiplicity, + coverage=binding.coverage, + membership_generation=binding.membership_generation, + selector=binding.selector, + ), + ) + end + sort!(rows; by=row -> ( + string(row.application_id), + string(row.execution_object_id), + string(row.group), + )) + return rows +end + +explain_output_bindings(model::CompositeModel) = + explain_output_bindings(refresh_bindings!(model)) + function explain_writers(compiled::CompiledCompositeModel) + return _explain_writers(compiled, compiled.distributed_outputs) +end + +function _explain_writers( + compiled::CompiledCompositeModel, + ::NoCompiledDistributedOutputs, +) groups = _model_writer_groups(compiled.applications, _manual_call_application_ids(compiled)) rows = NamedTuple[] for ((object_id, variable), indexed_writers) in groups @@ -4446,4 +5018,44 @@ function explain_writers(compiled::CompiledCompositeModel) return rows end +function _explain_writers( + compiled::CompiledCompositeModel, + distributed_outputs::CompiledDistributedOutputs, +) + rows = NamedTuple[] + for ((object_id, variable), owners) in distributed_outputs.writer_ownership + sorted_owners = sort!(copy(owners); by=owner -> owner.application_slot) + applications = [ + compiled.applications[owner.application_slot] + for owner in sorted_owners + ] + push!( + rows, + ( + object_id=object_id.value, + variable=variable, + application_ids=[owner.application_id for owner in sorted_owners], + processes=[application.process for application in applications], + owner_kinds=[owner.kind for owner in sorted_owners], + execution_object_ids=[ + owner.execution_object_id.value for owner in sorted_owners + ], + output_groups=[owner.group for owner in sorted_owners], + update_application_ids=[ + application.id for application in applications + if !isempty(_matching_updates(application.spec, variable)) + ], + update_after=[ + application.id => _update_after_labels(application.spec, variable) + for application in applications + if !isempty(_matching_updates(application.spec, variable)) + ], + duplicate=length(applications) > 1, + ), + ) + end + sort!(rows; by=row -> (string(row.object_id), string(row.variable))) + return rows +end + explain_writers(model::CompositeModel) = explain_writers(refresh_bindings!(model)) diff --git a/src/composite_model/registry_topology.jl b/src/composite_model/registry_topology.jl index cd72acbec..582d9b3ad 100644 --- a/src/composite_model/registry_topology.jl +++ b/src/composite_model/registry_topology.jl @@ -1271,7 +1271,9 @@ function refresh_bindings!( dirty_object_ids = delta.structural_dirty_ids can_extend = !force && !isnothing(model.binding_cache) && - !isempty(dirty_object_ids) + !isempty(dirty_object_ids) && + model.binding_cache.distributed_outputs isa + NoCompiledDistributedOutputs if can_extend && delta.structural_kind == :addition model.binding_cache = _extend_compiled_scene( model, diff --git a/src/composite_model/selectors.jl b/src/composite_model/selectors.jl index 9c4288725..0056352eb 100644 --- a/src/composite_model/selectors.jl +++ b/src/composite_model/selectors.jl @@ -73,7 +73,8 @@ const _CALL_SELECTOR_FIELDS = ( function _selector_context_fields(context::Symbol) context == :application_target && return _APPLICATION_TARGET_SELECTOR_FIELDS - context in (:object_query, :output_request) && return _OBJECT_SELECTOR_FIELDS + context in (:object_query, :output_request, :output_destination) && + return _OBJECT_SELECTOR_FIELDS context == :input && return _INPUT_SELECTOR_FIELDS context == :call && return _CALL_SELECTOR_FIELDS error("Unsupported selector validation context `$(context)`.") @@ -83,6 +84,7 @@ function _selector_context_description(context::Symbol) context == :application_target && return "application-target" context == :object_query && return "object-query" context == :output_request && return "output-request" + context == :output_destination && return "output-destination" context == :input && return "input-binding" context == :call && return "call-binding" return string(context) diff --git a/src/processes/models_inputs_outputs.jl b/src/processes/models_inputs_outputs.jl index b9b3d5afe..2806bc714 100644 --- a/src/processes/models_inputs_outputs.jl +++ b/src/processes/models_inputs_outputs.jl @@ -109,6 +109,14 @@ Unified composite-model/object manual call bindings declared with the model_calls(spec::ModelSpec) = spec.calls call_origins(spec::ModelSpec) = spec.call_origins +""" + outputs_to(spec::ModelSpec) + +Named distributed-output destinations declared with the +`ModelSpec(...; outputs_to=...)` keyword. +""" +outputs_to(spec::ModelSpec) = spec.outputs_to + """ environment_config(spec::ModelSpec) diff --git a/src/visualization/model_graph_view.jl b/src/visualization/model_graph_view.jl index b16007c13..d027e9b22 100644 --- a/src/visualization/model_graph_view.jl +++ b/src/visualization/model_graph_view.jl @@ -162,11 +162,14 @@ function _model_graph_compiled( input_by_target = _index_model_bindings(input_bindings, :application_id, :consumer_id) call_by_target = _index_model_bindings(call_bindings, :application_id, :consumer_id) timeline = _model_timeline(model) + distributed_output_plans = + _compile_model_output_destination_plans(model, applications) scenario_plan = _compiled_scenario_plan( model, applications, _compile_model_input_plans(model, applications), _compile_model_call_plans(model, applications), + distributed_output_plans, timeline, ) ordered_applications = Tuple( @@ -178,6 +181,12 @@ function _model_graph_compiled( scenario_plan.call_plans, timeline, ) + distributed_outputs = _compile_model_distributed_outputs( + model, + applications, + scenario_plan.manual_application_ids, + scenario_plan.distributed_output_plans, + ) status_views = _compile_model_status_views( model, applications, @@ -199,6 +208,7 @@ function _model_graph_compiled( _index_dynamic_input_bindings(model, input_bindings), _index_dynamic_call_bindings(model, call_bindings), _many_input_binding_cache(model, input_bindings), + distributed_outputs, scenario_plan.call_owners, scenario_plan.application_children, status_views, diff --git a/test/runtests.jl b/test/runtests.jl index ac4bd36ca..16a85318e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -82,6 +82,10 @@ else include("test-model-bound-many.jl") end + @testset "Distributed output declarations" begin + include("test-model-output-destination-declarations.jl") + end + @testset "Composite model multirate integration" begin include("test-model-multirate-integration.jl") end diff --git a/test/test-model-api-stabilization.jl b/test/test-model-api-stabilization.jl index ab859ee7a..4f19212f7 100644 --- a/test/test-model-api-stabilization.jl +++ b/test/test-model-api-stabilization.jl @@ -212,6 +212,7 @@ end :ObjectInstance, :One, :OptionalOne, + :OutputTo, :OutputRequest, :Override, :PlantSimEngine, @@ -260,6 +261,7 @@ end :objects_from_mtg, :output_policy, :output_routing, + :outputs_to, :outputs, :position, :process, @@ -290,11 +292,15 @@ end :Advanced, :CompiledApplicationPlan, :CompiledCompositeModel, + :CompiledDistributedOutputPlans, + :CompiledDistributedOutputs, :CompiledEnvironmentBinding, :CompiledEnvironmentBindings, :CompiledModelApplication, :CompiledModelCallPlan, :CompiledModelCallBinding, + :CompiledModelOutputDestinationBinding, + :CompiledModelOutputDestinationPlan, :CompiledModelInputPlan, :CompiledModelInputBinding, :CompiledScenarioPlan, @@ -332,6 +338,7 @@ end :explain_instances, :explain_runtime_performance, :explain_objects, + :explain_output_bindings, :explain_output_retention, :explain_outputs, :explain_schedule, diff --git a/test/test-model-output-destination-declarations.jl b/test/test-model-output-destination-declarations.jl new file mode 100644 index 000000000..ae822c1c0 --- /dev/null +++ b/test/test-model-output-destination-declarations.jl @@ -0,0 +1,474 @@ +using PlantSimEngine +using Test + +PlantSimEngine.@process "output_destination_probe" verbose = false +PlantSimEngine.@process "output_destination_local" verbose = false +PlantSimEngine.@process "output_destination_caller" verbose = false + +struct OutputDestinationProbeModel <: AbstractOutput_Destination_ProbeModel end +struct OutputDestinationLocalModel <: AbstractOutput_Destination_LocalModel end +struct OutputDestinationCallerModel <: AbstractOutput_Destination_CallerModel end + +PlantSimEngine.inputs_(::OutputDestinationProbeModel) = NamedTuple() +PlantSimEngine.outputs_(::OutputDestinationProbeModel) = NamedTuple() +PlantSimEngine.inputs_(::OutputDestinationLocalModel) = NamedTuple() +PlantSimEngine.outputs_(::OutputDestinationLocalModel) = (incident_par=0.0,) +PlantSimEngine.inputs_(::OutputDestinationCallerModel) = NamedTuple() +PlantSimEngine.outputs_(::OutputDestinationCallerModel) = NamedTuple() +PlantSimEngine.run!(::OutputDestinationProbeModel, status, environment, constants, context) = + nothing +PlantSimEngine.run!(::OutputDestinationCallerModel, status, environment, constants, context) = + nothing + +@testset "OutputTo declarations" begin + selector = Many( + scale=(:Leaf, :Internode), + within=SceneScope(), + ) + destination = OutputTo( + selector; + vars=( + incident_par=Default(0.0), + absorbed_par=Required(Float64), + ), + ) + + @test destination.selector === selector + @test destination.vars.incident_par isa Default{Float64} + @test destination.vars.incident_par.value == 0.0 + @test destination.vars.absorbed_par isa Required{Float64} + @test destination.coverage === :exact + + relative_destination = OutputTo( + Many(scale=:Leaf, within=Self()); + vars=(area=Required(Real),), + ) + @test relative_destination.selector isa Many + @test relative_destination.vars.area isa Required{Real} + + declarations = (organs=destination,) + spec = ModelSpec( + OutputDestinationProbeModel(); + name=:scene_probe, + on=One(scale=:Scene), + outputs_to=declarations, + ) + @test outputs_to(spec) === declarations + + replacement = PlantSimEngine._replace_model_spec(spec; name=:renamed_scene_probe) + @test replacement.name === :renamed_scene_probe + @test outputs_to(replacement) === declarations + + default_spec = ModelSpec(OutputDestinationProbeModel()) + @test outputs_to(default_spec) === NamedTuple() + @test typeof(outputs_to(default_spec)) === typeof(NamedTuple()) +end + +@testset "OutputTo validation" begin + selector = Many(scale=:Leaf, within=SceneScope()) + valid_vars = (incident_par=Default(0.0),) + + @test_throws "requires at least one destination variable" OutputTo( + selector; + vars=NamedTuple(), + ) + @test_throws "requires a non-empty `NamedTuple`" OutputTo( + selector; + vars=(:incident_par => Default(0.0),), + ) + @test_throws "Invalid declaration(s)" OutputTo( + selector; + vars=(incident_par=0.0,), + ) + @test_throws "Only `coverage=:exact`" OutputTo( + selector; + vars=valid_vars, + coverage=:subset, + ) + @test_throws "output-destination selectors must use" OutputTo( + :leaves; + vars=valid_vars, + ) + + invalid_selectors = ( + Many(scale=:Leaf, process=:photosynthesis), + Many(scale=:Leaf, application=:leaf_model), + Many(scale=:Leaf, var=:incident_par), + Many(scale=:Leaf, policy=HoldLast()), + Many(scale=:Leaf, window=3), + Many(scale=:Leaf, from_status=true), + Many(scale=:Leaf, after=:scene_light), + ) + for invalid_selector in invalid_selectors + @test_throws "not valid in output-destination selectors" OutputTo( + invalid_selector; + vars=valid_vars, + ) + end + + model = OutputDestinationProbeModel() + destination = OutputTo(selector; vars=valid_vars) + @test_throws "Use a `NamedTuple` of named `OutputTo(...)` declarations" ModelSpec( + model; + outputs_to=(destination,), + ) + @test_throws "must be an `OutputTo(...)` declaration" ModelSpec( + model; + outputs_to=(organs=selector,), + ) +end + +@testset "compiled output destinations" begin + scene = CompositeModel( + Object(:scene; scale=:Scene), + Object( + :leaf_1; + scale=:Leaf, + parent=:scene, + status=Status(incident_par=7.0, absorbed_par=1.0), + ), + Object( + :leaf_2; + scale=:Leaf, + parent=:scene, + status=Status(absorbed_par=2.0), + ); + applications=( + ModelSpec( + OutputDestinationProbeModel(); + name=:scene_probe, + on=One(scale=:Scene), + outputs_to=( + organs=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=( + incident_par=Default(0.0), + absorbed_par=Required(Float64), + ), + ), + ), + ), + ), + ) + + compiled = Advanced.refresh_bindings!(scene) + @test compiled.scenario_plan.distributed_output_plans isa + PlantSimEngine.CompiledDistributedOutputPlans + @test compiled.distributed_outputs isa + PlantSimEngine.CompiledDistributedOutputs + binding = only(compiled.distributed_outputs.bindings) + @test binding.application_id == :scene_probe + @test binding.execution_object_id == ObjectId(:scene) + @test binding.group == :organs + @test binding.destination_ids == ObjectId[ObjectId(:leaf_1), ObjectId(:leaf_2)] + @test propertynames(binding.columns) == (:incident_par, :absorbed_par) + @test collect(binding.columns.incident_par) == [7.0, 0.0] + @test collect(binding.columns.absorbed_par) == [1.0, 2.0] + + binding.columns.incident_par[2] = 9.0 + leaf_2 = only(object for object in model_objects(scene; scale=:Leaf) if object.id == ObjectId(:leaf_2)) + @test leaf_2.status.incident_par == 9.0 + + ownership = compiled.distributed_outputs.writer_ownership + @test only(ownership[(ObjectId(:leaf_1), :incident_par)]).application_id == + :scene_probe + diagnostic = only(Diagnostics.explain_output_bindings(compiled)) + @test diagnostic.application_id == :scene_probe + @test diagnostic.group == :organs + @test diagnostic.destination_ids == [:leaf_1, :leaf_2] + writer = only( + row for row in Diagnostics.explain_writers(compiled) + if row.object_id == :leaf_1 && row.variable == :incident_par + ) + @test writer.owner_kinds == [:output_destination] + @test writer.output_groups == [:organs] +end + +@testset "output destination initialization is atomic" begin + scene = CompositeModel( + Object(:scene; scale=:Scene), + Object(:leaf; scale=:Leaf, parent=:scene); + applications=( + ModelSpec( + OutputDestinationProbeModel(); + name=:scene_probe, + on=One(scale=:Scene), + outputs_to=( + organs=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=( + incident_par=Default(0.0), + absorbed_par=Required(Float64), + ), + ), + ), + ), + ), + ) + leaf = only(model_objects(scene; scale=:Leaf)) + @test isnothing(leaf.status) + @test_throws "Missing required distributed-output destination" Advanced.refresh_bindings!( + scene, + ) + @test isnothing(leaf.status) + + invalid_status = CompositeModel( + Object(:scene; scale=:Scene), + Object( + :leaf_a; + scale=:Leaf, + parent=:scene, + status=Status(existing=1.0), + ), + Object( + :leaf_z; + scale=:Leaf, + parent=:scene, + status=(invalid=1.0,), + ); + applications=( + ModelSpec( + OutputDestinationProbeModel(); + name=:scene_probe, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=(incident_par=Default(0.0),), + ), + ), + ), + ), + ) + leaf_a = only( + object for object in model_objects(invalid_status; scale=:Leaf) + if object.id == ObjectId(:leaf_a) + ) + @test !(:incident_par in propertynames(leaf_a.status)) + @test_throws "with status type" Advanced.refresh_bindings!(invalid_status) + @test !(:incident_par in propertynames(leaf_a.status)) +end + +@testset "empty and lifecycle-refreshed output destinations" begin + scene = CompositeModel( + Object(:scene; scale=:Scene); + applications=( + ModelSpec( + OutputDestinationProbeModel(); + name=:scene_probe, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=(incident_par=Default(0.0),), + ), + ), + ), + ), + ) + first_compiled = Advanced.refresh_bindings!(scene) + first_binding = only(first_compiled.distributed_outputs.bindings) + @test isempty(first_binding.destination_ids) + @test isempty(first_binding.columns.incident_par) + + register_object!(scene, Object(:leaf; scale=:Leaf); parent=:scene) + second_compiled = Advanced.refresh_bindings!(scene) + @test second_compiled !== first_compiled + second_binding = only(second_compiled.distributed_outputs.bindings) + @test second_binding.destination_ids == ObjectId[ObjectId(:leaf)] + @test only(model_objects(scene; scale=:Leaf)).status.incident_par == 0.0 + + dynamic_scene = CompositeModel( + Object(:scene; scale=:Scene); + applications=scene.applications, + ) + simulation = run!(dynamic_scene; outputs=:none) + initial_compiled_type = typeof(simulation.compiled) + register_object!(dynamic_scene, Object(:dynamic_leaf; scale=:Leaf); parent=:scene) + continue!(simulation) + @test typeof(simulation.compiled) === initial_compiled_type + @test only(model_objects(dynamic_scene; scale=:Leaf)).status.incident_par == 0.0 +end + +@testset "distributed writer ownership and collisions" begin + function writer_scene(distributed_spec) + return CompositeModel( + Object(:scene; scale=:Scene), + Object(:leaf; scale=:Leaf, parent=:scene); + applications=( + ModelSpec( + OutputDestinationLocalModel(); + name=:leaf_source, + on=One(scale=:Leaf), + ), + distributed_spec, + ), + ) + end + + ambiguous = writer_scene( + ModelSpec( + OutputDestinationProbeModel(); + name=:scene_probe, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=(incident_par=Default(0.0),), + ), + ), + ), + ) + @test_throws "Ambiguous canonical writers" Advanced.refresh_bindings!(ambiguous) + + ordered = writer_scene( + ModelSpec( + OutputDestinationProbeModel(); + name=:scene_probe, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=(incident_par=Default(0.0),), + ), + ), + updates=Updates(:incident_par; after=:leaf_source), + ), + ) + ordered_compiled = Advanced.refresh_bindings!(ordered) + writer = only(Diagnostics.explain_writers(ordered_compiled)) + @test writer.application_ids == [:leaf_source, :scene_probe] + @test writer.owner_kinds == [:application_target, :output_destination] + @test writer.duplicate + + overlapping = CompositeModel( + Object(:scene; scale=:Scene), + Object(:leaf; scale=:Leaf, parent=:scene); + applications=( + ModelSpec( + OutputDestinationProbeModel(); + name=:scene_probe, + on=One(scale=:Scene), + outputs_to=( + first=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=(incident_par=Default(0.0),), + ), + second=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=(incident_par=Default(0.0),), + ), + ), + ), + ), + ) + @test_throws "declares more than one canonical writer" Advanced.refresh_bindings!( + overlapping, + ) +end + +@testset "output destinations remain scoped per execution object" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant_a; scale=:Plant, parent=:scene), + Object(:plant_b; scale=:Plant, parent=:scene), + Object(:leaf_a; scale=:Leaf, parent=:plant_a), + Object(:leaf_b; scale=:Leaf, parent=:plant_b); + applications=( + ModelSpec( + OutputDestinationProbeModel(); + name=:plant_probe, + on=Many(scale=:Plant), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=Subtree()); + vars=(incident_par=Default(0.0),), + ), + ), + ), + ), + ) + compiled = Advanced.refresh_bindings!(model) + @test length(compiled.distributed_outputs.bindings) == 2 + by_target = compiled.distributed_outputs.by_execution_target + @test by_target[(:plant_probe, ObjectId(:plant_a))].leaves.destination_ids == + ObjectId[ObjectId(:leaf_a)] + @test by_target[(:plant_probe, ObjectId(:plant_b))].leaves.destination_ids == + ObjectId[ObjectId(:leaf_b)] + @test Set(keys(compiled.distributed_outputs.writer_ownership)) == Set([ + (ObjectId(:leaf_a), :incident_par), + (ObjectId(:leaf_b), :incident_par), + ]) + + dynamic_model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant_a; scale=:Plant, parent=:scene), + Object(:leaf_a; scale=:Leaf, parent=:plant_a); + applications=model.applications, + ) + simulation = run!(dynamic_model; outputs=:none) + initial_compiled_type = typeof(simulation.compiled) + register_object!( + dynamic_model, + Object(:plant_b; scale=:Plant); + parent=:scene, + ) + register_object!( + dynamic_model, + Object(:leaf_b; scale=:Leaf); + parent=:plant_b, + ) + continue!(simulation) + @test typeof(simulation.compiled) === initial_compiled_type + @test length(simulation.compiled.distributed_outputs.bindings) == 2 + @test only( + object for object in model_objects(dynamic_model; scale=:Leaf) + if object.id == ObjectId(:leaf_b) + ).status.incident_par == 0.0 +end + + +@testset "manual distributed outputs are rejected while targets are empty" begin + model = CompositeModel( + Object(:scene; scale=:Scene); + applications=( + ModelSpec( + OutputDestinationCallerModel(); + name=:caller, + on=One(scale=:Scene), + calls=(probe=Many(application=:manual_probe),), + ), + ModelSpec( + OutputDestinationProbeModel(); + name=:manual_probe, + on=Many(scale=:Leaf), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=(incident_par=Default(0.0),), + ), + ), + ), + ), + ) + @test_throws "manual-call-only" Advanced.refresh_bindings!(model) +end + +@testset "no distributed outputs keep the singleton path" begin + model = CompositeModel( + Object(:scene; scale=:Scene); + applications=( + ModelSpec( + OutputDestinationProbeModel(); + name=:plain_probe, + on=One(scale=:Scene), + ), + ), + ) + compiled = Advanced.refresh_bindings!(model) + @test compiled.scenario_plan.distributed_output_plans isa + PlantSimEngine.NoCompiledDistributedOutputPlans + @test compiled.distributed_outputs isa + PlantSimEngine.NoCompiledDistributedOutputs + @test isempty(Diagnostics.explain_output_bindings(compiled)) +end From 070497e20c7c95a65caa81092a540192ecc70c99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Sun, 23 Aug 2026 10:31:36 +0200 Subject: [PATCH 07/45] benchmark: cover distributed output compilation --- benchmark/benchmarks.jl | 16 +++++ .../test-distributed-output-benchmark.jl | 71 +++++++++++++++++++ benchmark/test/runtests.jl | 29 ++++++++ 3 files changed, 116 insertions(+) diff --git a/benchmark/benchmarks.jl b/benchmark/benchmarks.jl index fe15675ab..84ec5f947 100644 --- a/benchmark/benchmarks.jl +++ b/benchmark/benchmarks.jl @@ -125,6 +125,22 @@ if SUPPORTS_COMPOSITE_OBJECT_BENCHMARKS data.object_ids, data.permuted_result_ids, ) setup = (data = setup_distributed_output_benchmark(1_000)) + for distributed in (false, true) + compile_kind = distributed ? "active" : "none" + SUITE[suite_name]["PSE_distributed_compile_$(compile_kind)_1000"] = + @benchmarkable benchmark_compile_distributed_output_model( + model, + ) setup = (model = setup_distributed_output_compilation_benchmark( + 1_000; + distributed=$distributed, + )) evals = 1 + end + SUITE[suite_name]["PSE_distributed_lifecycle_add_1000"] = + @benchmarkable benchmark_refresh_distributed_output_lifecycle!( + model, + new_index, + ) setup = ((model, new_index) = + setup_distributed_output_lifecycle_benchmark(1_000)) evals = 1 for identity_aware in (false, true) input_kind = identity_aware ? "bound" : "status" SUITE[suite_name]["PSE_$(input_kind)_many_input_steps_1000"] = diff --git a/benchmark/test-distributed-output-benchmark.jl b/benchmark/test-distributed-output-benchmark.jl index 04f4b5f88..00716bdee 100644 --- a/benchmark/test-distributed-output-benchmark.jl +++ b/benchmark/test-distributed-output-benchmark.jl @@ -2,11 +2,14 @@ using PlantSimEngine PlantSimEngine.@process "distributed_output_benchmark_bound_input" verbose = false PlantSimEngine.@process "distributed_output_benchmark_status_input" verbose = false +PlantSimEngine.@process "distributed_output_benchmark_scene_writer" verbose = false struct DistributedOutputBenchmarkBoundInputModel <: AbstractDistributed_Output_Benchmark_Bound_InputModel end struct DistributedOutputBenchmarkStatusInputModel <: AbstractDistributed_Output_Benchmark_Status_InputModel end +struct DistributedOutputBenchmarkSceneWriterModel <: + AbstractDistributed_Output_Benchmark_Scene_WriterModel end PlantSimEngine.inputs_(::DistributedOutputBenchmarkBoundInputModel) = ( signals=Required(Vector{Float64}), @@ -20,6 +23,17 @@ PlantSimEngine.inputs_(::DistributedOutputBenchmarkStatusInputModel) = ( PlantSimEngine.outputs_(::DistributedOutputBenchmarkStatusInputModel) = ( total=0.0, ) +PlantSimEngine.inputs_(::DistributedOutputBenchmarkSceneWriterModel) = NamedTuple() +PlantSimEngine.outputs_(::DistributedOutputBenchmarkSceneWriterModel) = NamedTuple() +function PlantSimEngine.run!( + ::DistributedOutputBenchmarkSceneWriterModel, + status, + environment, + constants, + context, +) + return nothing +end function PlantSimEngine.run!( ::DistributedOutputBenchmarkBoundInputModel, @@ -232,6 +246,63 @@ end benchmark_distributed_output_input_steps(simulation, nsteps) = continue!(simulation; steps=nsteps) +function setup_distributed_output_compilation_benchmark( + nobjects::Int=1_000; + distributed::Bool, +) + nobjects >= 0 || throw(ArgumentError("`nobjects` must be non-negative.")) + objects = Object[Object(:scene; scale=:Scene)] + sizehint!(objects, nobjects + 1) + for index in 1:nobjects + push!( + objects, + Object( + Symbol(:leaf_, index); + scale=:Leaf, + parent=:scene, + ), + ) + end + application = if distributed + ModelSpec( + DistributedOutputBenchmarkSceneWriterModel(); + name=:scene_writer, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=(incident_par=Default(0.0),), + ), + ), + ) + else + ModelSpec( + DistributedOutputBenchmarkSceneWriterModel(); + name=:scene_writer, + on=One(scale=:Scene), + ) + end + return CompositeModel(objects...; applications=(application,)) +end + +benchmark_compile_distributed_output_model(model) = + Advanced.compile_composite_model(model) + +function setup_distributed_output_lifecycle_benchmark(nobjects::Int=1_000) + model = setup_distributed_output_compilation_benchmark( + nobjects; + distributed=true, + ) + Advanced.refresh_bindings!(model) + return model, nobjects + 1 +end + +function benchmark_refresh_distributed_output_lifecycle!(model, new_index) + object_id = Symbol(:leaf_, new_index) + register_object!(model, Object(object_id; scale=:Leaf); parent=:scene) + return Advanced.refresh_bindings!(model) +end + function setup_distributed_output_input_step_benchmark( nobjects::Int=1_000; identity_aware::Bool, diff --git a/benchmark/test/runtests.jl b/benchmark/test/runtests.jl index f22f183ab..ac821642c 100644 --- a/benchmark/test/runtests.jl +++ b/benchmark/test/runtests.jl @@ -283,6 +283,35 @@ if benchmark_test_enabled("distributed output benchmark API smoke") :scene, ).status.total + plain_model = setup_distributed_output_compilation_benchmark( + 16; + distributed=false, + ) + plain_compiled = benchmark_compile_distributed_output_model(plain_model) + @test plain_compiled.distributed_outputs isa + PlantSimEngine.NoCompiledDistributedOutputs + + active_model = setup_distributed_output_compilation_benchmark( + 16; + distributed=true, + ) + active_compiled = benchmark_compile_distributed_output_model(active_model) + @test active_compiled.distributed_outputs isa + Advanced.CompiledDistributedOutputs + @test length(only(active_compiled.distributed_outputs.bindings).destination_ids) == + 16 + + lifecycle_model, new_index = + setup_distributed_output_lifecycle_benchmark(16) + refreshed = benchmark_refresh_distributed_output_lifecycle!( + lifecycle_model, + new_index, + ) + @test length(only(refreshed.distributed_outputs.bindings).destination_ids) == + 17 + @test model_object(lifecycle_model, Symbol(:leaf_, new_index)).status.incident_par == + 0.0 + benchmark_assign_distributed_outputs_exact!( data.exact_targets, data.exact_values, From 7f802fd69bf3b9f77b025c84877cd93994ab7d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Sun, 23 Aug 2026 10:39:38 +0200 Subject: [PATCH 08/45] docs: describe distributed output destinations --- docs/src/API/API_public.md | 13 ++++++++++--- docs/src/API/public_symbols.md | 12 ++++++++---- docs/src/dev/distributed_output_ownership.md | 11 ++++++----- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/docs/src/API/API_public.md b/docs/src/API/API_public.md index 82757fd7b..f878fa4e2 100644 --- a/docs/src/API/API_public.md +++ b/docs/src/API/API_public.md @@ -9,9 +9,9 @@ form and lowers to the same object/application representation. - `Object` represents one runtime entity with stable identity and status. - `CompositeModelTemplate` and `ObjectInstance` reuse a model across instances. -- `ModelSpec(model; name=..., on=..., inputs=..., calls=..., every=..., - environment=..., output_routing=..., updates=...)` is the one application - construction form. +- `ModelSpec(model; name=..., on=..., inputs=..., calls=..., outputs_to=..., + every=..., environment=..., output_routing=..., updates=...)` is the one + application construction form. ### Coupling @@ -20,6 +20,11 @@ `BoundMany` view for one of its declared `Many` inputs; `object_ids(view)` returns the aligned object identities without copying them. - `ModelSpec(...; calls=...)` declares manually executable child models. +- `ModelSpec(...; outputs_to=(name=OutputTo(selector; vars=...),))` + declares status variables owned by the application but stored on selected + destination objects. Each variable uses `Required(T)` or `Default(value)`; + the compiler resolves identities and rejects ambiguous writers before + initializing statuses. - `Updates(:variable; after=:application_id)` orders intentional duplicate writers. - `Input(...)` and `Call(...)` express model defaults through `dep(model)`. - `run_call!(context, :name; publish=false)` executes every resolved hard-call @@ -61,6 +66,7 @@ Selector fields are checked where the selector is used: | `ModelSpec(...; on=...)` | `kind`, `species`, `scale`, `name`, and a scene or named scope | | `ModelSpec(...; inputs=...)` | object criteria plus `process`, `application`, `var`, `policy`, `window`, `from_status`, and `after` | | `ModelSpec(...; calls=...)` | object criteria plus `process` and `application` | +| `OutputTo(...)` in `ModelSpec(...; outputs_to=...)` | object criteria only | | object queries and `OutputRequest` selectors | object criteria only | Unsupported or misspelled fields fail when the selector is constructed. @@ -113,6 +119,7 @@ Use the `Diagnostics` namespace instead of inspecting internals: - `Diagnostics.explain_applications` - `Diagnostics.explain_bindings` - `Diagnostics.explain_calls` +- `Diagnostics.explain_output_bindings` - `Diagnostics.explain_environment_bindings` - `Diagnostics.explain_schedule` - `Diagnostics.explain_writers` diff --git a/docs/src/API/public_symbols.md b/docs/src/API/public_symbols.md index 83bca7265..bb38fe552 100644 --- a/docs/src/API/public_symbols.md +++ b/docs/src/API/public_symbols.md @@ -13,9 +13,10 @@ explicitly imports one of those submodules. - CompositeModel structure: `CompositeModel`, `Object`, `ObjectId`, `CompositeModelTemplate`, `ObjectInstance`, `Override`. -- Applications: `ModelSpec`, `Environment`, and `Updates`. +- Applications: `ModelSpec`, `OutputTo`, `Environment`, and `Updates`. - Application inspection: `application_name`, `applies_to`, `value_inputs`, - `model_calls`, `environment_config`, `output_routing`, `updates`. + `model_calls`, `outputs_to`, `environment_config`, `output_routing`, + `updates`. - Dependency defaults: `Input`, `Call`, `PreviousTimeStep`. ## Object selectors and queries @@ -48,7 +49,8 @@ inspection: - Structure: `Diagnostics.explain_objects`, `Diagnostics.explain_instances`, `Diagnostics.explain_scopes`. - Compilation: `Diagnostics.explain_applications`, `Diagnostics.explain_bindings`, - `Diagnostics.explain_calls`, `Diagnostics.explain_writers`, + `Diagnostics.explain_calls`, `Diagnostics.explain_output_bindings`, + `Diagnostics.explain_writers`, `Diagnostics.explain_schedule`, `Diagnostics.explain_execution_plan`. - Initialization, environment, and outputs: `Diagnostics.explain_initialization`, `Diagnostics.explain_environment`, `Diagnostics.explain_environment_bindings`, @@ -120,7 +122,9 @@ output-state values. - registries and compiled representations: `ObjectRegistry`, `CompiledCompositeModel`, `CompiledModelApplication`, `CompiledModelInputBinding`, - `CompiledModelCallBinding`, `CompiledEnvironmentBinding`, + `CompiledModelCallBinding`, `CompiledModelOutputDestinationPlan`, + `CompiledModelOutputDestinationBinding`, `CompiledDistributedOutputPlans`, + `CompiledDistributedOutputs`, `CompiledEnvironmentBinding`, `CompiledEnvironmentBindings`; - carrier and adapter implementation types: `ObjectRefVector`, `TimeStepTable`; diff --git a/docs/src/dev/distributed_output_ownership.md b/docs/src/dev/distributed_output_ownership.md index 032a74ab2..c533b4767 100644 --- a/docs/src/dev/distributed_output_ownership.md +++ b/docs/src/dev/distributed_output_ownership.md @@ -58,9 +58,9 @@ ModelSpec( within=SceneScope(), ), vars=( - :incident_par, - :absorbed_par, - :sky_fraction, + incident_par=Default(0.0), + absorbed_par=Default(0.0), + sky_fraction=Required(Float64), ), ), ), @@ -74,8 +74,9 @@ targets = output_targets(context, :organs) assign_outputs!(targets, result_columns; id=:object_id) ``` -`outputs_to`, `OutputTo`, `OutputTargets`, `output_targets`, and -`assign_outputs!` are working names, not yet stabilized API. +`outputs_to` and `OutputTo` are implemented by the compiler. `OutputTargets`, +`output_targets`, and `assign_outputs!` remain working names for the subsequent +runtime-assignment slice. ## Identity contract From 55f4db0844bf5ea5849f34c2f5de35e53d53bdbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Sun, 23 Aug 2026 11:44:09 +0200 Subject: [PATCH 09/45] feat: schedule and retain distributed outputs --- src/composite_model/compilation.jl | 547 +++++++++- src/composite_model/registry_topology.jl | 20 +- src/composite_model/runtime_outputs.jl | 485 ++++++++- src/visualization/model_graph_view.jl | 168 ++- test/runtests.jl | 4 + test/test-model-distributed-output-runtime.jl | 973 ++++++++++++++++++ test/test-model-graph-view.jl | 121 +++ ...t-model-output-destination-declarations.jl | 26 + test/test-unified-model-object-api.jl | 2 + 9 files changed, 2243 insertions(+), 103 deletions(-) create mode 100644 test/test-model-distributed-output-runtime.jl diff --git a/src/composite_model/compilation.jl b/src/composite_model/compilation.jl index 7a4152371..be6924600 100644 --- a/src/composite_model/compilation.jl +++ b/src/composite_model/compilation.jl @@ -227,10 +227,11 @@ struct CompiledDistributedOutputPlans{P,I} by_application::I end -struct CompiledDistributedOutputs{B,I,W} +struct CompiledDistributedOutputs{B,I,W,D} bindings::B by_execution_target::I writer_ownership::W + destination_ids_by_application_variable::D end """One immutable root-scheduler rule in stable topological order.""" @@ -608,6 +609,7 @@ function _scenario_update_order_edges!( children, applications, manual_application_ids, + ::NoCompiledDistributedOutputPlans, ) for (application_index, application) in pairs(applications) application.id in manual_application_ids && continue @@ -644,6 +646,69 @@ function _scenario_update_order_edges!( return children end +function _application_output_selectors( + application, + variable::Symbol, + plans::CompiledDistributedOutputPlans, +) + selectors = Any[] + variable in _model_canonical_output_names(application) && + push!(selectors, application.applies_to) + for plan in _application_plans(plans.by_application, application.slot) + variable in keys(plan.declarations) || continue + push!(selectors, plan.selector) + end + return selectors +end + +function _scenario_update_order_edges!( + children, + applications, + manual_application_ids, + plans::CompiledDistributedOutputPlans, +) + for (application_index, application) in pairs(applications) + application.id in manual_application_ids && continue + for update in updates(application.spec) + after_labels = _update_after(update) + isempty(after_labels) && continue + for variable in _update_variables(update) + current_selectors = _application_output_selectors( + application, + variable, + plans, + ) + isempty(current_selectors) && continue + for previous_application in applications[1:(application_index - 1)] + previous_application.id in manual_application_ids && continue + any( + label -> _update_matches_application( + label, + previous_application, + ), + after_labels, + ) || continue + previous_selectors = _application_output_selectors( + previous_application, + variable, + plans, + ) + any( + pair -> _selector_labels_may_overlap(pair[1], pair[2]), + Iterators.product(previous_selectors, current_selectors), + ) || continue + _add_model_application_edge!( + children, + previous_application.id, + application.id, + ) + end + end + end + end + return children +end + function _freeze_scenario_application_children(applications, children) application_ids = Tuple(application.id for application in applications) return NamedTuple{application_ids}( @@ -666,6 +731,7 @@ function _compile_scenario_application_children( input_plans, call_owners, manual_application_ids, + distributed_output_plans, ) children = Dict{Symbol,Set{Symbol}}() _scenario_input_order_edges!(children, input_plans, call_owners) @@ -673,6 +739,7 @@ function _compile_scenario_application_children( children, applications, manual_application_ids, + distributed_output_plans, ) return _freeze_scenario_application_children(applications, children) end @@ -701,6 +768,7 @@ function _compiled_scenario_plan( input_plans, call_owners, manual_application_ids, + distributed_output_plans, ) application_order = _stable_topological_application_order( applications, @@ -1052,10 +1120,14 @@ function _compile_scene( started_at, ) started_at = _runtime_performance_start(performance) - input_plans = _compile_model_input_plans(model, applications) - call_plans = _compile_model_call_plans(model, applications) distributed_output_plans = _compile_model_output_destination_plans(model, applications) + input_plans = _compile_model_input_plans( + model, + applications, + distributed_output_plans, + ) + call_plans = _compile_model_call_plans(model, applications) scenario_plan = _compiled_scenario_plan( model, applications, @@ -1097,6 +1169,7 @@ function _compile_scene( applications, scenario_plan.manual_application_ids, scenario_plan.input_plans_by_application, + distributed_outputs, ) many_input_binding_cache = _share_many_input_bindings!(model, input_bindings) @@ -1140,6 +1213,7 @@ function _compile_scene( applications_by_id, input_bindings_by_target, application_order, + distributed_outputs, ) _runtime_performance_finish!( performance, @@ -1266,6 +1340,7 @@ function _compile_added_consumer_bindings!( manual_application_ids, applications_by_object, applications_by_id, + distributed_outputs=NoCompiledDistributedOutputs(), ) for plan in input_plans plan.origin == :inferred_same_object && continue @@ -1277,6 +1352,8 @@ function _compile_added_consumer_bindings!( plan, applications_by_object, applications_by_id, + nothing, + distributed_outputs, ) end application.id in manual_application_ids && return bindings @@ -1289,9 +1366,19 @@ function _compile_added_consumer_bindings!( candidate for candidate in input_plans if candidate.origin == :inferred_same_object && candidate.input == plan.input && - consumer_id in - applications_by_id[candidate.application].target_ids + _application_writes_object_variable( + distributed_outputs, + applications_by_id[candidate.application], + consumer_id, + candidate.source_var, + ) ] + matches = _final_inferred_output_plans( + distributed_outputs, + consumer_id, + plan.source_var, + matches, + ) isempty(matches) && continue if length(matches) > 1 error( @@ -1309,11 +1396,39 @@ function _compile_added_consumer_bindings!( applications_by_object, applications_by_id, ObjectId[consumer_id], + distributed_outputs, ) end return bindings end +_final_inferred_output_plans( + ::NoCompiledDistributedOutputs, + object_id, + variable, + matches, +) = matches + +function _final_inferred_output_plans( + distributed_outputs::CompiledDistributedOutputs, + object_id::ObjectId, + variable::Symbol, + matches, +) + owners = get( + distributed_outputs.writer_ownership, + (object_id, variable), + (), + ) + isempty(owners) && return matches + final_application_id = last(owners).application_id + final_matches = CompiledModelInputPlan[ + match for match in matches + if match.application == final_application_id + ] + return isempty(final_matches) ? matches : final_matches +end + function _many_binding_scope_anchor(model::CompositeModel, binding::CompiledModelInputBinding) selector_criteria = criteria(binding.selector) !isnothing(_criteria_get(selector_criteria, :relation, nothing)) && @@ -1625,6 +1740,25 @@ function _preserve_model_status_view_temporal_state!( ) end +function _preserve_recompiled_model_status_views!( + current::CompiledCompositeModel, + previous::CompiledCompositeModel, +) + previous_temporal_sources = Dict{Tuple{Symbol,ObjectId,Symbol},Vector{ObjectId}}() + for (key, current_view) in current.status_views_by_target + previous_view = get(previous.status_views_by_target, key, nothing) + isnothing(previous_view) && continue + current.status_views_by_target[key] = + _preserve_model_status_view_temporal_state!( + current_view, + previous_view, + previous_temporal_sources, + key, + ) + end + return current +end + function _extend_model_status_views( model::CompositeModel, compiled::CompiledCompositeModel, @@ -3110,9 +3244,22 @@ function _compile_model_writer_ownership( end for resolved in resolved_destinations plan = resolved.plan + application = applications[plan.application_slot] for destination_id in resolved.destination_ids for variable_ in keys(plan.declarations) variable = Symbol(variable_) + if destination_id in application.target_ids && + variable in keys(outputs_(application.spec)) && + _publish_mode_for_output(application.spec, variable) == + :stream_only + error( + "Application `$(plan.application_id)` publishes stream-only local " * + "output `$(variable)` and distributes the same variable to its " * + "execution object `$(destination_id.value)`. Both publications " * + "would share one retained stream key; use distinct variable names " * + "or exclude the execution object from `outputs_to`.", + ) + end _push_compiled_writer_owner!( ownership, destination_id, @@ -3638,6 +3785,36 @@ function _compile_model_output_destination_bindings( return bindings, by_execution_target end +function _index_model_output_destination_ids(bindings) + index = Dict{Tuple{Symbol,Symbol},Vector{ObjectId}}() + merged_keys = Set{Tuple{Symbol,Symbol}}() + for binding in bindings + for variable_ in keys(binding.declarations) + variable = Symbol(variable_) + key = (binding.application_id, variable) + destination_ids = get(index, key, nothing) + if isnothing(destination_ids) + # Destination IDs are already sorted by the compiled selector. + # Share that immutable membership in the common one-binding case. + index[key] = binding.destination_ids + continue + end + if !(key in merged_keys) + destination_ids = copy(destination_ids) + index[key] = destination_ids + push!(merged_keys, key) + end + append!(destination_ids, binding.destination_ids) + end + end + for key in merged_keys + destination_ids = index[key] + _sort_object_ids!(destination_ids) + unique!(destination_ids) + end + return index +end + function _compile_model_distributed_outputs( model::CompositeModel, applications, @@ -3684,6 +3861,7 @@ function _compile_model_distributed_outputs( bindings, by_execution_target, ownership, + _index_model_output_destination_ids(bindings), ) end @@ -3794,14 +3972,27 @@ function _temporal_source_application( source_id::ObjectId, applications_by_id, application_positions, + distributed_outputs=NoCompiledDistributedOutputs(), ) isempty(binding.source_application_ids) && return nothing length(binding.source_application_ids) == 1 && return only(binding.source_application_ids) matches = Symbol[ application_id for application_id in binding.source_application_ids - if source_id in applications_by_id[application_id].target_ids + if _application_writes_object_variable( + distributed_outputs, + applications_by_id[application_id], + source_id, + binding.source_var, + ) ] + canonical_application = _distributed_temporal_source_application( + distributed_outputs, + source_id, + binding.source_var, + matches, + ) + isnothing(canonical_application) || return canonical_application if length(matches) == 1 return only(matches) elseif isempty(matches) @@ -3821,6 +4012,32 @@ function _temporal_source_application( ) end +_distributed_temporal_source_application( + ::NoCompiledDistributedOutputs, + ::ObjectId, + ::Symbol, + matches, +) = nothing + +function _distributed_temporal_source_application( + distributed_outputs::CompiledDistributedOutputs, + source_id::ObjectId, + source_var::Symbol, + matches, +) + isempty(matches) && return nothing + matching_ids = Set(matches) + owners = get( + distributed_outputs.writer_ownership, + (source_id, source_var), + (), + ) + for owner in Iterators.reverse(owners) + owner.application_id in matching_ids && return owner.application_id + end + return nothing +end + function _validate_temporal_input_output_overlap!( application::CompiledModelApplication, temporal_bindings, @@ -3847,6 +4064,7 @@ function _compile_model_status_view( input_bindings, applications_by_id, application_positions, + distributed_outputs=NoCompiledDistributedOutputs(), ) canonical_status = _ensure_model_object_status!(model, object_id) temporal_bindings = Tuple( @@ -3864,6 +4082,7 @@ function _compile_model_status_view( source_id, applications_by_id, application_positions, + distributed_outputs, ) for source_id in binding.source_ids ], @@ -3923,6 +4142,7 @@ function _compile_model_status_views( applications_by_id, input_bindings_by_target, application_order, + distributed_outputs=NoCompiledDistributedOutputs(), ) views = Dict{Tuple{Symbol,ObjectId},Any}() positions = Dict( @@ -3939,6 +4159,7 @@ function _compile_model_status_views( get(input_bindings_by_target, key, ()), applications_by_id, positions, + distributed_outputs, ) end end @@ -3958,7 +4179,9 @@ function _matching_input_source_applications( source_ids, source_var::Symbol, process_filter, - application_filter; + application_filter, + distributed_outputs=NoCompiledDistributedOutputs(); + applications_by_id=nothing, allow_empty::Bool=false, ) matches = Symbol[] @@ -3969,6 +4192,15 @@ function _matching_input_source_applications( isnothing(application_filter) || application.id == application_filter || continue push!(matches, application.id) end + _append_distributed_input_source_applications!( + matches, + distributed_outputs, + source_id, + source_var, + process_filter, + application_filter, + applications_by_id, + ) end unique!(matches) if !allow_empty && @@ -3984,6 +4216,66 @@ function _matching_input_source_applications( return matches end +_append_distributed_input_source_applications!( + matches, + ::NoCompiledDistributedOutputs, + args..., +) = matches + +function _append_distributed_input_source_applications!( + matches, + distributed_outputs::CompiledDistributedOutputs, + source_id::ObjectId, + source_var::Symbol, + process_filter, + application_filter, + applications_by_id, +) + owners = get( + distributed_outputs.writer_ownership, + (source_id, source_var), + (), + ) + isempty(owners) && return matches + for owner in owners + isnothing(applications_by_id) && error( + "Distributed output producer matching requires the compiled application index.", + ) + application = get(applications_by_id, owner.application_id, nothing) + isnothing(application) && continue + isnothing(process_filter) || + application.process == process_filter || continue + isnothing(application_filter) || + application.id == application_filter || continue + push!(matches, application.id) + end + return matches +end + +function _application_writes_object_variable( + ::NoCompiledDistributedOutputs, + application, + object_id::ObjectId, + variable::Symbol, +) + return object_id in application.target_ids && + variable in _model_output_names(application) +end + +function _application_writes_object_variable( + distributed_outputs::CompiledDistributedOutputs, + application, + object_id::ObjectId, + variable::Symbol, +) + object_id in application.target_ids && + variable in _model_output_names(application) && return true + return any( + owner -> owner.application_id == application.id, + get(distributed_outputs.writer_ownership, (object_id, variable), ()), + ) +end + _selector_constraint_values(value) = isnothing(value) ? () : value isa Tuple ? value : (value,) @@ -4015,21 +4307,74 @@ function _potential_input_source_application_ids( process_filter, application_filter, origin::Symbol, + distributed_output_plans, ) _selector_from_status(selector) && return () source_selector = origin == :inferred_same_object ? consumer_application.applies_to : selector return Tuple( application.id for application in applications - if source_var in _model_output_names(application) && + if _application_may_output_variable( + application, + source_var, + source_selector, + distributed_output_plans, + ) && (isnothing(process_filter) || application.process == process_filter) && (isnothing(application_filter) || - application.id == application_filter) && + application.id == application_filter) + ) +end + +function _application_may_output_variable( + application, + variable::Symbol, + source_selector, + ::NoCompiledDistributedOutputPlans, +) + return variable in _model_output_names(application) && _selector_labels_may_overlap( + source_selector, + application.applies_to, + ) +end + +function _application_may_output_variable( + application, + variable::Symbol, + source_selector, + plans::CompiledDistributedOutputPlans, +) + variable in _model_output_names(application) && + _selector_labels_may_overlap( source_selector, application.applies_to, - ) + ) && return true + return any( + plan -> variable in keys(plan.declarations) && + _selector_labels_may_overlap(source_selector, plan.selector), + _application_plans(plans.by_application, application.slot), + ) +end + +_application_declares_distributed_output( + application, + variable::Symbol, + source_selector, + ::NoCompiledDistributedOutputPlans, +) = false + +function _application_declares_distributed_output( + application, + variable::Symbol, + source_selector, + plans::CompiledDistributedOutputPlans, +) + return any( + plan -> variable in keys(plan.declarations) && + _selector_labels_may_overlap(source_selector, plan.selector), + _application_plans(plans.by_application, application.slot), ) end @@ -4056,6 +4401,7 @@ function _compiled_model_input_plan( selector, origin::Symbol, applications_by_id, + distributed_output_plans, ) source_var = _selector_var(selector, input) process_filter = _criteria_get(criteria(selector), :process, nothing) @@ -4076,6 +4422,7 @@ function _compiled_model_input_plan( process_filter, application_filter, origin, + distributed_output_plans, ) policy = _selector_has_policy(selector) ? _selector_policy(selector) : nothing breaks_same_step_cycle = policy isa PreviousTimeStep @@ -4105,7 +4452,14 @@ function _compiled_model_input_plan( ) end -function _compile_model_input_plans(model::CompositeModel, applications) +function _compile_model_input_plans( + model::CompositeModel, + applications, + distributed_output_plans=_compile_model_output_destination_plans( + model, + applications, + ), +) plans = CompiledModelInputPlan[] applications_by_id = Dict( application.id => application for application in applications @@ -4131,6 +4485,7 @@ function _compile_model_input_plans(model::CompositeModel, applications) selector, get(input_origins(application.spec), input, :model_spec), applications_by_id, + distributed_output_plans, ), ) end @@ -4138,7 +4493,18 @@ function _compile_model_input_plans(model::CompositeModel, applications) input in declared_names && continue for producer in applications producer.id == application.id && continue - input in _model_canonical_output_names(producer) || continue + local_output = input in _model_canonical_output_names(producer) && + _selector_labels_may_overlap( + application.applies_to, + producer.applies_to, + ) + distributed_output = _application_declares_distributed_output( + producer, + input, + application.applies_to, + distributed_output_plans, + ) + (local_output || distributed_output) || continue selector = One( within=Self(), process=producer.process, @@ -4156,6 +4522,7 @@ function _compile_model_input_plans(model::CompositeModel, applications) selector, :inferred_same_object, applications_by_id, + distributed_output_plans, ), ) end @@ -4249,7 +4616,7 @@ function _potential_input_source_applications( matches = Symbol[ application.id for application in values(applications_by_id) - if source_var in _model_output_names(application) && + if _application_declares_output_name(application, source_var) && (isnothing(process_filter) || application.process == process_filter) && (isnothing(application_filter) || application.id == application_filter) ] @@ -4257,11 +4624,22 @@ function _potential_input_source_applications( return matches end +function _application_declares_output_name(application, variable::Symbol) + variable in _model_output_names(application) && return true + destinations = outputs_to(application.spec) + destinations isa NamedTuple || return false + return any( + destination -> variable in keys(destination.vars), + values(destinations), + ) +end + function _final_canonical_source_application( applications_by_object, source_ids, source_application_ids, source_var::Symbol, + ::NoCompiledDistributedOutputs=NoCompiledDistributedOutputs(), ) length(source_ids) == 1 || return source_application_ids matching_ids = Set(source_application_ids) @@ -4275,11 +4653,40 @@ function _final_canonical_source_application( return Symbol[last(canonical_ids)] end +function _final_canonical_source_application( + applications_by_object, + source_ids, + source_application_ids, + source_var::Symbol, + distributed_outputs::CompiledDistributedOutputs, +) + length(source_ids) == 1 || return source_application_ids + matching_ids = Set(source_application_ids) + owners = get( + distributed_outputs.writer_ownership, + (only(source_ids), source_var), + (), + ) + canonical_ids = Symbol[ + owner.application_id for owner in owners + if owner.application_id in matching_ids + ] + isempty(canonical_ids) && return _final_canonical_source_application( + applications_by_object, + source_ids, + source_application_ids, + source_var, + NoCompiledDistributedOutputs(), + ) + return Symbol[last(canonical_ids)] +end + function _compile_model_input_bindings( model::CompositeModel, applications, manual_application_ids=Set{Symbol}(), plans_by_application=nothing, + distributed_outputs=NoCompiledDistributedOutputs(), ) if isnothing(plans_by_application) plans_by_application = _plans_by_application( @@ -4301,6 +4708,7 @@ function _compile_model_input_bindings( manual_application_ids, by_object, by_id, + distributed_outputs, ) end end @@ -4316,6 +4724,7 @@ function _push_model_input_binding!( applications_by_object, applications_by_id, source_ids_override=nothing, + distributed_outputs=NoCompiledDistributedOutputs(), ) input_sym = plan.input selector = plan.selector @@ -4329,6 +4738,15 @@ function _push_model_input_binding!( plan.matcher, consumer_id, ) : source_ids_override + _filter_many_input_sources_by_writer!( + source_ids, + selector, + source_var, + process_filter, + application_filter, + applications_by_id, + distributed_outputs, + ) selector isa Many && sizehint!(source_ids, length(source_ids) + 1) source_application_ids = if _selector_from_status(selector) Symbol[] @@ -4339,6 +4757,8 @@ function _push_model_input_binding!( source_var, process_filter, application_filter, + distributed_outputs; + applications_by_id=applications_by_id, allow_empty=selector isa OptionalOne || (selector isa Many && isempty(source_ids)), ) @@ -4368,6 +4788,16 @@ function _push_model_input_binding!( source_ids, source_application_ids, source_var, + distributed_outputs, + ) + end + if selector isa Many && length(source_application_ids) > 1 + source_application_ids = _final_many_source_applications( + source_ids, + source_application_ids, + source_var, + applications_by_id, + distributed_outputs, ) end if !(selector isa Many) && length(source_application_ids) > 1 @@ -4446,6 +4876,97 @@ function _push_model_input_binding!( return bindings end +_final_many_source_applications( + source_ids, + source_application_ids, + source_var, + applications_by_id, + ::NoCompiledDistributedOutputs, +) = source_application_ids + +function _final_many_source_applications( + source_ids, + source_application_ids, + source_var::Symbol, + applications_by_id, + distributed_outputs::CompiledDistributedOutputs, +) + matching_ids = Set(source_application_ids) + canonical_ids = Symbol[] + for source_id in source_ids + owners = get( + distributed_outputs.writer_ownership, + (source_id, source_var), + (), + ) + final_owner = nothing + for owner in Iterators.reverse(owners) + if owner.application_id in matching_ids + final_owner = owner.application_id + break + end + end + if isnothing(final_owner) + for application_id in source_application_ids + application = applications_by_id[application_id] + source_id in application.target_ids || continue + source_var in _model_output_names(application) || continue + application_id in canonical_ids || + push!(canonical_ids, application_id) + end + elseif !(final_owner in canonical_ids) + push!(canonical_ids, final_owner) + end + end + return isempty(canonical_ids) ? source_application_ids : canonical_ids +end + +_filter_many_input_sources_by_writer!( + source_ids, + selector, + source_var, + process_filter, + application_filter, + applications_by_id, + ::NoCompiledDistributedOutputs, +) = source_ids + +function _filter_many_input_sources_by_writer!( + source_ids, + selector, + source_var::Symbol, + process_filter, + application_filter, + applications_by_id, + distributed_outputs::CompiledDistributedOutputs, +) + selector isa Many || return source_ids + _selector_from_status(selector) && return source_ids + isnothing(process_filter) && isnothing(application_filter) && + return source_ids + filter!(source_ids) do source_id + owners = get( + distributed_outputs.writer_ownership, + (source_id, source_var), + (), + ) + any(owners) do owner + source_application = get( + applications_by_id, + owner.application_id, + nothing, + ) + isnothing(source_application) && return false + isnothing(process_filter) || + source_application.process == process_filter || return false + isnothing(application_filter) || + source_application.id == application_filter || return false + return true + end + end + return source_ids +end + function _model_input_names(application::CompiledModelApplication) return Symbol[Symbol(var) for var in keys(_input_schema(application.spec))] end diff --git a/src/composite_model/registry_topology.jl b/src/composite_model/registry_topology.jl index 582d9b3ad..5e97377ea 100644 --- a/src/composite_model/registry_topology.jl +++ b/src/composite_model/registry_topology.jl @@ -1307,12 +1307,22 @@ function refresh_bindings!( delta.changed_target_ids, ) else - model.binding_cache = - compile_composite_model( - model, - model.applications; - performance=performance, + previous_binding_cache = model.binding_cache + refreshed_binding_cache = compile_composite_model( + model, + model.applications; + performance=performance, + ) + if !force && + !isnothing(previous_binding_cache) && + previous_binding_cache.distributed_outputs isa + CompiledDistributedOutputs + _preserve_recompiled_model_status_views!( + refreshed_binding_cache, + previous_binding_cache, ) + end + model.binding_cache = refreshed_binding_cache end model.bindings_dirty = false _consume_structural_lifecycle_delta!(model) diff --git a/src/composite_model/runtime_outputs.jl b/src/composite_model/runtime_outputs.jl index d98ca4f92..ecdd51c74 100644 --- a/src/composite_model/runtime_outputs.jl +++ b/src/composite_model/runtime_outputs.jl @@ -122,6 +122,16 @@ end _runtime_output_variable(::RuntimeOutputStream{V}) where {V} = V +"""Columnar retained streams for one distributed output variable.""" +struct RuntimeDistributedOutputStream{V,B,S,R} + binding::B + streams::S + references::R + dependency_horizon::Float64 +end + +_runtime_output_variable(::RuntimeDistributedOutputStream{V}) where {V} = V + struct CompiledOutputPublication{V} variables::V enabled::Bool @@ -1030,6 +1040,68 @@ function _model_new_output_stream( return Tuple{Float64,typeof(value)}[] end +function _model_output_object_ids( + compiled, + application, + variable::Symbol, + ::NoCompiledDistributedOutputs, +) + return application.target_ids +end + +function _model_output_object_ids( + compiled, + application, + variable::Symbol, + distributed_outputs::CompiledDistributedOutputs, +) + destination_ids = get( + distributed_outputs.destination_ids_by_application_variable, + (application.id, variable), + nothing, + ) + variable in keys(outputs_(application.spec)) || + return isnothing(destination_ids) ? ObjectId[] : destination_ids + isnothing(destination_ids) && return application.target_ids + object_ids = copy(application.target_ids) + append!(object_ids, destination_ids) + _sort_object_ids!(object_ids) + unique!(object_ids) + return object_ids +end + +_model_output_object_ids(compiled, application, variable::Symbol) = + _model_output_object_ids( + compiled, + application, + variable, + compiled.distributed_outputs, + ) + +function _model_output_reference( + compiled, + application, + object_id::ObjectId, + variable::Symbol, +) + if variable in keys(outputs_(application.spec)) && + haskey( + compiled.status_views_by_target, + (application.id, object_id), + ) + status = _model_status_view_for_application( + compiled, + application, + object_id, + ).status + return refvalue(status, variable) + end + return refvalue( + _model_object(compiled.model, object_id).status, + variable, + ) +end + function _initialize_model_output_streams!( streams, compiled::CompiledCompositeModel, @@ -1039,25 +1111,31 @@ function _initialize_model_output_streams!( ) for (application_id, variables) in retention.retained_outputs_by_application application = _compiled_application_by_id(compiled, application_id) - for object_id in application.target_ids - !isnothing(target_keys) && - !((application_id, object_id) in target_keys) && - continue - status = _model_status_view_for_application( + for variable in variables + for object_id in _model_output_object_ids( compiled, application, - object_id, - ).status - for variable in variables + variable, + ) + !isnothing(target_keys) && + !((application_id, object_id) in target_keys) && + compiled.distributed_outputs isa NoCompiledDistributedOutputs && + continue key = _model_stream_key(application_id, object_id, variable) haskey(streams, key) && continue - hasproperty(status, variable) || error( + reference = _model_output_reference( + compiled, + application, + object_id, + variable, + ) + isnothing(reference) && error( "Application `$(application_id)` declares retained output ", "`$(variable)`, but object `$(object_id.value)` status has no ", "such variable.", ) stream = _model_new_output_stream( - getproperty(status, variable), + reference[], retention, application_id, variable, @@ -1118,34 +1196,72 @@ end return samples end -@inline _model_publish_runtime_outputs!(::Tuple{}, time::Real) = nothing - -@inline function _model_publish_runtime_outputs!( - outputs::Tuple, +@inline function _model_publish_runtime_output_value!( + output, + stream, + value, time::Real, ) - output = first(outputs) - value = output.reference[] - expected_type = fieldtype(eltype(output.stream), 2) + expected_type = fieldtype(eltype(stream), 2) value isa expected_type || error( "Output `$(_runtime_output_variable(output))` changed value type from ", "`$(expected_type)` to `$(typeof(value))`. CompositeModel temporal ", "streams require a stable output type.", ) _model_publish_sample!( - output.stream, + stream, float(time), value, ) - if output.stream isa TemporalDependencyBuffer + if stream isa TemporalDependencyBuffer cutoff = output.dependency_horizon <= 0.0 ? float(time) : float(time) - output.dependency_horizon + 1.0 - while !isempty(output.stream) && - first(output.stream)[1] < cutoff - 1.0e-8 - _temporal_dependency_popfirst!(output.stream) + while !isempty(stream) && + first(stream)[1] < cutoff - 1.0e-8 + _temporal_dependency_popfirst!(stream) end end + return nothing +end + +@inline function _model_publish_runtime_output!( + output::RuntimeOutputStream, + time::Real, +) + _model_publish_runtime_output_value!( + output, + output.stream, + output.reference[], + time, + ) + return nothing +end + +@inline function _model_publish_runtime_output!( + output::RuntimeDistributedOutputStream, + time::Real, +) + references = output.references + streams = output.streams + @inbounds for index in eachindex(references) + _model_publish_runtime_output_value!( + output, + streams[index], + references[index], + time, + ) + end + return nothing +end + +@inline _model_publish_runtime_outputs!(::Tuple{}, time::Real) = nothing + +@inline function _model_publish_runtime_outputs!( + outputs::Tuple, + time::Real, +) + _model_publish_runtime_output!(first(outputs), time) _model_publish_runtime_outputs!(Base.tail(outputs), time) return nothing end @@ -2423,6 +2539,10 @@ function _runtime_model_output_streams( application.id, (), ) + variables = Tuple( + variable for variable in variables + if variable in keys(outputs_(application.spec)) + ) return Tuple(begin key = _model_stream_key(application.id, object_id, variable) stream = get(streams, key, nothing) @@ -2467,6 +2587,117 @@ function _runtime_model_output_streams( return () end +_runtime_model_distributed_output_streams( + compiled, + application, + object_id, + streams, + output_retention, + ::NoCompiledDistributedOutputs, +) = () + +_runtime_model_distributed_output_streams( + compiled, + application, + object_id, + ::Nothing, + output_retention, + distributed_outputs::CompiledDistributedOutputs, +) = () + +_runtime_model_distributed_output_streams( + compiled, + application, + object_id, + streams, + ::Nothing, + distributed_outputs::CompiledDistributedOutputs, +) = () + +function _runtime_model_distributed_output_streams( + compiled, + application, + object_id, + streams, + output_retention::OutputRetentionPlan, + distributed_outputs::CompiledDistributedOutputs, +) + retained_variables = get( + output_retention.retained_outputs_by_application, + application.id, + (), + ) + isempty(retained_variables) && return () + groups = get( + distributed_outputs.by_execution_target, + (application.id, object_id), + nothing, + ) + isnothing(groups) && return () + outputs = Any[] + for binding in values(groups) + for variable_ in keys(binding.declarations) + variable = Symbol(variable_) + variable in retained_variables || continue + source_streams = Any[ + get( + streams, + _model_stream_key( + application.id, + destination_id, + variable, + ), + nothing, + ) + for destination_id in binding.destination_ids + ] + any(isnothing, source_streams) && error( + "No initialized retained distributed output stream for application ", + "`$(application.id)`, group `$(binding.group)`, and variable ", + "`$(variable)`.", + ) + typed_streams = _typed_temporal_source_streams(source_streams) + references = getproperty(binding.columns, variable) + push!( + outputs, + RuntimeDistributedOutputStream{ + variable, + typeof(binding), + typeof(typed_streams), + typeof(references), + }( + binding, + typed_streams, + references, + get( + output_retention.dependency_horizons, + (application.id, variable), + 0.0, + ), + ), + ) + end + end + return Tuple(outputs) +end + +function _runtime_model_distributed_output_streams( + compiled, + application, + object_id, + streams, + output_retention, +) + return _runtime_model_distributed_output_streams( + compiled, + application, + object_id, + streams, + output_retention, + compiled.distributed_outputs, + ) +end + function _compiled_model_execution_context( compiled, env_bindings, @@ -2543,13 +2774,25 @@ function _compiled_model_execution_target( output_retention, constants, ) - output_bindings = _runtime_model_output_streams( + local_output_bindings = _runtime_model_output_streams( status_view.status, application, object_id, temporal_streams, output_retention, ) + distributed_output_bindings = + _runtime_model_distributed_output_streams( + compiled, + application, + object_id, + temporal_streams, + output_retention, + ) + output_bindings = ( + local_output_bindings..., + distributed_output_bindings..., + ) return CompiledExecutionTarget( object_id, model, @@ -2769,7 +3012,9 @@ end function _model_execution_outputs_match( runtime_outputs::Tuple, + compiled::CompiledCompositeModel, application::CompiledModelApplication, + object_id::ObjectId, output_retention, ) variables = output_retention isa OutputRetentionPlan ? @@ -2778,6 +3023,25 @@ function _model_execution_outputs_match( application.id, (), ) : () + if compiled.distributed_outputs isa CompiledDistributedOutputs + groups = get( + compiled.distributed_outputs.by_execution_target, + (application.id, object_id), + nothing, + ) + if !isnothing(groups) && any( + variable -> haskey( + compiled.distributed_outputs.destination_ids_by_application_variable, + (application.id, variable), + ), + variables, + ) + # Distributed columns carry lifecycle-specific destination + # references. Rebuild this execution target at a lifecycle barrier + # instead of trying to compare one runtime entry per variable. + return false + end + end length(runtime_outputs) == length(variables) || return false for index in eachindex(runtime_outputs) _runtime_output_variable(runtime_outputs[index]) == variables[index] || @@ -2811,7 +3075,9 @@ function _model_execution_target_change_reason( return :temporal_inputs _model_execution_outputs_match( target.output_bindings, + compiled, application, + object_id, output_retention, ) || return :output_bindings target.call_bindings === @@ -3400,6 +3666,47 @@ function _model_status_view_refresh_is_pure_addition( return all(key -> last(key) in added_object_ids, new_keys) end +function _model_application_output_variables( + compiled, + application, + ::NoCompiledDistributedOutputs, +) + return Tuple(Symbol(variable) for variable in keys(outputs_(application.spec))) +end + +function _model_application_output_variables( + compiled, + application, + distributed_outputs::CompiledDistributedOutputs, +) + variables = Symbol[Symbol(variable) for variable in keys(outputs_(application.spec))] + for ((application_id, variable), destination_ids) in + distributed_outputs.destination_ids_by_application_variable + application_id == application.id || continue + isempty(destination_ids) && continue + variable in variables || push!(variables, variable) + end + # Plans with an initially empty destination set still define retainable + # variables that may acquire destinations at a later lifecycle barrier. + plans = compiled.scenario_plan.distributed_output_plans + if plans isa CompiledDistributedOutputPlans + for plan in _application_plans(plans.by_application, application.slot) + for variable_ in keys(plan.declarations) + variable = Symbol(variable_) + variable in variables || push!(variables, variable) + end + end + end + return Tuple(variables) +end + +_model_application_output_variables(compiled, application) = + _model_application_output_variables( + compiled, + application, + compiled.distributed_outputs, + ) + function compile_model_output_retention( compiled::CompiledCompositeModel, output_requests; @@ -3448,9 +3755,12 @@ function compile_model_output_retention( retained_outputs_by_application = Dict{Symbol,Vector{Symbol}}() retained_keys = if retain_all Set( - (application.id, Symbol(variable)) + (application.id, variable) for application in compiled.applications - for variable in keys(outputs_(application.spec)) + for variable in _model_application_output_variables( + compiled, + application, + ) ) else union(temporal_dependencies, requested_outputs) @@ -3476,9 +3786,12 @@ end function _explain_output_retention(compiled::CompiledCompositeModel, plan) keys_to_explain = if plan.retain_all Set( - (application.id, Symbol(variable)) + (application.id, variable) for application in compiled.applications - for variable in keys(outputs_(application.spec)) + for variable in _model_application_output_variables( + compiled, + application, + ) ) else union(plan.temporal_dependencies, plan.requested_outputs) @@ -3510,6 +3823,13 @@ function _explain_output_retention(compiled::CompiledCompositeModel, plan) application_id, ).target_ids, ), + current_output_object_count=length( + _model_output_object_ids( + compiled, + _compiled_application_by_id(compiled, application_id), + variable, + ), + ), ) for (application_id, variable) in sort!( collect(keys_to_explain); @@ -5164,14 +5484,12 @@ function _output_request_target( variable::Symbol, start_time, ) - initial = getproperty( - _model_status_view_for_application( - compiled, - application, - object_id, - ).status, + initial = _model_output_reference( + compiled, + application, + object_id, variable, - ) + )[] return ( scale=_model_object(model, object_id).scale, memberships=[ @@ -5203,6 +5521,14 @@ function _initial_output_request_targets( output_request_matchers[request.name]; context=request.context, ) + owned_ids = Set( + _model_output_object_ids( + compiled, + application, + request.var, + ), + ) + filter!(id -> id in owned_ids, object_ids) targets[request.name] = ( application.id, Dict( @@ -5270,6 +5596,18 @@ function _refresh_output_request_targets!( ) ] end + application = _compiled_application_by_id( + simulation.compiled, + application_id, + ) + owned_ids = Set( + _model_output_object_ids( + simulation.compiled, + application, + request.var, + ), + ) + filter!(id -> id in owned_ids, matched_ids) active_ids = Set( object_id for (object_id, target) in object_targets if _output_request_target_is_active(target) @@ -5284,10 +5622,6 @@ function _refresh_output_request_targets!( "`$(request.selector)`, got $([id.value for id in current_ids]).", ) end - application = _compiled_application_by_id( - simulation.compiled, - application_id, - ) application_completed = !isnothing(completed_applications) && application_id in completed_applications @@ -5307,14 +5641,12 @@ function _refresh_output_request_targets!( if haskey(object_targets, object_id) target = object_targets[object_id] _output_request_target_is_active(target) && continue - initial = getproperty( - _model_status_view_for_application( - simulation.compiled, - application, - object_id, - ).status, + initial = _model_output_reference( + simulation.compiled, + application, + object_id, request.var, - ) + )[] push!( target.memberships, OutputRequestMembership( @@ -5566,16 +5898,25 @@ function _model_request_application(model::CompositeModel, compiled::CompiledCom declared_scale = _selector_declared_scale(request.selector) candidates = CompiledModelApplication[] for application in compiled.applications - request.var in keys(outputs_(application.spec)) || continue isnothing(request.application) || application.id == request.application || application.name == request.application || continue - target_match = any(id -> id in requested_ids, application.target_ids) - scale_match = !isnothing(declared_scale) && - _model_application_matches_scale(model, application, declared_scale) - (target_match || scale_match) || continue + local_output = request.var in keys(outputs_(application.spec)) + local_match = local_output && ( + any(id -> id in requested_ids, application.target_ids) || + (!isnothing(declared_scale) && + _model_application_matches_scale(model, application, declared_scale)) + ) + distributed_match = _model_request_matches_distributed_output( + compiled, + application, + request, + requested_ids, + ) + (local_match || distributed_match) || continue if isnothing(request.application) && + !distributed_match && _publish_mode_for_output(application.spec, request.var) == :stream_only continue end @@ -5606,6 +5947,50 @@ function _model_request_application(model::CompositeModel, compiled::CompiledCom return only(candidates) end +_model_request_matches_distributed_output( + compiled, + application, + request, + requested_ids, + ::NoCompiledDistributedOutputs, +) = false + +function _model_request_matches_distributed_output( + compiled, + application, + request, + requested_ids, + distributed_outputs::CompiledDistributedOutputs, +) + destination_ids = get( + distributed_outputs.destination_ids_by_application_variable, + (application.id, request.var), + (), + ) + concrete_match = any(id -> id in requested_ids, destination_ids) + isempty(requested_ids) || return concrete_match + plans = compiled.scenario_plan.distributed_output_plans + plans isa CompiledDistributedOutputPlans || return false + return any( + plan -> request.var in keys(plan.declarations) && + _selector_labels_may_overlap(request.selector, plan.selector), + _application_plans(plans.by_application, application.slot), + ) +end + +_model_request_matches_distributed_output( + compiled, + application, + request, + requested_ids, +) = _model_request_matches_distributed_output( + compiled, + application, + request, + requested_ids, + compiled.distributed_outputs, +) + function _model_request_application(sim::Simulation, request) return _model_request_application(sim.model, sim.compiled, request) end diff --git a/src/visualization/model_graph_view.jl b/src/visualization/model_graph_view.jl index d027e9b22..e44a408b7 100644 --- a/src/visualization/model_graph_view.jl +++ b/src/visualization/model_graph_view.jl @@ -92,7 +92,12 @@ function _model_graph_phase!(operation, diagnostics, phase::Symbol, fallback) end end -function _model_graph_dependency_children(applications, input_bindings, call_bindings) +function _model_graph_dependency_children( + applications, + input_bindings, + call_bindings, + distributed_output_plans=NoCompiledDistributedOutputPlans(), +) children = Dict{Symbol,Set{Symbol}}() call_owners = _model_call_owners(call_bindings) _model_input_order_edges!( @@ -100,10 +105,22 @@ function _model_graph_dependency_children(applications, input_bindings, call_bin input_bindings, call_owners, ) - _model_update_order_edges!(children, applications) + _scenario_update_order_edges!( + children, + applications, + _manual_call_application_ids(call_bindings), + distributed_output_plans, + ) return children end +function _model_graph_dependency_children(compiled::CompiledCompositeModel) + return Dict{Symbol,Set{Symbol}}( + application_id => Set{Symbol}(children) + for (application_id, children) in pairs(compiled.application_children) + ) +end + function _model_graph_cycle_components(applications, children) application_ids = Symbol[application.id for application in applications] index = Ref(0) @@ -153,8 +170,12 @@ end function _model_graph_compiled( model, applications, + input_plans, + call_plans, input_bindings, call_bindings, + distributed_output_plans, + distributed_outputs, diagnostics, ) isempty(diagnostics) || return nothing @@ -162,13 +183,11 @@ function _model_graph_compiled( input_by_target = _index_model_bindings(input_bindings, :application_id, :consumer_id) call_by_target = _index_model_bindings(call_bindings, :application_id, :consumer_id) timeline = _model_timeline(model) - distributed_output_plans = - _compile_model_output_destination_plans(model, applications) scenario_plan = _compiled_scenario_plan( model, applications, - _compile_model_input_plans(model, applications), - _compile_model_call_plans(model, applications), + input_plans, + call_plans, distributed_output_plans, timeline, ) @@ -181,18 +200,13 @@ function _model_graph_compiled( scenario_plan.call_plans, timeline, ) - distributed_outputs = _compile_model_distributed_outputs( - model, - applications, - scenario_plan.manual_application_ids, - scenario_plan.distributed_output_plans, - ) status_views = _compile_model_status_views( model, applications, applications_by_id, input_by_target, scenario_plan.application_order, + distributed_outputs, ) return CompiledCompositeModel( model, @@ -300,11 +314,7 @@ function compile_model_report(model::CompositeModel; strict::Bool=false) model = deepcopy(model) if strict compiled = compile_composite_model(model) - children = _model_graph_dependency_children( - compiled.applications, - compiled.input_bindings, - compiled.call_bindings, - ) + children = _model_graph_dependency_children(compiled) return CompositeModelCompilationReport( model, initial_status_variables, @@ -367,24 +377,76 @@ function compile_model_report(model::CompositeModel; strict::Bool=false) ) end + distributed_output_plans = _model_graph_phase!( + diagnostics, + :output_destination_plans, + NoCompiledDistributedOutputPlans(), + ) do + _compile_model_output_destination_plans(model, applications) + end + input_plans = _model_graph_phase!( + diagnostics, + :input_plans, + CompiledModelInputPlan[], + ) do + _compile_model_input_plans( + model, + applications, + distributed_output_plans, + ) + end + call_plans = _model_graph_phase!( + diagnostics, + :call_plans, + CompiledModelCallPlan[], + ) do + _compile_model_call_plans(model, applications) + end + scenario_call_owners = _scenario_call_owners(applications, call_plans) + manual_application_ids = Tuple( + application.id for application in applications + if !isempty(scenario_call_owners[application.id]) + ) + _model_graph_phase!(diagnostics, :call_ownership, nothing) do + _validate_scenario_call_ownership!( + scenario_call_owners, + manual_application_ids, + ) + end + call_bindings = _model_graph_phase!(diagnostics, :calls, CompiledModelCallBinding[]) do - _compile_model_call_bindings(model, applications) + _compile_model_call_bindings( + model, + applications; + plans_by_application=_plans_by_application( + applications, + call_plans, + ), + ) end _model_graph_phase!(diagnostics, :call_cadence, nothing) do _validate_model_call_cadences!(applications, call_bindings, timeline) end - _model_graph_phase!(diagnostics, :writers, nothing) do - _validate_model_writers!(applications, call_bindings) - end - _model_graph_phase!(diagnostics, :output_status, nothing) do - _prepare_model_output_statuses!(model, applications) + distributed_outputs = _model_graph_phase!( + diagnostics, + :writers, + NoCompiledDistributedOutputs(), + ) do + _compile_model_distributed_outputs( + model, + applications, + manual_application_ids, + distributed_output_plans, + ) end input_bindings = _model_graph_phase!(diagnostics, :inputs, CompiledModelInputBinding[]) do _compile_model_input_bindings( model, applications, - _manual_call_application_ids(call_bindings), + manual_application_ids, + _plans_by_application(applications, input_plans), + distributed_outputs, ) end _model_graph_phase!(diagnostics, :input_status, nothing) do @@ -394,15 +456,19 @@ function compile_model_report(model::CompositeModel; strict::Bool=false) children = Dict{Symbol,Set{Symbol}}() _model_graph_phase!(diagnostics, :dependency_inputs, nothing) do - call_owners = _model_call_owners(call_bindings) - _model_input_order_edges!( + _scenario_input_order_edges!( children, - input_bindings, - call_owners, + input_plans, + scenario_call_owners, ) end _model_graph_phase!(diagnostics, :update_order, nothing) do - _model_update_order_edges!(children, applications) + _scenario_update_order_edges!( + children, + applications, + manual_application_ids, + distributed_output_plans, + ) end cycles = _model_graph_cycle_components(applications, children) application_order = Symbol[] @@ -433,8 +499,12 @@ function compile_model_report(model::CompositeModel; strict::Bool=false) _model_graph_compiled( model, applications, + input_plans, + call_plans, input_bindings, call_bindings, + distributed_output_plans, + distributed_outputs, diagnostics, ) catch err @@ -959,6 +1029,26 @@ function _model_graph_application_for_object(applications_by_id, application_id, return object_id in application.target_ids end +function _model_graph_binding_execution_source_id( + report, + application_id::Symbol, + destination_id::ObjectId, + variable::Symbol, +) + isnothing(report.compiled) && return destination_id + distributed_outputs = report.compiled.distributed_outputs + distributed_outputs isa CompiledDistributedOutputs || return destination_id + for owner in get( + distributed_outputs.writer_ownership, + (destination_id, variable), + (), + ) + owner.application_id == application_id || continue + return owner.execution_object_id + end + return destination_id +end + function _model_graph_binding_edges(report, level) edges = Dict{String,Dict{String,Any}}() applications_by_id = Dict(application.id => application for application in report.applications) @@ -983,6 +1073,12 @@ function _model_graph_binding_edges(report, level) isempty(source_ids) && (source_ids = copy(binding.source_ids)) if level == :resolved for source_id in source_ids + execution_source_id = _model_graph_binding_execution_source_id( + report, + source_application_id, + source_id, + binding.source_var, + ) edge_id = string( "binding:", source_application_id, ":", source_id.value, ":", binding.source_var, ":", binding.application_id, @@ -990,7 +1086,10 @@ function _model_graph_binding_edges(report, level) ) edges[edge_id] = Dict{String,Any}( "id" => edge_id, - "source" => _model_graph_execution_node_id(source_application_id, source_id), + "source" => _model_graph_execution_node_id( + source_application_id, + execution_source_id, + ), "target" => _model_graph_execution_node_id(binding.application_id, binding.consumer_id), "sourcePort" => _model_graph_port_id(source_application_id, :output, binding.source_var), "targetPort" => _model_graph_port_id(binding.application_id, :input, binding.input), @@ -999,6 +1098,9 @@ function _model_graph_binding_edges(report, level) "sourceApplicationId" => string(source_application_id), "targetApplicationId" => string(binding.application_id), "sourceObjectIds" => [_model_graph_json_value(source_id.value)], + "sourceExecutionObjectIds" => [ + _model_graph_json_value(execution_source_id.value), + ], "targetObjectIds" => [_model_graph_json_value(binding.consumer_id.value)], "kind" => previous ? "previous_timestep" : string(binding.origin == :inferred ? :inferred_same_object : :value_binding), "projection" => "resolved", @@ -1538,11 +1640,7 @@ function compile_model_graph( templates=NamedTuple(), environments=NamedTuple(), ) - children = _model_graph_dependency_children( - compiled.applications, - compiled.input_bindings, - compiled.call_bindings, - ) + children = _model_graph_dependency_children(compiled) report = CompositeModelCompilationReport( compiled.model, Dict( diff --git a/test/runtests.jl b/test/runtests.jl index 16a85318e..2ca382bee 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -86,6 +86,10 @@ else include("test-model-output-destination-declarations.jl") end + @testset "Distributed output runtime" begin + include("test-model-distributed-output-runtime.jl") + end + @testset "Composite model multirate integration" begin include("test-model-multirate-integration.jl") end diff --git a/test/test-model-distributed-output-runtime.jl b/test/test-model-distributed-output-runtime.jl new file mode 100644 index 000000000..19990c0a7 --- /dev/null +++ b/test/test-model-distributed-output-runtime.jl @@ -0,0 +1,973 @@ +using Dates +using PlantSimEngine +using Test + +PlantSimEngine.@process "distributed_runtime_scene_writer" verbose = false +PlantSimEngine.@process "distributed_runtime_leaf_consumer" verbose = false +PlantSimEngine.@process "distributed_runtime_leaf_updater" verbose = false +PlantSimEngine.@process "distributed_runtime_stateful_writer" verbose = false +PlantSimEngine.@process "distributed_runtime_plant_integrator" verbose = false +PlantSimEngine.@process "distributed_runtime_aggregating_updater" verbose = false + +const DistributedRuntimeEvent = Tuple{Int,Symbol,Symbol,Float64} + +struct DistributedRuntimeSceneWriterModel <: + AbstractDistributed_Runtime_Scene_WriterModel + events::Vector{DistributedRuntimeEvent} +end + +struct DistributedRuntimeLeafConsumerModel <: + AbstractDistributed_Runtime_Leaf_ConsumerModel + events::Vector{DistributedRuntimeEvent} +end + +struct DistributedRuntimeLeafUpdaterModel <: + AbstractDistributed_Runtime_Leaf_UpdaterModel + events::Vector{DistributedRuntimeEvent} +end + +struct DistributedRuntimeStatefulWriterModel <: + AbstractDistributed_Runtime_Stateful_WriterModel end + +struct DistributedRuntimePlantIntegratorModel <: + AbstractDistributed_Runtime_Plant_IntegratorModel end + +struct DistributedRuntimeAggregatingUpdaterModel <: + AbstractDistributed_Runtime_Aggregating_UpdaterModel end + +PlantSimEngine.inputs_(::DistributedRuntimeSceneWriterModel) = NamedTuple() +PlantSimEngine.outputs_(::DistributedRuntimeSceneWriterModel) = NamedTuple() + +PlantSimEngine.inputs_(::DistributedRuntimeLeafConsumerModel) = + (incident_par=Required(Float64),) +PlantSimEngine.outputs_(::DistributedRuntimeLeafConsumerModel) = (seen=0.0,) + +PlantSimEngine.inputs_(::DistributedRuntimeLeafUpdaterModel) = + (incoming=Required(Float64),) +PlantSimEngine.outputs_(::DistributedRuntimeLeafUpdaterModel) = + (incident_par=0.0,) + +PlantSimEngine.inputs_(::DistributedRuntimeStatefulWriterModel) = NamedTuple() +PlantSimEngine.outputs_(::DistributedRuntimeStatefulWriterModel) = + (private_runs=0,) + +PlantSimEngine.inputs_(::DistributedRuntimePlantIntegratorModel) = + (integrated_incident_par=Required(Vector{Float64}),) +PlantSimEngine.outputs_(::DistributedRuntimePlantIntegratorModel) = + (integrated_total=0.0, integration_runs=0) + +PlantSimEngine.inputs_(::DistributedRuntimeAggregatingUpdaterModel) = + (incoming=Required(Float64),) +PlantSimEngine.outputs_(::DistributedRuntimeAggregatingUpdaterModel) = + (incident_par=0.0,) +PlantSimEngine.output_policy( + ::Type{<:DistributedRuntimeAggregatingUpdaterModel}, +) = (incident_par=Aggregate(),) + +# Task 4 intentionally exercises the compiler-owned destination references. +# Task 5 will replace this test-only lookup with the public OutputTargets API. +function _distributed_runtime_destination(context, group::Symbol) + groups = context.compiled.distributed_outputs.by_execution_target[ + (context.application.id, context.object_id) + ] + return getproperty(groups, group) +end + +function _distributed_runtime_value(object_id::ObjectId, time::Real) + coefficient = if object_id == ObjectId(:leaf_a) + 10.0 + elseif object_id == ObjectId(:leaf_b) + 20.0 + elseif object_id == ObjectId(:late_leaf) + 30.0 + else + 1.0 + end + return coefficient * float(time) +end + +function PlantSimEngine.run!( + model::DistributedRuntimeSceneWriterModel, + status, + environment, + constants, + context, +) + push!( + model.events, + (Int(context.time), :writer, context.object_id.value, 0.0), + ) + destinations = _distributed_runtime_destination(context, :leaves) + for index in eachindex(destinations.destination_ids) + object_id = destinations.destination_ids[index] + destinations.columns.incident_par[index] = + _distributed_runtime_value(object_id, context.time) + end + return nothing +end + +function PlantSimEngine.run!( + model::DistributedRuntimeLeafConsumerModel, + status, + environment, + constants, + context, +) + status.seen = status.incident_par + push!( + model.events, + ( + Int(context.time), + :consumer, + context.object_id.value, + float(status.seen), + ), + ) + return nothing +end + +function PlantSimEngine.run!( + model::DistributedRuntimeLeafUpdaterModel, + status, + environment, + constants, + context, +) + status.incident_par = status.incoming + 1.0 + push!( + model.events, + ( + Int(context.time), + :updater, + context.object_id.value, + float(status.incident_par), + ), + ) + return nothing +end + +function PlantSimEngine.run!( + ::DistributedRuntimeStatefulWriterModel, + status, + environment, + constants, + context, +) + status.private_runs += 1 + destinations = _distributed_runtime_destination(context, :leaves) + for index in eachindex(destinations.destination_ids) + destinations.columns.incident_par[index] = + 100.0 + status.private_runs + end + return nothing +end + + +function PlantSimEngine.run!( + ::DistributedRuntimePlantIntegratorModel, + status, + environment, + constants, + context, +) + status.integrated_total = sum(status.integrated_incident_par) + status.integration_runs += 1 + return nothing +end + + +function PlantSimEngine.run!( + ::DistributedRuntimeAggregatingUpdaterModel, + status, + environment, + constants, + context, +) + status.incident_par = status.incoming + 1.0 + return nothing +end + +function _distributed_runtime_applications( + events; + writer_every=nothing, + consumer_every=nothing, +) + # The consumer is deliberately declared first: the distributed producer + # dependency, rather than tuple order, must schedule the writer first. + return ( + ModelSpec( + DistributedRuntimeLeafConsumerModel(events); + name=:distributed_runtime_consumer, + on=Many(scale=:Leaf), + every=consumer_every, + ), + ModelSpec( + DistributedRuntimeSceneWriterModel(events); + name=:distributed_runtime_writer, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=(incident_par=Default(0.0),), + ), + ), + every=writer_every, + ), + ) +end + +function _distributed_runtime_two_plant_scene( + events=DistributedRuntimeEvent[]; + writer_every=nothing, + consumer_every=nothing, +) + # Reverse lexical declaration order to make incidental insertion order + # visible if it leaks into the compiled Many target order. + return CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant_b; scale=:Plant, parent=:scene), + Object(:leaf_b; scale=:Leaf, parent=:plant_b), + Object(:plant_a; scale=:Plant, parent=:scene), + Object(:leaf_a; scale=:Leaf, parent=:plant_a); + applications=_distributed_runtime_applications( + events; + writer_every=writer_every, + consumer_every=consumer_every, + ), + environment=(duration=Hour(1),), + ) +end + +function _distributed_runtime_empty_scene( + events=DistributedRuntimeEvent[], +) + return CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene); + applications=_distributed_runtime_applications(events), + environment=(duration=Hour(1),), + ) +end + +@testset "distributed writer schedules ordinary leaf consumers" begin + events = DistributedRuntimeEvent[] + model = _distributed_runtime_two_plant_scene(events) + compiled = Advanced.refresh_bindings!(model) + + consumer_bindings = [ + row for row in Diagnostics.explain_bindings(compiled) + if row.application_id == :distributed_runtime_consumer && + row.input == :incident_par + ] + @test length(consumer_bindings) == 2 + @test all( + row.source_application_ids == [:distributed_runtime_writer] + for row in consumer_bindings + ) + schedule = Dict( + row.application_id => row.execution_index + for row in Diagnostics.explain_schedule(compiled) + ) + @test schedule[:distributed_runtime_writer] < + schedule[:distributed_runtime_consumer] + + simulation = run!(model; steps=2, outputs=:none) + @test events == DistributedRuntimeEvent[ + (1, :writer, :scene, 0.0), + (1, :consumer, :leaf_a, 10.0), + (1, :consumer, :leaf_b, 20.0), + (2, :writer, :scene, 0.0), + (2, :consumer, :leaf_a, 20.0), + (2, :consumer, :leaf_b, 40.0), + ] + states = final_state(simulation, Many(scale=:Leaf)) + @test states[:leaf_a].incident_par == states[:leaf_a].seen == 20.0 + @test states[:leaf_b].incident_par == states[:leaf_b].seen == 40.0 + @test isempty(outputs(simulation)) +end + +@testset "empty distributed destinations refresh before a new leaf runs" begin + events = DistributedRuntimeEvent[] + model = _distributed_runtime_empty_scene(events) + simulation = run!(model; outputs=:none) + @test events == DistributedRuntimeEvent[(1, :writer, :scene, 0.0)] + + register_object!( + model, + Object(:late_leaf; scale=:Leaf); + parent=:plant, + ) + continue!(simulation) + + @test events == DistributedRuntimeEvent[ + (1, :writer, :scene, 0.0), + (2, :writer, :scene, 0.0), + (2, :consumer, :late_leaf, 60.0), + ] + late_leaf = final_state(simulation, :late_leaf) + @test late_leaf.incident_par == late_leaf.seen == 60.0 + binding = only(simulation.compiled.distributed_outputs.bindings) + @test binding.destination_ids == ObjectId[ObjectId(:late_leaf)] + @test isempty(outputs(simulation)) + + retained_events = DistributedRuntimeEvent[] + retained_model = _distributed_runtime_empty_scene(retained_events) + request = OutputRequest( + Many(scale=:Leaf), + :incident_par; + name=:dynamic_incident_par, + application=:distributed_runtime_writer, + ) + retained_simulation = run!(retained_model; outputs=request) + register_object!( + retained_model, + Object(:late_leaf; scale=:Leaf); + parent=:plant, + ) + continue!(retained_simulation) + @test outputs(retained_simulation)[ + ( + :distributed_runtime_writer, + ObjectId(:late_leaf), + :incident_par, + ) + ] == [(2.0, 60.0)] + retained_rows = collect_outputs( + retained_simulation, + :dynamic_incident_par; + sink=nothing, + ) + @test getproperty.(retained_rows, :timestep) == [2] + @test getproperty.(retained_rows, :object_id) == [:late_leaf] +end + +@testset "Updates defines the final distributed-output producer" begin + events = DistributedRuntimeEvent[] + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:leaf; scale=:Leaf, parent=:scene); + applications=( + ModelSpec( + DistributedRuntimeSceneWriterModel(events); + name=:distributed_runtime_writer, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=(incident_par=Default(0.0),), + ), + ), + ), + ModelSpec( + DistributedRuntimeLeafUpdaterModel(events); + name=:distributed_runtime_updater, + on=One(scale=:Leaf), + inputs=( + :incoming => One( + within=Self(), + application=:distributed_runtime_writer, + var=:incident_par, + ), + ), + updates=Updates( + :incident_par; + after=:distributed_runtime_writer, + ), + ), + ModelSpec( + DistributedRuntimeLeafConsumerModel(events); + name=:distributed_runtime_consumer, + on=One(scale=:Leaf), + ), + ), + environment=(duration=Hour(1),), + ) + + compiled = Advanced.refresh_bindings!(model) + consumer_binding = only( + row for row in Diagnostics.explain_bindings(compiled) + if row.application_id == :distributed_runtime_consumer && + row.input == :incident_par + ) + @test consumer_binding.source_application_ids == + [:distributed_runtime_updater] + writer = only( + row for row in Diagnostics.explain_writers(compiled) + if row.object_id == :leaf && row.variable == :incident_par + ) + @test writer.application_ids == [ + :distributed_runtime_writer, + :distributed_runtime_updater, + ] + + simulation = run!(model; outputs=:none) + @test events == DistributedRuntimeEvent[ + (1, :writer, :scene, 0.0), + (1, :updater, :leaf, 2.0), + (1, :consumer, :leaf, 2.0), + ] + @test final_state(simulation, :leaf).incident_par == 2.0 + @test final_state(simulation, :leaf).seen == 2.0 +end + +@testset "distributed histories use producer and destination identities" begin + requested_model = _distributed_runtime_two_plant_scene() + request = OutputRequest( + Many(scale=:Leaf), + :incident_par; + name=:requested_incident_par, + application=:distributed_runtime_writer, + ) + requested = run!(requested_model; steps=3, outputs=request) + expected_keys = Set([ + ( + :distributed_runtime_writer, + ObjectId(:leaf_a), + :incident_par, + ), + ( + :distributed_runtime_writer, + ObjectId(:leaf_b), + :incident_par, + ), + ]) + @test Set(keys(outputs(requested))) == expected_keys + @test outputs(requested)[ + (:distributed_runtime_writer, ObjectId(:leaf_a), :incident_par) + ] == [(1.0, 10.0), (2.0, 20.0), (3.0, 30.0)] + @test outputs(requested)[ + (:distributed_runtime_writer, ObjectId(:leaf_b), :incident_par) + ] == [(1.0, 20.0), (2.0, 40.0), (3.0, 60.0)] + requested_rows = collect_outputs( + requested, + :requested_incident_par; + sink=nothing, + ) + @test unique(getproperty.(requested_rows, :application_id)) == + [:distributed_runtime_writer] + @test Set(getproperty.(requested_rows, :object_id)) == + Set((:leaf_a, :leaf_b)) + + all_model = _distributed_runtime_two_plant_scene() + all_outputs = run!(all_model; steps=2, outputs=:all) + distributed_keys = Set( + key for key in keys(outputs(all_outputs)) + if first(key) == :distributed_runtime_writer + ) + @test distributed_keys == expected_keys + @test last.(outputs(all_outputs)[ + (:distributed_runtime_writer, ObjectId(:leaf_a), :incident_par) + ]) == [10.0, 20.0] + @test last.(outputs(all_outputs)[ + (:distributed_runtime_writer, ObjectId(:leaf_b), :incident_par) + ]) == [20.0, 40.0] +end + +@testset "distributed retention follows the producer cadence" begin + model = _distributed_runtime_two_plant_scene( + DistributedRuntimeEvent[]; + writer_every=Hour(2), + consumer_every=Hour(1), + ) + simulation = run!(model; steps=5, outputs=:all) + + writer_stream = outputs(simulation)[ + (:distributed_runtime_writer, ObjectId(:leaf_a), :incident_par) + ] + consumer_stream = outputs(simulation)[ + (:distributed_runtime_consumer, ObjectId(:leaf_a), :seen) + ] + @test first.(writer_stream) == [1.0, 3.0, 5.0] + @test last.(writer_stream) == [10.0, 30.0, 50.0] + @test first.(consumer_stream) == [1.0, 2.0, 3.0, 4.0, 5.0] + @test last.(consumer_stream) == [10.0, 10.0, 30.0, 30.0, 50.0] +end + +@testset "lifecycle preserves existing stream-only private output state" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene); + applications=( + ModelSpec( + DistributedRuntimeStatefulWriterModel(); + name=:distributed_runtime_stateful_writer, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=(incident_par=Default(0.0),), + ), + ), + output_routing=(private_runs=:stream_only,), + ), + ), + environment=(duration=Hour(1),), + ) + + simulation = run!(model; outputs=:all) + @test outputs(simulation)[ + ( + :distributed_runtime_stateful_writer, + ObjectId(:scene), + :private_runs, + ) + ] == [(1.0, 1)] + @test !(:private_runs in propertynames(final_state(simulation, :scene))) + + register_object!( + model, + Object(:late_leaf; scale=:Leaf); + parent=:plant, + ) + continue!(simulation) + + @test outputs(simulation)[ + ( + :distributed_runtime_stateful_writer, + ObjectId(:scene), + :private_runs, + ) + ] == [(1.0, 1), (2.0, 2)] + @test final_state(simulation, :late_leaf).incident_par == 102.0 +end + +@testset "concrete output request selects disjoint distributed writer" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object( + :sun_leaf; + scale=:Leaf, + kind=:sun, + parent=:scene, + ), + Object( + :shade_leaf; + scale=:Leaf, + kind=:shade, + parent=:scene, + ); + applications=( + ModelSpec( + DistributedRuntimeSceneWriterModel( + DistributedRuntimeEvent[], + ); + name=:distributed_runtime_sun_writer, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many( + scale=:Leaf, + kind=:sun, + within=SceneScope(), + ); + vars=(incident_par=Default(0.0),), + ), + ), + ), + ModelSpec( + DistributedRuntimeSceneWriterModel( + DistributedRuntimeEvent[], + ); + name=:distributed_runtime_shade_writer, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many( + scale=:Leaf, + kind=:shade, + within=SceneScope(), + ); + vars=(incident_par=Default(0.0),), + ), + ), + ), + ), + environment=(duration=Hour(1),), + ) + + simulation = run!( + model; + outputs=OutputRequest( + One(kind=:sun), + :incident_par; + name=:sun_incident_par, + ), + ) + expected_key = ( + :distributed_runtime_sun_writer, + ObjectId(:sun_leaf), + :incident_par, + ) + @test Set(keys(outputs(simulation))) == Set([expected_key]) + @test outputs(simulation)[expected_key] == [(1.0, 1.0)] + rows = collect_outputs(simulation, :sun_incident_par; sink=nothing) + @test getproperty.(rows, :application_id) == + [:distributed_runtime_sun_writer] + @test getproperty.(rows, :object_id) == [:sun_leaf] +end + +@testset "PreviousTimeStep retains bounded distributed history" begin + events = DistributedRuntimeEvent[] + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:lag_leaf; scale=:Leaf, parent=:scene); + applications=( + ModelSpec( + DistributedRuntimeSceneWriterModel(events); + name=:distributed_runtime_lag_writer, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=(incident_par=Default(0.0),), + ), + ), + ), + ModelSpec( + DistributedRuntimeLeafConsumerModel(events); + name=:distributed_runtime_lag_consumer, + on=One(scale=:Leaf), + inputs=( + PreviousTimeStep(:incident_par) => One( + within=Self(), + application=:distributed_runtime_lag_writer, + var=:incident_par, + ), + ), + ), + ), + environment=(duration=Hour(1),), + ) + + simulation = run!(model; steps=5, outputs=:none) + @test [ + event[4] for event in events + if event[2] == :consumer + ] == [0.0, 1.0, 2.0, 3.0, 4.0] + + dependency_stream = outputs(simulation)[ + ( + :distributed_runtime_lag_writer, + ObjectId(:lag_leaf), + :incident_par, + ) + ] + @test dependency_stream isa + PlantSimEngine.TemporalDependencyBuffer{Float64} + @test length(dependency_stream.times) == 2 + @test dependency_stream == [(4.0, 4.0), (5.0, 5.0)] + retention = only( + row for row in Diagnostics.explain_output_retention(simulation) + if row.application_id == :distributed_runtime_lag_writer && + row.variable == :incident_par + ) + @test retention.reasons == (:temporal_dependency,) + @test retention.retention_steps == 2.0 +end + +@testset "temporal Many uses final Updates writer after distributed output" begin + events = DistributedRuntimeEvent[] + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene), + Object(:leaf_a; scale=:Leaf, parent=:plant), + Object(:leaf_b; scale=:Leaf, parent=:plant); + applications=( + ModelSpec( + DistributedRuntimeSceneWriterModel(events); + name=:distributed_runtime_integrated_writer, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=(incident_par=Default(0.0),), + ), + ), + every=Hour(1), + ), + ModelSpec( + DistributedRuntimeLeafUpdaterModel(events); + name=:distributed_runtime_integrated_updater, + on=Many(scale=:Leaf), + inputs=( + :incoming => One( + within=Self(), + application=:distributed_runtime_integrated_writer, + var=:incident_par, + ), + ), + updates=Updates( + :incident_par; + after=:distributed_runtime_integrated_writer, + ), + every=Hour(1), + ), + ModelSpec( + DistributedRuntimePlantIntegratorModel(); + name=:distributed_runtime_integrator, + on=One(scale=:Plant), + inputs=( + :integrated_incident_par => Many( + scale=:Leaf, + within=Subtree(), + var=:incident_par, + policy=Integrate(), + window=Hour(2), + ), + ), + every=Hour(2), + ), + ), + environment=(duration=Hour(1),), + ) + + compiled = Advanced.refresh_bindings!(model) + temporal_input = only( + compiled.status_views_by_target[ + (:distributed_runtime_integrator, ObjectId(:plant)) + ].temporal_inputs, + ) + @test temporal_input.source_applications == [ + :distributed_runtime_integrated_updater, + :distributed_runtime_integrated_updater, + ] + + simulation = run!(model; steps=3, outputs=:none) + plant = final_state(simulation, :plant) + @test plant.integration_runs == 2 + @test plant.integrated_total > 0.0 + for leaf_id in (:leaf_a, :leaf_b) + @test outputs(simulation)[ + ( + :distributed_runtime_integrated_updater, + ObjectId(leaf_id), + :incident_par, + ) + ] isa PlantSimEngine.TemporalDependencyBuffer{Float64} + end +end + +@testset "reparent and removal refresh destinations without losing history" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant_a; scale=:Plant, parent=:scene), + Object(:plant_b; scale=:Plant, parent=:scene), + Object(:moving_leaf; scale=:Leaf, parent=:plant_a); + applications=( + ModelSpec( + DistributedRuntimeSceneWriterModel( + DistributedRuntimeEvent[], + ); + name=:distributed_runtime_plant_writer, + on=Many(scale=:Plant), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=Subtree()); + vars=(incident_par=Default(0.0),), + ), + ), + ), + ), + environment=(duration=Hour(1),), + ) + + simulation = run!(model; outputs=:all) + stream_key = ( + :distributed_runtime_plant_writer, + ObjectId(:moving_leaf), + :incident_par, + ) + retained_stream = outputs(simulation)[stream_key] + @test retained_stream == [(1.0, 1.0)] + initial_targets = + simulation.compiled.distributed_outputs.by_execution_target + @test initial_targets[ + (:distributed_runtime_plant_writer, ObjectId(:plant_a)) + ].leaves.destination_ids == ObjectId[ObjectId(:moving_leaf)] + @test isempty( + initial_targets[ + (:distributed_runtime_plant_writer, ObjectId(:plant_b)) + ].leaves.destination_ids, + ) + + reparent_object!(model, :moving_leaf, :plant_b) + continue!(simulation) + + reparented_targets = + simulation.compiled.distributed_outputs.by_execution_target + @test isempty( + reparented_targets[ + (:distributed_runtime_plant_writer, ObjectId(:plant_a)) + ].leaves.destination_ids, + ) + plant_b_binding = reparented_targets[ + (:distributed_runtime_plant_writer, ObjectId(:plant_b)) + ].leaves + @test plant_b_binding.destination_ids == + ObjectId[ObjectId(:moving_leaf)] + moving_leaf = only(model_objects(model; scale=:Leaf)) + @test only(parent(plant_b_binding.columns.incident_par)) === + PlantSimEngine.refvalue(moving_leaf.status, :incident_par) + owner = only( + simulation.compiled.distributed_outputs.writer_ownership[ + (ObjectId(:moving_leaf), :incident_par) + ], + ) + @test owner.execution_object_id == ObjectId(:plant_b) + @test outputs(simulation)[stream_key] === retained_stream + @test retained_stream == [(1.0, 1.0), (2.0, 2.0)] + + remove_object!(model, :moving_leaf) + continue!(simulation) + + removed_targets = + simulation.compiled.distributed_outputs.by_execution_target + @test all( + isempty( + removed_targets[ + (:distributed_runtime_plant_writer, ObjectId(plant_id)) + ].leaves.destination_ids, + ) + for plant_id in (:plant_a, :plant_b) + ) + @test !haskey( + simulation.compiled.distributed_outputs.writer_ownership, + (ObjectId(:moving_leaf), :incident_par), + ) + @test outputs(simulation)[stream_key] === retained_stream + @test retained_stream == [(1.0, 1.0), (2.0, 2.0)] +end + +@testset "Many application filter restricts distributed source membership" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene), + Object(:leaf_a; scale=:Leaf, kind=:sun, parent=:plant), + Object(:leaf_b; scale=:Leaf, kind=:shade, parent=:plant); + applications=( + ModelSpec( + DistributedRuntimeSceneWriterModel( + DistributedRuntimeEvent[], + ); + name=:distributed_runtime_sun_only_writer, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many( + scale=:Leaf, + kind=:sun, + within=SceneScope(), + ); + vars=(incident_par=Default(0.0),), + ), + ), + ), + ModelSpec( + DistributedRuntimePlantIntegratorModel(); + name=:distributed_runtime_sun_only_consumer, + on=One(scale=:Plant), + inputs=( + :integrated_incident_par => Many( + scale=:Leaf, + within=Subtree(), + application=:distributed_runtime_sun_only_writer, + var=:incident_par, + ), + ), + ), + ModelSpec( + DistributedRuntimeSceneWriterModel( + DistributedRuntimeEvent[], + ); + name=:distributed_runtime_shade_only_writer, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many( + scale=:Leaf, + kind=:shade, + within=SceneScope(), + ); + vars=(incident_par=Default(0.0),), + ), + ), + ), + ), + environment=(duration=Hour(1),), + ) + + compiled = Advanced.refresh_bindings!(model) + binding = only( + candidate for candidate in compiled.input_bindings + if candidate.application_id == + :distributed_runtime_sun_only_consumer + ) + @test binding.source_ids == ObjectId[ObjectId(:leaf_a)] + @test binding.source_application_ids == + [:distributed_runtime_sun_only_writer] + + simulation = run!(model; outputs=:none) + @test final_state(simulation, :plant).integrated_total == 10.0 + @test final_state(simulation, :leaf_b).incident_par == 20.0 +end + +@testset "Many default policy follows final distributed Updates writer" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene), + Object(:leaf; scale=:Leaf, parent=:plant); + applications=( + ModelSpec( + DistributedRuntimeSceneWriterModel( + DistributedRuntimeEvent[], + ); + name=:distributed_runtime_policy_writer, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=(incident_par=Default(0.0),), + ), + ), + ), + ModelSpec( + DistributedRuntimeAggregatingUpdaterModel(); + name=:distributed_runtime_policy_updater, + on=One(scale=:Leaf), + inputs=( + :incoming => One( + within=Self(), + application=:distributed_runtime_policy_writer, + var=:incident_par, + ), + ), + updates=Updates( + :incident_par; + after=:distributed_runtime_policy_writer, + ), + ), + ModelSpec( + DistributedRuntimePlantIntegratorModel(); + name=:distributed_runtime_policy_consumer, + on=One(scale=:Plant), + inputs=( + :integrated_incident_par => Many( + scale=:Leaf, + within=Subtree(), + var=:incident_par, + ), + ), + ), + ), + environment=(duration=Hour(1),), + ) + + compiled = Advanced.refresh_bindings!(model) + binding = only( + candidate for candidate in compiled.input_bindings + if candidate.application_id == :distributed_runtime_policy_consumer + ) + @test binding.source_application_ids == + [:distributed_runtime_policy_updater] + @test binding.policy isa Aggregate +end diff --git a/test/test-model-graph-view.jl b/test/test-model-graph-view.jl index 92b90f405..803ad4d56 100644 --- a/test/test-model-graph-view.jl +++ b/test/test-model-graph-view.jl @@ -7,12 +7,15 @@ abstract type AbstractModelGraphConsumerModel <: PlantSimEngine.AbstractModel en abstract type AbstractModelGraphCycleAModel <: PlantSimEngine.AbstractModel end abstract type AbstractModelGraphCycleBModel <: PlantSimEngine.AbstractModel end abstract type AbstractModelGraphEnvironmentModel <: PlantSimEngine.AbstractModel end +abstract type AbstractModelGraphDistributedWriterModel <: PlantSimEngine.AbstractModel end PlantSimEngine.process_(::Type{AbstractModelGraphSourceModel}) = :model_graph_source PlantSimEngine.process_(::Type{AbstractModelGraphConsumerModel}) = :model_graph_consumer PlantSimEngine.process_(::Type{AbstractModelGraphCycleAModel}) = :model_graph_cycle_a PlantSimEngine.process_(::Type{AbstractModelGraphCycleBModel}) = :model_graph_cycle_b PlantSimEngine.process_(::Type{AbstractModelGraphEnvironmentModel}) = :model_graph_environment +PlantSimEngine.process_(::Type{AbstractModelGraphDistributedWriterModel}) = + :model_graph_distributed_writer struct ModelGraphSourceModel{T} <: AbstractModelGraphSourceModel coefficient::T @@ -40,6 +43,10 @@ PlantSimEngine.outputs_(::ModelGraphEnvironmentModel) = (result=-Inf,) PlantSimEngine.environment_inputs_(::ModelGraphEnvironmentModel) = (T=-Inf,) PlantSimEngine.environment_outputs_(::ModelGraphEnvironmentModel) = (leaf_temperature=-Inf,) +struct ModelGraphDistributedWriterModel <: AbstractModelGraphDistributedWriterModel end +PlantSimEngine.inputs_(::ModelGraphDistributedWriterModel) = NamedTuple() +PlantSimEngine.outputs_(::ModelGraphDistributedWriterModel) = NamedTuple() + struct ModelGraphWeatherBackend <: PlantSimEngine.EnvironmentAPI.AbstractEnvironmentBackend end struct ModelGraphCanopyBackend <: PlantSimEngine.EnvironmentAPI.AbstractEnvironmentBackend end PlantSimEngine.EnvironmentAPI.environment_variables(::ModelGraphWeatherBackend) = (:T, :RH) @@ -171,6 +178,120 @@ end @test occursin("Applications", html) end +@testset "CompositeModel graph compiles distributed writers like the strict compiler" begin + leaf_destination = () -> OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=(signal=Default(0.0),), + ) + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:leaf; scale=:Leaf, parent=:scene); + applications=( + ModelSpec( + ModelGraphConsumerModel(); + name=:consumer, + on=One(scale=:Leaf), + ), + ModelSpec( + ModelGraphDistributedWriterModel(); + name=:first_writer, + on=One(scale=:Scene), + outputs_to=(leaves=leaf_destination(),), + ), + ModelSpec( + ModelGraphDistributedWriterModel(); + name=:second_writer, + on=One(scale=:Scene), + outputs_to=(leaves=leaf_destination(),), + updates=Updates(:signal; after=:first_writer), + ), + ), + ) + + report = compile_model_report(model) + strict_report = compile_model_report(model; strict=true) + + @test isempty(report.diagnostics) + @test !isnothing(report.compiled) + @test report.application_order == [:first_writer, :second_writer, :consumer] + @test report.application_order == strict_report.application_order + @test :second_writer in report.dependency_children[:first_writer] + @test :consumer in report.dependency_children[:second_writer] + + signal_binding = only( + binding for binding in report.input_bindings + if binding.application_id == :consumer && binding.input == :signal + ) + strict_signal_binding = only( + binding for binding in strict_report.input_bindings + if binding.application_id == :consumer && binding.input == :signal + ) + @test signal_binding.source_ids == ObjectId[ObjectId(:leaf)] + @test signal_binding.source_application_ids == [:second_writer] + @test signal_binding.source_application_ids == + strict_signal_binding.source_application_ids + @test input_value(signal_binding) == 0.0 + + consumer_view = report.compiled.status_views_by_target[ + (:consumer, ObjectId(:leaf)) + ] + @test consumer_view.status.signal == 0.0 + @test isnothing(only(model_objects(model; scale=:Leaf)).status) + + output_bindings = Diagnostics.explain_output_bindings(report.compiled) + @test length(output_bindings) == 2 + @test all(row.destination_ids == [:leaf] for row in output_bindings) + writer = only( + row for row in Diagnostics.explain_writers(report.compiled) + if row.object_id == :leaf && row.variable == :signal + ) + @test writer.application_ids == [:first_writer, :second_writer] + @test writer.execution_object_ids == [:scene, :scene] + @test writer.owner_kinds == [:output_destination, :output_destination] + + initialization = only( + row for row in model_graph_view(model).initialization + if row["applicationId"] == "consumer" && row["variable"] == "signal" + ) + @test initialization["disposition"] == "producer_bound" + @test initialization["sourceApplicationIds"] == ["second_writer"] + + resolved = model_graph_view(model; level=:resolved) + resolved_binding = only( + edge for edge in resolved.edges + if get(edge, "projection", nothing) == "resolved" && + get(edge, "targetApplicationId", nothing) == "consumer" + ) + @test resolved_binding["source"] == "execution:second_writer:scene" + @test resolved_binding["sourceObjectIds"] == ["leaf"] + @test resolved_binding["sourceExecutionObjectIds"] == ["scene"] + @test resolved_binding["source"] in + Set(execution["id"] for execution in resolved.executions) + + empty_model = CompositeModel( + Object(:empty_scene; scale=:Scene); + applications=( + ModelSpec( + ModelGraphConsumerModel(); + name=:empty_consumer, + on=Many(scale=:Leaf), + ), + ModelSpec( + ModelGraphDistributedWriterModel(); + name=:empty_writer, + on=One(scale=:Scene), + outputs_to=(leaves=leaf_destination(),), + ), + ), + ) + empty_report = compile_model_report(empty_model) + empty_strict_report = compile_model_report(empty_model; strict=true) + @test isempty(empty_report.diagnostics) + @test isempty(empty_report.input_bindings) + @test empty_report.application_order == [:empty_writer, :empty_consumer] + @test empty_report.application_order == empty_strict_report.application_order +end + @testset "CompositeModel graph instances and overrides" begin template = CompositeModelTemplate( ( diff --git a/test/test-model-output-destination-declarations.jl b/test/test-model-output-destination-declarations.jl index ae822c1c0..423218c15 100644 --- a/test/test-model-output-destination-declarations.jl +++ b/test/test-model-output-destination-declarations.jl @@ -365,6 +365,27 @@ end @test_throws "declares more than one canonical writer" Advanced.refresh_bindings!( overlapping, ) + + stream_only_self_collision = CompositeModel( + Object(:leaf; scale=:Leaf); + applications=( + ModelSpec( + OutputDestinationLocalModel(); + name=:stream_only_self_writer, + on=One(scale=:Leaf), + outputs_to=( + self=OutputTo( + One(within=Self()); + vars=(incident_par=Default(0.0),), + ), + ), + output_routing=(incident_par=:stream_only,), + ), + ), + ) + @test_throws "publishes stream-only local output `incident_par`" Advanced.refresh_bindings!( + stream_only_self_collision, + ) end @testset "output destinations remain scoped per execution object" begin @@ -399,6 +420,11 @@ end (ObjectId(:leaf_a), :incident_par), (ObjectId(:leaf_b), :incident_par), ]) + @test compiled.distributed_outputs.destination_ids_by_application_variable[ + (:plant_probe, :incident_par) + ] == ObjectId[ObjectId(:leaf_a), ObjectId(:leaf_b)] + @test by_target[(:plant_probe, ObjectId(:plant_a))].leaves.destination_ids == + ObjectId[ObjectId(:leaf_a)] dynamic_model = CompositeModel( Object(:scene; scale=:Scene), diff --git a/test/test-unified-model-object-api.jl b/test/test-unified-model-object-api.jl index 7fe9bf11e..fca4a0cd9 100644 --- a/test/test-unified-model-object-api.jl +++ b/test/test-unified-model-object-api.jl @@ -3285,6 +3285,7 @@ end reasons=(:output_request,), retention_steps=nothing, current_target_count=1, + current_output_object_count=1, ), ] @test collect_outputs(tracked_output_simulation; sink=nothing)[:signal_two_hour] == @@ -4227,6 +4228,7 @@ end reasons=(:output_request,), retention_steps=nothing, current_target_count=2, + current_output_object_count=2, ) @test length(collect_outputs(lifecycle_simulation, :leaf_1, :signal; sink=nothing)) == 3 @test length(collect_outputs(lifecycle_simulation, :grown_leaf, :signal; sink=nothing)) == 3 From da6001ec7ecfff86744c9f9c69a28ec00841857d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Sun, 23 Aug 2026 13:48:40 +0200 Subject: [PATCH 10/45] feat: add keyed output assignment --- src/PlantSimEngine.jl | 4 +- src/component_models/RefVector.jl | 3 +- src/composite_model/compilation.jl | 20 +- src/composite_model/output_targets.jl | 562 +++++++++++++++++ src/composite_model/registry_topology.jl | 1 + src/composite_model/runtime_outputs.jl | 216 ++++++- src/composite_model_api.jl | 1 + test/runtests.jl | 4 + test/test-model-api-stabilization.jl | 3 + test/test-model-output-targets-api.jl | 755 +++++++++++++++++++++++ 10 files changed, 1559 insertions(+), 10 deletions(-) create mode 100644 src/composite_model/output_targets.jl create mode 100644 test/test-model-output-targets-api.jl diff --git a/src/PlantSimEngine.jl b/src/PlantSimEngine.jl index 7e1ad4b2d..6b5ee3aec 100644 --- a/src/PlantSimEngine.jl +++ b/src/PlantSimEngine.jl @@ -317,7 +317,7 @@ export add_organ!, register_object!, remove_object!, reparent_object!, move_obje export mark_environment_binding_dirty! export objects_from_mtg, object_ids, model_object, model_objects, resolve_object_ids, resolve_objects export geometry, position, bounds -export RunContext, CallTarget, CallTargets, Simulation, BoundMany +export RunContext, CallTarget, CallTargets, Simulation, BoundMany, OutputTargets export runtime_model, current_step, final_state, outputs export SceneScope, Self, Subtree, SelfPlant, Ancestor, Scope, Relation export One, OptionalOne, Many @@ -326,7 +326,7 @@ export application_name, applies_to, value_inputs, model_calls, outputs_to export environment_config export ModelSpec, OutputTo, Updates export call_targets, call_model, run_call!, commit_environment! -export bound_input +export bound_input, output_targets, assign_outputs! export Status export Required, Default export @process, process diff --git a/src/component_models/RefVector.jl b/src/component_models/RefVector.jl index 8250a1f12..e4c569d0e 100644 --- a/src/component_models/RefVector.jl +++ b/src/component_models/RefVector.jl @@ -104,6 +104,7 @@ Base.size(rv::RefVector) = size(rv.v) Base.length(rv::RefVector) = length(rv.v) Base.eltype(::Type{RefVector{T}}) where {T} = T Base.parent(v::RefVector) = v.v +Base.dataids(v::RefVector) = Base.dataids(parent(v)) Base.resize!(v::RefVector, nl::Integer) = (resize!(parent(v), nl); v) Base.push!(v::RefVector, x...) = (push!(parent(v), x...); v) @@ -135,4 +136,4 @@ end function RefVector{T}() where {T} return RefVector{T}(Base.RefValue{T}[]) -end \ No newline at end of file +end diff --git a/src/composite_model/compilation.jl b/src/composite_model/compilation.jl index be6924600..0386a8c64 100644 --- a/src/composite_model/compilation.jl +++ b/src/composite_model/compilation.jl @@ -166,11 +166,12 @@ struct ResolvedModelOutputDestination{P} end """Compiled columnar references for one execution object and output group.""" -mutable struct CompiledModelOutputDestinationBinding{P,C} +mutable struct CompiledModelOutputDestinationBinding{P,C,I} const plan::P const execution_object_id::ObjectId destination_ids::Vector{ObjectId} columns::C + destination_index::I membership_generation::UInt64 end @@ -183,6 +184,8 @@ end return getfield(binding, :execution_object_id) name === :destination_ids && return getfield(binding, :destination_ids) name === :columns && return getfield(binding, :columns) + name === :destination_index && + return getfield(binding, :destination_index) name === :membership_generation && return getfield(binding, :membership_generation) plan = getfield(binding, :plan) @@ -203,6 +206,7 @@ Base.propertynames(binding::CompiledModelOutputDestinationBinding) = ( :execution_object_id, :destination_ids, :columns, + :destination_index, :membership_generation, propertynames(binding.plan)..., ) @@ -3741,6 +3745,19 @@ function _model_output_destination_columns( return NamedTuple{names}(Tuple(columns)) end +function _model_output_destination_index(destination_ids) + index = Dict{ObjectId,Int}() + sizehint!(index, length(destination_ids)) + for (position, object_id) in pairs(destination_ids) + haskey(index, object_id) && error( + "Compiled output destination membership contains duplicate object " * + "ID `$(object_id.value)`.", + ) + index[object_id] = position + end + return index +end + function _compile_model_output_destination_bindings( model::CompositeModel, resolved_destinations, @@ -3757,6 +3774,7 @@ function _compile_model_output_destination_bindings( resolved.execution_object_id, resolved.destination_ids, _model_output_destination_columns(model, resolved), + _model_output_destination_index(resolved.destination_ids), UInt64(model.revision), ) push!(bindings, binding) diff --git a/src/composite_model/output_targets.jl b/src/composite_model/output_targets.jl new file mode 100644 index 000000000..1fd8e6f56 --- /dev/null +++ b/src/composite_model/output_targets.jl @@ -0,0 +1,562 @@ +"""Mutable row-mapping cache owned by one simulation execution target.""" +mutable struct OutputAssignmentCache + id_column::Any + permutation::Vector{Int} + seen::Vector{UInt64} + epoch::UInt64 + membership_generation::UInt64 + exact_order::Bool + valid::Bool +end + +""" + OutputTargets + +Identity-aware, columnar destination view for one named `OutputTo` group. +Obtain it inside a model kernel with [`output_targets`](@ref), inspect its +stable identities with [`object_ids`](@ref), and assign identified result +tables with [`assign_outputs!`](@ref). + +Destination carriers are exposed explicitly as +`targets.columns.`. + +The view is valid for the current model invocation and lifecycle generation. +Do not retain it across a lifecycle barrier. +""" +struct OutputTargets{B,C} + binding::B + assignment_cache::C +end + +function OutputTargets(binding::CompiledModelOutputDestinationBinding) + count = length(binding.destination_ids) + return OutputTargets( + binding, + OutputAssignmentCache( + nothing, + Vector{Int}(undef, count), + fill(UInt64(0), count), + UInt64(0), + binding.membership_generation, + false, + false, + ), + ) +end + +@inline function Base.getproperty(targets::OutputTargets, name::Symbol) + name === :columns || return getfield(targets, name) + binding = getfield(targets, :binding) + return getfield(binding, :columns) +end + +Base.propertynames(::OutputTargets, private::Bool=false) = + private ? (:columns, :binding, :assignment_cache) : (:columns,) + +object_ids(targets::OutputTargets) = + BoundManyObjectIds(getfield(getfield(targets, :binding), :destination_ids)) +Base.length(targets::OutputTargets) = + length(getfield(getfield(targets, :binding), :destination_ids)) +Base.isempty(targets::OutputTargets) = iszero(length(targets)) +Base.eachindex(targets::OutputTargets) = eachindex(object_ids(targets)) + +function _reset_output_assignment_cache!(targets::OutputTargets) + binding = getfield(targets, :binding) + cache = getfield(targets, :assignment_cache) + generation = binding.membership_generation + cache.membership_generation == generation && + length(cache.permutation) == length(binding.destination_ids) && + return cache + count = length(binding.destination_ids) + resize!(cache.permutation, count) + resize!(cache.seen, count) + fill!(cache.seen, UInt64(0)) + cache.id_column = nothing + cache.epoch = UInt64(0) + cache.membership_generation = generation + cache.exact_order = false + cache.valid = false + return cache +end + +function _output_target_context(targets::OutputTargets) + binding = getfield(targets, :binding) + return "application `$(binding.application_id)`, output group `$(binding.group)`" +end + +function _output_table_columns( + destination_columns::NamedTuple{names}, + table_columns, +) where {names} + return NamedTuple{names}( + map(name -> Tables.getcolumn(table_columns, name), names), + ) +end + +@inline _first_missing_output_column(::Tuple{}, available) = nothing + +@inline function _first_missing_output_column(names::Tuple, available) + name = first(names) + name in available || return name + return _first_missing_output_column(Base.tail(names), available) +end + +@inline function _validate_declared_output_columns( + targets::OutputTargets, + available, +) + missing = _first_missing_output_column( + propertynames(targets.columns), + available, + ) + isnothing(missing) || throw( + ArgumentError( + "Identified output table for $(_output_target_context(targets)) " * + "is missing declared output column `$(missing)`.", + ), + ) + return nothing +end + +function _validate_output_table_columns( + targets::OutputTargets, + table_columns, + id::Symbol, +) + available = Tables.columnnames(table_columns) + id in available || throw( + ArgumentError( + "Identified output table for $(_output_target_context(targets)) " * + "is missing ID column `$(id)`. Available columns: `$(Tuple(available))`.", + ), + ) + _validate_declared_output_columns(targets, available) + return nothing +end + +function _validate_output_column_lengths( + targets::OutputTargets, + ids, + columns::NamedTuple, +) + row_count = length(ids) + for (name, column) in pairs(columns) + length(column) == row_count || throw( + DimensionMismatch( + "Output column `$(name)` for $(_output_target_context(targets)) " * + "has $(length(column)) rows, but the ID column has $(row_count).", + ), + ) + end + return row_count +end + +function _output_coverage_error( + targets::OutputTargets, + ids, +) + binding = getfield(targets, :binding) + target_ids = binding.destination_ids + row_ids = ObjectId[ObjectId(id) for id in ids] + counts = Dict{ObjectId,Int}() + sizehint!(counts, length(row_ids)) + for object_id in row_ids + counts[object_id] = get(counts, object_id, 0) + 1 + end + duplicate_ids = ObjectId[ + object_id for (object_id, count) in counts + if count > 1 + ] + unknown_ids = ObjectId[ + object_id for object_id in keys(counts) + if !haskey(binding.destination_index, object_id) + ] + missing_ids = ObjectId[ + object_id for object_id in target_ids + if !haskey(counts, object_id) + ] + _sort_object_ids!(duplicate_ids) + _sort_object_ids!(unknown_ids) + _sort_object_ids!(missing_ids) + + details = String[] + if length(row_ids) > length(target_ids) + extra_ids = isempty(unknown_ids) ? duplicate_ids : unknown_ids + push!( + details, + "extra result ID(s) `$([id.value for id in extra_ids])`", + ) + elseif !isempty(unknown_ids) + push!( + details, + "unknown result ID(s) `$([id.value for id in unknown_ids])`", + ) + end + isempty(duplicate_ids) || push!( + details, + "duplicate result ID(s) `$([id.value for id in duplicate_ids])`", + ) + isempty(missing_ids) || push!( + details, + "missing destination ID(s) `$([id.value for id in missing_ids])`", + ) + isempty(details) && push!( + details, + "$(length(row_ids)) result rows for $(length(target_ids)) destinations", + ) + throw( + ArgumentError( + "Exact output coverage failed for $(_output_target_context(targets)): " * + join(details, "; ") * ".", + ), + ) +end + +function _compile_output_assignment_permutation!( + targets::OutputTargets, + ids, +) + binding = getfield(targets, :binding) + cache = _reset_output_assignment_cache!(targets) + length(ids) == length(binding.destination_ids) || + _output_coverage_error(targets, ids) + + epoch = cache.epoch + UInt64(1) + if iszero(epoch) + fill!(cache.seen, UInt64(0)) + epoch = UInt64(1) + end + # Mapping compilation mutates the reusable buffers. Invalidate the old + # mapping before the first mutation and advance the epoch immediately so a + # failed validation cannot expose a partially overwritten permutation or + # make the following retry observe stale `seen` marks. + cache.id_column = nothing + cache.epoch = epoch + cache.exact_order = false + cache.valid = false + exact_order = true + @inbounds for (row, raw_id) in enumerate(ids) + object_id = ObjectId(raw_id) + destination = get(binding.destination_index, object_id, 0) + iszero(destination) && _output_coverage_error(targets, ids) + cache.seen[destination] == epoch && + _output_coverage_error(targets, ids) + cache.seen[destination] = epoch + cache.permutation[row] = destination + exact_order &= destination == row + end + cache.id_column = ids + cache.membership_generation = binding.membership_generation + cache.exact_order = exact_order + cache.valid = true + return cache +end + +function _output_assignment_cache!(targets::OutputTargets, ids) + cache = _reset_output_assignment_cache!(targets) + if cache.valid && cache.id_column === ids + length(ids) == length(cache.permutation) || + _output_coverage_error(targets, ids) + return cache + end + return _compile_output_assignment_permutation!(targets, ids) +end + +@inline function _validate_output_column_values!( + destination::RefVector{T}, + source, + permutation, +) where {T} + eltype(source) <: T && return nothing + @inbounds for (row, source_index) in enumerate(eachindex(source)) + convert(T, source[source_index]) + end + return nothing +end + +@inline function _validate_output_column_values!( + destination::ObjectRefVector, + source, + permutation, +) + references = parent(destination) + @inbounds for (row, source_index) in enumerate(eachindex(source)) + reference = references[permutation[row]] + _validate_output_reference_value(reference, source[source_index]) + end + return nothing +end + +@inline _validate_output_reference_value(::Base.RefValue{T}, ::T) where {T} = + nothing + +@inline function _validate_output_reference_value( + reference::Base.RefValue{T}, + value, +) where {T} + convert(T, value) + return nothing +end + +@inline function _validate_output_column_values!( + destination, + source, + permutation, +) + @inbounds for (row, source_index) in enumerate(eachindex(source)) + convert(eltype(destination), source[source_index]) + end + return nothing +end + +@inline _validate_output_columns!(::Tuple{}, ::Tuple{}, permutation) = nothing + +@inline function _validate_output_columns!( + destinations::Tuple, + sources::Tuple, + permutation, +) + _validate_output_column_values!( + first(destinations), + first(sources), + permutation, + ) + _validate_output_columns!( + Base.tail(destinations), + Base.tail(sources), + permutation, + ) + return nothing +end + +_output_columns_same_mapping(destination, source) = destination === source +_output_columns_same_mapping(destination::RefVector, source::RefVector) = + parent(destination) === parent(source) +_output_columns_same_mapping( + destination::ObjectRefVector, + source::ObjectRefVector, +) = + parent(destination) === parent(source) +_output_columns_same_mapping( + destination::RefVector, + source::ObjectRefVector, +) = + parent(destination) === parent(source) +_output_columns_same_mapping( + destination::ObjectRefVector, + source::RefVector, +) = + parent(destination) === parent(source) + +_output_columns_might_alias(destination, source) = destination === source +_output_columns_might_alias( + destination::AbstractArray, + source::AbstractArray, +) = Base.mightalias(destination, source) +_output_columns_might_alias(destination::RefVector, source::RefVector) = + parent(destination) === parent(source) || + Base.mightalias(destination, source) +_output_columns_might_alias( + destination::ObjectRefVector, + source::ObjectRefVector, +) = + parent(destination) === parent(source) || + Base.mightalias(destination, source) +_output_columns_might_alias( + destination::RefVector, + source::ObjectRefVector, +) = + parent(destination) === parent(source) || + Base.mightalias(destination, source) +_output_columns_might_alias( + destination::ObjectRefVector, + source::RefVector, +) = + parent(destination) === parent(source) || + Base.mightalias(destination, source) + +@inline _validate_output_source_aliasing( + ::Tuple{}, + source, + targets, + exact_order::Bool, + ::Val{destination_index}, + ::Val{source_index}, +) where {destination_index,source_index} = nothing + +@inline function _validate_output_source_aliasing( + destinations::Tuple, + source, + targets, + exact_order::Bool, + ::Val{destination_index}, + ::Val{source_index}, +) where {destination_index,source_index} + destination = first(destinations) + aliases = _output_columns_might_alias(destination, source) + safe_alias = exact_order && destination_index == source_index && + _output_columns_same_mapping(destination, source) + aliases && !safe_alias && throw( + ArgumentError( + "Assignment for $(_output_target_context(targets)) cannot use " * + "a differently ordered or partially overlapping output " * + "destination column as its result source.", + ), + ) + return _validate_output_source_aliasing( + Base.tail(destinations), + source, + targets, + exact_order, + Val(destination_index + 1), + Val(source_index), + ) +end + +@inline _validate_output_aliasing_columns( + all_destinations::Tuple, + ::Tuple{}, + targets, + exact_order::Bool, + ::Val{source_index}, +) where {source_index} = nothing + +@inline function _validate_output_aliasing_columns( + all_destinations::Tuple, + sources::Tuple, + targets, + exact_order::Bool, + ::Val{source_index}, +) where {source_index} + _validate_output_source_aliasing( + all_destinations, + first(sources), + targets, + exact_order, + Val(1), + Val(source_index), + ) + return _validate_output_aliasing_columns( + all_destinations, + Base.tail(sources), + targets, + exact_order, + Val(source_index + 1), + ) +end + +function _validate_output_aliasing( + targets::OutputTargets, + sources::NamedTuple, + cache::OutputAssignmentCache, +) + destinations = values(targets.columns) + return _validate_output_aliasing_columns( + destinations, + values(sources), + targets, + cache.exact_order, + Val(1), + ) +end + +@inline _assign_exact_output_columns!(::Tuple{}, ::Tuple{}) = nothing + +@inline function _assign_exact_output_columns!( + destinations::Tuple, + sources::Tuple, +) + destination = first(destinations) + source = first(sources) + @inbounds for (row, source_index) in enumerate(eachindex(source)) + destination[row] = source[source_index] + end + _assign_exact_output_columns!( + Base.tail(destinations), + Base.tail(sources), + ) + return nothing +end + +@inline _assign_permuted_output_columns!(::Tuple{}, ::Tuple{}, permutation) = + nothing + +@inline function _assign_permuted_output_columns!( + destinations::Tuple, + sources::Tuple, + permutation, +) + destination = first(destinations) + source = first(sources) + @inbounds for (row, source_index) in enumerate(eachindex(source)) + destination[permutation[row]] = source[source_index] + end + _assign_permuted_output_columns!( + Base.tail(destinations), + Base.tail(sources), + permutation, + ) + return nothing +end + +""" + assign_outputs!(targets::OutputTargets, table; id=:object_id) + +Assign every declared output column from an identified Tables.jl-compatible +table. Destination coverage is exact: unknown, duplicate, extra, and missing +IDs are rejected before any status is changed. Additional table metadata +columns are ignored, while every output declared by the target group is +required. + +Result columns must not alias output destination storage, except for a direct +self-assignment in exact destination order. Custom array types that wrap shared +storage must implement Julia's `Base.dataids`/`Base.mightalias` contract so +aliasing can be rejected before any status is changed. + +The row permutation is cached by identity of the ID column. Reusing that +column promises that its IDs and order remain unchanged; replace the ID column +object when either changes. +""" +function assign_outputs!( + targets::OutputTargets, + table; + id::Symbol=:object_id, +) + table_columns = Tables.columns(table) + _validate_output_table_columns(targets, table_columns, id) + ids = Tables.getcolumn(table_columns, id) + columns = _output_table_columns(targets.columns, table_columns) + return assign_outputs!(targets, ids, columns) +end + +""" + assign_outputs!(targets::OutputTargets, ids, columns::NamedTuple) + +Lower-level identified-column assignment. `columns` must contain every output +declared by `targets`; its extra fields are ignored. This overload avoids a +Tables.jl adapter on the stable columnar path. +""" +function assign_outputs!( + targets::OutputTargets, + ids::AbstractVector, + columns::NamedTuple, +) + _validate_declared_output_columns(targets, propertynames(columns)) + declared_columns = _output_table_columns(targets.columns, columns) + _validate_output_column_lengths(targets, ids, declared_columns) + cache = _output_assignment_cache!(targets, ids) + destinations = values(targets.columns) + sources = values(declared_columns) + _validate_output_columns!(destinations, sources, cache.permutation) + _validate_output_aliasing(targets, declared_columns, cache) + if cache.exact_order + _assign_exact_output_columns!(destinations, sources) + else + _assign_permuted_output_columns!( + destinations, + sources, + cache.permutation, + ) + end + return targets +end diff --git a/src/composite_model/registry_topology.jl b/src/composite_model/registry_topology.jl index 5e97377ea..46c691109 100644 --- a/src/composite_model/registry_topology.jl +++ b/src/composite_model/registry_topology.jl @@ -10,6 +10,7 @@ Base.length(v::ObjectRefVector) = length(v.refs) Base.getindex(v::ObjectRefVector, i::Int) = v.refs[i][] Base.setindex!(v::ObjectRefVector, value, i::Int) = (v.refs[i][] = value) Base.parent(v::ObjectRefVector) = v.refs +Base.dataids(v::ObjectRefVector) = Base.dataids(parent(v)) """ ObjectId(value) diff --git a/src/composite_model/runtime_outputs.jl b/src/composite_model/runtime_outputs.jl index ecdd51c74..e2c67c50f 100644 --- a/src/composite_model/runtime_outputs.jl +++ b/src/composite_model/runtime_outputs.jl @@ -220,16 +220,18 @@ const _NO_ENVIRONMENT_OVERRIDE = NoEnvironmentOverride() RunContext Runtime context passed as the final argument to model kernels. Use -[`runtime_model`](@ref), [`bound_input`](@ref), [`call_targets`](@ref), and -[`run_call!`](@ref) instead of inspecting its fields. +[`runtime_model`](@ref), [`bound_input`](@ref), [`output_targets`](@ref), +[`call_targets`](@ref), and [`run_call!`](@ref) instead of inspecting its +fields. """ -mutable struct RunContext{CS,A,CT,BI,TS,OR,C,E} +mutable struct RunContext{CS,A,CT,BI,OT,TS,OR,C,E} compiled::CS environment_bindings::CompiledEnvironmentBindings application::A object_id::ObjectId calls::CT bound_inputs::BI + output_targets::OT temporal_streams::TS output_retention::OR time::Float64 @@ -259,6 +261,7 @@ function RunContext( object_id, calls, NamedTuple(), + _runtime_model_output_targets(compiled, application, object_id), temporal_streams, output_retention, time, @@ -290,6 +293,40 @@ function RunContext( object_id, calls, bound_inputs, + _runtime_model_output_targets(compiled, application, object_id), + temporal_streams, + output_retention, + time, + constants, + publication_allowed, + environment, + nothing, + ) +end + +function RunContext( + compiled, + environment_bindings, + application, + object_id, + calls, + bound_inputs, + output_targets, + temporal_streams, + output_retention, + time, + constants, + publication_allowed, + environment, +) + return RunContext( + compiled, + environment_bindings, + application, + object_id, + calls, + bound_inputs, + output_targets, temporal_streams, output_retention, time, @@ -349,7 +386,55 @@ function bound_input(context, input) ) end -struct CallTarget{CS,EB,A,M,S,VS,TI,OB,CT,BI,ENV,TS,OR,C,E} +""" + output_targets(context::RunContext, group) + +Return the compiled [`OutputTargets`](@ref) view for the named `outputs_to` +group on the application currently executing. The lookup is a typed field +access; selectors and destination indexes were resolved before the kernel. +""" +@inline Base.@constprop :aggressive function output_targets( + context::RunContext, + group::Symbol, +) + return output_targets(context, Val(group)) +end + +@inline function output_targets( + context::RunContext, + ::Val{group}, +) where {group} + hasproperty(context.output_targets, group) || throw( + ArgumentError( + "Application `$(context.application.id)` on object " * + "`$(context.object_id.value)` has no declared distributed output " * + "group `$(group)`. Available groups: " * + "`$(propertynames(context.output_targets))`.", + ), + ) + return getproperty(context.output_targets, group) +end + +function output_targets(context::RunContext, group) + throw( + ArgumentError( + "`output_targets` expects a declared output group name as a Symbol; " * + "got `$(repr(group))` of type `$(typeof(group))` for application " * + "`$(context.application.id)`.", + ), + ) +end + +function output_targets(context, group) + throw( + ArgumentError( + "`output_targets` requires the compiled RunContext passed to a " * + "model kernel; got `$(typeof(context))` for group `$(group)`.", + ), + ) +end + +struct CallTarget{CS,EB,A,M,S,VS,TI,OB,CT,BI,OT,ENV,TS,OR,C,E} compiled::CS environment_bindings::EB application::A @@ -361,6 +446,7 @@ struct CallTarget{CS,EB,A,M,S,VS,TI,OB,CT,BI,ENV,TS,OR,C,E} output_bindings::OB calls::CT bound_inputs::BI + output_targets::OT environment_binding::ENV temporal_streams::TS output_retention::OR @@ -527,13 +613,14 @@ struct CachedGlobalModelEnvironment{B} binding::B end -mutable struct CompiledExecutionTarget{M,S,CS,IB,BI,OB,CB,EB,RC} +mutable struct CompiledExecutionTarget{M,S,CS,IB,BI,OT,OB,CB,EB,RC} object_id::ObjectId model::M status::S canonical_status::CS input_bindings::IB bound_inputs::BI + output_targets::OT output_bindings::OB call_bindings::CB call_bindings_signature::UInt @@ -1890,6 +1977,7 @@ end application, object_id, bound_inputs, + output_targets, temporal_streams, output_retention, time, @@ -1906,6 +1994,7 @@ end context.application = application context.object_id = object_id context.bound_inputs = bound_inputs + context.output_targets = output_targets context.temporal_streams = temporal_streams context.output_retention = output_retention context.constants = constants @@ -1937,6 +2026,7 @@ end application, object_id, bound_inputs, + output_targets, temporal_streams, output_retention, time, @@ -1949,6 +2039,7 @@ end application, object_id, bound_inputs, + output_targets, temporal_streams, output_retention, time, @@ -1965,6 +2056,7 @@ end application, object_id, bound_inputs, + output_targets, temporal_streams, output_retention, time, @@ -1995,6 +2087,7 @@ end object_id, calls, bound_inputs, + output_targets, temporal_streams, output_retention, float(time), @@ -2011,6 +2104,7 @@ end application, object_id, bound_inputs, + output_targets, temporal_streams, output_retention, time, @@ -2023,6 +2117,7 @@ end application, object_id, bound_inputs, + output_targets, temporal_streams, output_retention, time, @@ -2069,6 +2164,7 @@ end application, target.object_id, target.bound_inputs, + target.output_targets, temporal_streams, output_retention, time, @@ -2082,6 +2178,7 @@ end target.object_id, (), target.bound_inputs, + target.output_targets, temporal_streams, output_retention, float(time), @@ -2146,6 +2243,7 @@ end application, target.object_id, target.bound_inputs, + target.output_targets, temporal_streams, output_retention, time, @@ -2268,6 +2366,7 @@ end batch.application, target.object_id, target.bound_inputs, + target.output_targets, temporal_streams, output_retention, time, @@ -2281,6 +2380,7 @@ end batch.application, target.object_id, target.bound_inputs, + target.output_targets, temporal_streams, output_retention, time, @@ -2384,6 +2484,7 @@ function _run_model_execution_batch_profiled!( batch.application, target.object_id, target.bound_inputs, + target.output_targets, temporal_streams, output_retention, time, @@ -2698,18 +2799,51 @@ function _runtime_model_distributed_output_streams( ) end +_runtime_model_output_targets( + compiled, + application, + object_id, + ::NoCompiledDistributedOutputs, +) = NamedTuple() + +function _runtime_model_output_targets( + compiled, + application, + object_id, + distributed_outputs::CompiledDistributedOutputs, +) + groups = get( + distributed_outputs.by_execution_target, + (application.id, object_id), + nothing, + ) + isnothing(groups) && return NamedTuple() + names = propertynames(groups) + targets = map(OutputTargets, values(groups)) + return NamedTuple{names}(targets) +end + +_runtime_model_output_targets(compiled, application, object_id) = + _runtime_model_output_targets( + compiled, + application, + object_id, + compiled.distributed_outputs, + ) + function _compiled_model_execution_context( compiled, env_bindings, application, object_id, bound_inputs, + output_targets, call_bindings, temporal_streams, output_retention, constants, ) - isnothing(temporal_streams) && return nothing + isnothing(temporal_streams) && isempty(output_targets) && return nothing calls = _runtime_call_targets( compiled, env_bindings, @@ -2728,6 +2862,7 @@ function _compiled_model_execution_context( object_id, calls, bound_inputs, + output_targets, temporal_streams, output_retention, 0.0, @@ -2753,6 +2888,11 @@ function _compiled_model_execution_target( ) model = _application_model(application, object_id) bound_inputs = status_view.bound_inputs + distributed_targets = _runtime_model_output_targets( + compiled, + application, + object_id, + ) call_bindings = get( compiled.call_bindings_by_target, (application.id, object_id), @@ -2769,6 +2909,7 @@ function _compiled_model_execution_target( application, object_id, bound_inputs, + distributed_targets, call_bindings, temporal_streams, output_retention, @@ -2803,6 +2944,7 @@ function _compiled_model_execution_target( temporal_streams, ), bound_inputs, + distributed_targets, output_bindings, call_bindings, _call_bindings_signature(call_bindings), @@ -3050,6 +3192,52 @@ function _model_execution_outputs_match( return true end +function _model_execution_output_targets_match( + targets, + compiled, + application, + object_id, + ::NoCompiledDistributedOutputs, +) + return isempty(targets) +end + +function _model_execution_output_targets_match( + targets, + compiled, + application, + object_id, + distributed_outputs::CompiledDistributedOutputs, +) + bindings = get( + distributed_outputs.by_execution_target, + (application.id, object_id), + nothing, + ) + isnothing(bindings) && return isempty(targets) + propertynames(targets) == propertynames(bindings) || return false + for name in propertynames(bindings) + getfield(getproperty(targets, name), :binding) === + getproperty(bindings, name) || return false + end + return true +end + +function _model_execution_output_targets_match( + targets, + compiled, + application, + object_id, +) + return _model_execution_output_targets_match( + targets, + compiled, + application, + object_id, + compiled.distributed_outputs, + ) +end + function _model_execution_target_change_reason( target::CompiledExecutionTarget, compiled::CompiledCompositeModel, @@ -3068,6 +3256,12 @@ function _model_execution_target_change_reason( return :canonical_status target.bound_inputs === status_view.bound_inputs || return :bound_inputs + _model_execution_output_targets_match( + target.output_targets, + compiled, + application, + object_id, + ) || return :output_targets _model_execution_inputs_match( target.input_bindings, status_view.temporal_inputs, @@ -3118,6 +3312,8 @@ function _count_model_execution_target_rebuild!( :execution_target_rebuild_temporal_inputs elseif reason === :bound_inputs :execution_target_rebuild_bound_inputs + elseif reason === :output_targets + :execution_target_rebuild_output_targets elseif reason === :output_bindings :execution_target_rebuild_output_bindings elseif reason === :call_bindings @@ -3961,6 +4157,7 @@ function _materialize_call( target.output_bindings, calls, target.bound_inputs, + target.output_targets, target.environment_binding, targets.temporal_streams, targets.output_retention, @@ -4458,6 +4655,11 @@ function _targeted_new_object_call_targets( ), (), status_view.bound_inputs, + _runtime_model_output_targets( + compiled, + application, + object_id, + ), _environment_binding_for( environment_bindings, application.id, @@ -4673,6 +4875,7 @@ end target.object_id, target.calls, target.bound_inputs, + target.output_targets, target.temporal_streams, target.output_retention, target.time, @@ -4745,6 +4948,7 @@ end application, target.object_id, target.bound_inputs, + target.output_targets, targets.temporal_streams, targets.output_retention, targets.time, diff --git a/src/composite_model_api.jl b/src/composite_model_api.jl index d8c741232..c98f6c598 100644 --- a/src/composite_model_api.jl +++ b/src/composite_model_api.jl @@ -5,6 +5,7 @@ include("composite_model/registry_topology.jl") include("composite_model/selectors.jl") include("composite_model/compilation.jl") include("composite_model/bound_many.jl") +include("composite_model/output_targets.jl") include("composite_model/environment_bindings.jl") include("composite_model/runtime_outputs.jl") include("composite_model/scenario_dsl.jl") diff --git a/test/runtests.jl b/test/runtests.jl index 2ca382bee..841e00a71 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -90,6 +90,10 @@ else include("test-model-distributed-output-runtime.jl") end + @testset "Distributed output assignment API" begin + include("test-model-output-targets-api.jl") + end + @testset "Composite model multirate integration" begin include("test-model-multirate-integration.jl") end diff --git a/test/test-model-api-stabilization.jl b/test/test-model-api-stabilization.jl index 4f19212f7..c18e615ef 100644 --- a/test/test-model-api-stabilization.jl +++ b/test/test-model-api-stabilization.jl @@ -215,6 +215,7 @@ end :OutputTo, :OutputRequest, :Override, + :OutputTargets, :PlantSimEngine, :PreviousTimeStep, :Relation, @@ -232,6 +233,7 @@ end :Weather, :add_organ!, :application_name, + :assign_outputs!, :applies_to, :bounds, :bound_input, @@ -262,6 +264,7 @@ end :output_policy, :output_routing, :outputs_to, + :output_targets, :outputs, :position, :process, diff --git a/test/test-model-output-targets-api.jl b/test/test-model-output-targets-api.jl new file mode 100644 index 000000000..e10970042 --- /dev/null +++ b/test/test-model-output-targets-api.jl @@ -0,0 +1,755 @@ +using Dates +using PlantSimEngine +using Tables +using Test + +PlantSimEngine.@process "output_targets_api_writer" verbose = false +PlantSimEngine.@process "output_targets_api_action" verbose = false + +mutable struct OutputTargetsApiWriterModel <: + AbstractOutput_Targets_Api_WriterModel + table::Base.RefValue{Any} + seen_types::Vector{DataType} + seen_ids::Vector{Vector{ObjectId}} + seen_lengths::Vector{Int} + seen_columns::Vector{Tuple} +end + +function OutputTargetsApiWriterModel(table) + return OutputTargetsApiWriterModel( + Ref{Any}(table), + DataType[], + Vector{ObjectId}[], + Int[], + Tuple[], + ) +end + +PlantSimEngine.inputs_(::OutputTargetsApiWriterModel) = NamedTuple() +PlantSimEngine.outputs_(::OutputTargetsApiWriterModel) = NamedTuple() + +struct OutputTargetsApiActionModel{F} <: AbstractOutput_Targets_Api_ActionModel + action::F +end + +PlantSimEngine.inputs_(::OutputTargetsApiActionModel) = NamedTuple() +PlantSimEngine.outputs_(::OutputTargetsApiActionModel) = NamedTuple() + +function PlantSimEngine.run!( + model::OutputTargetsApiWriterModel, + status, + environment, + constants, + context, +) + targets = output_targets(context, :organs) + push!(model.seen_types, typeof(targets)) + push!(model.seen_ids, collect(object_ids(targets))) + push!(model.seen_lengths, length(targets)) + push!(model.seen_columns, propertynames(targets.columns)) + assign_outputs!(targets, model.table[]; id=:object_id) + return nothing +end + +function PlantSimEngine.run!( + model::OutputTargetsApiActionModel, + status, + environment, + constants, + context, +) + model.action(context) + return nothing +end + +mutable struct OutputTargetsApiCountingIds <: AbstractVector{ObjectId} + values::Vector{ObjectId} + reads::Base.RefValue{Int} +end + +Base.IndexStyle(::Type{OutputTargetsApiCountingIds}) = IndexLinear() +Base.size(ids::OutputTargetsApiCountingIds) = size(ids.values) +Base.axes(ids::OutputTargetsApiCountingIds) = axes(ids.values) + +@inline function Base.getindex(ids::OutputTargetsApiCountingIds, index::Int) + ids.reads[] += 1 + return ids.values[index] +end + +function output_targets_api_scene( + writer; + leaf_ids=(:leaf_a, :leaf_b), + vars=(incident_par=Default(0.0),), +) + objects = Object[Object(:scene; scale=:Scene)] + for leaf_id in leaf_ids + push!( + objects, + Object(leaf_id; scale=:Leaf, parent=:scene), + ) + end + return CompositeModel( + objects...; + applications=( + ModelSpec( + writer; + name=:output_targets_api_writer, + on=One(scale=:Scene), + outputs_to=( + organs=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=vars, + ), + ), + ), + ), + environment=(duration=Hour(1),), + ) +end + +function output_targets_api_status(model, object_id) + return model_object(model, object_id).status +end + +function output_targets_api_failed_assignment( + table; + vars=(incident_par=Default(0.0),), +) + writer = OutputTargetsApiWriterModel(table) + model = output_targets_api_scene(writer; vars=vars) + error = try + run!(model; outputs=:none) + nothing + catch caught + caught + end + return error, model +end + +function output_targets_api_error_message(error) + return lowercase(sprint(showerror, error)) +end + +function output_targets_api_capture(action) + return try + action() + nothing + catch caught + caught + end +end + +@testset "public OutputTargets view and Tables column assignment" begin + table = ( + object_id=ObjectId[ObjectId(:leaf_b), ObjectId(:leaf_a)], + source_topology_id=[:coffee_b, :coffee_a], + incident_par=[20.0, 10.0], + absorbed_par=Float32[2.0, 1.0], + component_index=[22, 11], + ) + @test Tables.istable(typeof(table)) + + writer = OutputTargetsApiWriterModel(table) + model = output_targets_api_scene( + writer; + vars=( + incident_par=Default(0.0), + absorbed_par=Default(0.0), + ), + ) + simulation = run!(model; outputs=:none) + + @test isdefined(PlantSimEngine, :OutputTargets) + @test isdefined(PlantSimEngine, :output_targets) + @test isdefined(PlantSimEngine, :assign_outputs!) + @test only(writer.seen_types) <: OutputTargets + @test only(writer.seen_ids) == + ObjectId[ObjectId(:leaf_a), ObjectId(:leaf_b)] + @test only(writer.seen_lengths) == 2 + @test only(writer.seen_columns) == (:incident_par, :absorbed_par) + + leaf_a = final_state(simulation, :leaf_a) + leaf_b = final_state(simulation, :leaf_b) + @test leaf_a.incident_par == 10.0 + @test leaf_a.absorbed_par == 1.0 + @test leaf_b.incident_par == 20.0 + @test leaf_b.absorbed_par == 2.0 +end + +@testset "public direct ID and NamedTuple assignment overload" begin + ids = ObjectId[ObjectId(:leaf_b), ObjectId(:leaf_a)] + columns = ( + incident_par=[42.0, 21.0], + absorbed_par=Float32[4.0, 2.0], + source_element=[:element_b, :element_a], + ) + writer = OutputTargetsApiActionModel() do context + targets = output_targets(context, :organs) + assigned = assign_outputs!(targets, ids, columns) + @test assigned === targets + end + model = output_targets_api_scene( + writer; + vars=( + incident_par=Default(0.0), + absorbed_par=Default(0.0), + ), + ) + simulation = run!(model; outputs=:none) + + @test final_state(simulation, :leaf_a).incident_par == 21.0 + @test final_state(simulation, :leaf_a).absorbed_par == 2.0 + @test final_state(simulation, :leaf_b).incident_par == 42.0 + @test final_state(simulation, :leaf_b).absorbed_par == 4.0 +end + +@testset "output_targets lookup validation" begin + lookup_errors = Any[] + writer = OutputTargetsApiActionModel() do context + push!( + lookup_errors, + output_targets_api_capture( + () -> output_targets(context, :missing_group), + ), + ) + push!( + lookup_errors, + output_targets_api_capture( + () -> output_targets(context, "organs"), + ), + ) + assign_outputs!( + output_targets(context, :organs), + ObjectId[ObjectId(:leaf_a), ObjectId(:leaf_b)], + (incident_par=[1.0, 2.0],), + ) + end + model = output_targets_api_scene(writer) + run!(model; outputs=:none) + + @test length(lookup_errors) == 2 + @test all(error -> error isa ArgumentError, lookup_errors) + missing_message = output_targets_api_error_message(lookup_errors[1]) + @test occursin("missing_group", missing_message) + @test occursin("available groups", missing_message) + @test occursin("organs", missing_message) + invalid_message = output_targets_api_error_message(lookup_errors[2]) + @test occursin("symbol", invalid_message) + @test occursin("string", invalid_message) + + invalid_context_error = output_targets_api_capture( + () -> output_targets(nothing, :organs), + ) + @test invalid_context_error isa ArgumentError + invalid_context_message = output_targets_api_error_message( + invalid_context_error, + ) + @test occursin("runcontext", invalid_context_message) + @test occursin("nothing", invalid_context_message) +end + +@testset "aliased source-destination mappings are rejected" begin + view_alias_error = Ref{Any}(nothing) + cross_carrier_view_alias_error = Ref{Any}(nothing) + cross_carrier_alias_error = Ref{Any}(nothing) + permuted_alias_error = Ref{Any}(nothing) + values_after_view_alias = Ref(Float64[]) + values_after_cross_carrier_view_alias = Ref(Float64[]) + values_after_cross_carrier_alias = Ref(Float64[]) + writer = OutputTargetsApiActionModel() do context + targets = output_targets(context, :organs) + targets.columns.incident_par[1] = 10.0 + targets.columns.incident_par[2] = 20.0 + exact_ids = collect(object_ids(targets)) + @test assign_outputs!( + targets, + exact_ids, + (incident_par=targets.columns.incident_par,), + ) === targets + reversed_view = @view targets.columns.incident_par[2:-1:1] + view_alias_error[] = output_targets_api_capture() do + assign_outputs!( + targets, + exact_ids, + (incident_par=reversed_view,), + ) + end + values_after_view_alias[] = collect(targets.columns.incident_par) + object_source = PlantSimEngine.ObjectRefVector( + parent(targets.columns.incident_par), + ) + object_reversed_view = @view object_source[2:-1:1] + @test Base.mightalias( + targets.columns.incident_par, + object_reversed_view, + ) + cross_carrier_view_alias_error[] = output_targets_api_capture() do + assign_outputs!( + targets, + exact_ids, + (incident_par=object_reversed_view,), + ) + end + values_after_cross_carrier_view_alias[] = collect( + targets.columns.incident_par, + ) + cross_carrier_alias_error[] = output_targets_api_capture() do + assign_outputs!( + targets, + reverse(exact_ids), + (incident_par=object_source,), + ) + end + values_after_cross_carrier_alias[] = collect( + targets.columns.incident_par, + ) + permuted_alias_error[] = output_targets_api_capture() do + assign_outputs!( + targets, + reverse(exact_ids), + (incident_par=targets.columns.incident_par,), + ) + end + end + model = output_targets_api_scene(writer) + simulation = run!(model; outputs=:none) + + @test view_alias_error[] isa ArgumentError + view_message = output_targets_api_error_message(view_alias_error[]) + @test occursin("differently ordered", view_message) + @test occursin("source", view_message) + @test values_after_view_alias[] == [10.0, 20.0] + @test cross_carrier_view_alias_error[] isa ArgumentError + cross_carrier_view_message = output_targets_api_error_message( + cross_carrier_view_alias_error[], + ) + @test occursin("differently ordered", cross_carrier_view_message) + @test occursin("source", cross_carrier_view_message) + @test values_after_cross_carrier_view_alias[] == [10.0, 20.0] + @test cross_carrier_alias_error[] isa ArgumentError + cross_carrier_message = output_targets_api_error_message( + cross_carrier_alias_error[], + ) + @test occursin("differently ordered", cross_carrier_message) + @test occursin("source", cross_carrier_message) + @test values_after_cross_carrier_alias[] == [10.0, 20.0] + @test permuted_alias_error[] isa ArgumentError + permuted_message = output_targets_api_error_message( + permuted_alias_error[], + ) + @test occursin("differently ordered", permuted_message) + @test occursin("source", permuted_message) + @test final_state(simulation, :leaf_a).incident_par == 10.0 + @test final_state(simulation, :leaf_b).incident_par == 20.0 +end + +@testset "cross-column source alias is rejected atomically" begin + alias_error = Ref{Any}(nothing) + incident_after_error = Ref(Float64[]) + absorbed_after_error = Ref(Float64[]) + writer = OutputTargetsApiActionModel() do context + targets = output_targets(context, :organs) + targets.columns.incident_par[1] = 10.0 + targets.columns.incident_par[2] = 20.0 + targets.columns.absorbed_par[1] = 1.0 + targets.columns.absorbed_par[2] = 2.0 + exact_ids = collect(object_ids(targets)) + alias_error[] = output_targets_api_capture() do + assign_outputs!( + targets, + exact_ids, + ( + incident_par=[100.0, 200.0], + absorbed_par=targets.columns.incident_par, + ), + ) + end + incident_after_error[] = collect(targets.columns.incident_par) + absorbed_after_error[] = collect(targets.columns.absorbed_par) + end + model = output_targets_api_scene( + writer; + vars=( + incident_par=Default(0.0), + absorbed_par=Default(0.0), + ), + ) + simulation = run!(model; outputs=:none) + + @test alias_error[] isa ArgumentError + message = output_targets_api_error_message(alias_error[]) + @test occursin("destination column", message) + @test occursin("source", message) + @test incident_after_error[] == [10.0, 20.0] + @test absorbed_after_error[] == [1.0, 2.0] + @test final_state(simulation, :leaf_a).incident_par == 10.0 + @test final_state(simulation, :leaf_b).incident_par == 20.0 + @test final_state(simulation, :leaf_a).absorbed_par == 1.0 + @test final_state(simulation, :leaf_b).absorbed_par == 2.0 +end + +@testset "exact and permuted result mappings are cached by ID-column identity" begin + permuted_reads = Ref(0) + permuted_ids = OutputTargetsApiCountingIds( + ObjectId[ + ObjectId(:leaf_c), + ObjectId(:leaf_a), + ObjectId(:leaf_b), + ], + permuted_reads, + ) + permuted_incident = [30.0, 10.0, 20.0] + permuted_absorbed = [3.0, 1.0, 2.0] + writer = OutputTargetsApiWriterModel(( + object_id=permuted_ids, + incident_par=permuted_incident, + absorbed_par=permuted_absorbed, + )) + model = output_targets_api_scene( + writer; + leaf_ids=(:leaf_a, :leaf_b, :leaf_c), + vars=( + incident_par=Default(0.0), + absorbed_par=Default(0.0), + ), + ) + + simulation = run!(model; outputs=:none) + first_permuted_reads = permuted_reads[] + @test first_permuted_reads >= length(permuted_ids) + @test final_state(simulation, :leaf_a).incident_par == 10.0 + @test final_state(simulation, :leaf_b).incident_par == 20.0 + @test final_state(simulation, :leaf_c).incident_par == 30.0 + + permuted_incident .= (300.0, 100.0, 200.0) + permuted_absorbed .= (30.0, 10.0, 20.0) + continue!(simulation) + @test permuted_reads[] == first_permuted_reads + @test final_state(simulation, :leaf_a).incident_par == 100.0 + @test final_state(simulation, :leaf_b).incident_par == 200.0 + @test final_state(simulation, :leaf_c).incident_par == 300.0 + + exact_reads = Ref(0) + exact_ids = OutputTargetsApiCountingIds( + ObjectId[ + ObjectId(:leaf_a), + ObjectId(:leaf_b), + ObjectId(:leaf_c), + ], + exact_reads, + ) + exact_incident = [1.0, 2.0, 3.0] + exact_absorbed = [0.1, 0.2, 0.3] + writer.table[] = ( + object_id=exact_ids, + incident_par=exact_incident, + absorbed_par=exact_absorbed, + ) + continue!(simulation) + first_exact_reads = exact_reads[] + @test first_exact_reads >= length(exact_ids) + @test final_state(simulation, :leaf_a).incident_par == 1.0 + @test final_state(simulation, :leaf_b).incident_par == 2.0 + @test final_state(simulation, :leaf_c).incident_par == 3.0 + + exact_incident .= (11.0, 22.0, 33.0) + exact_absorbed .= (1.1, 2.2, 3.3) + continue!(simulation) + @test exact_reads[] == first_exact_reads + @test final_state(simulation, :leaf_a).incident_par == 11.0 + @test final_state(simulation, :leaf_b).incident_par == 22.0 + @test final_state(simulation, :leaf_c).incident_par == 33.0 +end + +@testset "failed remapping cannot poison a cached permutation" begin + valid_ids = ObjectId[ObjectId(:leaf_b), ObjectId(:leaf_a)] + invalid_ids = ObjectId[ObjectId(:leaf_a), ObjectId(:leaf_a)] + invalid_error = Ref{Any}(nothing) + recovery_error = Ref{Any}(nothing) + values_after_invalid = Ref(Float64[]) + writer = OutputTargetsApiActionModel() do context + targets = output_targets(context, :organs) + assign_outputs!( + targets, + valid_ids, + (incident_par=[20.0, 10.0],), + ) + invalid_error[] = output_targets_api_capture() do + assign_outputs!( + targets, + invalid_ids, + (incident_par=[91.0, 92.0],), + ) + end + values_after_invalid[] = collect(targets.columns.incident_par) + recovery_error[] = output_targets_api_capture() do + assign_outputs!( + targets, + valid_ids, + (incident_par=[200.0, 100.0],), + ) + end + end + model = output_targets_api_scene(writer) + simulation = run!(model; outputs=:none) + + @test invalid_error[] isa ArgumentError + invalid_message = output_targets_api_error_message(invalid_error[]) + @test occursin("duplicate", invalid_message) + @test values_after_invalid[] == [10.0, 20.0] + @test isnothing(recovery_error[]) + @test final_state(simulation, :leaf_a).incident_par == 100.0 + @test final_state(simulation, :leaf_b).incident_par == 200.0 +end + +@testset "Tables row access and heterogeneous output columns" begin + column_table = ( + object_id=ObjectId[ObjectId(:leaf_b), ObjectId(:leaf_a)], + incident_par=Float32[2.5, 1.25], + organ_label=[:leaf_b, :leaf_a], + hit_count=Int32[20, 10], + ) + writer = OutputTargetsApiWriterModel(column_table) + model = output_targets_api_scene( + writer; + vars=( + incident_par=Default(0.0), + organ_label=Default(:unset), + hit_count=Default(0), + ), + ) + simulation = run!(model; outputs=:none) + + leaf_a = final_state(simulation, :leaf_a) + leaf_b = final_state(simulation, :leaf_b) + @test leaf_a.incident_par == 1.25 + @test leaf_a.organ_label === :leaf_a + @test leaf_a.hit_count == 10 + @test leaf_b.incident_par == 2.5 + @test leaf_b.organ_label === :leaf_b + @test leaf_b.hit_count == 20 + + row_table = [ + ( + object_id=ObjectId(:leaf_a), + incident_par=3.5f0, + organ_label=:row_a, + hit_count=Int16(30), + ), + ( + object_id=ObjectId(:leaf_b), + incident_par=4.5f0, + organ_label=:row_b, + hit_count=Int16(40), + ), + ] + @test Tables.rowaccess(typeof(row_table)) + writer.table[] = row_table + continue!(simulation) + + leaf_a = final_state(simulation, :leaf_a) + leaf_b = final_state(simulation, :leaf_b) + @test leaf_a.incident_par == 3.5 + @test leaf_a.organ_label === :row_a + @test leaf_a.hit_count == 30 + @test leaf_b.incident_par == 4.5 + @test leaf_b.organ_label === :row_b + @test leaf_b.hit_count == 40 +end + +@testset "identified table schema and conversion errors are atomic" begin + missing_id_table = ( + source_node_id=ObjectId[ObjectId(:leaf_a), ObjectId(:leaf_b)], + incident_par=[91.0, 92.0], + ) + error, model = output_targets_api_failed_assignment(missing_id_table) + @test error isa ArgumentError + message = output_targets_api_error_message(error) + @test occursin("missing id column", message) + @test occursin("object_id", message) + @test output_targets_api_status(model, :leaf_a).incident_par == 0.0 + @test output_targets_api_status(model, :leaf_b).incident_par == 0.0 + + inconsistent_table = ( + object_id=ObjectId[ObjectId(:leaf_a), ObjectId(:leaf_b)], + incident_par=[91.0], + ) + error, model = output_targets_api_failed_assignment(inconsistent_table) + @test error isa DimensionMismatch + message = output_targets_api_error_message(error) + @test occursin("incident_par", message) + @test occursin("id column", message) + @test output_targets_api_status(model, :leaf_a).incident_par == 0.0 + @test output_targets_api_status(model, :leaf_b).incident_par == 0.0 + + invalid_late_column = ( + object_id=ObjectId[ObjectId(:leaf_a), ObjectId(:leaf_b)], + incident_par=[91.0, 92.0], + hit_count=["not-an-integer", "still-not-an-integer"], + ) + error, model = output_targets_api_failed_assignment( + invalid_late_column; + vars=( + incident_par=Default(0.0), + hit_count=Default(0), + ), + ) + @test error isa MethodError + message = output_targets_api_error_message(error) + @test occursin("convert", message) + @test occursin("string", message) + @test occursin("int", message) + @test output_targets_api_status(model, :leaf_a).incident_par == 0.0 + @test output_targets_api_status(model, :leaf_a).hit_count == 0 + @test output_targets_api_status(model, :leaf_b).incident_par == 0.0 + @test output_targets_api_status(model, :leaf_b).hit_count == 0 +end + +@testset "exact coverage errors are actionable and atomic" begin + invalid_tables = ( + unknown=( + table=( + object_id=ObjectId[ + ObjectId(:leaf_a), + ObjectId(:ghost_leaf), + ], + incident_par=[91.0, 92.0], + ), + fragments=("unknown", "ghost_leaf"), + ), + duplicate=( + table=( + object_id=ObjectId[ + ObjectId(:leaf_a), + ObjectId(:leaf_a), + ], + incident_par=[91.0, 92.0], + ), + fragments=("duplicate", "leaf_a"), + ), + missing=( + table=( + object_id=ObjectId[ObjectId(:leaf_a)], + incident_par=[91.0], + ), + fragments=("missing", "leaf_b"), + ), + extra=( + table=( + object_id=ObjectId[ + ObjectId(:leaf_a), + ObjectId(:leaf_b), + ObjectId(:extra_leaf), + ], + incident_par=[91.0, 92.0, 93.0], + ), + fragments=("extra", "extra_leaf"), + ), + ) + + for (case, invalid) in pairs(invalid_tables) + @testset "$(case) ID" begin + error, model = output_targets_api_failed_assignment(invalid.table) + @test error isa Exception + message = error isa Exception ? output_targets_api_error_message(error) : "" + for fragment in invalid.fragments + @test occursin(fragment, message) + end + @test output_targets_api_status(model, :leaf_a).incident_par == 0.0 + @test output_targets_api_status(model, :leaf_b).incident_par == 0.0 + end + end + + missing_column_table = ( + object_id=ObjectId[ObjectId(:leaf_a), ObjectId(:leaf_b)], + incident_par=[91.0, 92.0], + ) + error, model = output_targets_api_failed_assignment( + missing_column_table; + vars=( + incident_par=Default(0.0), + absorbed_par=Default(0.0), + ), + ) + @test error isa Exception + message = error isa Exception ? output_targets_api_error_message(error) : "" + @test occursin("missing", message) + @test occursin("absorbed_par", message) + @test output_targets_api_status(model, :leaf_a).incident_par == 0.0 + @test output_targets_api_status(model, :leaf_a).absorbed_par == 0.0 + @test output_targets_api_status(model, :leaf_b).incident_par == 0.0 + @test output_targets_api_status(model, :leaf_b).absorbed_par == 0.0 +end + +@testset "lifecycle invalidates a cached output permutation" begin + reads = Ref(0) + ids = OutputTargetsApiCountingIds( + ObjectId[ObjectId(:leaf_b), ObjectId(:leaf_a)], + reads, + ) + values = [20.0, 10.0] + writer = OutputTargetsApiWriterModel(( + object_id=ids, + incident_par=values, + )) + model = output_targets_api_scene(writer) + simulation = run!(model; outputs=:none) + reads_before_lifecycle = reads[] + @test reads_before_lifecycle >= 2 + + register_object!( + model, + Object(:late_leaf; scale=:Leaf); + parent=:scene, + ) + push!(ids.values, ObjectId(:late_leaf)) + push!(values, 30.0) + continue!(simulation) + reads_after_lifecycle = reads[] + @test reads_after_lifecycle > reads_before_lifecycle + @test final_state(simulation, :leaf_a).incident_par == 10.0 + @test final_state(simulation, :leaf_b).incident_par == 20.0 + @test final_state(simulation, :late_leaf).incident_par == 30.0 + @test Set(last(writer.seen_ids)) == Set(ObjectId[ + ObjectId(:leaf_a), + ObjectId(:leaf_b), + ObjectId(:late_leaf), + ]) + + values .= (11.0, 22.0, 33.0) + continue!(simulation) + @test reads[] == reads_after_lifecycle + @test final_state(simulation, :leaf_a).incident_par == 22.0 + @test final_state(simulation, :leaf_b).incident_par == 11.0 + @test final_state(simulation, :late_leaf).incident_par == 33.0 +end + +@testset "empty targets refresh to a typed lifecycle assignment" begin + reads = Ref(0) + ids = OutputTargetsApiCountingIds(ObjectId[], reads) + values = Float64[] + writer = OutputTargetsApiWriterModel(( + object_id=ids, + incident_par=values, + )) + model = output_targets_api_scene(writer; leaf_ids=()) + simulation = run!(model; outputs=:none) + + @test only(writer.seen_lengths) == 0 + @test isempty(only(writer.seen_ids)) + @test reads[] == 0 + + register_object!( + model, + Object(:first_leaf; scale=:Leaf); + parent=:scene, + ) + push!(ids.values, ObjectId(:first_leaf)) + push!(values, 7.5) + continue!(simulation) + + @test reads[] > 0 + @test last(writer.seen_lengths) == 1 + @test last(writer.seen_ids) == ObjectId[ObjectId(:first_leaf)] + @test final_state(simulation, :first_leaf).incident_par == 7.5 +end From 840c31de817348c170de63cf87d8799be79cdf9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Sun, 23 Aug 2026 13:49:01 +0200 Subject: [PATCH 11/45] benchmark: cover distributed output execution --- benchmark/benchmarks.jl | 91 +++++ .../test-distributed-output-benchmark.jl | 338 +++++++++++++++++- benchmark/test/runtests.jl | 214 ++++++++++- 3 files changed, 619 insertions(+), 24 deletions(-) diff --git a/benchmark/benchmarks.jl b/benchmark/benchmarks.jl index 84ec5f947..e999b9604 100644 --- a/benchmark/benchmarks.jl +++ b/benchmark/benchmarks.jl @@ -108,6 +108,8 @@ if SUPPORTS_COMPOSITE_OBJECT_BENCHMARKS ) setup = (values = setup_distributed_output_benchmark( $nobjects, ).bound_heterogeneous_values) + end + for nobjects in (10, 1_000, 10_000, 100_000) SUITE[suite_name]["PSE_distributed_assign_exact_$(nobjects)"] = @benchmarkable benchmark_assign_distributed_outputs_exact!( data.exact_targets, @@ -120,6 +122,95 @@ if SUPPORTS_COMPOSITE_OBJECT_BENCHMARKS data.result_to_destination, ) setup = (data = setup_distributed_output_benchmark($nobjects)) end + for nobjects in (10, 1_000, 10_000) + SUITE[suite_name]["PSE_distributed_assign_status_$(nobjects)"] = + @benchmarkable benchmark_assign_distributed_outputs_statuses_exact!( + data.statuses, + data.exact_values, + ) setup = (data = setup_distributed_output_benchmark($nobjects)) + SUITE[suite_name]["PSE_distributed_assign_broadcast_$(nobjects)"] = + @benchmarkable benchmark_assign_distributed_outputs_broadcast!( + data.status_targets, + data.exact_values, + ) setup = (data = setup_distributed_output_benchmark($nobjects)) + SUITE[suite_name]["PSE_distributed_assign_columns_$(nobjects)"] = + @benchmarkable benchmark_assign_distributed_output_columns_exact!( + data.column_targets, + data.column_values, + ) setup = (data = setup_distributed_output_benchmark($nobjects)) + SUITE[suite_name]["PSE_distributed_assign_sparse_$(nobjects)"] = + @benchmarkable benchmark_assign_distributed_outputs_permuted!( + data.sparse_targets, + data.sparse_values, + data.sparse_result_to_destination, + ) setup = (data = setup_distributed_output_benchmark($nobjects)) + SUITE[suite_name]["PSE_distributed_assign_heterogeneous_$(nobjects)"] = + @benchmarkable benchmark_assign_distributed_outputs_exact!( + data.heterogeneous_targets, + data.exact_values, + ) setup = (data = setup_distributed_output_benchmark($nobjects)) + SUITE[suite_name]["PSE_distributed_mapping_refresh_$(nobjects)"] = + @benchmarkable benchmark_refresh_distributed_output_assignment_mapping( + destination_ids, + result_ids, + ) setup = ((destination_ids, result_ids) = + setup_distributed_output_mapping_refresh_benchmark($nobjects)) + SUITE[suite_name]["PSE_assign_outputs_control_$(nobjects)"] = + @benchmarkable benchmark_distributed_output_public_assignment_step( + simulation, + ) setup = (simulation = + setup_distributed_output_assignment_control_benchmark( + $nobjects, + )) evals = 1 + end + if isdefined(PlantSimEngine, :output_targets) && + isdefined(PlantSimEngine, :assign_outputs!) + for nobjects in (10, 1_000, 10_000), order in (:exact, :permuted) + assignment_paths = order === :exact ? + (:table, :columns, :ref_loop, :broadcast) : + (:table, :columns) + for path in assignment_paths + SUITE[suite_name]["PSE_assign_outputs_$(path)_$(order)_$(nobjects)"] = + @benchmarkable benchmark_distributed_output_public_assignment_step( + simulation, + ) setup = (simulation = + setup_distributed_output_public_assignment_benchmark( + $nobjects; + order=$order, + path=$path, + )) evals = 1 + end + end + for nobjects in (10, 1_000, 10_000), order in (:exact, :permuted) + assignment_paths = order === :exact ? + (:table, :columns, :ref_loop) : + (:table, :columns) + for path in assignment_paths + SUITE[suite_name]["PSE_assign_outputs_$(path)_2columns_$(order)_$(nobjects)"] = + @benchmarkable benchmark_distributed_output_public_assignment_step( + simulation, + ) setup = (simulation = + setup_distributed_output_public_assignment_benchmark( + $nobjects; + order=$order, + path=$path, + ncolumns=2, + )) evals = 1 + end + end + for nobjects in (10, 1_000, 10_000), path in (:columns, :ref_loop) + SUITE[suite_name]["PSE_assign_outputs_$(path)_heterogeneous_exact_$(nobjects)"] = + @benchmarkable benchmark_distributed_output_public_assignment_step( + simulation, + ) setup = (simulation = + setup_distributed_output_public_assignment_benchmark( + $nobjects; + order=:exact, + path=$path, + heterogeneous=true, + )) evals = 1 + end + end SUITE[suite_name]["PSE_distributed_compile_permutation_1000"] = @benchmarkable compile_distributed_output_benchmark_permutation( data.object_ids, diff --git a/benchmark/test-distributed-output-benchmark.jl b/benchmark/test-distributed-output-benchmark.jl index 00716bdee..4cf7c266c 100644 --- a/benchmark/test-distributed-output-benchmark.jl +++ b/benchmark/test-distributed-output-benchmark.jl @@ -3,6 +3,7 @@ using PlantSimEngine PlantSimEngine.@process "distributed_output_benchmark_bound_input" verbose = false PlantSimEngine.@process "distributed_output_benchmark_status_input" verbose = false PlantSimEngine.@process "distributed_output_benchmark_scene_writer" verbose = false +PlantSimEngine.@process "distributed_output_benchmark_assignment" verbose = false struct DistributedOutputBenchmarkBoundInputModel <: AbstractDistributed_Output_Benchmark_Bound_InputModel end @@ -10,6 +11,30 @@ struct DistributedOutputBenchmarkStatusInputModel <: AbstractDistributed_Output_Benchmark_Status_InputModel end struct DistributedOutputBenchmarkSceneWriterModel <: AbstractDistributed_Output_Benchmark_Scene_WriterModel end +struct DistributedOutputBenchmarkAssignmentModel{T,I,C,M} <: + AbstractDistributed_Output_Benchmark_AssignmentModel + table::T + ids::I + columns::C + mode::M +end + +function DistributedOutputBenchmarkAssignmentModel(table, mode::Symbol) + mode in (:table, :columns, :ref_loop, :broadcast) || throw( + ArgumentError("Unsupported assignment path `$(mode)`."), + ) + columns = if hasproperty(table, :rank) + (incident_par=table.incident_par, rank=table.rank) + else + (incident_par=table.incident_par,) + end + return DistributedOutputBenchmarkAssignmentModel( + table, + table.object_id, + columns, + Val(mode), + ) +end PlantSimEngine.inputs_(::DistributedOutputBenchmarkBoundInputModel) = ( signals=Required(Vector{Float64}), @@ -25,6 +50,8 @@ PlantSimEngine.outputs_(::DistributedOutputBenchmarkStatusInputModel) = ( ) PlantSimEngine.inputs_(::DistributedOutputBenchmarkSceneWriterModel) = NamedTuple() PlantSimEngine.outputs_(::DistributedOutputBenchmarkSceneWriterModel) = NamedTuple() +PlantSimEngine.inputs_(::DistributedOutputBenchmarkAssignmentModel) = NamedTuple() +PlantSimEngine.outputs_(::DistributedOutputBenchmarkAssignmentModel) = NamedTuple() function PlantSimEngine.run!( ::DistributedOutputBenchmarkSceneWriterModel, status, @@ -35,6 +62,67 @@ function PlantSimEngine.run!( return nothing end +function PlantSimEngine.run!( + model::DistributedOutputBenchmarkAssignmentModel, + status, + environment, + constants, + context, +) + targets = PlantSimEngine.output_targets(context, :leaves) + benchmark_assign_outputs_api!(model.mode, targets, model) + return nothing +end + +function benchmark_assign_outputs_api!( + ::Val{:table}, + targets, + model::DistributedOutputBenchmarkAssignmentModel, +) + PlantSimEngine.assign_outputs!(targets, model.table; id=:object_id) + return nothing +end + +function benchmark_assign_outputs_api!( + ::Val{:columns}, + targets, + model::DistributedOutputBenchmarkAssignmentModel, +) + PlantSimEngine.assign_outputs!(targets, model.ids, model.columns) + return nothing +end + +function benchmark_assign_outputs_api!( + ::Val{:ref_loop}, + targets, + model::DistributedOutputBenchmarkAssignmentModel, +) + if hasproperty(model.columns, :rank) + benchmark_assign_distributed_output_public_columns_exact!( + targets.columns, + model.columns, + ) + else + benchmark_assign_distributed_outputs_exact!( + targets.columns.incident_par, + model.columns.incident_par, + ) + end + return nothing +end + +function benchmark_assign_outputs_api!( + ::Val{:broadcast}, + targets, + model::DistributedOutputBenchmarkAssignmentModel, +) + benchmark_assign_distributed_outputs_broadcast!( + targets.columns.incident_par, + model.columns.incident_par, + ) + return nothing +end + function PlantSimEngine.run!( ::DistributedOutputBenchmarkBoundInputModel, status, @@ -74,17 +162,72 @@ function benchmark_distributed_output_sum(values) return total end -function benchmark_assign_distributed_outputs_exact!(targets, values) +benchmark_distributed_output_allocations(f, args...) = @allocated f(args...) + +Base.@noinline function benchmark_assign_distributed_outputs_exact!(targets, values) @boundscheck length(targets) == length(values) || throw( DimensionMismatch("Output targets and values must have the same length."), ) @inbounds for index in eachindex(values) targets[index] = values[index] end - return targets + return nothing +end + +Base.@noinline function benchmark_assign_distributed_outputs_broadcast!( + targets, + values, +) + targets .= values + return nothing +end + +Base.@noinline function benchmark_assign_distributed_outputs_statuses_exact!( + statuses, + values, +) + @boundscheck length(statuses) == length(values) || throw( + DimensionMismatch("Output statuses and values must have the same length."), + ) + @inbounds for index in eachindex(values) + statuses[index].signal = values[index] + end + return nothing +end + +Base.@noinline function benchmark_assign_distributed_output_columns_exact!( + targets, + values, +) + @boundscheck length(targets.signal) == length(values.signal) || throw( + DimensionMismatch("Signal output targets and values must have the same length."), + ) + @boundscheck length(targets.rank) == length(values.rank) || throw( + DimensionMismatch("Rank output targets and values must have the same length."), + ) + @boundscheck length(targets.signal) == length(targets.rank) || throw( + DimensionMismatch("Output target columns must have the same length."), + ) + @inbounds for index in eachindex(values.signal) + targets.signal[index] = values.signal[index] + targets.rank[index] = values.rank[index] + end + return nothing end -function benchmark_assign_distributed_outputs_permuted!( +Base.@noinline function benchmark_assign_distributed_output_public_columns_exact!( + targets, + values, +) + benchmark_assign_distributed_outputs_exact!( + targets.incident_par, + values.incident_par, + ) + benchmark_assign_distributed_outputs_exact!(targets.rank, values.rank) + return nothing +end + +Base.@noinline function benchmark_assign_distributed_outputs_permuted!( targets, values, result_to_destination, @@ -97,25 +240,24 @@ function benchmark_assign_distributed_outputs_permuted!( @inbounds for result_index in eachindex(values) targets[result_to_destination[result_index]] = values[result_index] end - return targets + return nothing end -""" - compile_distributed_output_benchmark_permutation(destination_ids, result_ids) - -Compile and validate the result-row to destination-position mapping used by the -benchmark. This intentionally allocating operation represents compilation or a -lifecycle barrier, never a steady-state model call. -""" -function compile_distributed_output_benchmark_permutation( +function _compile_distributed_output_benchmark_mapping( destination_ids, result_ids, + require_exact::Bool, ) - length(destination_ids) == length(result_ids) || throw( + require_exact && length(destination_ids) != length(result_ids) && throw( DimensionMismatch( "Exact output coverage requires one result per destination.", ), ) + length(result_ids) <= length(destination_ids) || throw( + DimensionMismatch( + "Output results cannot outnumber destination objects.", + ), + ) position_by_id = Dict{eltype(destination_ids),Int}() sizehint!(position_by_id, length(destination_ids)) for (position, object_id) in pairs(destination_ids) @@ -138,12 +280,45 @@ function compile_distributed_output_benchmark_permutation( seen[destination_index] = true result_to_destination[result_index] = destination_index end - all(seen) || throw( + require_exact && !all(seen) && throw( ArgumentError("Exact output coverage is missing destination object IDs."), ) return result_to_destination end +""" + compile_sparse_distributed_output_benchmark_mapping(destination_ids, result_ids) + +Compile a benchmark-only sparse/random destination mapping. This helper is not +an `OutputTo` coverage policy and deliberately does not define public partial +assignment semantics; it isolates the indexed-write cost requested by the +distributed-output performance contract. +""" +compile_sparse_distributed_output_benchmark_mapping(destination_ids, result_ids) = + _compile_distributed_output_benchmark_mapping( + destination_ids, + result_ids, + false, + ) + +""" + compile_distributed_output_benchmark_permutation(destination_ids, result_ids) + +Compile and validate the result-row to destination-position mapping used by the +benchmark. This intentionally allocating operation represents compilation or a +lifecycle barrier, never a steady-state model call. +""" +function compile_distributed_output_benchmark_permutation( + destination_ids, + result_ids, +) + return _compile_distributed_output_benchmark_mapping( + destination_ids, + result_ids, + true, + ) +end + function setup_distributed_output_benchmark(nobjects::Int=1_000) nobjects > 0 || throw(ArgumentError("`nobjects` must be positive.")) pairs = [ @@ -167,6 +342,12 @@ function setup_distributed_output_benchmark(nobjects::Int=1_000) ) exact_values = getindex.(references) + statuses = [Status(signal=0.0) for _ in 1:nobjects] + status_targets = PlantSimEngine.RefVector(:signal, statuses) + rank_values = collect(1:nobjects) + rank_targets = PlantSimEngine.RefVector([Ref(0) for _ in 1:nobjects]) + column_targets = (signal=status_targets, rank=rank_targets) + column_values = (signal=exact_values, rank=rank_values) permuted_result_ids = reverse(object_ids) permuted_values = reverse(exact_values) result_to_destination = @@ -180,6 +361,28 @@ function setup_distributed_output_benchmark(nobjects::Int=1_000) permuted_targets = PlantSimEngine.RefVector( [Ref(0.0) for _ in 1:nobjects], ) + sparse_result_ids = reverse(object_ids[1:10:end]) + sparse_values = reverse(exact_values[1:10:end]) + sparse_result_to_destination = + compile_sparse_distributed_output_benchmark_mapping( + object_ids, + sparse_result_ids, + ) + sparse_targets = PlantSimEngine.RefVector( + [Ref(0.0) for _ in 1:nobjects], + ) + heterogeneous_target_references = Any[ + if mod(index, 3) == 1 + Ref{Float32}(0.0) + elseif mod(index, 3) == 2 + Ref{Float64}(0.0) + else + Ref{Real}(0.0) + end for index in 1:nobjects + ] + heterogeneous_targets = PlantSimEngine.ObjectRefVector( + heterogeneous_target_references, + ) return ( object_ids=object_ids, @@ -188,12 +391,119 @@ function setup_distributed_output_benchmark(nobjects::Int=1_000) heterogeneous_values=heterogeneous_values, bound_heterogeneous_values=bound_heterogeneous_values, exact_values=exact_values, + statuses=statuses, + status_targets=status_targets, + column_targets=column_targets, + column_values=column_values, permuted_result_ids=permuted_result_ids, permuted_values=permuted_values, result_to_destination=result_to_destination, exact_targets=exact_targets, permuted_targets=permuted_targets, + sparse_result_ids=sparse_result_ids, + sparse_values=sparse_values, + sparse_result_to_destination=sparse_result_to_destination, + sparse_targets=sparse_targets, + heterogeneous_targets=heterogeneous_targets, + exact_table=(object_id=object_ids, incident_par=exact_values), + permuted_table=( + object_id=permuted_result_ids, + incident_par=permuted_values, + ), + ) +end + +function setup_distributed_output_mapping_refresh_benchmark(nobjects::Int=1_000) + data = setup_distributed_output_benchmark(nobjects) + dynamic_id = ObjectId(Symbol(:object_, nobjects + 1)) + destination_ids = [data.object_ids; dynamic_id] + result_ids = reverse(destination_ids) + return destination_ids, result_ids +end + +benchmark_refresh_distributed_output_assignment_mapping( + destination_ids, + result_ids, +) = compile_distributed_output_benchmark_permutation(destination_ids, result_ids) + +function setup_distributed_output_public_assignment_benchmark( + nobjects::Int=1_000; + order::Symbol=:exact, + path::Symbol=:table, + ncolumns::Int=1, + heterogeneous::Bool=false, +) + order in (:exact, :permuted) || throw( + ArgumentError("Unsupported result order `$(order)`."), + ) + ncolumns in (1, 2) || throw( + ArgumentError("`ncolumns` must be either 1 or 2."), + ) + heterogeneous && ncolumns != 1 && throw( + ArgumentError("Heterogeneous targets support the one-column case."), + ) + data = setup_distributed_output_benchmark(nobjects) + base_table = order === :exact ? data.exact_table : data.permuted_table + rank = order === :exact ? + data.column_values.rank : + reverse(data.column_values.rank) + table = ncolumns == 1 ? base_table : (; base_table..., rank) + output_variables = ncolumns == 1 ? + (incident_par=Default(0.0),) : + (incident_par=Default(0.0), rank=Default(0)) + objects = Object[Object(:scene; scale=:Scene)] + sizehint!(objects, nobjects + 1) + for (index, object_id) in enumerate(data.object_ids) + status = if heterogeneous + if isodd(index) + Status(incident_par=Float32(0.0)) + else + Status(incident_par=Float64(0.0)) + end + else + Status() + end + push!( + objects, + Object( + object_id.value; + scale=:Leaf, + parent=:scene, + status, + ), + ) + end + model = CompositeModel( + objects...; + applications=( + ModelSpec( + DistributedOutputBenchmarkAssignmentModel(table, path); + name=:scene_assignment, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=output_variables, + ), + ), + ), + ), + ) + simulation = run!(model; outputs=:none) + return simulation +end + +benchmark_distributed_output_public_assignment_step(simulation) = + continue!(simulation; steps=1) + +function setup_distributed_output_assignment_control_benchmark( + nobjects::Int=1_000, +) + model = setup_distributed_output_compilation_benchmark( + nobjects; + distributed=false, ) + return run!(model; outputs=:none) end function setup_distributed_output_input_benchmark( diff --git a/benchmark/test/runtests.jl b/benchmark/test/runtests.jl index ac821642c..5b734a4c2 100644 --- a/benchmark/test/runtests.jl +++ b/benchmark/test/runtests.jl @@ -248,8 +248,22 @@ if benchmark_test_enabled("distributed output benchmark API smoke") benchmark_distributed_output_sum(data.ref_values) benchmark_distributed_output_sum(data.bound_values) - @test @allocated(benchmark_distributed_output_sum(data.ref_values)) == 0 - @test @allocated(benchmark_distributed_output_sum(data.bound_values)) == 0 + benchmark_distributed_output_allocations( + benchmark_distributed_output_sum, + data.ref_values, + ) + @test benchmark_distributed_output_allocations( + benchmark_distributed_output_sum, + data.ref_values, + ) == 0 + benchmark_distributed_output_allocations( + benchmark_distributed_output_sum, + data.bound_values, + ) + @test benchmark_distributed_output_allocations( + benchmark_distributed_output_sum, + data.bound_values, + ) == 0 status_input_data = setup_distributed_output_input_benchmark( 16; @@ -321,21 +335,65 @@ if benchmark_test_enabled("distributed output benchmark API smoke") data.permuted_values, data.result_to_destination, ) + benchmark_assign_distributed_outputs_statuses_exact!( + data.statuses, + data.exact_values, + ) + @test getproperty.(data.statuses, :signal) == data.exact_values + fill!(data.status_targets, 0.0) + benchmark_assign_distributed_outputs_broadcast!( + data.status_targets, + data.exact_values, + ) + @test collect(data.status_targets) == data.exact_values + benchmark_assign_distributed_output_columns_exact!( + data.column_targets, + data.column_values, + ) + @test collect(data.column_targets.signal) == data.column_values.signal + @test collect(data.column_targets.rank) == data.column_values.rank + benchmark_assign_distributed_outputs_permuted!( + data.sparse_targets, + data.sparse_values, + data.sparse_result_to_destination, + ) + sparse_expected = zeros(length(data.exact_values)) + sparse_expected[data.sparse_result_to_destination] = data.sparse_values + @test collect(data.sparse_targets) == sparse_expected + benchmark_assign_distributed_outputs_exact!( + data.heterogeneous_targets, + data.exact_values, + ) + @test collect(data.heterogeneous_targets) == data.exact_values @test collect(data.exact_targets) == data.exact_values @test collect(data.permuted_targets) == data.exact_values - @test @allocated( - benchmark_assign_distributed_outputs_exact!( + allocation_cases = ( + ( + benchmark_assign_distributed_outputs_exact!, data.exact_targets, data.exact_values, - ) - ) == 0 - @test @allocated( - benchmark_assign_distributed_outputs_permuted!( + ), + ( + benchmark_assign_distributed_outputs_permuted!, data.permuted_targets, data.permuted_values, data.result_to_destination, - ) - ) == 0 + ), + ( + benchmark_assign_distributed_outputs_broadcast!, + data.status_targets, + data.exact_values, + ), + ( + benchmark_assign_distributed_output_columns_exact!, + data.column_targets, + data.column_values, + ), + ) + for allocation_case in allocation_cases + benchmark_distributed_output_allocations(allocation_case...) + @test benchmark_distributed_output_allocations(allocation_case...) == 0 + end @test_throws DimensionMismatch begin compile_distributed_output_benchmark_permutation( @@ -358,6 +416,123 @@ if benchmark_test_enabled("distributed output benchmark API smoke") ], ) end + sparse_mapping = compile_sparse_distributed_output_benchmark_mapping( + data.object_ids, + data.sparse_result_ids, + ) + @test sparse_mapping == data.sparse_result_to_destination + @test_throws ArgumentError begin + compile_sparse_distributed_output_benchmark_mapping( + data.object_ids, + [data.sparse_result_ids; first(data.sparse_result_ids)], + ) + end + + dynamic_destination_ids, dynamic_result_ids = + setup_distributed_output_mapping_refresh_benchmark(16) + dynamic_mapping = + benchmark_refresh_distributed_output_assignment_mapping( + dynamic_destination_ids, + dynamic_result_ids, + ) + @test dynamic_mapping == reverse(eachindex(dynamic_destination_ids)) + + control_simulation = + setup_distributed_output_assignment_control_benchmark(16) + benchmark_distributed_output_public_assignment_step( + control_simulation, + ) + @test current_step(control_simulation) == 2 + + if isdefined(PlantSimEngine, :output_targets) && + isdefined(PlantSimEngine, :assign_outputs!) + expected_by_id = Dict( + row_id => value for (row_id, value) in zip( + data.object_ids, + data.exact_values, + ) + ) + for (order, paths) in ( + (:exact, (:table, :columns, :ref_loop, :broadcast)), + (:permuted, (:table, :columns)), + ) + for path in paths + public_simulation = + setup_distributed_output_public_assignment_benchmark( + 16; + order=order, + path=path, + ) + benchmark_distributed_output_public_assignment_step( + public_simulation, + ) + @test all( + object.status.incident_par == expected_by_id[object.id] + for object in model_objects( + public_simulation.model; + scale=:Leaf, + ) + ) + end + end + + expected_rank_by_id = Dict( + row_id => rank for (row_id, rank) in zip( + data.object_ids, + data.column_values.rank, + ) + ) + for order in (:exact, :permuted) + paths = order === :exact ? + (:table, :columns, :ref_loop) : + (:table, :columns) + for path in paths + public_simulation = + setup_distributed_output_public_assignment_benchmark( + 16; + order=order, + path=path, + ncolumns=2, + ) + benchmark_distributed_output_public_assignment_step( + public_simulation, + ) + leaves = model_objects(public_simulation.model; scale=:Leaf) + @test all( + object.status.incident_par == expected_by_id[object.id] + for object in leaves + ) + @test all( + object.status.rank == expected_rank_by_id[object.id] + for object in leaves + ) + end + end + + for path in (:columns, :ref_loop) + public_simulation = + setup_distributed_output_public_assignment_benchmark( + 16; + order=:exact, + path=path, + heterogeneous=true, + ) + execution_target = + only(first(public_simulation.execution_plan.batches).targets) + @test execution_target.output_targets.leaves.columns.incident_par isa + PlantSimEngine.ObjectRefVector + benchmark_distributed_output_public_assignment_step( + public_simulation, + ) + @test all( + object.status.incident_par == expected_by_id[object.id] + for object in model_objects( + public_simulation.model; + scale=:Leaf, + ) + ) + end + end end end @@ -556,6 +731,25 @@ if benchmark_test_enabled("internal-only benchmark suite assembly smoke") @test haskey(suite, "PSE_immutable_scenario_none") @test haskey(suite, "PSE_immutable_scenario_requests") @test haskey(suite, "PSE_immutable_scenario_all") + @test haskey(suite, "PSE_distributed_assign_exact_10") + @test haskey(suite, "PSE_distributed_assign_sparse_1000") + @test haskey(suite, "PSE_distributed_mapping_refresh_10000") + @test haskey(suite, "PSE_assign_outputs_control_1000") + if isdefined(PlantSimEngine, :output_targets) && + isdefined(PlantSimEngine, :assign_outputs!) + @test haskey( + suite, + "PSE_assign_outputs_columns_exact_1000", + ) + @test haskey( + suite, + "PSE_assign_outputs_columns_2columns_permuted_1000", + ) + @test haskey( + suite, + "PSE_assign_outputs_columns_heterogeneous_exact_1000", + ) + end @test !haskey(suite, "PBP") @test !haskey(suite, "PBP_batch_run") @test !haskey(suite, "XPalm_run_100") From ab8df2eb8a1e596af012c9962c04ef6df5c8a0d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Sun, 23 Aug 2026 13:54:19 +0200 Subject: [PATCH 12/45] docs: document keyed output assignment --- docs/src/API/API_public.md | 19 + docs/src/API/public_symbols.md | 4 + docs/src/dev/distributed_output_ownership.md | 347 +++++++++++-------- docs/src/guides/multiscale/value_coupling.md | 155 +++++++++ 4 files changed, 390 insertions(+), 135 deletions(-) diff --git a/docs/src/API/API_public.md b/docs/src/API/API_public.md index f878fa4e2..d185c232d 100644 --- a/docs/src/API/API_public.md +++ b/docs/src/API/API_public.md @@ -25,6 +25,14 @@ destination objects. Each variable uses `Required(T)` or `Default(value)`; the compiler resolves identities and rejects ambiguous writers before initializing statuses. +- `output_targets(context, :name)` returns the compiled [`OutputTargets`](@ref) + view for one named `outputs_to` group. Destination columns are exposed + explicitly as `targets.columns.`, and `object_ids(targets)` returns + their aligned, read-only identities. +- `assign_outputs!(targets, table; id=:object_id)` assigns a + Tables.jl-compatible result by identity. The lower-level + `assign_outputs!(targets, ids, columns)` overload accepts an ID vector and a + `NamedTuple` of columns directly. - `Updates(:variable; after=:application_id)` orders intentional duplicate writers. - `Input(...)` and `Call(...)` express model defaults through `dep(model)`. - `run_call!(context, :name; publish=false)` executes every resolved hard-call @@ -36,6 +44,17 @@ - `call_targets(context, :name)` returns the same non-executing collection for fine-grained execution with `run_call!(target; ...)`. +Distributed assignment requires exact destination coverage. Every selected +object ID must occur exactly once and every declared output column must be +present; additional table or `NamedTuple` columns are treated as metadata and +ignored. Result columns may alias destination storage only for direct +self-assignment of the same column in exact destination order. + +Obtain `OutputTargets` inside each model invocation and do not retain it across +a lifecycle barrier. Reusing the same ID-column object lets PlantSimEngine +reuse its compiled row permutation and promises that the IDs and their order +have not been mutated. Replace the ID-column object when either changes. + ### Model input schema - `Required(T)` declares an input that object state or another application must diff --git a/docs/src/API/public_symbols.md b/docs/src/API/public_symbols.md index bb38fe552..be912e9df 100644 --- a/docs/src/API/public_symbols.md +++ b/docs/src/API/public_symbols.md @@ -36,6 +36,10 @@ explicitly imports one of those submodules. `runtime_model`, `final_state`. - Output selection and collection: `OutputRequest`, `outputs`, `collect_outputs`. +- Distributed output assignment: `OutputTargets`, `output_targets`, and + `assign_outputs!`. Access destination carriers through + `targets.columns.` and aligned identities through + `object_ids(targets)`. - Lifecycle: `register_object!`, `add_organ!`, `remove_object!`, `reparent_object!`, `move_object!`, `update_geometry!`, `mark_environment_binding_dirty!`, `objects_from_mtg`. diff --git a/docs/src/dev/distributed_output_ownership.md b/docs/src/dev/distributed_output_ownership.md index c533b4767..ba2e0b7ee 100644 --- a/docs/src/dev/distributed_output_ownership.md +++ b/docs/src/dev/distributed_output_ownership.md @@ -1,8 +1,6 @@ # Distributed output ownership -Status: design contract for the `distributed-output-targets` implementation. -Public names shown below remain provisional until the focused prototype and -performance gates pass. +Status: implemented public and compiler contract. ## Problem @@ -20,10 +18,10 @@ These are not hard calls to per-object models. The scene or plant application owns the computation and cadence, while each destination object owns its local state value. -Passing writable `Many(...; from_status=true)` carriers can modify those values, -but it does not declare the producing application as their writer. Producer -inference, scheduling, diagnostics, lifecycle refresh, and output retention -therefore cannot recover the scientific ownership of the result. +Passing writable `Many(...; from_status=true)` carriers can modify those +values, but it does not declare the producing application as their writer. +Producer inference, scheduling, diagnostics, lifecycle refresh, and output +retention would then lose the scientific ownership of the result. ## Terms @@ -39,16 +37,16 @@ therefore cannot recover the scientific ownership of the result. `(destination_object_id, variable) => application_id`. Execution targets and output destinations are deliberately distinct. A model -must not be mounted on fake per-organ applications merely to publish values -computed elsewhere. +does not need fake per-organ applications merely to publish values computed +elsewhere. -## Indicative declaration +## Public declaration and scene writer -The proposed scenario spelling is: +The scenario declares named destination groups with `outputs_to`: ```julia ModelSpec( - SceneLightModel(); + SceneLightModel(solve_light); name=:scene_light, on=One(scale=:Scene), outputs_to=( @@ -56,7 +54,7 @@ ModelSpec( Many( scale=(:Leaf, :Internode), within=SceneScope(), - ), + ); vars=( incident_par=Default(0.0), absorbed_par=Default(0.0), @@ -67,153 +65,243 @@ ModelSpec( ) ``` -Inside the kernel, the application obtains its already compiled destinations: +`Default(value)` creates the destination status variable when needed. +`Required(T)` requires it to exist on every selected destination. Only +`coverage=:exact`, the default, is accepted. + +The scene kernel looks up its compiled group and publishes an identified +solver table: ```julia -targets = output_targets(context, :organs) -assign_outputs!(targets, result_columns; id=:object_id) +PlantSimEngine.@process "scene light" verbose = false + +struct SceneLightModel{F} <: AbstractScene_LightModel + solve::F +end + +PlantSimEngine.inputs_(::SceneLightModel) = NamedTuple() +PlantSimEngine.outputs_(::SceneLightModel) = NamedTuple() + +function PlantSimEngine.run!( + model::SceneLightModel, + status, + environment, + constants, + context, +) + targets = output_targets(context, :organs) + result = model.solve( + runtime_model(context), + environment, + object_ids(targets), + ) + assign_outputs!(targets, result; id=:object_id) + return nothing +end ``` -`outputs_to` and `OutputTo` are implemented by the compiler. `OutputTargets`, -`output_targets`, and `assign_outputs!` remain working names for the subsequent -runtime-assignment slice. +`result` may be any Tables.jl-compatible row or column table. Its row order is +independent of selector order because assignment uses `ObjectId` values. -## Identity contract +## `OutputTargets` runtime surface -PlantSimEngine already stores each compiled `Many` binding as aligned object IDs -and a carrier. Selector results use stable `ObjectId` order; collection position -has no botanical or scientific meaning and may change when lifecycle refresh -rebuilds a binding. +`output_targets(context, :organs)` performs a typed lookup on the current +`RunContext`; it does not resolve a selector or rebuild an identity index in +the model call. The group name must be a `Symbol` declared by the current +application. -An output result must therefore be associated by `ObjectId`, never by MTG -traversal order or an independently declared ID selector. The first -model-facing identity-aware view is: +The returned `OutputTargets` supports `length`, `isempty`, `eachindex`, and +`object_ids`. Its destination carriers are available only through the explicit +column namespace: ```julia -values = bound_input(context, :organ_values) -object_ids(values) +targets.columns.incident_par +targets.columns.absorbed_par ``` -`BoundMany` preserves ordinary positional vector behavior. Identity indexing is -explicit (`values[ObjectId(:leaf_1)]`), so an integer remains a positional -index. The aligned identity view is live and read-only; it does not copy the -compiler's ID vector. Public construction validates that identities are unique -and use compiled `ObjectId` order, while compiler-owned construction reuses the -already validated binding. +Output variables and compiled-binding metadata are deliberately not forwarded +into the public property namespace: `propertynames(targets)` exposes only +`:columns`. This keeps output names separate from implementation fields. An +output named `columns` remains accessible as `targets.columns.columns`. -The ordinary `RefVector` or `ObjectRefVector` installed in model status remains -unchanged. Identity-aware access is opt-in through `RunContext`, so existing -model dispatch and the common status path retain their current semantics. +`object_ids(targets)` is an aligned, read-only identity carrier over the +compiled destination IDs. Positions have no botanical meaning. Direct +positional writes to `targets.columns.` are valid when the producing +algorithm already uses this exact identity order; identified external results +should use `assign_outputs!`. -## Compilation and initialization +An `OutputTargets` value belongs to the current model invocation and lifecycle +generation. Kernels obtain it from `RunContext` on every call and do not store +it on their model. -For every output binding, compilation must determine: +## Identified assignment -1. the producing application and execution object; -2. the destination selector and compiled matcher; -3. destination `ObjectId` values in stable order; -4. declared destination variables and their initial values or requirements; -5. concrete, reference-backed destination columns; and -6. writer ownership for every `(destination_id, variable)` pair. +The Tables.jl path is the general adapter: -Destination status initialization occurs before consumer input compilation. -The compiler must reject a destination variable that cannot be initialized or -validated under the selected policy. +```julia +assign_outputs!(targets, result_table; id=:object_id) +``` -Ordinary same-object outputs stay on their current fast path. They may later be -represented internally as implicit `Self()` output bindings only if that -unification has no common-path cost. +The lower-level path accepts stable columns directly: -## Writer ownership and scheduling +```julia +assign_outputs!(targets, result_ids, result_columns) +``` -Producer inference must query destination ownership rather than only the -applications mounted on the source object. Consequently, a leaf input can find -a scene application that owns `(leaf_id, :absorbed_par)` and schedule after it -without `from_status=true` or a manual `after=` declaration. +Here `result_ids` is an `AbstractVector` and `result_columns` is a +`NamedTuple`. The lower-level overload avoids a Tables.jl adapter but uses the +same validation, identity mapping, and assignment implementation. -Two applications may not own the same `(destination_id, variable)` unless an -existing, explicit update policy correctly defines their order. Combining -independent producers through a reduction is a separate concept and is outside -this design. +Both forms require: -## Coverage and assignment +- one result ID for every current destination; +- no unknown, duplicate, extra, or missing IDs; +- equal lengths for the ID and every declared result column; and +- every variable declared by the `OutputTo` group. -The default assignment policy is exact coverage: +Additional table or `NamedTuple` columns are metadata and are ignored. They +can carry solver-facing values such as `source_element`, `component_index`, or +geometry provenance without becoming status variables. Conversely, omitting a +declared output is an error even when that destination status already has a +value. -- every result ID is known; -- IDs are unique; -- every destination expected by the binding is present; and -- every assigned variable was declared. +No subset or retain-last coverage mode exists. An adapter handles filtered, +abscised, dead, or non-geometrized organs deliberately, or the destination +selector excludes them. -Subset coverage may be added only with an explicit missing-value policy. It -must not silently convert a missing result to zero or retain an old value. -Scientific adapters decide whether a dead, abscised, filtered, or -non-geometrized object should remain a destination. +## Identity and permutation cache -`assign_outputs!` has two paths: +Each compiled output binding stores destination IDs, an ID-to-position index, +and live reference-backed columns. The first assignment validates the result +IDs and compiles either an exact-order marker or a row-to-destination +permutation. -1. a checked Tables.jl-compatible path that validates IDs, columns, and - coverage and compiles a row-to-destination permutation; and -2. a stable bound path that reuses a previously validated identity/order plan - and performs one typed pass over the result columns. +The runtime cache is keyed by object identity of the result ID column. Reusing +the same ID-column object promises that its IDs and order are immutable; the +cache does not rescan or hash its contents on every timestep. Value columns may +be mutated and reused freely. Replace the ID-column object whenever its IDs or +order changes. -Validation should finish before status mutation where possible. A complete copy -of every result column is not required. +This contract applies to both public overloads because the Tables.jl path +extracts its ID column before entering the lower-level implementation. Reusing +a table with the same ID carrier reuses the mapping; constructing a new ID +carrier triggers validation and recompilation. -## Lifecycle +## Atomic validation and aliasing -The scenario application graph and selectors remain immutable. Object -membership may change. +Coverage, column lengths, value conversions, and source/destination aliasing +are checked before any destination status is changed. If mapping validation +fails, the partially reused cache buffers are marked invalid so a later valid +assignment recompiles cleanly. -At a lifecycle barrier, PlantSimEngine refreshes only affected output bindings: +A result column may share destination storage only when all three conditions +hold: -- add or remove destination IDs and reference columns; -- update the ID-to-position index; -- invalidate a cached result permutation when membership changed; -- update writer ownership and consumer scheduling metadata; -- initialize newly declared destination status; and -- add or close retained streams as required. +1. the result IDs are already in exact destination order; +2. the source is the same declared output column; and +3. the source and destination use the same complete mapping. -Ordinary timesteps then return to the cached execution plan without selector -resolution or graph traversal. +Permuted views, partially overlapping views, cross-column aliases, and +permuted self-assignment are rejected. Custom array wrappers that can share +storage must implement Julia's `Base.dataids` and `Base.mightalias` contract so +PlantSimEngine can detect that relationship before mutation. -## Output retention and diagnostics +## Compilation, ownership, and ordinary consumers -Retained streams remain keyed by producing application, destination object, and -variable. Distributed destinations change which object IDs are enumerated, not -the scientific identity of the producer. +For every output group, compilation resolves: -Diagnostics must show: +1. the producing application and execution object; +2. the destination selector and current destination IDs; +3. declared variables and their `Required` or `Default` initialization; +4. concrete reference-backed destination columns; +5. the destination ID index; and +6. writer ownership for every `(destination_id, variable)` pair. -- execution targets separately from output destinations; -- the destination selector and current destination count; -- every distributed writer and any collision; -- lifecycle refreshes and invalidated assignment plans; and -- retention policy and streams for destination objects. +Destination status initialization occurs before consumer input compilation. +Writer collisions are rejected unless an existing `Updates(...; after=...)` +declaration establishes intentional ordering. -`outputs=:none` must not allocate destination-history streams. Final status -inspection remains available because destination statuses are updated directly. +A destination model consumes the value through its ordinary input contract: -## Performance contract +```julia +PlantSimEngine.inputs_(::LeafPhotosynthesis) = ( + absorbed_par=Required(Float64), +) -The implementation must preserve these properties: +ModelSpec( + LeafPhotosynthesis(); + name=:leaf_photosynthesis, + on=Many(scale=:Leaf), +) +``` -- no selector resolution, ID-vector copy, dictionary construction, or table - materialization in the steady-state model call; -- no new work for applications without distributed outputs; -- concrete, columnar destination carriers rather than one type-level tuple - entry per destination object; -- ID indexes and result permutations built at compilation or lifecycle - barriers, not per timestep; -- zero-allocation sequential iteration over homogeneous identity-aware views; - and -- separate measurements for compilation, lifecycle refresh, steady-state - execution, and output collection. +Producer inference finds the scene application that owns +`(leaf_id, :absorbed_par)`, binds the leaf status field, and schedules the +scene writer before the leaf consumer. The consumer does not use +`output_targets`, `from_status=true`, a copy model, or an explicit +`after=:scene_light` dependency. + +## Lifecycle + +The scenario application graph and selectors remain immutable while object +membership may change. At a supported lifecycle barrier, PlantSimEngine: + +- rebuilds affected destination memberships and reference columns; +- rebuilds the destination ID index; +- advances the binding membership generation and invalidates result mappings; +- updates writer ownership and consumer scheduling metadata; +- initializes new destination status variables; and +- opens or closes retained streams as requested. + +An empty destination group remains a typed `OutputTargets` group and can gain +members after organ creation. The next model invocation receives the refreshed +view and recompiles its result mapping. Ordinary timesteps do not resolve the +selector or traverse the graph. + +## Output retention and diagnostics -The baseline and candidate must be measured on the same Julia version, hardware, -thread count, output policy, and repository revisions. Investigate a median -steady-state regression above 2%; do not accept an end-to-end regression above -5% without explicit review. +Retained streams are keyed by producing application, destination object, and +variable. Distributed destinations change which object IDs are enumerated, +not the scientific identity of the producer. + +Use the supported diagnostics rather than inspecting compiled fields: + +- `Diagnostics.explain_output_bindings` shows execution objects, groups, + destination IDs, column carrier types, coverage, and membership generation; +- `Diagnostics.explain_writers` shows the producing application for each + destination variable; +- `Diagnostics.explain_bindings` and `Diagnostics.explain_schedule` show + ordinary consumer coupling and execution order; and +- `Diagnostics.explain_output_retention` shows retained destination streams. + +`outputs=:none` does not allocate destination-history streams. Current values +remain visible through `final_state` because assignment writes directly to +destination statuses. + +## Performance characteristics + +The implementation keeps ordinary applications on their existing path. +Applications without distributed outputs use the empty compiled marker and an +empty output-target tuple; they do not resolve selectors or build assignment +caches. + +For distributed outputs: + +- destination selectors, IDs, indexes, ownership, and columns are compiled + before execution; +- stable ID carriers reuse their exact-order marker or permutation; +- exact-order assignment avoids indexed destination lookup in the write loop; +- homogeneous destination references produce typed `RefVector{T}` columns and + a concrete recursive column loop; +- heterogeneous destination reference types fall back to `ObjectRefVector`, + with conversion against each destination reference; and +- lifecycle changes rebuild only the affected compiled execution targets. + +After warm-up, the stable homogeneous exact-order and permuted columnar paths +can execute without allocations. Heterogeneous destinations preserve correct +per-object types but are an intentionally slower fallback. Benchmark +compilation, lifecycle refresh, steady-state assignment, and output collection +separately when changing these internals. ## Alternatives rejected @@ -231,23 +319,12 @@ make bookkeeping models appear scientifically meaningful. ### Public `CallTargets` reuse `CallTargets` represents executable callee applications and includes model, -environment, status-view, and hard-call state. Distributed outputs need a -lighter columnar destination view. Internal selector and lifecycle cache -patterns can still be shared. +environment, status-view, and hard-call state. Distributed outputs need the +lighter columnar `OutputTargets` view. ### Per-step table join A table join or MTG traversal in every model execution is avoidable work and -makes ordering errors possible. Compile identity mapping once and invalidate it -only when membership changes. - -## Open implementation decisions - -- Final public names after prototype use. -- Whether identity-aware `Many` becomes the default carrier in a later breaking - release. -- Exact subset and missing-value policies. -- Whether local outputs become implicit `Self()` bindings in the first - implementation or a later internal refactor. -- The smallest concrete destination/index representation that preserves current - compiler and runtime performance. +makes ordering errors possible. PlantSimEngine compiles the identity mapping +once per stable ID carrier and invalidates it when destination membership +changes. diff --git a/docs/src/guides/multiscale/value_coupling.md b/docs/src/guides/multiscale/value_coupling.md index 54d48478b..ff75ba093 100644 --- a/docs/src/guides/multiscale/value_coupling.md +++ b/docs/src/guides/multiscale/value_coupling.md @@ -38,3 +38,158 @@ Obtain the view during each model invocation. Lifecycle refresh keeps the current view aligned when possible and may replace it after insertion, removal, or reparenting, so model code must not cache a `BoundMany` across a lifecycle barrier. + +## Publish one computation to many objects + +Some models execute once on a scene or plant but compute one value per organ. +A light model is the typical example: the scene application owns the +calculation and cadence, while each leaf owns its local irradiance values. +Declare that relationship with `outputs_to`, then publish the solver result by +object identity: + +```julia +PlantSimEngine.@process "scene light" verbose = false + +struct SceneLightModel{F} <: AbstractScene_LightModel + solve::F +end + +PlantSimEngine.inputs_(::SceneLightModel) = NamedTuple() +PlantSimEngine.outputs_(::SceneLightModel) = NamedTuple() + +function PlantSimEngine.run!( + model::SceneLightModel, + status, + environment, + constants, + context, +) + targets = output_targets(context, :leaves) + result = model.solve( + runtime_model(context), + environment, + object_ids(targets), + ) + assign_outputs!(targets, result; id=:object_id) + return nothing +end +``` + +Here `solve` is an adapter around the scene solver. It returns any +Tables.jl-compatible value with an `object_id` column and the declared result +columns, for example `incident_par` and `absorbed_par`. Rows may arrive in any +order because `assign_outputs!` maps them to destinations by `ObjectId`. + +Declare the destinations on the scene application: + +```julia +light_application = ModelSpec( + SceneLightModel(solve_light); + name=:scene_light, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=( + incident_par=Default(0.0), + absorbed_par=Default(0.0), + ), + ), + ), +) +``` + +Inside the kernel, `targets.columns.incident_par` and +`targets.columns.absorbed_par` are the live destination carriers. +`object_ids(targets)` is the aligned, read-only identity view. Direct +positional writes are appropriate only when the producing algorithm is already +using that exact identity order; identified external results should go through +`assign_outputs!`. + +## Consume those values normally + +The receiving leaf model remains an ordinary PlantSimEngine model: + +```julia +PlantSimEngine.@process "leaf assimilation" verbose = false + +struct LeafAssimilation <: AbstractLeaf_AssimilationModel end + +PlantSimEngine.inputs_(::LeafAssimilation) = ( + absorbed_par=Required(Float64), +) +PlantSimEngine.outputs_(::LeafAssimilation) = (assimilation=0.0,) + +function PlantSimEngine.run!( + ::LeafAssimilation, + status, + environment, + constants, + context, +) + # This coefficient is arbitrary and only illustrates value coupling. + status.assimilation = 0.01 * status.absorbed_par + return nothing +end + +applications = ( + ModelSpec( + LeafAssimilation(); + name=:leaf_assimilation, + on=Many(scale=:Leaf), + ), + light_application, +) +``` + +The compiler knows that `:scene_light` owns `:absorbed_par` on each selected +leaf. It binds the leaf input and schedules the scene writer before the leaf +consumer even though the consumer appears first in the tuple. No per-leaf copy +model, `from_status=true`, or manual `after=:scene_light` declaration is +needed. + +## Assignment contract + +`assign_outputs!` supports two public forms: + +```julia +assign_outputs!(targets, result_table; id=:object_id) +assign_outputs!(targets, result_ids, result_columns) +``` + +The first accepts any Tables.jl-compatible column or row table. The second +accepts an `AbstractVector` of IDs and a `NamedTuple` of columns, avoiding the +table adapter on a stable columnar path. Both forms use the same rules: + +| Result content | Behavior | +|---|---| +| One row for every current destination | Required | +| Unknown, duplicate, extra, or missing IDs | Rejected before mutation | +| Every variable declared by `OutputTo` | Required | +| Additional columns such as solver metadata | Ignored | +| Source columns overlapping destination storage | Rejected, except exact-order self-assignment of the same column | + +Only `coverage=:exact` is supported. A filtered, abscised, or non-geometrized +organ must therefore be handled deliberately by the scene adapter or excluded +by the destination selector; PlantSimEngine never silently retains an old +value or substitutes zero for a missing result. + +## Reuse stable columns efficiently + +PlantSimEngine caches the result-row permutation by the identity of the ID +column. Reusing the same ID vector promises that its IDs and order remain +unchanged; mutate only the result value columns in place. Replace the ID vector +when membership or ordering changes. A lifecycle refresh invalidates this +cache automatically, and the next invocation rebuilds it against the refreshed +destinations. + +Homogeneous destination values use typed `RefVector` columns and the stable +exact-order path can run without allocations after compilation. If selected +statuses hold different concrete value types, PlantSimEngine falls back to an +`ObjectRefVector` and converts against each destination reference. The public +API is identical, but the homogeneous representation is the performance path +to prefer for large per-organ assignments. + +Like `BoundMany`, an `OutputTargets` view belongs to the current invocation and +lifecycle generation. Obtain it from `RunContext` each time rather than storing +it in the model. From 55530eb5983ef8dfccec862ea0b1761abaa63eb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Sun, 23 Aug 2026 16:23:42 +0200 Subject: [PATCH 13/45] feat: resolve registered source object identities --- docs/src/API/API_public.md | 6 + docs/src/API/public_symbols.md | 4 +- src/PlantSimEngine.jl | 2 +- src/composite_model/registry_topology.jl | 200 ++++++++++++++++- src/composite_model/runtime_outputs.jl | 4 +- test/runtests.jl | 4 + test/test-model-api-stabilization.jl | 1 + test/test-model-object-id.jl | 270 +++++++++++++++++++++++ 8 files changed, 477 insertions(+), 14 deletions(-) create mode 100644 test/test-model-object-id.jl diff --git a/docs/src/API/API_public.md b/docs/src/API/API_public.md index d185c232d..c7bf3f887 100644 --- a/docs/src/API/API_public.md +++ b/docs/src/API/API_public.md @@ -8,6 +8,12 @@ - `CompositeModel(model, models...; status=..., timestep=...)` is the concise one-object form and lowers to the same object/application representation. - `Object` represents one runtime entity with stable identity and status. +- `object_id(model, source)` resolves an `ObjectId`, registered `Object` or + `Status`, MTG node, or raw identifier against the live registry. MTG nodes + retain the exact identity assigned by the model's `id=` accessor during + adaptation or organogenesis; `object_id` does not reevaluate that accessor, + and copied or foreign nodes are rejected. The same methods accept a + `RunContext` or `Simulation`. - `CompositeModelTemplate` and `ObjectInstance` reuse a model across instances. - `ModelSpec(model; name=..., on=..., inputs=..., calls=..., outputs_to=..., every=..., environment=..., output_routing=..., updates=...)` is the one diff --git a/docs/src/API/public_symbols.md b/docs/src/API/public_symbols.md index be912e9df..d99ebb4ee 100644 --- a/docs/src/API/public_symbols.md +++ b/docs/src/API/public_symbols.md @@ -26,8 +26,8 @@ explicitly imports one of those submodules. `Scope`, `Relation`. - Label criteria are selector keywords: `kind`, `species`, `scale`, and `name`. -- Queries: `object_ids`, `model_objects`, `resolve_object_ids`, - `resolve_objects`. +- Identity and queries: `object_id`, `object_ids`, `model_objects`, + `resolve_object_ids`, `resolve_objects`. - Object data: `geometry`, `position`, `bounds`. ## Execution, lifecycle, and outputs diff --git a/src/PlantSimEngine.jl b/src/PlantSimEngine.jl index 6b5ee3aec..8c4cd4f79 100644 --- a/src/PlantSimEngine.jl +++ b/src/PlantSimEngine.jl @@ -315,7 +315,7 @@ export OutputRequest, collect_outputs export CompositeModel, Object, ObjectId, CompositeModelTemplate, ObjectInstance, Override export add_organ!, register_object!, remove_object!, reparent_object!, move_object!, update_geometry! export mark_environment_binding_dirty! -export objects_from_mtg, object_ids, model_object, model_objects, resolve_object_ids, resolve_objects +export objects_from_mtg, object_id, object_ids, model_object, model_objects, resolve_object_ids, resolve_objects export geometry, position, bounds export RunContext, CallTarget, CallTargets, Simulation, BoundMany, OutputTargets export runtime_model, current_step, final_state, outputs diff --git a/src/composite_model/registry_topology.jl b/src/composite_model/registry_topology.jl index 46c691109..fb1b2e0d8 100644 --- a/src/composite_model/registry_topology.jl +++ b/src/composite_model/registry_topology.jl @@ -205,7 +205,20 @@ ObjectRegistry() = ObjectRegistry( Dict{ObjectId,Vector{ObjectId}}(), ) -struct MTGObjectAdapter{I,S,K,SP,N,G,ST} +# Standalone projection deliberately carries accessors only. Lifecycle identity +# indexes belong exclusively to `MTGObjectAdapter`, which a CompositeModel keeps. +struct MTGObjectAccessors{I,S,K,SP,N,G,ST} + id::I + scale::S + kind::K + species::SP + name::N + geometry::G + status::ST +end + +struct MTGObjectAdapter{R,I,S,K,SP,N,G,ST} + root::R id::I scale::S kind::K @@ -214,6 +227,54 @@ struct MTGObjectAdapter{I,S,K,SP,N,G,ST} geometry::G status::ST max_node_id::Base.RefValue{Int} + object_ids_by_node::IdDict{Any,ObjectId} + nodes_by_object_id::Dict{ObjectId,Any} +end + +function _register_mtg_object_identity!(adapter::MTGObjectAdapter, node) + haskey(adapter.object_ids_by_node, node) && error( + "MTG node $(MultiScaleTreeGraph.node_id(node)) is already registered by this model.", + ) + id = ObjectId(adapter.id(node)) + if haskey(adapter.nodes_by_object_id, id) + existing = adapter.nodes_by_object_id[id] + error( + "The MTG id accessor maps nodes " * + "$(MultiScaleTreeGraph.node_id(existing)) and " * + "$(MultiScaleTreeGraph.node_id(node)) to duplicate ObjectId `$(id.value)`.", + ) + end + adapter.object_ids_by_node[node] = id + adapter.nodes_by_object_id[id] = node + return id +end + +function _unregister_mtg_object_identity!(adapter::MTGObjectAdapter, node) + haskey(adapter.object_ids_by_node, node) || return nothing + id = pop!(adapter.object_ids_by_node, node) + if get(adapter.nodes_by_object_id, id, nothing) === node + delete!(adapter.nodes_by_object_id, id) + end + return id +end + +function _unregister_mtg_object_identity!(adapter::MTGObjectAdapter, id::ObjectId) + haskey(adapter.nodes_by_object_id, id) || return nothing + node = pop!(adapter.nodes_by_object_id, id) + if haskey(adapter.object_ids_by_node, node) && + isequal(adapter.object_ids_by_node[node], id) + delete!(adapter.object_ids_by_node, node) + end + return node +end + +@inline function _mtg_object_id(adapter::MTGObjectAdapter, node) + haskey(adapter.object_ids_by_node, node) || throw( + ArgumentError( + "MTG node $(MultiScaleTreeGraph.node_id(node)) is not registered by this model.", + ), + ) + return adapter.object_ids_by_node[node] end """Labels and topology captured for one object at a lifecycle event.""" @@ -574,7 +635,9 @@ end Adapt one MTG subtree to model `Object` values. The MTG is traversed once; node ids and parent relations become stable model-object identities and relations. Accessors may attach labels, geometry, and existing status objects -without prescribing a plant architecture. +without prescribing a plant architecture. This standalone projection retains +no lifecycle identity index; construct `CompositeModel(root)` when later node +resolution or organogenesis is required. """ function objects_from_mtg( root::MultiScaleTreeGraph.Node; @@ -586,7 +649,7 @@ function objects_from_mtg( geometry=node -> _mtg_attribute(node, :geometry, nothing), status=node -> _mtg_attribute(node, :plantsimengine_status, nothing), ) - adapter = MTGObjectAdapter( + accessors = MTGObjectAccessors( id, scale, kind, @@ -594,20 +657,44 @@ function objects_from_mtg( name, geometry, status, - Ref(MultiScaleTreeGraph.max_id(root)), ) - return _objects_from_mtg(root, adapter) + return _objects_from_mtg(root, accessors) +end + +function _objects_from_mtg(root::MultiScaleTreeGraph.Node, accessors::MTGObjectAccessors) + objects = Object[] + MultiScaleTreeGraph.traverse!(root) do node + node_parent = parent(node) + parent_id = + node === root || isnothing(node_parent) ? nothing : accessors.id(node_parent) + push!( + objects, + Object( + accessors.id(node); + scale=accessors.scale(node), + kind=accessors.kind(node), + species=accessors.species(node), + name=accessors.name(node), + parent=parent_id, + geometry=accessors.geometry(node), + status=accessors.status(node), + ), + ) + end + return objects end function _objects_from_mtg(root::MultiScaleTreeGraph.Node, adapter::MTGObjectAdapter) objects = Object[] MultiScaleTreeGraph.traverse!(root) do node + id = _register_mtg_object_identity!(adapter, node) node_parent = parent(node) - parent_id = node === root || isnothing(node_parent) ? nothing : adapter.id(node_parent) + parent_id = + node === root || isnothing(node_parent) ? nothing : _mtg_object_id(adapter, node_parent) push!( objects, Object( - adapter.id(node); + id; scale=adapter.scale(node), kind=adapter.kind(node), species=adapter.species(node), @@ -642,6 +729,7 @@ function CompositeModel( status=node -> _mtg_attribute(node, :plantsimengine_status, nothing), ) adapter = MTGObjectAdapter( + root, id, scale, kind, @@ -650,6 +738,8 @@ function CompositeModel( geometry, status, Ref(MultiScaleTreeGraph.max_id(root)), + IdDict{Any,ObjectId}(), + Dict{ObjectId,Any}(), ) objects = _objects_from_mtg(root, adapter) return CompositeModel( @@ -821,6 +911,90 @@ when the registry contains no matching object. """ model_object(model::CompositeModel, id) = _model_object(model, id) +@inline function _registered_object_id(model::CompositeModel, id::ObjectId) + _model_object(model, id) + return id +end + +""" + object_id(model::CompositeModel, source) -> ObjectId + +Return the registered [`ObjectId`](@ref) represented by `source`. + +`source` may be an `ObjectId`, a registered [`Object`](@ref), a registered +[`Status`](@ref), an MTG node, or the raw value used to construct an +`ObjectId`. For an MTG model, the `id=` accessor is evaluated during initial +adaptation or organogenesis and the exact node-to-`ObjectId` association is +retained; `object_id` does not reevaluate the accessor. Later changes to a +node's attributes or raw MTG id therefore do not change its model identity. A +node from a copied or foreign MTG is rejected even when its raw node id is +identical. + +Every result is checked against the live object registry. Removed or unknown +objects therefore raise an error instead of returning a stale identity. +[`RunContext`](@ref) and [`Simulation`](@ref) delegate to their live model. +""" +object_id(model::CompositeModel, id::ObjectId) = _registered_object_id(model, id) + +function object_id(model::CompositeModel, object::Object) + registered = _model_object(model, object.id) + registered === object || throw( + ArgumentError( + "Object `$(object.id.value)` is not the Object instance registered by this model.", + ), + ) + return object.id +end + +function object_id(model::CompositeModel, status::Status) + matched_id = nothing + for object in values(model.registry.objects) + object.status === status || continue + isnothing(matched_id) || throw( + ArgumentError( + "The same Status instance is registered by more than one model object; " * + "resolve the intended Object or ObjectId explicitly.", + ), + ) + matched_id = object.id + end + isnothing(matched_id) && throw( + ArgumentError("The supplied Status instance is not registered by this model."), + ) + + adapter = model.source_adapter + if adapter isa MTGObjectAdapter && hasproperty(status, :node) + node = status.node + node isa MultiScaleTreeGraph.Node || throw( + ArgumentError( + "A registered MTG Status must expose its source Node as `status.node`; " * + "got $(typeof(node)).", + ), + ) + id = object_id(model, node) + id == matched_id || throw( + ArgumentError( + "Status `node` resolves to object `$(id.value)`, but this Status " * + "instance is registered by object `$(matched_id.value)`.", + ), + ) + end + return matched_id +end + +function object_id(model::CompositeModel, node::MultiScaleTreeGraph.Node) + adapter = model.source_adapter + adapter isa MTGObjectAdapter || throw( + ArgumentError( + "An MTG Node can only be resolved by a CompositeModel constructed from an MTG.", + ), + ) + return _registered_object_id(model, _mtg_object_id(adapter, node)) +end + +object_id(model::CompositeModel, id) = + _registered_object_id(model, ObjectId(id)) + function _object_ancestor_ids( registry::ObjectRegistry, object_id::ObjectId, @@ -1015,8 +1189,9 @@ function add_organ!( "`add_organ!` requires a model constructed from an MTG. Use ", "`register_object!` for composite models built directly from `Object` values." ) - parent_id = ObjectId(adapter.id(parent_node)) - _model_object(model, parent_id) + # Resolve the exact registered node before advancing ids or mutating either + # the source MTG or the runtime registry. + parent_id = object_id(model, parent_node) root = MultiScaleTreeGraph.get_root(parent_node) node_id = if isnothing(id) # `max_node_id` is initialized from the complete source MTG and is @@ -1044,10 +1219,11 @@ function add_organ!( attributes, ) try + new_object_id = _register_mtg_object_identity!(adapter, node) status = _organ_status(adapter, node, initial_status) node[:plantsimengine_status] = status object = Object( - adapter.id(node); + new_object_id; scale=adapter.scale(node), kind=isnothing(kind) ? adapter.kind(node) : kind, species=isnothing(species) ? adapter.species(node) : species, @@ -1059,6 +1235,7 @@ function add_organ!( register_object!(model, object) return status catch + _unregister_mtg_object_identity!(adapter, node) MultiScaleTreeGraph.delete_node!(node) rethrow() end @@ -1120,8 +1297,11 @@ function remove_object!(model::CompositeModel, id; recursive::Bool=true) for object_id in descendant_ids ] _remove_child_link!(model, object.parent, object.id) + adapter = model.source_adapter for object_id in Iterators.reverse(descendant_ids) removed = _model_object(model, object_id) + adapter isa MTGObjectAdapter && + _unregister_mtg_object_identity!(adapter, object_id) _deindex_object!(model.registry, removed) delete!(model.registry.objects, object_id) delete!(model.registry.ancestor_ids_by_object, object_id) diff --git a/src/composite_model/runtime_outputs.jl b/src/composite_model/runtime_outputs.jl index e2c67c50f..0bd658ec4 100644 --- a/src/composite_model/runtime_outputs.jl +++ b/src/composite_model/runtime_outputs.jl @@ -883,6 +883,8 @@ runtime_model(model::CompositeModel) = model runtime_model(context::RunContext) = context.compiled.model runtime_model(target::CallTarget) = target.model runtime_model(simulation::Simulation) = simulation.model +object_id(context::RunContext, source) = object_id(runtime_model(context), source) +object_id(simulation::Simulation, source) = object_id(runtime_model(simulation), source) current_step(simulation::Simulation) = simulation.current_step outputs(sim::Simulation) = sim.temporal_streams @@ -4301,7 +4303,7 @@ function _call_target_object_id(model::CompositeModel, target) end adapter = model.source_adapter if adapter isa MTGObjectAdapter && target isa MultiScaleTreeGraph.Node - return ObjectId(adapter.id(target)) + return _mtg_object_id(adapter, target) end return ObjectId(target) end diff --git a/test/runtests.jl b/test/runtests.jl index 841e00a71..5a09649ad 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -34,6 +34,10 @@ else include("test-unified-model-object-api.jl") end + @testset "Registered object identity" begin + include("test-model-object-id.jl") + end + @testset "Composite Model/Object API stabilization" begin include("test-model-api-stabilization.jl") end diff --git a/test/test-model-api-stabilization.jl b/test/test-model-api-stabilization.jl index c18e615ef..da0bed0a8 100644 --- a/test/test-model-api-stabilization.jl +++ b/test/test-model-api-stabilization.jl @@ -259,6 +259,7 @@ end :model_object, :model_objects, :move_object!, + :object_id, :object_ids, :objects_from_mtg, :output_policy, diff --git a/test/test-model-object-id.jl b/test/test-model-object-id.jl new file mode 100644 index 000000000..c81d8d78a --- /dev/null +++ b/test/test-model-object-id.jl @@ -0,0 +1,270 @@ +PlantSimEngine.@process "object_identity_probe" verbose = false + +struct ObjectIdentityProbeModel{N,I} <: AbstractObject_Identity_ProbeModel + source::N + expected::I +end + +PlantSimEngine.inputs_(::ObjectIdentityProbeModel) = NamedTuple() +PlantSimEngine.outputs_(::ObjectIdentityProbeModel) = (matches=false,) + +function PlantSimEngine.run!( + model::ObjectIdentityProbeModel, + status, + environment, + constants, + context, +) + status.matches = object_id(context, model.source) == model.expected + return nothing +end + +function _registered_object_id_allocations(model, id) + object_id(model, id) + return @allocated object_id(model, id) +end + +_object_identity_nothing(node) = nothing + +function _object_identity_reference_objects_from_mtg(root) + objects = Object[] + MultiScaleTreeGraph.traverse!(root) do node + node_parent = MultiScaleTreeGraph.parent(node) + parent_id = node === root || isnothing(node_parent) ? + nothing : MultiScaleTreeGraph.node_id(node_parent) + push!( + objects, + Object( + MultiScaleTreeGraph.node_id(node); + scale=MultiScaleTreeGraph.symbol(node), + kind=nothing, + species=nothing, + name=nothing, + parent=parent_id, + geometry=nothing, + status=nothing, + ), + ) + end + return objects +end + +function _object_identity_standalone_objects_from_mtg(root) + return objects_from_mtg( + root; + kind=_object_identity_nothing, + species=_object_identity_nothing, + name=_object_identity_nothing, + geometry=_object_identity_nothing, + status=_object_identity_nothing, + ) +end + +function _object_identity_projection_allocations(f, root) + f(root) + return minimum(@allocated(f(root)) for _ in 1:3) +end + +@testset "standalone MTG projection stays lightweight" begin + root = Node(MultiScaleTreeGraph.NodeMTG("/", :Scene, 1, 0)) + for index in 1:128 + Node(root, MultiScaleTreeGraph.NodeMTG("+", :Leaf, index, 1)) + end + + reference_allocations = _object_identity_projection_allocations( + _object_identity_reference_objects_from_mtg, + root, + ) + standalone_allocations = _object_identity_projection_allocations( + _object_identity_standalone_objects_from_mtg, + root, + ) + @test standalone_allocations <= reference_allocations + 4_096 +end + +@testset "registered object identity resolution" begin + root = Node(MultiScaleTreeGraph.NodeMTG("/", :Scene, 1, 0)) + plant = Node(root, MultiScaleTreeGraph.NodeMTG("+", :Plant, 1, 1)) + leaf = Node(plant, MultiScaleTreeGraph.NodeMTG("+", :Leaf, 1, 2)) + mtg_id = node -> (MultiScaleTreeGraph.symbol(node), MultiScaleTreeGraph.node_id(node)) + leaf_id = ObjectId((:Leaf, MultiScaleTreeGraph.node_id(leaf))) + adapted = objects_from_mtg(root; id=mtg_id) + @test only(object for object in adapted if object.id == leaf_id).scale == :Leaf + + model = CompositeModel( + root; + id=mtg_id, + applications=( + ModelSpec( + ObjectIdentityProbeModel(leaf, leaf_id); + name=:object_identity_probe, + on=One(scale=:Scene), + ), + ), + ) + + registered_leaf = model_object(model, leaf_id) + @test object_id(model, leaf_id) == leaf_id + @test _registered_object_id_allocations(model, leaf_id) == 0 + @test object_id(model, leaf_id.value) == leaf_id + @test object_id(model, registered_leaf) == leaf_id + @test object_id(model, leaf) == leaf_id + @test _registered_object_id_allocations(model, leaf) == 0 + + copied_root = deepcopy(root) + copied_leaf = MultiScaleTreeGraph.get_node( + copied_root, + MultiScaleTreeGraph.node_id(leaf), + ) + copied_plant = MultiScaleTreeGraph.get_node( + copied_root, + MultiScaleTreeGraph.node_id(plant), + ) + @test mtg_id(copied_leaf) == mtg_id(leaf) + @test_throws ArgumentError object_id(model, copied_leaf) + @test_throws ArgumentError object_id( + model, + Object(leaf_id.value; scale=:Leaf), + ) + @test_throws ErrorException object_id(model, (:Leaf, 999)) + + copied_child_count = length(MultiScaleTreeGraph.children(copied_plant)) + registered_before = object_ids(model) + @test_throws ArgumentError add_organ!( + copied_plant, + model, + :+, + :Leaf, + 2; + index=2, + initial_status=(signal=0.0,), + ) + @test length(MultiScaleTreeGraph.children(copied_plant)) == copied_child_count + @test object_ids(model) == registered_before + + new_leaf_status = add_organ!( + plant, + model, + :+, + :Leaf, + 2; + index=2, + initial_status=(signal=0.0,), + ) + new_leaf_id = ObjectId((:Leaf, 4)) + @test MultiScaleTreeGraph.node_id(new_leaf_status.node) == 4 + @test object_id(model, new_leaf_status) == new_leaf_id + @test object_id(model, new_leaf_status.node) == new_leaf_id + + simulation = run!(model; steps=1, outputs=:none) + @test model_object(model, (:Scene, 1)).status.matches + @test object_id(simulation, leaf) == leaf_id + + remove_object!(model, leaf_id) + @test_throws ErrorException object_id(model, leaf_id) + @test_throws ArgumentError object_id(model, leaf) +end + +@testset "MTG identities remain stable after source mutation" begin + root = Node(MultiScaleTreeGraph.NodeMTG("/", :Scene, 1, 0)) + plant = Node(root, MultiScaleTreeGraph.NodeMTG("+", :Plant, 1, 1)) + leaf_a = Node(plant, MultiScaleTreeGraph.NodeMTG("+", :Leaf, 1, 2)) + leaf_b = Node(plant, MultiScaleTreeGraph.NodeMTG("+", :Leaf, 2, 2)) + runtime_ids = IdDict{Any,Symbol}( + root => :scene, + plant => :plant, + leaf_a => :leaf_a, + leaf_b => :leaf_b, + ) + mutable_id = node -> (runtime_ids[node], MultiScaleTreeGraph.node_id(node)) + model = CompositeModel(root; id=mutable_id) + leaf_a_id = ObjectId((:leaf_a, 3)) + leaf_b_id = ObjectId((:leaf_b, 4)) + + @test object_id(model, leaf_a) == leaf_a_id + @test object_id(model, leaf_b) == leaf_b_id + runtime_ids[leaf_a] = :leaf_b + setfield!(leaf_a, :id, 4) + @test mutable_id(leaf_a) == leaf_b_id.value + @test object_id(model, leaf_a) == leaf_a_id + @test object_id(model, leaf_b) == leaf_b_id + setfield!(leaf_b, :id, 999) + @test MultiScaleTreeGraph.node_id(leaf_b) == 999 + @test object_id(model, leaf_a) == leaf_a_id + @test object_id(model, leaf_b) == leaf_b_id + @test _registered_object_id_allocations(model, leaf_a) == 0 + @test _registered_object_id_allocations(model, leaf_b) == 0 + + duplicate_root = Node(MultiScaleTreeGraph.NodeMTG("/", :Scene, 1, 0)) + Node(duplicate_root, MultiScaleTreeGraph.NodeMTG("+", :Plant, 1, 1)) + @test_throws ErrorException CompositeModel(duplicate_root; id=_ -> :duplicate) +end + +@testset "removed MTG identities can be reused by new nodes" begin + root = Node( + MultiScaleTreeGraph.NodeMTG("/", :Scene, 1, 0), + (runtime_id=:scene,), + ) + plant = Node( + root, + MultiScaleTreeGraph.NodeMTG("+", :Plant, 1, 1), + (runtime_id=:plant,), + ) + old_leaf = Node( + plant, + MultiScaleTreeGraph.NodeMTG("+", :Leaf, 1, 2), + (runtime_id=:reusable_leaf,), + ) + model = CompositeModel(root; id=node -> node[:runtime_id]) + reusable_id = ObjectId(:reusable_leaf) + old_raw_id = MultiScaleTreeGraph.node_id(old_leaf) + + remove_object!(model, reusable_id) + @test_throws ArgumentError object_id(model, old_leaf) + + new_leaf_status = add_organ!( + plant, + model, + :+, + :Leaf, + 2; + index=2, + id=10, + attributes=(runtime_id=:reusable_leaf,), + initial_status=(signal=0.0,), + ) + @test new_leaf_status.node !== old_leaf + @test MultiScaleTreeGraph.node_id(new_leaf_status.node) != old_raw_id + @test object_id(model, new_leaf_status.node) == reusable_id + @test_throws ArgumentError object_id(model, old_leaf) +end + +@testset "registered Status identity resolution" begin + status = Status(signal=1.0) + object = Object(:leaf; scale=:Leaf, status=status) + model = CompositeModel(object) + + @test object_id(model, status) == ObjectId(:leaf) + @test object_id(model, object) == ObjectId(:leaf) + foreign_mtg = Node(MultiScaleTreeGraph.NodeMTG("/", :Leaf, 1, 1)) + @test_throws ArgumentError object_id(model, foreign_mtg) + @test_throws ArgumentError object_id(model, Status(signal=1.0)) + + shared_status = Status(signal=2.0) + ambiguous = CompositeModel( + Object(:scene; scale=:Scene), + Object(:leaf_a; scale=:Leaf, parent=:scene, status=shared_status), + Object(:leaf_b; scale=:Leaf, parent=:scene, status=shared_status), + ) + @test_throws ArgumentError object_id(ambiguous, shared_status) + + mtg_root = Node(MultiScaleTreeGraph.NodeMTG("/", :Scene, 1, 0)) + mtg_plant = Node(mtg_root, MultiScaleTreeGraph.NodeMTG("+", :Plant, 1, 1)) + mtg_leaf_a = Node(mtg_plant, MultiScaleTreeGraph.NodeMTG("+", :Leaf, 1, 2)) + mtg_leaf_b = Node(mtg_plant, MultiScaleTreeGraph.NodeMTG("+", :Leaf, 2, 2)) + shared_mtg_status = Status(node=mtg_leaf_a, signal=3.0) + mtg_leaf_a[:plantsimengine_status] = shared_mtg_status + mtg_leaf_b[:plantsimengine_status] = shared_mtg_status + ambiguous_mtg = CompositeModel(mtg_root) + @test_throws ArgumentError object_id(ambiguous_mtg, shared_mtg_status) +end From 6f8dcdd5df2d8f51999970fe7bf94c892cff0f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Sun, 23 Aug 2026 19:30:17 +0200 Subject: [PATCH 14/45] perf: eliminate wide output alias allocations --- src/composite_model/output_targets.jl | 94 ++++++++++----------------- test/test-model-output-targets-api.jl | 71 ++++++++++++++++++++ 2 files changed, 106 insertions(+), 59 deletions(-) diff --git a/src/composite_model/output_targets.jl b/src/composite_model/output_targets.jl index 1fd8e6f56..f61515b37 100644 --- a/src/composite_model/output_targets.jl +++ b/src/composite_model/output_targets.jl @@ -375,74 +375,51 @@ _output_columns_might_alias( parent(destination) === parent(source) || Base.mightalias(destination, source) -@inline _validate_output_source_aliasing( - ::Tuple{}, - source, - targets, - exact_order::Bool, - ::Val{destination_index}, - ::Val{source_index}, -) where {destination_index,source_index} = nothing +@noinline function _throw_output_source_alias_error(targets) + throw(ArgumentError( + "Assignment for $(_output_target_context(targets)) cannot use " * + "a differently ordered or partially overlapping output " * + "destination column as its result source.", + )) +end -@inline function _validate_output_source_aliasing( - destinations::Tuple, +@inline function _validate_output_alias_pair( + destination, source, targets, exact_order::Bool, - ::Val{destination_index}, - ::Val{source_index}, -) where {destination_index,source_index} - destination = first(destinations) + ::Val{same_position}, +) where {same_position} aliases = _output_columns_might_alias(destination, source) - safe_alias = exact_order && destination_index == source_index && + safe_alias = exact_order && same_position && _output_columns_same_mapping(destination, source) - aliases && !safe_alias && throw( - ArgumentError( - "Assignment for $(_output_target_context(targets)) cannot use " * - "a differently ordered or partially overlapping output " * - "destination column as its result source.", - ), - ) - return _validate_output_source_aliasing( - Base.tail(destinations), - source, - targets, - exact_order, - Val(destination_index + 1), - Val(source_index), - ) + aliases && !safe_alias && _throw_output_source_alias_error(targets) + return nothing end -@inline _validate_output_aliasing_columns( - all_destinations::Tuple, - ::Tuple{}, +@generated function _validate_output_aliasing_columns( + destinations::Destinations, + sources::Sources, targets, exact_order::Bool, - ::Val{source_index}, -) where {source_index} = nothing - -@inline function _validate_output_aliasing_columns( - all_destinations::Tuple, - sources::Tuple, - targets, - exact_order::Bool, - ::Val{source_index}, -) where {source_index} - _validate_output_source_aliasing( - all_destinations, - first(sources), - targets, - exact_order, - Val(1), - Val(source_index), - ) - return _validate_output_aliasing_columns( - all_destinations, - Base.tail(sources), - targets, - exact_order, - Val(source_index + 1), - ) +) where {Destinations<:Tuple,Sources<:Tuple} + validations = Any[] + for source_index in 1:fieldcount(Sources) + for destination_index in 1:fieldcount(Destinations) + same_position = destination_index == source_index + push!(validations, :( + _validate_output_alias_pair( + getfield(destinations, $destination_index), + getfield(sources, $source_index), + targets, + exact_order, + Val($same_position), + ) + )) + end + end + push!(validations, :(nothing)) + return Expr(:block, validations...) end function _validate_output_aliasing( @@ -456,7 +433,6 @@ function _validate_output_aliasing( values(sources), targets, cache.exact_order, - Val(1), ) end diff --git a/test/test-model-output-targets-api.jl b/test/test-model-output-targets-api.jl index e10970042..24ec27a69 100644 --- a/test/test-model-output-targets-api.jl +++ b/test/test-model-output-targets-api.jl @@ -139,6 +139,28 @@ function output_targets_api_capture(action) end end +const OUTPUT_TARGETS_API_SEVEN_NAMES = ntuple( + index -> Symbol(:output_, index), + 7, +) +const OUTPUT_TARGETS_API_NINETEEN_NAMES = ntuple( + index -> Symbol(:output_, index), + 19, +) + +function output_targets_api_wide_vars(names) + return NamedTuple{names}(ntuple(_ -> Default(0.0), length(names))) +end + +function output_targets_api_wide_columns(names) + return NamedTuple{names}( + ntuple( + index -> Float64[index, index + 100], + length(names), + ), + ) +end + @testset "public OutputTargets view and Tables column assignment" begin table = ( object_id=ObjectId[ObjectId(:leaf_b), ObjectId(:leaf_a)], @@ -203,6 +225,55 @@ end @test final_state(simulation, :leaf_b).absorbed_par == 4.0 end +@testset "wide identified assignments are allocation-free after warmup" begin + for names in ( + OUTPUT_TARGETS_API_SEVEN_NAMES, + OUTPUT_TARGETS_API_NINETEEN_NAMES, + ) + exact_ids = ObjectId[ObjectId(:leaf_a), ObjectId(:leaf_b)] + permuted_ids = reverse(exact_ids) + exact_columns = output_targets_api_wide_columns(names) + permuted_columns = NamedTuple{names}( + map(reverse, values(exact_columns)), + ) + exact_allocations = Ref(-1) + permuted_allocations = Ref(-1) + writer = OutputTargetsApiActionModel() do context + targets = output_targets(context, :organs) + + assign_outputs!(targets, exact_ids, exact_columns) + exact_allocations[] = @allocated assign_outputs!( + targets, + exact_ids, + exact_columns, + ) + + assign_outputs!(targets, permuted_ids, permuted_columns) + permuted_allocations[] = @allocated assign_outputs!( + targets, + permuted_ids, + permuted_columns, + ) + end + model = output_targets_api_scene( + writer; + vars=output_targets_api_wide_vars(names), + ) + simulation = run!(model; outputs=:none) + + @test exact_allocations[] == 0 + @test permuted_allocations[] == 0 + @test getproperty( + final_state(simulation, :leaf_a), + first(names), + ) == 1.0 + @test getproperty( + final_state(simulation, :leaf_b), + first(names), + ) == 101.0 + end +end + @testset "output_targets lookup validation" begin lookup_errors = Any[] writer = OutputTargetsApiActionModel() do context From f4930fe5e96e8c0ca93027b66d291c12e7f436bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Sun, 23 Aug 2026 19:30:35 +0200 Subject: [PATCH 15/45] benchmark: cover wide identified output assignment --- benchmark/benchmarks.jl | 10 ++++ .../test-distributed-output-benchmark.jl | 50 +++++++++++++++++++ benchmark/test/runtests.jl | 8 +++ 3 files changed, 68 insertions(+) diff --git a/benchmark/benchmarks.jl b/benchmark/benchmarks.jl index e999b9604..bf9731c3c 100644 --- a/benchmark/benchmarks.jl +++ b/benchmark/benchmarks.jl @@ -208,6 +208,16 @@ if SUPPORTS_COMPOSITE_OBJECT_BENCHMARKS order=:exact, path=$path, heterogeneous=true, + )) evals = 1 + end + for ncolumns in (7, 19) + SUITE[suite_name]["PSE_assign_outputs_columns_$(ncolumns)columns_exact_1000"] = + @benchmarkable benchmark_distributed_output_public_assignment_step( + simulation, + ) setup = (simulation = + setup_distributed_output_wide_assignment_benchmark( + 1_000; + ncolumns=$ncolumns, )) evals = 1 end end diff --git a/benchmark/test-distributed-output-benchmark.jl b/benchmark/test-distributed-output-benchmark.jl index 4cf7c266c..8c519ef49 100644 --- a/benchmark/test-distributed-output-benchmark.jl +++ b/benchmark/test-distributed-output-benchmark.jl @@ -493,6 +493,56 @@ function setup_distributed_output_public_assignment_benchmark( return simulation end +function setup_distributed_output_wide_assignment_benchmark( + nobjects::Int=1_000; + ncolumns::Int=7, +) + ncolumns > 0 || throw(ArgumentError("`ncolumns` must be positive.")) + data = setup_distributed_output_benchmark(nobjects) + names = ntuple(index -> Symbol(:output_, index), ncolumns) + columns = NamedTuple{names}( + ntuple(index -> fill(Float64(index), nobjects), ncolumns), + ) + output_variables = NamedTuple{names}( + ntuple(_ -> Default(0.0), ncolumns), + ) + objects = Object[Object(:scene; scale=:Scene)] + sizehint!(objects, nobjects + 1) + for object_id in data.object_ids + push!( + objects, + Object( + object_id.value; + scale=:Leaf, + parent=:scene, + ), + ) + end + writer = DistributedOutputBenchmarkAssignmentModel( + nothing, + data.object_ids, + columns, + Val(:columns), + ) + model = CompositeModel( + objects...; + applications=( + ModelSpec( + writer; + name=:scene_wide_assignment, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=output_variables, + ), + ), + ), + ), + ) + return run!(model; outputs=:none) +end + benchmark_distributed_output_public_assignment_step(simulation) = continue!(simulation; steps=1) diff --git a/benchmark/test/runtests.jl b/benchmark/test/runtests.jl index 5b734a4c2..df71259c2 100644 --- a/benchmark/test/runtests.jl +++ b/benchmark/test/runtests.jl @@ -749,6 +749,14 @@ if benchmark_test_enabled("internal-only benchmark suite assembly smoke") suite, "PSE_assign_outputs_columns_heterogeneous_exact_1000", ) + @test haskey( + suite, + "PSE_assign_outputs_columns_7columns_exact_1000", + ) + @test haskey( + suite, + "PSE_assign_outputs_columns_19columns_exact_1000", + ) end @test !haskey(suite, "PBP") @test !haskey(suite, "PBP_batch_run") From e3568c0898aa33d76b0a9f24a0f185f015dee419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Sun, 23 Aug 2026 22:36:55 +0200 Subject: [PATCH 16/45] perf: materialize heterogeneous temporal inputs without allocations --- src/composite_model/runtime_outputs.jl | 60 ++++++++++++--- test/test-model-previous-timestep-views.jl | 87 ++++++++++++++++++++++ 2 files changed, 136 insertions(+), 11 deletions(-) diff --git a/src/composite_model/runtime_outputs.jl b/src/composite_model/runtime_outputs.jl index 0bd658ec4..2009432aa 100644 --- a/src/composite_model/runtime_outputs.jl +++ b/src/composite_model/runtime_outputs.jl @@ -1738,7 +1738,11 @@ end ) @inbounds for index in eachindex(source_streams) value = _previous_time_step_sample(source_streams[index], time) - storage[index] = isnothing(value) ? initial[index] : value + if isnothing(value) + storage[index] = initial[index] + else + storage[index] = value + end end return temporal_input end @@ -1872,19 +1876,53 @@ function _materialize_model_inputs!( ) isnothing(streams) && return status timeline = compiled.scenario_plan.timeline - for temporal_input in bindings - _materialize_model_temporal_input!( - status, - temporal_input, - application, - streams, - time, - timeline, - ) - end + return _materialize_model_temporal_inputs!( + status, + bindings, + application, + streams, + time, + timeline, + ) +end + +@inline function _materialize_model_temporal_inputs!( + status::Status, + ::Tuple{}, + application::CompiledModelApplication, + streams, + time::Real, + timeline, +) return status end +@inline function _materialize_model_temporal_inputs!( + status::Status, + bindings::Tuple{T,Vararg}, + application::CompiledModelApplication, + streams, + time::Real, + timeline, +) where {T} + _materialize_model_temporal_input!( + status, + first(bindings), + application, + streams, + time, + timeline, + ) + return _materialize_model_temporal_inputs!( + status, + Base.tail(bindings), + application, + streams, + time, + timeline, + ) +end + function _model_environment_for_model( env_bindings::CompiledEnvironmentBindings, application::CompiledModelApplication, diff --git a/test/test-model-previous-timestep-views.jl b/test/test-model-previous-timestep-views.jl index d9c18fe91..25140041e 100644 --- a/test/test-model-previous-timestep-views.jl +++ b/test/test-model-previous-timestep-views.jl @@ -77,6 +77,27 @@ function PlantSimEngine.run!( return nothing end +PlantSimEngine.@process "temporal_view_mixed_consumer" verbose = false + +struct TemporalViewMixedConsumer <: AbstractTemporal_View_Mixed_ConsumerModel end + +PlantSimEngine.inputs_(::TemporalViewMixedConsumer) = ( + scalar=Default(0.0), + signals=Default(Float64[]), +) +PlantSimEngine.outputs_(::TemporalViewMixedConsumer) = (signal_total=0.0,) + +function PlantSimEngine.run!( + ::TemporalViewMixedConsumer, + status, + environment, + constants=nothing, + context=nothing, +) + status.signal_total = status.scalar + sum(status.signals) + return nothing +end + PlantSimEngine.@process "temporal_view_cycle_a" verbose = false PlantSimEngine.@process "temporal_view_cycle_b" verbose = false @@ -675,6 +696,72 @@ end ) end +@testset "Heterogeneous PreviousTimeStep materialization is allocation-free" begin + mixed_object = CompositeModel( + Object(:scene; scale=:Scene, status=Status(signal=10.0)), + Object(:leaf_1; scale=:Leaf, parent=:scene, status=Status(signal=1.0)), + Object(:leaf_2; scale=:Leaf, parent=:scene, status=Status(signal=2.0)); + applications=( + ModelSpec( + TemporalViewSignalSource(); + name=:scene_signal_source, + on=One(scale=:Scene), + ), + ModelSpec( + TemporalViewSignalSource(); + name=:leaf_signal_source, + on=Many(scale=:Leaf), + ), + ModelSpec( + TemporalViewMixedConsumer(); + name=:mixed_consumer, + on=One(scale=:Scene), + inputs=( + PreviousTimeStep(:scalar) => One( + within=Self(), + application=:scene_signal_source, + var=:signal, + ), + PreviousTimeStep(:signals) => Many( + scale=:Leaf, + within=SceneScope(), + var=:signal, + ), + ), + ), + ), + ) + mixed_simulation = run!(mixed_object; steps=2, outputs=:none) + mixed_application = + mixed_simulation.compiled.applications_by_id[:mixed_consumer] + mixed_execution_target = only( + only( + batch.targets for batch in mixed_simulation.execution_plan.batches + if batch.application.id == :mixed_consumer + ), + ) + materialize_mixed!() = PlantSimEngine._materialize_model_inputs!( + mixed_execution_target.status, + mixed_execution_target.input_bindings, + mixed_simulation.compiled, + mixed_application, + mixed_simulation.temporal_streams, + 3, + ) + + materialize_mixed!() + @test mixed_execution_target.status.scalar == 12.0 + @test collect(mixed_execution_target.status.signals) == [3.0, 4.0] + @test _runtime_materialization_allocations( + mixed_execution_target.status, + mixed_execution_target.input_bindings, + mixed_simulation.compiled, + mixed_application, + mixed_simulation.temporal_streams, + 3, + ) == 0 +end + @testset "PreviousTimeStep dependency storage scales by object, not duration" begin object_count = 2_000 objects = [ From 507a3809ab6f7efaba7761da5715b69bb25b85c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Tue, 25 Aug 2026 21:38:04 +0200 Subject: [PATCH 17/45] feat: allow authoritative dynamic-organ status initialization --- docs/src/dev/release_notes_handoff.md | 10 +- docs/src/guides/multiscale/import_mtg.md | 4 +- docs/src/migration_composite_model.md | 2 +- docs/src/model_execution.md | 10 +- src/composite_model/registry_topology.jl | 31 +++- test/test-unified-model-object-api.jl | 173 +++++++++++++++++++++++ 6 files changed, 218 insertions(+), 12 deletions(-) diff --git a/docs/src/dev/release_notes_handoff.md b/docs/src/dev/release_notes_handoff.md index 43eca1ac5..9a5b694a9 100644 --- a/docs/src/dev/release_notes_handoff.md +++ b/docs/src/dev/release_notes_handoff.md @@ -59,12 +59,20 @@ explanations. Dynamic MTG growth now has one public high-level operation: `add_organ!`. An MTG-backed `CompositeModel` retains the accessors and status initializer used during -initial adaptation. `add_organ!` reuses that policy for new nodes, merges +initial adaptation. By default, `add_organ!` reuses that policy for new nodes, merges explicit initial values, attaches the resulting `Status`, registers the model object, and invalidates runtime bindings. `register_object!` remains available as the low-level registry operation. XPalm and PlantGeom were migrated away from package-local wrappers that duplicated this lifecycle sequence. +Topology engines that have already made a new node's attributes authoritative +may call `add_organ!(...; use_status_adapter=false)`. This advanced opt-out +skips only the stored adapter status initializer; PlantSimEngine still copies +the node attributes, applies explicit initial values with the normal +precedence, forces the exact node identity, registers the object, and +invalidates bindings. Callers must not disable the adapter when it contributes +fields that are absent from the new node. + ## Implemented MAESPA-Style Example Changes The current `examples/maespa_model_example.jl` is the main executable example diff --git a/docs/src/guides/multiscale/import_mtg.md b/docs/src/guides/multiscale/import_mtg.md index a5c01cb57..70f7e2b2b 100644 --- a/docs/src/guides/multiscale/import_mtg.md +++ b/docs/src/guides/multiscale/import_mtg.md @@ -6,5 +6,5 @@ uses the normal CompositeModel compiler. The MTG is an input representation, not second runtime. For growth, prefer `add_organ!`: it creates the MTG node, applies the model's -status policy, attaches status, and registers the corresponding object. - +status policy by default, attaches status, and registers the corresponding +object. diff --git a/docs/src/migration_composite_model.md b/docs/src/migration_composite_model.md index 8dec94b75..5887430b9 100644 --- a/docs/src/migration_composite_model.md +++ b/docs/src/migration_composite_model.md @@ -409,7 +409,7 @@ move_object!(model, :leaf_3, new_geometry) ``` For MTG-backed growth, prefer `add_organ!`: it creates the MTG node and its -model object together and reuses the status initialization policy from +model object together and, by default, reuses the status initialization policy from `CompositeModel(mtg; status=...)`. Use `register_object!` when adapting another topology backend or when a complete `Object` already exists. diff --git a/docs/src/model_execution.md b/docs/src/model_execution.md index a2ccc1245..8e2fa5dea 100644 --- a/docs/src/model_execution.md +++ b/docs/src/model_execution.md @@ -377,9 +377,13 @@ update_geometry!(model, :leaf_5, new_geometry) ``` Use `add_organ!` for an MTG-backed model. It creates the MTG node, initializes -and attaches its `Status` with the model's MTG policy, registers the model -object, and invalidates the affected bindings. `register_object!` is the -low-level operation for callers that already own a complete `Object`. +and attaches its `Status`, registers the model object, and invalidates the +affected bindings. By default, status initialization reuses the model's MTG +policy. A framework that already supplies the complete creation attributes and +initial status may set `use_status_adapter=false`; doing so is an explicit +assertion that the configured status accessor contributes no additional fields +or side effects for that node. `register_object!` is the low-level operation +for callers that already own a complete `Object`. Structural changes invalidate compiled object/model bindings. Movement and geometry changes invalidate environment bindings without rebuilding structural diff --git a/src/composite_model/registry_topology.jl b/src/composite_model/registry_topology.jl index fb1b2e0d8..5f5e11214 100644 --- a/src/composite_model/registry_topology.jl +++ b/src/composite_model/registry_topology.jl @@ -1146,26 +1146,41 @@ function _status_data!(data::Dict{Symbol,Any}, values) return data end -function _organ_status(adapter::MTGObjectAdapter, node, initial_status) - adapted_status = adapter.status(node) +function _organ_status( + adapter::MTGObjectAdapter, + node, + initial_status; + use_status_adapter::Bool=true, +) + # Keep this call before reading node attributes: a status accessor may + # initialize attributes that must participate in the merged status. + adapted_status = use_status_adapter ? adapter.status(node) : nothing data = Dict{Symbol,Any}() _status_data!(data, MultiScaleTreeGraph.node_attributes(node)) _status_data!(data, adapted_status) data[:node] = node _status_data!(data, initial_status) data[:node] = node - return Status((; data...)) + status_names = Tuple(keys(data)) + status_values = Tuple(values(data)) + return Status{status_names}(status_values) end """ add_organ!(parent, runtime, link, symbol, scale; index=0, id, attributes=(), - initial_status=(), kind=nothing, species=nothing, name=nothing) + initial_status=(), use_status_adapter=true, kind=nothing, + species=nothing, name=nothing) Create an MTG node and register its corresponding model object as one operation. `runtime` may be a [`CompositeModel`](@ref), [`RunContext`](@ref), or [`Simulation`](@ref). The model reuses the MTG accessors and status initializer supplied when it was constructed, then overlays `initial_status`. +Set `use_status_adapter=false` only when the caller guarantees that the new +node's attributes and `initial_status` completely define its initial status. +In that mode the configured MTG status accessor is not called for the new +node. The `node` status field is always forced to the newly created node. + This is the public growth API. [`register_object!`](@ref) remains the low-level registry operation for callers that already own a fully initialized `Object`. """ @@ -1179,6 +1194,7 @@ function add_organ!( id=nothing, attributes=NamedTuple(), initial_status=NamedTuple(), + use_status_adapter::Bool=true, kind=nothing, species=nothing, name=nothing, @@ -1220,7 +1236,12 @@ function add_organ!( ) try new_object_id = _register_mtg_object_identity!(adapter, node) - status = _organ_status(adapter, node, initial_status) + status = _organ_status( + adapter, + node, + initial_status; + use_status_adapter=use_status_adapter, + ) node[:plantsimengine_status] = status object = Object( new_object_id; diff --git a/test/test-unified-model-object-api.jl b/test/test-unified-model-object-api.jl index fca4a0cd9..b3f052615 100644 --- a/test/test-unified-model-object-api.jl +++ b/test/test-unified-model-object-api.jl @@ -1016,6 +1016,179 @@ end @test node_id(auto_id_leaf_status.node) == 5 @test auto_id_leaf_status.node[:plantsimengine_status] === auto_id_leaf_status + @testset "MTG organ status adapter policy" begin + status_adapter_calls = Ref(0) + latest_adapter_status = Ref{Any}(nothing) + status_adapter = node -> begin + status_adapter_calls[] += 1 + node[:status_adapter_mutation] = status_adapter_calls[] + adapted_source_status = Status( + node=:adapter_node_must_be_replaced, + signal=6.0, + adapter_only=:present, + plantsimengine_status=:adapter_status_must_be_excluded, + ) + latest_adapter_status[] = adapted_source_status + return adapted_source_status + end + + adapter_root = + Node(MultiScaleTreeGraph.NodeMTG("/", :Scene, 1, 0)) + adapter_plant = Node( + adapter_root, + MultiScaleTreeGraph.NodeMTG("+", :Plant, 1, 1), + ) + status_adapter_scene = + CompositeModel(adapter_root; status=status_adapter) + calls_after_adaptation = status_adapter_calls[] + bypassed_initial_status = Status( + signal=5.0, + age=1, + node=:initial_node_must_be_replaced, + plantsimengine_status=:initial_status_must_be_excluded, + ) + + bypassed_status = add_organ!( + adapter_plant, + status_adapter_scene, + :+, + :Leaf, + 2; + index=1, + id=3, + attributes=( + signal=4.0, + color=:green, + node=:attribute_node_must_be_replaced, + plantsimengine_status=:attribute_status_must_be_excluded, + ), + initial_status=bypassed_initial_status, + use_status_adapter=false, + ) + + bypassed_reference = Dict{Symbol,Any}() + PlantSimEngine._status_data!( + bypassed_reference, + node_attributes(bypassed_status.node), + ) + bypassed_reference[:node] = bypassed_status.node + PlantSimEngine._status_data!( + bypassed_reference, + bypassed_initial_status, + ) + bypassed_reference[:node] = bypassed_status.node + bypassed_reference_names = Tuple(keys(bypassed_reference)) + bypassed_reference_values = Tuple(values(bypassed_reference)) + + @test status_adapter_calls[] == calls_after_adaptation + @test propertynames(bypassed_status) == bypassed_reference_names + @test Tuple(bypassed_status) == bypassed_reference_values + @test bypassed_status.signal == 5.0 + @test bypassed_status.color === :green + @test bypassed_status.age == 1 + @test bypassed_status.node === + MultiScaleTreeGraph.get_node(adapter_root, 3) + @test bypassed_initial_status.node === + :initial_node_must_be_replaced + @test bypassed_status.node[:node] === + :attribute_node_must_be_replaced + @test bypassed_status.node[:signal] == 4.0 + @test !hasproperty(bypassed_status, :adapter_only) + @test !hasproperty(bypassed_status, :status_adapter_mutation) + @test !hasproperty(bypassed_status, :plantsimengine_status) + @test !haskey( + node_attributes(bypassed_status.node), + :status_adapter_mutation, + ) + @test PlantSimEngine.refvalue(bypassed_status, :signal) !== + PlantSimEngine.refvalue(bypassed_initial_status, :signal) + @test PlantSimEngine.refvalue(bypassed_status, :age) !== + PlantSimEngine.refvalue(bypassed_initial_status, :age) + @test bypassed_status.node[:plantsimengine_status] === + bypassed_status + @test model_object(status_adapter_scene, 3).status === + bypassed_status + bypassed_initial_status.age = 99 + @test bypassed_status.age == 1 + + adapted_initial_status = Status( + signal=5.0, + age=2, + node=:initial_node_must_be_replaced, + plantsimengine_status=:initial_status_must_be_excluded, + ) + + adapted_status = add_organ!( + adapter_plant, + status_adapter_scene, + :+, + :Leaf, + 2; + index=2, + id=4, + attributes=( + signal=4.0, + color=:blue, + node=:attribute_node_must_be_replaced, + plantsimengine_status=:attribute_status_must_be_excluded, + ), + initial_status=adapted_initial_status, + ) + + adapted_source_status = latest_adapter_status[] + adapted_reference = Dict{Symbol,Any}() + PlantSimEngine._status_data!( + adapted_reference, + node_attributes(adapted_status.node), + ) + PlantSimEngine._status_data!( + adapted_reference, + adapted_source_status, + ) + adapted_reference[:node] = adapted_status.node + PlantSimEngine._status_data!( + adapted_reference, + adapted_initial_status, + ) + adapted_reference[:node] = adapted_status.node + adapted_reference_names = Tuple(keys(adapted_reference)) + adapted_reference_values = Tuple(values(adapted_reference)) + + @test status_adapter_calls[] == calls_after_adaptation + 1 + @test adapted_source_status isa Status + @test propertynames(adapted_status) == adapted_reference_names + @test Tuple(adapted_status) == adapted_reference_values + @test adapted_source_status.node === + :adapter_node_must_be_replaced + @test adapted_initial_status.node === + :initial_node_must_be_replaced + @test adapted_status.node[:signal] == 4.0 + @test adapted_source_status.signal == 6.0 + @test adapted_status.signal == 5.0 + @test adapted_status.color === :blue + @test adapted_status.age == 2 + @test adapted_status.adapter_only === :present + @test adapted_status.node === + MultiScaleTreeGraph.get_node(adapter_root, 4) + @test adapted_status.node[:node] === + :attribute_node_must_be_replaced + @test !hasproperty(adapted_status, :plantsimengine_status) + @test adapted_status.status_adapter_mutation == + calls_after_adaptation + 1 + @test adapted_status.node[:status_adapter_mutation] == + calls_after_adaptation + 1 + @test PlantSimEngine.refvalue(adapted_status, :adapter_only) !== + PlantSimEngine.refvalue(adapted_source_status, :adapter_only) + @test PlantSimEngine.refvalue(adapted_status, :age) !== + PlantSimEngine.refvalue(adapted_initial_status, :age) + @test adapted_status.node[:plantsimengine_status] === adapted_status + @test model_object(status_adapter_scene, 4).status === adapted_status + adapted_source_status.adapter_only = :mutated_after_add + adapted_initial_status.age = 99 + @test adapted_status.adapter_only === :present + @test adapted_status.age == 2 + end + temporal_mtg_root = Node(MultiScaleTreeGraph.NodeMTG("/", :Scene, 1, 0)) temporal_mtg_plant = Node( From c36b0b90d0f5f4c55d1f1fff0d7dcf58544f19ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Tue, 25 Aug 2026 21:38:31 +0200 Subject: [PATCH 18/45] fix: resolve distributed-output runtime dispatch --- CHANGELOG.md | 13 +++++++++++++ src/composite_model/runtime_outputs.jl | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bc275bcf..69aa69657 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,19 @@ - `run_call!(context, name)` for the common execute-all operation while retaining `run_call!(target::CallTarget)` for selective, per-target, and iterative control. +- `add_organ!(...; use_status_adapter=false)` for topology engines whose new + node attributes already form the authoritative initialization payload. The + default remains `true`; opting out skips only the stored adapter status + initializer while preserving node attributes, explicit initial-value + precedence, node identity, object registration, and binding invalidation. + +### Fixed + +- Removed ambiguities in distributed-output runtime dispatch when temporal + streams are absent and output retention is either absent or compiled. +- Construct dynamic `Status` values directly from the final ordered payload, + preserving precedence and independent `Ref` storage without the generic + iterable-to-`NamedTuple` merge path. ## v0.14.1 diff --git a/src/composite_model/runtime_outputs.jl b/src/composite_model/runtime_outputs.jl index 2009432aa..107c51490 100644 --- a/src/composite_model/runtime_outputs.jl +++ b/src/composite_model/runtime_outputs.jl @@ -2746,6 +2746,24 @@ _runtime_model_distributed_output_streams( distributed_outputs::CompiledDistributedOutputs, ) = () +_runtime_model_distributed_output_streams( + compiled, + application, + object_id, + ::Nothing, + ::Nothing, + distributed_outputs::CompiledDistributedOutputs, +) = () + +_runtime_model_distributed_output_streams( + compiled, + application, + object_id, + ::Nothing, + output_retention::OutputRetentionPlan, + distributed_outputs::CompiledDistributedOutputs, +) = () + _runtime_model_distributed_output_streams( compiled, application, From cdcc82e79a3c503b1fc86d2ad41e5285a6c2d503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Wed, 26 Aug 2026 09:42:07 +0200 Subject: [PATCH 19/45] refactor: keep runtime status in model registry --- .../composite_model_implementation_plan.md | 3 +- docs/src/migration_composite_model.md | 7 +- src/PlantSimEngine.jl | 3 +- src/component_models/Status.jl | 9 + src/composite_model/compilation.jl | 14 +- src/composite_model/registry_topology.jl | 176 +++++++++++++----- src/composite_model/runtime_outputs.jl | 10 +- src/visualization/model_graph_editor_api.jl | 8 +- test/test-model-object-id.jl | 39 +++- test/test-unified-model-object-api.jl | 62 ++++-- 10 files changed, 248 insertions(+), 83 deletions(-) diff --git a/docs/src/dev/composite_model_implementation_plan.md b/docs/src/dev/composite_model_implementation_plan.md index 85fb9c279..cd575289b 100644 --- a/docs/src/dev/composite_model_implementation_plan.md +++ b/docs/src/dev/composite_model_implementation_plan.md @@ -434,7 +434,8 @@ types should be selectors, model traits, or internal compiled carriers. - Added `objects_from_mtg(root; ...)` and `CompositeModel(root::MultiScaleTreeGraph.Node; ...)`. Existing MTG topology is traversed once into the unified registry, preserving stable node-derived ids, parent relations, labels, geometry, and - existing `:plantsimengine_status` objects through configurable accessors. + explicitly imported runtime status through configurable accessors; the + canonical adapter does not read or write runtime objects in MTG attributes. The composite-model/object compiler is executable: selectors normalize to object addresses, resolve before runtime, and compile into reference, temporal, call, diff --git a/docs/src/migration_composite_model.md b/docs/src/migration_composite_model.md index 5887430b9..6a4c03b4f 100644 --- a/docs/src/migration_composite_model.md +++ b/docs/src/migration_composite_model.md @@ -134,8 +134,11 @@ model = CompositeModel( `objects_from_mtg(mtg; ...)` exposes the intermediate object list when it is useful to inspect or modify labels before constructing the model. By default, -the adapter uses MTG node ids and scales, and reuses an existing -`:plantsimengine_status` attribute when present. +the adapter uses MTG node ids and scales. Runtime `Status` values belong to the +`CompositeModel` registry and are never stored in MTG attributes. A deliberate +import boundary may provide `status=node -> import_status(node)` explicitly; +maintained workflows should initialize scientific state through model objects or +model applications instead. ## Multiscale Inputs diff --git a/src/PlantSimEngine.jl b/src/PlantSimEngine.jl index 8c4cd4f79..3e8396aaa 100644 --- a/src/PlantSimEngine.jl +++ b/src/PlantSimEngine.jl @@ -315,7 +315,8 @@ export OutputRequest, collect_outputs export CompositeModel, Object, ObjectId, CompositeModelTemplate, ObjectInstance, Override export add_organ!, register_object!, remove_object!, reparent_object!, move_object!, update_geometry! export mark_environment_binding_dirty! -export objects_from_mtg, object_id, object_ids, model_object, model_objects, resolve_object_ids, resolve_objects +export objects_from_mtg, object_id, object_ids, model_object, model_status, source_node +export model_objects, resolve_object_ids, resolve_objects export geometry, position, bounds export RunContext, CallTarget, CallTargets, Simulation, BoundMany, OutputTargets export runtime_model, current_step, final_state, outputs diff --git a/src/component_models/Status.jl b/src/component_models/Status.jl index 87750f31b..94533cc2e 100644 --- a/src/component_models/Status.jl +++ b/src/component_models/Status.jl @@ -56,6 +56,14 @@ julia> st[1] = 22.0 """ struct Status{N,T<:Tuple{Vararg{Ref}}} vars::NamedTuple{N,T} + # `Status()` has no Ref-valued variable from which Julia could derive object + # identity. Keep an opaque token so every runtime status, including an empty + # one created before compilation adds variables, has a distinct identity. + identity::Base.RefValue{Nothing} + + function Status(vars::NamedTuple{N,T}) where {N,T<:Tuple{Vararg{Ref}}} + return new{N,T}(vars, Ref(nothing)) + end end Status(; kwargs...) = Status(NamedTuple{keys(kwargs)}(Ref.(values(values(kwargs))))) @@ -78,6 +86,7 @@ _status_indexed_iterate(status, i::Int, state=1) = Base.indexed_iterate(NamedTup Base.keys(::Status{names}) where {names} = names Base.values(st::Status) = _status_values(st) +_status_identity(status::Status) = getfield(status, :identity) refvalues(mnt::Status) = values(getfield(mnt, :vars)) refvalue(mnt::Status, key::Symbol) = getfield(getfield(mnt, :vars), key) diff --git a/src/composite_model/compilation.jl b/src/composite_model/compilation.jl index 0386a8c64..10a5ab9ad 100644 --- a/src/composite_model/compilation.jl +++ b/src/composite_model/compilation.jl @@ -3617,7 +3617,7 @@ end function _ensure_model_object_status!(model::CompositeModel, object_id::ObjectId) object = _model_object(model, object_id) - isnothing(object.status) && (object.status = Status()) + isnothing(object.status) && _replace_model_object_status!(model, object, Status()) object.status isa Status || error( "Model object `$(object_id.value)` uses model applications but its status has type ", "`$(typeof(object.status))`. Use `Status(...)` or leave status as `nothing`." @@ -3639,7 +3639,7 @@ function _prepare_model_output_statuses!(model::CompositeModel, applications) _private_initial_value(value), ) end - _model_object(model, object_id).status = status + _replace_model_object_status!(model, object_id, status) end end return model @@ -3720,7 +3720,7 @@ function _prepare_model_output_destination_statuses!( _private_initial_value(_input_default(declaration)), ) end - _model_object(model, destination_id).status = status + _replace_model_object_status!(model, destination_id, status) end end return model @@ -3906,7 +3906,7 @@ function _prepare_model_input_defaults!(model::CompositeModel, applications) variable, ) end - _model_object(model, object_id).status = status + _replace_model_object_status!(model, object_id, status) end end return model @@ -3920,7 +3920,11 @@ function _wire_model_input_carriers!(model::CompositeModel, bindings) status = object.status status isa Status || continue reference = binding.carrier isa Base.RefValue ? binding.carrier : Ref(binding.carrier) - object.status = _status_with_reference(status, binding.input, reference) + _replace_model_object_status!( + model, + object, + _status_with_reference(status, binding.input, reference), + ) delete!( get!( model.input_default_status_variables, diff --git a/src/composite_model/registry_topology.jl b/src/composite_model/registry_topology.jl index 5f5e11214..13573a0e9 100644 --- a/src/composite_model/registry_topology.jl +++ b/src/composite_model/registry_topology.jl @@ -189,6 +189,7 @@ end mutable struct ObjectRegistry objects::Dict{ObjectId,Any} + object_ids_by_status::IdDict{Base.RefValue{Nothing},ObjectId} by_scale::Dict{Symbol,Set{ObjectId}} by_kind::Dict{Symbol,Set{ObjectId}} by_species::Dict{Symbol,Set{ObjectId}} @@ -198,6 +199,7 @@ end ObjectRegistry() = ObjectRegistry( Dict{ObjectId,Any}(), + IdDict{Base.RefValue{Nothing},ObjectId}(), Dict{Symbol,Set{ObjectId}}(), Dict{Symbol,Set{ObjectId}}(), Dict{Symbol,Set{ObjectId}}(), @@ -620,13 +622,10 @@ function CompositeModel( ) end -function _mtg_attribute(node, key::Symbol, default=nothing) - try - return node[key] - catch - return default - end -end +_mtg_attribute(node, key::Symbol, default=nothing) = + get(MultiScaleTreeGraph.node_attributes(node), key, default) + +_no_mtg_status(_) = nothing """ objects_from_mtg(root; id=node_id, scale=symbol, kind=..., species=..., @@ -634,10 +633,11 @@ end Adapt one MTG subtree to model `Object` values. The MTG is traversed once; node ids and parent relations become stable model-object identities and -relations. Accessors may attach labels, geometry, and existing status objects -without prescribing a plant architecture. This standalone projection retains -no lifecycle identity index; construct `CompositeModel(root)` when later node -resolution or organogenesis is required. +relations. Accessors may attach labels and geometry without prescribing a plant +architecture. Runtime status is not read from MTG attributes. Pass an explicit +`status=` accessor only at a deliberate import boundary. This standalone +projection retains no lifecycle identity index; construct `CompositeModel(root)` +when later node resolution or organogenesis is required. """ function objects_from_mtg( root::MultiScaleTreeGraph.Node; @@ -647,7 +647,7 @@ function objects_from_mtg( species=node -> _mtg_attribute(node, :species, nothing), name=node -> _mtg_attribute(node, :name, nothing), geometry=node -> _mtg_attribute(node, :geometry, nothing), - status=node -> _mtg_attribute(node, :plantsimengine_status, nothing), + status=_no_mtg_status, ) accessors = MTGObjectAccessors( id, @@ -726,7 +726,7 @@ function CompositeModel( species=node -> _mtg_attribute(node, :species, nothing), name=node -> _mtg_attribute(node, :name, nothing), geometry=node -> _mtg_attribute(node, :geometry, nothing), - status=node -> _mtg_attribute(node, :plantsimengine_status, nothing), + status=_no_mtg_status, ) adapter = MTGObjectAdapter( root, @@ -871,6 +871,7 @@ function _delete_index!(index::Dict{Symbol,Set{ObjectId}}, key, id::ObjectId) end function _index_object!(registry::ObjectRegistry, object::Object) + _validate_status_identity_available!(registry, object.status, object.id) _push_index!(registry.by_scale, object.scale, object.id) _push_index!(registry.by_kind, object.kind, object.id) _push_index!(registry.by_species, object.species, object.id) @@ -883,6 +884,8 @@ function _index_object!(registry::ObjectRegistry, object::Object) end registry.by_name[object.name] = object.id end + object.status isa Status && + (registry.object_ids_by_status[_status_identity(object.status)] = object.id) return nothing end @@ -893,9 +896,70 @@ function _deindex_object!(registry::ObjectRegistry, object::Object) if !isnothing(object.name) && get(registry.by_name, object.name, nothing) == object.id delete!(registry.by_name, object.name) end + if object.status isa Status && + get( + registry.object_ids_by_status, + _status_identity(object.status), + nothing, + ) == object.id + delete!(registry.object_ids_by_status, _status_identity(object.status)) + end return nothing end +function _validate_status_identity_available!( + registry::ObjectRegistry, + status, + object_id::ObjectId, +) + status isa Status || return nothing + existing = get( + registry.object_ids_by_status, + _status_identity(status), + nothing, + ) + if !isnothing(existing) && existing != object_id + throw( + ArgumentError( + "The same Status instance cannot be owned by model objects " * + "`$(existing.value)` and `$(object_id.value)`. Give each Object " * + "its own Status instance.", + ), + ) + end + return nothing +end + +function _replace_model_object_status!( + model::CompositeModel, + object::Object, + status, +) + (isnothing(status) || status isa Status) || error( + "Model object `$(object.id.value)` status must be a `Status` or `nothing`, " * + "got `$(typeof(status))`.", + ) + object.status === status && return status + registry = model.registry + _validate_status_identity_available!(registry, status, object.id) + if object.status isa Status && + get( + registry.object_ids_by_status, + _status_identity(object.status), + nothing, + ) == object.id + delete!(registry.object_ids_by_status, _status_identity(object.status)) + end + setfield!(object, :status, status) + status isa Status && + (registry.object_ids_by_status[_status_identity(status)] = object.id) + return status +end + +function _replace_model_object_status!(model::CompositeModel, object_id, status) + return _replace_model_object_status!(model, _model_object(model, object_id), status) +end + function _model_object(model::CompositeModel, id) oid = ObjectId(id) haskey(model.registry.objects, oid) || error("No model object with id `$(oid.value)`.") @@ -932,7 +996,8 @@ identical. Every result is checked against the live object registry. Removed or unknown objects therefore raise an error instead of returning a stale identity. -[`RunContext`](@ref) and [`Simulation`](@ref) delegate to their live model. +[`RunContext`](@ref), [`CallTarget`](@ref), and [`Simulation`](@ref) delegate to +their live model. """ object_id(model::CompositeModel, id::ObjectId) = _registered_object_id(model, id) @@ -947,38 +1012,16 @@ function object_id(model::CompositeModel, object::Object) end function object_id(model::CompositeModel, status::Status) - matched_id = nothing - for object in values(model.registry.objects) - object.status === status || continue - isnothing(matched_id) || throw( - ArgumentError( - "The same Status instance is registered by more than one model object; " * - "resolve the intended Object or ObjectId explicitly.", - ), - ) - matched_id = object.id - end - isnothing(matched_id) && throw( + index = model.registry.object_ids_by_status + identity = _status_identity(status) + haskey(index, identity) || throw( ArgumentError("The supplied Status instance is not registered by this model."), ) - - adapter = model.source_adapter - if adapter isa MTGObjectAdapter && hasproperty(status, :node) - node = status.node - node isa MultiScaleTreeGraph.Node || throw( - ArgumentError( - "A registered MTG Status must expose its source Node as `status.node`; " * - "got $(typeof(node)).", - ), - ) - id = object_id(model, node) - id == matched_id || throw( - ArgumentError( - "Status `node` resolves to object `$(id.value)`, but this Status " * - "instance is registered by object `$(matched_id.value)`.", - ), - ) - end + matched_id = index[identity] + _model_object(model, matched_id).status === status || error( + "PlantSimEngine's Status identity index is inconsistent for object " * + "`$(matched_id.value)`. Replace runtime status through the model API.", + ) return matched_id end @@ -995,6 +1038,43 @@ end object_id(model::CompositeModel, id) = _registered_object_id(model, ObjectId(id)) +model_object( + model::CompositeModel, + source::Union{Object,Status,MultiScaleTreeGraph.Node}, +) = _model_object(model, object_id(model, source)) + +""" + model_status(model::CompositeModel, source) + +Return the runtime [`Status`](@ref), or `nothing`, owned by the model object +represented by `source`. `source` accepts the same identities as +[`object_id`](@ref), including an exact MTG node. Runtime status belongs to the +model registry and is not stored in MTG attributes. +""" +model_status(model::CompositeModel, source) = model_object(model, source).status + +""" + source_node(model::CompositeModel, source) -> MultiScaleTreeGraph.Node + +Return the exact MTG node associated with a registered object identity. This is +available only for a model constructed from an MTG; copied, foreign, and removed +identities are rejected. +""" +function source_node(model::CompositeModel, source) + adapter = model.source_adapter + adapter isa MTGObjectAdapter || throw( + ArgumentError( + "A source node is available only from a CompositeModel constructed from an MTG.", + ), + ) + id = object_id(model, source) + node = get(adapter.nodes_by_object_id, id, nothing) + isnothing(node) && error( + "No source MTG node is registered for model object `$(id.value)`.", + ) + return node +end + function _object_ancestor_ids( registry::ObjectRegistry, object_id::ObjectId, @@ -1097,6 +1177,7 @@ function _register_object_without_lifecycle!( "CompositeModel object name `$(object.name)` is already used by object `$(existing.value)`." ) end + _validate_status_identity_available!(registry, object.status, object.id) instance = isnothing(parent_id) ? nothing : _instance_for_object(model, parent_id) _apply_instance_labels!(object, instance) object.parent = parent_id @@ -1140,7 +1221,11 @@ function _status_data!(data::Dict{Symbol,Any}, values) "`Base.Pairs`, or `nothing`, got `$(typeof(values))`." ) for (key, value) in pairs(source) - Symbol(key) == :plantsimengine_status && continue + Symbol(key) == :plantsimengine_status && error( + "`plantsimengine_status` is runtime state, not an organ attribute. " * + "Pass scientific initial values through `initial_status` and resolve " * + "runtime status with `model_status`.", + ) data[Symbol(key)] = value end return data @@ -1242,7 +1327,6 @@ function add_organ!( initial_status; use_status_adapter=use_status_adapter, ) - node[:plantsimengine_status] = status object = Object( new_object_id; scale=adapter.scale(node), diff --git a/src/composite_model/runtime_outputs.jl b/src/composite_model/runtime_outputs.jl index 107c51490..a3c94ca3a 100644 --- a/src/composite_model/runtime_outputs.jl +++ b/src/composite_model/runtime_outputs.jl @@ -883,8 +883,14 @@ runtime_model(model::CompositeModel) = model runtime_model(context::RunContext) = context.compiled.model runtime_model(target::CallTarget) = target.model runtime_model(simulation::Simulation) = simulation.model -object_id(context::RunContext, source) = object_id(runtime_model(context), source) -object_id(simulation::Simulation, source) = object_id(runtime_model(simulation), source) +object_id(runtime::Union{RunContext,CallTarget,Simulation}, source) = + object_id(runtime_model(runtime), source) +model_object(runtime::Union{RunContext,CallTarget,Simulation}, source) = + model_object(runtime_model(runtime), source) +model_status(runtime::Union{RunContext,CallTarget,Simulation}, source) = + model_status(runtime_model(runtime), source) +source_node(runtime::Union{RunContext,CallTarget,Simulation}, source) = + source_node(runtime_model(runtime), source) current_step(simulation::Simulation) = simulation.current_step outputs(sim::Simulation) = sim.temporal_streams diff --git a/src/visualization/model_graph_editor_api.jl b/src/visualization/model_graph_editor_api.jl index 4efbfaf16..418dc7f99 100644 --- a/src/visualization/model_graph_editor_api.jl +++ b/src/visualization/model_graph_editor_api.jl @@ -869,7 +869,7 @@ function _set_model_object_status!(model, object_id, variable, value) else values[index] = variable => value end - object.status = Status((; values...)) + _replace_model_object_status!(model, object, Status((; values...))) delete!( get!( model.input_default_status_variables, @@ -899,7 +899,11 @@ function _apply_model_graph_edit!(model::CompositeModel, edit::RemoveModelObject pair for pair in _model_edit_status_values(object.status) if first(pair) != edit.variable ] - object.status = isempty(values) ? nothing : Status((; values...)) + _replace_model_object_status!( + model, + object, + isempty(values) ? nothing : Status((; values...)), + ) delete!( get!( model.input_default_status_variables, diff --git a/test/test-model-object-id.jl b/test/test-model-object-id.jl index c81d8d78a..5a3e85f5d 100644 --- a/test/test-model-object-id.jl +++ b/test/test-model-object-id.jl @@ -110,6 +110,8 @@ end @test object_id(model, registered_leaf) == leaf_id @test object_id(model, leaf) == leaf_id @test _registered_object_id_allocations(model, leaf) == 0 + @test model_object(model, leaf) === registered_leaf + @test source_node(model, leaf_id) === leaf copied_root = deepcopy(root) copied_leaf = MultiScaleTreeGraph.get_node( @@ -155,11 +157,15 @@ end @test MultiScaleTreeGraph.node_id(new_leaf_status.node) == 4 @test object_id(model, new_leaf_status) == new_leaf_id @test object_id(model, new_leaf_status.node) == new_leaf_id + @test model_status(model, new_leaf_id) === new_leaf_status + @test source_node(model, new_leaf_status) === new_leaf_status.node simulation = run!(model; steps=1, outputs=:none) @test model_object(model, (:Scene, 1)).status.matches @test object_id(simulation, leaf) == leaf_id + remove_object!(model, new_leaf_id) + @test_throws ArgumentError object_id(model, new_leaf_status) remove_object!(model, leaf_id) @test_throws ErrorException object_id(model, leaf_id) @test_throws ArgumentError object_id(model, leaf) @@ -245,26 +251,47 @@ end model = CompositeModel(object) @test object_id(model, status) == ObjectId(:leaf) + @test _registered_object_id_allocations(model, status) == 0 @test object_id(model, object) == ObjectId(:leaf) + @test model_object(model, status) === object + @test model_status(model, object) === status foreign_mtg = Node(MultiScaleTreeGraph.NodeMTG("/", :Leaf, 1, 1)) @test_throws ArgumentError object_id(model, foreign_mtg) @test_throws ArgumentError object_id(model, Status(signal=1.0)) + @test_throws ArgumentError source_node(model, status) + + empty_status_a = Status() + empty_status_b = Status() + @test empty_status_a !== empty_status_b + empty_model = CompositeModel( + Object(:empty_a; scale=:Leaf, status=empty_status_a), + Object(:empty_b; scale=:Leaf, status=empty_status_b), + ) + @test object_id(empty_model, empty_status_a) == ObjectId(:empty_a) + @test object_id(empty_model, empty_status_b) == ObjectId(:empty_b) shared_status = Status(signal=2.0) - ambiguous = CompositeModel( + @test_throws ArgumentError CompositeModel( Object(:scene; scale=:Scene), Object(:leaf_a; scale=:Leaf, parent=:scene, status=shared_status), Object(:leaf_b; scale=:Leaf, parent=:scene, status=shared_status), ) - @test_throws ArgumentError object_id(ambiguous, shared_status) mtg_root = Node(MultiScaleTreeGraph.NodeMTG("/", :Scene, 1, 0)) mtg_plant = Node(mtg_root, MultiScaleTreeGraph.NodeMTG("+", :Plant, 1, 1)) mtg_leaf_a = Node(mtg_plant, MultiScaleTreeGraph.NodeMTG("+", :Leaf, 1, 2)) mtg_leaf_b = Node(mtg_plant, MultiScaleTreeGraph.NodeMTG("+", :Leaf, 2, 2)) shared_mtg_status = Status(node=mtg_leaf_a, signal=3.0) - mtg_leaf_a[:plantsimengine_status] = shared_mtg_status - mtg_leaf_b[:plantsimengine_status] = shared_mtg_status - ambiguous_mtg = CompositeModel(mtg_root) - @test_throws ArgumentError object_id(ambiguous_mtg, shared_mtg_status) + statuses = IdDict{Any,Any}( + mtg_leaf_a => shared_mtg_status, + mtg_leaf_b => shared_mtg_status, + ) + @test_throws ArgumentError CompositeModel( + mtg_root; + status=node -> get(statuses, node, nothing), + ) + + canonical_mtg = CompositeModel(mtg_root) + @test isnothing(model_status(canonical_mtg, mtg_leaf_a)) + @test source_node(canonical_mtg, mtg_leaf_b) === mtg_leaf_b end diff --git a/test/test-unified-model-object-api.jl b/test/test-unified-model-object-api.jl index b3f052615..98e5b2e81 100644 --- a/test/test-unified-model-object-api.jl +++ b/test/test-unified-model-object-api.jl @@ -937,14 +937,16 @@ end mtg_plant = Node(mtg_root, MultiScaleTreeGraph.NodeMTG("+", :Plant, 1, 1)) mtg_leaf = Node(mtg_plant, MultiScaleTreeGraph.NodeMTG("+", :Leaf, 1, 2)) mtg_leaf_status = Status(signal=2.0) - mtg_leaf[:plantsimengine_status] = mtg_leaf_status + mtg_status = node -> node === mtg_leaf ? mtg_leaf_status : nothing mtg_object_id = node -> Symbol(lowercase(string(symbol(node))), "_", node_id(node)) + @test all(object -> isnothing(object.status), objects_from_mtg(mtg_root)) adapted_objects = objects_from_mtg( mtg_root; id=mtg_object_id, kind=node -> symbol(node) == :Scene ? :scene : :plant, species=node -> symbol(node) == :Scene ? nothing : :oil_palm, geometry=node -> symbol(node) == :Leaf ? (x=1.0, y=2.0) : nothing, + status=mtg_status, ) @test [object.id for object in adapted_objects] == ObjectId.([:scene_1, :plant_2, :leaf_3]) @@ -956,6 +958,7 @@ end kind=node -> symbol(node) == :Scene ? :scene : :plant, species=node -> symbol(node) == :Scene ? nothing : :oil_palm, geometry=node -> symbol(node) == :Leaf ? (x=1.0, y=2.0) : nothing, + status=mtg_status, applications=( ModelSpec(ModelObjectParameterizedSignalModel(1.0); name=:mtg_signal, on=One(scale=:Leaf)), ), @@ -978,7 +981,9 @@ end initial_status=(signal=5.0, age=1), kind=:plant, ) - @test new_leaf_status.node[:plantsimengine_status] === new_leaf_status + @test !haskey(node_attributes(new_leaf_status.node), :plantsimengine_status) + @test model_status(mtg_scene, new_leaf_status.node) === new_leaf_status + @test source_node(mtg_scene, new_leaf_status) === new_leaf_status.node @test new_leaf_status.signal == 5.0 @test new_leaf_status.color == :green @test new_leaf_status.age == 1 @@ -990,6 +995,8 @@ end @test new_leaf_object.parent == ObjectId(:plant_2) @test model_object(mtg_scene, :leaf_4) === new_leaf_object @test model_object(mtg_scene, ObjectId(:leaf_4)) === new_leaf_object + @test model_object(mtg_scene, new_leaf_status.node) === new_leaf_object + @test model_object(mtg_scene, new_leaf_status) === new_leaf_object @test_throws ErrorException model_object(mtg_scene, :absent_leaf) @test Advanced.bindings_dirty(mtg_scene) @@ -1014,7 +1021,12 @@ end index=3, ) @test node_id(auto_id_leaf_status.node) == 5 - @test auto_id_leaf_status.node[:plantsimengine_status] === auto_id_leaf_status + @test !haskey( + node_attributes(auto_id_leaf_status.node), + :plantsimengine_status, + ) + @test model_status(mtg_scene, auto_id_leaf_status.node) === + auto_id_leaf_status @testset "MTG organ status adapter policy" begin status_adapter_calls = Ref(0) @@ -1026,7 +1038,6 @@ end node=:adapter_node_must_be_replaced, signal=6.0, adapter_only=:present, - plantsimengine_status=:adapter_status_must_be_excluded, ) latest_adapter_status[] = adapted_source_status return adapted_source_status @@ -1045,9 +1056,21 @@ end signal=5.0, age=1, node=:initial_node_must_be_replaced, - plantsimengine_status=:initial_status_must_be_excluded, ) + children_before_rejected_status = length(children(adapter_plant)) + @test_throws ErrorException add_organ!( + adapter_plant, + status_adapter_scene, + :+, + :Leaf, + 2; + index=99, + attributes=(plantsimengine_status=Status(signal=99.0),), + use_status_adapter=false, + ) + @test length(children(adapter_plant)) == children_before_rejected_status + bypassed_status = add_organ!( adapter_plant, status_adapter_scene, @@ -1060,7 +1083,6 @@ end signal=4.0, color=:green, node=:attribute_node_must_be_replaced, - plantsimengine_status=:attribute_status_must_be_excluded, ), initial_status=bypassed_initial_status, use_status_adapter=false, @@ -1095,7 +1117,6 @@ end @test bypassed_status.node[:signal] == 4.0 @test !hasproperty(bypassed_status, :adapter_only) @test !hasproperty(bypassed_status, :status_adapter_mutation) - @test !hasproperty(bypassed_status, :plantsimengine_status) @test !haskey( node_attributes(bypassed_status.node), :status_adapter_mutation, @@ -1104,9 +1125,11 @@ end PlantSimEngine.refvalue(bypassed_initial_status, :signal) @test PlantSimEngine.refvalue(bypassed_status, :age) !== PlantSimEngine.refvalue(bypassed_initial_status, :age) - @test bypassed_status.node[:plantsimengine_status] === - bypassed_status - @test model_object(status_adapter_scene, 3).status === + @test !haskey( + node_attributes(bypassed_status.node), + :plantsimengine_status, + ) + @test model_status(status_adapter_scene, bypassed_status.node) === bypassed_status bypassed_initial_status.age = 99 @test bypassed_status.age == 1 @@ -1115,7 +1138,6 @@ end signal=5.0, age=2, node=:initial_node_must_be_replaced, - plantsimengine_status=:initial_status_must_be_excluded, ) adapted_status = add_organ!( @@ -1130,7 +1152,6 @@ end signal=4.0, color=:blue, node=:attribute_node_must_be_replaced, - plantsimengine_status=:attribute_status_must_be_excluded, ), initial_status=adapted_initial_status, ) @@ -1172,7 +1193,6 @@ end MultiScaleTreeGraph.get_node(adapter_root, 4) @test adapted_status.node[:node] === :attribute_node_must_be_replaced - @test !hasproperty(adapted_status, :plantsimengine_status) @test adapted_status.status_adapter_mutation == calls_after_adaptation + 1 @test adapted_status.node[:status_adapter_mutation] == @@ -1181,8 +1201,12 @@ end PlantSimEngine.refvalue(adapted_source_status, :adapter_only) @test PlantSimEngine.refvalue(adapted_status, :age) !== PlantSimEngine.refvalue(adapted_initial_status, :age) - @test adapted_status.node[:plantsimengine_status] === adapted_status - @test model_object(status_adapter_scene, 4).status === adapted_status + @test !haskey( + node_attributes(adapted_status.node), + :plantsimengine_status, + ) + @test model_status(status_adapter_scene, adapted_status.node) === + adapted_status adapted_source_status.adapter_only = :mutated_after_add adapted_initial_status.age = 99 @test adapted_status.adapter_only === :present @@ -1199,13 +1223,15 @@ end temporal_mtg_plant, MultiScaleTreeGraph.NodeMTG("+", :Leaf, 1, 2), ) - temporal_mtg_plant[:plantsimengine_status] = - Status(signals=[0.0], signal_total=0.0) - temporal_mtg_leaf[:plantsimengine_status] = Status(signal=0.0) + temporal_mtg_statuses = IdDict{Any,Any}( + temporal_mtg_plant => Status(signals=[0.0], signal_total=0.0), + temporal_mtg_leaf => Status(signal=0.0), + ) temporal_mtg_id = node -> Symbol(:temporal_, node_id(node)) temporal_mtg_scene = CompositeModel( temporal_mtg_root; id=temporal_mtg_id, + status=node -> get(temporal_mtg_statuses, node, nothing), applications=( ModelSpec( ModelObjectSignalSourceModel(); From b8fbfb21e5c8d2245bb27480a8640361d3479591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Wed, 26 Aug 2026 10:36:06 +0200 Subject: [PATCH 20/45] feat: expose current execution target identity --- docs/src/API/API_public.md | 4 ++++ src/composite_model/runtime_outputs.jl | 20 ++++++++++++++++++++ test/test-model-api-stabilization.jl | 2 ++ test/test-model-object-id.jl | 22 ++++++++++++++++++++-- 4 files changed, 46 insertions(+), 2 deletions(-) diff --git a/docs/src/API/API_public.md b/docs/src/API/API_public.md index c7bf3f887..e6c2bbaa6 100644 --- a/docs/src/API/API_public.md +++ b/docs/src/API/API_public.md @@ -119,6 +119,10 @@ targets. - `add_organ!` creates and initializes a new organ in an MTG-backed model. - `runtime_model(context)` gives lifecycle-capable kernels sanctioned access to the live model from their `RunContext`. +- `object_id(context)`, `model_object(context)`, `model_status(context)`, and + `source_node(context)` resolve the current execution target. The status + accessor returns canonical registry state rather than the application-local + status view passed to a kernel. - `register_object!`, `remove_object!`, and `reparent_object!` change topology. - `move_object!` and `update_geometry!` change spatial state. diff --git a/src/composite_model/runtime_outputs.jl b/src/composite_model/runtime_outputs.jl index a3c94ca3a..4d4ed1f33 100644 --- a/src/composite_model/runtime_outputs.jl +++ b/src/composite_model/runtime_outputs.jl @@ -891,6 +891,26 @@ model_status(runtime::Union{RunContext,CallTarget,Simulation}, source) = model_status(runtime_model(runtime), source) source_node(runtime::Union{RunContext,CallTarget,Simulation}, source) = source_node(runtime_model(runtime), source) + +""" + object_id(context::Union{RunContext,CallTarget}) + model_object(context::Union{RunContext,CallTarget}) + model_status(context::Union{RunContext,CallTarget}) + source_node(context::Union{RunContext,CallTarget}) + +Resolve the current execution target. `model_status(context)` returns the +canonical registry Status, not the application-local status view passed to the +kernel. `source_node(context)` is available for MTG-backed models and avoids +requiring a topology node inside that local status view. +""" +object_id(runtime::Union{RunContext,CallTarget}) = + object_id(runtime_model(runtime), getfield(runtime, :object_id)) +model_object(runtime::Union{RunContext,CallTarget}) = + model_object(runtime_model(runtime), object_id(runtime)) +model_status(runtime::Union{RunContext,CallTarget}) = + model_status(runtime_model(runtime), object_id(runtime)) +source_node(runtime::Union{RunContext,CallTarget}) = + source_node(runtime_model(runtime), object_id(runtime)) current_step(simulation::Simulation) = simulation.current_step outputs(sim::Simulation) = sim.temporal_streams diff --git a/test/test-model-api-stabilization.jl b/test/test-model-api-stabilization.jl index da0bed0a8..5675500f2 100644 --- a/test/test-model-api-stabilization.jl +++ b/test/test-model-api-stabilization.jl @@ -258,6 +258,7 @@ end :model_calls, :model_object, :model_objects, + :model_status, :move_object!, :object_id, :object_ids, @@ -277,6 +278,7 @@ end :run!, :run_call!, :runtime_model, + :source_node, :step!, :timespec, :timestep_hint, diff --git a/test/test-model-object-id.jl b/test/test-model-object-id.jl index 5a3e85f5d..81838c3cd 100644 --- a/test/test-model-object-id.jl +++ b/test/test-model-object-id.jl @@ -6,7 +6,12 @@ struct ObjectIdentityProbeModel{N,I} <: AbstractObject_Identity_ProbeModel end PlantSimEngine.inputs_(::ObjectIdentityProbeModel) = NamedTuple() -PlantSimEngine.outputs_(::ObjectIdentityProbeModel) = (matches=false,) +PlantSimEngine.outputs_(::ObjectIdentityProbeModel) = ( + matches=false, + current_object_matches=false, + current_status_matches=false, + current_node_matches=false, +) function PlantSimEngine.run!( model::ObjectIdentityProbeModel, @@ -16,6 +21,15 @@ function PlantSimEngine.run!( context, ) status.matches = object_id(context, model.source) == model.expected + current_object = model_object(context) + status.current_object_matches = + object_id(context) == current_object.id && + current_object === model_object(runtime_model(context), object_id(context)) + status.current_status_matches = + model_status(context) === current_object.status + status.current_node_matches = + source_node(context) === + source_node(runtime_model(context), object_id(context)) return nothing end @@ -161,7 +175,11 @@ end @test source_node(model, new_leaf_status) === new_leaf_status.node simulation = run!(model; steps=1, outputs=:none) - @test model_object(model, (:Scene, 1)).status.matches + probe_status = model_object(model, (:Scene, 1)).status + @test probe_status.matches + @test probe_status.current_object_matches + @test probe_status.current_status_matches + @test probe_status.current_node_matches @test object_id(simulation, leaf) == leaf_id remove_object!(model, new_leaf_id) From e6aae3b939a36719dcdec79f02a07f09130f8ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Wed, 26 Aug 2026 10:36:35 +0200 Subject: [PATCH 21/45] feat: validate scientific variable contracts --- README.md | 4 +- docs/src/API/API_public.md | 7 + docs/src/API/public_symbols.md | 10 +- docs/src/model_traits.md | 46 ++++++ src/ModelSpec.jl | 25 +++ src/PlantSimEngine.jl | 2 + src/composite_model/compilation.jl | 9 ++ src/composite_model/registry_topology.jl | 1 + src/composite_model/selectors.jl | 1 + src/model_discovery.jl | 19 +++ src/variable_contracts.jl | 195 +++++++++++++++++++++++ test/test-model-api-stabilization.jl | 2 + test/test-model-contract.jl | 195 +++++++++++++++++++++++ 13 files changed, 510 insertions(+), 6 deletions(-) create mode 100644 src/variable_contracts.jl diff --git a/README.md b/README.md index 288e5c037..6642b77f8 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ A modeler writes generic kernels with: - `inputs_` declarations using `Required(T)` or `Default(value)` - `outputs_` -- optional `dep`, `timespec`, `output_policy`, `environment_inputs_`, and - `environment_outputs_` traits +- optional `dep`, `timespec`, `output_policy`, `environment_inputs_`, + `environment_outputs_`, and `variable_contracts_` traits - `run!(model, status, environment, constants, context)` A simulation author assembles those kernels on objects with `CompositeModel`, diff --git a/docs/src/API/API_public.md b/docs/src/API/API_public.md index e6c2bbaa6..946bfc918 100644 --- a/docs/src/API/API_public.md +++ b/docs/src/API/API_public.md @@ -72,6 +72,13 @@ have not been mutated. Replace the ID-column object when either changes. - `outputs_(model)` literals remain initial output-state values. - `init_variables(model)` returns only genuine input defaults and initial output values. +- `VariableContract` records a variable's unit, spatial or object basis, + temporal basis, aggregation meaning, and intensive/extensive character + without wrapping its runtime value. +- `variable_contracts(model)` returns validated declarations from the + package-extension trait `PlantSimEngine.variable_contracts_`. A compiled + producer-consumer binding must have identical contracts once either side + declares one. ### Selectors diff --git a/docs/src/API/public_symbols.md b/docs/src/API/public_symbols.md index d99ebb4ee..12a2e7868 100644 --- a/docs/src/API/public_symbols.md +++ b/docs/src/API/public_symbols.md @@ -68,7 +68,7 @@ inspection: - Model identity: `AbstractModel`, `@process`, `process`. - State schema and initialization: `Status`, `Required`, `Default`, - `init_variables`, `dep`. + `VariableContract`, `variable_contracts`, `init_variables`, `dep`. - Model IO inspection: `inputs`, `outputs`, `variables`, `environment_inputs`, `environment_outputs`, `validate_environment_inputs`. @@ -77,12 +77,14 @@ inspection: - Timing and routing traits: `timespec`, `output_policy`, `timestep_hint`, `environment_hint`, `environment_bindings`, `environment_window`. -The underscore declarations `inputs_`, `outputs_`, `environment_inputs_`, and -`environment_outputs_` are intentionally unexported extension functions. +The underscore declarations `inputs_`, `outputs_`, `environment_inputs_`, +`environment_outputs_`, and `variable_contracts_` are intentionally +unexported extension functions. Model authors implement them with qualified definitions such as `PlantSimEngine.inputs_(model) = ...`. `inputs_` must return explicit `Required(T)` or `Default(value)` declarations; `outputs_` returns initial -output-state values. +output-state values; `variable_contracts_` returns `VariableContract` metadata +for declared status or environment variables. ## Time and reducers diff --git a/docs/src/model_traits.md b/docs/src/model_traits.md index 58288c237..38e829b80 100644 --- a/docs/src/model_traits.md +++ b/docs/src/model_traits.md @@ -41,6 +41,52 @@ Before running a scenario, `Diagnostics.explain_initialization(model)` classifie `:required`, `:defaulted`, `:supplied`, or `:producer_bound`. A `:required` row must be resolved before compilation can succeed. +## Scientific meaning and dimensions + +Names and Julia types are not enough to distinguish, for example, daily PAR +per ground area from daily PAR per plant. Add a `VariableContract` when a +variable participates in scientific coupling: + +```julia +const PLANT_DAILY_PAR = VariableContract( + unit=:mol_photon, + basis=:plant, + temporal=:day, + aggregation=:total, + extent=:extensive, +) + +PlantSimEngine.variable_contracts_(::PlantLight) = ( + absorbed_par=PLANT_DAILY_PAR, +) +PlantSimEngine.variable_contracts_(::PlantGrowth) = ( + absorbed_par=PLANT_DAILY_PAR, +) +``` + +The tokens are open symbols, but a connected producer and consumer must declare +the same complete contract. Once either side declares one, a missing contract +on the other side is also a compilation error. Renaming a variable with +`var=...` does not convert its meaning; put unit, basis, or time conversion in +an explicit model boundary. + +`VariableContract` is metadata only. Status and environment payloads remain +ordinary numbers, arrays, unit-bearing values, or automatic-differentiation +values, so the contract adds no wrapper to a model's numerical hot loop. + +Use `variable_contracts(model)` to inspect the validated declarations. Contract +keys must occur in one of the model's declared status or environment traits, or +in the compiled application's distributed `outputs_to` declaration. + +| Role | Declaration | Ownership | +|---|---|---| +| Status input | `inputs_` | object state or a compiled model producer | +| Environment input | `environment_inputs_` | the active forcing backend | +| Constant | the `constants` argument | simulation configuration, not mutable status | +| Manual model call | `dep` plus `ModelSpec(...; calls=...)` | explicit callee execution; the callee keeps its own variable declarations | +| Local status output | `outputs_` | the target object's runtime status | +| Distributed output | `ModelSpec(...; outputs_to=...)` | explicitly selected destination objects | + ## Manual Dependencies Implement `dep(model)` only when the model directly calls another process from diff --git a/src/ModelSpec.jl b/src/ModelSpec.jl index 81efb4698..a62f5bf7f 100644 --- a/src/ModelSpec.jl +++ b/src/ModelSpec.jl @@ -466,6 +466,31 @@ function dep(spec::ModelSpec) end environment_inputs_(m::ModelSpec) = environment_inputs_(model_(m)) environment_outputs_(m::ModelSpec) = environment_outputs_(model_(m)) +variable_contracts_(m::ModelSpec) = variable_contracts_(model_(m)) + +function _declared_contract_variable_names(spec::ModelSpec) + declared = _declared_contract_variable_names(model_(spec)) + for destination in values(spec.outputs_to) + union!(declared, Symbol.(keys(destination.vars))) + end + return declared +end + +function _validate_variable_contract_names(spec::ModelSpec, schema) + declared = _declared_contract_variable_names(spec) + unknown = sort!( + Symbol[name for name in keys(schema) if Symbol(name) ∉ declared]; + by=string, + ) + isempty(unknown) || return _invalid_variable_contract_schema_error( + spec, + "declares unknown variable(s) `$(Tuple(unknown))`. Contract keys must " * + "also appear in `inputs_`, `outputs_`, `environment_inputs_`, " * + "`environment_outputs_`, or this ModelSpec's distributed `outputs_to` " * + "variables.", + ) + return schema +end function run!(m::ModelSpec, status, environment, constants=nothing, context=nothing) return run!(model_(m), status, environment, constants, context) diff --git a/src/PlantSimEngine.jl b/src/PlantSimEngine.jl index 3e8396aaa..5c567166e 100644 --- a/src/PlantSimEngine.jl +++ b/src/PlantSimEngine.jl @@ -31,6 +31,7 @@ include("variables_wrappers.jl") # Models: include("Abstract_model_structs.jl") include("input_schema.jl") +include("variable_contracts.jl") # Multi-rate scaffolding: include("time/multirate.jl") @@ -330,6 +331,7 @@ export call_targets, call_model, run_call!, commit_environment! export bound_input, output_targets, assign_outputs! export Status export Required, Default +export VariableContract, variable_contracts export @process, process export init_variables, dep export inputs, outputs, variables diff --git a/src/composite_model/compilation.jl b/src/composite_model/compilation.jl index 10a5ab9ad..9fcec6809 100644 --- a/src/composite_model/compilation.jl +++ b/src/composite_model/compilation.jl @@ -4446,6 +4446,14 @@ function _compiled_model_input_plan( origin, distributed_output_plans, ) + for producer_id in potential_source_application_ids + _validate_model_variable_contract!( + application, + input, + applications_by_id[producer_id], + source_var, + ) + end policy = _selector_has_policy(selector) ? _selector_policy(selector) : nothing breaks_same_step_cycle = policy isa PreviousTimeStep if breaks_same_step_cycle && policy.variable != input @@ -4487,6 +4495,7 @@ function _compile_model_input_plans( application.id => application for application in applications ) for application in applications + _variable_contract_schema(application.spec) declared_inputs = value_inputs(application.spec) declared_inputs isa NamedTuple || (declared_inputs = NamedTuple()) declared_names = Set(Symbol.(keys(declared_inputs))) diff --git a/src/composite_model/registry_topology.jl b/src/composite_model/registry_topology.jl index 13573a0e9..b8fcdb70d 100644 --- a/src/composite_model/registry_topology.jl +++ b/src/composite_model/registry_topology.jl @@ -160,6 +160,7 @@ timestep_hint(model::ObjectModelOverrides) = timestep_hint(model.base) environment_hint(model::ObjectModelOverrides) = environment_hint(model.base) environment_inputs_(model::ObjectModelOverrides) = environment_inputs_(model.base) environment_outputs_(model::ObjectModelOverrides) = environment_outputs_(model.base) +variable_contracts_(model::ObjectModelOverrides) = variable_contracts_(model.base) function Object( id; diff --git a/src/composite_model/selectors.jl b/src/composite_model/selectors.jl index 0056352eb..5f3f4165b 100644 --- a/src/composite_model/selectors.jl +++ b/src/composite_model/selectors.jl @@ -307,6 +307,7 @@ function _model_contract(model) outputs=Tuple(Symbol.(keys(outputs_(model)))), environment_inputs=Tuple(Symbol.(keys(environment_inputs_(model)))), environment_outputs=Tuple(Symbol.(keys(environment_outputs_(model)))), + variable_contracts=variable_contracts(model), ) end diff --git a/src/model_discovery.jl b/src/model_discovery.jl index 0b24a9938..a8204985f 100644 --- a/src/model_discovery.jl +++ b/src/model_discovery.jl @@ -78,6 +78,7 @@ function model_descriptor(::Type{T}) where {T<:AbstractModel} "outputs" => _model_var_descriptor(T, outputs_), "environmentInputs" => _model_var_descriptor(T, environment_inputs_), "environmentOutputs" => _model_var_descriptor(T, environment_outputs_), + "variableContracts" => _model_contract_descriptor(T), "timespec" => _safe_string_trait(T, timespec), "outputPolicy" => _safe_string_trait(T, output_policy), "timestepHint" => _safe_string_trait(T, timestep_hint), @@ -86,6 +87,24 @@ function model_descriptor(::Type{T}) where {T<:AbstractModel} ) end +function _model_contract_descriptor(::Type{T}) where {T<:AbstractModel} + instance = _try_zero_arg_model(T) + isnothing(instance) && (instance = _try_dummy_model(T)) + isnothing(instance) && return Dict{String,Any}() + contracts = try + variable_contracts(instance) + catch err + return Dict{String,Any}("_error" => sprint(showerror, err)) + end + return Dict( + string(name) => Dict( + string(field) => (isnothing(value) ? nothing : string(value)) + for (field, value) in pairs(_contract_fields(contract)) + ) + for (name, contract) in pairs(contracts) + ) +end + """ model_constructor_descriptor(::Type{<:AbstractModel}) diff --git a/src/variable_contracts.jl b/src/variable_contracts.jl new file mode 100644 index 000000000..8a88b96fc --- /dev/null +++ b/src/variable_contracts.jl @@ -0,0 +1,195 @@ +""" + VariableContract(; unit, basis=nothing, temporal=nothing, + aggregation=nothing, extent=nothing) + +Scientific meaning attached to a model variable without wrapping its runtime +numeric value. + +- `unit` names the physical numerator unit, for example `:mol_photon`. +- `basis` names the normalization basis, for example `:leaf_area`, + `:ground_area`, or `:plant`. +- `temporal` names the time basis, for example `:second`, `:day`, or `:step`. +- `aggregation` distinguishes values such as `:instantaneous`, `:rate`, + `:mean`, `:total`, and `:accumulated`. +- `extent` distinguishes `:intensive` and `:extensive` quantities when useful. + +Tokens are intentionally open `Symbol`s so packages can extend the vocabulary. +The compiler compares complete contracts exactly; two connected model +variables must therefore use the same tokens. Runtime payloads remain ordinary +numbers or arrays. +""" +struct VariableContract + unit::Symbol + basis::Union{Nothing,Symbol} + temporal::Union{Nothing,Symbol} + aggregation::Union{Nothing,Symbol} + extent::Union{Nothing,Symbol} +end + +function VariableContract( + ; + unit, + basis=nothing, + temporal=nothing, + aggregation=nothing, + extent=nothing, +) + fields = ( + unit=unit, + basis=basis, + temporal=temporal, + aggregation=aggregation, + extent=extent, + ) + for (name, value) in pairs(fields) + value isa Symbol || (name != :unit && isnothing(value)) || throw( + ArgumentError( + "VariableContract `$(name)` must be a Symbol" * + (name == :unit ? "." : " or `nothing`."), + ), + ) + end + return VariableContract(unit, basis, temporal, aggregation, extent) +end + +""" + variable_contracts_(model::AbstractModel) + +Trait declaring the scientific contracts of status and environment variables +used by `model`. Return a named tuple whose keys are variables declared by +`inputs_`, `outputs_`, `environment_inputs_`, or `environment_outputs_`, and +whose values are [`VariableContract`](@ref)s. A model that produces values only +through distributed output groups may also declare those names; each compiled +`ModelSpec` must then include them in `outputs_to`. + +The default is empty for incremental adoption. Once either side of a compiled +model-to-model input binding declares a contract, the other side must declare +the same complete contract. This prevents a contracted variable from silently +falling back to name-only coupling. +""" +variable_contracts_(::AbstractModel) = NamedTuple() +variable_contracts_(::Missing) = NamedTuple() + +""" + variable_contracts(model) + +Return the structurally validated variable-contract declaration for `model`. +Compilation additionally checks each key against the concrete ModelSpec, +including its distributed output declarations. +""" +variable_contracts(model::Union{AbstractModel,Missing}) = + _variable_contract_schema(model) + +function _declared_contract_variable_names(model) + declared = Set{Symbol}() + union!(declared, Symbol.(keys(_input_schema(model)))) + union!(declared, Symbol.(keys(outputs_(model)))) + union!(declared, Symbol.(keys(environment_inputs_(model)))) + union!(declared, Symbol.(keys(environment_outputs_(model)))) + return declared +end + +_validate_variable_contract_names(model, schema) = schema + +@noinline function _invalid_variable_contract_schema_error(model, message) + error("`variable_contracts_($(typeof(model)))` $(message)") +end + +function _variable_contract_schema(model) + schema = variable_contracts_(model) + schema isa NamedTuple || return _invalid_variable_contract_schema_error( + model, + "must return a NamedTuple of `VariableContract` values; got " * + "`$(typeof(schema))`.", + ) + invalid_values = Pair{Symbol,Any}[ + Symbol(name) => value for (name, value) in pairs(schema) + if !(value isa VariableContract) + ] + isempty(invalid_values) || return _invalid_variable_contract_schema_error( + model, + "must contain only `VariableContract` values. Invalid declaration(s): " * + join( + ["`$(name)=$(repr(value))`" for (name, value) in invalid_values], + ", ", + ) * ".", + ) + return _validate_variable_contract_names(model, schema) +end + +function _variable_contract(model, variable::Symbol) + contracts = _variable_contract_schema(model) + variable in keys(contracts) || return nothing + return contracts[variable] +end + +function _contract_fields(contract::VariableContract) + return ( + unit=contract.unit, + basis=contract.basis, + temporal=contract.temporal, + aggregation=contract.aggregation, + extent=contract.extent, + ) +end + +function _contract_mismatches( + producer::VariableContract, + consumer::VariableContract, +) + producer_fields = _contract_fields(producer) + consumer_fields = _contract_fields(consumer) + return Tuple( + name => (producer=producer_fields[name], consumer=consumer_fields[name]) + for name in keys(producer_fields) + if producer_fields[name] != consumer_fields[name] + ) +end + +function _validate_model_variable_contract!( + consumer_application, + input::Symbol, + producer_application, + source_variable::Symbol, +) + consumer_model = consumer_application.spec + producer_model = producer_application.spec + consumer_contract = _variable_contract(consumer_model, input) + producer_contract = _variable_contract(producer_model, source_variable) + isnothing(consumer_contract) && isnothing(producer_contract) && return nothing + + if isnothing(consumer_contract) + error( + "Input `$(input)` on application `$(consumer_application.id)` is bound " * + "to contracted output `$(source_variable)` from application " * + "`$(producer_application.id)`, but the consumer declares no contract. " * + "Add `$(input)=VariableContract(...)` to " * + "`variable_contracts_($(typeof(model_(consumer_model))))`.", + ) + end + if isnothing(producer_contract) + error( + "Input `$(input)` on application `$(consumer_application.id)` declares " * + "a VariableContract, but source output `$(source_variable)` from " * + "application `$(producer_application.id)` declares none. Add " * + "`$(source_variable)=VariableContract(...)` to " * + "`variable_contracts_($(typeof(model_(producer_model))))`.", + ) + end + + mismatches = _contract_mismatches(producer_contract, consumer_contract) + isempty(mismatches) && return nothing + error( + "Incompatible variable contracts for input `$(input)` on application " * + "`$(consumer_application.id)` and output `$(source_variable)` from " * + "application `$(producer_application.id)`: " * + join( + [ + "$(name) producer=$(repr(values.producer)), " * + "consumer=$(repr(values.consumer))" + for (name, values) in mismatches + ], + "; ", + ) * ". Rename or convert the variable at an explicit model boundary.", + ) +end diff --git a/test/test-model-api-stabilization.jl b/test/test-model-api-stabilization.jl index 5675500f2..18a30cc41 100644 --- a/test/test-model-api-stabilization.jl +++ b/test/test-model-api-stabilization.jl @@ -230,6 +230,7 @@ end :Status, :Subtree, :Updates, + :VariableContract, :Weather, :add_organ!, :application_name, @@ -286,6 +287,7 @@ end :updates, :validate_environment_inputs, :value_inputs, + :variable_contracts, :variables, ]) @test public_names == expected_public_names diff --git a/test/test-model-contract.jl b/test/test-model-contract.jl index e5bf691f6..61f2b3fe3 100644 --- a/test/test-model-contract.jl +++ b/test/test-model-contract.jl @@ -18,6 +18,98 @@ PlantSimEngine.environment_hint(::Type{<:ContractExplicitModel}) = (window=Dates PlantSimEngine.environment_inputs_(::ContractExplicitModel) = (T=0,) PlantSimEngine.environment_outputs_(::ContractExplicitModel) = (T=0,) +PlantSimEngine.@process "contract_semantic_source" verbose = false +PlantSimEngine.@process "contract_semantic_consumer" verbose = false + +struct ContractGroundSource <: AbstractContract_Semantic_SourceModel end +struct ContractPlantSource <: AbstractContract_Semantic_SourceModel end +struct ContractUnspecifiedSource <: AbstractContract_Semantic_SourceModel end +struct ContractDistributedGroundSource <: AbstractContract_Semantic_SourceModel end +struct ContractDistributedPlantSource <: AbstractContract_Semantic_SourceModel end +struct ContractPlantConsumer <: AbstractContract_Semantic_ConsumerModel end +struct ContractUnspecifiedConsumer <: AbstractContract_Semantic_ConsumerModel end +struct ContractUnknownVariable <: AbstractContract_Semantic_SourceModel end +struct ContractInvalidDeclaration <: AbstractContract_Semantic_SourceModel end + +PlantSimEngine.inputs_(::Union{ + ContractGroundSource, + ContractPlantSource, + ContractUnspecifiedSource, + ContractDistributedGroundSource, + ContractDistributedPlantSource, + ContractUnknownVariable, + ContractInvalidDeclaration, +}) = NamedTuple() +PlantSimEngine.outputs_(::Union{ + ContractGroundSource, + ContractPlantSource, + ContractUnspecifiedSource, + ContractUnknownVariable, + ContractInvalidDeclaration, +}) = (aPPFD=0.0,) +PlantSimEngine.outputs_(::Union{ + ContractDistributedGroundSource, + ContractDistributedPlantSource, +}) = NamedTuple() +PlantSimEngine.inputs_(::Union{ + ContractPlantConsumer, + ContractUnspecifiedConsumer, +}) = (aPPFD=Required(Float64),) +PlantSimEngine.outputs_(::Union{ + ContractPlantConsumer, + ContractUnspecifiedConsumer, +}) = (observed=0.0,) + +const GROUND_DAILY_PHOTONS = VariableContract( + unit=:mol_photon, + basis=:ground_area, + temporal=:day, + aggregation=:total, + extent=:intensive, +) +const PLANT_DAILY_PHOTONS = VariableContract( + unit=:mol_photon, + basis=:plant, + temporal=:day, + aggregation=:total, + extent=:extensive, +) + +PlantSimEngine.variable_contracts_(::ContractGroundSource) = + (aPPFD=GROUND_DAILY_PHOTONS,) +PlantSimEngine.variable_contracts_(::ContractPlantSource) = + (aPPFD=PLANT_DAILY_PHOTONS,) +PlantSimEngine.variable_contracts_(::ContractDistributedGroundSource) = + (aPPFD=GROUND_DAILY_PHOTONS,) +PlantSimEngine.variable_contracts_(::ContractDistributedPlantSource) = + (aPPFD=PLANT_DAILY_PHOTONS,) +PlantSimEngine.variable_contracts_(::ContractPlantConsumer) = + (aPPFD=PLANT_DAILY_PHOTONS,) +PlantSimEngine.variable_contracts_(::ContractUnknownVariable) = + (unknown=PLANT_DAILY_PHOTONS,) +PlantSimEngine.variable_contracts_(::ContractInvalidDeclaration) = + (aPPFD="mol photons",) + +function PlantSimEngine.run!( + ::Union{ContractGroundSource,ContractPlantSource,ContractUnspecifiedSource}, + status, + environment, + constants, + context, +) + status.aPPFD = 12.0 +end + +function PlantSimEngine.run!( + ::Union{ContractPlantConsumer,ContractUnspecifiedConsumer}, + status, + environment, + constants, + context, +) + status.observed = status.aPPFD +end + @testset "direct model trait defaults" begin model = ContractDefaultsModel() @test process(model) == :contract_defaults @@ -39,4 +131,107 @@ PlantSimEngine.environment_outputs_(::ContractExplicitModel) = (T=0,) @test environment_hint(explicit) == (window=Dates.Hour(2),) @test PlantSimEngine.environment_inputs_(explicit) == (T=0,) @test PlantSimEngine.environment_outputs_(explicit) == (T=0,) + @test variable_contracts(model) == NamedTuple() +end + +function _contract_scene(source, consumer) + return CompositeModel( + Object(:plant; scale=:Plant); + applications=( + ModelSpec(source; name=:source, on=One(scale=:Plant)), + ModelSpec(consumer; name=:consumer, on=One(scale=:Plant)), + ), + ) +end + +function _distributed_contract_scene(source, consumer) + return CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene); + applications=( + ModelSpec( + source; + name=:source, + on=One(scale=:Scene), + outputs_to=( + plants=OutputTo( + Many(scale=:Plant, within=SceneScope()); + vars=(aPPFD=Default(0.0),), + ), + ), + ), + ModelSpec(consumer; name=:consumer, on=One(scale=:Plant)), + ), + ) +end + +@testset "scientific variable contracts" begin + @test_throws ArgumentError VariableContract(unit="mol_photon") + @test_throws ArgumentError VariableContract( + unit=:mol_photon, + basis="ground_area", + ) + @test variable_contracts(ContractPlantSource()) == + (aPPFD=PLANT_DAILY_PHOTONS,) + + compatible = _contract_scene(ContractPlantSource(), ContractPlantConsumer()) + Advanced.refresh_bindings!(compatible) + run!(compatible; outputs=:none) + @test model_object(compatible, :plant).status.observed == 12.0 + + incompatible = _contract_scene(ContractGroundSource(), ContractPlantConsumer()) + @test_throws "Incompatible variable contracts" Advanced.refresh_bindings!( + incompatible, + ) + + missing_producer = + _contract_scene(ContractUnspecifiedSource(), ContractPlantConsumer()) + @test_throws "source output `aPPFD` from application `source` declares none" Advanced.refresh_bindings!( + missing_producer, + ) + + missing_consumer = + _contract_scene(ContractPlantSource(), ContractUnspecifiedConsumer()) + @test_throws "consumer declares no contract" Advanced.refresh_bindings!( + missing_consumer, + ) + + distributed = _distributed_contract_scene( + ContractDistributedPlantSource(), + ContractPlantConsumer(), + ) + Advanced.refresh_bindings!(distributed) + distributed_mismatch = _distributed_contract_scene( + ContractDistributedGroundSource(), + ContractPlantConsumer(), + ) + @test_throws "Incompatible variable contracts" Advanced.refresh_bindings!( + distributed_mismatch, + ) + + unknown_contract = CompositeModel( + Object(:plant; scale=:Plant); + applications=( + ModelSpec( + ContractUnknownVariable(); + name=:unknown, + on=One(scale=:Plant), + ), + ), + ) + @test_throws "declares unknown variable" Advanced.refresh_bindings!( + unknown_contract, + ) + @test_throws "must contain only `VariableContract` values" variable_contracts( + ContractInvalidDeclaration(), + ) + + descriptor = PlantSimEngine.model_descriptor(ContractPlantSource) + @test descriptor["variableContracts"]["aPPFD"] == Dict( + "unit" => "mol_photon", + "basis" => "plant", + "temporal" => "day", + "aggregation" => "total", + "extent" => "extensive", + ) end From e43da4c4209711297a6591f6f0ea28c630e24fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Wed, 26 Aug 2026 11:28:16 +0200 Subject: [PATCH 22/45] docs: document hard-call targets --- src/composite_model/runtime_outputs.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/composite_model/runtime_outputs.jl b/src/composite_model/runtime_outputs.jl index 4d4ed1f33..339b2ea9d 100644 --- a/src/composite_model/runtime_outputs.jl +++ b/src/composite_model/runtime_outputs.jl @@ -434,6 +434,15 @@ function output_targets(context, group) ) end +""" + CallTarget + +One resolved executable target of a declared hard call. Obtain targets from a +[`CallTargets`](@ref) collection with [`call_targets`](@ref), then pass an +individual target to [`run_call!(::CallTarget)`](@ref). A target is a runtime +view owned by its compiled simulation; construct hard-call relationships with +`ModelSpec(...; calls=...)` rather than constructing this type directly. +""" struct CallTarget{CS,EB,A,M,S,VS,TI,OB,CT,BI,OT,ENV,TS,OR,C,E} compiled::CS environment_bindings::EB From 5ccb49ac8383f44fa5ac8fba93c8846bba11ef9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Wed, 26 Aug 2026 14:56:44 +0200 Subject: [PATCH 23/45] feat: initialize newly registered scheduled objects --- docs/src/API/API_public.md | 19 + docs/src/API/public_symbols.md | 3 +- docs/src/guides/multiscale/manual_calls.md | 88 + docs/src/journeys/users/structure_changes.md | 5 +- docs/src/model_execution.md | 8 +- .../tutorials/growing_plant/part1_growth.md | 4 +- .../growing_plant/part3_debugging.md | 9 +- ext/PlantSimEngineGraphEditorExt.jl | 23 +- frontend/dist/.vite/manifest.json | 2 +- .../{index-CfC2_AOV.js => index-DV0bWa8M.js} | 38 +- frontend/dist/index.html | 2 +- frontend/src/App.tsx | 5 +- frontend/src/ApplicationConfigurationForm.tsx | 44 +- frontend/src/DependencyEdge.tsx | 1 + frontend/src/GraphEditorV2.test.ts | 30 +- frontend/src/types.ts | 11 +- src/Abstract_model_structs.jl | 5 +- src/ModelSpec.jl | 22 +- src/PlantSimEngine.jl | 4 +- src/composite_model/compilation.jl | 395 +++- src/composite_model/registry_topology.jl | 10 + src/composite_model/runtime_outputs.jl | 347 ++- src/composite_model/scenario_dsl.jl | 69 +- src/composite_model/selectors.jl | 14 +- src/processes/models_inputs_outputs.jl | 6 +- src/visualization/model_graph_editor_api.jl | 16 +- src/visualization/model_graph_view.jl | 44 +- test/runtests.jl | 4 + test/test-model-api-stabilization.jl | 2 + test/test-model-graph-editor-extension.jl | 128 ++ test/test-model-graph-view.jl | 84 + test/test-model-initializers.jl | 1867 +++++++++++++++++ 32 files changed, 3100 insertions(+), 209 deletions(-) rename frontend/dist/assets/{index-CfC2_AOV.js => index-DV0bWa8M.js} (67%) create mode 100644 test/test-model-initializers.jl diff --git a/docs/src/API/API_public.md b/docs/src/API/API_public.md index 946bfc918..c4477662e 100644 --- a/docs/src/API/API_public.md +++ b/docs/src/API/API_public.md @@ -41,6 +41,9 @@ `NamedTuple` of columns directly. - `Updates(:variable; after=:application_id)` orders intentional duplicate writers. - `Input(...)` and `Call(...)` express model defaults through `dep(model)`. +- `Initializer(One(application=:name, ...))` declares one normally scheduled + application that may initialize a newly registered object during its + creation event. - `run_call!(context, :name; publish=false)` executes every resolved hard-call target and always returns a vector-like `CallTargets` collection. - `run_call!(context, :name; sampled_environment=value)` forwards one already @@ -49,6 +52,10 @@ to exactly one target. - `call_targets(context, :name)` returns the same non-executing collection for fine-grained execution with `run_call!(target; ...)`. +- `run_initializer!(context, :name, object)` runs an `Initializer` binding once + on that newborn object, initializes canonical local status without an extra + mid-step output sample, and returns its canonical `Status`. It is not a + trial-call or existing-object API. Distributed assignment requires exact destination coverage. Every selected object ID must occur exactly once and every declared output column must be @@ -135,6 +142,18 @@ targets. - `move_object!` and `update_geometry!` change spatial state. - Supported lifecycle operations automatically invalidate and refresh the affected structural or spatial bindings before the next timestep. +- A creator that must run an application which already completed on existing + objects declares an `Initializer` call. The compiler orders the scheduled + target before the creator and the creator before direct non-temporal + same-step consumers; + `run_initializer!` admits exactly one target from the current pure-addition + event and rejects repeat, existing, reparented, manual-call, and + refresh-fallback execution. Each initialized output must have one potential + canonical writer across local and distributed destinations. Because + `run_initializer!` emits no mid-step stream sample, + downstream temporal consumers of a possible newborn output are rejected at + compilation; a `PreviousTimeStep` input used by the initializer itself + remains supported. - `run!(model; steps=..., outputs=:none)` starts a fresh result timeline and returns a `Simulation`. - `continue!(simulation; steps=...)` and `step!(simulation)` advance an diff --git a/docs/src/API/public_symbols.md b/docs/src/API/public_symbols.md index 12a2e7868..10ecc7e1a 100644 --- a/docs/src/API/public_symbols.md +++ b/docs/src/API/public_symbols.md @@ -17,7 +17,7 @@ explicitly imports one of those submodules. - Application inspection: `application_name`, `applies_to`, `value_inputs`, `model_calls`, `outputs_to`, `environment_config`, `output_routing`, `updates`. -- Dependency defaults: `Input`, `Call`, `PreviousTimeStep`. +- Dependency defaults: `Input`, `Call`, `Initializer`, `PreviousTimeStep`. ## Object selectors and queries @@ -45,6 +45,7 @@ explicitly imports one of those submodules. `mark_environment_binding_dirty!`, `objects_from_mtg`. - Hard calls: `RunContext`, `CallTarget`, `CallTargets`, `call_model`, `call_targets`, `run_call!`. +- Newborn initialization: `Initializer`, `run_initializer!`. ## Diagnostics namespace diff --git a/docs/src/guides/multiscale/manual_calls.md b/docs/src/guides/multiscale/manual_calls.md index 341ee54e3..edf8f73e3 100644 --- a/docs/src/guides/multiscale/manual_calls.md +++ b/docs/src/guides/multiscale/manual_calls.md @@ -26,6 +26,86 @@ in the model-facing form and is forwarded without sampling. A target used only by calls is absent from root scheduling. Trial calls default to `publish=false`; publish only an accepted execution. +## Initialize a newly registered object + +Use `Initializer`, not an ordinary manual `Call`, when the target application +must remain in the root schedule but a creator needs to run it once on a new +object after its normal slot already passed: + +```julia +creator = ModelSpec( + GrowthModel(); + name=:growth, + on=One(scale=:Plant), + calls=( + leaf_state=Initializer( + One( + scale=:Leaf, + within=Subtree(), + application=:leaf_state, + ), + ), + ), +) + +function PlantSimEngine.run!(::GrowthModel, status, environment, constants, context) + leaf = register_object!( + runtime_model(context), + Object(:new_leaf; scale=:Leaf, parent=object_id(context)), + ) + initialized_status = run_initializer!(context, :leaf_state, leaf) + return nothing +end +``` + +Initializer selectors follow the ordinary contextual-scope rules. A call from +a plant object defaults to `Self()`, so a creator targeting a new descendant +must state `within=Subtree()` explicitly. A scene creator may instead use +`within=SceneScope()` when the target is scene-wide. + +The target application must use `on=Many(...)`, an explicit `application=`, +and exactly the caller's cadence and phase. It remains root-scheduled and owns +its canonical outputs. The compiler orders it before the creator and orders +the execution owners of same-step consumers after the creator. That owner is +the consumer itself for an ordinary scheduled application, the root hard-call +owner for a manual callee, or the consumer's creator when it is another +initializer target. If both calls belong to the same creator, its kernel must +invoke the initializers in dependency order; there is no meaningful self-edge +to impose that intra-kernel order. Targeted newborn +execution supports the global environment, canonical local outputs, +non-temporal inputs, and `PreviousTimeStep` inputs, including canonical input +sources written through another application's `outputs_to`. It rejects nested +calls, distributed or stream-only outputs on the initializer target itself, +other temporal policies, mixed manual ownership, multiple initializer owners, +and any overlapping local or distributed canonical writer for the target's +outputs. Each initialized output must have one canonical writer; `Updates` +ordering cannot make a later writer safe because targeted execution occurs +inside the creator's kernel. + +Only direct, non-temporal downstream consumers may observe the initialized +output later in that same step. `run_initializer!` deliberately publishes no +mid-step stream sample, so the compiler rejects downstream `HoldLast` windows, +`Interpolate`, `Integrate`, `Aggregate`, and `PreviousTimeStep` bindings that +could consume an initializer target's newborn output. This is distinct from a +`PreviousTimeStep` input *used by the initializer itself*, whose newborn +fallback is supported. This first initializer contract does not admit a +temporal downstream binding at all. When later history is required, publish +the value from a distinct scheduled application and consume that application's +history on a later timestep. + +An initializer binding stores only its statically validated application +identity. It does not collect pre-existing target objects or build cached +execution batches; `run_initializer!` resolves only the explicit newborn. + +`run_initializer!` accepts exactly one object added by the current pure +addition event, mutates its canonical local status without adding a mid-step +output-history sample, and returns that canonical `Status`. A second call for +the same application/object pair is an error. The pair is reserved before the +model runs, so a failed initializer remains marked and cannot be retried after +an unknown partial mutation in the same lifecycle event. Existing, reparented, +foreign, or refresh-fallback targets are also errors. Use ordinary `Call` and +`run_call!` for trial execution or repeated controller-owned calls. + ## Compiled plans and changing objects The call declaration is compiled once with the scenario. Its call name, @@ -39,5 +119,13 @@ target buffers. Later applications in the same timestep see the new targets; applications that already ran are not repeated. The following ordinary timestep returns to the cached execution path. +`call_targets(context, name; objects=newborn)` can build a targeted partial +view without crossing that barrier only while the pending lifecycle delta is a +pure addition. If the same event also removes or reparents an object, the +manual-call API performs the full binding and environment refresh before it +resolves the requested objects. This preserves current topology membership but +has the cost of a mid-kernel refresh and consumes the pending dirty state. +`run_initializer!` is stricter: it rejects such a mixed structural event. + Explicit target cadence must match the caller. A target without an explicit cadence inherits the caller's invocation timing. diff --git a/docs/src/journeys/users/structure_changes.md b/docs/src/journeys/users/structure_changes.md index f745b2b8c..b09749df7 100644 --- a/docs/src/journeys/users/structure_changes.md +++ b/docs/src/journeys/users/structure_changes.md @@ -103,8 +103,9 @@ targets_after_refresh = only( When a lifecycle operation occurs *inside* a model kernel, PlantSimEngine refreshes after that application. A newly registered object may therefore run -applications that remain later in the same timestep, but it never -retroactively runs applications that already completed. +applications that remain later in the same timestep. It runs an application +that already completed only through an explicit `Initializer` binding and +`run_initializer!` call from its creator. ## Reparent, then remove diff --git a/docs/src/model_execution.md b/docs/src/model_execution.md index 8e2fa5dea..4418ca923 100644 --- a/docs/src/model_execution.md +++ b/docs/src/model_execution.md @@ -406,6 +406,8 @@ inside that call. At the safe barrier after the mutating application, PlantSimEngine refreshes affected structural targets, value carriers, hard-call targets, writer validation, temporal storage, execution groups, output-request matches, and environment handles. A new object can therefore run an application -that remains later in the same timestep, but it does not retroactively run an -application that already completed. Already published streams remain available -for removed objects. +that remains later in the same timestep. It does not retroactively run an +application that already completed unless its creator declares that application +as an [`Initializer`](@ref) and explicitly calls [`run_initializer!`](@ref) on +the newborn object. Already published streams remain available for removed +objects. diff --git a/docs/src/tutorials/growing_plant/part1_growth.md b/docs/src/tutorials/growing_plant/part1_growth.md index 37bdc6418..aa692f125 100644 --- a/docs/src/tutorials/growing_plant/part1_growth.md +++ b/docs/src/tutorials/growing_plant/part1_growth.md @@ -6,7 +6,9 @@ model calls `register_object!` after its carbon or thermal threshold is met. Structural changes refresh compiled targets after the application that made the change. A new leaf may run applications that remain later in the same -timestep, but it never retroactively runs applications that already completed. +timestep. It runs an application that already completed only when its creator +declares that application as an `Initializer` and explicitly initializes the +newborn object. When callers mutate structure between `step!` calls, refresh occurs before the next step. diff --git a/docs/src/tutorials/growing_plant/part3_debugging.md b/docs/src/tutorials/growing_plant/part3_debugging.md index 1c4c6bbf7..eff0e2282 100644 --- a/docs/src/tutorials/growing_plant/part3_debugging.md +++ b/docs/src/tutorials/growing_plant/part3_debugging.md @@ -26,7 +26,8 @@ iteration limit, tolerance, fallback, and whether any state is accepted. Structural mutation is also transactional at the timestep boundary. A new organ is registered immediately in the model registry but does not recursively -run during the kernel that created it. Before the next timestep, compilation -refreshes targets, carriers, calls, writer validation, schedules, and requested -outputs. Geometry-only movement refreshes only affected spatial bindings where -possible. +run merely because it was created. A creator may explicitly initialize one +newborn object through a declared `Initializer`; otherwise, compilation refreshes +targets, carriers, calls, writer validation, schedules, and requested outputs at +the safe barrier. Geometry-only movement refreshes only affected spatial +bindings where possible. diff --git a/ext/PlantSimEngineGraphEditorExt.jl b/ext/PlantSimEngineGraphEditorExt.jl index 3722c831d..d0f6109c8 100644 --- a/ext/PlantSimEngineGraphEditorExt.jl +++ b/ext/PlantSimEngineGraphEditorExt.jl @@ -578,11 +578,24 @@ function _edit_from_command(session, command) application, Symbol(command["input"]), ) - kind == "set_call_binding" && return PlantSimEngine.GraphEditor.SetModelCallBinding( - application, - Symbol(command["call"]), - _selector_for_application(session, application, command["selector"]), - ) + if kind == "set_call_binding" + selector = _selector_for_application( + session, + application, + command["selector"], + ) + mode = Symbol(get(command, "mode", "manual")) + mode in (:manual, :initializer) || error( + "Call binding mode must be `manual` or `initializer`, got `$(mode)`.", + ) + binding = mode === :initializer ? + PlantSimEngine.Initializer(selector) : selector + return PlantSimEngine.GraphEditor.SetModelCallBinding( + application, + Symbol(command["call"]), + binding, + ) + end kind == "remove_call_binding" && return PlantSimEngine.GraphEditor.RemoveModelCallBinding( application, Symbol(command["call"]), diff --git a/frontend/dist/.vite/manifest.json b/frontend/dist/.vite/manifest.json index ebe27b401..5781be699 100644 --- a/frontend/dist/.vite/manifest.json +++ b/frontend/dist/.vite/manifest.json @@ -1,6 +1,6 @@ { "index.html": { - "file": "assets/index-CfC2_AOV.js", + "file": "assets/index-DV0bWa8M.js", "name": "index", "src": "index.html", "isEntry": true, diff --git a/frontend/dist/assets/index-CfC2_AOV.js b/frontend/dist/assets/index-DV0bWa8M.js similarity index 67% rename from frontend/dist/assets/index-CfC2_AOV.js rename to frontend/dist/assets/index-DV0bWa8M.js index b3b405c92..ad6a85707 100644 --- a/frontend/dist/assets/index-CfC2_AOV.js +++ b/frontend/dist/assets/index-DV0bWa8M.js @@ -1,26 +1,26 @@ -(function(){const E=document.createElement("link").relList;if(E&&E.supports&&E.supports("modulepreload"))return;for(const N of document.querySelectorAll('link[rel="modulepreload"]'))M(N);new MutationObserver(N=>{for(const $ of N)if($.type==="childList")for(const k of $.addedNodes)k.tagName==="LINK"&&k.rel==="modulepreload"&&M(k)}).observe(document,{childList:!0,subtree:!0});function x(N){const $={};return N.integrity&&($.integrity=N.integrity),N.referrerPolicy&&($.referrerPolicy=N.referrerPolicy),N.crossOrigin==="use-credentials"?$.credentials="include":N.crossOrigin==="anonymous"?$.credentials="omit":$.credentials="same-origin",$}function M(N){if(N.ep)return;N.ep=!0;const $=x(N);fetch(N.href,$)}})();var Lhn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bke(g){return g&&g.__esModule&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g}var C7e={exports:{}},IG={};var Phn;function izn(){if(Phn)return IG;Phn=1;var g=Symbol.for("react.transitional.element"),E=Symbol.for("react.fragment");function x(M,N,$){var k=null;if($!==void 0&&(k=""+$),N.key!==void 0&&(k=""+N.key),"key"in N){$={};for(var H in N)H!=="key"&&($[H]=N[H])}else $=N;return N=$.ref,{$$typeof:g,type:M,key:k,ref:N!==void 0?N:null,props:$}}return IG.Fragment=E,IG.jsx=x,IG.jsxs=x,IG}var $hn;function rzn(){return $hn||($hn=1,C7e.exports=izn()),C7e.exports}var L=rzn(),T7e={exports:{}},Mc={};var Rhn;function czn(){if(Rhn)return Mc;Rhn=1;var g=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),k=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),G=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),Z=Symbol.iterator;function le(ye){return ye===null||typeof ye!="object"?null:(ye=Z&&ye[Z]||ye["@@iterator"],typeof ye=="function"?ye:null)}var oe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ee=Object.assign,Ce={};function pe(ye,Re,tt){this.props=ye,this.context=Re,this.refs=Ce,this.updater=tt||oe}pe.prototype.isReactComponent={},pe.prototype.setState=function(ye,Re){if(typeof ye!="object"&&typeof ye!="function"&&ye!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,ye,Re,"setState")},pe.prototype.forceUpdate=function(ye){this.updater.enqueueForceUpdate(this,ye,"forceUpdate")};function $e(){}$e.prototype=pe.prototype;function ae(ye,Re,tt){this.props=ye,this.context=Re,this.refs=Ce,this.updater=tt||oe}var Ne=ae.prototype=new $e;Ne.constructor=ae,ee(Ne,pe.prototype),Ne.isPureReactComponent=!0;var Ue=Array.isArray;function ln(){}var un={H:null,A:null,T:null,S:null},An=Object.prototype.hasOwnProperty;function xn(ye,Re,tt){var ut=tt.ref;return{$$typeof:g,type:ye,key:Re,ref:ut!==void 0?ut:null,props:tt}}function nt(ye,Re){return xn(ye.type,Re,ye.props)}function dn(ye){return typeof ye=="object"&&ye!==null&&ye.$$typeof===g}function bn(ye){var Re={"=":"=0",":":"=2"};return"$"+ye.replace(/[=:]/g,function(tt){return Re[tt]})}var Y=/\/+/g;function Je(ye,Re){return typeof ye=="object"&&ye!==null&&ye.key!=null?bn(""+ye.key):Re.toString(36)}function pn(ye){switch(ye.status){case"fulfilled":return ye.value;case"rejected":throw ye.reason;default:switch(typeof ye.status=="string"?ye.then(ln,ln):(ye.status="pending",ye.then(function(Re){ye.status==="pending"&&(ye.status="fulfilled",ye.value=Re)},function(Re){ye.status==="pending"&&(ye.status="rejected",ye.reason=Re)})),ye.status){case"fulfilled":return ye.value;case"rejected":throw ye.reason}}throw ye}function Ae(ye,Re,tt,ut,Jt){var di=typeof ye;(di==="undefined"||di==="boolean")&&(ye=null);var Gt=!1;if(ye===null)Gt=!0;else switch(di){case"bigint":case"string":case"number":Gt=!0;break;case"object":switch(ye.$$typeof){case g:case E:Gt=!0;break;case ie:return Gt=ye._init,Ae(Gt(ye._payload),Re,tt,ut,Jt)}}if(Gt)return Jt=Jt(ye),Gt=ut===""?"."+Je(ye,0):ut,Ue(Jt)?(tt="",Gt!=null&&(tt=Gt.replace(Y,"$&/")+"/"),Ae(Jt,Re,tt,"",function(Kr){return Kr})):Jt!=null&&(dn(Jt)&&(Jt=nt(Jt,tt+(Jt.key==null||ye&&ye.key===Jt.key?"":(""+Jt.key).replace(Y,"$&/")+"/")+Gt)),Re.push(Jt)),1;Gt=0;var xt=ut===""?".":ut+":";if(Ue(ye))for(var si=0;si>>1,Pn=Ae[yn];if(0>>1;ynN(tt,nn))utN(Jt,tt)?(Ae[yn]=Jt,Ae[ut]=nn,yn=ut):(Ae[yn]=tt,Ae[Re]=nn,yn=Re);else if(utN(Jt,nn))Ae[yn]=Jt,Ae[ut]=nn,yn=ut;else break e}}return ve}function N(Ae,ve){var nn=Ae.sortIndex-ve.sortIndex;return nn!==0?nn:Ae.id-ve.id}if(g.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var $=performance;g.unstable_now=function(){return $.now()}}else{var k=Date,H=k.now();g.unstable_now=function(){return k.now()-H}}var U=[],G=[],ie=1,W=null,Z=3,le=!1,oe=!1,ee=!1,Ce=!1,pe=typeof setTimeout=="function"?setTimeout:null,$e=typeof clearTimeout=="function"?clearTimeout:null,ae=typeof setImmediate<"u"?setImmediate:null;function Ne(Ae){for(var ve=x(G);ve!==null;){if(ve.callback===null)M(G);else if(ve.startTime<=Ae)M(G),ve.sortIndex=ve.expirationTime,E(U,ve);else break;ve=x(G)}}function Ue(Ae){if(ee=!1,Ne(Ae),!oe)if(x(U)!==null)oe=!0,ln||(ln=!0,bn());else{var ve=x(G);ve!==null&&pn(Ue,ve.startTime-Ae)}}var ln=!1,un=-1,An=5,xn=-1;function nt(){return Ce?!0:!(g.unstable_now()-xnAe&&nt());){var yn=W.callback;if(typeof yn=="function"){W.callback=null,Z=W.priorityLevel;var Pn=yn(W.expirationTime<=Ae);if(Ae=g.unstable_now(),typeof Pn=="function"){W.callback=Pn,Ne(Ae),ve=!0;break n}W===x(U)&&M(U),Ne(Ae)}else M(U);W=x(U)}if(W!==null)ve=!0;else{var ye=x(G);ye!==null&&pn(Ue,ye.startTime-Ae),ve=!1}}break e}finally{W=null,Z=nn,le=!1}ve=void 0}}finally{ve?bn():ln=!1}}}var bn;if(typeof ae=="function")bn=function(){ae(dn)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,Je=Y.port2;Y.port1.onmessage=dn,bn=function(){Je.postMessage(null)}}else bn=function(){pe(dn,0)};function pn(Ae,ve){un=pe(function(){Ae(g.unstable_now())},ve)}g.unstable_IdlePriority=5,g.unstable_ImmediatePriority=1,g.unstable_LowPriority=4,g.unstable_NormalPriority=3,g.unstable_Profiling=null,g.unstable_UserBlockingPriority=2,g.unstable_cancelCallback=function(Ae){Ae.callback=null},g.unstable_forceFrameRate=function(Ae){0>Ae||125yn?(Ae.sortIndex=nn,E(G,Ae),x(U)===null&&Ae===x(G)&&(ee?($e(un),un=-1):ee=!0,pn(Ue,nn-yn))):(Ae.sortIndex=Pn,E(U,Ae),oe||le||(oe=!0,ln||(ln=!0,bn()))),Ae},g.unstable_shouldYield=nt,g.unstable_wrapCallback=function(Ae){var ve=Z;return function(){var nn=Z;Z=ve;try{return Ae.apply(this,arguments)}finally{Z=nn}}}})(I7e)),I7e}var Fhn;function szn(){return Fhn||(Fhn=1,N7e.exports=ozn()),N7e.exports}var D7e={exports:{}},rd={};var Jhn;function lzn(){if(Jhn)return rd;Jhn=1;var g=ZG();function E(U){var G="https://react.dev/errors/"+U;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g)}catch(E){console.error(E)}}return g(),D7e.exports=lzn(),D7e.exports}var Ghn;function fzn(){if(Ghn)return DG;Ghn=1;var g=szn(),E=ZG(),x=sdn();function M(a){var d="https://react.dev/errors/"+a;if(1Pn||(a.current=yn[Pn],yn[Pn]=null,Pn--)}function tt(a,d){Pn++,yn[Pn]=a.current,a.current=d}var ut=ye(null),Jt=ye(null),di=ye(null),Gt=ye(null);function xt(a,d){switch(tt(di,d),tt(Jt,a),tt(ut,null),d.nodeType){case 9:case 11:a=(a=d.documentElement)&&(a=a.namespaceURI)?fP(a):0;break;default:if(a=d.tagName,d=d.namespaceURI)d=fP(d),a=aP(d,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}Re(ut),tt(ut,a)}function si(){Re(ut),Re(Jt),Re(di)}function Kr(a){a.memoizedState!==null&&tt(Gt,a);var d=ut.current,w=aP(d,a.type);d!==w&&(tt(Jt,a),tt(ut,w))}function Er(a){Jt.current===a&&(Re(ut),Re(Jt)),Gt.current===a&&(Re(Gt),n4._currentValue=nn)}var Mt,bi;function zi(a){if(Mt===void 0)try{throw Error()}catch(w){var d=w.stack.trim().match(/\n( *(at )?)/);Mt=d&&d[1]||"",bi=-1{for(const $ of N)if($.type==="childList")for(const k of $.addedNodes)k.tagName==="LINK"&&k.rel==="modulepreload"&&M(k)}).observe(document,{childList:!0,subtree:!0});function x(N){const $={};return N.integrity&&($.integrity=N.integrity),N.referrerPolicy&&($.referrerPolicy=N.referrerPolicy),N.crossOrigin==="use-credentials"?$.credentials="include":N.crossOrigin==="anonymous"?$.credentials="omit":$.credentials="same-origin",$}function M(N){if(N.ep)return;N.ep=!0;const $=x(N);fetch(N.href,$)}})();var Lhn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bke(g){return g&&g.__esModule&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g}var C7e={exports:{}},IG={};var Phn;function izn(){if(Phn)return IG;Phn=1;var g=Symbol.for("react.transitional.element"),E=Symbol.for("react.fragment");function x(M,N,$){var k=null;if($!==void 0&&(k=""+$),N.key!==void 0&&(k=""+N.key),"key"in N){$={};for(var H in N)H!=="key"&&($[H]=N[H])}else $=N;return N=$.ref,{$$typeof:g,type:M,key:k,ref:N!==void 0?N:null,props:$}}return IG.Fragment=E,IG.jsx=x,IG.jsxs=x,IG}var $hn;function rzn(){return $hn||($hn=1,C7e.exports=izn()),C7e.exports}var _=rzn(),T7e={exports:{}},Mc={};var Rhn;function czn(){if(Rhn)return Mc;Rhn=1;var g=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),k=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),G=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),Z=Symbol.iterator;function se(ye){return ye===null||typeof ye!="object"?null:(ye=Z&&ye[Z]||ye["@@iterator"],typeof ye=="function"?ye:null)}var oe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ee=Object.assign,Me={};function pe(ye,Re,Hn){this.props=ye,this.context=Re,this.refs=Me,this.updater=Hn||oe}pe.prototype.isReactComponent={},pe.prototype.setState=function(ye,Re){if(typeof ye!="object"&&typeof ye!="function"&&ye!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,ye,Re,"setState")},pe.prototype.forceUpdate=function(ye){this.updater.enqueueForceUpdate(this,ye,"forceUpdate")};function Pe(){}Pe.prototype=pe.prototype;function ae(ye,Re,Hn){this.props=ye,this.context=Re,this.refs=Me,this.updater=Hn||oe}var Ne=ae.prototype=new Pe;Ne.constructor=ae,ee(Ne,pe.prototype),Ne.isPureReactComponent=!0;var Xe=Array.isArray;function ln(){}var on={H:null,A:null,T:null,S:null},An=Object.prototype.hasOwnProperty;function xn(ye,Re,Hn){var rt=Hn.ref;return{$$typeof:g,type:ye,key:Re,ref:rt!==void 0?rt:null,props:Hn}}function tt(ye,Re){return xn(ye.type,Re,ye.props)}function vn(ye){return typeof ye=="object"&&ye!==null&&ye.$$typeof===g}function wn(ye){var Re={"=":"=0",":":"=2"};return"$"+ye.replace(/[=:]/g,function(Hn){return Re[Hn]})}var Y=/\/+/g;function Je(ye,Re){return typeof ye=="object"&&ye!==null&&ye.key!=null?wn(""+ye.key):Re.toString(36)}function pn(ye){switch(ye.status){case"fulfilled":return ye.value;case"rejected":throw ye.reason;default:switch(typeof ye.status=="string"?ye.then(ln,ln):(ye.status="pending",ye.then(function(Re){ye.status==="pending"&&(ye.status="fulfilled",ye.value=Re)},function(Re){ye.status==="pending"&&(ye.status="rejected",ye.reason=Re)})),ye.status){case"fulfilled":return ye.value;case"rejected":throw ye.reason}}throw ye}function xe(ye,Re,Hn,rt,Jt){var di=typeof ye;(di==="undefined"||di==="boolean")&&(ye=null);var Gt=!1;if(ye===null)Gt=!0;else switch(di){case"bigint":case"string":case"number":Gt=!0;break;case"object":switch(ye.$$typeof){case g:case E:Gt=!0;break;case ie:return Gt=ye._init,xe(Gt(ye._payload),Re,Hn,rt,Jt)}}if(Gt)return Jt=Jt(ye),Gt=rt===""?"."+Je(ye,0):rt,Xe(Jt)?(Hn="",Gt!=null&&(Hn=Gt.replace(Y,"$&/")+"/"),xe(Jt,Re,Hn,"",function(Kr){return Kr})):Jt!=null&&(vn(Jt)&&(Jt=tt(Jt,Hn+(Jt.key==null||ye&&ye.key===Jt.key?"":(""+Jt.key).replace(Y,"$&/")+"/")+Gt)),Re.push(Jt)),1;Gt=0;var xt=rt===""?".":rt+":";if(Xe(ye))for(var si=0;si>>1,Mn=xe[$e];if(0>>1;$eN(Hn,fn))rtN(Jt,Hn)?(xe[$e]=Jt,xe[rt]=fn,$e=rt):(xe[$e]=Hn,xe[Re]=fn,$e=Re);else if(rtN(Jt,fn))xe[$e]=Jt,xe[rt]=fn,$e=rt;else break e}}return qe}function N(xe,qe){var fn=xe.sortIndex-qe.sortIndex;return fn!==0?fn:xe.id-qe.id}if(g.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var $=performance;g.unstable_now=function(){return $.now()}}else{var k=Date,H=k.now();g.unstable_now=function(){return k.now()-H}}var U=[],G=[],ie=1,W=null,Z=3,se=!1,oe=!1,ee=!1,Me=!1,pe=typeof setTimeout=="function"?setTimeout:null,Pe=typeof clearTimeout=="function"?clearTimeout:null,ae=typeof setImmediate<"u"?setImmediate:null;function Ne(xe){for(var qe=x(G);qe!==null;){if(qe.callback===null)M(G);else if(qe.startTime<=xe)M(G),qe.sortIndex=qe.expirationTime,E(U,qe);else break;qe=x(G)}}function Xe(xe){if(ee=!1,Ne(xe),!oe)if(x(U)!==null)oe=!0,ln||(ln=!0,wn());else{var qe=x(G);qe!==null&&pn(Xe,qe.startTime-xe)}}var ln=!1,on=-1,An=5,xn=-1;function tt(){return Me?!0:!(g.unstable_now()-xnxe&&tt());){var $e=W.callback;if(typeof $e=="function"){W.callback=null,Z=W.priorityLevel;var Mn=$e(W.expirationTime<=xe);if(xe=g.unstable_now(),typeof Mn=="function"){W.callback=Mn,Ne(xe),qe=!0;break n}W===x(U)&&M(U),Ne(xe)}else M(U);W=x(U)}if(W!==null)qe=!0;else{var ye=x(G);ye!==null&&pn(Xe,ye.startTime-xe),qe=!1}}break e}finally{W=null,Z=fn,se=!1}qe=void 0}}finally{qe?wn():ln=!1}}}var wn;if(typeof ae=="function")wn=function(){ae(vn)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,Je=Y.port2;Y.port1.onmessage=vn,wn=function(){Je.postMessage(null)}}else wn=function(){pe(vn,0)};function pn(xe,qe){on=pe(function(){xe(g.unstable_now())},qe)}g.unstable_IdlePriority=5,g.unstable_ImmediatePriority=1,g.unstable_LowPriority=4,g.unstable_NormalPriority=3,g.unstable_Profiling=null,g.unstable_UserBlockingPriority=2,g.unstable_cancelCallback=function(xe){xe.callback=null},g.unstable_forceFrameRate=function(xe){0>xe||125$e?(xe.sortIndex=fn,E(G,xe),x(U)===null&&xe===x(G)&&(ee?(Pe(on),on=-1):ee=!0,pn(Xe,fn-$e))):(xe.sortIndex=Mn,E(U,xe),oe||se||(oe=!0,ln||(ln=!0,wn()))),xe},g.unstable_shouldYield=tt,g.unstable_wrapCallback=function(xe){var qe=Z;return function(){var fn=Z;Z=qe;try{return xe.apply(this,arguments)}finally{Z=fn}}}})(I7e)),I7e}var Fhn;function szn(){return Fhn||(Fhn=1,N7e.exports=ozn()),N7e.exports}var D7e={exports:{}},rd={};var Jhn;function lzn(){if(Jhn)return rd;Jhn=1;var g=ZG();function E(U){var G="https://react.dev/errors/"+U;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g)}catch(E){console.error(E)}}return g(),D7e.exports=lzn(),D7e.exports}var Ghn;function fzn(){if(Ghn)return DG;Ghn=1;var g=szn(),E=ZG(),x=sdn();function M(a){var d="https://react.dev/errors/"+a;if(1Mn||(a.current=$e[Mn],$e[Mn]=null,Mn--)}function Hn(a,d){Mn++,$e[Mn]=a.current,a.current=d}var rt=ye(null),Jt=ye(null),di=ye(null),Gt=ye(null);function xt(a,d){switch(Hn(di,d),Hn(Jt,a),Hn(rt,null),d.nodeType){case 9:case 11:a=(a=d.documentElement)&&(a=a.namespaceURI)?fP(a):0;break;default:if(a=d.tagName,d=d.namespaceURI)d=fP(d),a=aP(d,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}Re(rt),Hn(rt,a)}function si(){Re(rt),Re(Jt),Re(di)}function Kr(a){a.memoizedState!==null&&Hn(Gt,a);var d=rt.current,w=aP(d,a.type);d!==w&&(Hn(Jt,a),Hn(rt,w))}function Er(a){Jt.current===a&&(Re(rt),Re(Jt)),Gt.current===a&&(Re(Gt),n4._currentValue=fn)}var Mt,bi;function zi(a){if(Mt===void 0)try{throw Error()}catch(w){var d=w.stack.trim().match(/\n( *(at )?)/);Mt=d&&d[1]||"",bi=-1)":-1T||tn[j]!==Ln[T]){var it=` +`+Mt+a+bi}var cu=!1;function Fu(a,d){if(!a||cu)return"";cu=!0;var w=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var j={DetermineComponentFrameRoot:function(){try{if(d){var gt=function(){throw Error()};if(Object.defineProperty(gt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(gt,[])}catch(et){var Gn=et}Reflect.construct(a,[],gt)}else{try{gt.call()}catch(et){Gn=et}a.call(gt.prototype)}}else{try{throw Error()}catch(et){Gn=et}(gt=a())&&typeof gt.catch=="function"&>.catch(function(){})}}catch(et){if(et&&Gn&&typeof et.stack=="string")return[et.stack,Gn.stack]}return[null,null]}};j.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var T=Object.getOwnPropertyDescriptor(j.DetermineComponentFrameRoot,"name");T&&T.configurable&&Object.defineProperty(j.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var I=j.DetermineComponentFrameRoot(),Q=I[0],de=I[1];if(Q&&de){var tn=Q.split(` +`),Pn=de.split(` +`);for(T=j=0;jT||tn[j]!==Pn[T]){var it=` `+tn[j].replace(" at new "," at ");return a.displayName&&it.includes("")&&(it=it.replace("",a.displayName)),it}while(1<=j&&0<=T);break}}}finally{cu=!1,Error.prepareStackTrace=w}return(w=a?a.displayName||a.name:"")?zi(w):""}function Rs(a,d){switch(a.tag){case 26:case 27:case 5:return zi(a.type);case 16:return zi("Lazy");case 13:return a.child!==d&&d!==null?zi("Suspense Fallback"):zi("Suspense");case 19:return zi("SuspenseList");case 0:case 15:return Fu(a.type,!1);case 11:return Fu(a.type.render,!1);case 1:return Fu(a.type,!0);case 31:return zi("Activity");default:return""}}function ia(a){try{var d="",w=null;do d+=Rs(a,w),w=a,a=a.return;while(a);return d}catch(j){return` Error generating stack: `+j.message+` -`+j.stack}}var ef=Object.prototype.hasOwnProperty,Oa=g.unstable_scheduleCallback,Cc=g.unstable_cancelCallback,o0=g.unstable_shouldYield,xb=g.unstable_requestPaint,Sl=g.unstable_now,cd=g.unstable_getCurrentPriorityLevel,s0=g.unstable_ImmediatePriority,uh=g.unstable_UserBlockingPriority,ud=g.unstable_NormalPriority,b5=g.unstable_LowPriority,l0=g.unstable_IdlePriority,Cp=g.log,l6=g.unstable_setDisableYieldValue,Ab=null,ra=null;function od(a){if(typeof Cp=="function"&&l6(a),ra&&typeof ra.setStrictMode=="function")try{ra.setStrictMode(Ab,a)}catch{}}var Sf=Math.clz32?Math.clz32:Tp,f6=Math.log,oh=Math.LN2;function Tp(a){return a>>>=0,a===0?32:31-(f6(a)/oh|0)|0}var Gg=256,qg=262144,Ug=4194304;function sd(a){var d=a&42;if(d!==0)return d;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function Xg(a,d,w){var j=a.pendingLanes;if(j===0)return 0;var T=0,I=a.suspendedLanes,Q=a.pingedLanes;a=a.warmLanes;var de=j&134217727;return de!==0?(j=de&~I,j!==0?T=sd(j):(Q&=de,Q!==0?T=sd(Q):w||(w=de&~a,w!==0&&(T=sd(w))))):(de=j&~I,de!==0?T=sd(de):Q!==0?T=sd(Q):w||(w=j&~a,w!==0&&(T=sd(w)))),T===0?0:d!==0&&d!==T&&(d&I)===0&&(I=T&-T,w=d&-d,I>=w||I===32&&(w&4194048)!==0)?d:T}function Mb(a,d){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&d)===0}function g5(a,d){switch(a){case 1:case 2:case 4:case 8:case 64:return d+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Op(){var a=Ug;return Ug<<=1,(Ug&62914560)===0&&(Ug=4194304),a}function Np(a){for(var d=[],w=0;31>w;w++)d.push(a);return d}function uu(a,d){a.pendingLanes|=d,d!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function w5(a,d,w,j,T,I){var Q=a.pendingLanes;a.pendingLanes=w,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=w,a.entangledLanes&=w,a.errorRecoveryDisabledLanes&=w,a.shellSuspendCounter=0;var de=a.entanglements,tn=a.expirationTimes,Ln=a.hiddenUpdates;for(w=Q&~w;0"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var IA=/[\n"\\]/g;function Lh(a){return a.replace(IA,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function sv(a,d,w,j,T,I,Q,de){a.name="",Q!=null&&typeof Q!="function"&&typeof Q!="symbol"&&typeof Q!="boolean"?a.type=Q:a.removeAttribute("type"),d!=null?Q==="number"?(d===0&&a.value===""||a.value!=d)&&(a.value=""+_h(d)):a.value!==""+_h(d)&&(a.value=""+_h(d)):Q!=="submit"&&Q!=="reset"||a.removeAttribute("value"),d!=null?d6(a,Q,_h(d)):w!=null?d6(a,Q,_h(w)):j!=null&&a.removeAttribute("value"),T==null&&I!=null&&(a.defaultChecked=!!I),T!=null&&(a.checked=T&&typeof T!="function"&&typeof T!="symbol"),de!=null&&typeof de!="function"&&typeof de!="symbol"&&typeof de!="boolean"?a.name=""+_h(de):a.removeAttribute("name")}function sk(a,d,w,j,T,I,Q,de){if(I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(a.type=I),d!=null||w!=null){if(!(I!=="submit"&&I!=="reset"||d!=null)){j5(a);return}w=w!=null?""+_h(w):"",d=d!=null?""+_h(d):w,de||d===a.value||(a.value=d),a.defaultValue=d}j=j??T,j=typeof j!="function"&&typeof j!="symbol"&&!!j,a.checked=de?a.checked:!!j,a.defaultChecked=!!j,Q!=null&&typeof Q!="function"&&typeof Q!="symbol"&&typeof Q!="boolean"&&(a.name=Q),j5(a)}function d6(a,d,w){d==="number"&&ov(a.ownerDocument)===a||a.defaultValue===""+w||(a.defaultValue=""+w)}function Wg(a,d,w,j){if(a=a.options,d){d={};for(var T=0;T"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$A=!1;if(ew)try{var g6={};Object.defineProperty(g6,"passive",{get:function(){$A=!0}}),window.addEventListener("test",g6,g6),window.removeEventListener("test",g6,g6)}catch{$A=!1}var $p=null,RA=null,fk=null;function MD(){if(fk)return fk;var a,d=RA,w=d.length,j,T="value"in $p?$p.value:$p.textContent,I=T.length;for(a=0;a=m6),DD=" ",_D=!1;function LD(a,d){switch(a){case"keyup":return _q.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function PD(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var A5=!1;function Pq(a,d){switch(a){case"compositionend":return PD(d);case"keypress":return d.which!==32?null:(_D=!0,DD);case"textInput":return a=d.data,a===DD&&_D?null:a;default:return null}}function $q(a,d){if(A5)return a==="compositionend"||!HA&&LD(a,d)?(a=MD(),fk=RA=$p=null,A5=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1=d)return{node:w,offset:d-a};a=j}e:{for(;w;){if(w.nextSibling){w=w.nextSibling;break e}w=w.parentNode}w=void 0}w=HD(w)}}function qD(a,d){return a&&d?a===d?!0:a&&a.nodeType===3?!1:d&&d.nodeType===3?qD(a,d.parentNode):"contains"in a?a.contains(d):a.compareDocumentPosition?!!(a.compareDocumentPosition(d)&16):!1:!1}function UD(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var d=ov(a.document);d instanceof a.HTMLIFrameElement;){try{var w=typeof d.contentWindow.location.href=="string"}catch{w=!1}if(w)a=d.contentWindow;else break;d=ov(a.document)}return d}function XA(a){var d=a&&a.nodeName&&a.nodeName.toLowerCase();return d&&(d==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||d==="textarea"||a.contentEditable==="true")}var qq=ew&&"documentMode"in document&&11>=document.documentMode,M5=null,KA=null,j6=null,VA=!1;function XD(a,d,w){var j=w.window===w?w.document:w.nodeType===9?w:w.ownerDocument;VA||M5==null||M5!==ov(j)||(j=M5,"selectionStart"in j&&XA(j)?j={start:j.selectionStart,end:j.selectionEnd}:(j=(j.ownerDocument&&j.ownerDocument.defaultView||window).getSelection(),j={anchorNode:j.anchorNode,anchorOffset:j.anchorOffset,focusNode:j.focusNode,focusOffset:j.focusOffset}),j6&&k6(j6,j)||(j6=j,j=tj(KA,"onSelect"),0>=Q,T-=Q,Cb=1<<32-Sf(d)+T|w<Hr?(ic=Xi,Xi=null):ic=Xi.sibling;var qc=Hn(Sn,Xi,Dn[Hr],ot);if(qc===null){Xi===null&&(Xi=ic);break}a&&Xi&&qc.alternate===null&&d(Sn,Xi),sn=I(qc,sn,Hr),_u===null?Hi=qc:_u.sibling=qc,_u=qc,Xi=ic}if(Hr===Dn.length)return w(Sn,Xi),ou&&tw(Sn,Hr),Hi;if(Xi===null){for(;HrHr?(ic=Xi,Xi=null):ic=Xi.sibling;var At=Hn(Sn,Xi,qc.value,ot);if(At===null){Xi===null&&(Xi=ic);break}a&&Xi&&At.alternate===null&&d(Sn,Xi),sn=I(At,sn,Hr),_u===null?Hi=At:_u.sibling=At,_u=At,Xi=ic}if(qc.done)return w(Sn,Xi),ou&&tw(Sn,Hr),Hi;if(Xi===null){for(;!qc.done;Hr++,qc=Dn.next())qc=gt(Sn,qc.value,ot),qc!==null&&(sn=I(qc,sn,Hr),_u===null?Hi=qc:_u.sibling=qc,_u=qc);return ou&&tw(Sn,Hr),Hi}for(Xi=j(Xi);!qc.done;Hr++,qc=Dn.next())qc=Zn(Xi,Sn,Hr,qc.value,ot),qc!==null&&(a&&qc.alternate!==null&&Xi.delete(qc.key===null?Hr:qc.key),sn=I(qc,sn,Hr),_u===null?Hi=qc:_u.sibling=qc,_u=qc);return a&&Xi.forEach(function(fX){return d(Sn,fX)}),ou&&tw(Sn,Hr),Hi}function co(Sn,sn,Dn,ot){if(typeof Dn=="object"&&Dn!==null&&Dn.type===ee&&Dn.key===null&&(Dn=Dn.props.children),typeof Dn=="object"&&Dn!==null){switch(Dn.$$typeof){case le:e:{for(var Hi=Dn.key;sn!==null;){if(sn.key===Hi){if(Hi=Dn.type,Hi===ee){if(sn.tag===7){w(Sn,sn.sibling),ot=T(sn,Dn.props.children),ot.return=Sn,Sn=ot;break e}}else if(sn.elementType===Hi||typeof Hi=="object"&&Hi!==null&&Hi.$$typeof===An&&wv(Hi)===sn.type){w(Sn,sn.sibling),ot=T(sn,Dn.props),O6(ot,Dn),ot.return=Sn,Sn=ot;break e}w(Sn,sn);break}else d(Sn,sn);sn=sn.sibling}Dn.type===ee?(ot=dv(Dn.props.children,Sn.mode,ot,Dn.key),ot.return=Sn,Sn=ot):(ot=yk(Dn.type,Dn.key,Dn.props,null,Sn.mode,ot),O6(ot,Dn),ot.return=Sn,Sn=ot)}return Q(Sn);case oe:e:{for(Hi=Dn.key;sn!==null;){if(sn.key===Hi)if(sn.tag===4&&sn.stateNode.containerInfo===Dn.containerInfo&&sn.stateNode.implementation===Dn.implementation){w(Sn,sn.sibling),ot=T(sn,Dn.children||[]),ot.return=Sn,Sn=ot;break e}else{w(Sn,sn);break}else d(Sn,sn);sn=sn.sibling}ot=tM(Dn,Sn.mode,ot),ot.return=Sn,Sn=ot}return Q(Sn);case An:return Dn=wv(Dn),co(Sn,sn,Dn,ot)}if(pn(Dn))return Di(Sn,sn,Dn,ot);if(bn(Dn)){if(Hi=bn(Dn),typeof Hi!="function")throw Error(M(150));return Dn=Hi.call(Dn),Cr(Sn,sn,Dn,ot)}if(typeof Dn.then=="function")return co(Sn,sn,xk(Dn),ot);if(Dn.$$typeof===ae)return co(Sn,sn,x6(Sn,Dn),ot);Ak(Sn,Dn)}return typeof Dn=="string"&&Dn!==""||typeof Dn=="number"||typeof Dn=="bigint"?(Dn=""+Dn,sn!==null&&sn.tag===6?(w(Sn,sn.sibling),ot=T(sn,Dn),ot.return=Sn,Sn=ot):(w(Sn,sn),ot=nM(Dn,Sn.mode,ot),ot.return=Sn,Sn=ot),Q(Sn)):w(Sn,sn)}return function(Sn,sn,Dn,ot){try{T6=0;var Hi=co(Sn,sn,Dn,ot);return B5=null,Hi}catch(Xi){if(Xi===R5||Xi===Ek)throw Xi;var _u=w1(29,Xi,null,Sn.mode);return _u.lanes=ot,_u.return=Sn,_u}}}var mv=b_(!0),g_=b_(!1),qp=!1;function gM(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wM(a,d){a=a.updateQueue,d.updateQueue===a&&(d.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Up(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Xp(a,d,w){var j=a.updateQueue;if(j===null)return null;if(j=j.shared,(Ju&2)!==0){var T=j.pending;return T===null?d.next=d:(d.next=T.next,T.next=d),j.pending=d,d=vk(a),e_(a,null,w),d}return mk(a,j,d,w),vk(a)}function N6(a,d,w){if(d=d.updateQueue,d!==null&&(d=d.shared,(w&4194048)!==0)){var j=d.lanes;j&=a.pendingLanes,w|=j,d.lanes=w,rv(a,w)}}function pM(a,d){var w=a.updateQueue,j=a.alternate;if(j!==null&&(j=j.updateQueue,w===j)){var T=null,I=null;if(w=w.firstBaseUpdate,w!==null){do{var Q={lane:w.lane,tag:w.tag,payload:w.payload,callback:null,next:null};I===null?T=I=Q:I=I.next=Q,w=w.next}while(w!==null);I===null?T=I=d:I=I.next=d}else T=I=d;w={baseState:j.baseState,firstBaseUpdate:T,lastBaseUpdate:I,shared:j.shared,callbacks:j.callbacks},a.updateQueue=w;return}a=w.lastBaseUpdate,a===null?w.firstBaseUpdate=d:a.next=d,w.lastBaseUpdate=d}var mM=!1;function I6(){if(mM){var a=$5;if(a!==null)throw a}}function D6(a,d,w,j){mM=!1;var T=a.updateQueue;qp=!1;var I=T.firstBaseUpdate,Q=T.lastBaseUpdate,de=T.shared.pending;if(de!==null){T.shared.pending=null;var tn=de,Ln=tn.next;tn.next=null,Q===null?I=Ln:Q.next=Ln,Q=tn;var it=a.alternate;it!==null&&(it=it.updateQueue,de=it.lastBaseUpdate,de!==Q&&(de===null?it.firstBaseUpdate=Ln:de.next=Ln,it.lastBaseUpdate=tn))}if(I!==null){var gt=T.baseState;Q=0,it=Ln=tn=null,de=I;do{var Hn=de.lane&-536870913,Zn=Hn!==de.lane;if(Zn?(nu&Hn)===Hn:(j&Hn)===Hn){Hn!==0&&Hn===P5&&(mM=!0),it!==null&&(it=it.next={lane:0,tag:de.tag,payload:de.payload,callback:null,next:null});e:{var Di=a,Cr=de;Hn=d;var co=w;switch(Cr.tag){case 1:if(Di=Cr.payload,typeof Di=="function"){gt=Di.call(co,gt,Hn);break e}gt=Di;break e;case 3:Di.flags=Di.flags&-65537|128;case 0:if(Di=Cr.payload,Hn=typeof Di=="function"?Di.call(co,gt,Hn):Di,Hn==null)break e;gt=W({},gt,Hn);break e;case 2:qp=!0}}Hn=de.callback,Hn!==null&&(a.flags|=64,Zn&&(a.flags|=8192),Zn=T.callbacks,Zn===null?T.callbacks=[Hn]:Zn.push(Hn))}else Zn={lane:Hn,tag:de.tag,payload:de.payload,callback:de.callback,next:null},it===null?(Ln=it=Zn,tn=gt):it=it.next=Zn,Q|=Hn;if(de=de.next,de===null){if(de=T.shared.pending,de===null)break;Zn=de,de=Zn.next,Zn.next=null,T.lastBaseUpdate=Zn,T.shared.pending=null}}while(!0);it===null&&(tn=gt),T.baseState=tn,T.firstBaseUpdate=Ln,T.lastBaseUpdate=it,I===null&&(T.shared.lanes=0),Wp|=Q,a.lanes=Q,a.memoizedState=gt}}function w_(a,d){if(typeof a!="function")throw Error(M(191,a));a.call(d)}function p_(a,d){var w=a.callbacks;if(w!==null)for(a.callbacks=null,a=0;aI?I:8;var Q=Ae.T,de={};Ae.T=de,$M(a,!1,d,w);try{var tn=T(),Ln=Ae.S;if(Ln!==null&&Ln(de,tn),tn!==null&&typeof tn=="object"&&typeof tn.then=="function"){var it=Zq(tn,j);$6(a,d,it,k1(a))}else $6(a,d,j,k1(a))}catch(gt){$6(a,d,{then:function(){},status:"rejected",reason:gt},k1())}finally{ve.p=I,Q!==null&&de.types!==null&&(Q.types=de.types),Ae.T=Q}}function LM(){}function P6(a,d,w,j){if(a.tag!==5)throw Error(M(476));var T=K_(a).queue;X_(a,T,d,nn,w===null?LM:function(){return Pk(a),w(j)})}function K_(a){var d=a.memoizedState;if(d!==null)return d;d={memoizedState:nn,baseState:nn,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:uw,lastRenderedState:nn},next:null};var w={};return d.next={memoizedState:w,baseState:w,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:uw,lastRenderedState:w},next:null},a.memoizedState=d,a=a.alternate,a!==null&&(a.memoizedState=d),d}function Pk(a){var d=K_(a);d.next===null&&(d=a.alternate.memoizedState),$6(a,d.next.queue,{},k1())}function PM(){return ua(n4)}function V_(){return el().memoizedState}function Y_(){return el().memoizedState}function uU(a){for(var d=a.return;d!==null;){switch(d.tag){case 24:case 3:var w=k1();a=Up(w);var j=Xp(d,a,w);j!==null&&(zh(j,d,w),N6(j,d,w)),d={cache:fM()},a.payload=d;return}d=d.return}}function oU(a,d,w){var j=k1();w={lane:j,revertLane:0,gesture:null,action:w,hasEagerState:!1,eagerState:null,next:null},$k(a)?W_(d,w):(w=ZA(a,d,w,j),w!==null&&(zh(w,a,j),RM(w,d,j)))}function Q_(a,d,w){var j=k1();$6(a,d,w,j)}function $6(a,d,w,j){var T={lane:j,revertLane:0,gesture:null,action:w,hasEagerState:!1,eagerState:null,next:null};if($k(a))W_(d,T);else{var I=a.alternate;if(a.lanes===0&&(I===null||I.lanes===0)&&(I=d.lastRenderedReducer,I!==null))try{var Q=d.lastRenderedState,de=I(Q,w);if(T.hasEagerState=!0,T.eagerState=de,g1(de,Q))return mk(a,d,T,0),Do===null&&pk(),!1}catch{}if(w=ZA(a,d,T,j),w!==null)return zh(w,a,j),RM(w,d,j),!0}return!1}function $M(a,d,w,j){if(j={lane:2,revertLane:vC(),gesture:null,action:j,hasEagerState:!1,eagerState:null,next:null},$k(a)){if(d)throw Error(M(479))}else d=ZA(a,w,j,2),d!==null&&zh(d,a,2)}function $k(a){var d=a.alternate;return a===bc||d!==null&&d===bc}function W_(a,d){F5=Tk=!0;var w=a.pending;w===null?d.next=d:(d.next=w.next,w.next=d),a.pending=d}function RM(a,d,w){if((w&4194048)!==0){var j=d.lanes;j&=a.pendingLanes,w|=j,d.lanes=w,rv(a,w)}}var R6={readContext:ua,use:Ik,useCallback:Bs,useContext:Bs,useEffect:Bs,useImperativeHandle:Bs,useLayoutEffect:Bs,useInsertionEffect:Bs,useMemo:Bs,useReducer:Bs,useRef:Bs,useState:Bs,useDebugValue:Bs,useDeferredValue:Bs,useTransition:Bs,useSyncExternalStore:Bs,useId:Bs,useHostTransitionStatus:Bs,useFormState:Bs,useActionState:Bs,useOptimistic:Bs,useMemoCache:Bs,useCacheRefresh:Bs};R6.useEffectEvent=Bs;var sU={readContext:ua,use:Ik,useCallback:function(a,d){return sh().memoizedState=[a,d===void 0?null:d],a},useContext:ua,useEffect:R_,useImperativeHandle:function(a,d,w){w=w!=null?w.concat([a]):null,_k(4194308,4,J_.bind(null,d,a),w)},useLayoutEffect:function(a,d){return _k(4194308,4,a,d)},useInsertionEffect:function(a,d){_k(4,2,a,d)},useMemo:function(a,d){var w=sh();d=d===void 0?null:d;var j=a();if(vv){od(!0);try{a()}finally{od(!1)}}return w.memoizedState=[j,d],j},useReducer:function(a,d,w){var j=sh();if(w!==void 0){var T=w(d);if(vv){od(!0);try{w(d)}finally{od(!1)}}}else T=d;return j.memoizedState=j.baseState=T,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:T},j.queue=a,a=a.dispatch=oU.bind(null,bc,a),[j.memoizedState,a]},useRef:function(a){var d=sh();return a={current:a},d.memoizedState=a},useState:function(a){a=OM(a);var d=a.queue,w=Q_.bind(null,bc,d);return d.dispatch=w,[a.memoizedState,w]},useDebugValue:DM,useDeferredValue:function(a,d){var w=sh();return _M(w,a,d)},useTransition:function(){var a=OM(!1);return a=X_.bind(null,bc,a.queue,!0,!1),sh().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,d,w){var j=bc,T=sh();if(ou){if(w===void 0)throw Error(M(407));w=w()}else{if(w=d(),Do===null)throw Error(M(349));(nu&127)!==0||E_(j,d,w)}T.memoizedState=w;var I={value:w,getSnapshot:d};return T.queue=I,R_(tU.bind(null,j,I,a),[a]),j.flags|=2048,H5(9,{destroy:void 0},S_.bind(null,j,I,w,d),null),w},useId:function(){var a=sh(),d=Do.identifierPrefix;if(ou){var w=Tb,j=Cb;w=(j&~(1<<32-Sf(j)-1)).toString(32)+w,d="_"+d+"R_"+w,w=Ok++,0<\/script>",I=I.removeChild(I.firstChild);break;case"select":I=typeof j.is=="string"?Q.createElement("select",{is:j.is}):Q.createElement("select"),j.multiple?I.multiple=!0:j.size&&(I.size=j.size);break;default:I=typeof j.is=="string"?Q.createElement(T,{is:j.is}):Q.createElement(T)}}I[Ws]=d,I[xf]=j;e:for(Q=d.child;Q!==null;){if(Q.tag===5||Q.tag===6)I.appendChild(Q.stateNode);else if(Q.tag!==4&&Q.tag!==27&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===d)break e;for(;Q.sibling===null;){if(Q.return===null||Q.return===d)break e;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}d.stateNode=I;e:switch(sa(I,T,j),T){case"button":case"input":case"select":case"textarea":j=!!j.autoFocus;break e;case"img":j=!0;break e;default:j=!1}j&&b0(d)}}return yo(d),WM(d,d.type,a===null?null:a.memoizedProps,d.pendingProps,w),null;case 6:if(a&&d.stateNode!=null)a.memoizedProps!==j&&b0(d);else{if(typeof j!="string"&&d.stateNode===null)throw Error(M(166));if(a=di.current,D5(d)){if(a=d.stateNode,w=d.memoizedProps,j=null,T=ca,T!==null)switch(T.tag){case 27:case 5:j=T.memoizedProps}a[Ws]=d,a=!!(a.nodeValue===w||j!==null&&j.suppressHydrationWarning===!0||sP(a.nodeValue,w)),a||zp(d,!0)}else a=ij(a).createTextNode(j),a[Ws]=d,d.stateNode=a}return yo(d),null;case 31:if(w=d.memoizedState,a===null||a.memoizedState!==null){if(j=D5(d),w!==null){if(a===null){if(!j)throw Error(M(318));if(a=d.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(M(557));a[Ws]=d}else bv(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;yo(d),a=!1}else w=_5(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=w),a=!0;if(!a)return d.flags&256?(m1(d),d):(m1(d),null);if((d.flags&128)!==0)throw Error(M(558))}return yo(d),null;case 13:if(j=d.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(T=D5(d),j!==null&&j.dehydrated!==null){if(a===null){if(!T)throw Error(M(318));if(T=d.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(M(317));T[Ws]=d}else bv(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;yo(d),T=!1}else T=_5(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=T),T=!0;if(!T)return d.flags&256?(m1(d),d):(m1(d),null)}return m1(d),(d.flags&128)!==0?(d.lanes=w,d):(w=j!==null,a=a!==null&&a.memoizedState!==null,w&&(j=d.child,T=null,j.alternate!==null&&j.alternate.memoizedState!==null&&j.alternate.memoizedState.cachePool!==null&&(T=j.alternate.memoizedState.cachePool.pool),I=null,j.memoizedState!==null&&j.memoizedState.cachePool!==null&&(I=j.memoizedState.cachePool.pool),I!==T&&(j.flags|=2048)),w!==a&&w&&(d.child.flags|=8192),Fk(d,d.updateQueue),yo(d),null);case 4:return si(),a===null&&EC(d.stateNode.containerInfo),yo(d),null;case 10:return rw(d.type),yo(d),null;case 19:if(Re(Zs),j=d.memoizedState,j===null)return yo(d),null;if(T=(d.flags&128)!==0,I=j.rendering,I===null)if(T)kv(j,!1);else{if(zs!==0||a!==null&&(a.flags&128)!==0)for(a=d.child;a!==null;){if(I=Ck(a),I!==null){for(d.flags|=128,kv(j,!1),a=I.updateQueue,d.updateQueue=a,Fk(d,a),d.subtreeFlags=0,a=w,w=d.child;w!==null;)n_(w,a),w=w.sibling;return tt(Zs,Zs.current&1|2),ou&&tw(d,j.treeForkCount),d.child}a=a.sibling}j.tail!==null&&Sl()>Xk&&(d.flags|=128,T=!0,kv(j,!1),d.lanes=4194304)}else{if(!T)if(a=Ck(I),a!==null){if(d.flags|=128,T=!0,a=a.updateQueue,d.updateQueue=a,Fk(d,a),kv(j,!0),j.tail===null&&j.tailMode==="hidden"&&!I.alternate&&!ou)return yo(d),null}else 2*Sl()-j.renderingStartTime>Xk&&w!==536870912&&(d.flags|=128,T=!0,kv(j,!1),d.lanes=4194304);j.isBackwards?(I.sibling=d.child,d.child=I):(a=j.last,a!==null?a.sibling=I:d.child=I,j.last=I)}return j.tail!==null?(a=j.tail,j.rendering=a,j.tail=a.sibling,j.renderingStartTime=Sl(),a.sibling=null,w=Zs.current,tt(Zs,T?w&1|2:w&1),ou&&tw(d,j.treeForkCount),a):(yo(d),null);case 22:case 23:return m1(d),yM(),j=d.memoizedState!==null,a!==null?a.memoizedState!==null!==j&&(d.flags|=8192):j&&(d.flags|=8192),j?(w&536870912)!==0&&(d.flags&128)===0&&(yo(d),d.subtreeFlags&6&&(d.flags|=8192)):yo(d),w=d.updateQueue,w!==null&&Fk(d,w.retryQueue),w=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(w=a.memoizedState.cachePool.pool),j=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(j=d.memoizedState.cachePool.pool),j!==w&&(d.flags|=2048),a!==null&&Re(gv),null;case 24:return w=null,a!==null&&(w=a.memoizedState.cache),d.memoizedState.cache!==w&&(d.flags|=2048),rw(Al),yo(d),null;case 25:return null;case 30:return null}throw Error(M(156,d.tag))}function hU(a,d){switch(rM(d),d.tag){case 1:return a=d.flags,a&65536?(d.flags=a&-65537|128,d):null;case 3:return rw(Al),si(),a=d.flags,(a&65536)!==0&&(a&128)===0?(d.flags=a&-65537|128,d):null;case 26:case 27:case 5:return Er(d),null;case 31:if(d.memoizedState!==null){if(m1(d),d.alternate===null)throw Error(M(340));bv()}return a=d.flags,a&65536?(d.flags=a&-65537|128,d):null;case 13:if(m1(d),a=d.memoizedState,a!==null&&a.dehydrated!==null){if(d.alternate===null)throw Error(M(340));bv()}return a=d.flags,a&65536?(d.flags=a&-65537|128,d):null;case 19:return Re(Zs),null;case 4:return si(),null;case 10:return rw(d.type),null;case 22:case 23:return m1(d),yM(),a!==null&&Re(gv),a=d.flags,a&65536?(d.flags=a&-65537|128,d):null;case 24:return rw(Al),null;case 25:return null;default:return null}}function ZM(a,d){switch(rM(d),d.tag){case 3:rw(Al),si();break;case 26:case 27:case 5:Er(d);break;case 4:si();break;case 31:d.memoizedState!==null&&m1(d);break;case 13:m1(d);break;case 19:Re(Zs);break;case 10:rw(d.type);break;case 22:case 23:m1(d),yM(),a!==null&&Re(gv);break;case 24:rw(Al)}}function F6(a,d){try{var w=d.updateQueue,j=w!==null?w.lastEffect:null;if(j!==null){var T=j.next;w=T;do{if((w.tag&a)===a){j=void 0;var I=w.create,Q=w.inst;j=I(),Q.destroy=j}w=w.next}while(w!==T)}}catch(de){ro(d,d.return,de)}}function Yp(a,d,w){try{var j=d.updateQueue,T=j!==null?j.lastEffect:null;if(T!==null){var I=T.next;j=I;do{if((j.tag&a)===a){var Q=j.inst,de=Q.destroy;if(de!==void 0){Q.destroy=void 0,T=d;var tn=w,Ln=de;try{Ln()}catch(it){ro(T,tn,it)}}}j=j.next}while(j!==I)}}catch(it){ro(d,d.return,it)}}function J6(a){var d=a.updateQueue;if(d!==null){var w=a.stateNode;try{p_(d,w)}catch(j){ro(a,a.return,j)}}}function vL(a,d,w){w.props=yv(a.type,a.memoizedProps),w.state=a.memoizedState;try{w.componentWillUnmount()}catch(j){ro(a,d,j)}}function H6(a,d){try{var w=a.ref;if(w!==null){switch(a.tag){case 26:case 27:case 5:var j=a.stateNode;break;case 30:j=a.stateNode;break;default:j=a.stateNode}typeof w=="function"?a.refCleanup=w(j):w.current=j}}catch(T){ro(a,d,T)}}function Ob(a,d){var w=a.ref,j=a.refCleanup;if(w!==null)if(typeof j=="function")try{j()}catch(T){ro(a,d,T)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof w=="function")try{w(null)}catch(T){ro(a,d,T)}else w.current=null}function G6(a){var d=a.type,w=a.memoizedProps,j=a.stateNode;try{e:switch(d){case"button":case"input":case"select":case"textarea":w.autoFocus&&j.focus();break e;case"img":w.src?j.src=w.src:w.srcSet&&(j.srcset=w.srcSet)}}catch(T){ro(a,a.return,T)}}function eC(a,d,w){try{var j=a.stateNode;DU(j,a.type,w,d),j[xf]=d}catch(T){ro(a,a.return,T)}}function yL(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&i2(a.type)||a.tag===4}function nC(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||yL(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&i2(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function tC(a,d,w){var j=a.tag;if(j===5||j===6)a=a.stateNode,d?(w.nodeType===9?w.body:w.nodeName==="HTML"?w.ownerDocument.body:w).insertBefore(a,d):(d=w.nodeType===9?w.body:w.nodeName==="HTML"?w.ownerDocument.body:w,d.appendChild(a),w=w._reactRootContainer,w!=null||d.onclick!==null||(d.onclick=Zg));else if(j!==4&&(j===27&&i2(a.type)&&(w=a.stateNode,d=null),a=a.child,a!==null))for(tC(a,d,w),a=a.sibling;a!==null;)tC(a,d,w),a=a.sibling}function jv(a,d,w){var j=a.tag;if(j===5||j===6)a=a.stateNode,d?w.insertBefore(a,d):w.appendChild(a);else if(j!==4&&(j===27&&i2(a.type)&&(w=a.stateNode),a=a.child,a!==null))for(jv(a,d,w),a=a.sibling;a!==null;)jv(a,d,w),a=a.sibling}function kL(a){var d=a.stateNode,w=a.memoizedProps;try{for(var j=a.type,T=d.attributes;T.length;)d.removeAttributeNode(T[0]);sa(d,j,w),d[Ws]=a,d[xf]=w}catch(I){ro(a,a.return,I)}}var Nb=!1,Tl=!1,q6=!1,iC=typeof WeakSet=="function"?WeakSet:Set,Af=null;function dU(a,d){if(a=a.containerInfo,AC=Mf,a=UD(a),XA(a)){if("selectionStart"in a)var w={start:a.selectionStart,end:a.selectionEnd};else e:{w=(w=a.ownerDocument)&&w.defaultView||window;var j=w.getSelection&&w.getSelection();if(j&&j.rangeCount!==0){w=j.anchorNode;var T=j.anchorOffset,I=j.focusNode;j=j.focusOffset;try{w.nodeType,I.nodeType}catch{w=null;break e}var Q=0,de=-1,tn=-1,Ln=0,it=0,gt=a,Hn=null;n:for(;;){for(var Zn;gt!==w||T!==0&>.nodeType!==3||(de=Q+T),gt!==I||j!==0&>.nodeType!==3||(tn=Q+j),gt.nodeType===3&&(Q+=gt.nodeValue.length),(Zn=gt.firstChild)!==null;)Hn=gt,gt=Zn;for(;;){if(gt===a)break n;if(Hn===w&&++Ln===T&&(de=Q),Hn===I&&++it===j&&(tn=Q),(Zn=gt.nextSibling)!==null)break;gt=Hn,Hn=gt.parentNode}gt=Zn}w=de===-1||tn===-1?null:{start:de,end:tn}}else w=null}w=w||{start:0,end:0}}else w=null;for(MC={focusedElem:a,selectionRange:w},Mf=!1,Af=d;Af!==null;)if(d=Af,a=d.child,(d.subtreeFlags&1028)!==0&&a!==null)a.return=d,Af=a;else for(;Af!==null;){switch(d=Af,I=d.alternate,a=d.flags,d.tag){case 0:if((a&4)!==0&&(a=d.updateQueue,a=a!==null?a.events:null,a!==null))for(w=0;w title"))),sa(I,j,w),I[Ws]=a,xl(I),j=I;break e;case"link":var Q=kP("link","href",T).get(j+(w.href||""));if(Q){for(var de=0;deco&&(Q=co,co=Cr,Cr=Q);var Sn=GD(de,Cr),sn=GD(de,co);if(Sn&&sn&&(Zn.rangeCount!==1||Zn.anchorNode!==Sn.node||Zn.anchorOffset!==Sn.offset||Zn.focusNode!==sn.node||Zn.focusOffset!==sn.offset)){var Dn=gt.createRange();Dn.setStart(Sn.node,Sn.offset),Zn.removeAllRanges(),Cr>co?(Zn.addRange(Dn),Zn.extend(sn.node,sn.offset)):(Dn.setEnd(sn.node,sn.offset),Zn.addRange(Dn))}}}}for(gt=[],Zn=de;Zn=Zn.parentNode;)Zn.nodeType===1&>.push({element:Zn,left:Zn.scrollLeft,top:Zn.scrollTop});for(typeof de.focus=="function"&&de.focus(),de=0;dew?32:w,Ae.T=null,w=fC,fC=null;var I=e2,Q=hw;if(nf=0,K5=e2=null,hw=0,(Ju&6)!==0)throw Error(M(331));var de=Ju;if(Ju|=4,NL(I.current),CL(I,I.current,Q,w),Ju=de,Q6(0,!1),ra&&typeof ra.onPostCommitFiberRoot=="function")try{ra.onPostCommitFiberRoot(Ab,I)}catch{}return!0}finally{ve.p=T,Ae.T=j,VL(a,d)}}function QL(a,d,w){d=fd(w,d),d=HM(a.stateNode,d,2),a=Xp(a,d,2),a!==null&&(uu(a,2),Ib(a))}function ro(a,d,w){if(a.tag===3)QL(a,a,w);else for(;d!==null;){if(d.tag===3){QL(d,a,w);break}else if(d.tag===1){var j=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof j.componentDidCatch=="function"&&(Zp===null||!Zp.has(j))){a=fd(w,a),w=rL(2),j=Xp(d,w,2),j!==null&&(cL(w,j,d,a),uu(j,2),Ib(j));break}}d=d.return}}function bC(a,d,w){var j=a.pingCache;if(j===null){j=a.pingCache=new wU;var T=new Set;j.set(d,T)}else T=j.get(d),T===void 0&&(T=new Set,j.set(d,T));T.has(w)||(uC=!0,T.add(w),a=kU.bind(null,a,d,w),d.then(a,a))}function kU(a,d,w){var j=a.pingCache;j!==null&&j.delete(d),a.pingedLanes|=a.suspendedLanes&w,a.warmLanes&=~w,Do===a&&(nu&w)===w&&(zs===4||zs===3&&(nu&62914560)===nu&&300>Sl()-Uk?(Ju&2)===0&&V5(a,0):oC|=w,X5===nu&&(X5=0)),Ib(a)}function WL(a,d){d===0&&(d=Op()),a=hv(a,d),a!==null&&(uu(a,d),Ib(a))}function jU(a){var d=a.memoizedState,w=0;d!==null&&(w=d.retryLane),WL(a,w)}function EU(a,d){var w=0;switch(a.tag){case 31:case 13:var j=a.stateNode,T=a.memoizedState;T!==null&&(w=T.retryLane);break;case 19:j=a.stateNode;break;case 22:j=a.stateNode._retryCache;break;default:throw Error(M(314))}j!==null&&j.delete(d),WL(a,w)}function SU(a,d){return Oa(a,d)}var Zk=null,Q5=null,gC=!1,ej=!1,wC=!1,t2=0;function Ib(a){a!==Q5&&a.next===null&&(Q5===null?Zk=Q5=a:Q5=Q5.next=a),ej=!0,gC||(gC=!0,mC())}function Q6(a,d){if(!wC&&ej){wC=!0;do for(var w=!1,j=Zk;j!==null;){if(a!==0){var T=j.pendingLanes;if(T===0)var I=0;else{var Q=j.suspendedLanes,de=j.pingedLanes;I=(1<<31-Sf(42|a)+1)-1,I&=T&~(Q&~de),I=I&201326741?I&201326741|1:I?I|2:0}I!==0&&(w=!0,nP(j,I))}else I=nu,I=Xg(j,j===Do?I:0,j.cancelPendingCommit!==null||j.timeoutHandle!==-1),(I&3)===0||Mb(j,I)||(w=!0,nP(j,I));j=j.next}while(w);wC=!1}}function xU(){ZL()}function ZL(){ej=gC=!1;var a=0;t2!==0&&LU()&&(a=t2);for(var d=Sl(),w=null,j=Zk;j!==null;){var T=j.next,I=pC(j,d);I===0?(j.next=null,w===null?Zk=T:w.next=T,T===null&&(Q5=w)):(w=j,(a!==0||(I&3)!==0)&&(ej=!0)),j=T}nf!==0&&nf!==5||Q6(a),t2!==0&&(t2=0)}function pC(a,d){for(var w=a.suspendedLanes,j=a.pingedLanes,T=a.expirationTimes,I=a.pendingLanes&-62914561;0de)break;var it=tn.transferSize,gt=tn.initiatorType;it&&lP(gt)&&(tn=tn.responseEnd,Q+=it*(tn"u"?null:document;function pP(a,d,w){var j=W5;if(j&&typeof d=="string"&&d){var T=Lh(d);T='link[rel="'+a+'"][href="'+T+'"]',typeof w=="string"&&(T+='[crossorigin="'+w+'"]'),_C.has(T)||(_C.add(T),a={rel:a,crossOrigin:w,href:d},j.querySelector(T)===null&&(d=j.createElement("link"),sa(d,"link",a),xl(d),j.head.appendChild(d)))}}function GU(a){p0.D(a),pP("dns-prefetch",a,null)}function qU(a,d){p0.C(a,d),pP("preconnect",a,d)}function LC(a,d,w){p0.L(a,d,w);var j=W5;if(j&&a&&d){var T='link[rel="preload"][as="'+Lh(d)+'"]';d==="image"&&w&&w.imageSrcSet?(T+='[imagesrcset="'+Lh(w.imageSrcSet)+'"]',typeof w.imageSizes=="string"&&(T+='[imagesizes="'+Lh(w.imageSizes)+'"]')):T+='[href="'+Lh(a)+'"]';var I=T;switch(d){case"style":I=Z5(a);break;case"script":I=e4(a)}E1.has(I)||(a=W({rel:"preload",href:d==="image"&&w&&w.imageSrcSet?void 0:a,as:d},w),E1.set(I,a),j.querySelector(T)!==null||d==="style"&&j.querySelector(xv(I))||d==="script"&&j.querySelector(t9(I))||(d=j.createElement("link"),sa(d,"link",a),xl(d),j.head.appendChild(d)))}}function UU(a,d){p0.m(a,d);var w=W5;if(w&&a){var j=d&&typeof d.as=="string"?d.as:"script",T='link[rel="modulepreload"][as="'+Lh(j)+'"][href="'+Lh(a)+'"]',I=T;switch(j){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":I=e4(a)}if(!E1.has(I)&&(a=W({rel:"modulepreload",href:a},d),E1.set(I,a),w.querySelector(T)===null)){switch(j){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(w.querySelector(t9(I)))return}j=w.createElement("link"),sa(j,"link",a),xl(j),w.head.appendChild(j)}}}function XU(a,d,w){p0.S(a,d,w);var j=W5;if(j&&a){var T=Lp(j).hoistableStyles,I=Z5(a);d=d||"default";var Q=T.get(I);if(!Q){var de={loading:0,preload:null};if(Q=j.querySelector(xv(I)))de.loading=5;else{a=W({rel:"stylesheet",href:a,"data-precedence":d},w),(w=E1.get(I))&&RC(a,w);var tn=Q=j.createElement("link");xl(tn),sa(tn,"link",a),tn._p=new Promise(function(Ln,it){tn.onload=Ln,tn.onerror=it}),tn.addEventListener("load",function(){de.loading|=1}),tn.addEventListener("error",function(){de.loading|=2}),de.loading|=4,uj(Q,d,j)}Q={type:"stylesheet",instance:Q,count:1,state:de},T.set(I,Q)}}}function KU(a,d){p0.X(a,d);var w=W5;if(w&&a){var j=Lp(w).hoistableScripts,T=e4(a),I=j.get(T);I||(I=w.querySelector(t9(T)),I||(a=W({src:a,async:!0},d),(d=E1.get(T))&&BC(a,d),I=w.createElement("script"),xl(I),sa(I,"link",a),w.head.appendChild(I)),I={type:"script",instance:I,count:1,state:null},j.set(T,I))}}function PC(a,d){p0.M(a,d);var w=W5;if(w&&a){var j=Lp(w).hoistableScripts,T=e4(a),I=j.get(T);I||(I=w.querySelector(t9(T)),I||(a=W({src:a,async:!0,type:"module"},d),(d=E1.get(T))&&BC(a,d),I=w.createElement("script"),xl(I),sa(I,"link",a),w.head.appendChild(I)),I={type:"script",instance:I,count:1,state:null},j.set(T,I))}}function mP(a,d,w,j){var T=(T=di.current)?cj(T):null;if(!T)throw Error(M(446));switch(a){case"meta":case"title":return null;case"style":return typeof w.precedence=="string"&&typeof w.href=="string"?(d=Z5(w.href),w=Lp(T).hoistableStyles,j=w.get(d),j||(j={type:"style",instance:null,count:0,state:null},w.set(d,j)),j):{type:"void",instance:null,count:0,state:null};case"link":if(w.rel==="stylesheet"&&typeof w.href=="string"&&typeof w.precedence=="string"){a=Z5(w.href);var I=Lp(T).hoistableStyles,Q=I.get(a);if(Q||(T=T.ownerDocument||T,Q={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},I.set(a,Q),(I=T.querySelector(xv(a)))&&!I._p&&(Q.instance=I,Q.state.loading=5),E1.has(a)||(w={rel:"preload",as:"style",href:w.href,crossOrigin:w.crossOrigin,integrity:w.integrity,media:w.media,hrefLang:w.hrefLang,referrerPolicy:w.referrerPolicy},E1.set(a,w),I||$C(T,a,w,Q.state))),d&&j===null)throw Error(M(528,""));return Q}if(d&&j!==null)throw Error(M(529,""));return null;case"script":return d=w.async,w=w.src,typeof w=="string"&&d&&typeof d!="function"&&typeof d!="symbol"?(d=e4(w),w=Lp(T).hoistableScripts,j=w.get(d),j||(j={type:"script",instance:null,count:0,state:null},w.set(d,j)),j):{type:"void",instance:null,count:0,state:null};default:throw Error(M(444,a))}}function Z5(a){return'href="'+Lh(a)+'"'}function xv(a){return'link[rel="stylesheet"]['+a+"]"}function vP(a){return W({},a,{"data-precedence":a.precedence,precedence:null})}function $C(a,d,w,j){a.querySelector('link[rel="preload"][as="style"]['+d+"]")?j.loading=1:(d=a.createElement("link"),j.preload=d,d.addEventListener("load",function(){return j.loading|=1}),d.addEventListener("error",function(){return j.loading|=2}),sa(d,"link",w),xl(d),a.head.appendChild(d))}function e4(a){return'[src="'+Lh(a)+'"]'}function t9(a){return"script[async]"+a}function yP(a,d,w){if(d.count++,d.instance===null)switch(d.type){case"style":var j=a.querySelector('style[data-href~="'+Lh(w.href)+'"]');if(j)return d.instance=j,xl(j),j;var T=W({},w,{"data-href":w.href,"data-precedence":w.precedence,href:null,precedence:null});return j=(a.ownerDocument||a).createElement("style"),xl(j),sa(j,"style",T),uj(j,w.precedence,a),d.instance=j;case"stylesheet":T=Z5(w.href);var I=a.querySelector(xv(T));if(I)return d.state.loading|=4,d.instance=I,xl(I),I;j=vP(w),(T=E1.get(T))&&RC(j,T),I=(a.ownerDocument||a).createElement("link"),xl(I);var Q=I;return Q._p=new Promise(function(de,tn){Q.onload=de,Q.onerror=tn}),sa(I,"link",j),d.state.loading|=4,uj(I,w.precedence,a),d.instance=I;case"script":return I=e4(w.src),(T=a.querySelector(t9(I)))?(d.instance=T,xl(T),T):(j=w,(T=E1.get(I))&&(j=W({},w),BC(j,T)),a=a.ownerDocument||a,T=a.createElement("script"),xl(T),sa(T,"link",j),a.head.appendChild(T),d.instance=T);case"void":return null;default:throw Error(M(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(j=d.instance,d.state.loading|=4,uj(j,w.precedence,a));return d.instance}function uj(a,d,w){for(var j=w.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),T=j.length?j[j.length-1]:null,I=T,Q=0;Q title"):null)}function VU(a,d,w){if(w===1||d.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof d.precedence!="string"||typeof d.href!="string"||d.href==="")break;return!0;case"link":if(typeof d.rel!="string"||typeof d.href!="string"||d.href===""||d.onLoad||d.onError)break;return d.rel==="stylesheet"?(a=d.disabled,typeof d.precedence=="string"&&a==null):!0;case"script":if(d.async&&typeof d.async!="function"&&typeof d.async!="symbol"&&!d.onLoad&&!d.onError&&d.src&&typeof d.src=="string")return!0}return!1}function EP(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function YU(a,d,w,j){if(w.type==="stylesheet"&&(typeof j.media!="string"||matchMedia(j.media).matches!==!1)&&(w.state.loading&4)===0){if(w.instance===null){var T=Z5(j.href),I=d.querySelector(xv(T));if(I){d=I._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(a.count++,a=i9.bind(a),d.then(a,a)),w.state.loading|=4,w.instance=I,xl(I);return}I=d.ownerDocument||d,j=vP(j),(T=E1.get(T))&&RC(j,T),I=I.createElement("link"),xl(I);var Q=I;Q._p=new Promise(function(de,tn){Q.onload=de,Q.onerror=tn}),sa(I,"link",j),w.instance=I}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(w,d),(d=w.state.preload)&&(w.state.loading&3)===0&&(a.count++,w=i9.bind(a),d.addEventListener("load",w),d.addEventListener("error",w))}}var zC=0;function QU(a,d){return a.stylesheets&&a.count===0&&Av(a,a.stylesheets),0zC?50:800)+d);return a.unsuspend=w,function(){a.unsuspend=null,clearTimeout(j),clearTimeout(T)}}:null}function i9(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Av(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var r9=null;function Av(a,d){a.stylesheets=null,a.unsuspend!==null&&(a.count++,r9=new Map,d.forEach(c9,a),r9=null,i9.call(a))}function c9(a,d){if(!(d.state.loading&4)){var w=r9.get(a);if(w)var j=w.get(null);else{w=new Map,r9.set(a,w);for(var T=a.querySelectorAll("link[data-precedence],style[data-precedence]"),I=0;I"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g)}catch(E){console.error(E)}}return g(),O7e.exports=fzn(),O7e.exports}var hzn=azn();function Ta(g){if(typeof g=="string"||typeof g=="number")return""+g;let E="";if(Array.isArray(g))for(let x=0,M;x{}};function Oue(){for(var g=0,E=arguments.length,x={},M;g=0&&(M=x.slice(N+1),x=x.slice(0,N)),x&&!E.hasOwnProperty(x))throw new Error("unknown type: "+x);return{type:x,name:M}})}hue.prototype=Oue.prototype={constructor:hue,on:function(g,E){var x=this._,M=bzn(g+"",x),N,$=-1,k=M.length;if(arguments.length<2){for(;++$0)for(var x=new Array(N),M=0,N,$;M=0&&(E=g.slice(0,x))!=="xmlns"&&(g=g.slice(x+1)),Xhn.hasOwnProperty(E)?{space:Xhn[E],local:g}:g}function wzn(g){return function(){var E=this.ownerDocument,x=this.namespaceURI;return x===Z7e&&E.documentElement.namespaceURI===Z7e?E.createElement(g):E.createElementNS(x,g)}}function pzn(g){return function(){return this.ownerDocument.createElementNS(g.space,g.local)}}function ldn(g){var E=Nue(g);return(E.local?pzn:wzn)(E)}function mzn(){}function gke(g){return g==null?mzn:function(){return this.querySelector(g)}}function vzn(g){typeof g!="function"&&(g=gke(g));for(var E=this._groups,x=E.length,M=new Array(x),N=0;N=ae&&(ae=$e+1);!(Ue=Ce[ae])&&++ae=0;)(k=M[N])&&($&&k.compareDocumentPosition($)^4&&$.parentNode.insertBefore(k,$),$=k);return this}function Gzn(g){g||(g=qzn);function E(W,Z){return W&&Z?g(W.__data__,Z.__data__):!W-!Z}for(var x=this._groups,M=x.length,N=new Array(M),$=0;$E?1:g>=E?0:NaN}function Uzn(){var g=arguments[0];return arguments[0]=this,g.apply(null,arguments),this}function Xzn(){return Array.from(this)}function Kzn(){for(var g=this._groups,E=0,x=g.length;E1?this.each((E==null?cFn:typeof E=="function"?oFn:uFn)(g,E,x??"")):bD(this.node(),g)}function bD(g,E){return g.style.getPropertyValue(E)||bdn(g).getComputedStyle(g,null).getPropertyValue(E)}function lFn(g){return function(){delete this[g]}}function fFn(g,E){return function(){this[g]=E}}function aFn(g,E){return function(){var x=E.apply(this,arguments);x==null?delete this[g]:this[g]=x}}function hFn(g,E){return arguments.length>1?this.each((E==null?lFn:typeof E=="function"?aFn:fFn)(g,E)):this.node()[g]}function gdn(g){return g.trim().split(/^|\s+/)}function wke(g){return g.classList||new wdn(g)}function wdn(g){this._node=g,this._names=gdn(g.getAttribute("class")||"")}wdn.prototype={add:function(g){var E=this._names.indexOf(g);E<0&&(this._names.push(g),this._node.setAttribute("class",this._names.join(" ")))},remove:function(g){var E=this._names.indexOf(g);E>=0&&(this._names.splice(E,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(g){return this._names.indexOf(g)>=0}};function pdn(g,E){for(var x=wke(g),M=-1,N=E.length;++M=0&&(x=E.slice(M+1),E=E.slice(0,M)),{type:E,name:x}})}function zFn(g){return function(){var E=this.__on;if(E){for(var x=0,M=-1,N=E.length,$;x()=>g;function eke(g,{sourceEvent:E,subject:x,target:M,identifier:N,active:$,x:k,y:H,dx:U,dy:G,dispatch:ie}){Object.defineProperties(this,{type:{value:g,enumerable:!0,configurable:!0},sourceEvent:{value:E,enumerable:!0,configurable:!0},subject:{value:x,enumerable:!0,configurable:!0},target:{value:M,enumerable:!0,configurable:!0},identifier:{value:N,enumerable:!0,configurable:!0},active:{value:$,enumerable:!0,configurable:!0},x:{value:k,enumerable:!0,configurable:!0},y:{value:H,enumerable:!0,configurable:!0},dx:{value:U,enumerable:!0,configurable:!0},dy:{value:G,enumerable:!0,configurable:!0},_:{value:ie}})}eke.prototype.on=function(){var g=this._.on.apply(this._,arguments);return g===this._?this:g};function YFn(g){return!g.ctrlKey&&!g.button}function QFn(){return this.parentNode}function WFn(g,E){return E??{x:g.x,y:g.y}}function ZFn(){return navigator.maxTouchPoints||"ontouchstart"in this}function Edn(){var g=YFn,E=QFn,x=WFn,M=ZFn,N={},$=Oue("start","drag","end"),k=0,H,U,G,ie,W=0;function Z(Ne){Ne.on("mousedown.drag",le).filter(M).on("touchstart.drag",Ce).on("touchmove.drag",pe,VFn).on("touchend.drag touchcancel.drag",$e).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function le(Ne,Ue){if(!(ie||!g.call(this,Ne,Ue))){var ln=ae(this,E.call(this,Ne,Ue),Ne,Ue,"mouse");ln&&(Fg(Ne.view).on("mousemove.drag",oe,HG).on("mouseup.drag",ee,HG),kdn(Ne.view),_7e(Ne),G=!1,H=Ne.clientX,U=Ne.clientY,ln("start",Ne))}}function oe(Ne){if(hD(Ne),!G){var Ue=Ne.clientX-H,ln=Ne.clientY-U;G=Ue*Ue+ln*ln>W}N.mouse("drag",Ne)}function ee(Ne){Fg(Ne.view).on("mousemove.drag mouseup.drag",null),jdn(Ne.view,G),hD(Ne),N.mouse("end",Ne)}function Ce(Ne,Ue){if(g.call(this,Ne,Ue)){var ln=Ne.changedTouches,un=E.call(this,Ne,Ue),An=ln.length,xn,nt;for(xn=0;xn>8&15|E>>4&240,E>>4&15|E&240,(E&15)<<4|E&15,1):x===8?Wce(E>>24&255,E>>16&255,E>>8&255,(E&255)/255):x===4?Wce(E>>12&15|E>>8&240,E>>8&15|E>>4&240,E>>4&15|E&240,((E&15)<<4|E&15)/255):null):(E=nJn.exec(g))?new Sb(E[1],E[2],E[3],1):(E=tJn.exec(g))?new Sb(E[1]*255/100,E[2]*255/100,E[3]*255/100,1):(E=iJn.exec(g))?Wce(E[1],E[2],E[3],E[4]):(E=rJn.exec(g))?Wce(E[1]*255/100,E[2]*255/100,E[3]*255/100,E[4]):(E=cJn.exec(g))?e1n(E[1],E[2]/100,E[3]/100,1):(E=uJn.exec(g))?e1n(E[1],E[2]/100,E[3]/100,E[4]):Khn.hasOwnProperty(g)?Qhn(Khn[g]):g==="transparent"?new Sb(NaN,NaN,NaN,0):null}function Qhn(g){return new Sb(g>>16&255,g>>8&255,g&255,1)}function Wce(g,E,x,M){return M<=0&&(g=E=x=NaN),new Sb(g,E,x,M)}function lJn(g){return g instanceof nq||(g=xA(g)),g?(g=g.rgb(),new Sb(g.r,g.g,g.b,g.opacity)):new Sb}function nke(g,E,x,M){return arguments.length===1?lJn(g):new Sb(g,E,x,M??1)}function Sb(g,E,x,M){this.r=+g,this.g=+E,this.b=+x,this.opacity=+M}pke(Sb,nke,Sdn(nq,{brighter(g){return g=g==null?mue:Math.pow(mue,g),new Sb(this.r*g,this.g*g,this.b*g,this.opacity)},darker(g){return g=g==null?GG:Math.pow(GG,g),new Sb(this.r*g,this.g*g,this.b*g,this.opacity)},rgb(){return this},clamp(){return new Sb(jA(this.r),jA(this.g),jA(this.b),vue(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Whn,formatHex:Whn,formatHex8:fJn,formatRgb:Zhn,toString:Zhn}));function Whn(){return`#${kA(this.r)}${kA(this.g)}${kA(this.b)}`}function fJn(){return`#${kA(this.r)}${kA(this.g)}${kA(this.b)}${kA((isNaN(this.opacity)?1:this.opacity)*255)}`}function Zhn(){const g=vue(this.opacity);return`${g===1?"rgb(":"rgba("}${jA(this.r)}, ${jA(this.g)}, ${jA(this.b)}${g===1?")":`, ${g})`}`}function vue(g){return isNaN(g)?1:Math.max(0,Math.min(1,g))}function jA(g){return Math.max(0,Math.min(255,Math.round(g)||0))}function kA(g){return g=jA(g),(g<16?"0":"")+g.toString(16)}function e1n(g,E,x,M){return M<=0?g=E=x=NaN:x<=0||x>=1?g=E=NaN:E<=0&&(g=NaN),new ev(g,E,x,M)}function xdn(g){if(g instanceof ev)return new ev(g.h,g.s,g.l,g.opacity);if(g instanceof nq||(g=xA(g)),!g)return new ev;if(g instanceof ev)return g;g=g.rgb();var E=g.r/255,x=g.g/255,M=g.b/255,N=Math.min(E,x,M),$=Math.max(E,x,M),k=NaN,H=$-N,U=($+N)/2;return H?(E===$?k=(x-M)/H+(x0&&U<1?0:k,new ev(k,H,U,g.opacity)}function aJn(g,E,x,M){return arguments.length===1?xdn(g):new ev(g,E,x,M??1)}function ev(g,E,x,M){this.h=+g,this.s=+E,this.l=+x,this.opacity=+M}pke(ev,aJn,Sdn(nq,{brighter(g){return g=g==null?mue:Math.pow(mue,g),new ev(this.h,this.s,this.l*g,this.opacity)},darker(g){return g=g==null?GG:Math.pow(GG,g),new ev(this.h,this.s,this.l*g,this.opacity)},rgb(){var g=this.h%360+(this.h<0)*360,E=isNaN(g)||isNaN(this.s)?0:this.s,x=this.l,M=x+(x<.5?x:1-x)*E,N=2*x-M;return new Sb(L7e(g>=240?g-240:g+120,N,M),L7e(g,N,M),L7e(g<120?g+240:g-120,N,M),this.opacity)},clamp(){return new ev(n1n(this.h),Zce(this.s),Zce(this.l),vue(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const g=vue(this.opacity);return`${g===1?"hsl(":"hsla("}${n1n(this.h)}, ${Zce(this.s)*100}%, ${Zce(this.l)*100}%${g===1?")":`, ${g})`}`}}));function n1n(g){return g=(g||0)%360,g<0?g+360:g}function Zce(g){return Math.max(0,Math.min(1,g||0))}function L7e(g,E,x){return(g<60?E+(x-E)*g/60:g<180?x:g<240?E+(x-E)*(240-g)/60:E)*255}const mke=g=>()=>g;function hJn(g,E){return function(x){return g+x*E}}function dJn(g,E,x){return g=Math.pow(g,x),E=Math.pow(E,x)-g,x=1/x,function(M){return Math.pow(g+M*E,x)}}function bJn(g){return(g=+g)==1?Adn:function(E,x){return x-E?dJn(E,x,g):mke(isNaN(E)?x:E)}}function Adn(g,E){var x=E-g;return x?hJn(g,x):mke(isNaN(g)?E:g)}const yue=(function g(E){var x=bJn(E);function M(N,$){var k=x((N=nke(N)).r,($=nke($)).r),H=x(N.g,$.g),U=x(N.b,$.b),G=Adn(N.opacity,$.opacity);return function(ie){return N.r=k(ie),N.g=H(ie),N.b=U(ie),N.opacity=G(ie),N+""}}return M.gamma=g,M})(1);function gJn(g,E){E||(E=[]);var x=g?Math.min(E.length,g.length):0,M=E.slice(),N;return function($){for(N=0;Nx&&($=E.slice(x,$),H[k]?H[k]+=$:H[++k]=$),(M=M[0])===(N=N[0])?H[k]?H[k]+=N:H[++k]=N:(H[++k]=null,U.push({i:k,x:l5(M,N)})),x=P7e.lastIndex;return x180?ie+=360:ie-G>180&&(G+=360),Z.push({i:W.push(N(W)+"rotate(",null,M)-2,x:l5(G,ie)})):ie&&W.push(N(W)+"rotate("+ie+M)}function H(G,ie,W,Z){G!==ie?Z.push({i:W.push(N(W)+"skewX(",null,M)-2,x:l5(G,ie)}):ie&&W.push(N(W)+"skewX("+ie+M)}function U(G,ie,W,Z,le,oe){if(G!==W||ie!==Z){var ee=le.push(N(le)+"scale(",null,",",null,")");oe.push({i:ee-4,x:l5(G,W)},{i:ee-2,x:l5(ie,Z)})}else(W!==1||Z!==1)&&le.push(N(le)+"scale("+W+","+Z+")")}return function(G,ie){var W=[],Z=[];return G=g(G),ie=g(ie),$(G.translateX,G.translateY,ie.translateX,ie.translateY,W,Z),k(G.rotate,ie.rotate,W,Z),H(G.skewX,ie.skewX,W,Z),U(G.scaleX,G.scaleY,ie.scaleX,ie.scaleY,W,Z),G=ie=null,function(le){for(var oe=-1,ee=Z.length,Ce;++oe=0&&g._call.call(void 0,E),g=g._next;--gD}function r1n(){AA=(jue=UG.now())+Iue,gD=$G=0;try{OJn()}finally{gD=0,IJn(),AA=0}}function NJn(){var g=UG.now(),E=g-jue;E>Odn&&(Iue-=E,jue=g)}function IJn(){for(var g,E=kue,x,M=1/0;E;)E._call?(M>E._time&&(M=E._time),g=E,E=E._next):(x=E._next,E._next=null,E=g?g._next=x:kue=x);RG=g,rke(M)}function rke(g){if(!gD){$G&&($G=clearTimeout($G));var E=g-AA;E>24?(g<1/0&&($G=setTimeout(r1n,g-UG.now()-Iue)),_G&&(_G=clearInterval(_G))):(_G||(jue=UG.now(),_G=setInterval(NJn,Odn)),gD=1,Ndn(r1n))}}function c1n(g,E,x){var M=new Eue;return E=E==null?0:+E,M.restart(N=>{M.stop(),g(N+E)},E,x),M}var DJn=Oue("start","end","cancel","interrupt"),_Jn=[],Ddn=0,u1n=1,cke=2,bue=3,o1n=4,uke=5,gue=6;function Due(g,E,x,M,N,$){var k=g.__transition;if(!k)g.__transition={};else if(x in k)return;LJn(g,x,{name:E,index:M,group:N,on:DJn,tween:_Jn,time:$.time,delay:$.delay,duration:$.duration,ease:$.ease,timer:null,state:Ddn})}function yke(g,E){var x=iv(g,E);if(x.state>Ddn)throw new Error("too late; already scheduled");return x}function d5(g,E){var x=iv(g,E);if(x.state>bue)throw new Error("too late; already running");return x}function iv(g,E){var x=g.__transition;if(!x||!(x=x[E]))throw new Error("transition not found");return x}function LJn(g,E,x){var M=g.__transition,N;M[E]=x,x.timer=Idn($,0,x.time);function $(G){x.state=u1n,x.timer.restart(k,x.delay,x.time),x.delay<=G&&k(G-x.delay)}function k(G){var ie,W,Z,le;if(x.state!==u1n)return U();for(ie in M)if(le=M[ie],le.name===x.name){if(le.state===bue)return c1n(k);le.state===o1n?(le.state=gue,le.timer.stop(),le.on.call("interrupt",g,g.__data__,le.index,le.group),delete M[ie]):+iecke&&M.state=0&&(E=E.slice(0,x)),!E||E==="start"})}function aHn(g,E,x){var M,N,$=fHn(E)?yke:d5;return function(){var k=$(this,g),H=k.on;H!==M&&(N=(M=H).copy()).on(E,x),k.on=N}}function hHn(g,E){var x=this._id;return arguments.length<2?iv(this.node(),x).on.on(g):this.each(aHn(x,g,E))}function dHn(g){return function(){var E=this.parentNode;for(var x in this.__transition)if(+x!==g)return;E&&E.removeChild(this)}}function bHn(){return this.on("end.remove",dHn(this._id))}function gHn(g){var E=this._name,x=this._id;typeof g!="function"&&(g=gke(g));for(var M=this._groups,N=M.length,$=new Array(N),k=0;k()=>g;function zHn(g,{sourceEvent:E,target:x,transform:M,dispatch:N}){Object.defineProperties(this,{type:{value:g,enumerable:!0,configurable:!0},sourceEvent:{value:E,enumerable:!0,configurable:!0},target:{value:x,enumerable:!0,configurable:!0},transform:{value:M,enumerable:!0,configurable:!0},_:{value:N}})}function c6(g,E,x){this.k=g,this.x=E,this.y=x}c6.prototype={constructor:c6,scale:function(g){return g===1?this:new c6(this.k*g,this.x,this.y)},translate:function(g,E){return g===0&E===0?this:new c6(this.k,this.x+this.k*g,this.y+this.k*E)},apply:function(g){return[g[0]*this.k+this.x,g[1]*this.k+this.y]},applyX:function(g){return g*this.k+this.x},applyY:function(g){return g*this.k+this.y},invert:function(g){return[(g[0]-this.x)/this.k,(g[1]-this.y)/this.k]},invertX:function(g){return(g-this.x)/this.k},invertY:function(g){return(g-this.y)/this.k},rescaleX:function(g){return g.copy().domain(g.range().map(this.invertX,this).map(g.invert,g))},rescaleY:function(g){return g.copy().domain(g.range().map(this.invertY,this).map(g.invert,g))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var _ue=new c6(1,0,0);$dn.prototype=c6.prototype;function $dn(g){for(;!g.__zoom;)if(!(g=g.parentNode))return _ue;return g.__zoom}function $7e(g){g.stopImmediatePropagation()}function LG(g){g.preventDefault(),g.stopImmediatePropagation()}function FHn(g){return(!g.ctrlKey||g.type==="wheel")&&!g.button}function JHn(){var g=this;return g instanceof SVGElement?(g=g.ownerSVGElement||g,g.hasAttribute("viewBox")?(g=g.viewBox.baseVal,[[g.x,g.y],[g.x+g.width,g.y+g.height]]):[[0,0],[g.width.baseVal.value,g.height.baseVal.value]]):[[0,0],[g.clientWidth,g.clientHeight]]}function s1n(){return this.__zoom||_ue}function HHn(g){return-g.deltaY*(g.deltaMode===1?.05:g.deltaMode?1:.002)*(g.ctrlKey?10:1)}function GHn(){return navigator.maxTouchPoints||"ontouchstart"in this}function qHn(g,E,x){var M=g.invertX(E[0][0])-x[0][0],N=g.invertX(E[1][0])-x[1][0],$=g.invertY(E[0][1])-x[0][1],k=g.invertY(E[1][1])-x[1][1];return g.translate(N>M?(M+N)/2:Math.min(0,M)||Math.max(0,N),k>$?($+k)/2:Math.min(0,$)||Math.max(0,k))}function Rdn(){var g=FHn,E=JHn,x=qHn,M=HHn,N=GHn,$=[0,1/0],k=[[-1/0,-1/0],[1/0,1/0]],H=250,U=due,G=Oue("start","zoom","end"),ie,W,Z,le=500,oe=150,ee=0,Ce=10;function pe(Je){Je.property("__zoom",s1n).on("wheel.zoom",An,{passive:!1}).on("mousedown.zoom",xn).on("dblclick.zoom",nt).filter(N).on("touchstart.zoom",dn).on("touchmove.zoom",bn).on("touchend.zoom touchcancel.zoom",Y).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}pe.transform=function(Je,pn,Ae,ve){var nn=Je.selection?Je.selection():Je;nn.property("__zoom",s1n),Je!==nn?Ue(Je,pn,Ae,ve):nn.interrupt().each(function(){ln(this,arguments).event(ve).start().zoom(null,typeof pn=="function"?pn.apply(this,arguments):pn).end()})},pe.scaleBy=function(Je,pn,Ae,ve){pe.scaleTo(Je,function(){var nn=this.__zoom.k,yn=typeof pn=="function"?pn.apply(this,arguments):pn;return nn*yn},Ae,ve)},pe.scaleTo=function(Je,pn,Ae,ve){pe.transform(Je,function(){var nn=E.apply(this,arguments),yn=this.__zoom,Pn=Ae==null?Ne(nn):typeof Ae=="function"?Ae.apply(this,arguments):Ae,ye=yn.invert(Pn),Re=typeof pn=="function"?pn.apply(this,arguments):pn;return x(ae($e(yn,Re),Pn,ye),nn,k)},Ae,ve)},pe.translateBy=function(Je,pn,Ae,ve){pe.transform(Je,function(){return x(this.__zoom.translate(typeof pn=="function"?pn.apply(this,arguments):pn,typeof Ae=="function"?Ae.apply(this,arguments):Ae),E.apply(this,arguments),k)},null,ve)},pe.translateTo=function(Je,pn,Ae,ve,nn){pe.transform(Je,function(){var yn=E.apply(this,arguments),Pn=this.__zoom,ye=ve==null?Ne(yn):typeof ve=="function"?ve.apply(this,arguments):ve;return x(_ue.translate(ye[0],ye[1]).scale(Pn.k).translate(typeof pn=="function"?-pn.apply(this,arguments):-pn,typeof Ae=="function"?-Ae.apply(this,arguments):-Ae),yn,k)},ve,nn)};function $e(Je,pn){return pn=Math.max($[0],Math.min($[1],pn)),pn===Je.k?Je:new c6(pn,Je.x,Je.y)}function ae(Je,pn,Ae){var ve=pn[0]-Ae[0]*Je.k,nn=pn[1]-Ae[1]*Je.k;return ve===Je.x&&nn===Je.y?Je:new c6(Je.k,ve,nn)}function Ne(Je){return[(+Je[0][0]+ +Je[1][0])/2,(+Je[0][1]+ +Je[1][1])/2]}function Ue(Je,pn,Ae,ve){Je.on("start.zoom",function(){ln(this,arguments).event(ve).start()}).on("interrupt.zoom end.zoom",function(){ln(this,arguments).event(ve).end()}).tween("zoom",function(){var nn=this,yn=arguments,Pn=ln(nn,yn).event(ve),ye=E.apply(nn,yn),Re=Ae==null?Ne(ye):typeof Ae=="function"?Ae.apply(nn,yn):Ae,tt=Math.max(ye[1][0]-ye[0][0],ye[1][1]-ye[0][1]),ut=nn.__zoom,Jt=typeof pn=="function"?pn.apply(nn,yn):pn,di=U(ut.invert(Re).concat(tt/ut.k),Jt.invert(Re).concat(tt/Jt.k));return function(Gt){if(Gt===1)Gt=Jt;else{var xt=di(Gt),si=tt/xt[2];Gt=new c6(si,Re[0]-xt[0]*si,Re[1]-xt[1]*si)}Pn.zoom(null,Gt)}})}function ln(Je,pn,Ae){return!Ae&&Je.__zooming||new un(Je,pn)}function un(Je,pn){this.that=Je,this.args=pn,this.active=0,this.sourceEvent=null,this.extent=E.apply(Je,pn),this.taps=0}un.prototype={event:function(Je){return Je&&(this.sourceEvent=Je),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(Je,pn){return this.mouse&&Je!=="mouse"&&(this.mouse[1]=pn.invert(this.mouse[0])),this.touch0&&Je!=="touch"&&(this.touch0[1]=pn.invert(this.touch0[0])),this.touch1&&Je!=="touch"&&(this.touch1[1]=pn.invert(this.touch1[0])),this.that.__zoom=pn,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(Je){var pn=Fg(this.that).datum();G.call(Je,this.that,new zHn(Je,{sourceEvent:this.sourceEvent,target:pe,transform:this.that.__zoom,dispatch:G}),pn)}};function An(Je,...pn){if(!g.apply(this,arguments))return;var Ae=ln(this,pn).event(Je),ve=this.__zoom,nn=Math.max($[0],Math.min($[1],ve.k*Math.pow(2,M.apply(this,arguments)))),yn=Zm(Je);if(Ae.wheel)(Ae.mouse[0][0]!==yn[0]||Ae.mouse[0][1]!==yn[1])&&(Ae.mouse[1]=ve.invert(Ae.mouse[0]=yn)),clearTimeout(Ae.wheel);else{if(ve.k===nn)return;Ae.mouse=[yn,ve.invert(yn)],wue(this),Ae.start()}LG(Je),Ae.wheel=setTimeout(Pn,oe),Ae.zoom("mouse",x(ae($e(ve,nn),Ae.mouse[0],Ae.mouse[1]),Ae.extent,k));function Pn(){Ae.wheel=null,Ae.end()}}function xn(Je,...pn){if(Z||!g.apply(this,arguments))return;var Ae=Je.currentTarget,ve=ln(this,pn,!0).event(Je),nn=Fg(Je.view).on("mousemove.zoom",Re,!0).on("mouseup.zoom",tt,!0),yn=Zm(Je,Ae),Pn=Je.clientX,ye=Je.clientY;kdn(Je.view),$7e(Je),ve.mouse=[yn,this.__zoom.invert(yn)],wue(this),ve.start();function Re(ut){if(LG(ut),!ve.moved){var Jt=ut.clientX-Pn,di=ut.clientY-ye;ve.moved=Jt*Jt+di*di>ee}ve.event(ut).zoom("mouse",x(ae(ve.that.__zoom,ve.mouse[0]=Zm(ut,Ae),ve.mouse[1]),ve.extent,k))}function tt(ut){nn.on("mousemove.zoom mouseup.zoom",null),jdn(ut.view,ve.moved),LG(ut),ve.event(ut).end()}}function nt(Je,...pn){if(g.apply(this,arguments)){var Ae=this.__zoom,ve=Zm(Je.changedTouches?Je.changedTouches[0]:Je,this),nn=Ae.invert(ve),yn=Ae.k*(Je.shiftKey?.5:2),Pn=x(ae($e(Ae,yn),ve,nn),E.apply(this,pn),k);LG(Je),H>0?Fg(this).transition().duration(H).call(Ue,Pn,ve,Je):Fg(this).call(pe.transform,Pn,ve,Je)}}function dn(Je,...pn){if(g.apply(this,arguments)){var Ae=Je.touches,ve=Ae.length,nn=ln(this,pn,Je.changedTouches.length===ve).event(Je),yn,Pn,ye,Re;for($7e(Je),Pn=0;Pn"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:g=>`Node type "${g}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:g=>`The old edge with id=${g} does not exist.`,error009:g=>`Marker type "${g}" doesn't exist.`,error008:(g,{id:E,sourceHandle:x,targetHandle:M})=>`Couldn't create edge for ${g} handle id: "${g==="source"?x:M}", edge id: ${E}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:g=>`Edge type "${g}" not found. Using fallback type "default".`,error012:g=>`Node with id "${g}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(g="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${g}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},XG=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Bdn=["Enter"," ","Escape"],zdn={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:g,x:E,y:x})=>`Moved selected node ${g}. New position, x: ${E}, y: ${x}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var wD;(function(g){g.Strict="strict",g.Loose="loose"})(wD||(wD={}));var EA;(function(g){g.Free="free",g.Vertical="vertical",g.Horizontal="horizontal"})(EA||(EA={}));var KG;(function(g){g.Partial="partial",g.Full="full"})(KG||(KG={}));const Fdn={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var ek;(function(g){g.Bezier="default",g.Straight="straight",g.Step="step",g.SmoothStep="smoothstep",g.SimpleBezier="simplebezier"})(ek||(ek={}));var VG;(function(g){g.Arrow="arrow",g.ArrowClosed="arrowclosed"})(VG||(VG={}));var ur;(function(g){g.Left="left",g.Top="top",g.Right="right",g.Bottom="bottom"})(ur||(ur={}));const l1n={[ur.Left]:ur.Right,[ur.Right]:ur.Left,[ur.Top]:ur.Bottom,[ur.Bottom]:ur.Top};function Jdn(g){return g===null?null:g?"valid":"invalid"}const Hdn=g=>"id"in g&&"source"in g&&"target"in g,UHn=g=>"id"in g&&"position"in g&&!("source"in g)&&!("target"in g),jke=g=>"id"in g&&"internals"in g&&!("source"in g)&&!("target"in g),tq=(g,E=[0,0])=>{const{width:x,height:M}=s6(g),N=g.origin??E,$=x*N[0],k=M*N[1];return{x:g.position.x-$,y:g.position.y-k}},XHn=(g,E={nodeOrigin:[0,0]})=>{if(g.length===0)return{x:0,y:0,width:0,height:0};const x=g.reduce((M,N)=>{const $=typeof N=="string";let k=!E.nodeLookup&&!$?N:void 0;E.nodeLookup&&(k=$?E.nodeLookup.get(N):jke(N)?N:E.nodeLookup.get(N.id));const H=k?Sue(k,E.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Lue(M,H)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Pue(x)},iq=(g,E={})=>{let x={x:1/0,y:1/0,x2:-1/0,y2:-1/0},M=!1;return g.forEach(N=>{(E.filter===void 0||E.filter(N))&&(x=Lue(x,Sue(N)),M=!0)}),M?Pue(x):{x:0,y:0,width:0,height:0}},Eke=(g,E,[x,M,N]=[0,0,1],$=!1,k=!1)=>{const H={...cq(E,[x,M,N]),width:E.width/N,height:E.height/N},U=[];for(const G of g.values()){const{measured:ie,selectable:W=!0,hidden:Z=!1}=G;if(k&&!W||Z)continue;const le=ie.width??G.width??G.initialWidth??null,oe=ie.height??G.height??G.initialHeight??null,ee=YG(H,mD(G)),Ce=(le??0)*(oe??0),pe=$&&ee>0;(!G.internals.handleBounds||pe||ee>=Ce||G.dragging)&&U.push(G)}return U},KHn=(g,E)=>{const x=new Set;return g.forEach(M=>{x.add(M.id)}),E.filter(M=>x.has(M.source)||x.has(M.target))};function VHn(g,E){const x=new Map,M=E?.nodes?new Set(E.nodes.map(N=>N.id)):null;return g.forEach(N=>{N.measured.width&&N.measured.height&&(E?.includeHiddenNodes||!N.hidden)&&(!M||M.has(N.id))&&x.set(N.id,N)}),x}async function YHn({nodes:g,width:E,height:x,panZoom:M,minZoom:N,maxZoom:$},k){if(g.size===0)return Promise.resolve(!0);const H=VHn(g,k),U=iq(H),G=Ske(U,E,x,k?.minZoom??N,k?.maxZoom??$,k?.padding??.1);return await M.setViewport(G,{duration:k?.duration,ease:k?.ease,interpolate:k?.interpolate}),Promise.resolve(!0)}function Gdn({nodeId:g,nextPosition:E,nodeLookup:x,nodeOrigin:M=[0,0],nodeExtent:N,onError:$}){const k=x.get(g),H=k.parentId?x.get(k.parentId):void 0,{x:U,y:G}=H?H.internals.positionAbsolute:{x:0,y:0},ie=k.origin??M;let W=k.extent||N;if(k.extent==="parent"&&!k.expandParent)if(!H)$?.("005",a5.error005());else{const le=H.measured.width,oe=H.measured.height;le&&oe&&(W=[[U,G],[U+le,G+oe]])}else H&&vD(k.extent)&&(W=[[k.extent[0][0]+U,k.extent[0][1]+G],[k.extent[1][0]+U,k.extent[1][1]+G]]);const Z=vD(W)?MA(E,W,k.measured):E;return(k.measured.width===void 0||k.measured.height===void 0)&&$?.("015",a5.error015()),{position:{x:Z.x-U+(k.measured.width??0)*ie[0],y:Z.y-G+(k.measured.height??0)*ie[1]},positionAbsolute:Z}}async function QHn({nodesToRemove:g=[],edgesToRemove:E=[],nodes:x,edges:M,onBeforeDelete:N}){const $=new Set(g.map(Z=>Z.id)),k=[];for(const Z of x){if(Z.deletable===!1)continue;const le=$.has(Z.id),oe=!le&&Z.parentId&&k.find(ee=>ee.id===Z.parentId);(le||oe)&&k.push(Z)}const H=new Set(E.map(Z=>Z.id)),U=M.filter(Z=>Z.deletable!==!1),ie=KHn(k,U);for(const Z of U)H.has(Z.id)&&!ie.find(oe=>oe.id===Z.id)&&ie.push(Z);if(!N)return{edges:ie,nodes:k};const W=await N({nodes:k,edges:ie});return typeof W=="boolean"?W?{edges:ie,nodes:k}:{edges:[],nodes:[]}:W}const pD=(g,E=0,x=1)=>Math.min(Math.max(g,E),x),MA=(g={x:0,y:0},E,x)=>({x:pD(g.x,E[0][0],E[1][0]-(x?.width??0)),y:pD(g.y,E[0][1],E[1][1]-(x?.height??0))});function qdn(g,E,x){const{width:M,height:N}=s6(x),{x:$,y:k}=x.internals.positionAbsolute;return MA(g,[[$,k],[$+M,k+N]],E)}const f1n=(g,E,x)=>gx?-pD(Math.abs(g-x),1,E)/E:0,Udn=(g,E,x=15,M=40)=>{const N=f1n(g.x,M,E.width-M)*x,$=f1n(g.y,M,E.height-M)*x;return[N,$]},Lue=(g,E)=>({x:Math.min(g.x,E.x),y:Math.min(g.y,E.y),x2:Math.max(g.x2,E.x2),y2:Math.max(g.y2,E.y2)}),oke=({x:g,y:E,width:x,height:M})=>({x:g,y:E,x2:g+x,y2:E+M}),Pue=({x:g,y:E,x2:x,y2:M})=>({x:g,y:E,width:x-g,height:M-E}),mD=(g,E=[0,0])=>{const{x,y:M}=jke(g)?g.internals.positionAbsolute:tq(g,E);return{x,y:M,width:g.measured?.width??g.width??g.initialWidth??0,height:g.measured?.height??g.height??g.initialHeight??0}},Sue=(g,E=[0,0])=>{const{x,y:M}=jke(g)?g.internals.positionAbsolute:tq(g,E);return{x,y:M,x2:x+(g.measured?.width??g.width??g.initialWidth??0),y2:M+(g.measured?.height??g.height??g.initialHeight??0)}},Xdn=(g,E)=>Pue(Lue(oke(g),oke(E))),YG=(g,E)=>{const x=Math.max(0,Math.min(g.x+g.width,E.x+E.width)-Math.max(g.x,E.x)),M=Math.max(0,Math.min(g.y+g.height,E.y+E.height)-Math.max(g.y,E.y));return Math.ceil(x*M)},a1n=g=>nv(g.width)&&nv(g.height)&&nv(g.x)&&nv(g.y),nv=g=>!isNaN(g)&&isFinite(g),WHn=(g,E)=>{},rq=(g,E=[1,1])=>({x:E[0]*Math.round(g.x/E[0]),y:E[1]*Math.round(g.y/E[1])}),cq=({x:g,y:E},[x,M,N],$=!1,k=[1,1])=>{const H={x:(g-x)/N,y:(E-M)/N};return $?rq(H,k):H},xue=({x:g,y:E},[x,M,N])=>({x:g*N+x,y:E*N+M});function sD(g,E){if(typeof g=="number")return Math.floor((E-E/(1+g))*.5);if(typeof g=="string"&&g.endsWith("px")){const x=parseFloat(g);if(!Number.isNaN(x))return Math.floor(x)}if(typeof g=="string"&&g.endsWith("%")){const x=parseFloat(g);if(!Number.isNaN(x))return Math.floor(E*x*.01)}return console.error(`[React Flow] The padding value "${g}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function ZHn(g,E,x){if(typeof g=="string"||typeof g=="number"){const M=sD(g,x),N=sD(g,E);return{top:M,right:N,bottom:M,left:N,x:N*2,y:M*2}}if(typeof g=="object"){const M=sD(g.top??g.y??0,x),N=sD(g.bottom??g.y??0,x),$=sD(g.left??g.x??0,E),k=sD(g.right??g.x??0,E);return{top:M,right:k,bottom:N,left:$,x:$+k,y:M+N}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function eGn(g,E,x,M,N,$){const{x:k,y:H}=xue(g,[E,x,M]),{x:U,y:G}=xue({x:g.x+g.width,y:g.y+g.height},[E,x,M]),ie=N-U,W=$-G;return{left:Math.floor(k),top:Math.floor(H),right:Math.floor(ie),bottom:Math.floor(W)}}const Ske=(g,E,x,M,N,$)=>{const k=ZHn($,E,x),H=(E-k.x)/g.width,U=(x-k.y)/g.height,G=Math.min(H,U),ie=pD(G,M,N),W=g.x+g.width/2,Z=g.y+g.height/2,le=E/2-W*ie,oe=x/2-Z*ie,ee=eGn(g,le,oe,ie,E,x),Ce={left:Math.min(ee.left-k.left,0),top:Math.min(ee.top-k.top,0),right:Math.min(ee.right-k.right,0),bottom:Math.min(ee.bottom-k.bottom,0)};return{x:le-Ce.left+Ce.right,y:oe-Ce.top+Ce.bottom,zoom:ie}},QG=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function vD(g){return g!=null&&g!=="parent"}function s6(g){return{width:g.measured?.width??g.width??g.initialWidth??0,height:g.measured?.height??g.height??g.initialHeight??0}}function Kdn(g){return(g.measured?.width??g.width??g.initialWidth)!==void 0&&(g.measured?.height??g.height??g.initialHeight)!==void 0}function Vdn(g,E={width:0,height:0},x,M,N){const $={...g},k=M.get(x);if(k){const H=k.origin||N;$.x+=k.internals.positionAbsolute.x-(E.width??0)*H[0],$.y+=k.internals.positionAbsolute.y-(E.height??0)*H[1]}return $}function h1n(g,E){if(g.size!==E.size)return!1;for(const x of g)if(!E.has(x))return!1;return!0}function nGn(){let g,E;return{promise:new Promise((M,N)=>{g=M,E=N}),resolve:g,reject:E}}function tGn(g){return{...zdn,...g||{}}}function JG(g,{snapGrid:E=[0,0],snapToGrid:x=!1,transform:M,containerBounds:N}){const{x:$,y:k}=tv(g),H=cq({x:$-(N?.left??0),y:k-(N?.top??0)},M),{x:U,y:G}=x?rq(H,E):H;return{xSnapped:U,ySnapped:G,...H}}const xke=g=>({width:g.offsetWidth,height:g.offsetHeight}),Ydn=g=>g?.getRootNode?.()||window?.document,iGn=["INPUT","SELECT","TEXTAREA"];function Qdn(g){const E=g.composedPath?.()?.[0]||g.target;return E?.nodeType!==1?!1:iGn.includes(E.nodeName)||E.hasAttribute("contenteditable")||!!E.closest(".nokey")}const Wdn=g=>"clientX"in g,tv=(g,E)=>{const x=Wdn(g),M=x?g.clientX:g.touches?.[0].clientX,N=x?g.clientY:g.touches?.[0].clientY;return{x:M-(E?.left??0),y:N-(E?.top??0)}},d1n=(g,E,x,M,N)=>{const $=E.querySelectorAll(`.${g}`);return!$||!$.length?null:Array.from($).map(k=>{const H=k.getBoundingClientRect();return{id:k.getAttribute("data-handleid"),type:g,nodeId:N,position:k.getAttribute("data-handlepos"),x:(H.left-x.left)/M,y:(H.top-x.top)/M,...xke(k)}})};function Zdn({sourceX:g,sourceY:E,targetX:x,targetY:M,sourceControlX:N,sourceControlY:$,targetControlX:k,targetControlY:H}){const U=g*.125+N*.375+k*.375+x*.125,G=E*.125+$*.375+H*.375+M*.125,ie=Math.abs(U-g),W=Math.abs(G-E);return[U,G,ie,W]}function tue(g,E){return g>=0?.5*g:E*25*Math.sqrt(-g)}function b1n({pos:g,x1:E,y1:x,x2:M,y2:N,c:$}){switch(g){case ur.Left:return[E-tue(E-M,$),x];case ur.Right:return[E+tue(M-E,$),x];case ur.Top:return[E,x-tue(x-N,$)];case ur.Bottom:return[E,x+tue(N-x,$)]}}function e0n({sourceX:g,sourceY:E,sourcePosition:x=ur.Bottom,targetX:M,targetY:N,targetPosition:$=ur.Top,curvature:k=.25}){const[H,U]=b1n({pos:x,x1:g,y1:E,x2:M,y2:N,c:k}),[G,ie]=b1n({pos:$,x1:M,y1:N,x2:g,y2:E,c:k}),[W,Z,le,oe]=Zdn({sourceX:g,sourceY:E,targetX:M,targetY:N,sourceControlX:H,sourceControlY:U,targetControlX:G,targetControlY:ie});return[`M${g},${E} C${H},${U} ${G},${ie} ${M},${N}`,W,Z,le,oe]}function n0n({sourceX:g,sourceY:E,targetX:x,targetY:M}){const N=Math.abs(x-g)/2,$=x0}const uGn=({source:g,sourceHandle:E,target:x,targetHandle:M})=>`xy-edge__${g}${E||""}-${x}${M||""}`,oGn=(g,E)=>E.some(x=>x.source===g.source&&x.target===g.target&&(x.sourceHandle===g.sourceHandle||!x.sourceHandle&&!g.sourceHandle)&&(x.targetHandle===g.targetHandle||!x.targetHandle&&!g.targetHandle)),sGn=(g,E,x={})=>{if(!g.source||!g.target)return E;const M=x.getEdgeId||uGn;let N;return Hdn(g)?N={...g}:N={...g,id:M(g)},oGn(N,E)?E:(N.sourceHandle===null&&delete N.sourceHandle,N.targetHandle===null&&delete N.targetHandle,E.concat(N))};function t0n({sourceX:g,sourceY:E,targetX:x,targetY:M}){const[N,$,k,H]=n0n({sourceX:g,sourceY:E,targetX:x,targetY:M});return[`M ${g},${E}L ${x},${M}`,N,$,k,H]}const g1n={[ur.Left]:{x:-1,y:0},[ur.Right]:{x:1,y:0},[ur.Top]:{x:0,y:-1},[ur.Bottom]:{x:0,y:1}},lGn=({source:g,sourcePosition:E=ur.Bottom,target:x})=>E===ur.Left||E===ur.Right?g.xMath.sqrt(Math.pow(E.x-g.x,2)+Math.pow(E.y-g.y,2));function fGn({source:g,sourcePosition:E=ur.Bottom,target:x,targetPosition:M=ur.Top,center:N,offset:$,stepPosition:k}){const H=g1n[E],U=g1n[M],G={x:g.x+H.x*$,y:g.y+H.y*$},ie={x:x.x+U.x*$,y:x.y+U.y*$},W=lGn({source:G,sourcePosition:E,target:ie}),Z=W.x!==0?"x":"y",le=W[Z];let oe=[],ee,Ce;const pe={x:0,y:0},$e={x:0,y:0},[,,ae,Ne]=n0n({sourceX:g.x,sourceY:g.y,targetX:x.x,targetY:x.y});if(H[Z]*U[Z]===-1){Z==="x"?(ee=N.x??G.x+(ie.x-G.x)*k,Ce=N.y??(G.y+ie.y)/2):(ee=N.x??(G.x+ie.x)/2,Ce=N.y??G.y+(ie.y-G.y)*k);const An=[{x:ee,y:G.y},{x:ee,y:ie.y}],xn=[{x:G.x,y:Ce},{x:ie.x,y:Ce}];H[Z]===le?oe=Z==="x"?An:xn:oe=Z==="x"?xn:An}else{const An=[{x:G.x,y:ie.y}],xn=[{x:ie.x,y:G.y}];if(Z==="x"?oe=H.x===le?xn:An:oe=H.y===le?An:xn,E===M){const Je=Math.abs(g[Z]-x[Z]);if(Je<=$){const pn=Math.min($-1,$-Je);H[Z]===le?pe[Z]=(G[Z]>g[Z]?-1:1)*pn:$e[Z]=(ie[Z]>x[Z]?-1:1)*pn}}if(E!==M){const Je=Z==="x"?"y":"x",pn=H[Z]===U[Je],Ae=G[Je]>ie[Je],ve=G[Je]=Y?(ee=(nt.x+dn.x)/2,Ce=oe[0].y):(ee=oe[0].x,Ce=(nt.y+dn.y)/2)}const Ue={x:G.x+pe.x,y:G.y+pe.y},ln={x:ie.x+$e.x,y:ie.y+$e.y};return[[g,...Ue.x!==oe[0].x||Ue.y!==oe[0].y?[Ue]:[],...oe,...ln.x!==oe[oe.length-1].x||ln.y!==oe[oe.length-1].y?[ln]:[],x],ee,Ce,ae,Ne]}function aGn(g,E,x,M){const N=Math.min(w1n(g,E)/2,w1n(E,x)/2,M),{x:$,y:k}=E;if(g.x===$&&$===x.x||g.y===k&&k===x.y)return`L${$} ${k}`;if(g.y===k){const G=g.xx.id===E):g[0])||null}function ske(g,E){return g?typeof g=="string"?g:`${E?`${E}__`:""}${Object.keys(g).sort().map(M=>`${M}=${g[M]}`).join("&")}`:""}function dGn(g,{id:E,defaultColor:x,defaultMarkerStart:M,defaultMarkerEnd:N}){const $=new Set;return g.reduce((k,H)=>([H.markerStart||M,H.markerEnd||N].forEach(U=>{if(U&&typeof U=="object"){const G=ske(U,E);$.has(G)||(k.push({id:G,color:U.color||x,...U}),$.add(G))}}),k),[]).sort((k,H)=>k.id.localeCompare(H.id))}const i0n=1e3,bGn=10,Ake={nodeOrigin:[0,0],nodeExtent:XG,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},gGn={...Ake,checkEquality:!0};function Mke(g,E){const x={...g};for(const M in E)E[M]!==void 0&&(x[M]=E[M]);return x}function wGn(g,E,x){const M=Mke(Ake,x);for(const N of g.values())if(N.parentId)Tke(N,g,E,M);else{const $=tq(N,M.nodeOrigin),k=vD(N.extent)?N.extent:M.nodeExtent,H=MA($,k,s6(N));N.internals.positionAbsolute=H}}function pGn(g,E){if(!g.handles)return g.measured?E?.internals.handleBounds:void 0;const x=[],M=[];for(const N of g.handles){const $={id:N.id,width:N.width??1,height:N.height??1,nodeId:g.id,x:N.x,y:N.y,position:N.position,type:N.type};N.type==="source"?x.push($):N.type==="target"&&M.push($)}return{source:x,target:M}}function Cke(g){return g==="manual"}function lke(g,E,x,M={}){const N=Mke(gGn,M),$={i:0},k=new Map(E),H=N?.elevateNodesOnSelect&&!Cke(N.zIndexMode)?i0n:0;let U=g.length>0,G=!1;E.clear(),x.clear();for(const ie of g){let W=k.get(ie.id);if(N.checkEquality&&ie===W?.internals.userNode)E.set(ie.id,W);else{const Z=tq(ie,N.nodeOrigin),le=vD(ie.extent)?ie.extent:N.nodeExtent,oe=MA(Z,le,s6(ie));W={...N.defaults,...ie,measured:{width:ie.measured?.width,height:ie.measured?.height},internals:{positionAbsolute:oe,handleBounds:pGn(ie,W),z:r0n(ie,H,N.zIndexMode),userNode:ie}},E.set(ie.id,W)}(W.measured===void 0||W.measured.width===void 0||W.measured.height===void 0)&&!W.hidden&&(U=!1),ie.parentId&&Tke(W,E,x,M,$),G||=ie.selected??!1}return{nodesInitialized:U,hasSelectedNodes:G}}function mGn(g,E){if(!g.parentId)return;const x=E.get(g.parentId);x?x.set(g.id,g):E.set(g.parentId,new Map([[g.id,g]]))}function Tke(g,E,x,M,N){const{elevateNodesOnSelect:$,nodeOrigin:k,nodeExtent:H,zIndexMode:U}=Mke(Ake,M),G=g.parentId,ie=E.get(G);if(!ie){console.warn(`Parent node ${G} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}mGn(g,x),N&&!ie.parentId&&ie.internals.rootParentIndex===void 0&&U==="auto"&&(ie.internals.rootParentIndex=++N.i,ie.internals.z=ie.internals.z+N.i*bGn),N&&ie.internals.rootParentIndex!==void 0&&(N.i=ie.internals.rootParentIndex);const W=$&&!Cke(U)?i0n:0,{x:Z,y:le,z:oe}=vGn(g,ie,k,H,W,U),{positionAbsolute:ee}=g.internals,Ce=Z!==ee.x||le!==ee.y;(Ce||oe!==g.internals.z)&&E.set(g.id,{...g,internals:{...g.internals,positionAbsolute:Ce?{x:Z,y:le}:ee,z:oe}})}function r0n(g,E,x){const M=nv(g.zIndex)?g.zIndex:0;return Cke(x)?M:M+(g.selected?E:0)}function vGn(g,E,x,M,N,$){const{x:k,y:H}=E.internals.positionAbsolute,U=s6(g),G=tq(g,x),ie=vD(g.extent)?MA(G,g.extent,U):G;let W=MA({x:k+ie.x,y:H+ie.y},M,U);g.extent==="parent"&&(W=qdn(W,U,E));const Z=r0n(g,N,$),le=E.internals.z??0;return{x:W.x,y:W.y,z:le>=Z?le+1:Z}}function Oke(g,E,x,M=[0,0]){const N=[],$=new Map;for(const k of g){const H=E.get(k.parentId);if(!H)continue;const U=$.get(k.parentId)?.expandedRect??mD(H),G=Xdn(U,k.rect);$.set(k.parentId,{expandedRect:G,parent:H})}return $.size>0&&$.forEach(({expandedRect:k,parent:H},U)=>{const G=H.internals.positionAbsolute,ie=s6(H),W=H.origin??M,Z=k.x0||le>0||Ce||pe)&&(N.push({id:U,type:"position",position:{x:H.position.x-Z+Ce,y:H.position.y-le+pe}}),x.get(U)?.forEach($e=>{g.some(ae=>ae.id===$e.id)||N.push({id:$e.id,type:"position",position:{x:$e.position.x+Z,y:$e.position.y+le}})})),(ie.width0){const le=Oke(Z,E,x,N);G.push(...le)}return{changes:G,updatedInternals:U}}async function kGn({delta:g,panZoom:E,transform:x,translateExtent:M,width:N,height:$}){if(!E||!g.x&&!g.y)return Promise.resolve(!1);const k=await E.setViewportConstrained({x:x[0]+g.x,y:x[1]+g.y,zoom:x[2]},[[0,0],[N,$]],M),H=!!k&&(k.x!==x[0]||k.y!==x[1]||k.k!==x[2]);return Promise.resolve(H)}function y1n(g,E,x,M,N,$){let k=N;const H=M.get(k)||new Map;M.set(k,H.set(x,E)),k=`${N}-${g}`;const U=M.get(k)||new Map;if(M.set(k,U.set(x,E)),$){k=`${N}-${g}-${$}`;const G=M.get(k)||new Map;M.set(k,G.set(x,E))}}function c0n(g,E,x){g.clear(),E.clear();for(const M of x){const{source:N,target:$,sourceHandle:k=null,targetHandle:H=null}=M,U={edgeId:M.id,source:N,target:$,sourceHandle:k,targetHandle:H},G=`${N}-${k}--${$}-${H}`,ie=`${$}-${H}--${N}-${k}`;y1n("source",U,ie,g,N,k),y1n("target",U,G,g,$,H),E.set(M.id,M)}}function u0n(g,E){if(!g.parentId)return!1;const x=E.get(g.parentId);return x?x.selected?!0:u0n(x,E):!1}function k1n(g,E,x){let M=g;do{if(M?.matches?.(E))return!0;if(M===x)return!1;M=M?.parentElement}while(M);return!1}function jGn(g,E,x,M){const N=new Map;for(const[$,k]of g)if((k.selected||k.id===M)&&(!k.parentId||!u0n(k,g))&&(k.draggable||E&&typeof k.draggable>"u")){const H=g.get($);H&&N.set($,{id:$,position:H.position||{x:0,y:0},distance:{x:x.x-H.internals.positionAbsolute.x,y:x.y-H.internals.positionAbsolute.y},extent:H.extent,parentId:H.parentId,origin:H.origin,expandParent:H.expandParent,internals:{positionAbsolute:H.internals.positionAbsolute||{x:0,y:0}},measured:{width:H.measured.width??0,height:H.measured.height??0}})}return N}function R7e({nodeId:g,dragItems:E,nodeLookup:x,dragging:M=!0}){const N=[];for(const[k,H]of E){const U=x.get(k)?.internals.userNode;U&&N.push({...U,position:H.position,dragging:M})}if(!g)return[N[0],N];const $=x.get(g)?.internals.userNode;return[$?{...$,position:E.get(g)?.position||$.position,dragging:M}:N[0],N]}function EGn({dragItems:g,snapGrid:E,x,y:M}){const N=g.values().next().value;if(!N)return null;const $={x:x-N.distance.x,y:M-N.distance.y},k=rq($,E);return{x:k.x-$.x,y:k.y-$.y}}function SGn({onNodeMouseDown:g,getStoreItems:E,onDragStart:x,onDrag:M,onDragStop:N}){let $={x:null,y:null},k=0,H=new Map,U=!1,G={x:0,y:0},ie=null,W=!1,Z=null,le=!1,oe=!1,ee=null;function Ce({noDragClassName:$e,handleSelector:ae,domNode:Ne,isSelectable:Ue,nodeId:ln,nodeClickDistance:un=0}){Z=Fg(Ne);function An({x:bn,y:Y}){const{nodeLookup:Je,nodeExtent:pn,snapGrid:Ae,snapToGrid:ve,nodeOrigin:nn,onNodeDrag:yn,onSelectionDrag:Pn,onError:ye,updateNodePositions:Re}=E();$={x:bn,y:Y};let tt=!1;const ut=H.size>1,Jt=ut&&pn?oke(iq(H)):null,di=ut&&ve?EGn({dragItems:H,snapGrid:Ae,x:bn,y:Y}):null;for(const[Gt,xt]of H){if(!Je.has(Gt))continue;let si={x:bn-xt.distance.x,y:Y-xt.distance.y};ve&&(si=di?{x:Math.round(si.x+di.x),y:Math.round(si.y+di.y)}:rq(si,Ae));let Kr=null;if(ut&&pn&&!xt.extent&&Jt){const{positionAbsolute:bi}=xt.internals,zi=bi.x-Jt.x+pn[0][0],cu=bi.x+xt.measured.width-Jt.x2+pn[1][0],Fu=bi.y-Jt.y+pn[0][1],Rs=bi.y+xt.measured.height-Jt.y2+pn[1][1];Kr=[[zi,Fu],[cu,Rs]]}const{position:Er,positionAbsolute:Mt}=Gdn({nodeId:Gt,nextPosition:si,nodeLookup:Je,nodeExtent:Kr||pn,nodeOrigin:nn,onError:ye});tt=tt||xt.position.x!==Er.x||xt.position.y!==Er.y,xt.position=Er,xt.internals.positionAbsolute=Mt}if(oe=oe||tt,!!tt&&(Re(H,!0),ee&&(M||yn||!ln&&Pn))){const[Gt,xt]=R7e({nodeId:ln,dragItems:H,nodeLookup:Je});M?.(ee,H,Gt,xt),yn?.(ee,Gt,xt),ln||Pn?.(ee,xt)}}async function xn(){if(!ie)return;const{transform:bn,panBy:Y,autoPanSpeed:Je,autoPanOnNodeDrag:pn}=E();if(!pn){U=!1,cancelAnimationFrame(k);return}const[Ae,ve]=Udn(G,ie,Je);(Ae!==0||ve!==0)&&($.x=($.x??0)-Ae/bn[2],$.y=($.y??0)-ve/bn[2],await Y({x:Ae,y:ve})&&An($)),k=requestAnimationFrame(xn)}function nt(bn){const{nodeLookup:Y,multiSelectionActive:Je,nodesDraggable:pn,transform:Ae,snapGrid:ve,snapToGrid:nn,selectNodesOnDrag:yn,onNodeDragStart:Pn,onSelectionDragStart:ye,unselectNodesAndEdges:Re}=E();W=!0,(!yn||!Ue)&&!Je&&ln&&(Y.get(ln)?.selected||Re()),Ue&&yn&&ln&&g?.(ln);const tt=JG(bn.sourceEvent,{transform:Ae,snapGrid:ve,snapToGrid:nn,containerBounds:ie});if($=tt,H=jGn(Y,pn,tt,ln),H.size>0&&(x||Pn||!ln&&ye)){const[ut,Jt]=R7e({nodeId:ln,dragItems:H,nodeLookup:Y});x?.(bn.sourceEvent,H,ut,Jt),Pn?.(bn.sourceEvent,ut,Jt),ln||ye?.(bn.sourceEvent,Jt)}}const dn=Edn().clickDistance(un).on("start",bn=>{const{domNode:Y,nodeDragThreshold:Je,transform:pn,snapGrid:Ae,snapToGrid:ve}=E();ie=Y?.getBoundingClientRect()||null,le=!1,oe=!1,ee=bn.sourceEvent,Je===0&&nt(bn),$=JG(bn.sourceEvent,{transform:pn,snapGrid:Ae,snapToGrid:ve,containerBounds:ie}),G=tv(bn.sourceEvent,ie)}).on("drag",bn=>{const{autoPanOnNodeDrag:Y,transform:Je,snapGrid:pn,snapToGrid:Ae,nodeDragThreshold:ve,nodeLookup:nn}=E(),yn=JG(bn.sourceEvent,{transform:Je,snapGrid:pn,snapToGrid:Ae,containerBounds:ie});if(ee=bn.sourceEvent,(bn.sourceEvent.type==="touchmove"&&bn.sourceEvent.touches.length>1||ln&&!nn.has(ln))&&(le=!0),!le){if(!U&&Y&&W&&(U=!0,xn()),!W){const Pn=tv(bn.sourceEvent,ie),ye=Pn.x-G.x,Re=Pn.y-G.y;Math.sqrt(ye*ye+Re*Re)>ve&&nt(bn)}($.x!==yn.xSnapped||$.y!==yn.ySnapped)&&H&&W&&(G=tv(bn.sourceEvent,ie),An(yn))}}).on("end",bn=>{if(!(!W||le)&&(U=!1,W=!1,cancelAnimationFrame(k),H.size>0)){const{nodeLookup:Y,updateNodePositions:Je,onNodeDragStop:pn,onSelectionDragStop:Ae}=E();if(oe&&(Je(H,!1),oe=!1),N||pn||!ln&&Ae){const[ve,nn]=R7e({nodeId:ln,dragItems:H,nodeLookup:Y,dragging:!1});N?.(bn.sourceEvent,H,ve,nn),pn?.(bn.sourceEvent,ve,nn),ln||Ae?.(bn.sourceEvent,nn)}}}).filter(bn=>{const Y=bn.target;return!bn.button&&(!$e||!k1n(Y,`.${$e}`,Ne))&&(!ae||k1n(Y,ae,Ne))});Z.call(dn)}function pe(){Z?.on(".drag",null)}return{update:Ce,destroy:pe}}function xGn(g,E,x){const M=[],N={x:g.x-x,y:g.y-x,width:x*2,height:x*2};for(const $ of E.values())YG(N,mD($))>0&&M.push($);return M}const AGn=250;function MGn(g,E,x,M){let N=[],$=1/0;const k=xGn(g,x,E+AGn);for(const H of k){const U=[...H.internals.handleBounds?.source??[],...H.internals.handleBounds?.target??[]];for(const G of U){if(M.nodeId===G.nodeId&&M.type===G.type&&M.id===G.id)continue;const{x:ie,y:W}=CA(H,G,G.position,!0),Z=Math.sqrt(Math.pow(ie-g.x,2)+Math.pow(W-g.y,2));Z>E||(Z<$?(N=[{...G,x:ie,y:W}],$=Z):Z===$&&N.push({...G,x:ie,y:W}))}}if(!N.length)return null;if(N.length>1){const H=M.type==="source"?"target":"source";return N.find(U=>U.type===H)??N[0]}return N[0]}function o0n(g,E,x,M,N,$=!1){const k=M.get(g);if(!k)return null;const H=N==="strict"?k.internals.handleBounds?.[E]:[...k.internals.handleBounds?.source??[],...k.internals.handleBounds?.target??[]],U=(x?H?.find(G=>G.id===x):H?.[0])??null;return U&&$?{...U,...CA(k,U,U.position,!0)}:U}function s0n(g,E){return g||(E?.classList.contains("target")?"target":E?.classList.contains("source")?"source":null)}function CGn(g,E){let x=null;return E?x=!0:g&&!E&&(x=!1),x}const l0n=()=>!0;function TGn(g,{connectionMode:E,connectionRadius:x,handleId:M,nodeId:N,edgeUpdaterType:$,isTarget:k,domNode:H,nodeLookup:U,lib:G,autoPanOnConnect:ie,flowId:W,panBy:Z,cancelConnection:le,onConnectStart:oe,onConnect:ee,onConnectEnd:Ce,isValidConnection:pe=l0n,onReconnectEnd:$e,updateConnection:ae,getTransform:Ne,getFromHandle:Ue,autoPanSpeed:ln,dragThreshold:un=1,handleDomNode:An}){const xn=Ydn(g.target);let nt=0,dn;const{x:bn,y:Y}=tv(g),Je=s0n($,An),pn=H?.getBoundingClientRect();let Ae=!1;if(!pn||!Je)return;const ve=o0n(N,Je,M,U,E);if(!ve)return;let nn=tv(g,pn),yn=!1,Pn=null,ye=!1,Re=null;function tt(){if(!ie||!pn)return;const[Er,Mt]=Udn(nn,pn,ln);Z({x:Er,y:Mt}),nt=requestAnimationFrame(tt)}const ut={...ve,nodeId:N,type:Je,position:ve.position},Jt=U.get(N);let Gt={inProgress:!0,isValid:null,from:CA(Jt,ut,ur.Left,!0),fromHandle:ut,fromPosition:ut.position,fromNode:Jt,to:nn,toHandle:null,toPosition:l1n[ut.position],toNode:null,pointer:nn};function xt(){Ae=!0,ae(Gt),oe?.(g,{nodeId:N,handleId:M,handleType:Je})}un===0&&xt();function si(Er){if(!Ae){const{x:Rs,y:ia}=tv(Er),ef=Rs-bn,Oa=ia-Y;if(!(ef*ef+Oa*Oa>un*un))return;xt()}if(!Ue()||!ut){Kr(Er);return}const Mt=Ne();nn=tv(Er,pn),dn=MGn(cq(nn,Mt,!1,[1,1]),x,U,ut),yn||(tt(),yn=!0);const bi=f0n(Er,{handle:dn,connectionMode:E,fromNodeId:N,fromHandleId:M,fromType:k?"target":"source",isValidConnection:pe,doc:xn,lib:G,flowId:W,nodeLookup:U});Re=bi.handleDomNode,Pn=bi.connection,ye=CGn(!!dn,bi.isValid);const zi=U.get(N),cu=zi?CA(zi,ut,ur.Left,!0):Gt.from,Fu={...Gt,from:cu,isValid:ye,to:bi.toHandle&&ye?xue({x:bi.toHandle.x,y:bi.toHandle.y},Mt):nn,toHandle:bi.toHandle,toPosition:ye&&bi.toHandle?bi.toHandle.position:l1n[ut.position],toNode:bi.toHandle?U.get(bi.toHandle.nodeId):null,pointer:nn};ae(Fu),Gt=Fu}function Kr(Er){if(!("touches"in Er&&Er.touches.length>0)){if(Ae){(dn||Re)&&Pn&&ye&&ee?.(Pn);const{inProgress:Mt,...bi}=Gt,zi={...bi,toPosition:Gt.toHandle?Gt.toPosition:null};Ce?.(Er,zi),$&&$e?.(Er,zi)}le(),cancelAnimationFrame(nt),yn=!1,ye=!1,Pn=null,Re=null,xn.removeEventListener("mousemove",si),xn.removeEventListener("mouseup",Kr),xn.removeEventListener("touchmove",si),xn.removeEventListener("touchend",Kr)}}xn.addEventListener("mousemove",si),xn.addEventListener("mouseup",Kr),xn.addEventListener("touchmove",si),xn.addEventListener("touchend",Kr)}function f0n(g,{handle:E,connectionMode:x,fromNodeId:M,fromHandleId:N,fromType:$,doc:k,lib:H,flowId:U,isValidConnection:G=l0n,nodeLookup:ie}){const W=$==="target",Z=E?k.querySelector(`.${H}-flow__handle[data-id="${U}-${E?.nodeId}-${E?.id}-${E?.type}"]`):null,{x:le,y:oe}=tv(g),ee=k.elementFromPoint(le,oe),Ce=ee?.classList.contains(`${H}-flow__handle`)?ee:Z,pe={handleDomNode:Ce,isValid:!1,connection:null,toHandle:null};if(Ce){const $e=s0n(void 0,Ce),ae=Ce.getAttribute("data-nodeid"),Ne=Ce.getAttribute("data-handleid"),Ue=Ce.classList.contains("connectable"),ln=Ce.classList.contains("connectableend");if(!ae||!$e)return pe;const un={source:W?ae:M,sourceHandle:W?Ne:N,target:W?M:ae,targetHandle:W?N:Ne};pe.connection=un;const xn=Ue&&ln&&(x===wD.Strict?W&&$e==="source"||!W&&$e==="target":ae!==M||Ne!==N);pe.isValid=xn&&G(un),pe.toHandle=o0n(ae,$e,Ne,ie,x,!0)}return pe}const fke={onPointerDown:TGn,isValid:f0n};function OGn({domNode:g,panZoom:E,getTransform:x,getViewScale:M}){const N=Fg(g);function $({translateExtent:H,width:U,height:G,zoomStep:ie=1,pannable:W=!0,zoomable:Z=!0,inversePan:le=!1}){const oe=ae=>{if(ae.sourceEvent.type!=="wheel"||!E)return;const Ne=x(),Ue=ae.sourceEvent.ctrlKey&&QG()?10:1,ln=-ae.sourceEvent.deltaY*(ae.sourceEvent.deltaMode===1?.05:ae.sourceEvent.deltaMode?1:.002)*ie,un=Ne[2]*Math.pow(2,ln*Ue);E.scaleTo(un)};let ee=[0,0];const Ce=ae=>{(ae.sourceEvent.type==="mousedown"||ae.sourceEvent.type==="touchstart")&&(ee=[ae.sourceEvent.clientX??ae.sourceEvent.touches[0].clientX,ae.sourceEvent.clientY??ae.sourceEvent.touches[0].clientY])},pe=ae=>{const Ne=x();if(ae.sourceEvent.type!=="mousemove"&&ae.sourceEvent.type!=="touchmove"||!E)return;const Ue=[ae.sourceEvent.clientX??ae.sourceEvent.touches[0].clientX,ae.sourceEvent.clientY??ae.sourceEvent.touches[0].clientY],ln=[Ue[0]-ee[0],Ue[1]-ee[1]];ee=Ue;const un=M()*Math.max(Ne[2],Math.log(Ne[2]))*(le?-1:1),An={x:Ne[0]-ln[0]*un,y:Ne[1]-ln[1]*un},xn=[[0,0],[U,G]];E.setViewportConstrained({x:An.x,y:An.y,zoom:Ne[2]},xn,H)},$e=Rdn().on("start",Ce).on("zoom",W?pe:null).on("zoom.wheel",Z?oe:null);N.call($e,{})}function k(){N.on("zoom",null)}return{update:$,destroy:k,pointer:Zm}}const $ue=g=>({x:g.x,y:g.y,zoom:g.k}),B7e=({x:g,y:E,zoom:x})=>_ue.translate(g,E).scale(x),fD=(g,E)=>g.target.closest(`.${E}`),a0n=(g,E)=>E===2&&Array.isArray(g)&&g.includes(2),NGn=g=>((g*=2)<=1?g*g*g:(g-=2)*g*g+2)/2,z7e=(g,E=0,x=NGn,M=()=>{})=>{const N=typeof E=="number"&&E>0;return N||M(),N?g.transition().duration(E).ease(x).on("end",M):g},h0n=g=>{const E=g.ctrlKey&&QG()?10:1;return-g.deltaY*(g.deltaMode===1?.05:g.deltaMode?1:.002)*E};function IGn({zoomPanValues:g,noWheelClassName:E,d3Selection:x,d3Zoom:M,panOnScrollMode:N,panOnScrollSpeed:$,zoomOnPinch:k,onPanZoomStart:H,onPanZoom:U,onPanZoomEnd:G}){return ie=>{if(fD(ie,E))return ie.ctrlKey&&ie.preventDefault(),!1;ie.preventDefault(),ie.stopImmediatePropagation();const W=x.property("__zoom").k||1;if(ie.ctrlKey&&k){const Ce=Zm(ie),pe=h0n(ie),$e=W*Math.pow(2,pe);M.scaleTo(x,$e,Ce,ie);return}const Z=ie.deltaMode===1?20:1;let le=N===EA.Vertical?0:ie.deltaX*Z,oe=N===EA.Horizontal?0:ie.deltaY*Z;!QG()&&ie.shiftKey&&N!==EA.Vertical&&(le=ie.deltaY*Z,oe=0),M.translateBy(x,-(le/W)*$,-(oe/W)*$,{internal:!0});const ee=$ue(x.property("__zoom"));clearTimeout(g.panScrollTimeout),g.isPanScrolling?(U?.(ie,ee),g.panScrollTimeout=setTimeout(()=>{G?.(ie,ee),g.isPanScrolling=!1},150)):(g.isPanScrolling=!0,H?.(ie,ee))}}function DGn({noWheelClassName:g,preventScrolling:E,d3ZoomHandler:x}){return function(M,N){const $=M.type==="wheel",k=!E&&$&&!M.ctrlKey,H=fD(M,g);if(M.ctrlKey&&$&&H&&M.preventDefault(),k||H)return null;M.preventDefault(),x.call(this,M,N)}}function _Gn({zoomPanValues:g,onDraggingChange:E,onPanZoomStart:x}){return M=>{if(M.sourceEvent?.internal)return;const N=$ue(M.transform);g.mouseButton=M.sourceEvent?.button||0,g.isZoomingOrPanning=!0,g.prevViewport=N,M.sourceEvent?.type==="mousedown"&&E(!0),x&&x?.(M.sourceEvent,N)}}function LGn({zoomPanValues:g,panOnDrag:E,onPaneContextMenu:x,onTransformChange:M,onPanZoom:N}){return $=>{g.usedRightMouseButton=!!(x&&a0n(E,g.mouseButton??0)),$.sourceEvent?.sync||M([$.transform.x,$.transform.y,$.transform.k]),N&&!$.sourceEvent?.internal&&N?.($.sourceEvent,$ue($.transform))}}function PGn({zoomPanValues:g,panOnDrag:E,panOnScroll:x,onDraggingChange:M,onPanZoomEnd:N,onPaneContextMenu:$}){return k=>{if(!k.sourceEvent?.internal&&(g.isZoomingOrPanning=!1,$&&a0n(E,g.mouseButton??0)&&!g.usedRightMouseButton&&k.sourceEvent&&$(k.sourceEvent),g.usedRightMouseButton=!1,M(!1),N)){const H=$ue(k.transform);g.prevViewport=H,clearTimeout(g.timerId),g.timerId=setTimeout(()=>{N?.(k.sourceEvent,H)},x?150:0)}}}function $Gn({zoomActivationKeyPressed:g,zoomOnScroll:E,zoomOnPinch:x,panOnDrag:M,panOnScroll:N,zoomOnDoubleClick:$,userSelectionActive:k,noWheelClassName:H,noPanClassName:U,lib:G,connectionInProgress:ie}){return W=>{const Z=g||E,le=x&&W.ctrlKey,oe=W.type==="wheel";if(W.button===1&&W.type==="mousedown"&&(fD(W,`${G}-flow__node`)||fD(W,`${G}-flow__edge`)))return!0;if(!M&&!Z&&!N&&!$&&!x||k||ie&&!oe||fD(W,H)&&oe||fD(W,U)&&(!oe||N&&oe&&!g)||!x&&W.ctrlKey&&oe)return!1;if(!x&&W.type==="touchstart"&&W.touches?.length>1)return W.preventDefault(),!1;if(!Z&&!N&&!le&&oe||!M&&(W.type==="mousedown"||W.type==="touchstart")||Array.isArray(M)&&!M.includes(W.button)&&W.type==="mousedown")return!1;const ee=Array.isArray(M)&&M.includes(W.button)||!W.button||W.button<=1;return(!W.ctrlKey||oe)&&ee}}function RGn({domNode:g,minZoom:E,maxZoom:x,translateExtent:M,viewport:N,onPanZoom:$,onPanZoomStart:k,onPanZoomEnd:H,onDraggingChange:U}){const G={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},ie=g.getBoundingClientRect(),W=Rdn().scaleExtent([E,x]).translateExtent(M),Z=Fg(g).call(W);$e({x:N.x,y:N.y,zoom:pD(N.zoom,E,x)},[[0,0],[ie.width,ie.height]],M);const le=Z.on("wheel.zoom"),oe=Z.on("dblclick.zoom");W.wheelDelta(h0n);function ee(dn,bn){return Z?new Promise(Y=>{W?.interpolate(bn?.interpolate==="linear"?FG:due).transform(z7e(Z,bn?.duration,bn?.ease,()=>Y(!0)),dn)}):Promise.resolve(!1)}function Ce({noWheelClassName:dn,noPanClassName:bn,onPaneContextMenu:Y,userSelectionActive:Je,panOnScroll:pn,panOnDrag:Ae,panOnScrollMode:ve,panOnScrollSpeed:nn,preventScrolling:yn,zoomOnPinch:Pn,zoomOnScroll:ye,zoomOnDoubleClick:Re,zoomActivationKeyPressed:tt,lib:ut,onTransformChange:Jt,connectionInProgress:di,paneClickDistance:Gt,selectionOnDrag:xt}){Je&&!G.isZoomingOrPanning&&pe();const si=pn&&!tt&&!Je;W.clickDistance(xt?1/0:!nv(Gt)||Gt<0?0:Gt);const Kr=si?IGn({zoomPanValues:G,noWheelClassName:dn,d3Selection:Z,d3Zoom:W,panOnScrollMode:ve,panOnScrollSpeed:nn,zoomOnPinch:Pn,onPanZoomStart:k,onPanZoom:$,onPanZoomEnd:H}):DGn({noWheelClassName:dn,preventScrolling:yn,d3ZoomHandler:le});if(Z.on("wheel.zoom",Kr,{passive:!1}),!Je){const Mt=_Gn({zoomPanValues:G,onDraggingChange:U,onPanZoomStart:k});W.on("start",Mt);const bi=LGn({zoomPanValues:G,panOnDrag:Ae,onPaneContextMenu:!!Y,onPanZoom:$,onTransformChange:Jt});W.on("zoom",bi);const zi=PGn({zoomPanValues:G,panOnDrag:Ae,panOnScroll:pn,onPaneContextMenu:Y,onPanZoomEnd:H,onDraggingChange:U});W.on("end",zi)}const Er=$Gn({zoomActivationKeyPressed:tt,panOnDrag:Ae,zoomOnScroll:ye,panOnScroll:pn,zoomOnDoubleClick:Re,zoomOnPinch:Pn,userSelectionActive:Je,noPanClassName:bn,noWheelClassName:dn,lib:ut,connectionInProgress:di});W.filter(Er),Re?Z.on("dblclick.zoom",oe):Z.on("dblclick.zoom",null)}function pe(){W.on("zoom",null)}async function $e(dn,bn,Y){const Je=B7e(dn),pn=W?.constrain()(Je,bn,Y);return pn&&await ee(pn),new Promise(Ae=>Ae(pn))}async function ae(dn,bn){const Y=B7e(dn);return await ee(Y,bn),new Promise(Je=>Je(Y))}function Ne(dn){if(Z){const bn=B7e(dn),Y=Z.property("__zoom");(Y.k!==dn.zoom||Y.x!==dn.x||Y.y!==dn.y)&&W?.transform(Z,bn,null,{sync:!0})}}function Ue(){const dn=Z?$dn(Z.node()):{x:0,y:0,k:1};return{x:dn.x,y:dn.y,zoom:dn.k}}function ln(dn,bn){return Z?new Promise(Y=>{W?.interpolate(bn?.interpolate==="linear"?FG:due).scaleTo(z7e(Z,bn?.duration,bn?.ease,()=>Y(!0)),dn)}):Promise.resolve(!1)}function un(dn,bn){return Z?new Promise(Y=>{W?.interpolate(bn?.interpolate==="linear"?FG:due).scaleBy(z7e(Z,bn?.duration,bn?.ease,()=>Y(!0)),dn)}):Promise.resolve(!1)}function An(dn){W?.scaleExtent(dn)}function xn(dn){W?.translateExtent(dn)}function nt(dn){const bn=!nv(dn)||dn<0?0:dn;W?.clickDistance(bn)}return{update:Ce,destroy:pe,setViewport:ae,setViewportConstrained:$e,getViewport:Ue,scaleTo:ln,scaleBy:un,setScaleExtent:An,setTranslateExtent:xn,syncViewport:Ne,setClickDistance:nt}}var yD;(function(g){g.Line="line",g.Handle="handle"})(yD||(yD={}));function BGn({width:g,prevWidth:E,height:x,prevHeight:M,affectsX:N,affectsY:$}){const k=g-E,H=x-M,U=[k>0?1:k<0?-1:0,H>0?1:H<0?-1:0];return k&&N&&(U[0]=U[0]*-1),H&&$&&(U[1]=U[1]*-1),U}function j1n(g){const E=g.includes("right")||g.includes("left"),x=g.includes("bottom")||g.includes("top"),M=g.includes("left"),N=g.includes("top");return{isHorizontal:E,isVertical:x,affectsX:M,affectsY:N}}function W7(g,E){return Math.max(0,E-g)}function Z7(g,E){return Math.max(0,g-E)}function iue(g,E,x){return Math.max(0,E-g,g-x)}function E1n(g,E){return g?!E:E}function zGn(g,E,x,M,N,$,k,H){let{affectsX:U,affectsY:G}=E;const{isHorizontal:ie,isVertical:W}=E,Z=ie&&W,{xSnapped:le,ySnapped:oe}=x,{minWidth:ee,maxWidth:Ce,minHeight:pe,maxHeight:$e}=M,{x:ae,y:Ne,width:Ue,height:ln,aspectRatio:un}=g;let An=Math.floor(ie?le-g.pointerX:0),xn=Math.floor(W?oe-g.pointerY:0);const nt=Ue+(U?-An:An),dn=ln+(G?-xn:xn),bn=-$[0]*Ue,Y=-$[1]*ln;let Je=iue(nt,ee,Ce),pn=iue(dn,pe,$e);if(k){let nn=0,yn=0;U&&An<0?nn=W7(ae+An+bn,k[0][0]):!U&&An>0&&(nn=Z7(ae+nt+bn,k[1][0])),G&&xn<0?yn=W7(Ne+xn+Y,k[0][1]):!G&&xn>0&&(yn=Z7(Ne+dn+Y,k[1][1])),Je=Math.max(Je,nn),pn=Math.max(pn,yn)}if(H){let nn=0,yn=0;U&&An>0?nn=Z7(ae+An,H[0][0]):!U&&An<0&&(nn=W7(ae+nt,H[1][0])),G&&xn>0?yn=Z7(Ne+xn,H[0][1]):!G&&xn<0&&(yn=W7(Ne+dn,H[1][1])),Je=Math.max(Je,nn),pn=Math.max(pn,yn)}if(N){if(ie){const nn=iue(nt/un,pe,$e)*un;if(Je=Math.max(Je,nn),k){let yn=0;!U&&!G||U&&!G&&Z?yn=Z7(Ne+Y+nt/un,k[1][1])*un:yn=W7(Ne+Y+(U?An:-An)/un,k[0][1])*un,Je=Math.max(Je,yn)}if(H){let yn=0;!U&&!G||U&&!G&&Z?yn=W7(Ne+nt/un,H[1][1])*un:yn=Z7(Ne+(U?An:-An)/un,H[0][1])*un,Je=Math.max(Je,yn)}}if(W){const nn=iue(dn*un,ee,Ce)/un;if(pn=Math.max(pn,nn),k){let yn=0;!U&&!G||G&&!U&&Z?yn=Z7(ae+dn*un+bn,k[1][0])/un:yn=W7(ae+(G?xn:-xn)*un+bn,k[0][0])/un,pn=Math.max(pn,yn)}if(H){let yn=0;!U&&!G||G&&!U&&Z?yn=W7(ae+dn*un,H[1][0])/un:yn=Z7(ae+(G?xn:-xn)*un,H[0][0])/un,pn=Math.max(pn,yn)}}}xn=xn+(xn<0?pn:-pn),An=An+(An<0?Je:-Je),N&&(Z?nt>dn*un?xn=(E1n(U,G)?-An:An)/un:An=(E1n(U,G)?-xn:xn)*un:ie?(xn=An/un,G=U):(An=xn*un,U=G));const Ae=U?ae+An:ae,ve=G?Ne+xn:Ne;return{width:Ue+(U?-An:An),height:ln+(G?-xn:xn),x:$[0]*An*(U?-1:1)+Ae,y:$[1]*xn*(G?-1:1)+ve}}const d0n={width:0,height:0,x:0,y:0},FGn={...d0n,pointerX:0,pointerY:0,aspectRatio:1};function JGn(g){return[[0,0],[g.measured.width,g.measured.height]]}function HGn(g,E,x){const M=E.position.x+g.position.x,N=E.position.y+g.position.y,$=g.measured.width??0,k=g.measured.height??0,H=x[0]*$,U=x[1]*k;return[[M-H,N-U],[M+$-H,N+k-U]]}function GGn({domNode:g,nodeId:E,getStoreItems:x,onChange:M,onEnd:N}){const $=Fg(g);let k={controlDirection:j1n("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function H({controlPosition:G,boundaries:ie,keepAspectRatio:W,resizeDirection:Z,onResizeStart:le,onResize:oe,onResizeEnd:ee,shouldResize:Ce}){let pe={...d0n},$e={...FGn};k={boundaries:ie,resizeDirection:Z,keepAspectRatio:W,controlDirection:j1n(G)};let ae,Ne=null,Ue=[],ln,un,An,xn=!1;const nt=Edn().on("start",dn=>{const{nodeLookup:bn,transform:Y,snapGrid:Je,snapToGrid:pn,nodeOrigin:Ae,paneDomNode:ve}=x();if(ae=bn.get(E),!ae)return;Ne=ve?.getBoundingClientRect()??null;const{xSnapped:nn,ySnapped:yn}=JG(dn.sourceEvent,{transform:Y,snapGrid:Je,snapToGrid:pn,containerBounds:Ne});pe={width:ae.measured.width??0,height:ae.measured.height??0,x:ae.position.x??0,y:ae.position.y??0},$e={...pe,pointerX:nn,pointerY:yn,aspectRatio:pe.width/pe.height},ln=void 0,ae.parentId&&(ae.extent==="parent"||ae.expandParent)&&(ln=bn.get(ae.parentId),un=ln&&ae.extent==="parent"?JGn(ln):void 0),Ue=[],An=void 0;for(const[Pn,ye]of bn)if(ye.parentId===E&&(Ue.push({id:Pn,position:{...ye.position},extent:ye.extent}),ye.extent==="parent"||ye.expandParent)){const Re=HGn(ye,ae,ye.origin??Ae);An?An=[[Math.min(Re[0][0],An[0][0]),Math.min(Re[0][1],An[0][1])],[Math.max(Re[1][0],An[1][0]),Math.max(Re[1][1],An[1][1])]]:An=Re}le?.(dn,{...pe})}).on("drag",dn=>{const{transform:bn,snapGrid:Y,snapToGrid:Je,nodeOrigin:pn}=x(),Ae=JG(dn.sourceEvent,{transform:bn,snapGrid:Y,snapToGrid:Je,containerBounds:Ne}),ve=[];if(!ae)return;const{x:nn,y:yn,width:Pn,height:ye}=pe,Re={},tt=ae.origin??pn,{width:ut,height:Jt,x:di,y:Gt}=zGn($e,k.controlDirection,Ae,k.boundaries,k.keepAspectRatio,tt,un,An),xt=ut!==Pn,si=Jt!==ye,Kr=di!==nn&&xt,Er=Gt!==yn&&si;if(!Kr&&!Er&&!xt&&!si)return;if((Kr||Er||tt[0]===1||tt[1]===1)&&(Re.x=Kr?di:pe.x,Re.y=Er?Gt:pe.y,pe.x=Re.x,pe.y=Re.y,Ue.length>0)){const cu=di-nn,Fu=Gt-yn;for(const Rs of Ue)Rs.position={x:Rs.position.x-cu+tt[0]*(ut-Pn),y:Rs.position.y-Fu+tt[1]*(Jt-ye)},ve.push(Rs)}if((xt||si)&&(Re.width=xt&&(!k.resizeDirection||k.resizeDirection==="horizontal")?ut:pe.width,Re.height=si&&(!k.resizeDirection||k.resizeDirection==="vertical")?Jt:pe.height,pe.width=Re.width,pe.height=Re.height),ln&&ae.expandParent){const cu=tt[0]*(Re.width??0);Re.x&&Re.x{xn&&(ee?.(dn,{...pe}),N?.({...pe}),xn=!1)});$.call(nt)}function U(){$.on(".drag",null)}return{update:H,destroy:U}}var F7e={exports:{}},J7e={},H7e={exports:{}},G7e={};var S1n;function qGn(){if(S1n)return G7e;S1n=1;var g=ZG();function E(W,Z){return W===Z&&(W!==0||1/W===1/Z)||W!==W&&Z!==Z}var x=typeof Object.is=="function"?Object.is:E,M=g.useState,N=g.useEffect,$=g.useLayoutEffect,k=g.useDebugValue;function H(W,Z){var le=Z(),oe=M({inst:{value:le,getSnapshot:Z}}),ee=oe[0].inst,Ce=oe[1];return $(function(){ee.value=le,ee.getSnapshot=Z,U(ee)&&Ce({inst:ee})},[W,le,Z]),N(function(){return U(ee)&&Ce({inst:ee}),W(function(){U(ee)&&Ce({inst:ee})})},[W]),k(le),le}function U(W){var Z=W.getSnapshot;W=W.value;try{var le=Z();return!x(W,le)}catch{return!0}}function G(W,Z){return Z()}var ie=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?G:H;return G7e.useSyncExternalStore=g.useSyncExternalStore!==void 0?g.useSyncExternalStore:ie,G7e}var x1n;function UGn(){return x1n||(x1n=1,H7e.exports=qGn()),H7e.exports}var A1n;function XGn(){if(A1n)return J7e;A1n=1;var g=ZG(),E=UGn();function x(G,ie){return G===ie&&(G!==0||1/G===1/ie)||G!==G&&ie!==ie}var M=typeof Object.is=="function"?Object.is:x,N=E.useSyncExternalStore,$=g.useRef,k=g.useEffect,H=g.useMemo,U=g.useDebugValue;return J7e.useSyncExternalStoreWithSelector=function(G,ie,W,Z,le){var oe=$(null);if(oe.current===null){var ee={hasValue:!1,value:null};oe.current=ee}else ee=oe.current;oe=H(function(){function pe(ln){if(!$e){if($e=!0,ae=ln,ln=Z(ln),le!==void 0&&ee.hasValue){var un=ee.value;if(le(un,ln))return Ne=un}return Ne=ln}if(un=Ne,M(ae,ln))return un;var An=Z(ln);return le!==void 0&&le(un,An)?(ae=ln,un):(ae=ln,Ne=An)}var $e=!1,ae,Ne,Ue=W===void 0?null:W;return[function(){return pe(ie())},Ue===null?void 0:function(){return pe(Ue())}]},[ie,W,Z,le]);var Ce=N(G,oe[0],oe[1]);return k(function(){ee.hasValue=!0,ee.value=Ce},[Ce]),U(Ce),Ce},J7e}var M1n;function KGn(){return M1n||(M1n=1,F7e.exports=XGn()),F7e.exports}var VGn=KGn();const YGn=bke(VGn),QGn={},C1n=g=>{let E;const x=new Set,M=(ie,W)=>{const Z=typeof ie=="function"?ie(E):ie;if(!Object.is(Z,E)){const le=E;E=W??(typeof Z!="object"||Z===null)?Z:Object.assign({},E,Z),x.forEach(oe=>oe(E,le))}},N=()=>E,U={setState:M,getState:N,getInitialState:()=>G,subscribe:ie=>(x.add(ie),()=>x.delete(ie)),destroy:()=>{(QGn?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),x.clear()}},G=E=g(M,N,U);return U},WGn=g=>g?C1n(g):C1n,{useDebugValue:ZGn}=uzn,{useSyncExternalStoreWithSelector:eqn}=YGn,nqn=g=>g;function b0n(g,E=nqn,x){const M=eqn(g.subscribe,g.getState,g.getServerState||g.getInitialState,E,x);return ZGn(M),M}const T1n=(g,E)=>{const x=WGn(g),M=(N,$=E)=>b0n(x,N,$);return Object.assign(M,x),M},tqn=(g,E)=>g?T1n(g,E):T1n;function jl(g,E){if(Object.is(g,E))return!0;if(typeof g!="object"||g===null||typeof E!="object"||E===null)return!1;if(g instanceof Map&&E instanceof Map){if(g.size!==E.size)return!1;for(const[M,N]of g)if(!Object.is(N,E.get(M)))return!1;return!0}if(g instanceof Set&&E instanceof Set){if(g.size!==E.size)return!1;for(const M of g)if(!E.has(M))return!1;return!0}const x=Object.keys(g);if(x.length!==Object.keys(E).length)return!1;for(const M of x)if(!Object.prototype.hasOwnProperty.call(E,M)||!Object.is(g[M],E[M]))return!1;return!0}var iqn=sdn();const Rue=Be.createContext(null),rqn=Rue.Provider,g0n=a5.error001();function zu(g,E){const x=Be.useContext(Rue);if(x===null)throw new Error(g0n);return b0n(x,g,E)}function El(){const g=Be.useContext(Rue);if(g===null)throw new Error(g0n);return Be.useMemo(()=>({getState:g.getState,setState:g.setState,subscribe:g.subscribe}),[g])}const O1n={display:"none"},cqn={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},w0n="react-flow__node-desc",p0n="react-flow__edge-desc",uqn="react-flow__aria-live",oqn=g=>g.ariaLiveMessage,sqn=g=>g.ariaLabelConfig;function lqn({rfId:g}){const E=zu(oqn);return L.jsx("div",{id:`${uqn}-${g}`,"aria-live":"assertive","aria-atomic":"true",style:cqn,children:E})}function fqn({rfId:g,disableKeyboardA11y:E}){const x=zu(sqn);return L.jsxs(L.Fragment,{children:[L.jsx("div",{id:`${w0n}-${g}`,style:O1n,children:E?x["node.a11yDescription.default"]:x["node.a11yDescription.keyboardDisabled"]}),L.jsx("div",{id:`${p0n}-${g}`,style:O1n,children:x["edge.a11yDescription.default"]}),!E&&L.jsx(lqn,{rfId:g})]})}const Bue=Be.forwardRef(({position:g="top-left",children:E,className:x,style:M,...N},$)=>{const k=`${g}`.split("-");return L.jsx("div",{className:Ta(["react-flow__panel",x,...k]),style:M,ref:$,...N,children:E})});Bue.displayName="Panel";function aqn({proOptions:g,position:E="bottom-right"}){return g?.hideAttribution?null:L.jsx(Bue,{position:E,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:L.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const hqn=g=>{const E=[],x=[];for(const[,M]of g.nodeLookup)M.selected&&E.push(M.internals.userNode);for(const[,M]of g.edgeLookup)M.selected&&x.push(M);return{selectedNodes:E,selectedEdges:x}},rue=g=>g.id;function dqn(g,E){return jl(g.selectedNodes.map(rue),E.selectedNodes.map(rue))&&jl(g.selectedEdges.map(rue),E.selectedEdges.map(rue))}function bqn({onSelectionChange:g}){const E=El(),{selectedNodes:x,selectedEdges:M}=zu(hqn,dqn);return Be.useEffect(()=>{const N={nodes:x,edges:M};g?.(N),E.getState().onSelectionChangeHandlers.forEach($=>$(N))},[x,M,g]),null}const gqn=g=>!!g.onSelectionChangeHandlers;function wqn({onSelectionChange:g}){const E=zu(gqn);return g||E?L.jsx(bqn,{onSelectionChange:g}):null}const ake=typeof window<"u"?Be.useLayoutEffect:Be.useEffect,m0n=[0,0],pqn={x:0,y:0,zoom:1},mqn=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],N1n=[...mqn,"rfId"],vqn=g=>({setNodes:g.setNodes,setEdges:g.setEdges,setMinZoom:g.setMinZoom,setMaxZoom:g.setMaxZoom,setTranslateExtent:g.setTranslateExtent,setNodeExtent:g.setNodeExtent,reset:g.reset,setDefaultNodesAndEdges:g.setDefaultNodesAndEdges}),I1n={translateExtent:XG,nodeOrigin:m0n,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function yqn(g){const{setNodes:E,setEdges:x,setMinZoom:M,setMaxZoom:N,setTranslateExtent:$,setNodeExtent:k,reset:H,setDefaultNodesAndEdges:U}=zu(vqn,jl),G=El();ake(()=>(U(g.defaultNodes,g.defaultEdges),()=>{ie.current=I1n,H()}),[]);const ie=Be.useRef(I1n);return ake(()=>{for(const W of N1n){const Z=g[W],le=ie.current[W];Z!==le&&(typeof g[W]>"u"||(W==="nodes"?E(Z):W==="edges"?x(Z):W==="minZoom"?M(Z):W==="maxZoom"?N(Z):W==="translateExtent"?$(Z):W==="nodeExtent"?k(Z):W==="ariaLabelConfig"?G.setState({ariaLabelConfig:tGn(Z)}):W==="fitView"?G.setState({fitViewQueued:Z}):W==="fitViewOptions"?G.setState({fitViewOptions:Z}):G.setState({[W]:Z})))}ie.current=g},N1n.map(W=>g[W])),null}function D1n(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function kqn(g){const[E,x]=Be.useState(g==="system"?null:g);return Be.useEffect(()=>{if(g!=="system"){x(g);return}const M=D1n(),N=()=>x(M?.matches?"dark":"light");return N(),M?.addEventListener("change",N),()=>{M?.removeEventListener("change",N)}},[g]),E!==null?E:D1n()?.matches?"dark":"light"}const _1n=typeof document<"u"?document:null;function WG(g=null,E={target:_1n,actInsideInputWithModifier:!0}){const[x,M]=Be.useState(!1),N=Be.useRef(!1),$=Be.useRef(new Set([])),[k,H]=Be.useMemo(()=>{if(g!==null){const G=(Array.isArray(g)?g:[g]).filter(W=>typeof W=="string").map(W=>W.replace("+",` +`+j.stack}}var ef=Object.prototype.hasOwnProperty,Oa=g.unstable_scheduleCallback,Cc=g.unstable_cancelCallback,o0=g.unstable_shouldYield,xb=g.unstable_requestPaint,Sl=g.unstable_now,cd=g.unstable_getCurrentPriorityLevel,s0=g.unstable_ImmediatePriority,uh=g.unstable_UserBlockingPriority,ud=g.unstable_NormalPriority,b5=g.unstable_LowPriority,l0=g.unstable_IdlePriority,Cp=g.log,l6=g.unstable_setDisableYieldValue,Ab=null,ra=null;function od(a){if(typeof Cp=="function"&&l6(a),ra&&typeof ra.setStrictMode=="function")try{ra.setStrictMode(Ab,a)}catch{}}var Sf=Math.clz32?Math.clz32:Tp,f6=Math.log,oh=Math.LN2;function Tp(a){return a>>>=0,a===0?32:31-(f6(a)/oh|0)|0}var Gg=256,qg=262144,Ug=4194304;function sd(a){var d=a&42;if(d!==0)return d;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function Xg(a,d,w){var j=a.pendingLanes;if(j===0)return 0;var T=0,I=a.suspendedLanes,Q=a.pingedLanes;a=a.warmLanes;var de=j&134217727;return de!==0?(j=de&~I,j!==0?T=sd(j):(Q&=de,Q!==0?T=sd(Q):w||(w=de&~a,w!==0&&(T=sd(w))))):(de=j&~I,de!==0?T=sd(de):Q!==0?T=sd(Q):w||(w=j&~a,w!==0&&(T=sd(w)))),T===0?0:d!==0&&d!==T&&(d&I)===0&&(I=T&-T,w=d&-d,I>=w||I===32&&(w&4194048)!==0)?d:T}function Mb(a,d){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&d)===0}function g5(a,d){switch(a){case 1:case 2:case 4:case 8:case 64:return d+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Op(){var a=Ug;return Ug<<=1,(Ug&62914560)===0&&(Ug=4194304),a}function Np(a){for(var d=[],w=0;31>w;w++)d.push(a);return d}function uu(a,d){a.pendingLanes|=d,d!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function w5(a,d,w,j,T,I){var Q=a.pendingLanes;a.pendingLanes=w,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=w,a.entangledLanes&=w,a.errorRecoveryDisabledLanes&=w,a.shellSuspendCounter=0;var de=a.entanglements,tn=a.expirationTimes,Pn=a.hiddenUpdates;for(w=Q&~w;0"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var IA=/[\n"\\]/g;function Lh(a){return a.replace(IA,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function sv(a,d,w,j,T,I,Q,de){a.name="",Q!=null&&typeof Q!="function"&&typeof Q!="symbol"&&typeof Q!="boolean"?a.type=Q:a.removeAttribute("type"),d!=null?Q==="number"?(d===0&&a.value===""||a.value!=d)&&(a.value=""+_h(d)):a.value!==""+_h(d)&&(a.value=""+_h(d)):Q!=="submit"&&Q!=="reset"||a.removeAttribute("value"),d!=null?d6(a,Q,_h(d)):w!=null?d6(a,Q,_h(w)):j!=null&&a.removeAttribute("value"),T==null&&I!=null&&(a.defaultChecked=!!I),T!=null&&(a.checked=T&&typeof T!="function"&&typeof T!="symbol"),de!=null&&typeof de!="function"&&typeof de!="symbol"&&typeof de!="boolean"?a.name=""+_h(de):a.removeAttribute("name")}function sk(a,d,w,j,T,I,Q,de){if(I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(a.type=I),d!=null||w!=null){if(!(I!=="submit"&&I!=="reset"||d!=null)){j5(a);return}w=w!=null?""+_h(w):"",d=d!=null?""+_h(d):w,de||d===a.value||(a.value=d),a.defaultValue=d}j=j??T,j=typeof j!="function"&&typeof j!="symbol"&&!!j,a.checked=de?a.checked:!!j,a.defaultChecked=!!j,Q!=null&&typeof Q!="function"&&typeof Q!="symbol"&&typeof Q!="boolean"&&(a.name=Q),j5(a)}function d6(a,d,w){d==="number"&&ov(a.ownerDocument)===a||a.defaultValue===""+w||(a.defaultValue=""+w)}function Wg(a,d,w,j){if(a=a.options,d){d={};for(var T=0;T"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$A=!1;if(ew)try{var g6={};Object.defineProperty(g6,"passive",{get:function(){$A=!0}}),window.addEventListener("test",g6,g6),window.removeEventListener("test",g6,g6)}catch{$A=!1}var $p=null,RA=null,fk=null;function MD(){if(fk)return fk;var a,d=RA,w=d.length,j,T="value"in $p?$p.value:$p.textContent,I=T.length;for(a=0;a=m6),DD=" ",_D=!1;function LD(a,d){switch(a){case"keyup":return _q.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function PD(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var A5=!1;function Pq(a,d){switch(a){case"compositionend":return PD(d);case"keypress":return d.which!==32?null:(_D=!0,DD);case"textInput":return a=d.data,a===DD&&_D?null:a;default:return null}}function $q(a,d){if(A5)return a==="compositionend"||!HA&&LD(a,d)?(a=MD(),fk=RA=$p=null,A5=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1=d)return{node:w,offset:d-a};a=j}e:{for(;w;){if(w.nextSibling){w=w.nextSibling;break e}w=w.parentNode}w=void 0}w=HD(w)}}function qD(a,d){return a&&d?a===d?!0:a&&a.nodeType===3?!1:d&&d.nodeType===3?qD(a,d.parentNode):"contains"in a?a.contains(d):a.compareDocumentPosition?!!(a.compareDocumentPosition(d)&16):!1:!1}function UD(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var d=ov(a.document);d instanceof a.HTMLIFrameElement;){try{var w=typeof d.contentWindow.location.href=="string"}catch{w=!1}if(w)a=d.contentWindow;else break;d=ov(a.document)}return d}function XA(a){var d=a&&a.nodeName&&a.nodeName.toLowerCase();return d&&(d==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||d==="textarea"||a.contentEditable==="true")}var qq=ew&&"documentMode"in document&&11>=document.documentMode,M5=null,KA=null,j6=null,VA=!1;function XD(a,d,w){var j=w.window===w?w.document:w.nodeType===9?w:w.ownerDocument;VA||M5==null||M5!==ov(j)||(j=M5,"selectionStart"in j&&XA(j)?j={start:j.selectionStart,end:j.selectionEnd}:(j=(j.ownerDocument&&j.ownerDocument.defaultView||window).getSelection(),j={anchorNode:j.anchorNode,anchorOffset:j.anchorOffset,focusNode:j.focusNode,focusOffset:j.focusOffset}),j6&&k6(j6,j)||(j6=j,j=tj(KA,"onSelect"),0>=Q,T-=Q,Cb=1<<32-Sf(d)+T|w<Hr?(ic=Xi,Xi=null):ic=Xi.sibling;var qc=Gn(Sn,Xi,_n[Hr],ot);if(qc===null){Xi===null&&(Xi=ic);break}a&&Xi&&qc.alternate===null&&d(Sn,Xi),sn=I(qc,sn,Hr),_u===null?Hi=qc:_u.sibling=qc,_u=qc,Xi=ic}if(Hr===_n.length)return w(Sn,Xi),ou&&tw(Sn,Hr),Hi;if(Xi===null){for(;Hr<_n.length;Hr++)Xi=gt(Sn,_n[Hr],ot),Xi!==null&&(sn=I(Xi,sn,Hr),_u===null?Hi=Xi:_u.sibling=Xi,_u=Xi);return ou&&tw(Sn,Hr),Hi}for(Xi=j(Xi);Hr<_n.length;Hr++)ic=et(Xi,Sn,Hr,_n[Hr],ot),ic!==null&&(a&&ic.alternate!==null&&Xi.delete(ic.key===null?Hr:ic.key),sn=I(ic,sn,Hr),_u===null?Hi=ic:_u.sibling=ic,_u=ic);return a&&Xi.forEach(function(At){return d(Sn,At)}),ou&&tw(Sn,Hr),Hi}function Cr(Sn,sn,_n,ot){if(_n==null)throw Error(M(151));for(var Hi=null,_u=null,Xi=sn,Hr=sn=0,ic=null,qc=_n.next();Xi!==null&&!qc.done;Hr++,qc=_n.next()){Xi.index>Hr?(ic=Xi,Xi=null):ic=Xi.sibling;var At=Gn(Sn,Xi,qc.value,ot);if(At===null){Xi===null&&(Xi=ic);break}a&&Xi&&At.alternate===null&&d(Sn,Xi),sn=I(At,sn,Hr),_u===null?Hi=At:_u.sibling=At,_u=At,Xi=ic}if(qc.done)return w(Sn,Xi),ou&&tw(Sn,Hr),Hi;if(Xi===null){for(;!qc.done;Hr++,qc=_n.next())qc=gt(Sn,qc.value,ot),qc!==null&&(sn=I(qc,sn,Hr),_u===null?Hi=qc:_u.sibling=qc,_u=qc);return ou&&tw(Sn,Hr),Hi}for(Xi=j(Xi);!qc.done;Hr++,qc=_n.next())qc=et(Xi,Sn,Hr,qc.value,ot),qc!==null&&(a&&qc.alternate!==null&&Xi.delete(qc.key===null?Hr:qc.key),sn=I(qc,sn,Hr),_u===null?Hi=qc:_u.sibling=qc,_u=qc);return a&&Xi.forEach(function(fX){return d(Sn,fX)}),ou&&tw(Sn,Hr),Hi}function co(Sn,sn,_n,ot){if(typeof _n=="object"&&_n!==null&&_n.type===ee&&_n.key===null&&(_n=_n.props.children),typeof _n=="object"&&_n!==null){switch(_n.$$typeof){case se:e:{for(var Hi=_n.key;sn!==null;){if(sn.key===Hi){if(Hi=_n.type,Hi===ee){if(sn.tag===7){w(Sn,sn.sibling),ot=T(sn,_n.props.children),ot.return=Sn,Sn=ot;break e}}else if(sn.elementType===Hi||typeof Hi=="object"&&Hi!==null&&Hi.$$typeof===An&&wv(Hi)===sn.type){w(Sn,sn.sibling),ot=T(sn,_n.props),O6(ot,_n),ot.return=Sn,Sn=ot;break e}w(Sn,sn);break}else d(Sn,sn);sn=sn.sibling}_n.type===ee?(ot=dv(_n.props.children,Sn.mode,ot,_n.key),ot.return=Sn,Sn=ot):(ot=yk(_n.type,_n.key,_n.props,null,Sn.mode,ot),O6(ot,_n),ot.return=Sn,Sn=ot)}return Q(Sn);case oe:e:{for(Hi=_n.key;sn!==null;){if(sn.key===Hi)if(sn.tag===4&&sn.stateNode.containerInfo===_n.containerInfo&&sn.stateNode.implementation===_n.implementation){w(Sn,sn.sibling),ot=T(sn,_n.children||[]),ot.return=Sn,Sn=ot;break e}else{w(Sn,sn);break}else d(Sn,sn);sn=sn.sibling}ot=tM(_n,Sn.mode,ot),ot.return=Sn,Sn=ot}return Q(Sn);case An:return _n=wv(_n),co(Sn,sn,_n,ot)}if(pn(_n))return Di(Sn,sn,_n,ot);if(wn(_n)){if(Hi=wn(_n),typeof Hi!="function")throw Error(M(150));return _n=Hi.call(_n),Cr(Sn,sn,_n,ot)}if(typeof _n.then=="function")return co(Sn,sn,xk(_n),ot);if(_n.$$typeof===ae)return co(Sn,sn,x6(Sn,_n),ot);Ak(Sn,_n)}return typeof _n=="string"&&_n!==""||typeof _n=="number"||typeof _n=="bigint"?(_n=""+_n,sn!==null&&sn.tag===6?(w(Sn,sn.sibling),ot=T(sn,_n),ot.return=Sn,Sn=ot):(w(Sn,sn),ot=nM(_n,Sn.mode,ot),ot.return=Sn,Sn=ot),Q(Sn)):w(Sn,sn)}return function(Sn,sn,_n,ot){try{T6=0;var Hi=co(Sn,sn,_n,ot);return B5=null,Hi}catch(Xi){if(Xi===R5||Xi===Ek)throw Xi;var _u=w1(29,Xi,null,Sn.mode);return _u.lanes=ot,_u.return=Sn,_u}}}var mv=b_(!0),g_=b_(!1),qp=!1;function gM(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wM(a,d){a=a.updateQueue,d.updateQueue===a&&(d.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Up(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Xp(a,d,w){var j=a.updateQueue;if(j===null)return null;if(j=j.shared,(Ju&2)!==0){var T=j.pending;return T===null?d.next=d:(d.next=T.next,T.next=d),j.pending=d,d=vk(a),e_(a,null,w),d}return mk(a,j,d,w),vk(a)}function N6(a,d,w){if(d=d.updateQueue,d!==null&&(d=d.shared,(w&4194048)!==0)){var j=d.lanes;j&=a.pendingLanes,w|=j,d.lanes=w,rv(a,w)}}function pM(a,d){var w=a.updateQueue,j=a.alternate;if(j!==null&&(j=j.updateQueue,w===j)){var T=null,I=null;if(w=w.firstBaseUpdate,w!==null){do{var Q={lane:w.lane,tag:w.tag,payload:w.payload,callback:null,next:null};I===null?T=I=Q:I=I.next=Q,w=w.next}while(w!==null);I===null?T=I=d:I=I.next=d}else T=I=d;w={baseState:j.baseState,firstBaseUpdate:T,lastBaseUpdate:I,shared:j.shared,callbacks:j.callbacks},a.updateQueue=w;return}a=w.lastBaseUpdate,a===null?w.firstBaseUpdate=d:a.next=d,w.lastBaseUpdate=d}var mM=!1;function I6(){if(mM){var a=$5;if(a!==null)throw a}}function D6(a,d,w,j){mM=!1;var T=a.updateQueue;qp=!1;var I=T.firstBaseUpdate,Q=T.lastBaseUpdate,de=T.shared.pending;if(de!==null){T.shared.pending=null;var tn=de,Pn=tn.next;tn.next=null,Q===null?I=Pn:Q.next=Pn,Q=tn;var it=a.alternate;it!==null&&(it=it.updateQueue,de=it.lastBaseUpdate,de!==Q&&(de===null?it.firstBaseUpdate=Pn:de.next=Pn,it.lastBaseUpdate=tn))}if(I!==null){var gt=T.baseState;Q=0,it=Pn=tn=null,de=I;do{var Gn=de.lane&-536870913,et=Gn!==de.lane;if(et?(nu&Gn)===Gn:(j&Gn)===Gn){Gn!==0&&Gn===P5&&(mM=!0),it!==null&&(it=it.next={lane:0,tag:de.tag,payload:de.payload,callback:null,next:null});e:{var Di=a,Cr=de;Gn=d;var co=w;switch(Cr.tag){case 1:if(Di=Cr.payload,typeof Di=="function"){gt=Di.call(co,gt,Gn);break e}gt=Di;break e;case 3:Di.flags=Di.flags&-65537|128;case 0:if(Di=Cr.payload,Gn=typeof Di=="function"?Di.call(co,gt,Gn):Di,Gn==null)break e;gt=W({},gt,Gn);break e;case 2:qp=!0}}Gn=de.callback,Gn!==null&&(a.flags|=64,et&&(a.flags|=8192),et=T.callbacks,et===null?T.callbacks=[Gn]:et.push(Gn))}else et={lane:Gn,tag:de.tag,payload:de.payload,callback:de.callback,next:null},it===null?(Pn=it=et,tn=gt):it=it.next=et,Q|=Gn;if(de=de.next,de===null){if(de=T.shared.pending,de===null)break;et=de,de=et.next,et.next=null,T.lastBaseUpdate=et,T.shared.pending=null}}while(!0);it===null&&(tn=gt),T.baseState=tn,T.firstBaseUpdate=Pn,T.lastBaseUpdate=it,I===null&&(T.shared.lanes=0),Wp|=Q,a.lanes=Q,a.memoizedState=gt}}function w_(a,d){if(typeof a!="function")throw Error(M(191,a));a.call(d)}function p_(a,d){var w=a.callbacks;if(w!==null)for(a.callbacks=null,a=0;aI?I:8;var Q=xe.T,de={};xe.T=de,$M(a,!1,d,w);try{var tn=T(),Pn=xe.S;if(Pn!==null&&Pn(de,tn),tn!==null&&typeof tn=="object"&&typeof tn.then=="function"){var it=Zq(tn,j);$6(a,d,it,k1(a))}else $6(a,d,j,k1(a))}catch(gt){$6(a,d,{then:function(){},status:"rejected",reason:gt},k1())}finally{qe.p=I,Q!==null&&de.types!==null&&(Q.types=de.types),xe.T=Q}}function LM(){}function P6(a,d,w,j){if(a.tag!==5)throw Error(M(476));var T=K_(a).queue;X_(a,T,d,fn,w===null?LM:function(){return Pk(a),w(j)})}function K_(a){var d=a.memoizedState;if(d!==null)return d;d={memoizedState:fn,baseState:fn,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:uw,lastRenderedState:fn},next:null};var w={};return d.next={memoizedState:w,baseState:w,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:uw,lastRenderedState:w},next:null},a.memoizedState=d,a=a.alternate,a!==null&&(a.memoizedState=d),d}function Pk(a){var d=K_(a);d.next===null&&(d=a.alternate.memoizedState),$6(a,d.next.queue,{},k1())}function PM(){return ua(n4)}function V_(){return el().memoizedState}function Y_(){return el().memoizedState}function uU(a){for(var d=a.return;d!==null;){switch(d.tag){case 24:case 3:var w=k1();a=Up(w);var j=Xp(d,a,w);j!==null&&(zh(j,d,w),N6(j,d,w)),d={cache:fM()},a.payload=d;return}d=d.return}}function oU(a,d,w){var j=k1();w={lane:j,revertLane:0,gesture:null,action:w,hasEagerState:!1,eagerState:null,next:null},$k(a)?W_(d,w):(w=ZA(a,d,w,j),w!==null&&(zh(w,a,j),RM(w,d,j)))}function Q_(a,d,w){var j=k1();$6(a,d,w,j)}function $6(a,d,w,j){var T={lane:j,revertLane:0,gesture:null,action:w,hasEagerState:!1,eagerState:null,next:null};if($k(a))W_(d,T);else{var I=a.alternate;if(a.lanes===0&&(I===null||I.lanes===0)&&(I=d.lastRenderedReducer,I!==null))try{var Q=d.lastRenderedState,de=I(Q,w);if(T.hasEagerState=!0,T.eagerState=de,g1(de,Q))return mk(a,d,T,0),Do===null&&pk(),!1}catch{}if(w=ZA(a,d,T,j),w!==null)return zh(w,a,j),RM(w,d,j),!0}return!1}function $M(a,d,w,j){if(j={lane:2,revertLane:vC(),gesture:null,action:j,hasEagerState:!1,eagerState:null,next:null},$k(a)){if(d)throw Error(M(479))}else d=ZA(a,w,j,2),d!==null&&zh(d,a,2)}function $k(a){var d=a.alternate;return a===bc||d!==null&&d===bc}function W_(a,d){F5=Tk=!0;var w=a.pending;w===null?d.next=d:(d.next=w.next,w.next=d),a.pending=d}function RM(a,d,w){if((w&4194048)!==0){var j=d.lanes;j&=a.pendingLanes,w|=j,d.lanes=w,rv(a,w)}}var R6={readContext:ua,use:Ik,useCallback:Bs,useContext:Bs,useEffect:Bs,useImperativeHandle:Bs,useLayoutEffect:Bs,useInsertionEffect:Bs,useMemo:Bs,useReducer:Bs,useRef:Bs,useState:Bs,useDebugValue:Bs,useDeferredValue:Bs,useTransition:Bs,useSyncExternalStore:Bs,useId:Bs,useHostTransitionStatus:Bs,useFormState:Bs,useActionState:Bs,useOptimistic:Bs,useMemoCache:Bs,useCacheRefresh:Bs};R6.useEffectEvent=Bs;var sU={readContext:ua,use:Ik,useCallback:function(a,d){return sh().memoizedState=[a,d===void 0?null:d],a},useContext:ua,useEffect:R_,useImperativeHandle:function(a,d,w){w=w!=null?w.concat([a]):null,_k(4194308,4,J_.bind(null,d,a),w)},useLayoutEffect:function(a,d){return _k(4194308,4,a,d)},useInsertionEffect:function(a,d){_k(4,2,a,d)},useMemo:function(a,d){var w=sh();d=d===void 0?null:d;var j=a();if(vv){od(!0);try{a()}finally{od(!1)}}return w.memoizedState=[j,d],j},useReducer:function(a,d,w){var j=sh();if(w!==void 0){var T=w(d);if(vv){od(!0);try{w(d)}finally{od(!1)}}}else T=d;return j.memoizedState=j.baseState=T,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:T},j.queue=a,a=a.dispatch=oU.bind(null,bc,a),[j.memoizedState,a]},useRef:function(a){var d=sh();return a={current:a},d.memoizedState=a},useState:function(a){a=OM(a);var d=a.queue,w=Q_.bind(null,bc,d);return d.dispatch=w,[a.memoizedState,w]},useDebugValue:DM,useDeferredValue:function(a,d){var w=sh();return _M(w,a,d)},useTransition:function(){var a=OM(!1);return a=X_.bind(null,bc,a.queue,!0,!1),sh().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,d,w){var j=bc,T=sh();if(ou){if(w===void 0)throw Error(M(407));w=w()}else{if(w=d(),Do===null)throw Error(M(349));(nu&127)!==0||E_(j,d,w)}T.memoizedState=w;var I={value:w,getSnapshot:d};return T.queue=I,R_(tU.bind(null,j,I,a),[a]),j.flags|=2048,H5(9,{destroy:void 0},S_.bind(null,j,I,w,d),null),w},useId:function(){var a=sh(),d=Do.identifierPrefix;if(ou){var w=Tb,j=Cb;w=(j&~(1<<32-Sf(j)-1)).toString(32)+w,d="_"+d+"R_"+w,w=Ok++,0<\/script>",I=I.removeChild(I.firstChild);break;case"select":I=typeof j.is=="string"?Q.createElement("select",{is:j.is}):Q.createElement("select"),j.multiple?I.multiple=!0:j.size&&(I.size=j.size);break;default:I=typeof j.is=="string"?Q.createElement(T,{is:j.is}):Q.createElement(T)}}I[Ws]=d,I[xf]=j;e:for(Q=d.child;Q!==null;){if(Q.tag===5||Q.tag===6)I.appendChild(Q.stateNode);else if(Q.tag!==4&&Q.tag!==27&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===d)break e;for(;Q.sibling===null;){if(Q.return===null||Q.return===d)break e;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}d.stateNode=I;e:switch(sa(I,T,j),T){case"button":case"input":case"select":case"textarea":j=!!j.autoFocus;break e;case"img":j=!0;break e;default:j=!1}j&&b0(d)}}return yo(d),WM(d,d.type,a===null?null:a.memoizedProps,d.pendingProps,w),null;case 6:if(a&&d.stateNode!=null)a.memoizedProps!==j&&b0(d);else{if(typeof j!="string"&&d.stateNode===null)throw Error(M(166));if(a=di.current,D5(d)){if(a=d.stateNode,w=d.memoizedProps,j=null,T=ca,T!==null)switch(T.tag){case 27:case 5:j=T.memoizedProps}a[Ws]=d,a=!!(a.nodeValue===w||j!==null&&j.suppressHydrationWarning===!0||sP(a.nodeValue,w)),a||zp(d,!0)}else a=ij(a).createTextNode(j),a[Ws]=d,d.stateNode=a}return yo(d),null;case 31:if(w=d.memoizedState,a===null||a.memoizedState!==null){if(j=D5(d),w!==null){if(a===null){if(!j)throw Error(M(318));if(a=d.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(M(557));a[Ws]=d}else bv(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;yo(d),a=!1}else w=_5(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=w),a=!0;if(!a)return d.flags&256?(m1(d),d):(m1(d),null);if((d.flags&128)!==0)throw Error(M(558))}return yo(d),null;case 13:if(j=d.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(T=D5(d),j!==null&&j.dehydrated!==null){if(a===null){if(!T)throw Error(M(318));if(T=d.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(M(317));T[Ws]=d}else bv(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;yo(d),T=!1}else T=_5(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=T),T=!0;if(!T)return d.flags&256?(m1(d),d):(m1(d),null)}return m1(d),(d.flags&128)!==0?(d.lanes=w,d):(w=j!==null,a=a!==null&&a.memoizedState!==null,w&&(j=d.child,T=null,j.alternate!==null&&j.alternate.memoizedState!==null&&j.alternate.memoizedState.cachePool!==null&&(T=j.alternate.memoizedState.cachePool.pool),I=null,j.memoizedState!==null&&j.memoizedState.cachePool!==null&&(I=j.memoizedState.cachePool.pool),I!==T&&(j.flags|=2048)),w!==a&&w&&(d.child.flags|=8192),Fk(d,d.updateQueue),yo(d),null);case 4:return si(),a===null&&EC(d.stateNode.containerInfo),yo(d),null;case 10:return rw(d.type),yo(d),null;case 19:if(Re(Zs),j=d.memoizedState,j===null)return yo(d),null;if(T=(d.flags&128)!==0,I=j.rendering,I===null)if(T)kv(j,!1);else{if(zs!==0||a!==null&&(a.flags&128)!==0)for(a=d.child;a!==null;){if(I=Ck(a),I!==null){for(d.flags|=128,kv(j,!1),a=I.updateQueue,d.updateQueue=a,Fk(d,a),d.subtreeFlags=0,a=w,w=d.child;w!==null;)n_(w,a),w=w.sibling;return Hn(Zs,Zs.current&1|2),ou&&tw(d,j.treeForkCount),d.child}a=a.sibling}j.tail!==null&&Sl()>Xk&&(d.flags|=128,T=!0,kv(j,!1),d.lanes=4194304)}else{if(!T)if(a=Ck(I),a!==null){if(d.flags|=128,T=!0,a=a.updateQueue,d.updateQueue=a,Fk(d,a),kv(j,!0),j.tail===null&&j.tailMode==="hidden"&&!I.alternate&&!ou)return yo(d),null}else 2*Sl()-j.renderingStartTime>Xk&&w!==536870912&&(d.flags|=128,T=!0,kv(j,!1),d.lanes=4194304);j.isBackwards?(I.sibling=d.child,d.child=I):(a=j.last,a!==null?a.sibling=I:d.child=I,j.last=I)}return j.tail!==null?(a=j.tail,j.rendering=a,j.tail=a.sibling,j.renderingStartTime=Sl(),a.sibling=null,w=Zs.current,Hn(Zs,T?w&1|2:w&1),ou&&tw(d,j.treeForkCount),a):(yo(d),null);case 22:case 23:return m1(d),yM(),j=d.memoizedState!==null,a!==null?a.memoizedState!==null!==j&&(d.flags|=8192):j&&(d.flags|=8192),j?(w&536870912)!==0&&(d.flags&128)===0&&(yo(d),d.subtreeFlags&6&&(d.flags|=8192)):yo(d),w=d.updateQueue,w!==null&&Fk(d,w.retryQueue),w=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(w=a.memoizedState.cachePool.pool),j=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(j=d.memoizedState.cachePool.pool),j!==w&&(d.flags|=2048),a!==null&&Re(gv),null;case 24:return w=null,a!==null&&(w=a.memoizedState.cache),d.memoizedState.cache!==w&&(d.flags|=2048),rw(Al),yo(d),null;case 25:return null;case 30:return null}throw Error(M(156,d.tag))}function hU(a,d){switch(rM(d),d.tag){case 1:return a=d.flags,a&65536?(d.flags=a&-65537|128,d):null;case 3:return rw(Al),si(),a=d.flags,(a&65536)!==0&&(a&128)===0?(d.flags=a&-65537|128,d):null;case 26:case 27:case 5:return Er(d),null;case 31:if(d.memoizedState!==null){if(m1(d),d.alternate===null)throw Error(M(340));bv()}return a=d.flags,a&65536?(d.flags=a&-65537|128,d):null;case 13:if(m1(d),a=d.memoizedState,a!==null&&a.dehydrated!==null){if(d.alternate===null)throw Error(M(340));bv()}return a=d.flags,a&65536?(d.flags=a&-65537|128,d):null;case 19:return Re(Zs),null;case 4:return si(),null;case 10:return rw(d.type),null;case 22:case 23:return m1(d),yM(),a!==null&&Re(gv),a=d.flags,a&65536?(d.flags=a&-65537|128,d):null;case 24:return rw(Al),null;case 25:return null;default:return null}}function ZM(a,d){switch(rM(d),d.tag){case 3:rw(Al),si();break;case 26:case 27:case 5:Er(d);break;case 4:si();break;case 31:d.memoizedState!==null&&m1(d);break;case 13:m1(d);break;case 19:Re(Zs);break;case 10:rw(d.type);break;case 22:case 23:m1(d),yM(),a!==null&&Re(gv);break;case 24:rw(Al)}}function F6(a,d){try{var w=d.updateQueue,j=w!==null?w.lastEffect:null;if(j!==null){var T=j.next;w=T;do{if((w.tag&a)===a){j=void 0;var I=w.create,Q=w.inst;j=I(),Q.destroy=j}w=w.next}while(w!==T)}}catch(de){ro(d,d.return,de)}}function Yp(a,d,w){try{var j=d.updateQueue,T=j!==null?j.lastEffect:null;if(T!==null){var I=T.next;j=I;do{if((j.tag&a)===a){var Q=j.inst,de=Q.destroy;if(de!==void 0){Q.destroy=void 0,T=d;var tn=w,Pn=de;try{Pn()}catch(it){ro(T,tn,it)}}}j=j.next}while(j!==I)}}catch(it){ro(d,d.return,it)}}function J6(a){var d=a.updateQueue;if(d!==null){var w=a.stateNode;try{p_(d,w)}catch(j){ro(a,a.return,j)}}}function vL(a,d,w){w.props=yv(a.type,a.memoizedProps),w.state=a.memoizedState;try{w.componentWillUnmount()}catch(j){ro(a,d,j)}}function H6(a,d){try{var w=a.ref;if(w!==null){switch(a.tag){case 26:case 27:case 5:var j=a.stateNode;break;case 30:j=a.stateNode;break;default:j=a.stateNode}typeof w=="function"?a.refCleanup=w(j):w.current=j}}catch(T){ro(a,d,T)}}function Ob(a,d){var w=a.ref,j=a.refCleanup;if(w!==null)if(typeof j=="function")try{j()}catch(T){ro(a,d,T)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof w=="function")try{w(null)}catch(T){ro(a,d,T)}else w.current=null}function G6(a){var d=a.type,w=a.memoizedProps,j=a.stateNode;try{e:switch(d){case"button":case"input":case"select":case"textarea":w.autoFocus&&j.focus();break e;case"img":w.src?j.src=w.src:w.srcSet&&(j.srcset=w.srcSet)}}catch(T){ro(a,a.return,T)}}function eC(a,d,w){try{var j=a.stateNode;DU(j,a.type,w,d),j[xf]=d}catch(T){ro(a,a.return,T)}}function yL(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&i2(a.type)||a.tag===4}function nC(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||yL(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&i2(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function tC(a,d,w){var j=a.tag;if(j===5||j===6)a=a.stateNode,d?(w.nodeType===9?w.body:w.nodeName==="HTML"?w.ownerDocument.body:w).insertBefore(a,d):(d=w.nodeType===9?w.body:w.nodeName==="HTML"?w.ownerDocument.body:w,d.appendChild(a),w=w._reactRootContainer,w!=null||d.onclick!==null||(d.onclick=Zg));else if(j!==4&&(j===27&&i2(a.type)&&(w=a.stateNode,d=null),a=a.child,a!==null))for(tC(a,d,w),a=a.sibling;a!==null;)tC(a,d,w),a=a.sibling}function jv(a,d,w){var j=a.tag;if(j===5||j===6)a=a.stateNode,d?w.insertBefore(a,d):w.appendChild(a);else if(j!==4&&(j===27&&i2(a.type)&&(w=a.stateNode),a=a.child,a!==null))for(jv(a,d,w),a=a.sibling;a!==null;)jv(a,d,w),a=a.sibling}function kL(a){var d=a.stateNode,w=a.memoizedProps;try{for(var j=a.type,T=d.attributes;T.length;)d.removeAttributeNode(T[0]);sa(d,j,w),d[Ws]=a,d[xf]=w}catch(I){ro(a,a.return,I)}}var Nb=!1,Tl=!1,q6=!1,iC=typeof WeakSet=="function"?WeakSet:Set,Af=null;function dU(a,d){if(a=a.containerInfo,AC=Mf,a=UD(a),XA(a)){if("selectionStart"in a)var w={start:a.selectionStart,end:a.selectionEnd};else e:{w=(w=a.ownerDocument)&&w.defaultView||window;var j=w.getSelection&&w.getSelection();if(j&&j.rangeCount!==0){w=j.anchorNode;var T=j.anchorOffset,I=j.focusNode;j=j.focusOffset;try{w.nodeType,I.nodeType}catch{w=null;break e}var Q=0,de=-1,tn=-1,Pn=0,it=0,gt=a,Gn=null;n:for(;;){for(var et;gt!==w||T!==0&>.nodeType!==3||(de=Q+T),gt!==I||j!==0&>.nodeType!==3||(tn=Q+j),gt.nodeType===3&&(Q+=gt.nodeValue.length),(et=gt.firstChild)!==null;)Gn=gt,gt=et;for(;;){if(gt===a)break n;if(Gn===w&&++Pn===T&&(de=Q),Gn===I&&++it===j&&(tn=Q),(et=gt.nextSibling)!==null)break;gt=Gn,Gn=gt.parentNode}gt=et}w=de===-1||tn===-1?null:{start:de,end:tn}}else w=null}w=w||{start:0,end:0}}else w=null;for(MC={focusedElem:a,selectionRange:w},Mf=!1,Af=d;Af!==null;)if(d=Af,a=d.child,(d.subtreeFlags&1028)!==0&&a!==null)a.return=d,Af=a;else for(;Af!==null;){switch(d=Af,I=d.alternate,a=d.flags,d.tag){case 0:if((a&4)!==0&&(a=d.updateQueue,a=a!==null?a.events:null,a!==null))for(w=0;w title"))),sa(I,j,w),I[Ws]=a,xl(I),j=I;break e;case"link":var Q=kP("link","href",T).get(j+(w.href||""));if(Q){for(var de=0;deco&&(Q=co,co=Cr,Cr=Q);var Sn=GD(de,Cr),sn=GD(de,co);if(Sn&&sn&&(et.rangeCount!==1||et.anchorNode!==Sn.node||et.anchorOffset!==Sn.offset||et.focusNode!==sn.node||et.focusOffset!==sn.offset)){var _n=gt.createRange();_n.setStart(Sn.node,Sn.offset),et.removeAllRanges(),Cr>co?(et.addRange(_n),et.extend(sn.node,sn.offset)):(_n.setEnd(sn.node,sn.offset),et.addRange(_n))}}}}for(gt=[],et=de;et=et.parentNode;)et.nodeType===1&>.push({element:et,left:et.scrollLeft,top:et.scrollTop});for(typeof de.focus=="function"&&de.focus(),de=0;dew?32:w,xe.T=null,w=fC,fC=null;var I=e2,Q=hw;if(nf=0,K5=e2=null,hw=0,(Ju&6)!==0)throw Error(M(331));var de=Ju;if(Ju|=4,NL(I.current),CL(I,I.current,Q,w),Ju=de,Q6(0,!1),ra&&typeof ra.onPostCommitFiberRoot=="function")try{ra.onPostCommitFiberRoot(Ab,I)}catch{}return!0}finally{qe.p=T,xe.T=j,VL(a,d)}}function QL(a,d,w){d=fd(w,d),d=HM(a.stateNode,d,2),a=Xp(a,d,2),a!==null&&(uu(a,2),Ib(a))}function ro(a,d,w){if(a.tag===3)QL(a,a,w);else for(;d!==null;){if(d.tag===3){QL(d,a,w);break}else if(d.tag===1){var j=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof j.componentDidCatch=="function"&&(Zp===null||!Zp.has(j))){a=fd(w,a),w=rL(2),j=Xp(d,w,2),j!==null&&(cL(w,j,d,a),uu(j,2),Ib(j));break}}d=d.return}}function bC(a,d,w){var j=a.pingCache;if(j===null){j=a.pingCache=new wU;var T=new Set;j.set(d,T)}else T=j.get(d),T===void 0&&(T=new Set,j.set(d,T));T.has(w)||(uC=!0,T.add(w),a=kU.bind(null,a,d,w),d.then(a,a))}function kU(a,d,w){var j=a.pingCache;j!==null&&j.delete(d),a.pingedLanes|=a.suspendedLanes&w,a.warmLanes&=~w,Do===a&&(nu&w)===w&&(zs===4||zs===3&&(nu&62914560)===nu&&300>Sl()-Uk?(Ju&2)===0&&V5(a,0):oC|=w,X5===nu&&(X5=0)),Ib(a)}function WL(a,d){d===0&&(d=Op()),a=hv(a,d),a!==null&&(uu(a,d),Ib(a))}function jU(a){var d=a.memoizedState,w=0;d!==null&&(w=d.retryLane),WL(a,w)}function EU(a,d){var w=0;switch(a.tag){case 31:case 13:var j=a.stateNode,T=a.memoizedState;T!==null&&(w=T.retryLane);break;case 19:j=a.stateNode;break;case 22:j=a.stateNode._retryCache;break;default:throw Error(M(314))}j!==null&&j.delete(d),WL(a,w)}function SU(a,d){return Oa(a,d)}var Zk=null,Q5=null,gC=!1,ej=!1,wC=!1,t2=0;function Ib(a){a!==Q5&&a.next===null&&(Q5===null?Zk=Q5=a:Q5=Q5.next=a),ej=!0,gC||(gC=!0,mC())}function Q6(a,d){if(!wC&&ej){wC=!0;do for(var w=!1,j=Zk;j!==null;){if(a!==0){var T=j.pendingLanes;if(T===0)var I=0;else{var Q=j.suspendedLanes,de=j.pingedLanes;I=(1<<31-Sf(42|a)+1)-1,I&=T&~(Q&~de),I=I&201326741?I&201326741|1:I?I|2:0}I!==0&&(w=!0,nP(j,I))}else I=nu,I=Xg(j,j===Do?I:0,j.cancelPendingCommit!==null||j.timeoutHandle!==-1),(I&3)===0||Mb(j,I)||(w=!0,nP(j,I));j=j.next}while(w);wC=!1}}function xU(){ZL()}function ZL(){ej=gC=!1;var a=0;t2!==0&&LU()&&(a=t2);for(var d=Sl(),w=null,j=Zk;j!==null;){var T=j.next,I=pC(j,d);I===0?(j.next=null,w===null?Zk=T:w.next=T,T===null&&(Q5=w)):(w=j,(a!==0||(I&3)!==0)&&(ej=!0)),j=T}nf!==0&&nf!==5||Q6(a),t2!==0&&(t2=0)}function pC(a,d){for(var w=a.suspendedLanes,j=a.pingedLanes,T=a.expirationTimes,I=a.pendingLanes&-62914561;0de)break;var it=tn.transferSize,gt=tn.initiatorType;it&&lP(gt)&&(tn=tn.responseEnd,Q+=it*(tn"u"?null:document;function pP(a,d,w){var j=W5;if(j&&typeof d=="string"&&d){var T=Lh(d);T='link[rel="'+a+'"][href="'+T+'"]',typeof w=="string"&&(T+='[crossorigin="'+w+'"]'),_C.has(T)||(_C.add(T),a={rel:a,crossOrigin:w,href:d},j.querySelector(T)===null&&(d=j.createElement("link"),sa(d,"link",a),xl(d),j.head.appendChild(d)))}}function GU(a){p0.D(a),pP("dns-prefetch",a,null)}function qU(a,d){p0.C(a,d),pP("preconnect",a,d)}function LC(a,d,w){p0.L(a,d,w);var j=W5;if(j&&a&&d){var T='link[rel="preload"][as="'+Lh(d)+'"]';d==="image"&&w&&w.imageSrcSet?(T+='[imagesrcset="'+Lh(w.imageSrcSet)+'"]',typeof w.imageSizes=="string"&&(T+='[imagesizes="'+Lh(w.imageSizes)+'"]')):T+='[href="'+Lh(a)+'"]';var I=T;switch(d){case"style":I=Z5(a);break;case"script":I=e4(a)}E1.has(I)||(a=W({rel:"preload",href:d==="image"&&w&&w.imageSrcSet?void 0:a,as:d},w),E1.set(I,a),j.querySelector(T)!==null||d==="style"&&j.querySelector(xv(I))||d==="script"&&j.querySelector(t9(I))||(d=j.createElement("link"),sa(d,"link",a),xl(d),j.head.appendChild(d)))}}function UU(a,d){p0.m(a,d);var w=W5;if(w&&a){var j=d&&typeof d.as=="string"?d.as:"script",T='link[rel="modulepreload"][as="'+Lh(j)+'"][href="'+Lh(a)+'"]',I=T;switch(j){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":I=e4(a)}if(!E1.has(I)&&(a=W({rel:"modulepreload",href:a},d),E1.set(I,a),w.querySelector(T)===null)){switch(j){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(w.querySelector(t9(I)))return}j=w.createElement("link"),sa(j,"link",a),xl(j),w.head.appendChild(j)}}}function XU(a,d,w){p0.S(a,d,w);var j=W5;if(j&&a){var T=Lp(j).hoistableStyles,I=Z5(a);d=d||"default";var Q=T.get(I);if(!Q){var de={loading:0,preload:null};if(Q=j.querySelector(xv(I)))de.loading=5;else{a=W({rel:"stylesheet",href:a,"data-precedence":d},w),(w=E1.get(I))&&RC(a,w);var tn=Q=j.createElement("link");xl(tn),sa(tn,"link",a),tn._p=new Promise(function(Pn,it){tn.onload=Pn,tn.onerror=it}),tn.addEventListener("load",function(){de.loading|=1}),tn.addEventListener("error",function(){de.loading|=2}),de.loading|=4,uj(Q,d,j)}Q={type:"stylesheet",instance:Q,count:1,state:de},T.set(I,Q)}}}function KU(a,d){p0.X(a,d);var w=W5;if(w&&a){var j=Lp(w).hoistableScripts,T=e4(a),I=j.get(T);I||(I=w.querySelector(t9(T)),I||(a=W({src:a,async:!0},d),(d=E1.get(T))&&BC(a,d),I=w.createElement("script"),xl(I),sa(I,"link",a),w.head.appendChild(I)),I={type:"script",instance:I,count:1,state:null},j.set(T,I))}}function PC(a,d){p0.M(a,d);var w=W5;if(w&&a){var j=Lp(w).hoistableScripts,T=e4(a),I=j.get(T);I||(I=w.querySelector(t9(T)),I||(a=W({src:a,async:!0,type:"module"},d),(d=E1.get(T))&&BC(a,d),I=w.createElement("script"),xl(I),sa(I,"link",a),w.head.appendChild(I)),I={type:"script",instance:I,count:1,state:null},j.set(T,I))}}function mP(a,d,w,j){var T=(T=di.current)?cj(T):null;if(!T)throw Error(M(446));switch(a){case"meta":case"title":return null;case"style":return typeof w.precedence=="string"&&typeof w.href=="string"?(d=Z5(w.href),w=Lp(T).hoistableStyles,j=w.get(d),j||(j={type:"style",instance:null,count:0,state:null},w.set(d,j)),j):{type:"void",instance:null,count:0,state:null};case"link":if(w.rel==="stylesheet"&&typeof w.href=="string"&&typeof w.precedence=="string"){a=Z5(w.href);var I=Lp(T).hoistableStyles,Q=I.get(a);if(Q||(T=T.ownerDocument||T,Q={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},I.set(a,Q),(I=T.querySelector(xv(a)))&&!I._p&&(Q.instance=I,Q.state.loading=5),E1.has(a)||(w={rel:"preload",as:"style",href:w.href,crossOrigin:w.crossOrigin,integrity:w.integrity,media:w.media,hrefLang:w.hrefLang,referrerPolicy:w.referrerPolicy},E1.set(a,w),I||$C(T,a,w,Q.state))),d&&j===null)throw Error(M(528,""));return Q}if(d&&j!==null)throw Error(M(529,""));return null;case"script":return d=w.async,w=w.src,typeof w=="string"&&d&&typeof d!="function"&&typeof d!="symbol"?(d=e4(w),w=Lp(T).hoistableScripts,j=w.get(d),j||(j={type:"script",instance:null,count:0,state:null},w.set(d,j)),j):{type:"void",instance:null,count:0,state:null};default:throw Error(M(444,a))}}function Z5(a){return'href="'+Lh(a)+'"'}function xv(a){return'link[rel="stylesheet"]['+a+"]"}function vP(a){return W({},a,{"data-precedence":a.precedence,precedence:null})}function $C(a,d,w,j){a.querySelector('link[rel="preload"][as="style"]['+d+"]")?j.loading=1:(d=a.createElement("link"),j.preload=d,d.addEventListener("load",function(){return j.loading|=1}),d.addEventListener("error",function(){return j.loading|=2}),sa(d,"link",w),xl(d),a.head.appendChild(d))}function e4(a){return'[src="'+Lh(a)+'"]'}function t9(a){return"script[async]"+a}function yP(a,d,w){if(d.count++,d.instance===null)switch(d.type){case"style":var j=a.querySelector('style[data-href~="'+Lh(w.href)+'"]');if(j)return d.instance=j,xl(j),j;var T=W({},w,{"data-href":w.href,"data-precedence":w.precedence,href:null,precedence:null});return j=(a.ownerDocument||a).createElement("style"),xl(j),sa(j,"style",T),uj(j,w.precedence,a),d.instance=j;case"stylesheet":T=Z5(w.href);var I=a.querySelector(xv(T));if(I)return d.state.loading|=4,d.instance=I,xl(I),I;j=vP(w),(T=E1.get(T))&&RC(j,T),I=(a.ownerDocument||a).createElement("link"),xl(I);var Q=I;return Q._p=new Promise(function(de,tn){Q.onload=de,Q.onerror=tn}),sa(I,"link",j),d.state.loading|=4,uj(I,w.precedence,a),d.instance=I;case"script":return I=e4(w.src),(T=a.querySelector(t9(I)))?(d.instance=T,xl(T),T):(j=w,(T=E1.get(I))&&(j=W({},w),BC(j,T)),a=a.ownerDocument||a,T=a.createElement("script"),xl(T),sa(T,"link",j),a.head.appendChild(T),d.instance=T);case"void":return null;default:throw Error(M(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(j=d.instance,d.state.loading|=4,uj(j,w.precedence,a));return d.instance}function uj(a,d,w){for(var j=w.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),T=j.length?j[j.length-1]:null,I=T,Q=0;Q title"):null)}function VU(a,d,w){if(w===1||d.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof d.precedence!="string"||typeof d.href!="string"||d.href==="")break;return!0;case"link":if(typeof d.rel!="string"||typeof d.href!="string"||d.href===""||d.onLoad||d.onError)break;return d.rel==="stylesheet"?(a=d.disabled,typeof d.precedence=="string"&&a==null):!0;case"script":if(d.async&&typeof d.async!="function"&&typeof d.async!="symbol"&&!d.onLoad&&!d.onError&&d.src&&typeof d.src=="string")return!0}return!1}function EP(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function YU(a,d,w,j){if(w.type==="stylesheet"&&(typeof j.media!="string"||matchMedia(j.media).matches!==!1)&&(w.state.loading&4)===0){if(w.instance===null){var T=Z5(j.href),I=d.querySelector(xv(T));if(I){d=I._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(a.count++,a=i9.bind(a),d.then(a,a)),w.state.loading|=4,w.instance=I,xl(I);return}I=d.ownerDocument||d,j=vP(j),(T=E1.get(T))&&RC(j,T),I=I.createElement("link"),xl(I);var Q=I;Q._p=new Promise(function(de,tn){Q.onload=de,Q.onerror=tn}),sa(I,"link",j),w.instance=I}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(w,d),(d=w.state.preload)&&(w.state.loading&3)===0&&(a.count++,w=i9.bind(a),d.addEventListener("load",w),d.addEventListener("error",w))}}var zC=0;function QU(a,d){return a.stylesheets&&a.count===0&&Av(a,a.stylesheets),0zC?50:800)+d);return a.unsuspend=w,function(){a.unsuspend=null,clearTimeout(j),clearTimeout(T)}}:null}function i9(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Av(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var r9=null;function Av(a,d){a.stylesheets=null,a.unsuspend!==null&&(a.count++,r9=new Map,d.forEach(c9,a),r9=null,i9.call(a))}function c9(a,d){if(!(d.state.loading&4)){var w=r9.get(a);if(w)var j=w.get(null);else{w=new Map,r9.set(a,w);for(var T=a.querySelectorAll("link[data-precedence],style[data-precedence]"),I=0;I"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g)}catch(E){console.error(E)}}return g(),O7e.exports=fzn(),O7e.exports}var hzn=azn();function Ta(g){if(typeof g=="string"||typeof g=="number")return""+g;let E="";if(Array.isArray(g))for(let x=0,M;x{}};function Oue(){for(var g=0,E=arguments.length,x={},M;g=0&&(M=x.slice(N+1),x=x.slice(0,N)),x&&!E.hasOwnProperty(x))throw new Error("unknown type: "+x);return{type:x,name:M}})}hue.prototype=Oue.prototype={constructor:hue,on:function(g,E){var x=this._,M=bzn(g+"",x),N,$=-1,k=M.length;if(arguments.length<2){for(;++$0)for(var x=new Array(N),M=0,N,$;M=0&&(E=g.slice(0,x))!=="xmlns"&&(g=g.slice(x+1)),Xhn.hasOwnProperty(E)?{space:Xhn[E],local:g}:g}function wzn(g){return function(){var E=this.ownerDocument,x=this.namespaceURI;return x===Z7e&&E.documentElement.namespaceURI===Z7e?E.createElement(g):E.createElementNS(x,g)}}function pzn(g){return function(){return this.ownerDocument.createElementNS(g.space,g.local)}}function ldn(g){var E=Nue(g);return(E.local?pzn:wzn)(E)}function mzn(){}function gke(g){return g==null?mzn:function(){return this.querySelector(g)}}function vzn(g){typeof g!="function"&&(g=gke(g));for(var E=this._groups,x=E.length,M=new Array(x),N=0;N=ae&&(ae=Pe+1);!(Xe=Me[ae])&&++ae=0;)(k=M[N])&&($&&k.compareDocumentPosition($)^4&&$.parentNode.insertBefore(k,$),$=k);return this}function Gzn(g){g||(g=qzn);function E(W,Z){return W&&Z?g(W.__data__,Z.__data__):!W-!Z}for(var x=this._groups,M=x.length,N=new Array(M),$=0;$E?1:g>=E?0:NaN}function Uzn(){var g=arguments[0];return arguments[0]=this,g.apply(null,arguments),this}function Xzn(){return Array.from(this)}function Kzn(){for(var g=this._groups,E=0,x=g.length;E1?this.each((E==null?cFn:typeof E=="function"?oFn:uFn)(g,E,x??"")):bD(this.node(),g)}function bD(g,E){return g.style.getPropertyValue(E)||bdn(g).getComputedStyle(g,null).getPropertyValue(E)}function lFn(g){return function(){delete this[g]}}function fFn(g,E){return function(){this[g]=E}}function aFn(g,E){return function(){var x=E.apply(this,arguments);x==null?delete this[g]:this[g]=x}}function hFn(g,E){return arguments.length>1?this.each((E==null?lFn:typeof E=="function"?aFn:fFn)(g,E)):this.node()[g]}function gdn(g){return g.trim().split(/^|\s+/)}function wke(g){return g.classList||new wdn(g)}function wdn(g){this._node=g,this._names=gdn(g.getAttribute("class")||"")}wdn.prototype={add:function(g){var E=this._names.indexOf(g);E<0&&(this._names.push(g),this._node.setAttribute("class",this._names.join(" ")))},remove:function(g){var E=this._names.indexOf(g);E>=0&&(this._names.splice(E,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(g){return this._names.indexOf(g)>=0}};function pdn(g,E){for(var x=wke(g),M=-1,N=E.length;++M=0&&(x=E.slice(M+1),E=E.slice(0,M)),{type:E,name:x}})}function zFn(g){return function(){var E=this.__on;if(E){for(var x=0,M=-1,N=E.length,$;x()=>g;function eke(g,{sourceEvent:E,subject:x,target:M,identifier:N,active:$,x:k,y:H,dx:U,dy:G,dispatch:ie}){Object.defineProperties(this,{type:{value:g,enumerable:!0,configurable:!0},sourceEvent:{value:E,enumerable:!0,configurable:!0},subject:{value:x,enumerable:!0,configurable:!0},target:{value:M,enumerable:!0,configurable:!0},identifier:{value:N,enumerable:!0,configurable:!0},active:{value:$,enumerable:!0,configurable:!0},x:{value:k,enumerable:!0,configurable:!0},y:{value:H,enumerable:!0,configurable:!0},dx:{value:U,enumerable:!0,configurable:!0},dy:{value:G,enumerable:!0,configurable:!0},_:{value:ie}})}eke.prototype.on=function(){var g=this._.on.apply(this._,arguments);return g===this._?this:g};function YFn(g){return!g.ctrlKey&&!g.button}function QFn(){return this.parentNode}function WFn(g,E){return E??{x:g.x,y:g.y}}function ZFn(){return navigator.maxTouchPoints||"ontouchstart"in this}function Edn(){var g=YFn,E=QFn,x=WFn,M=ZFn,N={},$=Oue("start","drag","end"),k=0,H,U,G,ie,W=0;function Z(Ne){Ne.on("mousedown.drag",se).filter(M).on("touchstart.drag",Me).on("touchmove.drag",pe,VFn).on("touchend.drag touchcancel.drag",Pe).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function se(Ne,Xe){if(!(ie||!g.call(this,Ne,Xe))){var ln=ae(this,E.call(this,Ne,Xe),Ne,Xe,"mouse");ln&&(Fg(Ne.view).on("mousemove.drag",oe,HG).on("mouseup.drag",ee,HG),kdn(Ne.view),_7e(Ne),G=!1,H=Ne.clientX,U=Ne.clientY,ln("start",Ne))}}function oe(Ne){if(hD(Ne),!G){var Xe=Ne.clientX-H,ln=Ne.clientY-U;G=Xe*Xe+ln*ln>W}N.mouse("drag",Ne)}function ee(Ne){Fg(Ne.view).on("mousemove.drag mouseup.drag",null),jdn(Ne.view,G),hD(Ne),N.mouse("end",Ne)}function Me(Ne,Xe){if(g.call(this,Ne,Xe)){var ln=Ne.changedTouches,on=E.call(this,Ne,Xe),An=ln.length,xn,tt;for(xn=0;xn>8&15|E>>4&240,E>>4&15|E&240,(E&15)<<4|E&15,1):x===8?Wce(E>>24&255,E>>16&255,E>>8&255,(E&255)/255):x===4?Wce(E>>12&15|E>>8&240,E>>8&15|E>>4&240,E>>4&15|E&240,((E&15)<<4|E&15)/255):null):(E=nJn.exec(g))?new Sb(E[1],E[2],E[3],1):(E=tJn.exec(g))?new Sb(E[1]*255/100,E[2]*255/100,E[3]*255/100,1):(E=iJn.exec(g))?Wce(E[1],E[2],E[3],E[4]):(E=rJn.exec(g))?Wce(E[1]*255/100,E[2]*255/100,E[3]*255/100,E[4]):(E=cJn.exec(g))?e1n(E[1],E[2]/100,E[3]/100,1):(E=uJn.exec(g))?e1n(E[1],E[2]/100,E[3]/100,E[4]):Khn.hasOwnProperty(g)?Qhn(Khn[g]):g==="transparent"?new Sb(NaN,NaN,NaN,0):null}function Qhn(g){return new Sb(g>>16&255,g>>8&255,g&255,1)}function Wce(g,E,x,M){return M<=0&&(g=E=x=NaN),new Sb(g,E,x,M)}function lJn(g){return g instanceof nq||(g=xA(g)),g?(g=g.rgb(),new Sb(g.r,g.g,g.b,g.opacity)):new Sb}function nke(g,E,x,M){return arguments.length===1?lJn(g):new Sb(g,E,x,M??1)}function Sb(g,E,x,M){this.r=+g,this.g=+E,this.b=+x,this.opacity=+M}pke(Sb,nke,Sdn(nq,{brighter(g){return g=g==null?mue:Math.pow(mue,g),new Sb(this.r*g,this.g*g,this.b*g,this.opacity)},darker(g){return g=g==null?GG:Math.pow(GG,g),new Sb(this.r*g,this.g*g,this.b*g,this.opacity)},rgb(){return this},clamp(){return new Sb(jA(this.r),jA(this.g),jA(this.b),vue(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Whn,formatHex:Whn,formatHex8:fJn,formatRgb:Zhn,toString:Zhn}));function Whn(){return`#${kA(this.r)}${kA(this.g)}${kA(this.b)}`}function fJn(){return`#${kA(this.r)}${kA(this.g)}${kA(this.b)}${kA((isNaN(this.opacity)?1:this.opacity)*255)}`}function Zhn(){const g=vue(this.opacity);return`${g===1?"rgb(":"rgba("}${jA(this.r)}, ${jA(this.g)}, ${jA(this.b)}${g===1?")":`, ${g})`}`}function vue(g){return isNaN(g)?1:Math.max(0,Math.min(1,g))}function jA(g){return Math.max(0,Math.min(255,Math.round(g)||0))}function kA(g){return g=jA(g),(g<16?"0":"")+g.toString(16)}function e1n(g,E,x,M){return M<=0?g=E=x=NaN:x<=0||x>=1?g=E=NaN:E<=0&&(g=NaN),new ev(g,E,x,M)}function xdn(g){if(g instanceof ev)return new ev(g.h,g.s,g.l,g.opacity);if(g instanceof nq||(g=xA(g)),!g)return new ev;if(g instanceof ev)return g;g=g.rgb();var E=g.r/255,x=g.g/255,M=g.b/255,N=Math.min(E,x,M),$=Math.max(E,x,M),k=NaN,H=$-N,U=($+N)/2;return H?(E===$?k=(x-M)/H+(x0&&U<1?0:k,new ev(k,H,U,g.opacity)}function aJn(g,E,x,M){return arguments.length===1?xdn(g):new ev(g,E,x,M??1)}function ev(g,E,x,M){this.h=+g,this.s=+E,this.l=+x,this.opacity=+M}pke(ev,aJn,Sdn(nq,{brighter(g){return g=g==null?mue:Math.pow(mue,g),new ev(this.h,this.s,this.l*g,this.opacity)},darker(g){return g=g==null?GG:Math.pow(GG,g),new ev(this.h,this.s,this.l*g,this.opacity)},rgb(){var g=this.h%360+(this.h<0)*360,E=isNaN(g)||isNaN(this.s)?0:this.s,x=this.l,M=x+(x<.5?x:1-x)*E,N=2*x-M;return new Sb(L7e(g>=240?g-240:g+120,N,M),L7e(g,N,M),L7e(g<120?g+240:g-120,N,M),this.opacity)},clamp(){return new ev(n1n(this.h),Zce(this.s),Zce(this.l),vue(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const g=vue(this.opacity);return`${g===1?"hsl(":"hsla("}${n1n(this.h)}, ${Zce(this.s)*100}%, ${Zce(this.l)*100}%${g===1?")":`, ${g})`}`}}));function n1n(g){return g=(g||0)%360,g<0?g+360:g}function Zce(g){return Math.max(0,Math.min(1,g||0))}function L7e(g,E,x){return(g<60?E+(x-E)*g/60:g<180?x:g<240?E+(x-E)*(240-g)/60:E)*255}const mke=g=>()=>g;function hJn(g,E){return function(x){return g+x*E}}function dJn(g,E,x){return g=Math.pow(g,x),E=Math.pow(E,x)-g,x=1/x,function(M){return Math.pow(g+M*E,x)}}function bJn(g){return(g=+g)==1?Adn:function(E,x){return x-E?dJn(E,x,g):mke(isNaN(E)?x:E)}}function Adn(g,E){var x=E-g;return x?hJn(g,x):mke(isNaN(g)?E:g)}const yue=(function g(E){var x=bJn(E);function M(N,$){var k=x((N=nke(N)).r,($=nke($)).r),H=x(N.g,$.g),U=x(N.b,$.b),G=Adn(N.opacity,$.opacity);return function(ie){return N.r=k(ie),N.g=H(ie),N.b=U(ie),N.opacity=G(ie),N+""}}return M.gamma=g,M})(1);function gJn(g,E){E||(E=[]);var x=g?Math.min(E.length,g.length):0,M=E.slice(),N;return function($){for(N=0;Nx&&($=E.slice(x,$),H[k]?H[k]+=$:H[++k]=$),(M=M[0])===(N=N[0])?H[k]?H[k]+=N:H[++k]=N:(H[++k]=null,U.push({i:k,x:l5(M,N)})),x=P7e.lastIndex;return x180?ie+=360:ie-G>180&&(G+=360),Z.push({i:W.push(N(W)+"rotate(",null,M)-2,x:l5(G,ie)})):ie&&W.push(N(W)+"rotate("+ie+M)}function H(G,ie,W,Z){G!==ie?Z.push({i:W.push(N(W)+"skewX(",null,M)-2,x:l5(G,ie)}):ie&&W.push(N(W)+"skewX("+ie+M)}function U(G,ie,W,Z,se,oe){if(G!==W||ie!==Z){var ee=se.push(N(se)+"scale(",null,",",null,")");oe.push({i:ee-4,x:l5(G,W)},{i:ee-2,x:l5(ie,Z)})}else(W!==1||Z!==1)&&se.push(N(se)+"scale("+W+","+Z+")")}return function(G,ie){var W=[],Z=[];return G=g(G),ie=g(ie),$(G.translateX,G.translateY,ie.translateX,ie.translateY,W,Z),k(G.rotate,ie.rotate,W,Z),H(G.skewX,ie.skewX,W,Z),U(G.scaleX,G.scaleY,ie.scaleX,ie.scaleY,W,Z),G=ie=null,function(se){for(var oe=-1,ee=Z.length,Me;++oe=0&&g._call.call(void 0,E),g=g._next;--gD}function r1n(){AA=(jue=UG.now())+Iue,gD=$G=0;try{OJn()}finally{gD=0,IJn(),AA=0}}function NJn(){var g=UG.now(),E=g-jue;E>Odn&&(Iue-=E,jue=g)}function IJn(){for(var g,E=kue,x,M=1/0;E;)E._call?(M>E._time&&(M=E._time),g=E,E=E._next):(x=E._next,E._next=null,E=g?g._next=x:kue=x);RG=g,rke(M)}function rke(g){if(!gD){$G&&($G=clearTimeout($G));var E=g-AA;E>24?(g<1/0&&($G=setTimeout(r1n,g-UG.now()-Iue)),_G&&(_G=clearInterval(_G))):(_G||(jue=UG.now(),_G=setInterval(NJn,Odn)),gD=1,Ndn(r1n))}}function c1n(g,E,x){var M=new Eue;return E=E==null?0:+E,M.restart(N=>{M.stop(),g(N+E)},E,x),M}var DJn=Oue("start","end","cancel","interrupt"),_Jn=[],Ddn=0,u1n=1,cke=2,bue=3,o1n=4,uke=5,gue=6;function Due(g,E,x,M,N,$){var k=g.__transition;if(!k)g.__transition={};else if(x in k)return;LJn(g,x,{name:E,index:M,group:N,on:DJn,tween:_Jn,time:$.time,delay:$.delay,duration:$.duration,ease:$.ease,timer:null,state:Ddn})}function yke(g,E){var x=iv(g,E);if(x.state>Ddn)throw new Error("too late; already scheduled");return x}function d5(g,E){var x=iv(g,E);if(x.state>bue)throw new Error("too late; already running");return x}function iv(g,E){var x=g.__transition;if(!x||!(x=x[E]))throw new Error("transition not found");return x}function LJn(g,E,x){var M=g.__transition,N;M[E]=x,x.timer=Idn($,0,x.time);function $(G){x.state=u1n,x.timer.restart(k,x.delay,x.time),x.delay<=G&&k(G-x.delay)}function k(G){var ie,W,Z,se;if(x.state!==u1n)return U();for(ie in M)if(se=M[ie],se.name===x.name){if(se.state===bue)return c1n(k);se.state===o1n?(se.state=gue,se.timer.stop(),se.on.call("interrupt",g,g.__data__,se.index,se.group),delete M[ie]):+iecke&&M.state=0&&(E=E.slice(0,x)),!E||E==="start"})}function aHn(g,E,x){var M,N,$=fHn(E)?yke:d5;return function(){var k=$(this,g),H=k.on;H!==M&&(N=(M=H).copy()).on(E,x),k.on=N}}function hHn(g,E){var x=this._id;return arguments.length<2?iv(this.node(),x).on.on(g):this.each(aHn(x,g,E))}function dHn(g){return function(){var E=this.parentNode;for(var x in this.__transition)if(+x!==g)return;E&&E.removeChild(this)}}function bHn(){return this.on("end.remove",dHn(this._id))}function gHn(g){var E=this._name,x=this._id;typeof g!="function"&&(g=gke(g));for(var M=this._groups,N=M.length,$=new Array(N),k=0;k()=>g;function zHn(g,{sourceEvent:E,target:x,transform:M,dispatch:N}){Object.defineProperties(this,{type:{value:g,enumerable:!0,configurable:!0},sourceEvent:{value:E,enumerable:!0,configurable:!0},target:{value:x,enumerable:!0,configurable:!0},transform:{value:M,enumerable:!0,configurable:!0},_:{value:N}})}function c6(g,E,x){this.k=g,this.x=E,this.y=x}c6.prototype={constructor:c6,scale:function(g){return g===1?this:new c6(this.k*g,this.x,this.y)},translate:function(g,E){return g===0&E===0?this:new c6(this.k,this.x+this.k*g,this.y+this.k*E)},apply:function(g){return[g[0]*this.k+this.x,g[1]*this.k+this.y]},applyX:function(g){return g*this.k+this.x},applyY:function(g){return g*this.k+this.y},invert:function(g){return[(g[0]-this.x)/this.k,(g[1]-this.y)/this.k]},invertX:function(g){return(g-this.x)/this.k},invertY:function(g){return(g-this.y)/this.k},rescaleX:function(g){return g.copy().domain(g.range().map(this.invertX,this).map(g.invert,g))},rescaleY:function(g){return g.copy().domain(g.range().map(this.invertY,this).map(g.invert,g))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var _ue=new c6(1,0,0);$dn.prototype=c6.prototype;function $dn(g){for(;!g.__zoom;)if(!(g=g.parentNode))return _ue;return g.__zoom}function $7e(g){g.stopImmediatePropagation()}function LG(g){g.preventDefault(),g.stopImmediatePropagation()}function FHn(g){return(!g.ctrlKey||g.type==="wheel")&&!g.button}function JHn(){var g=this;return g instanceof SVGElement?(g=g.ownerSVGElement||g,g.hasAttribute("viewBox")?(g=g.viewBox.baseVal,[[g.x,g.y],[g.x+g.width,g.y+g.height]]):[[0,0],[g.width.baseVal.value,g.height.baseVal.value]]):[[0,0],[g.clientWidth,g.clientHeight]]}function s1n(){return this.__zoom||_ue}function HHn(g){return-g.deltaY*(g.deltaMode===1?.05:g.deltaMode?1:.002)*(g.ctrlKey?10:1)}function GHn(){return navigator.maxTouchPoints||"ontouchstart"in this}function qHn(g,E,x){var M=g.invertX(E[0][0])-x[0][0],N=g.invertX(E[1][0])-x[1][0],$=g.invertY(E[0][1])-x[0][1],k=g.invertY(E[1][1])-x[1][1];return g.translate(N>M?(M+N)/2:Math.min(0,M)||Math.max(0,N),k>$?($+k)/2:Math.min(0,$)||Math.max(0,k))}function Rdn(){var g=FHn,E=JHn,x=qHn,M=HHn,N=GHn,$=[0,1/0],k=[[-1/0,-1/0],[1/0,1/0]],H=250,U=due,G=Oue("start","zoom","end"),ie,W,Z,se=500,oe=150,ee=0,Me=10;function pe(Je){Je.property("__zoom",s1n).on("wheel.zoom",An,{passive:!1}).on("mousedown.zoom",xn).on("dblclick.zoom",tt).filter(N).on("touchstart.zoom",vn).on("touchmove.zoom",wn).on("touchend.zoom touchcancel.zoom",Y).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}pe.transform=function(Je,pn,xe,qe){var fn=Je.selection?Je.selection():Je;fn.property("__zoom",s1n),Je!==fn?Xe(Je,pn,xe,qe):fn.interrupt().each(function(){ln(this,arguments).event(qe).start().zoom(null,typeof pn=="function"?pn.apply(this,arguments):pn).end()})},pe.scaleBy=function(Je,pn,xe,qe){pe.scaleTo(Je,function(){var fn=this.__zoom.k,$e=typeof pn=="function"?pn.apply(this,arguments):pn;return fn*$e},xe,qe)},pe.scaleTo=function(Je,pn,xe,qe){pe.transform(Je,function(){var fn=E.apply(this,arguments),$e=this.__zoom,Mn=xe==null?Ne(fn):typeof xe=="function"?xe.apply(this,arguments):xe,ye=$e.invert(Mn),Re=typeof pn=="function"?pn.apply(this,arguments):pn;return x(ae(Pe($e,Re),Mn,ye),fn,k)},xe,qe)},pe.translateBy=function(Je,pn,xe,qe){pe.transform(Je,function(){return x(this.__zoom.translate(typeof pn=="function"?pn.apply(this,arguments):pn,typeof xe=="function"?xe.apply(this,arguments):xe),E.apply(this,arguments),k)},null,qe)},pe.translateTo=function(Je,pn,xe,qe,fn){pe.transform(Je,function(){var $e=E.apply(this,arguments),Mn=this.__zoom,ye=qe==null?Ne($e):typeof qe=="function"?qe.apply(this,arguments):qe;return x(_ue.translate(ye[0],ye[1]).scale(Mn.k).translate(typeof pn=="function"?-pn.apply(this,arguments):-pn,typeof xe=="function"?-xe.apply(this,arguments):-xe),$e,k)},qe,fn)};function Pe(Je,pn){return pn=Math.max($[0],Math.min($[1],pn)),pn===Je.k?Je:new c6(pn,Je.x,Je.y)}function ae(Je,pn,xe){var qe=pn[0]-xe[0]*Je.k,fn=pn[1]-xe[1]*Je.k;return qe===Je.x&&fn===Je.y?Je:new c6(Je.k,qe,fn)}function Ne(Je){return[(+Je[0][0]+ +Je[1][0])/2,(+Je[0][1]+ +Je[1][1])/2]}function Xe(Je,pn,xe,qe){Je.on("start.zoom",function(){ln(this,arguments).event(qe).start()}).on("interrupt.zoom end.zoom",function(){ln(this,arguments).event(qe).end()}).tween("zoom",function(){var fn=this,$e=arguments,Mn=ln(fn,$e).event(qe),ye=E.apply(fn,$e),Re=xe==null?Ne(ye):typeof xe=="function"?xe.apply(fn,$e):xe,Hn=Math.max(ye[1][0]-ye[0][0],ye[1][1]-ye[0][1]),rt=fn.__zoom,Jt=typeof pn=="function"?pn.apply(fn,$e):pn,di=U(rt.invert(Re).concat(Hn/rt.k),Jt.invert(Re).concat(Hn/Jt.k));return function(Gt){if(Gt===1)Gt=Jt;else{var xt=di(Gt),si=Hn/xt[2];Gt=new c6(si,Re[0]-xt[0]*si,Re[1]-xt[1]*si)}Mn.zoom(null,Gt)}})}function ln(Je,pn,xe){return!xe&&Je.__zooming||new on(Je,pn)}function on(Je,pn){this.that=Je,this.args=pn,this.active=0,this.sourceEvent=null,this.extent=E.apply(Je,pn),this.taps=0}on.prototype={event:function(Je){return Je&&(this.sourceEvent=Je),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(Je,pn){return this.mouse&&Je!=="mouse"&&(this.mouse[1]=pn.invert(this.mouse[0])),this.touch0&&Je!=="touch"&&(this.touch0[1]=pn.invert(this.touch0[0])),this.touch1&&Je!=="touch"&&(this.touch1[1]=pn.invert(this.touch1[0])),this.that.__zoom=pn,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(Je){var pn=Fg(this.that).datum();G.call(Je,this.that,new zHn(Je,{sourceEvent:this.sourceEvent,target:pe,transform:this.that.__zoom,dispatch:G}),pn)}};function An(Je,...pn){if(!g.apply(this,arguments))return;var xe=ln(this,pn).event(Je),qe=this.__zoom,fn=Math.max($[0],Math.min($[1],qe.k*Math.pow(2,M.apply(this,arguments)))),$e=Zm(Je);if(xe.wheel)(xe.mouse[0][0]!==$e[0]||xe.mouse[0][1]!==$e[1])&&(xe.mouse[1]=qe.invert(xe.mouse[0]=$e)),clearTimeout(xe.wheel);else{if(qe.k===fn)return;xe.mouse=[$e,qe.invert($e)],wue(this),xe.start()}LG(Je),xe.wheel=setTimeout(Mn,oe),xe.zoom("mouse",x(ae(Pe(qe,fn),xe.mouse[0],xe.mouse[1]),xe.extent,k));function Mn(){xe.wheel=null,xe.end()}}function xn(Je,...pn){if(Z||!g.apply(this,arguments))return;var xe=Je.currentTarget,qe=ln(this,pn,!0).event(Je),fn=Fg(Je.view).on("mousemove.zoom",Re,!0).on("mouseup.zoom",Hn,!0),$e=Zm(Je,xe),Mn=Je.clientX,ye=Je.clientY;kdn(Je.view),$7e(Je),qe.mouse=[$e,this.__zoom.invert($e)],wue(this),qe.start();function Re(rt){if(LG(rt),!qe.moved){var Jt=rt.clientX-Mn,di=rt.clientY-ye;qe.moved=Jt*Jt+di*di>ee}qe.event(rt).zoom("mouse",x(ae(qe.that.__zoom,qe.mouse[0]=Zm(rt,xe),qe.mouse[1]),qe.extent,k))}function Hn(rt){fn.on("mousemove.zoom mouseup.zoom",null),jdn(rt.view,qe.moved),LG(rt),qe.event(rt).end()}}function tt(Je,...pn){if(g.apply(this,arguments)){var xe=this.__zoom,qe=Zm(Je.changedTouches?Je.changedTouches[0]:Je,this),fn=xe.invert(qe),$e=xe.k*(Je.shiftKey?.5:2),Mn=x(ae(Pe(xe,$e),qe,fn),E.apply(this,pn),k);LG(Je),H>0?Fg(this).transition().duration(H).call(Xe,Mn,qe,Je):Fg(this).call(pe.transform,Mn,qe,Je)}}function vn(Je,...pn){if(g.apply(this,arguments)){var xe=Je.touches,qe=xe.length,fn=ln(this,pn,Je.changedTouches.length===qe).event(Je),$e,Mn,ye,Re;for($7e(Je),Mn=0;Mn"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:g=>`Node type "${g}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:g=>`The old edge with id=${g} does not exist.`,error009:g=>`Marker type "${g}" doesn't exist.`,error008:(g,{id:E,sourceHandle:x,targetHandle:M})=>`Couldn't create edge for ${g} handle id: "${g==="source"?x:M}", edge id: ${E}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:g=>`Edge type "${g}" not found. Using fallback type "default".`,error012:g=>`Node with id "${g}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(g="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${g}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},XG=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Bdn=["Enter"," ","Escape"],zdn={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:g,x:E,y:x})=>`Moved selected node ${g}. New position, x: ${E}, y: ${x}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var wD;(function(g){g.Strict="strict",g.Loose="loose"})(wD||(wD={}));var EA;(function(g){g.Free="free",g.Vertical="vertical",g.Horizontal="horizontal"})(EA||(EA={}));var KG;(function(g){g.Partial="partial",g.Full="full"})(KG||(KG={}));const Fdn={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var ek;(function(g){g.Bezier="default",g.Straight="straight",g.Step="step",g.SmoothStep="smoothstep",g.SimpleBezier="simplebezier"})(ek||(ek={}));var VG;(function(g){g.Arrow="arrow",g.ArrowClosed="arrowclosed"})(VG||(VG={}));var ur;(function(g){g.Left="left",g.Top="top",g.Right="right",g.Bottom="bottom"})(ur||(ur={}));const l1n={[ur.Left]:ur.Right,[ur.Right]:ur.Left,[ur.Top]:ur.Bottom,[ur.Bottom]:ur.Top};function Jdn(g){return g===null?null:g?"valid":"invalid"}const Hdn=g=>"id"in g&&"source"in g&&"target"in g,UHn=g=>"id"in g&&"position"in g&&!("source"in g)&&!("target"in g),jke=g=>"id"in g&&"internals"in g&&!("source"in g)&&!("target"in g),tq=(g,E=[0,0])=>{const{width:x,height:M}=s6(g),N=g.origin??E,$=x*N[0],k=M*N[1];return{x:g.position.x-$,y:g.position.y-k}},XHn=(g,E={nodeOrigin:[0,0]})=>{if(g.length===0)return{x:0,y:0,width:0,height:0};const x=g.reduce((M,N)=>{const $=typeof N=="string";let k=!E.nodeLookup&&!$?N:void 0;E.nodeLookup&&(k=$?E.nodeLookup.get(N):jke(N)?N:E.nodeLookup.get(N.id));const H=k?Sue(k,E.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Lue(M,H)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Pue(x)},iq=(g,E={})=>{let x={x:1/0,y:1/0,x2:-1/0,y2:-1/0},M=!1;return g.forEach(N=>{(E.filter===void 0||E.filter(N))&&(x=Lue(x,Sue(N)),M=!0)}),M?Pue(x):{x:0,y:0,width:0,height:0}},Eke=(g,E,[x,M,N]=[0,0,1],$=!1,k=!1)=>{const H={...cq(E,[x,M,N]),width:E.width/N,height:E.height/N},U=[];for(const G of g.values()){const{measured:ie,selectable:W=!0,hidden:Z=!1}=G;if(k&&!W||Z)continue;const se=ie.width??G.width??G.initialWidth??null,oe=ie.height??G.height??G.initialHeight??null,ee=YG(H,mD(G)),Me=(se??0)*(oe??0),pe=$&&ee>0;(!G.internals.handleBounds||pe||ee>=Me||G.dragging)&&U.push(G)}return U},KHn=(g,E)=>{const x=new Set;return g.forEach(M=>{x.add(M.id)}),E.filter(M=>x.has(M.source)||x.has(M.target))};function VHn(g,E){const x=new Map,M=E?.nodes?new Set(E.nodes.map(N=>N.id)):null;return g.forEach(N=>{N.measured.width&&N.measured.height&&(E?.includeHiddenNodes||!N.hidden)&&(!M||M.has(N.id))&&x.set(N.id,N)}),x}async function YHn({nodes:g,width:E,height:x,panZoom:M,minZoom:N,maxZoom:$},k){if(g.size===0)return Promise.resolve(!0);const H=VHn(g,k),U=iq(H),G=Ske(U,E,x,k?.minZoom??N,k?.maxZoom??$,k?.padding??.1);return await M.setViewport(G,{duration:k?.duration,ease:k?.ease,interpolate:k?.interpolate}),Promise.resolve(!0)}function Gdn({nodeId:g,nextPosition:E,nodeLookup:x,nodeOrigin:M=[0,0],nodeExtent:N,onError:$}){const k=x.get(g),H=k.parentId?x.get(k.parentId):void 0,{x:U,y:G}=H?H.internals.positionAbsolute:{x:0,y:0},ie=k.origin??M;let W=k.extent||N;if(k.extent==="parent"&&!k.expandParent)if(!H)$?.("005",a5.error005());else{const se=H.measured.width,oe=H.measured.height;se&&oe&&(W=[[U,G],[U+se,G+oe]])}else H&&vD(k.extent)&&(W=[[k.extent[0][0]+U,k.extent[0][1]+G],[k.extent[1][0]+U,k.extent[1][1]+G]]);const Z=vD(W)?MA(E,W,k.measured):E;return(k.measured.width===void 0||k.measured.height===void 0)&&$?.("015",a5.error015()),{position:{x:Z.x-U+(k.measured.width??0)*ie[0],y:Z.y-G+(k.measured.height??0)*ie[1]},positionAbsolute:Z}}async function QHn({nodesToRemove:g=[],edgesToRemove:E=[],nodes:x,edges:M,onBeforeDelete:N}){const $=new Set(g.map(Z=>Z.id)),k=[];for(const Z of x){if(Z.deletable===!1)continue;const se=$.has(Z.id),oe=!se&&Z.parentId&&k.find(ee=>ee.id===Z.parentId);(se||oe)&&k.push(Z)}const H=new Set(E.map(Z=>Z.id)),U=M.filter(Z=>Z.deletable!==!1),ie=KHn(k,U);for(const Z of U)H.has(Z.id)&&!ie.find(oe=>oe.id===Z.id)&&ie.push(Z);if(!N)return{edges:ie,nodes:k};const W=await N({nodes:k,edges:ie});return typeof W=="boolean"?W?{edges:ie,nodes:k}:{edges:[],nodes:[]}:W}const pD=(g,E=0,x=1)=>Math.min(Math.max(g,E),x),MA=(g={x:0,y:0},E,x)=>({x:pD(g.x,E[0][0],E[1][0]-(x?.width??0)),y:pD(g.y,E[0][1],E[1][1]-(x?.height??0))});function qdn(g,E,x){const{width:M,height:N}=s6(x),{x:$,y:k}=x.internals.positionAbsolute;return MA(g,[[$,k],[$+M,k+N]],E)}const f1n=(g,E,x)=>gx?-pD(Math.abs(g-x),1,E)/E:0,Udn=(g,E,x=15,M=40)=>{const N=f1n(g.x,M,E.width-M)*x,$=f1n(g.y,M,E.height-M)*x;return[N,$]},Lue=(g,E)=>({x:Math.min(g.x,E.x),y:Math.min(g.y,E.y),x2:Math.max(g.x2,E.x2),y2:Math.max(g.y2,E.y2)}),oke=({x:g,y:E,width:x,height:M})=>({x:g,y:E,x2:g+x,y2:E+M}),Pue=({x:g,y:E,x2:x,y2:M})=>({x:g,y:E,width:x-g,height:M-E}),mD=(g,E=[0,0])=>{const{x,y:M}=jke(g)?g.internals.positionAbsolute:tq(g,E);return{x,y:M,width:g.measured?.width??g.width??g.initialWidth??0,height:g.measured?.height??g.height??g.initialHeight??0}},Sue=(g,E=[0,0])=>{const{x,y:M}=jke(g)?g.internals.positionAbsolute:tq(g,E);return{x,y:M,x2:x+(g.measured?.width??g.width??g.initialWidth??0),y2:M+(g.measured?.height??g.height??g.initialHeight??0)}},Xdn=(g,E)=>Pue(Lue(oke(g),oke(E))),YG=(g,E)=>{const x=Math.max(0,Math.min(g.x+g.width,E.x+E.width)-Math.max(g.x,E.x)),M=Math.max(0,Math.min(g.y+g.height,E.y+E.height)-Math.max(g.y,E.y));return Math.ceil(x*M)},a1n=g=>nv(g.width)&&nv(g.height)&&nv(g.x)&&nv(g.y),nv=g=>!isNaN(g)&&isFinite(g),WHn=(g,E)=>{},rq=(g,E=[1,1])=>({x:E[0]*Math.round(g.x/E[0]),y:E[1]*Math.round(g.y/E[1])}),cq=({x:g,y:E},[x,M,N],$=!1,k=[1,1])=>{const H={x:(g-x)/N,y:(E-M)/N};return $?rq(H,k):H},xue=({x:g,y:E},[x,M,N])=>({x:g*N+x,y:E*N+M});function sD(g,E){if(typeof g=="number")return Math.floor((E-E/(1+g))*.5);if(typeof g=="string"&&g.endsWith("px")){const x=parseFloat(g);if(!Number.isNaN(x))return Math.floor(x)}if(typeof g=="string"&&g.endsWith("%")){const x=parseFloat(g);if(!Number.isNaN(x))return Math.floor(E*x*.01)}return console.error(`[React Flow] The padding value "${g}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function ZHn(g,E,x){if(typeof g=="string"||typeof g=="number"){const M=sD(g,x),N=sD(g,E);return{top:M,right:N,bottom:M,left:N,x:N*2,y:M*2}}if(typeof g=="object"){const M=sD(g.top??g.y??0,x),N=sD(g.bottom??g.y??0,x),$=sD(g.left??g.x??0,E),k=sD(g.right??g.x??0,E);return{top:M,right:k,bottom:N,left:$,x:$+k,y:M+N}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function eGn(g,E,x,M,N,$){const{x:k,y:H}=xue(g,[E,x,M]),{x:U,y:G}=xue({x:g.x+g.width,y:g.y+g.height},[E,x,M]),ie=N-U,W=$-G;return{left:Math.floor(k),top:Math.floor(H),right:Math.floor(ie),bottom:Math.floor(W)}}const Ske=(g,E,x,M,N,$)=>{const k=ZHn($,E,x),H=(E-k.x)/g.width,U=(x-k.y)/g.height,G=Math.min(H,U),ie=pD(G,M,N),W=g.x+g.width/2,Z=g.y+g.height/2,se=E/2-W*ie,oe=x/2-Z*ie,ee=eGn(g,se,oe,ie,E,x),Me={left:Math.min(ee.left-k.left,0),top:Math.min(ee.top-k.top,0),right:Math.min(ee.right-k.right,0),bottom:Math.min(ee.bottom-k.bottom,0)};return{x:se-Me.left+Me.right,y:oe-Me.top+Me.bottom,zoom:ie}},QG=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function vD(g){return g!=null&&g!=="parent"}function s6(g){return{width:g.measured?.width??g.width??g.initialWidth??0,height:g.measured?.height??g.height??g.initialHeight??0}}function Kdn(g){return(g.measured?.width??g.width??g.initialWidth)!==void 0&&(g.measured?.height??g.height??g.initialHeight)!==void 0}function Vdn(g,E={width:0,height:0},x,M,N){const $={...g},k=M.get(x);if(k){const H=k.origin||N;$.x+=k.internals.positionAbsolute.x-(E.width??0)*H[0],$.y+=k.internals.positionAbsolute.y-(E.height??0)*H[1]}return $}function h1n(g,E){if(g.size!==E.size)return!1;for(const x of g)if(!E.has(x))return!1;return!0}function nGn(){let g,E;return{promise:new Promise((M,N)=>{g=M,E=N}),resolve:g,reject:E}}function tGn(g){return{...zdn,...g||{}}}function JG(g,{snapGrid:E=[0,0],snapToGrid:x=!1,transform:M,containerBounds:N}){const{x:$,y:k}=tv(g),H=cq({x:$-(N?.left??0),y:k-(N?.top??0)},M),{x:U,y:G}=x?rq(H,E):H;return{xSnapped:U,ySnapped:G,...H}}const xke=g=>({width:g.offsetWidth,height:g.offsetHeight}),Ydn=g=>g?.getRootNode?.()||window?.document,iGn=["INPUT","SELECT","TEXTAREA"];function Qdn(g){const E=g.composedPath?.()?.[0]||g.target;return E?.nodeType!==1?!1:iGn.includes(E.nodeName)||E.hasAttribute("contenteditable")||!!E.closest(".nokey")}const Wdn=g=>"clientX"in g,tv=(g,E)=>{const x=Wdn(g),M=x?g.clientX:g.touches?.[0].clientX,N=x?g.clientY:g.touches?.[0].clientY;return{x:M-(E?.left??0),y:N-(E?.top??0)}},d1n=(g,E,x,M,N)=>{const $=E.querySelectorAll(`.${g}`);return!$||!$.length?null:Array.from($).map(k=>{const H=k.getBoundingClientRect();return{id:k.getAttribute("data-handleid"),type:g,nodeId:N,position:k.getAttribute("data-handlepos"),x:(H.left-x.left)/M,y:(H.top-x.top)/M,...xke(k)}})};function Zdn({sourceX:g,sourceY:E,targetX:x,targetY:M,sourceControlX:N,sourceControlY:$,targetControlX:k,targetControlY:H}){const U=g*.125+N*.375+k*.375+x*.125,G=E*.125+$*.375+H*.375+M*.125,ie=Math.abs(U-g),W=Math.abs(G-E);return[U,G,ie,W]}function tue(g,E){return g>=0?.5*g:E*25*Math.sqrt(-g)}function b1n({pos:g,x1:E,y1:x,x2:M,y2:N,c:$}){switch(g){case ur.Left:return[E-tue(E-M,$),x];case ur.Right:return[E+tue(M-E,$),x];case ur.Top:return[E,x-tue(x-N,$)];case ur.Bottom:return[E,x+tue(N-x,$)]}}function e0n({sourceX:g,sourceY:E,sourcePosition:x=ur.Bottom,targetX:M,targetY:N,targetPosition:$=ur.Top,curvature:k=.25}){const[H,U]=b1n({pos:x,x1:g,y1:E,x2:M,y2:N,c:k}),[G,ie]=b1n({pos:$,x1:M,y1:N,x2:g,y2:E,c:k}),[W,Z,se,oe]=Zdn({sourceX:g,sourceY:E,targetX:M,targetY:N,sourceControlX:H,sourceControlY:U,targetControlX:G,targetControlY:ie});return[`M${g},${E} C${H},${U} ${G},${ie} ${M},${N}`,W,Z,se,oe]}function n0n({sourceX:g,sourceY:E,targetX:x,targetY:M}){const N=Math.abs(x-g)/2,$=x0}const uGn=({source:g,sourceHandle:E,target:x,targetHandle:M})=>`xy-edge__${g}${E||""}-${x}${M||""}`,oGn=(g,E)=>E.some(x=>x.source===g.source&&x.target===g.target&&(x.sourceHandle===g.sourceHandle||!x.sourceHandle&&!g.sourceHandle)&&(x.targetHandle===g.targetHandle||!x.targetHandle&&!g.targetHandle)),sGn=(g,E,x={})=>{if(!g.source||!g.target)return E;const M=x.getEdgeId||uGn;let N;return Hdn(g)?N={...g}:N={...g,id:M(g)},oGn(N,E)?E:(N.sourceHandle===null&&delete N.sourceHandle,N.targetHandle===null&&delete N.targetHandle,E.concat(N))};function t0n({sourceX:g,sourceY:E,targetX:x,targetY:M}){const[N,$,k,H]=n0n({sourceX:g,sourceY:E,targetX:x,targetY:M});return[`M ${g},${E}L ${x},${M}`,N,$,k,H]}const g1n={[ur.Left]:{x:-1,y:0},[ur.Right]:{x:1,y:0},[ur.Top]:{x:0,y:-1},[ur.Bottom]:{x:0,y:1}},lGn=({source:g,sourcePosition:E=ur.Bottom,target:x})=>E===ur.Left||E===ur.Right?g.xMath.sqrt(Math.pow(E.x-g.x,2)+Math.pow(E.y-g.y,2));function fGn({source:g,sourcePosition:E=ur.Bottom,target:x,targetPosition:M=ur.Top,center:N,offset:$,stepPosition:k}){const H=g1n[E],U=g1n[M],G={x:g.x+H.x*$,y:g.y+H.y*$},ie={x:x.x+U.x*$,y:x.y+U.y*$},W=lGn({source:G,sourcePosition:E,target:ie}),Z=W.x!==0?"x":"y",se=W[Z];let oe=[],ee,Me;const pe={x:0,y:0},Pe={x:0,y:0},[,,ae,Ne]=n0n({sourceX:g.x,sourceY:g.y,targetX:x.x,targetY:x.y});if(H[Z]*U[Z]===-1){Z==="x"?(ee=N.x??G.x+(ie.x-G.x)*k,Me=N.y??(G.y+ie.y)/2):(ee=N.x??(G.x+ie.x)/2,Me=N.y??G.y+(ie.y-G.y)*k);const An=[{x:ee,y:G.y},{x:ee,y:ie.y}],xn=[{x:G.x,y:Me},{x:ie.x,y:Me}];H[Z]===se?oe=Z==="x"?An:xn:oe=Z==="x"?xn:An}else{const An=[{x:G.x,y:ie.y}],xn=[{x:ie.x,y:G.y}];if(Z==="x"?oe=H.x===se?xn:An:oe=H.y===se?An:xn,E===M){const Je=Math.abs(g[Z]-x[Z]);if(Je<=$){const pn=Math.min($-1,$-Je);H[Z]===se?pe[Z]=(G[Z]>g[Z]?-1:1)*pn:Pe[Z]=(ie[Z]>x[Z]?-1:1)*pn}}if(E!==M){const Je=Z==="x"?"y":"x",pn=H[Z]===U[Je],xe=G[Je]>ie[Je],qe=G[Je]=Y?(ee=(tt.x+vn.x)/2,Me=oe[0].y):(ee=oe[0].x,Me=(tt.y+vn.y)/2)}const Xe={x:G.x+pe.x,y:G.y+pe.y},ln={x:ie.x+Pe.x,y:ie.y+Pe.y};return[[g,...Xe.x!==oe[0].x||Xe.y!==oe[0].y?[Xe]:[],...oe,...ln.x!==oe[oe.length-1].x||ln.y!==oe[oe.length-1].y?[ln]:[],x],ee,Me,ae,Ne]}function aGn(g,E,x,M){const N=Math.min(w1n(g,E)/2,w1n(E,x)/2,M),{x:$,y:k}=E;if(g.x===$&&$===x.x||g.y===k&&k===x.y)return`L${$} ${k}`;if(g.y===k){const G=g.xx.id===E):g[0])||null}function ske(g,E){return g?typeof g=="string"?g:`${E?`${E}__`:""}${Object.keys(g).sort().map(M=>`${M}=${g[M]}`).join("&")}`:""}function dGn(g,{id:E,defaultColor:x,defaultMarkerStart:M,defaultMarkerEnd:N}){const $=new Set;return g.reduce((k,H)=>([H.markerStart||M,H.markerEnd||N].forEach(U=>{if(U&&typeof U=="object"){const G=ske(U,E);$.has(G)||(k.push({id:G,color:U.color||x,...U}),$.add(G))}}),k),[]).sort((k,H)=>k.id.localeCompare(H.id))}const i0n=1e3,bGn=10,Ake={nodeOrigin:[0,0],nodeExtent:XG,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},gGn={...Ake,checkEquality:!0};function Mke(g,E){const x={...g};for(const M in E)E[M]!==void 0&&(x[M]=E[M]);return x}function wGn(g,E,x){const M=Mke(Ake,x);for(const N of g.values())if(N.parentId)Tke(N,g,E,M);else{const $=tq(N,M.nodeOrigin),k=vD(N.extent)?N.extent:M.nodeExtent,H=MA($,k,s6(N));N.internals.positionAbsolute=H}}function pGn(g,E){if(!g.handles)return g.measured?E?.internals.handleBounds:void 0;const x=[],M=[];for(const N of g.handles){const $={id:N.id,width:N.width??1,height:N.height??1,nodeId:g.id,x:N.x,y:N.y,position:N.position,type:N.type};N.type==="source"?x.push($):N.type==="target"&&M.push($)}return{source:x,target:M}}function Cke(g){return g==="manual"}function lke(g,E,x,M={}){const N=Mke(gGn,M),$={i:0},k=new Map(E),H=N?.elevateNodesOnSelect&&!Cke(N.zIndexMode)?i0n:0;let U=g.length>0,G=!1;E.clear(),x.clear();for(const ie of g){let W=k.get(ie.id);if(N.checkEquality&&ie===W?.internals.userNode)E.set(ie.id,W);else{const Z=tq(ie,N.nodeOrigin),se=vD(ie.extent)?ie.extent:N.nodeExtent,oe=MA(Z,se,s6(ie));W={...N.defaults,...ie,measured:{width:ie.measured?.width,height:ie.measured?.height},internals:{positionAbsolute:oe,handleBounds:pGn(ie,W),z:r0n(ie,H,N.zIndexMode),userNode:ie}},E.set(ie.id,W)}(W.measured===void 0||W.measured.width===void 0||W.measured.height===void 0)&&!W.hidden&&(U=!1),ie.parentId&&Tke(W,E,x,M,$),G||=ie.selected??!1}return{nodesInitialized:U,hasSelectedNodes:G}}function mGn(g,E){if(!g.parentId)return;const x=E.get(g.parentId);x?x.set(g.id,g):E.set(g.parentId,new Map([[g.id,g]]))}function Tke(g,E,x,M,N){const{elevateNodesOnSelect:$,nodeOrigin:k,nodeExtent:H,zIndexMode:U}=Mke(Ake,M),G=g.parentId,ie=E.get(G);if(!ie){console.warn(`Parent node ${G} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}mGn(g,x),N&&!ie.parentId&&ie.internals.rootParentIndex===void 0&&U==="auto"&&(ie.internals.rootParentIndex=++N.i,ie.internals.z=ie.internals.z+N.i*bGn),N&&ie.internals.rootParentIndex!==void 0&&(N.i=ie.internals.rootParentIndex);const W=$&&!Cke(U)?i0n:0,{x:Z,y:se,z:oe}=vGn(g,ie,k,H,W,U),{positionAbsolute:ee}=g.internals,Me=Z!==ee.x||se!==ee.y;(Me||oe!==g.internals.z)&&E.set(g.id,{...g,internals:{...g.internals,positionAbsolute:Me?{x:Z,y:se}:ee,z:oe}})}function r0n(g,E,x){const M=nv(g.zIndex)?g.zIndex:0;return Cke(x)?M:M+(g.selected?E:0)}function vGn(g,E,x,M,N,$){const{x:k,y:H}=E.internals.positionAbsolute,U=s6(g),G=tq(g,x),ie=vD(g.extent)?MA(G,g.extent,U):G;let W=MA({x:k+ie.x,y:H+ie.y},M,U);g.extent==="parent"&&(W=qdn(W,U,E));const Z=r0n(g,N,$),se=E.internals.z??0;return{x:W.x,y:W.y,z:se>=Z?se+1:Z}}function Oke(g,E,x,M=[0,0]){const N=[],$=new Map;for(const k of g){const H=E.get(k.parentId);if(!H)continue;const U=$.get(k.parentId)?.expandedRect??mD(H),G=Xdn(U,k.rect);$.set(k.parentId,{expandedRect:G,parent:H})}return $.size>0&&$.forEach(({expandedRect:k,parent:H},U)=>{const G=H.internals.positionAbsolute,ie=s6(H),W=H.origin??M,Z=k.x0||se>0||Me||pe)&&(N.push({id:U,type:"position",position:{x:H.position.x-Z+Me,y:H.position.y-se+pe}}),x.get(U)?.forEach(Pe=>{g.some(ae=>ae.id===Pe.id)||N.push({id:Pe.id,type:"position",position:{x:Pe.position.x+Z,y:Pe.position.y+se}})})),(ie.width0){const se=Oke(Z,E,x,N);G.push(...se)}return{changes:G,updatedInternals:U}}async function kGn({delta:g,panZoom:E,transform:x,translateExtent:M,width:N,height:$}){if(!E||!g.x&&!g.y)return Promise.resolve(!1);const k=await E.setViewportConstrained({x:x[0]+g.x,y:x[1]+g.y,zoom:x[2]},[[0,0],[N,$]],M),H=!!k&&(k.x!==x[0]||k.y!==x[1]||k.k!==x[2]);return Promise.resolve(H)}function y1n(g,E,x,M,N,$){let k=N;const H=M.get(k)||new Map;M.set(k,H.set(x,E)),k=`${N}-${g}`;const U=M.get(k)||new Map;if(M.set(k,U.set(x,E)),$){k=`${N}-${g}-${$}`;const G=M.get(k)||new Map;M.set(k,G.set(x,E))}}function c0n(g,E,x){g.clear(),E.clear();for(const M of x){const{source:N,target:$,sourceHandle:k=null,targetHandle:H=null}=M,U={edgeId:M.id,source:N,target:$,sourceHandle:k,targetHandle:H},G=`${N}-${k}--${$}-${H}`,ie=`${$}-${H}--${N}-${k}`;y1n("source",U,ie,g,N,k),y1n("target",U,G,g,$,H),E.set(M.id,M)}}function u0n(g,E){if(!g.parentId)return!1;const x=E.get(g.parentId);return x?x.selected?!0:u0n(x,E):!1}function k1n(g,E,x){let M=g;do{if(M?.matches?.(E))return!0;if(M===x)return!1;M=M?.parentElement}while(M);return!1}function jGn(g,E,x,M){const N=new Map;for(const[$,k]of g)if((k.selected||k.id===M)&&(!k.parentId||!u0n(k,g))&&(k.draggable||E&&typeof k.draggable>"u")){const H=g.get($);H&&N.set($,{id:$,position:H.position||{x:0,y:0},distance:{x:x.x-H.internals.positionAbsolute.x,y:x.y-H.internals.positionAbsolute.y},extent:H.extent,parentId:H.parentId,origin:H.origin,expandParent:H.expandParent,internals:{positionAbsolute:H.internals.positionAbsolute||{x:0,y:0}},measured:{width:H.measured.width??0,height:H.measured.height??0}})}return N}function R7e({nodeId:g,dragItems:E,nodeLookup:x,dragging:M=!0}){const N=[];for(const[k,H]of E){const U=x.get(k)?.internals.userNode;U&&N.push({...U,position:H.position,dragging:M})}if(!g)return[N[0],N];const $=x.get(g)?.internals.userNode;return[$?{...$,position:E.get(g)?.position||$.position,dragging:M}:N[0],N]}function EGn({dragItems:g,snapGrid:E,x,y:M}){const N=g.values().next().value;if(!N)return null;const $={x:x-N.distance.x,y:M-N.distance.y},k=rq($,E);return{x:k.x-$.x,y:k.y-$.y}}function SGn({onNodeMouseDown:g,getStoreItems:E,onDragStart:x,onDrag:M,onDragStop:N}){let $={x:null,y:null},k=0,H=new Map,U=!1,G={x:0,y:0},ie=null,W=!1,Z=null,se=!1,oe=!1,ee=null;function Me({noDragClassName:Pe,handleSelector:ae,domNode:Ne,isSelectable:Xe,nodeId:ln,nodeClickDistance:on=0}){Z=Fg(Ne);function An({x:wn,y:Y}){const{nodeLookup:Je,nodeExtent:pn,snapGrid:xe,snapToGrid:qe,nodeOrigin:fn,onNodeDrag:$e,onSelectionDrag:Mn,onError:ye,updateNodePositions:Re}=E();$={x:wn,y:Y};let Hn=!1;const rt=H.size>1,Jt=rt&&pn?oke(iq(H)):null,di=rt&&qe?EGn({dragItems:H,snapGrid:xe,x:wn,y:Y}):null;for(const[Gt,xt]of H){if(!Je.has(Gt))continue;let si={x:wn-xt.distance.x,y:Y-xt.distance.y};qe&&(si=di?{x:Math.round(si.x+di.x),y:Math.round(si.y+di.y)}:rq(si,xe));let Kr=null;if(rt&&pn&&!xt.extent&&Jt){const{positionAbsolute:bi}=xt.internals,zi=bi.x-Jt.x+pn[0][0],cu=bi.x+xt.measured.width-Jt.x2+pn[1][0],Fu=bi.y-Jt.y+pn[0][1],Rs=bi.y+xt.measured.height-Jt.y2+pn[1][1];Kr=[[zi,Fu],[cu,Rs]]}const{position:Er,positionAbsolute:Mt}=Gdn({nodeId:Gt,nextPosition:si,nodeLookup:Je,nodeExtent:Kr||pn,nodeOrigin:fn,onError:ye});Hn=Hn||xt.position.x!==Er.x||xt.position.y!==Er.y,xt.position=Er,xt.internals.positionAbsolute=Mt}if(oe=oe||Hn,!!Hn&&(Re(H,!0),ee&&(M||$e||!ln&&Mn))){const[Gt,xt]=R7e({nodeId:ln,dragItems:H,nodeLookup:Je});M?.(ee,H,Gt,xt),$e?.(ee,Gt,xt),ln||Mn?.(ee,xt)}}async function xn(){if(!ie)return;const{transform:wn,panBy:Y,autoPanSpeed:Je,autoPanOnNodeDrag:pn}=E();if(!pn){U=!1,cancelAnimationFrame(k);return}const[xe,qe]=Udn(G,ie,Je);(xe!==0||qe!==0)&&($.x=($.x??0)-xe/wn[2],$.y=($.y??0)-qe/wn[2],await Y({x:xe,y:qe})&&An($)),k=requestAnimationFrame(xn)}function tt(wn){const{nodeLookup:Y,multiSelectionActive:Je,nodesDraggable:pn,transform:xe,snapGrid:qe,snapToGrid:fn,selectNodesOnDrag:$e,onNodeDragStart:Mn,onSelectionDragStart:ye,unselectNodesAndEdges:Re}=E();W=!0,(!$e||!Xe)&&!Je&&ln&&(Y.get(ln)?.selected||Re()),Xe&&$e&&ln&&g?.(ln);const Hn=JG(wn.sourceEvent,{transform:xe,snapGrid:qe,snapToGrid:fn,containerBounds:ie});if($=Hn,H=jGn(Y,pn,Hn,ln),H.size>0&&(x||Mn||!ln&&ye)){const[rt,Jt]=R7e({nodeId:ln,dragItems:H,nodeLookup:Y});x?.(wn.sourceEvent,H,rt,Jt),Mn?.(wn.sourceEvent,rt,Jt),ln||ye?.(wn.sourceEvent,Jt)}}const vn=Edn().clickDistance(on).on("start",wn=>{const{domNode:Y,nodeDragThreshold:Je,transform:pn,snapGrid:xe,snapToGrid:qe}=E();ie=Y?.getBoundingClientRect()||null,se=!1,oe=!1,ee=wn.sourceEvent,Je===0&&tt(wn),$=JG(wn.sourceEvent,{transform:pn,snapGrid:xe,snapToGrid:qe,containerBounds:ie}),G=tv(wn.sourceEvent,ie)}).on("drag",wn=>{const{autoPanOnNodeDrag:Y,transform:Je,snapGrid:pn,snapToGrid:xe,nodeDragThreshold:qe,nodeLookup:fn}=E(),$e=JG(wn.sourceEvent,{transform:Je,snapGrid:pn,snapToGrid:xe,containerBounds:ie});if(ee=wn.sourceEvent,(wn.sourceEvent.type==="touchmove"&&wn.sourceEvent.touches.length>1||ln&&!fn.has(ln))&&(se=!0),!se){if(!U&&Y&&W&&(U=!0,xn()),!W){const Mn=tv(wn.sourceEvent,ie),ye=Mn.x-G.x,Re=Mn.y-G.y;Math.sqrt(ye*ye+Re*Re)>qe&&tt(wn)}($.x!==$e.xSnapped||$.y!==$e.ySnapped)&&H&&W&&(G=tv(wn.sourceEvent,ie),An($e))}}).on("end",wn=>{if(!(!W||se)&&(U=!1,W=!1,cancelAnimationFrame(k),H.size>0)){const{nodeLookup:Y,updateNodePositions:Je,onNodeDragStop:pn,onSelectionDragStop:xe}=E();if(oe&&(Je(H,!1),oe=!1),N||pn||!ln&&xe){const[qe,fn]=R7e({nodeId:ln,dragItems:H,nodeLookup:Y,dragging:!1});N?.(wn.sourceEvent,H,qe,fn),pn?.(wn.sourceEvent,qe,fn),ln||xe?.(wn.sourceEvent,fn)}}}).filter(wn=>{const Y=wn.target;return!wn.button&&(!Pe||!k1n(Y,`.${Pe}`,Ne))&&(!ae||k1n(Y,ae,Ne))});Z.call(vn)}function pe(){Z?.on(".drag",null)}return{update:Me,destroy:pe}}function xGn(g,E,x){const M=[],N={x:g.x-x,y:g.y-x,width:x*2,height:x*2};for(const $ of E.values())YG(N,mD($))>0&&M.push($);return M}const AGn=250;function MGn(g,E,x,M){let N=[],$=1/0;const k=xGn(g,x,E+AGn);for(const H of k){const U=[...H.internals.handleBounds?.source??[],...H.internals.handleBounds?.target??[]];for(const G of U){if(M.nodeId===G.nodeId&&M.type===G.type&&M.id===G.id)continue;const{x:ie,y:W}=CA(H,G,G.position,!0),Z=Math.sqrt(Math.pow(ie-g.x,2)+Math.pow(W-g.y,2));Z>E||(Z<$?(N=[{...G,x:ie,y:W}],$=Z):Z===$&&N.push({...G,x:ie,y:W}))}}if(!N.length)return null;if(N.length>1){const H=M.type==="source"?"target":"source";return N.find(U=>U.type===H)??N[0]}return N[0]}function o0n(g,E,x,M,N,$=!1){const k=M.get(g);if(!k)return null;const H=N==="strict"?k.internals.handleBounds?.[E]:[...k.internals.handleBounds?.source??[],...k.internals.handleBounds?.target??[]],U=(x?H?.find(G=>G.id===x):H?.[0])??null;return U&&$?{...U,...CA(k,U,U.position,!0)}:U}function s0n(g,E){return g||(E?.classList.contains("target")?"target":E?.classList.contains("source")?"source":null)}function CGn(g,E){let x=null;return E?x=!0:g&&!E&&(x=!1),x}const l0n=()=>!0;function TGn(g,{connectionMode:E,connectionRadius:x,handleId:M,nodeId:N,edgeUpdaterType:$,isTarget:k,domNode:H,nodeLookup:U,lib:G,autoPanOnConnect:ie,flowId:W,panBy:Z,cancelConnection:se,onConnectStart:oe,onConnect:ee,onConnectEnd:Me,isValidConnection:pe=l0n,onReconnectEnd:Pe,updateConnection:ae,getTransform:Ne,getFromHandle:Xe,autoPanSpeed:ln,dragThreshold:on=1,handleDomNode:An}){const xn=Ydn(g.target);let tt=0,vn;const{x:wn,y:Y}=tv(g),Je=s0n($,An),pn=H?.getBoundingClientRect();let xe=!1;if(!pn||!Je)return;const qe=o0n(N,Je,M,U,E);if(!qe)return;let fn=tv(g,pn),$e=!1,Mn=null,ye=!1,Re=null;function Hn(){if(!ie||!pn)return;const[Er,Mt]=Udn(fn,pn,ln);Z({x:Er,y:Mt}),tt=requestAnimationFrame(Hn)}const rt={...qe,nodeId:N,type:Je,position:qe.position},Jt=U.get(N);let Gt={inProgress:!0,isValid:null,from:CA(Jt,rt,ur.Left,!0),fromHandle:rt,fromPosition:rt.position,fromNode:Jt,to:fn,toHandle:null,toPosition:l1n[rt.position],toNode:null,pointer:fn};function xt(){xe=!0,ae(Gt),oe?.(g,{nodeId:N,handleId:M,handleType:Je})}on===0&&xt();function si(Er){if(!xe){const{x:Rs,y:ia}=tv(Er),ef=Rs-wn,Oa=ia-Y;if(!(ef*ef+Oa*Oa>on*on))return;xt()}if(!Xe()||!rt){Kr(Er);return}const Mt=Ne();fn=tv(Er,pn),vn=MGn(cq(fn,Mt,!1,[1,1]),x,U,rt),$e||(Hn(),$e=!0);const bi=f0n(Er,{handle:vn,connectionMode:E,fromNodeId:N,fromHandleId:M,fromType:k?"target":"source",isValidConnection:pe,doc:xn,lib:G,flowId:W,nodeLookup:U});Re=bi.handleDomNode,Mn=bi.connection,ye=CGn(!!vn,bi.isValid);const zi=U.get(N),cu=zi?CA(zi,rt,ur.Left,!0):Gt.from,Fu={...Gt,from:cu,isValid:ye,to:bi.toHandle&&ye?xue({x:bi.toHandle.x,y:bi.toHandle.y},Mt):fn,toHandle:bi.toHandle,toPosition:ye&&bi.toHandle?bi.toHandle.position:l1n[rt.position],toNode:bi.toHandle?U.get(bi.toHandle.nodeId):null,pointer:fn};ae(Fu),Gt=Fu}function Kr(Er){if(!("touches"in Er&&Er.touches.length>0)){if(xe){(vn||Re)&&Mn&&ye&&ee?.(Mn);const{inProgress:Mt,...bi}=Gt,zi={...bi,toPosition:Gt.toHandle?Gt.toPosition:null};Me?.(Er,zi),$&&Pe?.(Er,zi)}se(),cancelAnimationFrame(tt),$e=!1,ye=!1,Mn=null,Re=null,xn.removeEventListener("mousemove",si),xn.removeEventListener("mouseup",Kr),xn.removeEventListener("touchmove",si),xn.removeEventListener("touchend",Kr)}}xn.addEventListener("mousemove",si),xn.addEventListener("mouseup",Kr),xn.addEventListener("touchmove",si),xn.addEventListener("touchend",Kr)}function f0n(g,{handle:E,connectionMode:x,fromNodeId:M,fromHandleId:N,fromType:$,doc:k,lib:H,flowId:U,isValidConnection:G=l0n,nodeLookup:ie}){const W=$==="target",Z=E?k.querySelector(`.${H}-flow__handle[data-id="${U}-${E?.nodeId}-${E?.id}-${E?.type}"]`):null,{x:se,y:oe}=tv(g),ee=k.elementFromPoint(se,oe),Me=ee?.classList.contains(`${H}-flow__handle`)?ee:Z,pe={handleDomNode:Me,isValid:!1,connection:null,toHandle:null};if(Me){const Pe=s0n(void 0,Me),ae=Me.getAttribute("data-nodeid"),Ne=Me.getAttribute("data-handleid"),Xe=Me.classList.contains("connectable"),ln=Me.classList.contains("connectableend");if(!ae||!Pe)return pe;const on={source:W?ae:M,sourceHandle:W?Ne:N,target:W?M:ae,targetHandle:W?N:Ne};pe.connection=on;const xn=Xe&&ln&&(x===wD.Strict?W&&Pe==="source"||!W&&Pe==="target":ae!==M||Ne!==N);pe.isValid=xn&&G(on),pe.toHandle=o0n(ae,Pe,Ne,ie,x,!0)}return pe}const fke={onPointerDown:TGn,isValid:f0n};function OGn({domNode:g,panZoom:E,getTransform:x,getViewScale:M}){const N=Fg(g);function $({translateExtent:H,width:U,height:G,zoomStep:ie=1,pannable:W=!0,zoomable:Z=!0,inversePan:se=!1}){const oe=ae=>{if(ae.sourceEvent.type!=="wheel"||!E)return;const Ne=x(),Xe=ae.sourceEvent.ctrlKey&&QG()?10:1,ln=-ae.sourceEvent.deltaY*(ae.sourceEvent.deltaMode===1?.05:ae.sourceEvent.deltaMode?1:.002)*ie,on=Ne[2]*Math.pow(2,ln*Xe);E.scaleTo(on)};let ee=[0,0];const Me=ae=>{(ae.sourceEvent.type==="mousedown"||ae.sourceEvent.type==="touchstart")&&(ee=[ae.sourceEvent.clientX??ae.sourceEvent.touches[0].clientX,ae.sourceEvent.clientY??ae.sourceEvent.touches[0].clientY])},pe=ae=>{const Ne=x();if(ae.sourceEvent.type!=="mousemove"&&ae.sourceEvent.type!=="touchmove"||!E)return;const Xe=[ae.sourceEvent.clientX??ae.sourceEvent.touches[0].clientX,ae.sourceEvent.clientY??ae.sourceEvent.touches[0].clientY],ln=[Xe[0]-ee[0],Xe[1]-ee[1]];ee=Xe;const on=M()*Math.max(Ne[2],Math.log(Ne[2]))*(se?-1:1),An={x:Ne[0]-ln[0]*on,y:Ne[1]-ln[1]*on},xn=[[0,0],[U,G]];E.setViewportConstrained({x:An.x,y:An.y,zoom:Ne[2]},xn,H)},Pe=Rdn().on("start",Me).on("zoom",W?pe:null).on("zoom.wheel",Z?oe:null);N.call(Pe,{})}function k(){N.on("zoom",null)}return{update:$,destroy:k,pointer:Zm}}const $ue=g=>({x:g.x,y:g.y,zoom:g.k}),B7e=({x:g,y:E,zoom:x})=>_ue.translate(g,E).scale(x),fD=(g,E)=>g.target.closest(`.${E}`),a0n=(g,E)=>E===2&&Array.isArray(g)&&g.includes(2),NGn=g=>((g*=2)<=1?g*g*g:(g-=2)*g*g+2)/2,z7e=(g,E=0,x=NGn,M=()=>{})=>{const N=typeof E=="number"&&E>0;return N||M(),N?g.transition().duration(E).ease(x).on("end",M):g},h0n=g=>{const E=g.ctrlKey&&QG()?10:1;return-g.deltaY*(g.deltaMode===1?.05:g.deltaMode?1:.002)*E};function IGn({zoomPanValues:g,noWheelClassName:E,d3Selection:x,d3Zoom:M,panOnScrollMode:N,panOnScrollSpeed:$,zoomOnPinch:k,onPanZoomStart:H,onPanZoom:U,onPanZoomEnd:G}){return ie=>{if(fD(ie,E))return ie.ctrlKey&&ie.preventDefault(),!1;ie.preventDefault(),ie.stopImmediatePropagation();const W=x.property("__zoom").k||1;if(ie.ctrlKey&&k){const Me=Zm(ie),pe=h0n(ie),Pe=W*Math.pow(2,pe);M.scaleTo(x,Pe,Me,ie);return}const Z=ie.deltaMode===1?20:1;let se=N===EA.Vertical?0:ie.deltaX*Z,oe=N===EA.Horizontal?0:ie.deltaY*Z;!QG()&&ie.shiftKey&&N!==EA.Vertical&&(se=ie.deltaY*Z,oe=0),M.translateBy(x,-(se/W)*$,-(oe/W)*$,{internal:!0});const ee=$ue(x.property("__zoom"));clearTimeout(g.panScrollTimeout),g.isPanScrolling?(U?.(ie,ee),g.panScrollTimeout=setTimeout(()=>{G?.(ie,ee),g.isPanScrolling=!1},150)):(g.isPanScrolling=!0,H?.(ie,ee))}}function DGn({noWheelClassName:g,preventScrolling:E,d3ZoomHandler:x}){return function(M,N){const $=M.type==="wheel",k=!E&&$&&!M.ctrlKey,H=fD(M,g);if(M.ctrlKey&&$&&H&&M.preventDefault(),k||H)return null;M.preventDefault(),x.call(this,M,N)}}function _Gn({zoomPanValues:g,onDraggingChange:E,onPanZoomStart:x}){return M=>{if(M.sourceEvent?.internal)return;const N=$ue(M.transform);g.mouseButton=M.sourceEvent?.button||0,g.isZoomingOrPanning=!0,g.prevViewport=N,M.sourceEvent?.type==="mousedown"&&E(!0),x&&x?.(M.sourceEvent,N)}}function LGn({zoomPanValues:g,panOnDrag:E,onPaneContextMenu:x,onTransformChange:M,onPanZoom:N}){return $=>{g.usedRightMouseButton=!!(x&&a0n(E,g.mouseButton??0)),$.sourceEvent?.sync||M([$.transform.x,$.transform.y,$.transform.k]),N&&!$.sourceEvent?.internal&&N?.($.sourceEvent,$ue($.transform))}}function PGn({zoomPanValues:g,panOnDrag:E,panOnScroll:x,onDraggingChange:M,onPanZoomEnd:N,onPaneContextMenu:$}){return k=>{if(!k.sourceEvent?.internal&&(g.isZoomingOrPanning=!1,$&&a0n(E,g.mouseButton??0)&&!g.usedRightMouseButton&&k.sourceEvent&&$(k.sourceEvent),g.usedRightMouseButton=!1,M(!1),N)){const H=$ue(k.transform);g.prevViewport=H,clearTimeout(g.timerId),g.timerId=setTimeout(()=>{N?.(k.sourceEvent,H)},x?150:0)}}}function $Gn({zoomActivationKeyPressed:g,zoomOnScroll:E,zoomOnPinch:x,panOnDrag:M,panOnScroll:N,zoomOnDoubleClick:$,userSelectionActive:k,noWheelClassName:H,noPanClassName:U,lib:G,connectionInProgress:ie}){return W=>{const Z=g||E,se=x&&W.ctrlKey,oe=W.type==="wheel";if(W.button===1&&W.type==="mousedown"&&(fD(W,`${G}-flow__node`)||fD(W,`${G}-flow__edge`)))return!0;if(!M&&!Z&&!N&&!$&&!x||k||ie&&!oe||fD(W,H)&&oe||fD(W,U)&&(!oe||N&&oe&&!g)||!x&&W.ctrlKey&&oe)return!1;if(!x&&W.type==="touchstart"&&W.touches?.length>1)return W.preventDefault(),!1;if(!Z&&!N&&!se&&oe||!M&&(W.type==="mousedown"||W.type==="touchstart")||Array.isArray(M)&&!M.includes(W.button)&&W.type==="mousedown")return!1;const ee=Array.isArray(M)&&M.includes(W.button)||!W.button||W.button<=1;return(!W.ctrlKey||oe)&&ee}}function RGn({domNode:g,minZoom:E,maxZoom:x,translateExtent:M,viewport:N,onPanZoom:$,onPanZoomStart:k,onPanZoomEnd:H,onDraggingChange:U}){const G={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},ie=g.getBoundingClientRect(),W=Rdn().scaleExtent([E,x]).translateExtent(M),Z=Fg(g).call(W);Pe({x:N.x,y:N.y,zoom:pD(N.zoom,E,x)},[[0,0],[ie.width,ie.height]],M);const se=Z.on("wheel.zoom"),oe=Z.on("dblclick.zoom");W.wheelDelta(h0n);function ee(vn,wn){return Z?new Promise(Y=>{W?.interpolate(wn?.interpolate==="linear"?FG:due).transform(z7e(Z,wn?.duration,wn?.ease,()=>Y(!0)),vn)}):Promise.resolve(!1)}function Me({noWheelClassName:vn,noPanClassName:wn,onPaneContextMenu:Y,userSelectionActive:Je,panOnScroll:pn,panOnDrag:xe,panOnScrollMode:qe,panOnScrollSpeed:fn,preventScrolling:$e,zoomOnPinch:Mn,zoomOnScroll:ye,zoomOnDoubleClick:Re,zoomActivationKeyPressed:Hn,lib:rt,onTransformChange:Jt,connectionInProgress:di,paneClickDistance:Gt,selectionOnDrag:xt}){Je&&!G.isZoomingOrPanning&&pe();const si=pn&&!Hn&&!Je;W.clickDistance(xt?1/0:!nv(Gt)||Gt<0?0:Gt);const Kr=si?IGn({zoomPanValues:G,noWheelClassName:vn,d3Selection:Z,d3Zoom:W,panOnScrollMode:qe,panOnScrollSpeed:fn,zoomOnPinch:Mn,onPanZoomStart:k,onPanZoom:$,onPanZoomEnd:H}):DGn({noWheelClassName:vn,preventScrolling:$e,d3ZoomHandler:se});if(Z.on("wheel.zoom",Kr,{passive:!1}),!Je){const Mt=_Gn({zoomPanValues:G,onDraggingChange:U,onPanZoomStart:k});W.on("start",Mt);const bi=LGn({zoomPanValues:G,panOnDrag:xe,onPaneContextMenu:!!Y,onPanZoom:$,onTransformChange:Jt});W.on("zoom",bi);const zi=PGn({zoomPanValues:G,panOnDrag:xe,panOnScroll:pn,onPaneContextMenu:Y,onPanZoomEnd:H,onDraggingChange:U});W.on("end",zi)}const Er=$Gn({zoomActivationKeyPressed:Hn,panOnDrag:xe,zoomOnScroll:ye,panOnScroll:pn,zoomOnDoubleClick:Re,zoomOnPinch:Mn,userSelectionActive:Je,noPanClassName:wn,noWheelClassName:vn,lib:rt,connectionInProgress:di});W.filter(Er),Re?Z.on("dblclick.zoom",oe):Z.on("dblclick.zoom",null)}function pe(){W.on("zoom",null)}async function Pe(vn,wn,Y){const Je=B7e(vn),pn=W?.constrain()(Je,wn,Y);return pn&&await ee(pn),new Promise(xe=>xe(pn))}async function ae(vn,wn){const Y=B7e(vn);return await ee(Y,wn),new Promise(Je=>Je(Y))}function Ne(vn){if(Z){const wn=B7e(vn),Y=Z.property("__zoom");(Y.k!==vn.zoom||Y.x!==vn.x||Y.y!==vn.y)&&W?.transform(Z,wn,null,{sync:!0})}}function Xe(){const vn=Z?$dn(Z.node()):{x:0,y:0,k:1};return{x:vn.x,y:vn.y,zoom:vn.k}}function ln(vn,wn){return Z?new Promise(Y=>{W?.interpolate(wn?.interpolate==="linear"?FG:due).scaleTo(z7e(Z,wn?.duration,wn?.ease,()=>Y(!0)),vn)}):Promise.resolve(!1)}function on(vn,wn){return Z?new Promise(Y=>{W?.interpolate(wn?.interpolate==="linear"?FG:due).scaleBy(z7e(Z,wn?.duration,wn?.ease,()=>Y(!0)),vn)}):Promise.resolve(!1)}function An(vn){W?.scaleExtent(vn)}function xn(vn){W?.translateExtent(vn)}function tt(vn){const wn=!nv(vn)||vn<0?0:vn;W?.clickDistance(wn)}return{update:Me,destroy:pe,setViewport:ae,setViewportConstrained:Pe,getViewport:Xe,scaleTo:ln,scaleBy:on,setScaleExtent:An,setTranslateExtent:xn,syncViewport:Ne,setClickDistance:tt}}var yD;(function(g){g.Line="line",g.Handle="handle"})(yD||(yD={}));function BGn({width:g,prevWidth:E,height:x,prevHeight:M,affectsX:N,affectsY:$}){const k=g-E,H=x-M,U=[k>0?1:k<0?-1:0,H>0?1:H<0?-1:0];return k&&N&&(U[0]=U[0]*-1),H&&$&&(U[1]=U[1]*-1),U}function j1n(g){const E=g.includes("right")||g.includes("left"),x=g.includes("bottom")||g.includes("top"),M=g.includes("left"),N=g.includes("top");return{isHorizontal:E,isVertical:x,affectsX:M,affectsY:N}}function W7(g,E){return Math.max(0,E-g)}function Z7(g,E){return Math.max(0,g-E)}function iue(g,E,x){return Math.max(0,E-g,g-x)}function E1n(g,E){return g?!E:E}function zGn(g,E,x,M,N,$,k,H){let{affectsX:U,affectsY:G}=E;const{isHorizontal:ie,isVertical:W}=E,Z=ie&&W,{xSnapped:se,ySnapped:oe}=x,{minWidth:ee,maxWidth:Me,minHeight:pe,maxHeight:Pe}=M,{x:ae,y:Ne,width:Xe,height:ln,aspectRatio:on}=g;let An=Math.floor(ie?se-g.pointerX:0),xn=Math.floor(W?oe-g.pointerY:0);const tt=Xe+(U?-An:An),vn=ln+(G?-xn:xn),wn=-$[0]*Xe,Y=-$[1]*ln;let Je=iue(tt,ee,Me),pn=iue(vn,pe,Pe);if(k){let fn=0,$e=0;U&&An<0?fn=W7(ae+An+wn,k[0][0]):!U&&An>0&&(fn=Z7(ae+tt+wn,k[1][0])),G&&xn<0?$e=W7(Ne+xn+Y,k[0][1]):!G&&xn>0&&($e=Z7(Ne+vn+Y,k[1][1])),Je=Math.max(Je,fn),pn=Math.max(pn,$e)}if(H){let fn=0,$e=0;U&&An>0?fn=Z7(ae+An,H[0][0]):!U&&An<0&&(fn=W7(ae+tt,H[1][0])),G&&xn>0?$e=Z7(Ne+xn,H[0][1]):!G&&xn<0&&($e=W7(Ne+vn,H[1][1])),Je=Math.max(Je,fn),pn=Math.max(pn,$e)}if(N){if(ie){const fn=iue(tt/on,pe,Pe)*on;if(Je=Math.max(Je,fn),k){let $e=0;!U&&!G||U&&!G&&Z?$e=Z7(Ne+Y+tt/on,k[1][1])*on:$e=W7(Ne+Y+(U?An:-An)/on,k[0][1])*on,Je=Math.max(Je,$e)}if(H){let $e=0;!U&&!G||U&&!G&&Z?$e=W7(Ne+tt/on,H[1][1])*on:$e=Z7(Ne+(U?An:-An)/on,H[0][1])*on,Je=Math.max(Je,$e)}}if(W){const fn=iue(vn*on,ee,Me)/on;if(pn=Math.max(pn,fn),k){let $e=0;!U&&!G||G&&!U&&Z?$e=Z7(ae+vn*on+wn,k[1][0])/on:$e=W7(ae+(G?xn:-xn)*on+wn,k[0][0])/on,pn=Math.max(pn,$e)}if(H){let $e=0;!U&&!G||G&&!U&&Z?$e=W7(ae+vn*on,H[1][0])/on:$e=Z7(ae+(G?xn:-xn)*on,H[0][0])/on,pn=Math.max(pn,$e)}}}xn=xn+(xn<0?pn:-pn),An=An+(An<0?Je:-Je),N&&(Z?tt>vn*on?xn=(E1n(U,G)?-An:An)/on:An=(E1n(U,G)?-xn:xn)*on:ie?(xn=An/on,G=U):(An=xn*on,U=G));const xe=U?ae+An:ae,qe=G?Ne+xn:Ne;return{width:Xe+(U?-An:An),height:ln+(G?-xn:xn),x:$[0]*An*(U?-1:1)+xe,y:$[1]*xn*(G?-1:1)+qe}}const d0n={width:0,height:0,x:0,y:0},FGn={...d0n,pointerX:0,pointerY:0,aspectRatio:1};function JGn(g){return[[0,0],[g.measured.width,g.measured.height]]}function HGn(g,E,x){const M=E.position.x+g.position.x,N=E.position.y+g.position.y,$=g.measured.width??0,k=g.measured.height??0,H=x[0]*$,U=x[1]*k;return[[M-H,N-U],[M+$-H,N+k-U]]}function GGn({domNode:g,nodeId:E,getStoreItems:x,onChange:M,onEnd:N}){const $=Fg(g);let k={controlDirection:j1n("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function H({controlPosition:G,boundaries:ie,keepAspectRatio:W,resizeDirection:Z,onResizeStart:se,onResize:oe,onResizeEnd:ee,shouldResize:Me}){let pe={...d0n},Pe={...FGn};k={boundaries:ie,resizeDirection:Z,keepAspectRatio:W,controlDirection:j1n(G)};let ae,Ne=null,Xe=[],ln,on,An,xn=!1;const tt=Edn().on("start",vn=>{const{nodeLookup:wn,transform:Y,snapGrid:Je,snapToGrid:pn,nodeOrigin:xe,paneDomNode:qe}=x();if(ae=wn.get(E),!ae)return;Ne=qe?.getBoundingClientRect()??null;const{xSnapped:fn,ySnapped:$e}=JG(vn.sourceEvent,{transform:Y,snapGrid:Je,snapToGrid:pn,containerBounds:Ne});pe={width:ae.measured.width??0,height:ae.measured.height??0,x:ae.position.x??0,y:ae.position.y??0},Pe={...pe,pointerX:fn,pointerY:$e,aspectRatio:pe.width/pe.height},ln=void 0,ae.parentId&&(ae.extent==="parent"||ae.expandParent)&&(ln=wn.get(ae.parentId),on=ln&&ae.extent==="parent"?JGn(ln):void 0),Xe=[],An=void 0;for(const[Mn,ye]of wn)if(ye.parentId===E&&(Xe.push({id:Mn,position:{...ye.position},extent:ye.extent}),ye.extent==="parent"||ye.expandParent)){const Re=HGn(ye,ae,ye.origin??xe);An?An=[[Math.min(Re[0][0],An[0][0]),Math.min(Re[0][1],An[0][1])],[Math.max(Re[1][0],An[1][0]),Math.max(Re[1][1],An[1][1])]]:An=Re}se?.(vn,{...pe})}).on("drag",vn=>{const{transform:wn,snapGrid:Y,snapToGrid:Je,nodeOrigin:pn}=x(),xe=JG(vn.sourceEvent,{transform:wn,snapGrid:Y,snapToGrid:Je,containerBounds:Ne}),qe=[];if(!ae)return;const{x:fn,y:$e,width:Mn,height:ye}=pe,Re={},Hn=ae.origin??pn,{width:rt,height:Jt,x:di,y:Gt}=zGn(Pe,k.controlDirection,xe,k.boundaries,k.keepAspectRatio,Hn,on,An),xt=rt!==Mn,si=Jt!==ye,Kr=di!==fn&&xt,Er=Gt!==$e&&si;if(!Kr&&!Er&&!xt&&!si)return;if((Kr||Er||Hn[0]===1||Hn[1]===1)&&(Re.x=Kr?di:pe.x,Re.y=Er?Gt:pe.y,pe.x=Re.x,pe.y=Re.y,Xe.length>0)){const cu=di-fn,Fu=Gt-$e;for(const Rs of Xe)Rs.position={x:Rs.position.x-cu+Hn[0]*(rt-Mn),y:Rs.position.y-Fu+Hn[1]*(Jt-ye)},qe.push(Rs)}if((xt||si)&&(Re.width=xt&&(!k.resizeDirection||k.resizeDirection==="horizontal")?rt:pe.width,Re.height=si&&(!k.resizeDirection||k.resizeDirection==="vertical")?Jt:pe.height,pe.width=Re.width,pe.height=Re.height),ln&&ae.expandParent){const cu=Hn[0]*(Re.width??0);Re.x&&Re.x{xn&&(ee?.(vn,{...pe}),N?.({...pe}),xn=!1)});$.call(tt)}function U(){$.on(".drag",null)}return{update:H,destroy:U}}var F7e={exports:{}},J7e={},H7e={exports:{}},G7e={};var S1n;function qGn(){if(S1n)return G7e;S1n=1;var g=ZG();function E(W,Z){return W===Z&&(W!==0||1/W===1/Z)||W!==W&&Z!==Z}var x=typeof Object.is=="function"?Object.is:E,M=g.useState,N=g.useEffect,$=g.useLayoutEffect,k=g.useDebugValue;function H(W,Z){var se=Z(),oe=M({inst:{value:se,getSnapshot:Z}}),ee=oe[0].inst,Me=oe[1];return $(function(){ee.value=se,ee.getSnapshot=Z,U(ee)&&Me({inst:ee})},[W,se,Z]),N(function(){return U(ee)&&Me({inst:ee}),W(function(){U(ee)&&Me({inst:ee})})},[W]),k(se),se}function U(W){var Z=W.getSnapshot;W=W.value;try{var se=Z();return!x(W,se)}catch{return!0}}function G(W,Z){return Z()}var ie=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?G:H;return G7e.useSyncExternalStore=g.useSyncExternalStore!==void 0?g.useSyncExternalStore:ie,G7e}var x1n;function UGn(){return x1n||(x1n=1,H7e.exports=qGn()),H7e.exports}var A1n;function XGn(){if(A1n)return J7e;A1n=1;var g=ZG(),E=UGn();function x(G,ie){return G===ie&&(G!==0||1/G===1/ie)||G!==G&&ie!==ie}var M=typeof Object.is=="function"?Object.is:x,N=E.useSyncExternalStore,$=g.useRef,k=g.useEffect,H=g.useMemo,U=g.useDebugValue;return J7e.useSyncExternalStoreWithSelector=function(G,ie,W,Z,se){var oe=$(null);if(oe.current===null){var ee={hasValue:!1,value:null};oe.current=ee}else ee=oe.current;oe=H(function(){function pe(ln){if(!Pe){if(Pe=!0,ae=ln,ln=Z(ln),se!==void 0&&ee.hasValue){var on=ee.value;if(se(on,ln))return Ne=on}return Ne=ln}if(on=Ne,M(ae,ln))return on;var An=Z(ln);return se!==void 0&&se(on,An)?(ae=ln,on):(ae=ln,Ne=An)}var Pe=!1,ae,Ne,Xe=W===void 0?null:W;return[function(){return pe(ie())},Xe===null?void 0:function(){return pe(Xe())}]},[ie,W,Z,se]);var Me=N(G,oe[0],oe[1]);return k(function(){ee.hasValue=!0,ee.value=Me},[Me]),U(Me),Me},J7e}var M1n;function KGn(){return M1n||(M1n=1,F7e.exports=XGn()),F7e.exports}var VGn=KGn();const YGn=bke(VGn),QGn={},C1n=g=>{let E;const x=new Set,M=(ie,W)=>{const Z=typeof ie=="function"?ie(E):ie;if(!Object.is(Z,E)){const se=E;E=W??(typeof Z!="object"||Z===null)?Z:Object.assign({},E,Z),x.forEach(oe=>oe(E,se))}},N=()=>E,U={setState:M,getState:N,getInitialState:()=>G,subscribe:ie=>(x.add(ie),()=>x.delete(ie)),destroy:()=>{(QGn?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),x.clear()}},G=E=g(M,N,U);return U},WGn=g=>g?C1n(g):C1n,{useDebugValue:ZGn}=uzn,{useSyncExternalStoreWithSelector:eqn}=YGn,nqn=g=>g;function b0n(g,E=nqn,x){const M=eqn(g.subscribe,g.getState,g.getServerState||g.getInitialState,E,x);return ZGn(M),M}const T1n=(g,E)=>{const x=WGn(g),M=(N,$=E)=>b0n(x,N,$);return Object.assign(M,x),M},tqn=(g,E)=>g?T1n(g,E):T1n;function jl(g,E){if(Object.is(g,E))return!0;if(typeof g!="object"||g===null||typeof E!="object"||E===null)return!1;if(g instanceof Map&&E instanceof Map){if(g.size!==E.size)return!1;for(const[M,N]of g)if(!Object.is(N,E.get(M)))return!1;return!0}if(g instanceof Set&&E instanceof Set){if(g.size!==E.size)return!1;for(const M of g)if(!E.has(M))return!1;return!0}const x=Object.keys(g);if(x.length!==Object.keys(E).length)return!1;for(const M of x)if(!Object.prototype.hasOwnProperty.call(E,M)||!Object.is(g[M],E[M]))return!1;return!0}var iqn=sdn();const Rue=Be.createContext(null),rqn=Rue.Provider,g0n=a5.error001();function zu(g,E){const x=Be.useContext(Rue);if(x===null)throw new Error(g0n);return b0n(x,g,E)}function El(){const g=Be.useContext(Rue);if(g===null)throw new Error(g0n);return Be.useMemo(()=>({getState:g.getState,setState:g.setState,subscribe:g.subscribe}),[g])}const O1n={display:"none"},cqn={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},w0n="react-flow__node-desc",p0n="react-flow__edge-desc",uqn="react-flow__aria-live",oqn=g=>g.ariaLiveMessage,sqn=g=>g.ariaLabelConfig;function lqn({rfId:g}){const E=zu(oqn);return _.jsx("div",{id:`${uqn}-${g}`,"aria-live":"assertive","aria-atomic":"true",style:cqn,children:E})}function fqn({rfId:g,disableKeyboardA11y:E}){const x=zu(sqn);return _.jsxs(_.Fragment,{children:[_.jsx("div",{id:`${w0n}-${g}`,style:O1n,children:E?x["node.a11yDescription.default"]:x["node.a11yDescription.keyboardDisabled"]}),_.jsx("div",{id:`${p0n}-${g}`,style:O1n,children:x["edge.a11yDescription.default"]}),!E&&_.jsx(lqn,{rfId:g})]})}const Bue=Be.forwardRef(({position:g="top-left",children:E,className:x,style:M,...N},$)=>{const k=`${g}`.split("-");return _.jsx("div",{className:Ta(["react-flow__panel",x,...k]),style:M,ref:$,...N,children:E})});Bue.displayName="Panel";function aqn({proOptions:g,position:E="bottom-right"}){return g?.hideAttribution?null:_.jsx(Bue,{position:E,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:_.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const hqn=g=>{const E=[],x=[];for(const[,M]of g.nodeLookup)M.selected&&E.push(M.internals.userNode);for(const[,M]of g.edgeLookup)M.selected&&x.push(M);return{selectedNodes:E,selectedEdges:x}},rue=g=>g.id;function dqn(g,E){return jl(g.selectedNodes.map(rue),E.selectedNodes.map(rue))&&jl(g.selectedEdges.map(rue),E.selectedEdges.map(rue))}function bqn({onSelectionChange:g}){const E=El(),{selectedNodes:x,selectedEdges:M}=zu(hqn,dqn);return Be.useEffect(()=>{const N={nodes:x,edges:M};g?.(N),E.getState().onSelectionChangeHandlers.forEach($=>$(N))},[x,M,g]),null}const gqn=g=>!!g.onSelectionChangeHandlers;function wqn({onSelectionChange:g}){const E=zu(gqn);return g||E?_.jsx(bqn,{onSelectionChange:g}):null}const ake=typeof window<"u"?Be.useLayoutEffect:Be.useEffect,m0n=[0,0],pqn={x:0,y:0,zoom:1},mqn=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],N1n=[...mqn,"rfId"],vqn=g=>({setNodes:g.setNodes,setEdges:g.setEdges,setMinZoom:g.setMinZoom,setMaxZoom:g.setMaxZoom,setTranslateExtent:g.setTranslateExtent,setNodeExtent:g.setNodeExtent,reset:g.reset,setDefaultNodesAndEdges:g.setDefaultNodesAndEdges}),I1n={translateExtent:XG,nodeOrigin:m0n,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function yqn(g){const{setNodes:E,setEdges:x,setMinZoom:M,setMaxZoom:N,setTranslateExtent:$,setNodeExtent:k,reset:H,setDefaultNodesAndEdges:U}=zu(vqn,jl),G=El();ake(()=>(U(g.defaultNodes,g.defaultEdges),()=>{ie.current=I1n,H()}),[]);const ie=Be.useRef(I1n);return ake(()=>{for(const W of N1n){const Z=g[W],se=ie.current[W];Z!==se&&(typeof g[W]>"u"||(W==="nodes"?E(Z):W==="edges"?x(Z):W==="minZoom"?M(Z):W==="maxZoom"?N(Z):W==="translateExtent"?$(Z):W==="nodeExtent"?k(Z):W==="ariaLabelConfig"?G.setState({ariaLabelConfig:tGn(Z)}):W==="fitView"?G.setState({fitViewQueued:Z}):W==="fitViewOptions"?G.setState({fitViewOptions:Z}):G.setState({[W]:Z})))}ie.current=g},N1n.map(W=>g[W])),null}function D1n(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function kqn(g){const[E,x]=Be.useState(g==="system"?null:g);return Be.useEffect(()=>{if(g!=="system"){x(g);return}const M=D1n(),N=()=>x(M?.matches?"dark":"light");return N(),M?.addEventListener("change",N),()=>{M?.removeEventListener("change",N)}},[g]),E!==null?E:D1n()?.matches?"dark":"light"}const _1n=typeof document<"u"?document:null;function WG(g=null,E={target:_1n,actInsideInputWithModifier:!0}){const[x,M]=Be.useState(!1),N=Be.useRef(!1),$=Be.useRef(new Set([])),[k,H]=Be.useMemo(()=>{if(g!==null){const G=(Array.isArray(g)?g:[g]).filter(W=>typeof W=="string").map(W=>W.replace("+",` `).replace(` `,` +`).split(` -`)),ie=G.reduce((W,Z)=>W.concat(...Z),[]);return[G,ie]}return[[],[]]},[g]);return Be.useEffect(()=>{const U=E?.target??_1n,G=E?.actInsideInputWithModifier??!0;if(g!==null){const ie=le=>{if(N.current=le.ctrlKey||le.metaKey||le.shiftKey||le.altKey,(!N.current||N.current&&!G)&&Qdn(le))return!1;const ee=P1n(le.code,H);if($.current.add(le[ee]),L1n(k,$.current,!1)){const Ce=le.composedPath?.()?.[0]||le.target,pe=Ce?.nodeName==="BUTTON"||Ce?.nodeName==="A";E.preventDefault!==!1&&(N.current||!pe)&&le.preventDefault(),M(!0)}},W=le=>{const oe=P1n(le.code,H);L1n(k,$.current,!0)?(M(!1),$.current.clear()):$.current.delete(le[oe]),le.key==="Meta"&&$.current.clear(),N.current=!1},Z=()=>{$.current.clear(),M(!1)};return U?.addEventListener("keydown",ie),U?.addEventListener("keyup",W),window.addEventListener("blur",Z),window.addEventListener("contextmenu",Z),()=>{U?.removeEventListener("keydown",ie),U?.removeEventListener("keyup",W),window.removeEventListener("blur",Z),window.removeEventListener("contextmenu",Z)}}},[g,M]),x}function L1n(g,E,x){return g.filter(M=>x||M.length===E.size).some(M=>M.every(N=>E.has(N)))}function P1n(g,E){return E.includes(g)?"code":"key"}const jqn=()=>{const g=El();return Be.useMemo(()=>({zoomIn:E=>{const{panZoom:x}=g.getState();return x?x.scaleBy(1.2,E):Promise.resolve(!1)},zoomOut:E=>{const{panZoom:x}=g.getState();return x?x.scaleBy(1/1.2,E):Promise.resolve(!1)},zoomTo:(E,x)=>{const{panZoom:M}=g.getState();return M?M.scaleTo(E,x):Promise.resolve(!1)},getZoom:()=>g.getState().transform[2],setViewport:async(E,x)=>{const{transform:[M,N,$],panZoom:k}=g.getState();return k?(await k.setViewport({x:E.x??M,y:E.y??N,zoom:E.zoom??$},x),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[E,x,M]=g.getState().transform;return{x:E,y:x,zoom:M}},setCenter:async(E,x,M)=>g.getState().setCenter(E,x,M),fitBounds:async(E,x)=>{const{width:M,height:N,minZoom:$,maxZoom:k,panZoom:H}=g.getState(),U=Ske(E,M,N,$,k,x?.padding??.1);return H?(await H.setViewport(U,{duration:x?.duration,ease:x?.ease,interpolate:x?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(E,x={})=>{const{transform:M,snapGrid:N,snapToGrid:$,domNode:k}=g.getState();if(!k)return E;const{x:H,y:U}=k.getBoundingClientRect(),G={x:E.x-H,y:E.y-U},ie=x.snapGrid??N,W=x.snapToGrid??$;return cq(G,M,W,ie)},flowToScreenPosition:E=>{const{transform:x,domNode:M}=g.getState();if(!M)return E;const{x:N,y:$}=M.getBoundingClientRect(),k=xue(E,x);return{x:k.x+N,y:k.y+$}}}),[])};function v0n(g,E){const x=[],M=new Map,N=[];for(const $ of g)if($.type==="add"){N.push($);continue}else if($.type==="remove"||$.type==="replace")M.set($.id,[$]);else{const k=M.get($.id);k?k.push($):M.set($.id,[$])}for(const $ of E){const k=M.get($.id);if(!k){x.push($);continue}if(k[0].type==="remove")continue;if(k[0].type==="replace"){x.push({...k[0].item});continue}const H={...$};for(const U of k)Eqn(U,H);x.push(H)}return N.length&&N.forEach($=>{$.index!==void 0?x.splice($.index,0,{...$.item}):x.push({...$.item})}),x}function Eqn(g,E){switch(g.type){case"select":{E.selected=g.selected;break}case"position":{typeof g.position<"u"&&(E.position=g.position),typeof g.dragging<"u"&&(E.dragging=g.dragging);break}case"dimensions":{typeof g.dimensions<"u"&&(E.measured={...g.dimensions},g.setAttributes&&((g.setAttributes===!0||g.setAttributes==="width")&&(E.width=g.dimensions.width),(g.setAttributes===!0||g.setAttributes==="height")&&(E.height=g.dimensions.height))),typeof g.resizing=="boolean"&&(E.resizing=g.resizing);break}}}function y0n(g,E){return v0n(g,E)}function k0n(g,E){return v0n(g,E)}function yA(g,E){return{id:g,type:"select",selected:E}}function aD(g,E=new Set,x=!1){const M=[];for(const[N,$]of g){const k=E.has(N);!($.selected===void 0&&!k)&&$.selected!==k&&(x&&($.selected=k),M.push(yA($.id,k)))}return M}function $1n({items:g=[],lookup:E}){const x=[],M=new Map(g.map(N=>[N.id,N]));for(const[N,$]of g.entries()){const k=E.get($.id),H=k?.internals?.userNode??k;H!==void 0&&H!==$&&x.push({id:$.id,item:$,type:"replace"}),H===void 0&&x.push({item:$,type:"add",index:N})}for(const[N]of E)M.get(N)===void 0&&x.push({id:N,type:"remove"});return x}function R1n(g){return{id:g.id,type:"remove"}}const B1n=g=>UHn(g),Sqn=g=>Hdn(g);function j0n(g){return Be.forwardRef(g)}function z1n(g){const[E,x]=Be.useState(BigInt(0)),[M]=Be.useState(()=>xqn(()=>x(N=>N+BigInt(1))));return ake(()=>{const N=M.get();N.length&&(g(N),M.reset())},[E]),M}function xqn(g){let E=[];return{get:()=>E,reset:()=>{E=[]},push:x=>{E.push(x),g()}}}const E0n=Be.createContext(null);function Aqn({children:g}){const E=El(),x=Be.useCallback(H=>{const{nodes:U=[],setNodes:G,hasDefaultNodes:ie,onNodesChange:W,nodeLookup:Z,fitViewQueued:le,onNodesChangeMiddlewareMap:oe}=E.getState();let ee=U;for(const pe of H)ee=typeof pe=="function"?pe(ee):pe;let Ce=$1n({items:ee,lookup:Z});for(const pe of oe.values())Ce=pe(Ce);ie&&G(ee),Ce.length>0?W?.(Ce):le&&window.requestAnimationFrame(()=>{const{fitViewQueued:pe,nodes:$e,setNodes:ae}=E.getState();pe&&ae($e)})},[]),M=z1n(x),N=Be.useCallback(H=>{const{edges:U=[],setEdges:G,hasDefaultEdges:ie,onEdgesChange:W,edgeLookup:Z}=E.getState();let le=U;for(const oe of H)le=typeof oe=="function"?oe(le):oe;ie?G(le):W&&W($1n({items:le,lookup:Z}))},[]),$=z1n(N),k=Be.useMemo(()=>({nodeQueue:M,edgeQueue:$}),[]);return L.jsx(E0n.Provider,{value:k,children:g})}function Mqn(){const g=Be.useContext(E0n);if(!g)throw new Error("useBatchContext must be used within a BatchProvider");return g}const Cqn=g=>!!g.panZoom;function Nke(){const g=jqn(),E=El(),x=Mqn(),M=zu(Cqn),N=Be.useMemo(()=>{const $=W=>E.getState().nodeLookup.get(W),k=W=>{x.nodeQueue.push(W)},H=W=>{x.edgeQueue.push(W)},U=W=>{const{nodeLookup:Z,nodeOrigin:le}=E.getState(),oe=B1n(W)?W:Z.get(W.id),ee=oe.parentId?Vdn(oe.position,oe.measured,oe.parentId,Z,le):oe.position,Ce={...oe,position:ee,width:oe.measured?.width??oe.width,height:oe.measured?.height??oe.height};return mD(Ce)},G=(W,Z,le={replace:!1})=>{k(oe=>oe.map(ee=>{if(ee.id===W){const Ce=typeof Z=="function"?Z(ee):Z;return le.replace&&B1n(Ce)?Ce:{...ee,...Ce}}return ee}))},ie=(W,Z,le={replace:!1})=>{H(oe=>oe.map(ee=>{if(ee.id===W){const Ce=typeof Z=="function"?Z(ee):Z;return le.replace&&Sqn(Ce)?Ce:{...ee,...Ce}}return ee}))};return{getNodes:()=>E.getState().nodes.map(W=>({...W})),getNode:W=>$(W)?.internals.userNode,getInternalNode:$,getEdges:()=>{const{edges:W=[]}=E.getState();return W.map(Z=>({...Z}))},getEdge:W=>E.getState().edgeLookup.get(W),setNodes:k,setEdges:H,addNodes:W=>{const Z=Array.isArray(W)?W:[W];x.nodeQueue.push(le=>[...le,...Z])},addEdges:W=>{const Z=Array.isArray(W)?W:[W];x.edgeQueue.push(le=>[...le,...Z])},toObject:()=>{const{nodes:W=[],edges:Z=[],transform:le}=E.getState(),[oe,ee,Ce]=le;return{nodes:W.map(pe=>({...pe})),edges:Z.map(pe=>({...pe})),viewport:{x:oe,y:ee,zoom:Ce}}},deleteElements:async({nodes:W=[],edges:Z=[]})=>{const{nodes:le,edges:oe,onNodesDelete:ee,onEdgesDelete:Ce,triggerNodeChanges:pe,triggerEdgeChanges:$e,onDelete:ae,onBeforeDelete:Ne}=E.getState(),{nodes:Ue,edges:ln}=await QHn({nodesToRemove:W,edgesToRemove:Z,nodes:le,edges:oe,onBeforeDelete:Ne}),un=ln.length>0,An=Ue.length>0;if(un){const xn=ln.map(R1n);Ce?.(ln),$e(xn)}if(An){const xn=Ue.map(R1n);ee?.(Ue),pe(xn)}return(An||un)&&ae?.({nodes:Ue,edges:ln}),{deletedNodes:Ue,deletedEdges:ln}},getIntersectingNodes:(W,Z=!0,le)=>{const oe=a1n(W),ee=oe?W:U(W),Ce=le!==void 0;return ee?(le||E.getState().nodes).filter(pe=>{const $e=E.getState().nodeLookup.get(pe.id);if($e&&!oe&&(pe.id===W.id||!$e.internals.positionAbsolute))return!1;const ae=mD(Ce?pe:$e),Ne=YG(ae,ee);return Z&&Ne>0||Ne>=ae.width*ae.height||Ne>=ee.width*ee.height}):[]},isNodeIntersecting:(W,Z,le=!0)=>{const ee=a1n(W)?W:U(W);if(!ee)return!1;const Ce=YG(ee,Z);return le&&Ce>0||Ce>=Z.width*Z.height||Ce>=ee.width*ee.height},updateNode:G,updateNodeData:(W,Z,le={replace:!1})=>{G(W,oe=>{const ee=typeof Z=="function"?Z(oe):Z;return le.replace?{...oe,data:ee}:{...oe,data:{...oe.data,...ee}}},le)},updateEdge:ie,updateEdgeData:(W,Z,le={replace:!1})=>{ie(W,oe=>{const ee=typeof Z=="function"?Z(oe):Z;return le.replace?{...oe,data:ee}:{...oe,data:{...oe.data,...ee}}},le)},getNodesBounds:W=>{const{nodeLookup:Z,nodeOrigin:le}=E.getState();return XHn(W,{nodeLookup:Z,nodeOrigin:le})},getHandleConnections:({type:W,id:Z,nodeId:le})=>Array.from(E.getState().connectionLookup.get(`${le}-${W}${Z?`-${Z}`:""}`)?.values()??[]),getNodeConnections:({type:W,handleId:Z,nodeId:le})=>Array.from(E.getState().connectionLookup.get(`${le}${W?Z?`-${W}-${Z}`:`-${W}`:""}`)?.values()??[]),fitView:async W=>{const Z=E.getState().fitViewResolver??nGn();return E.setState({fitViewQueued:!0,fitViewOptions:W,fitViewResolver:Z}),x.nodeQueue.push(le=>[...le]),Z.promise}}},[]);return Be.useMemo(()=>({...N,...g,viewportInitialized:M}),[M])}const F1n=g=>g.selected,Tqn=typeof window<"u"?window:void 0;function Oqn({deleteKeyCode:g,multiSelectionKeyCode:E}){const x=El(),{deleteElements:M}=Nke(),N=WG(g,{actInsideInputWithModifier:!1}),$=WG(E,{target:Tqn});Be.useEffect(()=>{if(N){const{edges:k,nodes:H}=x.getState();M({nodes:H.filter(F1n),edges:k.filter(F1n)}),x.setState({nodesSelectionActive:!1})}},[N]),Be.useEffect(()=>{x.setState({multiSelectionActive:$})},[$])}function Nqn(g){const E=El();Be.useEffect(()=>{const x=()=>{if(!g.current||!(g.current.checkVisibility?.()??!0))return!1;const M=xke(g.current);(M.height===0||M.width===0)&&E.getState().onError?.("004",a5.error004()),E.setState({width:M.width||500,height:M.height||500})};if(g.current){x(),window.addEventListener("resize",x);const M=new ResizeObserver(()=>x());return M.observe(g.current),()=>{window.removeEventListener("resize",x),M&&g.current&&M.unobserve(g.current)}}},[])}const zue={position:"absolute",width:"100%",height:"100%",top:0,left:0},Iqn=g=>({userSelectionActive:g.userSelectionActive,lib:g.lib,connectionInProgress:g.connection.inProgress});function Dqn({onPaneContextMenu:g,zoomOnScroll:E=!0,zoomOnPinch:x=!0,panOnScroll:M=!1,panOnScrollSpeed:N=.5,panOnScrollMode:$=EA.Free,zoomOnDoubleClick:k=!0,panOnDrag:H=!0,defaultViewport:U,translateExtent:G,minZoom:ie,maxZoom:W,zoomActivationKeyCode:Z,preventScrolling:le=!0,children:oe,noWheelClassName:ee,noPanClassName:Ce,onViewportChange:pe,isControlledViewport:$e,paneClickDistance:ae,selectionOnDrag:Ne}){const Ue=El(),ln=Be.useRef(null),{userSelectionActive:un,lib:An,connectionInProgress:xn}=zu(Iqn,jl),nt=WG(Z),dn=Be.useRef();Nqn(ln);const bn=Be.useCallback(Y=>{pe?.({x:Y[0],y:Y[1],zoom:Y[2]}),$e||Ue.setState({transform:Y})},[pe,$e]);return Be.useEffect(()=>{if(ln.current){dn.current=RGn({domNode:ln.current,minZoom:ie,maxZoom:W,translateExtent:G,viewport:U,onDraggingChange:Ae=>Ue.setState(ve=>ve.paneDragging===Ae?ve:{paneDragging:Ae}),onPanZoomStart:(Ae,ve)=>{const{onViewportChangeStart:nn,onMoveStart:yn}=Ue.getState();yn?.(Ae,ve),nn?.(ve)},onPanZoom:(Ae,ve)=>{const{onViewportChange:nn,onMove:yn}=Ue.getState();yn?.(Ae,ve),nn?.(ve)},onPanZoomEnd:(Ae,ve)=>{const{onViewportChangeEnd:nn,onMoveEnd:yn}=Ue.getState();yn?.(Ae,ve),nn?.(ve)}});const{x:Y,y:Je,zoom:pn}=dn.current.getViewport();return Ue.setState({panZoom:dn.current,transform:[Y,Je,pn],domNode:ln.current.closest(".react-flow")}),()=>{dn.current?.destroy()}}},[]),Be.useEffect(()=>{dn.current?.update({onPaneContextMenu:g,zoomOnScroll:E,zoomOnPinch:x,panOnScroll:M,panOnScrollSpeed:N,panOnScrollMode:$,zoomOnDoubleClick:k,panOnDrag:H,zoomActivationKeyPressed:nt,preventScrolling:le,noPanClassName:Ce,userSelectionActive:un,noWheelClassName:ee,lib:An,onTransformChange:bn,connectionInProgress:xn,selectionOnDrag:Ne,paneClickDistance:ae})},[g,E,x,M,N,$,k,H,nt,le,Ce,un,ee,An,bn,xn,Ne,ae]),L.jsx("div",{className:"react-flow__renderer",ref:ln,style:zue,children:oe})}const _qn=g=>({userSelectionActive:g.userSelectionActive,userSelectionRect:g.userSelectionRect});function Lqn(){const{userSelectionActive:g,userSelectionRect:E}=zu(_qn,jl);return g&&E?L.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:E.width,height:E.height,transform:`translate(${E.x}px, ${E.y}px)`}}):null}const q7e=(g,E)=>x=>{x.target===E.current&&g?.(x)},Pqn=g=>({userSelectionActive:g.userSelectionActive,elementsSelectable:g.elementsSelectable,connectionInProgress:g.connection.inProgress,dragging:g.paneDragging});function $qn({isSelecting:g,selectionKeyPressed:E,selectionMode:x=KG.Full,panOnDrag:M,paneClickDistance:N,selectionOnDrag:$,onSelectionStart:k,onSelectionEnd:H,onPaneClick:U,onPaneContextMenu:G,onPaneScroll:ie,onPaneMouseEnter:W,onPaneMouseMove:Z,onPaneMouseLeave:le,children:oe}){const ee=El(),{userSelectionActive:Ce,elementsSelectable:pe,dragging:$e,connectionInProgress:ae}=zu(Pqn,jl),Ne=pe&&(g||Ce),Ue=Be.useRef(null),ln=Be.useRef(),un=Be.useRef(new Set),An=Be.useRef(new Set),xn=Be.useRef(!1),nt=nn=>{if(xn.current||ae){xn.current=!1;return}U?.(nn),ee.getState().resetSelectedElements(),ee.setState({nodesSelectionActive:!1})},dn=nn=>{if(Array.isArray(M)&&M?.includes(2)){nn.preventDefault();return}G?.(nn)},bn=ie?nn=>ie(nn):void 0,Y=nn=>{xn.current&&(nn.stopPropagation(),xn.current=!1)},Je=nn=>{const{domNode:yn}=ee.getState();if(ln.current=yn?.getBoundingClientRect(),!ln.current)return;const Pn=nn.target===Ue.current;if(!Pn&&!!nn.target.closest(".nokey")||!g||!($&&Pn||E)||nn.button!==0||!nn.isPrimary)return;nn.target?.setPointerCapture?.(nn.pointerId),xn.current=!1;const{x:tt,y:ut}=tv(nn.nativeEvent,ln.current);ee.setState({userSelectionRect:{width:0,height:0,startX:tt,startY:ut,x:tt,y:ut}}),Pn||(nn.stopPropagation(),nn.preventDefault())},pn=nn=>{const{userSelectionRect:yn,transform:Pn,nodeLookup:ye,edgeLookup:Re,connectionLookup:tt,triggerNodeChanges:ut,triggerEdgeChanges:Jt,defaultEdgeOptions:di,resetSelectedElements:Gt}=ee.getState();if(!ln.current||!yn)return;const{x:xt,y:si}=tv(nn.nativeEvent,ln.current),{startX:Kr,startY:Er}=yn;if(!xn.current){const Fu=E?0:N;if(Math.hypot(xt-Kr,si-Er)<=Fu)return;Gt(),k?.(nn)}xn.current=!0;const Mt={startX:Kr,startY:Er,x:xtFu.id)),An.current=new Set;const cu=di?.selectable??!0;for(const Fu of un.current){const Rs=tt.get(Fu);if(Rs)for(const{edgeId:ia}of Rs.values()){const ef=Re.get(ia);ef&&(ef.selectable??cu)&&An.current.add(ia)}}if(!h1n(bi,un.current)){const Fu=aD(ye,un.current,!0);ut(Fu)}if(!h1n(zi,An.current)){const Fu=aD(Re,An.current);Jt(Fu)}ee.setState({userSelectionRect:Mt,userSelectionActive:!0,nodesSelectionActive:!1})},Ae=nn=>{nn.button===0&&(nn.target?.releasePointerCapture?.(nn.pointerId),!Ce&&nn.target===Ue.current&&ee.getState().userSelectionRect&&nt?.(nn),ee.setState({userSelectionActive:!1,userSelectionRect:null}),xn.current&&(H?.(nn),ee.setState({nodesSelectionActive:un.current.size>0})))},ve=M===!0||Array.isArray(M)&&M.includes(0);return L.jsxs("div",{className:Ta(["react-flow__pane",{draggable:ve,dragging:$e,selection:g}]),onClick:Ne?void 0:q7e(nt,Ue),onContextMenu:q7e(dn,Ue),onWheel:q7e(bn,Ue),onPointerEnter:Ne?void 0:W,onPointerMove:Ne?pn:Z,onPointerUp:Ne?Ae:void 0,onPointerDownCapture:Ne?Je:void 0,onClickCapture:Ne?Y:void 0,onPointerLeave:le,ref:Ue,style:zue,children:[oe,L.jsx(Lqn,{})]})}function hke({id:g,store:E,unselect:x=!1,nodeRef:M}){const{addSelectedNodes:N,unselectNodesAndEdges:$,multiSelectionActive:k,nodeLookup:H,onError:U}=E.getState(),G=H.get(g);if(!G){U?.("012",a5.error012(g));return}E.setState({nodesSelectionActive:!1}),G.selected?(x||G.selected&&k)&&($({nodes:[G],edges:[]}),requestAnimationFrame(()=>M?.current?.blur())):N([g])}function S0n({nodeRef:g,disabled:E=!1,noDragClassName:x,handleSelector:M,nodeId:N,isSelectable:$,nodeClickDistance:k}){const H=El(),[U,G]=Be.useState(!1),ie=Be.useRef();return Be.useEffect(()=>{ie.current=SGn({getStoreItems:()=>H.getState(),onNodeMouseDown:W=>{hke({id:W,store:H,nodeRef:g})},onDragStart:()=>{G(!0)},onDragStop:()=>{G(!1)}})},[]),Be.useEffect(()=>{if(!(E||!g.current||!ie.current))return ie.current.update({noDragClassName:x,handleSelector:M,domNode:g.current,isSelectable:$,nodeId:N,nodeClickDistance:k}),()=>{ie.current?.destroy()}},[x,M,E,$,g,N,k]),U}const Rqn=g=>E=>E.selected&&(E.draggable||g&&typeof E.draggable>"u");function x0n(){const g=El();return Be.useCallback(x=>{const{nodeExtent:M,snapToGrid:N,snapGrid:$,nodesDraggable:k,onError:H,updateNodePositions:U,nodeLookup:G,nodeOrigin:ie}=g.getState(),W=new Map,Z=Rqn(k),le=N?$[0]:5,oe=N?$[1]:5,ee=x.direction.x*le*x.factor,Ce=x.direction.y*oe*x.factor;for(const[,pe]of G){if(!Z(pe))continue;let $e={x:pe.internals.positionAbsolute.x+ee,y:pe.internals.positionAbsolute.y+Ce};N&&($e=rq($e,$));const{position:ae,positionAbsolute:Ne}=Gdn({nodeId:pe.id,nextPosition:$e,nodeLookup:G,nodeExtent:M,nodeOrigin:ie,onError:H});pe.position=ae,pe.internals.positionAbsolute=Ne,W.set(pe.id,pe)}U(W)},[])}const Ike=Be.createContext(null),Bqn=Ike.Provider;Ike.Consumer;const A0n=()=>Be.useContext(Ike),zqn=g=>({connectOnClick:g.connectOnClick,noPanClassName:g.noPanClassName,rfId:g.rfId}),Fqn=(g,E,x)=>M=>{const{connectionClickStartHandle:N,connectionMode:$,connection:k}=M,{fromHandle:H,toHandle:U,isValid:G}=k,ie=U?.nodeId===g&&U?.id===E&&U?.type===x;return{connectingFrom:H?.nodeId===g&&H?.id===E&&H?.type===x,connectingTo:ie,clickConnecting:N?.nodeId===g&&N?.id===E&&N?.type===x,isPossibleEndHandle:$===wD.Strict?H?.type!==x:g!==H?.nodeId||E!==H?.id,connectionInProcess:!!H,clickConnectionInProcess:!!N,valid:ie&&G}};function Jqn({type:g="source",position:E=ur.Top,isValidConnection:x,isConnectable:M=!0,isConnectableStart:N=!0,isConnectableEnd:$=!0,id:k,onConnect:H,children:U,className:G,onMouseDown:ie,onTouchStart:W,...Z},le){const oe=k||null,ee=g==="target",Ce=El(),pe=A0n(),{connectOnClick:$e,noPanClassName:ae,rfId:Ne}=zu(zqn,jl),{connectingFrom:Ue,connectingTo:ln,clickConnecting:un,isPossibleEndHandle:An,connectionInProcess:xn,clickConnectionInProcess:nt,valid:dn}=zu(Fqn(pe,oe,g),jl);pe||Ce.getState().onError?.("010",a5.error010());const bn=pn=>{const{defaultEdgeOptions:Ae,onConnect:ve,hasDefaultEdges:nn}=Ce.getState(),yn={...Ae,...pn};if(nn){const{edges:Pn,setEdges:ye}=Ce.getState();ye(sGn(yn,Pn))}ve?.(yn),H?.(yn)},Y=pn=>{if(!pe)return;const Ae=Wdn(pn.nativeEvent);if(N&&(Ae&&pn.button===0||!Ae)){const ve=Ce.getState();fke.onPointerDown(pn.nativeEvent,{handleDomNode:pn.currentTarget,autoPanOnConnect:ve.autoPanOnConnect,connectionMode:ve.connectionMode,connectionRadius:ve.connectionRadius,domNode:ve.domNode,nodeLookup:ve.nodeLookup,lib:ve.lib,isTarget:ee,handleId:oe,nodeId:pe,flowId:ve.rfId,panBy:ve.panBy,cancelConnection:ve.cancelConnection,onConnectStart:ve.onConnectStart,onConnectEnd:(...nn)=>Ce.getState().onConnectEnd?.(...nn),updateConnection:ve.updateConnection,onConnect:bn,isValidConnection:x||((...nn)=>Ce.getState().isValidConnection?.(...nn)??!0),getTransform:()=>Ce.getState().transform,getFromHandle:()=>Ce.getState().connection.fromHandle,autoPanSpeed:ve.autoPanSpeed,dragThreshold:ve.connectionDragThreshold})}Ae?ie?.(pn):W?.(pn)},Je=pn=>{const{onClickConnectStart:Ae,onClickConnectEnd:ve,connectionClickStartHandle:nn,connectionMode:yn,isValidConnection:Pn,lib:ye,rfId:Re,nodeLookup:tt,connection:ut}=Ce.getState();if(!pe||!nn&&!N)return;if(!nn){Ae?.(pn.nativeEvent,{nodeId:pe,handleId:oe,handleType:g}),Ce.setState({connectionClickStartHandle:{nodeId:pe,type:g,id:oe}});return}const Jt=Ydn(pn.target),di=x||Pn,{connection:Gt,isValid:xt}=fke.isValid(pn.nativeEvent,{handle:{nodeId:pe,id:oe,type:g},connectionMode:yn,fromNodeId:nn.nodeId,fromHandleId:nn.id||null,fromType:nn.type,isValidConnection:di,flowId:Re,doc:Jt,lib:ye,nodeLookup:tt});xt&&Gt&&bn(Gt);const si=structuredClone(ut);delete si.inProgress,si.toPosition=si.toHandle?si.toHandle.position:null,ve?.(pn,si),Ce.setState({connectionClickStartHandle:null})};return L.jsx("div",{"data-handleid":oe,"data-nodeid":pe,"data-handlepos":E,"data-id":`${Ne}-${pe}-${oe}-${g}`,className:Ta(["react-flow__handle",`react-flow__handle-${E}`,"nodrag",ae,G,{source:!ee,target:ee,connectable:M,connectablestart:N,connectableend:$,clickconnecting:un,connectingfrom:Ue,connectingto:ln,valid:dn,connectionindicator:M&&(!xn||An)&&(xn||nt?$:N)}]),onMouseDown:Y,onTouchStart:Y,onClick:$e?Je:void 0,ref:le,...Z,children:U})}const h5=Be.memo(j0n(Jqn));function Hqn({data:g,isConnectable:E,sourcePosition:x=ur.Bottom}){return L.jsxs(L.Fragment,{children:[g?.label,L.jsx(h5,{type:"source",position:x,isConnectable:E})]})}function Gqn({data:g,isConnectable:E,targetPosition:x=ur.Top,sourcePosition:M=ur.Bottom}){return L.jsxs(L.Fragment,{children:[L.jsx(h5,{type:"target",position:x,isConnectable:E}),g?.label,L.jsx(h5,{type:"source",position:M,isConnectable:E})]})}function qqn(){return null}function Uqn({data:g,isConnectable:E,targetPosition:x=ur.Top}){return L.jsxs(L.Fragment,{children:[L.jsx(h5,{type:"target",position:x,isConnectable:E}),g?.label]})}const Mue={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},J1n={input:Hqn,default:Gqn,output:Uqn,group:qqn};function Xqn(g){return g.internals.handleBounds===void 0?{width:g.width??g.initialWidth??g.style?.width,height:g.height??g.initialHeight??g.style?.height}:{width:g.width??g.style?.width,height:g.height??g.style?.height}}const Kqn=g=>{const{width:E,height:x,x:M,y:N}=iq(g.nodeLookup,{filter:$=>!!$.selected});return{width:nv(E)?E:null,height:nv(x)?x:null,userSelectionActive:g.userSelectionActive,transformString:`translate(${g.transform[0]}px,${g.transform[1]}px) scale(${g.transform[2]}) translate(${M}px,${N}px)`}};function Vqn({onSelectionContextMenu:g,noPanClassName:E,disableKeyboardA11y:x}){const M=El(),{width:N,height:$,transformString:k,userSelectionActive:H}=zu(Kqn,jl),U=x0n(),G=Be.useRef(null);Be.useEffect(()=>{x||G.current?.focus({preventScroll:!0})},[x]);const ie=!H&&N!==null&&$!==null;if(S0n({nodeRef:G,disabled:!ie}),!ie)return null;const W=g?le=>{const oe=M.getState().nodes.filter(ee=>ee.selected);g(le,oe)}:void 0,Z=le=>{Object.prototype.hasOwnProperty.call(Mue,le.key)&&(le.preventDefault(),U({direction:Mue[le.key],factor:le.shiftKey?4:1}))};return L.jsx("div",{className:Ta(["react-flow__nodesselection","react-flow__container",E]),style:{transform:k},children:L.jsx("div",{ref:G,className:"react-flow__nodesselection-rect",onContextMenu:W,tabIndex:x?void 0:-1,onKeyDown:x?void 0:Z,style:{width:N,height:$}})})}const H1n=typeof window<"u"?window:void 0,Yqn=g=>({nodesSelectionActive:g.nodesSelectionActive,userSelectionActive:g.userSelectionActive});function M0n({children:g,onPaneClick:E,onPaneMouseEnter:x,onPaneMouseMove:M,onPaneMouseLeave:N,onPaneContextMenu:$,onPaneScroll:k,paneClickDistance:H,deleteKeyCode:U,selectionKeyCode:G,selectionOnDrag:ie,selectionMode:W,onSelectionStart:Z,onSelectionEnd:le,multiSelectionKeyCode:oe,panActivationKeyCode:ee,zoomActivationKeyCode:Ce,elementsSelectable:pe,zoomOnScroll:$e,zoomOnPinch:ae,panOnScroll:Ne,panOnScrollSpeed:Ue,panOnScrollMode:ln,zoomOnDoubleClick:un,panOnDrag:An,defaultViewport:xn,translateExtent:nt,minZoom:dn,maxZoom:bn,preventScrolling:Y,onSelectionContextMenu:Je,noWheelClassName:pn,noPanClassName:Ae,disableKeyboardA11y:ve,onViewportChange:nn,isControlledViewport:yn}){const{nodesSelectionActive:Pn,userSelectionActive:ye}=zu(Yqn,jl),Re=WG(G,{target:H1n}),tt=WG(ee,{target:H1n}),ut=tt||An,Jt=tt||Ne,di=ie&&ut!==!0,Gt=Re||ye||di;return Oqn({deleteKeyCode:U,multiSelectionKeyCode:oe}),L.jsx(Dqn,{onPaneContextMenu:$,elementsSelectable:pe,zoomOnScroll:$e,zoomOnPinch:ae,panOnScroll:Jt,panOnScrollSpeed:Ue,panOnScrollMode:ln,zoomOnDoubleClick:un,panOnDrag:!Re&&ut,defaultViewport:xn,translateExtent:nt,minZoom:dn,maxZoom:bn,zoomActivationKeyCode:Ce,preventScrolling:Y,noWheelClassName:pn,noPanClassName:Ae,onViewportChange:nn,isControlledViewport:yn,paneClickDistance:H,selectionOnDrag:di,children:L.jsxs($qn,{onSelectionStart:Z,onSelectionEnd:le,onPaneClick:E,onPaneMouseEnter:x,onPaneMouseMove:M,onPaneMouseLeave:N,onPaneContextMenu:$,onPaneScroll:k,panOnDrag:ut,isSelecting:!!Gt,selectionMode:W,selectionKeyPressed:Re,paneClickDistance:H,selectionOnDrag:di,children:[g,Pn&&L.jsx(Vqn,{onSelectionContextMenu:Je,noPanClassName:Ae,disableKeyboardA11y:ve})]})})}M0n.displayName="FlowRenderer";const Qqn=Be.memo(M0n),Wqn=g=>E=>g?Eke(E.nodeLookup,{x:0,y:0,width:E.width,height:E.height},E.transform,!0).map(x=>x.id):Array.from(E.nodeLookup.keys());function Zqn(g){return zu(Be.useCallback(Wqn(g),[g]),jl)}const eUn=g=>g.updateNodeInternals;function nUn(){const g=zu(eUn),[E]=Be.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(x=>{const M=new Map;x.forEach(N=>{const $=N.target.getAttribute("data-id");M.set($,{id:$,nodeElement:N.target,force:!0})}),g(M)}));return Be.useEffect(()=>()=>{E?.disconnect()},[E]),E}function tUn({node:g,nodeType:E,hasDimensions:x,resizeObserver:M}){const N=El(),$=Be.useRef(null),k=Be.useRef(null),H=Be.useRef(g.sourcePosition),U=Be.useRef(g.targetPosition),G=Be.useRef(E),ie=x&&!!g.internals.handleBounds;return Be.useEffect(()=>{$.current&&!g.hidden&&(!ie||k.current!==$.current)&&(k.current&&M?.unobserve(k.current),M?.observe($.current),k.current=$.current)},[ie,g.hidden]),Be.useEffect(()=>()=>{k.current&&(M?.unobserve(k.current),k.current=null)},[]),Be.useEffect(()=>{if($.current){const W=G.current!==E,Z=H.current!==g.sourcePosition,le=U.current!==g.targetPosition;(W||Z||le)&&(G.current=E,H.current=g.sourcePosition,U.current=g.targetPosition,N.getState().updateNodeInternals(new Map([[g.id,{id:g.id,nodeElement:$.current,force:!0}]])))}},[g.id,E,g.sourcePosition,g.targetPosition]),$}function iUn({id:g,onClick:E,onMouseEnter:x,onMouseMove:M,onMouseLeave:N,onContextMenu:$,onDoubleClick:k,nodesDraggable:H,elementsSelectable:U,nodesConnectable:G,nodesFocusable:ie,resizeObserver:W,noDragClassName:Z,noPanClassName:le,disableKeyboardA11y:oe,rfId:ee,nodeTypes:Ce,nodeClickDistance:pe,onError:$e}){const{node:ae,internals:Ne,isParent:Ue}=zu(xt=>{const si=xt.nodeLookup.get(g),Kr=xt.parentLookup.has(g);return{node:si,internals:si.internals,isParent:Kr}},jl);let ln=ae.type||"default",un=Ce?.[ln]||J1n[ln];un===void 0&&($e?.("003",a5.error003(ln)),ln="default",un=Ce?.default||J1n.default);const An=!!(ae.draggable||H&&typeof ae.draggable>"u"),xn=!!(ae.selectable||U&&typeof ae.selectable>"u"),nt=!!(ae.connectable||G&&typeof ae.connectable>"u"),dn=!!(ae.focusable||ie&&typeof ae.focusable>"u"),bn=El(),Y=Kdn(ae),Je=tUn({node:ae,nodeType:ln,hasDimensions:Y,resizeObserver:W}),pn=S0n({nodeRef:Je,disabled:ae.hidden||!An,noDragClassName:Z,handleSelector:ae.dragHandle,nodeId:g,isSelectable:xn,nodeClickDistance:pe}),Ae=x0n();if(ae.hidden)return null;const ve=s6(ae),nn=Xqn(ae),yn=xn||An||E||x||M||N,Pn=x?xt=>x(xt,{...Ne.userNode}):void 0,ye=M?xt=>M(xt,{...Ne.userNode}):void 0,Re=N?xt=>N(xt,{...Ne.userNode}):void 0,tt=$?xt=>$(xt,{...Ne.userNode}):void 0,ut=k?xt=>k(xt,{...Ne.userNode}):void 0,Jt=xt=>{const{selectNodesOnDrag:si,nodeDragThreshold:Kr}=bn.getState();xn&&(!si||!An||Kr>0)&&hke({id:g,store:bn,nodeRef:Je}),E&&E(xt,{...Ne.userNode})},di=xt=>{if(!(Qdn(xt.nativeEvent)||oe)){if(Bdn.includes(xt.key)&&xn){const si=xt.key==="Escape";hke({id:g,store:bn,unselect:si,nodeRef:Je})}else if(An&&ae.selected&&Object.prototype.hasOwnProperty.call(Mue,xt.key)){xt.preventDefault();const{ariaLabelConfig:si}=bn.getState();bn.setState({ariaLiveMessage:si["node.a11yDescription.ariaLiveMessage"]({direction:xt.key.replace("Arrow","").toLowerCase(),x:~~Ne.positionAbsolute.x,y:~~Ne.positionAbsolute.y})}),Ae({direction:Mue[xt.key],factor:xt.shiftKey?4:1})}}},Gt=()=>{if(oe||!Je.current?.matches(":focus-visible"))return;const{transform:xt,width:si,height:Kr,autoPanOnNodeFocus:Er,setCenter:Mt}=bn.getState();if(!Er)return;Eke(new Map([[g,ae]]),{x:0,y:0,width:si,height:Kr},xt,!0).length>0||Mt(ae.position.x+ve.width/2,ae.position.y+ve.height/2,{zoom:xt[2]})};return L.jsx("div",{className:Ta(["react-flow__node",`react-flow__node-${ln}`,{[le]:An},ae.className,{selected:ae.selected,selectable:xn,parent:Ue,draggable:An,dragging:pn}]),ref:Je,style:{zIndex:Ne.z,transform:`translate(${Ne.positionAbsolute.x}px,${Ne.positionAbsolute.y}px)`,pointerEvents:yn?"all":"none",visibility:Y?"visible":"hidden",...ae.style,...nn},"data-id":g,"data-testid":`rf__node-${g}`,onMouseEnter:Pn,onMouseMove:ye,onMouseLeave:Re,onContextMenu:tt,onClick:Jt,onDoubleClick:ut,onKeyDown:dn?di:void 0,tabIndex:dn?0:void 0,onFocus:dn?Gt:void 0,role:ae.ariaRole??(dn?"group":void 0),"aria-roledescription":"node","aria-describedby":oe?void 0:`${w0n}-${ee}`,"aria-label":ae.ariaLabel,...ae.domAttributes,children:L.jsx(Bqn,{value:g,children:L.jsx(un,{id:g,data:ae.data,type:ln,positionAbsoluteX:Ne.positionAbsolute.x,positionAbsoluteY:Ne.positionAbsolute.y,selected:ae.selected??!1,selectable:xn,draggable:An,deletable:ae.deletable??!0,isConnectable:nt,sourcePosition:ae.sourcePosition,targetPosition:ae.targetPosition,dragging:pn,dragHandle:ae.dragHandle,zIndex:Ne.z,parentId:ae.parentId,...ve})})})}var rUn=Be.memo(iUn);const cUn=g=>({nodesDraggable:g.nodesDraggable,nodesConnectable:g.nodesConnectable,nodesFocusable:g.nodesFocusable,elementsSelectable:g.elementsSelectable,onError:g.onError});function C0n(g){const{nodesDraggable:E,nodesConnectable:x,nodesFocusable:M,elementsSelectable:N,onError:$}=zu(cUn,jl),k=Zqn(g.onlyRenderVisibleElements),H=nUn();return L.jsx("div",{className:"react-flow__nodes",style:zue,children:k.map(U=>L.jsx(rUn,{id:U,nodeTypes:g.nodeTypes,nodeExtent:g.nodeExtent,onClick:g.onNodeClick,onMouseEnter:g.onNodeMouseEnter,onMouseMove:g.onNodeMouseMove,onMouseLeave:g.onNodeMouseLeave,onContextMenu:g.onNodeContextMenu,onDoubleClick:g.onNodeDoubleClick,noDragClassName:g.noDragClassName,noPanClassName:g.noPanClassName,rfId:g.rfId,disableKeyboardA11y:g.disableKeyboardA11y,resizeObserver:H,nodesDraggable:E,nodesConnectable:x,nodesFocusable:M,elementsSelectable:N,nodeClickDistance:g.nodeClickDistance,onError:$},U))})}C0n.displayName="NodeRenderer";const uUn=Be.memo(C0n);function oUn(g){return zu(Be.useCallback(x=>{if(!g)return x.edges.map(N=>N.id);const M=[];if(x.width&&x.height)for(const N of x.edges){const $=x.nodeLookup.get(N.source),k=x.nodeLookup.get(N.target);$&&k&&cGn({sourceNode:$,targetNode:k,width:x.width,height:x.height,transform:x.transform})&&M.push(N.id)}return M},[g]),jl)}const sUn=({color:g="none",strokeWidth:E=1})=>{const x={strokeWidth:E,...g&&{stroke:g}};return L.jsx("polyline",{className:"arrow",style:x,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},lUn=({color:g="none",strokeWidth:E=1})=>{const x={strokeWidth:E,...g&&{stroke:g,fill:g}};return L.jsx("polyline",{className:"arrowclosed",style:x,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},G1n={[VG.Arrow]:sUn,[VG.ArrowClosed]:lUn};function fUn(g){const E=El();return Be.useMemo(()=>Object.prototype.hasOwnProperty.call(G1n,g)?G1n[g]:(E.getState().onError?.("009",a5.error009(g)),null),[g])}const aUn=({id:g,type:E,color:x,width:M=12.5,height:N=12.5,markerUnits:$="strokeWidth",strokeWidth:k,orient:H="auto-start-reverse"})=>{const U=fUn(E);return U?L.jsx("marker",{className:"react-flow__arrowhead",id:g,markerWidth:`${M}`,markerHeight:`${N}`,viewBox:"-10 -10 20 20",markerUnits:$,orient:H,refX:"0",refY:"0",children:L.jsx(U,{color:x,strokeWidth:k})}):null},T0n=({defaultColor:g,rfId:E})=>{const x=zu($=>$.edges),M=zu($=>$.defaultEdgeOptions),N=Be.useMemo(()=>dGn(x,{id:E,defaultColor:g,defaultMarkerStart:M?.markerStart,defaultMarkerEnd:M?.markerEnd}),[x,M,E,g]);return N.length?L.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:L.jsx("defs",{children:N.map($=>L.jsx(aUn,{id:$.id,type:$.type,color:$.color,width:$.width,height:$.height,markerUnits:$.markerUnits,strokeWidth:$.strokeWidth,orient:$.orient},$.id))})}):null};T0n.displayName="MarkerDefinitions";var hUn=Be.memo(T0n);function O0n({x:g,y:E,label:x,labelStyle:M,labelShowBg:N=!0,labelBgStyle:$,labelBgPadding:k=[2,4],labelBgBorderRadius:H=2,children:U,className:G,...ie}){const[W,Z]=Be.useState({x:1,y:0,width:0,height:0}),le=Ta(["react-flow__edge-textwrapper",G]),oe=Be.useRef(null);return Be.useEffect(()=>{if(oe.current){const ee=oe.current.getBBox();Z({x:ee.x,y:ee.y,width:ee.width,height:ee.height})}},[x]),x?L.jsxs("g",{transform:`translate(${g-W.width/2} ${E-W.height/2})`,className:le,visibility:W.width?"visible":"hidden",...ie,children:[N&&L.jsx("rect",{width:W.width+2*k[0],x:-k[0],y:-k[1],height:W.height+2*k[1],className:"react-flow__edge-textbg",style:$,rx:H,ry:H}),L.jsx("text",{className:"react-flow__edge-text",y:W.height/2,dy:"0.3em",ref:oe,style:M,children:x}),U]}):null}O0n.displayName="EdgeText";const dUn=Be.memo(O0n);function uq({path:g,labelX:E,labelY:x,label:M,labelStyle:N,labelShowBg:$,labelBgStyle:k,labelBgPadding:H,labelBgBorderRadius:U,interactionWidth:G=20,...ie}){return L.jsxs(L.Fragment,{children:[L.jsx("path",{...ie,d:g,fill:"none",className:Ta(["react-flow__edge-path",ie.className])}),G?L.jsx("path",{d:g,fill:"none",strokeOpacity:0,strokeWidth:G,className:"react-flow__edge-interaction"}):null,M&&nv(E)&&nv(x)?L.jsx(dUn,{x:E,y:x,label:M,labelStyle:N,labelShowBg:$,labelBgStyle:k,labelBgPadding:H,labelBgBorderRadius:U}):null]})}function q1n({pos:g,x1:E,y1:x,x2:M,y2:N}){return g===ur.Left||g===ur.Right?[.5*(E+M),x]:[E,.5*(x+N)]}function N0n({sourceX:g,sourceY:E,sourcePosition:x=ur.Bottom,targetX:M,targetY:N,targetPosition:$=ur.Top}){const[k,H]=q1n({pos:x,x1:g,y1:E,x2:M,y2:N}),[U,G]=q1n({pos:$,x1:M,y1:N,x2:g,y2:E}),[ie,W,Z,le]=Zdn({sourceX:g,sourceY:E,targetX:M,targetY:N,sourceControlX:k,sourceControlY:H,targetControlX:U,targetControlY:G});return[`M${g},${E} C${k},${H} ${U},${G} ${M},${N}`,ie,W,Z,le]}function I0n(g){return Be.memo(({id:E,sourceX:x,sourceY:M,targetX:N,targetY:$,sourcePosition:k,targetPosition:H,label:U,labelStyle:G,labelShowBg:ie,labelBgStyle:W,labelBgPadding:Z,labelBgBorderRadius:le,style:oe,markerEnd:ee,markerStart:Ce,interactionWidth:pe})=>{const[$e,ae,Ne]=N0n({sourceX:x,sourceY:M,sourcePosition:k,targetX:N,targetY:$,targetPosition:H}),Ue=g.isInternal?void 0:E;return L.jsx(uq,{id:Ue,path:$e,labelX:ae,labelY:Ne,label:U,labelStyle:G,labelShowBg:ie,labelBgStyle:W,labelBgPadding:Z,labelBgBorderRadius:le,style:oe,markerEnd:ee,markerStart:Ce,interactionWidth:pe})})}const bUn=I0n({isInternal:!1}),D0n=I0n({isInternal:!0});bUn.displayName="SimpleBezierEdge";D0n.displayName="SimpleBezierEdgeInternal";function _0n(g){return Be.memo(({id:E,sourceX:x,sourceY:M,targetX:N,targetY:$,label:k,labelStyle:H,labelShowBg:U,labelBgStyle:G,labelBgPadding:ie,labelBgBorderRadius:W,style:Z,sourcePosition:le=ur.Bottom,targetPosition:oe=ur.Top,markerEnd:ee,markerStart:Ce,pathOptions:pe,interactionWidth:$e})=>{const[ae,Ne,Ue]=Aue({sourceX:x,sourceY:M,sourcePosition:le,targetX:N,targetY:$,targetPosition:oe,borderRadius:pe?.borderRadius,offset:pe?.offset,stepPosition:pe?.stepPosition}),ln=g.isInternal?void 0:E;return L.jsx(uq,{id:ln,path:ae,labelX:Ne,labelY:Ue,label:k,labelStyle:H,labelShowBg:U,labelBgStyle:G,labelBgPadding:ie,labelBgBorderRadius:W,style:Z,markerEnd:ee,markerStart:Ce,interactionWidth:$e})})}const L0n=_0n({isInternal:!1}),P0n=_0n({isInternal:!0});L0n.displayName="SmoothStepEdge";P0n.displayName="SmoothStepEdgeInternal";function $0n(g){return Be.memo(({id:E,...x})=>{const M=g.isInternal?void 0:E;return L.jsx(L0n,{...x,id:M,pathOptions:Be.useMemo(()=>({borderRadius:0,offset:x.pathOptions?.offset}),[x.pathOptions?.offset])})})}const gUn=$0n({isInternal:!1}),R0n=$0n({isInternal:!0});gUn.displayName="StepEdge";R0n.displayName="StepEdgeInternal";function B0n(g){return Be.memo(({id:E,sourceX:x,sourceY:M,targetX:N,targetY:$,label:k,labelStyle:H,labelShowBg:U,labelBgStyle:G,labelBgPadding:ie,labelBgBorderRadius:W,style:Z,markerEnd:le,markerStart:oe,interactionWidth:ee})=>{const[Ce,pe,$e]=t0n({sourceX:x,sourceY:M,targetX:N,targetY:$}),ae=g.isInternal?void 0:E;return L.jsx(uq,{id:ae,path:Ce,labelX:pe,labelY:$e,label:k,labelStyle:H,labelShowBg:U,labelBgStyle:G,labelBgPadding:ie,labelBgBorderRadius:W,style:Z,markerEnd:le,markerStart:oe,interactionWidth:ee})})}const wUn=B0n({isInternal:!1}),z0n=B0n({isInternal:!0});wUn.displayName="StraightEdge";z0n.displayName="StraightEdgeInternal";function F0n(g){return Be.memo(({id:E,sourceX:x,sourceY:M,targetX:N,targetY:$,sourcePosition:k=ur.Bottom,targetPosition:H=ur.Top,label:U,labelStyle:G,labelShowBg:ie,labelBgStyle:W,labelBgPadding:Z,labelBgBorderRadius:le,style:oe,markerEnd:ee,markerStart:Ce,pathOptions:pe,interactionWidth:$e})=>{const[ae,Ne,Ue]=e0n({sourceX:x,sourceY:M,sourcePosition:k,targetX:N,targetY:$,targetPosition:H,curvature:pe?.curvature}),ln=g.isInternal?void 0:E;return L.jsx(uq,{id:ln,path:ae,labelX:Ne,labelY:Ue,label:U,labelStyle:G,labelShowBg:ie,labelBgStyle:W,labelBgPadding:Z,labelBgBorderRadius:le,style:oe,markerEnd:ee,markerStart:Ce,interactionWidth:$e})})}const pUn=F0n({isInternal:!1}),J0n=F0n({isInternal:!0});pUn.displayName="BezierEdge";J0n.displayName="BezierEdgeInternal";const U1n={default:J0n,straight:z0n,step:R0n,smoothstep:P0n,simplebezier:D0n},X1n={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},mUn=(g,E,x)=>x===ur.Left?g-E:x===ur.Right?g+E:g,vUn=(g,E,x)=>x===ur.Top?g-E:x===ur.Bottom?g+E:g,K1n="react-flow__edgeupdater";function V1n({position:g,centerX:E,centerY:x,radius:M=10,onMouseDown:N,onMouseEnter:$,onMouseOut:k,type:H}){return L.jsx("circle",{onMouseDown:N,onMouseEnter:$,onMouseOut:k,className:Ta([K1n,`${K1n}-${H}`]),cx:mUn(E,M,g),cy:vUn(x,M,g),r:M,stroke:"transparent",fill:"transparent"})}function yUn({isReconnectable:g,reconnectRadius:E,edge:x,sourceX:M,sourceY:N,targetX:$,targetY:k,sourcePosition:H,targetPosition:U,onReconnect:G,onReconnectStart:ie,onReconnectEnd:W,setReconnecting:Z,setUpdateHover:le}){const oe=El(),ee=(Ne,Ue)=>{if(Ne.button!==0)return;const{autoPanOnConnect:ln,domNode:un,connectionMode:An,connectionRadius:xn,lib:nt,onConnectStart:dn,cancelConnection:bn,nodeLookup:Y,rfId:Je,panBy:pn,updateConnection:Ae}=oe.getState(),ve=Ue.type==="target",nn=(ye,Re)=>{Z(!1),W?.(ye,x,Ue.type,Re)},yn=ye=>G?.(x,ye),Pn=(ye,Re)=>{Z(!0),ie?.(Ne,x,Ue.type),dn?.(ye,Re)};fke.onPointerDown(Ne.nativeEvent,{autoPanOnConnect:ln,connectionMode:An,connectionRadius:xn,domNode:un,handleId:Ue.id,nodeId:Ue.nodeId,nodeLookup:Y,isTarget:ve,edgeUpdaterType:Ue.type,lib:nt,flowId:Je,cancelConnection:bn,panBy:pn,isValidConnection:(...ye)=>oe.getState().isValidConnection?.(...ye)??!0,onConnect:yn,onConnectStart:Pn,onConnectEnd:(...ye)=>oe.getState().onConnectEnd?.(...ye),onReconnectEnd:nn,updateConnection:Ae,getTransform:()=>oe.getState().transform,getFromHandle:()=>oe.getState().connection.fromHandle,dragThreshold:oe.getState().connectionDragThreshold,handleDomNode:Ne.currentTarget})},Ce=Ne=>ee(Ne,{nodeId:x.target,id:x.targetHandle??null,type:"target"}),pe=Ne=>ee(Ne,{nodeId:x.source,id:x.sourceHandle??null,type:"source"}),$e=()=>le(!0),ae=()=>le(!1);return L.jsxs(L.Fragment,{children:[(g===!0||g==="source")&&L.jsx(V1n,{position:H,centerX:M,centerY:N,radius:E,onMouseDown:Ce,onMouseEnter:$e,onMouseOut:ae,type:"source"}),(g===!0||g==="target")&&L.jsx(V1n,{position:U,centerX:$,centerY:k,radius:E,onMouseDown:pe,onMouseEnter:$e,onMouseOut:ae,type:"target"})]})}function kUn({id:g,edgesFocusable:E,edgesReconnectable:x,elementsSelectable:M,onClick:N,onDoubleClick:$,onContextMenu:k,onMouseEnter:H,onMouseMove:U,onMouseLeave:G,reconnectRadius:ie,onReconnect:W,onReconnectStart:Z,onReconnectEnd:le,rfId:oe,edgeTypes:ee,noPanClassName:Ce,onError:pe,disableKeyboardA11y:$e}){let ae=zu(Mt=>Mt.edgeLookup.get(g));const Ne=zu(Mt=>Mt.defaultEdgeOptions);ae=Ne?{...Ne,...ae}:ae;let Ue=ae.type||"default",ln=ee?.[Ue]||U1n[Ue];ln===void 0&&(pe?.("011",a5.error011(Ue)),Ue="default",ln=ee?.default||U1n.default);const un=!!(ae.focusable||E&&typeof ae.focusable>"u"),An=typeof W<"u"&&(ae.reconnectable||x&&typeof ae.reconnectable>"u"),xn=!!(ae.selectable||M&&typeof ae.selectable>"u"),nt=Be.useRef(null),[dn,bn]=Be.useState(!1),[Y,Je]=Be.useState(!1),pn=El(),{zIndex:Ae,sourceX:ve,sourceY:nn,targetX:yn,targetY:Pn,sourcePosition:ye,targetPosition:Re}=zu(Be.useCallback(Mt=>{const bi=Mt.nodeLookup.get(ae.source),zi=Mt.nodeLookup.get(ae.target);if(!bi||!zi)return{zIndex:ae.zIndex,...X1n};const cu=hGn({id:g,sourceNode:bi,targetNode:zi,sourceHandle:ae.sourceHandle||null,targetHandle:ae.targetHandle||null,connectionMode:Mt.connectionMode,onError:pe});return{zIndex:rGn({selected:ae.selected,zIndex:ae.zIndex,sourceNode:bi,targetNode:zi,elevateOnSelect:Mt.elevateEdgesOnSelect,zIndexMode:Mt.zIndexMode}),...cu||X1n}},[ae.source,ae.target,ae.sourceHandle,ae.targetHandle,ae.selected,ae.zIndex]),jl),tt=Be.useMemo(()=>ae.markerStart?`url('#${ske(ae.markerStart,oe)}')`:void 0,[ae.markerStart,oe]),ut=Be.useMemo(()=>ae.markerEnd?`url('#${ske(ae.markerEnd,oe)}')`:void 0,[ae.markerEnd,oe]);if(ae.hidden||ve===null||nn===null||yn===null||Pn===null)return null;const Jt=Mt=>{const{addSelectedEdges:bi,unselectNodesAndEdges:zi,multiSelectionActive:cu}=pn.getState();xn&&(pn.setState({nodesSelectionActive:!1}),ae.selected&&cu?(zi({nodes:[],edges:[ae]}),nt.current?.blur()):bi([g])),N&&N(Mt,ae)},di=$?Mt=>{$(Mt,{...ae})}:void 0,Gt=k?Mt=>{k(Mt,{...ae})}:void 0,xt=H?Mt=>{H(Mt,{...ae})}:void 0,si=U?Mt=>{U(Mt,{...ae})}:void 0,Kr=G?Mt=>{G(Mt,{...ae})}:void 0,Er=Mt=>{if(!$e&&Bdn.includes(Mt.key)&&xn){const{unselectNodesAndEdges:bi,addSelectedEdges:zi}=pn.getState();Mt.key==="Escape"?(nt.current?.blur(),bi({edges:[ae]})):zi([g])}};return L.jsx("svg",{style:{zIndex:Ae},children:L.jsxs("g",{className:Ta(["react-flow__edge",`react-flow__edge-${Ue}`,ae.className,Ce,{selected:ae.selected,animated:ae.animated,inactive:!xn&&!N,updating:dn,selectable:xn}]),onClick:Jt,onDoubleClick:di,onContextMenu:Gt,onMouseEnter:xt,onMouseMove:si,onMouseLeave:Kr,onKeyDown:un?Er:void 0,tabIndex:un?0:void 0,role:ae.ariaRole??(un?"group":"img"),"aria-roledescription":"edge","data-id":g,"data-testid":`rf__edge-${g}`,"aria-label":ae.ariaLabel===null?void 0:ae.ariaLabel||`Edge from ${ae.source} to ${ae.target}`,"aria-describedby":un?`${p0n}-${oe}`:void 0,ref:nt,...ae.domAttributes,children:[!Y&&L.jsx(ln,{id:g,source:ae.source,target:ae.target,type:ae.type,selected:ae.selected,animated:ae.animated,selectable:xn,deletable:ae.deletable??!0,label:ae.label,labelStyle:ae.labelStyle,labelShowBg:ae.labelShowBg,labelBgStyle:ae.labelBgStyle,labelBgPadding:ae.labelBgPadding,labelBgBorderRadius:ae.labelBgBorderRadius,sourceX:ve,sourceY:nn,targetX:yn,targetY:Pn,sourcePosition:ye,targetPosition:Re,data:ae.data,style:ae.style,sourceHandleId:ae.sourceHandle,targetHandleId:ae.targetHandle,markerStart:tt,markerEnd:ut,pathOptions:"pathOptions"in ae?ae.pathOptions:void 0,interactionWidth:ae.interactionWidth}),An&&L.jsx(yUn,{edge:ae,isReconnectable:An,reconnectRadius:ie,onReconnect:W,onReconnectStart:Z,onReconnectEnd:le,sourceX:ve,sourceY:nn,targetX:yn,targetY:Pn,sourcePosition:ye,targetPosition:Re,setUpdateHover:bn,setReconnecting:Je})]})})}var jUn=Be.memo(kUn);const EUn=g=>({edgesFocusable:g.edgesFocusable,edgesReconnectable:g.edgesReconnectable,elementsSelectable:g.elementsSelectable,connectionMode:g.connectionMode,onError:g.onError});function H0n({defaultMarkerColor:g,onlyRenderVisibleElements:E,rfId:x,edgeTypes:M,noPanClassName:N,onReconnect:$,onEdgeContextMenu:k,onEdgeMouseEnter:H,onEdgeMouseMove:U,onEdgeMouseLeave:G,onEdgeClick:ie,reconnectRadius:W,onEdgeDoubleClick:Z,onReconnectStart:le,onReconnectEnd:oe,disableKeyboardA11y:ee}){const{edgesFocusable:Ce,edgesReconnectable:pe,elementsSelectable:$e,onError:ae}=zu(EUn,jl),Ne=oUn(E);return L.jsxs("div",{className:"react-flow__edges",children:[L.jsx(hUn,{defaultColor:g,rfId:x}),Ne.map(Ue=>L.jsx(jUn,{id:Ue,edgesFocusable:Ce,edgesReconnectable:pe,elementsSelectable:$e,noPanClassName:N,onReconnect:$,onContextMenu:k,onMouseEnter:H,onMouseMove:U,onMouseLeave:G,onClick:ie,reconnectRadius:W,onDoubleClick:Z,onReconnectStart:le,onReconnectEnd:oe,rfId:x,onError:ae,edgeTypes:M,disableKeyboardA11y:ee},Ue))]})}H0n.displayName="EdgeRenderer";const SUn=Be.memo(H0n),xUn=g=>`translate(${g.transform[0]}px,${g.transform[1]}px) scale(${g.transform[2]})`;function AUn({children:g}){const E=zu(xUn);return L.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:E},children:g})}function MUn(g){const E=Nke(),x=Be.useRef(!1);Be.useEffect(()=>{!x.current&&E.viewportInitialized&&g&&(setTimeout(()=>g(E),1),x.current=!0)},[g,E.viewportInitialized])}const CUn=g=>g.panZoom?.syncViewport;function TUn(g){const E=zu(CUn),x=El();return Be.useEffect(()=>{g&&(E?.(g),x.setState({transform:[g.x,g.y,g.zoom]}))},[g,E]),null}function OUn(g){return g.connection.inProgress?{...g.connection,to:cq(g.connection.to,g.transform)}:{...g.connection}}function NUn(g){return OUn}function IUn(g){const E=NUn();return zu(E,jl)}const DUn=g=>({nodesConnectable:g.nodesConnectable,isValid:g.connection.isValid,inProgress:g.connection.inProgress,width:g.width,height:g.height});function _Un({containerStyle:g,style:E,type:x,component:M}){const{nodesConnectable:N,width:$,height:k,isValid:H,inProgress:U}=zu(DUn,jl);return!($&&N&&U)?null:L.jsx("svg",{style:g,width:$,height:k,className:"react-flow__connectionline react-flow__container",children:L.jsx("g",{className:Ta(["react-flow__connection",Jdn(H)]),children:L.jsx(G0n,{style:E,type:x,CustomComponent:M,isValid:H})})})}const G0n=({style:g,type:E=ek.Bezier,CustomComponent:x,isValid:M})=>{const{inProgress:N,from:$,fromNode:k,fromHandle:H,fromPosition:U,to:G,toNode:ie,toHandle:W,toPosition:Z,pointer:le}=IUn();if(!N)return;if(x)return L.jsx(x,{connectionLineType:E,connectionLineStyle:g,fromNode:k,fromHandle:H,fromX:$.x,fromY:$.y,toX:G.x,toY:G.y,fromPosition:U,toPosition:Z,connectionStatus:Jdn(M),toNode:ie,toHandle:W,pointer:le});let oe="";const ee={sourceX:$.x,sourceY:$.y,sourcePosition:U,targetX:G.x,targetY:G.y,targetPosition:Z};switch(E){case ek.Bezier:[oe]=e0n(ee);break;case ek.SimpleBezier:[oe]=N0n(ee);break;case ek.Step:[oe]=Aue({...ee,borderRadius:0});break;case ek.SmoothStep:[oe]=Aue(ee);break;default:[oe]=t0n(ee)}return L.jsx("path",{d:oe,fill:"none",className:"react-flow__connection-path",style:g})};G0n.displayName="ConnectionLine";const LUn={};function Y1n(g=LUn){Be.useRef(g),El(),Be.useEffect(()=>{},[g])}function PUn(){El(),Be.useRef(!1),Be.useEffect(()=>{},[])}function q0n({nodeTypes:g,edgeTypes:E,onInit:x,onNodeClick:M,onEdgeClick:N,onNodeDoubleClick:$,onEdgeDoubleClick:k,onNodeMouseEnter:H,onNodeMouseMove:U,onNodeMouseLeave:G,onNodeContextMenu:ie,onSelectionContextMenu:W,onSelectionStart:Z,onSelectionEnd:le,connectionLineType:oe,connectionLineStyle:ee,connectionLineComponent:Ce,connectionLineContainerStyle:pe,selectionKeyCode:$e,selectionOnDrag:ae,selectionMode:Ne,multiSelectionKeyCode:Ue,panActivationKeyCode:ln,zoomActivationKeyCode:un,deleteKeyCode:An,onlyRenderVisibleElements:xn,elementsSelectable:nt,defaultViewport:dn,translateExtent:bn,minZoom:Y,maxZoom:Je,preventScrolling:pn,defaultMarkerColor:Ae,zoomOnScroll:ve,zoomOnPinch:nn,panOnScroll:yn,panOnScrollSpeed:Pn,panOnScrollMode:ye,zoomOnDoubleClick:Re,panOnDrag:tt,onPaneClick:ut,onPaneMouseEnter:Jt,onPaneMouseMove:di,onPaneMouseLeave:Gt,onPaneScroll:xt,onPaneContextMenu:si,paneClickDistance:Kr,nodeClickDistance:Er,onEdgeContextMenu:Mt,onEdgeMouseEnter:bi,onEdgeMouseMove:zi,onEdgeMouseLeave:cu,reconnectRadius:Fu,onReconnect:Rs,onReconnectStart:ia,onReconnectEnd:ef,noDragClassName:Oa,noWheelClassName:Cc,noPanClassName:o0,disableKeyboardA11y:xb,nodeExtent:Sl,rfId:cd,viewport:s0,onViewportChange:uh}){return Y1n(g),Y1n(E),PUn(),MUn(x),TUn(s0),L.jsx(Qqn,{onPaneClick:ut,onPaneMouseEnter:Jt,onPaneMouseMove:di,onPaneMouseLeave:Gt,onPaneContextMenu:si,onPaneScroll:xt,paneClickDistance:Kr,deleteKeyCode:An,selectionKeyCode:$e,selectionOnDrag:ae,selectionMode:Ne,onSelectionStart:Z,onSelectionEnd:le,multiSelectionKeyCode:Ue,panActivationKeyCode:ln,zoomActivationKeyCode:un,elementsSelectable:nt,zoomOnScroll:ve,zoomOnPinch:nn,zoomOnDoubleClick:Re,panOnScroll:yn,panOnScrollSpeed:Pn,panOnScrollMode:ye,panOnDrag:tt,defaultViewport:dn,translateExtent:bn,minZoom:Y,maxZoom:Je,onSelectionContextMenu:W,preventScrolling:pn,noDragClassName:Oa,noWheelClassName:Cc,noPanClassName:o0,disableKeyboardA11y:xb,onViewportChange:uh,isControlledViewport:!!s0,children:L.jsxs(AUn,{children:[L.jsx(SUn,{edgeTypes:E,onEdgeClick:N,onEdgeDoubleClick:k,onReconnect:Rs,onReconnectStart:ia,onReconnectEnd:ef,onlyRenderVisibleElements:xn,onEdgeContextMenu:Mt,onEdgeMouseEnter:bi,onEdgeMouseMove:zi,onEdgeMouseLeave:cu,reconnectRadius:Fu,defaultMarkerColor:Ae,noPanClassName:o0,disableKeyboardA11y:xb,rfId:cd}),L.jsx(_Un,{style:ee,type:oe,component:Ce,containerStyle:pe}),L.jsx("div",{className:"react-flow__edgelabel-renderer"}),L.jsx(uUn,{nodeTypes:g,onNodeClick:M,onNodeDoubleClick:$,onNodeMouseEnter:H,onNodeMouseMove:U,onNodeMouseLeave:G,onNodeContextMenu:ie,nodeClickDistance:Er,onlyRenderVisibleElements:xn,noPanClassName:o0,noDragClassName:Oa,disableKeyboardA11y:xb,nodeExtent:Sl,rfId:cd}),L.jsx("div",{className:"react-flow__viewport-portal"})]})})}q0n.displayName="GraphView";const $Un=Be.memo(q0n),Q1n=({nodes:g,edges:E,defaultNodes:x,defaultEdges:M,width:N,height:$,fitView:k,fitViewOptions:H,minZoom:U=.5,maxZoom:G=2,nodeOrigin:ie,nodeExtent:W,zIndexMode:Z="basic"}={})=>{const le=new Map,oe=new Map,ee=new Map,Ce=new Map,pe=M??E??[],$e=x??g??[],ae=ie??[0,0],Ne=W??XG;c0n(ee,Ce,pe);const{nodesInitialized:Ue}=lke($e,le,oe,{nodeOrigin:ae,nodeExtent:Ne,zIndexMode:Z});let ln=[0,0,1];if(k&&N&&$){const un=iq(le,{filter:dn=>!!((dn.width||dn.initialWidth)&&(dn.height||dn.initialHeight))}),{x:An,y:xn,zoom:nt}=Ske(un,N,$,U,G,H?.padding??.1);ln=[An,xn,nt]}return{rfId:"1",width:N??0,height:$??0,transform:ln,nodes:$e,nodesInitialized:Ue,nodeLookup:le,parentLookup:oe,edges:pe,edgeLookup:Ce,connectionLookup:ee,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:x!==void 0,hasDefaultEdges:M!==void 0,panZoom:null,minZoom:U,maxZoom:G,translateExtent:XG,nodeExtent:Ne,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:wD.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:ae,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:k??!1,fitViewOptions:H,fitViewResolver:null,connection:{...Fdn},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:WHn,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:zdn,zIndexMode:Z,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},RUn=({nodes:g,edges:E,defaultNodes:x,defaultEdges:M,width:N,height:$,fitView:k,fitViewOptions:H,minZoom:U,maxZoom:G,nodeOrigin:ie,nodeExtent:W,zIndexMode:Z})=>tqn((le,oe)=>{async function ee(){const{nodeLookup:Ce,panZoom:pe,fitViewOptions:$e,fitViewResolver:ae,width:Ne,height:Ue,minZoom:ln,maxZoom:un}=oe();pe&&(await YHn({nodes:Ce,width:Ne,height:Ue,panZoom:pe,minZoom:ln,maxZoom:un},$e),ae?.resolve(!0),le({fitViewResolver:null}))}return{...Q1n({nodes:g,edges:E,width:N,height:$,fitView:k,fitViewOptions:H,minZoom:U,maxZoom:G,nodeOrigin:ie,nodeExtent:W,defaultNodes:x,defaultEdges:M,zIndexMode:Z}),setNodes:Ce=>{const{nodeLookup:pe,parentLookup:$e,nodeOrigin:ae,elevateNodesOnSelect:Ne,fitViewQueued:Ue,zIndexMode:ln,nodesSelectionActive:un}=oe(),{nodesInitialized:An,hasSelectedNodes:xn}=lke(Ce,pe,$e,{nodeOrigin:ae,nodeExtent:W,elevateNodesOnSelect:Ne,checkEquality:!0,zIndexMode:ln}),nt=un&&xn;Ue&&An?(ee(),le({nodes:Ce,nodesInitialized:An,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:nt})):le({nodes:Ce,nodesInitialized:An,nodesSelectionActive:nt})},setEdges:Ce=>{const{connectionLookup:pe,edgeLookup:$e}=oe();c0n(pe,$e,Ce),le({edges:Ce})},setDefaultNodesAndEdges:(Ce,pe)=>{if(Ce){const{setNodes:$e}=oe();$e(Ce),le({hasDefaultNodes:!0})}if(pe){const{setEdges:$e}=oe();$e(pe),le({hasDefaultEdges:!0})}},updateNodeInternals:Ce=>{const{triggerNodeChanges:pe,nodeLookup:$e,parentLookup:ae,domNode:Ne,nodeOrigin:Ue,nodeExtent:ln,debug:un,fitViewQueued:An,zIndexMode:xn}=oe(),{changes:nt,updatedInternals:dn}=yGn(Ce,$e,ae,Ne,Ue,ln,xn);dn&&(wGn($e,ae,{nodeOrigin:Ue,nodeExtent:ln,zIndexMode:xn}),An?(ee(),le({fitViewQueued:!1,fitViewOptions:void 0})):le({}),nt?.length>0&&(un&&console.log("React Flow: trigger node changes",nt),pe?.(nt)))},updateNodePositions:(Ce,pe=!1)=>{const $e=[];let ae=[];const{nodeLookup:Ne,triggerNodeChanges:Ue,connection:ln,updateConnection:un,onNodesChangeMiddlewareMap:An}=oe();for(const[xn,nt]of Ce){const dn=Ne.get(xn),bn=!!(dn?.expandParent&&dn?.parentId&&nt?.position),Y={id:xn,type:"position",position:bn?{x:Math.max(0,nt.position.x),y:Math.max(0,nt.position.y)}:nt.position,dragging:pe};if(dn&&ln.inProgress&&ln.fromNode.id===dn.id){const Je=CA(dn,ln.fromHandle,ur.Left,!0);un({...ln,from:Je})}bn&&dn.parentId&&$e.push({id:xn,parentId:dn.parentId,rect:{...nt.internals.positionAbsolute,width:nt.measured.width??0,height:nt.measured.height??0}}),ae.push(Y)}if($e.length>0){const{parentLookup:xn,nodeOrigin:nt}=oe(),dn=Oke($e,Ne,xn,nt);ae.push(...dn)}for(const xn of An.values())ae=xn(ae);Ue(ae)},triggerNodeChanges:Ce=>{const{onNodesChange:pe,setNodes:$e,nodes:ae,hasDefaultNodes:Ne,debug:Ue}=oe();if(Ce?.length){if(Ne){const ln=y0n(Ce,ae);$e(ln)}Ue&&console.log("React Flow: trigger node changes",Ce),pe?.(Ce)}},triggerEdgeChanges:Ce=>{const{onEdgesChange:pe,setEdges:$e,edges:ae,hasDefaultEdges:Ne,debug:Ue}=oe();if(Ce?.length){if(Ne){const ln=k0n(Ce,ae);$e(ln)}Ue&&console.log("React Flow: trigger edge changes",Ce),pe?.(Ce)}},addSelectedNodes:Ce=>{const{multiSelectionActive:pe,edgeLookup:$e,nodeLookup:ae,triggerNodeChanges:Ne,triggerEdgeChanges:Ue}=oe();if(pe){const ln=Ce.map(un=>yA(un,!0));Ne(ln);return}Ne(aD(ae,new Set([...Ce]),!0)),Ue(aD($e))},addSelectedEdges:Ce=>{const{multiSelectionActive:pe,edgeLookup:$e,nodeLookup:ae,triggerNodeChanges:Ne,triggerEdgeChanges:Ue}=oe();if(pe){const ln=Ce.map(un=>yA(un,!0));Ue(ln);return}Ue(aD($e,new Set([...Ce]))),Ne(aD(ae,new Set,!0))},unselectNodesAndEdges:({nodes:Ce,edges:pe}={})=>{const{edges:$e,nodes:ae,nodeLookup:Ne,triggerNodeChanges:Ue,triggerEdgeChanges:ln}=oe(),un=Ce||ae,An=pe||$e,xn=[];for(const dn of un){if(!dn.selected)continue;const bn=Ne.get(dn.id);bn&&(bn.selected=!1),xn.push(yA(dn.id,!1))}const nt=[];for(const dn of An)dn.selected&&nt.push(yA(dn.id,!1));Ue(xn),ln(nt)},setMinZoom:Ce=>{const{panZoom:pe,maxZoom:$e}=oe();pe?.setScaleExtent([Ce,$e]),le({minZoom:Ce})},setMaxZoom:Ce=>{const{panZoom:pe,minZoom:$e}=oe();pe?.setScaleExtent([$e,Ce]),le({maxZoom:Ce})},setTranslateExtent:Ce=>{oe().panZoom?.setTranslateExtent(Ce),le({translateExtent:Ce})},resetSelectedElements:()=>{const{edges:Ce,nodes:pe,triggerNodeChanges:$e,triggerEdgeChanges:ae,elementsSelectable:Ne}=oe();if(!Ne)return;const Ue=pe.reduce((un,An)=>An.selected?[...un,yA(An.id,!1)]:un,[]),ln=Ce.reduce((un,An)=>An.selected?[...un,yA(An.id,!1)]:un,[]);$e(Ue),ae(ln)},setNodeExtent:Ce=>{const{nodes:pe,nodeLookup:$e,parentLookup:ae,nodeOrigin:Ne,elevateNodesOnSelect:Ue,nodeExtent:ln,zIndexMode:un}=oe();Ce[0][0]===ln[0][0]&&Ce[0][1]===ln[0][1]&&Ce[1][0]===ln[1][0]&&Ce[1][1]===ln[1][1]||(lke(pe,$e,ae,{nodeOrigin:Ne,nodeExtent:Ce,elevateNodesOnSelect:Ue,checkEquality:!1,zIndexMode:un}),le({nodeExtent:Ce}))},panBy:Ce=>{const{transform:pe,width:$e,height:ae,panZoom:Ne,translateExtent:Ue}=oe();return kGn({delta:Ce,panZoom:Ne,transform:pe,translateExtent:Ue,width:$e,height:ae})},setCenter:async(Ce,pe,$e)=>{const{width:ae,height:Ne,maxZoom:Ue,panZoom:ln}=oe();if(!ln)return Promise.resolve(!1);const un=typeof $e?.zoom<"u"?$e.zoom:Ue;return await ln.setViewport({x:ae/2-Ce*un,y:Ne/2-pe*un,zoom:un},{duration:$e?.duration,ease:$e?.ease,interpolate:$e?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{le({connection:{...Fdn}})},updateConnection:Ce=>{le({connection:Ce})},reset:()=>le({...Q1n()})}},Object.is);function BUn({initialNodes:g,initialEdges:E,defaultNodes:x,defaultEdges:M,initialWidth:N,initialHeight:$,initialMinZoom:k,initialMaxZoom:H,initialFitViewOptions:U,fitView:G,nodeOrigin:ie,nodeExtent:W,zIndexMode:Z,children:le}){const[oe]=Be.useState(()=>RUn({nodes:g,edges:E,defaultNodes:x,defaultEdges:M,width:N,height:$,fitView:G,minZoom:k,maxZoom:H,fitViewOptions:U,nodeOrigin:ie,nodeExtent:W,zIndexMode:Z}));return L.jsx(rqn,{value:oe,children:L.jsx(Aqn,{children:le})})}function zUn({children:g,nodes:E,edges:x,defaultNodes:M,defaultEdges:N,width:$,height:k,fitView:H,fitViewOptions:U,minZoom:G,maxZoom:ie,nodeOrigin:W,nodeExtent:Z,zIndexMode:le}){return Be.useContext(Rue)?L.jsx(L.Fragment,{children:g}):L.jsx(BUn,{initialNodes:E,initialEdges:x,defaultNodes:M,defaultEdges:N,initialWidth:$,initialHeight:k,fitView:H,initialFitViewOptions:U,initialMinZoom:G,initialMaxZoom:ie,nodeOrigin:W,nodeExtent:Z,zIndexMode:le,children:g})}const FUn={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function JUn({nodes:g,edges:E,defaultNodes:x,defaultEdges:M,className:N,nodeTypes:$,edgeTypes:k,onNodeClick:H,onEdgeClick:U,onInit:G,onMove:ie,onMoveStart:W,onMoveEnd:Z,onConnect:le,onConnectStart:oe,onConnectEnd:ee,onClickConnectStart:Ce,onClickConnectEnd:pe,onNodeMouseEnter:$e,onNodeMouseMove:ae,onNodeMouseLeave:Ne,onNodeContextMenu:Ue,onNodeDoubleClick:ln,onNodeDragStart:un,onNodeDrag:An,onNodeDragStop:xn,onNodesDelete:nt,onEdgesDelete:dn,onDelete:bn,onSelectionChange:Y,onSelectionDragStart:Je,onSelectionDrag:pn,onSelectionDragStop:Ae,onSelectionContextMenu:ve,onSelectionStart:nn,onSelectionEnd:yn,onBeforeDelete:Pn,connectionMode:ye,connectionLineType:Re=ek.Bezier,connectionLineStyle:tt,connectionLineComponent:ut,connectionLineContainerStyle:Jt,deleteKeyCode:di="Backspace",selectionKeyCode:Gt="Shift",selectionOnDrag:xt=!1,selectionMode:si=KG.Full,panActivationKeyCode:Kr="Space",multiSelectionKeyCode:Er=QG()?"Meta":"Control",zoomActivationKeyCode:Mt=QG()?"Meta":"Control",snapToGrid:bi,snapGrid:zi,onlyRenderVisibleElements:cu=!1,selectNodesOnDrag:Fu,nodesDraggable:Rs,autoPanOnNodeFocus:ia,nodesConnectable:ef,nodesFocusable:Oa,nodeOrigin:Cc=m0n,edgesFocusable:o0,edgesReconnectable:xb,elementsSelectable:Sl=!0,defaultViewport:cd=pqn,minZoom:s0=.5,maxZoom:uh=2,translateExtent:ud=XG,preventScrolling:b5=!0,nodeExtent:l0,defaultMarkerColor:Cp="#b1b1b7",zoomOnScroll:l6=!0,zoomOnPinch:Ab=!0,panOnScroll:ra=!1,panOnScrollSpeed:od=.5,panOnScrollMode:Sf=EA.Free,zoomOnDoubleClick:f6=!0,panOnDrag:oh=!0,onPaneClick:Tp,onPaneMouseEnter:Gg,onPaneMouseMove:qg,onPaneMouseLeave:Ug,onPaneScroll:sd,onPaneContextMenu:Xg,paneClickDistance:Mb=1,nodeClickDistance:g5=0,children:Op,onReconnect:Np,onReconnectStart:uu,onReconnectEnd:w5,onEdgeContextMenu:Kg,onEdgeDoubleClick:rv,onEdgeMouseEnter:p5,onEdgeMouseMove:Vg,onEdgeMouseLeave:cv,reconnectRadius:m5=10,onNodesChange:v5,onEdgesChange:b1,noDragClassName:Ws="nodrag",noWheelClassName:xf="nowheel",noPanClassName:vt="nopan",fitView:kc,fitViewOptions:tc,connectOnClick:tk,attributionPosition:f0,proOptions:Yg,defaultEdgeOptions:a6,elevateNodesOnSelect:Ip=!0,elevateEdgesOnSelect:Dp=!1,disableKeyboardA11y:_p=!1,autoPanOnConnect:Lp,autoPanOnNodeDrag:xl,autoPanSpeed:y5,connectionRadius:ik,isValidConnection:Qg,onError:Pp,style:OA,id:h6,nodeDragThreshold:rk,connectionDragThreshold:ck,viewport:uv,onViewportChange:k5,width:a0,height:_h,colorMode:uk="light",debug:NA,onScroll:j5,ariaLabelConfig:ok,zIndexMode:ov="basic",...IA},Lh){const sv=h6||"1",sk=kqn(uk),d6=Be.useCallback(Wg=>{Wg.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),j5?.(Wg)},[j5]);return L.jsx("div",{"data-testid":"rf__wrapper",...IA,onScroll:d6,style:{...OA,...FUn},ref:Lh,className:Ta(["react-flow",N,sk]),id:h6,role:"application",children:L.jsxs(zUn,{nodes:g,edges:E,width:a0,height:_h,fitView:kc,fitViewOptions:tc,minZoom:s0,maxZoom:uh,nodeOrigin:Cc,nodeExtent:l0,zIndexMode:ov,children:[L.jsx(yqn,{nodes:g,edges:E,defaultNodes:x,defaultEdges:M,onConnect:le,onConnectStart:oe,onConnectEnd:ee,onClickConnectStart:Ce,onClickConnectEnd:pe,nodesDraggable:Rs,autoPanOnNodeFocus:ia,nodesConnectable:ef,nodesFocusable:Oa,edgesFocusable:o0,edgesReconnectable:xb,elementsSelectable:Sl,elevateNodesOnSelect:Ip,elevateEdgesOnSelect:Dp,minZoom:s0,maxZoom:uh,nodeExtent:l0,onNodesChange:v5,onEdgesChange:b1,snapToGrid:bi,snapGrid:zi,connectionMode:ye,translateExtent:ud,connectOnClick:tk,defaultEdgeOptions:a6,fitView:kc,fitViewOptions:tc,onNodesDelete:nt,onEdgesDelete:dn,onDelete:bn,onNodeDragStart:un,onNodeDrag:An,onNodeDragStop:xn,onSelectionDrag:pn,onSelectionDragStart:Je,onSelectionDragStop:Ae,onMove:ie,onMoveStart:W,onMoveEnd:Z,noPanClassName:vt,nodeOrigin:Cc,rfId:sv,autoPanOnConnect:Lp,autoPanOnNodeDrag:xl,autoPanSpeed:y5,onError:Pp,connectionRadius:ik,isValidConnection:Qg,selectNodesOnDrag:Fu,nodeDragThreshold:rk,connectionDragThreshold:ck,onBeforeDelete:Pn,debug:NA,ariaLabelConfig:ok,zIndexMode:ov}),L.jsx($Un,{onInit:G,onNodeClick:H,onEdgeClick:U,onNodeMouseEnter:$e,onNodeMouseMove:ae,onNodeMouseLeave:Ne,onNodeContextMenu:Ue,onNodeDoubleClick:ln,nodeTypes:$,edgeTypes:k,connectionLineType:Re,connectionLineStyle:tt,connectionLineComponent:ut,connectionLineContainerStyle:Jt,selectionKeyCode:Gt,selectionOnDrag:xt,selectionMode:si,deleteKeyCode:di,multiSelectionKeyCode:Er,panActivationKeyCode:Kr,zoomActivationKeyCode:Mt,onlyRenderVisibleElements:cu,defaultViewport:cd,translateExtent:ud,minZoom:s0,maxZoom:uh,preventScrolling:b5,zoomOnScroll:l6,zoomOnPinch:Ab,zoomOnDoubleClick:f6,panOnScroll:ra,panOnScrollSpeed:od,panOnScrollMode:Sf,panOnDrag:oh,onPaneClick:Tp,onPaneMouseEnter:Gg,onPaneMouseMove:qg,onPaneMouseLeave:Ug,onPaneScroll:sd,onPaneContextMenu:Xg,paneClickDistance:Mb,nodeClickDistance:g5,onSelectionContextMenu:ve,onSelectionStart:nn,onSelectionEnd:yn,onReconnect:Np,onReconnectStart:uu,onReconnectEnd:w5,onEdgeContextMenu:Kg,onEdgeDoubleClick:rv,onEdgeMouseEnter:p5,onEdgeMouseMove:Vg,onEdgeMouseLeave:cv,reconnectRadius:m5,defaultMarkerColor:Cp,noDragClassName:Ws,noWheelClassName:xf,noPanClassName:vt,rfId:sv,disableKeyboardA11y:_p,nodeExtent:l0,viewport:uv,onViewportChange:k5}),L.jsx(wqn,{onSelectionChange:Y}),Op,L.jsx(aqn,{proOptions:Yg,position:f0}),L.jsx(fqn,{rfId:sv,disableKeyboardA11y:_p})]})})}var HUn=j0n(JUn);const GUn=g=>g.domNode?.querySelector(".react-flow__edgelabel-renderer");function qUn({children:g}){const E=zu(GUn);return E?iqn.createPortal(g,E):null}function UUn(g){const[E,x]=Be.useState(g),M=Be.useCallback(N=>x($=>y0n(N,$)),[]);return[E,x,M]}function XUn(g){const[E,x]=Be.useState(g),M=Be.useCallback(N=>x($=>k0n(N,$)),[]);return[E,x,M]}function KUn({dimensions:g,lineWidth:E,variant:x,className:M}){return L.jsx("path",{strokeWidth:E,d:`M${g[0]/2} 0 V${g[1]} M0 ${g[1]/2} H${g[0]}`,className:Ta(["react-flow__background-pattern",x,M])})}function VUn({radius:g,className:E}){return L.jsx("circle",{cx:g,cy:g,r:g,className:Ta(["react-flow__background-pattern","dots",E])})}var nk;(function(g){g.Lines="lines",g.Dots="dots",g.Cross="cross"})(nk||(nk={}));const YUn={[nk.Dots]:1,[nk.Lines]:1,[nk.Cross]:6},QUn=g=>({transform:g.transform,patternId:`pattern-${g.rfId}`});function U0n({id:g,variant:E=nk.Dots,gap:x=20,size:M,lineWidth:N=1,offset:$=0,color:k,bgColor:H,style:U,className:G,patternClassName:ie}){const W=Be.useRef(null),{transform:Z,patternId:le}=zu(QUn,jl),oe=M||YUn[E],ee=E===nk.Dots,Ce=E===nk.Cross,pe=Array.isArray(x)?x:[x,x],$e=[pe[0]*Z[2]||1,pe[1]*Z[2]||1],ae=oe*Z[2],Ne=Array.isArray($)?$:[$,$],Ue=Ce?[ae,ae]:$e,ln=[Ne[0]*Z[2]||1+Ue[0]/2,Ne[1]*Z[2]||1+Ue[1]/2],un=`${le}${g||""}`;return L.jsxs("svg",{className:Ta(["react-flow__background",G]),style:{...U,...zue,"--xy-background-color-props":H,"--xy-background-pattern-color-props":k},ref:W,"data-testid":"rf__background",children:[L.jsx("pattern",{id:un,x:Z[0]%$e[0],y:Z[1]%$e[1],width:$e[0],height:$e[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${ln[0]},-${ln[1]})`,children:ee?L.jsx(VUn,{radius:ae/2,className:ie}):L.jsx(KUn,{dimensions:Ue,lineWidth:N,variant:E,className:ie})}),L.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${un})`})]})}U0n.displayName="Background";const WUn=Be.memo(U0n);function ZUn(){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:L.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function eXn(){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:L.jsx("path",{d:"M0 0h32v4.2H0z"})})}function nXn(){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:L.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function tXn(){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:L.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function iXn(){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:L.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function cue({children:g,className:E,...x}){return L.jsx("button",{type:"button",className:Ta(["react-flow__controls-button",E]),...x,children:g})}const rXn=g=>({isInteractive:g.nodesDraggable||g.nodesConnectable||g.elementsSelectable,minZoomReached:g.transform[2]<=g.minZoom,maxZoomReached:g.transform[2]>=g.maxZoom,ariaLabelConfig:g.ariaLabelConfig});function X0n({style:g,showZoom:E=!0,showFitView:x=!0,showInteractive:M=!0,fitViewOptions:N,onZoomIn:$,onZoomOut:k,onFitView:H,onInteractiveChange:U,className:G,children:ie,position:W="bottom-left",orientation:Z="vertical","aria-label":le}){const oe=El(),{isInteractive:ee,minZoomReached:Ce,maxZoomReached:pe,ariaLabelConfig:$e}=zu(rXn,jl),{zoomIn:ae,zoomOut:Ne,fitView:Ue}=Nke(),ln=()=>{ae(),$?.()},un=()=>{Ne(),k?.()},An=()=>{Ue(N),H?.()},xn=()=>{oe.setState({nodesDraggable:!ee,nodesConnectable:!ee,elementsSelectable:!ee}),U?.(!ee)},nt=Z==="horizontal"?"horizontal":"vertical";return L.jsxs(Bue,{className:Ta(["react-flow__controls",nt,G]),position:W,style:g,"data-testid":"rf__controls","aria-label":le??$e["controls.ariaLabel"],children:[E&&L.jsxs(L.Fragment,{children:[L.jsx(cue,{onClick:ln,className:"react-flow__controls-zoomin",title:$e["controls.zoomIn.ariaLabel"],"aria-label":$e["controls.zoomIn.ariaLabel"],disabled:pe,children:L.jsx(ZUn,{})}),L.jsx(cue,{onClick:un,className:"react-flow__controls-zoomout",title:$e["controls.zoomOut.ariaLabel"],"aria-label":$e["controls.zoomOut.ariaLabel"],disabled:Ce,children:L.jsx(eXn,{})})]}),x&&L.jsx(cue,{className:"react-flow__controls-fitview",onClick:An,title:$e["controls.fitView.ariaLabel"],"aria-label":$e["controls.fitView.ariaLabel"],children:L.jsx(nXn,{})}),M&&L.jsx(cue,{className:"react-flow__controls-interactive",onClick:xn,title:$e["controls.interactive.ariaLabel"],"aria-label":$e["controls.interactive.ariaLabel"],children:ee?L.jsx(iXn,{}):L.jsx(tXn,{})}),ie]})}X0n.displayName="Controls";const cXn=Be.memo(X0n);function uXn({id:g,x:E,y:x,width:M,height:N,style:$,color:k,strokeColor:H,strokeWidth:U,className:G,borderRadius:ie,shapeRendering:W,selected:Z,onClick:le}){const{background:oe,backgroundColor:ee}=$||{},Ce=k||oe||ee;return L.jsx("rect",{className:Ta(["react-flow__minimap-node",{selected:Z},G]),x:E,y:x,rx:ie,ry:ie,width:M,height:N,style:{fill:Ce,stroke:H,strokeWidth:U},shapeRendering:W,onClick:le?pe=>le(pe,g):void 0})}const oXn=Be.memo(uXn),sXn=g=>g.nodes.map(E=>E.id),U7e=g=>g instanceof Function?g:()=>g;function lXn({nodeStrokeColor:g,nodeColor:E,nodeClassName:x="",nodeBorderRadius:M=5,nodeStrokeWidth:N,nodeComponent:$=oXn,onClick:k}){const H=zu(sXn,jl),U=U7e(E),G=U7e(g),ie=U7e(x),W=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return L.jsx(L.Fragment,{children:H.map(Z=>L.jsx(aXn,{id:Z,nodeColorFunc:U,nodeStrokeColorFunc:G,nodeClassNameFunc:ie,nodeBorderRadius:M,nodeStrokeWidth:N,NodeComponent:$,onClick:k,shapeRendering:W},Z))})}function fXn({id:g,nodeColorFunc:E,nodeStrokeColorFunc:x,nodeClassNameFunc:M,nodeBorderRadius:N,nodeStrokeWidth:$,shapeRendering:k,NodeComponent:H,onClick:U}){const{node:G,x:ie,y:W,width:Z,height:le}=zu(oe=>{const ee=oe.nodeLookup.get(g);if(!ee)return{node:void 0,x:0,y:0,width:0,height:0};const Ce=ee.internals.userNode,{x:pe,y:$e}=ee.internals.positionAbsolute,{width:ae,height:Ne}=s6(Ce);return{node:Ce,x:pe,y:$e,width:ae,height:Ne}},jl);return!G||G.hidden||!Kdn(G)?null:L.jsx(H,{x:ie,y:W,width:Z,height:le,style:G.style,selected:!!G.selected,className:M(G),color:E(G),borderRadius:N,strokeColor:x(G),strokeWidth:$,shapeRendering:k,onClick:U,id:G.id})}const aXn=Be.memo(fXn);var hXn=Be.memo(lXn);const dXn=200,bXn=150,gXn=g=>!g.hidden,wXn=g=>{const E={x:-g.transform[0]/g.transform[2],y:-g.transform[1]/g.transform[2],width:g.width/g.transform[2],height:g.height/g.transform[2]};return{viewBB:E,boundingRect:g.nodeLookup.size>0?Xdn(iq(g.nodeLookup,{filter:gXn}),E):E,rfId:g.rfId,panZoom:g.panZoom,translateExtent:g.translateExtent,flowWidth:g.width,flowHeight:g.height,ariaLabelConfig:g.ariaLabelConfig}},pXn="react-flow__minimap-desc";function K0n({style:g,className:E,nodeStrokeColor:x,nodeColor:M,nodeClassName:N="",nodeBorderRadius:$=5,nodeStrokeWidth:k,nodeComponent:H,bgColor:U,maskColor:G,maskStrokeColor:ie,maskStrokeWidth:W,position:Z="bottom-right",onClick:le,onNodeClick:oe,pannable:ee=!1,zoomable:Ce=!1,ariaLabel:pe,inversePan:$e,zoomStep:ae=1,offsetScale:Ne=5}){const Ue=El(),ln=Be.useRef(null),{boundingRect:un,viewBB:An,rfId:xn,panZoom:nt,translateExtent:dn,flowWidth:bn,flowHeight:Y,ariaLabelConfig:Je}=zu(wXn,jl),pn=g?.width??dXn,Ae=g?.height??bXn,ve=un.width/pn,nn=un.height/Ae,yn=Math.max(ve,nn),Pn=yn*pn,ye=yn*Ae,Re=Ne*yn,tt=un.x-(Pn-un.width)/2-Re,ut=un.y-(ye-un.height)/2-Re,Jt=Pn+Re*2,di=ye+Re*2,Gt=`${pXn}-${xn}`,xt=Be.useRef(0),si=Be.useRef();xt.current=yn,Be.useEffect(()=>{if(ln.current&&nt)return si.current=OGn({domNode:ln.current,panZoom:nt,getTransform:()=>Ue.getState().transform,getViewScale:()=>xt.current}),()=>{si.current?.destroy()}},[nt]),Be.useEffect(()=>{si.current?.update({translateExtent:dn,width:bn,height:Y,inversePan:$e,pannable:ee,zoomStep:ae,zoomable:Ce})},[ee,Ce,$e,ae,dn,bn,Y]);const Kr=le?bi=>{const[zi,cu]=si.current?.pointer(bi)||[0,0];le(bi,{x:zi,y:cu})}:void 0,Er=oe?Be.useCallback((bi,zi)=>{const cu=Ue.getState().nodeLookup.get(zi).internals.userNode;oe(bi,cu)},[]):void 0,Mt=pe??Je["minimap.ariaLabel"];return L.jsx(Bue,{position:Z,style:{...g,"--xy-minimap-background-color-props":typeof U=="string"?U:void 0,"--xy-minimap-mask-background-color-props":typeof G=="string"?G:void 0,"--xy-minimap-mask-stroke-color-props":typeof ie=="string"?ie:void 0,"--xy-minimap-mask-stroke-width-props":typeof W=="number"?W*yn:void 0,"--xy-minimap-node-background-color-props":typeof M=="string"?M:void 0,"--xy-minimap-node-stroke-color-props":typeof x=="string"?x:void 0,"--xy-minimap-node-stroke-width-props":typeof k=="number"?k:void 0},className:Ta(["react-flow__minimap",E]),"data-testid":"rf__minimap",children:L.jsxs("svg",{width:pn,height:Ae,viewBox:`${tt} ${ut} ${Jt} ${di}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Gt,ref:ln,onClick:Kr,children:[Mt&&L.jsx("title",{id:Gt,children:Mt}),L.jsx(hXn,{onClick:Er,nodeColor:M,nodeStrokeColor:x,nodeBorderRadius:$,nodeClassName:N,nodeStrokeWidth:k,nodeComponent:H}),L.jsx("path",{className:"react-flow__minimap-mask",d:`M${tt-Re},${ut-Re}h${Jt+Re*2}v${di+Re*2}h${-Jt-Re*2}z - M${An.x},${An.y}h${An.width}v${An.height}h${-An.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}K0n.displayName="MiniMap";const mXn=Be.memo(K0n),vXn=g=>E=>g?`${Math.max(1/E.transform[2],1)}`:void 0,yXn={[yD.Line]:"right",[yD.Handle]:"bottom-right"};function kXn({nodeId:g,position:E,variant:x=yD.Handle,className:M,style:N=void 0,children:$,color:k,minWidth:H=10,minHeight:U=10,maxWidth:G=Number.MAX_VALUE,maxHeight:ie=Number.MAX_VALUE,keepAspectRatio:W=!1,resizeDirection:Z,autoScale:le=!0,shouldResize:oe,onResizeStart:ee,onResize:Ce,onResizeEnd:pe}){const $e=A0n(),ae=typeof g=="string"?g:$e,Ne=El(),Ue=Be.useRef(null),ln=x===yD.Handle,un=zu(Be.useCallback(vXn(ln&&le),[ln,le]),jl),An=Be.useRef(null),xn=E??yXn[x];Be.useEffect(()=>{if(!(!Ue.current||!ae))return An.current||(An.current=GGn({domNode:Ue.current,nodeId:ae,getStoreItems:()=>{const{nodeLookup:dn,transform:bn,snapGrid:Y,snapToGrid:Je,nodeOrigin:pn,domNode:Ae}=Ne.getState();return{nodeLookup:dn,transform:bn,snapGrid:Y,snapToGrid:Je,nodeOrigin:pn,paneDomNode:Ae}},onChange:(dn,bn)=>{const{triggerNodeChanges:Y,nodeLookup:Je,parentLookup:pn,nodeOrigin:Ae}=Ne.getState(),ve=[],nn={x:dn.x,y:dn.y},yn=Je.get(ae);if(yn&&yn.expandParent&&yn.parentId){const Pn=yn.origin??Ae,ye=dn.width??yn.measured.width??0,Re=dn.height??yn.measured.height??0,tt={id:yn.id,parentId:yn.parentId,rect:{width:ye,height:Re,...Vdn({x:dn.x??yn.position.x,y:dn.y??yn.position.y},{width:ye,height:Re},yn.parentId,Je,Pn)}},ut=Oke([tt],Je,pn,Ae);ve.push(...ut),nn.x=dn.x?Math.max(Pn[0]*ye,dn.x):void 0,nn.y=dn.y?Math.max(Pn[1]*Re,dn.y):void 0}if(nn.x!==void 0&&nn.y!==void 0){const Pn={id:ae,type:"position",position:{...nn}};ve.push(Pn)}if(dn.width!==void 0&&dn.height!==void 0){const ye={id:ae,type:"dimensions",resizing:!0,setAttributes:Z?Z==="horizontal"?"width":"height":!0,dimensions:{width:dn.width,height:dn.height}};ve.push(ye)}for(const Pn of bn){const ye={...Pn,type:"position"};ve.push(ye)}Y(ve)},onEnd:({width:dn,height:bn})=>{const Y={id:ae,type:"dimensions",resizing:!1,dimensions:{width:dn,height:bn}};Ne.getState().triggerNodeChanges([Y])}})),An.current.update({controlPosition:xn,boundaries:{minWidth:H,minHeight:U,maxWidth:G,maxHeight:ie},keepAspectRatio:W,resizeDirection:Z,onResizeStart:ee,onResize:Ce,onResizeEnd:pe,shouldResize:oe}),()=>{An.current?.destroy()}},[xn,H,U,G,ie,W,ee,Ce,pe,oe]);const nt=xn.split("-");return L.jsx("div",{className:Ta(["react-flow__resize-control","nodrag",...nt,x,M]),ref:Ue,style:{...N,scale:un,...k&&{[ln?"backgroundColor":"borderColor"]:k}},children:$})}Be.memo(kXn);const jXn=g=>g.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),V0n=(...g)=>g.filter((E,x,M)=>!!E&&E.trim()!==""&&M.indexOf(E)===x).join(" ").trim();var EXn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const SXn=Be.forwardRef(({color:g="currentColor",size:E=24,strokeWidth:x=2,absoluteStrokeWidth:M,className:N="",children:$,iconNode:k,...H},U)=>Be.createElement("svg",{ref:U,...EXn,width:E,height:E,stroke:g,strokeWidth:M?Number(x)*24/Number(E):x,className:V0n("lucide",N),...H},[...k.map(([G,ie])=>Be.createElement(G,ie)),...Array.isArray($)?$:[$]]));const Ef=(g,E)=>{const x=Be.forwardRef(({className:M,...N},$)=>Be.createElement(SXn,{ref:$,iconNode:E,className:V0n(`lucide-${jXn(g)}`,M),...N}));return x.displayName=`${g}`,x};const xXn=Ef("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const AXn=Ef("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);const TA=Ef("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const MXn=Ef("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const CXn=Ef("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);const TXn=Ef("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);const Dke=Ef("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const OXn=Ef("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);const NXn=Ef("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);const Y0n=Ef("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);const W1n=Ef("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);const IXn=Ef("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);const SA=Ef("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const DXn=Ef("Redo2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]);const _Xn=Ef("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const LXn=Ef("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);const Q0n=Ef("Scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]);const PXn=Ef("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const BG=Ef("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const dke=Ef("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const $Xn=Ef("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);const Jg=Ef("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function RXn({mode:g,models:E,objects:x,application:M,initialModelType:N,suggestedSelector:$,nameReadOnly:k=!1,preview:H,onPreview:U,onSubmit:G,onClose:ie}){const Z=(M?W0n(E,M):null)?.type||N||E[0]?.type||"",[le,oe]=Be.useState(Z),ee=E.find(Mt=>Mt.type===le)??null,[Ce,pe]=Be.useState(M?.name||M?.applicationId||Z1n(ee)),[$e,ae]=Be.useState(()=>Cue(ee,M)),Ne=M?.selector||$||zXn(x),[Ue,ln]=Be.useState(Ne.multiplicity),[un,An]=Be.useState(uue(Ne,"scale")),[xn,nt]=Be.useState(uue(Ne,"kind")),[dn,bn]=Be.useState(uue(Ne,"species")),[Y,Je]=Be.useState(uue(Ne,"name")),pn=FXn(Ne,"within"),Ae=M?.owner.scope==="template"&&pn?.type==="Scope"&&String(pn.name||"")===M.owner.instance,[ve,nn]=Be.useState(pn?.type==="Scope"&&!Ae?"named_scope":pn?.type==="SceneScope"?"scene":"local"),[yn,Pn]=Be.useState(pn?.type==="Scope"&&!Ae?String(pn.name||""):""),[ye,Re]=Be.useState(M?.cadence.mode==="period"?"period":"default"),[tt,ut]=Be.useState(String(M?.cadence.value??1)),[Jt,di]=Be.useState(M?.cadence.unit||"Hour"),Gt=Mt=>{const bi=E.find(zi=>zi.type===Mt)??null;oe(Mt),ae(Cue(bi,g==="update"?M:void 0)),g==="add"&&pe(Z1n(bi))},xt=Be.useMemo(()=>({scales:zG(x.map(Mt=>Mt.scale)),kinds:zG(x.map(Mt=>Mt.kind)),species:zG(x.map(Mt=>Mt.species)),names:zG(x.map(Mt=>Mt.name))}),[x]),si=Be.useMemo(()=>{const Mt=[un&&`scale ${un}`,xn&&`kind ${xn}`,dn&&`species ${dn}`,Y&&`name ${Y}`].filter(Boolean),bi=Mt.length?Mt.join(", "):"matching objects";return ve==="scene"?`${bi} in the whole scene`:ve==="named_scope"?`${bi} below ${yn||"the named root"}`:`${bi} in the local instance scope`},[xn,Y,un,ve,yn,dn]),Kr=()=>{const Mt={selectors:[]};return ve==="named_scope"&&yn&&(Mt.within={type:"Scope",name:yn}),ve==="scene"&&(Mt.within={type:"SceneScope"}),un&&(Mt.scale=un),xn&&(Mt.kind=xn),dn&&(Mt.species=dn),Y&&(Mt.name=Y),{type:JXn(Ue),multiplicity:Ue,criteria:Mt,julia:""}},Er=()=>{G({applicationRef:M?.owner,modelType:le,name:Ce.trim(),parameters:$e,selector:Kr(),cadence:ye==="period"?{mode:"period",value:Number(tt),unit:Jt,julia:`Dates.${Jt}(${tt})`}:{mode:"default",value:null,unit:null,julia:"nothing"}})};return L.jsx("div",{className:"overlay-backdrop",onMouseDown:ie,children:L.jsxs("section",{className:"overlay-panel application-form",onMouseDown:Mt=>Mt.stopPropagation(),"data-testid":"application-form",children:[L.jsxs("header",{children:[L.jsxs("div",{children:[L.jsx("strong",{children:g==="add"?"Add application":`Update ${M?.applicationId}`}),L.jsx("span",{children:"A configured use of a model on selected scene objects"})]}),L.jsx("button",{onClick:ie,children:L.jsx(Jg,{size:17})})]}),L.jsxs("div",{className:"overlay-content application-form-content",children:[L.jsxs("label",{children:["Model",L.jsx("select",{value:le,onChange:Mt=>Gt(Mt.target.value),"data-testid":"application-model-select",children:E.map(Mt=>L.jsxs("option",{value:Mt.type,children:[Mt.package?`${Mt.package} · `:"",Mt.name," (",Mt.process,")"]},Mt.type))})]}),L.jsxs("label",{children:["Application name",L.jsx("input",{value:Ce,disabled:k,onChange:Mt=>pe(Mt.target.value),"data-testid":"application-name"})]}),ee&&ee.constructor.fields.length>0&&L.jsxs("fieldset",{children:[L.jsx("legend",{children:"Model parameters"}),L.jsx(Z0n,{fields:ee.constructor.fields,values:$e,onChange:ae})]}),L.jsxs("fieldset",{children:[L.jsx("legend",{children:"Target selector"}),L.jsxs("div",{className:"form-grid",children:[L.jsxs("label",{children:["Multiplicity",L.jsxs("select",{value:Ue,onChange:Mt=>ln(Mt.target.value),children:[L.jsx("option",{value:"one",children:"One"}),L.jsx("option",{value:"optional_one",children:"Optional one"}),L.jsx("option",{value:"many",children:"Many"})]})]}),L.jsxs("label",{children:["Scope",L.jsxs("select",{value:ve,onChange:Mt=>nn(Mt.target.value),children:[L.jsx("option",{value:"local",children:"Default / instance local"}),L.jsx("option",{value:"scene",children:"Explicit whole scene"}),L.jsx("option",{value:"named_scope",children:"Named object subtree"})]})]}),ve==="named_scope"&&L.jsx(PG,{label:"Scope root",value:yn,options:xt.names,onChange:Pn}),L.jsx(PG,{label:"Scale",value:un,options:xt.scales,onChange:An}),L.jsx(PG,{label:"Kind",value:xn,options:xt.kinds,onChange:nt}),L.jsx(PG,{label:"Species",value:dn,options:xt.species,onChange:bn}),L.jsx(PG,{label:"Object name",value:Y,options:xt.names,onChange:Je})]}),L.jsxs("p",{className:"selector-summary",children:["Julia will resolve ",L.jsx("strong",{children:Ue.replace("_"," ")})," target from ",si,"."]}),L.jsxs("button",{className:"selector-preview-button",type:"button",onClick:()=>U(Kr()),"data-testid":"application-target-preview",children:[L.jsx(Dke,{size:15})," Preview targets in Julia"]}),H&&L.jsxs("section",{className:"selector-preview","data-testid":"application-target-preview-result",children:[L.jsxs("strong",{children:[H.count," target object",H.count===1?"":"s"]}),L.jsx("code",{children:H.objectIds.map(String).join(", ")||"No targets"}),H.groups.map(Mt=>L.jsxs("div",{children:[L.jsx("span",{children:Mt.instance}),L.jsx("code",{children:Mt.objectIds.map(String).join(", ")||"No targets"})]},Mt.instance))]})]}),L.jsxs("fieldset",{children:[L.jsx("legend",{children:"Cadence"}),L.jsxs("div",{className:"form-grid",children:[L.jsxs("label",{children:["Mode",L.jsxs("select",{value:ye,onChange:Mt=>Re(Mt.target.value),"data-testid":"application-cadence-mode",children:[L.jsx("option",{value:"default",children:"Model or environment default"}),L.jsx("option",{value:"period",children:"Explicit period"})]})]}),ye==="period"&&L.jsxs(L.Fragment,{children:[L.jsxs("label",{children:["Value",L.jsx("input",{type:"number",min:"1",step:"1",value:tt,onChange:Mt=>ut(Mt.target.value),"data-testid":"application-cadence-value"})]}),L.jsxs("label",{children:["Unit",L.jsxs("select",{value:Jt,onChange:Mt=>di(Mt.target.value),"data-testid":"application-cadence-unit",children:[L.jsx("option",{children:"Second"}),L.jsx("option",{children:"Minute"}),L.jsx("option",{children:"Hour"}),L.jsx("option",{children:"Day"})]})]})]})]})]})]}),L.jsxs("footer",{children:[L.jsx("button",{onClick:ie,children:"Cancel"}),L.jsxs("button",{className:"primary",disabled:!le||!Ce.trim()||ye==="period"&&(!Number.isInteger(Number(tt))||Number(tt)<=0),onClick:Er,"data-testid":"application-submit",children:[L.jsx(TA,{size:15})," ",g==="add"?"Add application":"Apply changes"]})]})]})})}function W0n(g,E){return g.find(x=>x.type===E.modelType)??g.find(x=>x.name===E.modelName&&x.module===E.module)??null}function Z0n({fields:g,values:E,onChange:x}){const M=new Map;for(const $ of g)$.typeParameter&&!M.has($.typeParameter)&&M.set($.typeParameter,$.name);const N=($,k)=>{const H=$.typeParameter?g.filter(U=>U.typeParameter===$.typeParameter).map(U=>U.name):[$.name];x(Object.fromEntries(Object.entries(E).map(([U,G])=>[U,H.includes(U)?{...G,type:k}:G])))};return L.jsx("div",{className:"parameter-list",children:g.map($=>{const k=E[$.name]||{type:$.inferredChoice,value:""},H=!$.typeParameter||M.get($.typeParameter)===$.name;return L.jsxs("div",{className:"parameter-row",children:[L.jsxs("label",{children:[L.jsx("span",{children:$.name}),L.jsx("small",{children:$.declaredType}),L.jsx("input",{"data-testid":`application-param-${$.name}`,value:k.value,onChange:U=>x({...E,[$.name]:{...k,value:U.target.value}})})]}),H&&L.jsxs("label",{className:"parameter-type",children:[L.jsx("span",{children:$.typeParameter?`${$.typeParameter} type`:"Value type"}),L.jsx("select",{"data-testid":`application-param-type-${$.name}`,value:k.type,onChange:U=>N($,U.target.value),children:$.choices.map(U=>L.jsx("option",{value:U,children:U},U))})]})]},$.name)})})}function PG({label:g,value:E,options:x,onChange:M}){return L.jsxs("label",{children:[g,L.jsxs("select",{value:E,onChange:N=>M(N.target.value),children:[L.jsx("option",{value:"",children:"Any"}),x.map(N=>L.jsx("option",{value:N,children:N},N))]})]})}function Cue(g,E){return g?Object.fromEntries(g.constructor.fields.map(x=>{const M=E?.modelParameters[x.name],N=M?.type||x.inferredChoice,$=M?M.julia:x.hasDefault?N==="julia"?x.defaultJulia||"":BXn(x.default,N):"";return[x.name,{type:N,value:$}]})):{}}function BXn(g,E){const x=g==null?"":String(g);return E==="symbol"?x.replace(/^:/,""):x}function Z1n(g){return g?.process||g?.name||"application"}function zXn(g){const E=zG(g.map(x=>x.scale))[0];return{type:"Many",multiplicity:"many",criteria:E?{selectors:[],scale:E}:{selectors:[]},julia:""}}function uue(g,E){const x=g.criteria[E];return typeof x=="string"?x:""}function FXn(g,E){const x=g.criteria[E];return x&&typeof x=="object"?x:null}function JXn(g){return g==="one"?"One":g==="optional_one"?"OptionalOne":"Many"}function zG(g){return[...new Set(g.filter(E=>!!E))].sort()}function HXn({application:g,applications:E,environments:x,models:M,onCommand:N,onClose:$}){const k=E.filter(ve=>ve.applicationId!==g.applicationId&&(g.owner.scope==="global"?ve.owner.scope==="global":ve.owner.scope==="template"&&ve.owner.templateId===g.owner.templateId&&ve.owner.instance===g.owner.instance)),[H,U]=Be.useState(""),[G,ie]=Be.useState(k[0]?.applicationId||""),[W,Z]=Be.useState(g.environment?g.environment.backendId||"scene":"default"),[le,oe]=Be.useState(String(g.environment?.provider||"")),[ee,Ce]=Be.useState(()=>({...Object.fromEntries(g.environmentInputs.map(ve=>[ve.name,""])),...g.environment?.sources||{}})),[pe,$e]=Be.useState(String(g.environment?.sink||"")),[ae,Ne]=Be.useState(()=>GXn(g.environment?.extra)),[Ue,ln]=Be.useState(g.updates||[]),[un,An]=Be.useState(g.outputs[0]?.name||""),[xn,nt]=Be.useState(k[0]?.owner.applicationId||""),dn=k.find(ve=>ve.applicationId===G),bn=M.find(ve=>ve.type===g.modelType),Y=Be.useMemo(()=>{const ve=g.owner.scope==="template"&&dn?.owner.scope==="template"&&dn.owner.templateId===g.owner.templateId;return{type:dn?.targetCount===1?"One":"Many",multiplicity:dn?.targetCount===1?"one":"many",criteria:{selectors:[],...ve?{}:{within:{type:"SceneScope"}},application:dn?.owner.applicationId||G},julia:""}},[g.owner.scope,g.owner.templateId,G,dn]),Je=()=>{!H.trim()||!G||(N({action:"edit",kind:"set_call_binding",applicationRef:g.owner,call:H.trim(),selector:Y}),U(""))},pn=()=>{!un||!xn||ln(ve=>[...ve.filter(nn=>!nn.variables.includes(un)),{variables:[un],after:[xn]}])},Ae=()=>{const ve=qXn(W,le,ee,pe,ae);N({action:"edit",kind:"set_application_environment",applicationRef:g.owner,configuration:ve})};return L.jsx("div",{className:"overlay-backdrop",onMouseDown:$,children:L.jsxs("section",{className:"overlay-panel application-configuration-form",onMouseDown:ve=>ve.stopPropagation(),"data-testid":"application-configuration-form",children:[L.jsxs("header",{children:[L.jsxs("div",{children:[L.jsxs("strong",{children:["Configure ",g.owner.applicationId]}),L.jsx("span",{children:"Authored coupling and execution policy, validated by Julia"})]}),L.jsx("button",{onClick:$,children:L.jsx(Jg,{size:17})})]}),L.jsxs("div",{className:"overlay-content application-configuration-content",children:[L.jsxs("fieldset",{children:[L.jsx("legend",{children:"Explicit input bindings"}),Object.entries(g.inputBindings).length===0&&L.jsx("p",{children:"No authored input bindings. Unique same-object producers may still be inferred."}),L.jsx("div",{className:"configuration-list",children:Object.entries(g.inputBindings).map(([ve,nn])=>L.jsxs("div",{children:[L.jsx("code",{children:ve}),L.jsx("span",{children:nn.julia||nn.type}),L.jsx("button",{className:"danger icon-button",title:`Remove ${ve} binding`,onClick:()=>N({action:"edit",kind:"remove_input_binding",applicationRef:g.owner,input:ve}),children:L.jsx(BG,{size:14})})]},ve))})]}),L.jsxs("fieldset",{children:[L.jsx("legend",{children:"Manual calls"}),L.jsx("div",{className:"configuration-list",children:Object.entries(g.callBindings).map(([ve,nn])=>L.jsxs("div",{children:[L.jsx("code",{children:ve}),L.jsx("span",{children:nn.julia||nn.type}),L.jsx("button",{className:"danger icon-button",title:`Remove ${ve} call`,onClick:()=>N({action:"edit",kind:"remove_call_binding",applicationRef:g.owner,call:ve}),children:L.jsx(BG,{size:14})})]},ve))}),L.jsxs("div",{className:"form-grid compact-configuration-row",children:[L.jsxs("label",{children:["Call name",L.jsx("input",{"data-testid":"call-name",value:H,onChange:ve=>U(ve.target.value),placeholder:"child"})]}),L.jsxs("label",{children:["Target application",L.jsxs("select",{"data-testid":"call-target",value:G,onChange:ve=>ie(ve.target.value),children:[L.jsx("option",{value:"",children:"Choose application"}),k.map(ve=>L.jsx("option",{value:ve.applicationId,children:ve.owner.applicationId},ve.applicationId))]})]}),L.jsxs("button",{type:"button","data-testid":"add-call-binding",disabled:!H.trim()||!G,onClick:Je,children:[L.jsx(SA,{size:14})," Add call"]})]})]}),L.jsxs("fieldset",{children:[L.jsx("legend",{children:"Environment"}),bn?.environmentHint&&L.jsxs("p",{className:"environment-hint",children:[L.jsx("strong",{children:"Model hint"})," ",bn.environmentHint]}),L.jsxs("div",{className:"form-grid compact-configuration-row",children:[L.jsxs("label",{children:["Backend",L.jsxs("select",{"data-testid":"environment-backend",value:W,onChange:ve=>Z(ve.target.value),children:[L.jsx("option",{value:"default",children:"No application override"}),L.jsx("option",{value:"scene",children:"Active scene environment"}),x.filter(ve=>ve.source==="catalog").map(ve=>L.jsxs("option",{value:ve.id,children:[ve.name," · ",ve.type]},ve.id))]})]}),L.jsxs("label",{children:["Provider",L.jsx("input",{"data-testid":"environment-provider",value:le,onChange:ve=>oe(ve.target.value),placeholder:"default provider",disabled:W==="default"})]}),L.jsxs("label",{children:["Output sink",L.jsx("input",{"data-testid":"environment-sink",value:pe,onChange:ve=>$e(ve.target.value),placeholder:"default sink",disabled:W==="default"})]})]}),g.environmentInputs.length>0&&L.jsx("div",{className:"configuration-list environment-sources",children:g.environmentInputs.map(ve=>L.jsxs("label",{children:[L.jsx("code",{children:ve.name}),L.jsx("input",{value:ee[ve.name]||"",onChange:nn=>Ce(yn=>({...yn,[ve.name]:nn.target.value})),placeholder:"backend source variable",disabled:W==="default","data-testid":`environment-source-${ve.name}`})]},ve.name))}),L.jsx("div",{className:"configuration-list",children:ae.map((ve,nn)=>L.jsxs("div",{children:[L.jsx("input",{"aria-label":"Backend option",value:ve.key,onChange:yn=>Ne(Pn=>Pn.map((ye,Re)=>Re===nn?{...ye,key:yn.target.value}:ye)),placeholder:"option"}),L.jsxs("select",{value:ve.type,onChange:yn=>Ne(Pn=>Pn.map((ye,Re)=>Re===nn?{...ye,type:yn.target.value}:ye)),children:[L.jsx("option",{value:"float",children:"Float"}),L.jsx("option",{value:"integer",children:"Integer"}),L.jsx("option",{value:"boolean",children:"Boolean"}),L.jsx("option",{value:"symbol",children:"Symbol"}),L.jsx("option",{value:"string",children:"String"}),L.jsx("option",{value:"julia",children:"Julia expression"})]}),L.jsx("input",{"aria-label":"Backend option value",value:ve.value,onChange:yn=>Ne(Pn=>Pn.map((ye,Re)=>Re===nn?{...ye,value:yn.target.value}:ye))}),L.jsx("button",{className:"danger icon-button",onClick:()=>Ne(yn=>yn.filter((Pn,ye)=>ye!==nn)),children:L.jsx(BG,{size:14})})]},nn))}),L.jsxs("div",{className:"compact-actions",children:[L.jsxs("button",{type:"button",disabled:W==="default",onClick:()=>Ne(ve=>[...ve,{key:"",type:"string",value:""}]),children:[L.jsx(SA,{size:14})," Backend option"]}),L.jsxs("button",{type:"button","data-testid":"apply-environment",onClick:Ae,children:[L.jsx(TA,{size:14})," Apply environment"]})]}),L.jsxs("div",{className:"effective-environment",children:[L.jsx("strong",{children:"Effective bindings"}),L.jsx("code",{children:JSON.stringify(g.environmentBindings||{},null,2)}),g.environmentWindow!==null&&g.environmentWindow!==void 0?L.jsx("code",{children:JSON.stringify(g.environmentWindow)}):null]})]}),L.jsxs("fieldset",{children:[L.jsx("legend",{children:"Output routing"}),L.jsx("div",{className:"configuration-list",children:g.outputs.map(ve=>L.jsxs("label",{children:[L.jsx("code",{children:ve.name}),L.jsxs("select",{"data-testid":`output-routing-${ve.name}`,value:g.outputRouting[ve.name]||"canonical",onChange:nn=>N({action:"edit",kind:"set_output_routing",applicationRef:g.owner,output:ve.name,route:nn.target.value}),children:[L.jsx("option",{value:"canonical",children:"Canonical status owner"}),L.jsx("option",{value:"stream_only",children:"Stream only"})]})]},ve.name))})]}),L.jsxs("fieldset",{children:[L.jsx("legend",{children:"Duplicate-writer ordering"}),L.jsx("div",{className:"configuration-list",children:Ue.map((ve,nn)=>L.jsxs("div",{children:[L.jsx("code",{children:ve.variables.join(", ")}),L.jsxs("span",{children:["after ",ve.after.join(", ")]}),L.jsx("button",{className:"danger icon-button",title:"Remove update ordering",onClick:()=>ln(yn=>yn.filter((Pn,ye)=>ye!==nn)),children:L.jsx(BG,{size:14})})]},`${ve.variables.join(",")}:${ve.after.join(",")}`))}),L.jsxs("div",{className:"form-grid compact-configuration-row",children:[L.jsxs("label",{children:["Output",L.jsx("select",{value:un,onChange:ve=>An(ve.target.value),children:g.outputs.map(ve=>L.jsx("option",{value:ve.name,children:ve.name},ve.name))})]}),L.jsxs("label",{children:["Run after",L.jsxs("select",{value:xn,onChange:ve=>nt(ve.target.value),children:[L.jsx("option",{value:"",children:"Choose application"}),k.map(ve=>L.jsx("option",{value:ve.owner.applicationId,children:ve.owner.applicationId},ve.applicationId))]})]}),L.jsxs("button",{type:"button",disabled:!un||!xn,onClick:pn,children:[L.jsx(SA,{size:14})," Add rule"]}),L.jsxs("button",{type:"button",onClick:()=>N({action:"edit",kind:"set_update_ordering",applicationRef:g.owner,updates:Ue}),children:[L.jsx(TA,{size:14})," Apply ordering"]})]})]})]}),L.jsx("footer",{children:L.jsx("button",{className:"primary",onClick:$,children:"Done"})})]})})}function GXn(g){return Object.entries(g||{}).map(([E,x])=>({key:E,type:typeof x=="number"?Number.isInteger(x)?"integer":"float":typeof x=="boolean"?"boolean":"string",value:String(x??"")}))}function qXn(g,E,x,M,N){return g==="default"?null:{backendId:g,provider:E.trim()||null,sources:Object.fromEntries(Object.entries(x).filter(([,$])=>$.trim()).map(([$,k])=>[$,k.trim()])),sink:M.trim()||null,extra:Object.fromEntries(N.filter($=>$.key.trim()).map($=>[$.key.trim(),{type:$.type,value:$.value}]))}}function UXn({endpoints:g,objects:E,preview:x,onPreview:M,onSubmit:N,onClose:$}){const k=XXn(g.sourceApplication.targetIds,g.targetApplication.targetIds),[H,U]=Be.useState(g.sourceApplication.targetCount>1&&g.targetApplication.targetCount===1?"many":"one"),[G,ie]=Be.useState(k?"self":""),[W,Z]=Be.useState("local"),[le,oe]=Be.useState(""),[ee,Ce]=Be.useState(""),[pe,$e]=Be.useState(X7e(g.sourceApplication.targetScales)),[ae,Ne]=Be.useState(X7e(g.sourceApplication.targetKinds)),[Ue,ln]=Be.useState(X7e(g.sourceApplication.targetSpecies)),[un,An]=Be.useState(""),[xn,nt]=Be.useState("application"),[dn,bn]=Be.useState("automatic"),[Y,Je]=Be.useState(""),[pn,Ae]=Be.useState("Hour"),ve=oue(E.map(Re=>Re.scale)),nn=oue(E.map(Re=>Re.kind)),yn=oue(E.map(Re=>Re.species)),Pn=oue(E.map(Re=>Re.name)),ye=()=>{const Re={selectors:[],var:g.sourcePort.name};Re[xn]=xn==="application"?g.sourceApplication.owner.applicationId:g.sourceApplication.process;const tt=YXn(W,le,ee);if(tt&&(Re.within=tt),G&&(Re.relation=G),pe&&(Re.scale=pe),ae&&(Re.kind=ae),Ue&&(Re.species=Ue),un&&(Re.name=un),dn!=="automatic"&&(Re.policy={type:VXn(dn)}),Y.trim()){const ut=QXn(Y,pn);ut&&(Re.window=ut)}return{applicationRef:g.targetApplication.owner,input:g.targetPort.name,selector:{type:KXn(H),multiplicity:H,criteria:Re,julia:""}}};return L.jsx("div",{className:"overlay-backdrop",onMouseDown:$,children:L.jsxs("section",{className:"overlay-panel binding-form",onMouseDown:Re=>Re.stopPropagation(),"data-testid":"binding-form",children:[L.jsxs("header",{children:[L.jsxs("div",{children:[L.jsx("strong",{children:"Connect applications"}),L.jsx("span",{children:"Julia resolves this declaration into concrete object bindings"})]}),L.jsx("button",{onClick:$,children:L.jsx(Jg,{size:17})})]}),L.jsxs("div",{className:"overlay-content",children:[L.jsxs("div",{className:"binding-route",children:[L.jsxs("div",{children:[L.jsx("small",{children:"Producer"}),L.jsx("strong",{children:g.sourceApplication.applicationId}),L.jsx("code",{children:g.sourcePort.name})]}),L.jsx(W1n,{size:22}),L.jsxs("div",{children:[L.jsx("small",{children:"Consumer"}),L.jsx("strong",{children:g.targetApplication.applicationId}),L.jsx("code",{children:g.targetPort.name})]})]}),L.jsxs("fieldset",{children:[L.jsx("legend",{children:"Source object selector"}),L.jsxs("div",{className:"form-grid",children:[L.jsxs("label",{children:["Multiplicity",L.jsxs("select",{value:H,onChange:Re=>U(Re.target.value),children:[L.jsx("option",{value:"one",children:"One"}),L.jsx("option",{value:"optional_one",children:"Optional one"}),L.jsx("option",{value:"many",children:"Many"})]})]}),L.jsxs("label",{children:["Scope",L.jsxs("select",{value:W,onChange:Re=>Z(Re.target.value),children:[L.jsx("option",{value:"local",children:"Default / instance local"}),L.jsx("option",{value:"scene",children:"Explicit whole scene"}),L.jsx("option",{value:"self",children:"Consumer object"}),L.jsx("option",{value:"subtree",children:"Consumer subtree"}),L.jsx("option",{value:"self_plant",children:"Consumer plant"}),L.jsx("option",{value:"ancestor",children:"Ancestor subtree"}),L.jsx("option",{value:"named_scope",children:"Named object subtree"})]})]}),W==="ancestor"&&L.jsx(lD,{label:"Ancestor scale",value:ee,options:ve,onChange:Ce}),W==="named_scope"&&L.jsx(lD,{label:"Scope root",value:le,options:Pn,onChange:oe}),L.jsxs("label",{children:["Relation",L.jsxs("select",{value:G,onChange:Re=>ie(Re.target.value),children:[L.jsx("option",{value:"",children:"Any relation"}),L.jsx("option",{value:"self",children:"Same object"}),L.jsx("option",{value:"parent",children:"Parent"}),L.jsx("option",{value:"children",children:"Children"}),L.jsx("option",{value:"ancestors",children:"Ancestors"}),L.jsx("option",{value:"descendants",children:"Descendants"}),L.jsx("option",{value:"siblings",children:"Siblings"})]})]}),L.jsxs("label",{children:["Producer filter",L.jsxs("select",{value:xn,onChange:Re=>nt(Re.target.value),children:[L.jsx("option",{value:"application",children:"This application"}),L.jsx("option",{value:"process",children:"Any application of this process"})]})]}),L.jsx(lD,{label:"Scale",value:pe,options:ve,onChange:$e}),L.jsx(lD,{label:"Kind",value:ae,options:nn,onChange:Ne}),L.jsx(lD,{label:"Species",value:Ue,options:yn,onChange:ln}),L.jsx(lD,{label:"Object name",value:un,options:Pn,onChange:An}),L.jsxs("label",{children:["Temporal policy",L.jsxs("select",{value:dn,onChange:Re=>bn(Re.target.value),children:[L.jsx("option",{value:"automatic",children:"Automatic"}),L.jsx("option",{value:"hold_last",children:"Hold last"}),L.jsx("option",{value:"interpolate",children:"Interpolate"}),L.jsx("option",{value:"integrate",children:"Integrate"}),L.jsx("option",{value:"aggregate",children:"Aggregate"})]})]}),L.jsxs("label",{children:["Window value",L.jsx("input",{type:"number",min:"1",step:"1",value:Y,onChange:Re=>Je(Re.target.value),placeholder:"Automatic","data-testid":"binding-window-value"})]}),L.jsxs("label",{children:["Window unit",L.jsxs("select",{value:pn,onChange:Re=>Ae(Re.target.value),disabled:!Y.trim(),"data-testid":"binding-window-unit",children:[L.jsx("option",{children:"Second"}),L.jsx("option",{children:"Minute"}),L.jsx("option",{children:"Hour"}),L.jsx("option",{children:"Day"})]})]})]})]}),x&&L.jsxs("section",{className:"selector-preview","data-testid":"binding-preview",children:[L.jsxs("strong",{children:[x.bindingCount," resolved binding",x.bindingCount===1?"":"s"]}),L.jsxs("span",{children:[x.consumerObjectIds.length," consumer object",x.consumerObjectIds.length===1?"":"s"," from ",x.sourceObjectIds.length," source object",x.sourceObjectIds.length===1?"":"s"]}),x.sourceApplicationIds.length>0&&L.jsx("code",{children:x.sourceApplicationIds.join(", ")}),x.diagnostics.map(Re=>L.jsx("p",{children:Re},Re))]})]}),L.jsxs("footer",{children:[L.jsx("button",{onClick:$,children:"Cancel"}),L.jsxs("button",{onClick:()=>M(ye()),"data-testid":"binding-preview-button",children:[L.jsx(Dke,{size:15})," Preview resolution"]}),L.jsxs("button",{className:"primary",onClick:()=>N(ye()),"data-testid":"binding-submit",children:[L.jsx(W1n,{size:15})," Apply binding"]})]})]})})}function lD({label:g,value:E,options:x,onChange:M}){return L.jsxs("label",{children:[g,L.jsxs("select",{value:E,onChange:N=>M(N.target.value),children:[L.jsx("option",{value:"",children:"Any"}),x.map(N=>L.jsx("option",{value:N,children:N},N))]})]})}function XXn(g,E){return g.length===E.length&&g.every(x=>E.some(M=>String(M)===String(x)))}function X7e(g){return g.length===1?g[0]:""}function KXn(g){return g==="one"?"One":g==="optional_one"?"OptionalOne":"Many"}function oue(g){return[...new Set(g.filter(E=>!!E))].sort()}function VXn(g){return g==="hold_last"?"HoldLast":g==="interpolate"?"Interpolate":g==="integrate"?"Integrate":"Aggregate"}function YXn(g,E,x){return g==="local"?null:g==="scene"?{type:"SceneScope"}:g==="self"?{type:"Self"}:g==="subtree"?{type:"Subtree"}:g==="self_plant"?{type:"SelfPlant"}:g==="ancestor"?{type:"Ancestor",scale:x||null}:g==="named_scope"&&E?{type:"Scope",name:E}:null}function QXn(g,E){const x=Number(g);return!Number.isInteger(x)||x<=0?null:{mode:"period",value:x,unit:E,julia:`Dates.${E}(${x})`}}function WXn({environments:g,activeId:E,onSubmit:x,onClose:M}){const[N,$]=Be.useState(E||"none"),k=g.find(H=>H.id===N);return L.jsx("div",{className:"overlay-backdrop",onMouseDown:M,children:L.jsxs("section",{className:"overlay-panel environment-form",onMouseDown:H=>H.stopPropagation(),"data-testid":"environment-form",children:[L.jsxs("header",{children:[L.jsxs("div",{children:[L.jsx("strong",{children:"Scene environment"}),L.jsx("span",{children:"Environment values stay in Julia and are selected by catalog name"})]}),L.jsx("button",{onClick:M,children:L.jsx(Jg,{size:17})})]}),L.jsxs("div",{className:"overlay-content",children:[L.jsxs("label",{children:["Environment",L.jsxs("select",{value:N,onChange:H=>$(H.target.value),"data-testid":"scene-environment",children:[L.jsx("option",{value:"none",children:"No environment"}),g.filter(H=>H.source==="catalog").map(H=>L.jsxs("option",{value:H.id,children:[H.name," · ",H.type]},H.id))]})]}),k&&L.jsxs("section",{className:"environment-summary",children:[L.jsx("strong",{children:k.name}),L.jsx("code",{children:k.type}),L.jsx("span",{children:k.variables.length?`Available variables: ${k.variables.join(", ")}`:"Backend variables are discovered by Julia at compile time."})]})]}),L.jsxs("footer",{children:[L.jsx("button",{onClick:M,children:"Cancel"}),L.jsxs("button",{className:"primary",onClick:()=>x(N==="none"?null:N),"data-testid":"environment-submit",children:[L.jsx(TA,{size:15})," Use environment"]})]})]})})}function ZXn({templates:g,instances:E,objects:x,preview:M,onPreview:N,onSubmit:$,onClose:k}){const[H,U]=Be.useState(g[0]?.id||""),[G,ie]=Be.useState(""),[W,Z]=Be.useState("existing"),le=Be.useMemo(()=>eKn(x,E),[E,x]),[oe,ee]=Be.useState(String(le[0]?.objectId??"")),[Ce,pe]=Be.useState(""),[$e,ae]=Be.useState(""),[Ne,Ue]=Be.useState(""),[ln,un]=Be.useState(""),[An,xn]=Be.useState(""),nt=()=>W==="existing"?{name:G.trim(),templateId:H,rootId:oe}:{name:G.trim(),templateId:H,rootObject:{objectId:Ce.trim(),configuration:{parent:$e||null,scale:Ne.trim()||null,kind:ln.trim()||null,species:An.trim()||null,name:G.trim()}}},dn=!!(H&&G.trim()&&(W==="existing"?oe:Ce.trim()));return L.jsx("div",{className:"overlay-backdrop",onMouseDown:k,children:L.jsxs("section",{className:"overlay-panel instance-form",onMouseDown:bn=>bn.stopPropagation(),"data-testid":"instance-form",children:[L.jsxs("header",{children:[L.jsxs("div",{children:[L.jsx("strong",{children:"Add template instance"}),L.jsx("span",{children:"Mount one reusable coupled model set on an object subtree"})]}),L.jsx("button",{onClick:k,children:L.jsx(Jg,{size:17})})]}),L.jsxs("div",{className:"overlay-content instance-form-content",children:[L.jsxs("div",{className:"form-grid",children:[L.jsxs("label",{children:["Template",L.jsx("select",{value:H,onChange:bn=>U(bn.target.value),"data-testid":"instance-template",children:g.map(bn=>L.jsxs("option",{value:bn.id,children:[bn.name," · ",bn.source==="catalog"?"preset":"model-local"," · ",bn.applications.length," applications"]},bn.id))})]}),L.jsxs("label",{children:["Instance name",L.jsx("input",{value:G,onChange:bn=>ie(bn.target.value),placeholder:"plant_1","data-testid":"instance-name"})]})]}),L.jsxs("div",{className:"override-scope-choice",children:[L.jsxs("button",{className:W==="existing"?"active":"",onClick:()=>Z("existing"),children:[L.jsx("strong",{children:"Use existing root"}),L.jsx("span",{children:"All unclaimed descendants are mounted automatically"})]}),L.jsxs("button",{className:W==="new"?"active":"",onClick:()=>Z("new"),children:[L.jsx("strong",{children:"Create minimal root"}),L.jsx("span",{children:"Create the object and mount the template atomically"})]})]}),W==="existing"?L.jsxs("label",{children:["Unclaimed root",L.jsxs("select",{value:oe,onChange:bn=>ee(bn.target.value),"data-testid":"instance-root",children:[L.jsx("option",{value:"",children:"Choose an object"}),le.map(bn=>L.jsxs("option",{value:String(bn.objectId),children:[bn.name||String(bn.objectId)," · ",bn.scale||"unscaled"]},bn.id))]})]}):L.jsxs("div",{className:"form-grid",children:[L.jsxs("label",{children:["Stable object ID",L.jsx("input",{value:Ce,onChange:bn=>pe(bn.target.value),"data-testid":"instance-new-root-id"})]}),L.jsxs("label",{children:["Parent object",L.jsxs("select",{value:$e,onChange:bn=>ae(bn.target.value),children:[L.jsx("option",{value:"",children:"No parent"}),x.map(bn=>L.jsx("option",{value:String(bn.objectId),children:bn.name||String(bn.objectId)},bn.id))]})]}),L.jsxs("label",{children:["Scale",L.jsx("input",{value:Ne,onChange:bn=>Ue(bn.target.value)})]}),L.jsxs("label",{children:["Kind",L.jsx("input",{value:ln,onChange:bn=>un(bn.target.value)})]}),L.jsxs("label",{children:["Species",L.jsx("input",{value:An,onChange:bn=>xn(bn.target.value)})]})]}),M&&L.jsxs("section",{className:"selector-preview","data-testid":"instance-preview",children:[L.jsxs("strong",{children:[M.objectIds.length," claimed object",M.objectIds.length===1?"":"s"]}),L.jsx("code",{children:M.objectIds.map(String).join(", ")}),M.applications.map(bn=>L.jsxs("div",{children:[L.jsx("code",{children:bn.applicationId}),L.jsxs("span",{children:[bn.targetIds.length," resolved target",bn.targetIds.length===1?"":"s"]})]},bn.applicationId)),M.diagnostics.map(bn=>L.jsx("p",{children:bn},bn))]})]}),L.jsxs("footer",{children:[L.jsx("button",{onClick:k,children:"Cancel"}),L.jsxs("button",{disabled:!dn,onClick:()=>N(nt()),"data-testid":"instance-preview-button",children:[L.jsx(Dke,{size:15})," Preview mount"]}),L.jsxs("button",{className:"primary",disabled:!dn,onClick:()=>$(nt()),"data-testid":"instance-submit",children:[L.jsx(TA,{size:15})," Add instance"]})]})]})})}function eKn(g,E){const x=new Set(E.flatMap(M=>M.objectIds.map(String)));return g.filter(M=>!x.has(String(M.objectId)))}function nKn({mode:g,objects:E,object:x,onSubmit:M,onClose:N}){const[$,k]=Be.useState(String(x?.objectId??"")),[H,U]=Be.useState(tKn(x?.parent)),[G,ie]=Be.useState(x?.scale||""),[W,Z]=Be.useState(x?.kind||""),[le,oe]=Be.useState(x?.species||""),[ee,Ce]=Be.useState(x?.name||""),pe=Be.useMemo(()=>E.filter(ae=>String(ae.objectId)!==$),[$,E]),$e=()=>M({objectId:$.trim(),configuration:{parent:H||null,scale:G.trim()||null,kind:W.trim()||null,species:le.trim()||null,name:ee.trim()||null}});return L.jsx("div",{className:"overlay-backdrop",onMouseDown:N,children:L.jsxs("section",{className:"overlay-panel object-form",onMouseDown:ae=>ae.stopPropagation(),"data-testid":"object-form",children:[L.jsxs("header",{children:[L.jsxs("div",{children:[L.jsx("strong",{children:g==="add"?"Add scene object":`Update object ${String(x?.objectId)}`}),L.jsx("span",{children:"Objects define the concrete entities and topology targeted by applications"})]}),L.jsx("button",{onClick:N,children:L.jsx(Jg,{size:17})})]}),L.jsxs("div",{className:"overlay-content object-form-content",children:[L.jsxs("label",{children:["Stable object ID",L.jsx("input",{value:$,disabled:g==="update",onChange:ae=>k(ae.target.value),"data-testid":"object-id"})]}),L.jsxs("label",{children:["Parent object",L.jsxs("select",{value:H,onChange:ae=>U(ae.target.value),children:[L.jsx("option",{value:"",children:"No parent"}),pe.map(ae=>L.jsxs("option",{value:String(ae.objectId),children:[ae.name||String(ae.objectId)," · ",ae.scale||"unscaled"]},ae.id))]})]}),L.jsxs("div",{className:"form-grid",children:[L.jsxs("label",{children:["Scale",L.jsx("input",{value:G,onChange:ae=>ie(ae.target.value)})]}),L.jsxs("label",{children:["Kind",L.jsx("input",{value:W,onChange:ae=>Z(ae.target.value)})]}),L.jsxs("label",{children:["Species",L.jsx("input",{value:le,onChange:ae=>oe(ae.target.value)})]}),L.jsxs("label",{children:["Name",L.jsx("input",{value:ee,onChange:ae=>Ce(ae.target.value)})]})]})]}),L.jsxs("footer",{children:[L.jsx("button",{onClick:N,children:"Cancel"}),L.jsxs("button",{className:"primary",disabled:!$.trim(),onClick:$e,"data-testid":"object-submit",children:[L.jsx(TA,{size:15})," ",g==="add"?"Add object":"Apply changes"]})]})]})})}function tKn(g){if(g==null||g==="")return"";const E=String(g);return E.startsWith("object:")?E.slice(7):E}function iKn({application:g,models:E,instances:x,onSubmit:M,onRemove:N,onClose:$}){const k=Be.useMemo(()=>E.filter(nt=>nt.process===g.process),[g.process,E]),H=W0n(k,g)||k[0]||null,[U,G]=Be.useState("instance"),[ie,W]=Be.useState(g.targetInstances[0]||x[0]?.name||""),Z=x.find(nt=>nt.name===ie),le=(Z?.objectIds||[]).filter(nt=>g.targetIds.some(dn=>String(dn)===String(nt))),[oe,ee]=Be.useState(le[0]??""),[Ce,pe]=Be.useState(H?.type||g.modelType),$e=k.find(nt=>nt.type===Ce)||H,[ae,Ne]=Be.useState(()=>Cue($e,g)),Ue=g.owner.applicationId,ln=!!Z?.instanceOverrides.includes(Ue),un=!!Z?.objectOverrides.some(nt=>{const dn=nt;return String(dn.object??dn.objectId??"")===String(oe)&&String(dn.application??dn.applicationId??"")===Ue}),An=U==="instance"?ln:un,xn=nt=>{pe(nt),Ne(Cue(k.find(dn=>dn.type===nt)||null))};return L.jsx("div",{className:"overlay-backdrop",onMouseDown:$,children:L.jsxs("section",{className:"overlay-panel override-form",onMouseDown:nt=>nt.stopPropagation(),"data-testid":"override-form",children:[L.jsxs("header",{children:[L.jsxs("div",{children:[L.jsx("strong",{children:"Create a model override"}),L.jsx("span",{children:"The shared template remains unchanged outside the selected scope"})]}),L.jsx("button",{onClick:$,children:L.jsx(Jg,{size:17})})]}),L.jsxs("div",{className:"overlay-content override-form-content",children:[L.jsxs("div",{className:"override-scope-choice",children:[L.jsxs("button",{className:U==="instance"?"active":"",onClick:()=>G("instance"),children:[L.jsx("strong",{children:"One instance"}),L.jsx("span",{children:"All targets of this application in one plant or object instance"})]}),L.jsxs("button",{className:U==="object"?"active":"",onClick:()=>G("object"),children:[L.jsx("strong",{children:"One object"}),L.jsx("span",{children:"Only one concrete execution receives the replacement model"})]})]}),L.jsxs("div",{className:"form-grid",children:[L.jsxs("label",{children:["Instance",L.jsx("select",{value:ie,onChange:nt=>{const dn=nt.target.value,Y=(x.find(Je=>Je.name===dn)?.objectIds||[]).find(Je=>g.targetIds.some(pn=>String(pn)===String(Je)));W(dn),ee(Y??"")},children:x.filter(nt=>g.targetInstances.includes(nt.name)).map(nt=>L.jsx("option",{value:nt.name,children:nt.name},nt.name))})]}),U==="object"&&L.jsxs("label",{children:["Object",L.jsx("select",{value:String(oe),onChange:nt=>ee(nt.target.value),children:le.map(nt=>L.jsx("option",{value:String(nt),children:String(nt)},String(nt)))})]}),L.jsxs("label",{children:["Replacement model",L.jsx("select",{value:Ce,onChange:nt=>xn(nt.target.value),children:k.map(nt=>L.jsxs("option",{value:nt.type,children:[nt.package?`${nt.package} · `:"",nt.name]},nt.type))})]})]}),$e&&$e.constructor.fields.length>0&&L.jsxs("fieldset",{children:[L.jsx("legend",{children:"Model parameters"}),L.jsx(Z0n,{fields:$e.constructor.fields,values:ae,onChange:Ne})]}),L.jsxs("div",{className:"override-warning",children:[L.jsx("strong",{children:U==="instance"?`Override ${ie}`:`Override object ${String(oe)}`}),L.jsx("span",{children:"Julia validates that the replacement keeps the same process and declared variable contract."})]})]}),L.jsxs("footer",{children:[L.jsx("button",{onClick:$,children:"Cancel"}),An&&L.jsxs("button",{className:"danger","data-testid":"remove-override",onClick:()=>N({scope:U,instance:ie,objectId:U==="object"?oe:void 0,applicationRef:g.owner,modelType:Ce,parameters:ae}),children:[L.jsx(BG,{size:15})," Remove override"]}),L.jsxs("button",{className:"primary",disabled:!ie||!Ce||U==="object"&&!String(oe),onClick:()=>M({scope:U,instance:ie,objectId:U==="object"?oe:void 0,applicationRef:g.owner,modelType:Ce,parameters:ae}),children:[L.jsx(TA,{size:15})," Apply override"]})]})]})})}function sue(g){throw new Error('Could not dynamically require "'+g+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var K7e={exports:{}},edn;function rKn(){return edn||(edn=1,(function(g,E){(function(x){g.exports=x()})(function(){return(function(){function x(M,N,$){function k(G,ie){if(!N[G]){if(!M[G]){var W=typeof sue=="function"&&sue;if(!ie&&W)return W(G,!0);if(H)return H(G,!0);var Z=new Error("Cannot find module '"+G+"'");throw Z.code="MODULE_NOT_FOUND",Z}var le=N[G]={exports:{}};M[G][0].call(le.exports,function(oe){var ee=M[G][1][oe];return k(ee||oe)},le,le.exports,x,M,N,$)}return N[G].exports}for(var H=typeof sue=="function"&&sue,U=0;U<$.length;U++)k($[U]);return k}return x})()({1:[function(x,M,N){Object.defineProperty(N,"__esModule",{value:!0}),N.default=void 0;function $(Z){"@babel/helpers - typeof";return $=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(le){return typeof le}:function(le){return le&&typeof Symbol=="function"&&le.constructor===Symbol&&le!==Symbol.prototype?"symbol":typeof le},$(Z)}function k(Z,le){if(!(Z instanceof le))throw new TypeError("Cannot call a class as a function")}function H(Z,le){for(var oe=0;oe0&&arguments[0]!==void 0?arguments[0]:{},ee=oe.defaultLayoutOptions,Ce=ee===void 0?{}:ee,pe=oe.algorithms,$e=pe===void 0?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking"]:pe,ae=oe.workerFactory,Ne=oe.workerUrl;if(k(this,Z),this.defaultLayoutOptions=Ce,this.initialized=!1,typeof Ne>"u"&&typeof ae>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var Ue=ae;typeof Ne<"u"&&typeof ae>"u"&&(Ue=function(An){return new Worker(An)});var ln=Ue(Ne);if(typeof ln.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new W(ln),this.worker.postMessage({cmd:"register",algorithms:$e}).then(function(un){return le.initialized=!0}).catch(console.err)}return U(Z,[{key:"layout",value:function(oe){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ce=ee.layoutOptions,pe=Ce===void 0?this.defaultLayoutOptions:Ce,$e=ee.logging,ae=$e===void 0?!1:$e,Ne=ee.measureExecutionTime,Ue=Ne===void 0?!1:Ne;return oe?this.worker.postMessage({cmd:"layout",graph:oe,layoutOptions:pe,options:{logging:ae,measureExecutionTime:Ue}}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker&&this.worker.terminate()}}])})();var W=(function(){function Z(le){var oe=this;if(k(this,Z),le===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=le,this.worker.onmessage=function(ee){setTimeout(function(){oe.receive(oe,ee)},0)}}return U(Z,[{key:"postMessage",value:function(oe){var ee=this.id||0;this.id=ee+1,oe.id=ee;var Ce=this;return new Promise(function(pe,$e){Ce.resolvers[ee]=function(ae,Ne){ae?(Ce.convertGwtStyleError(ae),$e(ae)):pe(Ne)},Ce.worker.postMessage(oe)})}},{key:"receive",value:function(oe,ee){var Ce=ee.data,pe=oe.resolvers[Ce.id];pe&&(delete oe.resolvers[Ce.id],Ce.error?pe(Ce.error):pe(null,Ce.data))}},{key:"terminate",value:function(){this.worker&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(oe){if(oe){var ee=oe.__java$exception;ee&&(ee.cause&&ee.cause.backingJsObject&&(oe.cause=ee.cause.backingJsObject,this.convertGwtStyleError(oe.cause)),delete oe.__java$exception)}}}])})()},{}],2:[function(x,M,N){(function($){(function(){var k;typeof window<"u"?k=window:typeof $<"u"?k=$:typeof self<"u"&&(k=self);var H;function U(){}function G(){}function ie(){}function W(){}function Z(){}function le(){}function oe(){}function ee(){}function Ce(){}function pe(){}function $e(){}function ae(){}function Ne(){}function Ue(){}function ln(){}function un(){}function An(){}function xn(){}function nt(){}function dn(){}function bn(){}function Y(){}function Je(){}function pn(){}function Ae(){}function ve(){}function nn(){}function yn(){}function Pn(){}function ye(){}function Re(){}function tt(){}function ut(){}function Jt(){}function di(){}function Gt(){}function xt(){}function si(){}function Kr(){}function Er(){}function Mt(){}function bi(){}function zi(){}function cu(){}function Fu(){}function Rs(){}function ia(){}function ef(){}function Oa(){}function Cc(){}function o0(){}function xb(){}function Sl(){}function cd(){}function s0(){}function uh(){}function ud(){}function b5(){}function l0(){}function Cp(){}function l6(){}function Ab(){}function ra(){}function od(){}function Sf(){}function f6(){}function oh(){}function Tp(){}function Gg(){}function qg(){}function Ug(){}function sd(){}function Xg(){}function Mb(){}function g5(){}function Op(){}function Np(){}function uu(){}function w5(){}function Kg(){}function rv(){}function p5(){}function Vg(){}function cv(){}function m5(){}function v5(){}function b1(){}function Ws(){}function xf(){}function vt(){}function kc(){}function tc(){}function tk(){}function f0(){}function Yg(){}function a6(){}function Ip(){}function Dp(){}function _p(){}function Lp(){}function xl(){}function y5(){}function ik(){}function Qg(){}function Pp(){}function OA(){}function h6(){}function rk(){}function ck(){}function uv(){}function k5(){}function a0(){}function _h(){}function uk(){}function NA(){}function j5(){}function ok(){}function ov(){}function IA(){}function Lh(){}function sv(){}function sk(){}function d6(){}function Wg(){}function kD(){}function jD(){}function E5(){}function oq(){}function ED(){}function SD(){}function DA(){}function sq(){}function lq(){}function lk(){}function Zg(){}function _A(){}function LA(){}function S5(){}function x5(){}function xD(){}function PA(){}function AD(){}function b6(){}function ew(){}function $A(){}function g6(){}function $p(){}function RA(){}function fk(){}function MD(){}function ak(){}function hk(){}function CD(){}function Ph(){}function lv(){}function dk(){}function w6(){}function fq(){}function BA(){}function zA(){}function p6(){}function bk(){}function TD(){}function aq(){}function hq(){}function dq(){}function FA(){}function bq(){}function gq(){}function wq(){}function pq(){}function mq(){}function OD(){}function vq(){}function yq(){}function kq(){}function jq(){}function JA(){}function Eq(){}function Sq(){}function xq(){}function ND(){}function Aq(){}function Mq(){}function Cq(){}function Tq(){}function Oq(){}function Nq(){}function Iq(){}function Dq(){}function _q(){}function HA(){}function m6(){}function Lq(){}function ID(){}function DD(){}function _D(){}function LD(){}function PD(){}function A5(){}function Pq(){}function $q(){}function Rq(){}function $D(){}function RD(){}function v6(){}function y6(){}function Bq(){}function gk(){}function BD(){}function GA(){}function qA(){}function UA(){}function zD(){}function FD(){}function JD(){}function zq(){}function Fq(){}function Jq(){}function Hq(){}function Gq(){}function g1(){}function k6(){}function HD(){}function GD(){}function qD(){}function UD(){}function XA(){}function qq(){}function M5(){}function KA(){}function j6(){}function VA(){}function XD(){}function fv(){}function C5(){}function YA(){}function KD(){}function av(){}function VD(){}function YD(){}function QD(){}function Uq(){}function Xq(){}function Kq(){}function WD(){}function ZD(){}function QA(){}function h0(){}function wk(){}function ld(){}function T5(){}function WA(){}function pk(){}function mk(){}function ZA(){}function hv(){}function e_(){}function vk(){}function O5(){}function Vq(){}function w1(){}function eM(){}function nw(){}function n_(){}function yk(){}function dv(){}function nM(){}function t_(){}function tM(){}function i_(){}function fd(){}function N5(){}function I5(){}function kk(){}function E6(){}function ad(){}function hd(){}function Rp(){}function Cb(){}function Tb(){}function tw(){}function r_(){}function iM(){}function rM(){}function c_(){}function ca(){}function Jo(){}function ou(){}function Bp(){}function dd(){}function cM(){}function zp(){}function u_(){}function o_(){}function D5(){}function bv(){}function _5(){}function Fp(){}function uM(){}function Jp(){}function iw(){}function Hp(){}function rw(){}function oM(){}function sM(){}function L5(){}function S6(){}function Gp(){}function ua(){}function x6(){}function lM(){}function Yq(){}function Qq(){}function A6(){}function Al(){}function fM(){}function M6(){}function C6(){}function aM(){}function P5(){}function $5(){}function Wq(){}function s_(){}function Zq(){}function l_(){}function gv(){}function hM(){}function jk(){}function f_(){}function R5(){}function dM(){}function Ek(){}function Sk(){}function a_(){}function h_(){}function wv(){}function pv(){}function d_(){}function bM(){}function B5(){}function T6(){}function xk(){}function O6(){}function Ak(){}function b_(){}function mv(){}function g_(){}function qp(){}function gM(){}function wM(){}function Up(){}function Xp(){}function N6(){}function pM(){}function mM(){}function I6(){}function D6(){}function w_(){}function p_(){}function z5(){}function Mk(){}function m_(){}function vM(){}function yM(){}function p1(){}function bd(){}function Kp(){}function kM(){}function v_(){}function Vp(){}function m1(){}function Zs(){}function Ck(){}function cw(){}function bc(){}function vo(){}function Ml(){}function Tk(){}function F5(){}function vv(){}function Ok(){}function _6(){}function J5(){}function eU(){}function Bs(){}function jM(){}function EM(){}function y_(){}function k_(){}function nU(){}function SM(){}function xM(){}function AM(){}function sh(){}function el(){}function Nk(){}function L6(){}function Ik(){}function MM(){}function uw(){}function Dk(){}function CM(){}function TM(){}function j_(){}function E_(){}function S_(){}function tU(){}function x_(){}function A_(){}function OM(){}function M_(){}function iU(){}function C_(){}function T_(){}function O_(){}function NM(){}function N_(){}function I_(){}function D_(){}function __(){}function L_(){}function rU(){}function P_(){}function H5(){}function $_(){}function _k(){}function Lk(){}function R_(){}function IM(){}function cU(){}function B_(){}function z_(){}function F_(){}function J_(){}function H_(){}function DM(){}function G_(){}function q_(){}function _M(){}function U_(){}function X_(){}function LM(){}function P6(){}function K_(){}function Pk(){}function PM(){}function V_(){}function Y_(){}function uU(){}function oU(){}function Q_(){}function $6(){}function $M(){}function $k(){}function W_(){}function RM(){}function R6(){}function sU(){}function BM(){}function Z_(){}function zM(){}function FM(){}function eL(){}function nL(){}function yv(){}function tL(){}function gd(){}function iL(){}function d0(){}function JM(){}function HM(){}function rL(){}function cL(){}function lU(){}function GM(){}function Cl(){}function oa(){}function uL(){}function oL(){}function sL(){}function lL(){}function B6(){}function fL(){}function Rk(){}function aL(){}function fU(){}function Bk(){}function qM(){}function hL(){}function dL(){}function Ge(){}function UM(){}function XM(){}function KM(){}function bL(){}function VM(){}function zk(){}function YM(){}function gL(){}function QM(){}function wL(){}function ow(){}function z6(){}function aU(){}function pL(){}function b0(){}function WM(){}function mL(){}function Fk(){}function kv(){}function yo(){}function Jk(){}function hU(){}function ZM(){}function F6(){}function Yp(){}function J6(){}function vL(){}function H6(){}function Ob(){}function G6(){}function eC(){}function yL(){}function nC(){}function tC(){}function jv(){}function kL(){}function Nb(){}function Tl(){}function q6(){}function iC(){}function Af(){}function dU(){}function jL(){}function EL(){}function Ss(){}function $h(){}function sw(){}function SL(){}function xL(){}function AL(){}function bU(){}function Hk(){}function Rh(){}function g0(){}function ML(){}function Ol(){}function Gk(){}function lw(){}function Ev(){}function fw(){}function rC(){}function cC(){}function w0(){}function CL(){}function G5(){}function U6(){}function X6(){}function q5(){}function TL(){}function OL(){}function K6(){}function NL(){}function qk(){}function IL(){}function gU(){}function wU(){}function Ju(){}function Do(){}function Hc(){}function nu(){}function io(){}function v1(){}function Qp(){}function U5(){}function uC(){}function aw(){}function zs(){}function Wp(){}function Sv(){}function oC(){}function y1(){}function X5(){}function V6(){}function Bh(){}function sC(){}function Uk(){}function DL(){}function Xk(){}function Kk(){}function Zp(){}function nf(){}function e2(){}function K5(){}function hw(){}function lC(){}function fC(){}function _L(){}function Y6(){}function aC(){}function k1(){}function LL(){}function zh(){}function PL(){}function $L(){}function pU(){}function n2(){}function Vk(){}function hC(){}function V5(){}function RL(){}function BL(){}function zL(){}function FL(){}function Yk(){}function dC(){}function mU(){}function vU(){}function yU(){}function JL(){}function HL(){}function Y5(){}function Qk(){}function GL(){}function qL(){}function UL(){}function XL(){}function KL(){}function VL(){}function Wk(){}function YL(){}function QL(){}function ro(){}function bC(){}function kU(){}function WL(){}function jU(){}function EU(){}function SU(){}function Zk(){}function Q5(){}function gC(){}function ej(){}function wC(){}function t2(){}function Ib(){}function Q6(){}function xU(){}function ZL(){}function pC(){}function eP(){}function nP(){}function mC(){vj()}function vC(){C0e()}function tP(){Hf()}function iP(){Rde()}function AU(){RO()}function yC(){IT()}function kC(){cT()}function MU(){rT()}function CU(){TMe()}function W6(){q4()}function TU(){r$e()}function rP(){i8()}function Gc(){G0()}function jC(){Bhe()}function nj(){K_e()}function EC(){Rhe()}function cP(){Y_e()}function SC(){V_e()}function Z6(){Q_e()}function tj(){P$e()}function OU(){W_e()}function uP(){MBe()}function NU(){Ie()}function IU(){ZP()}function oP(){xBe()}function sP(){ABe()}function ko(){YLe()}function xC(){Dge()}function sa(){CBe()}function DU(){eLe()}function lP(){H4()}function _U(){zFe()}function AC(){P1()}function MC(){cbe()}function ij(){HO()}function fP(){YBe()}function aP(){Gbe()}function CC(){THe()}function TC(){Z_e()}function LU(){WXe()}function hP(){Mu()}function PU(){Ha()}function dP(){nge()}function $U(){q0()}function RU(){_W()}function i2(){HQ()}function bP(){rB()}function OC(){Xt()}function NC(){xz()}function BU(){BB()}function zU(){bde()}function IC(){Uz()}function rj(){JY()}function nl(){_Ne()}function FU(){rge()}function j1(e){_n(e)}function DC(e){this.a=e}function e9(e){this.a=e}function gP(e){this.a=e}function wP(e){this.a=e}function n9(e){this.a=e}function E1(e){this.a=e}function _C(e){this.a=e}function cj(e){this.a=e}function p0(e){this.a=e}function JU(e){this.a=e}function HU(e){this.a=e}function W5(e){this.a=e}function pP(e){this.a=e}function GU(e){this.c=e}function qU(e){this.a=e}function LC(e){this.a=e}function UU(e){this.a=e}function XU(e){this.a=e}function KU(e){this.a=e}function PC(e){this.a=e}function mP(e){this.a=e}function Z5(e){this.a=e}function xv(e){this.a=e}function vP(e){this.a=e}function $C(e){this.a=e}function e4(e){this.a=e}function t9(e){this.a=e}function yP(e){this.a=e}function uj(e){this.a=e}function RC(e){this.a=e}function BC(e){this.a=e}function oj(e){this.a=e}function kP(e){this.a=e}function jP(e){this.a=e}function VU(e){this.a=e}function EP(e){this.a=e}function YU(e){this.a=e}function zC(e){this.a=e}function QU(e){this.a=e}function i9(e){this.a=e}function r9(e){this.a=e}function Av(e){this.a=e}function c9(e){this.a=e}function n4(e){this.b=e}function wd(){this.a=[]}function SP(e,n){e.a=n}function WU(e,n){e.a=n}function ZU(e,n){e.b=n}function eX(e,n){e.c=n}function xP(e,n){e.c=n}function nX(e,n){e.d=n}function tX(e,n){e.d=n}function Mf(e,n){e.k=n}function AP(e,n){e.j=n}function Jue(e,n){e.c=n}function sj(e,n){e.c=n}function lj(e,n){e.a=n}function FC(e,n){e.a=n}function MP(e,n){e.f=n}function iX(e,n){e.a=n}function CP(e,n){e.b=n}function Db(e,n){e.d=n}function m0(e,n){e.i=n}function dw(e,n){e.o=n}function fj(e,n){e.r=n}function aj(e,n){e.a=n}function Mv(e,n){e.b=n}function rX(e,n){e.e=n}function cX(e,n){e.f=n}function t4(e,n){e.g=n}function Hue(e,n){e.e=n}function uX(e,n){e.f=n}function JC(e,n){e.f=n}function hj(e,n){e.a=n}function HC(e,n){e.b=n}function GC(e,n){e.n=n}function qC(e,n){e.a=n}function oX(e,n){e.c=n}function u9(e,n){e.c=n}function sX(e,n){e.c=n}function TP(e,n){e.a=n}function UC(e,n){e.a=n}function lX(e,n){e.d=n}function Gue(e,n){e.d=n}function XC(e,n){e.e=n}function a(e,n){e.e=n}function d(e,n){e.g=n}function w(e,n){e.f=n}function j(e,n){e.j=n}function T(e,n){e.a=n}function I(e,n){e.a=n}function Q(e,n){e.b=n}function de(e){e.b=e.a}function tn(e){e.c=e.d.d}function Ln(e){this.a=e}function it(e){this.a=e}function gt(e){this.a=e}function Hn(e){this.a=e}function Zn(e){this.a=e}function Di(e){this.a=e}function Cr(e){this.a=e}function co(e){this.a=e}function Sn(e){this.a=e}function sn(e){this.a=e}function Dn(e){this.a=e}function ot(e){this.a=e}function Hi(e){this.a=e}function _u(e){this.a=e}function Xi(e){this.b=e}function Hr(e){this.b=e}function ic(e){this.b=e}function qc(e){this.d=e}function At(e){this.a=e}function fX(e){this.a=e}function que(e){this.a=e}function Lke(e){this.a=e}function Pke(e){this.a=e}function Uue(e){this.a=e}function Xue(e){this.a=e}function aX(e){this.c=e}function P(e){this.c=e}function $ke(e){this.c=e}function Kue(e){this.a=e}function Vue(e){this.a=e}function Yue(e){this.a=e}function Que(e){this.a=e}function o9(e){this.a=e}function Rke(e){this.a=e}function Bke(e){this.a=e}function s9(e){this.a=e}function zke(e){this.a=e}function Fke(e){this.a=e}function Jke(e){this.a=e}function Hke(e){this.a=e}function Gke(e){this.a=e}function qke(e){this.a=e}function Uke(e){this.a=e}function Xke(e){this.a=e}function Kke(e){this.a=e}function Vke(e){this.a=e}function Yke(e){this.a=e}function dj(e){this.a=e}function Qke(e){this.a=e}function Wke(e){this.a=e}function OP(e){this.a=e}function Zke(e){this.a=e}function eje(e){this.a=e}function Wue(e){this.a=e}function nje(e){this.a=e}function tje(e){this.a=e}function ije(e){this.a=e}function Zue(e){this.a=e}function eoe(e){this.a=e}function noe(e){this.a=e}function bj(e){this.a=e}function l9(e){this.a=e}function rje(e){this.a=e}function i4(e){this.a=e}function toe(e){this.a=e}function cje(e){this.a=e}function uje(e){this.a=e}function oje(e){this.a=e}function sje(e){this.a=e}function lje(e){this.a=e}function fje(e){this.a=e}function aje(e){this.a=e}function hje(e){this.a=e}function dje(e){this.a=e}function bje(e){this.a=e}function gje(e){this.a=e}function ioe(e){this.a=e}function wje(e){this.a=e}function pje(e){this.a=e}function mje(e){this.a=e}function vje(e){this.a=e}function yje(e){this.a=e}function kje(e){this.a=e}function jje(e){this.a=e}function Eje(e){this.a=e}function Sje(e){this.a=e}function xje(e){this.a=e}function Aje(e){this.a=e}function Mje(e){this.a=e}function Cje(e){this.a=e}function Tje(e){this.a=e}function Oje(e){this.a=e}function Nje(e){this.a=e}function Ije(e){this.a=e}function Dje(e){this.a=e}function _je(e){this.a=e}function Lje(e){this.a=e}function Pje(e){this.a=e}function $je(e){this.a=e}function Rje(e){this.a=e}function Bje(e){this.a=e}function zje(e){this.a=e}function Fje(e){this.a=e}function Jje(e){this.a=e}function Hje(e){this.a=e}function Gje(e){this.a=e}function qje(e){this.a=e}function Uje(e){this.a=e}function Xje(e){this.a=e}function Kje(e){this.a=e}function Vje(e){this.a=e}function Yje(e){this.a=e}function Qje(e){this.a=e}function Wje(e){this.b=e}function Zje(e){this.a=e}function eEe(e){this.a=e}function nEe(e){this.a=e}function tEe(e){this.a=e}function iEe(e){this.a=e}function rEe(e){this.a=e}function cEe(e){this.c=e}function uEe(e){this.a=e}function oEe(e){this.a=e}function sEe(e){this.a=e}function lEe(e){this.a=e}function fEe(e){this.a=e}function aEe(e){this.a=e}function hEe(e){this.a=e}function dEe(e){this.a=e}function bEe(e){this.a=e}function gEe(e){this.a=e}function wEe(e){this.a=e}function pEe(e){this.a=e}function mEe(e){this.a=e}function vEe(e){this.a=e}function yEe(e){this.a=e}function kEe(e){this.a=e}function jEe(e){this.a=e}function EEe(e){this.a=e}function SEe(e){this.a=e}function xEe(e){this.a=e}function AEe(e){this.a=e}function MEe(e){this.a=e}function CEe(e){this.a=e}function TEe(e){this.a=e}function OEe(e){this.a=e}function NEe(e){this.a=e}function IEe(e){this.a=e}function S1(e){this.a=e}function Cv(e){this.a=e}function DEe(e){this.a=e}function _Ee(e){this.a=e}function LEe(e){this.a=e}function PEe(e){this.a=e}function $Ee(e){this.a=e}function REe(e){this.a=e}function BEe(e){this.a=e}function zEe(e){this.a=e}function FEe(e){this.a=e}function JEe(e){this.a=e}function HEe(e){this.a=e}function GEe(e){this.a=e}function qEe(e){this.a=e}function UEe(e){this.a=e}function XEe(e){this.a=e}function KEe(e){this.a=e}function VEe(e){this.a=e}function YEe(e){this.a=e}function QEe(e){this.a=e}function WEe(e){this.a=e}function ZEe(e){this.a=e}function eSe(e){this.a=e}function nSe(e){this.a=e}function tSe(e){this.a=e}function iSe(e){this.a=e}function rSe(e){this.a=e}function NP(e){this.a=e}function cSe(e){this.f=e}function uSe(e){this.a=e}function oSe(e){this.a=e}function sSe(e){this.a=e}function lSe(e){this.a=e}function fSe(e){this.a=e}function aSe(e){this.a=e}function hSe(e){this.a=e}function dSe(e){this.a=e}function bSe(e){this.a=e}function gSe(e){this.a=e}function wSe(e){this.a=e}function pSe(e){this.a=e}function mSe(e){this.a=e}function vSe(e){this.a=e}function ySe(e){this.a=e}function kSe(e){this.a=e}function jSe(e){this.a=e}function ESe(e){this.a=e}function SSe(e){this.a=e}function xSe(e){this.a=e}function ASe(e){this.a=e}function MSe(e){this.a=e}function CSe(e){this.a=e}function TSe(e){this.a=e}function OSe(e){this.a=e}function NSe(e){this.a=e}function ISe(e){this.a=e}function hX(e){this.a=e}function roe(e){this.a=e}function ki(e){this.b=e}function DSe(e){this.a=e}function _Se(e){this.a=e}function LSe(e){this.a=e}function PSe(e){this.a=e}function $Se(e){this.a=e}function RSe(e){this.a=e}function BSe(e){this.a=e}function zSe(e){this.b=e}function FSe(e){this.a=e}function KC(e){this.a=e}function JSe(e){this.a=e}function HSe(e){this.a=e}function IP(e){this.a=e}function DP(e){this.a=e}function coe(e){this.c=e}function _P(e){this.e=e}function LP(e){this.e=e}function dX(e){this.a=e}function GSe(e){this.d=e}function qSe(e){this.a=e}function uoe(e){this.a=e}function ooe(e){this.a=e}function bw(e){this.e=e}function ibn(){this.a=0}function Oe(){CK(this)}function wt(){Hu(this)}function bX(){LDe(this)}function USe(){}function gw(){this.c=Q8e}function XSe(e,n){e.b+=n}function rbn(e,n){n.Wb(e)}function cbn(e){return e.a}function ubn(e){return e.a}function obn(e){return e.a}function sbn(e){return e.a}function lbn(e){return e.a}function R(e){return e.e}function fbn(){return null}function abn(){return null}function hbn(e){throw R(e)}function r4(e){this.a=Nt(e)}function KSe(){this.a=this}function _b(){hOe.call(this)}function dbn(e){e.b.Mf(e.e)}function VSe(e){e.b=new NX}function gj(e,n){e.b=n-e.b}function wj(e,n){e.a=n-e.a}function YSe(e,n){n.gd(e.a)}function bbn(e,n){Ar(n,e)}function Gn(e,n){e.push(n)}function QSe(e,n){e.sort(n)}function gbn(e,n,t){e.Wd(t,n)}function VC(e,n){e.e=n,n.b=e}function wbn(){zoe(),RRn()}function WSe(e){B9(),ite.je(e)}function soe(){_b.call(this)}function gX(){_b.call(this)}function loe(){hOe.call(this)}function ZSe(){_b.call(this)}function Nl(){_b.call(this)}function exe(){_b.call(this)}function YC(){_b.call(this)}function is(){_b.call(this)}function c4(){_b.call(this)}function _t(){_b.call(this)}function hu(){_b.call(this)}function nxe(){_b.call(this)}function PP(){this.Bb|=256}function txe(){this.b=new aTe}function foe(){foe=Y,new wt}function r2(e,n){e.length=n}function $P(e,n){Te(e.a,n)}function pbn(e,n){O0e(e.c,n)}function mbn(e,n){hr(e.b,n)}function f9(e,n){hi(e.e,n)}function vbn(e,n){az(e.a,n)}function ybn(e,n){wQ(e.a,n)}function u4(e){Tz(e.c,e.b)}function kbn(e,n){e.kc().Nb(n)}function aoe(e){this.a=Njn(e)}function ar(){this.a=new wt}function ixe(){this.a=new wt}function RP(){this.a=new Oe}function wX(){this.a=new Oe}function hoe(){this.a=new Oe}function Lb(){this.a=new KPe}function pX(){this.a=new jMe}function doe(){this.a=new R_e}function boe(){this.a=new rNe}function tf(){this.a=new l6}function goe(){this.a=new rv}function rxe(){this.a=new pLe}function cxe(){this.a=new Oe}function uxe(){this.a=new Oe}function woe(){this.a=new Oe}function oxe(){this.a=new Oe}function sxe(){this.d=new Oe}function lxe(){this.a=new ar}function fxe(){this.a=new wt}function axe(){this.b=new wt}function hxe(){this.b=new Oe}function poe(){this.e=new Oe}function dxe(){this.a=new Gc}function bxe(){this.d=new Oe}function pj(){USe.call(this)}function mX(){pj.call(this)}function o4(){USe.call(this)}function moe(){o4.call(this)}function gxe(){soe.call(this)}function BP(){RP.call(this)}function wxe(){X$.call(this)}function pxe(){woe.call(this)}function mxe(){Oe.call(this)}function vxe(){g_e.call(this)}function yxe(){g_e.call(this)}function kxe(){joe.call(this)}function jxe(){joe.call(this)}function Exe(){joe.call(this)}function Sxe(){Eoe.call(this)}function mj(){Fk.call(this)}function voe(){Fk.call(this)}function xs(){xi.call(this)}function xxe(){Bxe.call(this)}function Axe(){Bxe.call(this)}function Mxe(){wt.call(this)}function Cxe(){wt.call(this)}function Txe(){wt.call(this)}function vX(){kBe.call(this)}function Oxe(){ar.call(this)}function Nxe(){PP.call(this)}function yX(){cle.call(this)}function yoe(){wt.call(this)}function kX(){cle.call(this)}function jX(){wt.call(this)}function Ixe(){wt.call(this)}function koe(){jv.call(this)}function Dxe(){koe.call(this)}function _xe(){jv.call(this)}function Lxe(){pC.call(this)}function joe(){this.a=new ar}function Pxe(){this.a=new wt}function $xe(){this.a=new Oe}function Rxe(){this.j=new Oe}function Eoe(){this.a=new wt}function s4(){this.a=new xi}function Bxe(){this.a=new eC}function Soe(){this.a=new J_}function zxe(){this.a=new $Ae}function vj(){vj=Y,Vne=new G}function EX(){EX=Y,Yne=new Jxe}function SX(){SX=Y,Qne=new Fxe}function Fxe(){xv.call(this,"")}function Jxe(){xv.call(this,"")}function Hxe(e){QRe.call(this,e)}function Gxe(e){QRe.call(this,e)}function xoe(e){E1.call(this,e)}function Aoe(e){YAe.call(this,e)}function jbn(e){YAe.call(this,e)}function Ebn(e){Aoe.call(this,e)}function Sbn(e){Aoe.call(this,e)}function xbn(e){Aoe.call(this,e)}function qxe(e){uY.call(this,e)}function Uxe(e){uY.call(this,e)}function Xxe(e){VTe.call(this,e)}function Kxe(e){Xoe.call(this,e)}function yj(e){YP.call(this,e)}function Moe(e){YP.call(this,e)}function Vxe(e){YP.call(this,e)}function du(e){HIe.call(this,e)}function Yxe(e){du.call(this,e)}function l4(){c9.call(this,{})}function xX(e){j9(),this.a=e}function Qxe(e){e.b=null,e.c=0}function Abn(e,n){e.e=n,QUe(e,n)}function Mbn(e,n){e.a=n,BCn(e)}function AX(e,n,t){e.a[n.g]=t}function Cbn(e,n,t){uAn(t,e,n)}function Tbn(e,n){u2n(n.i,e.n)}function Wxe(e,n){ykn(e).Ad(n)}function Obn(e,n){return e*e/n}function Zxe(e,n){return e.g-n.g}function Nbn(e,n){e.a.ec().Kc(n)}function Ibn(e){return new Av(e)}function Dbn(e){return new M2(e)}function eAe(){eAe=Y,vme=new U}function Coe(){Coe=Y,yme=new Ue}function zP(){zP=Y,XS=new An}function FP(){FP=Y,Zne=new KTe}function nAe(){nAe=Y,Zen=new nt}function JP(e){n1e(),this.a=e}function MX(e){fV(),this.f=e}function v0(e){fV(),this.f=e}function tAe(e){DNe(),this.a=e}function HP(e){du.call(this,e)}function jo(e){du.call(this,e)}function iAe(e){du.call(this,e)}function CX(e){HIe.call(this,e)}function a9(e){du.call(this,e)}function qn(e){du.call(this,e)}function Uc(e){du.call(this,e)}function rAe(e){du.call(this,e)}function f4(e){du.call(this,e)}function pd(e){du.call(this,e)}function Su(e){_n(e),this.a=e}function kj(e){$fe(e,e.length)}function Toe(e){return ig(e),e}function c2(e){return!!e&&e.b}function _bn(e){return!!e&&e.k}function Lbn(e){return!!e&&e.j}function jj(e){return e.b==e.c}function Fe(e){return _n(e),e}function ne(e){return _n(e),e}function QC(e){return _n(e),e}function Ooe(e){return _n(e),e}function Pbn(e){return _n(e),e}function lh(e){du.call(this,e)}function md(e){du.call(this,e)}function a4(e){du.call(this,e)}function TX(e){du.call(this,e)}function Bt(e){du.call(this,e)}function OX(e){dle.call(this,e,0)}function NX(){Sae.call(this,12,3)}function IX(){this.a=Pt(Nt(To))}function cAe(){throw R(new _t)}function Noe(){throw R(new _t)}function uAe(){throw R(new _t)}function $bn(){throw R(new _t)}function Rbn(){throw R(new _t)}function Bbn(){throw R(new _t)}function GP(){GP=Y,B9()}function vd(){Di.call(this,"")}function Ej(){Di.call(this,"")}function y0(){Di.call(this,"")}function h4(){Di.call(this,"")}function Ioe(e){jo.call(this,e)}function Doe(e){jo.call(this,e)}function fh(e){qn.call(this,e)}function h9(e){Hr.call(this,e)}function oAe(e){h9.call(this,e)}function DX(e){F$.call(this,e)}function zbn(e,n,t){e.c.Cf(n,t)}function Fbn(e,n,t){n.Ad(e.a[t])}function Jbn(e,n,t){n.Ne(e.a[t])}function Hbn(e,n){return e.a-n.a}function Gbn(e,n){return e.a-n.a}function qbn(e,n){return e.a-n.a}function qP(e,n){return yY(e,n)}function z(e,n){return G_e(e,n)}function Ubn(e,n){return n in e.a}function sAe(e){return e.a?e.b:0}function Xbn(e){return e.a?e.b:0}function lAe(e,n){return e.f=n,e}function Kbn(e,n){return e.b=n,e}function fAe(e,n){return e.c=n,e}function Vbn(e,n){return e.g=n,e}function _oe(e,n){return e.a=n,e}function Loe(e,n){return e.f=n,e}function Ybn(e,n){return e.f=n,e}function Poe(e,n){return e.e=n,e}function Qbn(e,n){return e.k=n,e}function $oe(e,n){return e.a=n,e}function Wbn(e,n){return e.e=n,e}function Zbn(e,n){e.b=new wc(n)}function aAe(e,n){e._d(n),n.$d(e)}function egn(e,n){il(),n.n.a+=e}function ngn(e,n){G0(),wu(n,e)}function Roe(e){XDe.call(this,e)}function hAe(e){XDe.call(this,e)}function dAe(){qse.call(this,"")}function bAe(){this.b=0,this.a=0}function gAe(){gAe=Y,hnn=DAn()}function u2(e,n){return e.b=n,e}function UP(e,n){return e.a=n,e}function o2(e,n){return e.c=n,e}function s2(e,n){return e.d=n,e}function l2(e,n){return e.e=n,e}function Boe(e,n){return e.f=n,e}function Sj(e,n){return e.a=n,e}function d9(e,n){return e.b=n,e}function b9(e,n){return e.c=n,e}function Xe(e,n){return e.c=n,e}function an(e,n){return e.b=n,e}function Ke(e,n){return e.d=n,e}function Ve(e,n){return e.e=n,e}function tgn(e,n){return e.f=n,e}function Ye(e,n){return e.g=n,e}function Qe(e,n){return e.a=n,e}function We(e,n){return e.i=n,e}function Ze(e,n){return e.j=n,e}function ign(e,n){return n.pg(e)}function rgn(e,n){return e.b-n.b}function cgn(e,n){return e.g-n.g}function ugn(e,n){return e.s-n.s}function ogn(e,n){return e?0:n-1}function wAe(e,n){return e?0:n-1}function sgn(e,n){return e?n-1:0}function pAe(e,n){return e.k=n,e}function lgn(e,n){return e.j=n,e}function Vr(){this.a=0,this.b=0}function XP(e){XK.call(this,e)}function k0(e){_w.call(this,e)}function mAe(e){$V.call(this,e)}function vAe(e){$V.call(this,e)}function yAe(){yAe=Y,Pr=eMn()}function j0(){j0=Y,kan=Gxn()}function zoe(){zoe=Y,Lg=SE()}function g9(){g9=Y,Y8e=qxn()}function kAe(){kAe=Y,chn=Uxn()}function Foe(){Foe=Y,Bu=PCn()}function la(e){return e.e&&e.e()}function jAe(e,n){return e.c._b(n)}function EAe(e,n){return kFe(e.b,n)}function SAe(e,n){return Lgn(e.a,n)}function xAe(e,n){e.b=0,$2(e,n)}function fgn(e,n){e.c=n,e.b=!0}function Tv(e,n){return e.a+=n,e}function _X(e,n){return e.a+=n,e}function yd(e,n){return e.a+=n,e}function ww(e,n){return e.a+=n,e}function Pb(e){return M1(e),e.o}function Joe(e){CVe(),QRn(this,e)}function AAe(){throw R(new _t)}function MAe(){throw R(new _t)}function CAe(){throw R(new _t)}function TAe(){throw R(new _t)}function OAe(){throw R(new _t)}function NAe(){throw R(new _t)}function KP(e){this.a=new b4(e)}function kd(e){this.a=new gV(e)}function Ov(e,n){for(;e.Pe(n););}function Hoe(e,n){for(;e.zd(n););}function agn(e,n,t){b3n(e.a,n,t)}function Goe(e,n,t){e.splice(n,t)}function hgn(e,n){return XLn(n,e)}function qoe(e,n){return e.d[n.p]}function WC(e){return e.b!=e.d.c}function IAe(e){return e.l|e.m<<22}function LX(e){return e?e.d:null}function dgn(e){return e?e.g:null}function bgn(e){return e?e.i:null}function DAe(e,n){return bIn(e,n)}function w9(e){return T0(e),e.a}function _Ae(e){e.c?dXe(e):bXe(e)}function LAe(){this.b=new iS(iye)}function PAe(){this.b=new iS(Wre)}function $Ae(){this.b=new iS(Wre)}function RAe(){this.a=new iS(Rye)}function BAe(){this.a=new iS(s6e)}function VP(e){this.a=0,this.b=e}function zAe(){throw R(new _t)}function FAe(){throw R(new _t)}function JAe(){throw R(new _t)}function HAe(){throw R(new _t)}function GAe(){throw R(new _t)}function qAe(){throw R(new _t)}function UAe(){throw R(new _t)}function XAe(){throw R(new _t)}function KAe(){throw R(new _t)}function VAe(){throw R(new _t)}function ggn(){throw R(new hu)}function wgn(){throw R(new hu)}function ZC(e){this.a=new pMe(e)}function p9(e,n){this.e=e,this.d=n}function Uoe(e,n){this.b=e,this.c=n}function YAe(e){tle(e.dc()),this.c=e}function eT(e,n){Hv.call(this,e,n)}function m9(e,n){eT.call(this,e,n)}function QAe(e,n){this.a=e,this.b=n}function WAe(e,n){this.a=e,this.b=n}function ZAe(e,n){this.a=e,this.b=n}function eMe(e,n){this.a=e,this.b=n}function nMe(e,n){this.a=e,this.b=n}function tMe(e,n){this.a=e,this.b=n}function iMe(e,n){this.a=e,this.b=n}function rMe(e,n){this.b=e,this.a=n}function cMe(e,n){this.b=e,this.a=n}function pw(e,n){this.g=e,this.i=n}function uMe(e,n){this.a=e,this.b=n}function oMe(e,n){this.b=e,this.a=n}function sMe(e,n){this.a=e,this.b=n}function lMe(e,n){this.b=e,this.a=n}function YP(e){this.b=u(Nt(e),50)}function QP(e){this.b=u(Nt(e),92)}function Ot(e,n){this.f=e,this.g=n}function PX(e,n){this.a=e,this.b=n}function fMe(e,n){this.a=e,this.f=n}function aMe(e){this.a=u(Nt(e),16)}function Xoe(e){this.a=u(Nt(e),16)}function hMe(e,n){this.b=e,this.c=n}function dMe(e){this.a=u(Nt(e),92)}function pgn(e,n){this.a=e,this.b=n}function bMe(e,n){this.a=e,this.b=n}function gMe(e,n){return so(e.b,n)}function wMe(e,n){return e>n&&n0}function HX(e,n){return ao(e,n)<0}function PMe(e,n){return sV(e.a,n)}function $gn(e,n){B_e.call(this,e,n)}function ise(e){OV(),WMn.call(this,e)}function rse(e){OV(),ise.call(this,e)}function cse(e){cV(),VTe.call(this,e)}function use(e,n){NIe(e,e.length,n)}function uT(e,n){uDe(e,e.length,n)}function Dj(e,n){return e.a.get(n)}function $Me(e,n){return so(e.e,n)}function ose(e){return _n(e),!1}function RMe(){return gAe(),new hnn}function oT(e){return at(e.a),e.b}function BMe(e,n){this.b=e,this.a=n}function u$(e,n){this.d=e,this.e=n}function zMe(e,n){this.a=e,this.b=n}function FMe(e,n){this.a=e,this.b=n}function JMe(e,n){this.a=e,this.b=n}function HMe(e,n){this.a=e,this.b=n}function GMe(e,n){this.b=e,this.a=n}function g4(e,n){this.a=e,this.b=n}function o$(e,n){Ot.call(this,e,n)}function GX(e,n){Ot.call(this,e,n)}function qX(e,n){Ot.call(this,e,n)}function UX(e,n){Ot.call(this,e,n)}function XX(e,n){Ot.call(this,e,n)}function s$(e,n){Ot.call(this,e,n)}function l$(e){vn.call(this,e,21)}function qMe(e,n){this.b=e,this.a=n}function sse(e,n){this.b=e,this.a=n}function lse(e,n){this.b=e,this.a=n}function fse(e,n){Ot.call(this,e,n)}function KX(e,n){Ot.call(this,e,n)}function sT(e,n){Ot.call(this,e,n)}function ase(e,n){this.b=e,this.a=n}function k9(e,n){this.c=e,this.d=n}function f$(e,n){Ot.call(this,e,n)}function a$(e,n){Ot.call(this,e,n)}function UMe(e,n){this.e=e,this.d=n}function w4(e,n){Ot.call(this,e,n)}function XMe(e,n){this.a=e,this.b=n}function hse(e,n){Ot.call(this,e,n)}function br(e,n){Ot.call(this,e,n)}function h$(e,n){Ot.call(this,e,n)}function _j(e,n,t){e.splice(n,0,t)}function Rgn(e,n,t){e.Mb(t)&&n.Ad(t)}function Bgn(e,n,t){n.Ne(e.a.We(t))}function zgn(e,n,t){n.Bd(e.a.Xe(t))}function Fgn(e,n,t){n.Ad(e.a.Kb(t))}function Jgn(e,n){return cs(e.c,n)}function Hgn(e,n){return cs(e.e,n)}function KMe(e,n){this.a=e,this.b=n}function VMe(e,n){this.a=e,this.b=n}function YMe(e,n){this.a=e,this.b=n}function QMe(e,n){this.a=e,this.b=n}function WMe(e,n){this.a=e,this.b=n}function ZMe(e,n){this.a=e,this.b=n}function eCe(e,n){this.a=e,this.b=n}function nCe(e,n){this.a=e,this.b=n}function tCe(e,n){this.b=e,this.a=n}function iCe(e,n){this.b=e,this.a=n}function rCe(e,n){this.b=e,this.a=n}function cCe(e,n){this.b=n,this.c=e}function d$(e,n){Ot.call(this,e,n)}function lT(e,n){Ot.call(this,e,n)}function dse(e,n){Ot.call(this,e,n)}function Lj(e,n){Ot.call(this,e,n)}function b$(e,n){Ot.call(this,e,n)}function VX(e,n){Ot.call(this,e,n)}function YX(e,n){Ot.call(this,e,n)}function Pj(e,n){Ot.call(this,e,n)}function $j(e,n){Ot.call(this,e,n)}function bse(e,n){Ot.call(this,e,n)}function Nv(e,n){Ot.call(this,e,n)}function QX(e,n){Ot.call(this,e,n)}function Rj(e,n){Ot.call(this,e,n)}function gse(e,n){Ot.call(this,e,n)}function h2(e,n){Ot.call(this,e,n)}function WX(e,n){Ot.call(this,e,n)}function ZX(e,n){Ot.call(this,e,n)}function eK(e,n){Ot.call(this,e,n)}function wse(e,n){Ot.call(this,e,n)}function fT(e,n){Ot.call(this,e,n)}function pse(e,n){Ot.call(this,e,n)}function Iv(e,n){Ot.call(this,e,n)}function nK(e,n){Ot.call(this,e,n)}function g$(e,n){Ot.call(this,e,n)}function aT(e,n){Ot.call(this,e,n)}function d2(e,n){Ot.call(this,e,n)}function w$(e,n){Ot.call(this,e,n)}function mse(e,n){Ot.call(this,e,n)}function tK(e,n){Ot.call(this,e,n)}function iK(e,n){Ot.call(this,e,n)}function rK(e,n){Ot.call(this,e,n)}function cK(e,n){Ot.call(this,e,n)}function uK(e,n){Ot.call(this,e,n)}function oK(e,n){Ot.call(this,e,n)}function p$(e,n){Ot.call(this,e,n)}function uCe(e,n){this.b=e,this.a=n}function vse(e,n){Ot.call(this,e,n)}function oCe(e,n){this.a=e,this.b=n}function sCe(e,n){this.a=e,this.b=n}function lCe(e,n){this.a=e,this.b=n}function yse(e,n){Ot.call(this,e,n)}function kse(e,n){Ot.call(this,e,n)}function fCe(e,n){this.a=e,this.b=n}function Ggn(e,n){return C9(),n!=e}function sK(e){return GTn(e,e.c),e}function qgn(e){k.clearTimeout(e)}function jse(e,n){Ot.call(this,e,n)}function Ese(e,n){Ot.call(this,e,n)}function aCe(e,n){this.a=e,this.b=n}function hCe(e,n){this.a=e,this.b=n}function dCe(e,n){this.b=e,this.d=n}function bCe(e,n){this.a=e,this.b=n}function gCe(e,n){this.b=e,this.a=n}function m$(e,n){Ot.call(this,e,n)}function mw(e,n){Ot.call(this,e,n)}function lK(e,n){Ot.call(this,e,n)}function v$(e,n){Ot.call(this,e,n)}function Sse(e,n){Ot.call(this,e,n)}function wCe(e,n){this.b=e,this.a=n}function pCe(e,n){this.b=e,this.a=n}function mCe(e,n){this.b=e,this.a=n}function vCe(e,n){this.b=e,this.a=n}function xse(e,n){Ot.call(this,e,n)}function hT(e,n){Ot.call(this,e,n)}function Ase(e,n){Ot.call(this,e,n)}function fK(e,n){Ot.call(this,e,n)}function y$(e,n){Ot.call(this,e,n)}function aK(e,n){Ot.call(this,e,n)}function hK(e,n){Ot.call(this,e,n)}function k$(e,n){Ot.call(this,e,n)}function dK(e,n){Ot.call(this,e,n)}function Mse(e,n){Ot.call(this,e,n)}function bK(e,n){Ot.call(this,e,n)}function gK(e,n){Ot.call(this,e,n)}function dT(e,n){Ot.call(this,e,n)}function wK(e,n){Ot.call(this,e,n)}function Cse(e,n){Ot.call(this,e,n)}function bT(e,n){Ot.call(this,e,n)}function Tse(e,n){Ot.call(this,e,n)}function Ose(e,n){this.a=e,this.b=n}function yCe(e,n){this.a=e,this.b=n}function kCe(e,n){this.a=e,this.b=n}function jCe(){Y$(),this.a=new Lle}function ECe(){Bz(),this.a=new ar}function SCe(){UV(),this.b=new ar}function xCe(){jae(),Afe.call(this)}function ACe(){kae(),b_e.call(this)}function MCe(){kae(),b_e.call(this)}function gT(e,n){Ot.call(this,e,n)}function p4(e,n){Ot.call(this,e,n)}function Bj(e,n){Ot.call(this,e,n)}function zj(e,n){Ot.call(this,e,n)}function wT(e,n){Ot.call(this,e,n)}function j$(e,n){Ot.call(this,e,n)}function pK(e,n){Ot.call(this,e,n)}function E$(e,n){Ot.call(this,e,n)}function Fj(e,n){Ot.call(this,e,n)}function mK(e,n){Ot.call(this,e,n)}function S$(e,n){Ot.call(this,e,n)}function Dv(e,n){Ot.call(this,e,n)}function pT(e,n){Ot.call(this,e,n)}function Jj(e,n){Ot.call(this,e,n)}function Hj(e,n){Ot.call(this,e,n)}function vK(e,n){Ot.call(this,e,n)}function mT(e,n){Ot.call(this,e,n)}function x$(e,n){Ot.call(this,e,n)}function _v(e,n){Ot.call(this,e,n)}function yK(e,n){Ot.call(this,e,n)}function kK(e,n){Ot.call(this,e,n)}function A$(e,n){Ot.call(this,e,n)}function Se(e,n){this.a=e,this.b=n}function CCe(e,n){this.a=e,this.b=n}function TCe(e,n){this.a=e,this.b=n}function OCe(e,n){this.a=e,this.b=n}function NCe(e,n){this.a=e,this.b=n}function ICe(e,n){this.a=e,this.b=n}function DCe(e,n){this.a=e,this.b=n}function jc(e,n){this.a=e,this.b=n}function _Ce(e,n){this.a=e,this.b=n}function LCe(e,n){this.a=e,this.b=n}function PCe(e,n){this.a=e,this.b=n}function $Ce(e,n){this.a=e,this.b=n}function RCe(e,n){this.a=e,this.b=n}function BCe(e,n){this.a=e,this.b=n}function zCe(e,n){this.b=e,this.a=n}function FCe(e,n){this.b=e,this.a=n}function JCe(e,n){this.b=e,this.a=n}function HCe(e,n){this.b=e,this.a=n}function GCe(e,n){this.a=e,this.b=n}function qCe(e,n){this.a=e,this.b=n}function UCe(e,n){this.a=e,this.b=n}function XCe(e,n){this.a=e,this.b=n}function KCe(e,n){this.f=e,this.c=n}function Nse(e,n){this.i=e,this.g=n}function M$(e,n){Ot.call(this,e,n)}function m4(e,n){Ot.call(this,e,n)}function C$(e,n){this.a=e,this.b=n}function VCe(e,n){this.a=e,this.b=n}function Ise(e,n){this.d=e,this.e=n}function YCe(e,n){this.a=e,this.b=n}function QCe(e,n){this.a=e,this.b=n}function WCe(e,n){this.d=e,this.b=n}function ZCe(e,n){this.e=e,this.a=n}function Dse(e,n){e.i=null,xB(e,n)}function Ugn(e,n){e&&ei(eD,e,n)}function eTe(e,n){return xQ(e.a,n)}function _se(e,n){return cs(e.g,n)}function Xgn(e,n){return cs(n.b,e)}function Kgn(e,n){return-e.b.$e(n)}function T$(e){return IO(e.c,e.b)}function Vgn(e,n){l8n(new st(e),n)}function Ygn(e,n,t){VHe(n,vW(e,t))}function Qgn(e,n,t){VHe(n,vW(e,t))}function nTe(e,n){W9n(e.a,u(n,12))}function tTe(e,n){this.a=e,this.b=n}function vT(e,n){this.b=e,this.c=n}function x0(e,n){return e.Pd().Xb(n)}function O$(e,n){return j7n(e.Jc(),n)}function bu(e){return e?e.kd():null}function ue(e){return e??null}function b2(e){return typeof e===ly}function g2(e){return typeof e===Lge}function $r(e){return typeof e===aZ}function Gj(e,n){return ao(e,n)==0}function N$(e,n){return ao(e,n)>=0}function qj(e,n){return ao(e,n)!=0}function Lse(e,n){return e.a+=""+n,e}function Wgn(e){return""+(_n(e),e)}function iTe(e){return Is(e),e.d.gc()}function Pse(e){return kn(e,0),null}function I$(e){return tE(e==null),e}function Uj(e,n){return e.a+=""+n,e}function Bc(e,n){return e.a+=""+n,e}function Xj(e,n){return e.a+=""+n,e}function uo(e,n){return e.a+=""+n,e}function Kt(e,n){return e.a+=""+n,e}function rTe(e,n){e.q.setTime(Qb(n))}function cTe(e,n){Dfe.call(this,e,n)}function uTe(e,n){Dfe.call(this,e,n)}function D$(e,n){Dfe.call(this,e,n)}function gc(e,n){Ki(e,n,e.c.b,e.c)}function Lv(e,n){Ki(e,n,e.a,e.a.a)}function Zgn(e,n){return e.j[n.p]==2}function oTe(e,n){return e.a=n.g+1,e}function fa(e){return e.a=0,e.b=0,e}function sTe(e){Hu(this),AE(this,e)}function lTe(){this.b=0,this.a=!1}function fTe(){this.b=0,this.a=!1}function aTe(){this.b=new b4(z2(12))}function hTe(){hTe=Y,itn=Dt(DQ())}function dTe(){dTe=Y,ain=Dt(JUe())}function bTe(){bTe=Y,isn=Dt(sze())}function $se(){$se=Y,foe(),kme=new wt}function ewn(e){return Nt(e),new Kj(e)}function gTe(e,n){return ue(e)===ue(n)}function _$(e){return e<10?"0"+e:""+e}function wTe(e){return _o(e.l,e.m,e.h)}function su(e){return typeof e===Lge}function jK(e,n){return of(e.a,0,n)}function v4(e){return lc((_n(e),e))}function nwn(e){return lc((_n(e),e))}function twn(e,n){return ji(e.a,n.a)}function Rse(e,n){return oo(e.a,n.a)}function iwn(e,n){return rDe(e.a,n.a)}function ah(e,n){return e.indexOf(n)}function Bse(e,n){G9(e,0,e.length,n)}function ti(e,n){i$(),ei(EG,e,n)}function fn(e,n){Pi.call(this,e,n)}function EK(e,n){k2.call(this,e,n)}function Pv(e,n){Nse.call(this,e,n)}function pTe(e,n){ST.call(this,e,n)}function SK(e,n){W9.call(this,e,n)}function Fh(){Uue.call(this,new D0)}function mTe(){hR.call(this,0,0,0,0)}function zse(e){return pu(e.b.b,e,0)}function vTe(e,n){return oo(e.g,n.g)}function rwn(e){return e==fp||e==gm}function cwn(e){return e==fp||e==bm}function uwn(e,n){return oo(e.g,n.g)}function own(e,n){return il(),n.a+=e}function swn(e,n){return il(),n.a+=e}function lwn(e,n){return il(),n.c+=e}function fwn(e,n){return Te(e.c,n),e}function yTe(e,n){return Te(e.a,n),n}function Fse(e,n){return ll(e.a,n),e}function kTe(e){this.a=RMe(),this.b=e}function jTe(e){this.a=RMe(),this.b=e}function wc(e){this.a=e.a,this.b=e.b}function Kj(e){this.a=e,mC.call(this)}function ETe(e){this.a=e,mC.call(this)}function Fs(e){return e.sh()&&e.th()}function $v(e){return e!=th&&e!=pb}function x1(e){return e==Zc||e==ru}function Rv(e){return e==Vl||e==eh}function STe(e){return e==U3||e==q3}function L$(e){return ll(new or,e)}function xTe(e){return NV(u(e,125))}function awn(e,n){return ji(n.f,e.f)}function ATe(e,n){return new W9(n,e)}function hwn(e,n){return new W9(n,e)}function Il(e,n,t){Os(e,n),Ns(e,t)}function xK(e,n,t){wB(e,n),pB(e,t)}function vw(e,n,t){Pw(e,n),Lw(e,t)}function yT(e,n,t){Wv(e,n),Zv(e,t)}function kT(e,n,t){e3(e,n),n3(e,t)}function AK(e,n){c8(e,n),K9(e,e.D)}function MK(e){KCe.call(this,e,!0)}function y4(){_f.call(this,0,0,0,0)}function MTe(){o$.call(this,"Head",1)}function CTe(){o$.call(this,"Tail",3)}function TTe(e,n,t){Sle.call(this,e,n,t)}function yw(e){hR.call(this,e,e,e,e)}function A0(e){yh(),C7n.call(this,e)}function OTe(e){Ao(e.Qf(),new Wke(e))}function Bv(e){return e!=null?Ni(e):0}function dwn(e,n){return P2(n,_a(e))}function bwn(e,n){return P2(n,_a(e))}function gwn(e,n){return e[e.length]=n}function wwn(e,n){return e[e.length]=n}function pwn(e,n){return jB(AV(e.f),n)}function mwn(e,n){return jB(AV(e.n),n)}function vwn(e,n){return jB(AV(e.p),n)}function Jse(e){return Mvn(e.b.Jc(),e.a)}function ywn(e){return e==null?0:Ni(e)}function CK(e){e.c=se(Mr,On,1,0,5,1)}function NTe(e,n,t){ir(e.c[n.g],n.g,t)}function kwn(e,n,t){u(e.c,72).Ei(n,t)}function jwn(e,n,t){Il(t,t.i+e,t.j+n)}function Yr(e,n){Pi.call(this,e.b,n)}function Ewn(e,n){Et(Vu(e.a),sLe(n))}function Swn(e,n){Et(Ts(e.a),lLe(n))}function xwn(e,n){Va||(e.b=n)}function TK(e,n,t){return ir(e,n,t),t}function Lt(){Lt=Y,new ITe,new Oe}function ITe(){new wt,new wt,new wt}function Awn(){throw R(new pd($en))}function Mwn(){throw R(new pd($en))}function Cwn(){throw R(new pd(Ren))}function Twn(){throw R(new pd(Ren))}function DTe(){DTe=Y,are=new FE(Mce)}function Na(){Na=Y,k.Math.log(2)}function Dl(){Dl=Y,d1=(IMe(),Man)}function Vj(e){ai(),bw.call(this,e)}function _Te(e){this.a=e,rfe.call(this,e)}function OK(e){this.a=e,QP.call(this,e)}function NK(e){this.a=e,QP.call(this,e)}function Tr(e,n){oV(e.c,e.c.length,n)}function gu(e){return e.an?1:0}function Gse(e,n){return ao(e,n)>0?e:n}function _o(e,n,t){return{l:e,m:n,h:t}}function Own(e,n){e.a!=null&&nTe(n,e.a)}function Nwn(e){fc(e,null),Gr(e,null)}function Iwn(e,n,t){return ei(e.g,t,n)}function Dwn(e,n){Nt(n),qv(e).Ic(new $e)}function PTe(){Vde(),this.a=new iS(pve)}function P$(e){this.b=e,this.a=new Oe}function $Te(e){this.b=new w5,this.a=e}function qse(e){Ple.call(this),this.a=e}function RTe(e){hae.call(this),this.b=e}function BTe(){o$.call(this,"Range",2)}function $$(e){e.j=se(_me,Me,324,0,0,1)}function zTe(e){e.a=new Jt,e.c=new Jt}function FTe(e){e.a=new wt,e.e=new wt}function Use(e){return new Se(e.c,e.d)}function _wn(e){return new Se(e.c,e.d)}function pc(e){return new Se(e.a,e.b)}function Lwn(e,n){return ei(e.a,n.a,n)}function Pwn(e,n,t){return ei(e.k,t,n)}function zv(e,n,t){return gde(n,t,e.c)}function Xse(e,n){return re(zn(e.i,n))}function Kse(e,n){return re(zn(e.j,n))}function JTe(e,n){return w$n(e.a,n,null)}function Yj(e,n){return APn(e.c,e.b,n)}function X(e,n){return e!=null&&$Q(e,n)}function HTe(e,n){kt(e),e.Fc(u(n,16))}function $wn(e,n,t){e.c._c(n,u(t,136))}function Rwn(e,n,t){e.c.Si(n,u(t,136))}function Bwn(e,n,t){return b$n(e,n,t),t}function zwn(e,n){return rl(),n.n.b+=e}function IK(e,n){return ikn(e.Jc(),n)!=-1}function Fwn(e,n){return new pOe(e.Jc(),n)}function R$(e){return e.Ob()?e.Pb():null}function GTe(e){return ph(e,0,e.length)}function qTe(e){KV(e,null),VV(e,null)}function UTe(){ST.call(this,null,null)}function XTe(){G$.call(this,null,null)}function KTe(){Ot.call(this,"INSTANCE",0)}function Fv(){this.a=se(Mr,On,1,8,5,1)}function Vse(e){this.a=e,wt.call(this)}function VTe(e){this.a=(En(),new h9(e))}function Jwn(e){this.b=(En(),new aX(e))}function j9(){j9=Y,Gme=new xX(null)}function Yse(){Yse=Y,Yse(),gnn=new xt}function Te(e,n){return Gn(e.c,n),!0}function YTe(e,n){e.c&&(pfe(n),A_e(n))}function Hwn(e,n){e.q.setHours(n),sS(e,n)}function Qse(e,n){return e.a.Ac(n)!=null}function DK(e,n){return e.a.Ac(n)!=null}function Ia(e,n){return e.a[n.c.p][n.p]}function Gwn(e,n){return e.e[n.c.p][n.p]}function qwn(e,n){return e.c[n.c.p][n.p]}function _K(e,n,t){return e.a[n.g][t.g]}function Uwn(e,n){return e.j[n.p]=WOn(n)}function k4(e,n){return e.a*n.a+e.b*n.b}function Xwn(e,n){return e.a=e}function Wwn(e,n,t){return t?n!=0:n!=e-1}function QTe(e,n,t){e.a=n^1502,e.b=t^JZ}function Zwn(e,n,t){return e.a=n,e.b=t,e}function A1(e,n){return e.a*=n,e.b*=n,e}function Qj(e,n,t){return ir(e.g,n,t),t}function epn(e,n,t,i){ir(e.a[n.g],t.g,i)}function mr(e,n,t){PT.call(this,e,n,t)}function B$(e,n,t){mr.call(this,e,n,t)}function rs(e,n,t){mr.call(this,e,n,t)}function WTe(e,n,t){B$.call(this,e,n,t)}function Wse(e,n,t){PT.call(this,e,n,t)}function Jv(e,n,t){PT.call(this,e,n,t)}function ZTe(e,n,t){nR.call(this,e,n,t)}function Zse(e,n,t){nR.call(this,e,n,t)}function eOe(e,n,t){Zse.call(this,e,n,t)}function nOe(e,n,t){Wse.call(this,e,n,t)}function M0(e){this.c=e,this.a=this.c.a}function st(e){this.i=e,this.f=this.i.j}function Hv(e,n){this.a=e,QP.call(this,n)}function tOe(e,n){this.a=e,OX.call(this,n)}function iOe(e,n){this.a=e,OX.call(this,n)}function rOe(e,n){this.a=e,OX.call(this,n)}function ele(e){this.a=e,GU.call(this,e.d)}function cOe(e){e.b.Qb(),--e.d.f.d,bR(e.d)}function uOe(e){e.a=u(Xn(e.b.a,4),129)}function oOe(e){e.a=u(Xn(e.b.a,4),129)}function npn(e){HT(e,fZe),_z(e,aRn(e))}function nle(e,n){return Ijn(e,new y0,n).a}function tpn(e){return WC(e.a)?oLe(e):null}function sOe(e){xv.call(this,u(Nt(e),35))}function lOe(e){xv.call(this,u(Nt(e),35))}function tle(e){if(!e)throw R(new YC)}function ile(e){if(!e)throw R(new is)}function Yn(e,n){return Nt(n),new wOe(e,n)}function fOe(e,n){return new ZGe(e.a,e.b,n)}function ipn(e){return e.l+e.m*dy+e.h*hg}function rpn(e){return e==null?null:e.name}function rle(e,n,t){return e.indexOf(n,t)}function z$(e,n){return e.lastIndexOf(n)}function Wj(e){return e==null?Vo:fu(e)}function $n(){$n=Y,ib=!1,d7=!0}function aOe(){aOe=Y,zX(),thn=new FU}function cle(){this.Bb|=256,this.Bb|=512}function hOe(){$$(this),TR(this),this.he()}function F$(e){Hr.call(this,e),this.a=e}function ule(e){ic.call(this,e),this.a=e}function ole(e){h9.call(this,e),this.a=e}function cf(e){Di.call(this,(_n(e),e))}function tl(e){Di.call(this,(_n(e),e))}function LK(e){Uue.call(this,new lhe(e))}function dOe(e){this.a=e,Xi.call(this,e)}function sle(e,n){this.a=n,OX.call(this,e)}function bOe(e,n){this.a=n,uY.call(this,e)}function gOe(e,n){this.a=e,uY.call(this,n)}function wOe(e,n){this.a=n,YP.call(this,e)}function pOe(e,n){this.a=n,YP.call(this,e)}function lle(e){pX.call(this),ac(this,e)}function Js(e){return at(e.a!=null),e.a}function mOe(e,n){return Te(n.a,e.a),e.a}function vOe(e,n){return Te(n.b,e.a),e.a}function kw(e,n){return Te(n.a,e.a),e.a}function jT(e,n,t){return UY(e,n,n,t),e}function J$(e,n){return++e.b,Te(e.a,n)}function fle(e,n){return++e.b,qo(e.a,n)}function cpn(e,n){return ji(e.c.d,n.c.d)}function upn(e,n){return ji(e.c.c,n.c.c)}function opn(e,n){return ji(e.n.a,n.n.a)}function Ho(e,n){return u(vi(e.b,n),16)}function spn(e,n){return e.n.b=(_n(n),n)}function lpn(e,n){return e.n.b=(_n(n),n)}function cs(e,n){return!!n&&e.b[n.g]==n}function Zj(e){return gu(e.a)||gu(e.b)}function fpn(e,n){return ji(e.e.b,n.e.b)}function apn(e,n){return ji(e.e.a,n.e.a)}function hpn(e,n,t){return rPe(e,n,t,e.b)}function ale(e,n,t){return rPe(e,n,t,e.c)}function dpn(e){return il(),!!e&&!e.dc()}function yOe(){Cj(),this.b=new _je(this)}function H$(){H$=Y,mJ=new Pi(WYe,0)}function j4(e){this.d=e,st.call(this,e)}function E4(e){this.c=e,st.call(this,e)}function ET(e){this.c=e,j4.call(this,e)}function hle(e,n){Sde.call(this,e,n,null)}function S4(e){return e.a!=null?e.a:null}function jw(e){return e.$H||(e.$H=++_Bn)}function Sd(e){var n;n=e.a,e.a=e.b,e.b=n}function ST(e,n){Ij(),this.a=e,this.b=n}function G$(e,n){Ed(),this.b=e,this.c=n}function q$(e,n){fV(),this.f=n,this.d=e}function dle(e,n){Zae(n,e),this.c=e,this.b=n}function bpn(e,n){return dV(e.c).Kd().Xb(n)}function PK(e,n){return new kNe(e,e.gc(),n)}function gpn(e){return FP(),It((nLe(),Uen),e)}function wpn(e){return new D2(3,e)}function Jh(e){return sl(e,rm),new xo(e)}function kOe(e){return B9(),parseInt(e)||-1}function E9(e,n,t){return rle(e,Xo(n),t)}function ble(e,n,t){u(oO(e,n),22).Ec(t)}function ppn(e,n,t){wQ(e.a,t),az(e.a,n)}function S9(e,n,t){var i;i=e.dd(n),i.Rb(t)}function jOe(e,n,t,i){Nfe.call(this,e,n,t,i)}function EOe(e){ufe.call(this,e,null,null)}function $K(e){f2(),this.b=e,this.a=!0}function SOe(e){WP(),this.b=e,this.a=!0}function xOe(e){if(!e)throw R(new Nl)}function gle(e){if(!e)throw R(new YC)}function mpn(e){if(!e)throw R(new gX)}function at(e){if(!e)throw R(new hu)}function w2(e){if(!e)throw R(new is)}function AOe(e){e.d=new EOe(e),e.e=new wt}function x9(e){return at(e.b!=0),e.a.a.c}function If(e){return at(e.b!=0),e.c.b.c}function vpn(e,n){return UY(e,n,n+1,""),e}function MOe(e){lZ(),VSe(this),this.Df(e)}function COe(e){this.c=e,this.a=1,this.b=1}function xT(e){X(e,161)&&u(e,161).mi()}function TOe(e){return e.b=u(oae(e.a),45)}function p2(e,n){return u($a(e.a,n),35)}function wi(e,n){return!!e.q&&so(e.q,n)}function ypn(e,n){return e>0?n/(e*e):n*100}function kpn(e,n){return e>0?n*n/e:n*n*100}function jpn(e){return e.f!=null?e.f:""+e.g}function RK(e){return e.f!=null?e.f:""+e.g}function Epn(e){return P1(),e.e.a+e.f.a/2}function Spn(e){return P1(),e.e.b+e.f.b/2}function xpn(e,n,t){return P1(),t.e.b-e*n}function Apn(e,n,t){return P1(),t.e.a-e*n}function Mpn(e,n,t){return e$(),t.Lg(e,n)}function Cpn(e,n){return G0(),wn(e,n.e,n)}function Tpn(e,n,t){return Te(n,ZFe(e,t))}function Opn(e,n,t){rB(),e.nf(n)&&t.Ad(e)}function m2(e,n,t){return e.a+=n,e.b+=t,e}function OOe(e,n,t){return e.a-=n,e.b-=t,e}function wle(e,n){return e.a=n.a,e.b=n.b,e}function U$(e){return e.a=-e.a,e.b=-e.b,e}function NOe(e){this.c=e,Os(e,0),Ns(e,0)}function IOe(e){xi.call(this),xE(this,e)}function DOe(){Ot.call(this,"GROW_TREE",0)}function Hs(e,n,t){os.call(this,e,n,t,2)}function _Oe(e,n){Ed(),ple.call(this,e,n)}function ple(e,n){Ed(),G$.call(this,e,n)}function LOe(e,n){Ed(),G$.call(this,e,n)}function POe(e,n){Ij(),ST.call(this,e,n)}function BK(e,n){Dl(),fR.call(this,e,n)}function $Oe(e,n){Dl(),BK.call(this,e,n)}function mle(e,n){Dl(),BK.call(this,e,n)}function ROe(e,n){Dl(),mle.call(this,e,n)}function vle(e,n){Dl(),fR.call(this,e,n)}function BOe(e,n){Dl(),vle.call(this,e,n)}function zOe(e,n){Dl(),fR.call(this,e,n)}function Npn(e,n){return e.c.Ec(u(n,136))}function Ipn(e,n){return u(zn(e.e,n),26)}function Dpn(e,n){return u(zn(e.e,n),26)}function yle(e,n,t){return Yz(lO(e,n),t)}function _pn(e,n,t){return n.xl(e.e,e.c,t)}function Lpn(e,n,t){return n.yl(e.e,e.c,t)}function zK(e,n){return z0(e.e,u(n,52))}function Ppn(e,n,t){RE(Vu(e.a),n,sLe(t))}function $pn(e,n,t){RE(Ts(e.a),n,lLe(t))}function FOe(e,n){return _n(e),e+UK(n)}function Rpn(e){return e==null?null:fu(e)}function Bpn(e){return e==null?null:fu(e)}function zpn(e){return e==null?null:sCn(e)}function Fpn(e){return e==null?null:tRn(e)}function M1(e){e.o==null&&MOn(e)}function ze(e){return tE(e==null||b2(e)),e}function re(e){return tE(e==null||g2(e)),e}function Pt(e){return tE(e==null||$r(e)),e}function Jpn(e,n){return qQ(e,n),new IDe(e,n)}function AT(e,n){this.c=e,p9.call(this,e,n)}function eE(e,n){this.a=e,AT.call(this,e,n)}function Hpn(e,n){this.d=e,tn(this),this.b=n}function kle(){kBe.call(this),this.Bb|=Ec}function JOe(){this.a=new Nw,this.b=new Nw}function jle(e){this.q=new k.Date(Qb(e))}function Gv(){Gv=Y,V3=new ki("root")}function A9(){A9=Y,tD=new xxe,new Axe}function v2(){v2=Y,Qme=rn((Vs(),_g))}function Gpn(e,n){n.a?KTn(e,n):DK(e.a,n.b)}function HOe(e,n){Va||Te(e.a,n)}function qpn(e,n){return cT(),Q9(n.d.i,e)}function Upn(e,n){return q4(),new RXe(n,e)}function Xpn(e,n,t){return e.Le(n,t)<=0?t:n}function Kpn(e,n,t){return e.Le(n,t)<=0?n:t}function Vpn(e,n){return u($a(e.b,n),144)}function Ypn(e,n){return u($a(e.c,n),233)}function FK(e){return u(Pe(e.a,e.b),295)}function GOe(e){return new Se(e.c,e.d+e.a)}function qOe(e){return _n(e),e?1231:1237}function UOe(e){return rl(),STe(u(e,203))}function Ele(e,n){return u(zn(e.b,n),278)}function XOe(e,n,t){++e.j,e.oj(n,e.Xi(n,t))}function MT(e,n,t){++e.j,e.rj(),gY(e,n,t)}function Sle(e,n,t){nB.call(this,e,n,t,null)}function KOe(e,n,t){nB.call(this,e,n,t,null)}function xle(e,n){wY.call(this,e),this.a=n}function Ale(e,n){wY.call(this,e),this.a=n}function Pi(e,n){ki.call(this,e),this.a=n}function Mle(e,n){coe.call(this,e),this.a=n}function JK(e,n){coe.call(this,e),this.a=n}function VOe(e,n){this.c=e,_w.call(this,n)}function YOe(e,n){this.a=e,zSe.call(this,n)}function CT(e,n){this.a=e,zSe.call(this,n)}function Cle(e,n,t){return t=hl(e,n,3,t),t}function Tle(e,n,t){return t=hl(e,n,6,t),t}function Ole(e,n,t){return t=hl(e,n,9,t),t}function hh(e,n){return HT(n,ewe),e.f=n,e}function Nle(e,n){return(n&oi)%e.d.length}function QOe(e,n,t){return bge(e.c,e.b,n,t)}function Qpn(e,n,t){return e.apply(n,t)}function WOe(e,n,t){var i;i=e.dd(n),i.Rb(t)}function ZOe(e,n,t){return e.a+=ph(n,0,t),e}function TT(e){return!e.a&&(e.a=new dn),e.a}function Ile(e,n){var t;return t=e.e,e.e=n,t}function Dle(e,n){var t;return t=n,!!e.De(t)}function Bb(e,n){return $n(),e==n?0:e?1:-1}function y2(e,n){e.a._c(e.b,n),++e.b,e.c=-1}function Wpn(e,n){var t;t=e[FZ],t.call(e,n)}function Zpn(e,n){var t;t=e[FZ],t.call(e,n)}function e2n(e,n,t){$b(),SP(e,n.Te(e.a,t))}function _le(e,n,t){return I4(e,u(n,23),t)}function Df(e,n){return qP(new Array(n),e)}function n2n(e){return Rt(Hb(e,32))^Rt(e)}function HK(e){return String.fromCharCode(e)}function t2n(e){return e==null?null:e.message}function GK(e){this.a=(En(),new Dn(Nt(e)))}function eNe(e){this.a=(sl(e,rm),new xo(e))}function nNe(e){this.a=(sl(e,rm),new xo(e))}function tNe(){this.a=new Oe,this.b=new Oe}function iNe(){this.a=new rv,this.b=new txe}function Lle(){this.b=new D0,this.a=new D0}function rNe(){this.b=new Vr,this.c=new Oe}function Ple(){this.n=new Vr,this.o=new Vr}function X$(){this.n=new o4,this.i=new y4}function cNe(){this.b=new ar,this.a=new ar}function uNe(){this.a=new Oe,this.d=new Oe}function oNe(){this.a=new IU,this.b=new o_}function sNe(){this.b=new LAe,this.a=new kM}function lNe(){this.b=new wt,this.a=new wt}function fNe(){X$.call(this),this.a=new Vr}function $le(e,n,t,i){hR.call(this,e,n,t,i)}function i2n(e,n){return e.n.a=(_n(n),n+10)}function r2n(e,n){return e.n.a=(_n(n),n+10)}function c2n(e,n){return cT(),!Q9(n.d.i,e)}function aNe(e){Hu(e.e),e.d.b=e.d,e.d.a=e.d}function OT(e){e.b?OT(e.b):e.f.c.yc(e.e,e.d)}function u2n(e,n){x1(e.f)?vOn(e,n):aMn(e,n)}function hNe(e,n,t){t!=null&&EB(n,KQ(e,t))}function dNe(e,n,t){t!=null&&SB(n,KQ(e,t))}function x4(e,n,t,i){we.call(this,e,n,t,i)}function Rle(e,n,t,i){we.call(this,e,n,t,i)}function bNe(e,n,t,i){Rle.call(this,e,n,t,i)}function gNe(e,n,t,i){yR.call(this,e,n,t,i)}function qK(e,n,t,i){yR.call(this,e,n,t,i)}function wNe(e,n,t,i){qK.call(this,e,n,t,i)}function Ble(e,n,t,i){yR.call(this,e,n,t,i)}function Nn(e,n,t,i){Ble.call(this,e,n,t,i)}function zle(e,n,t,i){qK.call(this,e,n,t,i)}function pNe(e,n,t,i){zle.call(this,e,n,t,i)}function mNe(e,n,t,i){Lfe.call(this,e,n,t,i)}function k2(e,n){jo.call(this,RS+e+pg+n)}function o2n(e,n){return n==e||y8(Dz(n),e)}function Fle(e,n){return e.hk().ti().oi(e,n)}function Jle(e,n){return e.hk().ti().qi(e,n)}function s2n(e,n){return e.e=u(e.d.Kb(n),162)}function vNe(e,n){return ei(e.a,n,"")==null}function yNe(e,n){return _n(e),ue(e)===ue(n)}function gn(e,n){return _n(e),ue(e)===ue(n)}function Hle(e,n,t){return e.lastIndexOf(n,t)}function kNe(e,n,t){this.a=e,dle.call(this,n,t)}function jNe(e){this.c=e,D$.call(this,bN,0)}function ENe(e,n,t){this.c=n,this.b=t,this.a=e}function pi(e,n){return e.a+=n.a,e.b+=n.b,e}function Nr(e,n){return e.a-=n.a,e.b-=n.b,e}function l2n(e){return r2(e.j.c,0),e.a=-1,e}function f2n(e,n){var t;return t=n.ni(e.a),t}function Gle(e,n,t){return t=hl(e,n,11,t),t}function a2n(e,n,t){return ji(e[n.a],e[t.a])}function h2n(e,n){return oo(e.a.d.p,n.a.d.p)}function d2n(e,n){return oo(n.a.d.p,e.a.d.p)}function b2n(e,n){return ji(e.c-e.s,n.c-n.s)}function g2n(e,n){return ji(e.b.e.a,n.b.e.a)}function w2n(e,n){return ji(e.c.e.a,n.c.e.a)}function p2n(e,n){return he(n,(Ie(),hI),e)}function m2n(e,n){return e.b.zd(new FMe(e,n))}function v2n(e,n){return e.b.zd(new JMe(e,n))}function SNe(e,n){return e.b.zd(new HMe(e,n))}function xNe(e,n){return X(n,16)&&mXe(e.c,n)}function ANe(e){return e.c?pu(e.c.a,e,0):-1}function y2n(e){return e<100?null:new k0(e)}function A4(e){return e==Dg||e==a1||e==to}function k2n(e,n,t){return u(e.c,72).Uk(n,t)}function K$(e,n,t){return u(e.c,72).Vk(n,t)}function j2n(e,n,t){return _pn(e,u(n,344),t)}function qle(e,n,t){return Lpn(e,u(n,344),t)}function E2n(e,n,t){return cGe(e,u(n,344),t)}function MNe(e,n,t){return EMn(e,u(n,344),t)}function nE(e,n){return n==null?null:J2(e.b,n)}function S2n(e,n){Va||n&&(e.d=n)}function Ule(e,n){if(!e)throw R(new qn(n))}function M9(e){if(!e)throw R(new Uc(Pge))}function UK(e){return g2(e)?(_n(e),e):e.se()}function V$(e){return!isNaN(e)&&!isFinite(e)}function XK(e){zTe(this),qs(this),ac(this,e)}function bs(e){CK(this),sfe(this.c,0,e.Nc())}function NT(e){C9(),this.d=e,this.a=new Fv}function CNe(e,n,t){this.d=e,this.b=t,this.a=n}function _l(e,n,t){this.a=e,this.b=n,this.c=t}function TNe(e,n,t){this.a=e,this.b=n,this.c=t}function Xle(e,n){this.c=e,yV.call(this,e,n)}function ONe(e,n){Nvn.call(this,e,e.length,n)}function KK(e,n){if(e!=n)throw R(new Nl)}function NNe(e){this.a=e,jd(),Lu(Date.now())}function INe(e){As(e.a),uhe(e.c,e.b),e.b=null}function VK(){VK=Y,Hme=new di,dnn=new Gt}function YK(e){var n;return n=new f6,n.e=e,n}function x2n(e,n,t){return $b(),e.a.Wd(n,t),n}function Kle(e,n,t){this.b=e,this.c=n,this.a=t}function Vle(e){var n;return n=new sxe,n.b=e,n}function A2n(e){return wa(),It((C$e(),Onn),e)}function M2n(e){return q9(),It((J$e(),wnn),e)}function C2n(e){return zl(),It((M$e(),jnn),e)}function T2n(e){return ws(),It((T$e(),Inn),e)}function O2n(e){return Uo(),It((O$e(),_nn),e)}function N2n(e){return nF(),It((hTe(),itn),e)}function I2n(e){return Rw(),It((X$e(),ctn),e)}function D2n(e){return n8(),It((K$e(),Vtn),e)}function _2n(e){return aB(),It((_Pe(),btn),e)}function L2n(e){return kE(),It((A$e(),ztn),e)}function P2n(e){return zr(),It((PRe(),Gtn),e)}function $2n(e){return W4(),It((U$e(),nin),e)}function R2n(e){return Fn(),It((rze(),cin),e)}function B2n(e){return Y9(),It((LPe(),fin),e)}function QK(e){hR.call(this,e.d,e.c,e.a,e.b)}function Yle(e){hR.call(this,e.d,e.c,e.a,e.b)}function z2n(e){return Ur(),It((dTe(),ain),e)}function DNe(){DNe=Y,Ian=se(Mr,On,1,0,5,1)}function _Ne(){_Ne=Y,Yan=se(Mr,On,1,0,5,1)}function Qle(){Qle=Y,Qan=se(Mr,On,1,0,5,1)}function IT(){IT=Y,SJ=new fq,xJ=new BA}function Y$(){Y$=Y,win=new Tq,gin=new Oq}function il(){il=Y,kin=new wk,jin=new ld}function F2n(e){return $w(),It((f$e(),Iin),e)}function J2n(e){return zf(),It((W$e(),xin),e)}function H2n(e){return X2(),It((ORe(),Min),e)}function G2n(e){return Fz(),It((oze(),Din),e)}function q2n(e){return ty(),It((fBe(),_in),e)}function U2n(e){return iB(),It((pPe(),Lin),e)}function X2n(e){return zE(),It((eRe(),Pin),e)}function K2n(e){return vB(),It((c$e(),$in),e)}function V2n(e){return YO(),It((dze(),Rin),e)}function Y2n(e){return hO(),It((mPe(),Bin),e)}function Q2n(e){return tg(),It((u$e(),Fin),e)}function W2n(e){return Az(),It((lBe(),Jin),e)}function Z2n(e){return uO(),It((vPe(),Hin),e)}function emn(e){return JO(),It((oBe(),Gin),e)}function nmn(e){return j8(),It((sBe(),qin),e)}function tmn(e){return Ic(),It((Oze(),Uin),e)}function imn(e){return e8(),It((o$e(),Xin),e)}function rmn(e){return $0(),It((s$e(),Kin),e)}function cmn(e){return _1(),It((l$e(),Yin),e)}function umn(e){return GR(),It((yPe(),Qin),e)}function omn(e){return Xs(),It((IRe(),Zin),e)}function smn(e){return XR(),It((kPe(),ern),e)}function lmn(e){return WO(),It((bze(),Fun),e)}function fmn(e){return _E(),It((a$e(),Jun),e)}function amn(e){return U2(),It((Y$e(),Hun),e)}function hmn(e){return GE(),It((NRe(),Gun),e)}function dmn(e){return X0(),It((Tze(),qun),e)}function bmn(e){return F1(),It((Q$e(),Uun),e)}function gmn(e){return sO(),It((jPe(),Xun),e)}function wmn(e){return Nc(),It((h$e(),Vun),e)}function pmn(e){return _B(),It((d$e(),Yun),e)}function mmn(e){return DE(),It((b$e(),Qun),e)}function vmn(e){return u8(),It((g$e(),Wun),e)}function ymn(e){return mB(),It((w$e(),Zun),e)}function kmn(e){return LB(),It((p$e(),eon),e)}function jmn(e){return $B(),It((q$e(),bin),e)}function Emn(e){return rg(),It((V$e(),von),e)}function Smn(e,n){return _n(e),e+(_n(n),n)}function xmn(e){return vE(),It((EPe(),Son),e)}function Amn(e){return dh(),It((xPe(),Non),e)}function Mmn(e){return Da(),It((SPe(),Don),e)}function Cmn(e){return da(),It((APe(),Kon),e)}function C9(){C9=Y,nye=(De(),Vn),IH=et}function Tmn(e){return Iw(),It((MPe(),nsn),e)}function Omn(e){return ny(),It((iRe(),tsn),e)}function Nmn(e){return uS(),It((bTe(),isn),e)}function Imn(e){return IE(),It((m$e(),rsn),e)}function Dmn(e){return NE(),It((Z$e(),Msn),e)}function _mn(e){return HR(),It((CPe(),Csn),e)}function Lmn(e){return AB(),It((TPe(),Dsn),e)}function Pmn(e){return kz(),It((DRe(),Lsn),e)}function $mn(e){return cB(),It((OPe(),Psn),e)}function Rmn(e){return xO(),It((v$e(),$sn),e)}function Bmn(e){return dz(),It((tRe(),iln),e)}function zmn(e){return DB(),It((y$e(),rln),e)}function Fmn(e){return ez(),It((k$e(),cln),e)}function Jmn(e){return Ez(),It((nRe(),oln),e)}function Hmn(e){return VB(),It((x$e(),fln),e)}function Gmn(e){return!e.e&&(e.e=new Oe),e.e}function Q$(e,n,t){this.e=n,this.b=e,this.d=t}function LNe(e,n,t){this.a=e,this.b=n,this.c=t}function PNe(e,n,t){this.a=e,this.b=n,this.c=t}function Wle(e,n,t){this.a=e,this.b=n,this.c=t}function $Ne(e,n,t){this.a=e,this.b=n,this.c=t}function RNe(e,n,t){this.a=e,this.c=n,this.b=t}function W$(e,n,t){this.b=e,this.a=n,this.c=t}function BNe(e,n,t){this.b=e,this.a=n,this.c=t}function WK(e,n){this.c=e,this.a=n,this.b=n-e}function qmn(e){return GB(),It((E$e(),_ln),e)}function Umn(e){return t$(),It((KLe(),zln),e)}function Xmn(e){return eO(),It((IPe(),Fln),e)}function Kmn(e){return GO(),It((LRe(),Jln),e)}function Vmn(e){return n$(),It((XLe(),Rln),e)}function Ymn(e){return tS(),It((_Re(),Pln),e)}function Qmn(e){return OO(),It((S$e(),$ln),e)}function Wmn(e){return QR(),It((NPe(),Iln),e)}function Zmn(e){return uB(),It((j$e(),Dln),e)}function evn(e){return Tj(),It((VLe(),rfn),e)}function nvn(e){return vO(),It((DPe(),cfn),e)}function tvn(e){return vh(),It((RRe(),afn),e)}function ivn(e){return lg(),It((cze(),dfn),e)}function rvn(e){return z1(),It((cRe(),Vfn),e)}function cvn(e){return vr(),It(($Re(),Ufn),e)}function uvn(e){return s8(),It((rRe(),Xfn),e)}function ovn(e){return Ra(),It((N$e(),Kfn),e)}function svn(e){return Yh(),It((iBe(),bfn),e)}function lvn(e){return sg(),It((rBe(),yfn),e)}function fvn(e){return Q2(),It((wze(),nan),e)}function avn(e){return u3(),It((BRe(),tan),e)}function hvn(e){return Br(),It((uBe(),ian),e)}function dvn(e){return ps(),It((cBe(),ran),e)}function bvn(e){return fl(),It((uRe(),ean),e)}function gvn(e){return Sz(),It((tBe(),Yfn),e)}function wvn(e){return B1(),It((D$e(),Wfn),e)}function pvn(e){return KR(),It((oRe(),ban),e)}function mvn(e){return _s(),It((gze(),han),e)}function vvn(e){return V4(),It((I$e(),dan),e)}function yvn(e){return De(),It((zRe(),can),e)}function kvn(e){return EE(),It((_$e(),fan),e)}function jvn(e){return Vs(),It((sRe(),aan),e)}function Evn(e){return YB(),It((lRe(),gan),e)}function Svn(e){return RB(),It((fRe(),man),e)}function xvn(e){return S8(),It((uze(),Nan),e)}function zNe(e,n,t){Dl(),bae.call(this,e,n,t)}function ZK(e,n,t){Dl(),Vfe.call(this,e,n,t)}function FNe(e,n,t){Dl(),ZK.call(this,e,n,t)}function Zle(e,n,t){Dl(),ZK.call(this,e,n,t)}function JNe(e,n,t){Dl(),Zle.call(this,e,n,t)}function HNe(e,n,t){Dl(),efe.call(this,e,n,t)}function efe(e,n,t){Dl(),Vfe.call(this,e,n,t)}function nfe(e,n,t){Dl(),Vfe.call(this,e,n,t)}function GNe(e,n,t){Dl(),nfe.call(this,e,n,t)}function qNe(e,n,t){this.a=e,this.c=n,this.b=t}function UNe(e,n,t){this.a=e,this.b=n,this.c=t}function tfe(e,n,t){this.a=e,this.b=n,this.c=t}function ife(e,n,t){this.a=e,this.b=n,this.c=t}function eV(e,n,t){this.a=e,this.b=n,this.c=t}function XNe(e,n,t){this.a=e,this.b=n,this.c=t}function xd(e,n,t){this.e=e,this.a=n,this.c=t}function rfe(e){this.d=e,tn(this),this.b=m3n(e.d)}function cfe(e,n){pgn.call(this,e,XB(new Su(n)))}function DT(e,n){return Nt(e),Nt(n),new WAe(e,n)}function M4(e,n){return Nt(e),Nt(n),new rIe(e,n)}function Avn(e,n){return Nt(e),Nt(n),new cIe(e,n)}function Mvn(e,n){return Nt(e),Nt(n),new lMe(e,n)}function nV(e){return at(e.b!=0),$l(e,e.a.a)}function Cvn(e){return at(e.b!=0),$l(e,e.c.b)}function Tvn(e){return!e.c&&(e.c=new Ol),e.c}function _T(e){var n;return n=new xi,BY(n,e),n}function KNe(e){var n;return n=new pX,BY(n,e),n}function Ovn(e){var n;return n=new ar,MY(n,e),n}function T9(e){var n;return n=new Oe,MY(n,e),n}function u(e,n){return tE(e==null||$Q(e,n)),e}function Nvn(e,n,t){XIe.call(this,n,t),this.a=e}function VNe(e,n){this.c=e,this.b=n,this.a=!1}function YNe(){this.a=";,;",this.b="",this.c=""}function QNe(e,n,t){this.b=e,cTe.call(this,n,t)}function ufe(e,n,t){this.c=e,u$.call(this,n,t)}function ofe(e,n,t){k9.call(this,e,n),this.b=t}function sfe(e,n,t){ebe(t,0,e,n,t.length,!1)}function Hh(e,n,t,i,r){e.b=n,e.c=t,e.d=i,e.a=r}function lfe(e,n,t,i,r){e.d=n,e.c=t,e.a=i,e.b=r}function Ivn(e,n){n&&(e.b=n,e.a=(T0(n),n.a))}function LT(e,n){if(!e)throw R(new qn(n))}function C4(e,n){if(!e)throw R(new Uc(n))}function ffe(e,n){if(!e)throw R(new iAe(n))}function Dvn(e,n){return ZP(),oo(e.d.p,n.d.p)}function _vn(e,n){return P1(),ji(e.e.b,n.e.b)}function Lvn(e,n){return P1(),ji(e.e.a,n.e.a)}function Pvn(e,n){return oo(fIe(e.d),fIe(n.d))}function Z$(e,n){return n&&xR(e,n.d)?n:null}function $vn(e,n){return n==(De(),Vn)?e.c:e.d}function Rvn(e){return new Se(e.c+e.b,e.d+e.a)}function WNe(e){return e!=null&&!jQ(e,oA,sA)}function Bvn(e,n){return(_Fe(e)<<4|_Fe(n))&yr}function ZNe(e,n,t,i,r){e.c=n,e.d=t,e.b=i,e.a=r}function afe(e){var n,t;n=e.b,t=e.c,e.b=t,e.c=n}function hfe(e){var n,t;t=e.d,n=e.a,e.d=n,e.a=t}function zvn(e,n){var t;return t=e.c,Jhe(e,n),t}function dfe(e,n){return n<0?e.g=-1:e.g=n,e}function eR(e,n){return N8n(e),e.a*=n,e.b*=n,e}function PT(e,n,t){Ise.call(this,e,n),this.c=t}function nR(e,n,t){Ise.call(this,e,n),this.c=t}function bfe(e){Qle(),jv.call(this),this._h(e)}function eIe(){J9(),W3n.call(this,(E0(),kf))}function nIe(e){return ai(),new Gh(0,e)}function tIe(){tIe=Y,Gce=(En(),new Dn(Bne))}function tR(){tR=Y,new Mde((SX(),Qne),(EX(),Yne))}function iIe(){this.b=ne(re(Le((Hf(),jte))))}function tV(e){this.b=e,this.a=Fb(this.b.a).Md()}function rIe(e,n){this.b=e,this.a=n,mC.call(this)}function cIe(e,n){this.a=e,this.b=n,mC.call(this)}function uIe(e,n,t){this.a=e,Pv.call(this,n,t)}function oIe(e,n,t){this.a=e,Pv.call(this,n,t)}function O9(e,n,t){var i;i=new M2(t),$f(e,n,i)}function gfe(e,n,t){var i;return i=e[n],e[n]=t,i}function iR(e){var n;return n=e.slice(),yY(n,e)}function rR(e){var n;return n=e.n,e.a.b+n.d+n.a}function sIe(e){var n;return n=e.n,e.e.b+n.d+n.a}function wfe(e){var n;return n=e.n,e.e.a+n.b+n.c}function pfe(e){e.a.b=e.b,e.b.a=e.a,e.a=e.b=null}function Vt(e,n){return Ki(e,n,e.c.b,e.c),!0}function Fvn(e){return e.a?e.a:IV(e)}function tE(e){if(!e)throw R(new a9(null))}function Ew(e,n){return KE(e,new k9(n.a,n.b))}function Jvn(e){return!uc(e)&&e.c.i.c==e.d.i.c}function Hvn(e,n){return e.c=n)throw R(new gxe)}function Hu(e){e.f=new kTe(e),e.i=new jTe(e),++e.g}function mR(e){this.b=new xo(11),this.a=(Tw(),e)}function gV(e){this.b=null,this.a=(Tw(),e||Fme)}function Dfe(e,n){this.e=e,this.d=(n&64)!=0?n|jh:n}function XIe(e,n){this.c=0,this.d=e,this.b=n|64|jh}function KIe(e){this.a=KJe(e.a),this.b=new bs(e.b)}function Ad(e,n,t,i){var r;r=e.i,r.i=n,r.a=t,r.b=i}function _fe(e){var n;for(n=e;n.f;)n=n.f;return n}function x3n(e){return e.e?ihe(e.e):null}function uE(e){return ps(),!e.Gc(Z1)&&!e.Gc(mb)}function VIe(e,n,t){return M8(),qY(e,n)&&qY(e,t)}function YIe(e,n,t){return rYe(e,u(n,12),u(t,12))}function wV(e,n){return n.Sh()?z0(e.b,u(n,52)):n}function vR(e){return new Se(e.c+e.b/2,e.d+e.a/2)}function A3n(e,n,t){n.of(t,ne(re(zn(e.b,t)))*e.a)}function M3n(e,n){n.Tg("General 'Rotator",1),J$n(e)}function Dr(e,n,t,i,r){mY.call(this,e,n,t,i,r,-1)}function oE(e,n,t,i,r){rO.call(this,e,n,t,i,r,-1)}function we(e,n,t,i){mr.call(this,e,n,t),this.b=i}function yR(e,n,t,i){PT.call(this,e,n,t),this.b=i}function QIe(e){KCe.call(this,e,!1),this.a=!1}function WIe(){kK.call(this,"LOOKAHEAD_LAYOUT",1)}function ZIe(){kK.call(this,"LAYOUT_NEXT_LEVEL",3)}function eDe(e){this.b=e,j4.call(this,e),uOe(this)}function nDe(e){this.b=e,ET.call(this,e),oOe(this)}function tDe(e,n){this.b=e,GU.call(this,e.b),this.a=n}function x2(e,n,t){this.a=e,x4.call(this,n,t,5,6)}function Lfe(e,n,t,i){this.b=e,mr.call(this,n,t,i)}function Gb(e,n,t){yh(),this.e=e,this.d=n,this.a=t}function Zr(e,n){for(_n(n);e.Ob();)n.Ad(e.Pb())}function kR(e,n){return ai(),new Yfe(e,n,0)}function pV(e,n){return ai(),new Yfe(6,e,n)}function C3n(e,n){return gn(e.substr(0,n.length),n)}function so(e,n){return $r(n)?BV(e,n):!!Xc(e.f,n)}function T3n(e){return _o(~e.l&Ls,~e.m&Ls,~e.h&G1)}function mV(e){return typeof e===fN||typeof e===hZ}function Uh(e){return new Un(new sle(e.a.length,e.a))}function vV(e){return new mn(null,$3n(e,e.length))}function iDe(e){if(!e)throw R(new hu);return e.d}function N4(e){var n;return n=OE(e),at(n!=null),n}function O3n(e){var n;return n=pjn(e),at(n!=null),n}function I9(e,n){var t;return t=e.a.gc(),Zae(n,t),t-n}function hr(e,n){var t;return t=e.a.yc(n,e),t==null}function RT(e,n){return e.a.yc(n,($n(),ib))==null}function N3n(e,n){return e>0?k.Math.log(e/n):-100}function Pfe(e,n){return n?ac(e,n):!1}function I4(e,n,t){return Bf(e.a,n),gfe(e.b,n.g,t)}function I3n(e,n,t){N9(t,e.a.c.length),ul(e.a,t,n)}function ce(e,n,t,i){tFe(n,t,e.length),D3n(e,n,t,i)}function D3n(e,n,t,i){var r;for(r=n;r0?1:0}function lE(e){return e.e==0?e:new Gb(-e.e,e.d,e.a)}function L3n(e){return e==Vi?qN:e==Ir?"-INF":""+e}function P3n(e){return e==Vi?qN:e==Ir?"-INF":""+e}function $3n(e,n){return M8n(n,e.length),new bIe(e,n)}function cDe(e,n,t,i,r){for(;n=e.g}function CV(e,n,t){var i;return i=RY(e,n,t),zbe(e,i)}function pDe(e,n){var t;t=console[e],t.call(console,n)}function D4(e,n){var t;t=e.a.length,L2(e,t),tY(e,t,n)}function mDe(e,n){var t;++e.j,t=e.Cj(),e.pj(e.Xi(t,n))}function TV(e,n){for(_n(n);e.c=e?new Yoe:Q8n(e-1)}function uf(e){if(e==null)throw R(new c4);return e}function _n(e){if(e==null)throw R(new c4);return e}function t5n(e){return!e.a&&(e.a=new mr(vb,e,4)),e.a}function Mw(e){return!e.d&&(e.d=new mr(Rc,e,1)),e.d}function i5n(e){if(e.p!=3)throw R(new is);return e.e}function r5n(e){if(e.p!=4)throw R(new is);return e.e}function c5n(e){if(e.p!=6)throw R(new is);return e.f}function u5n(e){if(e.p!=3)throw R(new is);return e.j}function o5n(e){if(e.p!=4)throw R(new is);return e.j}function s5n(e){if(e.p!=6)throw R(new is);return e.k}function or(){Rxe.call(this),r2(this.j.c,0),this.a=-1}function CDe(){Ot.call(this,"DELAUNAY_TRIANGULATION",0)}function l5n(){return FP(),F(z(qen,1),Ee,537,0,[Zne])}function f5n(e,n,t){return X4(),t.Kg(e,u(n.jd(),147))}function a5n(e,n){Et((!e.a&&(e.a=new CT(e,e)),e.a),n)}function Wfe(e,n){e.c<0||e.b.b=0?e.hi(t):q0e(e,n)}function L9(e,n){var t;return t=MV("",e),t.n=n,t.i=1,t}function Cw(e){return e.c==-2&&sX(e,AMn(e.g,e.b)),e.c}function Zfe(e){return!e.b&&(e.b=new IP(new jX)),e.b}function TDe(e,n){return tR(),new Mde(new lOe(e),new sOe(n))}function d5n(e){return sl(e,wZ),hB(mc(mc(5,e),e/10|0))}function OV(){OV=Y,Ken=new rse(F(z(yg,1),tF,45,0,[]))}function ODe(){j0e.call(this,vg,(kAe(),chn)),NPn(this)}function NDe(){j0e.call(this,hf,(g9(),Y8e)),BLn(this)}function IDe(e,n){Jwn.call(this,W8n(Nt(e),Nt(n))),this.a=n}function eae(e,n,t,i){pw.call(this,e,n),this.d=t,this.a=i}function AR(e,n,t,i){pw.call(this,e,t),this.a=n,this.f=i}function DDe(e,n){this.b=e,yV.call(this,e,n),uOe(this)}function _De(e,n){this.b=e,Xle.call(this,e,n),oOe(this)}function dE(e){this.d=e,this.a=this.d.b,this.b=this.d.c}function LDe(e){e.b=!1,e.c=!1,e.d=!1,e.a=!1}function P9(e){return!e.a&&(e.a=new oAe(e.c.vc())),e.a}function PDe(e){return!e.b&&(e.b=new h9(e.c.ec())),e.b}function $De(e){return!e.d&&(e.d=new Hr(e.c.Bc())),e.d}function Xh(e,n){for(;n-- >0;)e=e<<1|(e<0?1:0);return e}function RDe(e,n){var t;return t=new Xu(e),Gn(n.c,t),t}function b5n(e,n){hV(u(n.b,68),e),Ao(n.a,new Wue(e))}function BDe(e,n){e.u.Gc((ps(),Z1))&&jTn(e,n),E9n(e,n)}function Ku(e,n){return ue(e)===ue(n)||e!=null&&gi(e,n)}function ei(e,n,t){return $r(n)?Kc(e,n,t):Ko(e.f,n,t)}function nae(e){return En(),e?e.Me():(Tw(),Tw(),Jme)}function g5n(){return n$(),F(z(P6e,1),Ee,477,0,[Zre])}function w5n(){return t$(),F(z(Bln,1),Ee,546,0,[ece])}function p5n(){return Tj(),F(z(i9e,1),Ee,527,0,[OI])}function zc(e,n){return sV(e.a,n)?e.b[u(n,23).g]:null}function m5n(e){return String.fromCharCode.apply(null,e)}function rc(e,n){return Qn(n,e.length),e.charCodeAt(n)}function zT(e){return e.j.c.length=0,rae(e.c),l2n(e.a),e}function $9(e){return e.e==f7&&a(e,zEn(e.g,e.b)),e.e}function FT(e){return e.f==f7&&w(e,Txn(e.g,e.b)),e.f}function v5n(e){return!e.b&&(e.b=new Nn(mt,e,4,7)),e.b}function tae(e){return!e.c&&(e.c=new Nn(mt,e,5,8)),e.c}function iae(e){return!e.c&&(e.c=new we($s,e,9,9)),e.c}function NV(e){return!e.n&&(e.n=new we(Eu,e,1,7)),e.n}function qv(e){var n;return n=e.b,!n&&(e.b=n=new cj(e)),n}function rae(e){var n;for(n=e.Jc();n.Ob();)n.Pb(),n.Qb()}function y5n(e,n,t){var i;i=u(e.d.Kb(t),162),i&&i.Nb(n)}function k5n(e,n){return new h_e(u(Nt(e),51),u(Nt(n),51))}function li(e,n){return F0(e),new mn(e,new whe(n,e.a))}function So(e,n){return F0(e),new mn(e,new the(n,e.a))}function C2(e,n){return F0(e),new xle(e,new ZPe(n,e.a))}function MR(e,n){return F0(e),new Ale(e,new e$e(n,e.a))}function zDe(e,n){W1e(e,ne($1(n,"x")),ne($1(n,"y")))}function FDe(e,n){W1e(e,ne($1(n,"x")),ne($1(n,"y")))}function j5n(e,n){return Qoe(),ji((_n(e),e),(_n(n),n))}function E5n(e,n){return ji(e.d.c+e.d.b/2,n.d.c+n.d.b/2)}function S5n(e,n){return ji(e.g.c+e.g.b/2,n.g.c+n.g.b/2)}function x5n(e){return e!=null&&xj(SG,e.toLowerCase())}function A5n(e){il();var n;n=u(e.g,9),n.n.a=e.d.c+n.d.b}function IV(e){var n;return n=e7n(e),n||null}function ri(e,n,t,i){return ZBe(e,n,t,!1),HB(e,i),e}function M5n(e,n,t){DLn(e.a,t),W7n(t),cOn(e.b,t),ePn(n,t)}function _4(e,n,t,i){Ot.call(this,e,n),this.a=t,this.b=i}function CR(e,n,t,i){this.a=e,this.c=n,this.b=t,this.d=i}function cae(e,n,t,i){this.c=e,this.b=n,this.a=t,this.d=i}function JDe(e,n,t,i){this.c=e,this.b=n,this.d=t,this.a=i}function DV(e,n,t,i){this.a=e,this.e=n,this.d=t,this.c=i}function HDe(e,n,t,i){this.a=e,this.d=n,this.c=t,this.b=i}function _f(e,n,t,i){this.c=e,this.d=n,this.b=t,this.a=i}function _V(e,n,t){this.a=Jge,this.d=e,this.b=n,this.c=t}function uae(e,n){this.b=e,this.c=n,this.a=new d4(this.b)}function GDe(e,n){this.d=(_n(e),e),this.a=16449,this.c=n}function qDe(e,n,t,i){Kze.call(this,e,t,i,!1),this.f=n}function LV(e,n,t){var i,r;return i=Tge(e),r=n.qi(t,i),r}function T1(e){var n,t;return t=(n=new gw,n),X9(t,e),t}function PV(e){var n,t;return t=(n=new gw,n),x0e(t,e),t}function UDe(e){return!e.b&&(e.b=new we(pr,e,12,3)),e.b}function XDe(e){this.a=new Oe,this.e=se($t,Me,54,e,0,2)}function $V(e){this.f=e,this.c=this.f.e,e.f>0&&HHe(this)}function KDe(e,n,t,i){this.a=e,this.c=n,this.d=t,this.b=i}function VDe(e,n,t,i){this.a=e,this.b=n,this.d=t,this.c=i}function YDe(e,n,t,i){this.a=e,this.b=n,this.c=t,this.d=i}function QDe(e,n,t,i){this.a=e,this.b=n,this.c=t,this.d=i}function Ub(e,n,t,i){this.e=e,this.a=n,this.c=t,this.d=i}function WDe(e,n,t,i){Dl(),WPe.call(this,n,t,i),this.a=e}function ZDe(e,n,t,i){Dl(),WPe.call(this,n,t,i),this.a=e}function e_e(e,n){this.a=e,Hpn.call(this,e,u(e.d,16).dd(n))}function C5n(e,n){return ji(us(e)*Gs(e),us(n)*Gs(n))}function T5n(e,n){return ji(us(e)*Gs(e),us(n)*Gs(n))}function L4(e){var n;return n=e.f,n||(e.f=new p9(e,e.c))}function En(){En=Y,Sc=new Ae,r1=new nn,bJ=new yn}function Tw(){Tw=Y,Fme=new ye,ste=new ye,Jme=new Re}function R9(e){if(Is(e.d),e.d.d!=e.c)throw R(new Nl)}function qs(e){e.a.a=e.c,e.c.b=e.a,e.a.b=e.c.a=null,e.b=0}function oae(e){return at(e.b0?Pf(e):new Oe}function TR(e){return e.n&&(e.e!==mYe&&e.he(),e.j=null),e}function sae(e,n){return e.b=n.b,e.c=n.c,e.d=n.d,e.a=n.a,e}function N5n(e,n,t){return Te(e.a,(qQ(n,t),new pw(n,t))),e}function I5n(e,n){return u(C(e,(me(),Dy)),16).Ec(n),n}function D5n(e,n){return wn(e,u(C(n,(Ie(),xm)),15),n)}function _5n(e){return Uw(e)&&Fe(ze(je(e,(Ie(),xg))))}function L5n(e,n,t){return Cj(),$jn(u(zn(e.e,n),516),t)}function P5n(e,n,t){e.i=0,e.e=0,n!=t&&Gze(e,n,t)}function $5n(e,n,t){e.i=0,e.e=0,n!=t&&qze(e,n,t)}function n_e(e,n,t,i){this.b=e,this.c=i,D$.call(this,n,t)}function t_e(e,n){this.g=e,this.d=F(z(u1,1),Fd,9,0,[n])}function i_e(e,n){e.d&&!e.d.a&&(XSe(e.d,n),i_e(e.d,n))}function r_e(e,n){e.e&&!e.e.a&&(XSe(e.e,n),r_e(e.e,n))}function c_e(e,n){return c3(e.j,n.s,n.c)+c3(n.e,e.s,e.c)}function R5n(e,n){return-ji(us(e)*Gs(e),us(n)*Gs(n))}function B5n(e){return u(e.jd(),147).Og()+":"+fu(e.kd())}function u_e(){bW(this,new IC),this.wb=(C0(),Bn),g9()}function o_e(e){this.b=new s_,this.a=e,k.Math.random()}function s_e(e){this.b=new Oe,Sr(this.b,this.b),this.a=e}function lae(e,n){new xi,this.a=new xs,this.b=e,this.c=n}function l_e(){du.call(this,"There is no more element.")}function z5n(e){GP(),k.setTimeout(function(){throw e},0)}function F5n(e){e.Tg("No crossing minimization",1),e.Ug()}function J5n(e,n){return Us(e),Us(n),Zxe(u(e,23),u(n,23))}function Xb(e,n,t){var i,r;i=UK(t),r=new Av(i),$f(e,n,r)}function RV(e,n,t,i,r,c){rO.call(this,e,n,t,i,r,c?-2:-1)}function f_e(e,n,t,i){Ise.call(this,n,t),this.b=e,this.a=i}function fae(e){this.b=e,this.c=e,e.e=null,e.c=null,this.a=1}function OR(e){return!e.a&&(e.a=new we(Ft,e,10,11)),e.a}function yi(e){return!e.q&&(e.q=new we(yf,e,11,10)),e.q}function ge(e){return!e.s&&(e.s=new we(ns,e,21,17)),e.s}function a_e(e){return tE(e==null||mV(e)&&e.Rm!==bn),e}function NR(e,n){if(e==null)throw R(new f4(n));return e}function h_e(e,n){Ebn.call(this,new gV(e)),this.a=e,this.b=n}function BV(e,n){return n==null?!!Xc(e.f,null):a3n(e.i,n)}function zV(e){return X(e,18)?new E2(u(e,18)):Ovn(e.Jc())}function IR(e){return En(),X(e,59)?new DX(e):new F$(e)}function H5n(e){return Nt(e),cHe(new Un(Yn(e.a.Jc(),new ee)))}function G5n(e){return new tOe(e,e.e.Pd().gc()*e.c.Pd().gc())}function q5n(e){return new iOe(e,e.e.Pd().gc()*e.c.Pd().gc())}function aae(e){return e&&e.hashCode?e.hashCode():jw(e)}function U5n(e){e&&_R(e,e.ge())}function X5n(e,n){var t;return t=Qse(e.a,n),t&&(n.d=null),t}function d_e(e,n,t){return e.f?e.f.cf(n,t):!1}function JT(e,n,t,i){ir(e.c[n.g],t.g,i),ir(e.c[t.g],n.g,i)}function FV(e,n,t,i){ir(e.c[n.g],n.g,t),ir(e.b[n.g],n.g,i)}function K5n(e,n,t){return ne(re(t.a))<=e&&ne(re(t.b))>=n}function b_e(){this.d=new xi,this.b=new wt,this.c=new Oe}function g_e(){this.b=new ar,this.d=new xi,this.e=new BP}function hae(){this.c=new Vr,this.d=new Vr,this.e=new Vr}function Ow(){this.a=new xs,this.b=(sl(3,rm),new xo(3))}function w_e(e){this.c=e,this.b=new kd(u(Nt(new ra),51))}function p_e(e){this.c=e,this.b=new kd(u(Nt(new f0),51))}function m_e(e){this.b=e,this.a=new kd(u(Nt(new uu),51))}function Md(e,n){this.e=e,this.a=Mr,this.b=_Xe(n),this.c=n}function DR(e){this.c=e.c,this.d=e.d,this.b=e.b,this.a=e.a}function v_e(e,n,t,i,r,c){this.a=e,DY.call(this,n,t,i,r,c)}function y_e(e,n,t,i,r,c){this.a=e,DY.call(this,n,t,i,r,c)}function O0(e,n,t,i,r,c,o){return new cY(e.e,n,t,i,r,c,o)}function V5n(e,n,t){return t>=0&&gn(e.substr(t,n.length),n)}function k_e(e,n){return X(n,147)&&gn(e.b,u(n,147).Og())}function Y5n(e,n){return e.a?n.Dh().Jc():u(n.Dh(),72).Gi()}function j_e(e,n){var t;return t=e.b.Oc(n),gPe(t,e.b.gc()),t}function HT(e,n){if(e==null)throw R(new f4(n));return e}function tu(e){return e.u||(Ms(e),e.u=new YOe(e,e)),e.u}function Go(e){var n;return n=u(Xn(e,16),29),n||e.fi()}function _R(e,n){var t;return t=Pb(e.Pm),n==null?t:t+": "+n}function of(e,n,t){return Qr(n,t,e.length),e.substr(n,t-n)}function E_e(e,n){X$.call(this),Che(this),this.a=e,this.c=n}function S_e(){kK.call(this,"FIXED_INTEGER_RATIO_BOXES",2)}function Q5n(){return iB(),F(z(g3e,1),Ee,422,0,[b3e,Kte])}function W5n(){return hO(),F(z(S3e,1),Ee,419,0,[VJ,E3e])}function Z5n(){return uO(),F(z(M3e,1),Ee,476,0,[A3e,QJ])}function e4n(){return GR(),F(z(F3e,1),Ee,420,0,[gie,z3e])}function n4n(){return XR(),F(z(n5e,1),Ee,423,0,[xie,Sie])}function t4n(){return sO(),F(z(J4e,1),Ee,421,0,[ire,rre])}function i4n(){return vE(),F(z(Eon,1),Ee,518,0,[Ox,Tx])}function r4n(){return Da(),F(z(Ion,1),Ee,508,0,[Og,Qa])}function c4n(){return dh(),F(z(Oon,1),Ee,509,0,[yp,Kd])}function u4n(){return da(),F(z(Xon,1),Ee,515,0,[Dm,ab])}function o4n(){return Iw(),F(z(esn,1),Ee,454,0,[hb,X3])}function s4n(){return HR(),F(z($ye,1),Ee,425,0,[Are,Pye])}function l4n(){return AB(),F(z(Rye,1),Ee,487,0,[FH,Y3])}function f4n(){return cB(),F(z(zye,1),Ee,426,0,[Bye,Ire])}function a4n(){return aB(),F(z(nve,1),Ee,424,0,[yte,vJ])}function h4n(){return Y9(),F(z(lin,1),Ee,502,0,[ZN,Dte])}function d4n(){return QR(),F(z(T6e,1),Ee,478,0,[Vre,C6e])}function b4n(){return eO(),F(z($6e,1),Ee,428,0,[nce,WH])}function g4n(){return vO(),F(z(c9e,1),Ee,427,0,[eG,r9e])}function LR(e,n,t,i){return t>=0?e.Rh(n,t,i):e.zh(null,t,i)}function GT(e){return e.b.b==0?e.a.uf():nV(e.b)}function w4n(e){if(e.p!=5)throw R(new is);return Rt(e.f)}function p4n(e){if(e.p!=5)throw R(new is);return Rt(e.k)}function dae(e){return ue(e.a)===ue((JY(),Fce))&&xPn(e),e.a}function x_e(e,n){aj(this,new Se(e.a,e.b)),Mv(this,_T(n))}function Nw(){Sbn.call(this,new b4(z2(12))),tle(!0),this.a=2}function JV(e,n,t){ai(),bw.call(this,e),this.b=n,this.a=t}function bae(e,n,t){Dl(),_P.call(this,n),this.a=e,this.b=t}function m4n(e,n){var t=tte[e.charCodeAt(0)];return t??e}function PR(e,n){return NR(e,"set1"),NR(n,"set2"),new bMe(e,n)}function $R(e,n){return dPe(n),B8n(e,se($t,ni,30,n,15,1),n)}function v4n(e,n){e.b=n,e.c>0&&e.b>0&&(e.g=lR(e.c,e.b,e.a))}function y4n(e,n){e.c=n,e.c>0&&e.b>0&&(e.g=lR(e.c,e.b,e.a))}function A_e(e){var n;n=e.c.d.b,e.b=n,e.a=e.c.d,n.a=e.c.d.b=e}function M_e(e){return e.b==0?null:(at(e.b!=0),$l(e,e.a.a))}function lo(e,n){return n==null?bu(Xc(e.f,null)):Dj(e.i,n)}function C_e(e,n,t,i,r){return new wW(e,(q9(),hte),n,t,i,r)}function HV(e,n,t,i){var r;r=new fNe,n.a[t.g]=r,I4(e.b,i,r)}function T_e(e,n){var t,i;return t=n,i=new si,gVe(e,t,i),i.d}function k4n(e,n){var t;return t=D8n(e.f,n),pi(U$(t),e.f.d)}function qT(e){var n;X8n(e.a),OTe(e.a),n=new OP(e.a),ode(n)}function j4n(e,n){EXe(e,!0),Ao(e.e.Pf(),new Kle(e,!0,n))}function E4n(e,n){return P1(),u(C(n,(Mu(),Dh)),15).a==e}function lc(e){return Math.max(Math.min(e,oi),-2147483648)|0}function O_e(e){X$.call(this),Che(this),this.a=e,this.c=!0}function gae(e,n,t){this.a=new Oe,this.e=e,this.f=n,this.c=t}function RR(e,n,t){this.c=new Oe,this.e=e,this.f=n,this.b=t}function N_e(e,n,t){this.i=new Oe,this.b=e,this.g=n,this.a=t}function I_e(e){this.a=u(Nt(e),277),this.b=(En(),new ole(e))}function B9(){B9=Y;var e,n;n=!yEn(),e=new un,ite=n?new ln:e}function wae(){wae=Y,xnn=new uh,Mnn=new xfe,Ann=new Ab}function dh(){dh=Y,yp=new yse(gy,0),Kd=new yse(by,1)}function Da(){Da=Y,Og=new kse(KZ,0),Qa=new kse("UP",1)}function Iw(){Iw=Y,hb=new Ese(by,0),X3=new Ese(gy,1)}function Uv(e,n,t){BR(),e&&ei(Rce,e,n),e&&ei(eD,e,t)}function pae(e,n,t){var i;i=e.Fh(n),i>=0?e.$h(i,t):ybe(e,n,t)}function D_e(e,n){var t;for(Nt(n),t=e.a;t;t=t.c)n.Wd(t.g,t.i)}function UT(e,n){var t;t=e.q.getHours(),e.q.setDate(n),sS(e,t)}function __e(e){var n;return n=new KP(z2(e.length)),m1e(n,e),n}function S4n(e){function n(){}return n.prototype=e||{},new n}function x4n(e,n){return vze(e,n)?(vBe(e),!0):!1}function O1(e,n){if(n==null)throw R(new c4);return xEn(e,n)}function A4n(e){if(e.ye())return null;var n=e.n;return sJ[n]}function T2(e){return e.Db>>16!=3?null:u(e.Cb,26)}function _a(e){return e.Db>>16!=9?null:u(e.Cb,26)}function L_e(e){return e.Db>>16!=6?null:u(e.Cb,85)}function P_e(e,n){var t;return t=e.Fh(n),t>=0?e.Th(t):jW(e,n)}function GV(e,n,t){var i;i=Bze(e,n,t),e.b=new CB(i.c.length)}function $_e(e){this.a=e,this.b=se(yon,Me,2005,e.e.length,0,2)}function R_e(){this.a=new Fh,this.e=new ar,this.g=0,this.i=0}function B_e(e,n){$$(this),this.f=n,this.g=e,TR(this),this.he()}function z_e(e,n){return e.b+=n.b,e.c+=n.c,e.d+=n.d,e.a+=n.a,e}function mae(e){var n;return n=e.d,n=e._i(e.f),Et(e,n),n.Ob()}function F_e(e,n){var t;return t=new kfe(n),pGe(t,e),new bs(t)}function M4n(e){if(e.p!=0)throw R(new is);return qj(e.f,0)}function C4n(e){if(e.p!=0)throw R(new is);return qj(e.k,0)}function J_e(e){return e.Db>>16!=7?null:u(e.Cb,241)}function vae(e){return e.Db>>16!=7?null:u(e.Cb,174)}function H_e(e){return e.Db>>16!=3?null:u(e.Cb,158)}function z9(e){return e.Db>>16!=6?null:u(e.Cb,241)}function Fi(e){return e.Db>>16!=11?null:u(e.Cb,26)}function O2(e){return e.Db>>16!=17?null:u(e.Cb,29)}function bE(e,n,t,i,r,c){return new L1(e.e,n,e.Jj(),t,i,r,c)}function Kc(e,n,t){return n==null?Ko(e.f,null,t):Bw(e.i,n,t)}function qV(e,n){return k.Math.abs(e)0}function yae(e){var n;return F0(e),n=new ar,li(e,new qke(n))}function G_e(e,n){var t=e.a=e.a||[];return t[n]||(t[n]=e.te(n))}function D4n(e,n){var t;t=e.q.getHours(),e.q.setMonth(n),sS(e,t)}function fc(e,n){e.c&&qo(e.c.g,e),e.c=n,e.c&&Te(e.c.g,e)}function Or(e,n){e.c&&qo(e.c.a,e),e.c=n,e.c&&Te(e.c.a,e)}function Gr(e,n){e.d&&qo(e.d.e,e),e.d=n,e.d&&Te(e.d.e,e)}function wu(e,n){e.i&&qo(e.i.j,e),e.i=n,e.i&&Te(e.i.j,e)}function q_e(e,n,t){this.a=n,this.c=e,this.b=(Nt(t),new bs(t))}function U_e(e,n,t){this.a=n,this.c=e,this.b=(Nt(t),new bs(t))}function X_e(e,n){this.a=e,this.c=pc(this.a),this.b=new DR(n)}function N2(e,n){if(e<0||e>n)throw R(new jo(Qge+e+Wge+n))}function K_e(){K_e=Y,uon=Eo(new or,(zr(),Pc),(Ur(),Cy))}function kae(){kae=Y,oon=Eo(new or,(zr(),Pc),(Ur(),Cy))}function V_e(){V_e=Y,non=Eo(new or,(zr(),Pc),(Ur(),Cy))}function Y_e(){Y_e=Y,ton=Eo(new or,(zr(),Pc),(Ur(),Cy))}function Q_e(){Q_e=Y,ion=Eo(new or,(zr(),Pc),(Ur(),Cy))}function jae(){jae=Y,ron=Eo(new or,(zr(),Pc),(Ur(),Cy))}function W_e(){W_e=Y,xon=qt(new or,(zr(),Pc),(Ur(),tx))}function rl(){rl=Y,Con=qt(new or,(zr(),Pc),(Ur(),tx))}function Z_e(){Z_e=Y,Ton=qt(new or,(zr(),Pc),(Ur(),tx))}function UV(){UV=Y,_on=qt(new or,(zr(),Pc),(Ur(),tx))}function eLe(){eLe=Y,Tsn=Eo(new or,(ny(),Ix),(uS(),cye))}function nLe(){nLe=Y,Uen=Dt((FP(),F(z(qen,1),Ee,537,0,[Zne])))}function BR(){BR=Y,Rce=new wt,eD=new wt,Ugn(ann,new H6)}function _4n(e,n){var t,i;t=n.c,i=t!=null,i&&D4(e,new M2(n.c))}function tLe(e,n){Q3n(e,e.b,e.c),u(e.b.b,68),n&&u(n.b,68).b}function zR(e,n){X(e.Cb,184)&&(u(e.Cb,184).tb=null),Mo(e,n)}function XV(e,n){X(e.Cb,88)&&Y2(Ms(u(e.Cb,88)),4),Mo(e,n)}function L4n(e,n){Q1e(e,n),X(e.Cb,88)&&Y2(Ms(u(e.Cb,88)),2)}function P4n(e,n){return ji(u(e.c,65).c.e.b,u(n.c,65).c.e.b)}function $4n(e,n){return ji(u(e.c,65).c.e.a,u(n.c,65).c.e.a)}function fo(e,n){return Tc(),AY(n)?new uR(n,e):new vT(n,e)}function KV(e,n){e.a&&qo(e.a.k,e),e.a=n,e.a&&Te(e.a.k,e)}function VV(e,n){e.b&&qo(e.b.f,e),e.b=n,e.b&&Te(e.b.f,e)}function N0(e,n,t){NFe(n,t,e.gc()),this.c=e,this.a=n,this.b=t-n}function P4(e){this.c=new xi,this.b=e.b,this.d=e.c,this.a=e.a}function YV(e){this.a=k.Math.cos(e),this.b=k.Math.sin(e)}function Kb(e,n,t,i){this.c=e,this.d=i,KV(this,n),VV(this,t)}function vn(e,n){this.b=(_n(e),e),this.a=(n&cm)==0?n|64|jh:n}function R4n(e,n){QTe(e,Rt(Rr(Sw(n,24),uF)),Rt(Rr(n,uF)))}function XT(e){return yh(),ao(e,0)>=0?J0(e):lE(J0(Od(e)))}function B4n(){return zl(),F(z(Qo,1),Ee,130,0,[Kme,Yo,Vme])}function iLe(e,n,t){return new wW(e,(q9(),ate),null,!1,n,t)}function rLe(e,n,t){return new wW(e,(q9(),dte),n,t,null,!1)}function cLe(e,n,t){var i;NFe(n,t,e.c.length),i=t-n,Goe(e.c,n,i)}function uLe(e,n){var t;return t=u(J2(L4(e.a),n),18),t?t.gc():0}function Eae(e){var n;return F0(e),n=(Tw(),Tw(),ste),dB(e,n)}function oLe(e){for(var n;;)if(n=e.Pb(),!e.Ob())return n}function sLe(e){var n,t;return t=(g9(),n=new gw,n),X9(t,e),t}function lLe(e){var n,t;return t=(g9(),n=new gw,n),X9(t,e),t}function Xv(e){return Cj(),X(e.g,9)?u(e.g,9):null}function z4n(){return $w(),F(z(Bte,1),Ee,368,0,[hp,ub,ap])}function F4n(){return vB(),F(z(y3e,1),Ee,350,0,[v3e,KJ,Vte])}function J4n(){return tg(),F(z(zin,1),Ee,449,0,[iie,E7,L3])}function H4n(){return e8(),F(z(die,1),Ee,302,0,[aie,hie,rI])}function G4n(){return $0(),F(z(bie,1),Ee,329,0,[cI,B3e,ym])}function q4n(){return _1(),F(z(Vin,1),Ee,315,0,[uI,$3,Ty])}function U4n(){return _E(),F(z(I4e,1),Ee,352,0,[Yie,N4e,AH])}function X4n(){return Nc(),F(z(Kun,1),Ee,452,0,[Ax,ys,Io])}function K4n(){return _B(),F(z(q4e,1),Ee,381,0,[H4e,cre,G4e])}function V4n(){return DE(),F(z(U4e,1),Ee,348,0,[ore,ure,vI])}function Y4n(){return u8(),F(z(K4e,1),Ee,349,0,[sre,X4e,Mx])}function Q4n(){return mB(),F(z(Q4e,1),Ee,351,0,[Y4e,lre,V4e])}function W4n(){return LB(),F(z(W4e,1),Ee,382,0,[fre,L7,Im])}function Z4n(){return kE(),F(z(wve,1),Ee,384,0,[Ste,Ete,xte])}function eyn(){return wa(),F(z(dm,1),Ee,237,0,[Ou,No,Nu])}function nyn(){return ws(),F(z(Nnn,1),Ee,461,0,[Oh,rb,qf])}function tyn(){return Uo(),F(z(Dnn,1),Ee,462,0,[ja,cb,Uf])}function iyn(){return IE(),F(z(gye,1),Ee,385,0,[bye,dre,jI])}function ryn(){return xO(),F(z(Hye,1),Ee,386,0,[JH,Fye,Jye])}function cyn(){return VB(),F(z(a6e,1),Ee,387,0,[f6e,qre,l6e])}function uyn(){return DB(),F(z(o6e,1),Ee,303,0,[$re,u6e,c6e])}function oyn(){return ez(),F(z(s6e,1),Ee,436,0,[$x,qH,Rre])}function syn(){return GB(),F(z(L6e,1),Ee,430,0,[D6e,_6e,Qre])}function lyn(){return OO(),F(z(Wre,1),Ee,435,0,[VH,YH,QH])}function fyn(){return uB(),F(z(I6e,1),Ee,429,0,[Yre,N6e,O6e])}function ayn(){return Ra(),F(z(t8e,1),Ee,279,0,[H7,Fm,G7])}function hyn(){return B1(),F(z(b8e,1),Ee,347,0,[lG,Wd,Wx])}function dyn(){return EE(),F(z(y8e,1),Ee,300,0,[qI,Tce,v8e])}function byn(){return V4(),F(z(E8e,1),Ee,281,0,[j8e,Hm,gG])}function La(e){return mu(F(z(Lr,1),Me,8,0,[e.i.n,e.n,e.a]))}function gyn(e,n,t){var i;i=new wc(t.d),pi(i,e),W1e(n,i.a,i.b)}function fLe(e,n,t){var i;i=new gM,i.b=n,i.a=t,++n.b,Te(e.d,i)}function wyn(e,n,t){var i;return i=aS(e,n,!1),i.b<=n&&i.a<=t}function pyn(e){if(e.p!=2)throw R(new is);return Rt(e.f)&yr}function myn(e){if(e.p!=2)throw R(new is);return Rt(e.k)&yr}function kn(e,n){if(e<0||e>=n)throw R(new jo(Qge+e+Wge+n))}function Qn(e,n){if(e<0||e>=n)throw R(new Ioe(Qge+e+Wge+n))}function vyn(e){return e.Db>>16!=6?null:u(xW(e),241)}function aLe(e,n){var t,i;return i=I9(e,n),t=e.a.dd(i),new hMe(e,t)}function yyn(e,n){var t;return t=(_n(e),e).g,gle(!!t),_n(n),t(n)}function kyn(e){return e.a==(J9(),CG)&&UC(e,QIn(e.g,e.b)),e.a}function $4(e){return e.d==(J9(),CG)&&Gue(e,V_n(e.g,e.b)),e.d}function Sae(e,n){jbn.call(this,new b4(z2(e))),sl(n,hYe),this.a=n}function hLe(e,n,t){bw.call(this,25),this.b=e,this.a=n,this.c=t}function cl(e){ai(),bw.call(this,e),this.c=!1,this.a=!1}function dLe(e,n){Gb.call(this,1,2,F(z($t,1),ni,30,15,[e,n]))}function Rr(e,n){return P0(y3n(su(e)?sf(e):e,su(n)?sf(n):n))}function bh(e,n){return P0(k3n(su(e)?sf(e):e,su(n)?sf(n):n))}function QV(e,n){return P0(j3n(su(e)?sf(e):e,su(n)?sf(n):n))}function xae(e,n){return IIe(e.a,n)?gfe(e.b,u(n,23).g,null):null}function Vb(e){return Nt(e),X(e,18)?new bs(u(e,18)):T9(e.Jc())}function WV(e){oR(),this.a=(En(),X(e,59)?new DX(e):new F$(e))}function jyn(e){var n;return n=u(iR(e.b),10),new _l(e.a,n,e.c)}function Eyn(e,n){var t;t=ne(re(e.a.mf((Xt(),cG)))),RVe(e,n,t)}function Syn(e,n){return jE(),e.c==n.c?ji(n.d,e.d):ji(e.c,n.c)}function xyn(e,n){return jE(),e.c==n.c?ji(e.d,n.d):ji(e.c,n.c)}function Ayn(e,n){return jE(),e.c==n.c?ji(e.d,n.d):ji(n.c,e.c)}function Myn(e,n){return jE(),e.c==n.c?ji(n.d,e.d):ji(n.c,e.c)}function Cyn(e,n){e.b=e.b|n.b,e.c=e.c|n.c,e.d=e.d|n.d,e.a=e.a|n.a}function _(e){return at(e.ai?1:0}function gLe(e,n){var t,i;return t=kY(n),i=t,u(zn(e.c,i),15).a}function ZV(e,n,t){var i;i=e.d[n.p],e.d[n.p]=e.d[t.p],e.d[t.p]=i}function Iyn(e,n,t){var i;e.n&&n&&t&&(i=new pL,Te(e.e,i))}function eY(e,n){if(hr(e.a,n),n.d)throw R(new du(PYe));n.d=e}function Cae(e,n){this.a=new Oe,this.d=new Oe,this.f=e,this.c=n}function wLe(){X4(),this.b=new wt,this.a=new wt,this.c=new Oe}function pLe(){this.c=new PTe,this.a=new VPe,this.b=new axe,CMe()}function mLe(e,n,t){this.d=e,this.j=n,this.e=t,this.o=-1,this.p=3}function vLe(e,n,t){this.d=e,this.k=n,this.f=t,this.o=-1,this.p=5}function yLe(e,n,t,i,r,c){The.call(this,e,n,t,i,r),c&&(this.o=-2)}function kLe(e,n,t,i,r,c){Ohe.call(this,e,n,t,i,r),c&&(this.o=-2)}function jLe(e,n,t,i,r,c){Gae.call(this,e,n,t,i,r),c&&(this.o=-2)}function ELe(e,n,t,i,r,c){Dhe.call(this,e,n,t,i,r),c&&(this.o=-2)}function SLe(e,n,t,i,r,c){qae.call(this,e,n,t,i,r),c&&(this.o=-2)}function xLe(e,n,t,i,r,c){Nhe.call(this,e,n,t,i,r),c&&(this.o=-2)}function ALe(e,n,t,i,r,c){Ihe.call(this,e,n,t,i,r),c&&(this.o=-2)}function MLe(e,n,t,i,r,c){Uae.call(this,e,n,t,i,r),c&&(this.o=-2)}function CLe(e,n,t,i){_P.call(this,t),this.b=e,this.c=n,this.d=i}function TLe(e,n){this.f=e,this.a=(J9(),MG),this.c=MG,this.b=n}function OLe(e,n){this.g=e,this.d=(J9(),CG),this.a=CG,this.b=n}function Tae(e,n){!e.c&&(e.c=new tr(e,0)),Vz(e.c,(Si(),fA),n)}function Dyn(e,n){return TOn(e,n,X(n,103)&&(u(n,19).Bb&Ec)!=0)}function _yn(e,n){return rDe(Lu(e.q.getTime()),Lu(n.q.getTime()))}function NLe(e){return rV(e.e.Pd().gc()*e.c.Pd().gc(),16,new W5(e))}function Lyn(e){return!!e.u&&Vu(e.u.a).i!=0&&!(e.n&&FQ(e.n))}function Pyn(e){return!!e.a&&Ts(e.a.a).i!=0&&!(e.b&&JQ(e.b))}function Oae(e,n){return n==0?!!e.o&&e.o.f!=0:LQ(e,n)}function ILe(e){return at(e.b.b!=e.d.a),e.c=e.b=e.b.b,--e.a,e.c.c}function gE(e){for(;e.d>0&&e.a[--e.d]==0;);e.a[e.d++]==0&&(e.e=0)}function DLe(e){return e.a?e.e.length==0?e.a.a:e.a.a+(""+e.e):e.c}function qr(e,n){this.a=e,qc.call(this,e),N2(n,e.gc()),this.b=n}function _Le(e){this.a=se(Mr,On,1,b1e(k.Math.max(8,e))<<1,5,1)}function LLe(e){FY.call(this,e,(q9(),fte),null,!1,null,!1)}function PLe(e,n){var t;return t=1-n,e.a[t]=MB(e.a[t],t),MB(e,n)}function $Le(e,n){var t,i;return i=Rr(e,Dc),t=qh(n,32),bh(t,i)}function $yn(e,n,t){var i;return i=u(e.Zb().xc(n),18),!!i&&i.Gc(t)}function RLe(e,n,t){var i;return i=u(e.Zb().xc(n),18),!!i&&i.Kc(t)}function BLe(e,n,t){var i;i=(Nt(e),new bs(e)),pxn(new q_e(i,n,t))}function VT(e,n,t){var i;i=(Nt(e),new bs(e)),mxn(new U_e(i,n,t))}function Ryn(e,n,t){e.a=n,e.c=t,e.b.a.$b(),qs(e.d),r2(e.e.a.c,0)}function zLe(e,n){var t;e.e=new Soe,t=W2(n),Tr(t,e.c),aXe(e,t,0)}function Byn(e,n){return new eV(n,OOe(pc(n.e),e,e),($n(),!0))}function zyn(e,n){return H4(),u(C(n,(Mu(),K3)),15).a>=e.gc()}function Fyn(e){return rl(),!uc(e)&&!(!uc(e)&&e.c.i.c==e.d.i.c)}function gh(e){return u(Ba(e,se(w7,Y8,17,e.c.length,0,1)),323)}function Jyn(e){XFe((!e.a&&(e.a=new we(Ft,e,10,11)),e.a),new _M)}function Nae(){var e,n,t;return n=(t=(e=new gw,e),t),Te(u7e,n),n}function xu(e,n,t,i,r,c){return ZBe(e,n,t,c),H1e(e,i),G1e(e,r),e}function FLe(e,n,t,i){return e.a+=""+of(n==null?Vo:fu(n),t,i),e}function YT(e,n){if(e<0||e>=n)throw R(new jo(nTn(e,n)));return e}function JLe(e,n,t){if(e<0||nt)throw R(new jo(jCn(e,n,t)))}function xe(e,n,t,i){var r;r=new JM,r.a=n,r.b=t,r.c=i,Vt(e.b,r)}function qi(e,n,t,i){var r;r=new JM,r.a=n,r.b=t,r.c=i,Vt(e.a,r)}function Hyn(e,n,t){var i;i=GEn();try{return Qpn(e,n,t)}finally{u9n(i)}}function Qb(e){var n;return su(e)?(n=e,n==-0?0:n):i8n(e)}function HLe(e,n){return X(n,45)?XQ(e.a,u(n,45)):!1}function GLe(e,n){return X(n,45)?XQ(e.a,u(n,45)):!1}function qLe(e,n){return X(n,45)?XQ(e.a,u(n,45)):!1}function Gyn(e,n){return e.a<=e.b?(n.Bd(e.a++),!0):!1}function qyn(e){return qv(e).dc()?!1:(Dwn(e,new ae),!0)}function Iae(e){var n;return T0(e),n=new tt,Ov(e.a,new Jke(n)),n}function FR(e){var n;return T0(e),n=new ut,Ov(e.a,new Hke(n)),n}function Uyn(e){if(!("stack"in e))try{throw e}catch{}return e}function JR(e){return new xo((sl(e,wZ),hB(mc(mc(5,e),e/10|0))))}function ULe(e){return u(Ba(e,se(uin,fQe,12,e.c.length,0,1)),2004)}function Xyn(e){return rV(e.e.Pd().gc()*e.c.Pd().gc(),273,new HU(e))}function XLe(){XLe=Y,Rln=Dt((n$(),F(z(P6e,1),Ee,477,0,[Zre])))}function KLe(){KLe=Y,zln=Dt((t$(),F(z(Bln,1),Ee,546,0,[ece])))}function VLe(){VLe=Y,rfn=Dt((Tj(),F(z(i9e,1),Ee,527,0,[OI])))}function YLe(){YLe=Y,eye=TDe(ke(1),ke(4)),Z4e=TDe(ke(1),ke(2))}function HR(){HR=Y,Are=new Sse("DFS",0),Pye=new Sse("BFS",1)}function GR(){GR=Y,gie=new wse(H8,0),z3e=new wse("TOP_LEFT",1)}function Dae(e,n,t){this.d=new iEe(this),this.e=e,this.i=n,this.f=t}function _ae(e,n,t,i){this.d=e,this.n=n,this.g=t,this.o=i,this.p=-1}function Kyn(e,n,t){e.d&&qo(e.d.e,e),e.d=n,e.d&&zb(e.d.e,t,e)}function Vyn(e,n,t){var i;return i=g8(t),Hz(e.n,i,n),Hz(e.o,n,t),n}function F9(e,n){var t,i;return t=L2(e,n),i=null,t&&(i=t.qe()),i}function wE(e,n){var t,i;return t=O1(e,n),i=null,t&&(i=t.qe()),i}function Dw(e,n){var t,i;return t=O1(e,n),i=null,t&&(i=t.ne()),i}function N1(e,n){var t,i;return t=O1(e,n),i=null,t&&(i=I0e(t)),i}function pE(e,n){zRn(n,e),afe(e.d),afe(u(C(e,(Ie(),vH)),213))}function nY(e,n){FRn(n,e),hfe(e.d),hfe(u(C(e,(Ie(),vH)),213))}function I0(e,n){_n(n),e.b=e.b-1&e.a.length-1,ir(e.a,e.b,n),jHe(e)}function Lae(e,n){_n(n),ir(e.a,e.c,n),e.c=e.c+1&e.a.length-1,jHe(e)}function jt(e){return at(e.b!=e.d.c),e.c=e.b,e.b=e.b.a,++e.a,e.c.c}function QLe(e){if(e.e.g!=e.b)throw R(new Nl);return!!e.c&&e.d>0}function I2(e){return X(e,18)?u(e,18).dc():!e.Jc().Ob()}function Yyn(e){return new vn(_8n(u(e.a.kd(),18).gc(),e.a.jd()),16)}function WLe(e){var n;n=e.Dh(),this.a=X(n,72)?u(n,72).Gi():n.Jc()}function Pae(e,n){var t;return t=u($a(e.b,n),66),!t&&(t=new xi),t}function Qyn(e,n){var t;t=n.a,fc(t,n.c.d),Gr(t,n.d.d),R2(t.a,e.n)}function ZLe(e,n,t,i){return X(t,59)?new jOe(e,n,t,i):new Nfe(e,n,t,i)}function Wyn(){return zf(),F(z(Sin,1),Ee,413,0,[mm,m7,v7,Rte])}function Zyn(){return Rw(),F(z(rtn,1),Ee,409,0,[VN,KN,mte,vte])}function e6n(){return n8(),F(z(Ktn,1),Ee,408,0,[fp,gm,bm,O3])}function n6n(){return q9(),F(z(gJ,1),Ee,309,0,[fte,ate,hte,dte])}function t6n(){return W4(),F(z(yve,1),Ee,383,0,[ex,vve,Ote,Nte])}function i6n(){return $B(),F(z(din,1),Ee,367,0,[$te,JJ,HJ,eI])}function r6n(){return zE(),F(z(m3e,1),Ee,301,0,[rx,w3e,tI,p3e])}function c6n(){return U2(),F(z(Wie,1),Ee,203,0,[MH,Qie,U3,q3])}function u6n(){return F1(),F(z(F4e,1),Ee,269,0,[fb,z4e,nre,tre])}function o6n(){return rg(),F(z(mon,1),Ee,404,0,[yI,Cx,NH,OH])}function s6n(e){var n;return e.j==(De(),bt)&&(n=Zqe(e),cs(n,et))}function l6n(){return ny(),F(z(iye,1),Ee,398,0,[LH,Nx,Ix,Dx])}function ePe(e,n){return u(Js(S2(u(vi(e.k,n),16).Mc(),I3)),113)}function nPe(e,n){return u(Js(O4(u(vi(e.k,n),16).Mc(),I3)),113)}function f6n(e,n){return k4(new Se(n.e.a+n.f.a/2,n.e.b+n.f.b/2),e)}function a6n(){return Ez(),F(z(uln,1),Ee,401,0,[Jre,Bre,Fre,zre])}function h6n(){return dz(),F(z(r6e,1),Ee,354,0,[Pre,t6e,i6e,n6e])}function d6n(){return NE(),F(z(Lye,1),Ee,353,0,[xre,zH,Sre,Ere])}function b6n(){return s8(),F(z(n8e,1),Ee,278,0,[BI,sG,Z9e,e8e])}function g6n(){return z1(),F(z(Mce,1),Ee,222,0,[Ace,zI,q7,Vy])}function w6n(){return fl(),F(z(Zfn,1),Ee,292,0,[JI,l1,gb,FI])}function p6n(){return KR(),F(z(YI,1),Ee,288,0,[S8e,A8e,Nce,x8e])}function m6n(){return Vs(),F(z(iA,1),Ee,380,0,[XI,_g,UI,Jm])}function v6n(){return YB(),F(z(O8e,1),Ee,326,0,[Ice,M8e,T8e,C8e])}function y6n(){return RB(),F(z(pan,1),Ee,407,0,[Dce,I8e,N8e,D8e])}function Ll(e,n,t){return n<0?jW(e,t):u(t,69).uk().zk(e,e.ei(),n)}function k6n(e,n,t){var i;return i=g8(t),Hz(e.f,i,n),ei(e.g,n,t),n}function j6n(e,n,t){var i;return i=g8(t),Hz(e.p,i,n),ei(e.q,n,t),n}function tPe(e){var n,t;return n=(j0(),t=new kv,t),e&&_z(n,e),n}function $ae(e){var n;return n=e.$i(e.i),e.i>0&&Wu(e.g,0,n,0,e.i),n}function R4(e){return Cj(),X(e.g,156)?u(e.g,156):null}function E6n(e){return BR(),so(Rce,e)?u(zn(Rce,e),342).Pg():null}function S6n(e){e.a=null,e.e=null,r2(e.b.c,0),r2(e.f.c,0),e.c=null}function iPe(e,n){var t;for(t=e.j.c.length;t>24}function A6n(e){if(e.p!=1)throw R(new is);return Rt(e.k)<<24>>24}function M6n(e){if(e.p!=7)throw R(new is);return Rt(e.k)<<16>>16}function C6n(e){if(e.p!=7)throw R(new is);return Rt(e.f)<<16>>16}function Kv(e,n){return n.e==0||e.e==0?VS:(C8(),TW(e,n))}function uPe(e,n){return ue(n)===ue(e)?"(this Map)":n==null?Vo:fu(n)}function T6n(e,n,t){return bV(re(bu(Xc(e.f,n))),re(bu(Xc(e.f,t))))}function O6n(e,n,t){var i;i=u(zn(e.g,t),60),Te(e.a.c,new jc(n,i))}function oPe(e,n){var t;return t=new h4,e.Ed(t),t.a+="..",n.Fd(t),t.a}function ha(e){var n;for(n=0;e.Ob();)e.Pb(),n=mc(n,1);return hB(n)}function N6n(e,n,t,i,r){var c;c=HOn(r,t,i),Te(n,XCn(r,c)),FMn(e,r,n)}function sPe(e,n,t){e.i=0,e.e=0,n!=t&&(qze(e,n,t),Gze(e,n,t))}function lPe(e,n,t,i){this.e=null,this.c=e,this.d=n,this.a=t,this.b=i}function Rae(e,n,t,i,r){this.i=e,this.a=n,this.e=t,this.j=i,this.f=r}function fPe(e,n){hae.call(this),this.a=e,this.b=n,Te(this.a.b,this)}function I1(e,n){yh(),Gb.call(this,e,1,F(z($t,1),ni,30,15,[n]))}function I6n(e,n,t){return N8(e,n,t,X(n,103)&&(u(n,19).Bb&Ec)!=0)}function qR(e,n,t){return qz(e,n,t,X(n,103)&&(u(n,19).Bb&Ec)!=0)}function D6n(e,n,t){return LOn(e,n,t,X(n,103)&&(u(n,19).Bb&Ec)!=0)}function Bae(e,n){return e==(Fn(),Wi)&&n==Wi?4:e==Wi||n==Wi?8:32}function _6n(e,n){return u(n==null?bu(Xc(e.f,null)):Dj(e.i,n),290)}function aPe(e,n){var t;for(t=n;t;)m2(e,t.i,t.j),t=Fi(t);return e}function Vu(e){return e.n||(Ms(e),e.n=new RIe(e,Rc,e),tu(e)),e.n}function Kh(e,n){Tc();var t;return t=u(e,69).tk(),eCn(t,n),t.vl(n)}function mE(e){return at(e.a"+Aae(e.d):"e_"+jw(e)}function P6n(e,n){var t;return t=n!=null?lo(e,n):bu(Xc(e.f,n)),I$(t)}function $6n(e,n){var t;return t=n!=null?lo(e,n):bu(Xc(e.f,n)),I$(t)}function gPe(e,n){var t;for(t=0;t=0&&e.a[t]===n[t];t--);return t<0}function J6n(e,n){var t,i;i=!1;do t=Dze(e,n),i=i|t;while(t);return i}function vE(){vE=Y,Ox=new vse("UPPER",0),Tx=new vse("LOWER",1)}function XR(){XR=Y,xie=new pse(va,0),Sie=new pse("ALTERNATING",1)}function KR(){KR=Y,S8e=new wIe,A8e=new WIe,Nce=new S_e,x8e=new ZIe}function pPe(){pPe=Y,Lin=Dt((iB(),F(z(g3e,1),Ee,422,0,[b3e,Kte])))}function mPe(){mPe=Y,Bin=Dt((hO(),F(z(S3e,1),Ee,419,0,[VJ,E3e])))}function vPe(){vPe=Y,Hin=Dt((uO(),F(z(M3e,1),Ee,476,0,[A3e,QJ])))}function yPe(){yPe=Y,Qin=Dt((GR(),F(z(F3e,1),Ee,420,0,[gie,z3e])))}function kPe(){kPe=Y,ern=Dt((XR(),F(z(n5e,1),Ee,423,0,[xie,Sie])))}function jPe(){jPe=Y,Xun=Dt((sO(),F(z(J4e,1),Ee,421,0,[ire,rre])))}function EPe(){EPe=Y,Son=Dt((vE(),F(z(Eon,1),Ee,518,0,[Ox,Tx])))}function SPe(){SPe=Y,Don=Dt((Da(),F(z(Ion,1),Ee,508,0,[Og,Qa])))}function xPe(){xPe=Y,Non=Dt((dh(),F(z(Oon,1),Ee,509,0,[yp,Kd])))}function APe(){APe=Y,Kon=Dt((da(),F(z(Xon,1),Ee,515,0,[Dm,ab])))}function MPe(){MPe=Y,nsn=Dt((Iw(),F(z(esn,1),Ee,454,0,[hb,X3])))}function CPe(){CPe=Y,Csn=Dt((HR(),F(z($ye,1),Ee,425,0,[Are,Pye])))}function TPe(){TPe=Y,Dsn=Dt((AB(),F(z(Rye,1),Ee,487,0,[FH,Y3])))}function OPe(){OPe=Y,Psn=Dt((cB(),F(z(zye,1),Ee,426,0,[Bye,Ire])))}function NPe(){NPe=Y,Iln=Dt((QR(),F(z(T6e,1),Ee,478,0,[Vre,C6e])))}function IPe(){IPe=Y,Fln=Dt((eO(),F(z($6e,1),Ee,428,0,[nce,WH])))}function DPe(){DPe=Y,cfn=Dt((vO(),F(z(c9e,1),Ee,427,0,[eG,r9e])))}function _Pe(){_Pe=Y,btn=Dt((aB(),F(z(nve,1),Ee,424,0,[yte,vJ])))}function LPe(){LPe=Y,fin=Dt((Y9(),F(z(lin,1),Ee,502,0,[ZN,Dte])))}function VR(e){w0e(),QTe(this,Rt(Rr(Sw(e,24),uF)),Rt(Rr(e,uF)))}function H6n(e){return(e.k==(Fn(),Wi)||e.k==wr)&&wi(e,(me(),sx))}function G6n(e,n,t){return u(n==null?Ko(e.f,null,t):Bw(e.i,n,t),290)}function q6n(){return vr(),F(z(Yx,1),Ee,86,0,[nh,ru,Zc,eh,Vl])}function U6n(){return De(),F(z(xc,1),qu,64,0,[ju,Kn,et,bt,Vn])}function X6n(e){return GP(),function(){return Hyn(e,this,arguments)}}function PPe(e,n){var t;return t=n.jd(),new pw(t,e.e.pc(t,u(n.kd(),18)))}function $Pe(e,n){var t,i;return t=n.jd(),i=e.De(t),!!i&&Ku(i.e,n.kd())}function cc(e,n){var t,i;for(_n(n),i=e.Jc();i.Ob();)t=i.Pb(),n.Ad(t)}function ul(e,n,t){var i;return i=(kn(n,e.c.length),e.c[n]),e.c[n]=t,i}function Hae(e,n){var t,i;for(t=n,i=0;t>0;)i+=e.a[t],t-=t&-t;return i}function RPe(e,n){var t;for(t=n;t;)m2(e,-t.i,-t.j),t=Fi(t);return e}function K6n(e,n){var t;return t=e.a.get(n),t??se(Mr,On,1,0,5,1)}function Vv(e,n){return(F0(e),w9(new mn(e,new whe(n,e.a)))).zd(Sy)}function V6n(){return zr(),F(z(pve,1),Ee,363,0,[Xf,c1,eo,no,Pc])}function BPe(e){nYe(),VSe(this),this.a=new xi,x1e(this,e),Vt(this.a,e)}function zPe(){CK(this),this.b=new Se(Vi,Vi),this.a=new Se(Ir,Ir)}function oY(e){YR(),!Va&&(this.c=e,this.e=!0,this.a=new Oe)}function YR(){YR=Y,Va=!0,mnn=!1,vnn=!1,knn=!1,ynn=!1}function QR(){QR=Y,Vre=new Mse(bwe,0),C6e=new Mse("TARGET_WIDTH",1)}function Y6n(){return kz(),F(z(_sn,1),Ee,364,0,[Ore,Mre,Nre,Cre,Tre])}function Q6n(){return X2(),F(z(Ain,1),Ee,371,0,[nI,UJ,XJ,qJ,GJ])}function W6n(){return GE(),F(z(_4e,1),Ee,328,0,[D4e,Zie,ere,Ex,Sx])}function Z6n(){return Xs(),F(z(e5e,1),Ee,165,0,[fI,ax,V1,hx,Sg])}function e9n(){return tS(),F(z(Lln,1),Ee,369,0,[Q3,Jy,Hx,Jx,TI])}function n9n(){return GO(),F(z(F6e,1),Ee,330,0,[R6e,tce,z6e,ice,B6e])}function t9n(){return vh(),F(z(Wa,1),Ee,160,0,[Cn,fr,xa,Yd,Q1])}function i9n(){return u3(),F(z(eA,1),Ee,257,0,[wb,HI,g8e,Zx,w8e])}function sY(e,n){var t;return t=u($a(e.d,n),21),t||u($a(e.e,n),21)}function FPe(e){this.b=e,st.call(this,e),this.a=u(Xn(this.b.a,4),129)}function JPe(e){this.b=e,E4.call(this,e),this.a=u(Xn(this.b.a,4),129)}function HPe(e,n){this.c=0,this.b=n,uTe.call(this,e,17493),this.a=this.c}function Lf(e,n,t,i,r){YPe.call(this,n,i,r),this.c=e,this.b=t}function Gae(e,n,t,i,r){mLe.call(this,n,i,r),this.c=e,this.a=t}function qae(e,n,t,i,r){vLe.call(this,n,i,r),this.c=e,this.a=t}function Uae(e,n,t,i,r){YPe.call(this,n,i,r),this.c=e,this.a=t}function Xae(e,n,t){e.a.c.length=0,OPn(e,n,t),e.a.c.length==0||t_n(e,n)}function QT(e){e.i=0,uT(e.b,null),uT(e.c,null),e.a=null,e.e=null,++e.g}function r9n(e){return e.e=3,e.d=e.Yb(),e.e!=2?(e.e=0,!0):!1}function Kae(e,n){return X(n,144)?gn(e.c,u(n,144).c):!1}function GPe(e){var n;return e.c||(n=e.r,X(n,88)&&(e.c=u(n,29))),e.c}function Ms(e){return e.t||(e.t=new RSe(e),RE(new tAe(e),0,e.t)),e.t}function uc(e){return!e.c||!e.d?!1:!!e.c.i&&e.c.i==e.d.i}function B4(e,n){return n==0||e.e==0?e:n>0?aJe(e,n):WUe(e,-n)}function Vae(e,n){return n==0||e.e==0?e:n>0?WUe(e,n):aJe(e,-n)}function rt(e){if(ht(e))return e.c=e.a,e.a.Pb();throw R(new hu)}function qPe(e){var n;return n=e.length,gn(Rn.substr(Rn.length-n,n),e)}function UPe(e){var n,t;return n=e.c.i,t=e.d.i,n.k==(Fn(),wr)&&t.k==wr}function lY(e){var n,t,i;return n=e&Ls,t=e>>22&Ls,i=e<0?G1:0,_o(n,t,i)}function c9n(e,n){var t,i;t=u(Zkn(e.c,n),18),t&&(i=t.gc(),t.$b(),e.d-=i)}function u9n(e){e&&s8n((Coe(),yme)),--lJ,e&&fJ!=-1&&(qgn(fJ),fJ=-1)}function Yae(e){$gn.call(this,e==null?Vo:fu(e),X(e,80)?u(e,80):null)}function fY(e){var n;return n=new Ow,Pu(n,e),he(n,(Ie(),Wc),null),n}function aY(e,n,t){var i;return i=e.Fh(n),i>=0?e.Ih(i,t,!0):Xw(e,n,t)}function o9n(e,n,t){return ji(k4(w8(e),pc(n.b)),k4(w8(e),pc(t.b)))}function s9n(e,n,t){return ji(k4(w8(e),pc(n.e)),k4(w8(e),pc(t.e)))}function l9n(e,n){return k.Math.min(_0(n.a,e.d.d.c),_0(n.b,e.d.d.c))}function XPe(e,n,t){var i;i=new Vse(e.a),AE(i,e.a.a),Ko(i.f,n,t),e.a.a=i}function Qae(e,n,t,i){var r;for(r=0;rn)throw R(new jo(F0e(e,n,"index")));return e}function ehe(e){var n;return n=e.e+e.f,isNaN(n)&&V$(e.d)?e.d:n}function a9n(e,n){var t;t=e.q.getHours()+(n/60|0),e.q.setMinutes(n),sS(e,t)}function nhe(e,n){var t,i;return t=(_n(e),e),i=(_n(n),n),t==i?0:tn.p?-1:0}function t$e(e,n){return so(e.a,n)?(z4(e.a,n),!0):!1}function g9n(e){var n,t;return n=e.jd(),t=u(e.kd(),18),DT(t.Lc(),new n9(n))}function dY(e){var n;return n=e.b,n.b==0?null:u(Yu(n,0),65).b}function eB(e,n){return _n(n),e.c=0,"Initial capacity must not be negative")}function tB(){tB=Y,Gx=new ki("org.eclipse.elk.labels.labelManager")}function r$e(){r$e=Y,l3e=new Pi("separateLayerConnections",($B(),$te))}function da(){da=Y,Dm=new jse("REGULAR",0),ab=new jse("CRITICAL",1)}function eO(){eO=Y,nce=new Cse("FIXED",0),WH=new Cse("CENTER_NODE",1)}function iB(){iB=Y,b3e=new dse("QUADRATIC",0),Kte=new dse("SCANLINE",1)}function c$e(){c$e=Y,$in=Dt((vB(),F(z(y3e,1),Ee,350,0,[v3e,KJ,Vte])))}function u$e(){u$e=Y,Fin=Dt((tg(),F(z(zin,1),Ee,449,0,[iie,E7,L3])))}function o$e(){o$e=Y,Xin=Dt((e8(),F(z(die,1),Ee,302,0,[aie,hie,rI])))}function s$e(){s$e=Y,Kin=Dt(($0(),F(z(bie,1),Ee,329,0,[cI,B3e,ym])))}function l$e(){l$e=Y,Yin=Dt((_1(),F(z(Vin,1),Ee,315,0,[uI,$3,Ty])))}function f$e(){f$e=Y,Iin=Dt(($w(),F(z(Bte,1),Ee,368,0,[hp,ub,ap])))}function a$e(){a$e=Y,Jun=Dt((_E(),F(z(I4e,1),Ee,352,0,[Yie,N4e,AH])))}function h$e(){h$e=Y,Vun=Dt((Nc(),F(z(Kun,1),Ee,452,0,[Ax,ys,Io])))}function d$e(){d$e=Y,Yun=Dt((_B(),F(z(q4e,1),Ee,381,0,[H4e,cre,G4e])))}function b$e(){b$e=Y,Qun=Dt((DE(),F(z(U4e,1),Ee,348,0,[ore,ure,vI])))}function g$e(){g$e=Y,Wun=Dt((u8(),F(z(K4e,1),Ee,349,0,[sre,X4e,Mx])))}function w$e(){w$e=Y,Zun=Dt((mB(),F(z(Q4e,1),Ee,351,0,[Y4e,lre,V4e])))}function p$e(){p$e=Y,eon=Dt((LB(),F(z(W4e,1),Ee,382,0,[fre,L7,Im])))}function m$e(){m$e=Y,rsn=Dt((IE(),F(z(gye,1),Ee,385,0,[bye,dre,jI])))}function v$e(){v$e=Y,$sn=Dt((xO(),F(z(Hye,1),Ee,386,0,[JH,Fye,Jye])))}function y$e(){y$e=Y,rln=Dt((DB(),F(z(o6e,1),Ee,303,0,[$re,u6e,c6e])))}function k$e(){k$e=Y,cln=Dt((ez(),F(z(s6e,1),Ee,436,0,[$x,qH,Rre])))}function j$e(){j$e=Y,Dln=Dt((uB(),F(z(I6e,1),Ee,429,0,[Yre,N6e,O6e])))}function E$e(){E$e=Y,_ln=Dt((GB(),F(z(L6e,1),Ee,430,0,[D6e,_6e,Qre])))}function S$e(){S$e=Y,$ln=Dt((OO(),F(z(Wre,1),Ee,435,0,[VH,YH,QH])))}function x$e(){x$e=Y,fln=Dt((VB(),F(z(a6e,1),Ee,387,0,[f6e,qre,l6e])))}function A$e(){A$e=Y,ztn=Dt((kE(),F(z(wve,1),Ee,384,0,[Ste,Ete,xte])))}function M$e(){M$e=Y,jnn=Dt((zl(),F(z(Qo,1),Ee,130,0,[Kme,Yo,Vme])))}function C$e(){C$e=Y,Onn=Dt((wa(),F(z(dm,1),Ee,237,0,[Ou,No,Nu])))}function T$e(){T$e=Y,Inn=Dt((ws(),F(z(Nnn,1),Ee,461,0,[Oh,rb,qf])))}function O$e(){O$e=Y,_nn=Dt((Uo(),F(z(Dnn,1),Ee,462,0,[ja,cb,Uf])))}function N$e(){N$e=Y,Kfn=Dt((Ra(),F(z(t8e,1),Ee,279,0,[H7,Fm,G7])))}function I$e(){I$e=Y,dan=Dt((V4(),F(z(E8e,1),Ee,281,0,[j8e,Hm,gG])))}function D$e(){D$e=Y,Wfn=Dt((B1(),F(z(b8e,1),Ee,347,0,[lG,Wd,Wx])))}function _$e(){_$e=Y,fan=Dt((EE(),F(z(y8e,1),Ee,300,0,[qI,Tce,v8e])))}function ba(e,n){return!e.o&&(e.o=new os((Gu(),h1),Zd,e,0)),xQ(e.o,n)}function p9n(e){return!e.g&&(e.g=new G6),!e.g.d&&(e.g.d=new LSe(e)),e.g.d}function m9n(e){return!e.g&&(e.g=new G6),!e.g.b&&(e.g.b=new _Se(e)),e.g.b}function nO(e){return!e.g&&(e.g=new G6),!e.g.c&&(e.g.c=new $Se(e)),e.g.c}function v9n(e){return!e.g&&(e.g=new G6),!e.g.a&&(e.g.a=new PSe(e)),e.g.a}function y9n(e,n,t,i){return t&&(i=t.Oh(n,Ji(t.Ah(),e.c.sk()),null,i)),i}function k9n(e,n,t,i){return t&&(i=t.Qh(n,Ji(t.Ah(),e.c.sk()),null,i)),i}function bY(e,n,t,i){var r;return r=se($t,ni,30,n+1,15,1),$_n(r,e,n,t,i),r}function se(e,n,t,i,r,c){var o;return o=dHe(r,i),r!=10&&F(z(e,c),n,t,r,o),o}function j9n(e,n,t){var i,r;for(r=new W9(n,e),i=0;it||n=0?e.Ih(t,!0,!0):Xw(e,n,!0)}function tO(e,n){var t,i,r;return r=e.r,i=e.d,t=aS(e,n,!0),t.b!=r||t.a!=i}function R$e(e,n){return $Me(e.e,n)||ug(e.e,n,new $Je(n)),u($a(e.e,n),113)}function Cs(e,n,t,i){return _n(e),_n(n),_n(t),_n(i),new Bfe(e,n,new Fu)}function iO(e,n,t){var i,r;return r=(i=x8(e.b,n),i),r?Yz(lO(e,r),t):null}function R9n(e,n,t){var i,r,c;i=O1(e,t),r=null,i&&(r=I0e(i)),c=r,_Je(n,t,c)}function B9n(e,n,t){var i,r,c;i=O1(e,t),r=null,i&&(r=I0e(i)),c=r,_Je(n,t,c)}function os(e,n,t,i){this.$j(),this.a=n,this.b=e,this.c=new Lfe(this,n,t,i)}function mY(e,n,t,i,r,c){_ae.call(this,n,i,r,c),this.c=e,this.b=t}function rO(e,n,t,i,r,c){_ae.call(this,n,i,r,c),this.c=e,this.a=t}function ghe(e,n,t,i,r){FTe(this),this.b=e,this.d=n,this.f=t,this.g=i,this.c=r}function whe(e,n){D$.call(this,n.xd(),n.wd()&-16449),_n(e),this.a=e,this.c=n}function z9n(e,n){e.a.Le(n.d,e.b)>0&&(Te(e.c,new ofe(n.c,n.d,e.d)),e.b=n.d)}function vY(e){e.a=se($t,ni,30,e.b+1,15,1),e.c=se($t,ni,30,e.b,15,1),e.d=0}function F9n(e,n,t){var i;return i=Bze(e,n,t),e.b=new CB(i.c.length),Ibe(e,i)}function J9n(e){if(e.b<=0)throw R(new hu);return--e.b,e.a-=e.c.c,ke(e.a)}function H9n(e){var n;if(!e.a)throw R(new l_e);return n=e.a,e.a=Fi(e.a),n}function B$e(e){var n;if(e.ll())for(n=e.i-1;n>=0;--n)K(e,n);return $ae(e)}function J4(e){var n;return Nt(e),X(e,204)?(n=u(e,204),n):new t9(e)}function G9n(e){for(;!e.a;)if(!SNe(e.c,new Gke(e)))return!1;return!0}function phe(e,n){if(e.g==null||n>=e.i)throw R(new EK(n,e.i));return e.g[n]}function z$e(e,n,t){if(r8(e,t),t!=null&&!e.dk(t))throw R(new gX);return t}function yY(e,n){return aO(n)!=10&&F(Us(n),n.Qm,n.__elementTypeId$,aO(n),e),e}function F$e(e,n){var t,i;return i=n/e.c.Pd().gc()|0,t=n%e.c.Pd().gc(),F4(e,i,t)}function G9(e,n,t,i){var r;i=(Tw(),i||Fme),r=e.slice(n,t),J0e(r,e,n,t,-n,i)}function Pl(e,n,t,i,r){return n<0?Xw(e,t,i):u(t,69).uk().wk(e,e.ei(),n,i,r)}function q9n(e,n){return ji(ne(re(C(e,(me(),gp)))),ne(re(C(n,gp))))}function J$e(){J$e=Y,wnn=Dt((q9(),F(z(gJ,1),Ee,309,0,[fte,ate,hte,dte])))}function q9(){q9=Y,fte=new o$("All",0),ate=new MTe,hte=new BTe,dte=new CTe}function ws(){ws=Y,Oh=new UX(by,0),rb=new UX(H8,1),qf=new UX(gy,2)}function H$e(){H$e=Y,Uz(),b7e=Vi,yhn=Ir,g7e=new Zn(Vi),khn=new Zn(Ir)}function rB(){rB=Y,sfn=new yv,ffn=new tL,lfn=ckn((Xt(),Ece),sfn,bb,ffn)}function U9n(e){rB(),u(e.mf((Xt(),Rm)),182).Ec((ps(),GI)),e.of(Ece,null)}function X9n(e){return X(e,180)?""+u(e,180).a:e==null?null:fu(e)}function K9n(e){return X(e,180)?""+u(e,180).a:e==null?null:fu(e)}function mhe(e){var n,t;if(!e.b)return null;for(t=e.b;n=t.a[0];)t=n;return t}function G$e(e){var n,t;if(!e.b)return null;for(t=e.b;n=t.a[1];)t=n;return t}function cO(e){var n;for(n=e.p+1;n=0?sz(e,t,!0,!0):Xw(e,n,!0)}function e8n(e,n){A4(u(u(e.f,26).mf((Xt(),Vx)),102))&&XFe(iae(u(e.f,26)),n)}function mRe(e,n){Os(e,n==null||V$((_n(n),n))||isNaN((_n(n),n))?0:(_n(n),n))}function vRe(e,n){Ns(e,n==null||V$((_n(n),n))||isNaN((_n(n),n))?0:(_n(n),n))}function yRe(e,n){Pw(e,n==null||V$((_n(n),n))||isNaN((_n(n),n))?0:(_n(n),n))}function kRe(e,n){Lw(e,n==null||V$((_n(n),n))||isNaN((_n(n),n))?0:(_n(n),n))}function jRe(e){(this.q?this.q:(En(),En(),r1)).zc(e.q?e.q:(En(),En(),r1))}function xY(e,n,t){var i;return i=e.g[n],Qj(e,n,e.Xi(n,t)),e.Pi(n,t,i),e.Li(),i}function fB(e,n){var t;return t=e.bd(n),t>=0?(e.ed(t),!0):!1}function AY(e){var n;return e.d!=e.r&&(n=ff(e),e.e=!!n&&n.jk()==een,e.d=n),e.e}function MY(e,n){var t;for(Nt(e),Nt(n),t=!1;n.Ob();)t=t|e.Ec(n.Pb());return t}function $a(e,n){var t;return t=u(zn(e.e,n),393),t?(YTe(e,t),t.e):null}function ERe(e){var n,t;return n=e/60|0,t=e%60,t==0?""+n:""+n+":"+(""+t)}function lu(e,n){var t,i;return F0(e),i=new the(n,e.a),t=new jNe(i),new mn(e,t)}function L2(e,n){var t=e.a[n],i=(WY(),rte)[typeof t];return i?i(t):F1e(typeof t)}function n8n(e,n){var t,i,r;r=n.c.i,t=u(zn(e.f,r),60),i=t.d.c-t.e.c,Zhe(n.a,i,0)}function Vh(e,n,t){var i,r;for(i=10,r=0;r=0;)++n[0]}function CRe(e,n,t,i){ai(),bw.call(this,26),this.c=e,this.a=n,this.d=t,this.b=i}function L1(e,n,t,i,r,c,o){DY.call(this,n,i,r,c,o),this.c=e,this.b=t}function TRe(e){this.g=e,this.f=new Oe,this.a=k.Math.min(this.g.c.c,this.g.d.c)}function jE(){jE=Y,Wtn=new Ip,Ztn=new Dp,Ytn=new _p,Qtn=new Lp,ein=new xl}function aB(){aB=Y,yte=new fse("EADES",0),vJ=new fse("FRUCHTERMAN_REINGOLD",1)}function hO(){hO=Y,VJ=new bse("READING_DIRECTION",0),E3e=new bse("ROTATION",1)}function ORe(){ORe=Y,Min=Dt((X2(),F(z(Ain,1),Ee,371,0,[nI,UJ,XJ,qJ,GJ])))}function NRe(){NRe=Y,Gun=Dt((GE(),F(z(_4e,1),Ee,328,0,[D4e,Zie,ere,Ex,Sx])))}function IRe(){IRe=Y,Zin=Dt((Xs(),F(z(e5e,1),Ee,165,0,[fI,ax,V1,hx,Sg])))}function DRe(){DRe=Y,Lsn=Dt((kz(),F(z(_sn,1),Ee,364,0,[Ore,Mre,Nre,Cre,Tre])))}function _Re(){_Re=Y,Pln=Dt((tS(),F(z(Lln,1),Ee,369,0,[Q3,Jy,Hx,Jx,TI])))}function LRe(){LRe=Y,Jln=Dt((GO(),F(z(F6e,1),Ee,330,0,[R6e,tce,z6e,ice,B6e])))}function PRe(){PRe=Y,Gtn=Dt((zr(),F(z(pve,1),Ee,363,0,[Xf,c1,eo,no,Pc])))}function $Re(){$Re=Y,Ufn=Dt((vr(),F(z(Yx,1),Ee,86,0,[nh,ru,Zc,eh,Vl])))}function RRe(){RRe=Y,afn=Dt((vh(),F(z(Wa,1),Ee,160,0,[Cn,fr,xa,Yd,Q1])))}function BRe(){BRe=Y,tan=Dt((u3(),F(z(eA,1),Ee,257,0,[wb,HI,g8e,Zx,w8e])))}function zRe(){zRe=Y,can=Dt((De(),F(z(xc,1),qu,64,0,[ju,Kn,et,bt,Vn])))}function FRe(e){var n;return n=u(C(e,(me(),dp)),317),n?n.a==e:!1}function JRe(e){var n;return n=u(C(e,(me(),dp)),317),n?n.i==e:!1}function HRe(e,n){return _n(n),Ife(e),e.d.Ob()?(n.Ad(e.d.Pb()),!0):!1}function hB(e){return ao(e,oi)>0?oi:ao(e,Xr)<0?Xr:Rt(e)}function f8n(e,n){var t;return t=zw(e.e.c,n.e.c),t==0?ji(e.e.d,n.e.d):t}function TY(e,n){var t;return t=u(zn(e.a,n),150),t||(t=new Vg,ei(e.a,n,t)),t}function $f(e,n,t){var i;if(n==null)throw R(new c4);return i=O1(e,n),L6n(e,n,t),i}function a8n(e,n){var t,i;for(i=n.c,t=i+1;t<=n.f;t++)e.a[t]>e.a[i]&&(i=t);return i}function h8n(e,n,t){var i;return i=e.a.e[u(n.a,9).p]-e.a.e[u(t.a,9).p],lc($T(i))}function d8n(e,n,t){var i,r;for(r=new P(t);r.a0?n-1:n,pAe(lgn(hBe(dfe(new s4,t),e.n),e.j),e.k)}function y8n(e,n,t,i){var r;e.j=-1,nbe(e,D0e(e,n,t),(Tc(),r=u(n,69).tk(),r.vl(i)))}function KRe(e,n,t,i,r,c){var o;o=fY(i),fc(o,r),Gr(o,c),wn(e.a,i,new W$(o,n,t.f))}function dB(e,n){var t;return F0(e),t=new n_e(e,e.a.xd(),e.a.wd()|4,n),new mn(e,t)}function k8n(e,n){var t,i;return t=u(J2(e.d,n),18),t?(i=n,e.e.pc(i,t)):null}function Mn(e,n){var t;return t=(e.i==null&&kh(e),e.i),n>=0&&n=-.01&&e.a<=qa&&(e.a=0),e.b>=-.01&&e.b<=qa&&(e.b=0),e}function Yv(e){M8();var n,t;for(t=Fpe,n=0;nt&&(t=e[n]);return t}function j8n(e){var n;return n=ne(re(C(e,(Ie(),Ud)))),n<0&&(n=0,he(e,Ud,n)),n}function E8n(e,n){A4(u(C(u(e.e,9),(Ie(),Zi)),102))&&(En(),Tr(u(e.e,9).j,n))}function bB(e,n){var t,i;for(i=e.Jc();i.Ob();)t=u(i.Pb(),70),he(t,(me(),_y),n)}function S8n(e,n){var t,i,r;for(i=n.a.jd(),t=u(n.a.kd(),18).gc(),r=0;re||e>n)throw R(new Doe("fromIndex: 0, toIndex: "+e+Xge+n))}function WRe(e,n){Ei(e,(Qh(),Gre),n.f),Ei(e,lln,n.e),Ei(e,Hre,n.d),Ei(e,sln,n.c)}function Ao(e,n){var t,i,r,c;for(_n(n),i=e.c,r=0,c=i.length;r0&&(e.a/=n,e.b/=n),e}function ZRe(e,n,t){var i,r;i=n;do r=ne(e.p[i.p])+t,e.p[i.p]=r,i=e.a[i.p];while(i!=n)}function ol(e){var n;return e.w?e.w:(n=vyn(e),n&&!n.Sh()&&(e.w=n),n)}function Ahe(e,n){return Na(),Rf(Y0),k.Math.abs(e-n)<=Y0||e==n||isNaN(e)&&isNaN(n)}function I8n(e){var n;return e==null?null:(n=u(e,195),yMn(n,n.length))}function K(e,n){if(e.g==null||n>=e.i)throw R(new EK(n,e.i));return e.Ui(n,e.g[n])}function wa(){wa=Y,Ou=new qX("BEGIN",0),No=new qX(H8,1),Nu=new qX("END",2)}function Ra(){Ra=Y,H7=new pK(H8,0),Fm=new pK("HEAD",1),G7=new pK("TAIL",2)}function H4(){H4=Y,Osn=mh(mh(mh(Nj(new or,(ny(),Nx)),(uS(),hre)),oye),aye)}function P1(){P1=Y,Isn=mh(mh(mh(Nj(new or,(ny(),Dx)),(uS(),lye)),rye),sye)}function Qv(e,n){return bgn(ME(e,n,Rt(hc(e1,Xh(Rt(hc(n==null?0:Ni(n),n1)),15)))))}function Mhe(e,n){return Na(),Rf(Y0),k.Math.abs(e-n)<=Y0||e==n||isNaN(e)&&isNaN(n)}function X9(e,n){var t,i;i=e.a,t=djn(e,n,null),i!=n&&!e.e&&(t=_8(e,n,t)),t&&t.mj()}function D8n(e,n){var t;return t=Nr(pc(u(zn(e.g,n),8)),Use(u(zn(e.f,n),460).b)),t}function eBe(e,n,t){var i=function(){return e.apply(i,arguments)};return n.apply(i,t),i}function G4(e){var n;return tE(e==null||Array.isArray(e)&&(n=aO(e),!(n>=14&&n<=16))),e}function Che(e){e.b=(ws(),rb),e.f=(Uo(),cb),e.d=(sl(2,rm),new xo(2)),e.e=new Vr}function gB(e){this.b=(Nt(e),new bs(e)),this.a=new Oe,this.d=new Oe,this.e=new Vr}function nBe(e){return F0(e),C4(!0,"n may not be negative"),new mn(e,new yBe(e.a))}function _8n(e,n){En();var t,i;for(i=new Oe,t=0;t0?u(Pe(t.a,i-1),9):null}function Rf(e){if(!(e>=0))throw R(new qn("tolerance ("+e+") must be >= 0"));return e}function SE(){return oce||(oce=new DXe,K4(oce,F(z(xy,1),On,148,0,[new OC]))),oce}function mB(){mB=Y,Y4e=new uK("NO",0),lre=new uK(bwe,1),V4e=new uK("LOOK_BACK",2)}function Nc(){Nc=Y,Ax=new tK(yS,0),ys=new tK("INPUT",1),Io=new tK("OUTPUT",2)}function vB(){vB=Y,v3e=new VX("ARD",0),KJ=new VX("MSD",1),Vte=new VX("MANUAL",2)}function F8n(){return YO(),F(z(j3e,1),Ee,267,0,[Wte,k3e,eie,nie,Zte,tie,iI,Qte,Yte])}function J8n(){return WO(),F(z(O4e,1),Ee,268,0,[Vie,M4e,C4e,Xie,A4e,T4e,xH,Uie,Kie])}function H8n(){return _s(),F(z(k8e,1),Ee,266,0,[X7,VI,aG,rA,hG,bG,dG,Oce,KI])}function G8n(){kMe();for(var e=Kne,n=0;nt)throw R(new k2(n,t));return new Xle(e,n)}function yB(e){var n,t;for(t=e.c.Bc().Jc();t.Ob();)n=u(t.Pb(),18),n.$b();e.c.$b(),e.d=0}function q8n(e){var n,t,i,r;for(t=e.a,i=0,r=t.length;i=0),CEn(e.d,e.c)<0&&(e.a=e.a-1&e.d.a.length-1,e.b=e.d.c),e.c=-1}function yBe(e){D$.call(this,e.yd(64)?Gse(0,lf(e.xd(),1)):bN,e.wd()),this.b=1,this.a=e}function kBe(){cle.call(this),this.n=-1,this.g=null,this.i=null,this.j=null,this.Bb|=Gf}function jBe(e,n,t,i){this.$j(),this.a=n,this.b=e,this.c=null,this.c=new mNe(this,n,t,i)}function DY(e,n,t,i,r){this.d=e,this.n=n,this.g=t,this.o=i,this.p=-1,r||(this.o=-2-i-1)}function EBe(e){Woe(),this.g=new wt,this.f=new wt,this.b=new wt,this.c=new Nw,this.i=e}function $he(){this.f=new Vr,this.d=new moe,this.c=new Vr,this.a=new Oe,this.b=new Oe}function X8n(e){var n,t;for(t=new P(vHe(e));t.a=0}function Rhe(){Rhe=Y,son=qt(qt(qt(new or,(zr(),Xf),(Ur(),N3)),c1,pm),eo,wm)}function SBe(){SBe=Y,lon=qt(qt(qt(new or,(zr(),Xf),(Ur(),N3)),c1,pm),eo,wm)}function Bhe(){Bhe=Y,fon=qt(qt(qt(new or,(zr(),Xf),(Ur(),N3)),c1,pm),eo,wm)}function xBe(){xBe=Y,aon=qt(qt(qt(new or,(zr(),Xf),(Ur(),N3)),c1,pm),eo,wm)}function ABe(){ABe=Y,hon=qt(qt(qt(new or,(zr(),Xf),(Ur(),N3)),c1,pm),eo,wm)}function MBe(){MBe=Y,don=qt(qt(qt(new or,(zr(),Xf),(Ur(),N3)),c1,pm),eo,wm)}function CBe(){CBe=Y,won=Eo(qt(qt(new or,(zr(),eo),(Ur(),_J)),no,TJ),Pc,DJ)}function TBe(){TBe=Y,nnn=F(z($t,1),ni,30,15,[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15])}function zhe(e,n){var t;t=e.b,e.b=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,0,t,e.b))}function Fhe(e,n){var t;t=e.c,e.c=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,1,t,e.c))}function _Y(e,n){var t;t=e.c,e.c=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,4,t,e.c))}function Jhe(e,n){var t;t=e.c,e.c=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,1,t,e.c))}function Hhe(e,n){var t;t=e.d,e.d=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,1,t,e.d))}function V9(e,n){var t;t=e.k,e.k=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,2,t,e.k))}function LY(e,n){var t;t=e.D,e.D=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,2,t,e.D))}function EB(e,n){var t;t=e.f,e.f=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,8,t,e.f))}function SB(e,n){var t;t=e.i,e.i=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,7,t,e.i))}function Ghe(e,n){var t;t=e.a,e.a=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,8,t,e.a))}function qhe(e,n){var t;t=e.b,e.b=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,0,t,e.b))}function Y8n(e,n,t){var i;e.b=n,e.a=t,i=(e.a&512)==512?new Lxe:new pC,e.c=MIn(i,e.b,e.a)}function OBe(e,n){return J1(e.e,n)?(Tc(),AY(n)?new uR(n,e):new vT(n,e)):new tTe(n,e)}function Q8n(e){var n,t;return 0>e?new Yoe:(n=e+1,t=new HPe(n,e),new Ale(null,t))}function W8n(e,n){En();var t;return t=new b4(1),$r(e)?Kc(t,e,n):Ko(t.f,e,n),new aX(t)}function Z8n(e,n){var t;t=new Kg,u(n.b,68),u(n.b,68),u(n.b,68),Ao(n.a,new ife(e,t,n))}function NBe(e,n){var t;return X(n,8)?(t=u(n,8),e.a==t.a&&e.b==t.b):!1}function e7n(e){var n;return n=C(e,(me(),mi)),X(n,174)?WFe(u(n,174)):null}function IBe(e){var n;return e=k.Math.max(e,2),n=b1e(e),e>n?(n<<=1,n>0?n:gS):n}function PY(e){switch(ile(e.e!=3),e.e){case 2:return!1;case 0:return!0}return r9n(e)}function Uhe(e){var n;return e.b==null?(Ed(),Ed(),iD):(n=e.sl()?e.rl():e.ql(),n)}function DBe(e,n){var t,i;for(i=n.vc().Jc();i.Ob();)t=u(i.Pb(),45),zO(e,t.jd(),t.kd())}function Xhe(e,n){var t;t=e.d,e.d=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,11,t,e.d))}function xB(e,n){var t;t=e.j,e.j=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,13,t,e.j))}function Khe(e,n){var t;t=e.b,e.b=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,21,t,e.b))}function Vhe(e,n){e.r>0&&e.c0&&e.g!=0&&Vhe(e.i,n/e.r*e.i.d))}function _Be(e,n,t){var i,r,c;for(c=e.a.length-1,r=e.b,i=0;i0?1:0:(!e.c&&(e.c=XT(Lu(e.f))),e.c).e}function GBe(e,n){n?e.B==null&&(e.B=e.D,e.D=null):e.B!=null&&(e.D=e.B,e.B=null)}function c7n(e,n){n.Tg(yQe,1),er(lu(new mn(null,new vn(e.b,16)),new Wg),new kD),n.Ug()}function FY(e,n,t,i,r,c){var o;this.c=e,o=new Oe,_de(e,o,n,e.b,t,i,r,c),this.a=new qr(o,0)}function rr(e,n,t,i,r,c,o,l,f,h,b,p,y){return uqe(e,n,t,i,r,c,o,l,f,h,b,p,y),mQ(e,!1),e}function u7n(e,n){typeof window===fN&&typeof window.$gwt===fN&&(window.$gwt[e]=n)}function o7n(e,n,t){var i,r,c;for(i=0,r=0;r>>31;i!=0&&(e[t]=i)}function s7n(e,n,t){t.Tg("DFS Treeifying phase",1),mEn(e,n),VNn(e,n),e.a=null,e.b=null,t.Ug()}function l7n(e,n){var t;n.Tg("General Compactor",1),t=eEn(u(je(e,(q0(),_re)),386)),t.Bg(e)}function f7n(e,n){var t,i;return t=u(je(e,(q0(),HH)),15),i=u(je(n,HH),15),oo(t.a,i.a)}function Zhe(e,n,t){var i,r;for(r=St(e,0);r.b!=r.d.c;)i=u(jt(r),8),i.a+=n,i.b+=t;return e}function a7n(e,n,t,i){var r;r=new l4,Xb(r,"x",vz(e,n,i.a)),Xb(r,"y",yz(e,n,i.b)),D4(t,r)}function h7n(e,n,t,i){var r;r=new l4,Xb(r,"x",vz(e,n,i.a)),Xb(r,"y",yz(e,n,i.b)),D4(t,r)}function d7n(){return X0(),F(z(B4e,1),Ee,243,0,[CH,pI,mI,P4e,$4e,L4e,R4e,TH,_7,xx])}function b7n(){return Ic(),F(z(fie,1),Ee,261,0,[ZJ,Kl,ux,eH,A7,P3,ox,S7,x7,nH])}function JY(){JY=Y,lA=new Oxe,Fce=F(z(ns,1),M3,179,0,[]),Wan=F(z(yf,1),ime,62,0,[])}function q4(){q4=Y,Pte=new Pi("edgelabelcenterednessanalysis.includelabel",($n(),ib))}function qBe(e,n){return ne(re(Js(CO(So(new mn(null,new vn(e.c.b,16)),new Qje(e)),n))))}function e1e(e,n){return ne(re(Js(CO(So(new mn(null,new vn(e.c.b,16)),new Yje(e)),n))))}function Ni(e){return $r(e)?Id(e):g2(e)?v4(e):b2(e)?qOe(e):Tfe(e)?e.Hb():Sfe(e)?jw(e):aae(e)}function UBe(e,n){return Na(),Rf(qa),k.Math.abs(0-n)<=qa||n==0||isNaN(0)&&isNaN(n)?0:e/n}function g7n(e,n){return n8(),e==fp&&n==bm||e==fp&&n==O3||e==gm&&n==O3||e==gm&&n==bm}function w7n(e,n){return n8(),e==fp&&n==gm||e==gm&&n==fp||e==O3&&n==bm||e==bm&&n==O3}function ss(){ss=Y,Ave=new k5,Sve=new a0,xve=new _h,Eve=new uk,Mve=new NA,Cve=new j5}function p7n(e){var n;return n=FR(e),Gj(n.a,0)?(WP(),WP(),bnn):(WP(),new SOe(n.b))}function HY(e){var n;return n=Iae(e),Gj(n.a,0)?(f2(),f2(),lte):(f2(),new $K(n.b))}function GY(e){var n;return n=Iae(e),Gj(n.a,0)?(f2(),f2(),lte):(f2(),new $K(n.c))}function m7n(e){return e.b.c.i.k==(Fn(),wr)?u(C(e.b.c.i,(me(),mi)),12):e.b.c}function XBe(e){return e.b.d.i.k==(Fn(),wr)?u(C(e.b.d.i,(me(),mi)),12):e.b.d}function KBe(e){switch(e.g){case 2:return De(),Vn;case 4:return De(),et;default:return e}}function VBe(e){switch(e.g){case 1:return De(),bt;case 3:return De(),Kn;default:return e}}function v7n(e,n){var t;return t=m0e(e),V0e(new Se(t.c,t.d),new Se(t.b,t.a),e.Kf(),n,e.$f())}function y7n(e,n){n.Tg(yQe,1),ode(xgn(new OP((Mj(),new DV(e,!1,!1,new ck))))),n.Ug()}function n1e(){n1e=Y,pon=mh(oTe(qt(qt(new or,(zr(),eo),(Ur(),_J)),no,TJ),Pc),DJ)}function YBe(){YBe=Y,kon=mh(oTe(qt(qt(new or,(zr(),eo),(Ur(),_J)),no,TJ),Pc),DJ)}function QBe(e,n,t){this.g=e,this.d=n,this.e=t,this.a=new Oe,fTn(this),En(),Tr(this.a,null)}function Bl(e,n,t,i,r,c,o){Ot.call(this,e,n),this.d=t,this.e=i,this.c=r,this.b=c,this.a=Pf(o)}function t1e(e){this.i=e.gc(),this.i>0&&(this.g=this.$i(this.i+(this.i/8|0)+1),e.Oc(this.g))}function AE(e,n){var t,i;for(_n(n),i=n.vc().Jc();i.Ob();)t=u(i.Pb(),45),e.yc(t.jd(),t.kd())}function k7n(e,n,t){var i;for(i=t.Jc();i.Ob();)if(!qR(e,n,i.Pb()))return!1;return!0}function ME(e,n,t){var i;for(i=e.b[t&e.f];i;i=i.b)if(t==i.a&&C1(n,i.g))return i;return null}function CE(e,n,t){var i;for(i=e.c[t&e.f];i;i=i.d)if(t==i.f&&C1(n,i.i))return i;return null}function j7n(e,n){var t;for(Nt(n);e.Ob();)if(t=e.Pb(),!u1e(u(t,9)))return!1;return!0}function E7n(e,n,t,i,r){var c;return t&&(c=Ji(n.Ah(),e.c),r=t.Oh(n,-1-(c==-1?i:c),null,r)),r}function S7n(e,n,t,i,r){var c;return t&&(c=Ji(n.Ah(),e.c),r=t.Qh(n,-1-(c==-1?i:c),null,r)),r}function WBe(e){var n;if(e.b==-2){if(e.e==0)n=-1;else for(n=0;e.a[n]==0;n++);e.b=n}return e.b}function x7n(e){var n,t,i;return e.j==(De(),Kn)&&(n=Zqe(e),t=cs(n,et),i=cs(n,Vn),i||i&&t)}function A7n(e){var n,t,i;for(i=0,t=new P(e.b);t.ar&&n.ac&&n.br?t=r:Qn(n,t+1),e.a=of(e.a,0,n)+(""+i)+qfe(e.a,t)}function ZBe(e,n,t,i){X(e.Cb,184)&&(u(e.Cb,184).tb=null),Mo(e,t),n&&ATn(e,n),i&&e.el(!0)}function T7n(e,n){var t,i;for(i=new P(n.b);i.a1||e.Ob())return++e.a,e.g=0,n=e.i,e.Ob(),n;throw R(new hu)}function $7n(e,n){var t,i;for(i=new P(n);i.a>22),r=e.h+n.h+(i>>22),_o(t&Ls,i&Ls,r&G1)}function Aze(e,n){var t,i,r;return t=e.l-n.l,i=e.m-n.m+(t>>22),r=e.h-n.h+(i>>22),_o(t&Ls,i&Ls,r&G1)}function QY(e){var n,t,i,r;for(r=new Oe,i=e.Jc();i.Ob();)t=u(i.Pb(),26),n=W2(t),Sr(r,n);return r}function tkn(e){var n;Bd(e,!0),n=zd,wi(e,(Ie(),N7))&&(n+=u(C(e,N7),15).a),he(e,N7,ke(n))}function Mze(e,n,t){var i;Hu(e.a),Ao(t.i,new YEe(e)),i=new P$(u(zn(e.a,n.b),68)),SJe(e,i,n),t.f=i}function l1e(e){var n,t;return t=(j0(),n=new yo,n),e&&Et((!e.a&&(e.a=new we($i,e,6,6)),e.a),t),t}function U4(e,n){var t,i;if(i=0,e<64&&e<=n)for(n=n<64?n:63,t=e;t<=n;t++)i=bh(i,qh(1,t));return i}function ikn(e,n){var t,i;for(NR(n,"predicate"),i=0;e.Ob();i++)if(t=e.Pb(),n.Lb(t))return i;return-1}function f1e(e,n){if(n===0){!e.o&&(e.o=new os((Gu(),h1),Zd,e,0)),e.o.c.$b();return}pW(e,n)}function Cze(e){switch(e.g){case 1:return gb;case 2:return l1;case 3:return FI;default:return JI}}function a1e(e){En();var n,t,i;for(i=0,t=e.Jc();t.Ob();)n=t.Pb(),i=i+(n!=null?Ni(n):0),i=i|0;return i}function rkn(e){var n;return n=new xn,n.a=e,n.b=fkn(e),n.c=se(He,Me,2,2,6,1),n.c[0]=HBe(e),n.c[1]=HBe(e),n}function $B(){$B=Y,$te=new h$(va,0),JJ=new h$(EQe,1),HJ=new h$(SQe,2),eI=new h$("BOTH",3)}function n8(){n8=Y,fp=new f$("Q1",0),gm=new f$("Q4",1),bm=new f$("Q2",2),O3=new f$("Q3",3)}function $0(){$0=Y,cI=new ZX("ONLY_WITHIN_GROUP",0),B3e=new ZX(eee,1),ym=new ZX("ENFORCED",2)}function tg(){tg=Y,iie=new QX(va,0),E7=new QX("INCOMING_ONLY",1),L3=new QX("OUTGOING_ONLY",2)}function X4(){X4=Y,ofn=new BM,ufn=new Z_}function WY(){WY=Y,rte={boolean:ygn,number:Ibn,string:Dbn,object:lqe,function:lqe,undefined:abn}}function Tze(){Tze=Y,qun=Dt((X0(),F(z(B4e,1),Ee,243,0,[CH,pI,mI,P4e,$4e,L4e,R4e,TH,_7,xx])))}function Oze(){Oze=Y,Uin=Dt((Ic(),F(z(fie,1),Ee,261,0,[ZJ,Kl,ux,eH,A7,P3,ox,S7,x7,nH])))}function ckn(e,n,t,i){return new rse(F(z(yg,1),tF,45,0,[(qQ(e,n),new pw(e,n)),(qQ(t,i),new pw(t,i))]))}function ukn(e,n){var t,i;return t=u(u(zn(e.g,n.a),49).a,68),i=u(u(zn(e.g,n.b),49).a,68),vKe(t,i)}function h1e(e,n,t){var i;if(i=e.gc(),n>i)throw R(new k2(n,i));return e.Qi()&&(t=F_e(e,t)),e.Ci(n,t)}function Nze(e){var n,t,i;return t=e.n,i=e.o,n=e.d,new _f(t.a-n.b,t.b-n.d,i.a+(n.b+n.c),i.b+(n.d+n.a))}function okn(e,n){return!e||!n||e==n?!1:zw(e.b.c,n.b.c+n.b.b)<0&&zw(n.b.c,e.b.c+e.b.b)<0}function ZY(e,n,t){return e>=128?!1:e<64?qj(Rr(qh(1,e),t),0):qj(Rr(qh(1,e-64),n),0)}function EO(e,n,t){switch(t.g){case 2:e.b=n;break;case 1:e.c=n;break;case 4:e.d=n;break;case 3:e.a=n}}function SO(e,n,t){return t==null?(!e.q&&(e.q=new wt),z4(e.q,n)):(!e.q&&(e.q=new wt),ei(e.q,n,t)),e}function he(e,n,t){return t==null?(!e.q&&(e.q=new wt),z4(e.q,n)):(!e.q&&(e.q=new wt),ei(e.q,n,t)),e}function Ize(e){var n,t;return t=new WR,Pu(t,e),he(t,(L0(),My),e),n=new wt,nLn(e,t,n),I$n(e,t,n),t}function skn(e){M8();var n,t,i;for(t=se(Lr,Me,8,2,0,1),i=0,n=0;n<2;n++)i+=.5,t[n]=FSn(i,e);return t}function Dze(e,n){var t,i,r,c;for(t=!1,i=e.a[n].length,c=0;ce.f,t=e.u+e.e[e.o.p]*e.d>e.f*e.s*e.d,n||t}function d1e(e){var n;return(!e.c||(e.Bb&1)==0&&(e.c.Db&64)!=0)&&(n=ff(e),X(n,88)&&(e.c=u(n,29))),e.c}function b1e(e){var n;if(e<0)return Xr;if(e==0)return 0;for(n=gS;(n&e)==0;n>>=1);return n}function fkn(e){var n;return e==0?"Etc/GMT":(e<0?(e=-e,n="Etc/GMT-"):n="Etc/GMT+",n+ERe(e))}function Lze(e){var n,t;return t=KO(e.h),t==32?(n=KO(e.m),n==32?KO(e.l)+32:n+20-10):t-12}function eQ(e){var n,t,i;n=~e.l+1&Ls,t=~e.m+(n==0?1:0)&Ls,i=~e.h+(n==0&&t==0?1:0)&G1,e.l=n,e.m=t,e.h=i}function OE(e){var n;return n=e.a[e.b],n==null?null:(ir(e.a,e.b,null),e.b=e.b+1&e.a.length-1,n)}function g1e(){this.o=null,this.k=null,this.j=null,this.d=null,this.b=null,this.n=null,this.a=null}function w1e(e,n){this.c=e,this.d=n,this.b=this.d/this.c.c.Pd().gc()|0,this.a=this.d%this.c.c.Pd().gc()}function Pze(e,n){this.b=e,Pv.call(this,(u(K(ge((C0(),Bn).o),10),19),n.i),n.g),this.a=(JY(),Fce)}function p1e(e,n,t){this.q=new k.Date,this.q.setFullYear(e+Q0,n,t),this.q.setHours(0,0,0,0),sS(this,0)}function $ze(e,n,t){var i,r;return i=new pY(n,t),r=new si,e.b=tXe(e,e.b,i,r),r.b||++e.c,e.b.b=!1,r.d}function m1e(e,n){En();var t,i,r,c,o;for(o=!1,i=n,r=0,c=i.length;ro||i+r>c)throw R(new soe)}function Rze(e,n,t){var i,r,c,o;for(o=PE(n,t),c=0,r=o.Jc();r.Ob();)i=u(r.Pb(),12),ei(e.c,i,ke(c++))}function R0(e){var n,t;for(t=new P(e.a.b);t.a=0,"Negative initial capacity"),LT(n>=0,"Non-positive load factor"),Hu(this)}function Hze(e,n){var t;for(t=0;t1||n>=0&&e.b<3)}function vkn(){ai();var e;return Xce||(e=wpn(K0("M",!0)),e=dR(K0("M",!1),e),Xce=e,Xce)}function Uze(e){if(e.g===0)return new R6;throw R(new qn(BF+(e.f!=null?e.f:""+e.g)))}function Xze(e){if(e.g===0)return new W_;throw R(new qn(BF+(e.f!=null?e.f:""+e.g)))}function E1e(e,n,t){if(n===0){!e.o&&(e.o=new os((Gu(),h1),Zd,e,0)),NB(e.o,t);return}yW(e,n,t)}function tQ(e,n,t){this.g=e,this.e=new Vr,this.f=new Vr,this.d=new xi,this.b=new xi,this.a=n,this.c=t}function iQ(e,n,t,i){this.b=new Oe,this.n=new Oe,this.i=i,this.j=t,this.s=e,this.t=n,this.r=0,this.d=0}function Kze(e,n,t,i){this.b=new wt,this.g=new wt,this.d=(_E(),AH),this.c=e,this.e=n,this.d=t,this.a=i}function r8(e,n){if(!e.Ji()&&n==null)throw R(new qn("The 'no null' constraint is violated"));return n}function S1e(e){switch(e.g){case 1:return qQe;default:case 2:return 0;case 3:return UQe;case 4:return zpe}}function ykn(e){return Te(e.c,(X4(),ofn)),Ahe(e.a,ne(re(Le((SQ(),SH)))))?new QM:new tSe(e)}function kkn(e){for(;!e.d||!e.d.Ob();)if(e.b&&!jj(e.b))e.d=u(N4(e.b),50);else return null;return e.d}function Id(e){var n,t;for(n=0,t=0;ti?1:0}function Vze(e,n){var t,i,r;for(r=e.b;r;){if(t=e.a.Le(n,r.d),t==0)return r;i=t<0?0:1,r=r.a[i]}return null}function rQ(e,n){var t;return n===e?!0:X(n,229)?(t=u(n,229),gi(e.Zb(),t.Zb())):!1}function x1e(e,n){return zUe(e,n)?(wn(e.b,u(C(n,(me(),K1)),22),n),Vt(e.a,n),!0):!1}function Skn(e,n){return wi(e,(me(),Oi))&&wi(n,Oi)?u(C(n,Oi),15).a-u(C(e,Oi),15).a:0}function xkn(e,n){return wi(e,(me(),Oi))&&wi(n,Oi)?u(C(e,Oi),15).a-u(C(n,Oi),15).a:0}function Yze(e){return Va?se(pnn,IYe,567,0,0,1):u(Ba(e.a,se(pnn,IYe,567,e.a.c.length,0,1)),840)}function Us(e){return $r(e)?He:g2(e)?gr:b2(e)?Qi:Tfe(e)||Sfe(e)?e.Pm:e.Pm||Array.isArray(e)&&z(Ven,1)||Ven}function i3(e,n,t){var i,r;return r=(i=new yX,i),Fc(r,n,t),Et((!e.q&&(e.q=new we(yf,e,11,10)),e.q),r),r}function cQ(e){var n,t,i,r;for(r=Pgn(Can,e),t=r.length,i=se(He,Me,2,t,6,1),n=0;n=e.b.c.length||(A1e(e,2*n+1),t=2*n+2,t0&&(n.Ad(t),t.i&&ZEn(t))}function M1e(e,n,t){var i;for(i=t-1;i>=0&&e[i]===n[i];i--);return i<0?0:HX(Rr(e[i],Dc),Rr(n[i],Dc))?-1:1}function Mkn(e,n){var t;return!e||e==n||!wi(n,(me(),bp))?!1:(t=u(C(n,(me(),bp)),9),t!=e)}function uQ(e){switch(e.i){case 2:return!0;case 1:return!1;case-1:++e.c;default:return e.Yl()}}function Qze(e,n,t){return e.d[n.p][t.p]||(kSn(e,n,t),e.d[n.p][t.p]=!0,e.d[t.p][n.p]=!0),e.a[n.p][t.p]}function Wze(e,n,t){var i,r;this.g=e,this.c=n,this.a=this,this.d=this,r=IBe(t),i=se(Xen,gN,227,r,0,1),this.b=i}function Ckn(e,n){var t,i;for(i=e.Zb().Bc().Jc();i.Ob();)if(t=u(i.Pb(),18),t.Gc(n))return!0;return!1}function Zze(e,n,t){var i,r,c,o;for(_n(t),o=!1,c=e.dd(n),r=t.Jc();r.Ob();)i=r.Pb(),c.Rb(i),o=!0;return o}function oQ(e,n){var t,i;return i=u(Xn(e.a,4),129),t=se(Bce,_ne,415,n,0,1),i!=null&&Wu(i,0,t,0,i.length),t}function eFe(e,n){var t;return t=new DW((e.f&256)!=0,e.i,e.a,e.d,(e.f&16)!=0,e.j,e.g,n),e.e!=null||(t.c=e),t}function Tkn(e,n){var t;return e===n?!0:X(n,92)?(t=u(n,92),T0e(Fb(e),t.vc())):!1}function nFe(e,n,t){var i,r;for(r=t.Jc();r.Ob();)if(i=u(r.Pb(),45),e.ze(n,i.kd()))return!0;return!1}function RB(){RB=Y,Dce=new M$("ELK",0),I8e=new M$("JSON",1),N8e=new M$("DOT",2),D8e=new M$("SVG",3)}function NE(){NE=Y,xre=new v$(eee,0),zH=new v$(VQe,1),Sre=new v$("FAN",2),Ere=new v$("CONSTRAINT",3)}function IE(){IE=Y,bye=new lK(va,0),dre=new lK("MIDDLE_TO_MIDDLE",1),jI=new lK("AVOID_OVERLAP",2)}function xO(){xO=Y,JH=new fK(va,0),Fye=new fK("RADIAL_COMPACTION",1),Jye=new fK("WEDGE_COMPACTION",2)}function DE(){DE=Y,ore=new rK("STACKED",0),ure=new rK("REVERSE_STACKED",1),vI=new rK("SEQUENCED",2)}function zl(){zl=Y,Kme=new GX("CONCURRENT",0),Yo=new GX("IDENTITY_FINISH",1),Vme=new GX("UNORDERED",2)}function B1(){B1=Y,lG=new mK(L2e,0),Wd=new mK("INCLUDE_CHILDREN",1),Wx=new mK("SEPARATE_CHILDREN",2)}function BB(){BB=Y,d8e=new yw(15),Qfn=new Yr((Xt(),s1),d8e),Qx=Uy,l8e=jfn,f8e=Ig,h8e=n5,a8e=$m}function sQ(){sQ=Y,Mte=__e(F(z(Yx,1),Ee,86,0,[(vr(),Zc),ru])),Cte=__e(F(z(Yx,1),Ee,86,0,[Vl,eh]))}function Okn(e){var n,t,i;for(n=0,i=se(Lr,Me,8,e.b,0,1),t=St(e,0);t.b!=t.d.c;)i[n++]=u(jt(t),8);return i}function lQ(e,n,t){var i,r,c;for(i=new xi,c=St(t,0);c.b!=c.d.c;)r=u(jt(c),8),Vt(i,new wc(r));Zze(e,n,i)}function Nkn(e,n){var t;t=Le((SQ(),SH))!=null&&n.Rg()!=null?ne(re(n.Rg()))/ne(re(Le(SH))):1,ei(e.b,n,t)}function Ikn(e,n){var t,i;return t=u(e.d.Ac(n),18),t?(i=e.e.hc(),i.Fc(t),e.e.d-=t.gc(),t.$b(),i):null}function C1e(e,n){var t,i;if(i=e.c[n],i!=0)for(e.c[n]=0,e.d-=i,t=n+1;t0)return N9(n-1,e.a.c.length),Cd(e.a,n-1);throw R(new exe)}function Dkn(e,n,t){if(n<0)throw R(new jo(bWe+n));nn)throw R(new qn(oF+e+DYe+n));if(e<0||n>t)throw R(new Doe(oF+e+Yge+n+Xge+t))}function iFe(e){if(!e.a||(e.a.i&8)==0)throw R(new Uc("Enumeration class expected for layout option "+e.f))}function rFe(e){B_e.call(this,"The given string does not match the expected format for individual spacings.",e)}function cFe(e){switch(e.i){case-2:return!0;case-1:return!1;case 1:--e.c;default:return e.Zl()}}function Dd(e){switch(e.c){case 0:return cV(),mme;case 1:return new r4(pqe(new d4(e)));default:return new Xxe(e)}}function uFe(e){switch(e.gc()){case 0:return cV(),mme;case 1:return new r4(e.Jc().Pb());default:return new cse(e)}}function O1e(e){var n;return n=(!e.a&&(e.a=new we(ed,e,9,5)),e.a),n.i!=0?_gn(u(K(n,0),684)):null}function _kn(e,n){var t;return t=mc(e,n),HX(QV(e,n),0)|N$(QV(e,t),0)?t:mc(bN,QV(Hb(t,63),1))}function N1e(e,n,t){var i,r;return N2(n,e.c.length),i=t.Nc(),r=i.length,r==0?!1:(sfe(e.c,n,i),!0)}function Lkn(e,n){var t,i;for(t=e.a.length-1;n!=e.b;)i=n-1&t,ir(e.a,n,e.a[i]),n=i;ir(e.a,e.b,null),e.b=e.b+1&t}function Pkn(e,n){var t,i;for(t=e.a.length-1,e.c=e.c-1&t;n!=e.c;)i=n+1&t,ir(e.a,n,e.a[i]),n=i;ir(e.a,e.c,null)}function c8(e,n){e.D==null&&e.B!=null&&(e.D=e.B,e.B=null),LY(e,n==null?null:(_n(n),n)),e.C&&e.fl(null)}function r3(e){return(e.c!=e.b.b||e.i!=e.g.b)&&(r2(e.a.c,0),Sr(e.a,e.b),Sr(e.a,e.g),e.c=e.b.b,e.i=e.g.b),e.a}function F2(e){var n;++e.j,e.i==0?e.g=null:e.ir&&(WHe(n.q,r),i=t!=n.q.d)),i}function gFe(e,n){var t,i,r,c,o,l,f,h;return f=n.i,h=n.j,i=e.f,r=i.i,c=i.j,o=f-r,l=h-c,t=k.Math.sqrt(o*o+l*l),t}function _1e(e,n){var t,i;return i=iz(e),i||(t=(eZ(),wUe(n)),i=new GSe(t),Et(i.Cl(),e)),i}function AO(e,n){var t,i;return t=u(e.c.Ac(n),18),t?(i=e.hc(),i.Fc(t),e.d-=t.gc(),t.$b(),e.mc(i)):e.jc()}function Jkn(e){var n;if(!(e.c.c<0?e.a>=e.c.b:e.a<=e.c.b))throw R(new hu);return n=e.a,e.a+=e.c.c,++e.b,ke(n)}function Hkn(e){var n,t;if(e==null)return!1;for(n=0,t=e.length;n=i||n=0?n:-n;i>0;)i%2==0?(t*=t,i=i/2|0):(r*=t,i-=1);return n<0?1/r:r}function Qkn(e,n){var t,i,r;for(r=1,t=e,i=n>=0?n:-n;i>0;)i%2==0?(t*=t,i=i/2|0):(r*=t,i-=1);return n<0?1/r:r}function z0(e,n){var t,i,r,c;return c=(r=e?iz(e):null,sqe((i=n,r&&r.El(),i))),c==n&&(t=iz(e),t&&t.El()),c}function P1e(e,n,t){var i,r;return r=e.a,e.a=n,(e.Db&4)!=0&&(e.Db&1)==0&&(i=new Dr(e,1,1,r,n),t?t.lj(i):t=i),t}function mFe(e,n,t){var i,r;return r=e.b,e.b=n,(e.Db&4)!=0&&(e.Db&1)==0&&(i=new Dr(e,1,3,r,n),t?t.lj(i):t=i),t}function vFe(e,n,t){var i,r;return r=e.f,e.f=n,(e.Db&4)!=0&&(e.Db&1)==0&&(i=new Dr(e,1,0,r,n),t?t.lj(i):t=i),t}function yFe(e){var n,t;if(e!=null)for(t=0;t-129&&e<128?(vIe(),n=e+128,t=Dme[n],!t&&(t=Dme[n]=new Ln(e)),t):new Ln(e)}function ke(e){var n,t;return e>-129&&e<128?(hIe(),n=e+128,t=Tme[n],!t&&(t=Tme[n]=new co(e)),t):new co(e)}function ijn(e,n,t,i,r){n==0||i==0||(n==1?r[i]=Cde(r,t,i,e[0]):i==1?r[n]=Cde(r,e,n,t[0]):UTn(e,t,r,n,i))}function xFe(e,n){var t;e.c.length!=0&&(t=u(Ba(e,se(u1,Fd,9,e.c.length,0,1)),199),Bse(t,new Ph),Nqe(t,n))}function AFe(e,n){var t;e.c.length!=0&&(t=u(Ba(e,se(u1,Fd,9,e.c.length,0,1)),199),Bse(t,new lv),Nqe(t,n))}function MFe(e,n){var t;e.a.c.length>0&&(t=u(Pe(e.a,e.a.c.length-1),565),x1e(t,n))||Te(e.a,new BPe(n))}function rjn(e){il();var n,t;n=e.d.c-e.e.c,t=u(e.g,156),Ao(t.b,new Pje(n)),Ao(t.c,new $je(n)),cc(t.i,new Rje(n))}function CFe(e){var n;return n=new y0,n.a+="VerticalSegment ",uo(n,e.e),n.a+=" ",Kt(n,nle(new IX,new P(e.k))),n.a}function cjn(e,n){var t;e.c=n,e.a=iEn(n),e.a<54&&(e.f=(t=n.d>1?$Le(n.a[0],n.a[1]):$Le(n.a[0],0),Qb(n.e>0?t:Od(t))))}function dQ(e,n){var t,i,r;for(t=0,r=vu(e,n).Jc();r.Ob();)i=u(r.Pb(),12),t+=C(i,(me(),vs))!=null?1:0;return t}function c3(e,n,t){var i,r,c;for(i=0,c=St(e,0);c.b!=c.d.c&&(r=ne(re(jt(c))),!(r>t));)r>=n&&++i;return i}function ujn(e){var n;return n=u($a(e.c.c,""),233),n||(n=new P4(b9(d9(new d0,""),"Other")),ug(e.c.c,"",n)),n}function LE(e){var n;return(e.Db&64)!=0?Ff(e):(n=new cf(Ff(e)),n.a+=" (name: ",Bc(n,e.zb),n.a+=")",n.a)}function B1e(e,n,t){var i,r;return r=e.sb,e.sb=n,(e.Db&4)!=0&&(e.Db&1)==0&&(i=new Dr(e,1,4,r,n),t?t.lj(i):t=i),t}function MO(e,n,t){var i;e.Zi(e.i+1),i=e.Xi(n,t),n!=e.i&&Wu(e.g,n,e.g,n+1,e.i-n),ir(e.g,n,i),++e.i,e.Ki(n,t),e.Li()}function z1e(e,n,t){var i,r;return r=e.r,e.r=n,(e.Db&4)!=0&&(e.Db&1)==0&&(i=new Dr(e,1,8,r,e.r),t?t.lj(i):t=i),t}function ojn(e,n,t){var i,r;return i=new L1(e.e,3,13,null,(r=n.c,r||(jn(),rh)),$d(e,n),!1),t?t.lj(i):t=i,t}function sjn(e,n,t){var i,r;return i=new L1(e.e,4,13,(r=n.c,r||(jn(),rh)),null,$d(e,n),!1),t?t.lj(i):t=i,t}function ljn(e,n){var t,i,r,c;if(n.cj(e.a),c=u(Xn(e.a,8),1997),c!=null)for(t=c,i=0,r=t.length;i>1&1431655765,e=(e>>2&858993459)+(e&858993459),e=(e>>4)+e&252645135,e+=e>>8,e+=e>>16,e&63}function fjn(e){return e?(e.i&1)!=0?e==ts?Qi:e==$t?jr:e==Ym?b7:e==Jr?gr:e==Ap?sp:e==o5?lp:e==ds?jy:KS:e:null}function gi(e,n){return $r(e)?gn(e,n):g2(e)?yNe(e,n):b2(e)?(_n(e),ue(e)===ue(n)):Tfe(e)?e.Fb(n):Sfe(e)?gTe(e,n):Mae(e,n)}function OFe(e){var n;return ao(e,0)<0&&(e=P0(T3n(su(e)?sf(e):e))),n=Rt(Hb(e,32)),64-(n!=0?KO(n):KO(Rt(e))+32)}function CO(e,n){var t;return t=new Oa,e.a.zd(t)?(j9(),new xX(_n(dRe(e,t.a,n)))):(T0(e),j9(),j9(),Gme)}function PE(e,n){switch(n.g){case 2:case 1:return vu(e,n);case 3:case 4:return Ks(vu(e,n))}return En(),En(),Sc}function ajn(e,n){var t;return n.a&&(t=n.a.a.length,e.a?Kt(e.a,e.b):e.a=new tl(e.d),FLe(e.a,n.a,n.d.length,t)),e}function hjn(e){nF();var n,t,i,r;for(t=DQ(),i=0,r=t.length;it)throw R(new jo(oF+e+Yge+n+", size: "+t));if(e>n)throw R(new qn(oF+e+DYe+n))}function Fl(e,n,t){if(n<0)q0e(e,t);else{if(!t.pk())throw R(new qn(nb+t.ve()+LS));u(t,69).uk().Ck(e,e.ei(),n)}}function bQ(e,n,t){return k.Math.abs(n-e)DF?e-t>DF:t-e>DF}function J1e(e,n,t,i){switch(n){case 1:return!e.n&&(e.n=new we(Eu,e,1,7)),e.n;case 2:return e.k}return $de(e,n,t,i)}function IFe(e){var n;return(e.Db&64)!=0?Ff(e):(n=new cf(Ff(e)),n.a+=" (source: ",Bc(n,e.d),n.a+=")",n.a)}function Ld(e,n){var t;t=(e.Bb&256)!=0,n?e.Bb|=256:e.Bb&=-257,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Lf(e,1,2,t,n))}function H1e(e,n){var t;t=(e.Bb&256)!=0,n?e.Bb|=256:e.Bb&=-257,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Lf(e,1,8,t,n))}function G1e(e,n){var t;t=(e.Bb&512)!=0,n?e.Bb|=512:e.Bb&=-513,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Lf(e,1,9,t,n))}function Pd(e,n){var t;t=(e.Bb&512)!=0,n?e.Bb|=512:e.Bb&=-513,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Lf(e,1,3,t,n))}function HB(e,n){var t;t=(e.Bb&256)!=0,n?e.Bb|=256:e.Bb&=-257,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Lf(e,1,8,t,n))}function djn(e,n,t){var i,r;return r=e.a,e.a=n,(e.Db&4)!=0&&(e.Db&1)==0&&(i=new Dr(e,1,5,r,e.a),t?s0e(t,i):t=i),t}function $E(e,n){var t;return e.b==-1&&e.a&&(t=e.a.nk(),e.b=t?e.c.Eh(e.a.Jj(),t):Ji(e.c.Ah(),e.a)),e.c.vh(e.b,n)}function DFe(e,n){var t,i;for(i=new st(e);i.e!=i.i.gc();)if(t=u(ft(i),29),ue(n)===ue(t))return!0;return!1}function _Fe(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e>=48&&e<=57?e-48:0}function q1e(e){var n,t;return n=e.k,n==(Fn(),wr)?(t=u(C(e,(me(),Iu)),64),t==(De(),Kn)||t==bt):!1}function LFe(e){var n;return n=Iae(e),Gj(n.a,0)?(f2(),f2(),lte):(f2(),new $K(JX(n.a,0)?ehe(n)/Qb(n.a):0))}function bjn(e,n){var t;if(t=ZO(e,n),X(t,335))return u(t,38);throw R(new qn(nb+n+"' is not a valid attribute"))}function RE(e,n,t){var i;if(i=e.gc(),n>i)throw R(new k2(n,i));if(e.Qi()&&e.Gc(t))throw R(new qn(BN));e.Ei(n,t)}function PFe(e,n){var t,i;for(i=new st(e);i.e!=i.i.gc();)if(t=u(ft(i),143),ue(n)===ue(t))return!0;return!1}function gjn(e,n,t){var i,r,c;return c=(r=x8(e.b,n),r),c&&(i=u(Yz(lO(e,c),""),29),i)?gbe(e,i,n,t):null}function gQ(e,n,t){var i,r,c;return c=(r=x8(e.b,n),r),c&&(i=u(Yz(lO(e,c),""),29),i)?wbe(e,i,n,t):null}function wjn(e){var n,t,i;for(i=0,t=e.length,n=0;n=0?J0(e):lE(J0(Od(e))))}function $Fe(e,n,t,i,r,c){this.e=new Oe,this.f=(Nc(),Ax),Te(this.e,e),this.d=n,this.a=t,this.b=i,this.f=r,this.c=c}function ji(e,n){return en?1:e==n?e==0?ji(1/e,1/n):0:isNaN(e)?isNaN(n)?0:1:-1}function pjn(e){var n;return n=e.a[e.c-1&e.a.length-1],n==null?null:(e.c=e.c-1&e.a.length-1,ir(e.a,e.c,null),n)}function RFe(e){var n,t;for(t=e.p.a.ec().Jc();t.Ob();)if(n=u(t.Pb(),217),n.f&&e.b[n.c]<-1e-10)return n;return null}function mjn(e){var n,t,i;for(n=new Oe,i=new P(e.b);i.a=1?ru:eh):t}function Sjn(e){var n,t;for(t=pUe(ol(e)).Jc();t.Ob();)if(n=Pt(t.Pb()),oS(e,n))return P6n((DMe(),zan),n);return null}function xjn(e,n,t){var i,r;for(r=e.a.ec().Jc();r.Ob();)if(i=u(r.Pb(),9),jO(t,u(Pe(n,i.p),18)))return i;return null}function Ajn(e,n,t){var i,r;for(r=X(n,103)&&(u(n,19).Bb&Ec)!=0?new SK(n,e):new W9(n,e),i=0;i>10)+vN&yr,n[1]=(e&1023)+56320&yr,ph(n,0,n.length)}function Y1e(e,n){var t;t=(e.Bb&Ec)!=0,n?e.Bb|=Ec:e.Bb&=-65537,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Lf(e,1,20,t,n))}function d8(e,n){var t;t=(e.Bb&jh)!=0,n?e.Bb|=jh:e.Bb&=-16385,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Lf(e,1,16,t,n))}function mQ(e,n){var t;t=(e.Bb&Ru)!=0,n?e.Bb|=Ru:e.Bb&=-32769,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Lf(e,1,18,t,n))}function Q1e(e,n){var t;t=(e.Bb&Ru)!=0,n?e.Bb|=Ru:e.Bb&=-32769,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Lf(e,1,18,t,n))}function vu(e,n){var t;return e.i||G0e(e),t=u(zc(e.g,n),49),t?new N0(e.j,u(t.a,15).a,u(t.b,15).a):(En(),En(),Sc)}function Tjn(e,n,t){var i,r;return i=u(n.mf(e.a),35),r=u(t.mf(e.a),35),i!=null&&r!=null?gO(i,r):i!=null?-1:r!=null?1:0}function W1e(e,n,t){var i,r;return i=(j0(),r=new Jk,r),wB(i,n),pB(i,t),e&&Et((!e.a&&(e.a=new mr(yl,e,5)),e.a),i),i}function Z1e(e,n,t){var i;return i=0,n&&(Rv(e.a)?i+=n.f.a/2:i+=n.f.b/2),t&&(Rv(e.a)?i+=t.f.a/2:i+=t.f.b/2),i}function Bw(e,n,t){var i;return i=e.a.get(n),e.a.set(n,t===void 0?null:t),i===void 0?(++e.c,++e.b.g):++e.d,i}function vQ(e){var n;return(e.Db&64)!=0?Ff(e):(n=new cf(Ff(e)),n.a+=" (identifier: ",Bc(n,e.k),n.a+=")",n.a)}function XB(e){var n;switch(e.gc()){case 0:return oR(),ete;case 1:return new GK(Nt(e.Xb(0)));default:return n=e,new WV(n)}}function Ojn(e){switch(u(C(e,(Ie(),Y1)),222).g){case 1:return new dd;case 3:return new D5;default:return new Bp}}function Njn(e){var n;return n=K2(e),n>34028234663852886e22?Vi:n<-34028234663852886e22?Ir:n}function mc(e,n){var t;return su(e)&&su(n)&&(t=e+n,mNn){ILe(t);break}}jR(t,n)}function en(e,n){var t,i,r,c,o;if(t=n.f,ug(e.c.d,t,n),n.g!=null)for(r=n.g,c=0,o=r.length;cn&&i.Le(e[c-1],e[c])>0;--c)o=e[c],ir(e,c,e[c-1]),ir(e,c-1,o)}function Jl(e,n,t,i){if(n<0)ybe(e,t,i);else{if(!t.pk())throw R(new qn(nb+t.ve()+LS));u(t,69).uk().Ak(e,e.ei(),n,i)}}function Fjn(e,n){var t;if(t=ZO(e.Ah(),n),X(t,103))return u(t,19);throw R(new qn(nb+n+"' is not a valid reference"))}function KB(e,n){if(n==e.d)return e.e;if(n==e.e)return e.d;throw R(new qn("Node "+n+" not part of edge "+e))}function nde(e,n,t,i){switch(n){case 3:return e.f;case 4:return e.g;case 5:return e.i;case 6:return e.j}return J1e(e,n,t,i)}function Jjn(e){return e.k!=(Fn(),Wi)?!1:Vv(new mn(null,new A2(new Un(Yn(Ii(e).a.Jc(),new ee)))),new nM)}function Xs(){Xs=Y,fI=new fT(va,0),ax=new fT("FIRST",1),V1=new fT(EQe,2),hx=new fT("LAST",3),Sg=new fT(SQe,4)}function zE(){zE=Y,rx=new b$("LAYER_SWEEP",0),w3e=new b$("MEDIAN_LAYER_SWEEP",1),tI=new b$(cee,2),p3e=new b$(va,3)}function VB(){VB=Y,f6e=new dK("ASPECT_RATIO_DRIVEN",0),qre=new dK("MAX_SCALE_DRIVEN",1),l6e=new dK("AREA_DRIVEN",2)}function YB(){YB=Y,Ice=new A$(Rpe,0),M8e=new A$("GROUP_DEC",1),T8e=new A$("GROUP_MIXED",2),C8e=new A$("GROUP_INC",3)}function Hjn(e,n){return gn(n.b&&n.c?Yb(n.b)+"->"+Yb(n.c):"e_"+Ni(n),e.b&&e.c?Yb(e.b)+"->"+Yb(e.c):"e_"+Ni(e))}function Gjn(e,n){return gn(n.b&&n.c?Yb(n.b)+"->"+Yb(n.c):"e_"+Ni(n),e.b&&e.c?Yb(e.b)+"->"+Yb(e.c):"e_"+Ni(e))}function zw(e,n){return Na(),Rf(Y0),k.Math.abs(e-n)<=Y0||e==n||isNaN(e)&&isNaN(n)?0:en?1:Bb(isNaN(e),isNaN(n))}function tde(e){SQ(),this.c=Pf(F(z(VBn,1),On,829,0,[Bun])),this.b=new wt,this.a=e,ei(this.b,SH,1),Ao(zun,new nSe(this))}function FE(e){var n;this.a=(n=u(e.e&&e.e(),10),new _l(n,u(Df(n,n.length),10),0)),this.b=se(Mr,On,1,this.a.a.length,5,1)}function fu(e){var n;return Array.isArray(e)&&e.Rm===bn?Pb(Us(e))+"@"+(n=Ni(e)>>>0,n.toString(16)):e.toString()}function qjn(e){var n;return e==null?!0:(n=e.length,n>0&&(Qn(n-1,e.length),e.charCodeAt(n-1)==58)&&!jQ(e,oA,sA))}function jQ(e,n,t){var i,r;for(i=0,r=e.length;i=r)return n.c+t;return n.c+n.b.gc()}function XFe(e,n){A9();var t,i,r,c;for(i=B$e(e),r=n,G9(i,0,i.length,r),t=0;t0&&(i+=r,++t);return t>1&&(i+=e.d*(t-1)),i}function rde(e){var n,t,i;for(i=new vd,i.a+="[",n=0,t=e.gc();n=0;--i)for(n=t[i],r=0;r>5,n=e&31,i=se($t,ni,30,t+1,15,1),i[t]=1<0&&(n.lengthe.i&&ir(n,e.i,null),n}function QB(e){var n;return(e.Db&64)!=0?LE(e):(n=new cf(LE(e)),n.a+=" (instanceClassName: ",Bc(n,e.D),n.a+=")",n.a)}function WB(e){var n,t,i,r;for(r=0,t=0,i=e.length;t0?(e.Zj(),i=n==null?0:Ni(n),r=(i&oi)%e.d.length,t=EUe(e,r,i,n),t!=-1):!1}function Co(e,n,t){var i,r,c;return e.Nj()?(i=e.i,c=e.Oj(),MO(e,i,n),r=e.Gj(3,null,n,i,c),t?t.lj(r):t=r):MO(e,e.i,n),t}function pa(e,n){var t,i,r;return e.f>0&&(e.Zj(),i=n==null?0:Ni(n),r=(i&oi)%e.d.length,t=W0e(e,r,i,n),t)?t.kd():null}function dEn(e,n,t){var i,r;return i=new L1(e.e,3,10,null,(r=n.c,X(r,88)?u(r,29):(jn(),jf)),$d(e,n),!1),t?t.lj(i):t=i,t}function bEn(e,n,t){var i,r;return i=new L1(e.e,4,10,(r=n.c,X(r,88)?u(r,29):(jn(),jf)),null,$d(e,n),!1),t?t.lj(i):t=i,t}function rJe(e,n){var t,i,r;return X(n,45)?(t=u(n,45),i=t.jd(),r=J2(e.Pc(),i),C1(r,t.kd())&&(r!=null||e.Pc()._b(i))):!1}function dde(e,n){switch(n){case 3:Lw(e,0);return;case 4:Pw(e,0);return;case 5:Os(e,0);return;case 6:Ns(e,0);return}R1e(e,n)}function Fw(e,n){switch(n.g){case 1:return M4(e.j,(ss(),Sve));case 2:return M4(e.j,(ss(),Ave));default:return En(),En(),Sc}}function J0(e){yh();var n,t;return t=Rt(e),n=Rt(Hb(e,32)),n!=0?new dLe(t,n):t>10||t<0?new I1(1,t):unn[t]}function cJe(e){U2();var n;return(e.q?e.q:(En(),En(),r1))._b((Ie(),mp))?n=u(C(e,mp),203):n=u(C(_r(e),yx),203),n}function gEn(e,n,t,i){var r,c;if(c=t-n,c<3)for(;c<3;)e*=10,++c;else{for(r=1;c>3;)r*=10,--c;e=(e+(r>>1))/r|0}return i.i=e,!0}function uJe(e,n,t){aBe(),wxe.call(this),this.a=j2(Tnn,[Me,Zge],[592,216],0,[pJ,wte],2),this.c=new y4,this.g=e,this.f=n,this.d=t}function oJe(e){this.e=se($t,ni,30,e.length,15,1),this.c=se(ts,ma,30,e.length,16,1),this.b=se(ts,ma,30,e.length,16,1),this.f=0}function wEn(e){var n,t;for(e.j=se(Jr,Jc,30,e.p.c.length,15,1),t=new P(e.p);t.a>5,n&=31,r=e.d+t+(n==0?0:1),i=se($t,ni,30,r,15,1),bMn(i,e.a,t,n),c=new Gb(e.e,r,i),gE(c),c}function b8(e,n,t){var i,r,c;for(r=null,c=e.b;c;){if(i=e.a.Le(n,c.d),t&&i==0)return c;i>=0?c=c.a[1]:(r=c,c=c.a[0])}return r}function _O(e,n,t){var i,r,c;for(r=null,c=e.b;c;){if(i=e.a.Le(n,c.d),t&&i==0)return c;i<=0?c=c.a[0]:(r=c,c=c.a[1])}return r}function CQ(e,n){for(var t=0;!n[t]||n[t]=="";)t++;for(var i=n[t++];t0?(k.Error.stackTraceLimit=Error.stackTraceLimit=64,!0):"stack"in new Error}function kEn(e){var n;n=e.a;do n=u(rt(new Un(Yn(Ii(n).a.Jc(),new ee))),17).d.i,n.k==(Fn(),dr)&&Te(e.e,n);while(n.k==(Fn(),dr))}function jEn(e,n){var t,i,r;for(i=new Un(Yn(Ii(e).a.Jc(),new ee));ht(i);)if(t=u(rt(i),17),r=t.d.i,r.c==n)return!1;return!0}function dJe(e,n,t){var i,r,c,o;for(r=u(zn(e.b,t),171),i=0,o=new P(n.j);o.an?1:Bb(isNaN(e),isNaN(n)))>0}function pde(e,n){return Na(),Na(),Rf(Y0),(k.Math.abs(e-n)<=Y0||e==n||isNaN(e)&&isNaN(n)?0:en?1:Bb(isNaN(e),isNaN(n)))<0}function mJe(e,n){return Na(),Na(),Rf(Y0),(k.Math.abs(e-n)<=Y0||e==n||isNaN(e)&&isNaN(n)?0:en?1:Bb(isNaN(e),isNaN(n)))<=0}function mde(e){switch(e.g){case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:return!0;default:return!1}}function vde(e,n,t,i,r,c){this.a=e,this.c=n,this.b=t,this.f=i,this.d=r,this.e=c,this.c>0&&this.b>0&&(this.g=lR(this.c,this.b,this.a))}function xEn(e,n){var t=e.a,i;n=String(n),t.hasOwnProperty(n)&&(i=t[n]);var r=(WY(),rte)[typeof i],c=r?r(i):F1e(typeof i);return c}function g8(e){var n,t,i;if(i=null,n=Ch in e.a,t=!n,t)throw R(new lh("Every element must have an id."));return i=ry(O1(e,Ch)),i}function Jw(e){var n,t;for(t=qGe(e),n=null;e.c==2;)fi(e),n||(n=(ai(),ai(),new Vj(2)),fg(n,t),t=n),t.Hm(qGe(e));return t}function nz(e,n){var t,i,r;return e.Zj(),i=n==null?0:Ni(n),r=(i&oi)%e.d.length,t=W0e(e,r,i,n),t?(pBe(e,t),t.kd()):null}function ph(e,n,t){var i,r,c,o;for(c=n+t,Qr(n,c,e.length),o="",r=n;rn.e?1:e.en.d?e.e:e.d=48&&e<48+k.Math.min(10,10)?e-48:e>=97&&e<97?e-97+10:e>=65&&e<65?e-65+10:-1}function AEn(e,n){if(n.c==e)return n.d;if(n.d==e)return n.c;throw R(new qn("Input edge is not connected to the input port."))}function mh(e,n){if(e.a<0)throw R(new Uc("Did not call before(...) or after(...) before calling add(...)."));return ble(e,e.a,n),e}function yde(e){return BR(),X(e,166)?u(zn(eD,ann),296).Qg(e):so(eD,Us(e))?u(zn(eD,Us(e)),296).Qg(e):null}function Lo(e){var n,t;return(e.Db&32)==0&&(t=(n=u(Xn(e,16),29),dt(n||e.fi())-dt(e.fi())),t!=0&&Q4(e,32,se(Mr,On,1,t,5,1))),e}function Q4(e,n,t){var i;(e.Db&n)!=0?t==null?qTn(e,n):(i=YQ(e,n),i==-1?e.Eb=t:ir(G4(e.Eb),i,t)):t!=null&&aIn(e,n,t)}function MEn(e,n,t,i){var r,c;n.c.length!=0&&(r=cNn(t,i),c=dTn(n),er(dB(new mn(null,new vn(c,1)),new p_),new HDe(e,t,r,i)))}function CEn(e,n){var t,i,r,c;return i=e.a.length-1,t=n-e.b&i,c=e.c-n&i,r=e.c-e.b&i,xOe(t=c?(Pkn(e,n),-1):(Lkn(e,n),1)}function TEn(e,n){var t,i;for(t=(Qn(n,e.length),e.charCodeAt(n)),i=n+1;in.e?1:e.fn.f?1:Ni(e)-Ni(n)}function EJe(e,n){var t;return ue(n)===ue(e)?!0:!X(n,22)||(t=u(n,22),t.gc()!=e.gc())?!1:e.Hc(t)}function tz(e,n){return _n(e),n==null?!1:gn(e,n)?!0:e.length==n.length&&gn(e.toLowerCase(),n.toLowerCase())}function q2(e){var n,t;return ao(e,-129)>0&&ao(e,128)<0?(mIe(),n=Rt(e)+128,t=Ome[n],!t&&(t=Ome[n]=new Sn(e)),t):new Sn(e)}function W4(){W4=Y,ex=new a$(va,0),vve=new a$("INSIDE_PORT_SIDE_GROUPS",1),Ote=new a$("GROUP_MODEL_ORDER",2),Nte=new a$(eee,3)}function iz(e){var n,t,i;if(i=e.Gh(),!i)for(n=0,t=e.Mh();t;t=t.Mh()){if(++n>RZ)return t.Nh();if(i=t.Gh(),i||t==e)break}return i}function IEn(e){var n;return e.b||fgn(e,(n=f2n(e.e,e.a),!n||!gn(hne,pa((!n.b&&(n.b=new Hs((jn(),Ac),Du,n)),n.b),"qualified")))),e.c}function DEn(e){var n,t;for(t=new P(e.a.b);t.a2e3&&(Yen=e,fJ=k.setTimeout(Agn,10))),lJ++==0?(o8n((Coe(),yme)),!0):!1}function qEn(e,n,t){var i;(mnn?(rEn(e),!0):vnn||knn?(y9(),!0):ynn&&(y9(),!1))&&(i=new NNe(n),i.b=t,UMn(e,i))}function NQ(e,n){var t;t=!e.A.Gc((Vs(),_g))||e.q==(Br(),to),e.u.Gc((ps(),Z1))?t?dRn(e,n):AVe(e,n):e.u.Gc(mb)&&(t?L$n(e,n):FVe(e,n))}function UEn(e,n,t){var i,r;hW(e.e,n,t,(De(),Vn)),hW(e.i,n,t,et),e.a&&(r=u(C(n,(me(),mi)),12),i=u(C(t,mi),12),ZV(e.g,r,i))}function CJe(e){var n;ue(je(e,(Xt(),W3)))===ue((B1(),lG))&&(Fi(e)?(n=u(je(Fi(e),W3),347),Ei(e,W3,n)):Ei(e,W3,Wx))}function TJe(e,n,t){return new _f(k.Math.min(e.a,n.a)-t/2,k.Math.min(e.b,n.b)-t/2,k.Math.abs(e.a-n.a)+t,k.Math.abs(e.b-n.b)+t)}function OJe(e){var n;this.d=new Oe,this.j=new Vr,this.g=new Vr,n=e.g.b,this.f=u(C(_r(n),(Ie(),wl)),86),this.e=ne(re(uz(n,Om)))}function NJe(e){this.d=new Oe,this.e=new D0,this.c=se($t,ni,30,(De(),F(z(xc,1),qu,64,0,[ju,Kn,et,bt,Vn])).length,15,1),this.b=e}function xde(e,n,t){var i;switch(i=t[e.g][n],e.g){case 1:case 3:return new Se(0,i);case 2:case 4:return new Se(i,0);default:return null}}function XEn(e,n){var t;if(t=Qv(e.o,n),t==null)throw R(new lh("Node did not exist in input."));return Sbe(e,n),$W(e,n),bbe(e,n,t),null}function IJe(e,n){var t,i;for(i=e.a.length,n.lengthi&&ir(n,i,null),n}function Ba(e,n){var t,i;for(i=e.c.length,n.lengthi&&ir(n,i,null),n}function IQ(e,n,t,i){var r;if(r=e.length,n>=r)return r;for(n=n>0?n:0;n0&&(Te(e.b,new VNe(n.a,t)),i=n.a.length,0i&&(n.a+=GTe(se(Wl,Eh,30,-i,15,1))))}function LJe(e,n,t){var i,r,c;if(!t[n.d])for(t[n.d]=!0,r=new P(r3(n));r.a=e.b>>1)for(i=e.c,t=e.b;t>n;--t)i=i.b;else for(i=e.a.a,t=0;t=0?e.Th(r):jW(e,i)):t<0?jW(e,i):u(i,69).uk().zk(e,e.ei(),t)}function BJe(e){var n,t,i;for(i=(!e.o&&(e.o=new os((Gu(),h1),Zd,e,0)),e.o),t=i.c.Jc();t.e!=t.i.gc();)n=u(t.Wj(),45),n.kd();return nO(i)}function Le(e){var n;if(X(e.a,4)){if(n=yde(e.a),n==null)throw R(new Uc(wWe+e.b+"'. "+gWe+(M1(nD),nD.k)+C2e));return n}else return e.a}function rSn(e){var n;if(e==null)return null;if(n=kRn(bo(e,!0)),n==null)throw R(new TX("Invalid base64Binary value: '"+e+"'"));return n}function ft(e){var n;try{return n=e.i.Xb(e.e),e.Vj(),e.g=e.e++,n}catch(t){throw t=sr(t),X(t,99)?(e.Vj(),R(new hu)):R(t)}}function PQ(e){var n;try{return n=e.c.Ti(e.e),e.Vj(),e.g=e.e++,n}catch(t){throw t=sr(t),X(t,99)?(e.Vj(),R(new hu)):R(t)}}function cz(e){var n,t,i,r;for(r=0,t=0,i=e.length;t=64&&n<128&&(r=bh(r,qh(1,n-64)));return r}function uz(e,n){var t,i;return i=null,wi(e,(Xt(),Xy))&&(t=u(C(e,Xy),105),t.nf(n)&&(i=t.mf(n))),i==null&&_r(e)&&(i=C(_r(e),n)),i}function cSn(e,n){var t;return t=u(C(e,(Ie(),Wc)),78),IK(n,tin)?t?qs(t):(t=new xs,he(e,Wc,t)):t&&he(e,Wc,null),t}function uSn(e,n){var t,i,r;for(r=new xo(n.gc()),i=n.Jc();i.Ob();)t=u(i.Pb(),294),t.c==t.f?E8(e,t,t.c):yCn(e,t)||Gn(r.c,t);return r}function zJe(e,n){var t,i,r;for(t=e.o,r=u(u(vi(e.r,n),22),83).Jc();r.Ob();)i=u(r.Pb(),115),i.e.a=sxn(i,t.a),i.e.b=t.b*ne(re(i.b.mf(mJ)))}function oSn(e,n){var t,i,r,c;return r=e.k,t=ne(re(C(e,(me(),gp)))),c=n.k,i=ne(re(C(n,gp))),c!=(Fn(),wr)?-1:r!=wr?1:t==i?0:tt.b)return!0}return!1}function HJe(e){var n;return n=new y0,n.a+="n",e.k!=(Fn(),Wi)&&Kt(Kt((n.a+="(",n),RK(e.k).toLowerCase()),")"),Kt((n.a+="_",n),$O(e)),n.a}function GE(){GE=Y,D4e=new aT(Rpe,0),Zie=new aT(cee,1),ere=new aT("LINEAR_SEGMENTS",2),Ex=new aT("BRANDES_KOEPF",3),Sx=new aT(zQe,4)}function Z4(e,n,t,i){var r;return t>=0?e.Ph(n,t,i):(e.Mh()&&(i=(r=e.Ch(),r>=0?e.xh(i):e.Mh().Qh(e,-1-r,null,i))),e.zh(n,t,i))}function Ade(e,n){switch(n){case 7:!e.e&&(e.e=new Nn(pr,e,7,4)),kt(e.e);return;case 8:!e.d&&(e.d=new Nn(pr,e,8,5)),kt(e.d);return}dde(e,n)}function Ei(e,n,t){return t==null?(!e.o&&(e.o=new os((Gu(),h1),Zd,e,0)),nz(e.o,n)):(!e.o&&(e.o=new os((Gu(),h1),Zd,e,0)),zO(e.o,n,t)),e}function Yu(e,n){var t;t=e.dd(n);try{return t.Pb()}catch(i){throw i=sr(i),X(i,112)?R(new jo("Can't get element "+n)):R(i)}}function GJe(e,n){var t;switch(t=u(zc(e.b,n),127).n,n.g){case 1:e.t>=0&&(t.d=e.t);break;case 3:e.t>=0&&(t.a=e.t)}e.C&&(t.b=e.C.b,t.c=e.C.c)}function bSn(e){var n;n=e.a;do n=u(rt(new Un(Yn(cr(n).a.Jc(),new ee))),17).c.i,n.k==(Fn(),dr)&&e.b.Ec(n);while(n.k==(Fn(),dr));e.b=Ks(e.b)}function qJe(e,n){var t,i,r;for(r=e,i=new Un(Yn(cr(n).a.Jc(),new ee));ht(i);)t=u(rt(i),17),t.c.i.c&&(r=k.Math.max(r,t.c.i.c.p));return r}function gSn(e,n){var t,i,r;for(r=0,i=u(u(vi(e.r,n),22),83).Jc();i.Ob();)t=u(i.Pb(),115),r+=t.d.d+t.b.Kf().b+t.d.a,i.Ob()&&(r+=e.w);return r}function wSn(e,n){var t,i,r;for(r=0,i=u(u(vi(e.r,n),22),83).Jc();i.Ob();)t=u(i.Pb(),115),r+=t.d.b+t.b.Kf().a+t.d.c,i.Ob()&&(r+=e.w);return r}function UJe(e){var n,t,i,r;if(i=0,r=W2(e),r.c.length==0)return 1;for(t=new P(r);t.a=0?e.Ih(o,t,!0):Xw(e,c,t)):u(c,69).uk().wk(e,e.ei(),r,t,i)}function vSn(e,n,t,i){var r,c;c=n.nf((Xt(),e5))?u(n.mf(e5),22):e.j,r=hjn(c),r!=(nF(),pte)&&(t&&!mde(r)||O0e(_On(e,r,i),n))}function $Q(e,n){return $r(e)?!!Hen[n]:e.Qm?!!e.Qm[n]:g2(e)?!!Jen[n]:b2(e)?!!Fen[n]:!1}function ySn(e){switch(e.g){case 1:return Rw(),VN;case 3:return Rw(),KN;case 2:return Rw(),vte;case 4:return Rw(),mte;default:return null}}function kSn(e,n,t){if(e.e)switch(e.b){case 1:P5n(e.c,n,t);break;case 0:$5n(e.c,n,t)}else sPe(e.c,n,t);e.a[n.p][t.p]=e.c.i,e.a[t.p][n.p]=e.c.e}function KJe(e){var n,t;if(e==null)return null;for(t=se(u1,Me,199,e.length,0,2),n=0;nc?1:0):0}function U2(){U2=Y,MH=new g$(va,0),Qie=new g$("PORT_POSITION",1),U3=new g$("NODE_SIZE_WHERE_SPACE_PERMITS",2),q3=new g$("NODE_SIZE",3)}function jSn(e,n){var t,i,r;for(n.Tg("Untreeify",1),t=u(C(e,(Ti(),yye)),16),r=t.Jc();r.Ob();)i=u(r.Pb(),65),Vt(i.b.d,i),Vt(i.c.b,i);n.Ug()}function Yh(){Yh=Y,lce=new Bj("AUTOMATIC",0),NI=new Bj(by,1),II=new Bj(gy,2),iG=new Bj("TOP",3),nG=new Bj(nwe,4),tG=new Bj(H8,5)}function o3(e,n,t){var i,r;if(r=e.gc(),n>=r)throw R(new k2(n,r));if(e.Qi()&&(i=e.bd(t),i>=0&&i!=n))throw R(new qn(BN));return e.Vi(n,t)}function $d(e,n){var t,i,r;if(r=OHe(e,n),r>=0)return r;if(e.ml()){for(i=0;i0||e==(EX(),Yne)||n==(SX(),Qne))throw R(new qn("Invalid range: "+oPe(e,n)))}function Cde(e,n,t,i){C8();var r,c;for(r=0,c=0;c0),(n&-n)==n)return lc(n*Ds(e,31)*4656612873077393e-25);do t=Ds(e,31),i=t%n;while(t-i+(n-1)<0);return lc(i)}function ESn(e,n){var t,i,r;for(t=kw(new Lb,e),r=new P(n);r.a1&&(c=ESn(e,n)),c}function CSn(e){var n,t,i;for(n=0,i=new P(e.c.a);i.a102?-1:e<=57?e-48:e<65?-1:e<=70?e-65+10:e<97?-1:e-97+10}function qQ(e,n){if(e==null)throw R(new f4("null key in entry: null="+n));if(n==null)throw R(new f4("null value in entry: "+e+"=null"))}function tHe(e,n){var t;return t=F(z(Jr,1),Jc,30,15,[fQ(e.a[0],n),fQ(e.a[1],n),fQ(e.a[2],n)]),e.d&&(t[0]=k.Math.max(t[0],t[2]),t[2]=t[0]),t}function iHe(e,n){var t;return t=F(z(Jr,1),Jc,30,15,[FB(e.a[0],n),FB(e.a[1],n),FB(e.a[2],n)]),e.d&&(t[0]=k.Math.max(t[0],t[2]),t[2]=t[0]),t}function Ide(e,n,t){A4(u(C(n,(Ie(),Zi)),102))||(Xae(e,n,Rd(n,t)),Xae(e,n,Rd(n,(De(),bt))),Xae(e,n,Rd(n,Kn)),En(),Tr(n.j,new tEe(e)))}function rHe(e){var n,t;for(e.c||TPn(e),t=new xs,n=new P(e.a),_(n);n.a0&&(Qn(0,n.length),n.charCodeAt(0)==43)?(Qn(1,n.length+1),n.substr(1)):n))}function qSn(e){var n;return e==null?null:new A0((n=bo(e,!0),n.length>0&&(Qn(0,n.length),n.charCodeAt(0)==43)?(Qn(1,n.length+1),n.substr(1)):n))}function _de(e,n,t,i,r,c,o,l){var f,h;i&&(f=i.a[0],f&&_de(e,n,t,f,r,c,o,l),eW(e,t,i.d,r,c,o,l)&&n.Ec(i),h=i.a[1],h&&_de(e,n,t,h,r,c,o,l))}function qE(e,n){var t,i,r,c;for(c=e.gc(),n.lengthc&&ir(n,c,null),n}function USn(e,n){var t,i;if(i=e.gc(),n==null){for(t=0;t0&&(f+=r),h[b]=o,o+=l*(f+i)}function ZSn(e){var n;for(n=0;n0?e.c:0),++r;e.b=i,e.d=c}function wHe(e,n){var t;return t=F(z(Jr,1),Jc,30,15,[Tde(e,(wa(),Ou),n),Tde(e,No,n),Tde(e,Nu,n)]),e.f&&(t[0]=k.Math.max(t[0],t[2]),t[2]=t[0]),t}function pHe(e){var n;wi(e,(Ie(),pp))&&(n=u(C(e,pp),22),n.Gc((Q2(),Yf))?(n.Kc(Yf),n.Ec(Qf)):n.Gc(Qf)&&(n.Kc(Qf),n.Ec(Yf)))}function mHe(e){var n;wi(e,(Ie(),pp))&&(n=u(C(e,pp),22),n.Gc((Q2(),Zf))?(n.Kc(Zf),n.Ec(pf)):n.Gc(pf)&&(n.Kc(pf),n.Ec(Zf)))}function QQ(e,n,t,i){var r,c,o,l;return e.a==null&&YMn(e,n),o=n.b.j.c.length,c=t.d.p,l=i.d.p,r=l-1,r<0&&(r=o-1),c<=r?e.a[r]-e.a[c]:e.a[o-1]-e.a[c]+e.a[r]}function exn(e){var n;for(n=0;n0&&(r.b+=n),r}function gz(e,n){var t,i,r;for(r=new Vr,i=e.Jc();i.Ob();)t=u(i.Pb(),37),T8(t,0,r.b),r.b+=t.f.b+n,r.a=k.Math.max(r.a,t.f.a);return r.a>0&&(r.a+=n),r}function yHe(e,n){var t,i;if(n.length==0)return 0;for(t=CV(e.a,n[0],(De(),Vn)),t+=CV(e.a,n[n.length-1],et),i=0;i>16==6?e.Cb.Qh(e,5,Aa,n):(i=Oc(u(Mn((t=u(Xn(e,16),29),t||e.fi()),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function uxn(e){B9();var n=e.e;if(n&&n.stack){var t=n.stack,i=n+` +`)),ie=G.reduce((W,Z)=>W.concat(...Z),[]);return[G,ie]}return[[],[]]},[g]);return Be.useEffect(()=>{const U=E?.target??_1n,G=E?.actInsideInputWithModifier??!0;if(g!==null){const ie=se=>{if(N.current=se.ctrlKey||se.metaKey||se.shiftKey||se.altKey,(!N.current||N.current&&!G)&&Qdn(se))return!1;const ee=P1n(se.code,H);if($.current.add(se[ee]),L1n(k,$.current,!1)){const Me=se.composedPath?.()?.[0]||se.target,pe=Me?.nodeName==="BUTTON"||Me?.nodeName==="A";E.preventDefault!==!1&&(N.current||!pe)&&se.preventDefault(),M(!0)}},W=se=>{const oe=P1n(se.code,H);L1n(k,$.current,!0)?(M(!1),$.current.clear()):$.current.delete(se[oe]),se.key==="Meta"&&$.current.clear(),N.current=!1},Z=()=>{$.current.clear(),M(!1)};return U?.addEventListener("keydown",ie),U?.addEventListener("keyup",W),window.addEventListener("blur",Z),window.addEventListener("contextmenu",Z),()=>{U?.removeEventListener("keydown",ie),U?.removeEventListener("keyup",W),window.removeEventListener("blur",Z),window.removeEventListener("contextmenu",Z)}}},[g,M]),x}function L1n(g,E,x){return g.filter(M=>x||M.length===E.size).some(M=>M.every(N=>E.has(N)))}function P1n(g,E){return E.includes(g)?"code":"key"}const jqn=()=>{const g=El();return Be.useMemo(()=>({zoomIn:E=>{const{panZoom:x}=g.getState();return x?x.scaleBy(1.2,E):Promise.resolve(!1)},zoomOut:E=>{const{panZoom:x}=g.getState();return x?x.scaleBy(1/1.2,E):Promise.resolve(!1)},zoomTo:(E,x)=>{const{panZoom:M}=g.getState();return M?M.scaleTo(E,x):Promise.resolve(!1)},getZoom:()=>g.getState().transform[2],setViewport:async(E,x)=>{const{transform:[M,N,$],panZoom:k}=g.getState();return k?(await k.setViewport({x:E.x??M,y:E.y??N,zoom:E.zoom??$},x),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[E,x,M]=g.getState().transform;return{x:E,y:x,zoom:M}},setCenter:async(E,x,M)=>g.getState().setCenter(E,x,M),fitBounds:async(E,x)=>{const{width:M,height:N,minZoom:$,maxZoom:k,panZoom:H}=g.getState(),U=Ske(E,M,N,$,k,x?.padding??.1);return H?(await H.setViewport(U,{duration:x?.duration,ease:x?.ease,interpolate:x?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(E,x={})=>{const{transform:M,snapGrid:N,snapToGrid:$,domNode:k}=g.getState();if(!k)return E;const{x:H,y:U}=k.getBoundingClientRect(),G={x:E.x-H,y:E.y-U},ie=x.snapGrid??N,W=x.snapToGrid??$;return cq(G,M,W,ie)},flowToScreenPosition:E=>{const{transform:x,domNode:M}=g.getState();if(!M)return E;const{x:N,y:$}=M.getBoundingClientRect(),k=xue(E,x);return{x:k.x+N,y:k.y+$}}}),[])};function v0n(g,E){const x=[],M=new Map,N=[];for(const $ of g)if($.type==="add"){N.push($);continue}else if($.type==="remove"||$.type==="replace")M.set($.id,[$]);else{const k=M.get($.id);k?k.push($):M.set($.id,[$])}for(const $ of E){const k=M.get($.id);if(!k){x.push($);continue}if(k[0].type==="remove")continue;if(k[0].type==="replace"){x.push({...k[0].item});continue}const H={...$};for(const U of k)Eqn(U,H);x.push(H)}return N.length&&N.forEach($=>{$.index!==void 0?x.splice($.index,0,{...$.item}):x.push({...$.item})}),x}function Eqn(g,E){switch(g.type){case"select":{E.selected=g.selected;break}case"position":{typeof g.position<"u"&&(E.position=g.position),typeof g.dragging<"u"&&(E.dragging=g.dragging);break}case"dimensions":{typeof g.dimensions<"u"&&(E.measured={...g.dimensions},g.setAttributes&&((g.setAttributes===!0||g.setAttributes==="width")&&(E.width=g.dimensions.width),(g.setAttributes===!0||g.setAttributes==="height")&&(E.height=g.dimensions.height))),typeof g.resizing=="boolean"&&(E.resizing=g.resizing);break}}}function y0n(g,E){return v0n(g,E)}function k0n(g,E){return v0n(g,E)}function yA(g,E){return{id:g,type:"select",selected:E}}function aD(g,E=new Set,x=!1){const M=[];for(const[N,$]of g){const k=E.has(N);!($.selected===void 0&&!k)&&$.selected!==k&&(x&&($.selected=k),M.push(yA($.id,k)))}return M}function $1n({items:g=[],lookup:E}){const x=[],M=new Map(g.map(N=>[N.id,N]));for(const[N,$]of g.entries()){const k=E.get($.id),H=k?.internals?.userNode??k;H!==void 0&&H!==$&&x.push({id:$.id,item:$,type:"replace"}),H===void 0&&x.push({item:$,type:"add",index:N})}for(const[N]of E)M.get(N)===void 0&&x.push({id:N,type:"remove"});return x}function R1n(g){return{id:g.id,type:"remove"}}const B1n=g=>UHn(g),Sqn=g=>Hdn(g);function j0n(g){return Be.forwardRef(g)}function z1n(g){const[E,x]=Be.useState(BigInt(0)),[M]=Be.useState(()=>xqn(()=>x(N=>N+BigInt(1))));return ake(()=>{const N=M.get();N.length&&(g(N),M.reset())},[E]),M}function xqn(g){let E=[];return{get:()=>E,reset:()=>{E=[]},push:x=>{E.push(x),g()}}}const E0n=Be.createContext(null);function Aqn({children:g}){const E=El(),x=Be.useCallback(H=>{const{nodes:U=[],setNodes:G,hasDefaultNodes:ie,onNodesChange:W,nodeLookup:Z,fitViewQueued:se,onNodesChangeMiddlewareMap:oe}=E.getState();let ee=U;for(const pe of H)ee=typeof pe=="function"?pe(ee):pe;let Me=$1n({items:ee,lookup:Z});for(const pe of oe.values())Me=pe(Me);ie&&G(ee),Me.length>0?W?.(Me):se&&window.requestAnimationFrame(()=>{const{fitViewQueued:pe,nodes:Pe,setNodes:ae}=E.getState();pe&&ae(Pe)})},[]),M=z1n(x),N=Be.useCallback(H=>{const{edges:U=[],setEdges:G,hasDefaultEdges:ie,onEdgesChange:W,edgeLookup:Z}=E.getState();let se=U;for(const oe of H)se=typeof oe=="function"?oe(se):oe;ie?G(se):W&&W($1n({items:se,lookup:Z}))},[]),$=z1n(N),k=Be.useMemo(()=>({nodeQueue:M,edgeQueue:$}),[]);return _.jsx(E0n.Provider,{value:k,children:g})}function Mqn(){const g=Be.useContext(E0n);if(!g)throw new Error("useBatchContext must be used within a BatchProvider");return g}const Cqn=g=>!!g.panZoom;function Nke(){const g=jqn(),E=El(),x=Mqn(),M=zu(Cqn),N=Be.useMemo(()=>{const $=W=>E.getState().nodeLookup.get(W),k=W=>{x.nodeQueue.push(W)},H=W=>{x.edgeQueue.push(W)},U=W=>{const{nodeLookup:Z,nodeOrigin:se}=E.getState(),oe=B1n(W)?W:Z.get(W.id),ee=oe.parentId?Vdn(oe.position,oe.measured,oe.parentId,Z,se):oe.position,Me={...oe,position:ee,width:oe.measured?.width??oe.width,height:oe.measured?.height??oe.height};return mD(Me)},G=(W,Z,se={replace:!1})=>{k(oe=>oe.map(ee=>{if(ee.id===W){const Me=typeof Z=="function"?Z(ee):Z;return se.replace&&B1n(Me)?Me:{...ee,...Me}}return ee}))},ie=(W,Z,se={replace:!1})=>{H(oe=>oe.map(ee=>{if(ee.id===W){const Me=typeof Z=="function"?Z(ee):Z;return se.replace&&Sqn(Me)?Me:{...ee,...Me}}return ee}))};return{getNodes:()=>E.getState().nodes.map(W=>({...W})),getNode:W=>$(W)?.internals.userNode,getInternalNode:$,getEdges:()=>{const{edges:W=[]}=E.getState();return W.map(Z=>({...Z}))},getEdge:W=>E.getState().edgeLookup.get(W),setNodes:k,setEdges:H,addNodes:W=>{const Z=Array.isArray(W)?W:[W];x.nodeQueue.push(se=>[...se,...Z])},addEdges:W=>{const Z=Array.isArray(W)?W:[W];x.edgeQueue.push(se=>[...se,...Z])},toObject:()=>{const{nodes:W=[],edges:Z=[],transform:se}=E.getState(),[oe,ee,Me]=se;return{nodes:W.map(pe=>({...pe})),edges:Z.map(pe=>({...pe})),viewport:{x:oe,y:ee,zoom:Me}}},deleteElements:async({nodes:W=[],edges:Z=[]})=>{const{nodes:se,edges:oe,onNodesDelete:ee,onEdgesDelete:Me,triggerNodeChanges:pe,triggerEdgeChanges:Pe,onDelete:ae,onBeforeDelete:Ne}=E.getState(),{nodes:Xe,edges:ln}=await QHn({nodesToRemove:W,edgesToRemove:Z,nodes:se,edges:oe,onBeforeDelete:Ne}),on=ln.length>0,An=Xe.length>0;if(on){const xn=ln.map(R1n);Me?.(ln),Pe(xn)}if(An){const xn=Xe.map(R1n);ee?.(Xe),pe(xn)}return(An||on)&&ae?.({nodes:Xe,edges:ln}),{deletedNodes:Xe,deletedEdges:ln}},getIntersectingNodes:(W,Z=!0,se)=>{const oe=a1n(W),ee=oe?W:U(W),Me=se!==void 0;return ee?(se||E.getState().nodes).filter(pe=>{const Pe=E.getState().nodeLookup.get(pe.id);if(Pe&&!oe&&(pe.id===W.id||!Pe.internals.positionAbsolute))return!1;const ae=mD(Me?pe:Pe),Ne=YG(ae,ee);return Z&&Ne>0||Ne>=ae.width*ae.height||Ne>=ee.width*ee.height}):[]},isNodeIntersecting:(W,Z,se=!0)=>{const ee=a1n(W)?W:U(W);if(!ee)return!1;const Me=YG(ee,Z);return se&&Me>0||Me>=Z.width*Z.height||Me>=ee.width*ee.height},updateNode:G,updateNodeData:(W,Z,se={replace:!1})=>{G(W,oe=>{const ee=typeof Z=="function"?Z(oe):Z;return se.replace?{...oe,data:ee}:{...oe,data:{...oe.data,...ee}}},se)},updateEdge:ie,updateEdgeData:(W,Z,se={replace:!1})=>{ie(W,oe=>{const ee=typeof Z=="function"?Z(oe):Z;return se.replace?{...oe,data:ee}:{...oe,data:{...oe.data,...ee}}},se)},getNodesBounds:W=>{const{nodeLookup:Z,nodeOrigin:se}=E.getState();return XHn(W,{nodeLookup:Z,nodeOrigin:se})},getHandleConnections:({type:W,id:Z,nodeId:se})=>Array.from(E.getState().connectionLookup.get(`${se}-${W}${Z?`-${Z}`:""}`)?.values()??[]),getNodeConnections:({type:W,handleId:Z,nodeId:se})=>Array.from(E.getState().connectionLookup.get(`${se}${W?Z?`-${W}-${Z}`:`-${W}`:""}`)?.values()??[]),fitView:async W=>{const Z=E.getState().fitViewResolver??nGn();return E.setState({fitViewQueued:!0,fitViewOptions:W,fitViewResolver:Z}),x.nodeQueue.push(se=>[...se]),Z.promise}}},[]);return Be.useMemo(()=>({...N,...g,viewportInitialized:M}),[M])}const F1n=g=>g.selected,Tqn=typeof window<"u"?window:void 0;function Oqn({deleteKeyCode:g,multiSelectionKeyCode:E}){const x=El(),{deleteElements:M}=Nke(),N=WG(g,{actInsideInputWithModifier:!1}),$=WG(E,{target:Tqn});Be.useEffect(()=>{if(N){const{edges:k,nodes:H}=x.getState();M({nodes:H.filter(F1n),edges:k.filter(F1n)}),x.setState({nodesSelectionActive:!1})}},[N]),Be.useEffect(()=>{x.setState({multiSelectionActive:$})},[$])}function Nqn(g){const E=El();Be.useEffect(()=>{const x=()=>{if(!g.current||!(g.current.checkVisibility?.()??!0))return!1;const M=xke(g.current);(M.height===0||M.width===0)&&E.getState().onError?.("004",a5.error004()),E.setState({width:M.width||500,height:M.height||500})};if(g.current){x(),window.addEventListener("resize",x);const M=new ResizeObserver(()=>x());return M.observe(g.current),()=>{window.removeEventListener("resize",x),M&&g.current&&M.unobserve(g.current)}}},[])}const zue={position:"absolute",width:"100%",height:"100%",top:0,left:0},Iqn=g=>({userSelectionActive:g.userSelectionActive,lib:g.lib,connectionInProgress:g.connection.inProgress});function Dqn({onPaneContextMenu:g,zoomOnScroll:E=!0,zoomOnPinch:x=!0,panOnScroll:M=!1,panOnScrollSpeed:N=.5,panOnScrollMode:$=EA.Free,zoomOnDoubleClick:k=!0,panOnDrag:H=!0,defaultViewport:U,translateExtent:G,minZoom:ie,maxZoom:W,zoomActivationKeyCode:Z,preventScrolling:se=!0,children:oe,noWheelClassName:ee,noPanClassName:Me,onViewportChange:pe,isControlledViewport:Pe,paneClickDistance:ae,selectionOnDrag:Ne}){const Xe=El(),ln=Be.useRef(null),{userSelectionActive:on,lib:An,connectionInProgress:xn}=zu(Iqn,jl),tt=WG(Z),vn=Be.useRef();Nqn(ln);const wn=Be.useCallback(Y=>{pe?.({x:Y[0],y:Y[1],zoom:Y[2]}),Pe||Xe.setState({transform:Y})},[pe,Pe]);return Be.useEffect(()=>{if(ln.current){vn.current=RGn({domNode:ln.current,minZoom:ie,maxZoom:W,translateExtent:G,viewport:U,onDraggingChange:xe=>Xe.setState(qe=>qe.paneDragging===xe?qe:{paneDragging:xe}),onPanZoomStart:(xe,qe)=>{const{onViewportChangeStart:fn,onMoveStart:$e}=Xe.getState();$e?.(xe,qe),fn?.(qe)},onPanZoom:(xe,qe)=>{const{onViewportChange:fn,onMove:$e}=Xe.getState();$e?.(xe,qe),fn?.(qe)},onPanZoomEnd:(xe,qe)=>{const{onViewportChangeEnd:fn,onMoveEnd:$e}=Xe.getState();$e?.(xe,qe),fn?.(qe)}});const{x:Y,y:Je,zoom:pn}=vn.current.getViewport();return Xe.setState({panZoom:vn.current,transform:[Y,Je,pn],domNode:ln.current.closest(".react-flow")}),()=>{vn.current?.destroy()}}},[]),Be.useEffect(()=>{vn.current?.update({onPaneContextMenu:g,zoomOnScroll:E,zoomOnPinch:x,panOnScroll:M,panOnScrollSpeed:N,panOnScrollMode:$,zoomOnDoubleClick:k,panOnDrag:H,zoomActivationKeyPressed:tt,preventScrolling:se,noPanClassName:Me,userSelectionActive:on,noWheelClassName:ee,lib:An,onTransformChange:wn,connectionInProgress:xn,selectionOnDrag:Ne,paneClickDistance:ae})},[g,E,x,M,N,$,k,H,tt,se,Me,on,ee,An,wn,xn,Ne,ae]),_.jsx("div",{className:"react-flow__renderer",ref:ln,style:zue,children:oe})}const _qn=g=>({userSelectionActive:g.userSelectionActive,userSelectionRect:g.userSelectionRect});function Lqn(){const{userSelectionActive:g,userSelectionRect:E}=zu(_qn,jl);return g&&E?_.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:E.width,height:E.height,transform:`translate(${E.x}px, ${E.y}px)`}}):null}const q7e=(g,E)=>x=>{x.target===E.current&&g?.(x)},Pqn=g=>({userSelectionActive:g.userSelectionActive,elementsSelectable:g.elementsSelectable,connectionInProgress:g.connection.inProgress,dragging:g.paneDragging});function $qn({isSelecting:g,selectionKeyPressed:E,selectionMode:x=KG.Full,panOnDrag:M,paneClickDistance:N,selectionOnDrag:$,onSelectionStart:k,onSelectionEnd:H,onPaneClick:U,onPaneContextMenu:G,onPaneScroll:ie,onPaneMouseEnter:W,onPaneMouseMove:Z,onPaneMouseLeave:se,children:oe}){const ee=El(),{userSelectionActive:Me,elementsSelectable:pe,dragging:Pe,connectionInProgress:ae}=zu(Pqn,jl),Ne=pe&&(g||Me),Xe=Be.useRef(null),ln=Be.useRef(),on=Be.useRef(new Set),An=Be.useRef(new Set),xn=Be.useRef(!1),tt=fn=>{if(xn.current||ae){xn.current=!1;return}U?.(fn),ee.getState().resetSelectedElements(),ee.setState({nodesSelectionActive:!1})},vn=fn=>{if(Array.isArray(M)&&M?.includes(2)){fn.preventDefault();return}G?.(fn)},wn=ie?fn=>ie(fn):void 0,Y=fn=>{xn.current&&(fn.stopPropagation(),xn.current=!1)},Je=fn=>{const{domNode:$e}=ee.getState();if(ln.current=$e?.getBoundingClientRect(),!ln.current)return;const Mn=fn.target===Xe.current;if(!Mn&&!!fn.target.closest(".nokey")||!g||!($&&Mn||E)||fn.button!==0||!fn.isPrimary)return;fn.target?.setPointerCapture?.(fn.pointerId),xn.current=!1;const{x:Hn,y:rt}=tv(fn.nativeEvent,ln.current);ee.setState({userSelectionRect:{width:0,height:0,startX:Hn,startY:rt,x:Hn,y:rt}}),Mn||(fn.stopPropagation(),fn.preventDefault())},pn=fn=>{const{userSelectionRect:$e,transform:Mn,nodeLookup:ye,edgeLookup:Re,connectionLookup:Hn,triggerNodeChanges:rt,triggerEdgeChanges:Jt,defaultEdgeOptions:di,resetSelectedElements:Gt}=ee.getState();if(!ln.current||!$e)return;const{x:xt,y:si}=tv(fn.nativeEvent,ln.current),{startX:Kr,startY:Er}=$e;if(!xn.current){const Fu=E?0:N;if(Math.hypot(xt-Kr,si-Er)<=Fu)return;Gt(),k?.(fn)}xn.current=!0;const Mt={startX:Kr,startY:Er,x:xtFu.id)),An.current=new Set;const cu=di?.selectable??!0;for(const Fu of on.current){const Rs=Hn.get(Fu);if(Rs)for(const{edgeId:ia}of Rs.values()){const ef=Re.get(ia);ef&&(ef.selectable??cu)&&An.current.add(ia)}}if(!h1n(bi,on.current)){const Fu=aD(ye,on.current,!0);rt(Fu)}if(!h1n(zi,An.current)){const Fu=aD(Re,An.current);Jt(Fu)}ee.setState({userSelectionRect:Mt,userSelectionActive:!0,nodesSelectionActive:!1})},xe=fn=>{fn.button===0&&(fn.target?.releasePointerCapture?.(fn.pointerId),!Me&&fn.target===Xe.current&&ee.getState().userSelectionRect&&tt?.(fn),ee.setState({userSelectionActive:!1,userSelectionRect:null}),xn.current&&(H?.(fn),ee.setState({nodesSelectionActive:on.current.size>0})))},qe=M===!0||Array.isArray(M)&&M.includes(0);return _.jsxs("div",{className:Ta(["react-flow__pane",{draggable:qe,dragging:Pe,selection:g}]),onClick:Ne?void 0:q7e(tt,Xe),onContextMenu:q7e(vn,Xe),onWheel:q7e(wn,Xe),onPointerEnter:Ne?void 0:W,onPointerMove:Ne?pn:Z,onPointerUp:Ne?xe:void 0,onPointerDownCapture:Ne?Je:void 0,onClickCapture:Ne?Y:void 0,onPointerLeave:se,ref:Xe,style:zue,children:[oe,_.jsx(Lqn,{})]})}function hke({id:g,store:E,unselect:x=!1,nodeRef:M}){const{addSelectedNodes:N,unselectNodesAndEdges:$,multiSelectionActive:k,nodeLookup:H,onError:U}=E.getState(),G=H.get(g);if(!G){U?.("012",a5.error012(g));return}E.setState({nodesSelectionActive:!1}),G.selected?(x||G.selected&&k)&&($({nodes:[G],edges:[]}),requestAnimationFrame(()=>M?.current?.blur())):N([g])}function S0n({nodeRef:g,disabled:E=!1,noDragClassName:x,handleSelector:M,nodeId:N,isSelectable:$,nodeClickDistance:k}){const H=El(),[U,G]=Be.useState(!1),ie=Be.useRef();return Be.useEffect(()=>{ie.current=SGn({getStoreItems:()=>H.getState(),onNodeMouseDown:W=>{hke({id:W,store:H,nodeRef:g})},onDragStart:()=>{G(!0)},onDragStop:()=>{G(!1)}})},[]),Be.useEffect(()=>{if(!(E||!g.current||!ie.current))return ie.current.update({noDragClassName:x,handleSelector:M,domNode:g.current,isSelectable:$,nodeId:N,nodeClickDistance:k}),()=>{ie.current?.destroy()}},[x,M,E,$,g,N,k]),U}const Rqn=g=>E=>E.selected&&(E.draggable||g&&typeof E.draggable>"u");function x0n(){const g=El();return Be.useCallback(x=>{const{nodeExtent:M,snapToGrid:N,snapGrid:$,nodesDraggable:k,onError:H,updateNodePositions:U,nodeLookup:G,nodeOrigin:ie}=g.getState(),W=new Map,Z=Rqn(k),se=N?$[0]:5,oe=N?$[1]:5,ee=x.direction.x*se*x.factor,Me=x.direction.y*oe*x.factor;for(const[,pe]of G){if(!Z(pe))continue;let Pe={x:pe.internals.positionAbsolute.x+ee,y:pe.internals.positionAbsolute.y+Me};N&&(Pe=rq(Pe,$));const{position:ae,positionAbsolute:Ne}=Gdn({nodeId:pe.id,nextPosition:Pe,nodeLookup:G,nodeExtent:M,nodeOrigin:ie,onError:H});pe.position=ae,pe.internals.positionAbsolute=Ne,W.set(pe.id,pe)}U(W)},[])}const Ike=Be.createContext(null),Bqn=Ike.Provider;Ike.Consumer;const A0n=()=>Be.useContext(Ike),zqn=g=>({connectOnClick:g.connectOnClick,noPanClassName:g.noPanClassName,rfId:g.rfId}),Fqn=(g,E,x)=>M=>{const{connectionClickStartHandle:N,connectionMode:$,connection:k}=M,{fromHandle:H,toHandle:U,isValid:G}=k,ie=U?.nodeId===g&&U?.id===E&&U?.type===x;return{connectingFrom:H?.nodeId===g&&H?.id===E&&H?.type===x,connectingTo:ie,clickConnecting:N?.nodeId===g&&N?.id===E&&N?.type===x,isPossibleEndHandle:$===wD.Strict?H?.type!==x:g!==H?.nodeId||E!==H?.id,connectionInProcess:!!H,clickConnectionInProcess:!!N,valid:ie&&G}};function Jqn({type:g="source",position:E=ur.Top,isValidConnection:x,isConnectable:M=!0,isConnectableStart:N=!0,isConnectableEnd:$=!0,id:k,onConnect:H,children:U,className:G,onMouseDown:ie,onTouchStart:W,...Z},se){const oe=k||null,ee=g==="target",Me=El(),pe=A0n(),{connectOnClick:Pe,noPanClassName:ae,rfId:Ne}=zu(zqn,jl),{connectingFrom:Xe,connectingTo:ln,clickConnecting:on,isPossibleEndHandle:An,connectionInProcess:xn,clickConnectionInProcess:tt,valid:vn}=zu(Fqn(pe,oe,g),jl);pe||Me.getState().onError?.("010",a5.error010());const wn=pn=>{const{defaultEdgeOptions:xe,onConnect:qe,hasDefaultEdges:fn}=Me.getState(),$e={...xe,...pn};if(fn){const{edges:Mn,setEdges:ye}=Me.getState();ye(sGn($e,Mn))}qe?.($e),H?.($e)},Y=pn=>{if(!pe)return;const xe=Wdn(pn.nativeEvent);if(N&&(xe&&pn.button===0||!xe)){const qe=Me.getState();fke.onPointerDown(pn.nativeEvent,{handleDomNode:pn.currentTarget,autoPanOnConnect:qe.autoPanOnConnect,connectionMode:qe.connectionMode,connectionRadius:qe.connectionRadius,domNode:qe.domNode,nodeLookup:qe.nodeLookup,lib:qe.lib,isTarget:ee,handleId:oe,nodeId:pe,flowId:qe.rfId,panBy:qe.panBy,cancelConnection:qe.cancelConnection,onConnectStart:qe.onConnectStart,onConnectEnd:(...fn)=>Me.getState().onConnectEnd?.(...fn),updateConnection:qe.updateConnection,onConnect:wn,isValidConnection:x||((...fn)=>Me.getState().isValidConnection?.(...fn)??!0),getTransform:()=>Me.getState().transform,getFromHandle:()=>Me.getState().connection.fromHandle,autoPanSpeed:qe.autoPanSpeed,dragThreshold:qe.connectionDragThreshold})}xe?ie?.(pn):W?.(pn)},Je=pn=>{const{onClickConnectStart:xe,onClickConnectEnd:qe,connectionClickStartHandle:fn,connectionMode:$e,isValidConnection:Mn,lib:ye,rfId:Re,nodeLookup:Hn,connection:rt}=Me.getState();if(!pe||!fn&&!N)return;if(!fn){xe?.(pn.nativeEvent,{nodeId:pe,handleId:oe,handleType:g}),Me.setState({connectionClickStartHandle:{nodeId:pe,type:g,id:oe}});return}const Jt=Ydn(pn.target),di=x||Mn,{connection:Gt,isValid:xt}=fke.isValid(pn.nativeEvent,{handle:{nodeId:pe,id:oe,type:g},connectionMode:$e,fromNodeId:fn.nodeId,fromHandleId:fn.id||null,fromType:fn.type,isValidConnection:di,flowId:Re,doc:Jt,lib:ye,nodeLookup:Hn});xt&&Gt&&wn(Gt);const si=structuredClone(rt);delete si.inProgress,si.toPosition=si.toHandle?si.toHandle.position:null,qe?.(pn,si),Me.setState({connectionClickStartHandle:null})};return _.jsx("div",{"data-handleid":oe,"data-nodeid":pe,"data-handlepos":E,"data-id":`${Ne}-${pe}-${oe}-${g}`,className:Ta(["react-flow__handle",`react-flow__handle-${E}`,"nodrag",ae,G,{source:!ee,target:ee,connectable:M,connectablestart:N,connectableend:$,clickconnecting:on,connectingfrom:Xe,connectingto:ln,valid:vn,connectionindicator:M&&(!xn||An)&&(xn||tt?$:N)}]),onMouseDown:Y,onTouchStart:Y,onClick:Pe?Je:void 0,ref:se,...Z,children:U})}const h5=Be.memo(j0n(Jqn));function Hqn({data:g,isConnectable:E,sourcePosition:x=ur.Bottom}){return _.jsxs(_.Fragment,{children:[g?.label,_.jsx(h5,{type:"source",position:x,isConnectable:E})]})}function Gqn({data:g,isConnectable:E,targetPosition:x=ur.Top,sourcePosition:M=ur.Bottom}){return _.jsxs(_.Fragment,{children:[_.jsx(h5,{type:"target",position:x,isConnectable:E}),g?.label,_.jsx(h5,{type:"source",position:M,isConnectable:E})]})}function qqn(){return null}function Uqn({data:g,isConnectable:E,targetPosition:x=ur.Top}){return _.jsxs(_.Fragment,{children:[_.jsx(h5,{type:"target",position:x,isConnectable:E}),g?.label]})}const Mue={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},J1n={input:Hqn,default:Gqn,output:Uqn,group:qqn};function Xqn(g){return g.internals.handleBounds===void 0?{width:g.width??g.initialWidth??g.style?.width,height:g.height??g.initialHeight??g.style?.height}:{width:g.width??g.style?.width,height:g.height??g.style?.height}}const Kqn=g=>{const{width:E,height:x,x:M,y:N}=iq(g.nodeLookup,{filter:$=>!!$.selected});return{width:nv(E)?E:null,height:nv(x)?x:null,userSelectionActive:g.userSelectionActive,transformString:`translate(${g.transform[0]}px,${g.transform[1]}px) scale(${g.transform[2]}) translate(${M}px,${N}px)`}};function Vqn({onSelectionContextMenu:g,noPanClassName:E,disableKeyboardA11y:x}){const M=El(),{width:N,height:$,transformString:k,userSelectionActive:H}=zu(Kqn,jl),U=x0n(),G=Be.useRef(null);Be.useEffect(()=>{x||G.current?.focus({preventScroll:!0})},[x]);const ie=!H&&N!==null&&$!==null;if(S0n({nodeRef:G,disabled:!ie}),!ie)return null;const W=g?se=>{const oe=M.getState().nodes.filter(ee=>ee.selected);g(se,oe)}:void 0,Z=se=>{Object.prototype.hasOwnProperty.call(Mue,se.key)&&(se.preventDefault(),U({direction:Mue[se.key],factor:se.shiftKey?4:1}))};return _.jsx("div",{className:Ta(["react-flow__nodesselection","react-flow__container",E]),style:{transform:k},children:_.jsx("div",{ref:G,className:"react-flow__nodesselection-rect",onContextMenu:W,tabIndex:x?void 0:-1,onKeyDown:x?void 0:Z,style:{width:N,height:$}})})}const H1n=typeof window<"u"?window:void 0,Yqn=g=>({nodesSelectionActive:g.nodesSelectionActive,userSelectionActive:g.userSelectionActive});function M0n({children:g,onPaneClick:E,onPaneMouseEnter:x,onPaneMouseMove:M,onPaneMouseLeave:N,onPaneContextMenu:$,onPaneScroll:k,paneClickDistance:H,deleteKeyCode:U,selectionKeyCode:G,selectionOnDrag:ie,selectionMode:W,onSelectionStart:Z,onSelectionEnd:se,multiSelectionKeyCode:oe,panActivationKeyCode:ee,zoomActivationKeyCode:Me,elementsSelectable:pe,zoomOnScroll:Pe,zoomOnPinch:ae,panOnScroll:Ne,panOnScrollSpeed:Xe,panOnScrollMode:ln,zoomOnDoubleClick:on,panOnDrag:An,defaultViewport:xn,translateExtent:tt,minZoom:vn,maxZoom:wn,preventScrolling:Y,onSelectionContextMenu:Je,noWheelClassName:pn,noPanClassName:xe,disableKeyboardA11y:qe,onViewportChange:fn,isControlledViewport:$e}){const{nodesSelectionActive:Mn,userSelectionActive:ye}=zu(Yqn,jl),Re=WG(G,{target:H1n}),Hn=WG(ee,{target:H1n}),rt=Hn||An,Jt=Hn||Ne,di=ie&&rt!==!0,Gt=Re||ye||di;return Oqn({deleteKeyCode:U,multiSelectionKeyCode:oe}),_.jsx(Dqn,{onPaneContextMenu:$,elementsSelectable:pe,zoomOnScroll:Pe,zoomOnPinch:ae,panOnScroll:Jt,panOnScrollSpeed:Xe,panOnScrollMode:ln,zoomOnDoubleClick:on,panOnDrag:!Re&&rt,defaultViewport:xn,translateExtent:tt,minZoom:vn,maxZoom:wn,zoomActivationKeyCode:Me,preventScrolling:Y,noWheelClassName:pn,noPanClassName:xe,onViewportChange:fn,isControlledViewport:$e,paneClickDistance:H,selectionOnDrag:di,children:_.jsxs($qn,{onSelectionStart:Z,onSelectionEnd:se,onPaneClick:E,onPaneMouseEnter:x,onPaneMouseMove:M,onPaneMouseLeave:N,onPaneContextMenu:$,onPaneScroll:k,panOnDrag:rt,isSelecting:!!Gt,selectionMode:W,selectionKeyPressed:Re,paneClickDistance:H,selectionOnDrag:di,children:[g,Mn&&_.jsx(Vqn,{onSelectionContextMenu:Je,noPanClassName:xe,disableKeyboardA11y:qe})]})})}M0n.displayName="FlowRenderer";const Qqn=Be.memo(M0n),Wqn=g=>E=>g?Eke(E.nodeLookup,{x:0,y:0,width:E.width,height:E.height},E.transform,!0).map(x=>x.id):Array.from(E.nodeLookup.keys());function Zqn(g){return zu(Be.useCallback(Wqn(g),[g]),jl)}const eUn=g=>g.updateNodeInternals;function nUn(){const g=zu(eUn),[E]=Be.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(x=>{const M=new Map;x.forEach(N=>{const $=N.target.getAttribute("data-id");M.set($,{id:$,nodeElement:N.target,force:!0})}),g(M)}));return Be.useEffect(()=>()=>{E?.disconnect()},[E]),E}function tUn({node:g,nodeType:E,hasDimensions:x,resizeObserver:M}){const N=El(),$=Be.useRef(null),k=Be.useRef(null),H=Be.useRef(g.sourcePosition),U=Be.useRef(g.targetPosition),G=Be.useRef(E),ie=x&&!!g.internals.handleBounds;return Be.useEffect(()=>{$.current&&!g.hidden&&(!ie||k.current!==$.current)&&(k.current&&M?.unobserve(k.current),M?.observe($.current),k.current=$.current)},[ie,g.hidden]),Be.useEffect(()=>()=>{k.current&&(M?.unobserve(k.current),k.current=null)},[]),Be.useEffect(()=>{if($.current){const W=G.current!==E,Z=H.current!==g.sourcePosition,se=U.current!==g.targetPosition;(W||Z||se)&&(G.current=E,H.current=g.sourcePosition,U.current=g.targetPosition,N.getState().updateNodeInternals(new Map([[g.id,{id:g.id,nodeElement:$.current,force:!0}]])))}},[g.id,E,g.sourcePosition,g.targetPosition]),$}function iUn({id:g,onClick:E,onMouseEnter:x,onMouseMove:M,onMouseLeave:N,onContextMenu:$,onDoubleClick:k,nodesDraggable:H,elementsSelectable:U,nodesConnectable:G,nodesFocusable:ie,resizeObserver:W,noDragClassName:Z,noPanClassName:se,disableKeyboardA11y:oe,rfId:ee,nodeTypes:Me,nodeClickDistance:pe,onError:Pe}){const{node:ae,internals:Ne,isParent:Xe}=zu(xt=>{const si=xt.nodeLookup.get(g),Kr=xt.parentLookup.has(g);return{node:si,internals:si.internals,isParent:Kr}},jl);let ln=ae.type||"default",on=Me?.[ln]||J1n[ln];on===void 0&&(Pe?.("003",a5.error003(ln)),ln="default",on=Me?.default||J1n.default);const An=!!(ae.draggable||H&&typeof ae.draggable>"u"),xn=!!(ae.selectable||U&&typeof ae.selectable>"u"),tt=!!(ae.connectable||G&&typeof ae.connectable>"u"),vn=!!(ae.focusable||ie&&typeof ae.focusable>"u"),wn=El(),Y=Kdn(ae),Je=tUn({node:ae,nodeType:ln,hasDimensions:Y,resizeObserver:W}),pn=S0n({nodeRef:Je,disabled:ae.hidden||!An,noDragClassName:Z,handleSelector:ae.dragHandle,nodeId:g,isSelectable:xn,nodeClickDistance:pe}),xe=x0n();if(ae.hidden)return null;const qe=s6(ae),fn=Xqn(ae),$e=xn||An||E||x||M||N,Mn=x?xt=>x(xt,{...Ne.userNode}):void 0,ye=M?xt=>M(xt,{...Ne.userNode}):void 0,Re=N?xt=>N(xt,{...Ne.userNode}):void 0,Hn=$?xt=>$(xt,{...Ne.userNode}):void 0,rt=k?xt=>k(xt,{...Ne.userNode}):void 0,Jt=xt=>{const{selectNodesOnDrag:si,nodeDragThreshold:Kr}=wn.getState();xn&&(!si||!An||Kr>0)&&hke({id:g,store:wn,nodeRef:Je}),E&&E(xt,{...Ne.userNode})},di=xt=>{if(!(Qdn(xt.nativeEvent)||oe)){if(Bdn.includes(xt.key)&&xn){const si=xt.key==="Escape";hke({id:g,store:wn,unselect:si,nodeRef:Je})}else if(An&&ae.selected&&Object.prototype.hasOwnProperty.call(Mue,xt.key)){xt.preventDefault();const{ariaLabelConfig:si}=wn.getState();wn.setState({ariaLiveMessage:si["node.a11yDescription.ariaLiveMessage"]({direction:xt.key.replace("Arrow","").toLowerCase(),x:~~Ne.positionAbsolute.x,y:~~Ne.positionAbsolute.y})}),xe({direction:Mue[xt.key],factor:xt.shiftKey?4:1})}}},Gt=()=>{if(oe||!Je.current?.matches(":focus-visible"))return;const{transform:xt,width:si,height:Kr,autoPanOnNodeFocus:Er,setCenter:Mt}=wn.getState();if(!Er)return;Eke(new Map([[g,ae]]),{x:0,y:0,width:si,height:Kr},xt,!0).length>0||Mt(ae.position.x+qe.width/2,ae.position.y+qe.height/2,{zoom:xt[2]})};return _.jsx("div",{className:Ta(["react-flow__node",`react-flow__node-${ln}`,{[se]:An},ae.className,{selected:ae.selected,selectable:xn,parent:Xe,draggable:An,dragging:pn}]),ref:Je,style:{zIndex:Ne.z,transform:`translate(${Ne.positionAbsolute.x}px,${Ne.positionAbsolute.y}px)`,pointerEvents:$e?"all":"none",visibility:Y?"visible":"hidden",...ae.style,...fn},"data-id":g,"data-testid":`rf__node-${g}`,onMouseEnter:Mn,onMouseMove:ye,onMouseLeave:Re,onContextMenu:Hn,onClick:Jt,onDoubleClick:rt,onKeyDown:vn?di:void 0,tabIndex:vn?0:void 0,onFocus:vn?Gt:void 0,role:ae.ariaRole??(vn?"group":void 0),"aria-roledescription":"node","aria-describedby":oe?void 0:`${w0n}-${ee}`,"aria-label":ae.ariaLabel,...ae.domAttributes,children:_.jsx(Bqn,{value:g,children:_.jsx(on,{id:g,data:ae.data,type:ln,positionAbsoluteX:Ne.positionAbsolute.x,positionAbsoluteY:Ne.positionAbsolute.y,selected:ae.selected??!1,selectable:xn,draggable:An,deletable:ae.deletable??!0,isConnectable:tt,sourcePosition:ae.sourcePosition,targetPosition:ae.targetPosition,dragging:pn,dragHandle:ae.dragHandle,zIndex:Ne.z,parentId:ae.parentId,...qe})})})}var rUn=Be.memo(iUn);const cUn=g=>({nodesDraggable:g.nodesDraggable,nodesConnectable:g.nodesConnectable,nodesFocusable:g.nodesFocusable,elementsSelectable:g.elementsSelectable,onError:g.onError});function C0n(g){const{nodesDraggable:E,nodesConnectable:x,nodesFocusable:M,elementsSelectable:N,onError:$}=zu(cUn,jl),k=Zqn(g.onlyRenderVisibleElements),H=nUn();return _.jsx("div",{className:"react-flow__nodes",style:zue,children:k.map(U=>_.jsx(rUn,{id:U,nodeTypes:g.nodeTypes,nodeExtent:g.nodeExtent,onClick:g.onNodeClick,onMouseEnter:g.onNodeMouseEnter,onMouseMove:g.onNodeMouseMove,onMouseLeave:g.onNodeMouseLeave,onContextMenu:g.onNodeContextMenu,onDoubleClick:g.onNodeDoubleClick,noDragClassName:g.noDragClassName,noPanClassName:g.noPanClassName,rfId:g.rfId,disableKeyboardA11y:g.disableKeyboardA11y,resizeObserver:H,nodesDraggable:E,nodesConnectable:x,nodesFocusable:M,elementsSelectable:N,nodeClickDistance:g.nodeClickDistance,onError:$},U))})}C0n.displayName="NodeRenderer";const uUn=Be.memo(C0n);function oUn(g){return zu(Be.useCallback(x=>{if(!g)return x.edges.map(N=>N.id);const M=[];if(x.width&&x.height)for(const N of x.edges){const $=x.nodeLookup.get(N.source),k=x.nodeLookup.get(N.target);$&&k&&cGn({sourceNode:$,targetNode:k,width:x.width,height:x.height,transform:x.transform})&&M.push(N.id)}return M},[g]),jl)}const sUn=({color:g="none",strokeWidth:E=1})=>{const x={strokeWidth:E,...g&&{stroke:g}};return _.jsx("polyline",{className:"arrow",style:x,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},lUn=({color:g="none",strokeWidth:E=1})=>{const x={strokeWidth:E,...g&&{stroke:g,fill:g}};return _.jsx("polyline",{className:"arrowclosed",style:x,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},G1n={[VG.Arrow]:sUn,[VG.ArrowClosed]:lUn};function fUn(g){const E=El();return Be.useMemo(()=>Object.prototype.hasOwnProperty.call(G1n,g)?G1n[g]:(E.getState().onError?.("009",a5.error009(g)),null),[g])}const aUn=({id:g,type:E,color:x,width:M=12.5,height:N=12.5,markerUnits:$="strokeWidth",strokeWidth:k,orient:H="auto-start-reverse"})=>{const U=fUn(E);return U?_.jsx("marker",{className:"react-flow__arrowhead",id:g,markerWidth:`${M}`,markerHeight:`${N}`,viewBox:"-10 -10 20 20",markerUnits:$,orient:H,refX:"0",refY:"0",children:_.jsx(U,{color:x,strokeWidth:k})}):null},T0n=({defaultColor:g,rfId:E})=>{const x=zu($=>$.edges),M=zu($=>$.defaultEdgeOptions),N=Be.useMemo(()=>dGn(x,{id:E,defaultColor:g,defaultMarkerStart:M?.markerStart,defaultMarkerEnd:M?.markerEnd}),[x,M,E,g]);return N.length?_.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:_.jsx("defs",{children:N.map($=>_.jsx(aUn,{id:$.id,type:$.type,color:$.color,width:$.width,height:$.height,markerUnits:$.markerUnits,strokeWidth:$.strokeWidth,orient:$.orient},$.id))})}):null};T0n.displayName="MarkerDefinitions";var hUn=Be.memo(T0n);function O0n({x:g,y:E,label:x,labelStyle:M,labelShowBg:N=!0,labelBgStyle:$,labelBgPadding:k=[2,4],labelBgBorderRadius:H=2,children:U,className:G,...ie}){const[W,Z]=Be.useState({x:1,y:0,width:0,height:0}),se=Ta(["react-flow__edge-textwrapper",G]),oe=Be.useRef(null);return Be.useEffect(()=>{if(oe.current){const ee=oe.current.getBBox();Z({x:ee.x,y:ee.y,width:ee.width,height:ee.height})}},[x]),x?_.jsxs("g",{transform:`translate(${g-W.width/2} ${E-W.height/2})`,className:se,visibility:W.width?"visible":"hidden",...ie,children:[N&&_.jsx("rect",{width:W.width+2*k[0],x:-k[0],y:-k[1],height:W.height+2*k[1],className:"react-flow__edge-textbg",style:$,rx:H,ry:H}),_.jsx("text",{className:"react-flow__edge-text",y:W.height/2,dy:"0.3em",ref:oe,style:M,children:x}),U]}):null}O0n.displayName="EdgeText";const dUn=Be.memo(O0n);function uq({path:g,labelX:E,labelY:x,label:M,labelStyle:N,labelShowBg:$,labelBgStyle:k,labelBgPadding:H,labelBgBorderRadius:U,interactionWidth:G=20,...ie}){return _.jsxs(_.Fragment,{children:[_.jsx("path",{...ie,d:g,fill:"none",className:Ta(["react-flow__edge-path",ie.className])}),G?_.jsx("path",{d:g,fill:"none",strokeOpacity:0,strokeWidth:G,className:"react-flow__edge-interaction"}):null,M&&nv(E)&&nv(x)?_.jsx(dUn,{x:E,y:x,label:M,labelStyle:N,labelShowBg:$,labelBgStyle:k,labelBgPadding:H,labelBgBorderRadius:U}):null]})}function q1n({pos:g,x1:E,y1:x,x2:M,y2:N}){return g===ur.Left||g===ur.Right?[.5*(E+M),x]:[E,.5*(x+N)]}function N0n({sourceX:g,sourceY:E,sourcePosition:x=ur.Bottom,targetX:M,targetY:N,targetPosition:$=ur.Top}){const[k,H]=q1n({pos:x,x1:g,y1:E,x2:M,y2:N}),[U,G]=q1n({pos:$,x1:M,y1:N,x2:g,y2:E}),[ie,W,Z,se]=Zdn({sourceX:g,sourceY:E,targetX:M,targetY:N,sourceControlX:k,sourceControlY:H,targetControlX:U,targetControlY:G});return[`M${g},${E} C${k},${H} ${U},${G} ${M},${N}`,ie,W,Z,se]}function I0n(g){return Be.memo(({id:E,sourceX:x,sourceY:M,targetX:N,targetY:$,sourcePosition:k,targetPosition:H,label:U,labelStyle:G,labelShowBg:ie,labelBgStyle:W,labelBgPadding:Z,labelBgBorderRadius:se,style:oe,markerEnd:ee,markerStart:Me,interactionWidth:pe})=>{const[Pe,ae,Ne]=N0n({sourceX:x,sourceY:M,sourcePosition:k,targetX:N,targetY:$,targetPosition:H}),Xe=g.isInternal?void 0:E;return _.jsx(uq,{id:Xe,path:Pe,labelX:ae,labelY:Ne,label:U,labelStyle:G,labelShowBg:ie,labelBgStyle:W,labelBgPadding:Z,labelBgBorderRadius:se,style:oe,markerEnd:ee,markerStart:Me,interactionWidth:pe})})}const bUn=I0n({isInternal:!1}),D0n=I0n({isInternal:!0});bUn.displayName="SimpleBezierEdge";D0n.displayName="SimpleBezierEdgeInternal";function _0n(g){return Be.memo(({id:E,sourceX:x,sourceY:M,targetX:N,targetY:$,label:k,labelStyle:H,labelShowBg:U,labelBgStyle:G,labelBgPadding:ie,labelBgBorderRadius:W,style:Z,sourcePosition:se=ur.Bottom,targetPosition:oe=ur.Top,markerEnd:ee,markerStart:Me,pathOptions:pe,interactionWidth:Pe})=>{const[ae,Ne,Xe]=Aue({sourceX:x,sourceY:M,sourcePosition:se,targetX:N,targetY:$,targetPosition:oe,borderRadius:pe?.borderRadius,offset:pe?.offset,stepPosition:pe?.stepPosition}),ln=g.isInternal?void 0:E;return _.jsx(uq,{id:ln,path:ae,labelX:Ne,labelY:Xe,label:k,labelStyle:H,labelShowBg:U,labelBgStyle:G,labelBgPadding:ie,labelBgBorderRadius:W,style:Z,markerEnd:ee,markerStart:Me,interactionWidth:Pe})})}const L0n=_0n({isInternal:!1}),P0n=_0n({isInternal:!0});L0n.displayName="SmoothStepEdge";P0n.displayName="SmoothStepEdgeInternal";function $0n(g){return Be.memo(({id:E,...x})=>{const M=g.isInternal?void 0:E;return _.jsx(L0n,{...x,id:M,pathOptions:Be.useMemo(()=>({borderRadius:0,offset:x.pathOptions?.offset}),[x.pathOptions?.offset])})})}const gUn=$0n({isInternal:!1}),R0n=$0n({isInternal:!0});gUn.displayName="StepEdge";R0n.displayName="StepEdgeInternal";function B0n(g){return Be.memo(({id:E,sourceX:x,sourceY:M,targetX:N,targetY:$,label:k,labelStyle:H,labelShowBg:U,labelBgStyle:G,labelBgPadding:ie,labelBgBorderRadius:W,style:Z,markerEnd:se,markerStart:oe,interactionWidth:ee})=>{const[Me,pe,Pe]=t0n({sourceX:x,sourceY:M,targetX:N,targetY:$}),ae=g.isInternal?void 0:E;return _.jsx(uq,{id:ae,path:Me,labelX:pe,labelY:Pe,label:k,labelStyle:H,labelShowBg:U,labelBgStyle:G,labelBgPadding:ie,labelBgBorderRadius:W,style:Z,markerEnd:se,markerStart:oe,interactionWidth:ee})})}const wUn=B0n({isInternal:!1}),z0n=B0n({isInternal:!0});wUn.displayName="StraightEdge";z0n.displayName="StraightEdgeInternal";function F0n(g){return Be.memo(({id:E,sourceX:x,sourceY:M,targetX:N,targetY:$,sourcePosition:k=ur.Bottom,targetPosition:H=ur.Top,label:U,labelStyle:G,labelShowBg:ie,labelBgStyle:W,labelBgPadding:Z,labelBgBorderRadius:se,style:oe,markerEnd:ee,markerStart:Me,pathOptions:pe,interactionWidth:Pe})=>{const[ae,Ne,Xe]=e0n({sourceX:x,sourceY:M,sourcePosition:k,targetX:N,targetY:$,targetPosition:H,curvature:pe?.curvature}),ln=g.isInternal?void 0:E;return _.jsx(uq,{id:ln,path:ae,labelX:Ne,labelY:Xe,label:U,labelStyle:G,labelShowBg:ie,labelBgStyle:W,labelBgPadding:Z,labelBgBorderRadius:se,style:oe,markerEnd:ee,markerStart:Me,interactionWidth:Pe})})}const pUn=F0n({isInternal:!1}),J0n=F0n({isInternal:!0});pUn.displayName="BezierEdge";J0n.displayName="BezierEdgeInternal";const U1n={default:J0n,straight:z0n,step:R0n,smoothstep:P0n,simplebezier:D0n},X1n={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},mUn=(g,E,x)=>x===ur.Left?g-E:x===ur.Right?g+E:g,vUn=(g,E,x)=>x===ur.Top?g-E:x===ur.Bottom?g+E:g,K1n="react-flow__edgeupdater";function V1n({position:g,centerX:E,centerY:x,radius:M=10,onMouseDown:N,onMouseEnter:$,onMouseOut:k,type:H}){return _.jsx("circle",{onMouseDown:N,onMouseEnter:$,onMouseOut:k,className:Ta([K1n,`${K1n}-${H}`]),cx:mUn(E,M,g),cy:vUn(x,M,g),r:M,stroke:"transparent",fill:"transparent"})}function yUn({isReconnectable:g,reconnectRadius:E,edge:x,sourceX:M,sourceY:N,targetX:$,targetY:k,sourcePosition:H,targetPosition:U,onReconnect:G,onReconnectStart:ie,onReconnectEnd:W,setReconnecting:Z,setUpdateHover:se}){const oe=El(),ee=(Ne,Xe)=>{if(Ne.button!==0)return;const{autoPanOnConnect:ln,domNode:on,connectionMode:An,connectionRadius:xn,lib:tt,onConnectStart:vn,cancelConnection:wn,nodeLookup:Y,rfId:Je,panBy:pn,updateConnection:xe}=oe.getState(),qe=Xe.type==="target",fn=(ye,Re)=>{Z(!1),W?.(ye,x,Xe.type,Re)},$e=ye=>G?.(x,ye),Mn=(ye,Re)=>{Z(!0),ie?.(Ne,x,Xe.type),vn?.(ye,Re)};fke.onPointerDown(Ne.nativeEvent,{autoPanOnConnect:ln,connectionMode:An,connectionRadius:xn,domNode:on,handleId:Xe.id,nodeId:Xe.nodeId,nodeLookup:Y,isTarget:qe,edgeUpdaterType:Xe.type,lib:tt,flowId:Je,cancelConnection:wn,panBy:pn,isValidConnection:(...ye)=>oe.getState().isValidConnection?.(...ye)??!0,onConnect:$e,onConnectStart:Mn,onConnectEnd:(...ye)=>oe.getState().onConnectEnd?.(...ye),onReconnectEnd:fn,updateConnection:xe,getTransform:()=>oe.getState().transform,getFromHandle:()=>oe.getState().connection.fromHandle,dragThreshold:oe.getState().connectionDragThreshold,handleDomNode:Ne.currentTarget})},Me=Ne=>ee(Ne,{nodeId:x.target,id:x.targetHandle??null,type:"target"}),pe=Ne=>ee(Ne,{nodeId:x.source,id:x.sourceHandle??null,type:"source"}),Pe=()=>se(!0),ae=()=>se(!1);return _.jsxs(_.Fragment,{children:[(g===!0||g==="source")&&_.jsx(V1n,{position:H,centerX:M,centerY:N,radius:E,onMouseDown:Me,onMouseEnter:Pe,onMouseOut:ae,type:"source"}),(g===!0||g==="target")&&_.jsx(V1n,{position:U,centerX:$,centerY:k,radius:E,onMouseDown:pe,onMouseEnter:Pe,onMouseOut:ae,type:"target"})]})}function kUn({id:g,edgesFocusable:E,edgesReconnectable:x,elementsSelectable:M,onClick:N,onDoubleClick:$,onContextMenu:k,onMouseEnter:H,onMouseMove:U,onMouseLeave:G,reconnectRadius:ie,onReconnect:W,onReconnectStart:Z,onReconnectEnd:se,rfId:oe,edgeTypes:ee,noPanClassName:Me,onError:pe,disableKeyboardA11y:Pe}){let ae=zu(Mt=>Mt.edgeLookup.get(g));const Ne=zu(Mt=>Mt.defaultEdgeOptions);ae=Ne?{...Ne,...ae}:ae;let Xe=ae.type||"default",ln=ee?.[Xe]||U1n[Xe];ln===void 0&&(pe?.("011",a5.error011(Xe)),Xe="default",ln=ee?.default||U1n.default);const on=!!(ae.focusable||E&&typeof ae.focusable>"u"),An=typeof W<"u"&&(ae.reconnectable||x&&typeof ae.reconnectable>"u"),xn=!!(ae.selectable||M&&typeof ae.selectable>"u"),tt=Be.useRef(null),[vn,wn]=Be.useState(!1),[Y,Je]=Be.useState(!1),pn=El(),{zIndex:xe,sourceX:qe,sourceY:fn,targetX:$e,targetY:Mn,sourcePosition:ye,targetPosition:Re}=zu(Be.useCallback(Mt=>{const bi=Mt.nodeLookup.get(ae.source),zi=Mt.nodeLookup.get(ae.target);if(!bi||!zi)return{zIndex:ae.zIndex,...X1n};const cu=hGn({id:g,sourceNode:bi,targetNode:zi,sourceHandle:ae.sourceHandle||null,targetHandle:ae.targetHandle||null,connectionMode:Mt.connectionMode,onError:pe});return{zIndex:rGn({selected:ae.selected,zIndex:ae.zIndex,sourceNode:bi,targetNode:zi,elevateOnSelect:Mt.elevateEdgesOnSelect,zIndexMode:Mt.zIndexMode}),...cu||X1n}},[ae.source,ae.target,ae.sourceHandle,ae.targetHandle,ae.selected,ae.zIndex]),jl),Hn=Be.useMemo(()=>ae.markerStart?`url('#${ske(ae.markerStart,oe)}')`:void 0,[ae.markerStart,oe]),rt=Be.useMemo(()=>ae.markerEnd?`url('#${ske(ae.markerEnd,oe)}')`:void 0,[ae.markerEnd,oe]);if(ae.hidden||qe===null||fn===null||$e===null||Mn===null)return null;const Jt=Mt=>{const{addSelectedEdges:bi,unselectNodesAndEdges:zi,multiSelectionActive:cu}=pn.getState();xn&&(pn.setState({nodesSelectionActive:!1}),ae.selected&&cu?(zi({nodes:[],edges:[ae]}),tt.current?.blur()):bi([g])),N&&N(Mt,ae)},di=$?Mt=>{$(Mt,{...ae})}:void 0,Gt=k?Mt=>{k(Mt,{...ae})}:void 0,xt=H?Mt=>{H(Mt,{...ae})}:void 0,si=U?Mt=>{U(Mt,{...ae})}:void 0,Kr=G?Mt=>{G(Mt,{...ae})}:void 0,Er=Mt=>{if(!Pe&&Bdn.includes(Mt.key)&&xn){const{unselectNodesAndEdges:bi,addSelectedEdges:zi}=pn.getState();Mt.key==="Escape"?(tt.current?.blur(),bi({edges:[ae]})):zi([g])}};return _.jsx("svg",{style:{zIndex:xe},children:_.jsxs("g",{className:Ta(["react-flow__edge",`react-flow__edge-${Xe}`,ae.className,Me,{selected:ae.selected,animated:ae.animated,inactive:!xn&&!N,updating:vn,selectable:xn}]),onClick:Jt,onDoubleClick:di,onContextMenu:Gt,onMouseEnter:xt,onMouseMove:si,onMouseLeave:Kr,onKeyDown:on?Er:void 0,tabIndex:on?0:void 0,role:ae.ariaRole??(on?"group":"img"),"aria-roledescription":"edge","data-id":g,"data-testid":`rf__edge-${g}`,"aria-label":ae.ariaLabel===null?void 0:ae.ariaLabel||`Edge from ${ae.source} to ${ae.target}`,"aria-describedby":on?`${p0n}-${oe}`:void 0,ref:tt,...ae.domAttributes,children:[!Y&&_.jsx(ln,{id:g,source:ae.source,target:ae.target,type:ae.type,selected:ae.selected,animated:ae.animated,selectable:xn,deletable:ae.deletable??!0,label:ae.label,labelStyle:ae.labelStyle,labelShowBg:ae.labelShowBg,labelBgStyle:ae.labelBgStyle,labelBgPadding:ae.labelBgPadding,labelBgBorderRadius:ae.labelBgBorderRadius,sourceX:qe,sourceY:fn,targetX:$e,targetY:Mn,sourcePosition:ye,targetPosition:Re,data:ae.data,style:ae.style,sourceHandleId:ae.sourceHandle,targetHandleId:ae.targetHandle,markerStart:Hn,markerEnd:rt,pathOptions:"pathOptions"in ae?ae.pathOptions:void 0,interactionWidth:ae.interactionWidth}),An&&_.jsx(yUn,{edge:ae,isReconnectable:An,reconnectRadius:ie,onReconnect:W,onReconnectStart:Z,onReconnectEnd:se,sourceX:qe,sourceY:fn,targetX:$e,targetY:Mn,sourcePosition:ye,targetPosition:Re,setUpdateHover:wn,setReconnecting:Je})]})})}var jUn=Be.memo(kUn);const EUn=g=>({edgesFocusable:g.edgesFocusable,edgesReconnectable:g.edgesReconnectable,elementsSelectable:g.elementsSelectable,connectionMode:g.connectionMode,onError:g.onError});function H0n({defaultMarkerColor:g,onlyRenderVisibleElements:E,rfId:x,edgeTypes:M,noPanClassName:N,onReconnect:$,onEdgeContextMenu:k,onEdgeMouseEnter:H,onEdgeMouseMove:U,onEdgeMouseLeave:G,onEdgeClick:ie,reconnectRadius:W,onEdgeDoubleClick:Z,onReconnectStart:se,onReconnectEnd:oe,disableKeyboardA11y:ee}){const{edgesFocusable:Me,edgesReconnectable:pe,elementsSelectable:Pe,onError:ae}=zu(EUn,jl),Ne=oUn(E);return _.jsxs("div",{className:"react-flow__edges",children:[_.jsx(hUn,{defaultColor:g,rfId:x}),Ne.map(Xe=>_.jsx(jUn,{id:Xe,edgesFocusable:Me,edgesReconnectable:pe,elementsSelectable:Pe,noPanClassName:N,onReconnect:$,onContextMenu:k,onMouseEnter:H,onMouseMove:U,onMouseLeave:G,onClick:ie,reconnectRadius:W,onDoubleClick:Z,onReconnectStart:se,onReconnectEnd:oe,rfId:x,onError:ae,edgeTypes:M,disableKeyboardA11y:ee},Xe))]})}H0n.displayName="EdgeRenderer";const SUn=Be.memo(H0n),xUn=g=>`translate(${g.transform[0]}px,${g.transform[1]}px) scale(${g.transform[2]})`;function AUn({children:g}){const E=zu(xUn);return _.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:E},children:g})}function MUn(g){const E=Nke(),x=Be.useRef(!1);Be.useEffect(()=>{!x.current&&E.viewportInitialized&&g&&(setTimeout(()=>g(E),1),x.current=!0)},[g,E.viewportInitialized])}const CUn=g=>g.panZoom?.syncViewport;function TUn(g){const E=zu(CUn),x=El();return Be.useEffect(()=>{g&&(E?.(g),x.setState({transform:[g.x,g.y,g.zoom]}))},[g,E]),null}function OUn(g){return g.connection.inProgress?{...g.connection,to:cq(g.connection.to,g.transform)}:{...g.connection}}function NUn(g){return OUn}function IUn(g){const E=NUn();return zu(E,jl)}const DUn=g=>({nodesConnectable:g.nodesConnectable,isValid:g.connection.isValid,inProgress:g.connection.inProgress,width:g.width,height:g.height});function _Un({containerStyle:g,style:E,type:x,component:M}){const{nodesConnectable:N,width:$,height:k,isValid:H,inProgress:U}=zu(DUn,jl);return!($&&N&&U)?null:_.jsx("svg",{style:g,width:$,height:k,className:"react-flow__connectionline react-flow__container",children:_.jsx("g",{className:Ta(["react-flow__connection",Jdn(H)]),children:_.jsx(G0n,{style:E,type:x,CustomComponent:M,isValid:H})})})}const G0n=({style:g,type:E=ek.Bezier,CustomComponent:x,isValid:M})=>{const{inProgress:N,from:$,fromNode:k,fromHandle:H,fromPosition:U,to:G,toNode:ie,toHandle:W,toPosition:Z,pointer:se}=IUn();if(!N)return;if(x)return _.jsx(x,{connectionLineType:E,connectionLineStyle:g,fromNode:k,fromHandle:H,fromX:$.x,fromY:$.y,toX:G.x,toY:G.y,fromPosition:U,toPosition:Z,connectionStatus:Jdn(M),toNode:ie,toHandle:W,pointer:se});let oe="";const ee={sourceX:$.x,sourceY:$.y,sourcePosition:U,targetX:G.x,targetY:G.y,targetPosition:Z};switch(E){case ek.Bezier:[oe]=e0n(ee);break;case ek.SimpleBezier:[oe]=N0n(ee);break;case ek.Step:[oe]=Aue({...ee,borderRadius:0});break;case ek.SmoothStep:[oe]=Aue(ee);break;default:[oe]=t0n(ee)}return _.jsx("path",{d:oe,fill:"none",className:"react-flow__connection-path",style:g})};G0n.displayName="ConnectionLine";const LUn={};function Y1n(g=LUn){Be.useRef(g),El(),Be.useEffect(()=>{},[g])}function PUn(){El(),Be.useRef(!1),Be.useEffect(()=>{},[])}function q0n({nodeTypes:g,edgeTypes:E,onInit:x,onNodeClick:M,onEdgeClick:N,onNodeDoubleClick:$,onEdgeDoubleClick:k,onNodeMouseEnter:H,onNodeMouseMove:U,onNodeMouseLeave:G,onNodeContextMenu:ie,onSelectionContextMenu:W,onSelectionStart:Z,onSelectionEnd:se,connectionLineType:oe,connectionLineStyle:ee,connectionLineComponent:Me,connectionLineContainerStyle:pe,selectionKeyCode:Pe,selectionOnDrag:ae,selectionMode:Ne,multiSelectionKeyCode:Xe,panActivationKeyCode:ln,zoomActivationKeyCode:on,deleteKeyCode:An,onlyRenderVisibleElements:xn,elementsSelectable:tt,defaultViewport:vn,translateExtent:wn,minZoom:Y,maxZoom:Je,preventScrolling:pn,defaultMarkerColor:xe,zoomOnScroll:qe,zoomOnPinch:fn,panOnScroll:$e,panOnScrollSpeed:Mn,panOnScrollMode:ye,zoomOnDoubleClick:Re,panOnDrag:Hn,onPaneClick:rt,onPaneMouseEnter:Jt,onPaneMouseMove:di,onPaneMouseLeave:Gt,onPaneScroll:xt,onPaneContextMenu:si,paneClickDistance:Kr,nodeClickDistance:Er,onEdgeContextMenu:Mt,onEdgeMouseEnter:bi,onEdgeMouseMove:zi,onEdgeMouseLeave:cu,reconnectRadius:Fu,onReconnect:Rs,onReconnectStart:ia,onReconnectEnd:ef,noDragClassName:Oa,noWheelClassName:Cc,noPanClassName:o0,disableKeyboardA11y:xb,nodeExtent:Sl,rfId:cd,viewport:s0,onViewportChange:uh}){return Y1n(g),Y1n(E),PUn(),MUn(x),TUn(s0),_.jsx(Qqn,{onPaneClick:rt,onPaneMouseEnter:Jt,onPaneMouseMove:di,onPaneMouseLeave:Gt,onPaneContextMenu:si,onPaneScroll:xt,paneClickDistance:Kr,deleteKeyCode:An,selectionKeyCode:Pe,selectionOnDrag:ae,selectionMode:Ne,onSelectionStart:Z,onSelectionEnd:se,multiSelectionKeyCode:Xe,panActivationKeyCode:ln,zoomActivationKeyCode:on,elementsSelectable:tt,zoomOnScroll:qe,zoomOnPinch:fn,zoomOnDoubleClick:Re,panOnScroll:$e,panOnScrollSpeed:Mn,panOnScrollMode:ye,panOnDrag:Hn,defaultViewport:vn,translateExtent:wn,minZoom:Y,maxZoom:Je,onSelectionContextMenu:W,preventScrolling:pn,noDragClassName:Oa,noWheelClassName:Cc,noPanClassName:o0,disableKeyboardA11y:xb,onViewportChange:uh,isControlledViewport:!!s0,children:_.jsxs(AUn,{children:[_.jsx(SUn,{edgeTypes:E,onEdgeClick:N,onEdgeDoubleClick:k,onReconnect:Rs,onReconnectStart:ia,onReconnectEnd:ef,onlyRenderVisibleElements:xn,onEdgeContextMenu:Mt,onEdgeMouseEnter:bi,onEdgeMouseMove:zi,onEdgeMouseLeave:cu,reconnectRadius:Fu,defaultMarkerColor:xe,noPanClassName:o0,disableKeyboardA11y:xb,rfId:cd}),_.jsx(_Un,{style:ee,type:oe,component:Me,containerStyle:pe}),_.jsx("div",{className:"react-flow__edgelabel-renderer"}),_.jsx(uUn,{nodeTypes:g,onNodeClick:M,onNodeDoubleClick:$,onNodeMouseEnter:H,onNodeMouseMove:U,onNodeMouseLeave:G,onNodeContextMenu:ie,nodeClickDistance:Er,onlyRenderVisibleElements:xn,noPanClassName:o0,noDragClassName:Oa,disableKeyboardA11y:xb,nodeExtent:Sl,rfId:cd}),_.jsx("div",{className:"react-flow__viewport-portal"})]})})}q0n.displayName="GraphView";const $Un=Be.memo(q0n),Q1n=({nodes:g,edges:E,defaultNodes:x,defaultEdges:M,width:N,height:$,fitView:k,fitViewOptions:H,minZoom:U=.5,maxZoom:G=2,nodeOrigin:ie,nodeExtent:W,zIndexMode:Z="basic"}={})=>{const se=new Map,oe=new Map,ee=new Map,Me=new Map,pe=M??E??[],Pe=x??g??[],ae=ie??[0,0],Ne=W??XG;c0n(ee,Me,pe);const{nodesInitialized:Xe}=lke(Pe,se,oe,{nodeOrigin:ae,nodeExtent:Ne,zIndexMode:Z});let ln=[0,0,1];if(k&&N&&$){const on=iq(se,{filter:vn=>!!((vn.width||vn.initialWidth)&&(vn.height||vn.initialHeight))}),{x:An,y:xn,zoom:tt}=Ske(on,N,$,U,G,H?.padding??.1);ln=[An,xn,tt]}return{rfId:"1",width:N??0,height:$??0,transform:ln,nodes:Pe,nodesInitialized:Xe,nodeLookup:se,parentLookup:oe,edges:pe,edgeLookup:Me,connectionLookup:ee,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:x!==void 0,hasDefaultEdges:M!==void 0,panZoom:null,minZoom:U,maxZoom:G,translateExtent:XG,nodeExtent:Ne,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:wD.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:ae,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:k??!1,fitViewOptions:H,fitViewResolver:null,connection:{...Fdn},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:WHn,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:zdn,zIndexMode:Z,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},RUn=({nodes:g,edges:E,defaultNodes:x,defaultEdges:M,width:N,height:$,fitView:k,fitViewOptions:H,minZoom:U,maxZoom:G,nodeOrigin:ie,nodeExtent:W,zIndexMode:Z})=>tqn((se,oe)=>{async function ee(){const{nodeLookup:Me,panZoom:pe,fitViewOptions:Pe,fitViewResolver:ae,width:Ne,height:Xe,minZoom:ln,maxZoom:on}=oe();pe&&(await YHn({nodes:Me,width:Ne,height:Xe,panZoom:pe,minZoom:ln,maxZoom:on},Pe),ae?.resolve(!0),se({fitViewResolver:null}))}return{...Q1n({nodes:g,edges:E,width:N,height:$,fitView:k,fitViewOptions:H,minZoom:U,maxZoom:G,nodeOrigin:ie,nodeExtent:W,defaultNodes:x,defaultEdges:M,zIndexMode:Z}),setNodes:Me=>{const{nodeLookup:pe,parentLookup:Pe,nodeOrigin:ae,elevateNodesOnSelect:Ne,fitViewQueued:Xe,zIndexMode:ln,nodesSelectionActive:on}=oe(),{nodesInitialized:An,hasSelectedNodes:xn}=lke(Me,pe,Pe,{nodeOrigin:ae,nodeExtent:W,elevateNodesOnSelect:Ne,checkEquality:!0,zIndexMode:ln}),tt=on&&xn;Xe&&An?(ee(),se({nodes:Me,nodesInitialized:An,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:tt})):se({nodes:Me,nodesInitialized:An,nodesSelectionActive:tt})},setEdges:Me=>{const{connectionLookup:pe,edgeLookup:Pe}=oe();c0n(pe,Pe,Me),se({edges:Me})},setDefaultNodesAndEdges:(Me,pe)=>{if(Me){const{setNodes:Pe}=oe();Pe(Me),se({hasDefaultNodes:!0})}if(pe){const{setEdges:Pe}=oe();Pe(pe),se({hasDefaultEdges:!0})}},updateNodeInternals:Me=>{const{triggerNodeChanges:pe,nodeLookup:Pe,parentLookup:ae,domNode:Ne,nodeOrigin:Xe,nodeExtent:ln,debug:on,fitViewQueued:An,zIndexMode:xn}=oe(),{changes:tt,updatedInternals:vn}=yGn(Me,Pe,ae,Ne,Xe,ln,xn);vn&&(wGn(Pe,ae,{nodeOrigin:Xe,nodeExtent:ln,zIndexMode:xn}),An?(ee(),se({fitViewQueued:!1,fitViewOptions:void 0})):se({}),tt?.length>0&&(on&&console.log("React Flow: trigger node changes",tt),pe?.(tt)))},updateNodePositions:(Me,pe=!1)=>{const Pe=[];let ae=[];const{nodeLookup:Ne,triggerNodeChanges:Xe,connection:ln,updateConnection:on,onNodesChangeMiddlewareMap:An}=oe();for(const[xn,tt]of Me){const vn=Ne.get(xn),wn=!!(vn?.expandParent&&vn?.parentId&&tt?.position),Y={id:xn,type:"position",position:wn?{x:Math.max(0,tt.position.x),y:Math.max(0,tt.position.y)}:tt.position,dragging:pe};if(vn&&ln.inProgress&&ln.fromNode.id===vn.id){const Je=CA(vn,ln.fromHandle,ur.Left,!0);on({...ln,from:Je})}wn&&vn.parentId&&Pe.push({id:xn,parentId:vn.parentId,rect:{...tt.internals.positionAbsolute,width:tt.measured.width??0,height:tt.measured.height??0}}),ae.push(Y)}if(Pe.length>0){const{parentLookup:xn,nodeOrigin:tt}=oe(),vn=Oke(Pe,Ne,xn,tt);ae.push(...vn)}for(const xn of An.values())ae=xn(ae);Xe(ae)},triggerNodeChanges:Me=>{const{onNodesChange:pe,setNodes:Pe,nodes:ae,hasDefaultNodes:Ne,debug:Xe}=oe();if(Me?.length){if(Ne){const ln=y0n(Me,ae);Pe(ln)}Xe&&console.log("React Flow: trigger node changes",Me),pe?.(Me)}},triggerEdgeChanges:Me=>{const{onEdgesChange:pe,setEdges:Pe,edges:ae,hasDefaultEdges:Ne,debug:Xe}=oe();if(Me?.length){if(Ne){const ln=k0n(Me,ae);Pe(ln)}Xe&&console.log("React Flow: trigger edge changes",Me),pe?.(Me)}},addSelectedNodes:Me=>{const{multiSelectionActive:pe,edgeLookup:Pe,nodeLookup:ae,triggerNodeChanges:Ne,triggerEdgeChanges:Xe}=oe();if(pe){const ln=Me.map(on=>yA(on,!0));Ne(ln);return}Ne(aD(ae,new Set([...Me]),!0)),Xe(aD(Pe))},addSelectedEdges:Me=>{const{multiSelectionActive:pe,edgeLookup:Pe,nodeLookup:ae,triggerNodeChanges:Ne,triggerEdgeChanges:Xe}=oe();if(pe){const ln=Me.map(on=>yA(on,!0));Xe(ln);return}Xe(aD(Pe,new Set([...Me]))),Ne(aD(ae,new Set,!0))},unselectNodesAndEdges:({nodes:Me,edges:pe}={})=>{const{edges:Pe,nodes:ae,nodeLookup:Ne,triggerNodeChanges:Xe,triggerEdgeChanges:ln}=oe(),on=Me||ae,An=pe||Pe,xn=[];for(const vn of on){if(!vn.selected)continue;const wn=Ne.get(vn.id);wn&&(wn.selected=!1),xn.push(yA(vn.id,!1))}const tt=[];for(const vn of An)vn.selected&&tt.push(yA(vn.id,!1));Xe(xn),ln(tt)},setMinZoom:Me=>{const{panZoom:pe,maxZoom:Pe}=oe();pe?.setScaleExtent([Me,Pe]),se({minZoom:Me})},setMaxZoom:Me=>{const{panZoom:pe,minZoom:Pe}=oe();pe?.setScaleExtent([Pe,Me]),se({maxZoom:Me})},setTranslateExtent:Me=>{oe().panZoom?.setTranslateExtent(Me),se({translateExtent:Me})},resetSelectedElements:()=>{const{edges:Me,nodes:pe,triggerNodeChanges:Pe,triggerEdgeChanges:ae,elementsSelectable:Ne}=oe();if(!Ne)return;const Xe=pe.reduce((on,An)=>An.selected?[...on,yA(An.id,!1)]:on,[]),ln=Me.reduce((on,An)=>An.selected?[...on,yA(An.id,!1)]:on,[]);Pe(Xe),ae(ln)},setNodeExtent:Me=>{const{nodes:pe,nodeLookup:Pe,parentLookup:ae,nodeOrigin:Ne,elevateNodesOnSelect:Xe,nodeExtent:ln,zIndexMode:on}=oe();Me[0][0]===ln[0][0]&&Me[0][1]===ln[0][1]&&Me[1][0]===ln[1][0]&&Me[1][1]===ln[1][1]||(lke(pe,Pe,ae,{nodeOrigin:Ne,nodeExtent:Me,elevateNodesOnSelect:Xe,checkEquality:!1,zIndexMode:on}),se({nodeExtent:Me}))},panBy:Me=>{const{transform:pe,width:Pe,height:ae,panZoom:Ne,translateExtent:Xe}=oe();return kGn({delta:Me,panZoom:Ne,transform:pe,translateExtent:Xe,width:Pe,height:ae})},setCenter:async(Me,pe,Pe)=>{const{width:ae,height:Ne,maxZoom:Xe,panZoom:ln}=oe();if(!ln)return Promise.resolve(!1);const on=typeof Pe?.zoom<"u"?Pe.zoom:Xe;return await ln.setViewport({x:ae/2-Me*on,y:Ne/2-pe*on,zoom:on},{duration:Pe?.duration,ease:Pe?.ease,interpolate:Pe?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{se({connection:{...Fdn}})},updateConnection:Me=>{se({connection:Me})},reset:()=>se({...Q1n()})}},Object.is);function BUn({initialNodes:g,initialEdges:E,defaultNodes:x,defaultEdges:M,initialWidth:N,initialHeight:$,initialMinZoom:k,initialMaxZoom:H,initialFitViewOptions:U,fitView:G,nodeOrigin:ie,nodeExtent:W,zIndexMode:Z,children:se}){const[oe]=Be.useState(()=>RUn({nodes:g,edges:E,defaultNodes:x,defaultEdges:M,width:N,height:$,fitView:G,minZoom:k,maxZoom:H,fitViewOptions:U,nodeOrigin:ie,nodeExtent:W,zIndexMode:Z}));return _.jsx(rqn,{value:oe,children:_.jsx(Aqn,{children:se})})}function zUn({children:g,nodes:E,edges:x,defaultNodes:M,defaultEdges:N,width:$,height:k,fitView:H,fitViewOptions:U,minZoom:G,maxZoom:ie,nodeOrigin:W,nodeExtent:Z,zIndexMode:se}){return Be.useContext(Rue)?_.jsx(_.Fragment,{children:g}):_.jsx(BUn,{initialNodes:E,initialEdges:x,defaultNodes:M,defaultEdges:N,initialWidth:$,initialHeight:k,fitView:H,initialFitViewOptions:U,initialMinZoom:G,initialMaxZoom:ie,nodeOrigin:W,nodeExtent:Z,zIndexMode:se,children:g})}const FUn={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function JUn({nodes:g,edges:E,defaultNodes:x,defaultEdges:M,className:N,nodeTypes:$,edgeTypes:k,onNodeClick:H,onEdgeClick:U,onInit:G,onMove:ie,onMoveStart:W,onMoveEnd:Z,onConnect:se,onConnectStart:oe,onConnectEnd:ee,onClickConnectStart:Me,onClickConnectEnd:pe,onNodeMouseEnter:Pe,onNodeMouseMove:ae,onNodeMouseLeave:Ne,onNodeContextMenu:Xe,onNodeDoubleClick:ln,onNodeDragStart:on,onNodeDrag:An,onNodeDragStop:xn,onNodesDelete:tt,onEdgesDelete:vn,onDelete:wn,onSelectionChange:Y,onSelectionDragStart:Je,onSelectionDrag:pn,onSelectionDragStop:xe,onSelectionContextMenu:qe,onSelectionStart:fn,onSelectionEnd:$e,onBeforeDelete:Mn,connectionMode:ye,connectionLineType:Re=ek.Bezier,connectionLineStyle:Hn,connectionLineComponent:rt,connectionLineContainerStyle:Jt,deleteKeyCode:di="Backspace",selectionKeyCode:Gt="Shift",selectionOnDrag:xt=!1,selectionMode:si=KG.Full,panActivationKeyCode:Kr="Space",multiSelectionKeyCode:Er=QG()?"Meta":"Control",zoomActivationKeyCode:Mt=QG()?"Meta":"Control",snapToGrid:bi,snapGrid:zi,onlyRenderVisibleElements:cu=!1,selectNodesOnDrag:Fu,nodesDraggable:Rs,autoPanOnNodeFocus:ia,nodesConnectable:ef,nodesFocusable:Oa,nodeOrigin:Cc=m0n,edgesFocusable:o0,edgesReconnectable:xb,elementsSelectable:Sl=!0,defaultViewport:cd=pqn,minZoom:s0=.5,maxZoom:uh=2,translateExtent:ud=XG,preventScrolling:b5=!0,nodeExtent:l0,defaultMarkerColor:Cp="#b1b1b7",zoomOnScroll:l6=!0,zoomOnPinch:Ab=!0,panOnScroll:ra=!1,panOnScrollSpeed:od=.5,panOnScrollMode:Sf=EA.Free,zoomOnDoubleClick:f6=!0,panOnDrag:oh=!0,onPaneClick:Tp,onPaneMouseEnter:Gg,onPaneMouseMove:qg,onPaneMouseLeave:Ug,onPaneScroll:sd,onPaneContextMenu:Xg,paneClickDistance:Mb=1,nodeClickDistance:g5=0,children:Op,onReconnect:Np,onReconnectStart:uu,onReconnectEnd:w5,onEdgeContextMenu:Kg,onEdgeDoubleClick:rv,onEdgeMouseEnter:p5,onEdgeMouseMove:Vg,onEdgeMouseLeave:cv,reconnectRadius:m5=10,onNodesChange:v5,onEdgesChange:b1,noDragClassName:Ws="nodrag",noWheelClassName:xf="nowheel",noPanClassName:vt="nopan",fitView:kc,fitViewOptions:tc,connectOnClick:tk,attributionPosition:f0,proOptions:Yg,defaultEdgeOptions:a6,elevateNodesOnSelect:Ip=!0,elevateEdgesOnSelect:Dp=!1,disableKeyboardA11y:_p=!1,autoPanOnConnect:Lp,autoPanOnNodeDrag:xl,autoPanSpeed:y5,connectionRadius:ik,isValidConnection:Qg,onError:Pp,style:OA,id:h6,nodeDragThreshold:rk,connectionDragThreshold:ck,viewport:uv,onViewportChange:k5,width:a0,height:_h,colorMode:uk="light",debug:NA,onScroll:j5,ariaLabelConfig:ok,zIndexMode:ov="basic",...IA},Lh){const sv=h6||"1",sk=kqn(uk),d6=Be.useCallback(Wg=>{Wg.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),j5?.(Wg)},[j5]);return _.jsx("div",{"data-testid":"rf__wrapper",...IA,onScroll:d6,style:{...OA,...FUn},ref:Lh,className:Ta(["react-flow",N,sk]),id:h6,role:"application",children:_.jsxs(zUn,{nodes:g,edges:E,width:a0,height:_h,fitView:kc,fitViewOptions:tc,minZoom:s0,maxZoom:uh,nodeOrigin:Cc,nodeExtent:l0,zIndexMode:ov,children:[_.jsx(yqn,{nodes:g,edges:E,defaultNodes:x,defaultEdges:M,onConnect:se,onConnectStart:oe,onConnectEnd:ee,onClickConnectStart:Me,onClickConnectEnd:pe,nodesDraggable:Rs,autoPanOnNodeFocus:ia,nodesConnectable:ef,nodesFocusable:Oa,edgesFocusable:o0,edgesReconnectable:xb,elementsSelectable:Sl,elevateNodesOnSelect:Ip,elevateEdgesOnSelect:Dp,minZoom:s0,maxZoom:uh,nodeExtent:l0,onNodesChange:v5,onEdgesChange:b1,snapToGrid:bi,snapGrid:zi,connectionMode:ye,translateExtent:ud,connectOnClick:tk,defaultEdgeOptions:a6,fitView:kc,fitViewOptions:tc,onNodesDelete:tt,onEdgesDelete:vn,onDelete:wn,onNodeDragStart:on,onNodeDrag:An,onNodeDragStop:xn,onSelectionDrag:pn,onSelectionDragStart:Je,onSelectionDragStop:xe,onMove:ie,onMoveStart:W,onMoveEnd:Z,noPanClassName:vt,nodeOrigin:Cc,rfId:sv,autoPanOnConnect:Lp,autoPanOnNodeDrag:xl,autoPanSpeed:y5,onError:Pp,connectionRadius:ik,isValidConnection:Qg,selectNodesOnDrag:Fu,nodeDragThreshold:rk,connectionDragThreshold:ck,onBeforeDelete:Mn,debug:NA,ariaLabelConfig:ok,zIndexMode:ov}),_.jsx($Un,{onInit:G,onNodeClick:H,onEdgeClick:U,onNodeMouseEnter:Pe,onNodeMouseMove:ae,onNodeMouseLeave:Ne,onNodeContextMenu:Xe,onNodeDoubleClick:ln,nodeTypes:$,edgeTypes:k,connectionLineType:Re,connectionLineStyle:Hn,connectionLineComponent:rt,connectionLineContainerStyle:Jt,selectionKeyCode:Gt,selectionOnDrag:xt,selectionMode:si,deleteKeyCode:di,multiSelectionKeyCode:Er,panActivationKeyCode:Kr,zoomActivationKeyCode:Mt,onlyRenderVisibleElements:cu,defaultViewport:cd,translateExtent:ud,minZoom:s0,maxZoom:uh,preventScrolling:b5,zoomOnScroll:l6,zoomOnPinch:Ab,zoomOnDoubleClick:f6,panOnScroll:ra,panOnScrollSpeed:od,panOnScrollMode:Sf,panOnDrag:oh,onPaneClick:Tp,onPaneMouseEnter:Gg,onPaneMouseMove:qg,onPaneMouseLeave:Ug,onPaneScroll:sd,onPaneContextMenu:Xg,paneClickDistance:Mb,nodeClickDistance:g5,onSelectionContextMenu:qe,onSelectionStart:fn,onSelectionEnd:$e,onReconnect:Np,onReconnectStart:uu,onReconnectEnd:w5,onEdgeContextMenu:Kg,onEdgeDoubleClick:rv,onEdgeMouseEnter:p5,onEdgeMouseMove:Vg,onEdgeMouseLeave:cv,reconnectRadius:m5,defaultMarkerColor:Cp,noDragClassName:Ws,noWheelClassName:xf,noPanClassName:vt,rfId:sv,disableKeyboardA11y:_p,nodeExtent:l0,viewport:uv,onViewportChange:k5}),_.jsx(wqn,{onSelectionChange:Y}),Op,_.jsx(aqn,{proOptions:Yg,position:f0}),_.jsx(fqn,{rfId:sv,disableKeyboardA11y:_p})]})})}var HUn=j0n(JUn);const GUn=g=>g.domNode?.querySelector(".react-flow__edgelabel-renderer");function qUn({children:g}){const E=zu(GUn);return E?iqn.createPortal(g,E):null}function UUn(g){const[E,x]=Be.useState(g),M=Be.useCallback(N=>x($=>y0n(N,$)),[]);return[E,x,M]}function XUn(g){const[E,x]=Be.useState(g),M=Be.useCallback(N=>x($=>k0n(N,$)),[]);return[E,x,M]}function KUn({dimensions:g,lineWidth:E,variant:x,className:M}){return _.jsx("path",{strokeWidth:E,d:`M${g[0]/2} 0 V${g[1]} M0 ${g[1]/2} H${g[0]}`,className:Ta(["react-flow__background-pattern",x,M])})}function VUn({radius:g,className:E}){return _.jsx("circle",{cx:g,cy:g,r:g,className:Ta(["react-flow__background-pattern","dots",E])})}var nk;(function(g){g.Lines="lines",g.Dots="dots",g.Cross="cross"})(nk||(nk={}));const YUn={[nk.Dots]:1,[nk.Lines]:1,[nk.Cross]:6},QUn=g=>({transform:g.transform,patternId:`pattern-${g.rfId}`});function U0n({id:g,variant:E=nk.Dots,gap:x=20,size:M,lineWidth:N=1,offset:$=0,color:k,bgColor:H,style:U,className:G,patternClassName:ie}){const W=Be.useRef(null),{transform:Z,patternId:se}=zu(QUn,jl),oe=M||YUn[E],ee=E===nk.Dots,Me=E===nk.Cross,pe=Array.isArray(x)?x:[x,x],Pe=[pe[0]*Z[2]||1,pe[1]*Z[2]||1],ae=oe*Z[2],Ne=Array.isArray($)?$:[$,$],Xe=Me?[ae,ae]:Pe,ln=[Ne[0]*Z[2]||1+Xe[0]/2,Ne[1]*Z[2]||1+Xe[1]/2],on=`${se}${g||""}`;return _.jsxs("svg",{className:Ta(["react-flow__background",G]),style:{...U,...zue,"--xy-background-color-props":H,"--xy-background-pattern-color-props":k},ref:W,"data-testid":"rf__background",children:[_.jsx("pattern",{id:on,x:Z[0]%Pe[0],y:Z[1]%Pe[1],width:Pe[0],height:Pe[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${ln[0]},-${ln[1]})`,children:ee?_.jsx(VUn,{radius:ae/2,className:ie}):_.jsx(KUn,{dimensions:Xe,lineWidth:N,variant:E,className:ie})}),_.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${on})`})]})}U0n.displayName="Background";const WUn=Be.memo(U0n);function ZUn(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:_.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function eXn(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:_.jsx("path",{d:"M0 0h32v4.2H0z"})})}function nXn(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:_.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function tXn(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:_.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function iXn(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:_.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function cue({children:g,className:E,...x}){return _.jsx("button",{type:"button",className:Ta(["react-flow__controls-button",E]),...x,children:g})}const rXn=g=>({isInteractive:g.nodesDraggable||g.nodesConnectable||g.elementsSelectable,minZoomReached:g.transform[2]<=g.minZoom,maxZoomReached:g.transform[2]>=g.maxZoom,ariaLabelConfig:g.ariaLabelConfig});function X0n({style:g,showZoom:E=!0,showFitView:x=!0,showInteractive:M=!0,fitViewOptions:N,onZoomIn:$,onZoomOut:k,onFitView:H,onInteractiveChange:U,className:G,children:ie,position:W="bottom-left",orientation:Z="vertical","aria-label":se}){const oe=El(),{isInteractive:ee,minZoomReached:Me,maxZoomReached:pe,ariaLabelConfig:Pe}=zu(rXn,jl),{zoomIn:ae,zoomOut:Ne,fitView:Xe}=Nke(),ln=()=>{ae(),$?.()},on=()=>{Ne(),k?.()},An=()=>{Xe(N),H?.()},xn=()=>{oe.setState({nodesDraggable:!ee,nodesConnectable:!ee,elementsSelectable:!ee}),U?.(!ee)},tt=Z==="horizontal"?"horizontal":"vertical";return _.jsxs(Bue,{className:Ta(["react-flow__controls",tt,G]),position:W,style:g,"data-testid":"rf__controls","aria-label":se??Pe["controls.ariaLabel"],children:[E&&_.jsxs(_.Fragment,{children:[_.jsx(cue,{onClick:ln,className:"react-flow__controls-zoomin",title:Pe["controls.zoomIn.ariaLabel"],"aria-label":Pe["controls.zoomIn.ariaLabel"],disabled:pe,children:_.jsx(ZUn,{})}),_.jsx(cue,{onClick:on,className:"react-flow__controls-zoomout",title:Pe["controls.zoomOut.ariaLabel"],"aria-label":Pe["controls.zoomOut.ariaLabel"],disabled:Me,children:_.jsx(eXn,{})})]}),x&&_.jsx(cue,{className:"react-flow__controls-fitview",onClick:An,title:Pe["controls.fitView.ariaLabel"],"aria-label":Pe["controls.fitView.ariaLabel"],children:_.jsx(nXn,{})}),M&&_.jsx(cue,{className:"react-flow__controls-interactive",onClick:xn,title:Pe["controls.interactive.ariaLabel"],"aria-label":Pe["controls.interactive.ariaLabel"],children:ee?_.jsx(iXn,{}):_.jsx(tXn,{})}),ie]})}X0n.displayName="Controls";const cXn=Be.memo(X0n);function uXn({id:g,x:E,y:x,width:M,height:N,style:$,color:k,strokeColor:H,strokeWidth:U,className:G,borderRadius:ie,shapeRendering:W,selected:Z,onClick:se}){const{background:oe,backgroundColor:ee}=$||{},Me=k||oe||ee;return _.jsx("rect",{className:Ta(["react-flow__minimap-node",{selected:Z},G]),x:E,y:x,rx:ie,ry:ie,width:M,height:N,style:{fill:Me,stroke:H,strokeWidth:U},shapeRendering:W,onClick:se?pe=>se(pe,g):void 0})}const oXn=Be.memo(uXn),sXn=g=>g.nodes.map(E=>E.id),U7e=g=>g instanceof Function?g:()=>g;function lXn({nodeStrokeColor:g,nodeColor:E,nodeClassName:x="",nodeBorderRadius:M=5,nodeStrokeWidth:N,nodeComponent:$=oXn,onClick:k}){const H=zu(sXn,jl),U=U7e(E),G=U7e(g),ie=U7e(x),W=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return _.jsx(_.Fragment,{children:H.map(Z=>_.jsx(aXn,{id:Z,nodeColorFunc:U,nodeStrokeColorFunc:G,nodeClassNameFunc:ie,nodeBorderRadius:M,nodeStrokeWidth:N,NodeComponent:$,onClick:k,shapeRendering:W},Z))})}function fXn({id:g,nodeColorFunc:E,nodeStrokeColorFunc:x,nodeClassNameFunc:M,nodeBorderRadius:N,nodeStrokeWidth:$,shapeRendering:k,NodeComponent:H,onClick:U}){const{node:G,x:ie,y:W,width:Z,height:se}=zu(oe=>{const ee=oe.nodeLookup.get(g);if(!ee)return{node:void 0,x:0,y:0,width:0,height:0};const Me=ee.internals.userNode,{x:pe,y:Pe}=ee.internals.positionAbsolute,{width:ae,height:Ne}=s6(Me);return{node:Me,x:pe,y:Pe,width:ae,height:Ne}},jl);return!G||G.hidden||!Kdn(G)?null:_.jsx(H,{x:ie,y:W,width:Z,height:se,style:G.style,selected:!!G.selected,className:M(G),color:E(G),borderRadius:N,strokeColor:x(G),strokeWidth:$,shapeRendering:k,onClick:U,id:G.id})}const aXn=Be.memo(fXn);var hXn=Be.memo(lXn);const dXn=200,bXn=150,gXn=g=>!g.hidden,wXn=g=>{const E={x:-g.transform[0]/g.transform[2],y:-g.transform[1]/g.transform[2],width:g.width/g.transform[2],height:g.height/g.transform[2]};return{viewBB:E,boundingRect:g.nodeLookup.size>0?Xdn(iq(g.nodeLookup,{filter:gXn}),E):E,rfId:g.rfId,panZoom:g.panZoom,translateExtent:g.translateExtent,flowWidth:g.width,flowHeight:g.height,ariaLabelConfig:g.ariaLabelConfig}},pXn="react-flow__minimap-desc";function K0n({style:g,className:E,nodeStrokeColor:x,nodeColor:M,nodeClassName:N="",nodeBorderRadius:$=5,nodeStrokeWidth:k,nodeComponent:H,bgColor:U,maskColor:G,maskStrokeColor:ie,maskStrokeWidth:W,position:Z="bottom-right",onClick:se,onNodeClick:oe,pannable:ee=!1,zoomable:Me=!1,ariaLabel:pe,inversePan:Pe,zoomStep:ae=1,offsetScale:Ne=5}){const Xe=El(),ln=Be.useRef(null),{boundingRect:on,viewBB:An,rfId:xn,panZoom:tt,translateExtent:vn,flowWidth:wn,flowHeight:Y,ariaLabelConfig:Je}=zu(wXn,jl),pn=g?.width??dXn,xe=g?.height??bXn,qe=on.width/pn,fn=on.height/xe,$e=Math.max(qe,fn),Mn=$e*pn,ye=$e*xe,Re=Ne*$e,Hn=on.x-(Mn-on.width)/2-Re,rt=on.y-(ye-on.height)/2-Re,Jt=Mn+Re*2,di=ye+Re*2,Gt=`${pXn}-${xn}`,xt=Be.useRef(0),si=Be.useRef();xt.current=$e,Be.useEffect(()=>{if(ln.current&&tt)return si.current=OGn({domNode:ln.current,panZoom:tt,getTransform:()=>Xe.getState().transform,getViewScale:()=>xt.current}),()=>{si.current?.destroy()}},[tt]),Be.useEffect(()=>{si.current?.update({translateExtent:vn,width:wn,height:Y,inversePan:Pe,pannable:ee,zoomStep:ae,zoomable:Me})},[ee,Me,Pe,ae,vn,wn,Y]);const Kr=se?bi=>{const[zi,cu]=si.current?.pointer(bi)||[0,0];se(bi,{x:zi,y:cu})}:void 0,Er=oe?Be.useCallback((bi,zi)=>{const cu=Xe.getState().nodeLookup.get(zi).internals.userNode;oe(bi,cu)},[]):void 0,Mt=pe??Je["minimap.ariaLabel"];return _.jsx(Bue,{position:Z,style:{...g,"--xy-minimap-background-color-props":typeof U=="string"?U:void 0,"--xy-minimap-mask-background-color-props":typeof G=="string"?G:void 0,"--xy-minimap-mask-stroke-color-props":typeof ie=="string"?ie:void 0,"--xy-minimap-mask-stroke-width-props":typeof W=="number"?W*$e:void 0,"--xy-minimap-node-background-color-props":typeof M=="string"?M:void 0,"--xy-minimap-node-stroke-color-props":typeof x=="string"?x:void 0,"--xy-minimap-node-stroke-width-props":typeof k=="number"?k:void 0},className:Ta(["react-flow__minimap",E]),"data-testid":"rf__minimap",children:_.jsxs("svg",{width:pn,height:xe,viewBox:`${Hn} ${rt} ${Jt} ${di}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Gt,ref:ln,onClick:Kr,children:[Mt&&_.jsx("title",{id:Gt,children:Mt}),_.jsx(hXn,{onClick:Er,nodeColor:M,nodeStrokeColor:x,nodeBorderRadius:$,nodeClassName:N,nodeStrokeWidth:k,nodeComponent:H}),_.jsx("path",{className:"react-flow__minimap-mask",d:`M${Hn-Re},${rt-Re}h${Jt+Re*2}v${di+Re*2}h${-Jt-Re*2}z + M${An.x},${An.y}h${An.width}v${An.height}h${-An.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}K0n.displayName="MiniMap";const mXn=Be.memo(K0n),vXn=g=>E=>g?`${Math.max(1/E.transform[2],1)}`:void 0,yXn={[yD.Line]:"right",[yD.Handle]:"bottom-right"};function kXn({nodeId:g,position:E,variant:x=yD.Handle,className:M,style:N=void 0,children:$,color:k,minWidth:H=10,minHeight:U=10,maxWidth:G=Number.MAX_VALUE,maxHeight:ie=Number.MAX_VALUE,keepAspectRatio:W=!1,resizeDirection:Z,autoScale:se=!0,shouldResize:oe,onResizeStart:ee,onResize:Me,onResizeEnd:pe}){const Pe=A0n(),ae=typeof g=="string"?g:Pe,Ne=El(),Xe=Be.useRef(null),ln=x===yD.Handle,on=zu(Be.useCallback(vXn(ln&&se),[ln,se]),jl),An=Be.useRef(null),xn=E??yXn[x];Be.useEffect(()=>{if(!(!Xe.current||!ae))return An.current||(An.current=GGn({domNode:Xe.current,nodeId:ae,getStoreItems:()=>{const{nodeLookup:vn,transform:wn,snapGrid:Y,snapToGrid:Je,nodeOrigin:pn,domNode:xe}=Ne.getState();return{nodeLookup:vn,transform:wn,snapGrid:Y,snapToGrid:Je,nodeOrigin:pn,paneDomNode:xe}},onChange:(vn,wn)=>{const{triggerNodeChanges:Y,nodeLookup:Je,parentLookup:pn,nodeOrigin:xe}=Ne.getState(),qe=[],fn={x:vn.x,y:vn.y},$e=Je.get(ae);if($e&&$e.expandParent&&$e.parentId){const Mn=$e.origin??xe,ye=vn.width??$e.measured.width??0,Re=vn.height??$e.measured.height??0,Hn={id:$e.id,parentId:$e.parentId,rect:{width:ye,height:Re,...Vdn({x:vn.x??$e.position.x,y:vn.y??$e.position.y},{width:ye,height:Re},$e.parentId,Je,Mn)}},rt=Oke([Hn],Je,pn,xe);qe.push(...rt),fn.x=vn.x?Math.max(Mn[0]*ye,vn.x):void 0,fn.y=vn.y?Math.max(Mn[1]*Re,vn.y):void 0}if(fn.x!==void 0&&fn.y!==void 0){const Mn={id:ae,type:"position",position:{...fn}};qe.push(Mn)}if(vn.width!==void 0&&vn.height!==void 0){const ye={id:ae,type:"dimensions",resizing:!0,setAttributes:Z?Z==="horizontal"?"width":"height":!0,dimensions:{width:vn.width,height:vn.height}};qe.push(ye)}for(const Mn of wn){const ye={...Mn,type:"position"};qe.push(ye)}Y(qe)},onEnd:({width:vn,height:wn})=>{const Y={id:ae,type:"dimensions",resizing:!1,dimensions:{width:vn,height:wn}};Ne.getState().triggerNodeChanges([Y])}})),An.current.update({controlPosition:xn,boundaries:{minWidth:H,minHeight:U,maxWidth:G,maxHeight:ie},keepAspectRatio:W,resizeDirection:Z,onResizeStart:ee,onResize:Me,onResizeEnd:pe,shouldResize:oe}),()=>{An.current?.destroy()}},[xn,H,U,G,ie,W,ee,Me,pe,oe]);const tt=xn.split("-");return _.jsx("div",{className:Ta(["react-flow__resize-control","nodrag",...tt,x,M]),ref:Xe,style:{...N,scale:on,...k&&{[ln?"backgroundColor":"borderColor"]:k}},children:$})}Be.memo(kXn);const jXn=g=>g.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),V0n=(...g)=>g.filter((E,x,M)=>!!E&&E.trim()!==""&&M.indexOf(E)===x).join(" ").trim();var EXn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const SXn=Be.forwardRef(({color:g="currentColor",size:E=24,strokeWidth:x=2,absoluteStrokeWidth:M,className:N="",children:$,iconNode:k,...H},U)=>Be.createElement("svg",{ref:U,...EXn,width:E,height:E,stroke:g,strokeWidth:M?Number(x)*24/Number(E):x,className:V0n("lucide",N),...H},[...k.map(([G,ie])=>Be.createElement(G,ie)),...Array.isArray($)?$:[$]]));const Ef=(g,E)=>{const x=Be.forwardRef(({className:M,...N},$)=>Be.createElement(SXn,{ref:$,iconNode:E,className:V0n(`lucide-${jXn(g)}`,M),...N}));return x.displayName=`${g}`,x};const xXn=Ef("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const AXn=Ef("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);const TA=Ef("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const MXn=Ef("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const CXn=Ef("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);const TXn=Ef("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);const Dke=Ef("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const OXn=Ef("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);const NXn=Ef("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);const Y0n=Ef("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);const W1n=Ef("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);const IXn=Ef("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);const SA=Ef("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const DXn=Ef("Redo2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]);const _Xn=Ef("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const LXn=Ef("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);const Q0n=Ef("Scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]);const PXn=Ef("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const BG=Ef("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const dke=Ef("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const $Xn=Ef("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);const Jg=Ef("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function RXn({mode:g,models:E,objects:x,application:M,initialModelType:N,suggestedSelector:$,nameReadOnly:k=!1,preview:H,onPreview:U,onSubmit:G,onClose:ie}){const Z=(M?W0n(E,M):null)?.type||N||E[0]?.type||"",[se,oe]=Be.useState(Z),ee=E.find(Mt=>Mt.type===se)??null,[Me,pe]=Be.useState(M?.name||M?.applicationId||Z1n(ee)),[Pe,ae]=Be.useState(()=>Cue(ee,M)),Ne=M?.selector||$||zXn(x),[Xe,ln]=Be.useState(Ne.multiplicity),[on,An]=Be.useState(uue(Ne,"scale")),[xn,tt]=Be.useState(uue(Ne,"kind")),[vn,wn]=Be.useState(uue(Ne,"species")),[Y,Je]=Be.useState(uue(Ne,"name")),pn=FXn(Ne,"within"),xe=M?.owner.scope==="template"&&pn?.type==="Scope"&&String(pn.name||"")===M.owner.instance,[qe,fn]=Be.useState(pn?.type==="Scope"&&!xe?"named_scope":pn?.type==="SceneScope"?"scene":"local"),[$e,Mn]=Be.useState(pn?.type==="Scope"&&!xe?String(pn.name||""):""),[ye,Re]=Be.useState(M?.cadence.mode==="period"?"period":"default"),[Hn,rt]=Be.useState(String(M?.cadence.value??1)),[Jt,di]=Be.useState(M?.cadence.unit||"Hour"),Gt=Mt=>{const bi=E.find(zi=>zi.type===Mt)??null;oe(Mt),ae(Cue(bi,g==="update"?M:void 0)),g==="add"&&pe(Z1n(bi))},xt=Be.useMemo(()=>({scales:zG(x.map(Mt=>Mt.scale)),kinds:zG(x.map(Mt=>Mt.kind)),species:zG(x.map(Mt=>Mt.species)),names:zG(x.map(Mt=>Mt.name))}),[x]),si=Be.useMemo(()=>{const Mt=[on&&`scale ${on}`,xn&&`kind ${xn}`,vn&&`species ${vn}`,Y&&`name ${Y}`].filter(Boolean),bi=Mt.length?Mt.join(", "):"matching objects";return qe==="scene"?`${bi} in the whole scene`:qe==="named_scope"?`${bi} below ${$e||"the named root"}`:`${bi} in the local instance scope`},[xn,Y,on,qe,$e,vn]),Kr=()=>{const Mt={selectors:[]};return qe==="named_scope"&&$e&&(Mt.within={type:"Scope",name:$e}),qe==="scene"&&(Mt.within={type:"SceneScope"}),on&&(Mt.scale=on),xn&&(Mt.kind=xn),vn&&(Mt.species=vn),Y&&(Mt.name=Y),{type:JXn(Xe),multiplicity:Xe,criteria:Mt,julia:""}},Er=()=>{G({applicationRef:M?.owner,modelType:se,name:Me.trim(),parameters:Pe,selector:Kr(),cadence:ye==="period"?{mode:"period",value:Number(Hn),unit:Jt,julia:`Dates.${Jt}(${Hn})`}:{mode:"default",value:null,unit:null,julia:"nothing"}})};return _.jsx("div",{className:"overlay-backdrop",onMouseDown:ie,children:_.jsxs("section",{className:"overlay-panel application-form",onMouseDown:Mt=>Mt.stopPropagation(),"data-testid":"application-form",children:[_.jsxs("header",{children:[_.jsxs("div",{children:[_.jsx("strong",{children:g==="add"?"Add application":`Update ${M?.applicationId}`}),_.jsx("span",{children:"A configured use of a model on selected scene objects"})]}),_.jsx("button",{onClick:ie,children:_.jsx(Jg,{size:17})})]}),_.jsxs("div",{className:"overlay-content application-form-content",children:[_.jsxs("label",{children:["Model",_.jsx("select",{value:se,onChange:Mt=>Gt(Mt.target.value),"data-testid":"application-model-select",children:E.map(Mt=>_.jsxs("option",{value:Mt.type,children:[Mt.package?`${Mt.package} · `:"",Mt.name," (",Mt.process,")"]},Mt.type))})]}),_.jsxs("label",{children:["Application name",_.jsx("input",{value:Me,disabled:k,onChange:Mt=>pe(Mt.target.value),"data-testid":"application-name"})]}),ee&&ee.constructor.fields.length>0&&_.jsxs("fieldset",{children:[_.jsx("legend",{children:"Model parameters"}),_.jsx(Z0n,{fields:ee.constructor.fields,values:Pe,onChange:ae})]}),_.jsxs("fieldset",{children:[_.jsx("legend",{children:"Target selector"}),_.jsxs("div",{className:"form-grid",children:[_.jsxs("label",{children:["Multiplicity",_.jsxs("select",{value:Xe,onChange:Mt=>ln(Mt.target.value),children:[_.jsx("option",{value:"one",children:"One"}),_.jsx("option",{value:"optional_one",children:"Optional one"}),_.jsx("option",{value:"many",children:"Many"})]})]}),_.jsxs("label",{children:["Scope",_.jsxs("select",{value:qe,onChange:Mt=>fn(Mt.target.value),children:[_.jsx("option",{value:"local",children:"Default / instance local"}),_.jsx("option",{value:"scene",children:"Explicit whole scene"}),_.jsx("option",{value:"named_scope",children:"Named object subtree"})]})]}),qe==="named_scope"&&_.jsx(PG,{label:"Scope root",value:$e,options:xt.names,onChange:Mn}),_.jsx(PG,{label:"Scale",value:on,options:xt.scales,onChange:An}),_.jsx(PG,{label:"Kind",value:xn,options:xt.kinds,onChange:tt}),_.jsx(PG,{label:"Species",value:vn,options:xt.species,onChange:wn}),_.jsx(PG,{label:"Object name",value:Y,options:xt.names,onChange:Je})]}),_.jsxs("p",{className:"selector-summary",children:["Julia will resolve ",_.jsx("strong",{children:Xe.replace("_"," ")})," target from ",si,"."]}),_.jsxs("button",{className:"selector-preview-button",type:"button",onClick:()=>U(Kr()),"data-testid":"application-target-preview",children:[_.jsx(Dke,{size:15})," Preview targets in Julia"]}),H&&_.jsxs("section",{className:"selector-preview","data-testid":"application-target-preview-result",children:[_.jsxs("strong",{children:[H.count," target object",H.count===1?"":"s"]}),_.jsx("code",{children:H.objectIds.map(String).join(", ")||"No targets"}),H.groups.map(Mt=>_.jsxs("div",{children:[_.jsx("span",{children:Mt.instance}),_.jsx("code",{children:Mt.objectIds.map(String).join(", ")||"No targets"})]},Mt.instance))]})]}),_.jsxs("fieldset",{children:[_.jsx("legend",{children:"Cadence"}),_.jsxs("div",{className:"form-grid",children:[_.jsxs("label",{children:["Mode",_.jsxs("select",{value:ye,onChange:Mt=>Re(Mt.target.value),"data-testid":"application-cadence-mode",children:[_.jsx("option",{value:"default",children:"Model or environment default"}),_.jsx("option",{value:"period",children:"Explicit period"})]})]}),ye==="period"&&_.jsxs(_.Fragment,{children:[_.jsxs("label",{children:["Value",_.jsx("input",{type:"number",min:"1",step:"1",value:Hn,onChange:Mt=>rt(Mt.target.value),"data-testid":"application-cadence-value"})]}),_.jsxs("label",{children:["Unit",_.jsxs("select",{value:Jt,onChange:Mt=>di(Mt.target.value),"data-testid":"application-cadence-unit",children:[_.jsx("option",{children:"Second"}),_.jsx("option",{children:"Minute"}),_.jsx("option",{children:"Hour"}),_.jsx("option",{children:"Day"})]})]})]})]})]})]}),_.jsxs("footer",{children:[_.jsx("button",{onClick:ie,children:"Cancel"}),_.jsxs("button",{className:"primary",disabled:!se||!Me.trim()||ye==="period"&&(!Number.isInteger(Number(Hn))||Number(Hn)<=0),onClick:Er,"data-testid":"application-submit",children:[_.jsx(TA,{size:15})," ",g==="add"?"Add application":"Apply changes"]})]})]})})}function W0n(g,E){return g.find(x=>x.type===E.modelType)??g.find(x=>x.name===E.modelName&&x.module===E.module)??null}function Z0n({fields:g,values:E,onChange:x}){const M=new Map;for(const $ of g)$.typeParameter&&!M.has($.typeParameter)&&M.set($.typeParameter,$.name);const N=($,k)=>{const H=$.typeParameter?g.filter(U=>U.typeParameter===$.typeParameter).map(U=>U.name):[$.name];x(Object.fromEntries(Object.entries(E).map(([U,G])=>[U,H.includes(U)?{...G,type:k}:G])))};return _.jsx("div",{className:"parameter-list",children:g.map($=>{const k=E[$.name]||{type:$.inferredChoice,value:""},H=!$.typeParameter||M.get($.typeParameter)===$.name;return _.jsxs("div",{className:"parameter-row",children:[_.jsxs("label",{children:[_.jsx("span",{children:$.name}),_.jsx("small",{children:$.declaredType}),_.jsx("input",{"data-testid":`application-param-${$.name}`,value:k.value,onChange:U=>x({...E,[$.name]:{...k,value:U.target.value}})})]}),H&&_.jsxs("label",{className:"parameter-type",children:[_.jsx("span",{children:$.typeParameter?`${$.typeParameter} type`:"Value type"}),_.jsx("select",{"data-testid":`application-param-type-${$.name}`,value:k.type,onChange:U=>N($,U.target.value),children:$.choices.map(U=>_.jsx("option",{value:U,children:U},U))})]})]},$.name)})})}function PG({label:g,value:E,options:x,onChange:M}){return _.jsxs("label",{children:[g,_.jsxs("select",{value:E,onChange:N=>M(N.target.value),children:[_.jsx("option",{value:"",children:"Any"}),x.map(N=>_.jsx("option",{value:N,children:N},N))]})]})}function Cue(g,E){return g?Object.fromEntries(g.constructor.fields.map(x=>{const M=E?.modelParameters[x.name],N=M?.type||x.inferredChoice,$=M?M.julia:x.hasDefault?N==="julia"?x.defaultJulia||"":BXn(x.default,N):"";return[x.name,{type:N,value:$}]})):{}}function BXn(g,E){const x=g==null?"":String(g);return E==="symbol"?x.replace(/^:/,""):x}function Z1n(g){return g?.process||g?.name||"application"}function zXn(g){const E=zG(g.map(x=>x.scale))[0];return{type:"Many",multiplicity:"many",criteria:E?{selectors:[],scale:E}:{selectors:[]},julia:""}}function uue(g,E){const x=g.criteria[E];return typeof x=="string"?x:""}function FXn(g,E){const x=g.criteria[E];return x&&typeof x=="object"?x:null}function JXn(g){return g==="one"?"One":g==="optional_one"?"OptionalOne":"Many"}function zG(g){return[...new Set(g.filter(E=>!!E))].sort()}function HXn({application:g,applications:E,environments:x,models:M,onCommand:N,onClose:$}){const k=E.filter($e=>$e.applicationId!==g.applicationId&&(g.owner.scope==="global"?$e.owner.scope==="global":$e.owner.scope==="template"&&$e.owner.templateId===g.owner.templateId&&$e.owner.instance===g.owner.instance)),[H,U]=Be.useState(""),[G,ie]=Be.useState(k[0]?.applicationId||""),[W,Z]=Be.useState("manual"),[se,oe]=Be.useState(g.environment?g.environment.backendId||"scene":"default"),[ee,Me]=Be.useState(String(g.environment?.provider||"")),[pe,Pe]=Be.useState(()=>({...Object.fromEntries(g.environmentInputs.map($e=>[$e.name,""])),...g.environment?.sources||{}})),[ae,Ne]=Be.useState(String(g.environment?.sink||"")),[Xe,ln]=Be.useState(()=>qXn(g.environment?.extra)),[on,An]=Be.useState(g.updates||[]),[xn,tt]=Be.useState(g.outputs[0]?.name||""),[vn,wn]=Be.useState(k[0]?.owner.applicationId||""),Y=k.find($e=>$e.applicationId===G),Je=M.find($e=>$e.type===g.modelType),pn=Be.useMemo(()=>{const $e=g.owner.scope==="template"&&Y?.owner.scope==="template"&&Y.owner.templateId===g.owner.templateId;return{type:W==="initializer"||Y?.targetCount===1?"One":"Many",multiplicity:W==="initializer"||Y?.targetCount===1?"one":"many",criteria:{selectors:[],...$e?{}:{within:{type:"SceneScope"}},application:Y?.owner.applicationId||G},julia:""}},[g.owner.scope,g.owner.templateId,W,G,Y]),xe=()=>{!H.trim()||!G||(N(GXn(g.owner,H.trim(),pn,W)),U(""))},qe=()=>{!xn||!vn||An($e=>[...$e.filter(Mn=>!Mn.variables.includes(xn)),{variables:[xn],after:[vn]}])},fn=()=>{const $e=UXn(se,ee,pe,ae,Xe);N({action:"edit",kind:"set_application_environment",applicationRef:g.owner,configuration:$e})};return _.jsx("div",{className:"overlay-backdrop",onMouseDown:$,children:_.jsxs("section",{className:"overlay-panel application-configuration-form",onMouseDown:$e=>$e.stopPropagation(),"data-testid":"application-configuration-form",children:[_.jsxs("header",{children:[_.jsxs("div",{children:[_.jsxs("strong",{children:["Configure ",g.owner.applicationId]}),_.jsx("span",{children:"Authored coupling and execution policy, validated by Julia"})]}),_.jsx("button",{onClick:$,children:_.jsx(Jg,{size:17})})]}),_.jsxs("div",{className:"overlay-content application-configuration-content",children:[_.jsxs("fieldset",{children:[_.jsx("legend",{children:"Explicit input bindings"}),Object.entries(g.inputBindings).length===0&&_.jsx("p",{children:"No authored input bindings. Unique same-object producers may still be inferred."}),_.jsx("div",{className:"configuration-list",children:Object.entries(g.inputBindings).map(([$e,Mn])=>_.jsxs("div",{children:[_.jsx("code",{children:$e}),_.jsx("span",{children:Mn.julia||Mn.type}),_.jsx("button",{className:"danger icon-button",title:`Remove ${$e} binding`,onClick:()=>N({action:"edit",kind:"remove_input_binding",applicationRef:g.owner,input:$e}),children:_.jsx(BG,{size:14})})]},$e))})]}),_.jsxs("fieldset",{children:[_.jsx("legend",{children:"Calls and newborn initializers"}),_.jsx("div",{className:"configuration-list",children:Object.entries(g.callBindings).map(([$e,Mn])=>_.jsxs("div",{children:[_.jsx("code",{children:$e}),_.jsxs("span",{children:[_.jsx("strong",{children:Mn.mode==="initializer"?"Initializer":"Manual call"})," · ",Mn.julia||Mn.type]}),_.jsx("button",{className:"danger icon-button",title:`Remove ${$e} call`,onClick:()=>N({action:"edit",kind:"remove_call_binding",applicationRef:g.owner,call:$e}),children:_.jsx(BG,{size:14})})]},$e))}),_.jsxs("div",{className:"form-grid compact-configuration-row",children:[_.jsxs("label",{children:["Binding mode",_.jsxs("select",{"data-testid":"call-mode",value:W,onChange:$e=>Z($e.target.value),children:[_.jsx("option",{value:"manual",children:"Manual call"}),_.jsx("option",{value:"initializer",children:"Newborn initializer"})]})]}),_.jsxs("label",{children:["Call name",_.jsx("input",{"data-testid":"call-name",value:H,onChange:$e=>U($e.target.value),placeholder:"child"})]}),_.jsxs("label",{children:["Target application",_.jsxs("select",{"data-testid":"call-target",value:G,onChange:$e=>ie($e.target.value),children:[_.jsx("option",{value:"",children:"Choose application"}),k.map($e=>_.jsx("option",{value:$e.applicationId,children:$e.owner.applicationId},$e.applicationId))]})]}),_.jsxs("button",{type:"button","data-testid":"add-call-binding",disabled:!H.trim()||!G,onClick:xe,children:[_.jsx(SA,{size:14})," Add ",W==="initializer"?"initializer":"call"]})]})]}),_.jsxs("fieldset",{children:[_.jsx("legend",{children:"Environment"}),Je?.environmentHint&&_.jsxs("p",{className:"environment-hint",children:[_.jsx("strong",{children:"Model hint"})," ",Je.environmentHint]}),_.jsxs("div",{className:"form-grid compact-configuration-row",children:[_.jsxs("label",{children:["Backend",_.jsxs("select",{"data-testid":"environment-backend",value:se,onChange:$e=>oe($e.target.value),children:[_.jsx("option",{value:"default",children:"No application override"}),_.jsx("option",{value:"scene",children:"Active scene environment"}),x.filter($e=>$e.source==="catalog").map($e=>_.jsxs("option",{value:$e.id,children:[$e.name," · ",$e.type]},$e.id))]})]}),_.jsxs("label",{children:["Provider",_.jsx("input",{"data-testid":"environment-provider",value:ee,onChange:$e=>Me($e.target.value),placeholder:"default provider",disabled:se==="default"})]}),_.jsxs("label",{children:["Output sink",_.jsx("input",{"data-testid":"environment-sink",value:ae,onChange:$e=>Ne($e.target.value),placeholder:"default sink",disabled:se==="default"})]})]}),g.environmentInputs.length>0&&_.jsx("div",{className:"configuration-list environment-sources",children:g.environmentInputs.map($e=>_.jsxs("label",{children:[_.jsx("code",{children:$e.name}),_.jsx("input",{value:pe[$e.name]||"",onChange:Mn=>Pe(ye=>({...ye,[$e.name]:Mn.target.value})),placeholder:"backend source variable",disabled:se==="default","data-testid":`environment-source-${$e.name}`})]},$e.name))}),_.jsx("div",{className:"configuration-list",children:Xe.map(($e,Mn)=>_.jsxs("div",{children:[_.jsx("input",{"aria-label":"Backend option",value:$e.key,onChange:ye=>ln(Re=>Re.map((Hn,rt)=>rt===Mn?{...Hn,key:ye.target.value}:Hn)),placeholder:"option"}),_.jsxs("select",{value:$e.type,onChange:ye=>ln(Re=>Re.map((Hn,rt)=>rt===Mn?{...Hn,type:ye.target.value}:Hn)),children:[_.jsx("option",{value:"float",children:"Float"}),_.jsx("option",{value:"integer",children:"Integer"}),_.jsx("option",{value:"boolean",children:"Boolean"}),_.jsx("option",{value:"symbol",children:"Symbol"}),_.jsx("option",{value:"string",children:"String"}),_.jsx("option",{value:"julia",children:"Julia expression"})]}),_.jsx("input",{"aria-label":"Backend option value",value:$e.value,onChange:ye=>ln(Re=>Re.map((Hn,rt)=>rt===Mn?{...Hn,value:ye.target.value}:Hn))}),_.jsx("button",{className:"danger icon-button",onClick:()=>ln(ye=>ye.filter((Re,Hn)=>Hn!==Mn)),children:_.jsx(BG,{size:14})})]},Mn))}),_.jsxs("div",{className:"compact-actions",children:[_.jsxs("button",{type:"button",disabled:se==="default",onClick:()=>ln($e=>[...$e,{key:"",type:"string",value:""}]),children:[_.jsx(SA,{size:14})," Backend option"]}),_.jsxs("button",{type:"button","data-testid":"apply-environment",onClick:fn,children:[_.jsx(TA,{size:14})," Apply environment"]})]}),_.jsxs("div",{className:"effective-environment",children:[_.jsx("strong",{children:"Effective bindings"}),_.jsx("code",{children:JSON.stringify(g.environmentBindings||{},null,2)}),g.environmentWindow!==null&&g.environmentWindow!==void 0?_.jsx("code",{children:JSON.stringify(g.environmentWindow)}):null]})]}),_.jsxs("fieldset",{children:[_.jsx("legend",{children:"Output routing"}),_.jsx("div",{className:"configuration-list",children:g.outputs.map($e=>_.jsxs("label",{children:[_.jsx("code",{children:$e.name}),_.jsxs("select",{"data-testid":`output-routing-${$e.name}`,value:g.outputRouting[$e.name]||"canonical",onChange:Mn=>N({action:"edit",kind:"set_output_routing",applicationRef:g.owner,output:$e.name,route:Mn.target.value}),children:[_.jsx("option",{value:"canonical",children:"Canonical status owner"}),_.jsx("option",{value:"stream_only",children:"Stream only"})]})]},$e.name))})]}),_.jsxs("fieldset",{children:[_.jsx("legend",{children:"Duplicate-writer ordering"}),_.jsx("div",{className:"configuration-list",children:on.map(($e,Mn)=>_.jsxs("div",{children:[_.jsx("code",{children:$e.variables.join(", ")}),_.jsxs("span",{children:["after ",$e.after.join(", ")]}),_.jsx("button",{className:"danger icon-button",title:"Remove update ordering",onClick:()=>An(ye=>ye.filter((Re,Hn)=>Hn!==Mn)),children:_.jsx(BG,{size:14})})]},`${$e.variables.join(",")}:${$e.after.join(",")}`))}),_.jsxs("div",{className:"form-grid compact-configuration-row",children:[_.jsxs("label",{children:["Output",_.jsx("select",{value:xn,onChange:$e=>tt($e.target.value),children:g.outputs.map($e=>_.jsx("option",{value:$e.name,children:$e.name},$e.name))})]}),_.jsxs("label",{children:["Run after",_.jsxs("select",{value:vn,onChange:$e=>wn($e.target.value),children:[_.jsx("option",{value:"",children:"Choose application"}),k.map($e=>_.jsx("option",{value:$e.owner.applicationId,children:$e.owner.applicationId},$e.applicationId))]})]}),_.jsxs("button",{type:"button",disabled:!xn||!vn,onClick:qe,children:[_.jsx(SA,{size:14})," Add rule"]}),_.jsxs("button",{type:"button",onClick:()=>N({action:"edit",kind:"set_update_ordering",applicationRef:g.owner,updates:on}),children:[_.jsx(TA,{size:14})," Apply ordering"]})]})]})]}),_.jsx("footer",{children:_.jsx("button",{className:"primary",onClick:$,children:"Done"})})]})})}function GXn(g,E,x,M){return{action:"edit",kind:"set_call_binding",applicationRef:g,call:E,selector:x,mode:M}}function qXn(g){return Object.entries(g||{}).map(([E,x])=>({key:E,type:typeof x=="number"?Number.isInteger(x)?"integer":"float":typeof x=="boolean"?"boolean":"string",value:String(x??"")}))}function UXn(g,E,x,M,N){return g==="default"?null:{backendId:g,provider:E.trim()||null,sources:Object.fromEntries(Object.entries(x).filter(([,$])=>$.trim()).map(([$,k])=>[$,k.trim()])),sink:M.trim()||null,extra:Object.fromEntries(N.filter($=>$.key.trim()).map($=>[$.key.trim(),{type:$.type,value:$.value}]))}}function XXn({endpoints:g,objects:E,preview:x,onPreview:M,onSubmit:N,onClose:$}){const k=KXn(g.sourceApplication.targetIds,g.targetApplication.targetIds),[H,U]=Be.useState(g.sourceApplication.targetCount>1&&g.targetApplication.targetCount===1?"many":"one"),[G,ie]=Be.useState(k?"self":""),[W,Z]=Be.useState("local"),[se,oe]=Be.useState(""),[ee,Me]=Be.useState(""),[pe,Pe]=Be.useState(X7e(g.sourceApplication.targetScales)),[ae,Ne]=Be.useState(X7e(g.sourceApplication.targetKinds)),[Xe,ln]=Be.useState(X7e(g.sourceApplication.targetSpecies)),[on,An]=Be.useState(""),[xn,tt]=Be.useState("application"),[vn,wn]=Be.useState("automatic"),[Y,Je]=Be.useState(""),[pn,xe]=Be.useState("Hour"),qe=oue(E.map(Re=>Re.scale)),fn=oue(E.map(Re=>Re.kind)),$e=oue(E.map(Re=>Re.species)),Mn=oue(E.map(Re=>Re.name)),ye=()=>{const Re={selectors:[],var:g.sourcePort.name};Re[xn]=xn==="application"?g.sourceApplication.owner.applicationId:g.sourceApplication.process;const Hn=QXn(W,se,ee);if(Hn&&(Re.within=Hn),G&&(Re.relation=G),pe&&(Re.scale=pe),ae&&(Re.kind=ae),Xe&&(Re.species=Xe),on&&(Re.name=on),vn!=="automatic"&&(Re.policy={type:YXn(vn)}),Y.trim()){const rt=WXn(Y,pn);rt&&(Re.window=rt)}return{applicationRef:g.targetApplication.owner,input:g.targetPort.name,selector:{type:VXn(H),multiplicity:H,criteria:Re,julia:""}}};return _.jsx("div",{className:"overlay-backdrop",onMouseDown:$,children:_.jsxs("section",{className:"overlay-panel binding-form",onMouseDown:Re=>Re.stopPropagation(),"data-testid":"binding-form",children:[_.jsxs("header",{children:[_.jsxs("div",{children:[_.jsx("strong",{children:"Connect applications"}),_.jsx("span",{children:"Julia resolves this declaration into concrete object bindings"})]}),_.jsx("button",{onClick:$,children:_.jsx(Jg,{size:17})})]}),_.jsxs("div",{className:"overlay-content",children:[_.jsxs("div",{className:"binding-route",children:[_.jsxs("div",{children:[_.jsx("small",{children:"Producer"}),_.jsx("strong",{children:g.sourceApplication.applicationId}),_.jsx("code",{children:g.sourcePort.name})]}),_.jsx(W1n,{size:22}),_.jsxs("div",{children:[_.jsx("small",{children:"Consumer"}),_.jsx("strong",{children:g.targetApplication.applicationId}),_.jsx("code",{children:g.targetPort.name})]})]}),_.jsxs("fieldset",{children:[_.jsx("legend",{children:"Source object selector"}),_.jsxs("div",{className:"form-grid",children:[_.jsxs("label",{children:["Multiplicity",_.jsxs("select",{value:H,onChange:Re=>U(Re.target.value),children:[_.jsx("option",{value:"one",children:"One"}),_.jsx("option",{value:"optional_one",children:"Optional one"}),_.jsx("option",{value:"many",children:"Many"})]})]}),_.jsxs("label",{children:["Scope",_.jsxs("select",{value:W,onChange:Re=>Z(Re.target.value),children:[_.jsx("option",{value:"local",children:"Default / instance local"}),_.jsx("option",{value:"scene",children:"Explicit whole scene"}),_.jsx("option",{value:"self",children:"Consumer object"}),_.jsx("option",{value:"subtree",children:"Consumer subtree"}),_.jsx("option",{value:"self_plant",children:"Consumer plant"}),_.jsx("option",{value:"ancestor",children:"Ancestor subtree"}),_.jsx("option",{value:"named_scope",children:"Named object subtree"})]})]}),W==="ancestor"&&_.jsx(lD,{label:"Ancestor scale",value:ee,options:qe,onChange:Me}),W==="named_scope"&&_.jsx(lD,{label:"Scope root",value:se,options:Mn,onChange:oe}),_.jsxs("label",{children:["Relation",_.jsxs("select",{value:G,onChange:Re=>ie(Re.target.value),children:[_.jsx("option",{value:"",children:"Any relation"}),_.jsx("option",{value:"self",children:"Same object"}),_.jsx("option",{value:"parent",children:"Parent"}),_.jsx("option",{value:"children",children:"Children"}),_.jsx("option",{value:"ancestors",children:"Ancestors"}),_.jsx("option",{value:"descendants",children:"Descendants"}),_.jsx("option",{value:"siblings",children:"Siblings"})]})]}),_.jsxs("label",{children:["Producer filter",_.jsxs("select",{value:xn,onChange:Re=>tt(Re.target.value),children:[_.jsx("option",{value:"application",children:"This application"}),_.jsx("option",{value:"process",children:"Any application of this process"})]})]}),_.jsx(lD,{label:"Scale",value:pe,options:qe,onChange:Pe}),_.jsx(lD,{label:"Kind",value:ae,options:fn,onChange:Ne}),_.jsx(lD,{label:"Species",value:Xe,options:$e,onChange:ln}),_.jsx(lD,{label:"Object name",value:on,options:Mn,onChange:An}),_.jsxs("label",{children:["Temporal policy",_.jsxs("select",{value:vn,onChange:Re=>wn(Re.target.value),children:[_.jsx("option",{value:"automatic",children:"Automatic"}),_.jsx("option",{value:"hold_last",children:"Hold last"}),_.jsx("option",{value:"interpolate",children:"Interpolate"}),_.jsx("option",{value:"integrate",children:"Integrate"}),_.jsx("option",{value:"aggregate",children:"Aggregate"})]})]}),_.jsxs("label",{children:["Window value",_.jsx("input",{type:"number",min:"1",step:"1",value:Y,onChange:Re=>Je(Re.target.value),placeholder:"Automatic","data-testid":"binding-window-value"})]}),_.jsxs("label",{children:["Window unit",_.jsxs("select",{value:pn,onChange:Re=>xe(Re.target.value),disabled:!Y.trim(),"data-testid":"binding-window-unit",children:[_.jsx("option",{children:"Second"}),_.jsx("option",{children:"Minute"}),_.jsx("option",{children:"Hour"}),_.jsx("option",{children:"Day"})]})]})]})]}),x&&_.jsxs("section",{className:"selector-preview","data-testid":"binding-preview",children:[_.jsxs("strong",{children:[x.bindingCount," resolved binding",x.bindingCount===1?"":"s"]}),_.jsxs("span",{children:[x.consumerObjectIds.length," consumer object",x.consumerObjectIds.length===1?"":"s"," from ",x.sourceObjectIds.length," source object",x.sourceObjectIds.length===1?"":"s"]}),x.sourceApplicationIds.length>0&&_.jsx("code",{children:x.sourceApplicationIds.join(", ")}),x.diagnostics.map(Re=>_.jsx("p",{children:Re},Re))]})]}),_.jsxs("footer",{children:[_.jsx("button",{onClick:$,children:"Cancel"}),_.jsxs("button",{onClick:()=>M(ye()),"data-testid":"binding-preview-button",children:[_.jsx(Dke,{size:15})," Preview resolution"]}),_.jsxs("button",{className:"primary",onClick:()=>N(ye()),"data-testid":"binding-submit",children:[_.jsx(W1n,{size:15})," Apply binding"]})]})]})})}function lD({label:g,value:E,options:x,onChange:M}){return _.jsxs("label",{children:[g,_.jsxs("select",{value:E,onChange:N=>M(N.target.value),children:[_.jsx("option",{value:"",children:"Any"}),x.map(N=>_.jsx("option",{value:N,children:N},N))]})]})}function KXn(g,E){return g.length===E.length&&g.every(x=>E.some(M=>String(M)===String(x)))}function X7e(g){return g.length===1?g[0]:""}function VXn(g){return g==="one"?"One":g==="optional_one"?"OptionalOne":"Many"}function oue(g){return[...new Set(g.filter(E=>!!E))].sort()}function YXn(g){return g==="hold_last"?"HoldLast":g==="interpolate"?"Interpolate":g==="integrate"?"Integrate":"Aggregate"}function QXn(g,E,x){return g==="local"?null:g==="scene"?{type:"SceneScope"}:g==="self"?{type:"Self"}:g==="subtree"?{type:"Subtree"}:g==="self_plant"?{type:"SelfPlant"}:g==="ancestor"?{type:"Ancestor",scale:x||null}:g==="named_scope"&&E?{type:"Scope",name:E}:null}function WXn(g,E){const x=Number(g);return!Number.isInteger(x)||x<=0?null:{mode:"period",value:x,unit:E,julia:`Dates.${E}(${x})`}}function ZXn({environments:g,activeId:E,onSubmit:x,onClose:M}){const[N,$]=Be.useState(E||"none"),k=g.find(H=>H.id===N);return _.jsx("div",{className:"overlay-backdrop",onMouseDown:M,children:_.jsxs("section",{className:"overlay-panel environment-form",onMouseDown:H=>H.stopPropagation(),"data-testid":"environment-form",children:[_.jsxs("header",{children:[_.jsxs("div",{children:[_.jsx("strong",{children:"Scene environment"}),_.jsx("span",{children:"Environment values stay in Julia and are selected by catalog name"})]}),_.jsx("button",{onClick:M,children:_.jsx(Jg,{size:17})})]}),_.jsxs("div",{className:"overlay-content",children:[_.jsxs("label",{children:["Environment",_.jsxs("select",{value:N,onChange:H=>$(H.target.value),"data-testid":"scene-environment",children:[_.jsx("option",{value:"none",children:"No environment"}),g.filter(H=>H.source==="catalog").map(H=>_.jsxs("option",{value:H.id,children:[H.name," · ",H.type]},H.id))]})]}),k&&_.jsxs("section",{className:"environment-summary",children:[_.jsx("strong",{children:k.name}),_.jsx("code",{children:k.type}),_.jsx("span",{children:k.variables.length?`Available variables: ${k.variables.join(", ")}`:"Backend variables are discovered by Julia at compile time."})]})]}),_.jsxs("footer",{children:[_.jsx("button",{onClick:M,children:"Cancel"}),_.jsxs("button",{className:"primary",onClick:()=>x(N==="none"?null:N),"data-testid":"environment-submit",children:[_.jsx(TA,{size:15})," Use environment"]})]})]})})}function eKn({templates:g,instances:E,objects:x,preview:M,onPreview:N,onSubmit:$,onClose:k}){const[H,U]=Be.useState(g[0]?.id||""),[G,ie]=Be.useState(""),[W,Z]=Be.useState("existing"),se=Be.useMemo(()=>nKn(x,E),[E,x]),[oe,ee]=Be.useState(String(se[0]?.objectId??"")),[Me,pe]=Be.useState(""),[Pe,ae]=Be.useState(""),[Ne,Xe]=Be.useState(""),[ln,on]=Be.useState(""),[An,xn]=Be.useState(""),tt=()=>W==="existing"?{name:G.trim(),templateId:H,rootId:oe}:{name:G.trim(),templateId:H,rootObject:{objectId:Me.trim(),configuration:{parent:Pe||null,scale:Ne.trim()||null,kind:ln.trim()||null,species:An.trim()||null,name:G.trim()}}},vn=!!(H&&G.trim()&&(W==="existing"?oe:Me.trim()));return _.jsx("div",{className:"overlay-backdrop",onMouseDown:k,children:_.jsxs("section",{className:"overlay-panel instance-form",onMouseDown:wn=>wn.stopPropagation(),"data-testid":"instance-form",children:[_.jsxs("header",{children:[_.jsxs("div",{children:[_.jsx("strong",{children:"Add template instance"}),_.jsx("span",{children:"Mount one reusable coupled model set on an object subtree"})]}),_.jsx("button",{onClick:k,children:_.jsx(Jg,{size:17})})]}),_.jsxs("div",{className:"overlay-content instance-form-content",children:[_.jsxs("div",{className:"form-grid",children:[_.jsxs("label",{children:["Template",_.jsx("select",{value:H,onChange:wn=>U(wn.target.value),"data-testid":"instance-template",children:g.map(wn=>_.jsxs("option",{value:wn.id,children:[wn.name," · ",wn.source==="catalog"?"preset":"model-local"," · ",wn.applications.length," applications"]},wn.id))})]}),_.jsxs("label",{children:["Instance name",_.jsx("input",{value:G,onChange:wn=>ie(wn.target.value),placeholder:"plant_1","data-testid":"instance-name"})]})]}),_.jsxs("div",{className:"override-scope-choice",children:[_.jsxs("button",{className:W==="existing"?"active":"",onClick:()=>Z("existing"),children:[_.jsx("strong",{children:"Use existing root"}),_.jsx("span",{children:"All unclaimed descendants are mounted automatically"})]}),_.jsxs("button",{className:W==="new"?"active":"",onClick:()=>Z("new"),children:[_.jsx("strong",{children:"Create minimal root"}),_.jsx("span",{children:"Create the object and mount the template atomically"})]})]}),W==="existing"?_.jsxs("label",{children:["Unclaimed root",_.jsxs("select",{value:oe,onChange:wn=>ee(wn.target.value),"data-testid":"instance-root",children:[_.jsx("option",{value:"",children:"Choose an object"}),se.map(wn=>_.jsxs("option",{value:String(wn.objectId),children:[wn.name||String(wn.objectId)," · ",wn.scale||"unscaled"]},wn.id))]})]}):_.jsxs("div",{className:"form-grid",children:[_.jsxs("label",{children:["Stable object ID",_.jsx("input",{value:Me,onChange:wn=>pe(wn.target.value),"data-testid":"instance-new-root-id"})]}),_.jsxs("label",{children:["Parent object",_.jsxs("select",{value:Pe,onChange:wn=>ae(wn.target.value),children:[_.jsx("option",{value:"",children:"No parent"}),x.map(wn=>_.jsx("option",{value:String(wn.objectId),children:wn.name||String(wn.objectId)},wn.id))]})]}),_.jsxs("label",{children:["Scale",_.jsx("input",{value:Ne,onChange:wn=>Xe(wn.target.value)})]}),_.jsxs("label",{children:["Kind",_.jsx("input",{value:ln,onChange:wn=>on(wn.target.value)})]}),_.jsxs("label",{children:["Species",_.jsx("input",{value:An,onChange:wn=>xn(wn.target.value)})]})]}),M&&_.jsxs("section",{className:"selector-preview","data-testid":"instance-preview",children:[_.jsxs("strong",{children:[M.objectIds.length," claimed object",M.objectIds.length===1?"":"s"]}),_.jsx("code",{children:M.objectIds.map(String).join(", ")}),M.applications.map(wn=>_.jsxs("div",{children:[_.jsx("code",{children:wn.applicationId}),_.jsxs("span",{children:[wn.targetIds.length," resolved target",wn.targetIds.length===1?"":"s"]})]},wn.applicationId)),M.diagnostics.map(wn=>_.jsx("p",{children:wn},wn))]})]}),_.jsxs("footer",{children:[_.jsx("button",{onClick:k,children:"Cancel"}),_.jsxs("button",{disabled:!vn,onClick:()=>N(tt()),"data-testid":"instance-preview-button",children:[_.jsx(Dke,{size:15})," Preview mount"]}),_.jsxs("button",{className:"primary",disabled:!vn,onClick:()=>$(tt()),"data-testid":"instance-submit",children:[_.jsx(TA,{size:15})," Add instance"]})]})]})})}function nKn(g,E){const x=new Set(E.flatMap(M=>M.objectIds.map(String)));return g.filter(M=>!x.has(String(M.objectId)))}function tKn({mode:g,objects:E,object:x,onSubmit:M,onClose:N}){const[$,k]=Be.useState(String(x?.objectId??"")),[H,U]=Be.useState(iKn(x?.parent)),[G,ie]=Be.useState(x?.scale||""),[W,Z]=Be.useState(x?.kind||""),[se,oe]=Be.useState(x?.species||""),[ee,Me]=Be.useState(x?.name||""),pe=Be.useMemo(()=>E.filter(ae=>String(ae.objectId)!==$),[$,E]),Pe=()=>M({objectId:$.trim(),configuration:{parent:H||null,scale:G.trim()||null,kind:W.trim()||null,species:se.trim()||null,name:ee.trim()||null}});return _.jsx("div",{className:"overlay-backdrop",onMouseDown:N,children:_.jsxs("section",{className:"overlay-panel object-form",onMouseDown:ae=>ae.stopPropagation(),"data-testid":"object-form",children:[_.jsxs("header",{children:[_.jsxs("div",{children:[_.jsx("strong",{children:g==="add"?"Add scene object":`Update object ${String(x?.objectId)}`}),_.jsx("span",{children:"Objects define the concrete entities and topology targeted by applications"})]}),_.jsx("button",{onClick:N,children:_.jsx(Jg,{size:17})})]}),_.jsxs("div",{className:"overlay-content object-form-content",children:[_.jsxs("label",{children:["Stable object ID",_.jsx("input",{value:$,disabled:g==="update",onChange:ae=>k(ae.target.value),"data-testid":"object-id"})]}),_.jsxs("label",{children:["Parent object",_.jsxs("select",{value:H,onChange:ae=>U(ae.target.value),children:[_.jsx("option",{value:"",children:"No parent"}),pe.map(ae=>_.jsxs("option",{value:String(ae.objectId),children:[ae.name||String(ae.objectId)," · ",ae.scale||"unscaled"]},ae.id))]})]}),_.jsxs("div",{className:"form-grid",children:[_.jsxs("label",{children:["Scale",_.jsx("input",{value:G,onChange:ae=>ie(ae.target.value)})]}),_.jsxs("label",{children:["Kind",_.jsx("input",{value:W,onChange:ae=>Z(ae.target.value)})]}),_.jsxs("label",{children:["Species",_.jsx("input",{value:se,onChange:ae=>oe(ae.target.value)})]}),_.jsxs("label",{children:["Name",_.jsx("input",{value:ee,onChange:ae=>Me(ae.target.value)})]})]})]}),_.jsxs("footer",{children:[_.jsx("button",{onClick:N,children:"Cancel"}),_.jsxs("button",{className:"primary",disabled:!$.trim(),onClick:Pe,"data-testid":"object-submit",children:[_.jsx(TA,{size:15})," ",g==="add"?"Add object":"Apply changes"]})]})]})})}function iKn(g){if(g==null||g==="")return"";const E=String(g);return E.startsWith("object:")?E.slice(7):E}function rKn({application:g,models:E,instances:x,onSubmit:M,onRemove:N,onClose:$}){const k=Be.useMemo(()=>E.filter(tt=>tt.process===g.process),[g.process,E]),H=W0n(k,g)||k[0]||null,[U,G]=Be.useState("instance"),[ie,W]=Be.useState(g.targetInstances[0]||x[0]?.name||""),Z=x.find(tt=>tt.name===ie),se=(Z?.objectIds||[]).filter(tt=>g.targetIds.some(vn=>String(vn)===String(tt))),[oe,ee]=Be.useState(se[0]??""),[Me,pe]=Be.useState(H?.type||g.modelType),Pe=k.find(tt=>tt.type===Me)||H,[ae,Ne]=Be.useState(()=>Cue(Pe,g)),Xe=g.owner.applicationId,ln=!!Z?.instanceOverrides.includes(Xe),on=!!Z?.objectOverrides.some(tt=>{const vn=tt;return String(vn.object??vn.objectId??"")===String(oe)&&String(vn.application??vn.applicationId??"")===Xe}),An=U==="instance"?ln:on,xn=tt=>{pe(tt),Ne(Cue(k.find(vn=>vn.type===tt)||null))};return _.jsx("div",{className:"overlay-backdrop",onMouseDown:$,children:_.jsxs("section",{className:"overlay-panel override-form",onMouseDown:tt=>tt.stopPropagation(),"data-testid":"override-form",children:[_.jsxs("header",{children:[_.jsxs("div",{children:[_.jsx("strong",{children:"Create a model override"}),_.jsx("span",{children:"The shared template remains unchanged outside the selected scope"})]}),_.jsx("button",{onClick:$,children:_.jsx(Jg,{size:17})})]}),_.jsxs("div",{className:"overlay-content override-form-content",children:[_.jsxs("div",{className:"override-scope-choice",children:[_.jsxs("button",{className:U==="instance"?"active":"",onClick:()=>G("instance"),children:[_.jsx("strong",{children:"One instance"}),_.jsx("span",{children:"All targets of this application in one plant or object instance"})]}),_.jsxs("button",{className:U==="object"?"active":"",onClick:()=>G("object"),children:[_.jsx("strong",{children:"One object"}),_.jsx("span",{children:"Only one concrete execution receives the replacement model"})]})]}),_.jsxs("div",{className:"form-grid",children:[_.jsxs("label",{children:["Instance",_.jsx("select",{value:ie,onChange:tt=>{const vn=tt.target.value,Y=(x.find(Je=>Je.name===vn)?.objectIds||[]).find(Je=>g.targetIds.some(pn=>String(pn)===String(Je)));W(vn),ee(Y??"")},children:x.filter(tt=>g.targetInstances.includes(tt.name)).map(tt=>_.jsx("option",{value:tt.name,children:tt.name},tt.name))})]}),U==="object"&&_.jsxs("label",{children:["Object",_.jsx("select",{value:String(oe),onChange:tt=>ee(tt.target.value),children:se.map(tt=>_.jsx("option",{value:String(tt),children:String(tt)},String(tt)))})]}),_.jsxs("label",{children:["Replacement model",_.jsx("select",{value:Me,onChange:tt=>xn(tt.target.value),children:k.map(tt=>_.jsxs("option",{value:tt.type,children:[tt.package?`${tt.package} · `:"",tt.name]},tt.type))})]})]}),Pe&&Pe.constructor.fields.length>0&&_.jsxs("fieldset",{children:[_.jsx("legend",{children:"Model parameters"}),_.jsx(Z0n,{fields:Pe.constructor.fields,values:ae,onChange:Ne})]}),_.jsxs("div",{className:"override-warning",children:[_.jsx("strong",{children:U==="instance"?`Override ${ie}`:`Override object ${String(oe)}`}),_.jsx("span",{children:"Julia validates that the replacement keeps the same process and declared variable contract."})]})]}),_.jsxs("footer",{children:[_.jsx("button",{onClick:$,children:"Cancel"}),An&&_.jsxs("button",{className:"danger","data-testid":"remove-override",onClick:()=>N({scope:U,instance:ie,objectId:U==="object"?oe:void 0,applicationRef:g.owner,modelType:Me,parameters:ae}),children:[_.jsx(BG,{size:15})," Remove override"]}),_.jsxs("button",{className:"primary",disabled:!ie||!Me||U==="object"&&!String(oe),onClick:()=>M({scope:U,instance:ie,objectId:U==="object"?oe:void 0,applicationRef:g.owner,modelType:Me,parameters:ae}),children:[_.jsx(TA,{size:15})," Apply override"]})]})]})})}function sue(g){throw new Error('Could not dynamically require "'+g+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var K7e={exports:{}},edn;function cKn(){return edn||(edn=1,(function(g,E){(function(x){g.exports=x()})(function(){return(function(){function x(M,N,$){function k(G,ie){if(!N[G]){if(!M[G]){var W=typeof sue=="function"&&sue;if(!ie&&W)return W(G,!0);if(H)return H(G,!0);var Z=new Error("Cannot find module '"+G+"'");throw Z.code="MODULE_NOT_FOUND",Z}var se=N[G]={exports:{}};M[G][0].call(se.exports,function(oe){var ee=M[G][1][oe];return k(ee||oe)},se,se.exports,x,M,N,$)}return N[G].exports}for(var H=typeof sue=="function"&&sue,U=0;U<$.length;U++)k($[U]);return k}return x})()({1:[function(x,M,N){Object.defineProperty(N,"__esModule",{value:!0}),N.default=void 0;function $(Z){"@babel/helpers - typeof";return $=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(se){return typeof se}:function(se){return se&&typeof Symbol=="function"&&se.constructor===Symbol&&se!==Symbol.prototype?"symbol":typeof se},$(Z)}function k(Z,se){if(!(Z instanceof se))throw new TypeError("Cannot call a class as a function")}function H(Z,se){for(var oe=0;oe0&&arguments[0]!==void 0?arguments[0]:{},ee=oe.defaultLayoutOptions,Me=ee===void 0?{}:ee,pe=oe.algorithms,Pe=pe===void 0?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking"]:pe,ae=oe.workerFactory,Ne=oe.workerUrl;if(k(this,Z),this.defaultLayoutOptions=Me,this.initialized=!1,typeof Ne>"u"&&typeof ae>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var Xe=ae;typeof Ne<"u"&&typeof ae>"u"&&(Xe=function(An){return new Worker(An)});var ln=Xe(Ne);if(typeof ln.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new W(ln),this.worker.postMessage({cmd:"register",algorithms:Pe}).then(function(on){return se.initialized=!0}).catch(console.err)}return U(Z,[{key:"layout",value:function(oe){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Me=ee.layoutOptions,pe=Me===void 0?this.defaultLayoutOptions:Me,Pe=ee.logging,ae=Pe===void 0?!1:Pe,Ne=ee.measureExecutionTime,Xe=Ne===void 0?!1:Ne;return oe?this.worker.postMessage({cmd:"layout",graph:oe,layoutOptions:pe,options:{logging:ae,measureExecutionTime:Xe}}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker&&this.worker.terminate()}}])})();var W=(function(){function Z(se){var oe=this;if(k(this,Z),se===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=se,this.worker.onmessage=function(ee){setTimeout(function(){oe.receive(oe,ee)},0)}}return U(Z,[{key:"postMessage",value:function(oe){var ee=this.id||0;this.id=ee+1,oe.id=ee;var Me=this;return new Promise(function(pe,Pe){Me.resolvers[ee]=function(ae,Ne){ae?(Me.convertGwtStyleError(ae),Pe(ae)):pe(Ne)},Me.worker.postMessage(oe)})}},{key:"receive",value:function(oe,ee){var Me=ee.data,pe=oe.resolvers[Me.id];pe&&(delete oe.resolvers[Me.id],Me.error?pe(Me.error):pe(null,Me.data))}},{key:"terminate",value:function(){this.worker&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(oe){if(oe){var ee=oe.__java$exception;ee&&(ee.cause&&ee.cause.backingJsObject&&(oe.cause=ee.cause.backingJsObject,this.convertGwtStyleError(oe.cause)),delete oe.__java$exception)}}}])})()},{}],2:[function(x,M,N){(function($){(function(){var k;typeof window<"u"?k=window:typeof $<"u"?k=$:typeof self<"u"&&(k=self);var H;function U(){}function G(){}function ie(){}function W(){}function Z(){}function se(){}function oe(){}function ee(){}function Me(){}function pe(){}function Pe(){}function ae(){}function Ne(){}function Xe(){}function ln(){}function on(){}function An(){}function xn(){}function tt(){}function vn(){}function wn(){}function Y(){}function Je(){}function pn(){}function xe(){}function qe(){}function fn(){}function $e(){}function Mn(){}function ye(){}function Re(){}function Hn(){}function rt(){}function Jt(){}function di(){}function Gt(){}function xt(){}function si(){}function Kr(){}function Er(){}function Mt(){}function bi(){}function zi(){}function cu(){}function Fu(){}function Rs(){}function ia(){}function ef(){}function Oa(){}function Cc(){}function o0(){}function xb(){}function Sl(){}function cd(){}function s0(){}function uh(){}function ud(){}function b5(){}function l0(){}function Cp(){}function l6(){}function Ab(){}function ra(){}function od(){}function Sf(){}function f6(){}function oh(){}function Tp(){}function Gg(){}function qg(){}function Ug(){}function sd(){}function Xg(){}function Mb(){}function g5(){}function Op(){}function Np(){}function uu(){}function w5(){}function Kg(){}function rv(){}function p5(){}function Vg(){}function cv(){}function m5(){}function v5(){}function b1(){}function Ws(){}function xf(){}function vt(){}function kc(){}function tc(){}function tk(){}function f0(){}function Yg(){}function a6(){}function Ip(){}function Dp(){}function _p(){}function Lp(){}function xl(){}function y5(){}function ik(){}function Qg(){}function Pp(){}function OA(){}function h6(){}function rk(){}function ck(){}function uv(){}function k5(){}function a0(){}function _h(){}function uk(){}function NA(){}function j5(){}function ok(){}function ov(){}function IA(){}function Lh(){}function sv(){}function sk(){}function d6(){}function Wg(){}function kD(){}function jD(){}function E5(){}function oq(){}function ED(){}function SD(){}function DA(){}function sq(){}function lq(){}function lk(){}function Zg(){}function _A(){}function LA(){}function S5(){}function x5(){}function xD(){}function PA(){}function AD(){}function b6(){}function ew(){}function $A(){}function g6(){}function $p(){}function RA(){}function fk(){}function MD(){}function ak(){}function hk(){}function CD(){}function Ph(){}function lv(){}function dk(){}function w6(){}function fq(){}function BA(){}function zA(){}function p6(){}function bk(){}function TD(){}function aq(){}function hq(){}function dq(){}function FA(){}function bq(){}function gq(){}function wq(){}function pq(){}function mq(){}function OD(){}function vq(){}function yq(){}function kq(){}function jq(){}function JA(){}function Eq(){}function Sq(){}function xq(){}function ND(){}function Aq(){}function Mq(){}function Cq(){}function Tq(){}function Oq(){}function Nq(){}function Iq(){}function Dq(){}function _q(){}function HA(){}function m6(){}function Lq(){}function ID(){}function DD(){}function _D(){}function LD(){}function PD(){}function A5(){}function Pq(){}function $q(){}function Rq(){}function $D(){}function RD(){}function v6(){}function y6(){}function Bq(){}function gk(){}function BD(){}function GA(){}function qA(){}function UA(){}function zD(){}function FD(){}function JD(){}function zq(){}function Fq(){}function Jq(){}function Hq(){}function Gq(){}function g1(){}function k6(){}function HD(){}function GD(){}function qD(){}function UD(){}function XA(){}function qq(){}function M5(){}function KA(){}function j6(){}function VA(){}function XD(){}function fv(){}function C5(){}function YA(){}function KD(){}function av(){}function VD(){}function YD(){}function QD(){}function Uq(){}function Xq(){}function Kq(){}function WD(){}function ZD(){}function QA(){}function h0(){}function wk(){}function ld(){}function T5(){}function WA(){}function pk(){}function mk(){}function ZA(){}function hv(){}function e_(){}function vk(){}function O5(){}function Vq(){}function w1(){}function eM(){}function nw(){}function n_(){}function yk(){}function dv(){}function nM(){}function t_(){}function tM(){}function i_(){}function fd(){}function N5(){}function I5(){}function kk(){}function E6(){}function ad(){}function hd(){}function Rp(){}function Cb(){}function Tb(){}function tw(){}function r_(){}function iM(){}function rM(){}function c_(){}function ca(){}function Jo(){}function ou(){}function Bp(){}function dd(){}function cM(){}function zp(){}function u_(){}function o_(){}function D5(){}function bv(){}function _5(){}function Fp(){}function uM(){}function Jp(){}function iw(){}function Hp(){}function rw(){}function oM(){}function sM(){}function L5(){}function S6(){}function Gp(){}function ua(){}function x6(){}function lM(){}function Yq(){}function Qq(){}function A6(){}function Al(){}function fM(){}function M6(){}function C6(){}function aM(){}function P5(){}function $5(){}function Wq(){}function s_(){}function Zq(){}function l_(){}function gv(){}function hM(){}function jk(){}function f_(){}function R5(){}function dM(){}function Ek(){}function Sk(){}function a_(){}function h_(){}function wv(){}function pv(){}function d_(){}function bM(){}function B5(){}function T6(){}function xk(){}function O6(){}function Ak(){}function b_(){}function mv(){}function g_(){}function qp(){}function gM(){}function wM(){}function Up(){}function Xp(){}function N6(){}function pM(){}function mM(){}function I6(){}function D6(){}function w_(){}function p_(){}function z5(){}function Mk(){}function m_(){}function vM(){}function yM(){}function p1(){}function bd(){}function Kp(){}function kM(){}function v_(){}function Vp(){}function m1(){}function Zs(){}function Ck(){}function cw(){}function bc(){}function vo(){}function Ml(){}function Tk(){}function F5(){}function vv(){}function Ok(){}function _6(){}function J5(){}function eU(){}function Bs(){}function jM(){}function EM(){}function y_(){}function k_(){}function nU(){}function SM(){}function xM(){}function AM(){}function sh(){}function el(){}function Nk(){}function L6(){}function Ik(){}function MM(){}function uw(){}function Dk(){}function CM(){}function TM(){}function j_(){}function E_(){}function S_(){}function tU(){}function x_(){}function A_(){}function OM(){}function M_(){}function iU(){}function C_(){}function T_(){}function O_(){}function NM(){}function N_(){}function I_(){}function D_(){}function __(){}function L_(){}function rU(){}function P_(){}function H5(){}function $_(){}function _k(){}function Lk(){}function R_(){}function IM(){}function cU(){}function B_(){}function z_(){}function F_(){}function J_(){}function H_(){}function DM(){}function G_(){}function q_(){}function _M(){}function U_(){}function X_(){}function LM(){}function P6(){}function K_(){}function Pk(){}function PM(){}function V_(){}function Y_(){}function uU(){}function oU(){}function Q_(){}function $6(){}function $M(){}function $k(){}function W_(){}function RM(){}function R6(){}function sU(){}function BM(){}function Z_(){}function zM(){}function FM(){}function eL(){}function nL(){}function yv(){}function tL(){}function gd(){}function iL(){}function d0(){}function JM(){}function HM(){}function rL(){}function cL(){}function lU(){}function GM(){}function Cl(){}function oa(){}function uL(){}function oL(){}function sL(){}function lL(){}function B6(){}function fL(){}function Rk(){}function aL(){}function fU(){}function Bk(){}function qM(){}function hL(){}function dL(){}function Ge(){}function UM(){}function XM(){}function KM(){}function bL(){}function VM(){}function zk(){}function YM(){}function gL(){}function QM(){}function wL(){}function ow(){}function z6(){}function aU(){}function pL(){}function b0(){}function WM(){}function mL(){}function Fk(){}function kv(){}function yo(){}function Jk(){}function hU(){}function ZM(){}function F6(){}function Yp(){}function J6(){}function vL(){}function H6(){}function Ob(){}function G6(){}function eC(){}function yL(){}function nC(){}function tC(){}function jv(){}function kL(){}function Nb(){}function Tl(){}function q6(){}function iC(){}function Af(){}function dU(){}function jL(){}function EL(){}function Ss(){}function $h(){}function sw(){}function SL(){}function xL(){}function AL(){}function bU(){}function Hk(){}function Rh(){}function g0(){}function ML(){}function Ol(){}function Gk(){}function lw(){}function Ev(){}function fw(){}function rC(){}function cC(){}function w0(){}function CL(){}function G5(){}function U6(){}function X6(){}function q5(){}function TL(){}function OL(){}function K6(){}function NL(){}function qk(){}function IL(){}function gU(){}function wU(){}function Ju(){}function Do(){}function Hc(){}function nu(){}function io(){}function v1(){}function Qp(){}function U5(){}function uC(){}function aw(){}function zs(){}function Wp(){}function Sv(){}function oC(){}function y1(){}function X5(){}function V6(){}function Bh(){}function sC(){}function Uk(){}function DL(){}function Xk(){}function Kk(){}function Zp(){}function nf(){}function e2(){}function K5(){}function hw(){}function lC(){}function fC(){}function _L(){}function Y6(){}function aC(){}function k1(){}function LL(){}function zh(){}function PL(){}function $L(){}function pU(){}function n2(){}function Vk(){}function hC(){}function V5(){}function RL(){}function BL(){}function zL(){}function FL(){}function Yk(){}function dC(){}function mU(){}function vU(){}function yU(){}function JL(){}function HL(){}function Y5(){}function Qk(){}function GL(){}function qL(){}function UL(){}function XL(){}function KL(){}function VL(){}function Wk(){}function YL(){}function QL(){}function ro(){}function bC(){}function kU(){}function WL(){}function jU(){}function EU(){}function SU(){}function Zk(){}function Q5(){}function gC(){}function ej(){}function wC(){}function t2(){}function Ib(){}function Q6(){}function xU(){}function ZL(){}function pC(){}function eP(){}function nP(){}function mC(){vj()}function vC(){C0e()}function tP(){Hf()}function iP(){Rde()}function AU(){RO()}function yC(){IT()}function kC(){cT()}function MU(){rT()}function CU(){TMe()}function W6(){q4()}function TU(){r$e()}function rP(){i8()}function Gc(){G0()}function jC(){Bhe()}function nj(){K_e()}function EC(){Rhe()}function cP(){Y_e()}function SC(){V_e()}function Z6(){Q_e()}function tj(){P$e()}function OU(){W_e()}function uP(){MBe()}function NU(){Oe()}function IU(){ZP()}function oP(){xBe()}function sP(){ABe()}function ko(){YLe()}function xC(){Dge()}function sa(){CBe()}function DU(){eLe()}function lP(){H4()}function _U(){zFe()}function AC(){P1()}function MC(){cbe()}function ij(){HO()}function fP(){YBe()}function aP(){Gbe()}function CC(){THe()}function TC(){Z_e()}function LU(){WXe()}function hP(){Mu()}function PU(){Ha()}function dP(){nge()}function $U(){q0()}function RU(){_W()}function i2(){HQ()}function bP(){rB()}function OC(){Xt()}function NC(){xz()}function BU(){BB()}function zU(){bde()}function IC(){Uz()}function rj(){JY()}function nl(){_Ne()}function FU(){rge()}function j1(e){Ln(e)}function DC(e){this.a=e}function e9(e){this.a=e}function gP(e){this.a=e}function wP(e){this.a=e}function n9(e){this.a=e}function E1(e){this.a=e}function _C(e){this.a=e}function cj(e){this.a=e}function p0(e){this.a=e}function JU(e){this.a=e}function HU(e){this.a=e}function W5(e){this.a=e}function pP(e){this.a=e}function GU(e){this.c=e}function qU(e){this.a=e}function LC(e){this.a=e}function UU(e){this.a=e}function XU(e){this.a=e}function KU(e){this.a=e}function PC(e){this.a=e}function mP(e){this.a=e}function Z5(e){this.a=e}function xv(e){this.a=e}function vP(e){this.a=e}function $C(e){this.a=e}function e4(e){this.a=e}function t9(e){this.a=e}function yP(e){this.a=e}function uj(e){this.a=e}function RC(e){this.a=e}function BC(e){this.a=e}function oj(e){this.a=e}function kP(e){this.a=e}function jP(e){this.a=e}function VU(e){this.a=e}function EP(e){this.a=e}function YU(e){this.a=e}function zC(e){this.a=e}function QU(e){this.a=e}function i9(e){this.a=e}function r9(e){this.a=e}function Av(e){this.a=e}function c9(e){this.a=e}function n4(e){this.b=e}function wd(){this.a=[]}function SP(e,n){e.a=n}function WU(e,n){e.a=n}function ZU(e,n){e.b=n}function eX(e,n){e.c=n}function xP(e,n){e.c=n}function nX(e,n){e.d=n}function tX(e,n){e.d=n}function Mf(e,n){e.k=n}function AP(e,n){e.j=n}function Jue(e,n){e.c=n}function sj(e,n){e.c=n}function lj(e,n){e.a=n}function FC(e,n){e.a=n}function MP(e,n){e.f=n}function iX(e,n){e.a=n}function CP(e,n){e.b=n}function Db(e,n){e.d=n}function m0(e,n){e.i=n}function dw(e,n){e.o=n}function fj(e,n){e.r=n}function aj(e,n){e.a=n}function Mv(e,n){e.b=n}function rX(e,n){e.e=n}function cX(e,n){e.f=n}function t4(e,n){e.g=n}function Hue(e,n){e.e=n}function uX(e,n){e.f=n}function JC(e,n){e.f=n}function hj(e,n){e.a=n}function HC(e,n){e.b=n}function GC(e,n){e.n=n}function qC(e,n){e.a=n}function oX(e,n){e.c=n}function u9(e,n){e.c=n}function sX(e,n){e.c=n}function TP(e,n){e.a=n}function UC(e,n){e.a=n}function lX(e,n){e.d=n}function Gue(e,n){e.d=n}function XC(e,n){e.e=n}function a(e,n){e.e=n}function d(e,n){e.g=n}function w(e,n){e.f=n}function j(e,n){e.j=n}function T(e,n){e.a=n}function I(e,n){e.a=n}function Q(e,n){e.b=n}function de(e){e.b=e.a}function tn(e){e.c=e.d.d}function Pn(e){this.a=e}function it(e){this.a=e}function gt(e){this.a=e}function Gn(e){this.a=e}function et(e){this.a=e}function Di(e){this.a=e}function Cr(e){this.a=e}function co(e){this.a=e}function Sn(e){this.a=e}function sn(e){this.a=e}function _n(e){this.a=e}function ot(e){this.a=e}function Hi(e){this.a=e}function _u(e){this.a=e}function Xi(e){this.b=e}function Hr(e){this.b=e}function ic(e){this.b=e}function qc(e){this.d=e}function At(e){this.a=e}function fX(e){this.a=e}function que(e){this.a=e}function Lke(e){this.a=e}function Pke(e){this.a=e}function Uue(e){this.a=e}function Xue(e){this.a=e}function aX(e){this.c=e}function P(e){this.c=e}function $ke(e){this.c=e}function Kue(e){this.a=e}function Vue(e){this.a=e}function Yue(e){this.a=e}function Que(e){this.a=e}function o9(e){this.a=e}function Rke(e){this.a=e}function Bke(e){this.a=e}function s9(e){this.a=e}function zke(e){this.a=e}function Fke(e){this.a=e}function Jke(e){this.a=e}function Hke(e){this.a=e}function Gke(e){this.a=e}function qke(e){this.a=e}function Uke(e){this.a=e}function Xke(e){this.a=e}function Kke(e){this.a=e}function Vke(e){this.a=e}function Yke(e){this.a=e}function dj(e){this.a=e}function Qke(e){this.a=e}function Wke(e){this.a=e}function OP(e){this.a=e}function Zke(e){this.a=e}function eje(e){this.a=e}function Wue(e){this.a=e}function nje(e){this.a=e}function tje(e){this.a=e}function ije(e){this.a=e}function Zue(e){this.a=e}function eoe(e){this.a=e}function noe(e){this.a=e}function bj(e){this.a=e}function l9(e){this.a=e}function rje(e){this.a=e}function i4(e){this.a=e}function toe(e){this.a=e}function cje(e){this.a=e}function uje(e){this.a=e}function oje(e){this.a=e}function sje(e){this.a=e}function lje(e){this.a=e}function fje(e){this.a=e}function aje(e){this.a=e}function hje(e){this.a=e}function dje(e){this.a=e}function bje(e){this.a=e}function gje(e){this.a=e}function ioe(e){this.a=e}function wje(e){this.a=e}function pje(e){this.a=e}function mje(e){this.a=e}function vje(e){this.a=e}function yje(e){this.a=e}function kje(e){this.a=e}function jje(e){this.a=e}function Eje(e){this.a=e}function Sje(e){this.a=e}function xje(e){this.a=e}function Aje(e){this.a=e}function Mje(e){this.a=e}function Cje(e){this.a=e}function Tje(e){this.a=e}function Oje(e){this.a=e}function Nje(e){this.a=e}function Ije(e){this.a=e}function Dje(e){this.a=e}function _je(e){this.a=e}function Lje(e){this.a=e}function Pje(e){this.a=e}function $je(e){this.a=e}function Rje(e){this.a=e}function Bje(e){this.a=e}function zje(e){this.a=e}function Fje(e){this.a=e}function Jje(e){this.a=e}function Hje(e){this.a=e}function Gje(e){this.a=e}function qje(e){this.a=e}function Uje(e){this.a=e}function Xje(e){this.a=e}function Kje(e){this.a=e}function Vje(e){this.a=e}function Yje(e){this.a=e}function Qje(e){this.a=e}function Wje(e){this.b=e}function Zje(e){this.a=e}function eEe(e){this.a=e}function nEe(e){this.a=e}function tEe(e){this.a=e}function iEe(e){this.a=e}function rEe(e){this.a=e}function cEe(e){this.c=e}function uEe(e){this.a=e}function oEe(e){this.a=e}function sEe(e){this.a=e}function lEe(e){this.a=e}function fEe(e){this.a=e}function aEe(e){this.a=e}function hEe(e){this.a=e}function dEe(e){this.a=e}function bEe(e){this.a=e}function gEe(e){this.a=e}function wEe(e){this.a=e}function pEe(e){this.a=e}function mEe(e){this.a=e}function vEe(e){this.a=e}function yEe(e){this.a=e}function kEe(e){this.a=e}function jEe(e){this.a=e}function EEe(e){this.a=e}function SEe(e){this.a=e}function xEe(e){this.a=e}function AEe(e){this.a=e}function MEe(e){this.a=e}function CEe(e){this.a=e}function TEe(e){this.a=e}function OEe(e){this.a=e}function NEe(e){this.a=e}function IEe(e){this.a=e}function S1(e){this.a=e}function Cv(e){this.a=e}function DEe(e){this.a=e}function _Ee(e){this.a=e}function LEe(e){this.a=e}function PEe(e){this.a=e}function $Ee(e){this.a=e}function REe(e){this.a=e}function BEe(e){this.a=e}function zEe(e){this.a=e}function FEe(e){this.a=e}function JEe(e){this.a=e}function HEe(e){this.a=e}function GEe(e){this.a=e}function qEe(e){this.a=e}function UEe(e){this.a=e}function XEe(e){this.a=e}function KEe(e){this.a=e}function VEe(e){this.a=e}function YEe(e){this.a=e}function QEe(e){this.a=e}function WEe(e){this.a=e}function ZEe(e){this.a=e}function eSe(e){this.a=e}function nSe(e){this.a=e}function tSe(e){this.a=e}function iSe(e){this.a=e}function rSe(e){this.a=e}function NP(e){this.a=e}function cSe(e){this.f=e}function uSe(e){this.a=e}function oSe(e){this.a=e}function sSe(e){this.a=e}function lSe(e){this.a=e}function fSe(e){this.a=e}function aSe(e){this.a=e}function hSe(e){this.a=e}function dSe(e){this.a=e}function bSe(e){this.a=e}function gSe(e){this.a=e}function wSe(e){this.a=e}function pSe(e){this.a=e}function mSe(e){this.a=e}function vSe(e){this.a=e}function ySe(e){this.a=e}function kSe(e){this.a=e}function jSe(e){this.a=e}function ESe(e){this.a=e}function SSe(e){this.a=e}function xSe(e){this.a=e}function ASe(e){this.a=e}function MSe(e){this.a=e}function CSe(e){this.a=e}function TSe(e){this.a=e}function OSe(e){this.a=e}function NSe(e){this.a=e}function ISe(e){this.a=e}function hX(e){this.a=e}function roe(e){this.a=e}function ki(e){this.b=e}function DSe(e){this.a=e}function _Se(e){this.a=e}function LSe(e){this.a=e}function PSe(e){this.a=e}function $Se(e){this.a=e}function RSe(e){this.a=e}function BSe(e){this.a=e}function zSe(e){this.b=e}function FSe(e){this.a=e}function KC(e){this.a=e}function JSe(e){this.a=e}function HSe(e){this.a=e}function IP(e){this.a=e}function DP(e){this.a=e}function coe(e){this.c=e}function _P(e){this.e=e}function LP(e){this.e=e}function dX(e){this.a=e}function GSe(e){this.d=e}function qSe(e){this.a=e}function uoe(e){this.a=e}function ooe(e){this.a=e}function bw(e){this.e=e}function ibn(){this.a=0}function Te(){CK(this)}function wt(){Hu(this)}function bX(){LDe(this)}function USe(){}function gw(){this.c=Q8e}function XSe(e,n){e.b+=n}function rbn(e,n){n.Wb(e)}function cbn(e){return e.a}function ubn(e){return e.a}function obn(e){return e.a}function sbn(e){return e.a}function lbn(e){return e.a}function R(e){return e.e}function fbn(){return null}function abn(){return null}function hbn(e){throw R(e)}function r4(e){this.a=Nt(e)}function KSe(){this.a=this}function _b(){hOe.call(this)}function dbn(e){e.b.Mf(e.e)}function VSe(e){e.b=new NX}function gj(e,n){e.b=n-e.b}function wj(e,n){e.a=n-e.a}function YSe(e,n){n.gd(e.a)}function bbn(e,n){Ar(n,e)}function qn(e,n){e.push(n)}function QSe(e,n){e.sort(n)}function gbn(e,n,t){e.Wd(t,n)}function VC(e,n){e.e=n,n.b=e}function wbn(){zoe(),RRn()}function WSe(e){B9(),ite.je(e)}function soe(){_b.call(this)}function gX(){_b.call(this)}function loe(){hOe.call(this)}function ZSe(){_b.call(this)}function Nl(){_b.call(this)}function exe(){_b.call(this)}function YC(){_b.call(this)}function is(){_b.call(this)}function c4(){_b.call(this)}function _t(){_b.call(this)}function hu(){_b.call(this)}function nxe(){_b.call(this)}function PP(){this.Bb|=256}function txe(){this.b=new aTe}function foe(){foe=Y,new wt}function r2(e,n){e.length=n}function $P(e,n){Ce(e.a,n)}function pbn(e,n){O0e(e.c,n)}function mbn(e,n){hr(e.b,n)}function f9(e,n){hi(e.e,n)}function vbn(e,n){az(e.a,n)}function ybn(e,n){wQ(e.a,n)}function u4(e){Tz(e.c,e.b)}function kbn(e,n){e.kc().Nb(n)}function aoe(e){this.a=Njn(e)}function ar(){this.a=new wt}function ixe(){this.a=new wt}function RP(){this.a=new Te}function wX(){this.a=new Te}function hoe(){this.a=new Te}function Lb(){this.a=new KPe}function pX(){this.a=new jMe}function doe(){this.a=new R_e}function boe(){this.a=new rNe}function tf(){this.a=new l6}function goe(){this.a=new rv}function rxe(){this.a=new pLe}function cxe(){this.a=new Te}function uxe(){this.a=new Te}function woe(){this.a=new Te}function oxe(){this.a=new Te}function sxe(){this.d=new Te}function lxe(){this.a=new ar}function fxe(){this.a=new wt}function axe(){this.b=new wt}function hxe(){this.b=new Te}function poe(){this.e=new Te}function dxe(){this.a=new Gc}function bxe(){this.d=new Te}function pj(){USe.call(this)}function mX(){pj.call(this)}function o4(){USe.call(this)}function moe(){o4.call(this)}function gxe(){soe.call(this)}function BP(){RP.call(this)}function wxe(){X$.call(this)}function pxe(){woe.call(this)}function mxe(){Te.call(this)}function vxe(){g_e.call(this)}function yxe(){g_e.call(this)}function kxe(){joe.call(this)}function jxe(){joe.call(this)}function Exe(){joe.call(this)}function Sxe(){Eoe.call(this)}function mj(){Fk.call(this)}function voe(){Fk.call(this)}function xs(){xi.call(this)}function xxe(){Bxe.call(this)}function Axe(){Bxe.call(this)}function Mxe(){wt.call(this)}function Cxe(){wt.call(this)}function Txe(){wt.call(this)}function vX(){kBe.call(this)}function Oxe(){ar.call(this)}function Nxe(){PP.call(this)}function yX(){cle.call(this)}function yoe(){wt.call(this)}function kX(){cle.call(this)}function jX(){wt.call(this)}function Ixe(){wt.call(this)}function koe(){jv.call(this)}function Dxe(){koe.call(this)}function _xe(){jv.call(this)}function Lxe(){pC.call(this)}function joe(){this.a=new ar}function Pxe(){this.a=new wt}function $xe(){this.a=new Te}function Rxe(){this.j=new Te}function Eoe(){this.a=new wt}function s4(){this.a=new xi}function Bxe(){this.a=new eC}function Soe(){this.a=new J_}function zxe(){this.a=new $Ae}function vj(){vj=Y,Vne=new G}function EX(){EX=Y,Yne=new Jxe}function SX(){SX=Y,Qne=new Fxe}function Fxe(){xv.call(this,"")}function Jxe(){xv.call(this,"")}function Hxe(e){QRe.call(this,e)}function Gxe(e){QRe.call(this,e)}function xoe(e){E1.call(this,e)}function Aoe(e){YAe.call(this,e)}function jbn(e){YAe.call(this,e)}function Ebn(e){Aoe.call(this,e)}function Sbn(e){Aoe.call(this,e)}function xbn(e){Aoe.call(this,e)}function qxe(e){uY.call(this,e)}function Uxe(e){uY.call(this,e)}function Xxe(e){VTe.call(this,e)}function Kxe(e){Xoe.call(this,e)}function yj(e){YP.call(this,e)}function Moe(e){YP.call(this,e)}function Vxe(e){YP.call(this,e)}function du(e){HIe.call(this,e)}function Yxe(e){du.call(this,e)}function l4(){c9.call(this,{})}function xX(e){j9(),this.a=e}function Qxe(e){e.b=null,e.c=0}function Abn(e,n){e.e=n,QUe(e,n)}function Mbn(e,n){e.a=n,BCn(e)}function AX(e,n,t){e.a[n.g]=t}function Cbn(e,n,t){uAn(t,e,n)}function Tbn(e,n){u2n(n.i,e.n)}function Wxe(e,n){ykn(e).Ad(n)}function Obn(e,n){return e*e/n}function Zxe(e,n){return e.g-n.g}function Nbn(e,n){e.a.ec().Kc(n)}function Ibn(e){return new Av(e)}function Dbn(e){return new M2(e)}function eAe(){eAe=Y,vme=new U}function Coe(){Coe=Y,yme=new Xe}function zP(){zP=Y,XS=new An}function FP(){FP=Y,Zne=new KTe}function nAe(){nAe=Y,Zen=new tt}function JP(e){n1e(),this.a=e}function MX(e){fV(),this.f=e}function v0(e){fV(),this.f=e}function tAe(e){DNe(),this.a=e}function HP(e){du.call(this,e)}function jo(e){du.call(this,e)}function iAe(e){du.call(this,e)}function CX(e){HIe.call(this,e)}function a9(e){du.call(this,e)}function Un(e){du.call(this,e)}function Uc(e){du.call(this,e)}function rAe(e){du.call(this,e)}function f4(e){du.call(this,e)}function pd(e){du.call(this,e)}function Su(e){Ln(e),this.a=e}function kj(e){$fe(e,e.length)}function Toe(e){return ig(e),e}function c2(e){return!!e&&e.b}function _bn(e){return!!e&&e.k}function Lbn(e){return!!e&&e.j}function jj(e){return e.b==e.c}function Fe(e){return Ln(e),e}function ne(e){return Ln(e),e}function QC(e){return Ln(e),e}function Ooe(e){return Ln(e),e}function Pbn(e){return Ln(e),e}function lh(e){du.call(this,e)}function md(e){du.call(this,e)}function a4(e){du.call(this,e)}function TX(e){du.call(this,e)}function Bt(e){du.call(this,e)}function OX(e){dle.call(this,e,0)}function NX(){Sae.call(this,12,3)}function IX(){this.a=Pt(Nt(To))}function cAe(){throw R(new _t)}function Noe(){throw R(new _t)}function uAe(){throw R(new _t)}function $bn(){throw R(new _t)}function Rbn(){throw R(new _t)}function Bbn(){throw R(new _t)}function GP(){GP=Y,B9()}function vd(){Di.call(this,"")}function Ej(){Di.call(this,"")}function y0(){Di.call(this,"")}function h4(){Di.call(this,"")}function Ioe(e){jo.call(this,e)}function Doe(e){jo.call(this,e)}function fh(e){Un.call(this,e)}function h9(e){Hr.call(this,e)}function oAe(e){h9.call(this,e)}function DX(e){F$.call(this,e)}function zbn(e,n,t){e.c.Cf(n,t)}function Fbn(e,n,t){n.Ad(e.a[t])}function Jbn(e,n,t){n.Ne(e.a[t])}function Hbn(e,n){return e.a-n.a}function Gbn(e,n){return e.a-n.a}function qbn(e,n){return e.a-n.a}function qP(e,n){return yY(e,n)}function z(e,n){return G_e(e,n)}function Ubn(e,n){return n in e.a}function sAe(e){return e.a?e.b:0}function Xbn(e){return e.a?e.b:0}function lAe(e,n){return e.f=n,e}function Kbn(e,n){return e.b=n,e}function fAe(e,n){return e.c=n,e}function Vbn(e,n){return e.g=n,e}function _oe(e,n){return e.a=n,e}function Loe(e,n){return e.f=n,e}function Ybn(e,n){return e.f=n,e}function Poe(e,n){return e.e=n,e}function Qbn(e,n){return e.k=n,e}function $oe(e,n){return e.a=n,e}function Wbn(e,n){return e.e=n,e}function Zbn(e,n){e.b=new wc(n)}function aAe(e,n){e._d(n),n.$d(e)}function egn(e,n){il(),n.n.a+=e}function ngn(e,n){G0(),wu(n,e)}function Roe(e){XDe.call(this,e)}function hAe(e){XDe.call(this,e)}function dAe(){qse.call(this,"")}function bAe(){this.b=0,this.a=0}function gAe(){gAe=Y,hnn=DAn()}function u2(e,n){return e.b=n,e}function UP(e,n){return e.a=n,e}function o2(e,n){return e.c=n,e}function s2(e,n){return e.d=n,e}function l2(e,n){return e.e=n,e}function Boe(e,n){return e.f=n,e}function Sj(e,n){return e.a=n,e}function d9(e,n){return e.b=n,e}function b9(e,n){return e.c=n,e}function Ke(e,n){return e.c=n,e}function hn(e,n){return e.b=n,e}function Ve(e,n){return e.d=n,e}function Ye(e,n){return e.e=n,e}function tgn(e,n){return e.f=n,e}function Qe(e,n){return e.g=n,e}function We(e,n){return e.a=n,e}function Ze(e,n){return e.i=n,e}function en(e,n){return e.j=n,e}function ign(e,n){return n.pg(e)}function rgn(e,n){return e.b-n.b}function cgn(e,n){return e.g-n.g}function ugn(e,n){return e.s-n.s}function ogn(e,n){return e?0:n-1}function wAe(e,n){return e?0:n-1}function sgn(e,n){return e?n-1:0}function pAe(e,n){return e.k=n,e}function lgn(e,n){return e.j=n,e}function Vr(){this.a=0,this.b=0}function XP(e){XK.call(this,e)}function k0(e){_w.call(this,e)}function mAe(e){$V.call(this,e)}function vAe(e){$V.call(this,e)}function yAe(){yAe=Y,Pr=eMn()}function j0(){j0=Y,kan=Gxn()}function zoe(){zoe=Y,Lg=SE()}function g9(){g9=Y,Y8e=qxn()}function kAe(){kAe=Y,chn=Uxn()}function Foe(){Foe=Y,Bu=PCn()}function la(e){return e.e&&e.e()}function jAe(e,n){return e.c._b(n)}function EAe(e,n){return kFe(e.b,n)}function SAe(e,n){return Lgn(e.a,n)}function xAe(e,n){e.b=0,$2(e,n)}function fgn(e,n){e.c=n,e.b=!0}function Tv(e,n){return e.a+=n,e}function _X(e,n){return e.a+=n,e}function yd(e,n){return e.a+=n,e}function ww(e,n){return e.a+=n,e}function Pb(e){return M1(e),e.o}function Joe(e){CVe(),QRn(this,e)}function AAe(){throw R(new _t)}function MAe(){throw R(new _t)}function CAe(){throw R(new _t)}function TAe(){throw R(new _t)}function OAe(){throw R(new _t)}function NAe(){throw R(new _t)}function KP(e){this.a=new b4(e)}function kd(e){this.a=new gV(e)}function Ov(e,n){for(;e.Pe(n););}function Hoe(e,n){for(;e.zd(n););}function agn(e,n,t){b3n(e.a,n,t)}function Goe(e,n,t){e.splice(n,t)}function hgn(e,n){return XLn(n,e)}function qoe(e,n){return e.d[n.p]}function WC(e){return e.b!=e.d.c}function IAe(e){return e.l|e.m<<22}function LX(e){return e?e.d:null}function dgn(e){return e?e.g:null}function bgn(e){return e?e.i:null}function DAe(e,n){return bIn(e,n)}function w9(e){return T0(e),e.a}function _Ae(e){e.c?dXe(e):bXe(e)}function LAe(){this.b=new iS(iye)}function PAe(){this.b=new iS(Wre)}function $Ae(){this.b=new iS(Wre)}function RAe(){this.a=new iS(Rye)}function BAe(){this.a=new iS(s6e)}function VP(e){this.a=0,this.b=e}function zAe(){throw R(new _t)}function FAe(){throw R(new _t)}function JAe(){throw R(new _t)}function HAe(){throw R(new _t)}function GAe(){throw R(new _t)}function qAe(){throw R(new _t)}function UAe(){throw R(new _t)}function XAe(){throw R(new _t)}function KAe(){throw R(new _t)}function VAe(){throw R(new _t)}function ggn(){throw R(new hu)}function wgn(){throw R(new hu)}function ZC(e){this.a=new pMe(e)}function p9(e,n){this.e=e,this.d=n}function Uoe(e,n){this.b=e,this.c=n}function YAe(e){tle(e.dc()),this.c=e}function eT(e,n){Hv.call(this,e,n)}function m9(e,n){eT.call(this,e,n)}function QAe(e,n){this.a=e,this.b=n}function WAe(e,n){this.a=e,this.b=n}function ZAe(e,n){this.a=e,this.b=n}function eMe(e,n){this.a=e,this.b=n}function nMe(e,n){this.a=e,this.b=n}function tMe(e,n){this.a=e,this.b=n}function iMe(e,n){this.a=e,this.b=n}function rMe(e,n){this.b=e,this.a=n}function cMe(e,n){this.b=e,this.a=n}function pw(e,n){this.g=e,this.i=n}function uMe(e,n){this.a=e,this.b=n}function oMe(e,n){this.b=e,this.a=n}function sMe(e,n){this.a=e,this.b=n}function lMe(e,n){this.b=e,this.a=n}function YP(e){this.b=u(Nt(e),50)}function QP(e){this.b=u(Nt(e),92)}function Ot(e,n){this.f=e,this.g=n}function PX(e,n){this.a=e,this.b=n}function fMe(e,n){this.a=e,this.f=n}function aMe(e){this.a=u(Nt(e),16)}function Xoe(e){this.a=u(Nt(e),16)}function hMe(e,n){this.b=e,this.c=n}function dMe(e){this.a=u(Nt(e),92)}function pgn(e,n){this.a=e,this.b=n}function bMe(e,n){this.a=e,this.b=n}function gMe(e,n){return so(e.b,n)}function wMe(e,n){return e>n&&n0}function HX(e,n){return ao(e,n)<0}function PMe(e,n){return sV(e.a,n)}function $gn(e,n){B_e.call(this,e,n)}function ise(e){OV(),WMn.call(this,e)}function rse(e){OV(),ise.call(this,e)}function cse(e){cV(),VTe.call(this,e)}function use(e,n){NIe(e,e.length,n)}function uT(e,n){uDe(e,e.length,n)}function Dj(e,n){return e.a.get(n)}function $Me(e,n){return so(e.e,n)}function ose(e){return Ln(e),!1}function RMe(){return gAe(),new hnn}function oT(e){return at(e.a),e.b}function BMe(e,n){this.b=e,this.a=n}function u$(e,n){this.d=e,this.e=n}function zMe(e,n){this.a=e,this.b=n}function FMe(e,n){this.a=e,this.b=n}function JMe(e,n){this.a=e,this.b=n}function HMe(e,n){this.a=e,this.b=n}function GMe(e,n){this.b=e,this.a=n}function g4(e,n){this.a=e,this.b=n}function o$(e,n){Ot.call(this,e,n)}function GX(e,n){Ot.call(this,e,n)}function qX(e,n){Ot.call(this,e,n)}function UX(e,n){Ot.call(this,e,n)}function XX(e,n){Ot.call(this,e,n)}function s$(e,n){Ot.call(this,e,n)}function l$(e){yn.call(this,e,21)}function qMe(e,n){this.b=e,this.a=n}function sse(e,n){this.b=e,this.a=n}function lse(e,n){this.b=e,this.a=n}function fse(e,n){Ot.call(this,e,n)}function KX(e,n){Ot.call(this,e,n)}function sT(e,n){Ot.call(this,e,n)}function ase(e,n){this.b=e,this.a=n}function k9(e,n){this.c=e,this.d=n}function f$(e,n){Ot.call(this,e,n)}function a$(e,n){Ot.call(this,e,n)}function UMe(e,n){this.e=e,this.d=n}function w4(e,n){Ot.call(this,e,n)}function XMe(e,n){this.a=e,this.b=n}function hse(e,n){Ot.call(this,e,n)}function br(e,n){Ot.call(this,e,n)}function h$(e,n){Ot.call(this,e,n)}function _j(e,n,t){e.splice(n,0,t)}function Rgn(e,n,t){e.Mb(t)&&n.Ad(t)}function Bgn(e,n,t){n.Ne(e.a.We(t))}function zgn(e,n,t){n.Bd(e.a.Xe(t))}function Fgn(e,n,t){n.Ad(e.a.Kb(t))}function Jgn(e,n){return cs(e.c,n)}function Hgn(e,n){return cs(e.e,n)}function KMe(e,n){this.a=e,this.b=n}function VMe(e,n){this.a=e,this.b=n}function YMe(e,n){this.a=e,this.b=n}function QMe(e,n){this.a=e,this.b=n}function WMe(e,n){this.a=e,this.b=n}function ZMe(e,n){this.a=e,this.b=n}function eCe(e,n){this.a=e,this.b=n}function nCe(e,n){this.a=e,this.b=n}function tCe(e,n){this.b=e,this.a=n}function iCe(e,n){this.b=e,this.a=n}function rCe(e,n){this.b=e,this.a=n}function cCe(e,n){this.b=n,this.c=e}function d$(e,n){Ot.call(this,e,n)}function lT(e,n){Ot.call(this,e,n)}function dse(e,n){Ot.call(this,e,n)}function Lj(e,n){Ot.call(this,e,n)}function b$(e,n){Ot.call(this,e,n)}function VX(e,n){Ot.call(this,e,n)}function YX(e,n){Ot.call(this,e,n)}function Pj(e,n){Ot.call(this,e,n)}function $j(e,n){Ot.call(this,e,n)}function bse(e,n){Ot.call(this,e,n)}function Nv(e,n){Ot.call(this,e,n)}function QX(e,n){Ot.call(this,e,n)}function Rj(e,n){Ot.call(this,e,n)}function gse(e,n){Ot.call(this,e,n)}function h2(e,n){Ot.call(this,e,n)}function WX(e,n){Ot.call(this,e,n)}function ZX(e,n){Ot.call(this,e,n)}function eK(e,n){Ot.call(this,e,n)}function wse(e,n){Ot.call(this,e,n)}function fT(e,n){Ot.call(this,e,n)}function pse(e,n){Ot.call(this,e,n)}function Iv(e,n){Ot.call(this,e,n)}function nK(e,n){Ot.call(this,e,n)}function g$(e,n){Ot.call(this,e,n)}function aT(e,n){Ot.call(this,e,n)}function d2(e,n){Ot.call(this,e,n)}function w$(e,n){Ot.call(this,e,n)}function mse(e,n){Ot.call(this,e,n)}function tK(e,n){Ot.call(this,e,n)}function iK(e,n){Ot.call(this,e,n)}function rK(e,n){Ot.call(this,e,n)}function cK(e,n){Ot.call(this,e,n)}function uK(e,n){Ot.call(this,e,n)}function oK(e,n){Ot.call(this,e,n)}function p$(e,n){Ot.call(this,e,n)}function uCe(e,n){this.b=e,this.a=n}function vse(e,n){Ot.call(this,e,n)}function oCe(e,n){this.a=e,this.b=n}function sCe(e,n){this.a=e,this.b=n}function lCe(e,n){this.a=e,this.b=n}function yse(e,n){Ot.call(this,e,n)}function kse(e,n){Ot.call(this,e,n)}function fCe(e,n){this.a=e,this.b=n}function Ggn(e,n){return C9(),n!=e}function sK(e){return GTn(e,e.c),e}function qgn(e){k.clearTimeout(e)}function jse(e,n){Ot.call(this,e,n)}function Ese(e,n){Ot.call(this,e,n)}function aCe(e,n){this.a=e,this.b=n}function hCe(e,n){this.a=e,this.b=n}function dCe(e,n){this.b=e,this.d=n}function bCe(e,n){this.a=e,this.b=n}function gCe(e,n){this.b=e,this.a=n}function m$(e,n){Ot.call(this,e,n)}function mw(e,n){Ot.call(this,e,n)}function lK(e,n){Ot.call(this,e,n)}function v$(e,n){Ot.call(this,e,n)}function Sse(e,n){Ot.call(this,e,n)}function wCe(e,n){this.b=e,this.a=n}function pCe(e,n){this.b=e,this.a=n}function mCe(e,n){this.b=e,this.a=n}function vCe(e,n){this.b=e,this.a=n}function xse(e,n){Ot.call(this,e,n)}function hT(e,n){Ot.call(this,e,n)}function Ase(e,n){Ot.call(this,e,n)}function fK(e,n){Ot.call(this,e,n)}function y$(e,n){Ot.call(this,e,n)}function aK(e,n){Ot.call(this,e,n)}function hK(e,n){Ot.call(this,e,n)}function k$(e,n){Ot.call(this,e,n)}function dK(e,n){Ot.call(this,e,n)}function Mse(e,n){Ot.call(this,e,n)}function bK(e,n){Ot.call(this,e,n)}function gK(e,n){Ot.call(this,e,n)}function dT(e,n){Ot.call(this,e,n)}function wK(e,n){Ot.call(this,e,n)}function Cse(e,n){Ot.call(this,e,n)}function bT(e,n){Ot.call(this,e,n)}function Tse(e,n){Ot.call(this,e,n)}function Ose(e,n){this.a=e,this.b=n}function yCe(e,n){this.a=e,this.b=n}function kCe(e,n){this.a=e,this.b=n}function jCe(){Y$(),this.a=new Lle}function ECe(){Bz(),this.a=new ar}function SCe(){UV(),this.b=new ar}function xCe(){jae(),Afe.call(this)}function ACe(){kae(),b_e.call(this)}function MCe(){kae(),b_e.call(this)}function gT(e,n){Ot.call(this,e,n)}function p4(e,n){Ot.call(this,e,n)}function Bj(e,n){Ot.call(this,e,n)}function zj(e,n){Ot.call(this,e,n)}function wT(e,n){Ot.call(this,e,n)}function j$(e,n){Ot.call(this,e,n)}function pK(e,n){Ot.call(this,e,n)}function E$(e,n){Ot.call(this,e,n)}function Fj(e,n){Ot.call(this,e,n)}function mK(e,n){Ot.call(this,e,n)}function S$(e,n){Ot.call(this,e,n)}function Dv(e,n){Ot.call(this,e,n)}function pT(e,n){Ot.call(this,e,n)}function Jj(e,n){Ot.call(this,e,n)}function Hj(e,n){Ot.call(this,e,n)}function vK(e,n){Ot.call(this,e,n)}function mT(e,n){Ot.call(this,e,n)}function x$(e,n){Ot.call(this,e,n)}function _v(e,n){Ot.call(this,e,n)}function yK(e,n){Ot.call(this,e,n)}function kK(e,n){Ot.call(this,e,n)}function A$(e,n){Ot.call(this,e,n)}function Ee(e,n){this.a=e,this.b=n}function CCe(e,n){this.a=e,this.b=n}function TCe(e,n){this.a=e,this.b=n}function OCe(e,n){this.a=e,this.b=n}function NCe(e,n){this.a=e,this.b=n}function ICe(e,n){this.a=e,this.b=n}function DCe(e,n){this.a=e,this.b=n}function jc(e,n){this.a=e,this.b=n}function _Ce(e,n){this.a=e,this.b=n}function LCe(e,n){this.a=e,this.b=n}function PCe(e,n){this.a=e,this.b=n}function $Ce(e,n){this.a=e,this.b=n}function RCe(e,n){this.a=e,this.b=n}function BCe(e,n){this.a=e,this.b=n}function zCe(e,n){this.b=e,this.a=n}function FCe(e,n){this.b=e,this.a=n}function JCe(e,n){this.b=e,this.a=n}function HCe(e,n){this.b=e,this.a=n}function GCe(e,n){this.a=e,this.b=n}function qCe(e,n){this.a=e,this.b=n}function UCe(e,n){this.a=e,this.b=n}function XCe(e,n){this.a=e,this.b=n}function KCe(e,n){this.f=e,this.c=n}function Nse(e,n){this.i=e,this.g=n}function M$(e,n){Ot.call(this,e,n)}function m4(e,n){Ot.call(this,e,n)}function C$(e,n){this.a=e,this.b=n}function VCe(e,n){this.a=e,this.b=n}function Ise(e,n){this.d=e,this.e=n}function YCe(e,n){this.a=e,this.b=n}function QCe(e,n){this.a=e,this.b=n}function WCe(e,n){this.d=e,this.b=n}function ZCe(e,n){this.e=e,this.a=n}function Dse(e,n){e.i=null,xB(e,n)}function Ugn(e,n){e&&ei(eD,e,n)}function eTe(e,n){return xQ(e.a,n)}function _se(e,n){return cs(e.g,n)}function Xgn(e,n){return cs(n.b,e)}function Kgn(e,n){return-e.b.$e(n)}function T$(e){return IO(e.c,e.b)}function Vgn(e,n){l8n(new st(e),n)}function Ygn(e,n,t){VHe(n,vW(e,t))}function Qgn(e,n,t){VHe(n,vW(e,t))}function nTe(e,n){W9n(e.a,u(n,12))}function tTe(e,n){this.a=e,this.b=n}function vT(e,n){this.b=e,this.c=n}function x0(e,n){return e.Pd().Xb(n)}function O$(e,n){return j7n(e.Jc(),n)}function bu(e){return e?e.kd():null}function ue(e){return e??null}function b2(e){return typeof e===ly}function g2(e){return typeof e===Lge}function $r(e){return typeof e===aZ}function Gj(e,n){return ao(e,n)==0}function N$(e,n){return ao(e,n)>=0}function qj(e,n){return ao(e,n)!=0}function Lse(e,n){return e.a+=""+n,e}function Wgn(e){return""+(Ln(e),e)}function iTe(e){return Is(e),e.d.gc()}function Pse(e){return kn(e,0),null}function I$(e){return tE(e==null),e}function Uj(e,n){return e.a+=""+n,e}function Bc(e,n){return e.a+=""+n,e}function Xj(e,n){return e.a+=""+n,e}function uo(e,n){return e.a+=""+n,e}function Kt(e,n){return e.a+=""+n,e}function rTe(e,n){e.q.setTime(Qb(n))}function cTe(e,n){Dfe.call(this,e,n)}function uTe(e,n){Dfe.call(this,e,n)}function D$(e,n){Dfe.call(this,e,n)}function gc(e,n){Ki(e,n,e.c.b,e.c)}function Lv(e,n){Ki(e,n,e.a,e.a.a)}function Zgn(e,n){return e.j[n.p]==2}function oTe(e,n){return e.a=n.g+1,e}function fa(e){return e.a=0,e.b=0,e}function sTe(e){Hu(this),AE(this,e)}function lTe(){this.b=0,this.a=!1}function fTe(){this.b=0,this.a=!1}function aTe(){this.b=new b4(z2(12))}function hTe(){hTe=Y,itn=Dt(DQ())}function dTe(){dTe=Y,ain=Dt(JUe())}function bTe(){bTe=Y,isn=Dt(sze())}function $se(){$se=Y,foe(),kme=new wt}function ewn(e){return Nt(e),new Kj(e)}function gTe(e,n){return ue(e)===ue(n)}function _$(e){return e<10?"0"+e:""+e}function wTe(e){return _o(e.l,e.m,e.h)}function su(e){return typeof e===Lge}function jK(e,n){return of(e.a,0,n)}function v4(e){return lc((Ln(e),e))}function nwn(e){return lc((Ln(e),e))}function twn(e,n){return ji(e.a,n.a)}function Rse(e,n){return oo(e.a,n.a)}function iwn(e,n){return rDe(e.a,n.a)}function ah(e,n){return e.indexOf(n)}function Bse(e,n){G9(e,0,e.length,n)}function ti(e,n){i$(),ei(EG,e,n)}function an(e,n){Pi.call(this,e,n)}function EK(e,n){k2.call(this,e,n)}function Pv(e,n){Nse.call(this,e,n)}function pTe(e,n){ST.call(this,e,n)}function SK(e,n){W9.call(this,e,n)}function Fh(){Uue.call(this,new D0)}function mTe(){hR.call(this,0,0,0,0)}function zse(e){return pu(e.b.b,e,0)}function vTe(e,n){return oo(e.g,n.g)}function rwn(e){return e==fp||e==gm}function cwn(e){return e==fp||e==bm}function uwn(e,n){return oo(e.g,n.g)}function own(e,n){return il(),n.a+=e}function swn(e,n){return il(),n.a+=e}function lwn(e,n){return il(),n.c+=e}function fwn(e,n){return Ce(e.c,n),e}function yTe(e,n){return Ce(e.a,n),n}function Fse(e,n){return ll(e.a,n),e}function kTe(e){this.a=RMe(),this.b=e}function jTe(e){this.a=RMe(),this.b=e}function wc(e){this.a=e.a,this.b=e.b}function Kj(e){this.a=e,mC.call(this)}function ETe(e){this.a=e,mC.call(this)}function Fs(e){return e.sh()&&e.th()}function $v(e){return e!=th&&e!=pb}function x1(e){return e==Zc||e==ru}function Rv(e){return e==Vl||e==eh}function STe(e){return e==U3||e==q3}function L$(e){return ll(new or,e)}function xTe(e){return NV(u(e,125))}function awn(e,n){return ji(n.f,e.f)}function ATe(e,n){return new W9(n,e)}function hwn(e,n){return new W9(n,e)}function Il(e,n,t){Os(e,n),Ns(e,t)}function xK(e,n,t){wB(e,n),pB(e,t)}function vw(e,n,t){Pw(e,n),Lw(e,t)}function yT(e,n,t){Wv(e,n),Zv(e,t)}function kT(e,n,t){e3(e,n),n3(e,t)}function AK(e,n){c8(e,n),K9(e,e.D)}function MK(e){KCe.call(this,e,!0)}function y4(){_f.call(this,0,0,0,0)}function MTe(){o$.call(this,"Head",1)}function CTe(){o$.call(this,"Tail",3)}function TTe(e,n,t){Sle.call(this,e,n,t)}function yw(e){hR.call(this,e,e,e,e)}function A0(e){yh(),C7n.call(this,e)}function OTe(e){Ao(e.Qf(),new Wke(e))}function Bv(e){return e!=null?Ni(e):0}function dwn(e,n){return P2(n,_a(e))}function bwn(e,n){return P2(n,_a(e))}function gwn(e,n){return e[e.length]=n}function wwn(e,n){return e[e.length]=n}function pwn(e,n){return jB(AV(e.f),n)}function mwn(e,n){return jB(AV(e.n),n)}function vwn(e,n){return jB(AV(e.p),n)}function Jse(e){return Mvn(e.b.Jc(),e.a)}function ywn(e){return e==null?0:Ni(e)}function CK(e){e.c=le(Mr,Nn,1,0,5,1)}function NTe(e,n,t){ir(e.c[n.g],n.g,t)}function kwn(e,n,t){u(e.c,72).Ei(n,t)}function jwn(e,n,t){Il(t,t.i+e,t.j+n)}function Yr(e,n){Pi.call(this,e.b,n)}function Ewn(e,n){Et(Vu(e.a),sLe(n))}function Swn(e,n){Et(Ts(e.a),lLe(n))}function xwn(e,n){Va||(e.b=n)}function TK(e,n,t){return ir(e,n,t),t}function Lt(){Lt=Y,new ITe,new Te}function ITe(){new wt,new wt,new wt}function Awn(){throw R(new pd($en))}function Mwn(){throw R(new pd($en))}function Cwn(){throw R(new pd(Ren))}function Twn(){throw R(new pd(Ren))}function DTe(){DTe=Y,are=new FE(Mce)}function Na(){Na=Y,k.Math.log(2)}function Dl(){Dl=Y,d1=(IMe(),Man)}function Vj(e){ai(),bw.call(this,e)}function _Te(e){this.a=e,rfe.call(this,e)}function OK(e){this.a=e,QP.call(this,e)}function NK(e){this.a=e,QP.call(this,e)}function Tr(e,n){oV(e.c,e.c.length,n)}function gu(e){return e.an?1:0}function Gse(e,n){return ao(e,n)>0?e:n}function _o(e,n,t){return{l:e,m:n,h:t}}function Own(e,n){e.a!=null&&nTe(n,e.a)}function Nwn(e){fc(e,null),Gr(e,null)}function Iwn(e,n,t){return ei(e.g,t,n)}function Dwn(e,n){Nt(n),qv(e).Ic(new Pe)}function PTe(){Vde(),this.a=new iS(pve)}function P$(e){this.b=e,this.a=new Te}function $Te(e){this.b=new w5,this.a=e}function qse(e){Ple.call(this),this.a=e}function RTe(e){hae.call(this),this.b=e}function BTe(){o$.call(this,"Range",2)}function $$(e){e.j=le(_me,Ae,324,0,0,1)}function zTe(e){e.a=new Jt,e.c=new Jt}function FTe(e){e.a=new wt,e.e=new wt}function Use(e){return new Ee(e.c,e.d)}function _wn(e){return new Ee(e.c,e.d)}function pc(e){return new Ee(e.a,e.b)}function Lwn(e,n){return ei(e.a,n.a,n)}function Pwn(e,n,t){return ei(e.k,t,n)}function zv(e,n,t){return gde(n,t,e.c)}function Xse(e,n){return re(zn(e.i,n))}function Kse(e,n){return re(zn(e.j,n))}function JTe(e,n){return w$n(e.a,n,null)}function Yj(e,n){return APn(e.c,e.b,n)}function X(e,n){return e!=null&&$Q(e,n)}function HTe(e,n){kt(e),e.Fc(u(n,16))}function $wn(e,n,t){e.c._c(n,u(t,136))}function Rwn(e,n,t){e.c.Si(n,u(t,136))}function Bwn(e,n,t){return b$n(e,n,t),t}function zwn(e,n){return rl(),n.n.b+=e}function IK(e,n){return ikn(e.Jc(),n)!=-1}function Fwn(e,n){return new pOe(e.Jc(),n)}function R$(e){return e.Ob()?e.Pb():null}function GTe(e){return ph(e,0,e.length)}function qTe(e){KV(e,null),VV(e,null)}function UTe(){ST.call(this,null,null)}function XTe(){G$.call(this,null,null)}function KTe(){Ot.call(this,"INSTANCE",0)}function Fv(){this.a=le(Mr,Nn,1,8,5,1)}function Vse(e){this.a=e,wt.call(this)}function VTe(e){this.a=(En(),new h9(e))}function Jwn(e){this.b=(En(),new aX(e))}function j9(){j9=Y,Gme=new xX(null)}function Yse(){Yse=Y,Yse(),gnn=new xt}function Ce(e,n){return qn(e.c,n),!0}function YTe(e,n){e.c&&(pfe(n),A_e(n))}function Hwn(e,n){e.q.setHours(n),sS(e,n)}function Qse(e,n){return e.a.Ac(n)!=null}function DK(e,n){return e.a.Ac(n)!=null}function Ia(e,n){return e.a[n.c.p][n.p]}function Gwn(e,n){return e.e[n.c.p][n.p]}function qwn(e,n){return e.c[n.c.p][n.p]}function _K(e,n,t){return e.a[n.g][t.g]}function Uwn(e,n){return e.j[n.p]=WOn(n)}function k4(e,n){return e.a*n.a+e.b*n.b}function Xwn(e,n){return e.a=e}function Wwn(e,n,t){return t?n!=0:n!=e-1}function QTe(e,n,t){e.a=n^1502,e.b=t^JZ}function Zwn(e,n,t){return e.a=n,e.b=t,e}function A1(e,n){return e.a*=n,e.b*=n,e}function Qj(e,n,t){return ir(e.g,n,t),t}function epn(e,n,t,i){ir(e.a[n.g],t.g,i)}function mr(e,n,t){PT.call(this,e,n,t)}function B$(e,n,t){mr.call(this,e,n,t)}function rs(e,n,t){mr.call(this,e,n,t)}function WTe(e,n,t){B$.call(this,e,n,t)}function Wse(e,n,t){PT.call(this,e,n,t)}function Jv(e,n,t){PT.call(this,e,n,t)}function ZTe(e,n,t){nR.call(this,e,n,t)}function Zse(e,n,t){nR.call(this,e,n,t)}function eOe(e,n,t){Zse.call(this,e,n,t)}function nOe(e,n,t){Wse.call(this,e,n,t)}function M0(e){this.c=e,this.a=this.c.a}function st(e){this.i=e,this.f=this.i.j}function Hv(e,n){this.a=e,QP.call(this,n)}function tOe(e,n){this.a=e,OX.call(this,n)}function iOe(e,n){this.a=e,OX.call(this,n)}function rOe(e,n){this.a=e,OX.call(this,n)}function ele(e){this.a=e,GU.call(this,e.d)}function cOe(e){e.b.Qb(),--e.d.f.d,bR(e.d)}function uOe(e){e.a=u(Kn(e.b.a,4),129)}function oOe(e){e.a=u(Kn(e.b.a,4),129)}function npn(e){HT(e,fZe),_z(e,aRn(e))}function nle(e,n){return Ijn(e,new y0,n).a}function tpn(e){return WC(e.a)?oLe(e):null}function sOe(e){xv.call(this,u(Nt(e),35))}function lOe(e){xv.call(this,u(Nt(e),35))}function tle(e){if(!e)throw R(new YC)}function ile(e){if(!e)throw R(new is)}function Qn(e,n){return Nt(n),new wOe(e,n)}function fOe(e,n){return new ZGe(e.a,e.b,n)}function ipn(e){return e.l+e.m*dy+e.h*hg}function rpn(e){return e==null?null:e.name}function rle(e,n,t){return e.indexOf(n,t)}function z$(e,n){return e.lastIndexOf(n)}function Wj(e){return e==null?Vo:fu(e)}function $n(){$n=Y,ib=!1,d7=!0}function aOe(){aOe=Y,zX(),thn=new FU}function cle(){this.Bb|=256,this.Bb|=512}function hOe(){$$(this),TR(this),this.he()}function F$(e){Hr.call(this,e),this.a=e}function ule(e){ic.call(this,e),this.a=e}function ole(e){h9.call(this,e),this.a=e}function cf(e){Di.call(this,(Ln(e),e))}function tl(e){Di.call(this,(Ln(e),e))}function LK(e){Uue.call(this,new lhe(e))}function dOe(e){this.a=e,Xi.call(this,e)}function sle(e,n){this.a=n,OX.call(this,e)}function bOe(e,n){this.a=n,uY.call(this,e)}function gOe(e,n){this.a=e,uY.call(this,n)}function wOe(e,n){this.a=n,YP.call(this,e)}function pOe(e,n){this.a=n,YP.call(this,e)}function lle(e){pX.call(this),ac(this,e)}function Js(e){return at(e.a!=null),e.a}function mOe(e,n){return Ce(n.a,e.a),e.a}function vOe(e,n){return Ce(n.b,e.a),e.a}function kw(e,n){return Ce(n.a,e.a),e.a}function jT(e,n,t){return UY(e,n,n,t),e}function J$(e,n){return++e.b,Ce(e.a,n)}function fle(e,n){return++e.b,qo(e.a,n)}function cpn(e,n){return ji(e.c.d,n.c.d)}function upn(e,n){return ji(e.c.c,n.c.c)}function opn(e,n){return ji(e.n.a,n.n.a)}function Ho(e,n){return u(vi(e.b,n),16)}function spn(e,n){return e.n.b=(Ln(n),n)}function lpn(e,n){return e.n.b=(Ln(n),n)}function cs(e,n){return!!n&&e.b[n.g]==n}function Zj(e){return gu(e.a)||gu(e.b)}function fpn(e,n){return ji(e.e.b,n.e.b)}function apn(e,n){return ji(e.e.a,n.e.a)}function hpn(e,n,t){return rPe(e,n,t,e.b)}function ale(e,n,t){return rPe(e,n,t,e.c)}function dpn(e){return il(),!!e&&!e.dc()}function yOe(){Cj(),this.b=new _je(this)}function H$(){H$=Y,mJ=new Pi(WYe,0)}function j4(e){this.d=e,st.call(this,e)}function E4(e){this.c=e,st.call(this,e)}function ET(e){this.c=e,j4.call(this,e)}function hle(e,n){Sde.call(this,e,n,null)}function S4(e){return e.a!=null?e.a:null}function jw(e){return e.$H||(e.$H=++_Bn)}function Sd(e){var n;n=e.a,e.a=e.b,e.b=n}function ST(e,n){Ij(),this.a=e,this.b=n}function G$(e,n){Ed(),this.b=e,this.c=n}function q$(e,n){fV(),this.f=n,this.d=e}function dle(e,n){Zae(n,e),this.c=e,this.b=n}function bpn(e,n){return dV(e.c).Kd().Xb(n)}function PK(e,n){return new kNe(e,e.gc(),n)}function gpn(e){return FP(),It((nLe(),Uen),e)}function wpn(e){return new D2(3,e)}function Jh(e){return sl(e,rm),new xo(e)}function kOe(e){return B9(),parseInt(e)||-1}function E9(e,n,t){return rle(e,Xo(n),t)}function ble(e,n,t){u(oO(e,n),22).Ec(t)}function ppn(e,n,t){wQ(e.a,t),az(e.a,n)}function S9(e,n,t){var i;i=e.dd(n),i.Rb(t)}function jOe(e,n,t,i){Nfe.call(this,e,n,t,i)}function EOe(e){ufe.call(this,e,null,null)}function $K(e){f2(),this.b=e,this.a=!0}function SOe(e){WP(),this.b=e,this.a=!0}function xOe(e){if(!e)throw R(new Nl)}function gle(e){if(!e)throw R(new YC)}function mpn(e){if(!e)throw R(new gX)}function at(e){if(!e)throw R(new hu)}function w2(e){if(!e)throw R(new is)}function AOe(e){e.d=new EOe(e),e.e=new wt}function x9(e){return at(e.b!=0),e.a.a.c}function If(e){return at(e.b!=0),e.c.b.c}function vpn(e,n){return UY(e,n,n+1,""),e}function MOe(e){lZ(),VSe(this),this.Df(e)}function COe(e){this.c=e,this.a=1,this.b=1}function xT(e){X(e,161)&&u(e,161).mi()}function TOe(e){return e.b=u(oae(e.a),45)}function p2(e,n){return u($a(e.a,n),35)}function wi(e,n){return!!e.q&&so(e.q,n)}function ypn(e,n){return e>0?n/(e*e):n*100}function kpn(e,n){return e>0?n*n/e:n*n*100}function jpn(e){return e.f!=null?e.f:""+e.g}function RK(e){return e.f!=null?e.f:""+e.g}function Epn(e){return P1(),e.e.a+e.f.a/2}function Spn(e){return P1(),e.e.b+e.f.b/2}function xpn(e,n,t){return P1(),t.e.b-e*n}function Apn(e,n,t){return P1(),t.e.a-e*n}function Mpn(e,n,t){return e$(),t.Lg(e,n)}function Cpn(e,n){return G0(),gn(e,n.e,n)}function Tpn(e,n,t){return Ce(n,ZFe(e,t))}function Opn(e,n,t){rB(),e.nf(n)&&t.Ad(e)}function m2(e,n,t){return e.a+=n,e.b+=t,e}function OOe(e,n,t){return e.a-=n,e.b-=t,e}function wle(e,n){return e.a=n.a,e.b=n.b,e}function U$(e){return e.a=-e.a,e.b=-e.b,e}function NOe(e){this.c=e,Os(e,0),Ns(e,0)}function IOe(e){xi.call(this),xE(this,e)}function DOe(){Ot.call(this,"GROW_TREE",0)}function Hs(e,n,t){os.call(this,e,n,t,2)}function _Oe(e,n){Ed(),ple.call(this,e,n)}function ple(e,n){Ed(),G$.call(this,e,n)}function LOe(e,n){Ed(),G$.call(this,e,n)}function POe(e,n){Ij(),ST.call(this,e,n)}function BK(e,n){Dl(),fR.call(this,e,n)}function $Oe(e,n){Dl(),BK.call(this,e,n)}function mle(e,n){Dl(),BK.call(this,e,n)}function ROe(e,n){Dl(),mle.call(this,e,n)}function vle(e,n){Dl(),fR.call(this,e,n)}function BOe(e,n){Dl(),vle.call(this,e,n)}function zOe(e,n){Dl(),fR.call(this,e,n)}function Npn(e,n){return e.c.Ec(u(n,136))}function Ipn(e,n){return u(zn(e.e,n),26)}function Dpn(e,n){return u(zn(e.e,n),26)}function yle(e,n,t){return Yz(lO(e,n),t)}function _pn(e,n,t){return n.xl(e.e,e.c,t)}function Lpn(e,n,t){return n.yl(e.e,e.c,t)}function zK(e,n){return z0(e.e,u(n,52))}function Ppn(e,n,t){RE(Vu(e.a),n,sLe(t))}function $pn(e,n,t){RE(Ts(e.a),n,lLe(t))}function FOe(e,n){return Ln(e),e+UK(n)}function Rpn(e){return e==null?null:fu(e)}function Bpn(e){return e==null?null:fu(e)}function zpn(e){return e==null?null:sCn(e)}function Fpn(e){return e==null?null:tRn(e)}function M1(e){e.o==null&&MOn(e)}function ze(e){return tE(e==null||b2(e)),e}function re(e){return tE(e==null||g2(e)),e}function Pt(e){return tE(e==null||$r(e)),e}function Jpn(e,n){return qQ(e,n),new IDe(e,n)}function AT(e,n){this.c=e,p9.call(this,e,n)}function eE(e,n){this.a=e,AT.call(this,e,n)}function Hpn(e,n){this.d=e,tn(this),this.b=n}function kle(){kBe.call(this),this.Bb|=Ec}function JOe(){this.a=new Nw,this.b=new Nw}function jle(e){this.q=new k.Date(Qb(e))}function Gv(){Gv=Y,V3=new ki("root")}function A9(){A9=Y,tD=new xxe,new Axe}function v2(){v2=Y,Qme=rn((Vs(),_g))}function Gpn(e,n){n.a?KTn(e,n):DK(e.a,n.b)}function HOe(e,n){Va||Ce(e.a,n)}function qpn(e,n){return cT(),Q9(n.d.i,e)}function Upn(e,n){return q4(),new RXe(n,e)}function Xpn(e,n,t){return e.Le(n,t)<=0?t:n}function Kpn(e,n,t){return e.Le(n,t)<=0?n:t}function Vpn(e,n){return u($a(e.b,n),144)}function Ypn(e,n){return u($a(e.c,n),233)}function FK(e){return u(Le(e.a,e.b),295)}function GOe(e){return new Ee(e.c,e.d+e.a)}function qOe(e){return Ln(e),e?1231:1237}function UOe(e){return rl(),STe(u(e,203))}function Ele(e,n){return u(zn(e.b,n),278)}function XOe(e,n,t){++e.j,e.oj(n,e.Xi(n,t))}function MT(e,n,t){++e.j,e.rj(),gY(e,n,t)}function Sle(e,n,t){nB.call(this,e,n,t,null)}function KOe(e,n,t){nB.call(this,e,n,t,null)}function xle(e,n){wY.call(this,e),this.a=n}function Ale(e,n){wY.call(this,e),this.a=n}function Pi(e,n){ki.call(this,e),this.a=n}function Mle(e,n){coe.call(this,e),this.a=n}function JK(e,n){coe.call(this,e),this.a=n}function VOe(e,n){this.c=e,_w.call(this,n)}function YOe(e,n){this.a=e,zSe.call(this,n)}function CT(e,n){this.a=e,zSe.call(this,n)}function Cle(e,n,t){return t=hl(e,n,3,t),t}function Tle(e,n,t){return t=hl(e,n,6,t),t}function Ole(e,n,t){return t=hl(e,n,9,t),t}function hh(e,n){return HT(n,ewe),e.f=n,e}function Nle(e,n){return(n&oi)%e.d.length}function QOe(e,n,t){return bge(e.c,e.b,n,t)}function Qpn(e,n,t){return e.apply(n,t)}function WOe(e,n,t){var i;i=e.dd(n),i.Rb(t)}function ZOe(e,n,t){return e.a+=ph(n,0,t),e}function TT(e){return!e.a&&(e.a=new vn),e.a}function Ile(e,n){var t;return t=e.e,e.e=n,t}function Dle(e,n){var t;return t=n,!!e.De(t)}function Bb(e,n){return $n(),e==n?0:e?1:-1}function y2(e,n){e.a._c(e.b,n),++e.b,e.c=-1}function Wpn(e,n){var t;t=e[FZ],t.call(e,n)}function Zpn(e,n){var t;t=e[FZ],t.call(e,n)}function e2n(e,n,t){$b(),SP(e,n.Te(e.a,t))}function _le(e,n,t){return I4(e,u(n,23),t)}function Df(e,n){return qP(new Array(n),e)}function n2n(e){return Rt(Hb(e,32))^Rt(e)}function HK(e){return String.fromCharCode(e)}function t2n(e){return e==null?null:e.message}function GK(e){this.a=(En(),new _n(Nt(e)))}function eNe(e){this.a=(sl(e,rm),new xo(e))}function nNe(e){this.a=(sl(e,rm),new xo(e))}function tNe(){this.a=new Te,this.b=new Te}function iNe(){this.a=new rv,this.b=new txe}function Lle(){this.b=new D0,this.a=new D0}function rNe(){this.b=new Vr,this.c=new Te}function Ple(){this.n=new Vr,this.o=new Vr}function X$(){this.n=new o4,this.i=new y4}function cNe(){this.b=new ar,this.a=new ar}function uNe(){this.a=new Te,this.d=new Te}function oNe(){this.a=new IU,this.b=new o_}function sNe(){this.b=new LAe,this.a=new kM}function lNe(){this.b=new wt,this.a=new wt}function fNe(){X$.call(this),this.a=new Vr}function $le(e,n,t,i){hR.call(this,e,n,t,i)}function i2n(e,n){return e.n.a=(Ln(n),n+10)}function r2n(e,n){return e.n.a=(Ln(n),n+10)}function c2n(e,n){return cT(),!Q9(n.d.i,e)}function aNe(e){Hu(e.e),e.d.b=e.d,e.d.a=e.d}function OT(e){e.b?OT(e.b):e.f.c.yc(e.e,e.d)}function u2n(e,n){x1(e.f)?vOn(e,n):aMn(e,n)}function hNe(e,n,t){t!=null&&EB(n,KQ(e,t))}function dNe(e,n,t){t!=null&&SB(n,KQ(e,t))}function x4(e,n,t,i){we.call(this,e,n,t,i)}function Rle(e,n,t,i){we.call(this,e,n,t,i)}function bNe(e,n,t,i){Rle.call(this,e,n,t,i)}function gNe(e,n,t,i){yR.call(this,e,n,t,i)}function qK(e,n,t,i){yR.call(this,e,n,t,i)}function wNe(e,n,t,i){qK.call(this,e,n,t,i)}function Ble(e,n,t,i){yR.call(this,e,n,t,i)}function In(e,n,t,i){Ble.call(this,e,n,t,i)}function zle(e,n,t,i){qK.call(this,e,n,t,i)}function pNe(e,n,t,i){zle.call(this,e,n,t,i)}function mNe(e,n,t,i){Lfe.call(this,e,n,t,i)}function k2(e,n){jo.call(this,RS+e+pg+n)}function o2n(e,n){return n==e||y8(Dz(n),e)}function Fle(e,n){return e.hk().ti().oi(e,n)}function Jle(e,n){return e.hk().ti().qi(e,n)}function s2n(e,n){return e.e=u(e.d.Kb(n),162)}function vNe(e,n){return ei(e.a,n,"")==null}function yNe(e,n){return Ln(e),ue(e)===ue(n)}function bn(e,n){return Ln(e),ue(e)===ue(n)}function Hle(e,n,t){return e.lastIndexOf(n,t)}function kNe(e,n,t){this.a=e,dle.call(this,n,t)}function jNe(e){this.c=e,D$.call(this,bN,0)}function ENe(e,n,t){this.c=n,this.b=t,this.a=e}function pi(e,n){return e.a+=n.a,e.b+=n.b,e}function Nr(e,n){return e.a-=n.a,e.b-=n.b,e}function l2n(e){return r2(e.j.c,0),e.a=-1,e}function f2n(e,n){var t;return t=n.ni(e.a),t}function Gle(e,n,t){return t=hl(e,n,11,t),t}function a2n(e,n,t){return ji(e[n.a],e[t.a])}function h2n(e,n){return oo(e.a.d.p,n.a.d.p)}function d2n(e,n){return oo(n.a.d.p,e.a.d.p)}function b2n(e,n){return ji(e.c-e.s,n.c-n.s)}function g2n(e,n){return ji(e.b.e.a,n.b.e.a)}function w2n(e,n){return ji(e.c.e.a,n.c.e.a)}function p2n(e,n){return he(n,(Oe(),hI),e)}function m2n(e,n){return e.b.zd(new FMe(e,n))}function v2n(e,n){return e.b.zd(new JMe(e,n))}function SNe(e,n){return e.b.zd(new HMe(e,n))}function xNe(e,n){return X(n,16)&&mXe(e.c,n)}function ANe(e){return e.c?pu(e.c.a,e,0):-1}function y2n(e){return e<100?null:new k0(e)}function A4(e){return e==Dg||e==a1||e==to}function k2n(e,n,t){return u(e.c,72).Uk(n,t)}function K$(e,n,t){return u(e.c,72).Vk(n,t)}function j2n(e,n,t){return _pn(e,u(n,344),t)}function qle(e,n,t){return Lpn(e,u(n,344),t)}function E2n(e,n,t){return cGe(e,u(n,344),t)}function MNe(e,n,t){return EMn(e,u(n,344),t)}function nE(e,n){return n==null?null:J2(e.b,n)}function S2n(e,n){Va||n&&(e.d=n)}function Ule(e,n){if(!e)throw R(new Un(n))}function M9(e){if(!e)throw R(new Uc(Pge))}function UK(e){return g2(e)?(Ln(e),e):e.se()}function V$(e){return!isNaN(e)&&!isFinite(e)}function XK(e){zTe(this),qs(this),ac(this,e)}function bs(e){CK(this),sfe(this.c,0,e.Nc())}function NT(e){C9(),this.d=e,this.a=new Fv}function CNe(e,n,t){this.d=e,this.b=t,this.a=n}function _l(e,n,t){this.a=e,this.b=n,this.c=t}function TNe(e,n,t){this.a=e,this.b=n,this.c=t}function Xle(e,n){this.c=e,yV.call(this,e,n)}function ONe(e,n){Nvn.call(this,e,e.length,n)}function KK(e,n){if(e!=n)throw R(new Nl)}function NNe(e){this.a=e,jd(),Lu(Date.now())}function INe(e){As(e.a),uhe(e.c,e.b),e.b=null}function VK(){VK=Y,Hme=new di,dnn=new Gt}function YK(e){var n;return n=new f6,n.e=e,n}function x2n(e,n,t){return $b(),e.a.Wd(n,t),n}function Kle(e,n,t){this.b=e,this.c=n,this.a=t}function Vle(e){var n;return n=new sxe,n.b=e,n}function A2n(e){return wa(),It((C$e(),Onn),e)}function M2n(e){return q9(),It((J$e(),wnn),e)}function C2n(e){return zl(),It((M$e(),jnn),e)}function T2n(e){return ws(),It((T$e(),Inn),e)}function O2n(e){return Uo(),It((O$e(),_nn),e)}function N2n(e){return nF(),It((hTe(),itn),e)}function I2n(e){return Rw(),It((X$e(),ctn),e)}function D2n(e){return n8(),It((K$e(),Vtn),e)}function _2n(e){return aB(),It((_Pe(),btn),e)}function L2n(e){return kE(),It((A$e(),ztn),e)}function P2n(e){return zr(),It((PRe(),Gtn),e)}function $2n(e){return W4(),It((U$e(),nin),e)}function R2n(e){return Fn(),It((rze(),cin),e)}function B2n(e){return Y9(),It((LPe(),fin),e)}function QK(e){hR.call(this,e.d,e.c,e.a,e.b)}function Yle(e){hR.call(this,e.d,e.c,e.a,e.b)}function z2n(e){return Ur(),It((dTe(),ain),e)}function DNe(){DNe=Y,Ian=le(Mr,Nn,1,0,5,1)}function _Ne(){_Ne=Y,Yan=le(Mr,Nn,1,0,5,1)}function Qle(){Qle=Y,Qan=le(Mr,Nn,1,0,5,1)}function IT(){IT=Y,SJ=new fq,xJ=new BA}function Y$(){Y$=Y,win=new Tq,gin=new Oq}function il(){il=Y,kin=new wk,jin=new ld}function F2n(e){return $w(),It((f$e(),Iin),e)}function J2n(e){return zf(),It((W$e(),xin),e)}function H2n(e){return X2(),It((ORe(),Min),e)}function G2n(e){return Fz(),It((oze(),Din),e)}function q2n(e){return ty(),It((fBe(),_in),e)}function U2n(e){return iB(),It((pPe(),Lin),e)}function X2n(e){return zE(),It((eRe(),Pin),e)}function K2n(e){return vB(),It((c$e(),$in),e)}function V2n(e){return YO(),It((dze(),Rin),e)}function Y2n(e){return hO(),It((mPe(),Bin),e)}function Q2n(e){return tg(),It((u$e(),Fin),e)}function W2n(e){return Az(),It((lBe(),Jin),e)}function Z2n(e){return uO(),It((vPe(),Hin),e)}function emn(e){return JO(),It((oBe(),Gin),e)}function nmn(e){return j8(),It((sBe(),qin),e)}function tmn(e){return Ic(),It((Oze(),Uin),e)}function imn(e){return e8(),It((o$e(),Xin),e)}function rmn(e){return $0(),It((s$e(),Kin),e)}function cmn(e){return _1(),It((l$e(),Yin),e)}function umn(e){return GR(),It((yPe(),Qin),e)}function omn(e){return Xs(),It((IRe(),Zin),e)}function smn(e){return XR(),It((kPe(),ern),e)}function lmn(e){return WO(),It((bze(),Fun),e)}function fmn(e){return _E(),It((a$e(),Jun),e)}function amn(e){return U2(),It((Y$e(),Hun),e)}function hmn(e){return GE(),It((NRe(),Gun),e)}function dmn(e){return X0(),It((Tze(),qun),e)}function bmn(e){return F1(),It((Q$e(),Uun),e)}function gmn(e){return sO(),It((jPe(),Xun),e)}function wmn(e){return Nc(),It((h$e(),Vun),e)}function pmn(e){return _B(),It((d$e(),Yun),e)}function mmn(e){return DE(),It((b$e(),Qun),e)}function vmn(e){return u8(),It((g$e(),Wun),e)}function ymn(e){return mB(),It((w$e(),Zun),e)}function kmn(e){return LB(),It((p$e(),eon),e)}function jmn(e){return $B(),It((q$e(),bin),e)}function Emn(e){return rg(),It((V$e(),von),e)}function Smn(e,n){return Ln(e),e+(Ln(n),n)}function xmn(e){return vE(),It((EPe(),Son),e)}function Amn(e){return dh(),It((xPe(),Non),e)}function Mmn(e){return Da(),It((SPe(),Don),e)}function Cmn(e){return da(),It((APe(),Kon),e)}function C9(){C9=Y,nye=(Ie(),Yn),IH=nt}function Tmn(e){return Iw(),It((MPe(),nsn),e)}function Omn(e){return ny(),It((iRe(),tsn),e)}function Nmn(e){return uS(),It((bTe(),isn),e)}function Imn(e){return IE(),It((m$e(),rsn),e)}function Dmn(e){return NE(),It((Z$e(),Msn),e)}function _mn(e){return HR(),It((CPe(),Csn),e)}function Lmn(e){return AB(),It((TPe(),Dsn),e)}function Pmn(e){return kz(),It((DRe(),Lsn),e)}function $mn(e){return cB(),It((OPe(),Psn),e)}function Rmn(e){return xO(),It((v$e(),$sn),e)}function Bmn(e){return dz(),It((tRe(),iln),e)}function zmn(e){return DB(),It((y$e(),rln),e)}function Fmn(e){return ez(),It((k$e(),cln),e)}function Jmn(e){return Ez(),It((nRe(),oln),e)}function Hmn(e){return VB(),It((x$e(),fln),e)}function Gmn(e){return!e.e&&(e.e=new Te),e.e}function Q$(e,n,t){this.e=n,this.b=e,this.d=t}function LNe(e,n,t){this.a=e,this.b=n,this.c=t}function PNe(e,n,t){this.a=e,this.b=n,this.c=t}function Wle(e,n,t){this.a=e,this.b=n,this.c=t}function $Ne(e,n,t){this.a=e,this.b=n,this.c=t}function RNe(e,n,t){this.a=e,this.c=n,this.b=t}function W$(e,n,t){this.b=e,this.a=n,this.c=t}function BNe(e,n,t){this.b=e,this.a=n,this.c=t}function WK(e,n){this.c=e,this.a=n,this.b=n-e}function qmn(e){return GB(),It((E$e(),_ln),e)}function Umn(e){return t$(),It((KLe(),zln),e)}function Xmn(e){return eO(),It((IPe(),Fln),e)}function Kmn(e){return GO(),It((LRe(),Jln),e)}function Vmn(e){return n$(),It((XLe(),Rln),e)}function Ymn(e){return tS(),It((_Re(),Pln),e)}function Qmn(e){return OO(),It((S$e(),$ln),e)}function Wmn(e){return QR(),It((NPe(),Iln),e)}function Zmn(e){return uB(),It((j$e(),Dln),e)}function evn(e){return Tj(),It((VLe(),rfn),e)}function nvn(e){return vO(),It((DPe(),cfn),e)}function tvn(e){return vh(),It((RRe(),afn),e)}function ivn(e){return lg(),It((cze(),dfn),e)}function rvn(e){return z1(),It((cRe(),Vfn),e)}function cvn(e){return vr(),It(($Re(),Ufn),e)}function uvn(e){return s8(),It((rRe(),Xfn),e)}function ovn(e){return Ra(),It((N$e(),Kfn),e)}function svn(e){return Yh(),It((iBe(),bfn),e)}function lvn(e){return sg(),It((rBe(),yfn),e)}function fvn(e){return Q2(),It((wze(),nan),e)}function avn(e){return u3(),It((BRe(),tan),e)}function hvn(e){return Br(),It((uBe(),ian),e)}function dvn(e){return ps(),It((cBe(),ran),e)}function bvn(e){return fl(),It((uRe(),ean),e)}function gvn(e){return Sz(),It((tBe(),Yfn),e)}function wvn(e){return B1(),It((D$e(),Wfn),e)}function pvn(e){return KR(),It((oRe(),ban),e)}function mvn(e){return _s(),It((gze(),han),e)}function vvn(e){return V4(),It((I$e(),dan),e)}function yvn(e){return Ie(),It((zRe(),can),e)}function kvn(e){return EE(),It((_$e(),fan),e)}function jvn(e){return Vs(),It((sRe(),aan),e)}function Evn(e){return YB(),It((lRe(),gan),e)}function Svn(e){return RB(),It((fRe(),man),e)}function xvn(e){return S8(),It((uze(),Nan),e)}function zNe(e,n,t){Dl(),bae.call(this,e,n,t)}function ZK(e,n,t){Dl(),Vfe.call(this,e,n,t)}function FNe(e,n,t){Dl(),ZK.call(this,e,n,t)}function Zle(e,n,t){Dl(),ZK.call(this,e,n,t)}function JNe(e,n,t){Dl(),Zle.call(this,e,n,t)}function HNe(e,n,t){Dl(),efe.call(this,e,n,t)}function efe(e,n,t){Dl(),Vfe.call(this,e,n,t)}function nfe(e,n,t){Dl(),Vfe.call(this,e,n,t)}function GNe(e,n,t){Dl(),nfe.call(this,e,n,t)}function qNe(e,n,t){this.a=e,this.c=n,this.b=t}function UNe(e,n,t){this.a=e,this.b=n,this.c=t}function tfe(e,n,t){this.a=e,this.b=n,this.c=t}function ife(e,n,t){this.a=e,this.b=n,this.c=t}function eV(e,n,t){this.a=e,this.b=n,this.c=t}function XNe(e,n,t){this.a=e,this.b=n,this.c=t}function xd(e,n,t){this.e=e,this.a=n,this.c=t}function rfe(e){this.d=e,tn(this),this.b=m3n(e.d)}function cfe(e,n){pgn.call(this,e,XB(new Su(n)))}function DT(e,n){return Nt(e),Nt(n),new WAe(e,n)}function M4(e,n){return Nt(e),Nt(n),new rIe(e,n)}function Avn(e,n){return Nt(e),Nt(n),new cIe(e,n)}function Mvn(e,n){return Nt(e),Nt(n),new lMe(e,n)}function nV(e){return at(e.b!=0),$l(e,e.a.a)}function Cvn(e){return at(e.b!=0),$l(e,e.c.b)}function Tvn(e){return!e.c&&(e.c=new Ol),e.c}function _T(e){var n;return n=new xi,BY(n,e),n}function KNe(e){var n;return n=new pX,BY(n,e),n}function Ovn(e){var n;return n=new ar,MY(n,e),n}function T9(e){var n;return n=new Te,MY(n,e),n}function u(e,n){return tE(e==null||$Q(e,n)),e}function Nvn(e,n,t){XIe.call(this,n,t),this.a=e}function VNe(e,n){this.c=e,this.b=n,this.a=!1}function YNe(){this.a=";,;",this.b="",this.c=""}function QNe(e,n,t){this.b=e,cTe.call(this,n,t)}function ufe(e,n,t){this.c=e,u$.call(this,n,t)}function ofe(e,n,t){k9.call(this,e,n),this.b=t}function sfe(e,n,t){ebe(t,0,e,n,t.length,!1)}function Hh(e,n,t,i,r){e.b=n,e.c=t,e.d=i,e.a=r}function lfe(e,n,t,i,r){e.d=n,e.c=t,e.a=i,e.b=r}function Ivn(e,n){n&&(e.b=n,e.a=(T0(n),n.a))}function LT(e,n){if(!e)throw R(new Un(n))}function C4(e,n){if(!e)throw R(new Uc(n))}function ffe(e,n){if(!e)throw R(new iAe(n))}function Dvn(e,n){return ZP(),oo(e.d.p,n.d.p)}function _vn(e,n){return P1(),ji(e.e.b,n.e.b)}function Lvn(e,n){return P1(),ji(e.e.a,n.e.a)}function Pvn(e,n){return oo(fIe(e.d),fIe(n.d))}function Z$(e,n){return n&&xR(e,n.d)?n:null}function $vn(e,n){return n==(Ie(),Yn)?e.c:e.d}function Rvn(e){return new Ee(e.c+e.b,e.d+e.a)}function WNe(e){return e!=null&&!jQ(e,oA,sA)}function Bvn(e,n){return(_Fe(e)<<4|_Fe(n))&yr}function ZNe(e,n,t,i,r){e.c=n,e.d=t,e.b=i,e.a=r}function afe(e){var n,t;n=e.b,t=e.c,e.b=t,e.c=n}function hfe(e){var n,t;t=e.d,n=e.a,e.d=n,e.a=t}function zvn(e,n){var t;return t=e.c,Jhe(e,n),t}function dfe(e,n){return n<0?e.g=-1:e.g=n,e}function eR(e,n){return N8n(e),e.a*=n,e.b*=n,e}function PT(e,n,t){Ise.call(this,e,n),this.c=t}function nR(e,n,t){Ise.call(this,e,n),this.c=t}function bfe(e){Qle(),jv.call(this),this._h(e)}function eIe(){J9(),W3n.call(this,(E0(),kf))}function nIe(e){return ai(),new Gh(0,e)}function tIe(){tIe=Y,Gce=(En(),new _n(Bne))}function tR(){tR=Y,new Mde((SX(),Qne),(EX(),Yne))}function iIe(){this.b=ne(re(_e((Hf(),jte))))}function tV(e){this.b=e,this.a=Fb(this.b.a).Md()}function rIe(e,n){this.b=e,this.a=n,mC.call(this)}function cIe(e,n){this.a=e,this.b=n,mC.call(this)}function uIe(e,n,t){this.a=e,Pv.call(this,n,t)}function oIe(e,n,t){this.a=e,Pv.call(this,n,t)}function O9(e,n,t){var i;i=new M2(t),$f(e,n,i)}function gfe(e,n,t){var i;return i=e[n],e[n]=t,i}function iR(e){var n;return n=e.slice(),yY(n,e)}function rR(e){var n;return n=e.n,e.a.b+n.d+n.a}function sIe(e){var n;return n=e.n,e.e.b+n.d+n.a}function wfe(e){var n;return n=e.n,e.e.a+n.b+n.c}function pfe(e){e.a.b=e.b,e.b.a=e.a,e.a=e.b=null}function Vt(e,n){return Ki(e,n,e.c.b,e.c),!0}function Fvn(e){return e.a?e.a:IV(e)}function tE(e){if(!e)throw R(new a9(null))}function Ew(e,n){return KE(e,new k9(n.a,n.b))}function Jvn(e){return!uc(e)&&e.c.i.c==e.d.i.c}function Hvn(e,n){return e.c=n)throw R(new gxe)}function Hu(e){e.f=new kTe(e),e.i=new jTe(e),++e.g}function mR(e){this.b=new xo(11),this.a=(Tw(),e)}function gV(e){this.b=null,this.a=(Tw(),e||Fme)}function Dfe(e,n){this.e=e,this.d=(n&64)!=0?n|jh:n}function XIe(e,n){this.c=0,this.d=e,this.b=n|64|jh}function KIe(e){this.a=KJe(e.a),this.b=new bs(e.b)}function Ad(e,n,t,i){var r;r=e.i,r.i=n,r.a=t,r.b=i}function _fe(e){var n;for(n=e;n.f;)n=n.f;return n}function x3n(e){return e.e?ihe(e.e):null}function uE(e){return ps(),!e.Gc(Z1)&&!e.Gc(mb)}function VIe(e,n,t){return M8(),qY(e,n)&&qY(e,t)}function YIe(e,n,t){return rYe(e,u(n,12),u(t,12))}function wV(e,n){return n.Sh()?z0(e.b,u(n,52)):n}function vR(e){return new Ee(e.c+e.b/2,e.d+e.a/2)}function A3n(e,n,t){n.of(t,ne(re(zn(e.b,t)))*e.a)}function M3n(e,n){n.Tg("General 'Rotator",1),J$n(e)}function Dr(e,n,t,i,r){mY.call(this,e,n,t,i,r,-1)}function oE(e,n,t,i,r){rO.call(this,e,n,t,i,r,-1)}function we(e,n,t,i){mr.call(this,e,n,t),this.b=i}function yR(e,n,t,i){PT.call(this,e,n,t),this.b=i}function QIe(e){KCe.call(this,e,!1),this.a=!1}function WIe(){kK.call(this,"LOOKAHEAD_LAYOUT",1)}function ZIe(){kK.call(this,"LAYOUT_NEXT_LEVEL",3)}function eDe(e){this.b=e,j4.call(this,e),uOe(this)}function nDe(e){this.b=e,ET.call(this,e),oOe(this)}function tDe(e,n){this.b=e,GU.call(this,e.b),this.a=n}function x2(e,n,t){this.a=e,x4.call(this,n,t,5,6)}function Lfe(e,n,t,i){this.b=e,mr.call(this,n,t,i)}function Gb(e,n,t){yh(),this.e=e,this.d=n,this.a=t}function Zr(e,n){for(Ln(n);e.Ob();)n.Ad(e.Pb())}function kR(e,n){return ai(),new Yfe(e,n,0)}function pV(e,n){return ai(),new Yfe(6,e,n)}function C3n(e,n){return bn(e.substr(0,n.length),n)}function so(e,n){return $r(n)?BV(e,n):!!Xc(e.f,n)}function T3n(e){return _o(~e.l&Ls,~e.m&Ls,~e.h&G1)}function mV(e){return typeof e===fN||typeof e===hZ}function Uh(e){return new Xn(new sle(e.a.length,e.a))}function vV(e){return new mn(null,$3n(e,e.length))}function iDe(e){if(!e)throw R(new hu);return e.d}function N4(e){var n;return n=OE(e),at(n!=null),n}function O3n(e){var n;return n=pjn(e),at(n!=null),n}function I9(e,n){var t;return t=e.a.gc(),Zae(n,t),t-n}function hr(e,n){var t;return t=e.a.yc(n,e),t==null}function RT(e,n){return e.a.yc(n,($n(),ib))==null}function N3n(e,n){return e>0?k.Math.log(e/n):-100}function Pfe(e,n){return n?ac(e,n):!1}function I4(e,n,t){return Bf(e.a,n),gfe(e.b,n.g,t)}function I3n(e,n,t){N9(t,e.a.c.length),ul(e.a,t,n)}function ce(e,n,t,i){tFe(n,t,e.length),D3n(e,n,t,i)}function D3n(e,n,t,i){var r;for(r=n;r0?1:0}function lE(e){return e.e==0?e:new Gb(-e.e,e.d,e.a)}function L3n(e){return e==Vi?qN:e==Ir?"-INF":""+e}function P3n(e){return e==Vi?qN:e==Ir?"-INF":""+e}function $3n(e,n){return M8n(n,e.length),new bIe(e,n)}function cDe(e,n,t,i,r){for(;n=e.g}function CV(e,n,t){var i;return i=RY(e,n,t),zbe(e,i)}function pDe(e,n){var t;t=console[e],t.call(console,n)}function D4(e,n){var t;t=e.a.length,L2(e,t),tY(e,t,n)}function mDe(e,n){var t;++e.j,t=e.Cj(),e.pj(e.Xi(t,n))}function TV(e,n){for(Ln(n);e.c=e?new Yoe:Q8n(e-1)}function uf(e){if(e==null)throw R(new c4);return e}function Ln(e){if(e==null)throw R(new c4);return e}function t5n(e){return!e.a&&(e.a=new mr(vb,e,4)),e.a}function Mw(e){return!e.d&&(e.d=new mr(Rc,e,1)),e.d}function i5n(e){if(e.p!=3)throw R(new is);return e.e}function r5n(e){if(e.p!=4)throw R(new is);return e.e}function c5n(e){if(e.p!=6)throw R(new is);return e.f}function u5n(e){if(e.p!=3)throw R(new is);return e.j}function o5n(e){if(e.p!=4)throw R(new is);return e.j}function s5n(e){if(e.p!=6)throw R(new is);return e.k}function or(){Rxe.call(this),r2(this.j.c,0),this.a=-1}function CDe(){Ot.call(this,"DELAUNAY_TRIANGULATION",0)}function l5n(){return FP(),F(z(qen,1),je,537,0,[Zne])}function f5n(e,n,t){return X4(),t.Kg(e,u(n.jd(),147))}function a5n(e,n){Et((!e.a&&(e.a=new CT(e,e)),e.a),n)}function Wfe(e,n){e.c<0||e.b.b=0?e.hi(t):q0e(e,n)}function L9(e,n){var t;return t=MV("",e),t.n=n,t.i=1,t}function Cw(e){return e.c==-2&&sX(e,AMn(e.g,e.b)),e.c}function Zfe(e){return!e.b&&(e.b=new IP(new jX)),e.b}function TDe(e,n){return tR(),new Mde(new lOe(e),new sOe(n))}function d5n(e){return sl(e,wZ),hB(mc(mc(5,e),e/10|0))}function OV(){OV=Y,Ken=new rse(F(z(yg,1),tF,45,0,[]))}function ODe(){j0e.call(this,vg,(kAe(),chn)),NPn(this)}function NDe(){j0e.call(this,hf,(g9(),Y8e)),BLn(this)}function IDe(e,n){Jwn.call(this,W8n(Nt(e),Nt(n))),this.a=n}function eae(e,n,t,i){pw.call(this,e,n),this.d=t,this.a=i}function AR(e,n,t,i){pw.call(this,e,t),this.a=n,this.f=i}function DDe(e,n){this.b=e,yV.call(this,e,n),uOe(this)}function _De(e,n){this.b=e,Xle.call(this,e,n),oOe(this)}function dE(e){this.d=e,this.a=this.d.b,this.b=this.d.c}function LDe(e){e.b=!1,e.c=!1,e.d=!1,e.a=!1}function P9(e){return!e.a&&(e.a=new oAe(e.c.vc())),e.a}function PDe(e){return!e.b&&(e.b=new h9(e.c.ec())),e.b}function $De(e){return!e.d&&(e.d=new Hr(e.c.Bc())),e.d}function Xh(e,n){for(;n-- >0;)e=e<<1|(e<0?1:0);return e}function RDe(e,n){var t;return t=new Xu(e),qn(n.c,t),t}function b5n(e,n){hV(u(n.b,68),e),Ao(n.a,new Wue(e))}function BDe(e,n){e.u.Gc((ps(),Z1))&&jTn(e,n),E9n(e,n)}function Ku(e,n){return ue(e)===ue(n)||e!=null&&gi(e,n)}function ei(e,n,t){return $r(n)?Kc(e,n,t):Ko(e.f,n,t)}function nae(e){return En(),e?e.Me():(Tw(),Tw(),Jme)}function g5n(){return n$(),F(z(P6e,1),je,477,0,[Zre])}function w5n(){return t$(),F(z(Bln,1),je,546,0,[ece])}function p5n(){return Tj(),F(z(i9e,1),je,527,0,[OI])}function zc(e,n){return sV(e.a,n)?e.b[u(n,23).g]:null}function m5n(e){return String.fromCharCode.apply(null,e)}function rc(e,n){return Wn(n,e.length),e.charCodeAt(n)}function zT(e){return e.j.c.length=0,rae(e.c),l2n(e.a),e}function $9(e){return e.e==f7&&a(e,zEn(e.g,e.b)),e.e}function FT(e){return e.f==f7&&w(e,Txn(e.g,e.b)),e.f}function v5n(e){return!e.b&&(e.b=new In(mt,e,4,7)),e.b}function tae(e){return!e.c&&(e.c=new In(mt,e,5,8)),e.c}function iae(e){return!e.c&&(e.c=new we($s,e,9,9)),e.c}function NV(e){return!e.n&&(e.n=new we(Eu,e,1,7)),e.n}function qv(e){var n;return n=e.b,!n&&(e.b=n=new cj(e)),n}function rae(e){var n;for(n=e.Jc();n.Ob();)n.Pb(),n.Qb()}function y5n(e,n,t){var i;i=u(e.d.Kb(t),162),i&&i.Nb(n)}function k5n(e,n){return new h_e(u(Nt(e),51),u(Nt(n),51))}function li(e,n){return F0(e),new mn(e,new whe(n,e.a))}function So(e,n){return F0(e),new mn(e,new the(n,e.a))}function C2(e,n){return F0(e),new xle(e,new ZPe(n,e.a))}function MR(e,n){return F0(e),new Ale(e,new e$e(n,e.a))}function zDe(e,n){W1e(e,ne($1(n,"x")),ne($1(n,"y")))}function FDe(e,n){W1e(e,ne($1(n,"x")),ne($1(n,"y")))}function j5n(e,n){return Qoe(),ji((Ln(e),e),(Ln(n),n))}function E5n(e,n){return ji(e.d.c+e.d.b/2,n.d.c+n.d.b/2)}function S5n(e,n){return ji(e.g.c+e.g.b/2,n.g.c+n.g.b/2)}function x5n(e){return e!=null&&xj(SG,e.toLowerCase())}function A5n(e){il();var n;n=u(e.g,9),n.n.a=e.d.c+n.d.b}function IV(e){var n;return n=e7n(e),n||null}function ri(e,n,t,i){return ZBe(e,n,t,!1),HB(e,i),e}function M5n(e,n,t){DLn(e.a,t),W7n(t),cOn(e.b,t),ePn(n,t)}function _4(e,n,t,i){Ot.call(this,e,n),this.a=t,this.b=i}function CR(e,n,t,i){this.a=e,this.c=n,this.b=t,this.d=i}function cae(e,n,t,i){this.c=e,this.b=n,this.a=t,this.d=i}function JDe(e,n,t,i){this.c=e,this.b=n,this.d=t,this.a=i}function DV(e,n,t,i){this.a=e,this.e=n,this.d=t,this.c=i}function HDe(e,n,t,i){this.a=e,this.d=n,this.c=t,this.b=i}function _f(e,n,t,i){this.c=e,this.d=n,this.b=t,this.a=i}function _V(e,n,t){this.a=Jge,this.d=e,this.b=n,this.c=t}function uae(e,n){this.b=e,this.c=n,this.a=new d4(this.b)}function GDe(e,n){this.d=(Ln(e),e),this.a=16449,this.c=n}function qDe(e,n,t,i){Kze.call(this,e,t,i,!1),this.f=n}function LV(e,n,t){var i,r;return i=Tge(e),r=n.qi(t,i),r}function T1(e){var n,t;return t=(n=new gw,n),X9(t,e),t}function PV(e){var n,t;return t=(n=new gw,n),x0e(t,e),t}function UDe(e){return!e.b&&(e.b=new we(pr,e,12,3)),e.b}function XDe(e){this.a=new Te,this.e=le($t,Ae,54,e,0,2)}function $V(e){this.f=e,this.c=this.f.e,e.f>0&&HHe(this)}function KDe(e,n,t,i){this.a=e,this.c=n,this.d=t,this.b=i}function VDe(e,n,t,i){this.a=e,this.b=n,this.d=t,this.c=i}function YDe(e,n,t,i){this.a=e,this.b=n,this.c=t,this.d=i}function QDe(e,n,t,i){this.a=e,this.b=n,this.c=t,this.d=i}function Ub(e,n,t,i){this.e=e,this.a=n,this.c=t,this.d=i}function WDe(e,n,t,i){Dl(),WPe.call(this,n,t,i),this.a=e}function ZDe(e,n,t,i){Dl(),WPe.call(this,n,t,i),this.a=e}function e_e(e,n){this.a=e,Hpn.call(this,e,u(e.d,16).dd(n))}function C5n(e,n){return ji(us(e)*Gs(e),us(n)*Gs(n))}function T5n(e,n){return ji(us(e)*Gs(e),us(n)*Gs(n))}function L4(e){var n;return n=e.f,n||(e.f=new p9(e,e.c))}function En(){En=Y,Sc=new xe,r1=new fn,bJ=new $e}function Tw(){Tw=Y,Fme=new ye,ste=new ye,Jme=new Re}function R9(e){if(Is(e.d),e.d.d!=e.c)throw R(new Nl)}function qs(e){e.a.a=e.c,e.c.b=e.a,e.a.b=e.c.a=null,e.b=0}function oae(e){return at(e.b0?Pf(e):new Te}function TR(e){return e.n&&(e.e!==mYe&&e.he(),e.j=null),e}function sae(e,n){return e.b=n.b,e.c=n.c,e.d=n.d,e.a=n.a,e}function N5n(e,n,t){return Ce(e.a,(qQ(n,t),new pw(n,t))),e}function I5n(e,n){return u(C(e,(me(),Dy)),16).Ec(n),n}function D5n(e,n){return gn(e,u(C(n,(Oe(),xm)),15),n)}function _5n(e){return Uw(e)&&Fe(ze(ke(e,(Oe(),xg))))}function L5n(e,n,t){return Cj(),$jn(u(zn(e.e,n),516),t)}function P5n(e,n,t){e.i=0,e.e=0,n!=t&&Gze(e,n,t)}function $5n(e,n,t){e.i=0,e.e=0,n!=t&&qze(e,n,t)}function n_e(e,n,t,i){this.b=e,this.c=i,D$.call(this,n,t)}function t_e(e,n){this.g=e,this.d=F(z(u1,1),Fd,9,0,[n])}function i_e(e,n){e.d&&!e.d.a&&(XSe(e.d,n),i_e(e.d,n))}function r_e(e,n){e.e&&!e.e.a&&(XSe(e.e,n),r_e(e.e,n))}function c_e(e,n){return c3(e.j,n.s,n.c)+c3(n.e,e.s,e.c)}function R5n(e,n){return-ji(us(e)*Gs(e),us(n)*Gs(n))}function B5n(e){return u(e.jd(),147).Og()+":"+fu(e.kd())}function u_e(){bW(this,new IC),this.wb=(C0(),Bn),g9()}function o_e(e){this.b=new s_,this.a=e,k.Math.random()}function s_e(e){this.b=new Te,Sr(this.b,this.b),this.a=e}function lae(e,n){new xi,this.a=new xs,this.b=e,this.c=n}function l_e(){du.call(this,"There is no more element.")}function z5n(e){GP(),k.setTimeout(function(){throw e},0)}function F5n(e){e.Tg("No crossing minimization",1),e.Ug()}function J5n(e,n){return Us(e),Us(n),Zxe(u(e,23),u(n,23))}function Xb(e,n,t){var i,r;i=UK(t),r=new Av(i),$f(e,n,r)}function RV(e,n,t,i,r,c){rO.call(this,e,n,t,i,r,c?-2:-1)}function f_e(e,n,t,i){Ise.call(this,n,t),this.b=e,this.a=i}function fae(e){this.b=e,this.c=e,e.e=null,e.c=null,this.a=1}function OR(e){return!e.a&&(e.a=new we(Ft,e,10,11)),e.a}function yi(e){return!e.q&&(e.q=new we(yf,e,11,10)),e.q}function ge(e){return!e.s&&(e.s=new we(ns,e,21,17)),e.s}function a_e(e){return tE(e==null||mV(e)&&e.Rm!==wn),e}function NR(e,n){if(e==null)throw R(new f4(n));return e}function h_e(e,n){Ebn.call(this,new gV(e)),this.a=e,this.b=n}function BV(e,n){return n==null?!!Xc(e.f,null):a3n(e.i,n)}function zV(e){return X(e,18)?new E2(u(e,18)):Ovn(e.Jc())}function IR(e){return En(),X(e,59)?new DX(e):new F$(e)}function H5n(e){return Nt(e),cHe(new Xn(Qn(e.a.Jc(),new ee)))}function G5n(e){return new tOe(e,e.e.Pd().gc()*e.c.Pd().gc())}function q5n(e){return new iOe(e,e.e.Pd().gc()*e.c.Pd().gc())}function aae(e){return e&&e.hashCode?e.hashCode():jw(e)}function U5n(e){e&&_R(e,e.ge())}function X5n(e,n){var t;return t=Qse(e.a,n),t&&(n.d=null),t}function d_e(e,n,t){return e.f?e.f.cf(n,t):!1}function JT(e,n,t,i){ir(e.c[n.g],t.g,i),ir(e.c[t.g],n.g,i)}function FV(e,n,t,i){ir(e.c[n.g],n.g,t),ir(e.b[n.g],n.g,i)}function K5n(e,n,t){return ne(re(t.a))<=e&&ne(re(t.b))>=n}function b_e(){this.d=new xi,this.b=new wt,this.c=new Te}function g_e(){this.b=new ar,this.d=new xi,this.e=new BP}function hae(){this.c=new Vr,this.d=new Vr,this.e=new Vr}function Ow(){this.a=new xs,this.b=(sl(3,rm),new xo(3))}function w_e(e){this.c=e,this.b=new kd(u(Nt(new ra),51))}function p_e(e){this.c=e,this.b=new kd(u(Nt(new f0),51))}function m_e(e){this.b=e,this.a=new kd(u(Nt(new uu),51))}function Md(e,n){this.e=e,this.a=Mr,this.b=_Xe(n),this.c=n}function DR(e){this.c=e.c,this.d=e.d,this.b=e.b,this.a=e.a}function v_e(e,n,t,i,r,c){this.a=e,DY.call(this,n,t,i,r,c)}function y_e(e,n,t,i,r,c){this.a=e,DY.call(this,n,t,i,r,c)}function O0(e,n,t,i,r,c,o){return new cY(e.e,n,t,i,r,c,o)}function V5n(e,n,t){return t>=0&&bn(e.substr(t,n.length),n)}function k_e(e,n){return X(n,147)&&bn(e.b,u(n,147).Og())}function Y5n(e,n){return e.a?n.Dh().Jc():u(n.Dh(),72).Gi()}function j_e(e,n){var t;return t=e.b.Oc(n),gPe(t,e.b.gc()),t}function HT(e,n){if(e==null)throw R(new f4(n));return e}function tu(e){return e.u||(Ms(e),e.u=new YOe(e,e)),e.u}function Go(e){var n;return n=u(Kn(e,16),29),n||e.fi()}function _R(e,n){var t;return t=Pb(e.Pm),n==null?t:t+": "+n}function of(e,n,t){return Qr(n,t,e.length),e.substr(n,t-n)}function E_e(e,n){X$.call(this),Che(this),this.a=e,this.c=n}function S_e(){kK.call(this,"FIXED_INTEGER_RATIO_BOXES",2)}function Q5n(){return iB(),F(z(g3e,1),je,422,0,[b3e,Kte])}function W5n(){return hO(),F(z(S3e,1),je,419,0,[VJ,E3e])}function Z5n(){return uO(),F(z(M3e,1),je,476,0,[A3e,QJ])}function e4n(){return GR(),F(z(F3e,1),je,420,0,[gie,z3e])}function n4n(){return XR(),F(z(n5e,1),je,423,0,[xie,Sie])}function t4n(){return sO(),F(z(J4e,1),je,421,0,[ire,rre])}function i4n(){return vE(),F(z(Eon,1),je,518,0,[Ox,Tx])}function r4n(){return Da(),F(z(Ion,1),je,508,0,[Og,Qa])}function c4n(){return dh(),F(z(Oon,1),je,509,0,[yp,Kd])}function u4n(){return da(),F(z(Xon,1),je,515,0,[Dm,ab])}function o4n(){return Iw(),F(z(esn,1),je,454,0,[hb,X3])}function s4n(){return HR(),F(z($ye,1),je,425,0,[Are,Pye])}function l4n(){return AB(),F(z(Rye,1),je,487,0,[FH,Y3])}function f4n(){return cB(),F(z(zye,1),je,426,0,[Bye,Ire])}function a4n(){return aB(),F(z(nve,1),je,424,0,[yte,vJ])}function h4n(){return Y9(),F(z(lin,1),je,502,0,[ZN,Dte])}function d4n(){return QR(),F(z(T6e,1),je,478,0,[Vre,C6e])}function b4n(){return eO(),F(z($6e,1),je,428,0,[nce,WH])}function g4n(){return vO(),F(z(c9e,1),je,427,0,[eG,r9e])}function LR(e,n,t,i){return t>=0?e.Rh(n,t,i):e.zh(null,t,i)}function GT(e){return e.b.b==0?e.a.uf():nV(e.b)}function w4n(e){if(e.p!=5)throw R(new is);return Rt(e.f)}function p4n(e){if(e.p!=5)throw R(new is);return Rt(e.k)}function dae(e){return ue(e.a)===ue((JY(),Fce))&&xPn(e),e.a}function x_e(e,n){aj(this,new Ee(e.a,e.b)),Mv(this,_T(n))}function Nw(){Sbn.call(this,new b4(z2(12))),tle(!0),this.a=2}function JV(e,n,t){ai(),bw.call(this,e),this.b=n,this.a=t}function bae(e,n,t){Dl(),_P.call(this,n),this.a=e,this.b=t}function m4n(e,n){var t=tte[e.charCodeAt(0)];return t??e}function PR(e,n){return NR(e,"set1"),NR(n,"set2"),new bMe(e,n)}function $R(e,n){return dPe(n),B8n(e,le($t,ni,30,n,15,1),n)}function v4n(e,n){e.b=n,e.c>0&&e.b>0&&(e.g=lR(e.c,e.b,e.a))}function y4n(e,n){e.c=n,e.c>0&&e.b>0&&(e.g=lR(e.c,e.b,e.a))}function A_e(e){var n;n=e.c.d.b,e.b=n,e.a=e.c.d,n.a=e.c.d.b=e}function M_e(e){return e.b==0?null:(at(e.b!=0),$l(e,e.a.a))}function lo(e,n){return n==null?bu(Xc(e.f,null)):Dj(e.i,n)}function C_e(e,n,t,i,r){return new wW(e,(q9(),hte),n,t,i,r)}function HV(e,n,t,i){var r;r=new fNe,n.a[t.g]=r,I4(e.b,i,r)}function T_e(e,n){var t,i;return t=n,i=new si,gVe(e,t,i),i.d}function k4n(e,n){var t;return t=D8n(e.f,n),pi(U$(t),e.f.d)}function qT(e){var n;X8n(e.a),OTe(e.a),n=new OP(e.a),ode(n)}function j4n(e,n){EXe(e,!0),Ao(e.e.Pf(),new Kle(e,!0,n))}function E4n(e,n){return P1(),u(C(n,(Mu(),Dh)),15).a==e}function lc(e){return Math.max(Math.min(e,oi),-2147483648)|0}function O_e(e){X$.call(this),Che(this),this.a=e,this.c=!0}function gae(e,n,t){this.a=new Te,this.e=e,this.f=n,this.c=t}function RR(e,n,t){this.c=new Te,this.e=e,this.f=n,this.b=t}function N_e(e,n,t){this.i=new Te,this.b=e,this.g=n,this.a=t}function I_e(e){this.a=u(Nt(e),277),this.b=(En(),new ole(e))}function B9(){B9=Y;var e,n;n=!yEn(),e=new on,ite=n?new ln:e}function wae(){wae=Y,xnn=new uh,Mnn=new xfe,Ann=new Ab}function dh(){dh=Y,yp=new yse(gy,0),Kd=new yse(by,1)}function Da(){Da=Y,Og=new kse(KZ,0),Qa=new kse("UP",1)}function Iw(){Iw=Y,hb=new Ese(by,0),X3=new Ese(gy,1)}function Uv(e,n,t){BR(),e&&ei(Rce,e,n),e&&ei(eD,e,t)}function pae(e,n,t){var i;i=e.Fh(n),i>=0?e.$h(i,t):ybe(e,n,t)}function D_e(e,n){var t;for(Nt(n),t=e.a;t;t=t.c)n.Wd(t.g,t.i)}function UT(e,n){var t;t=e.q.getHours(),e.q.setDate(n),sS(e,t)}function __e(e){var n;return n=new KP(z2(e.length)),m1e(n,e),n}function S4n(e){function n(){}return n.prototype=e||{},new n}function x4n(e,n){return vze(e,n)?(vBe(e),!0):!1}function O1(e,n){if(n==null)throw R(new c4);return xEn(e,n)}function A4n(e){if(e.ye())return null;var n=e.n;return sJ[n]}function T2(e){return e.Db>>16!=3?null:u(e.Cb,26)}function _a(e){return e.Db>>16!=9?null:u(e.Cb,26)}function L_e(e){return e.Db>>16!=6?null:u(e.Cb,85)}function P_e(e,n){var t;return t=e.Fh(n),t>=0?e.Th(t):jW(e,n)}function GV(e,n,t){var i;i=Bze(e,n,t),e.b=new CB(i.c.length)}function $_e(e){this.a=e,this.b=le(yon,Ae,2005,e.e.length,0,2)}function R_e(){this.a=new Fh,this.e=new ar,this.g=0,this.i=0}function B_e(e,n){$$(this),this.f=n,this.g=e,TR(this),this.he()}function z_e(e,n){return e.b+=n.b,e.c+=n.c,e.d+=n.d,e.a+=n.a,e}function mae(e){var n;return n=e.d,n=e._i(e.f),Et(e,n),n.Ob()}function F_e(e,n){var t;return t=new kfe(n),pGe(t,e),new bs(t)}function M4n(e){if(e.p!=0)throw R(new is);return qj(e.f,0)}function C4n(e){if(e.p!=0)throw R(new is);return qj(e.k,0)}function J_e(e){return e.Db>>16!=7?null:u(e.Cb,241)}function vae(e){return e.Db>>16!=7?null:u(e.Cb,174)}function H_e(e){return e.Db>>16!=3?null:u(e.Cb,158)}function z9(e){return e.Db>>16!=6?null:u(e.Cb,241)}function Fi(e){return e.Db>>16!=11?null:u(e.Cb,26)}function O2(e){return e.Db>>16!=17?null:u(e.Cb,29)}function bE(e,n,t,i,r,c){return new L1(e.e,n,e.Jj(),t,i,r,c)}function Kc(e,n,t){return n==null?Ko(e.f,null,t):Bw(e.i,n,t)}function qV(e,n){return k.Math.abs(e)0}function yae(e){var n;return F0(e),n=new ar,li(e,new qke(n))}function G_e(e,n){var t=e.a=e.a||[];return t[n]||(t[n]=e.te(n))}function D4n(e,n){var t;t=e.q.getHours(),e.q.setMonth(n),sS(e,t)}function fc(e,n){e.c&&qo(e.c.g,e),e.c=n,e.c&&Ce(e.c.g,e)}function Or(e,n){e.c&&qo(e.c.a,e),e.c=n,e.c&&Ce(e.c.a,e)}function Gr(e,n){e.d&&qo(e.d.e,e),e.d=n,e.d&&Ce(e.d.e,e)}function wu(e,n){e.i&&qo(e.i.j,e),e.i=n,e.i&&Ce(e.i.j,e)}function q_e(e,n,t){this.a=n,this.c=e,this.b=(Nt(t),new bs(t))}function U_e(e,n,t){this.a=n,this.c=e,this.b=(Nt(t),new bs(t))}function X_e(e,n){this.a=e,this.c=pc(this.a),this.b=new DR(n)}function N2(e,n){if(e<0||e>n)throw R(new jo(Qge+e+Wge+n))}function K_e(){K_e=Y,uon=Eo(new or,(zr(),Pc),(Ur(),Cy))}function kae(){kae=Y,oon=Eo(new or,(zr(),Pc),(Ur(),Cy))}function V_e(){V_e=Y,non=Eo(new or,(zr(),Pc),(Ur(),Cy))}function Y_e(){Y_e=Y,ton=Eo(new or,(zr(),Pc),(Ur(),Cy))}function Q_e(){Q_e=Y,ion=Eo(new or,(zr(),Pc),(Ur(),Cy))}function jae(){jae=Y,ron=Eo(new or,(zr(),Pc),(Ur(),Cy))}function W_e(){W_e=Y,xon=qt(new or,(zr(),Pc),(Ur(),tx))}function rl(){rl=Y,Con=qt(new or,(zr(),Pc),(Ur(),tx))}function Z_e(){Z_e=Y,Ton=qt(new or,(zr(),Pc),(Ur(),tx))}function UV(){UV=Y,_on=qt(new or,(zr(),Pc),(Ur(),tx))}function eLe(){eLe=Y,Tsn=Eo(new or,(ny(),Ix),(uS(),cye))}function nLe(){nLe=Y,Uen=Dt((FP(),F(z(qen,1),je,537,0,[Zne])))}function BR(){BR=Y,Rce=new wt,eD=new wt,Ugn(ann,new H6)}function _4n(e,n){var t,i;t=n.c,i=t!=null,i&&D4(e,new M2(n.c))}function tLe(e,n){Q3n(e,e.b,e.c),u(e.b.b,68),n&&u(n.b,68).b}function zR(e,n){X(e.Cb,184)&&(u(e.Cb,184).tb=null),Mo(e,n)}function XV(e,n){X(e.Cb,88)&&Y2(Ms(u(e.Cb,88)),4),Mo(e,n)}function L4n(e,n){Q1e(e,n),X(e.Cb,88)&&Y2(Ms(u(e.Cb,88)),2)}function P4n(e,n){return ji(u(e.c,65).c.e.b,u(n.c,65).c.e.b)}function $4n(e,n){return ji(u(e.c,65).c.e.a,u(n.c,65).c.e.a)}function fo(e,n){return Tc(),AY(n)?new uR(n,e):new vT(n,e)}function KV(e,n){e.a&&qo(e.a.k,e),e.a=n,e.a&&Ce(e.a.k,e)}function VV(e,n){e.b&&qo(e.b.f,e),e.b=n,e.b&&Ce(e.b.f,e)}function N0(e,n,t){NFe(n,t,e.gc()),this.c=e,this.a=n,this.b=t-n}function P4(e){this.c=new xi,this.b=e.b,this.d=e.c,this.a=e.a}function YV(e){this.a=k.Math.cos(e),this.b=k.Math.sin(e)}function Kb(e,n,t,i){this.c=e,this.d=i,KV(this,n),VV(this,t)}function yn(e,n){this.b=(Ln(e),e),this.a=(n&cm)==0?n|64|jh:n}function R4n(e,n){QTe(e,Rt(Rr(Sw(n,24),uF)),Rt(Rr(n,uF)))}function XT(e){return yh(),ao(e,0)>=0?J0(e):lE(J0(Od(e)))}function B4n(){return zl(),F(z(Qo,1),je,130,0,[Kme,Yo,Vme])}function iLe(e,n,t){return new wW(e,(q9(),ate),null,!1,n,t)}function rLe(e,n,t){return new wW(e,(q9(),dte),n,t,null,!1)}function cLe(e,n,t){var i;NFe(n,t,e.c.length),i=t-n,Goe(e.c,n,i)}function uLe(e,n){var t;return t=u(J2(L4(e.a),n),18),t?t.gc():0}function Eae(e){var n;return F0(e),n=(Tw(),Tw(),ste),dB(e,n)}function oLe(e){for(var n;;)if(n=e.Pb(),!e.Ob())return n}function sLe(e){var n,t;return t=(g9(),n=new gw,n),X9(t,e),t}function lLe(e){var n,t;return t=(g9(),n=new gw,n),X9(t,e),t}function Xv(e){return Cj(),X(e.g,9)?u(e.g,9):null}function z4n(){return $w(),F(z(Bte,1),je,368,0,[hp,ub,ap])}function F4n(){return vB(),F(z(y3e,1),je,350,0,[v3e,KJ,Vte])}function J4n(){return tg(),F(z(zin,1),je,449,0,[iie,E7,L3])}function H4n(){return e8(),F(z(die,1),je,302,0,[aie,hie,rI])}function G4n(){return $0(),F(z(bie,1),je,329,0,[cI,B3e,ym])}function q4n(){return _1(),F(z(Vin,1),je,315,0,[uI,$3,Ty])}function U4n(){return _E(),F(z(I4e,1),je,352,0,[Yie,N4e,AH])}function X4n(){return Nc(),F(z(Kun,1),je,452,0,[Ax,ys,Io])}function K4n(){return _B(),F(z(q4e,1),je,381,0,[H4e,cre,G4e])}function V4n(){return DE(),F(z(U4e,1),je,348,0,[ore,ure,vI])}function Y4n(){return u8(),F(z(K4e,1),je,349,0,[sre,X4e,Mx])}function Q4n(){return mB(),F(z(Q4e,1),je,351,0,[Y4e,lre,V4e])}function W4n(){return LB(),F(z(W4e,1),je,382,0,[fre,L7,Im])}function Z4n(){return kE(),F(z(wve,1),je,384,0,[Ste,Ete,xte])}function eyn(){return wa(),F(z(dm,1),je,237,0,[Ou,No,Nu])}function nyn(){return ws(),F(z(Nnn,1),je,461,0,[Oh,rb,qf])}function tyn(){return Uo(),F(z(Dnn,1),je,462,0,[ja,cb,Uf])}function iyn(){return IE(),F(z(gye,1),je,385,0,[bye,dre,jI])}function ryn(){return xO(),F(z(Hye,1),je,386,0,[JH,Fye,Jye])}function cyn(){return VB(),F(z(a6e,1),je,387,0,[f6e,qre,l6e])}function uyn(){return DB(),F(z(o6e,1),je,303,0,[$re,u6e,c6e])}function oyn(){return ez(),F(z(s6e,1),je,436,0,[$x,qH,Rre])}function syn(){return GB(),F(z(L6e,1),je,430,0,[D6e,_6e,Qre])}function lyn(){return OO(),F(z(Wre,1),je,435,0,[VH,YH,QH])}function fyn(){return uB(),F(z(I6e,1),je,429,0,[Yre,N6e,O6e])}function ayn(){return Ra(),F(z(t8e,1),je,279,0,[H7,Fm,G7])}function hyn(){return B1(),F(z(b8e,1),je,347,0,[lG,Wd,Wx])}function dyn(){return EE(),F(z(y8e,1),je,300,0,[qI,Tce,v8e])}function byn(){return V4(),F(z(E8e,1),je,281,0,[j8e,Hm,gG])}function La(e){return mu(F(z(Lr,1),Ae,8,0,[e.i.n,e.n,e.a]))}function gyn(e,n,t){var i;i=new wc(t.d),pi(i,e),W1e(n,i.a,i.b)}function fLe(e,n,t){var i;i=new gM,i.b=n,i.a=t,++n.b,Ce(e.d,i)}function wyn(e,n,t){var i;return i=aS(e,n,!1),i.b<=n&&i.a<=t}function pyn(e){if(e.p!=2)throw R(new is);return Rt(e.f)&yr}function myn(e){if(e.p!=2)throw R(new is);return Rt(e.k)&yr}function kn(e,n){if(e<0||e>=n)throw R(new jo(Qge+e+Wge+n))}function Wn(e,n){if(e<0||e>=n)throw R(new Ioe(Qge+e+Wge+n))}function vyn(e){return e.Db>>16!=6?null:u(xW(e),241)}function aLe(e,n){var t,i;return i=I9(e,n),t=e.a.dd(i),new hMe(e,t)}function yyn(e,n){var t;return t=(Ln(e),e).g,gle(!!t),Ln(n),t(n)}function kyn(e){return e.a==(J9(),CG)&&UC(e,QIn(e.g,e.b)),e.a}function $4(e){return e.d==(J9(),CG)&&Gue(e,V_n(e.g,e.b)),e.d}function Sae(e,n){jbn.call(this,new b4(z2(e))),sl(n,hYe),this.a=n}function hLe(e,n,t){bw.call(this,25),this.b=e,this.a=n,this.c=t}function cl(e){ai(),bw.call(this,e),this.c=!1,this.a=!1}function dLe(e,n){Gb.call(this,1,2,F(z($t,1),ni,30,15,[e,n]))}function Rr(e,n){return P0(y3n(su(e)?sf(e):e,su(n)?sf(n):n))}function bh(e,n){return P0(k3n(su(e)?sf(e):e,su(n)?sf(n):n))}function QV(e,n){return P0(j3n(su(e)?sf(e):e,su(n)?sf(n):n))}function xae(e,n){return IIe(e.a,n)?gfe(e.b,u(n,23).g,null):null}function Vb(e){return Nt(e),X(e,18)?new bs(u(e,18)):T9(e.Jc())}function WV(e){oR(),this.a=(En(),X(e,59)?new DX(e):new F$(e))}function jyn(e){var n;return n=u(iR(e.b),10),new _l(e.a,n,e.c)}function Eyn(e,n){var t;t=ne(re(e.a.mf((Xt(),cG)))),RVe(e,n,t)}function Syn(e,n){return jE(),e.c==n.c?ji(n.d,e.d):ji(e.c,n.c)}function xyn(e,n){return jE(),e.c==n.c?ji(e.d,n.d):ji(e.c,n.c)}function Ayn(e,n){return jE(),e.c==n.c?ji(e.d,n.d):ji(n.c,e.c)}function Myn(e,n){return jE(),e.c==n.c?ji(n.d,e.d):ji(n.c,e.c)}function Cyn(e,n){e.b=e.b|n.b,e.c=e.c|n.c,e.d=e.d|n.d,e.a=e.a|n.a}function L(e){return at(e.ai?1:0}function gLe(e,n){var t,i;return t=kY(n),i=t,u(zn(e.c,i),15).a}function ZV(e,n,t){var i;i=e.d[n.p],e.d[n.p]=e.d[t.p],e.d[t.p]=i}function Iyn(e,n,t){var i;e.n&&n&&t&&(i=new pL,Ce(e.e,i))}function eY(e,n){if(hr(e.a,n),n.d)throw R(new du(PYe));n.d=e}function Cae(e,n){this.a=new Te,this.d=new Te,this.f=e,this.c=n}function wLe(){X4(),this.b=new wt,this.a=new wt,this.c=new Te}function pLe(){this.c=new PTe,this.a=new VPe,this.b=new axe,CMe()}function mLe(e,n,t){this.d=e,this.j=n,this.e=t,this.o=-1,this.p=3}function vLe(e,n,t){this.d=e,this.k=n,this.f=t,this.o=-1,this.p=5}function yLe(e,n,t,i,r,c){The.call(this,e,n,t,i,r),c&&(this.o=-2)}function kLe(e,n,t,i,r,c){Ohe.call(this,e,n,t,i,r),c&&(this.o=-2)}function jLe(e,n,t,i,r,c){Gae.call(this,e,n,t,i,r),c&&(this.o=-2)}function ELe(e,n,t,i,r,c){Dhe.call(this,e,n,t,i,r),c&&(this.o=-2)}function SLe(e,n,t,i,r,c){qae.call(this,e,n,t,i,r),c&&(this.o=-2)}function xLe(e,n,t,i,r,c){Nhe.call(this,e,n,t,i,r),c&&(this.o=-2)}function ALe(e,n,t,i,r,c){Ihe.call(this,e,n,t,i,r),c&&(this.o=-2)}function MLe(e,n,t,i,r,c){Uae.call(this,e,n,t,i,r),c&&(this.o=-2)}function CLe(e,n,t,i){_P.call(this,t),this.b=e,this.c=n,this.d=i}function TLe(e,n){this.f=e,this.a=(J9(),MG),this.c=MG,this.b=n}function OLe(e,n){this.g=e,this.d=(J9(),CG),this.a=CG,this.b=n}function Tae(e,n){!e.c&&(e.c=new tr(e,0)),Vz(e.c,(Si(),fA),n)}function Dyn(e,n){return TOn(e,n,X(n,103)&&(u(n,19).Bb&Ec)!=0)}function _yn(e,n){return rDe(Lu(e.q.getTime()),Lu(n.q.getTime()))}function NLe(e){return rV(e.e.Pd().gc()*e.c.Pd().gc(),16,new W5(e))}function Lyn(e){return!!e.u&&Vu(e.u.a).i!=0&&!(e.n&&FQ(e.n))}function Pyn(e){return!!e.a&&Ts(e.a.a).i!=0&&!(e.b&&JQ(e.b))}function Oae(e,n){return n==0?!!e.o&&e.o.f!=0:LQ(e,n)}function ILe(e){return at(e.b.b!=e.d.a),e.c=e.b=e.b.b,--e.a,e.c.c}function gE(e){for(;e.d>0&&e.a[--e.d]==0;);e.a[e.d++]==0&&(e.e=0)}function DLe(e){return e.a?e.e.length==0?e.a.a:e.a.a+(""+e.e):e.c}function qr(e,n){this.a=e,qc.call(this,e),N2(n,e.gc()),this.b=n}function _Le(e){this.a=le(Mr,Nn,1,b1e(k.Math.max(8,e))<<1,5,1)}function LLe(e){FY.call(this,e,(q9(),fte),null,!1,null,!1)}function PLe(e,n){var t;return t=1-n,e.a[t]=MB(e.a[t],t),MB(e,n)}function $Le(e,n){var t,i;return i=Rr(e,Dc),t=qh(n,32),bh(t,i)}function $yn(e,n,t){var i;return i=u(e.Zb().xc(n),18),!!i&&i.Gc(t)}function RLe(e,n,t){var i;return i=u(e.Zb().xc(n),18),!!i&&i.Kc(t)}function BLe(e,n,t){var i;i=(Nt(e),new bs(e)),pxn(new q_e(i,n,t))}function VT(e,n,t){var i;i=(Nt(e),new bs(e)),mxn(new U_e(i,n,t))}function Ryn(e,n,t){e.a=n,e.c=t,e.b.a.$b(),qs(e.d),r2(e.e.a.c,0)}function zLe(e,n){var t;e.e=new Soe,t=W2(n),Tr(t,e.c),aXe(e,t,0)}function Byn(e,n){return new eV(n,OOe(pc(n.e),e,e),($n(),!0))}function zyn(e,n){return H4(),u(C(n,(Mu(),K3)),15).a>=e.gc()}function Fyn(e){return rl(),!uc(e)&&!(!uc(e)&&e.c.i.c==e.d.i.c)}function gh(e){return u(Ba(e,le(w7,Y8,17,e.c.length,0,1)),323)}function Jyn(e){XFe((!e.a&&(e.a=new we(Ft,e,10,11)),e.a),new _M)}function Nae(){var e,n,t;return n=(t=(e=new gw,e),t),Ce(u7e,n),n}function xu(e,n,t,i,r,c){return ZBe(e,n,t,c),H1e(e,i),G1e(e,r),e}function FLe(e,n,t,i){return e.a+=""+of(n==null?Vo:fu(n),t,i),e}function YT(e,n){if(e<0||e>=n)throw R(new jo(nTn(e,n)));return e}function JLe(e,n,t){if(e<0||nt)throw R(new jo(jCn(e,n,t)))}function Se(e,n,t,i){var r;r=new JM,r.a=n,r.b=t,r.c=i,Vt(e.b,r)}function qi(e,n,t,i){var r;r=new JM,r.a=n,r.b=t,r.c=i,Vt(e.a,r)}function Hyn(e,n,t){var i;i=GEn();try{return Qpn(e,n,t)}finally{u9n(i)}}function Qb(e){var n;return su(e)?(n=e,n==-0?0:n):i8n(e)}function HLe(e,n){return X(n,45)?XQ(e.a,u(n,45)):!1}function GLe(e,n){return X(n,45)?XQ(e.a,u(n,45)):!1}function qLe(e,n){return X(n,45)?XQ(e.a,u(n,45)):!1}function Gyn(e,n){return e.a<=e.b?(n.Bd(e.a++),!0):!1}function qyn(e){return qv(e).dc()?!1:(Dwn(e,new ae),!0)}function Iae(e){var n;return T0(e),n=new Hn,Ov(e.a,new Jke(n)),n}function FR(e){var n;return T0(e),n=new rt,Ov(e.a,new Hke(n)),n}function Uyn(e){if(!("stack"in e))try{throw e}catch{}return e}function JR(e){return new xo((sl(e,wZ),hB(mc(mc(5,e),e/10|0))))}function ULe(e){return u(Ba(e,le(uin,fQe,12,e.c.length,0,1)),2004)}function Xyn(e){return rV(e.e.Pd().gc()*e.c.Pd().gc(),273,new HU(e))}function XLe(){XLe=Y,Rln=Dt((n$(),F(z(P6e,1),je,477,0,[Zre])))}function KLe(){KLe=Y,zln=Dt((t$(),F(z(Bln,1),je,546,0,[ece])))}function VLe(){VLe=Y,rfn=Dt((Tj(),F(z(i9e,1),je,527,0,[OI])))}function YLe(){YLe=Y,eye=TDe(ve(1),ve(4)),Z4e=TDe(ve(1),ve(2))}function HR(){HR=Y,Are=new Sse("DFS",0),Pye=new Sse("BFS",1)}function GR(){GR=Y,gie=new wse(H8,0),z3e=new wse("TOP_LEFT",1)}function Dae(e,n,t){this.d=new iEe(this),this.e=e,this.i=n,this.f=t}function _ae(e,n,t,i){this.d=e,this.n=n,this.g=t,this.o=i,this.p=-1}function Kyn(e,n,t){e.d&&qo(e.d.e,e),e.d=n,e.d&&zb(e.d.e,t,e)}function Vyn(e,n,t){var i;return i=g8(t),Hz(e.n,i,n),Hz(e.o,n,t),n}function F9(e,n){var t,i;return t=L2(e,n),i=null,t&&(i=t.qe()),i}function wE(e,n){var t,i;return t=O1(e,n),i=null,t&&(i=t.qe()),i}function Dw(e,n){var t,i;return t=O1(e,n),i=null,t&&(i=t.ne()),i}function N1(e,n){var t,i;return t=O1(e,n),i=null,t&&(i=I0e(t)),i}function pE(e,n){zRn(n,e),afe(e.d),afe(u(C(e,(Oe(),vH)),213))}function nY(e,n){FRn(n,e),hfe(e.d),hfe(u(C(e,(Oe(),vH)),213))}function I0(e,n){Ln(n),e.b=e.b-1&e.a.length-1,ir(e.a,e.b,n),jHe(e)}function Lae(e,n){Ln(n),ir(e.a,e.c,n),e.c=e.c+1&e.a.length-1,jHe(e)}function jt(e){return at(e.b!=e.d.c),e.c=e.b,e.b=e.b.a,++e.a,e.c.c}function QLe(e){if(e.e.g!=e.b)throw R(new Nl);return!!e.c&&e.d>0}function I2(e){return X(e,18)?u(e,18).dc():!e.Jc().Ob()}function Yyn(e){return new yn(_8n(u(e.a.kd(),18).gc(),e.a.jd()),16)}function WLe(e){var n;n=e.Dh(),this.a=X(n,72)?u(n,72).Gi():n.Jc()}function Pae(e,n){var t;return t=u($a(e.b,n),66),!t&&(t=new xi),t}function Qyn(e,n){var t;t=n.a,fc(t,n.c.d),Gr(t,n.d.d),R2(t.a,e.n)}function ZLe(e,n,t,i){return X(t,59)?new jOe(e,n,t,i):new Nfe(e,n,t,i)}function Wyn(){return zf(),F(z(Sin,1),je,413,0,[mm,m7,v7,Rte])}function Zyn(){return Rw(),F(z(rtn,1),je,409,0,[VN,KN,mte,vte])}function e6n(){return n8(),F(z(Ktn,1),je,408,0,[fp,gm,bm,O3])}function n6n(){return q9(),F(z(gJ,1),je,309,0,[fte,ate,hte,dte])}function t6n(){return W4(),F(z(yve,1),je,383,0,[ex,vve,Ote,Nte])}function i6n(){return $B(),F(z(din,1),je,367,0,[$te,JJ,HJ,eI])}function r6n(){return zE(),F(z(m3e,1),je,301,0,[rx,w3e,tI,p3e])}function c6n(){return U2(),F(z(Wie,1),je,203,0,[MH,Qie,U3,q3])}function u6n(){return F1(),F(z(F4e,1),je,269,0,[fb,z4e,nre,tre])}function o6n(){return rg(),F(z(mon,1),je,404,0,[yI,Cx,NH,OH])}function s6n(e){var n;return e.j==(Ie(),bt)&&(n=Zqe(e),cs(n,nt))}function l6n(){return ny(),F(z(iye,1),je,398,0,[LH,Nx,Ix,Dx])}function ePe(e,n){return u(Js(S2(u(vi(e.k,n),16).Mc(),I3)),113)}function nPe(e,n){return u(Js(O4(u(vi(e.k,n),16).Mc(),I3)),113)}function f6n(e,n){return k4(new Ee(n.e.a+n.f.a/2,n.e.b+n.f.b/2),e)}function a6n(){return Ez(),F(z(uln,1),je,401,0,[Jre,Bre,Fre,zre])}function h6n(){return dz(),F(z(r6e,1),je,354,0,[Pre,t6e,i6e,n6e])}function d6n(){return NE(),F(z(Lye,1),je,353,0,[xre,zH,Sre,Ere])}function b6n(){return s8(),F(z(n8e,1),je,278,0,[BI,sG,Z9e,e8e])}function g6n(){return z1(),F(z(Mce,1),je,222,0,[Ace,zI,q7,Vy])}function w6n(){return fl(),F(z(Zfn,1),je,292,0,[JI,l1,gb,FI])}function p6n(){return KR(),F(z(YI,1),je,288,0,[S8e,A8e,Nce,x8e])}function m6n(){return Vs(),F(z(iA,1),je,380,0,[XI,_g,UI,Jm])}function v6n(){return YB(),F(z(O8e,1),je,326,0,[Ice,M8e,T8e,C8e])}function y6n(){return RB(),F(z(pan,1),je,407,0,[Dce,I8e,N8e,D8e])}function Ll(e,n,t){return n<0?jW(e,t):u(t,69).uk().zk(e,e.ei(),n)}function k6n(e,n,t){var i;return i=g8(t),Hz(e.f,i,n),ei(e.g,n,t),n}function j6n(e,n,t){var i;return i=g8(t),Hz(e.p,i,n),ei(e.q,n,t),n}function tPe(e){var n,t;return n=(j0(),t=new kv,t),e&&_z(n,e),n}function $ae(e){var n;return n=e.$i(e.i),e.i>0&&Wu(e.g,0,n,0,e.i),n}function R4(e){return Cj(),X(e.g,156)?u(e.g,156):null}function E6n(e){return BR(),so(Rce,e)?u(zn(Rce,e),342).Pg():null}function S6n(e){e.a=null,e.e=null,r2(e.b.c,0),r2(e.f.c,0),e.c=null}function iPe(e,n){var t;for(t=e.j.c.length;t>24}function A6n(e){if(e.p!=1)throw R(new is);return Rt(e.k)<<24>>24}function M6n(e){if(e.p!=7)throw R(new is);return Rt(e.k)<<16>>16}function C6n(e){if(e.p!=7)throw R(new is);return Rt(e.f)<<16>>16}function Kv(e,n){return n.e==0||e.e==0?VS:(C8(),TW(e,n))}function uPe(e,n){return ue(n)===ue(e)?"(this Map)":n==null?Vo:fu(n)}function T6n(e,n,t){return bV(re(bu(Xc(e.f,n))),re(bu(Xc(e.f,t))))}function O6n(e,n,t){var i;i=u(zn(e.g,t),60),Ce(e.a.c,new jc(n,i))}function oPe(e,n){var t;return t=new h4,e.Ed(t),t.a+="..",n.Fd(t),t.a}function ha(e){var n;for(n=0;e.Ob();)e.Pb(),n=mc(n,1);return hB(n)}function N6n(e,n,t,i,r){var c;c=HOn(r,t,i),Ce(n,XCn(r,c)),FMn(e,r,n)}function sPe(e,n,t){e.i=0,e.e=0,n!=t&&(qze(e,n,t),Gze(e,n,t))}function lPe(e,n,t,i){this.e=null,this.c=e,this.d=n,this.a=t,this.b=i}function Rae(e,n,t,i,r){this.i=e,this.a=n,this.e=t,this.j=i,this.f=r}function fPe(e,n){hae.call(this),this.a=e,this.b=n,Ce(this.a.b,this)}function I1(e,n){yh(),Gb.call(this,e,1,F(z($t,1),ni,30,15,[n]))}function I6n(e,n,t){return N8(e,n,t,X(n,103)&&(u(n,19).Bb&Ec)!=0)}function qR(e,n,t){return qz(e,n,t,X(n,103)&&(u(n,19).Bb&Ec)!=0)}function D6n(e,n,t){return LOn(e,n,t,X(n,103)&&(u(n,19).Bb&Ec)!=0)}function Bae(e,n){return e==(Fn(),Wi)&&n==Wi?4:e==Wi||n==Wi?8:32}function _6n(e,n){return u(n==null?bu(Xc(e.f,null)):Dj(e.i,n),290)}function aPe(e,n){var t;for(t=n;t;)m2(e,t.i,t.j),t=Fi(t);return e}function Vu(e){return e.n||(Ms(e),e.n=new RIe(e,Rc,e),tu(e)),e.n}function Kh(e,n){Tc();var t;return t=u(e,69).tk(),eCn(t,n),t.vl(n)}function mE(e){return at(e.a"+Aae(e.d):"e_"+jw(e)}function P6n(e,n){var t;return t=n!=null?lo(e,n):bu(Xc(e.f,n)),I$(t)}function $6n(e,n){var t;return t=n!=null?lo(e,n):bu(Xc(e.f,n)),I$(t)}function gPe(e,n){var t;for(t=0;t=0&&e.a[t]===n[t];t--);return t<0}function J6n(e,n){var t,i;i=!1;do t=Dze(e,n),i=i|t;while(t);return i}function vE(){vE=Y,Ox=new vse("UPPER",0),Tx=new vse("LOWER",1)}function XR(){XR=Y,xie=new pse(va,0),Sie=new pse("ALTERNATING",1)}function KR(){KR=Y,S8e=new wIe,A8e=new WIe,Nce=new S_e,x8e=new ZIe}function pPe(){pPe=Y,Lin=Dt((iB(),F(z(g3e,1),je,422,0,[b3e,Kte])))}function mPe(){mPe=Y,Bin=Dt((hO(),F(z(S3e,1),je,419,0,[VJ,E3e])))}function vPe(){vPe=Y,Hin=Dt((uO(),F(z(M3e,1),je,476,0,[A3e,QJ])))}function yPe(){yPe=Y,Qin=Dt((GR(),F(z(F3e,1),je,420,0,[gie,z3e])))}function kPe(){kPe=Y,ern=Dt((XR(),F(z(n5e,1),je,423,0,[xie,Sie])))}function jPe(){jPe=Y,Xun=Dt((sO(),F(z(J4e,1),je,421,0,[ire,rre])))}function EPe(){EPe=Y,Son=Dt((vE(),F(z(Eon,1),je,518,0,[Ox,Tx])))}function SPe(){SPe=Y,Don=Dt((Da(),F(z(Ion,1),je,508,0,[Og,Qa])))}function xPe(){xPe=Y,Non=Dt((dh(),F(z(Oon,1),je,509,0,[yp,Kd])))}function APe(){APe=Y,Kon=Dt((da(),F(z(Xon,1),je,515,0,[Dm,ab])))}function MPe(){MPe=Y,nsn=Dt((Iw(),F(z(esn,1),je,454,0,[hb,X3])))}function CPe(){CPe=Y,Csn=Dt((HR(),F(z($ye,1),je,425,0,[Are,Pye])))}function TPe(){TPe=Y,Dsn=Dt((AB(),F(z(Rye,1),je,487,0,[FH,Y3])))}function OPe(){OPe=Y,Psn=Dt((cB(),F(z(zye,1),je,426,0,[Bye,Ire])))}function NPe(){NPe=Y,Iln=Dt((QR(),F(z(T6e,1),je,478,0,[Vre,C6e])))}function IPe(){IPe=Y,Fln=Dt((eO(),F(z($6e,1),je,428,0,[nce,WH])))}function DPe(){DPe=Y,cfn=Dt((vO(),F(z(c9e,1),je,427,0,[eG,r9e])))}function _Pe(){_Pe=Y,btn=Dt((aB(),F(z(nve,1),je,424,0,[yte,vJ])))}function LPe(){LPe=Y,fin=Dt((Y9(),F(z(lin,1),je,502,0,[ZN,Dte])))}function VR(e){w0e(),QTe(this,Rt(Rr(Sw(e,24),uF)),Rt(Rr(e,uF)))}function H6n(e){return(e.k==(Fn(),Wi)||e.k==wr)&&wi(e,(me(),sx))}function G6n(e,n,t){return u(n==null?Ko(e.f,null,t):Bw(e.i,n,t),290)}function q6n(){return vr(),F(z(Yx,1),je,86,0,[nh,ru,Zc,eh,Vl])}function U6n(){return Ie(),F(z(xc,1),qu,64,0,[ju,Vn,nt,bt,Yn])}function X6n(e){return GP(),function(){return Hyn(e,this,arguments)}}function PPe(e,n){var t;return t=n.jd(),new pw(t,e.e.pc(t,u(n.kd(),18)))}function $Pe(e,n){var t,i;return t=n.jd(),i=e.De(t),!!i&&Ku(i.e,n.kd())}function cc(e,n){var t,i;for(Ln(n),i=e.Jc();i.Ob();)t=i.Pb(),n.Ad(t)}function ul(e,n,t){var i;return i=(kn(n,e.c.length),e.c[n]),e.c[n]=t,i}function Hae(e,n){var t,i;for(t=n,i=0;t>0;)i+=e.a[t],t-=t&-t;return i}function RPe(e,n){var t;for(t=n;t;)m2(e,-t.i,-t.j),t=Fi(t);return e}function K6n(e,n){var t;return t=e.a.get(n),t??le(Mr,Nn,1,0,5,1)}function Vv(e,n){return(F0(e),w9(new mn(e,new whe(n,e.a)))).zd(Sy)}function V6n(){return zr(),F(z(pve,1),je,363,0,[Xf,c1,eo,no,Pc])}function BPe(e){nYe(),VSe(this),this.a=new xi,x1e(this,e),Vt(this.a,e)}function zPe(){CK(this),this.b=new Ee(Vi,Vi),this.a=new Ee(Ir,Ir)}function oY(e){YR(),!Va&&(this.c=e,this.e=!0,this.a=new Te)}function YR(){YR=Y,Va=!0,mnn=!1,vnn=!1,knn=!1,ynn=!1}function QR(){QR=Y,Vre=new Mse(bwe,0),C6e=new Mse("TARGET_WIDTH",1)}function Y6n(){return kz(),F(z(_sn,1),je,364,0,[Ore,Mre,Nre,Cre,Tre])}function Q6n(){return X2(),F(z(Ain,1),je,371,0,[nI,UJ,XJ,qJ,GJ])}function W6n(){return GE(),F(z(_4e,1),je,328,0,[D4e,Zie,ere,Ex,Sx])}function Z6n(){return Xs(),F(z(e5e,1),je,165,0,[fI,ax,V1,hx,Sg])}function e9n(){return tS(),F(z(Lln,1),je,369,0,[Q3,Jy,Hx,Jx,TI])}function n9n(){return GO(),F(z(F6e,1),je,330,0,[R6e,tce,z6e,ice,B6e])}function t9n(){return vh(),F(z(Wa,1),je,160,0,[Tn,fr,xa,Yd,Q1])}function i9n(){return u3(),F(z(eA,1),je,257,0,[wb,HI,g8e,Zx,w8e])}function sY(e,n){var t;return t=u($a(e.d,n),21),t||u($a(e.e,n),21)}function FPe(e){this.b=e,st.call(this,e),this.a=u(Kn(this.b.a,4),129)}function JPe(e){this.b=e,E4.call(this,e),this.a=u(Kn(this.b.a,4),129)}function HPe(e,n){this.c=0,this.b=n,uTe.call(this,e,17493),this.a=this.c}function Lf(e,n,t,i,r){YPe.call(this,n,i,r),this.c=e,this.b=t}function Gae(e,n,t,i,r){mLe.call(this,n,i,r),this.c=e,this.a=t}function qae(e,n,t,i,r){vLe.call(this,n,i,r),this.c=e,this.a=t}function Uae(e,n,t,i,r){YPe.call(this,n,i,r),this.c=e,this.a=t}function Xae(e,n,t){e.a.c.length=0,OPn(e,n,t),e.a.c.length==0||t_n(e,n)}function QT(e){e.i=0,uT(e.b,null),uT(e.c,null),e.a=null,e.e=null,++e.g}function r9n(e){return e.e=3,e.d=e.Yb(),e.e!=2?(e.e=0,!0):!1}function Kae(e,n){return X(n,144)?bn(e.c,u(n,144).c):!1}function GPe(e){var n;return e.c||(n=e.r,X(n,88)&&(e.c=u(n,29))),e.c}function Ms(e){return e.t||(e.t=new RSe(e),RE(new tAe(e),0,e.t)),e.t}function uc(e){return!e.c||!e.d?!1:!!e.c.i&&e.c.i==e.d.i}function B4(e,n){return n==0||e.e==0?e:n>0?aJe(e,n):WUe(e,-n)}function Vae(e,n){return n==0||e.e==0?e:n>0?WUe(e,n):aJe(e,-n)}function ct(e){if(ht(e))return e.c=e.a,e.a.Pb();throw R(new hu)}function qPe(e){var n;return n=e.length,bn(Rn.substr(Rn.length-n,n),e)}function UPe(e){var n,t;return n=e.c.i,t=e.d.i,n.k==(Fn(),wr)&&t.k==wr}function lY(e){var n,t,i;return n=e&Ls,t=e>>22&Ls,i=e<0?G1:0,_o(n,t,i)}function c9n(e,n){var t,i;t=u(Zkn(e.c,n),18),t&&(i=t.gc(),t.$b(),e.d-=i)}function u9n(e){e&&s8n((Coe(),yme)),--lJ,e&&fJ!=-1&&(qgn(fJ),fJ=-1)}function Yae(e){$gn.call(this,e==null?Vo:fu(e),X(e,80)?u(e,80):null)}function fY(e){var n;return n=new Ow,Pu(n,e),he(n,(Oe(),Wc),null),n}function aY(e,n,t){var i;return i=e.Fh(n),i>=0?e.Ih(i,t,!0):Xw(e,n,t)}function o9n(e,n,t){return ji(k4(w8(e),pc(n.b)),k4(w8(e),pc(t.b)))}function s9n(e,n,t){return ji(k4(w8(e),pc(n.e)),k4(w8(e),pc(t.e)))}function l9n(e,n){return k.Math.min(_0(n.a,e.d.d.c),_0(n.b,e.d.d.c))}function XPe(e,n,t){var i;i=new Vse(e.a),AE(i,e.a.a),Ko(i.f,n,t),e.a.a=i}function Qae(e,n,t,i){var r;for(r=0;rn)throw R(new jo(F0e(e,n,"index")));return e}function ehe(e){var n;return n=e.e+e.f,isNaN(n)&&V$(e.d)?e.d:n}function a9n(e,n){var t;t=e.q.getHours()+(n/60|0),e.q.setMinutes(n),sS(e,t)}function nhe(e,n){var t,i;return t=(Ln(e),e),i=(Ln(n),n),t==i?0:tn.p?-1:0}function t$e(e,n){return so(e.a,n)?(z4(e.a,n),!0):!1}function g9n(e){var n,t;return n=e.jd(),t=u(e.kd(),18),DT(t.Lc(),new n9(n))}function dY(e){var n;return n=e.b,n.b==0?null:u(Yu(n,0),65).b}function eB(e,n){return Ln(n),e.c=0,"Initial capacity must not be negative")}function tB(){tB=Y,Gx=new ki("org.eclipse.elk.labels.labelManager")}function r$e(){r$e=Y,l3e=new Pi("separateLayerConnections",($B(),$te))}function da(){da=Y,Dm=new jse("REGULAR",0),ab=new jse("CRITICAL",1)}function eO(){eO=Y,nce=new Cse("FIXED",0),WH=new Cse("CENTER_NODE",1)}function iB(){iB=Y,b3e=new dse("QUADRATIC",0),Kte=new dse("SCANLINE",1)}function c$e(){c$e=Y,$in=Dt((vB(),F(z(y3e,1),je,350,0,[v3e,KJ,Vte])))}function u$e(){u$e=Y,Fin=Dt((tg(),F(z(zin,1),je,449,0,[iie,E7,L3])))}function o$e(){o$e=Y,Xin=Dt((e8(),F(z(die,1),je,302,0,[aie,hie,rI])))}function s$e(){s$e=Y,Kin=Dt(($0(),F(z(bie,1),je,329,0,[cI,B3e,ym])))}function l$e(){l$e=Y,Yin=Dt((_1(),F(z(Vin,1),je,315,0,[uI,$3,Ty])))}function f$e(){f$e=Y,Iin=Dt(($w(),F(z(Bte,1),je,368,0,[hp,ub,ap])))}function a$e(){a$e=Y,Jun=Dt((_E(),F(z(I4e,1),je,352,0,[Yie,N4e,AH])))}function h$e(){h$e=Y,Vun=Dt((Nc(),F(z(Kun,1),je,452,0,[Ax,ys,Io])))}function d$e(){d$e=Y,Yun=Dt((_B(),F(z(q4e,1),je,381,0,[H4e,cre,G4e])))}function b$e(){b$e=Y,Qun=Dt((DE(),F(z(U4e,1),je,348,0,[ore,ure,vI])))}function g$e(){g$e=Y,Wun=Dt((u8(),F(z(K4e,1),je,349,0,[sre,X4e,Mx])))}function w$e(){w$e=Y,Zun=Dt((mB(),F(z(Q4e,1),je,351,0,[Y4e,lre,V4e])))}function p$e(){p$e=Y,eon=Dt((LB(),F(z(W4e,1),je,382,0,[fre,L7,Im])))}function m$e(){m$e=Y,rsn=Dt((IE(),F(z(gye,1),je,385,0,[bye,dre,jI])))}function v$e(){v$e=Y,$sn=Dt((xO(),F(z(Hye,1),je,386,0,[JH,Fye,Jye])))}function y$e(){y$e=Y,rln=Dt((DB(),F(z(o6e,1),je,303,0,[$re,u6e,c6e])))}function k$e(){k$e=Y,cln=Dt((ez(),F(z(s6e,1),je,436,0,[$x,qH,Rre])))}function j$e(){j$e=Y,Dln=Dt((uB(),F(z(I6e,1),je,429,0,[Yre,N6e,O6e])))}function E$e(){E$e=Y,_ln=Dt((GB(),F(z(L6e,1),je,430,0,[D6e,_6e,Qre])))}function S$e(){S$e=Y,$ln=Dt((OO(),F(z(Wre,1),je,435,0,[VH,YH,QH])))}function x$e(){x$e=Y,fln=Dt((VB(),F(z(a6e,1),je,387,0,[f6e,qre,l6e])))}function A$e(){A$e=Y,ztn=Dt((kE(),F(z(wve,1),je,384,0,[Ste,Ete,xte])))}function M$e(){M$e=Y,jnn=Dt((zl(),F(z(Qo,1),je,130,0,[Kme,Yo,Vme])))}function C$e(){C$e=Y,Onn=Dt((wa(),F(z(dm,1),je,237,0,[Ou,No,Nu])))}function T$e(){T$e=Y,Inn=Dt((ws(),F(z(Nnn,1),je,461,0,[Oh,rb,qf])))}function O$e(){O$e=Y,_nn=Dt((Uo(),F(z(Dnn,1),je,462,0,[ja,cb,Uf])))}function N$e(){N$e=Y,Kfn=Dt((Ra(),F(z(t8e,1),je,279,0,[H7,Fm,G7])))}function I$e(){I$e=Y,dan=Dt((V4(),F(z(E8e,1),je,281,0,[j8e,Hm,gG])))}function D$e(){D$e=Y,Wfn=Dt((B1(),F(z(b8e,1),je,347,0,[lG,Wd,Wx])))}function _$e(){_$e=Y,fan=Dt((EE(),F(z(y8e,1),je,300,0,[qI,Tce,v8e])))}function ba(e,n){return!e.o&&(e.o=new os((Gu(),h1),Zd,e,0)),xQ(e.o,n)}function p9n(e){return!e.g&&(e.g=new G6),!e.g.d&&(e.g.d=new LSe(e)),e.g.d}function m9n(e){return!e.g&&(e.g=new G6),!e.g.b&&(e.g.b=new _Se(e)),e.g.b}function nO(e){return!e.g&&(e.g=new G6),!e.g.c&&(e.g.c=new $Se(e)),e.g.c}function v9n(e){return!e.g&&(e.g=new G6),!e.g.a&&(e.g.a=new PSe(e)),e.g.a}function y9n(e,n,t,i){return t&&(i=t.Oh(n,Ji(t.Ah(),e.c.sk()),null,i)),i}function k9n(e,n,t,i){return t&&(i=t.Qh(n,Ji(t.Ah(),e.c.sk()),null,i)),i}function bY(e,n,t,i){var r;return r=le($t,ni,30,n+1,15,1),$_n(r,e,n,t,i),r}function le(e,n,t,i,r,c){var o;return o=dHe(r,i),r!=10&&F(z(e,c),n,t,r,o),o}function j9n(e,n,t){var i,r;for(r=new W9(n,e),i=0;it||n=0?e.Ih(t,!0,!0):Xw(e,n,!0)}function tO(e,n){var t,i,r;return r=e.r,i=e.d,t=aS(e,n,!0),t.b!=r||t.a!=i}function R$e(e,n){return $Me(e.e,n)||ug(e.e,n,new $Je(n)),u($a(e.e,n),113)}function Cs(e,n,t,i){return Ln(e),Ln(n),Ln(t),Ln(i),new Bfe(e,n,new Fu)}function iO(e,n,t){var i,r;return r=(i=x8(e.b,n),i),r?Yz(lO(e,r),t):null}function R9n(e,n,t){var i,r,c;i=O1(e,t),r=null,i&&(r=I0e(i)),c=r,_Je(n,t,c)}function B9n(e,n,t){var i,r,c;i=O1(e,t),r=null,i&&(r=I0e(i)),c=r,_Je(n,t,c)}function os(e,n,t,i){this.$j(),this.a=n,this.b=e,this.c=new Lfe(this,n,t,i)}function mY(e,n,t,i,r,c){_ae.call(this,n,i,r,c),this.c=e,this.b=t}function rO(e,n,t,i,r,c){_ae.call(this,n,i,r,c),this.c=e,this.a=t}function ghe(e,n,t,i,r){FTe(this),this.b=e,this.d=n,this.f=t,this.g=i,this.c=r}function whe(e,n){D$.call(this,n.xd(),n.wd()&-16449),Ln(e),this.a=e,this.c=n}function z9n(e,n){e.a.Le(n.d,e.b)>0&&(Ce(e.c,new ofe(n.c,n.d,e.d)),e.b=n.d)}function vY(e){e.a=le($t,ni,30,e.b+1,15,1),e.c=le($t,ni,30,e.b,15,1),e.d=0}function F9n(e,n,t){var i;return i=Bze(e,n,t),e.b=new CB(i.c.length),Ibe(e,i)}function J9n(e){if(e.b<=0)throw R(new hu);return--e.b,e.a-=e.c.c,ve(e.a)}function H9n(e){var n;if(!e.a)throw R(new l_e);return n=e.a,e.a=Fi(e.a),n}function B$e(e){var n;if(e.ll())for(n=e.i-1;n>=0;--n)K(e,n);return $ae(e)}function J4(e){var n;return Nt(e),X(e,204)?(n=u(e,204),n):new t9(e)}function G9n(e){for(;!e.a;)if(!SNe(e.c,new Gke(e)))return!1;return!0}function phe(e,n){if(e.g==null||n>=e.i)throw R(new EK(n,e.i));return e.g[n]}function z$e(e,n,t){if(r8(e,t),t!=null&&!e.dk(t))throw R(new gX);return t}function yY(e,n){return aO(n)!=10&&F(Us(n),n.Qm,n.__elementTypeId$,aO(n),e),e}function F$e(e,n){var t,i;return i=n/e.c.Pd().gc()|0,t=n%e.c.Pd().gc(),F4(e,i,t)}function G9(e,n,t,i){var r;i=(Tw(),i||Fme),r=e.slice(n,t),J0e(r,e,n,t,-n,i)}function Pl(e,n,t,i,r){return n<0?Xw(e,t,i):u(t,69).uk().wk(e,e.ei(),n,i,r)}function q9n(e,n){return ji(ne(re(C(e,(me(),gp)))),ne(re(C(n,gp))))}function J$e(){J$e=Y,wnn=Dt((q9(),F(z(gJ,1),je,309,0,[fte,ate,hte,dte])))}function q9(){q9=Y,fte=new o$("All",0),ate=new MTe,hte=new BTe,dte=new CTe}function ws(){ws=Y,Oh=new UX(by,0),rb=new UX(H8,1),qf=new UX(gy,2)}function H$e(){H$e=Y,Uz(),b7e=Vi,yhn=Ir,g7e=new et(Vi),khn=new et(Ir)}function rB(){rB=Y,sfn=new yv,ffn=new tL,lfn=ckn((Xt(),Ece),sfn,bb,ffn)}function U9n(e){rB(),u(e.mf((Xt(),Rm)),182).Ec((ps(),GI)),e.of(Ece,null)}function X9n(e){return X(e,180)?""+u(e,180).a:e==null?null:fu(e)}function K9n(e){return X(e,180)?""+u(e,180).a:e==null?null:fu(e)}function mhe(e){var n,t;if(!e.b)return null;for(t=e.b;n=t.a[0];)t=n;return t}function G$e(e){var n,t;if(!e.b)return null;for(t=e.b;n=t.a[1];)t=n;return t}function cO(e){var n;for(n=e.p+1;n=0?sz(e,t,!0,!0):Xw(e,n,!0)}function e8n(e,n){A4(u(u(e.f,26).mf((Xt(),Vx)),102))&&XFe(iae(u(e.f,26)),n)}function mRe(e,n){Os(e,n==null||V$((Ln(n),n))||isNaN((Ln(n),n))?0:(Ln(n),n))}function vRe(e,n){Ns(e,n==null||V$((Ln(n),n))||isNaN((Ln(n),n))?0:(Ln(n),n))}function yRe(e,n){Pw(e,n==null||V$((Ln(n),n))||isNaN((Ln(n),n))?0:(Ln(n),n))}function kRe(e,n){Lw(e,n==null||V$((Ln(n),n))||isNaN((Ln(n),n))?0:(Ln(n),n))}function jRe(e){(this.q?this.q:(En(),En(),r1)).zc(e.q?e.q:(En(),En(),r1))}function xY(e,n,t){var i;return i=e.g[n],Qj(e,n,e.Xi(n,t)),e.Pi(n,t,i),e.Li(),i}function fB(e,n){var t;return t=e.bd(n),t>=0?(e.ed(t),!0):!1}function AY(e){var n;return e.d!=e.r&&(n=ff(e),e.e=!!n&&n.jk()==een,e.d=n),e.e}function MY(e,n){var t;for(Nt(e),Nt(n),t=!1;n.Ob();)t=t|e.Ec(n.Pb());return t}function $a(e,n){var t;return t=u(zn(e.e,n),393),t?(YTe(e,t),t.e):null}function ERe(e){var n,t;return n=e/60|0,t=e%60,t==0?""+n:""+n+":"+(""+t)}function lu(e,n){var t,i;return F0(e),i=new the(n,e.a),t=new jNe(i),new mn(e,t)}function L2(e,n){var t=e.a[n],i=(WY(),rte)[typeof t];return i?i(t):F1e(typeof t)}function n8n(e,n){var t,i,r;r=n.c.i,t=u(zn(e.f,r),60),i=t.d.c-t.e.c,Zhe(n.a,i,0)}function Vh(e,n,t){var i,r;for(i=10,r=0;r=0;)++n[0]}function CRe(e,n,t,i){ai(),bw.call(this,26),this.c=e,this.a=n,this.d=t,this.b=i}function L1(e,n,t,i,r,c,o){DY.call(this,n,i,r,c,o),this.c=e,this.b=t}function TRe(e){this.g=e,this.f=new Te,this.a=k.Math.min(this.g.c.c,this.g.d.c)}function jE(){jE=Y,Wtn=new Ip,Ztn=new Dp,Ytn=new _p,Qtn=new Lp,ein=new xl}function aB(){aB=Y,yte=new fse("EADES",0),vJ=new fse("FRUCHTERMAN_REINGOLD",1)}function hO(){hO=Y,VJ=new bse("READING_DIRECTION",0),E3e=new bse("ROTATION",1)}function ORe(){ORe=Y,Min=Dt((X2(),F(z(Ain,1),je,371,0,[nI,UJ,XJ,qJ,GJ])))}function NRe(){NRe=Y,Gun=Dt((GE(),F(z(_4e,1),je,328,0,[D4e,Zie,ere,Ex,Sx])))}function IRe(){IRe=Y,Zin=Dt((Xs(),F(z(e5e,1),je,165,0,[fI,ax,V1,hx,Sg])))}function DRe(){DRe=Y,Lsn=Dt((kz(),F(z(_sn,1),je,364,0,[Ore,Mre,Nre,Cre,Tre])))}function _Re(){_Re=Y,Pln=Dt((tS(),F(z(Lln,1),je,369,0,[Q3,Jy,Hx,Jx,TI])))}function LRe(){LRe=Y,Jln=Dt((GO(),F(z(F6e,1),je,330,0,[R6e,tce,z6e,ice,B6e])))}function PRe(){PRe=Y,Gtn=Dt((zr(),F(z(pve,1),je,363,0,[Xf,c1,eo,no,Pc])))}function $Re(){$Re=Y,Ufn=Dt((vr(),F(z(Yx,1),je,86,0,[nh,ru,Zc,eh,Vl])))}function RRe(){RRe=Y,afn=Dt((vh(),F(z(Wa,1),je,160,0,[Tn,fr,xa,Yd,Q1])))}function BRe(){BRe=Y,tan=Dt((u3(),F(z(eA,1),je,257,0,[wb,HI,g8e,Zx,w8e])))}function zRe(){zRe=Y,can=Dt((Ie(),F(z(xc,1),qu,64,0,[ju,Vn,nt,bt,Yn])))}function FRe(e){var n;return n=u(C(e,(me(),dp)),317),n?n.a==e:!1}function JRe(e){var n;return n=u(C(e,(me(),dp)),317),n?n.i==e:!1}function HRe(e,n){return Ln(n),Ife(e),e.d.Ob()?(n.Ad(e.d.Pb()),!0):!1}function hB(e){return ao(e,oi)>0?oi:ao(e,Xr)<0?Xr:Rt(e)}function f8n(e,n){var t;return t=zw(e.e.c,n.e.c),t==0?ji(e.e.d,n.e.d):t}function TY(e,n){var t;return t=u(zn(e.a,n),150),t||(t=new Vg,ei(e.a,n,t)),t}function $f(e,n,t){var i;if(n==null)throw R(new c4);return i=O1(e,n),L6n(e,n,t),i}function a8n(e,n){var t,i;for(i=n.c,t=i+1;t<=n.f;t++)e.a[t]>e.a[i]&&(i=t);return i}function h8n(e,n,t){var i;return i=e.a.e[u(n.a,9).p]-e.a.e[u(t.a,9).p],lc($T(i))}function d8n(e,n,t){var i,r;for(r=new P(t);r.a0?n-1:n,pAe(lgn(hBe(dfe(new s4,t),e.n),e.j),e.k)}function y8n(e,n,t,i){var r;e.j=-1,nbe(e,D0e(e,n,t),(Tc(),r=u(n,69).tk(),r.vl(i)))}function KRe(e,n,t,i,r,c){var o;o=fY(i),fc(o,r),Gr(o,c),gn(e.a,i,new W$(o,n,t.f))}function dB(e,n){var t;return F0(e),t=new n_e(e,e.a.xd(),e.a.wd()|4,n),new mn(e,t)}function k8n(e,n){var t,i;return t=u(J2(e.d,n),18),t?(i=n,e.e.pc(i,t)):null}function Cn(e,n){var t;return t=(e.i==null&&kh(e),e.i),n>=0&&n=-.01&&e.a<=qa&&(e.a=0),e.b>=-.01&&e.b<=qa&&(e.b=0),e}function Yv(e){M8();var n,t;for(t=Fpe,n=0;nt&&(t=e[n]);return t}function j8n(e){var n;return n=ne(re(C(e,(Oe(),Ud)))),n<0&&(n=0,he(e,Ud,n)),n}function E8n(e,n){A4(u(C(u(e.e,9),(Oe(),Zi)),102))&&(En(),Tr(u(e.e,9).j,n))}function bB(e,n){var t,i;for(i=e.Jc();i.Ob();)t=u(i.Pb(),70),he(t,(me(),_y),n)}function S8n(e,n){var t,i,r;for(i=n.a.jd(),t=u(n.a.kd(),18).gc(),r=0;re||e>n)throw R(new Doe("fromIndex: 0, toIndex: "+e+Xge+n))}function WRe(e,n){Ei(e,(Qh(),Gre),n.f),Ei(e,lln,n.e),Ei(e,Hre,n.d),Ei(e,sln,n.c)}function Ao(e,n){var t,i,r,c;for(Ln(n),i=e.c,r=0,c=i.length;r0&&(e.a/=n,e.b/=n),e}function ZRe(e,n,t){var i,r;i=n;do r=ne(e.p[i.p])+t,e.p[i.p]=r,i=e.a[i.p];while(i!=n)}function ol(e){var n;return e.w?e.w:(n=vyn(e),n&&!n.Sh()&&(e.w=n),n)}function Ahe(e,n){return Na(),Rf(Y0),k.Math.abs(e-n)<=Y0||e==n||isNaN(e)&&isNaN(n)}function I8n(e){var n;return e==null?null:(n=u(e,195),yMn(n,n.length))}function K(e,n){if(e.g==null||n>=e.i)throw R(new EK(n,e.i));return e.Ui(n,e.g[n])}function wa(){wa=Y,Ou=new qX("BEGIN",0),No=new qX(H8,1),Nu=new qX("END",2)}function Ra(){Ra=Y,H7=new pK(H8,0),Fm=new pK("HEAD",1),G7=new pK("TAIL",2)}function H4(){H4=Y,Osn=mh(mh(mh(Nj(new or,(ny(),Nx)),(uS(),hre)),oye),aye)}function P1(){P1=Y,Isn=mh(mh(mh(Nj(new or,(ny(),Dx)),(uS(),lye)),rye),sye)}function Qv(e,n){return bgn(ME(e,n,Rt(hc(e1,Xh(Rt(hc(n==null?0:Ni(n),n1)),15)))))}function Mhe(e,n){return Na(),Rf(Y0),k.Math.abs(e-n)<=Y0||e==n||isNaN(e)&&isNaN(n)}function X9(e,n){var t,i;i=e.a,t=djn(e,n,null),i!=n&&!e.e&&(t=_8(e,n,t)),t&&t.mj()}function D8n(e,n){var t;return t=Nr(pc(u(zn(e.g,n),8)),Use(u(zn(e.f,n),460).b)),t}function eBe(e,n,t){var i=function(){return e.apply(i,arguments)};return n.apply(i,t),i}function G4(e){var n;return tE(e==null||Array.isArray(e)&&(n=aO(e),!(n>=14&&n<=16))),e}function Che(e){e.b=(ws(),rb),e.f=(Uo(),cb),e.d=(sl(2,rm),new xo(2)),e.e=new Vr}function gB(e){this.b=(Nt(e),new bs(e)),this.a=new Te,this.d=new Te,this.e=new Vr}function nBe(e){return F0(e),C4(!0,"n may not be negative"),new mn(e,new yBe(e.a))}function _8n(e,n){En();var t,i;for(i=new Te,t=0;t0?u(Le(t.a,i-1),9):null}function Rf(e){if(!(e>=0))throw R(new Un("tolerance ("+e+") must be >= 0"));return e}function SE(){return oce||(oce=new DXe,K4(oce,F(z(xy,1),Nn,148,0,[new OC]))),oce}function mB(){mB=Y,Y4e=new uK("NO",0),lre=new uK(bwe,1),V4e=new uK("LOOK_BACK",2)}function Nc(){Nc=Y,Ax=new tK(yS,0),ys=new tK("INPUT",1),Io=new tK("OUTPUT",2)}function vB(){vB=Y,v3e=new VX("ARD",0),KJ=new VX("MSD",1),Vte=new VX("MANUAL",2)}function F8n(){return YO(),F(z(j3e,1),je,267,0,[Wte,k3e,eie,nie,Zte,tie,iI,Qte,Yte])}function J8n(){return WO(),F(z(O4e,1),je,268,0,[Vie,M4e,C4e,Xie,A4e,T4e,xH,Uie,Kie])}function H8n(){return _s(),F(z(k8e,1),je,266,0,[X7,VI,aG,rA,hG,bG,dG,Oce,KI])}function G8n(){kMe();for(var e=Kne,n=0;nt)throw R(new k2(n,t));return new Xle(e,n)}function yB(e){var n,t;for(t=e.c.Bc().Jc();t.Ob();)n=u(t.Pb(),18),n.$b();e.c.$b(),e.d=0}function q8n(e){var n,t,i,r;for(t=e.a,i=0,r=t.length;i=0),CEn(e.d,e.c)<0&&(e.a=e.a-1&e.d.a.length-1,e.b=e.d.c),e.c=-1}function yBe(e){D$.call(this,e.yd(64)?Gse(0,lf(e.xd(),1)):bN,e.wd()),this.b=1,this.a=e}function kBe(){cle.call(this),this.n=-1,this.g=null,this.i=null,this.j=null,this.Bb|=Gf}function jBe(e,n,t,i){this.$j(),this.a=n,this.b=e,this.c=null,this.c=new mNe(this,n,t,i)}function DY(e,n,t,i,r){this.d=e,this.n=n,this.g=t,this.o=i,this.p=-1,r||(this.o=-2-i-1)}function EBe(e){Woe(),this.g=new wt,this.f=new wt,this.b=new wt,this.c=new Nw,this.i=e}function $he(){this.f=new Vr,this.d=new moe,this.c=new Vr,this.a=new Te,this.b=new Te}function X8n(e){var n,t;for(t=new P(vHe(e));t.a=0}function Rhe(){Rhe=Y,son=qt(qt(qt(new or,(zr(),Xf),(Ur(),N3)),c1,pm),eo,wm)}function SBe(){SBe=Y,lon=qt(qt(qt(new or,(zr(),Xf),(Ur(),N3)),c1,pm),eo,wm)}function Bhe(){Bhe=Y,fon=qt(qt(qt(new or,(zr(),Xf),(Ur(),N3)),c1,pm),eo,wm)}function xBe(){xBe=Y,aon=qt(qt(qt(new or,(zr(),Xf),(Ur(),N3)),c1,pm),eo,wm)}function ABe(){ABe=Y,hon=qt(qt(qt(new or,(zr(),Xf),(Ur(),N3)),c1,pm),eo,wm)}function MBe(){MBe=Y,don=qt(qt(qt(new or,(zr(),Xf),(Ur(),N3)),c1,pm),eo,wm)}function CBe(){CBe=Y,won=Eo(qt(qt(new or,(zr(),eo),(Ur(),_J)),no,TJ),Pc,DJ)}function TBe(){TBe=Y,nnn=F(z($t,1),ni,30,15,[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15])}function zhe(e,n){var t;t=e.b,e.b=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,0,t,e.b))}function Fhe(e,n){var t;t=e.c,e.c=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,1,t,e.c))}function _Y(e,n){var t;t=e.c,e.c=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,4,t,e.c))}function Jhe(e,n){var t;t=e.c,e.c=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,1,t,e.c))}function Hhe(e,n){var t;t=e.d,e.d=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,1,t,e.d))}function V9(e,n){var t;t=e.k,e.k=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,2,t,e.k))}function LY(e,n){var t;t=e.D,e.D=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,2,t,e.D))}function EB(e,n){var t;t=e.f,e.f=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,8,t,e.f))}function SB(e,n){var t;t=e.i,e.i=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,7,t,e.i))}function Ghe(e,n){var t;t=e.a,e.a=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,8,t,e.a))}function qhe(e,n){var t;t=e.b,e.b=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,0,t,e.b))}function Y8n(e,n,t){var i;e.b=n,e.a=t,i=(e.a&512)==512?new Lxe:new pC,e.c=MIn(i,e.b,e.a)}function OBe(e,n){return J1(e.e,n)?(Tc(),AY(n)?new uR(n,e):new vT(n,e)):new tTe(n,e)}function Q8n(e){var n,t;return 0>e?new Yoe:(n=e+1,t=new HPe(n,e),new Ale(null,t))}function W8n(e,n){En();var t;return t=new b4(1),$r(e)?Kc(t,e,n):Ko(t.f,e,n),new aX(t)}function Z8n(e,n){var t;t=new Kg,u(n.b,68),u(n.b,68),u(n.b,68),Ao(n.a,new ife(e,t,n))}function NBe(e,n){var t;return X(n,8)?(t=u(n,8),e.a==t.a&&e.b==t.b):!1}function e7n(e){var n;return n=C(e,(me(),mi)),X(n,174)?WFe(u(n,174)):null}function IBe(e){var n;return e=k.Math.max(e,2),n=b1e(e),e>n?(n<<=1,n>0?n:gS):n}function PY(e){switch(ile(e.e!=3),e.e){case 2:return!1;case 0:return!0}return r9n(e)}function Uhe(e){var n;return e.b==null?(Ed(),Ed(),iD):(n=e.sl()?e.rl():e.ql(),n)}function DBe(e,n){var t,i;for(i=n.vc().Jc();i.Ob();)t=u(i.Pb(),45),zO(e,t.jd(),t.kd())}function Xhe(e,n){var t;t=e.d,e.d=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,11,t,e.d))}function xB(e,n){var t;t=e.j,e.j=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,13,t,e.j))}function Khe(e,n){var t;t=e.b,e.b=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,21,t,e.b))}function Vhe(e,n){e.r>0&&e.c0&&e.g!=0&&Vhe(e.i,n/e.r*e.i.d))}function _Be(e,n,t){var i,r,c;for(c=e.a.length-1,r=e.b,i=0;i0?1:0:(!e.c&&(e.c=XT(Lu(e.f))),e.c).e}function GBe(e,n){n?e.B==null&&(e.B=e.D,e.D=null):e.B!=null&&(e.D=e.B,e.B=null)}function c7n(e,n){n.Tg(yQe,1),er(lu(new mn(null,new yn(e.b,16)),new Wg),new kD),n.Ug()}function FY(e,n,t,i,r,c){var o;this.c=e,o=new Te,_de(e,o,n,e.b,t,i,r,c),this.a=new qr(o,0)}function rr(e,n,t,i,r,c,o,l,f,h,b,p,y){return uqe(e,n,t,i,r,c,o,l,f,h,b,p,y),mQ(e,!1),e}function u7n(e,n){typeof window===fN&&typeof window.$gwt===fN&&(window.$gwt[e]=n)}function o7n(e,n,t){var i,r,c;for(i=0,r=0;r>>31;i!=0&&(e[t]=i)}function s7n(e,n,t){t.Tg("DFS Treeifying phase",1),mEn(e,n),VNn(e,n),e.a=null,e.b=null,t.Ug()}function l7n(e,n){var t;n.Tg("General Compactor",1),t=eEn(u(ke(e,(q0(),_re)),386)),t.Bg(e)}function f7n(e,n){var t,i;return t=u(ke(e,(q0(),HH)),15),i=u(ke(n,HH),15),oo(t.a,i.a)}function Zhe(e,n,t){var i,r;for(r=St(e,0);r.b!=r.d.c;)i=u(jt(r),8),i.a+=n,i.b+=t;return e}function a7n(e,n,t,i){var r;r=new l4,Xb(r,"x",vz(e,n,i.a)),Xb(r,"y",yz(e,n,i.b)),D4(t,r)}function h7n(e,n,t,i){var r;r=new l4,Xb(r,"x",vz(e,n,i.a)),Xb(r,"y",yz(e,n,i.b)),D4(t,r)}function d7n(){return X0(),F(z(B4e,1),je,243,0,[CH,pI,mI,P4e,$4e,L4e,R4e,TH,_7,xx])}function b7n(){return Ic(),F(z(fie,1),je,261,0,[ZJ,Kl,ux,eH,A7,P3,ox,S7,x7,nH])}function JY(){JY=Y,lA=new Oxe,Fce=F(z(ns,1),M3,179,0,[]),Wan=F(z(yf,1),ime,62,0,[])}function q4(){q4=Y,Pte=new Pi("edgelabelcenterednessanalysis.includelabel",($n(),ib))}function qBe(e,n){return ne(re(Js(CO(So(new mn(null,new yn(e.c.b,16)),new Qje(e)),n))))}function e1e(e,n){return ne(re(Js(CO(So(new mn(null,new yn(e.c.b,16)),new Yje(e)),n))))}function Ni(e){return $r(e)?Id(e):g2(e)?v4(e):b2(e)?qOe(e):Tfe(e)?e.Hb():Sfe(e)?jw(e):aae(e)}function UBe(e,n){return Na(),Rf(qa),k.Math.abs(0-n)<=qa||n==0||isNaN(0)&&isNaN(n)?0:e/n}function g7n(e,n){return n8(),e==fp&&n==bm||e==fp&&n==O3||e==gm&&n==O3||e==gm&&n==bm}function w7n(e,n){return n8(),e==fp&&n==gm||e==gm&&n==fp||e==O3&&n==bm||e==bm&&n==O3}function ss(){ss=Y,Ave=new k5,Sve=new a0,xve=new _h,Eve=new uk,Mve=new NA,Cve=new j5}function p7n(e){var n;return n=FR(e),Gj(n.a,0)?(WP(),WP(),bnn):(WP(),new SOe(n.b))}function HY(e){var n;return n=Iae(e),Gj(n.a,0)?(f2(),f2(),lte):(f2(),new $K(n.b))}function GY(e){var n;return n=Iae(e),Gj(n.a,0)?(f2(),f2(),lte):(f2(),new $K(n.c))}function m7n(e){return e.b.c.i.k==(Fn(),wr)?u(C(e.b.c.i,(me(),mi)),12):e.b.c}function XBe(e){return e.b.d.i.k==(Fn(),wr)?u(C(e.b.d.i,(me(),mi)),12):e.b.d}function KBe(e){switch(e.g){case 2:return Ie(),Yn;case 4:return Ie(),nt;default:return e}}function VBe(e){switch(e.g){case 1:return Ie(),bt;case 3:return Ie(),Vn;default:return e}}function v7n(e,n){var t;return t=m0e(e),V0e(new Ee(t.c,t.d),new Ee(t.b,t.a),e.Kf(),n,e.$f())}function y7n(e,n){n.Tg(yQe,1),ode(xgn(new OP((Mj(),new DV(e,!1,!1,new ck))))),n.Ug()}function n1e(){n1e=Y,pon=mh(oTe(qt(qt(new or,(zr(),eo),(Ur(),_J)),no,TJ),Pc),DJ)}function YBe(){YBe=Y,kon=mh(oTe(qt(qt(new or,(zr(),eo),(Ur(),_J)),no,TJ),Pc),DJ)}function QBe(e,n,t){this.g=e,this.d=n,this.e=t,this.a=new Te,fTn(this),En(),Tr(this.a,null)}function Bl(e,n,t,i,r,c,o){Ot.call(this,e,n),this.d=t,this.e=i,this.c=r,this.b=c,this.a=Pf(o)}function t1e(e){this.i=e.gc(),this.i>0&&(this.g=this.$i(this.i+(this.i/8|0)+1),e.Oc(this.g))}function AE(e,n){var t,i;for(Ln(n),i=n.vc().Jc();i.Ob();)t=u(i.Pb(),45),e.yc(t.jd(),t.kd())}function k7n(e,n,t){var i;for(i=t.Jc();i.Ob();)if(!qR(e,n,i.Pb()))return!1;return!0}function ME(e,n,t){var i;for(i=e.b[t&e.f];i;i=i.b)if(t==i.a&&C1(n,i.g))return i;return null}function CE(e,n,t){var i;for(i=e.c[t&e.f];i;i=i.d)if(t==i.f&&C1(n,i.i))return i;return null}function j7n(e,n){var t;for(Nt(n);e.Ob();)if(t=e.Pb(),!u1e(u(t,9)))return!1;return!0}function E7n(e,n,t,i,r){var c;return t&&(c=Ji(n.Ah(),e.c),r=t.Oh(n,-1-(c==-1?i:c),null,r)),r}function S7n(e,n,t,i,r){var c;return t&&(c=Ji(n.Ah(),e.c),r=t.Qh(n,-1-(c==-1?i:c),null,r)),r}function WBe(e){var n;if(e.b==-2){if(e.e==0)n=-1;else for(n=0;e.a[n]==0;n++);e.b=n}return e.b}function x7n(e){var n,t,i;return e.j==(Ie(),Vn)&&(n=Zqe(e),t=cs(n,nt),i=cs(n,Yn),i||i&&t)}function A7n(e){var n,t,i;for(i=0,t=new P(e.b);t.ar&&n.ac&&n.br?t=r:Wn(n,t+1),e.a=of(e.a,0,n)+(""+i)+qfe(e.a,t)}function ZBe(e,n,t,i){X(e.Cb,184)&&(u(e.Cb,184).tb=null),Mo(e,t),n&&ATn(e,n),i&&e.el(!0)}function T7n(e,n){var t,i;for(i=new P(n.b);i.a1||e.Ob())return++e.a,e.g=0,n=e.i,e.Ob(),n;throw R(new hu)}function $7n(e,n){var t,i;for(i=new P(n);i.a>22),r=e.h+n.h+(i>>22),_o(t&Ls,i&Ls,r&G1)}function Aze(e,n){var t,i,r;return t=e.l-n.l,i=e.m-n.m+(t>>22),r=e.h-n.h+(i>>22),_o(t&Ls,i&Ls,r&G1)}function QY(e){var n,t,i,r;for(r=new Te,i=e.Jc();i.Ob();)t=u(i.Pb(),26),n=W2(t),Sr(r,n);return r}function tkn(e){var n;Bd(e,!0),n=zd,wi(e,(Oe(),N7))&&(n+=u(C(e,N7),15).a),he(e,N7,ve(n))}function Mze(e,n,t){var i;Hu(e.a),Ao(t.i,new YEe(e)),i=new P$(u(zn(e.a,n.b),68)),SJe(e,i,n),t.f=i}function l1e(e){var n,t;return t=(j0(),n=new yo,n),e&&Et((!e.a&&(e.a=new we($i,e,6,6)),e.a),t),t}function U4(e,n){var t,i;if(i=0,e<64&&e<=n)for(n=n<64?n:63,t=e;t<=n;t++)i=bh(i,qh(1,t));return i}function ikn(e,n){var t,i;for(NR(n,"predicate"),i=0;e.Ob();i++)if(t=e.Pb(),n.Lb(t))return i;return-1}function f1e(e,n){if(n===0){!e.o&&(e.o=new os((Gu(),h1),Zd,e,0)),e.o.c.$b();return}pW(e,n)}function Cze(e){switch(e.g){case 1:return gb;case 2:return l1;case 3:return FI;default:return JI}}function a1e(e){En();var n,t,i;for(i=0,t=e.Jc();t.Ob();)n=t.Pb(),i=i+(n!=null?Ni(n):0),i=i|0;return i}function rkn(e){var n;return n=new xn,n.a=e,n.b=fkn(e),n.c=le(He,Ae,2,2,6,1),n.c[0]=HBe(e),n.c[1]=HBe(e),n}function $B(){$B=Y,$te=new h$(va,0),JJ=new h$(EQe,1),HJ=new h$(SQe,2),eI=new h$("BOTH",3)}function n8(){n8=Y,fp=new f$("Q1",0),gm=new f$("Q4",1),bm=new f$("Q2",2),O3=new f$("Q3",3)}function $0(){$0=Y,cI=new ZX("ONLY_WITHIN_GROUP",0),B3e=new ZX(eee,1),ym=new ZX("ENFORCED",2)}function tg(){tg=Y,iie=new QX(va,0),E7=new QX("INCOMING_ONLY",1),L3=new QX("OUTGOING_ONLY",2)}function X4(){X4=Y,ofn=new BM,ufn=new Z_}function WY(){WY=Y,rte={boolean:ygn,number:Ibn,string:Dbn,object:lqe,function:lqe,undefined:abn}}function Tze(){Tze=Y,qun=Dt((X0(),F(z(B4e,1),je,243,0,[CH,pI,mI,P4e,$4e,L4e,R4e,TH,_7,xx])))}function Oze(){Oze=Y,Uin=Dt((Ic(),F(z(fie,1),je,261,0,[ZJ,Kl,ux,eH,A7,P3,ox,S7,x7,nH])))}function ckn(e,n,t,i){return new rse(F(z(yg,1),tF,45,0,[(qQ(e,n),new pw(e,n)),(qQ(t,i),new pw(t,i))]))}function ukn(e,n){var t,i;return t=u(u(zn(e.g,n.a),49).a,68),i=u(u(zn(e.g,n.b),49).a,68),vKe(t,i)}function h1e(e,n,t){var i;if(i=e.gc(),n>i)throw R(new k2(n,i));return e.Qi()&&(t=F_e(e,t)),e.Ci(n,t)}function Nze(e){var n,t,i;return t=e.n,i=e.o,n=e.d,new _f(t.a-n.b,t.b-n.d,i.a+(n.b+n.c),i.b+(n.d+n.a))}function okn(e,n){return!e||!n||e==n?!1:zw(e.b.c,n.b.c+n.b.b)<0&&zw(n.b.c,e.b.c+e.b.b)<0}function ZY(e,n,t){return e>=128?!1:e<64?qj(Rr(qh(1,e),t),0):qj(Rr(qh(1,e-64),n),0)}function EO(e,n,t){switch(t.g){case 2:e.b=n;break;case 1:e.c=n;break;case 4:e.d=n;break;case 3:e.a=n}}function SO(e,n,t){return t==null?(!e.q&&(e.q=new wt),z4(e.q,n)):(!e.q&&(e.q=new wt),ei(e.q,n,t)),e}function he(e,n,t){return t==null?(!e.q&&(e.q=new wt),z4(e.q,n)):(!e.q&&(e.q=new wt),ei(e.q,n,t)),e}function Ize(e){var n,t;return t=new WR,Pu(t,e),he(t,(L0(),My),e),n=new wt,nLn(e,t,n),I$n(e,t,n),t}function skn(e){M8();var n,t,i;for(t=le(Lr,Ae,8,2,0,1),i=0,n=0;n<2;n++)i+=.5,t[n]=FSn(i,e);return t}function Dze(e,n){var t,i,r,c;for(t=!1,i=e.a[n].length,c=0;ce.f,t=e.u+e.e[e.o.p]*e.d>e.f*e.s*e.d,n||t}function d1e(e){var n;return(!e.c||(e.Bb&1)==0&&(e.c.Db&64)!=0)&&(n=ff(e),X(n,88)&&(e.c=u(n,29))),e.c}function b1e(e){var n;if(e<0)return Xr;if(e==0)return 0;for(n=gS;(n&e)==0;n>>=1);return n}function fkn(e){var n;return e==0?"Etc/GMT":(e<0?(e=-e,n="Etc/GMT-"):n="Etc/GMT+",n+ERe(e))}function Lze(e){var n,t;return t=KO(e.h),t==32?(n=KO(e.m),n==32?KO(e.l)+32:n+20-10):t-12}function eQ(e){var n,t,i;n=~e.l+1&Ls,t=~e.m+(n==0?1:0)&Ls,i=~e.h+(n==0&&t==0?1:0)&G1,e.l=n,e.m=t,e.h=i}function OE(e){var n;return n=e.a[e.b],n==null?null:(ir(e.a,e.b,null),e.b=e.b+1&e.a.length-1,n)}function g1e(){this.o=null,this.k=null,this.j=null,this.d=null,this.b=null,this.n=null,this.a=null}function w1e(e,n){this.c=e,this.d=n,this.b=this.d/this.c.c.Pd().gc()|0,this.a=this.d%this.c.c.Pd().gc()}function Pze(e,n){this.b=e,Pv.call(this,(u(K(ge((C0(),Bn).o),10),19),n.i),n.g),this.a=(JY(),Fce)}function p1e(e,n,t){this.q=new k.Date,this.q.setFullYear(e+Q0,n,t),this.q.setHours(0,0,0,0),sS(this,0)}function $ze(e,n,t){var i,r;return i=new pY(n,t),r=new si,e.b=tXe(e,e.b,i,r),r.b||++e.c,e.b.b=!1,r.d}function m1e(e,n){En();var t,i,r,c,o;for(o=!1,i=n,r=0,c=i.length;ro||i+r>c)throw R(new soe)}function Rze(e,n,t){var i,r,c,o;for(o=PE(n,t),c=0,r=o.Jc();r.Ob();)i=u(r.Pb(),12),ei(e.c,i,ve(c++))}function R0(e){var n,t;for(t=new P(e.a.b);t.a=0,"Negative initial capacity"),LT(n>=0,"Non-positive load factor"),Hu(this)}function Hze(e,n){var t;for(t=0;t1||n>=0&&e.b<3)}function vkn(){ai();var e;return Xce||(e=wpn(K0("M",!0)),e=dR(K0("M",!1),e),Xce=e,Xce)}function Uze(e){if(e.g===0)return new R6;throw R(new Un(BF+(e.f!=null?e.f:""+e.g)))}function Xze(e){if(e.g===0)return new W_;throw R(new Un(BF+(e.f!=null?e.f:""+e.g)))}function E1e(e,n,t){if(n===0){!e.o&&(e.o=new os((Gu(),h1),Zd,e,0)),NB(e.o,t);return}yW(e,n,t)}function tQ(e,n,t){this.g=e,this.e=new Vr,this.f=new Vr,this.d=new xi,this.b=new xi,this.a=n,this.c=t}function iQ(e,n,t,i){this.b=new Te,this.n=new Te,this.i=i,this.j=t,this.s=e,this.t=n,this.r=0,this.d=0}function Kze(e,n,t,i){this.b=new wt,this.g=new wt,this.d=(_E(),AH),this.c=e,this.e=n,this.d=t,this.a=i}function r8(e,n){if(!e.Ji()&&n==null)throw R(new Un("The 'no null' constraint is violated"));return n}function S1e(e){switch(e.g){case 1:return qQe;default:case 2:return 0;case 3:return UQe;case 4:return zpe}}function ykn(e){return Ce(e.c,(X4(),ofn)),Ahe(e.a,ne(re(_e((SQ(),SH)))))?new QM:new tSe(e)}function kkn(e){for(;!e.d||!e.d.Ob();)if(e.b&&!jj(e.b))e.d=u(N4(e.b),50);else return null;return e.d}function Id(e){var n,t;for(n=0,t=0;ti?1:0}function Vze(e,n){var t,i,r;for(r=e.b;r;){if(t=e.a.Le(n,r.d),t==0)return r;i=t<0?0:1,r=r.a[i]}return null}function rQ(e,n){var t;return n===e?!0:X(n,229)?(t=u(n,229),gi(e.Zb(),t.Zb())):!1}function x1e(e,n){return zUe(e,n)?(gn(e.b,u(C(n,(me(),K1)),22),n),Vt(e.a,n),!0):!1}function Skn(e,n){return wi(e,(me(),Oi))&&wi(n,Oi)?u(C(n,Oi),15).a-u(C(e,Oi),15).a:0}function xkn(e,n){return wi(e,(me(),Oi))&&wi(n,Oi)?u(C(e,Oi),15).a-u(C(n,Oi),15).a:0}function Yze(e){return Va?le(pnn,IYe,567,0,0,1):u(Ba(e.a,le(pnn,IYe,567,e.a.c.length,0,1)),840)}function Us(e){return $r(e)?He:g2(e)?gr:b2(e)?Qi:Tfe(e)||Sfe(e)?e.Pm:e.Pm||Array.isArray(e)&&z(Ven,1)||Ven}function i3(e,n,t){var i,r;return r=(i=new yX,i),Fc(r,n,t),Et((!e.q&&(e.q=new we(yf,e,11,10)),e.q),r),r}function cQ(e){var n,t,i,r;for(r=Pgn(Can,e),t=r.length,i=le(He,Ae,2,t,6,1),n=0;n=e.b.c.length||(A1e(e,2*n+1),t=2*n+2,t0&&(n.Ad(t),t.i&&ZEn(t))}function M1e(e,n,t){var i;for(i=t-1;i>=0&&e[i]===n[i];i--);return i<0?0:HX(Rr(e[i],Dc),Rr(n[i],Dc))?-1:1}function Mkn(e,n){var t;return!e||e==n||!wi(n,(me(),bp))?!1:(t=u(C(n,(me(),bp)),9),t!=e)}function uQ(e){switch(e.i){case 2:return!0;case 1:return!1;case-1:++e.c;default:return e.Yl()}}function Qze(e,n,t){return e.d[n.p][t.p]||(kSn(e,n,t),e.d[n.p][t.p]=!0,e.d[t.p][n.p]=!0),e.a[n.p][t.p]}function Wze(e,n,t){var i,r;this.g=e,this.c=n,this.a=this,this.d=this,r=IBe(t),i=le(Xen,gN,227,r,0,1),this.b=i}function Ckn(e,n){var t,i;for(i=e.Zb().Bc().Jc();i.Ob();)if(t=u(i.Pb(),18),t.Gc(n))return!0;return!1}function Zze(e,n,t){var i,r,c,o;for(Ln(t),o=!1,c=e.dd(n),r=t.Jc();r.Ob();)i=r.Pb(),c.Rb(i),o=!0;return o}function oQ(e,n){var t,i;return i=u(Kn(e.a,4),129),t=le(Bce,_ne,415,n,0,1),i!=null&&Wu(i,0,t,0,i.length),t}function eFe(e,n){var t;return t=new DW((e.f&256)!=0,e.i,e.a,e.d,(e.f&16)!=0,e.j,e.g,n),e.e!=null||(t.c=e),t}function Tkn(e,n){var t;return e===n?!0:X(n,92)?(t=u(n,92),T0e(Fb(e),t.vc())):!1}function nFe(e,n,t){var i,r;for(r=t.Jc();r.Ob();)if(i=u(r.Pb(),45),e.ze(n,i.kd()))return!0;return!1}function RB(){RB=Y,Dce=new M$("ELK",0),I8e=new M$("JSON",1),N8e=new M$("DOT",2),D8e=new M$("SVG",3)}function NE(){NE=Y,xre=new v$(eee,0),zH=new v$(VQe,1),Sre=new v$("FAN",2),Ere=new v$("CONSTRAINT",3)}function IE(){IE=Y,bye=new lK(va,0),dre=new lK("MIDDLE_TO_MIDDLE",1),jI=new lK("AVOID_OVERLAP",2)}function xO(){xO=Y,JH=new fK(va,0),Fye=new fK("RADIAL_COMPACTION",1),Jye=new fK("WEDGE_COMPACTION",2)}function DE(){DE=Y,ore=new rK("STACKED",0),ure=new rK("REVERSE_STACKED",1),vI=new rK("SEQUENCED",2)}function zl(){zl=Y,Kme=new GX("CONCURRENT",0),Yo=new GX("IDENTITY_FINISH",1),Vme=new GX("UNORDERED",2)}function B1(){B1=Y,lG=new mK(L2e,0),Wd=new mK("INCLUDE_CHILDREN",1),Wx=new mK("SEPARATE_CHILDREN",2)}function BB(){BB=Y,d8e=new yw(15),Qfn=new Yr((Xt(),s1),d8e),Qx=Uy,l8e=jfn,f8e=Ig,h8e=n5,a8e=$m}function sQ(){sQ=Y,Mte=__e(F(z(Yx,1),je,86,0,[(vr(),Zc),ru])),Cte=__e(F(z(Yx,1),je,86,0,[Vl,eh]))}function Okn(e){var n,t,i;for(n=0,i=le(Lr,Ae,8,e.b,0,1),t=St(e,0);t.b!=t.d.c;)i[n++]=u(jt(t),8);return i}function lQ(e,n,t){var i,r,c;for(i=new xi,c=St(t,0);c.b!=c.d.c;)r=u(jt(c),8),Vt(i,new wc(r));Zze(e,n,i)}function Nkn(e,n){var t;t=_e((SQ(),SH))!=null&&n.Rg()!=null?ne(re(n.Rg()))/ne(re(_e(SH))):1,ei(e.b,n,t)}function Ikn(e,n){var t,i;return t=u(e.d.Ac(n),18),t?(i=e.e.hc(),i.Fc(t),e.e.d-=t.gc(),t.$b(),i):null}function C1e(e,n){var t,i;if(i=e.c[n],i!=0)for(e.c[n]=0,e.d-=i,t=n+1;t0)return N9(n-1,e.a.c.length),Cd(e.a,n-1);throw R(new exe)}function Dkn(e,n,t){if(n<0)throw R(new jo(bWe+n));nn)throw R(new Un(oF+e+DYe+n));if(e<0||n>t)throw R(new Doe(oF+e+Yge+n+Xge+t))}function iFe(e){if(!e.a||(e.a.i&8)==0)throw R(new Uc("Enumeration class expected for layout option "+e.f))}function rFe(e){B_e.call(this,"The given string does not match the expected format for individual spacings.",e)}function cFe(e){switch(e.i){case-2:return!0;case-1:return!1;case 1:--e.c;default:return e.Zl()}}function Dd(e){switch(e.c){case 0:return cV(),mme;case 1:return new r4(pqe(new d4(e)));default:return new Xxe(e)}}function uFe(e){switch(e.gc()){case 0:return cV(),mme;case 1:return new r4(e.Jc().Pb());default:return new cse(e)}}function O1e(e){var n;return n=(!e.a&&(e.a=new we(ed,e,9,5)),e.a),n.i!=0?_gn(u(K(n,0),684)):null}function _kn(e,n){var t;return t=mc(e,n),HX(QV(e,n),0)|N$(QV(e,t),0)?t:mc(bN,QV(Hb(t,63),1))}function N1e(e,n,t){var i,r;return N2(n,e.c.length),i=t.Nc(),r=i.length,r==0?!1:(sfe(e.c,n,i),!0)}function Lkn(e,n){var t,i;for(t=e.a.length-1;n!=e.b;)i=n-1&t,ir(e.a,n,e.a[i]),n=i;ir(e.a,e.b,null),e.b=e.b+1&t}function Pkn(e,n){var t,i;for(t=e.a.length-1,e.c=e.c-1&t;n!=e.c;)i=n+1&t,ir(e.a,n,e.a[i]),n=i;ir(e.a,e.c,null)}function c8(e,n){e.D==null&&e.B!=null&&(e.D=e.B,e.B=null),LY(e,n==null?null:(Ln(n),n)),e.C&&e.fl(null)}function r3(e){return(e.c!=e.b.b||e.i!=e.g.b)&&(r2(e.a.c,0),Sr(e.a,e.b),Sr(e.a,e.g),e.c=e.b.b,e.i=e.g.b),e.a}function F2(e){var n;++e.j,e.i==0?e.g=null:e.ir&&(WHe(n.q,r),i=t!=n.q.d)),i}function gFe(e,n){var t,i,r,c,o,l,f,h;return f=n.i,h=n.j,i=e.f,r=i.i,c=i.j,o=f-r,l=h-c,t=k.Math.sqrt(o*o+l*l),t}function _1e(e,n){var t,i;return i=iz(e),i||(t=(eZ(),wUe(n)),i=new GSe(t),Et(i.Cl(),e)),i}function AO(e,n){var t,i;return t=u(e.c.Ac(n),18),t?(i=e.hc(),i.Fc(t),e.d-=t.gc(),t.$b(),e.mc(i)):e.jc()}function Jkn(e){var n;if(!(e.c.c<0?e.a>=e.c.b:e.a<=e.c.b))throw R(new hu);return n=e.a,e.a+=e.c.c,++e.b,ve(n)}function Hkn(e){var n,t;if(e==null)return!1;for(n=0,t=e.length;n=i||n=0?n:-n;i>0;)i%2==0?(t*=t,i=i/2|0):(r*=t,i-=1);return n<0?1/r:r}function Qkn(e,n){var t,i,r;for(r=1,t=e,i=n>=0?n:-n;i>0;)i%2==0?(t*=t,i=i/2|0):(r*=t,i-=1);return n<0?1/r:r}function z0(e,n){var t,i,r,c;return c=(r=e?iz(e):null,sqe((i=n,r&&r.El(),i))),c==n&&(t=iz(e),t&&t.El()),c}function P1e(e,n,t){var i,r;return r=e.a,e.a=n,(e.Db&4)!=0&&(e.Db&1)==0&&(i=new Dr(e,1,1,r,n),t?t.lj(i):t=i),t}function mFe(e,n,t){var i,r;return r=e.b,e.b=n,(e.Db&4)!=0&&(e.Db&1)==0&&(i=new Dr(e,1,3,r,n),t?t.lj(i):t=i),t}function vFe(e,n,t){var i,r;return r=e.f,e.f=n,(e.Db&4)!=0&&(e.Db&1)==0&&(i=new Dr(e,1,0,r,n),t?t.lj(i):t=i),t}function yFe(e){var n,t;if(e!=null)for(t=0;t-129&&e<128?(vIe(),n=e+128,t=Dme[n],!t&&(t=Dme[n]=new Pn(e)),t):new Pn(e)}function ve(e){var n,t;return e>-129&&e<128?(hIe(),n=e+128,t=Tme[n],!t&&(t=Tme[n]=new co(e)),t):new co(e)}function ijn(e,n,t,i,r){n==0||i==0||(n==1?r[i]=Cde(r,t,i,e[0]):i==1?r[n]=Cde(r,e,n,t[0]):UTn(e,t,r,n,i))}function xFe(e,n){var t;e.c.length!=0&&(t=u(Ba(e,le(u1,Fd,9,e.c.length,0,1)),199),Bse(t,new Ph),Nqe(t,n))}function AFe(e,n){var t;e.c.length!=0&&(t=u(Ba(e,le(u1,Fd,9,e.c.length,0,1)),199),Bse(t,new lv),Nqe(t,n))}function MFe(e,n){var t;e.a.c.length>0&&(t=u(Le(e.a,e.a.c.length-1),565),x1e(t,n))||Ce(e.a,new BPe(n))}function rjn(e){il();var n,t;n=e.d.c-e.e.c,t=u(e.g,156),Ao(t.b,new Pje(n)),Ao(t.c,new $je(n)),cc(t.i,new Rje(n))}function CFe(e){var n;return n=new y0,n.a+="VerticalSegment ",uo(n,e.e),n.a+=" ",Kt(n,nle(new IX,new P(e.k))),n.a}function cjn(e,n){var t;e.c=n,e.a=iEn(n),e.a<54&&(e.f=(t=n.d>1?$Le(n.a[0],n.a[1]):$Le(n.a[0],0),Qb(n.e>0?t:Od(t))))}function dQ(e,n){var t,i,r;for(t=0,r=vu(e,n).Jc();r.Ob();)i=u(r.Pb(),12),t+=C(i,(me(),vs))!=null?1:0;return t}function c3(e,n,t){var i,r,c;for(i=0,c=St(e,0);c.b!=c.d.c&&(r=ne(re(jt(c))),!(r>t));)r>=n&&++i;return i}function ujn(e){var n;return n=u($a(e.c.c,""),233),n||(n=new P4(b9(d9(new d0,""),"Other")),ug(e.c.c,"",n)),n}function LE(e){var n;return(e.Db&64)!=0?Ff(e):(n=new cf(Ff(e)),n.a+=" (name: ",Bc(n,e.zb),n.a+=")",n.a)}function B1e(e,n,t){var i,r;return r=e.sb,e.sb=n,(e.Db&4)!=0&&(e.Db&1)==0&&(i=new Dr(e,1,4,r,n),t?t.lj(i):t=i),t}function MO(e,n,t){var i;e.Zi(e.i+1),i=e.Xi(n,t),n!=e.i&&Wu(e.g,n,e.g,n+1,e.i-n),ir(e.g,n,i),++e.i,e.Ki(n,t),e.Li()}function z1e(e,n,t){var i,r;return r=e.r,e.r=n,(e.Db&4)!=0&&(e.Db&1)==0&&(i=new Dr(e,1,8,r,e.r),t?t.lj(i):t=i),t}function ojn(e,n,t){var i,r;return i=new L1(e.e,3,13,null,(r=n.c,r||(jn(),rh)),$d(e,n),!1),t?t.lj(i):t=i,t}function sjn(e,n,t){var i,r;return i=new L1(e.e,4,13,(r=n.c,r||(jn(),rh)),null,$d(e,n),!1),t?t.lj(i):t=i,t}function ljn(e,n){var t,i,r,c;if(n.cj(e.a),c=u(Kn(e.a,8),1997),c!=null)for(t=c,i=0,r=t.length;i>1&1431655765,e=(e>>2&858993459)+(e&858993459),e=(e>>4)+e&252645135,e+=e>>8,e+=e>>16,e&63}function fjn(e){return e?(e.i&1)!=0?e==ts?Qi:e==$t?jr:e==Ym?b7:e==Jr?gr:e==Ap?sp:e==o5?lp:e==ds?jy:KS:e:null}function gi(e,n){return $r(e)?bn(e,n):g2(e)?yNe(e,n):b2(e)?(Ln(e),ue(e)===ue(n)):Tfe(e)?e.Fb(n):Sfe(e)?gTe(e,n):Mae(e,n)}function OFe(e){var n;return ao(e,0)<0&&(e=P0(T3n(su(e)?sf(e):e))),n=Rt(Hb(e,32)),64-(n!=0?KO(n):KO(Rt(e))+32)}function CO(e,n){var t;return t=new Oa,e.a.zd(t)?(j9(),new xX(Ln(dRe(e,t.a,n)))):(T0(e),j9(),j9(),Gme)}function PE(e,n){switch(n.g){case 2:case 1:return vu(e,n);case 3:case 4:return Ks(vu(e,n))}return En(),En(),Sc}function ajn(e,n){var t;return n.a&&(t=n.a.a.length,e.a?Kt(e.a,e.b):e.a=new tl(e.d),FLe(e.a,n.a,n.d.length,t)),e}function hjn(e){nF();var n,t,i,r;for(t=DQ(),i=0,r=t.length;it)throw R(new jo(oF+e+Yge+n+", size: "+t));if(e>n)throw R(new Un(oF+e+DYe+n))}function Fl(e,n,t){if(n<0)q0e(e,t);else{if(!t.pk())throw R(new Un(nb+t.ve()+LS));u(t,69).uk().Ck(e,e.ei(),n)}}function bQ(e,n,t){return k.Math.abs(n-e)DF?e-t>DF:t-e>DF}function J1e(e,n,t,i){switch(n){case 1:return!e.n&&(e.n=new we(Eu,e,1,7)),e.n;case 2:return e.k}return $de(e,n,t,i)}function IFe(e){var n;return(e.Db&64)!=0?Ff(e):(n=new cf(Ff(e)),n.a+=" (source: ",Bc(n,e.d),n.a+=")",n.a)}function Ld(e,n){var t;t=(e.Bb&256)!=0,n?e.Bb|=256:e.Bb&=-257,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Lf(e,1,2,t,n))}function H1e(e,n){var t;t=(e.Bb&256)!=0,n?e.Bb|=256:e.Bb&=-257,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Lf(e,1,8,t,n))}function G1e(e,n){var t;t=(e.Bb&512)!=0,n?e.Bb|=512:e.Bb&=-513,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Lf(e,1,9,t,n))}function Pd(e,n){var t;t=(e.Bb&512)!=0,n?e.Bb|=512:e.Bb&=-513,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Lf(e,1,3,t,n))}function HB(e,n){var t;t=(e.Bb&256)!=0,n?e.Bb|=256:e.Bb&=-257,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Lf(e,1,8,t,n))}function djn(e,n,t){var i,r;return r=e.a,e.a=n,(e.Db&4)!=0&&(e.Db&1)==0&&(i=new Dr(e,1,5,r,e.a),t?s0e(t,i):t=i),t}function $E(e,n){var t;return e.b==-1&&e.a&&(t=e.a.nk(),e.b=t?e.c.Eh(e.a.Jj(),t):Ji(e.c.Ah(),e.a)),e.c.vh(e.b,n)}function DFe(e,n){var t,i;for(i=new st(e);i.e!=i.i.gc();)if(t=u(ft(i),29),ue(n)===ue(t))return!0;return!1}function _Fe(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e>=48&&e<=57?e-48:0}function q1e(e){var n,t;return n=e.k,n==(Fn(),wr)?(t=u(C(e,(me(),Iu)),64),t==(Ie(),Vn)||t==bt):!1}function LFe(e){var n;return n=Iae(e),Gj(n.a,0)?(f2(),f2(),lte):(f2(),new $K(JX(n.a,0)?ehe(n)/Qb(n.a):0))}function bjn(e,n){var t;if(t=ZO(e,n),X(t,335))return u(t,38);throw R(new Un(nb+n+"' is not a valid attribute"))}function RE(e,n,t){var i;if(i=e.gc(),n>i)throw R(new k2(n,i));if(e.Qi()&&e.Gc(t))throw R(new Un(BN));e.Ei(n,t)}function PFe(e,n){var t,i;for(i=new st(e);i.e!=i.i.gc();)if(t=u(ft(i),143),ue(n)===ue(t))return!0;return!1}function gjn(e,n,t){var i,r,c;return c=(r=x8(e.b,n),r),c&&(i=u(Yz(lO(e,c),""),29),i)?gbe(e,i,n,t):null}function gQ(e,n,t){var i,r,c;return c=(r=x8(e.b,n),r),c&&(i=u(Yz(lO(e,c),""),29),i)?wbe(e,i,n,t):null}function wjn(e){var n,t,i;for(i=0,t=e.length,n=0;n=0?J0(e):lE(J0(Od(e))))}function $Fe(e,n,t,i,r,c){this.e=new Te,this.f=(Nc(),Ax),Ce(this.e,e),this.d=n,this.a=t,this.b=i,this.f=r,this.c=c}function ji(e,n){return en?1:e==n?e==0?ji(1/e,1/n):0:isNaN(e)?isNaN(n)?0:1:-1}function pjn(e){var n;return n=e.a[e.c-1&e.a.length-1],n==null?null:(e.c=e.c-1&e.a.length-1,ir(e.a,e.c,null),n)}function RFe(e){var n,t;for(t=e.p.a.ec().Jc();t.Ob();)if(n=u(t.Pb(),217),n.f&&e.b[n.c]<-1e-10)return n;return null}function mjn(e){var n,t,i;for(n=new Te,i=new P(e.b);i.a=1?ru:eh):t}function Sjn(e){var n,t;for(t=pUe(ol(e)).Jc();t.Ob();)if(n=Pt(t.Pb()),oS(e,n))return P6n((DMe(),zan),n);return null}function xjn(e,n,t){var i,r;for(r=e.a.ec().Jc();r.Ob();)if(i=u(r.Pb(),9),jO(t,u(Le(n,i.p),18)))return i;return null}function Ajn(e,n,t){var i,r;for(r=X(n,103)&&(u(n,19).Bb&Ec)!=0?new SK(n,e):new W9(n,e),i=0;i>10)+vN&yr,n[1]=(e&1023)+56320&yr,ph(n,0,n.length)}function Y1e(e,n){var t;t=(e.Bb&Ec)!=0,n?e.Bb|=Ec:e.Bb&=-65537,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Lf(e,1,20,t,n))}function d8(e,n){var t;t=(e.Bb&jh)!=0,n?e.Bb|=jh:e.Bb&=-16385,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Lf(e,1,16,t,n))}function mQ(e,n){var t;t=(e.Bb&Ru)!=0,n?e.Bb|=Ru:e.Bb&=-32769,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Lf(e,1,18,t,n))}function Q1e(e,n){var t;t=(e.Bb&Ru)!=0,n?e.Bb|=Ru:e.Bb&=-32769,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Lf(e,1,18,t,n))}function vu(e,n){var t;return e.i||G0e(e),t=u(zc(e.g,n),49),t?new N0(e.j,u(t.a,15).a,u(t.b,15).a):(En(),En(),Sc)}function Tjn(e,n,t){var i,r;return i=u(n.mf(e.a),35),r=u(t.mf(e.a),35),i!=null&&r!=null?gO(i,r):i!=null?-1:r!=null?1:0}function W1e(e,n,t){var i,r;return i=(j0(),r=new Jk,r),wB(i,n),pB(i,t),e&&Et((!e.a&&(e.a=new mr(yl,e,5)),e.a),i),i}function Z1e(e,n,t){var i;return i=0,n&&(Rv(e.a)?i+=n.f.a/2:i+=n.f.b/2),t&&(Rv(e.a)?i+=t.f.a/2:i+=t.f.b/2),i}function Bw(e,n,t){var i;return i=e.a.get(n),e.a.set(n,t===void 0?null:t),i===void 0?(++e.c,++e.b.g):++e.d,i}function vQ(e){var n;return(e.Db&64)!=0?Ff(e):(n=new cf(Ff(e)),n.a+=" (identifier: ",Bc(n,e.k),n.a+=")",n.a)}function XB(e){var n;switch(e.gc()){case 0:return oR(),ete;case 1:return new GK(Nt(e.Xb(0)));default:return n=e,new WV(n)}}function Ojn(e){switch(u(C(e,(Oe(),Y1)),222).g){case 1:return new dd;case 3:return new D5;default:return new Bp}}function Njn(e){var n;return n=K2(e),n>34028234663852886e22?Vi:n<-34028234663852886e22?Ir:n}function mc(e,n){var t;return su(e)&&su(n)&&(t=e+n,mNn){ILe(t);break}}jR(t,n)}function nn(e,n){var t,i,r,c,o;if(t=n.f,ug(e.c.d,t,n),n.g!=null)for(r=n.g,c=0,o=r.length;cn&&i.Le(e[c-1],e[c])>0;--c)o=e[c],ir(e,c,e[c-1]),ir(e,c-1,o)}function Jl(e,n,t,i){if(n<0)ybe(e,t,i);else{if(!t.pk())throw R(new Un(nb+t.ve()+LS));u(t,69).uk().Ak(e,e.ei(),n,i)}}function Fjn(e,n){var t;if(t=ZO(e.Ah(),n),X(t,103))return u(t,19);throw R(new Un(nb+n+"' is not a valid reference"))}function KB(e,n){if(n==e.d)return e.e;if(n==e.e)return e.d;throw R(new Un("Node "+n+" not part of edge "+e))}function nde(e,n,t,i){switch(n){case 3:return e.f;case 4:return e.g;case 5:return e.i;case 6:return e.j}return J1e(e,n,t,i)}function Jjn(e){return e.k!=(Fn(),Wi)?!1:Vv(new mn(null,new A2(new Xn(Qn(Ii(e).a.Jc(),new ee)))),new nM)}function Xs(){Xs=Y,fI=new fT(va,0),ax=new fT("FIRST",1),V1=new fT(EQe,2),hx=new fT("LAST",3),Sg=new fT(SQe,4)}function zE(){zE=Y,rx=new b$("LAYER_SWEEP",0),w3e=new b$("MEDIAN_LAYER_SWEEP",1),tI=new b$(cee,2),p3e=new b$(va,3)}function VB(){VB=Y,f6e=new dK("ASPECT_RATIO_DRIVEN",0),qre=new dK("MAX_SCALE_DRIVEN",1),l6e=new dK("AREA_DRIVEN",2)}function YB(){YB=Y,Ice=new A$(Rpe,0),M8e=new A$("GROUP_DEC",1),T8e=new A$("GROUP_MIXED",2),C8e=new A$("GROUP_INC",3)}function Hjn(e,n){return bn(n.b&&n.c?Yb(n.b)+"->"+Yb(n.c):"e_"+Ni(n),e.b&&e.c?Yb(e.b)+"->"+Yb(e.c):"e_"+Ni(e))}function Gjn(e,n){return bn(n.b&&n.c?Yb(n.b)+"->"+Yb(n.c):"e_"+Ni(n),e.b&&e.c?Yb(e.b)+"->"+Yb(e.c):"e_"+Ni(e))}function zw(e,n){return Na(),Rf(Y0),k.Math.abs(e-n)<=Y0||e==n||isNaN(e)&&isNaN(n)?0:en?1:Bb(isNaN(e),isNaN(n))}function tde(e){SQ(),this.c=Pf(F(z(VBn,1),Nn,829,0,[Bun])),this.b=new wt,this.a=e,ei(this.b,SH,1),Ao(zun,new nSe(this))}function FE(e){var n;this.a=(n=u(e.e&&e.e(),10),new _l(n,u(Df(n,n.length),10),0)),this.b=le(Mr,Nn,1,this.a.a.length,5,1)}function fu(e){var n;return Array.isArray(e)&&e.Rm===wn?Pb(Us(e))+"@"+(n=Ni(e)>>>0,n.toString(16)):e.toString()}function qjn(e){var n;return e==null?!0:(n=e.length,n>0&&(Wn(n-1,e.length),e.charCodeAt(n-1)==58)&&!jQ(e,oA,sA))}function jQ(e,n,t){var i,r;for(i=0,r=e.length;i=r)return n.c+t;return n.c+n.b.gc()}function XFe(e,n){A9();var t,i,r,c;for(i=B$e(e),r=n,G9(i,0,i.length,r),t=0;t0&&(i+=r,++t);return t>1&&(i+=e.d*(t-1)),i}function rde(e){var n,t,i;for(i=new vd,i.a+="[",n=0,t=e.gc();n=0;--i)for(n=t[i],r=0;r>5,n=e&31,i=le($t,ni,30,t+1,15,1),i[t]=1<0&&(n.lengthe.i&&ir(n,e.i,null),n}function QB(e){var n;return(e.Db&64)!=0?LE(e):(n=new cf(LE(e)),n.a+=" (instanceClassName: ",Bc(n,e.D),n.a+=")",n.a)}function WB(e){var n,t,i,r;for(r=0,t=0,i=e.length;t0?(e.Zj(),i=n==null?0:Ni(n),r=(i&oi)%e.d.length,t=EUe(e,r,i,n),t!=-1):!1}function Co(e,n,t){var i,r,c;return e.Nj()?(i=e.i,c=e.Oj(),MO(e,i,n),r=e.Gj(3,null,n,i,c),t?t.lj(r):t=r):MO(e,e.i,n),t}function pa(e,n){var t,i,r;return e.f>0&&(e.Zj(),i=n==null?0:Ni(n),r=(i&oi)%e.d.length,t=W0e(e,r,i,n),t)?t.kd():null}function dEn(e,n,t){var i,r;return i=new L1(e.e,3,10,null,(r=n.c,X(r,88)?u(r,29):(jn(),jf)),$d(e,n),!1),t?t.lj(i):t=i,t}function bEn(e,n,t){var i,r;return i=new L1(e.e,4,10,(r=n.c,X(r,88)?u(r,29):(jn(),jf)),null,$d(e,n),!1),t?t.lj(i):t=i,t}function rJe(e,n){var t,i,r;return X(n,45)?(t=u(n,45),i=t.jd(),r=J2(e.Pc(),i),C1(r,t.kd())&&(r!=null||e.Pc()._b(i))):!1}function dde(e,n){switch(n){case 3:Lw(e,0);return;case 4:Pw(e,0);return;case 5:Os(e,0);return;case 6:Ns(e,0);return}R1e(e,n)}function Fw(e,n){switch(n.g){case 1:return M4(e.j,(ss(),Sve));case 2:return M4(e.j,(ss(),Ave));default:return En(),En(),Sc}}function J0(e){yh();var n,t;return t=Rt(e),n=Rt(Hb(e,32)),n!=0?new dLe(t,n):t>10||t<0?new I1(1,t):unn[t]}function cJe(e){U2();var n;return(e.q?e.q:(En(),En(),r1))._b((Oe(),mp))?n=u(C(e,mp),203):n=u(C(_r(e),yx),203),n}function gEn(e,n,t,i){var r,c;if(c=t-n,c<3)for(;c<3;)e*=10,++c;else{for(r=1;c>3;)r*=10,--c;e=(e+(r>>1))/r|0}return i.i=e,!0}function uJe(e,n,t){aBe(),wxe.call(this),this.a=j2(Tnn,[Ae,Zge],[592,216],0,[pJ,wte],2),this.c=new y4,this.g=e,this.f=n,this.d=t}function oJe(e){this.e=le($t,ni,30,e.length,15,1),this.c=le(ts,ma,30,e.length,16,1),this.b=le(ts,ma,30,e.length,16,1),this.f=0}function wEn(e){var n,t;for(e.j=le(Jr,Jc,30,e.p.c.length,15,1),t=new P(e.p);t.a>5,n&=31,r=e.d+t+(n==0?0:1),i=le($t,ni,30,r,15,1),bMn(i,e.a,t,n),c=new Gb(e.e,r,i),gE(c),c}function b8(e,n,t){var i,r,c;for(r=null,c=e.b;c;){if(i=e.a.Le(n,c.d),t&&i==0)return c;i>=0?c=c.a[1]:(r=c,c=c.a[0])}return r}function _O(e,n,t){var i,r,c;for(r=null,c=e.b;c;){if(i=e.a.Le(n,c.d),t&&i==0)return c;i<=0?c=c.a[0]:(r=c,c=c.a[1])}return r}function CQ(e,n){for(var t=0;!n[t]||n[t]=="";)t++;for(var i=n[t++];t0?(k.Error.stackTraceLimit=Error.stackTraceLimit=64,!0):"stack"in new Error}function kEn(e){var n;n=e.a;do n=u(ct(new Xn(Qn(Ii(n).a.Jc(),new ee))),17).d.i,n.k==(Fn(),dr)&&Ce(e.e,n);while(n.k==(Fn(),dr))}function jEn(e,n){var t,i,r;for(i=new Xn(Qn(Ii(e).a.Jc(),new ee));ht(i);)if(t=u(ct(i),17),r=t.d.i,r.c==n)return!1;return!0}function dJe(e,n,t){var i,r,c,o;for(r=u(zn(e.b,t),171),i=0,o=new P(n.j);o.an?1:Bb(isNaN(e),isNaN(n)))>0}function pde(e,n){return Na(),Na(),Rf(Y0),(k.Math.abs(e-n)<=Y0||e==n||isNaN(e)&&isNaN(n)?0:en?1:Bb(isNaN(e),isNaN(n)))<0}function mJe(e,n){return Na(),Na(),Rf(Y0),(k.Math.abs(e-n)<=Y0||e==n||isNaN(e)&&isNaN(n)?0:en?1:Bb(isNaN(e),isNaN(n)))<=0}function mde(e){switch(e.g){case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:return!0;default:return!1}}function vde(e,n,t,i,r,c){this.a=e,this.c=n,this.b=t,this.f=i,this.d=r,this.e=c,this.c>0&&this.b>0&&(this.g=lR(this.c,this.b,this.a))}function xEn(e,n){var t=e.a,i;n=String(n),t.hasOwnProperty(n)&&(i=t[n]);var r=(WY(),rte)[typeof i],c=r?r(i):F1e(typeof i);return c}function g8(e){var n,t,i;if(i=null,n=Ch in e.a,t=!n,t)throw R(new lh("Every element must have an id."));return i=ry(O1(e,Ch)),i}function Jw(e){var n,t;for(t=qGe(e),n=null;e.c==2;)fi(e),n||(n=(ai(),ai(),new Vj(2)),fg(n,t),t=n),t.Hm(qGe(e));return t}function nz(e,n){var t,i,r;return e.Zj(),i=n==null?0:Ni(n),r=(i&oi)%e.d.length,t=W0e(e,r,i,n),t?(pBe(e,t),t.kd()):null}function ph(e,n,t){var i,r,c,o;for(c=n+t,Qr(n,c,e.length),o="",r=n;rn.e?1:e.en.d?e.e:e.d=48&&e<48+k.Math.min(10,10)?e-48:e>=97&&e<97?e-97+10:e>=65&&e<65?e-65+10:-1}function AEn(e,n){if(n.c==e)return n.d;if(n.d==e)return n.c;throw R(new Un("Input edge is not connected to the input port."))}function mh(e,n){if(e.a<0)throw R(new Uc("Did not call before(...) or after(...) before calling add(...)."));return ble(e,e.a,n),e}function yde(e){return BR(),X(e,166)?u(zn(eD,ann),296).Qg(e):so(eD,Us(e))?u(zn(eD,Us(e)),296).Qg(e):null}function Lo(e){var n,t;return(e.Db&32)==0&&(t=(n=u(Kn(e,16),29),dt(n||e.fi())-dt(e.fi())),t!=0&&Q4(e,32,le(Mr,Nn,1,t,5,1))),e}function Q4(e,n,t){var i;(e.Db&n)!=0?t==null?qTn(e,n):(i=YQ(e,n),i==-1?e.Eb=t:ir(G4(e.Eb),i,t)):t!=null&&aIn(e,n,t)}function MEn(e,n,t,i){var r,c;n.c.length!=0&&(r=cNn(t,i),c=dTn(n),er(dB(new mn(null,new yn(c,1)),new p_),new HDe(e,t,r,i)))}function CEn(e,n){var t,i,r,c;return i=e.a.length-1,t=n-e.b&i,c=e.c-n&i,r=e.c-e.b&i,xOe(t=c?(Pkn(e,n),-1):(Lkn(e,n),1)}function TEn(e,n){var t,i;for(t=(Wn(n,e.length),e.charCodeAt(n)),i=n+1;in.e?1:e.fn.f?1:Ni(e)-Ni(n)}function EJe(e,n){var t;return ue(n)===ue(e)?!0:!X(n,22)||(t=u(n,22),t.gc()!=e.gc())?!1:e.Hc(t)}function tz(e,n){return Ln(e),n==null?!1:bn(e,n)?!0:e.length==n.length&&bn(e.toLowerCase(),n.toLowerCase())}function q2(e){var n,t;return ao(e,-129)>0&&ao(e,128)<0?(mIe(),n=Rt(e)+128,t=Ome[n],!t&&(t=Ome[n]=new Sn(e)),t):new Sn(e)}function W4(){W4=Y,ex=new a$(va,0),vve=new a$("INSIDE_PORT_SIDE_GROUPS",1),Ote=new a$("GROUP_MODEL_ORDER",2),Nte=new a$(eee,3)}function iz(e){var n,t,i;if(i=e.Gh(),!i)for(n=0,t=e.Mh();t;t=t.Mh()){if(++n>RZ)return t.Nh();if(i=t.Gh(),i||t==e)break}return i}function IEn(e){var n;return e.b||fgn(e,(n=f2n(e.e,e.a),!n||!bn(hne,pa((!n.b&&(n.b=new Hs((jn(),Ac),Du,n)),n.b),"qualified")))),e.c}function DEn(e){var n,t;for(t=new P(e.a.b);t.a2e3&&(Yen=e,fJ=k.setTimeout(Agn,10))),lJ++==0?(o8n((Coe(),yme)),!0):!1}function qEn(e,n,t){var i;(mnn?(rEn(e),!0):vnn||knn?(y9(),!0):ynn&&(y9(),!1))&&(i=new NNe(n),i.b=t,UMn(e,i))}function NQ(e,n){var t;t=!e.A.Gc((Vs(),_g))||e.q==(Br(),to),e.u.Gc((ps(),Z1))?t?dRn(e,n):AVe(e,n):e.u.Gc(mb)&&(t?L$n(e,n):FVe(e,n))}function UEn(e,n,t){var i,r;hW(e.e,n,t,(Ie(),Yn)),hW(e.i,n,t,nt),e.a&&(r=u(C(n,(me(),mi)),12),i=u(C(t,mi),12),ZV(e.g,r,i))}function CJe(e){var n;ue(ke(e,(Xt(),W3)))===ue((B1(),lG))&&(Fi(e)?(n=u(ke(Fi(e),W3),347),Ei(e,W3,n)):Ei(e,W3,Wx))}function TJe(e,n,t){return new _f(k.Math.min(e.a,n.a)-t/2,k.Math.min(e.b,n.b)-t/2,k.Math.abs(e.a-n.a)+t,k.Math.abs(e.b-n.b)+t)}function OJe(e){var n;this.d=new Te,this.j=new Vr,this.g=new Vr,n=e.g.b,this.f=u(C(_r(n),(Oe(),wl)),86),this.e=ne(re(uz(n,Om)))}function NJe(e){this.d=new Te,this.e=new D0,this.c=le($t,ni,30,(Ie(),F(z(xc,1),qu,64,0,[ju,Vn,nt,bt,Yn])).length,15,1),this.b=e}function xde(e,n,t){var i;switch(i=t[e.g][n],e.g){case 1:case 3:return new Ee(0,i);case 2:case 4:return new Ee(i,0);default:return null}}function XEn(e,n){var t;if(t=Qv(e.o,n),t==null)throw R(new lh("Node did not exist in input."));return Sbe(e,n),$W(e,n),bbe(e,n,t),null}function IJe(e,n){var t,i;for(i=e.a.length,n.lengthi&&ir(n,i,null),n}function Ba(e,n){var t,i;for(i=e.c.length,n.lengthi&&ir(n,i,null),n}function IQ(e,n,t,i){var r;if(r=e.length,n>=r)return r;for(n=n>0?n:0;n0&&(Ce(e.b,new VNe(n.a,t)),i=n.a.length,0i&&(n.a+=GTe(le(Wl,Eh,30,-i,15,1))))}function LJe(e,n,t){var i,r,c;if(!t[n.d])for(t[n.d]=!0,r=new P(r3(n));r.a=e.b>>1)for(i=e.c,t=e.b;t>n;--t)i=i.b;else for(i=e.a.a,t=0;t=0?e.Th(r):jW(e,i)):t<0?jW(e,i):u(i,69).uk().zk(e,e.ei(),t)}function BJe(e){var n,t,i;for(i=(!e.o&&(e.o=new os((Gu(),h1),Zd,e,0)),e.o),t=i.c.Jc();t.e!=t.i.gc();)n=u(t.Wj(),45),n.kd();return nO(i)}function _e(e){var n;if(X(e.a,4)){if(n=yde(e.a),n==null)throw R(new Uc(wWe+e.b+"'. "+gWe+(M1(nD),nD.k)+C2e));return n}else return e.a}function rSn(e){var n;if(e==null)return null;if(n=kRn(bo(e,!0)),n==null)throw R(new TX("Invalid base64Binary value: '"+e+"'"));return n}function ft(e){var n;try{return n=e.i.Xb(e.e),e.Vj(),e.g=e.e++,n}catch(t){throw t=sr(t),X(t,99)?(e.Vj(),R(new hu)):R(t)}}function PQ(e){var n;try{return n=e.c.Ti(e.e),e.Vj(),e.g=e.e++,n}catch(t){throw t=sr(t),X(t,99)?(e.Vj(),R(new hu)):R(t)}}function cz(e){var n,t,i,r;for(r=0,t=0,i=e.length;t=64&&n<128&&(r=bh(r,qh(1,n-64)));return r}function uz(e,n){var t,i;return i=null,wi(e,(Xt(),Xy))&&(t=u(C(e,Xy),105),t.nf(n)&&(i=t.mf(n))),i==null&&_r(e)&&(i=C(_r(e),n)),i}function cSn(e,n){var t;return t=u(C(e,(Oe(),Wc)),78),IK(n,tin)?t?qs(t):(t=new xs,he(e,Wc,t)):t&&he(e,Wc,null),t}function uSn(e,n){var t,i,r;for(r=new xo(n.gc()),i=n.Jc();i.Ob();)t=u(i.Pb(),294),t.c==t.f?E8(e,t,t.c):yCn(e,t)||qn(r.c,t);return r}function zJe(e,n){var t,i,r;for(t=e.o,r=u(u(vi(e.r,n),22),83).Jc();r.Ob();)i=u(r.Pb(),115),i.e.a=sxn(i,t.a),i.e.b=t.b*ne(re(i.b.mf(mJ)))}function oSn(e,n){var t,i,r,c;return r=e.k,t=ne(re(C(e,(me(),gp)))),c=n.k,i=ne(re(C(n,gp))),c!=(Fn(),wr)?-1:r!=wr?1:t==i?0:tt.b)return!0}return!1}function HJe(e){var n;return n=new y0,n.a+="n",e.k!=(Fn(),Wi)&&Kt(Kt((n.a+="(",n),RK(e.k).toLowerCase()),")"),Kt((n.a+="_",n),$O(e)),n.a}function GE(){GE=Y,D4e=new aT(Rpe,0),Zie=new aT(cee,1),ere=new aT("LINEAR_SEGMENTS",2),Ex=new aT("BRANDES_KOEPF",3),Sx=new aT(zQe,4)}function Z4(e,n,t,i){var r;return t>=0?e.Ph(n,t,i):(e.Mh()&&(i=(r=e.Ch(),r>=0?e.xh(i):e.Mh().Qh(e,-1-r,null,i))),e.zh(n,t,i))}function Ade(e,n){switch(n){case 7:!e.e&&(e.e=new In(pr,e,7,4)),kt(e.e);return;case 8:!e.d&&(e.d=new In(pr,e,8,5)),kt(e.d);return}dde(e,n)}function Ei(e,n,t){return t==null?(!e.o&&(e.o=new os((Gu(),h1),Zd,e,0)),nz(e.o,n)):(!e.o&&(e.o=new os((Gu(),h1),Zd,e,0)),zO(e.o,n,t)),e}function Yu(e,n){var t;t=e.dd(n);try{return t.Pb()}catch(i){throw i=sr(i),X(i,112)?R(new jo("Can't get element "+n)):R(i)}}function GJe(e,n){var t;switch(t=u(zc(e.b,n),127).n,n.g){case 1:e.t>=0&&(t.d=e.t);break;case 3:e.t>=0&&(t.a=e.t)}e.C&&(t.b=e.C.b,t.c=e.C.c)}function bSn(e){var n;n=e.a;do n=u(ct(new Xn(Qn(cr(n).a.Jc(),new ee))),17).c.i,n.k==(Fn(),dr)&&e.b.Ec(n);while(n.k==(Fn(),dr));e.b=Ks(e.b)}function qJe(e,n){var t,i,r;for(r=e,i=new Xn(Qn(cr(n).a.Jc(),new ee));ht(i);)t=u(ct(i),17),t.c.i.c&&(r=k.Math.max(r,t.c.i.c.p));return r}function gSn(e,n){var t,i,r;for(r=0,i=u(u(vi(e.r,n),22),83).Jc();i.Ob();)t=u(i.Pb(),115),r+=t.d.d+t.b.Kf().b+t.d.a,i.Ob()&&(r+=e.w);return r}function wSn(e,n){var t,i,r;for(r=0,i=u(u(vi(e.r,n),22),83).Jc();i.Ob();)t=u(i.Pb(),115),r+=t.d.b+t.b.Kf().a+t.d.c,i.Ob()&&(r+=e.w);return r}function UJe(e){var n,t,i,r;if(i=0,r=W2(e),r.c.length==0)return 1;for(t=new P(r);t.a=0?e.Ih(o,t,!0):Xw(e,c,t)):u(c,69).uk().wk(e,e.ei(),r,t,i)}function vSn(e,n,t,i){var r,c;c=n.nf((Xt(),e5))?u(n.mf(e5),22):e.j,r=hjn(c),r!=(nF(),pte)&&(t&&!mde(r)||O0e(_On(e,r,i),n))}function $Q(e,n){return $r(e)?!!Hen[n]:e.Qm?!!e.Qm[n]:g2(e)?!!Jen[n]:b2(e)?!!Fen[n]:!1}function ySn(e){switch(e.g){case 1:return Rw(),VN;case 3:return Rw(),KN;case 2:return Rw(),vte;case 4:return Rw(),mte;default:return null}}function kSn(e,n,t){if(e.e)switch(e.b){case 1:P5n(e.c,n,t);break;case 0:$5n(e.c,n,t)}else sPe(e.c,n,t);e.a[n.p][t.p]=e.c.i,e.a[t.p][n.p]=e.c.e}function KJe(e){var n,t;if(e==null)return null;for(t=le(u1,Ae,199,e.length,0,2),n=0;nc?1:0):0}function U2(){U2=Y,MH=new g$(va,0),Qie=new g$("PORT_POSITION",1),U3=new g$("NODE_SIZE_WHERE_SPACE_PERMITS",2),q3=new g$("NODE_SIZE",3)}function jSn(e,n){var t,i,r;for(n.Tg("Untreeify",1),t=u(C(e,(Ti(),yye)),16),r=t.Jc();r.Ob();)i=u(r.Pb(),65),Vt(i.b.d,i),Vt(i.c.b,i);n.Ug()}function Yh(){Yh=Y,lce=new Bj("AUTOMATIC",0),NI=new Bj(by,1),II=new Bj(gy,2),iG=new Bj("TOP",3),nG=new Bj(nwe,4),tG=new Bj(H8,5)}function o3(e,n,t){var i,r;if(r=e.gc(),n>=r)throw R(new k2(n,r));if(e.Qi()&&(i=e.bd(t),i>=0&&i!=n))throw R(new Un(BN));return e.Vi(n,t)}function $d(e,n){var t,i,r;if(r=OHe(e,n),r>=0)return r;if(e.ml()){for(i=0;i0||e==(EX(),Yne)||n==(SX(),Qne))throw R(new Un("Invalid range: "+oPe(e,n)))}function Cde(e,n,t,i){C8();var r,c;for(r=0,c=0;c0),(n&-n)==n)return lc(n*Ds(e,31)*4656612873077393e-25);do t=Ds(e,31),i=t%n;while(t-i+(n-1)<0);return lc(i)}function ESn(e,n){var t,i,r;for(t=kw(new Lb,e),r=new P(n);r.a1&&(c=ESn(e,n)),c}function CSn(e){var n,t,i;for(n=0,i=new P(e.c.a);i.a102?-1:e<=57?e-48:e<65?-1:e<=70?e-65+10:e<97?-1:e-97+10}function qQ(e,n){if(e==null)throw R(new f4("null key in entry: null="+n));if(n==null)throw R(new f4("null value in entry: "+e+"=null"))}function tHe(e,n){var t;return t=F(z(Jr,1),Jc,30,15,[fQ(e.a[0],n),fQ(e.a[1],n),fQ(e.a[2],n)]),e.d&&(t[0]=k.Math.max(t[0],t[2]),t[2]=t[0]),t}function iHe(e,n){var t;return t=F(z(Jr,1),Jc,30,15,[FB(e.a[0],n),FB(e.a[1],n),FB(e.a[2],n)]),e.d&&(t[0]=k.Math.max(t[0],t[2]),t[2]=t[0]),t}function Ide(e,n,t){A4(u(C(n,(Oe(),Zi)),102))||(Xae(e,n,Rd(n,t)),Xae(e,n,Rd(n,(Ie(),bt))),Xae(e,n,Rd(n,Vn)),En(),Tr(n.j,new tEe(e)))}function rHe(e){var n,t;for(e.c||TPn(e),t=new xs,n=new P(e.a),L(n);n.a0&&(Wn(0,n.length),n.charCodeAt(0)==43)?(Wn(1,n.length+1),n.substr(1)):n))}function qSn(e){var n;return e==null?null:new A0((n=bo(e,!0),n.length>0&&(Wn(0,n.length),n.charCodeAt(0)==43)?(Wn(1,n.length+1),n.substr(1)):n))}function _de(e,n,t,i,r,c,o,l){var f,h;i&&(f=i.a[0],f&&_de(e,n,t,f,r,c,o,l),eW(e,t,i.d,r,c,o,l)&&n.Ec(i),h=i.a[1],h&&_de(e,n,t,h,r,c,o,l))}function qE(e,n){var t,i,r,c;for(c=e.gc(),n.lengthc&&ir(n,c,null),n}function USn(e,n){var t,i;if(i=e.gc(),n==null){for(t=0;t0&&(f+=r),h[b]=o,o+=l*(f+i)}function ZSn(e){var n;for(n=0;n0?e.c:0),++r;e.b=i,e.d=c}function wHe(e,n){var t;return t=F(z(Jr,1),Jc,30,15,[Tde(e,(wa(),Ou),n),Tde(e,No,n),Tde(e,Nu,n)]),e.f&&(t[0]=k.Math.max(t[0],t[2]),t[2]=t[0]),t}function pHe(e){var n;wi(e,(Oe(),pp))&&(n=u(C(e,pp),22),n.Gc((Q2(),Yf))?(n.Kc(Yf),n.Ec(Qf)):n.Gc(Qf)&&(n.Kc(Qf),n.Ec(Yf)))}function mHe(e){var n;wi(e,(Oe(),pp))&&(n=u(C(e,pp),22),n.Gc((Q2(),Zf))?(n.Kc(Zf),n.Ec(pf)):n.Gc(pf)&&(n.Kc(pf),n.Ec(Zf)))}function QQ(e,n,t,i){var r,c,o,l;return e.a==null&&YMn(e,n),o=n.b.j.c.length,c=t.d.p,l=i.d.p,r=l-1,r<0&&(r=o-1),c<=r?e.a[r]-e.a[c]:e.a[o-1]-e.a[c]+e.a[r]}function exn(e){var n;for(n=0;n0&&(r.b+=n),r}function gz(e,n){var t,i,r;for(r=new Vr,i=e.Jc();i.Ob();)t=u(i.Pb(),37),T8(t,0,r.b),r.b+=t.f.b+n,r.a=k.Math.max(r.a,t.f.a);return r.a>0&&(r.a+=n),r}function yHe(e,n){var t,i;if(n.length==0)return 0;for(t=CV(e.a,n[0],(Ie(),Yn)),t+=CV(e.a,n[n.length-1],nt),i=0;i>16==6?e.Cb.Qh(e,5,Aa,n):(i=Oc(u(Cn((t=u(Kn(e,16),29),t||e.fi()),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function uxn(e){B9();var n=e.e;if(n&&n.stack){var t=n.stack,i=n+` `;return t.substring(0,i.length)==i&&(t=t.substring(i.length)),t.split(` -`)}return[]}function oxn(e){var n;return n=(TBe(),nnn),n[e>>>28]|n[e>>24&15]<<4|n[e>>20&15]<<8|n[e>>16&15]<<12|n[e>>12&15]<<16|n[e>>8&15]<<20|n[e>>4&15]<<24|n[e&15]<<28}function jHe(e){var n,t,i;e.b==e.c&&(i=e.a.length,t=b1e(k.Math.max(8,i))<<1,e.b!=0?(n=Df(e.a,t),_Be(e,n,i),e.a=n,e.b=0):r2(e.a,t),e.c=i)}function sxn(e,n){var t;return t=e.b,t.nf((Xt(),Ps))?t.$f()==(De(),Vn)?-t.Kf().a-ne(re(t.mf(Ps))):n+ne(re(t.mf(Ps))):t.$f()==(De(),Vn)?-t.Kf().a:n}function $O(e){var n;return e.b.c.length!=0&&u(Pe(e.b,0),70).a?u(Pe(e.b,0),70).a:(n=IV(e),n??""+(e.c?pu(e.c.a,e,0):-1))}function wz(e){var n;return e.f.c.length!=0&&u(Pe(e.f,0),70).a?u(Pe(e.f,0),70).a:(n=IV(e),n??""+(e.i?pu(e.i.j,e,0):-1))}function lxn(e,n){var t,i;if(n<0||n>=e.gc())return null;for(t=n;t0?e.c:0),r=k.Math.max(r,n.d),++i;e.e=c,e.b=r}function fxn(e){var n,t;if(!e.b)for(e.b=JR(u(e.f,125).jh().i),t=new st(u(e.f,125).jh());t.e!=t.i.gc();)n=u(ft(t),157),Te(e.b,new MX(n));return e.b}function axn(e,n){var t,i,r;if(n.dc())return A9(),A9(),tD;for(t=new VOe(e,n.gc()),r=new st(e);r.e!=r.i.gc();)i=ft(r),n.Gc(i)&&Et(t,i);return t}function $de(e,n,t,i){return n==0?i?(!e.o&&(e.o=new os((Gu(),h1),Zd,e,0)),e.o):(!e.o&&(e.o=new os((Gu(),h1),Zd,e,0)),nO(e.o)):sz(e,n,t,i)}function ZQ(e){var n,t;if(e.rb)for(n=0,t=e.rb.i;n>22),r+=i>>22,r<0)?!1:(e.l=t&Ls,e.m=i&Ls,e.h=r&G1,!0)}function eW(e,n,t,i,r,c,o){var l,f;return!(n.Re()&&(f=e.a.Le(t,i),f<0||!r&&f==0)||n.Se()&&(l=e.a.Le(t,c),l>0||!o&&l==0))}function gxn(e,n){i8();var t;if(t=e.j.g-n.j.g,t!=0)return 0;switch(e.j.g){case 2:return kQ(n,h3e)-kQ(e,h3e);case 4:return kQ(e,a3e)-kQ(n,a3e)}return 0}function wxn(e){switch(e.g){case 0:return rie;case 1:return cie;case 2:return uie;case 3:return oie;case 4:return YJ;case 5:return sie;default:return null}}function Qc(e,n,t){var i,r;return i=(r=new kX,cg(r,n),Mo(r,t),Et((!e.c&&(e.c=new we(jp,e,12,10)),e.c),r),r),Nd(i,0),$2(i,1),Pd(i,!0),Ld(i,!0),i}function ey(e,n){var t,i;if(n>=e.i)throw R(new EK(n,e.i));return++e.j,t=e.g[n],i=e.i-n-1,i>0&&Wu(e.g,n+1,e.g,n,i),ir(e.g,--e.i,null),e.Oi(n,t),e.Li(),t}function EHe(e,n){var t,i;return e.Db>>16==17?e.Cb.Qh(e,21,vf,n):(i=Oc(u(Mn((t=u(Xn(e,16),29),t||e.fi()),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function pxn(e){var n,t,i,r;for(En(),Tr(e.c,e.a),r=new P(e.c);r.at.a.c.length))throw R(new qn("index must be >= 0 and <= layer node count"));e.c&&qo(e.c.a,e),e.c=t,t&&zb(t.a,n,e)}function NHe(e,n){this.c=new wt,this.a=e,this.b=n,this.d=u(C(e,(me(),z3)),316),ue(C(e,(Ie(),o4e)))===ue((uO(),QJ))?this.e=new yxe:this.e=new vxe}function Exn(e,n){var t,i,r,c;for(c=0,i=new P(e);i.a0?n:0),++t;return new Se(i,r)}function Sxn(e,n){var t,i;for(e.b=0,e.d=new BP,i=new P(n.a);i.a>16==6?e.Cb.Qh(e,6,pr,n):(i=Oc(u(Mn((t=u(Xn(e,16),29),t||(Gu(),wG)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function Hde(e,n){var t,i;return e.Db>>16==7?e.Cb.Qh(e,1,QI,n):(i=Oc(u(Mn((t=u(Xn(e,16),29),t||(Gu(),L8e)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function Gde(e,n){var t,i;return e.Db>>16==9?e.Cb.Qh(e,9,Ft,n):(i=Oc(u(Mn((t=u(Xn(e,16),29),t||(Gu(),$8e)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function _He(e,n){var t,i;return e.Db>>16==5?e.Cb.Qh(e,9,xG,n):(i=Oc(u(Mn((t=u(Xn(e,16),29),t||(jn(),n0)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function LHe(e,n){var t,i;return e.Db>>16==7?e.Cb.Qh(e,6,Aa,n):(i=Oc(u(Mn((t=u(Xn(e,16),29),t||(jn(),i0)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function qde(e,n){var t,i;return e.Db>>16==3?e.Cb.Qh(e,0,ZI,n):(i=Oc(u(Mn((t=u(Xn(e,16),29),t||(jn(),e0)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function Ude(e,n){var t,i;return e.Db>>16==3?e.Cb.Qh(e,12,Ft,n):(i=Oc(u(Mn((t=u(Xn(e,16),29),t||(Gu(),_8e)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function Cxn(e,n,t){var i,r,c;for(t<0&&(t=0),c=e.i,r=t;rRZ)return m8(e,i);if(i==e)return!0}}return!1}function Oxn(e){switch(H$(),e.q.g){case 5:jqe(e,(De(),Kn)),jqe(e,bt);break;case 4:CUe(e,(De(),Kn)),CUe(e,bt);break;default:OVe(e,(De(),Kn)),OVe(e,bt)}}function Nxn(e){switch(H$(),e.q.g){case 5:Fqe(e,(De(),et)),Fqe(e,Vn);break;case 4:zJe(e,(De(),et)),zJe(e,Vn);break;default:NVe(e,(De(),et)),NVe(e,Vn)}}function Ixn(e){var n,t;n=u(C(e,(Hf(),Etn)),15),n?(t=n.a,t==0?he(e,(L0(),jJ),new yQ):he(e,(L0(),jJ),new VR(t))):he(e,(L0(),jJ),new VR(1))}function Dxn(e,n){var t;switch(t=e.i,n.g){case 1:return-(e.n.b+e.o.b);case 2:return e.n.a-t.o.a;case 3:return e.n.b-t.o.b;case 4:return-(e.n.a+e.o.a)}return 0}function _xn(e,n){switch(e.g){case 0:return n==(Xs(),V1)?JJ:HJ;case 1:return n==(Xs(),V1)?JJ:eI;case 2:return n==(Xs(),V1)?eI:HJ;default:return eI}}function BO(e,n){var t,i,r;for(qo(e.a,n),e.e-=n.r+(e.a.c.length==0?0:e.c),r=qee,i=new P(e.a);i.a>16==11?e.Cb.Qh(e,10,Ft,n):(i=Oc(u(Mn((t=u(Xn(e,16),29),t||(Gu(),P8e)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function PHe(e,n){var t,i;return e.Db>>16==10?e.Cb.Qh(e,11,vf,n):(i=Oc(u(Mn((t=u(Xn(e,16),29),t||(jn(),t0)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function $He(e,n){var t,i;return e.Db>>16==10?e.Cb.Qh(e,12,yf,n):(i=Oc(u(Mn((t=u(Xn(e,16),29),t||(jn(),Km)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function RHe(e,n){var t,i,r,c,o;if(n)for(r=n.a.length,t=new Jb(r),o=(t.b-t.a)*t.c<0?(S0(),Eb):new M0(t);o.Ob();)c=u(o.Pb(),15),i=F9(n,c.a),i&&jUe(e,i)}function Fxn(){nse();var e,n;for(sBn((C0(),Bn)),WRn(Bn),ZQ(Bn),Q8e=(jn(),rh),n=new P(u7e);n.a>19,h=n.h>>19,f!=h?h-f:(r=e.h,l=n.h,r!=l?r-l:(i=e.m,o=n.m,i!=o?i-o:(t=e.l,c=n.l,t-c)))}function BHe(e,n,t){var i,r,c,o,l;for(r=e[t.g],l=new P(n.d);l.a0?e.b:0),++t;n.b=i,n.e=r}function zHe(e){var n,t,i;if(i=e.b,wMe(e.i,i.length)){for(t=i.length*2,e.b=se(Wne,gN,308,t,0,1),e.c=se(Wne,gN,308,t,0,1),e.f=t-1,e.i=0,n=e.a;n;n=n.c)XO(e,n,n);++e.g}}function KE(e,n){return e.b.a=k.Math.min(e.b.a,n.c),e.b.b=k.Math.min(e.b.b,n.d),e.a.a=k.Math.max(e.a.a,n.c),e.a.b=k.Math.max(e.a.b,n.d),Gn(e.c,n),!0}function Hxn(e,n,t){var i;i=n.c.i,i.k==(Fn(),dr)?(he(e,(me(),Ea),u(C(i,Ea),12)),he(e,gf,u(C(i,gf),12))):(he(e,(me(),Ea),n.c),he(e,gf,t.d))}function v8(e,n,t){M8();var i,r,c,o,l,f;return o=n/2,c=t/2,i=k.Math.abs(e.a),r=k.Math.abs(e.b),l=1,f=1,i>o&&(l=o/i),r>c&&(f=c/r),A1(e,k.Math.min(l,f)),e}function Gxn(){Uz();var e,n;try{if(n=u(r0e((E0(),kf),o7),2075),n)return n}catch(t){if(t=sr(t),X(t,101))e=t,Ffe((Lt(),e));else throw R(t)}return new hU}function qxn(){Uz();var e,n;try{if(n=u(r0e((E0(),kf),hf),2002),n)return n}catch(t){if(t=sr(t),X(t,101))e=t,Ffe((Lt(),e));else throw R(t)}return new lw}function Uxn(){H$e();var e,n;try{if(n=u(r0e((E0(),kf),vg),2084),n)return n}catch(t){if(t=sr(t),X(t,101))e=t,Ffe((Lt(),e));else throw R(t)}return new lC}function Xxn(e,n,t){var i,r;return r=e.e,e.e=n,(e.Db&4)!=0&&(e.Db&1)==0&&(i=new Dr(e,1,4,r,n),t?t.lj(i):t=i),r!=n&&(n?t=_8(e,Iz(e,n),t):t=_8(e,e.a,t)),t}function FHe(){r$.call(this),this.e=-1,this.a=!1,this.p=Xr,this.k=-1,this.c=-1,this.b=-1,this.g=!1,this.f=-1,this.j=-1,this.n=-1,this.i=-1,this.d=-1,this.o=Xr}function Kxn(e,n){var t,i,r;if(i=e.b.d.d,e.a||(i+=e.b.d.a),r=n.b.d.d,n.a||(r+=n.b.d.a),t=ji(i,r),t==0){if(!e.a&&n.a)return-1;if(!n.a&&e.a)return 1}return t}function Vxn(e,n){var t,i,r;if(i=e.b.b.d,e.a||(i+=e.b.b.a),r=n.b.b.d,n.a||(r+=n.b.b.a),t=ji(i,r),t==0){if(!e.a&&n.a)return-1;if(!n.a&&e.a)return 1}return t}function Yxn(e,n){var t,i,r;if(i=e.b.g.d,e.a||(i+=e.b.g.a),r=n.b.g.d,n.a||(r+=n.b.g.a),t=ji(i,r),t==0){if(!e.a&&n.a)return-1;if(!n.a&&e.a)return 1}return t}function Vde(){Vde=Y,Ftn=Eo(qt(qt(qt(new or,(zr(),no),(Ur(),Qve)),no,Wve),Pc,Zve),Pc,zve),Htn=qt(qt(new or,no,Dve),no,Fve),Jtn=Eo(new or,Pc,Hve)}function Qxn(e){var n,t,i,r,c;for(n=u(C(e,(me(),sx)),92),c=e.n,i=n.Bc().Jc();i.Ob();)t=u(i.Pb(),318),r=t.i,r.c+=c.a,r.d+=c.b,t.c?dXe(t):bXe(t);he(e,sx,null)}function Wxn(e,n,t){var i,r;switch(r=e.b,i=r.d,n.g){case 1:return-i.d-t;case 2:return r.o.a+i.c+t;case 3:return r.o.b+i.a+t;case 4:return-i.b-t;default:return-1}}function JHe(e,n){var t,i;for(i=new P(n);i.a0&&(o=(c&oi)%e.d.length,r=W0e(e,o,c,n),r)?(l=r.ld(t),l):(i=e.ak(c,n,t),e.c.Ec(i),null)}function Wde(e,n){var t,i,r,c;switch(_d(e,n).Il()){case 3:case 2:{for(t=g3(n),r=0,c=t.i;r=0;i--)if(gn(e[i].d,n)||gn(e[i].d,t)){e.length>=i+1&&e.splice(0,i+1);break}return e}function FO(e,n){var t;return su(e)&&su(n)&&(t=e/n,mN0&&(e.b+=2,e.a+=i):(e.b+=1,e.a+=k.Math.min(i,r))}function VHe(e,n){var t,i;if(i=!1,$r(n)&&(i=!0,D4(e,new M2(Pt(n)))),i||X(n,242)&&(i=!0,D4(e,(t=UK(u(n,242)),new Av(t)))),!i)throw R(new CX(U2e))}function gAn(e,n,t,i){var r,c,o;return r=new L1(e.e,1,10,(o=n.c,X(o,88)?u(o,29):(jn(),jf)),(c=t.c,X(c,88)?u(c,29):(jn(),jf)),$d(e,n),!1),i?i.lj(r):i=r,i}function n0e(e){var n,t;switch(u(C(_r(e),(Ie(),Z5e)),420).g){case 0:return n=e.n,t=e.o,new Se(n.a+t.a/2,n.b+t.b/2);case 1:return new wc(e.n);default:return null}}function JO(){JO=Y,WJ=new Pj(va,0),T3e=new Pj("LEFTUP",1),N3e=new Pj("RIGHTUP",2),C3e=new Pj("LEFTDOWN",3),O3e=new Pj("RIGHTDOWN",4),lie=new Pj("BALANCED",5)}function wAn(e,n,t){var i,r,c;if(i=ji(e.a[n.p],e.a[t.p]),i==0){if(r=u(C(n,(me(),Dy)),16),c=u(C(t,Dy),16),r.Gc(t))return-1;if(c.Gc(n))return 1}return i}function pAn(e){switch(e.g){case 1:return new $_;case 2:return new _k;case 3:return new H5;case 0:return null;default:throw R(new qn(Wee+(e.f!=null?e.f:""+e.g)))}}function t0e(e,n,t){switch(n){case 1:!e.n&&(e.n=new we(Eu,e,1,7)),kt(e.n),!e.n&&(e.n=new we(Eu,e,1,7)),nr(e.n,u(t,18));return;case 2:V9(e,Pt(t));return}E1e(e,n,t)}function i0e(e,n,t){switch(n){case 3:Lw(e,ne(re(t)));return;case 4:Pw(e,ne(re(t)));return;case 5:Os(e,ne(re(t)));return;case 6:Ns(e,ne(re(t)));return}t0e(e,n,t)}function pz(e,n,t){var i,r,c;c=(i=new kX,i),r=Fa(c,n,null),r&&r.mj(),Mo(c,t),Et((!e.c&&(e.c=new we(jp,e,12,10)),e.c),c),Nd(c,0),$2(c,1),Pd(c,!0),Ld(c,!0)}function r0e(e,n){var t,i,r;return t=Dj(e.i,n),X(t,241)?(r=u(t,241),r.wi()==null,r.ti()):X(t,493)?(i=u(t,1999),r=i.b,r):null}function mAn(e,n,t,i){var r,c;return Nt(n),Nt(t),c=u(nE(e.d,n),15),SRe(!!c,"Row %s not in %s",n,e.e),r=u(nE(e.b,t),15),SRe(!!r,"Column %s not in %s",t,e.c),Eze(e,c.a,r.a,i)}function vAn(e){var n,t,i,r,c,o;for(t=null,r=e,c=0,o=r.length;c1||l==-1?(c=u(f,16),r.Wb(tEn(e,c))):r.Wb(FW(e,u(f,57)))))}function AAn(e,n,t,i){kMe();var r=Kne;function c(){for(var o=0;o0)return!1;return!0}function TAn(e){switch(u(C(e.b,(Ie(),U5e)),381).g){case 1:er(So(lu(new mn(null,new vn(e.d,16)),new tw),new r_),new iM);break;case 2:uDn(e);break;case 0:ZCn(e)}}function OAn(e,n,t){var i,r,c;for(i=t,!i&&(i=new s4),i.Tg("Layout",e.a.c.length),c=new P(e.a);c.aKee)return t;r>-1e-6&&++t}return t}function vz(e,n,t){if(X(n,271))return iNn(e,u(n,85),t);if(X(n,276))return Lxn(e,u(n,276),t);throw R(new qn(s7+Ja(new Su(F(z(Mr,1),On,1,5,[n,t])))))}function yz(e,n,t){if(X(n,271))return rNn(e,u(n,85),t);if(X(n,276))return Pxn(e,u(n,276),t);throw R(new qn(s7+Ja(new Su(F(z(Mr,1),On,1,5,[n,t])))))}function u0e(e,n){var t;n!=e.b?(t=null,e.b&&(t=LR(e.b,e,-4,t)),n&&(t=Z4(n,e,-4,t)),t=mFe(e,n,t),t&&t.mj()):(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,3,n,n))}function ZHe(e,n){var t;n!=e.f?(t=null,e.f&&(t=LR(e.f,e,-1,t)),n&&(t=Z4(n,e,-1,t)),t=vFe(e,n,t),t&&t.mj()):(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,0,n,n))}function LAn(e,n,t,i){var r,c,o,l;return Fs(e.e)&&(r=n.Jk(),l=n.kd(),c=t.kd(),o=O0(e,1,r,l,c,r.Hk()?N8(e,r,c,X(r,103)&&(u(r,19).Bb&Ec)!=0):-1,!0),i?i.lj(o):i=o),i}function eGe(e){var n,t,i;if(e==null)return null;if(t=u(e,16),t.dc())return"";for(i=new vd,n=t.Jc();n.Ob();)Bc(i,(Si(),Pt(n.Pb()))),i.a+=" ";return jK(i,i.a.length-1)}function nGe(e){var n,t,i;if(e==null)return null;if(t=u(e,16),t.dc())return"";for(i=new vd,n=t.Jc();n.Ob();)Bc(i,(Si(),Pt(n.Pb()))),i.a+=" ";return jK(i,i.a.length-1)}function PAn(e,n){var t,i,r,c,o;for(c=new P(n.a);c.a0&&rc(e,e.length-1)==33)try{return n=wUe(of(e,0,e.length-1)),n.e==null}catch(t){if(t=sr(t),!X(t,32))throw R(t)}return!1}function zAn(e,n,t){var i,r,c;switch(i=_r(n),r=UB(i),c=new Qu,wu(c,n),t.g){case 1:Ar(c,NO(Y4(r)));break;case 2:Ar(c,Y4(r))}return he(c,(Ie(),Am),re(C(e,Am))),c}function o0e(e){var n,t;return n=u(rt(new Un(Yn(cr(e.a).a.Jc(),new ee))),17),t=u(rt(new Un(Yn(Ii(e.a).a.Jc(),new ee))),17),Fe(ze(C(n,(me(),qd))))||Fe(ze(C(t,qd)))}function X2(){X2=Y,nI=new lT("ONE_SIDE",0),UJ=new lT("TWO_SIDES_CORNER",1),XJ=new lT("TWO_SIDES_OPPOSING",2),qJ=new lT("THREE_SIDES",3),GJ=new lT("FOUR_SIDES",4)}function rGe(e,n){var t,i,r,c;for(c=new Oe,r=0,i=n.Jc();i.Ob();){for(t=ke(u(i.Pb(),15).a+r);t.a=e.f)break;Gn(c.c,t)}return c}function FAn(e){var n,t;for(t=new P(e.e.b);t.a0&&xHe(this,this.c-1,(De(),et)),this.c0&&e[0].length>0&&(this.c=Fe(ze(C(_r(e[0][0]),(me(),X3e))))),this.a=se(bon,Me,2079,e.length,0,2),this.b=se(gon,Me,2080,e.length,0,2),this.d=new hFe}function qAn(e){return e.c.length==0?!1:(kn(0,e.c.length),u(e.c[0],17)).c.i.k==(Fn(),dr)?!0:Vv(So(new mn(null,new vn(e,16)),new jk),new l_)}function oGe(e,n){var t,i,r,c,o,l,f;for(l=W2(n),c=n.f,f=n.g,o=k.Math.sqrt(c*c+f*f),r=0,i=new P(l);i.a=0?(t=FO(e,rF),i=AQ(e,rF)):(n=Hb(e,1),t=FO(n,5e8),i=AQ(n,5e8),i=mc(qh(i,1),Rr(e,1))),bh(qh(i,32),Rr(t,Dc))}function iMn(e,n,t,i){var r,c,o,l,f;for(r=null,c=0,l=new P(n);l.a1;n>>=1)(n&1)!=0&&(i=Kv(i,t)),t.d==1?t=Kv(t,t):t=new AJe(eKe(t.a,t.d,se($t,ni,30,t.d<<1,15,1)));return i=Kv(i,t),i}function w0e(){w0e=Y;var e,n,t,i;for(qme=se(Jr,Jc,30,25,15,1),Ume=se(Jr,Jc,30,33,15,1),i=152587890625e-16,n=32;n>=0;n--)Ume[n]=i,i*=.5;for(t=1,e=24;e>=0;e--)qme[e]=t,t*=.5}function sMn(e){var n,t;if(Fe(ze(je(e,(Ie(),Sm))))){for(t=new Un(Yn(U0(e).a.Jc(),new ee));ht(t);)if(n=u(rt(t),85),Uw(n)&&Fe(ze(je(n,xg))))return!0}return!1}function fGe(e){var n,t,i,r;for(n=new xi,t=new xi,r=St(e,0);r.b!=r.d.c;)i=u(jt(r),12),i.e.c.length==0?Ki(t,i,t.c.b,t.c):Ki(n,i,n.c.b,n.c);return Ks(n).Fc(t),n}function aGe(e,n){var t,i,r;hr(e.f,n)&&(n.b=e,i=n.c,pu(e.j,i,0)!=-1||Te(e.j,i),r=n.d,pu(e.j,r,0)!=-1||Te(e.j,r),t=n.a.b,t.c.length!=0&&(!e.i&&(e.i=new OJe(e)),$7n(e.i,t)))}function lMn(e){var n,t,i,r,c;return t=e.c.d,i=t.j,r=e.d.d,c=r.j,i==c?t.p=0&&gn(e.substr(n,3),"GMT")||n>=0&&gn(e.substr(n,3),"UTC"))&&(t[0]=n+3),Zbe(e,t,i)}function aMn(e,n){var t,i,r,c,o;for(c=e.g.a,o=e.g.b,i=new P(e.d);i.at;c--)e[c]|=n[c-t-1]>>>o,e[c-1]=n[c-t-1]<0&&Wu(e.g,n,e.g,n+i,l),o=t.Jc(),e.i+=i,r=0;r>4&15,c=e[i]&15,o[r++]=R8e[t],o[r++]=R8e[c];return ph(o,0,o.length)}function Xo(e){var n,t;return e>=Ec?(n=vN+(e-Ec>>10&1023)&yr,t=56320+(e-Ec&1023)&yr,String.fromCharCode(n)+(""+String.fromCharCode(t))):String.fromCharCode(e&yr)}function kMn(e,n){v2();var t,i,r,c;return r=u(u(vi(e.r,n),22),83),r.gc()>=2?(i=u(r.Jc().Pb(),115),t=e.u.Gc((ps(),tA)),c=e.u.Gc(Yy),!i.a&&!t&&(r.gc()==2||c)):!1}function gGe(e,n,t,i,r){var c,o,l;for(c=cXe(e,n,t,i,r),l=!1;!c;)Oz(e,r,!0),l=!0,c=cXe(e,n,t,i,r);l&&Oz(e,r,!1),o=QY(r),o.c.length!=0&&(e.d&&e.d.Fg(o),gGe(e,r,t,i,o))}function Ez(){Ez=Y,Jre=new k$("NODE_SIZE_REORDERER",0),Bre=new k$("INTERACTIVE_NODE_REORDERER",1),Fre=new k$("MIN_SIZE_PRE_PROCESSOR",2),zre=new k$("MIN_SIZE_POST_PROCESSOR",3)}function Sz(){Sz=Y,Cce=new Fj(va,0),c8e=new Fj("DIRECTED",1),o8e=new Fj("UNDIRECTED",2),i8e=new Fj("ASSOCIATION",3),u8e=new Fj("GENERALIZATION",4),r8e=new Fj("DEPENDENCY",5)}function jMn(e,n){var t;if(!_a(e))throw R(new Uc(zWe));switch(t=_a(e),n.g){case 1:return-(e.j+e.f);case 2:return e.i-t.g;case 3:return e.j-t.f;case 4:return-(e.i+e.g)}return 0}function EMn(e,n,t){var i,r,c;return i=n.Jk(),c=n.kd(),r=i.Hk()?O0(e,4,i,c,null,N8(e,i,c,X(i,103)&&(u(i,19).Bb&Ec)!=0),!0):O0(e,i.rk()?2:1,i,c,i.gk(),-1,!0),t?t.lj(r):t=r,t}function k8(e,n){var t,i;for(_n(n),i=e.b.c.length,Te(e.b,n);i>0;){if(t=i,i=(i-1)/2|0,e.a.Le(Pe(e.b,i),n)<=0)return ul(e.b,t,n),!0;ul(e.b,t,Pe(e.b,i))}return ul(e.b,i,n),!0}function v0e(e,n,t,i){var r,c;if(r=0,t)r=FB(e.a[t.g][n.g],i);else for(c=0;c=l)}function wGe(e){switch(e.g){case 0:return new K_;case 1:return new PM;default:throw R(new qn("No implementation is available for the width approximator "+(e.f!=null?e.f:""+e.g)))}}function y0e(e,n,t,i){var r;if(r=!1,$r(i)&&(r=!0,O9(n,t,Pt(i))),r||b2(i)&&(r=!0,y0e(e,n,t,i)),r||X(i,242)&&(r=!0,Xb(n,t,u(i,242))),!r)throw R(new CX(U2e))}function xMn(e,n){var t,i,r;if(t=n.ni(e.a),t&&(r=pa((!t.b&&(t.b=new Hs((jn(),Ac),Du,t)),t.b),af),r!=null)){for(i=1;i<(ls(),s7e).length;++i)if(gn(s7e[i],r))return i}return 0}function AMn(e,n){var t,i,r;if(t=n.ni(e.a),t&&(r=pa((!t.b&&(t.b=new Hs((jn(),Ac),Du,t)),t.b),af),r!=null)){for(i=1;i<(ls(),l7e).length;++i)if(gn(l7e[i],r))return i}return 0}function pGe(e,n){var t,i,r,c;if(_n(n),c=e.a.gc(),c0?1:0;c.a[r]!=t;)c=c.a[r],r=e.a.Le(t.d,c.d)>0?1:0;c.a[r]=i,i.b=t.b,i.a[0]=t.a[0],i.a[1]=t.a[1],t.a[0]=null,t.a[1]=null}function TMn(e){var n,t,i,r;for(n=new Oe,t=se(ts,ma,30,e.a.c.length,16,1),$fe(t,t.length),r=new P(e.a);r.a0&&VXe((kn(0,t.c.length),u(t.c[0],25)),e),t.c.length>1&&VXe(u(Pe(t,t.c.length-1),25),e),n.Ug()}function NMn(e){ps();var n,t;return n=Ci(Z1,F(z(fG,1),Ee,280,0,[mb])),!(pO(PR(n,e))>1||(t=Ci(tA,F(z(fG,1),Ee,280,0,[nA,Yy])),pO(PR(t,e))>1))}function j0e(e,n){var t;t=lo((E0(),kf),e),X(t,493)?Kc(kf,e,new YCe(this,n)):Kc(kf,e,this),bW(this,n),n==(g9(),Y8e)?(this.wb=u(this,2e3),u(n,2002)):this.wb=(C0(),Bn)}function IMn(e){var n,t,i;if(e==null)return null;for(n=null,t=0;tc}function kGe(e,n){var t,i,r;if(S0e(e,n))return!0;for(i=new P(n);i.a=r||n<0)throw R(new jo(Cne+n+pg+r));if(t>=r||t<0)throw R(new jo(Tne+t+pg+r));return n!=t?i=(c=e.Aj(t),e.oj(n,c),c):i=e.vj(t),i}function EGe(e){var n,t,i;if(i=e,e)for(n=0,t=e.Bh();t;t=t.Bh()){if(++n>RZ)return EGe(t);if(i=t,t==e)throw R(new Uc("There is a cycle in the containment hierarchy of "+e))}return i}function Ja(e){var n,t,i;for(i=new ng(To,"[","]"),t=e.Jc();t.Ob();)n=t.Pb(),D1(i,ue(n)===ue(e)?"(this Collection)":n==null?Vo:fu(n));return i.a?i.e.length==0?i.a.a:i.a.a+(""+i.e):i.c}function S0e(e,n){var t,i;if(i=!1,n.gc()<2)return!1;for(t=0;t1&&(e.j.b+=e.e)):(e.j.a+=t.a,e.j.b=k.Math.max(e.j.b,t.b),e.d.c.length>1&&(e.j.a+=e.e))}function G0(){G0=Y,Tin=F(z(xc,1),qu,64,0,[(De(),Kn),et,bt]),Cin=F(z(xc,1),qu,64,0,[et,bt,Vn]),Oin=F(z(xc,1),qu,64,0,[bt,Vn,Kn]),Nin=F(z(xc,1),qu,64,0,[Vn,Kn,et])}function xGe(e){var n,t,i,r,c,o,l,f,h;for(this.a=KJe(e),this.b=new Oe,t=e,i=0,r=t.length;iFK(e.d).c?(e.i+=e.g.c,TQ(e.d)):FK(e.d).c>FK(e.g).c?(e.e+=e.d.c,TQ(e.g)):(e.i+=SIe(e.g),e.e+=SIe(e.d),TQ(e.g),TQ(e.d))}function FMn(e,n,t){var i,r,c,o;for(c=n.q,o=n.r,new Kb((da(),ab),n,c,1),new Kb(ab,c,o,1),r=new P(t);r.al&&(f=l/i),r>c&&(h=c/r),o=k.Math.min(f,h),e.a+=o*(n.a-e.a),e.b+=o*(n.b-e.b)}function qMn(e,n,t,i,r){var c,o;for(o=!1,c=u(Pe(t.b,0),26);K_n(e,n,c,i,r)&&(o=!0,NAn(t,c),t.b.c.length!=0);)c=u(Pe(t.b,0),26);return t.b.c.length==0&&BO(t.j,t),o&&bz(n.q),o}function A0e(e,n,t,i){var r,c;return t==0?(!e.o&&(e.o=new os((Gu(),h1),Zd,e,0)),K$(e.o,n,i)):(c=u(Mn((r=u(Xn(e,16),29),r||e.fi()),t),69),c.uk().yk(e,Lo(e),t-dt(e.fi()),n,i))}function bW(e,n){var t;n!=e.sb?(t=null,e.sb&&(t=u(e.sb,52).Qh(e,1,cA,t)),n&&(t=u(n,52).Oh(e,1,cA,t)),t=B1e(e,n,t),t&&t.mj()):(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,4,n,n))}function TGe(e,n){var t,i,r,c;if(n)r=$1(n,"x"),t=new hSe(e),Wv(t.a,(_n(r),r)),c=$1(n,"y"),i=new dSe(e),Zv(i.a,(_n(c),c));else throw R(new lh("All edge sections need an end point."))}function OGe(e,n){var t,i,r,c;if(n)r=$1(n,"x"),t=new lSe(e),e3(t.a,(_n(r),r)),c=$1(n,"y"),i=new fSe(e),n3(i.a,(_n(c),c));else throw R(new lh("All edge sections need a start point."))}function UMn(e,n){var t,i,r,c,o,l,f;for(i=Yze(e),c=0,l=i.length;c>22-n,r=e.h<>22-n):n<44?(t=0,i=e.l<>44-n):(t=0,i=0,r=e.l<=zd?"error":i>=900?"warn":i>=800?"info":"log"),pDe(t,e.a),e.b&&Mbe(n,t,e.b,"Exception: ",!0))}function _Ge(e,n){var t,i,r,c,o;for(r=n==1?Cte:Mte,i=r.a.ec().Jc();i.Ob();)for(t=u(i.Pb(),86),o=u(vi(e.f.c,t),22).Jc();o.Ob();)c=u(o.Pb(),49),Te(e.b.b,u(c.b,82)),Te(e.b.a,u(c.b,82).d)}function LGe(e,n,t,i){var r,c,o,l,f;switch(f=e.b,c=n.d,o=c.j,l=xde(o,f.d[o.g],t),r=pi(pc(c.n),c.a),c.j.g){case 3:case 1:l.a+=r.a;break;case 2:l.b+=r.b;break;case 4:l.b+=r.b}Ki(i,l,i.c.b,i.c)}function YMn(e,n){var t,i,r,c;for(c=n.b.j,e.a=se($t,ni,30,c.c.length,15,1),r=0,i=0;ie)throw R(new qn("k must be smaller than n"));return n==0||n==e?1:e==0?0:Zde(e)/(Zde(n)*Zde(e-n))}function M0e(e,n){var t,i,r,c;for(t=new MK(e);t.g==null&&!t.c?mae(t):t.g==null||t.i!=0&&u(t.g[t.i-1],50).Ob();)if(c=u(Nz(t),57),X(c,174))for(i=u(c,174),r=0;r>4],n[t*2+1]=OG[c&15];return ph(n,0,n.length)}function lCn(e){var n,t,i;switch(i=e.c.length,i){case 0:return OV(),Ken;case 1:return n=u(pqe(new P(e)),45),Jpn(n.jd(),n.kd());default:return t=u(Ba(e,se(yg,tF,45,e.c.length,0,1)),175),new ise(t)}}function Rd(e,n){switch(n.g){case 1:return M4(e.j,(ss(),xve));case 2:return M4(e.j,(ss(),Eve));case 3:return M4(e.j,(ss(),Mve));case 4:return M4(e.j,(ss(),Cve));default:return En(),En(),Sc}}function fCn(e,n){var t,i,r;t=$vn(n,e.e),i=u(zn(e.g.f,t),15).a,r=e.a.c.length-1,e.a.c.length!=0&&u(Pe(e.a,r),295).c==i?(++u(Pe(e.a,r),295).a,++u(Pe(e.a,r),295).b):Te(e.a,new COe(i))}function q0(){q0=Y,nln=(Xt(),Uy),tln=Qd,Qsn=Ig,Wsn=n5,Zsn=bb,Ysn=e5,Vye=$I,eln=Rm,Dre=(Gbe(),Bsn),_re=zsn,Qye=Gsn,Lre=Xsn,Wye=qsn,Zye=Usn,Yye=Fsn,HH=Jsn,GH=Hsn,AI=Ksn,e6e=Vsn,Kye=Rsn}function $Ge(e,n){var t,i,r,c,o;if(e.e<=n||wyn(e,e.g,n))return e.g;for(c=e.r,i=e.g,o=e.r,r=(c-i)/2+i;i+11&&(e.e.b+=e.a)):(e.e.a+=t.a,e.e.b=k.Math.max(e.e.b,t.b),e.d.c.length>1&&(e.e.a+=e.a))}function dCn(e){var n,t,i,r;switch(r=e.i,n=r.b,i=r.j,t=r.g,r.a.g){case 0:t.a=(e.g.b.o.a-i.a)/2;break;case 1:t.a=n.d.n.a+n.d.a.a;break;case 2:t.a=n.d.n.a+n.d.a.a-i.a;break;case 3:t.b=n.d.n.b+n.d.a.b}}function bCn(e,n,t){var i,r,c;for(r=new Un(Yn(wh(t).a.Jc(),new ee));ht(r);)i=u(rt(r),17),!uc(i)&&!(!uc(i)&&i.c.i.c==i.d.i.c)&&(c=NUe(e,i,t,new mxe),c.c.length>1&&Gn(n.c,c))}function zGe(e,n,t,i,r){if(ii&&(e.a=i),e.br&&(e.b=r),e}function gCn(e){if(X(e,144))return PNn(u(e,144));if(X(e,233))return Xjn(u(e,233));if(X(e,21))return KMn(u(e,21));throw R(new qn(s7+Ja(new Su(F(z(Mr,1),On,1,5,[e])))))}function wCn(e,n,t,i,r){var c,o,l;for(c=!0,o=0;o>>r|t[o+i+1]<>>r,++o}return c}function N0e(e,n,t,i){var r,c,o;if(n.k==(Fn(),dr)){for(c=new Un(Yn(cr(n).a.Jc(),new ee));ht(c);)if(r=u(rt(c),17),o=r.c.i.k,o==dr&&e.c.a[r.c.i.c.p]==i&&e.c.a[n.c.p]==t)return!0}return!1}function pCn(e,n){var t,i,r,c;return n&=63,t=e.h&G1,n<22?(c=t>>>n,r=e.m>>n|t<<22-n,i=e.l>>n|e.m<<22-n):n<44?(c=0,r=t>>>n-22,i=e.m>>n-22|e.h<<44-n):(c=0,r=0,i=t>>>n-44),_o(i&Ls,r&Ls,c&G1)}function FGe(e,n,t,i){var r;this.b=i,this.e=e==(rg(),Cx),r=n[t],this.d=j2(ts,[Me,ma],[171,30],16,[r.length,r.length],2),this.a=j2($t,[Me,ni],[54,30],15,[r.length,r.length],2),this.c=new h0e(n,t)}function mCn(e){var n,t,i;for(e.k=new Sae((De(),F(z(xc,1),qu,64,0,[ju,Kn,et,bt,Vn])).length,e.j.c.length),i=new P(e.j);i.a=t)return E8(e,n,i.p),!0;return!1}function a3(e,n,t,i){var r,c,o,l,f,h;for(o=t.length,c=0,r=-1,h=URe((Qn(n,e.length+1),e.substr(n)),(VK(),Hme)),l=0;lc&&C3n(h,URe(t[l],Hme))&&(r=l,c=f);return r>=0&&(i[0]=n+c),r}function kCn(e,n,t){var i,r,c,o,l,f,h,b;c=e.d.p,l=c.e,f=c.r,e.g=new NT(f),o=e.d.o.c.p,i=o>0?l[o-1]:se(u1,Fd,9,0,0,1),r=l[o],h=ot?F0e(e,t,"start index"):n<0||n>t?F0e(n,t,"end index"):cS("end index (%s) must not be less than start index (%s)",F(z(Mr,1),On,1,5,[ke(n),ke(e)]))}function UGe(e,n){var t,i,r,c;for(i=0,r=e.length;i0&&XGe(e,c,t));n.p=0}function xCn(e){var n,t,i,r;for(n=qb(Kt(new tl("Predicates."),"and"),40),t=!0,r=new qc(e);r.b=0?e.hi(r):q0e(e,i);else throw R(new qn(nb+i.ve()+LS));else throw R(new qn(QWe+n+WWe));else Fl(e,t,i)}function I0e(e){var n,t;if(t=null,n=!1,X(e,210)&&(n=!0,t=u(e,210).a),n||X(e,265)&&(n=!0,t=""+u(e,265).a),n||X(e,479)&&(n=!0,t=""+u(e,479).a),!n)throw R(new CX(U2e));return t}function D0e(e,n,t){var i,r,c,o,l,f;for(f=Po(e.e.Ah(),n),i=0,l=e.i,r=u(e.g,122),o=0;o=e.d.b.c.length&&(n=new Xu(e.d),n.p=i.p-1,Te(e.d.b,n),t=new Xu(e.d),t.p=i.p,Te(e.d.b,t)),Or(i,u(Pe(e.d.b,i.p),25))}function CCn(e){var n,t,i,r;for(t=new xi,ac(t,e.o),i=new BP;t.b!=0;)n=u(t.b==0?null:(at(t.b!=0),$l(t,t.a.a)),500),r=$Ve(e,n,!0),r&&Te(i.a,n);for(;i.a.c.length!=0;)n=u(T1e(i),500),$Ve(e,n,!1)}function qe(e){var n;this.c=new xi,this.f=e.e,this.e=e.d,this.i=e.g,this.d=e.c,this.b=e.b,this.k=e.j,this.a=e.a,e.i?this.j=e.i:this.j=(n=u(la(Wa),10),new _l(n,u(Df(n,n.length),10),0)),this.g=e.f}function lg(){lg=Y,o9e=new p4(yS,0),xr=new p4("BOOLEAN",1),dc=new p4("INT",2),Gy=new p4("STRING",3),ec=new p4("DOUBLE",4),Bi=new p4("ENUM",5),Hy=new p4("ENUMSET",6),Za=new p4("OBJECT",7)}function YE(e,n){var t,i,r,c,o;i=k.Math.min(e.c,n.c),c=k.Math.min(e.d,n.d),r=k.Math.max(e.c+e.b,n.c+n.b),o=k.Math.max(e.d+e.a,n.d+n.a),r=(r/2|0))for(this.e=i?i.c:null,this.d=r;t++0;)She(this);this.b=n,this.a=null}function NCn(e,n){var t,i;n.a?eIn(e,n):(t=u(BX(e.b,n.b),60),t&&t==e.a[n.b.f]&&t.a&&t.a!=n.b.a&&t.c.Ec(n.b),i=u(RX(e.b,n.b),60),i&&e.a[i.f]==n.b&&i.a&&i.a!=n.b.a&&n.b.c.Ec(i),DK(e.b,n.b))}function eqe(e,n){var t,i;if(t=u(zc(e.b,n),127),u(u(vi(e.r,n),22),83).dc()){t.n.b=0,t.n.c=0;return}t.n.b=e.C.b,t.n.c=e.C.c,e.A.Gc((Vs(),_g))&&OXe(e,n),i=wSn(e,n),NW(e,n)==(u3(),wb)&&(i+=2*e.w),t.a.a=i}function nqe(e,n){var t,i;if(t=u(zc(e.b,n),127),u(u(vi(e.r,n),22),83).dc()){t.n.d=0,t.n.a=0;return}t.n.d=e.C.d,t.n.a=e.C.a,e.A.Gc((Vs(),_g))&&NXe(e,n),i=gSn(e,n),NW(e,n)==(u3(),wb)&&(i+=2*e.w),t.a.b=i}function ICn(e,n){var t,i,r,c;for(c=new Oe,i=new P(n);i.ai&&(Qn(n-1,e.length),e.charCodeAt(n-1)<=32);)--n;return i>0||nt.a&&(i.Gc((sg(),qx))?r=(n.a-t.a)/2:i.Gc(Ux)&&(r=n.a-t.a)),n.b>t.b&&(i.Gc((sg(),Kx))?c=(n.b-t.b)/2:i.Gc(Xx)&&(c=n.b-t.b)),k0e(e,r,c)}function uqe(e,n,t,i,r,c,o,l,f,h,b,p,y){X(e.Cb,88)&&Y2(Ms(u(e.Cb,88)),4),Mo(e,t),e.f=o,a8(e,l),h8(e,f),l8(e,h),f8(e,b),Pd(e,p),d8(e,y),Ld(e,!0),Nd(e,r),e.Xk(c),cg(e,n),i!=null&&(e.i=null,xB(e,i))}function F0e(e,n,t){if(e<0)return cS(oYe,F(z(Mr,1),On,1,5,[t,ke(e)]));if(n<0)throw R(new qn(sYe+n));return cS("%s (%s) must not be greater than size (%s)",F(z(Mr,1),On,1,5,[t,ke(e),ke(n)]))}function J0e(e,n,t,i,r,c){var o,l,f,h;if(o=i-t,o<7){zjn(n,t,i,c);return}if(f=t+r,l=i+r,h=f+(l-f>>1),J0e(n,e,f,h,-r,c),J0e(n,e,h,l,-r,c),c.Le(e[h-1],e[h])<=0){for(;t=0?e.$h(c,t):ybe(e,r,t);else throw R(new qn(nb+r.ve()+LS));else throw R(new qn(QWe+n+WWe));else Jl(e,i,r,t)}function oqe(e){var n,t;if(e.f){for(;e.n>0;){if(n=u(e.k.Xb(e.n-1),75),t=n.Jk(),X(t,103)&&(u(t,19).Bb&Ru)!=0&&(!e.e||t.nk()!=K7||t.Jj()!=0)&&n.kd()!=null)return!0;--e.n}return!1}else return e.n>0}function sqe(e){var n,t,i,r;if(t=u(e,52).Yh(),t)try{if(i=null,n=x8((E0(),kf),ZXe(Kjn(t))),n&&(r=n.Zh(),r&&(i=r.Dl(Pbn(t.e)))),i&&i!=e)return sqe(i)}catch(c){if(c=sr(c),!X(c,63))throw R(c)}return e}function KCn(e,n,t){var i,r,c;t.Tg("Remove overlaps",1),t.bh(n,Ype),i=u(je(n,(Gv(),V3)),26),e.f=i,e.a=RQ(u(je(n,(q0(),AI)),303)),r=re(je(n,(Xt(),Qd))),t4(e,(_n(r),r)),c=W2(i),yVe(e,n,c,t),t.bh(n,PF)}function VCn(e){var n,t,i;if(Fe(ze(je(e,(Xt(),LI))))){for(i=new Oe,t=new Un(Yn(U0(e).a.Jc(),new ee));ht(t);)n=u(rt(t),85),Uw(n)&&Fe(ze(je(n,wce)))&&Gn(i.c,n);return i}else return En(),En(),Sc}function lqe(e){if(!e)return nAe(),Zen;var n=e.valueOf?e.valueOf():e;if(n!==e){var t=rte[typeof n];return t?t(n):F1e(typeof n)}else return e instanceof Array||e instanceof k.Array?new i9(e):new c9(e)}function fqe(e,n,t){var i,r,c;switch(c=e.o,i=u(zc(e.p,t),253),r=i.i,r.b=WE(i),r.a=QE(i),r.b=k.Math.max(r.b,c.a),r.b>c.a&&!n&&(r.b=c.a),r.c=-(r.b-c.a)/2,t.g){case 1:r.d=-r.a;break;case 3:r.d=c.b}GW(i),qW(i)}function aqe(e,n,t){var i,r,c;switch(c=e.o,i=u(zc(e.p,t),253),r=i.i,r.b=WE(i),r.a=QE(i),r.a=k.Math.max(r.a,c.b),r.a>c.b&&!n&&(r.a=c.b),r.d=-(r.a-c.b)/2,t.g){case 4:r.c=-r.b;break;case 2:r.c=c.a}GW(i),qW(i)}function YCn(e,n){var t,i,r;return X(n.g,9)&&u(n.g,9).k==(Fn(),wr)?Vi:(r=R4(n),r?k.Math.max(0,e.b/2-.5):(t=Xv(n),t?(i=ne(re(G2(t,(Ie(),Tg)))),k.Math.max(0,i/2-.5)):Vi))}function QCn(e,n){var t,i,r;return X(n.g,9)&&u(n.g,9).k==(Fn(),wr)?Vi:(r=R4(n),r?k.Math.max(0,e.b/2-.5):(t=Xv(n),t?(i=ne(re(G2(t,(Ie(),Tg)))),k.Math.max(0,i/2-.5)):Vi))}function WCn(e,n){var t,i,r,c,o;if(!n.dc()){if(r=u(n.Xb(0),132),n.gc()==1){VUe(e,r,r,1,0,n);return}for(t=1;t0)try{r=al(n,Xr,oi)}catch(c){throw c=sr(c),X(c,131)?(i=c,R(new sB(i))):R(c)}return t=(!e.a&&(e.a=new dX(e)),e.a),r=0?u(K(t,r),57):null}function nTn(e,n){if(e<0)return cS(oYe,F(z(Mr,1),On,1,5,["index",ke(e)]));if(n<0)throw R(new qn(sYe+n));return cS("%s (%s) must be less than size (%s)",F(z(Mr,1),On,1,5,["index",ke(e),ke(n)]))}function tTn(e){var n,t,i,r,c;if(e==null)return Vo;for(c=new ng(To,"[","]"),t=e,i=0,r=t.length;i=0?e.Ih(t,!0,!0):Xw(e,r,!0),163)),u(i,219).Xl(n);else throw R(new qn(nb+n.ve()+LS))}function U0e(e){var n,t;return e>-0x800000000000&&e<0x800000000000?e==0?0:(n=e<0,n&&(e=-e),t=lc(k.Math.floor(k.Math.log(e)/.6931471805599453)),(!n||e!=k.Math.pow(2,t))&&++t,t):OFe(Lu(e))}function dTn(e){var n,t,i,r,c,o,l;for(c=new Fh,t=new P(e);t.a2&&l.e.b+l.j.b<=2&&(r=l,i=o),c.a.yc(r,c),r.q=i);return c}function bTn(e,n,t){t.Tg("Eades radial",1),t.bh(n,PF),e.d=u(je(n,(Gv(),V3)),26),e.c=ne(re(je(n,(q0(),GH)))),e.e=RQ(u(je(n,AI),303)),e.a=Zjn(u(je(n,e6e),426)),e.b=pAn(u(je(n,Yye),354)),nAn(e),t.bh(n,PF)}function gTn(e,n){if(n.Tg("Target Width Setter",1),ba(e,(Ha(),Kre)))Ei(e,(Qh(),_m),re(je(e,Kre)));else throw R(new md("A target width has to be set if the TargetWidthWidthApproximator should be used."));n.Ug()}function mqe(e,n){var t,i,r;return i=new za(e),Pu(i,n),he(i,(me(),cH),n),he(i,(Ie(),Zi),(Br(),to)),he(i,Nh,(Yh(),tG)),Mf(i,(Fn(),wr)),t=new Qu,wu(t,i),Ar(t,(De(),Vn)),r=new Qu,wu(r,i),Ar(r,et),i}function vqe(e,n){var t,i,r,c,o;for(e.c[n.p]=!0,Te(e.a,n),o=new P(n.j);o.a=c)o.$b();else for(r=o.Jc(),i=0;i0?Noe():o<0&&Sqe(e,n,-o),!0):!1}function QE(e){var n,t,i,r,c,o,l;if(l=0,e.b==0){for(o=tHe(e,!0),n=0,i=o,r=0,c=i.length;r0&&(l+=t,++n);n>1&&(l+=e.c*(n-1))}else l=sAe(HY(C2(li(vV(e.a),new ud),new Cp)));return l>0?l+e.n.d+e.n.a:0}function WE(e){var n,t,i,r,c,o,l;if(l=0,e.b==0)l=sAe(HY(C2(li(vV(e.a),new b5),new l0)));else{for(o=iHe(e,!0),n=0,i=o,r=0,c=i.length;r0&&(l+=t,++n);n>1&&(l+=e.c*(n-1))}return l>0?l+e.n.b+e.n.c:0}function kTn(e){var n,t;if(e.c.length!=2)throw R(new Uc("Order only allowed for two paths."));n=(kn(0,e.c.length),u(e.c[0],17)),t=(kn(1,e.c.length),u(e.c[1],17)),n.d.i!=t.c.i&&(e.c.length=0,Gn(e.c,t),Gn(e.c,n))}function xqe(e,n,t){var i;for(vw(t,n.g,n.f),Il(t,n.i,n.j),i=0;i<(!n.a&&(n.a=new we(Ft,n,10,11)),n.a).i;i++)xqe(e,u(K((!n.a&&(n.a=new we(Ft,n,10,11)),n.a),i),26),u(K((!t.a&&(t.a=new we(Ft,t,10,11)),t.a),i),26))}function jTn(e,n){var t,i,r,c;for(c=u(zc(e.b,n),127),t=c.a,r=u(u(vi(e.r,n),22),83).Jc();r.Ob();)i=u(r.Pb(),115),i.c&&(t.a=k.Math.max(t.a,wfe(i.c)));if(t.a>0)switch(n.g){case 2:c.n.c=e.s;break;case 4:c.n.b=e.s}}function ETn(e,n){var t,i,r;return t=u(C(n,(Hf(),Ay)),15).a-u(C(e,Ay),15).a,t==0?(i=Nr(pc(u(C(e,(L0(),YN)),8)),u(C(e,ZS),8)),r=Nr(pc(u(C(n,YN),8)),u(C(n,ZS),8)),ji(i.a*i.b,r.a*r.b)):t}function STn(e,n){var t,i,r;return t=u(C(n,(Mu(),BH)),15).a-u(C(e,BH),15).a,t==0?(i=Nr(pc(u(C(e,(Ti(),EI)),8)),u(C(e,P7),8)),r=Nr(pc(u(C(n,EI),8)),u(C(n,P7),8)),ji(i.a*i.b,r.a*r.b)):t}function Aqe(e){var n,t;return t=new y0,t.a+="e_",n=F7n(e),n!=null&&(t.a+=""+n),e.c&&e.d&&(Kt((t.a+=" ",t),wz(e.c)),Kt(uo((t.a+="[",t),e.c.i),"]"),Kt((t.a+=nee,t),wz(e.d)),Kt(uo((t.a+="[",t),e.d.i),"]")),t.a}function Mqe(e){switch(e.g){case 0:return new DU;case 1:return new lP;case 2:return new _U;case 3:return new AC;default:throw R(new qn("No implementation is available for the layout phase "+(e.f!=null?e.f:""+e.g)))}}function V0e(e,n,t,i,r){var c;switch(c=0,r.g){case 1:c=k.Math.max(0,n.b+e.b-(t.b+i));break;case 3:c=k.Math.max(0,-e.b-i);break;case 2:c=k.Math.max(0,-e.a-i);break;case 4:c=k.Math.max(0,n.a+e.a-(t.a+i))}return c}function Cqe(e,n,t){var i,r,c,o,l;if(t)for(r=t.a.length,i=new Jb(r),l=(i.b-i.a)*i.c<0?(S0(),Eb):new M0(i);l.Ob();)o=u(l.Pb(),15),c=F9(t,o.a),F2e in c.a||Ane in c.a?CDn(e,c,n):VRn(e,c,n),npn(u(zn(e.c,g8(c)),85))}function Y0e(e){var n,t;switch(e.b){case-1:return!0;case 0:return t=e.t,t>1||t==-1?(e.b=-1,!0):(n=ff(e),n&&(Tc(),n.jk()==een)?(e.b=-1,!0):(e.b=1,!1));default:case 1:return!1}}function Q0e(e,n){var t,i,r,c;if(fi(e),e.c!=0||e.a!=123)throw R(new Bt(Ht((Lt(),jZe))));if(c=n==112,i=e.d,t=E9(e.i,125,i),t<0)throw R(new Bt(Ht((Lt(),EZe))));return r=of(e.i,i,t),e.d=t+1,$$e(r,c,(e.e&512)==512)}function xTn(e){var n,t,i,r,c,o,l;for(l=Jh(e.c.length),r=new P(e);r.a=0&&i=0?e.Ih(t,!0,!0):Xw(e,r,!0),163)),u(i,219).Ul(n);throw R(new qn(nb+n.ve()+pne))}function MTn(){nse();var e;return ehn?u(x8((E0(),kf),hf),2e3):(ti(yg,new DL),p$n(),e=u(X(lo((E0(),kf),hf),548)?lo(kf,hf):new NDe,548),ehn=!0,wBn(e),jBn(e),ei((ese(),V8e),e,new Ev),Kc(kf,hf,e),e)}function CTn(e,n){var t,i,r,c;e.j=-1,Fs(e.e)?(t=e.i,c=e.i!=0,WT(e,n),i=new L1(e.e,3,e.c,null,n,t,c),r=n.xl(e.e,e.c,null),r=cGe(e,n,r),r?(r.lj(i),r.mj()):hi(e.e,i)):(WT(e,n),r=n.xl(e.e,e.c,null),r&&r.mj())}function Cz(e,n){var t,i,r;if(r=0,i=n[0],i>=e.length)return-1;for(t=(Qn(i,e.length),e.charCodeAt(i));t>=48&&t<=57&&(r=r*10+(t-48),++i,!(i>=e.length));)t=(Qn(i,e.length),e.charCodeAt(i));return i>n[0]?n[0]=i:r=-1,r}function TTn(e,n,t){var i,r,c,o,l;o=e.c,l=e.d,c=mu(F(z(Lr,1),Me,8,0,[o.i.n,o.n,o.a])).b,r=(c+mu(F(z(Lr,1),Me,8,0,[l.i.n,l.n,l.a])).b)/2,i=null,o.j==(De(),et)?i=new Se(n+o.i.c.c.a+t,r):i=new Se(n-t,r),S9(e.a,0,i)}function Uw(e){var n,t,i,r;for(n=null,i=Uh(Rl(F(z(Xl,1),On,20,0,[(!e.b&&(e.b=new Nn(mt,e,4,7)),e.b),(!e.c&&(e.c=new Nn(mt,e,5,8)),e.c)])));ht(i);)if(t=u(rt(i),84),r=iu(t),!n)n=r;else if(n!=r)return!1;return!0}function EW(e,n,t){var i;if(++e.j,n>=e.i)throw R(new jo(Cne+n+pg+e.i));if(t>=e.i)throw R(new jo(Tne+t+pg+e.i));return i=e.g[t],n!=t&&(n>16),n=i>>16&16,t=16-n,e=e>>n,i=e-256,n=i>>16&8,t+=n,e<<=n,i=e-cm,n=i>>16&4,t+=n,e<<=n,i=e-jh,n=i>>16&2,t+=n,e<<=n,i=e>>14,n=i&~(i>>1),t+2-n)}function OTn(e,n){var t,i,r;for(r=new Oe,i=St(n.a,0);i.b!=i.d.c;)t=u(jt(i),65),t.c.g==e.g&&ue(C(t.b,(Mu(),Dh)))!==ue(C(t.c,Dh))&&!Vv(new mn(null,new vn(r,16)),new NEe(t))&&Gn(r.c,t);return Tr(r,new Ck),r}function Oqe(e,n,t){var i,r,c,o;return X(n,155)&&X(t,155)?(c=u(n,155),o=u(t,155),e.a[c.a][o.a]+e.a[o.a][c.a]):X(n,251)&&X(t,251)&&(i=u(n,251),r=u(t,251),i.a==r.a)?u(C(r.a,(Hf(),Ay)),15).a:0}function Nqe(e,n){var t,i,r,c,o,l,f,h;for(h=ne(re(C(n,(Ie(),kx)))),f=e[0].n.a+e[0].o.a+e[0].d.c+h,l=1;l=0?t:(l=aE(Nr(new Se(o.c+o.b/2,o.d+o.a/2),new Se(c.c+c.b/2,c.d+c.a/2))),-(sKe(c,o)-1)*l)}function ITn(e,n,t){var i;er(new mn(null,(!t.a&&(t.a=new we($i,t,6,6)),new vn(t.a,16))),new ICe(e,n)),er(new mn(null,(!t.n&&(t.n=new we(Eu,t,1,7)),new vn(t.n,16))),new DCe(e,n)),i=u(je(t,(Xt(),Z3)),78),i&&Zhe(i,e,n)}function Xw(e,n,t){var i,r,c;if(c=w3((ls(),nc),e.Ah(),n),c)return Tc(),u(c,69).vk()||(c=$4(Vc(nc,c))),r=(i=e.Fh(c),u(i>=0?e.Ih(i,!0,!0):Xw(e,c,!0),163)),u(r,219).Ql(n,t);throw R(new qn(nb+n.ve()+pne))}function W0e(e,n,t,i){var r,c,o,l,f;if(r=e.d[n],r){if(c=r.g,f=r.i,i!=null){for(l=0;l=t&&(i=n,h=(f.c+f.a)/2,o=h-t,f.c<=h-t&&(r=new WK(f.c,o),zb(e,i++,r)),l=h+t,l<=f.a&&(c=new WK(l,f.a),N2(i,e.c.length),_j(e.c,i,c)))}function Lqe(e,n,t){var i,r,c,o,l,f;if(!n.dc()){for(r=new xi,f=n.Jc();f.Ob();)for(l=u(f.Pb(),40),ei(e.a,ke(l.g),ke(t)),o=(i=St(new S1(l).a.d,0),new Cv(i));WC(o.a);)c=u(jt(o.a),65).c,Ki(r,c,r.c.b,r.c);Lqe(e,r,t+1)}}function Z0e(e){var n;if(!e.c&&e.g==null)e.d=e._i(e.f),Et(e,e.d),n=e.d;else{if(e.g==null)return!0;if(e.i==0)return!1;n=u(e.g[e.i-1],50)}return n==e.b&&null.Tm>=null.Sm()?(Nz(e),Z0e(e)):n.Ob()}function Pqe(e){if(this.a=e,e.c.i.k==(Fn(),wr))this.c=e.c,this.d=u(C(e.c.i,(me(),Iu)),64);else if(e.d.i.k==wr)this.c=e.d,this.d=u(C(e.d.i,(me(),Iu)),64);else throw R(new qn("Edge "+e+" is not an external edge."))}function $qe(e,n){var t,i,r;r=e.b,e.b=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,3,r,e.b)),n?n!=e&&(Mo(e,n.zb),IY(e,n.d),t=(i=n.c,i??n.zb),_Y(e,t==null||gn(t,n.zb)?null:t)):(Mo(e,null),IY(e,0),_Y(e,null))}function Rqe(e){!tte&&(tte=SRn());var n=e.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g,function(t){return m4n(t)});return'"'+n+'"'}function ebe(e,n,t,i,r,c){var o,l,f,h,b;if(r!=0)for(ue(e)===ue(t)&&(e=e.slice(n,n+r),n=0),f=t,l=n,h=n+r;l=o)throw R(new k2(n,o));return r=t[n],o==1?i=null:(i=se(Bce,_ne,415,o-1,0,1),Wu(t,0,i,0,n),c=o-n-1,c>0&&Wu(t,n+1,i,n,c)),p8(e,i),cqe(e,n,r),r}function Bqe(e){var n,t;if(e.f){for(;e.n0)for(o=e.c.d,l=e.d.d,r=A1(Nr(new Se(l.a,l.b),o),1/(i+1)),c=new Se(o.a,o.b),t=new P(e.a);t.a0?c=Y4(t):c=NO(Y4(t))),Ei(n,O7,c)}function Gqe(e,n){var t,i;if(e.c.length!=0){if(e.c.length==2)sy((kn(0,e.c.length),u(e.c[0],9)),(fl(),l1)),sy((kn(1,e.c.length),u(e.c[1],9)),gb);else for(i=new P(e);i.a0&&nN(e,t,n),c):i.a!=null?(nN(e,n,t),-1):r.a!=null?(nN(e,t,n),1):0}function qqe(e){UV();var n,t,i,r,c,o,l;for(t=new D0,r=new P(e.e.b);r.a=0;)i=t[c],o.$l(i.Jk())&&Et(r,i);!JVe(e,r)&&Fs(e.e)&&f9(e,n.Hk()?O0(e,6,n,(En(),Sc),null,-1,!1):O0(e,n.rk()?2:1,n,null,null,-1,!1))}function JTn(e,n){var t,i,r,c,o;return e.a==(j8(),cx)?!0:(c=n.a.c,t=n.a.c+n.a.b,!(n.j&&(i=n.A,o=i.c.c.a-i.o.a/2,r=c-(i.n.a+i.o.a),r>o)||n.q&&(i=n.C,o=i.c.c.a-i.o.a/2,r=i.n.a-t,r>o)))}function Xqe(e,n,t){var i,r,c,o,l,f;for(i=0,f=t,n||(i=t*(e.c.length-1),f*=-1),c=new P(e);c.a=0?e.xh(null):e.Mh().Qh(e,-1-n,null,null)),e.yh(u(r,52),t),i&&i.mj(),e.sh()&&e.th()&&t>-1&&hi(e,new Dr(e,9,t,c,r)),r):c}function rbe(e,n){var t,i,r,c,o;for(c=e.b.Ae(n),i=(t=e.a.get(c),t??se(Mr,On,1,0,5,1)),o=0;o>5,r>=e.d)return e.e<0;if(t=e.a[r],n=1<<(n&31),e.e<0){if(i=WBe(e),r>16)),16).bd(c),l0&&(!(x1(e.a.c)&&n.n.d)&&!(Rv(e.a.c)&&n.n.b)&&(n.g.d+=k.Math.max(0,i/2-.5)),!(x1(e.a.c)&&n.n.a)&&!(Rv(e.a.c)&&n.n.c)&&(n.g.a-=i-1))}function uUe(e,n,t){var i,r,c,o,l,f;c=u(Pe(n.e,0),17).c,i=c.i,r=i.k,f=u(Pe(t.g,0),17).d,o=f.i,l=o.k,r==(Fn(),dr)?he(e,(me(),Ea),u(C(i,Ea),12)):he(e,(me(),Ea),c),l==dr?he(e,(me(),gf),u(C(o,gf),12)):he(e,(me(),gf),f)}function oUe(e,n){var t,i,r,c,o,l;for(c=new P(e.b);c.a>n,c=e.m>>n|t<<22-n,r=e.l>>n|e.m<<22-n):n<44?(o=i?G1:0,c=t>>n-22,r=e.m>>n-22|t<<44-n):(o=i?G1:0,c=i?Ls:0,r=t>>n-44),_o(r&Ls,c&Ls,o&G1)}function sUe(e,n){var t,i,r,c,o,l,f,h,b;if(e.a.f>0&&X(n,45)&&(e.a.Zj(),h=u(n,45),f=h.jd(),c=f==null?0:Ni(f),o=Nle(e.a,c),t=e.a.d[o],t)){for(i=u(t.g,374),b=t.i,l=0;l=2)for(t=r.Jc(),n=re(t.Pb());t.Ob();)c=n,n=re(t.Pb()),i=k.Math.min(i,(_n(n),n-(_n(c),c)));return i}function aOn(e,n){var t,i,r;for(r=new Oe,i=St(n.a,0);i.b!=i.d.c;)t=u(jt(i),65),t.b.g==e.g&&!gn(t.b.c,_F)&&ue(C(t.b,(Mu(),Dh)))!==ue(C(t.c,Dh))&&!Vv(new mn(null,new vn(r,16)),new IEe(t))&&Gn(r.c,t);return Tr(r,new cw),r}function hOn(e,n){var t,i,r;if(ue(n)===ue(Nt(e)))return!0;if(!X(n,16)||(i=u(n,16),r=e.gc(),r!=i.gc()))return!1;if(X(i,59)){for(t=0;t0&&(r=t),o=new P(e.f.e);o.a0?r+=n:r+=1;return r}function yOn(e,n){var t,i,r,c,o,l,f,h,b,p;h=e,f=wE(h,"individualSpacings"),f&&(i=ba(n,(Xt(),Xy)),o=!i,o&&(r=new z6,Ei(n,Xy,r)),l=u(je(n,Xy),379),p=f,c=null,p&&(c=(b=zY(p,se(He,Me,2,0,6,1)),new $X(p,b))),c&&(t=new HCe(p,l),cc(c,t)))}function kOn(e,n){var t,i,r,c,o,l,f,h,b,p,y;return f=null,p=e,b=null,(oZe in p.a||sZe in p.a||HF in p.a)&&(h=null,y=l1e(n),o=wE(p,oZe),t=new wSe(y),YFe(t.a,o),l=wE(p,sZe),i=new xSe(y),QFe(i.a,l),c=Dw(p,HF),r=new CSe(y),h=(iGe(r.a,c),c),b=h),f=b,f}function jOn(e,n){var t,i,r;if(n===e)return!0;if(X(n,540)){if(r=u(n,833),e.a.d!=r.a.d||qv(e).gc()!=qv(r).gc())return!1;for(i=qv(r).Jc();i.Ob();)if(t=u(i.Pb(),416),uLe(e,t.a.jd())!=u(t.a.kd(),18).gc())return!1;return!0}return!1}function EOn(e,n){var t,i,r,c;for(c=new P(n.a);c.an.c?1:e.bn.b?1:e.a!=n.a?Ni(e.a)-Ni(n.a):e.d==(vE(),Ox)&&n.d==Tx?-1:e.d==Tx&&n.d==Ox?1:0}function AW(e){var n,t,i,r,c,o,l,f;for(r=Vi,i=Ir,t=new P(e.e.b);t.a0&&r0):r<0&&-r0):!1}function xOn(e,n,t,i){var r,c,o,l,f,h,b,p;for(r=(n-e.d)/e.c.c.length,c=0,e.a+=t,e.d=n,p=new P(e.c);p.a>24;return o}function MOn(e){if(e.xe()){var n=e.c;n.ye()?e.o="["+n.n:n.xe()?e.o="["+n.ve():e.o="[L"+n.ve()+";",e.b=n.ue()+"[]",e.k=n.we()+"[]";return}var t=e.j,i=e.d;i=i.split("/"),e.o=CQ(".",[t,CQ("$",i)]),e.b=CQ(".",[t,CQ(".",i)]),e.k=i[i.length-1]}function COn(e,n){var t,i,r,c,o;for(o=null,c=new P(e.e.a);c.a0&&lN(n,(kn(i-1,e.c.length),u(e.c[i-1],9)),r)>0;)ul(e,i,(kn(i-1,e.c.length),u(e.c[i-1],9))),--i;kn(i,e.c.length),e.c[i]=r}n.b=new wt,n.g=new wt}function yUe(e,n,t){var i,r,c;for(i=1;i0&&n.Le((kn(r-1,e.c.length),u(e.c[r-1],9)),c)>0;)ul(e,r,(kn(r-1,e.c.length),u(e.c[r-1],9))),--r;kn(r,e.c.length),e.c[r]=c}t.a=new wt,t.b=new wt}function Oz(e,n,t){var i,r,c,o,l,f,h,b,p,y;for(c=n.Jc();c.Ob();)r=u(c.Pb(),26),b=r.i+r.g/2,y=r.j+r.f/2,f=e.f,o=f.i+f.g/2,l=f.j+f.f/2,h=b-o,p=y-l,i=k.Math.sqrt(h*h+p*p),h*=e.e/i,p*=e.e/i,t?(b-=h,y-=p):(b+=h,y+=p),Os(r,b-r.g/2),Ns(r,y-r.f/2)}function h3(e){var n,t,i;if(!e.c&&e.b!=null){for(n=e.b.length-4;n>=0;n-=2)for(t=0;t<=n;t+=2)(e.b[t]>e.b[t+2]||e.b[t]===e.b[t+2]&&e.b[t+1]>e.b[t+3])&&(i=e.b[t+2],e.b[t+2]=e.b[t],e.b[t]=i,i=e.b[t+3],e.b[t+3]=e.b[t+1],e.b[t+1]=i);e.c=!0}}function Ff(e){var n,t;return t=new tl(Pb(e.Pm)),t.a+="@",Kt(t,(n=Ni(e)>>>0,n.toString(16))),e.Sh()?(t.a+=" (eProxyURI: ",uo(t,e.Yh()),e.Hh()&&(t.a+=" eClass: ",uo(t,e.Hh())),t.a+=")"):e.Hh()&&(t.a+=" (eClass: ",uo(t,e.Hh()),t.a+=")"),t.a}function nS(e){var n,t,i,r;if(e.e)throw R(new Uc((M1(gte),UZ+gte.k+XZ)));for(e.d==(vr(),nh)&&Qz(e,Zc),t=new P(e.a.a);t.a>24}return t}function _On(e,n,t){var i,r,c;if(r=u(zc(e.i,n),318),!r)if(r=new GRe(e.d,n,t),I4(e.i,n,r),mde(n))epn(e.a,n.c,n.b,r);else switch(c=TCn(n),i=u(zc(e.p,c),253),c.g){case 1:case 3:r.j=!0,AX(i,n.b,r);break;case 4:case 2:r.k=!0,AX(i,n.c,r)}return r}function LOn(e,n,t,i){var r,c,o,l,f,h;if(l=new J6,f=Po(e.e.Ah(),n),r=u(e.g,122),Tc(),u(n,69).vk())for(o=0;o=0)return r;for(c=1,l=new P(n.j);l.a=0)return r;for(c=1,l=new P(n.j);l.a=0?(n||(n=new Ej,i>0&&Bc(n,(Qr(0,i,e.length),e.substr(0,i)))),n.a+="\\",_9(n,t&yr)):n&&_9(n,t&yr);return n?n.a:e}function $On(e){var n,t,i;for(t=new P(e.a.a.b);t.a0&&(!(x1(e.a.c)&&n.n.d)&&!(Rv(e.a.c)&&n.n.b)&&(n.g.d-=k.Math.max(0,i/2-.5)),!(x1(e.a.c)&&n.n.a)&&!(Rv(e.a.c)&&n.n.c)&&(n.g.a+=k.Math.max(0,i-1)))}function AUe(e,n,t){var i,r;if((e.c-e.b&e.a.length-1)==2)n==(De(),Kn)||n==et?(bB(u(OE(e),16),(fl(),l1)),bB(u(OE(e),16),gb)):(bB(u(OE(e),16),(fl(),gb)),bB(u(OE(e),16),l1));else for(r=new dE(e);r.a!=r.b;)i=u(JB(r),16),bB(i,t)}function ROn(e,n,t){var i,r,c,o,l,f,h,b,p;for(b=-1,p=0,l=n,f=0,h=l.length;f0&&++p;++b}return p}function BOn(e,n){var t,i,r,c,o,l,f;for(r=T9(new roe(e)),l=new qr(r,r.c.length),c=T9(new roe(n)),f=new qr(c,c.c.length),o=null;l.b>0&&f.b>0&&(t=(at(l.b>0),u(l.a.Xb(l.c=--l.b),26)),i=(at(f.b>0),u(f.a.Xb(f.c=--f.b),26)),t==i);)o=t;return o}function zOn(e,n){var t,i,r,c;for(n.Tg("Self-Loop pre-processing",1),i=new P(e.a);i.agLe(e,t)?(i=vu(t,(De(),et)),e.d=i.dc()?0:iV(u(i.Xb(0),12)),o=vu(n,Vn),e.b=o.dc()?0:iV(u(o.Xb(0),12))):(r=vu(t,(De(),Vn)),e.d=r.dc()?0:iV(u(r.Xb(0),12)),c=vu(n,et),e.b=c.dc()?0:iV(u(c.Xb(0),12)))}function FOn(e){var n,t,i,r,c,o,l,f;n=!0,r=null,c=null;e:for(f=new P(e.a);f.ae.c));o++)r.a>=e.s&&(c<0&&(c=o),l=o);return f=(e.s+e.c)/2,c>=0&&(i=ADn(e,n,c,l),f=Ngn((kn(i,n.c.length),u(n.c[i],340))),PTn(n,i,t)),f}function Ct(e,n,t){var i,r,c,o,l,f,h;for(o=(c=new Nb,c),Hhe(o,(_n(n),n)),h=(!o.b&&(o.b=new Hs((jn(),Ac),Du,o)),o.b),f=1;f=2}function qOn(e,n,t,i,r){var c,o,l,f,h,b;for(c=e.c.d.j,o=u(Yu(t,0),8),b=1;b1||(n=Ci(Yf,F(z($c,1),Ee,96,0,[W1,Qf])),pO(PR(n,e))>1)||(i=Ci(Zf,F(z($c,1),Ee,96,0,[f1,pf])),pO(PR(i,e))>1))}function TUe(e){var n,t,i,r,c,o,l;for(n=0,i=new P(e.a);i.a0&&(i.b.n-=i.c,i.b.n<=0&&i.b.u>0&&Vt(n,i.b));for(r=new P(e.i);r.a0&&(i.a.u-=i.c,i.a.u<=0&&i.a.n>0&&Vt(t,i.a))}function Nz(e){var n,t,i,r,c;if(e.g==null&&(e.d=e._i(e.f),Et(e,e.d),e.c))return c=e.f,c;if(n=u(e.g[e.i-1],50),r=n.Pb(),e.e=n,t=e._i(r),t.Ob())e.d=t,Et(e,t);else for(e.d=null;!n.Ob()&&(ir(e.g,--e.i,null),e.i!=0);)i=u(e.g[e.i-1],50),n=i;return r}function XOn(e,n){var t,i,r,c,o,l;if(i=n,r=i.Jk(),J1(e.e,r)){if(r.Qi()&&qR(e,r,i.kd()))return!1}else for(l=Po(e.e.Ah(),r),t=u(e.g,122),c=0;c1||t>1)return 2;return n+t==1?2:0}function Ds(e,n){var t,i,r,c,o,l;return c=e.a*JZ+e.b*1502,l=e.b*JZ+11,t=k.Math.floor(l*kN),c+=t,l-=t*Uge,c%=Uge,e.a=c,e.b=l,n<=24?k.Math.floor(e.a*qme[n]):(r=e.a*(1<=2147483648&&(i-=4294967296),i)}function IUe(e,n,t){var i,r,c,o,l,f,h;for(c=new Oe,h=new xi,o=new xi,hLn(e,h,o,n),XPn(e,h,o,n,t),f=new P(e);f.ai.b.g&&Gn(c.c,i);return c}function ZOn(e,n,t){var i,r,c,o,l,f;for(l=e.c,o=(t.q?t.q:(En(),En(),r1)).vc().Jc();o.Ob();)c=u(o.Pb(),45),i=!w9(li(new mn(null,new vn(l,16)),new s9(new yCe(n,c)))).zd(($b(),Sy)),i&&(f=c.kd(),X(f,4)&&(r=yde(f),r!=null&&(f=r)),n.of(u(c.jd(),147),f))}function eNn(e,n){var t,i,r,c;for(n.Tg("Resize child graph to fit parent.",1),i=new P(e.b);i.a1)for(r=new P(e.a);r.a=0?e.Ih(i,!0,!0):Xw(e,c,!0),163)),u(r,219).Vl(n,t)}else throw R(new qn(nb+n.ve()+LS))}function iNn(e,n,t){var i,r,c,o,l,f;if(f=Ele(e,u(zn(e.e,n),26)),l=null,f)switch(f.g){case 3:i=Xse(e,T2(n)),l=(_n(t),t+(_n(i),i));break;case 2:r=Xse(e,T2(n)),o=(_n(t),t+(_n(r),r)),c=Xse(e,u(zn(e.e,n),26)),l=o-(_n(c),c);break;default:l=t}else l=t;return l}function rNn(e,n,t){var i,r,c,o,l,f;if(f=Ele(e,u(zn(e.e,n),26)),l=null,f)switch(f.g){case 3:i=Kse(e,T2(n)),l=(_n(t),t+(_n(i),i));break;case 2:r=Kse(e,T2(n)),o=(_n(t),t+(_n(r),r)),c=Kse(e,u(zn(e.e,n),26)),l=o-(_n(c),c);break;default:l=t}else l=t;return l}function Iz(e,n){var t,i,r,c,o;if(n){for(c=X(e.Cb,88)||X(e.Cb,103),o=!c&&X(e.Cb,335),i=new st((!n.a&&(n.a=new iE(n,Rc,n)),n.a));i.e!=i.i.gc();)if(t=u(ft(i),87),r=Gz(t),c?X(r,88):o?X(r,159):r)return r;return c?(jn(),jf):(jn(),rh)}else return null}function cNn(e,n){var t,i,r,c,o;for(t=new Oe,r=lu(new mn(null,new vn(e,16)),new z5),c=lu(new mn(null,new vn(e,16)),new Mk),o=V9n(w9n(C2(wNn(F(z(DBn,1),On,832,0,[r,c])),new m_))),i=1;i=2*n&&Te(t,new WK(o[i-1]+n,o[i]-n));return t}function DUe(e,n,t){var i,r,c,o,l,f,h,b;if(t)for(c=t.a.length,i=new Jb(c),l=(i.b-i.a)*i.c<0?(S0(),Eb):new M0(i);l.Ob();)o=u(l.Pb(),15),r=F9(t,o.a),r&&(f=j6n(e,(h=(j0(),b=new voe,b),n&&kbe(h,n),h),r),V9(f,N1(r,Ch)),jz(r,f),H0e(r,f),nQ(e,r,f))}function Dz(e){var n,t,i,r,c,o;if(!e.j){if(o=new EL,n=lA,c=n.a.yc(e,n),c==null){for(i=new st(tu(e));i.e!=i.i.gc();)t=u(ft(i),29),r=Dz(t),nr(o,r),Et(o,t);n.a.Ac(e)!=null}F2(o),e.j=new Pv((u(K(ge((C0(),Bn).o),11),19),o.i),o.g),Ms(e).b&=-33}return e.j}function uNn(e){var n,t,i,r;if(e==null)return null;if(i=bo(e,!0),r=qN.length,gn(i.substr(i.length-r,r),qN)){if(t=i.length,t==4){if(n=(Qn(0,i.length),i.charCodeAt(0)),n==43)return g7e;if(n==45)return khn}else if(t==3)return g7e}return new aoe(i)}function oNn(e){var n,t,i;return t=e.l,(t&t-1)!=0||(i=e.m,(i&i-1)!=0)||(n=e.h,(n&n-1)!=0)||n==0&&i==0&&t==0?-1:n==0&&i==0&&t!=0?Phe(t):n==0&&i!=0&&t==0?Phe(i)+22:n!=0&&i==0&&t==0?Phe(n)+44:-1}function d3(e,n){var t,i,r,c,o;for(r=n.a&e.f,c=null,i=e.b[r];;i=i.b){if(i==n){c?c.b=n.b:e.b[r]=n.b;break}c=i}for(o=n.f&e.f,c=null,t=e.c[o];;t=t.d){if(t==n){c?c.d=n.d:e.c[o]=n.d;break}c=t}n.e?n.e.c=n.c:e.a=n.c,n.c?n.c.e=n.e:e.e=n.e,--e.i,++e.g}function sNn(e,n){var t;n.d?n.d.b=n.b:e.a=n.b,n.b?n.b.d=n.d:e.e=n.d,!n.e&&!n.c?(t=u(uf(u(z4(e.b,n.a),262)),262),t.a=0,++e.c):(t=u(uf(u(zn(e.b,n.a),262)),262),--t.a,n.e?n.e.c=n.c:t.b=u(uf(n.c),497),n.c?n.c.e=n.e:t.c=u(uf(n.e),497)),--e.d}function CW(e,n){var t,i,r,c;for(c=new qr(e,0),t=(at(c.b0),c.a.Xb(c.c=--c.b),y2(c,r),at(c.b3&&Vh(e,0,n-3))}function fNn(e){var n,t,i,r;return ue(C(e,(Ie(),Em)))===ue((B1(),Wd))?!e.e&&ue(C(e,hI))!==ue((e8(),rI)):(i=u(C(e,Nie),302),r=Fe(ze(C(e,Iie)))||ue(C(e,px))===ue((zE(),tI)),n=u(C(e,z5e),15).a,t=e.a.c.length,!r&&i!=(e8(),rI)&&(n==0||n>t))}function aNn(e,n){var t,i,r,c,o,l,f;for(r=e.Jc();r.Ob();)for(i=u(r.Pb(),9),l=new Qu,wu(l,i),Ar(l,(De(),et)),he(l,(me(),uH),($n(),!0)),o=n.Jc();o.Ob();)c=u(o.Pb(),9),f=new Qu,wu(f,c),Ar(f,Vn),he(f,uH,!0),t=new Ow,he(t,uH,!0),fc(t,l),Gr(t,f)}function hNn(e){var n,t;for(t=0;t0);t++);if(t>0&&t0);n++);return n>0&&t>16!=6&&n){if(m8(e,n))throw R(new qn(PS+Kqe(e)));i=null,e.Cb&&(i=(t=e.Db>>16,t>=0?Jde(e,i):e.Cb.Qh(e,-1-t,null,i))),n&&(i=Z4(n,e,6,i)),i=Tle(e,n,i),i&&i.mj()}else(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,6,n,n))}function _z(e,n){var t,i;if(n!=e.Cb||e.Db>>16!=3&&n){if(m8(e,n))throw R(new qn(PS+RKe(e)));i=null,e.Cb&&(i=(t=e.Db>>16,t>=0?Ude(e,i):e.Cb.Qh(e,-1-t,null,i))),n&&(i=Z4(n,e,12,i)),i=Cle(e,n,i),i&&i.mj()}else(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,3,n,n))}function kbe(e,n){var t,i;if(n!=e.Cb||e.Db>>16!=9&&n){if(m8(e,n))throw R(new qn(PS+LXe(e)));i=null,e.Cb&&(i=(t=e.Db>>16,t>=0?Gde(e,i):e.Cb.Qh(e,-1-t,null,i))),n&&(i=Z4(n,e,9,i)),i=Ole(e,n,i),i&&i.mj()}else(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,9,n,n))}function A8(e){var n,t,i,r,c;if(i=ff(e),c=e.j,c==null&&i)return e.Hk()?null:i.gk();if(X(i,159)){if(t=i.hk(),t&&(r=t.ti(),r!=e.i)){if(n=u(i,159),n.lk())try{e.g=r.qi(n,c)}catch(o){if(o=sr(o),X(o,80))e.g=null;else throw R(o)}e.i=r}return e.g}return null}function RUe(e){var n;return n=new Oe,Te(n,new g4(new Se(e.c,e.d),new Se(e.c+e.b,e.d))),Te(n,new g4(new Se(e.c,e.d),new Se(e.c,e.d+e.a))),Te(n,new g4(new Se(e.c+e.b,e.d+e.a),new Se(e.c+e.b,e.d))),Te(n,new g4(new Se(e.c+e.b,e.d+e.a),new Se(e.c,e.d+e.a))),n}function bNn(e){var n,t,i,r;for(i=e.a.d.j,r=e.c.d.j,t=new P(e.i.d);t.a>>0),t.toString(16)),qEn(G7n(),(y9(),"Exception during lenientFormat for "+i),n),"<"+i+" threw "+Pb(n.Pm)+">";throw R(r)}}function wNn(e){var n,t,i,r,c,o,l,f,h;for(i=!1,n=336,t=0,c=new eNe(e.length),l=e,f=0,h=l.length;f1)for(n=kw((t=new Lb,++e.b,t),e.d),l=St(c,0);l.b!=l.d.c;)o=u(jt(l),124),Jf(Of(Tf(Nf(Cf(new tf,1),0),n),o))}function Lz(e,n){var t,i;if(n!=e.Cb||e.Db>>16!=11&&n){if(m8(e,n))throw R(new qn(PS+Jbe(e)));i=null,e.Cb&&(i=(t=e.Db>>16,t>=0?Xde(e,i):e.Cb.Qh(e,-1-t,null,i))),n&&(i=Z4(n,e,10,i)),i=Gle(e,n,i),i&&i.mj()}else(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,11,n,n))}function kNn(e,n,t){var i,r,c,o,l,f;if(c=0,o=0,e.c)for(f=new P(e.d.i.j);f.ac.a?-1:r.af){for(b=e.d,e.d=se(z8e,nme,67,2*f+4,0,1),c=0;c=9223372036854776e3?(U9(),jme):(r=!1,e<0&&(r=!0,e=-e),i=0,e>=hg&&(i=lc(e/hg),e-=i*hg),t=0,e>=dy&&(t=lc(e/dy),e-=t*dy),n=lc(e),c=_o(n,t,i),r&&eQ(c),c)}function DNn(e){var n,t,i,r,c;if(c=new Oe,Ao(e.b,new Kke(c)),e.b.c.length=0,c.c.length!=0){for(n=(kn(0,c.c.length),u(c.c[0],80)),t=1,i=c.c.length;t>16!=7&&n){if(m8(e,n))throw R(new qn(PS+HGe(e)));i=null,e.Cb&&(i=(t=e.Db>>16,t>=0?Hde(e,i):e.Cb.Qh(e,-1-t,null,i))),n&&(i=u(n,52).Oh(e,1,QI,i)),i=Mfe(e,n,i),i&&i.mj()}else(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,7,n,n))}function FUe(e,n){var t,i;if(n!=e.Cb||e.Db>>16!=3&&n){if(m8(e,n))throw R(new qn(PS+IFe(e)));i=null,e.Cb&&(i=(t=e.Db>>16,t>=0?qde(e,i):e.Cb.Qh(e,-1-t,null,i))),n&&(i=u(n,52).Oh(e,0,ZI,i)),i=Cfe(e,n,i),i&&i.mj()}else(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,3,n,n))}function TW(e,n){C8();var t,i,r,c,o,l,f,h,b;return n.d>e.d&&(l=e,e=n,n=l),n.d<63?EIn(e,n):(o=(e.d&-2)<<4,h=Vae(e,o),b=Vae(n,o),i=VW(e,B4(h,o)),r=VW(n,B4(b,o)),f=TW(h,b),t=TW(i,r),c=TW(VW(h,i),VW(r,b)),c=tZ(tZ(c,f),t),c=B4(c,o),f=B4(f,o<<1),tZ(tZ(f,c),t))}function WO(){WO=Y,Vie=new Iv(zQe,0),M4e=new Iv("LONGEST_PATH",1),C4e=new Iv("LONGEST_PATH_SOURCE",2),Xie=new Iv("COFFMAN_GRAHAM",3),A4e=new Iv(cee,4),T4e=new Iv("STRETCH_WIDTH",5),xH=new Iv("MIN_WIDTH",6),Uie=new Iv("BF_MODEL_ORDER",7),Kie=new Iv("DF_MODEL_ORDER",8)}function RNn(e,n){var t,i,r,c,o,l;if(!e.tb){for(c=(!e.rb&&(e.rb=new x2(e,Ma,e)),e.rb),l=new b4(c.i),r=new st(c);r.e!=r.i.gc();)i=u(ft(r),143),o=i.ve(),t=u(o==null?Ko(l.f,null,i):Bw(l.i,o,i),143),t&&(o==null?Ko(l.f,null,t):Bw(l.i,o,t));e.tb=l}return u(lo(e.tb,n),143)}function ZO(e,n){var t,i,r,c,o;if((e.i==null&&kh(e),e.i).length,!e.p){for(o=new b4((3*e.g.i/2|0)+1),r=new E4(e.g);r.e!=r.i.gc();)i=u(PQ(r),179),c=i.ve(),t=u(c==null?Ko(o.f,null,i):Bw(o.i,c,i),179),t&&(c==null?Ko(o.f,null,t):Bw(o.i,c,t));e.p=o}return u(lo(e.p,n),179)}function Mbe(e,n,t,i,r){var c,o,l,f,h;for(LEn(i+_R(t,t.ge()),r),pDe(n,Wjn(t)),c=t.f,c&&Mbe(e,n,c,"Caused by: ",!1),l=(t.k==null&&(t.k=se(nte,Me,80,0,0,1)),t.k),f=0,h=l.length;f=0;c+=t?1:-1)o=o|n.c.jg(f,c,t,i&&!Fe(ze(C(n.j,(me(),ob))))&&!Fe(ze(C(n.j,(me(),B3))))),o=o|n.q.tg(f,c,t),o=o|CXe(e,f[c],t,i);return hr(e.c,n),o}function $z(e,n,t){var i,r,c,o,l,f,h,b,p,y;for(b=ULe(e.j),p=0,y=b.length;p1&&(e.a=!0),h3n(u(t.b,68),pi(pc(u(n.b,68).c),A1(Nr(pc(u(t.b,68).a),u(n.b,68).a),r))),tLe(e,n),HUe(e,t)}function GUe(e){var n,t,i,r,c,o,l;for(c=new P(e.a.a);c.a0&&c>0?o.p=n++:i>0?o.p=t++:c>0?o.p=r++:o.p=t++}En(),Tr(e.j,new _q)}function HNn(e){var n,t;t=null,n=u(Pe(e.g,0),17);do{if(t=n.d.i,wi(t,(me(),gf)))return u(C(t,gf),12).i;if(t.k!=(Fn(),Wi)&&ht(new Un(Yn(Ii(t).a.Jc(),new ee))))n=u(rt(new Un(Yn(Ii(t).a.Jc(),new ee))),17);else if(t.k!=Wi)return null}while(t&&t.k!=(Fn(),Wi));return t}function GNn(e,n){var t,i,r,c,o,l,f,h,b;for(l=n.j,o=n.g,f=u(Pe(l,l.c.length-1),113),b=(kn(0,l.c.length),u(l.c[0],113)),h=QQ(e,o,f,b),c=1;ch&&(f=t,b=r,h=i);n.a=b,n.c=f}function Kw(e,n,t,i){var r,c;if(r=ue(C(t,(Ie(),gx)))===ue(($0(),ym)),c=u(C(t,B5e),16),wi(e,(me(),Oi)))if(r){if(c.Gc(C(e,wx))&&c.Gc(C(n,wx)))return i*u(C(e,wx),15).a+u(C(e,Oi),15).a}else return u(C(e,Oi),15).a;else return-1;return u(C(e,Oi),15).a}function qNn(e,n,t){var i,r,c,o,l,f,h;for(h=new kd(new bEe(e)),o=F(z(uin,1),fQe,12,0,[n,t]),l=0,f=o.length;lf-e.b&&lf-e.a&&lt.p?1:0:c.Ob()?1:-1}function ZNn(e,n){var t,i,r,c,o,l;n.Tg(fWe,1),r=u(je(e,(Ha(),zx)),104),c=(!e.a&&(e.a=new we(Ft,e,10,11)),e.a),o=yxn(c),l=k.Math.max(o.a,ne(re(je(e,(Qh(),Bx))))-(r.b+r.c)),i=k.Math.max(o.b,ne(re(je(e,UH)))-(r.d+r.a)),t=i-o.b,Ei(e,Rx,t),Ei(e,Fy,l),Ei(e,R7,i+t),n.Ug()}function Rz(e){var n,t;if((!e.a&&(e.a=new we($i,e,6,6)),e.a).i==0)return l1e(e);for(n=u(K((!e.a&&(e.a=new we($i,e,6,6)),e.a),0),170),kt((!n.a&&(n.a=new mr(yl,n,5)),n.a)),e3(n,0),n3(n,0),Wv(n,0),Zv(n,0),t=(!e.a&&(e.a=new we($i,e,6,6)),e.a);t.i>1;)Z2(t,t.i-1);return n}function Po(e,n){Tc();var t,i,r,c;return n?n==(Si(),vhn)||(n==ohn||n==Pg||n==uhn)&&e!=d7e?new Age(e,n):(i=u(n,682),t=i.Yk(),t||($9(Vc((ls(),nc),n)),t=i.Yk()),c=(!t.i&&(t.i=new wt),t.i),r=u(bu(Xc(c.f,e)),2003),!r&&ei(c,e,r=new Age(e,n)),r):ihn}function eIn(e,n){var t,i;if(i=RT(e.b,n.b),!i)throw R(new Uc("Invalid hitboxes for scanline constraint calculation."));(Sze(n.b,u(jgn(e.b,n.b),60))||Sze(n.b,u(kgn(e.b,n.b),60)))&&jd(),e.a[n.b.f]=u(BX(e.b,n.b),60),t=u(RX(e.b,n.b),60),t&&(e.a[t.f]=n.b)}function nIn(e,n){var t,i,r,c,o,l,f,h,b;for(f=u(C(e,(me(),mi)),12),h=mu(F(z(Lr,1),Me,8,0,[f.i.n,f.n,f.a])).a,b=e.i.n.b,t=gh(e.e),r=t,c=0,o=r.length;c0?c.a?(l=c.b.Kf().a,t>l&&(r=(t-l)/2,c.d.b=r,c.d.c=r)):c.d.c=e.s+t:uE(e.u)&&(i=m0e(c.b),i.c<0&&(c.d.b=-i.c),i.c+i.b>c.b.Kf().a&&(c.d.c=i.c+i.b-c.b.Kf().a))}function oIn(e,n){var t,i,r,c,o;o=new Oe,t=n;do c=u(zn(e.b,t),132),c.B=t.c,c.D=t.d,Gn(o.c,c),t=u(zn(e.k,t),17);while(t);return i=(kn(0,o.c.length),u(o.c[0],132)),i.j=!0,i.A=u(i.d.a.ec().Jc().Pb(),17).c.i,r=u(Pe(o,o.c.length-1),132),r.q=!0,r.C=u(r.d.a.ec().Jc().Pb(),17).d.i,o}function sIn(e){var n,t;t=u(C(e,(Ie(),ku)),165),n=u(C(e,(me(),jg)),315),t==(Xs(),V1)?(he(e,ku,fI),he(e,jg,(_1(),$3))):t==Sg?(he(e,ku,fI),he(e,jg,(_1(),Ty))):n==(_1(),$3)?(he(e,ku,V1),he(e,jg,uI)):n==Ty&&(he(e,ku,Sg),he(e,jg,uI))}function Bz(){Bz=Y,kI=new Xp,Jon=qt(new or,(zr(),eo),(Ur(),CJ)),qon=Eo(qt(new or,eo,PJ),Pc,LJ),Uon=mh(mh(Nj(Eo(qt(new or,Xf,zJ),Pc,BJ),no),RJ),FJ),Hon=Eo(qt(qt(qt(new or,c1,OJ),no,IJ),no,p7),Pc,NJ),Gon=Eo(qt(qt(new or,no,p7),no,MJ),Pc,AJ)}function rS(){rS=Y,Von=qt(Eo(new or,(zr(),Pc),(Ur(),Jve)),eo,CJ),Zon=mh(mh(Nj(Eo(qt(new or,Xf,zJ),Pc,BJ),no),RJ),FJ),Yon=Eo(qt(qt(qt(new or,c1,OJ),no,IJ),no,p7),Pc,NJ),Won=qt(qt(new or,eo,PJ),Pc,LJ),Qon=Eo(qt(qt(new or,no,p7),no,MJ),Pc,AJ)}function lIn(e,n,t,i,r){var c,o;(!uc(n)&&n.c.i.c==n.d.i.c||!NBe(mu(F(z(Lr,1),Me,8,0,[r.i.n,r.n,r.a])),t))&&!uc(n)&&(n.c==r?S9(n.a,0,new wc(t)):Vt(n.a,new wc(t)),i&&!rf(e.a,t)&&(o=u(C(n,(Ie(),Wc)),78),o||(o=new xs,he(n,Wc,o)),c=new wc(t),Ki(o,c,o.c.b,o.c),hr(e.a,c)))}function XUe(e,n){var t,i,r,c;for(c=Rt(hc(e1,Xh(Rt(hc(n==null?0:Ni(n),n1)),15))),t=c&e.b.length-1,r=null,i=e.b[t];i;r=i,i=i.a)if(i.d==c&&C1(i.i,n))return r?r.a=i.a:e.b[t]=i.a,aAe(u(uf(i.c),593),u(uf(i.f),593)),VC(u(uf(i.b),227),u(uf(i.e),227)),--e.f,++e.e,!0;return!1}function fIn(e){var n,t;for(t=new Un(Yn(cr(e).a.Jc(),new ee));ht(t);)if(n=u(rt(t),17),n.c.i.k!=(Fn(),Uu))throw R(new md(ree+$O(e)+"' has its layer constraint set to FIRST, but has at least one incoming edge that does not come from a FIRST_SEPARATE node. That must not happen."))}function KUe(e,n){var t,i,r,c,o,l,f,h,b,p,y;r=n?new rw:new oM,c=!1;do for(c=!1,h=n?Ks(e.b):e.b,f=h.Jc();f.Ob();)for(l=u(f.Pb(),25),y=Vb(l.a),n||Ks(y),p=new P(y);p.a=0;o+=r?1:-1){for(l=n[o],f=i==(De(),et)?r?vu(l,i):Ks(vu(l,i)):r?Ks(vu(l,i)):vu(l,i),c&&(e.c[l.p]=f.gc()),p=f.Jc();p.Ob();)b=u(p.Pb(),12),e.d[b.p]=h++;Sr(t,f)}}function YUe(e,n,t){var i,r,c,o,l,f,h,b;for(c=ne(re(e.b.Jc().Pb())),h=ne(re(q7n(n.b))),i=A1(pc(e.a),h-t),r=A1(pc(n.a),t-c),b=pi(i,r),A1(b,1/(h-c)),this.a=b,this.b=new Oe,l=!0,o=e.b.Jc(),o.Pb();o.Ob();)f=ne(re(o.Pb())),l&&f-t>Kee&&(this.b.Ec(t),l=!1),this.b.Ec(f);l&&this.b.Ec(t)}function hIn(e){var n,t,i,r;if(TDn(e,e.n),e.d.c.length>0){for(kj(e.c);obe(e,u(_(new P(e.e.a)),124))>5,n&=31,i>=e.d)return e.e<0?(yh(),cnn):(yh(),VS);if(c=e.d-i,r=se($t,ni,30,c+1,15,1),wCn(r,c,e.a,i,n),e.e<0){for(t=0;t0&&e.a[t]<<32-n!=0){for(t=0;t=0?!1:(t=w3((ls(),nc),r,n),t?(i=t.Gk(),(i>1||i==-1)&&Cw(Vc(nc,t))!=3):!0)):!1}function mIn(e,n,t,i){var r,c,o,l,f,h,b,p,y,S;if(f=e.c.d,h=e.d.d,f.j!=h.j)for(S=e.b,b=null,l=null,o=DEn(e),o&&S.i&&(b=e.b.i.i,l=S.i.j),r=f.j,p=null;r!=h.j;)p=n==0?qB(r):X1e(r),c=xde(r,S.d[r.g],t),y=xde(p,S.d[p.g],t),o&&b&&l&&(r==b?HFe(c,b,l):p==b&&HFe(y,b,l)),Vt(i,pi(c,y)),r=p}function Obe(e,n,t){var i,r,c,o,l,f;if(i=sgn(t,e.length),o=e[i],c=wAe(t,o.length),o[c].k==(Fn(),wr))for(f=n.j,r=0;r0&&(t[0]+=e.d,o-=t[0]),t[2]>0&&(t[2]+=e.d,o-=t[2]),c=k.Math.max(0,o),t[1]=k.Math.max(t[1],o),Qae(e,No,r.c+i.b+t[0]-(t[1]-o)/2,t),n==No&&(e.c.b=c,e.c.c=r.c+i.b+(c-o)/2)}function rXe(){this.c=se(Jr,Jc,30,(De(),F(z(xc,1),qu,64,0,[ju,Kn,et,bt,Vn])).length,15,1),this.b=se(Jr,Jc,30,F(z(xc,1),qu,64,0,[ju,Kn,et,bt,Vn]).length,15,1),this.a=se(Jr,Jc,30,F(z(xc,1),qu,64,0,[ju,Kn,et,bt,Vn]).length,15,1),use(this.c,Vi),use(this.b,Ir),use(this.a,Ir)}function SIn(e,n,t,i){var r,c,o,l,f;for(f=n.i,l=t[f.g][e.d[f.g]],r=!1,o=new P(n.d);o.a=r&&(e.c=!1,e.a=!1),e.b[i++]=r,e.b[i]=c,e.c||h3(e)}}function xIn(e,n,t){var i,r,c,o,l,f,h;for(h=n.d,e.a=new xo(h.c.length),e.c=new wt,l=new P(h);l.a=0?e.Ih(h,!1,!0):Xw(e,t,!1),61));e:for(c=p.Jc();c.Ob();){for(r=u(c.Pb(),57),b=0;be.d[o.p]&&(t+=Hae(e.b,c),I0(e.a,ke(c)));for(;!jj(e.a);)Ehe(e.b,u(N4(e.a),15).a)}return t}function oXe(e,n,t){var i,r,c,o;for(c=(!n.a&&(n.a=new we(Ft,n,10,11)),n.a).i,r=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));r.e!=r.i.gc();)i=u(ft(r),26),(!i.a&&(i.a=new we(Ft,i,10,11)),i.a).i==0||(c+=oXe(e,i,!1));if(t)for(o=Fi(n);o;)c+=(!o.a&&(o.a=new we(Ft,o,10,11)),o.a).i,o=Fi(o);return c}function Z2(e,n){var t,i,r,c;return e.Nj()?(i=null,r=e.Oj(),e.Rj()&&(i=e.Tj(e.Yi(n),null)),t=e.Gj(4,c=ey(e,n),null,n,r),e.Kj()&&c!=null&&(i=e.Mj(c,i)),i?(i.lj(t),i.mj()):e.Hj(t),c):(c=ey(e,n),e.Kj()&&c!=null&&(i=e.Mj(c,null),i&&i.mj()),c)}function IIn(e){var n,t,i,r,c,o,l,f,h,b;for(h=e.a,n=new ar,f=0,i=new P(e.d);i.al.d&&(b=l.d+l.a+h));t.c.d=b,n.a.yc(t,n),f=k.Math.max(f,t.c.d+t.c.a)}return f}function DIn(e,n,t){var i,r,c,o,l,f;for(o=u(C(e,(me(),pie)),16).Jc();o.Ob();){switch(c=u(o.Pb(),9),u(C(c,(Ie(),ku)),165).g){case 2:Or(c,n);break;case 4:Or(c,t)}for(r=new Un(Yn(wh(c).a.Jc(),new ee));ht(r);)i=u(rt(r),17),!(i.c&&i.d)&&(l=!i.d,f=u(C(i,Q3e),12),l?Gr(i,f):fc(i,f))}}function Ic(){Ic=Y,ZJ=new h2("COMMENTS",0),Kl=new h2("EXTERNAL_PORTS",1),ux=new h2("HYPEREDGES",2),eH=new h2("HYPERNODES",3),A7=new h2("NON_FREE_PORTS",4),P3=new h2("NORTH_SOUTH_PORTS",5),ox=new h2(CQe,6),S7=new h2("CENTER_LABELS",7),x7=new h2("END_LABELS",8),nH=new h2("PARTITIONS",9)}function _In(e,n,t,i,r){return i<0?(i=a3(e,r,F(z(He,1),Me,2,6,[vZ,yZ,kZ,jZ,ay,EZ,SZ,xZ,AZ,MZ,CZ,TZ]),n),i<0&&(i=a3(e,r,F(z(He,1),Me,2,6,["Jan","Feb","Mar","Apr",ay,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),n)),i<0?!1:(t.k=i,!0)):i>0?(t.k=i-1,!0):!1}function LIn(e,n,t,i,r){return i<0?(i=a3(e,r,F(z(He,1),Me,2,6,[vZ,yZ,kZ,jZ,ay,EZ,SZ,xZ,AZ,MZ,CZ,TZ]),n),i<0&&(i=a3(e,r,F(z(He,1),Me,2,6,["Jan","Feb","Mar","Apr",ay,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),n)),i<0?!1:(t.k=i,!0)):i>0?(t.k=i-1,!0):!1}function PIn(e,n,t,i,r,c){var o,l,f,h;if(l=32,i<0){if(n[0]>=e.length||(l=rc(e,n[0]),l!=43&&l!=45)||(++n[0],i=Cz(e,n),i<0))return!1;l==45&&(i=-i)}return l==32&&n[0]-t==2&&r.b==2&&(f=new r$,h=f.q.getFullYear()-Q0+Q0-80,o=h%100,c.a=i==o,i+=(h/100|0)*100+(i=0?J0(e):lE(J0(Od(e)))),YS[n]=N$(qh(e,n),0)?J0(qh(e,n)):lE(J0(Od(qh(e,n)))),e=hc(e,5);for(;n=h&&(f=i);f&&(b=k.Math.max(b,f.a.o.a)),b>y&&(p=h,y=b)}return p}function FIn(e){var n,t,i,r,c,o,l;for(c=new kd(u(Nt(new Op),51)),l=Ir,t=new P(e.d);t.arWe?Tr(f,e.b):i<=rWe&&i>cWe?Tr(f,e.d):i<=cWe&&i>uWe?Tr(f,e.c):i<=uWe&&Tr(f,e.a),c=aXe(e,f,c);return r}function hXe(e,n,t,i){var r,c,o,l,f,h;for(r=(i.c+i.a)/2,qs(n.j),Vt(n.j,r),qs(t.e),Vt(t.e,r),h=new bAe,l=new P(e.f);l.a1,l&&(i=new Se(r,t.b),Vt(n.a,i)),xE(n.a,F(z(Lr,1),Me,8,0,[y,p]))}function Dbe(e,n,t){var i,r;for(n=48;t--)dA[t]=t-48<<24>>24;for(i=70;i>=65;i--)dA[i]=i-65+10<<24>>24;for(r=102;r>=97;r--)dA[r]=r-97+10<<24>>24;for(c=0;c<10;c++)OG[c]=48+c&yr;for(e=10;e<=15;e++)OG[e]=65+e-10&yr}function wXe(e,n){n.Tg("Process graph bounds",1),he(e,(Ti(),pre),oT(GY(C2(new mn(null,new vn(e.b,16)),new eU)))),he(e,mre,oT(GY(C2(new mn(null,new vn(e.b,16)),new Bs)))),he(e,mye,oT(HY(C2(new mn(null,new vn(e.b,16)),new jM)))),he(e,vye,oT(HY(C2(new mn(null,new vn(e.b,16)),new EM)))),n.Ug()}function UIn(e){var n,t,i,r,c;r=u(C(e,(Ie(),Ag)),22),c=u(C(e,kH),22),t=new Se(e.f.a+e.d.b+e.d.c,e.f.b+e.d.d+e.d.a),n=new wc(t),r.Gc((Vs(),Jm))&&(i=u(C(e,T7),8),c.Gc((_s(),X7))&&(i.a<=0&&(i.a=20),i.b<=0&&(i.b=20)),n.a=k.Math.max(t.a,i.a),n.b=k.Math.max(t.b,i.b)),Fe(ze(C(e,Bie)))||mLn(e,t,n)}function XIn(e){var n,t,i,r,c,o,l;for(n=!1,t=0,r=new P(e.d.b);r.a>19!=0)return"-"+pXe(t8(e));for(t=e,i="";!(t.l==0&&t.m==0&&t.h==0);){if(r=lY(rF),t=mge(t,r,!0),n=""+IAe(tb),!(t.l==0&&t.m==0&&t.h==0))for(c=9-n.length;c>0;c--)n="0"+n;i=n+i}return i}function KIn(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var e="__proto__",n=Object.create(null);if(n[e]!==void 0)return!1;var t=Object.getOwnPropertyNames(n);return!(t.length!=0||(n[e]=42,n[e]!==42)||Object.getOwnPropertyNames(n).length==0)}function VIn(e,n,t){var i,r,c,o,l,f,h,b,p;for(i=t.c,r=t.d,l=La(n.c),f=La(n.d),i==n.c?(l=vbe(e,l,r),f=mGe(n.d)):(l=mGe(n.c),f=vbe(e,f,r)),h=new XP(n.a),Ki(h,l,h.a,h.a.a),Ki(h,f,h.c.b,h.c),o=n.c==i,p=new uxe,c=0;c=e.a||!b0e(n,t))return-1;if(I2(u(i.Kb(n),20)))return 1;for(r=0,o=u(i.Kb(n),20).Jc();o.Ob();)if(c=u(o.Pb(),17),f=c.c.i==n?c.d.i:c.c.i,l=Pbe(e,f,t,i),l==-1||(r=k.Math.max(r,l),r>e.c-1))return-1;return r+1}function Ha(){Ha=Y,KH=new Yr((Xt(),B7),1.3),Cln=new Yr($m,($n(),!1)),k6e=new yw(15),zx=new Yr(s1,k6e),Fx=new Yr(Qd,15),Sln=DI,Mln=Ig,Tln=n5,Oln=bb,Aln=e5,Ure=$I,Nln=Rm,x6e=(nge(),kln),S6e=yln,Kre=Eln,A6e=jln,y6e=pln,Xre=wln,v6e=gln,E6e=vln,p6e=PI,xln=pce,MI=hln,w6e=aln,CI=dln,j6e=mln,m6e=bln}function mXe(e,n){var t,i,r,c,o,l;if(ue(n)===ue(e))return!0;if(!X(n,16)||(i=u(n,16),l=e.gc(),i.gc()!=l))return!1;if(o=i.Jc(),e.Wi()){for(t=0;t0){if(e.Zj(),n!=null){for(c=0;c>24;case 97:case 98:case 99:case 100:case 101:case 102:return e-97+10<<24>>24;case 65:case 66:case 67:case 68:case 69:case 70:return e-65+10<<24>>24;default:throw R(new fh("Invalid hexadecimal"))}}function yXe(e,n,t,i){var r,c,o,l,f,h;for(f=iW(e,t),h=iW(n,t),r=!1;f&&h&&(i||nxn(f,h,t));)o=iW(f,t),l=iW(h,t),cO(n),cO(e),c=f.c,iZ(f,!1),iZ(h,!1),t?(H0(n,h.p,c),n.p=h.p,H0(e,f.p+1,c),e.p=f.p):(H0(e,f.p,c),e.p=f.p,H0(n,h.p+1,c),n.p=h.p),Or(f,null),Or(h,null),f=o,h=l,r=!0;return r}function kXe(e){switch(e.g){case 0:return new uP;case 1:return new oP;case 3:return new OMe;case 4:return new C6;case 5:return new cNe;case 6:return new ko;case 2:return new sP;case 7:return new EC;case 8:return new jC;default:throw R(new qn("No implementation is available for the layerer "+(e.f!=null?e.f:""+e.g)))}}function ZIn(e,n,t,i){var r,c,o,l,f;for(r=!1,c=!1,l=new P(i.j);l.a=n.length)throw R(new jo("Greedy SwitchDecider: Free layer not in graph."));this.c=n[e],this.e=new NT(i),RY(this.e,this.c,(De(),Vn)),this.i=new NT(i),RY(this.i,this.c,et),this.f=new OIe(this.c),this.a=!c&&r.i&&!r.s&&this.c[0].k==(Fn(),wr),this.a&&kCn(this,e,n.length)}function EXe(e,n){var t,i,r,c,o,l;c=!e.B.Gc((_s(),KI)),o=e.B.Gc(Oce),e.a=new uJe(o,c,e.c),e.n&&sae(e.a.n,e.n),AX(e.g,(wa(),No),e.a),n||(i=new HE(1,c,e.c),i.n.a=e.k,I4(e.p,(De(),Kn),i),r=new HE(1,c,e.c),r.n.d=e.k,I4(e.p,bt,r),l=new HE(0,c,e.c),l.n.c=e.k,I4(e.p,Vn,l),t=new HE(0,c,e.c),t.n.b=e.k,I4(e.p,et,t))}function nDn(e){var n,t,i;switch(n=u(C(e.d,(Ie(),Y1)),222),n.g){case 2:t=HRn(e);break;case 3:t=(i=new Oe,er(li(So(lu(lu(new mn(null,new vn(e.d.b,16)),new nw),new n_),new yk),new h0),new Gje(i)),i);break;default:throw R(new Uc("Compaction not supported for "+n+" edges."))}dPn(e,t),cc(new it(e.g),new zje(e))}function tDn(e,n){var t,i,r,c,o,l,f;if(n.Tg("Process directions",1),t=u(C(e,(Mu(),kp)),86),t!=(vr(),eh))for(r=St(e.b,0);r.b!=r.d.c;){switch(i=u(jt(r),40),l=u(C(i,(Ti(),SI)),15).a,f=u(C(i,xI),15).a,t.g){case 4:f*=-1;break;case 1:c=l,l=f,f=c;break;case 2:o=l,l=-f,f=o}he(i,SI,ke(l)),he(i,xI,ke(f))}n.Ug()}function iDn(e){var n,t,i,r,c,o,l,f;for(f=new zPe,l=new P(e.a);l.a0&&n=0)return!1;if(n.p=t.b,Te(t.e,n),r==(Fn(),dr)||r==wo){for(o=new P(n.j);o.ae.d[l.p]&&(t+=Hae(e.b,c),I0(e.a,ke(c)))):++o;for(t+=e.b.d*o;!jj(e.a);)Ehe(e.b,u(N4(e.a),15).a)}return t}function _Xe(e){var n,t,i,r,c,o;return c=0,n=ff(e),n.ik()&&(c|=4),(e.Bb&as)!=0&&(c|=2),X(e,103)?(t=u(e,19),r=Oc(t),(t.Bb&Ru)!=0&&(c|=32),r&&(dt(O2(r)),c|=8,o=r.t,(o>1||o==-1)&&(c|=16),(r.Bb&Ru)!=0&&(c|=64)),(t.Bb&Ec)!=0&&(c|=V0),c|=Gf):X(n,459)?c|=512:(i=n.ik(),i&&(i.i&1)!=0&&(c|=256)),(e.Bb&512)!=0&&(c|=128),c}function gDn(e,n){var t;return e.f==Gce?(t=Cw(Vc((ls(),nc),n)),e.e?t==4&&n!=(cy(),Zy)&&n!=(cy(),Wy)&&n!=(cy(),qce)&&n!=(cy(),Uce):t==2):e.d&&(e.d.Gc(n)||e.d.Gc($4(Vc((ls(),nc),n)))||e.d.Gc(w3((ls(),nc),e.b,n)))?!0:e.f&&jbe((ls(),e.f),FT(Vc(nc,n)))?(t=Cw(Vc(nc,n)),e.e?t==4:t==2):!1}function wDn(e,n){var t,i,r,c,o,l,f,h;for(c=new Oe,n.b.c.length=0,t=u(gs(Eae(new mn(null,new vn(new it(e.a.b),1))),Cs(new zi,new bi,new Cc,F(z(Qo,1),Ee,130,0,[(zl(),Yo)]))),16),r=t.Jc();r.Ob();)if(i=u(r.Pb(),15),o=Pae(e.a,i),o.b!=0)for(l=new Xu(n),Gn(c.c,l),l.p=i.a,h=St(o,0);h.b!=h.d.c;)f=u(jt(h),9),Or(f,l);Sr(n.b,c)}function LW(e){var n,t,i,r,c,o,l;for(l=new wt,i=new P(e.a.b);i.agg&&(r-=gg),l=u(je(i,Uy),8),h=l.a,p=l.b+e,c=k.Math.atan2(p,h),c<0&&(c+=gg),c+=n,c>gg&&(c-=gg),Na(),Rf(1e-10),k.Math.abs(r-c)<=1e-10||r==c||isNaN(r)&&isNaN(c)?0:rc?1:Bb(isNaN(r),isNaN(c))}function Fbe(e,n,t,i){var r,c,o;n&&(c=ne(re(C(n,(Ti(),Vd))))+i,o=t+ne(re(C(n,RH)))/2,he(n,SI,ke(Rt(Lu(k.Math.round(c))))),he(n,xI,ke(Rt(Lu(k.Math.round(o))))),n.d.b==0||Fbe(e,u(R$((r=St(new S1(n).a.d,0),new Cv(r))),40),t+ne(re(C(n,RH)))+e.b,i+ne(re(C(n,$7)))),C(n,yre)!=null&&Fbe(e,u(C(n,yre),40),t,i))}function yDn(e,n){var t,i,r,c;if(c=u(je(e,(Xt(),t5)),64).g-u(je(n,t5),64).g,c!=0)return c;if(t=u(je(e,jce),15),i=u(je(n,jce),15),t&&i&&(r=t.a-i.a,r!=0))return r;switch(u(je(e,t5),64).g){case 1:return ji(e.i,n.i);case 2:return ji(e.j,n.j);case 3:return ji(n.i,e.i);case 4:return ji(n.j,e.j);default:throw R(new Uc(dwe))}}function Jbe(e){var n,t,i;return(e.Db&64)!=0?gW(e):(n=new tl(R2e),t=e.k,t?Kt(Kt((n.a+=' "',n),t),'"'):(!e.n&&(e.n=new we(Eu,e,1,7)),e.n.i>0&&(i=(!e.n&&(e.n=new we(Eu,e,1,7)),u(K(e.n,0),157)).a,!i||Kt(Kt((n.a+=' "',n),i),'"'))),Kt(ww(Kt(ww(Kt(ww(Kt(ww((n.a+=" (",n),e.i),","),e.j)," | "),e.g),","),e.f),")"),n.a)}function LXe(e){var n,t,i;return(e.Db&64)!=0?gW(e):(n=new tl(B2e),t=e.k,t?Kt(Kt((n.a+=' "',n),t),'"'):(!e.n&&(e.n=new we(Eu,e,1,7)),e.n.i>0&&(i=(!e.n&&(e.n=new we(Eu,e,1,7)),u(K(e.n,0),157)).a,!i||Kt(Kt((n.a+=' "',n),i),'"'))),Kt(ww(Kt(ww(Kt(ww(Kt(ww((n.a+=" (",n),e.i),","),e.j)," | "),e.g),","),e.f),")"),n.a)}function kDn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A;for(S=-1,A=0,b=n,p=0,y=b.length;p0&&++A;++S}return A}function jDn(e,n){var t,i,r,c,o;for(n==(DE(),ure)&&qO(u(vi(e.a,(X2(),nI)),16)),r=u(vi(e.a,(X2(),nI)),16).Jc();r.Ob();)switch(i=u(r.Pb(),107),t=u(Pe(i.j,0),113).d.j,c=new bs(i.j),Tr(c,new I5),n.g){case 2:sW(e,c,t,($w(),ub),1);break;case 1:case 0:o=hNn(c),sW(e,new N0(c,0,o),t,($w(),ub),0),sW(e,new N0(c,o,c.c.length),t,ub,1)}}function EDn(e){var n,t,i,r,c,o,l;for(r=u(C(e,(me(),bp)),9),i=e.j,t=(kn(0,i.c.length),u(i.c[0],12)),o=new P(r.j);o.ar.p?(Ar(c,bt),c.d&&(l=c.o.b,n=c.a.b,c.a.b=l-n)):c.j==bt&&r.p>e.p&&(Ar(c,Kn),c.d&&(l=c.o.b,n=c.a.b,c.a.b=-(l-n)));break}return r}function Hbe(e,n){var t,i,r,c,o,l,f;if(n==null||n.length==0)return null;if(r=u(lo(e.a,n),144),!r){for(i=(l=new ot(e.b).a.vc().Jc(),new Hi(l));i.a.Ob();)if(t=(c=u(i.a.Pb(),45),u(c.kd(),144)),o=t.c,f=n.length,gn(o.substr(o.length-f,f),n)&&(n.length==o.length||rc(o,o.length-n.length-1)==46)){if(r)return null;r=t}r&&Kc(e.a,n,r)}return r}function T8(e,n,t){var i,r,c,o,l,f,h,b,p,y;for(c=new Se(n,t),b=new P(e.a);b.a1,l&&(i=new Se(r,t.b),Vt(n.a,i)),xE(n.a,F(z(Lr,1),Me,8,0,[y,p]))}function X0(){X0=Y,CH=new d2(va,0),pI=new d2("NIKOLOV",1),mI=new d2("NIKOLOV_PIXEL",2),P4e=new d2("NIKOLOV_IMPROVED",3),$4e=new d2("NIKOLOV_IMPROVED_PIXEL",4),L4e=new d2("DUMMYNODE_PERCENTAGE",5),R4e=new d2("NODECOUNT_PERCENTAGE",6),TH=new d2("NO_BOUNDARY",7),_7=new d2("MODEL_ORDER_LEFT_TO_RIGHT",8),xx=new d2("MODEL_ORDER_RIGHT_TO_LEFT",9)}function $W(e,n){var t,i,r,c,o,l,f,h,b,p,y,S;return b=null,y=hbe(e,n),i=null,l=u(je(n,(Xt(),Tfn)),300),l?i=l:i=(EE(),qI),S=i,S==(EE(),qI)&&(r=null,h=u(zn(e.r,y),300),h?r=h:r=Tce,S=r),ei(e.r,n,S),c=null,f=u(je(n,Cfn),278),f?c=f:c=(s8(),BI),p=c,p==(s8(),BI)&&(o=null,t=u(zn(e.b,y),278),t?o=t:o=sG,p=o),b=u(ei(e.b,n,p),278),b}function _Dn(e){var n,t,i,r,c;for(i=e.length,n=new Ej,c=0;c=40,o&&D_n(e),qLn(e),hIn(e),t=RFe(e),i=0;t&&i0&&Vt(e.g,c)):(e.d[o]-=h+1,e.d[o]<=0&&e.a[o]>0&&Vt(e.f,c))))}function KXe(e,n,t,i){var r,c,o,l,f,h,b;for(f=new Se(t,i),Nr(f,u(C(n,(Ti(),P7)),8)),b=St(n.b,0);b.b!=b.d.c;)h=u(jt(b),40),pi(h.e,f),Vt(e.b,h);for(l=u(gs(yae(new mn(null,new vn(n.a,16))),Cs(new zi,new bi,new Cc,F(z(Qo,1),Ee,130,0,[(zl(),Yo)]))),16).Jc();l.Ob();){for(o=u(l.Pb(),65),c=St(o.a,0);c.b!=c.d.c;)r=u(jt(c),8),r.a+=f.a,r.b+=f.b;Vt(e.a,o)}}function Qbe(e,n){var t,i,r,c;if(0<(X(e,18)?u(e,18).gc():ha(e.Jc()))){if(r=n,1=0&&f1)&&n==1&&u(e.a[e.b],9).k==(Fn(),Uu)?sy(u(e.a[e.b],9),(fl(),l1)):i&&(!t||(e.c-e.b&e.a.length-1)>1)&&n==1&&u(e.a[e.c-1&e.a.length-1],9).k==(Fn(),Uu)?sy(u(e.a[e.c-1&e.a.length-1],9),(fl(),gb)):(e.c-e.b&e.a.length-1)==2?(sy(u(OE(e),9),(fl(),l1)),sy(u(OE(e),9),gb)):NOn(e,r),zae(e)}function QDn(e){var n,t,i,r,c,o,l,f;for(f=new wt,n=new wX,o=e.Jc();o.Ob();)r=u(o.Pb(),9),l=kw(iT(new Lb,r),n),Ko(f.f,r,l);for(c=e.Jc();c.Ob();)for(r=u(c.Pb(),9),i=new Un(Yn(Ii(r).a.Jc(),new ee));ht(i);)t=u(rt(i),17),!uc(t)&&Jf(Of(Tf(Cf(Nf(new tf,k.Math.max(1,u(C(t,(Ie(),g4e)),15).a)),1),u(zn(f,t.c.i),124)),u(zn(f,t.d.i),124)));return n}function QXe(e,n,t,i){var r,c,o,l,f,h,b,p,y,S;if(C8n(e,n,t),c=n[t],S=i?(De(),Vn):(De(),et),Wwn(n.length,t,i)){for(r=n[i?t-1:t+1],rhe(e,r,i?(Nc(),Io):(Nc(),ys)),f=c,b=0,y=f.length;bc*2?(b=new gB(p),h=us(o)/Gs(o),f=oZ(b,n,new o4,t,i,r,h),pi(fa(b.e),f),p.c.length=0,c=0,Gn(p.c,b),Gn(p.c,o),c=us(b)*Gs(b)+us(o)*Gs(o)):(Gn(p.c,o),c+=us(o)*Gs(o));return p}function ZDn(e,n){var t,i,r,c,o,l,f;for(n.Tg("Port order processing",1),f=u(C(e,(Ie(),b4e)),421),i=new P(e.b);i.at?n:t;h<=p;++h)h==t?l=i++:(c=r[h],b=A.$l(c.Jk()),h==n&&(f=h==p&&!b?i-1:i),b&&++i);return y=u(BE(e,n,t),75),l!=f&&f9(e,new rO(e.e,7,o,ke(l),S.kd(),f)),y}}else return u(EW(e,n,t),75);return u(BE(e,n,t),75)}function Wbe(e,n){var t,i,r,c,o,l,f,h,b,p;for(p=0,c=new Fv,I0(c,n);c.b!=c.c;)for(f=u(N4(c),218),h=0,b=u(C(n.j,(Ie(),o1)),269),u(C(n.j,gx),329),o=ne(re(C(n.j,aI))),l=ne(re(C(n.j,Mie))),b!=(F1(),fb)&&(h+=o*ROn(n.j,f.e,b),h+=l*kDn(n.j,f.e)),p+=yHe(f.d,f.e)+h,r=new P(f.b);r.a=0&&(l=bxn(e,o),!(l&&(h<22?f.l|=1<>>1,o.m=b>>>1|(p&1)<<21,o.l=y>>>1|(b&1)<<21,--h;return t&&eQ(f),c&&(i?(tb=t8(e),r&&(tb=Aze(tb,(U9(),Eme)))):tb=_o(e.l,e.m,e.h)),f}function t_n(e,n){var t,i,r,c,o,l,f,h,b,p;for(h=e.e[n.c.p][n.p]+1,f=n.c.a.c.length+1,l=new P(e.a);l.a0&&(Qn(0,e.length),e.charCodeAt(0)==45||(Qn(0,e.length),e.charCodeAt(0)==43))?1:0,i=o;it)throw R(new fh(Zw+e+'"'));return l}function i_n(e){var n,t,i,r,c,o,l;for(o=new xi,c=new P(e.a);c.a=e.length)return t.o=0,!0;switch(rc(e,n[0])){case 43:r=1;break;case 45:r=-1;break;default:return t.o=0,!0}if(++n[0],c=n[0],o=Cz(e,n),o==0&&n[0]==c)return!1;if(n[0]l&&(l=r,b.c.length=0),r==l&&Te(b,new jc(t.c.i,t)));En(),Tr(b,e.c),zb(e.b,f.p,b)}}function l_n(e,n){var t,i,r,c,o,l,f,h,b;for(o=new P(n.b);o.al&&(l=r,b.c.length=0),r==l&&Te(b,new jc(t.d.i,t)));En(),Tr(b,e.c),zb(e.f,f.p,b)}}function f_n(e){var n,t,i,r,c,o,l;for(c=_a(e),r=new st((!e.e&&(e.e=new Nn(pr,e,7,4)),e.e));r.e!=r.i.gc();)if(i=u(ft(r),85),l=iu(u(K((!i.c&&(i.c=new Nn(mt,i,5,8)),i.c),0),84)),!P2(l,c))return!0;for(t=new st((!e.d&&(e.d=new Nn(pr,e,8,5)),e.d));t.e!=t.i.gc();)if(n=u(ft(t),85),o=iu(u(K((!n.b&&(n.b=new Nn(mt,n,4,7)),n.b),0),84)),!P2(o,c))return!0;return!1}function a_n(e){var n,t,i,r,c;i=u(C(e,(me(),mi)),26),c=u(je(i,(Ie(),Ag)),182).Gc((Vs(),_g)),e.e||(r=u(C(e,po),22),n=new Se(e.f.a+e.d.b+e.d.c,e.f.b+e.d.d+e.d.a),r.Gc((Ic(),Kl))?(Ei(i,Zi,(Br(),to)),Yw(i,n.a,n.b,!1,!0)):Fe(ze(je(i,Bie)))||Yw(i,n.a,n.b,!0,!0)),c?Ei(i,Ag,rn(_g)):Ei(i,Ag,(t=u(la(iA),10),new _l(t,u(Df(t,t.length),10),0)))}function h_n(e,n){var t,i,r,c,o,l,f,h;if(h=ze(C(n,(Mu(),jsn))),h==null||(_n(h),h)){for(FTn(e,n),r=new Oe,f=St(n.b,0);f.b!=f.d.c;)o=u(jt(f),40),t=P0e(e,o,null),t&&(Pu(t,n),Gn(r.c,t));if(e.a=null,e.b=null,r.c.length>1)for(i=new P(r);i.a=0&&l!=t&&(c=new Dr(e,1,l,o,null),i?i.lj(c):i=c),t>=0&&(c=new Dr(e,1,t,l==t?o:null,n),i?i.lj(c):i=c)),i}function ZXe(e){var n,t,i;if(e.b==null){if(i=new vd,e.i!=null&&(Bc(i,e.i),i.a+=":"),(e.f&256)!=0){for((e.f&256)!=0&&e.a!=null&&(x5n(e.i)||(i.a+="//"),Bc(i,e.a)),e.d!=null&&(i.a+="/",Bc(i,e.d)),(e.f&16)!=0&&(i.a+="/"),n=0,t=e.j.length;ny?!1:(p=(f=aS(i,y,!1),f.a),b+l+p<=n.b&&(tO(t,c-t.s),t.c=!0,tO(i,c-t.s),LO(i,t.s,t.t+t.d+l),i.k=!0,i1e(t.q,i),S=!0,r&&(kB(n,i),i.j=n,e.c.length>o&&(BO((kn(o,e.c.length),u(e.c[o],186)),i),(kn(o,e.c.length),u(e.c[o],186)).a.c.length==0&&Cd(e,o)))),S)}function v_n(e,n){var t,i,r,c,o,l;if(n.Tg("Partition midprocessing",1),r=new Nw,er(li(new mn(null,new vn(e.a,16)),new m6),new Sje(r)),r.d!=0){for(l=u(gs(Eae((c=r.i,new mn(null,(c||(r.i=new Hv(r,r.c))).Lc()))),Cs(new zi,new bi,new Cc,F(z(Qo,1),Ee,130,0,[(zl(),Yo)]))),16),i=l.Jc(),t=u(i.Pb(),15);i.Ob();)o=u(i.Pb(),15),aNn(u(vi(r,t),22),u(vi(r,o),22)),t=o;n.Ug()}}function oS(e,n){var t,i,r,c,o;if(e.Ab){if(e.Ab){if(o=e.Ab.i,o>0){if(r=u(e.Ab.g,1995),n==null){for(c=0;ct.s&&lf+A&&(O=p.g+y.g,y.a=(y.g*y.a+p.g*p.a)/O,y.g=O,p.f=y,t=!0)),c=l,p=y;return t}function j_n(e,n,t){var i,r,c,o,l,f,h,b;for(t.Tg(XQe,1),Hu(e.b),Hu(e.a),l=null,c=St(n.b,0);!l&&c.b!=c.d.c;)h=u(jt(c),40),Fe(ze(C(h,(Ti(),db))))&&(l=h);for(f=new xi,Ki(f,l,f.c.b,f.c),IVe(e,f),b=St(n.b,0);b.b!=b.d.c;)h=u(jt(b),40),o=Pt(C(h,(Ti(),_x))),r=lo(e.b,o)!=null?u(lo(e.b,o),15).a:0,he(h,wre,ke(r)),i=1+(lo(e.a,o)!=null?u(lo(e.a,o),15).a:0),he(h,pye,ke(i));t.Ug()}function cKe(e){a2(e,new qw(l2(u2(s2(o2(new gd,cp),"ELK Box"),"Algorithm for packing of unconnected boxes, i.e. graphs without edges."),new UM))),xe(e,cp,sm,g9e),xe(e,cp,om,15),xe(e,cp,xN,ke(0)),xe(e,cp,T2e,Le(h9e)),xe(e,cp,k3,Le(wfn)),xe(e,cp,py,Le(pfn)),xe(e,cp,U8,pWe),xe(e,cp,ES,Le(d9e)),xe(e,cp,my,Le(b9e)),xe(e,cp,O2e,Le(fce)),xe(e,cp,OF,Le(gfn))}function uKe(e,n){var t,i,r,c,o,l,f,h,b;if(r=e.i,o=r.o.a,c=r.o.b,o<=0&&c<=0)return De(),ju;switch(h=e.n.a,b=e.n.b,l=e.o.a,t=e.o.b,n.g){case 2:case 1:if(h<0)return De(),Vn;if(h+l>o)return De(),et;break;case 4:case 3:if(b<0)return De(),Kn;if(b+t>c)return De(),bt}return f=(h+l/2)/o,i=(b+t/2)/c,f+i<=1&&f-i<=0?(De(),Vn):f+i>=1&&f-i>=0?(De(),et):i<.5?(De(),Kn):(De(),bt)}function oKe(e,n,t,i,r,c,o){var l,f,h,b,p,y;for(y=new y4,h=n.Jc();h.Ob();)for(l=u(h.Pb(),837),p=new P(l.Pf());p.a0?l.a?(h=l.b.Kf().b,r>h&&(e.v||l.c.d.c.length==1?(o=(r-h)/2,l.d.d=o,l.d.a=o):(t=u(Pe(l.c.d,0),187).Kf().b,i=(t-h)/2,l.d.d=k.Math.max(0,i),l.d.a=r-i-h))):l.d.a=e.t+r:uE(e.u)&&(c=m0e(l.b),c.d<0&&(l.d.d=-c.d),c.d+c.a>l.b.Kf().b&&(l.d.a=c.d+c.a-l.b.Kf().b))}function Hf(){Hf=Y,Ay=new Yr((Xt(),RI),ke(1)),kJ=new Yr(Qd,80),xtn=new Yr(q9e,5),gtn=new Yr(B7,q8),Etn=new Yr(Sce,ke(1)),Stn=new Yr(xce,($n(),!0)),cve=new yw(50),ktn=new Yr(s1,cve),tve=PI,uve=Vx,wtn=new Yr(bce,!1),rve=$I,vtn=$m,ytn=bb,mtn=Ig,ptn=e5,jtn=Rm,ive=(C0e(),stn),jte=htn,yJ=otn,kte=ltn,ove=atn,Ctn=J7,Ttn=uG,Mtn=zm,Atn=F7,sve=(V4(),Hm),new Yr(Ky,sve)}function x_n(e,n){var t;switch(aO(e)){case 6:return $r(n);case 7:return g2(n);case 8:return b2(n);case 3:return Array.isArray(n)&&(t=aO(n),!(t>=14&&t<=16));case 11:return n!=null&&typeof n===hZ;case 12:return n!=null&&(typeof n===fN||typeof n==hZ);case 0:return $Q(n,e.__elementTypeId$);case 2:return mV(n)&&n.Rm!==bn;case 1:return mV(n)&&n.Rm!==bn||$Q(n,e.__elementTypeId$);default:return!0}}function A_n(e){var n,t,i,r;i=e.o,v2(),e.A.dc()||gi(e.A,Qme)?r=i.a:(e.D?r=k.Math.max(i.a,WE(e.f)):r=WE(e.f),e.A.Gc((Vs(),UI))&&!e.B.Gc((_s(),rA))&&(r=k.Math.max(r,WE(u(zc(e.p,(De(),Kn)),253))),r=k.Math.max(r,WE(u(zc(e.p,bt),253)))),n=tze(e),n&&(r=k.Math.max(r,n.a))),Fe(ze(e.e.Rf().mf((Xt(),$m))))?i.a=k.Math.max(i.a,r):i.a=r,t=e.f.i,t.c=0,t.b=r,GW(e.f)}function sKe(e,n){var t,i,r,c;return i=k.Math.min(k.Math.abs(e.c-(n.c+n.b)),k.Math.abs(e.c+e.b-n.c)),c=k.Math.min(k.Math.abs(e.d-(n.d+n.a)),k.Math.abs(e.d+e.a-n.d)),t=k.Math.abs(e.c+e.b/2-(n.c+n.b/2)),t>e.b/2+n.b/2||(r=k.Math.abs(e.d+e.a/2-(n.d+n.a/2)),r>e.a/2+n.a/2)?1:t==0&&r==0?0:t==0?c/r+1:r==0?i/t+1:k.Math.min(i/t,c/r)+1}function M_n(e,n){var t,i,r,c,o,l,f;for(c=0,l=0,f=0,r=new P(e.f.e);r.a0&&e.d!=(kE(),xte)&&(l+=o*(i.d.a+e.a[n.a][i.a]*(n.d.a-i.d.a)/t)),t>0&&e.d!=(kE(),Ete)&&(f+=o*(i.d.b+e.a[n.a][i.a]*(n.d.b-i.d.b)/t)));switch(e.d.g){case 1:return new Se(l/c,n.d.b);case 2:return new Se(n.d.a,f/c);default:return new Se(l/c,f/c)}}function lKe(e){var n,t,i,r,c,o;for(t=(!e.a&&(e.a=new mr(yl,e,5)),e.a).i+2,o=new xo(t),Te(o,new Se(e.j,e.k)),er(new mn(null,(!e.a&&(e.a=new mr(yl,e,5)),new vn(e.a,16))),new iSe(o)),Te(o,new Se(e.b,e.c)),n=1;n0&&(EO(f,!1,(vr(),Zc)),EO(f,!0,ru)),Ao(n.g,new nCe(e,t)),ei(e.g,n,t)}function nge(){nge=Y,mln=new fn(s2e,($n(),!1)),ke(-1),aln=new fn(l2e,ke(-1)),ke(-1),hln=new fn(f2e,ke(-1)),dln=new fn(a2e,!1),bln=new fn(h2e,!1),g6e=(QR(),Vre),jln=new fn(d2e,g6e),Eln=new fn(b2e,-1),b6e=(VB(),qre),kln=new fn(g2e,b6e),yln=new fn(w2e,!0),h6e=(uB(),Yre),pln=new fn(p2e,h6e),wln=new fn(m2e,!1),ke(1),gln=new fn(v2e,ke(1)),d6e=(GB(),Qre),vln=new fn(y2e,d6e)}function hKe(){hKe=Y;var e;for(Nme=F(z($t,1),ni,30,15,[-1,-1,30,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5]),cte=se($t,ni,30,37,15,1),tnn=F(z($t,1),ni,30,15,[-1,-1,63,40,32,28,25,23,21,20,19,19,18,18,17,17,16,16,16,15,15,15,15,14,14,14,14,14,14,13,13,13,13,13,13,13,13]),Ime=se(Ap,xYe,30,37,14,1),e=2;e<=36;e++)cte[e]=lc(k.Math.pow(e,Nme[e])),Ime[e]=FO(bN,cte[e])}function C_n(e){var n;if((!e.a&&(e.a=new we($i,e,6,6)),e.a).i!=1)throw R(new qn(FWe+(!e.a&&(e.a=new we($i,e,6,6)),e.a).i));return n=new xs,VY(u(K((!e.b&&(e.b=new Nn(mt,e,4,7)),e.b),0),84))&&ac(n,YVe(e,VY(u(K((!e.b&&(e.b=new Nn(mt,e,4,7)),e.b),0),84)),!1)),VY(u(K((!e.c&&(e.c=new Nn(mt,e,5,8)),e.c),0),84))&&ac(n,YVe(e,VY(u(K((!e.c&&(e.c=new Nn(mt,e,5,8)),e.c),0),84)),!0)),n}function dKe(e,n){var t,i,r,c,o;for(n.d?r=e.a.c==(dh(),yp)?cr(n.b):Ii(n.b):r=e.a.c==(dh(),Kd)?cr(n.b):Ii(n.b),c=!1,i=new Un(Yn(r.a.Jc(),new ee));ht(i);)if(t=u(rt(i),17),o=Fe(e.a.f[e.a.g[n.b.p].p]),!(!o&&!uc(t)&&t.c.i.c==t.d.i.c)&&!(Fe(e.a.n[e.a.g[n.b.p].p])||Fe(e.a.n[e.a.g[n.b.p].p]))&&(c=!0,rf(e.b,e.a.g[QSn(t,n.b).p])))return n.c=!0,n.a=t,n;return n.c=c,n.a=null,n}function tge(e,n,t){var i,r,c,o,l,f,h;if(i=t.gc(),i==0)return!1;if(e.Nj())if(f=e.Oj(),lde(e,n,t),o=i==1?e.Gj(3,null,t.Jc().Pb(),n,f):e.Gj(5,null,t,n,f),e.Kj()){for(l=i<100?null:new k0(i),c=n+i,r=n;r0){for(o=0;o>16==-15&&e.Cb.Vh()&&EY(new mY(e.Cb,9,13,t,e.c,$d(Ts(u(e.Cb,62)),e))):X(e.Cb,88)&&e.Db>>16==-23&&e.Cb.Vh()&&(n=e.c,X(n,88)||(n=(jn(),jf)),X(t,88)||(t=(jn(),jf)),EY(new mY(e.Cb,9,10,t,n,$d(Vu(u(e.Cb,29)),e)))))),e.c}function wKe(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A;if(n==t)return!0;if(n=ube(e,n),t=ube(e,t),i=GQ(n),i){if(b=GQ(t),b!=i)return b?(f=i.kk(),A=b.kk(),f==A&&f!=null):!1;if(o=(!n.d&&(n.d=new mr(Rc,n,1)),n.d),c=o.i,y=(!t.d&&(t.d=new mr(Rc,t,1)),t.d),c==y.i){for(h=0;h0,l=KB(n,c),fle(t?l.b:l.g,n),r3(l).c.length==1&&Ki(i,l,i.c.b,i.c),r=new jc(c,n),I0(e.o,r),qo(e.e.a,c))}function vKe(e,n){var t,i,r,c,o,l,f;return i=k.Math.abs(vR(e.b).a-vR(n.b).a),l=k.Math.abs(vR(e.b).b-vR(n.b).b),r=0,f=0,t=1,o=1,i>e.b.b/2+n.b.b/2&&(r=k.Math.min(k.Math.abs(e.b.c-(n.b.c+n.b.b)),k.Math.abs(e.b.c+e.b.b-n.b.c)),t=1-r/i),l>e.b.a/2+n.b.a/2&&(f=k.Math.min(k.Math.abs(e.b.d-(n.b.d+n.b.a)),k.Math.abs(e.b.d+e.b.a-n.b.d)),o=1-f/l),c=k.Math.min(t,o),(1-c)*k.Math.sqrt(i*i+l*l)}function __n(e){var n,t,i,r;for(uZ(e,e.e,e.f,(Iw(),hb),!0,e.c,e.i),uZ(e,e.e,e.f,hb,!1,e.c,e.i),uZ(e,e.e,e.f,X3,!0,e.c,e.i),uZ(e,e.e,e.f,X3,!1,e.c,e.i),N_n(e,e.c,e.e,e.f,e.i),i=new qr(e.i,0);i.b=65;t--)ch[t]=t-65<<24>>24;for(i=122;i>=97;i--)ch[i]=i-97+26<<24>>24;for(r=57;r>=48;r--)ch[r]=r-48+52<<24>>24;for(ch[43]=62,ch[47]=63,c=0;c<=25;c++)r0[c]=65+c&yr;for(o=26,f=0;o<=51;++o,f++)r0[o]=97+f&yr;for(e=52,l=0;e<=61;++e,l++)r0[e]=48+l&yr;r0[62]=43,r0[63]=47}function yKe(e,n){var t,i,r,c,o,l;return r=Whe(e),l=Whe(n),r==l?e.e==n.e&&e.a<54&&n.a<54?e.fn.f?1:0:(i=e.e-n.e,t=(e.d>0?e.d:k.Math.floor((e.a-1)*AYe)+1)-(n.d>0?n.d:k.Math.floor((n.a-1)*AYe)+1),t>i+1?r:t0&&(o=Kv(o,IKe(i))),kJe(c,o))):rh&&(y=0,S+=f+n,f=0),T8(o,y,S),t=k.Math.max(t,y+b.a),f=k.Math.max(f,b.b),y+=b.a+n;return new Se(t+n,S+f+n)}function uge(e,n){var t,i,r,c,o,l,f;if(!_a(e))throw R(new Uc(zWe));if(i=_a(e),c=i.g,r=i.f,c<=0&&r<=0)return De(),ju;switch(l=e.i,f=e.j,n.g){case 2:case 1:if(l<0)return De(),Vn;if(l+e.g>c)return De(),et;break;case 4:case 3:if(f<0)return De(),Kn;if(f+e.f>r)return De(),bt}return o=(l+e.g/2)/c,t=(f+e.f/2)/r,o+t<=1&&o-t<=0?(De(),Vn):o+t>=1&&o-t>=0?(De(),et):t<.5?(De(),Kn):(De(),bt)}function $_n(e,n,t,i,r){var c,o;if(c=mc(Rr(n[0],Dc),Rr(i[0],Dc)),e[0]=Rt(c),c=Sw(c,32),t>=r){for(o=1;o0&&(r.b[o++]=0,r.b[o++]=c.b[0]-1),n=1;n0&&(Db(f,f.d-r.d),r.c==(da(),ab)&&iX(f,f.a-r.d),f.d<=0&&f.i>0&&Ki(n,f,n.c.b,n.c)));for(c=new P(e.f);c.a0&&(m0(l,l.i-r.d),r.c==(da(),ab)&&CP(l,l.b-r.d),l.i<=0&&l.d>0&&Ki(t,l,t.c.b,t.c)))}function z_n(e,n,t,i,r){var c,o,l,f,h,b,p,y,S;for(En(),Tr(e,new VM),o=_T(e),S=new Oe,y=new Oe,l=null,f=0;o.b!=0;)c=u(o.b==0?null:(at(o.b!=0),$l(o,o.a.a)),167),!l||us(l)*Gs(l)/21&&(f>us(l)*Gs(l)/2||o.b==0)&&(p=new gB(y),b=us(l)/Gs(l),h=oZ(p,n,new o4,t,i,r,b),pi(fa(p.e),h),l=p,Gn(S.c,p),f=0,y.c.length=0));return Sr(S,y),S}function Wu(e,n,t,i,r){jd();var c,o,l,f,h,b,p;if(Rfe(e,"src"),Rfe(t,"dest"),p=Us(e),f=Us(t),ffe((p.i&4)!=0,"srcType is not an array"),ffe((f.i&4)!=0,"destType is not an array"),b=p.c,o=f.c,ffe((b.i&1)!=0?b==o:(o.i&1)==0,"Array types don't match"),akn(e,n,t,i,r),(b.i&1)==0&&p!=f)if(h=G4(e),c=G4(t),ue(e)===ue(t)&&ni;)ir(c,l,h[--n]);else for(l=i+r;i0),i.a.Xb(i.c=--i.b),p>y+f&&As(i);for(o=new P(S);o.a0),i.a.Xb(i.c=--i.b)}}function J_n(){ai();var e,n,t,i,r,c;if(Kce)return Kce;for(e=new cl(4),tm(e,K0(Une,!0)),bS(e,K0("M",!0)),bS(e,K0("C",!0)),c=new cl(4),i=0;i<11;i++)ho(c,i,i);return n=new cl(4),tm(n,K0("M",!0)),ho(n,4448,4607),ho(n,65438,65439),r=new Vj(2),fg(r,e),fg(r,gA),t=new Vj(2),t.Hm(dR(c,K0("L",!0))),t.Hm(n),t=new D2(3,t),t=new zfe(r,t),Kce=t,Kce}function nm(e,n){var t,i,r,c,o,l,f,h;for(t=new RegExp(n,"g"),f=se(He,Me,2,0,6,1),i=0,h=e,c=null;;)if(l=t.exec(h),l==null||h==""){f[i]=h;break}else o=l.index,f[i]=(Qr(0,o,h.length),h.substr(0,o)),h=of(h,o+l[0].length,h.length),t.lastIndex=0,c==h&&(f[i]=(Qr(0,1,h.length),h.substr(0,1)),h=(Qn(1,h.length+1),h.substr(1))),c=h,++i;if(e.length>0){for(r=f.length;r>0&&f[r-1]=="";)--r;rb&&(b=f);for(h=k.Math.pow(4,n),b>h&&(h=b),y=(k.Math.log(h)-k.Math.log(1))/n,c=k.Math.exp(y),r=c,o=0;o0&&(p-=i[0]+e.c,i[0]+=e.c),i[2]>0&&(p-=i[2]+e.c),i[1]=k.Math.max(i[1],p),gR(e.a[1],t.c+n.b+i[0]-(i[1]-p)/2,i[1]);for(c=e.a,l=0,h=c.length;l0?(e.n.c.length-1)*e.i:0,i=new P(e.n);i.a1)for(i=St(r,0);i.b!=i.d.c;)for(t=u(jt(i),235),c=0,f=new P(t.e);f.a0&&(n[0]+=e.c,p-=n[0]),n[2]>0&&(p-=n[2]+e.c),n[1]=k.Math.max(n[1],p),wR(e.a[1],i.d+t.d+n[0]-(n[1]-p)/2,n[1]);else for(A=i.d+t.d,S=i.a-t.d-t.a,o=e.a,f=0,b=o.length;f=n.o&&t.f<=n.f||n.a*.5<=t.f&&n.a*1.5>=t.f){if(o=u(Pe(n.n,n.n.c.length-1),208),o.e+o.d+t.g+r<=i&&(c=u(Pe(n.n,n.n.c.length-1),208),c.f-e.f+t.f<=e.b||e.a.c.length==1))return ede(n,t),!0;if(n.s+t.g<=i&&n.t+n.d+t.f+r<=e.f+e.b)return Te(n.b,t),l=u(Pe(n.n,n.n.c.length-1),208),Te(n.n,new RR(n.s,l.f+l.a+n.i,n.i)),Dde(u(Pe(n.n,n.n.c.length-1),208),t),EKe(n,t),!0}return!1}function qz(e,n,t,i){var r,c,o,l,f;if(f=Po(e.e.Ah(),n),r=u(e.g,122),Tc(),u(n,69).vk()){for(o=0;o0||zw(r.b.d,e.b.d+e.b.a)==0&&i.b<0||zw(r.b.d+r.b.a,e.b.d)==0&&i.b>0){l=0;break}}else l=k.Math.min(l,dqe(e,r,i));l=k.Math.min(l,xKe(e,c,l,i))}return l}function sge(e,n){var t,i,r,c,o,l,f;if(e.b<2)throw R(new qn("The vector chain must contain at least a source and a target point."));for(r=(at(e.b!=0),u(e.a.a.c,8)),kT(n,r.a,r.b),f=new j4((!n.a&&(n.a=new mr(yl,n,5)),n.a)),o=St(e,1);o.a=0&&c!=t))throw R(new qn(BN));for(r=0,f=0;fne(Ia(o.g,o.d[0]).a)?(at(f.b>0),f.a.Xb(f.c=--f.b),y2(f,o),r=!0):l.e&&l.e.gc()>0&&(c=(!l.e&&(l.e=new Oe),l.e).Kc(n),h=(!l.e&&(l.e=new Oe),l.e).Kc(t),(c||h)&&((!l.e&&(l.e=new Oe),l.e).Ec(o),++o.c));r||Gn(i.c,o)}function Q_n(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B;return p=e.a.i+e.a.g/2,y=e.a.i+e.a.g/2,A=n.i+n.g/2,D=n.j+n.f/2,l=new Se(A,D),h=u(je(n,(Xt(),Uy)),8),h.a=h.a+p,h.b=h.b+y,c=(l.b-h.b)/(l.a-h.a),i=l.b-c*l.a,O=t.i+t.g/2,B=t.j+t.f/2,f=new Se(O,B),b=u(je(t,Uy),8),b.a=b.a+p,b.b=b.b+y,o=(f.b-b.b)/(f.a-b.a),r=f.b-o*f.a,S=(i-r)/(o-c),h.a>>0,"0"+n.toString(16)),i="\\x"+of(t,t.length-2,t.length)):e>=Ec?(t=(n=e>>>0,"0"+n.toString(16)),i="\\v"+of(t,t.length-6,t.length)):i=""+String.fromCharCode(e&yr)}return i}function OKe(e,n){var t,i,r,c,o,l,f,h,b;for(c=new P(e.b);c.at){n.Ug();return}switch(u(C(e,(Ie(),Gie)),350).g){case 2:c=new x6;break;case 0:c=new Jp;break;default:c=new lM}if(i=c.mg(e,r),!c.ng())switch(u(C(e,EH),351).g){case 2:i=bqe(r,i);break;case 1:i=rGe(r,i)}WLn(e,r,i),n.Ug()}function sS(e,n){var t,i,r,c,o,l,f,h;n%=24,e.q.getHours()!=n&&(i=new k.Date(e.q.getTime()),i.setDate(i.getDate()+1),l=e.q.getTimezoneOffset()-i.getTimezoneOffset(),l>0&&(f=l/60|0,h=l%60,r=e.q.getDate(),t=e.q.getHours(),t+f>=24&&++r,c=new k.Date(e.q.getFullYear(),e.q.getMonth(),r,n+f,e.q.getMinutes()+h,e.q.getSeconds(),e.q.getMilliseconds()),e.q.setTime(c.getTime()))),o=e.q.getTime(),e.q.setTime(o+36e5),e.q.getHours()!=n&&e.q.setTime(o)}function rLn(e,n){var t,i,r,c;if(R4n(e.d,e.e),e.c.a.$b(),ne(re(C(n.j,(Ie(),aI))))!=0||ne(re(C(n.j,aI)))!=0)for(t=E3,ue(C(n.j,o1))!==ue((F1(),fb))&&he(n.j,(me(),ob),($n(),!0)),c=u(C(n.j,jx),15).a,r=0;rr&&++h,Te(o,(kn(l+h,n.c.length),u(n.c[l+h],15))),f+=(kn(l+h,n.c.length),u(n.c[l+h],15)).a-i,++t;t=D&&e.e[f.p]>A*e.b||V>=t*D)&&(Gn(y.c,l),l=new Oe,ac(o,c),c.a.$b(),h-=b,S=k.Math.max(S,h*e.b+O),h+=V,q=V,V=0,b=0,O=0);return new jc(S,y)}function UW(e){var n,t,i,r,c,o,l;if(!e.d){if(l=new dU,n=lA,c=n.a.yc(e,n),c==null){for(i=new st(tu(e));i.e!=i.i.gc();)t=u(ft(i),29),nr(l,UW(t));n.a.Ac(e)!=null,n.a.gc()==0}for(o=l.i,r=(!e.q&&(e.q=new we(yf,e,11,10)),new st(e.q));r.e!=r.i.gc();++o)u(ft(r),403);nr(l,(!e.q&&(e.q=new we(yf,e,11,10)),e.q)),F2(l),e.d=new Pv((u(K(ge((C0(),Bn).o),9),19),l.i),l.g),e.e=u(l.g,678),e.e==null&&(e.e=Wan),Ms(e).b&=-17}return e.d}function N8(e,n,t,i){var r,c,o,l,f,h;if(h=Po(e.e.Ah(),n),f=0,r=u(e.g,122),Tc(),u(n,69).vk()){for(o=0;o1||A==-1)if(p=u(O,72),y=u(b,72),p.dc())y.$b();else for(o=!!Oc(n),c=0,l=e.a?p.Jc():p.Gi();l.Ob();)h=u(l.Pb(),57),r=u($a(e,h),57),r?(o?(f=y.bd(r),f==-1?y.Ei(c,r):c!=f&&y.Si(c,r)):y.Ei(c,r),++c):e.b&&!o&&(y.Ei(c,h),++c);else O==null?b.Wb(null):(r=$a(e,O),r==null?e.b&&!Oc(n)&&b.Wb(O):b.Wb(r))}function lLn(e,n){var t,i,r,c,o,l,f,h;for(t=new w6,r=new Un(Yn(cr(n).a.Jc(),new ee));ht(r);)if(i=u(rt(r),17),!uc(i)&&(l=i.c.i,b0e(l,xJ))){if(h=Pbe(e,l,xJ,SJ),h==-1)continue;t.b=k.Math.max(t.b,h),!t.a&&(t.a=new Oe),Te(t.a,l)}for(o=new Un(Yn(Ii(n).a.Jc(),new ee));ht(o);)if(c=u(rt(o),17),!uc(c)&&(f=c.d.i,b0e(f,SJ))){if(h=Pbe(e,f,SJ,xJ),h==-1)continue;t.d=k.Math.max(t.d,h),!t.c&&(t.c=new Oe),Te(t.c,f)}return t}function fLn(e,n,t,i){var r,c,o,l,f,h,b;if(t.d.i!=n.i){for(r=new za(e),Mf(r,(Fn(),dr)),he(r,(me(),mi),t),he(r,(Ie(),Zi),(Br(),to)),Gn(i.c,r),o=new Qu,wu(o,r),Ar(o,(De(),Vn)),l=new Qu,wu(l,r),Ar(l,et),b=t.d,Gr(t,o),c=new Ow,Pu(c,t),he(c,Wc,null),fc(c,l),Gr(c,b),h=new qr(t.b,0);h.b1e6)throw R(new HP("power of ten too big"));if(e<=oi)return B4(VO(Ey[1],n),n);for(i=VO(Ey[1],oi),r=i,t=Lu(e-oi),n=lc(e%oi);ao(t,oi)>0;)r=Kv(r,i),t=lf(t,oi);for(r=Kv(r,VO(Ey[1],n)),r=B4(r,oi),t=Lu(e-oi);ao(t,oi)>0;)r=B4(r,oi),t=lf(t,oi);return r=B4(r,n),r}function DKe(e){var n,t,i,r,c,o,l,f,h,b;for(f=new P(e.a);f.ah&&i>h)b=l,h=ne(n.p[l.p])+ne(n.d[l.p])+l.o.b+l.d.a;else{r=!1,t.$g()&&t.ah("bk node placement breaks on "+l+" which should have been after "+b);break}if(!r)break}return t.$g()&&t.ah(n+" is feasible: "+r),r}function age(e,n,t,i){var r,c,o,l,f,h,b,p,y;if(c=new za(e),Mf(c,(Fn(),wo)),he(c,(Ie(),Zi),(Br(),to)),r=0,n){for(o=new Qu,he(o,(me(),mi),n),he(c,mi,n.i),Ar(o,(De(),Vn)),wu(o,c),y=gh(n.e),h=y,b=0,p=h.length;b0){if(r<0&&b.a&&(r=f,c=h[0],i=0),r>=0){if(l=b.b,f==r&&(l-=i++,l==0))return 0;if(!LVe(n,h,b,l,o)){f=r-1,h[0]=c;continue}}else if(r=-1,!LVe(n,h,b,0,o))return 0}else{if(r=-1,rc(b.c,0)==32){if(p=h[0],MRe(n,h),h[0]>p)continue}else if(V5n(n,b.c,h[0])){h[0]+=b.c.length;continue}return 0}return iRn(o,t)?h[0]:0}function gLn(e,n,t){var i,r,c,o,l,f,h,b,p,y;for(b=new mR(new nje(t)),l=se(ts,ma,30,e.f.e.c.length,16,1),$fe(l,l.length),t[n.a]=0,h=new P(e.f.e);h.a=l.a?c.b>=l.b?(i.a=l.a+(c.a-l.a)/2+r,i.b=l.b+(c.b-l.b)/2-r-e.e.b):(i.a=l.a+(c.a-l.a)/2+r,i.b=c.b+(l.b-c.b)/2+r):c.b>=l.b?(i.a=c.a+(l.a-c.a)/2+r,i.b=l.b+(c.b-l.b)/2+r):(i.a=c.a+(l.a-c.a)/2+r,i.b=c.b+(l.b-c.b)/2-r-e.e.b))}function fS(e){var n,t,i,r,c,o,l,f;if(!e.f){if(f=new iC,l=new iC,n=lA,o=n.a.yc(e,n),o==null){for(c=new st(tu(e));c.e!=c.i.gc();)r=u(ft(c),29),nr(f,fS(r));n.a.Ac(e)!=null,n.a.gc()==0}for(i=(!e.s&&(e.s=new we(ns,e,21,17)),new st(e.s));i.e!=i.i.gc();)t=u(ft(i),179),X(t,103)&&Et(l,u(t,19));F2(l),e.r=new oIe(e,(u(K(ge((C0(),Bn).o),6),19),l.i),l.g),nr(f,e.r),F2(f),e.f=new Pv((u(K(ge(Bn.o),5),19),f.i),f.g),Ms(e).b&=-3}return e.f}function Uz(){Uz=Y,R8e=F(z(Wl,1),Eh,30,15,[48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70]),Can=new RegExp(`[ -\r\f]+`);try{uA=F(z(ezn,1),On,2076,0,[new KC(($se(),ZB("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ",TT((zP(),zP(),XS))))),new KC(ZB("yyyy-MM-dd'T'HH:mm:ss'.'SSS",TT(XS))),new KC(ZB("yyyy-MM-dd'T'HH:mm:ss",TT(XS))),new KC(ZB("yyyy-MM-dd'T'HH:mm",TT(XS))),new KC(ZB("yyyy-MM-dd",TT(XS)))])}catch(e){if(e=sr(e),!X(e,80))throw R(e)}}function wLn(e){var n,t,i,r,c,o,l;for(t=null,l=null,i=u(C(e.b,(Ie(),Die)),348),i==(DE(),vI)&&(t=new Oe,l=new Oe),o=new P(e.d);o.at);return c}function LKe(e,n){var t,i,r,c;if(r=Ds(e.d,1)!=0,i=Mz(e,n),i==0&&Fe(ze(C(n.j,(me(),ob)))))return 0;!Fe(ze(C(n.j,(me(),ob))))&&!Fe(ze(C(n.j,B3)))||ue(C(n.j,(Ie(),o1)))===ue((F1(),fb))?n.c.kg(n.e,r):r=Fe(ze(C(n.j,ob))),eN(e,n,r,!0),Fe(ze(C(n.j,B3)))&&he(n.j,B3,($n(),!1)),Fe(ze(C(n.j,ob)))&&(he(n.j,ob,($n(),!1)),he(n.j,B3,!0)),t=Mz(e,n);do{if(Qhe(e),t==0)return 0;r=!r,c=t,eN(e,n,r,!1),t=Mz(e,n)}while(c>t);return c}function mLn(e,n,t){var i,r,c,o,l;if(i=u(C(e,(Ie(),Oie)),22),t.a>n.a&&(i.Gc((sg(),qx))?e.c.a+=(t.a-n.a)/2:i.Gc(Ux)&&(e.c.a+=t.a-n.a)),t.b>n.b&&(i.Gc((sg(),Kx))?e.c.b+=(t.b-n.b)/2:i.Gc(Xx)&&(e.c.b+=t.b-n.b)),u(C(e,(me(),po)),22).Gc((Ic(),Kl))&&(t.a>n.a||t.b>n.b))for(l=new P(e.a);l.an.a&&(i.Gc((sg(),qx))?e.c.a+=(t.a-n.a)/2:i.Gc(Ux)&&(e.c.a+=t.a-n.a)),t.b>n.b&&(i.Gc((sg(),Kx))?e.c.b+=(t.b-n.b)/2:i.Gc(Xx)&&(e.c.b+=t.b-n.b)),u(C(e,(me(),po)),22).Gc((Ic(),Kl))&&(t.a>n.a||t.b>n.b))for(o=new P(e.a);o.a=0&&p<=1&&y>=0&&y<=1?pi(new Se(e.a,e.b),A1(new Se(n.a,n.b),p)):null}function aS(e,n,t){var i,r,c,o,l,f,h,b,p,y;for(c=0,o=e.t,r=0,i=0,f=0,y=0,p=0,t&&(e.n.c.length=0,Te(e.n,new RR(e.s,e.t,e.i))),l=0,b=new P(e.b);b.a0?e.i:0)>n&&f>0&&(c=0,o+=f+e.i,r=k.Math.max(r,y),i+=f+e.i,f=0,y=0,t&&(++p,Te(e.n,new RR(e.s,o,e.i))),l=0),y+=h.g+(l>0?e.i:0),f=k.Math.max(f,h.f),t&&Dde(u(Pe(e.n,p),208),h),c+=h.g+(l>0?e.i:0),++l;return r=k.Math.max(r,y),i+=f,t&&(e.r=r,e.d=i,Pde(e.j)),new _f(e.s,e.t,r,i)}function Xz(e){var n,t,i;return t=ue(je(e,(Ie(),By)))===ue((YO(),nie))||ue(je(e,By))===ue(Yte)||ue(je(e,By))===ue(Qte)||ue(je(e,By))===ue(Zte)||ue(je(e,By))===ue(tie)||ue(je(e,By))===ue(iI),i=ue(je(e,wH))===ue((WO(),Uie))||ue(je(e,wH))===ue(Kie)||ue(je(e,dI))===ue((X0(),_7))||ue(je(e,dI))===ue((X0(),xx)),n=ue(je(e,o1))!==ue((F1(),fb))||Fe(ze(je(e,C7)))||ue(je(e,bx))!==ue((W4(),ex))||ne(re(je(e,aI)))!=0||ne(re(je(e,Mie)))!=0,t||i||n}function g3(e){var n,t,i,r,c,o,l,f;if(!e.a){if(e.o=null,f=new BSe(e),n=new Af,t=lA,l=t.a.yc(e,t),l==null){for(o=new st(tu(e));o.e!=o.i.gc();)c=u(ft(o),29),nr(f,g3(c));t.a.Ac(e)!=null,t.a.gc()==0}for(r=(!e.s&&(e.s=new we(ns,e,21,17)),new st(e.s));r.e!=r.i.gc();)i=u(ft(r),179),X(i,335)&&Et(n,u(i,38));F2(n),e.k=new uIe(e,(u(K(ge((C0(),Bn).o),7),19),n.i),n.g),nr(f,e.k),F2(f),e.a=new Pv((u(K(ge(Bn.o),4),19),f.i),f.g),Ms(e).b&=-2}return e.a}function kLn(e){var n,t,i,r,c,o,l,f,h,b,p,y;if(l=e.d,p=u(C(e,(me(),$y)),16),n=u(C(e,Oy),16),!(!p&&!n)){if(c=ne(re(G2(e,(Ie(),zie)))),o=ne(re(G2(e,w4e))),y=0,p){for(h=0,r=p.Jc();r.Ob();)i=u(r.Pb(),9),h=k.Math.max(h,i.o.b),y+=i.o.a;y+=c*(p.gc()-1),l.d+=h+o}if(t=0,n){for(h=0,r=n.Jc();r.Ob();)i=u(r.Pb(),9),h=k.Math.max(h,i.o.b),t+=i.o.a;t+=c*(n.gc()-1),l.a+=h+o}f=k.Math.max(y,t),f>e.o.a&&(b=(f-e.o.a)/2,l.b=k.Math.max(l.b,b),l.c=k.Math.max(l.c,b))}}function bge(e,n,t,i){var r,c,o,l,f,h,b;if(b=Po(e.e.Ah(),n),r=0,c=u(e.g,122),f=null,Tc(),u(n,69).vk()){for(l=0;ll?1:-1:M1e(e.a,n.a,c),r==-1)p=-f,b=o==f?hY(n.a,l,e.a,c):bY(n.a,l,e.a,c);else if(p=o,o==f){if(r==0)return yh(),VS;b=hY(e.a,c,n.a,l)}else b=bY(e.a,c,n.a,l);return h=new Gb(p,b.length,b),gE(h),h}function SLn(e,n){var t,i,r,c;if(c=kKe(n),!n.c&&(n.c=new we($s,n,9,9)),er(new mn(null,(!n.c&&(n.c=new we($s,n,9,9)),new vn(n.c,16))),new cje(c)),r=u(C(c,(me(),po)),22),y$n(n,r),r.Gc((Ic(),Kl)))for(i=new st((!n.c&&(n.c=new we($s,n,9,9)),n.c));i.e!=i.i.gc();)t=u(ft(i),125),q$n(e,n,c,t);return u(je(n,(Ie(),Ag)),182).gc()!=0&&sXe(n,c),Fe(ze(C(c,a4e)))&&r.Ec(nH),wi(c,bI)&&Wxe(new tde(ne(re(C(c,bI)))),c),ue(je(n,Em))===ue((B1(),Wd))?dBn(e,n,c):Q$n(e,n,c),c}function bo(e,n){var t,i,r,c,o,l,f;if(e==null)return null;if(c=e.length,c==0)return"";for(f=se(Wl,Eh,30,c,15,1),Qr(0,c,e.length),Qr(0,c,f.length),cDe(e,0,c,f,0),t=null,l=n,r=0,o=0;r0?of(t.a,0,c-1):""):(Qr(0,c-1,e.length),e.substr(0,c-1)):t?t.a:e}function xLn(e,n,t){var i,r,c;if(wi(n,(Ie(),ku))&&(ue(C(n,ku))===ue((Xs(),V1))||ue(C(n,ku))===ue(Sg))||wi(t,ku)&&(ue(C(t,ku))===ue((Xs(),V1))||ue(C(t,ku))===ue(Sg)))return 0;if(i=_r(n),r=dDn(e,n,t),r!=0)return r;if(wi(n,(me(),Oi))&&wi(t,Oi)){if(c=oo(Kw(n,t,i,u(C(i,sb),15).a),Kw(t,n,i,u(C(i,sb),15).a)),ue(C(i,gx))===ue(($0(),cI))&&ue(C(n,wx))!==ue(C(t,wx))&&(c=0),c<0)return nN(e,n,t),c;if(c>0)return nN(e,t,n),c}return zTn(e,n,t)}function PKe(e,n){var t,i,r,c,o,l,f,h,b,p,y;for(i=new Un(Yn(U0(n).a.Jc(),new ee));ht(i);)t=u(rt(i),85),X(K((!t.b&&(t.b=new Nn(mt,t,4,7)),t.b),0),193)||(f=iu(u(K((!t.c&&(t.c=new Nn(mt,t,5,8)),t.c),0),84)),eS(t)||(o=n.i+n.g/2,l=n.j+n.f/2,b=f.i+f.g/2,p=f.j+f.f/2,y=new Vr,y.a=b-o,y.b=p-l,c=new Se(y.a,y.b),v8(c,n.g,n.f),y.a-=c.a,y.b-=c.b,o=b-y.a,l=p-y.b,h=new Se(y.a,y.b),v8(h,f.g,f.f),y.a-=h.a,y.b-=h.b,b=o+y.a,p=l+y.b,r=Rz(t),e3(r,o),n3(r,l),Wv(r,b),Zv(r,p),PKe(e,f)))}function tm(e,n){var t,i,r,c,o;if(o=u(n,137),h3(e),h3(o),o.b!=null){if(e.c=!0,e.b==null){e.b=se($t,ni,30,o.b.length,15,1),Wu(o.b,0,e.b,0,o.b.length);return}for(c=se($t,ni,30,e.b.length+o.b.length,15,1),t=0,i=0,r=0;t=e.b.length?(c[r++]=o.b[i++],c[r++]=o.b[i++]):i>=o.b.length?(c[r++]=e.b[t++],c[r++]=e.b[t++]):o.b[i]0?e.i:0)),++n;for(K1e(e.n,f),e.d=t,e.r=i,e.g=0,e.f=0,e.e=0,e.o=Vi,e.p=Vi,c=new P(e.b);c.a0&&(r=(!e.n&&(e.n=new we(Eu,e,1,7)),u(K(e.n,0),157)).a,!r||Kt(Kt((n.a+=' "',n),r),'"'))),t=(!e.b&&(e.b=new Nn(mt,e,4,7)),!(e.b.i<=1&&(!e.c&&(e.c=new Nn(mt,e,5,8)),e.c.i<=1))),t?n.a+=" [":n.a+=" ",Kt(n,nle(new IX,new st(e.b))),t&&(n.a+="]"),n.a+=nee,t&&(n.a+="["),Kt(n,nle(new IX,new st(e.c))),t&&(n.a+="]"),n.a)}function MLn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,_e,on,cn,Tn;for(be=e.c,fe=n.c,t=pu(be.a,e,0),i=pu(fe.a,n,0),V=u(Fw(e,(Nc(),ys)).Jc().Pb(),12),cn=u(Fw(e,Io).Jc().Pb(),12),te=u(Fw(n,ys).Jc().Pb(),12),Tn=u(Fw(n,Io).Jc().Pb(),12),B=gh(V.e),_e=gh(cn.g),q=gh(te.e),on=gh(Tn.g),H0(e,i,fe),o=q,b=0,A=o.length;b0&&f[i]&&(A=zv(e.b,f[i],r)),O=k.Math.max(O,r.c.c.b+A);for(c=new P(b.e);c.ab?new Kb((da(),Dm),t,n,h-b):h>0&&b>0&&(new Kb((da(),Dm),n,t,0),new Kb(Dm,t,n,0))),o)}function NLn(e,n,t){var i,r,c;for(e.a=new Oe,c=St(n.b,0);c.b!=c.d.c;){for(r=u(jt(c),40);u(C(r,(Mu(),Dh)),15).a>e.a.c.length-1;)Te(e.a,new jc(E3,Fpe));i=u(C(r,Dh),15).a,t==(vr(),Zc)||t==ru?(r.e.ane(re(u(Pe(e.a,i),49).b))&&HC(u(Pe(e.a,i),49),r.e.a+r.f.a)):(r.e.bne(re(u(Pe(e.a,i),49).b))&&HC(u(Pe(e.a,i),49),r.e.b+r.f.b))}}function BKe(e,n,t,i){var r,c,o,l,f,h,b;if(c=UB(i),l=Fe(ze(C(i,(Ie(),c4e)))),(l||Fe(ze(C(e,gH))))&&!$v(u(C(e,Zi),102)))r=Y4(c),f=ege(e,t,t==(Nc(),Io)?r:NO(r));else switch(f=new Qu,wu(f,e),n?(b=f.n,b.a=n.a-e.n.a,b.b=n.b-e.n.b,zGe(b,0,0,e.o.a,e.o.b),Ar(f,uKe(f,c))):(r=Y4(c),Ar(f,t==(Nc(),Io)?r:NO(r))),o=u(C(i,(me(),po)),22),h=f.j,c.g){case 2:case 1:(h==(De(),Kn)||h==bt)&&o.Ec((Ic(),P3));break;case 4:case 3:(h==(De(),et)||h==Vn)&&o.Ec((Ic(),P3))}return f}function zKe(e,n){var t,i,r,c,o,l;for(o=new B2(new sn(e.f.b).a);o.b;){if(c=t3(o),r=u(c.jd(),591),n==1){if(r.yf()!=(vr(),Vl)&&r.yf()!=eh)continue}else if(r.yf()!=(vr(),Zc)&&r.yf()!=ru)continue;switch(i=u(u(c.kd(),49).b,82),l=u(u(c.kd(),49).a,194),t=l.c,r.yf().g){case 2:i.g.c=e.e.a,i.g.b=k.Math.max(1,i.g.b+t);break;case 1:i.g.c=i.g.c+t,i.g.b=k.Math.max(1,i.g.b-t);break;case 4:i.g.d=e.e.b,i.g.a=k.Math.max(1,i.g.a+t);break;case 3:i.g.d=i.g.d+t,i.g.a=k.Math.max(1,i.g.a-t)}}}function ILn(e,n){var t,i,r,c,o,l,f,h,b,p;for(n.Tg("Simple node placement",1),p=u(C(e,(me(),z3)),316),l=0,c=new P(e.b);c.a1)throw R(new qn(GN));f||(c=Kh(n,i.Jc().Pb()),o.Ec(c))}return h1e(e,D0e(e,n,t),o)}function Vz(e,n,t){var i,r,c,o,l,f,h,b;if(J1(e.e,n))f=(Tc(),u(n,69).vk()?new uR(n,e):new vT(n,e)),Tz(f.c,f.b),Yj(f,u(t,18));else{for(b=Po(e.e.Ah(),n),i=u(e.g,122),o=0;o"}f!=null&&(n.a+=""+f)}else e.e?(l=e.e.zb,l!=null&&(n.a+=""+l)):(n.a+="?",e.b?(n.a+=" super ",QW(e.b,n)):e.f&&(n.a+=" extends ",QW(e.f,n)))}function BLn(e){e.b=null,e.a=null,e.o=null,e.q=null,e.v=null,e.w=null,e.B=null,e.p=null,e.Q=null,e.R=null,e.S=null,e.T=null,e.U=null,e.V=null,e.W=null,e.bb=null,e.eb=null,e.ab=null,e.H=null,e.db=null,e.c=null,e.d=null,e.f=null,e.n=null,e.r=null,e.s=null,e.u=null,e.G=null,e.J=null,e.e=null,e.j=null,e.i=null,e.g=null,e.k=null,e.t=null,e.F=null,e.I=null,e.L=null,e.M=null,e.O=null,e.P=null,e.$=null,e.N=null,e.Z=null,e.cb=null,e.K=null,e.D=null,e.A=null,e.C=null,e._=null,e.fb=null,e.X=null,e.Y=null,e.gb=!1,e.hb=!1}function zLn(e){var n,t,i,r;if(i=fZ((!e.c&&(e.c=XT(Lu(e.f))),e.c),0),e.e==0||e.a==0&&e.f!=-1&&e.e<0)return i;if(n=Whe(e)<0?1:0,t=e.e,r=(i.length+1+k.Math.abs(lc(e.e)),new h4),n==1&&(r.a+="-"),e.e>0)if(t-=i.length-n,t>=0){for(r.a+="0.";t>kg.length;t-=kg.length)MIe(r,kg);ZOe(r,kg,lc(t)),Kt(r,(Qn(n,i.length+1),i.substr(n)))}else t=n-t,Kt(r,of(i,n,lc(t))),r.a+=".",Kt(r,qfe(i,lc(t)));else{for(Kt(r,(Qn(n,i.length+1),i.substr(n)));t<-kg.length;t+=kg.length)MIe(r,kg);ZOe(r,kg,lc(-t))}return r.a}function WW(e){var n,t,i,r,c,o,l,f,h;return!(e.k!=(Fn(),Wi)||e.j.c.length<=1||(c=u(C(e,(Ie(),Zi)),102),c==(Br(),to))||(r=(U2(),(e.q?e.q:(En(),En(),r1))._b(mp)?i=u(C(e,mp),203):i=u(C(_r(e),yx),203),i),r==MH)||!(r==U3||r==q3)&&(o=ne(re(G2(e,kx))),n=u(C(e,wI),140),!n&&(n=new $le(o,o,o,o)),h=vu(e,(De(),Vn)),f=n.d+n.a+(h.gc()-1)*o,f>e.o.b||(t=vu(e,et),l=n.d+n.a+(t.gc()-1)*o,l>e.o.b)))}function FLn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D;n.Tg("Orthogonal edge routing",1),h=ne(re(C(e,(Ie(),Nm)))),t=ne(re(C(e,Tm))),i=ne(re(C(e,lb))),y=new EV(0,t),D=0,o=new qr(e.b,0),l=null,b=null,f=null,p=null;do b=o.b0?(S=(A-1)*t,l&&(S+=i),b&&(S+=i),S0;for(l=u(C(e.c.i,xm),15).a,c=u(gs(li(n.Mc(),new Aje(l)),Cs(new zi,new bi,new Cc,F(z(Qo,1),Ee,130,0,[(zl(),Yo)]))),16),o=new xi,b=new ar,Vt(o,e.c.i),hr(b,e.c.i);o.b!=0;){if(t=u(o.b==0?null:(at(o.b!=0),$l(o,o.a.a)),9),c.Gc(t))return!0;for(r=new Un(Yn(Ii(t).a.Jc(),new ee));ht(r);)i=u(rt(r),17),f=i.d.i,b.a._b(f)||(b.a.yc(f,b),Ki(o,f,o.c.b,o.c))}return!1}function qKe(e,n,t){var i,r,c,o,l,f,h,b,p;for(p=new Oe,b=new Cae(0,t),c=0,kB(b,new iQ(0,0,b,t)),r=0,h=new st(e);h.e!=h.i.gc();)f=u(ft(h),26),i=u(Pe(b.a,b.a.c.length-1),173),l=r+f.g+(u(Pe(b.a,0),173).b.c.length==0?0:t),(l>n||Fe(ze(je(f,(Ha(),CI)))))&&(r=0,c+=b.b+t,Gn(p.c,b),b=new Cae(c,t),i=new iQ(0,b.f,b,t),kB(b,i),r=0),i.b.c.length==0||!Fe(ze(je(Fi(f),(Ha(),Xre))))&&(f.f>=i.o&&f.f<=i.f||i.a*.5<=f.f&&i.a*1.5>=f.f)?ede(i,f):(o=new iQ(i.s+i.r+t,b.f,b,t),kB(b,o),ede(o,f)),r=f.i+f.g;return Gn(p.c,b),p}function hS(e){var n,t,i,r;if(!(e.b==null||e.b.length<=2)&&!e.a){for(n=0,r=0;r=e.b[r+1])r+=2;else if(t0)for(i=new bs(u(vi(e.a,c),22)),En(),Tr(i,new noe(n)),r=new qr(c.b,0);r.b0&&i>=-6?i>=0?jT(c,t-lc(e.e),"."):(UY(c,n-1,n-1,"0."),jT(c,n+1,ph(kg,0,-lc(i)-1))):(t-n>=1&&(jT(c,n,"."),++t),jT(c,t,"E"),i>0&&jT(c,++t,"+"),jT(c,++t,""+cE(Lu(i)))),e.g=c.a,e.g))}function QLn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,_e;i=ne(re(C(n,(Ie(),s4e)))),be=u(C(n,jx),15).a,y=4,r=3,fe=20/be,S=!1,f=0,o=oi;do{for(c=f!=1,p=f!=0,_e=0,D=e.a,q=0,te=D.length;qbe)?(f=2,o=oi):f==0?(f=1,o=_e):(f=0,o=_e)):(S=_e>=o||o-_e=Ec?Bc(t,V1e(i)):_9(t,i&yr),o=new JV(10,null,0),I3n(e.a,o,l-1)):(t=(o.Km().length+c,new Ej),Bc(t,o.Km())),n.e==0?(i=n.Im(),i>=Ec?Bc(t,V1e(i)):_9(t,i&yr)):Bc(t,n.Km()),u(o,517).b=t.a}}function WLn(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D;if(!t.dc()){for(l=0,y=0,i=t.Jc(),A=u(i.Pb(),15).a;l0?1:Bb(isNaN(i),isNaN(0)))>=0^(Rf(Mh),(k.Math.abs(l)<=Mh||l==0||isNaN(l)&&isNaN(0)?0:l<0?-1:l>0?1:Bb(isNaN(l),isNaN(0)))>=0)?k.Math.max(l,i):(Rf(Mh),(k.Math.abs(i)<=Mh||i==0||isNaN(i)&&isNaN(0)?0:i<0?-1:i>0?1:Bb(isNaN(i),isNaN(0)))>0?k.Math.sqrt(l*l+i*i):-k.Math.sqrt(l*l+i*i))}function tPn(e){var n,t,i,r;r=e.o,v2(),e.A.dc()||gi(e.A,Qme)?n=r.b:(e.D?n=k.Math.max(r.b,QE(e.f)):n=QE(e.f),e.A.Gc((Vs(),UI))&&!e.B.Gc((_s(),rA))&&(n=k.Math.max(n,QE(u(zc(e.p,(De(),et)),253))),n=k.Math.max(n,QE(u(zc(e.p,Vn),253)))),t=tze(e),t&&(n=k.Math.max(n,t.b)),e.A.Gc(XI)&&(e.q==(Br(),a1)||e.q==to)&&(n=k.Math.max(n,rR(u(zc(e.b,(De(),et)),127))),n=k.Math.max(n,rR(u(zc(e.b,Vn),127))))),Fe(ze(e.e.Rf().mf((Xt(),$m))))?r.b=k.Math.max(r.b,n):r.b=n,i=e.f.i,i.d=0,i.a=n,qW(e.f)}function iPn(e,n,t,i,r,c,o,l){var f,h,b,p;switch(f=Pf(F(z(KBn,1),On,238,0,[n,t,i,r])),p=null,e.b.g){case 1:p=Pf(F(z(M6e,1),On,523,0,[new Pk,new LM,new P6]));break;case 0:p=Pf(F(z(M6e,1),On,523,0,[new P6,new LM,new Pk]));break;case 2:p=Pf(F(z(M6e,1),On,523,0,[new LM,new Pk,new P6]))}for(b=new P(p);b.a1&&(f=h.Gg(f,e.a,l));return f.c.length==1?u(Pe(f,f.c.length-1),238):f.c.length==2?HLn((kn(0,f.c.length),u(f.c[0],238)),(kn(1,f.c.length),u(f.c[1],238)),o,c):null}function rPn(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A;r=new c9(e),c=new Qqe,i=(QT(c.n),QT(c.p),Hu(c.c),QT(c.f),QT(c.o),Hu(c.q),Hu(c.d),Hu(c.g),Hu(c.k),Hu(c.e),Hu(c.i),Hu(c.j),Hu(c.r),Hu(c.b),y=kqe(c,r,null),jUe(c,r),y),n&&(f=new c9(n),o=jLn(f),M0e(i,F(z(u9e,1),On,524,0,[o]))),p=!1,b=!1,t&&(f=new c9(t),UF in f.a&&(p=O1(f,UF).oe().a),hZe in f.a&&(b=O1(f,hZe).oe().a)),h=pAe(hBe(new s4,p),b),aCn(new zM,i,h),UF in r.a&&$f(r,UF,null),(p||b)&&(l=new l4,gKe(h,l,p,b),$f(r,UF,l)),S=new kSe(c),Fze(new MK(i),S),A=new jSe(c),Fze(new MK(i),A)}function cPn(e,n,t){var i,r,c,o,l,f,h;for(t.Tg("Find roots",1),e.a.c.length=0,r=St(n.b,0);r.b!=r.d.c;)i=u(jt(r),40),i.b.b==0&&(he(i,(Ti(),db),($n(),!0)),Te(e.a,i));switch(e.a.c.length){case 0:c=new tQ(0,n,"DUMMY_ROOT"),he(c,(Ti(),db),($n(),!0)),he(c,gre,!0),Vt(n.b,c);break;case 1:break;default:for(o=new tQ(0,n,_F),f=new P(e.a);f.a=k.Math.abs(i.b)?(i.b=0,c.d+c.a>o.d&&c.do.c&&c.c0){if(n=new Nse(e.i,e.g),t=e.i,c=t<100?null:new k0(t),e.Rj())for(i=0;i0){for(l=e.g,h=e.i,yE(e),c=h<100?null:new k0(h),i=0;i>13|(e.m&15)<<9,r=e.m>>4&8191,c=e.m>>17|(e.h&255)<<5,o=(e.h&1048320)>>8,l=n.l&8191,f=n.l>>13|(n.m&15)<<9,h=n.m>>4&8191,b=n.m>>17|(n.h&255)<<5,p=(n.h&1048320)>>8,on=t*l,cn=i*l,Tn=r*l,In=c*l,lt=o*l,f!=0&&(cn+=t*f,Tn+=i*f,In+=r*f,lt+=c*f),h!=0&&(Tn+=t*h,In+=i*h,lt+=r*h),b!=0&&(In+=t*b,lt+=i*b),p!=0&&(lt+=t*p),S=on&Ls,A=(cn&511)<<13,y=S+A,D=on>>22,B=cn>>9,q=(Tn&262143)<<4,V=(In&31)<<17,O=D+B+q+V,be=Tn>>18,fe=In>>5,_e=(lt&4095)<<8,te=be+fe+_e,O+=y>>22,y&=Ls,te+=O>>22,O&=Ls,te&=G1,_o(y,O,te)}function VKe(e){var n,t,i,r,c,o,l;if(l=u(Pe(e.j,0),12),l.g.c.length!=0&&l.e.c.length!=0)throw R(new Uc("Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges."));if(l.g.c.length!=0){for(c=Vi,t=new P(l.g);t.a0&&XGe(e,l,p);for(r=new P(p);r.a4)if(e.dk(n)){if(e.$k()){if(r=u(n,52),i=r.Bh(),f=i==e.e&&(e.kl()?r.vh(r.Ch(),e.gl())==e.hl():-1-r.Ch()==e.Jj()),e.ll()&&!f&&!i&&r.Gh()){for(c=0;ce.d[o.p]&&(t+=Hae(e.b,c)*u(f.b,15).a,I0(e.a,ke(c)));for(;!jj(e.a);)Ehe(e.b,u(N4(e.a),15).a)}return t}function fPn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D;for(n.Tg(JQe,1),S=new Oe,b=k.Math.max(e.a.c.length,u(C(e,(me(),sb)),15).a),t=b*u(C(e,oI),15).a,l=ue(C(e,(Ie(),Ry)))===ue(($0(),ym)),O=new P(e.a);O.a0&&(h=e.n.a/c);break;case 2:case 4:r=e.i.o.b,r>0&&(h=e.n.b/r)}he(e,(me(),gp),h)}if(f=e.o,o=e.a,i)o.a=i.a,o.b=i.b,e.d=!0;else if(n!=th&&n!=pb&&l!=ju)switch(l.g){case 1:o.a=f.a/2;break;case 2:o.a=f.a,o.b=f.b/2;break;case 3:o.a=f.a/2,o.b=f.b;break;case 4:o.b=f.b/2}else o.a=f.a/2,o.b=f.b/2}function dS(e){var n,t,i,r,c,o,l,f,h,b;if(e.Nj())if(b=e.Cj(),f=e.Oj(),b>0)if(n=new t1e(e.nj()),t=b,c=t<100?null:new k0(t),MT(e,t,n.g),r=t==1?e.Gj(4,K(n,0),null,0,f):e.Gj(6,n,null,-1,f),e.Kj()){for(i=new st(n);i.e!=i.i.gc();)c=e.Mj(ft(i),c);c?(c.lj(r),c.mj()):e.Hj(r)}else c?(c.lj(r),c.mj()):e.Hj(r);else MT(e,e.Cj(),e.Dj()),e.Hj(e.Gj(6,(En(),Sc),null,-1,f));else if(e.Kj())if(b=e.Cj(),b>0){for(l=e.Dj(),h=b,MT(e,b,l),c=h<100?null:new k0(h),i=0;i1&&us(o)*Gs(o)/2>l[0]){for(c=0;cl[c];)++c;A=new N0(O,0,c+1),p=new gB(A),b=us(o)/Gs(o),f=oZ(p,n,new o4,t,i,r,b),pi(fa(p.e),f),C4(k8(y,p),F8),S=new N0(O,c+1,O.c.length),zde(y,S),O.c.length=0,h=0,NIe(l,l.length,0)}else D=y.b.c.length==0?null:Pe(y.b,0),D!=null&&$Y(y,0),h>0&&(l[h]=l[h-1]),l[h]+=us(o)*Gs(o),++h,Gn(O.c,o);return O}function vPn(e,n){var t,i,r,c;t=n.b,c=new bs(t.j),r=0,i=t.j,i.c.length=0,xw(u(eg(e.b,(De(),Kn),($w(),hp)),16),t),r=PO(c,r,new E6,i),xw(u(eg(e.b,Kn,ub),16),t),r=PO(c,r,new ad,i),xw(u(eg(e.b,Kn,ap),16),t),xw(u(eg(e.b,et,hp),16),t),xw(u(eg(e.b,et,ub),16),t),r=PO(c,r,new hd,i),xw(u(eg(e.b,et,ap),16),t),xw(u(eg(e.b,bt,hp),16),t),r=PO(c,r,new Rp,i),xw(u(eg(e.b,bt,ub),16),t),r=PO(c,r,new Cb,i),xw(u(eg(e.b,bt,ap),16),t),xw(u(eg(e.b,Vn,hp),16),t),r=PO(c,r,new fd,i),xw(u(eg(e.b,Vn,ub),16),t),xw(u(eg(e.b,Vn,ap),16),t)}function yPn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O;for(n.Tg("Layer size calculation",1),b=Vi,h=Ir,r=!1,l=new P(e.b);l.a.5?B-=o*2*(A-.5):A<.5&&(B+=c*2*(.5-A)),r=l.d.b,BD.a-O-b&&(B=D.a-O-b),l.n.a=n+B}}function jPn(e){var n,t,i,r,c;if(i=u(C(e,(Ie(),ku)),165),i==(Xs(),V1)){for(t=new Un(Yn(cr(e).a.Jc(),new ee));ht(t);)if(n=u(rt(t),17),!UPe(n))throw R(new md(ree+$O(e)+"' has its layer constraint set to FIRST_SEPARATE, but has at least one incoming edge. FIRST_SEPARATE nodes must not have incoming edges."))}else if(i==Sg){for(c=new Un(Yn(Ii(e).a.Jc(),new ee));ht(c);)if(r=u(rt(c),17),!UPe(r))throw R(new md(ree+$O(e)+"' has its layer constraint set to LAST_SEPARATE, but has at least one outgoing edge. LAST_SEPARATE nodes must not have outgoing edges."))}}function uN(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A;if(e.e&&e.c.c>19!=0&&(n=t8(n),f=!f),o=oNn(n),c=!1,r=!1,i=!1,e.h==pN&&e.m==0&&e.l==0)if(r=!0,c=!0,o==-1)e=wTe((U9(),jme)),i=!0,f=!f;else return l=lbe(e,o),f&&eQ(l),t&&(tb=_o(0,0,0)),l;else e.h>>19!=0&&(c=!0,e=t8(e),i=!0,f=!f);return o!=-1?pkn(e,o,f,c,t):Kde(e,n)<0?(t&&(c?tb=t8(e):tb=_o(e.l,e.m,e.h)),_o(0,0,0)):n_n(i?e:_o(e.l,e.m,e.h),n,f,c,r,t)}function tZ(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A;if(o=e.e,f=n.e,o==0)return n;if(f==0)return e;if(c=e.d,l=n.d,c+l==2)return t=Rr(e.a[0],Dc),i=Rr(n.a[0],Dc),o==f?(b=mc(t,i),A=Rt(b),S=Rt(Hb(b,32)),S==0?new I1(o,A):new Gb(o,2,F(z($t,1),ni,30,15,[A,S]))):(yh(),N$(o<0?lf(i,t):lf(t,i),0)?J0(o<0?lf(i,t):lf(t,i)):lE(J0(Od(o<0?lf(i,t):lf(t,i)))));if(o==f)y=o,p=c>=l?bY(e.a,c,n.a,l):bY(n.a,l,e.a,c);else{if(r=c!=l?c>l?1:-1:M1e(e.a,n.a,c),r==0)return yh(),VS;r==1?(y=o,p=hY(e.a,c,n.a,l)):(y=f,p=hY(n.a,l,e.a,c))}return h=new Gb(y,p.length,p),gE(h),h}function SPn(e,n){var t,i,r,c,o,l,f;if(!(e.g>n.f||n.g>e.f)){for(t=0,i=0,o=e.w.a.ec().Jc();o.Ob();)r=u(o.Pb(),12),bQ(mu(F(z(Lr,1),Me,8,0,[r.i.n,r.n,r.a])).b,n.g,n.f)&&++t;for(l=e.r.a.ec().Jc();l.Ob();)r=u(l.Pb(),12),bQ(mu(F(z(Lr,1),Me,8,0,[r.i.n,r.n,r.a])).b,n.g,n.f)&&--t;for(f=n.w.a.ec().Jc();f.Ob();)r=u(f.Pb(),12),bQ(mu(F(z(Lr,1),Me,8,0,[r.i.n,r.n,r.a])).b,e.g,e.f)&&++i;for(c=n.r.a.ec().Jc();c.Ob();)r=u(c.Pb(),12),bQ(mu(F(z(Lr,1),Me,8,0,[r.i.n,r.n,r.a])).b,e.g,e.f)&&--i;t=0)return t;switch(Cw(Vc(e,t))){case 2:{if(gn("",_d(e,t.ok()).ve())){if(f=FT(Vc(e,t)),l=$9(Vc(e,t)),b=gbe(e,n,f,l),b)return b;for(r=qbe(e,n),o=0,p=r.gc();o1)throw R(new qn(GN));for(b=Po(e.e.Ah(),n),i=u(e.g,122),o=0;o1,h=new Pa(y.b);gu(h.a)||gu(h.b);)f=u(gu(h.a)?_(h.a):_(h.b),17),p=f.c==y?f.d:f.c,k.Math.abs(mu(F(z(Lr,1),Me,8,0,[p.i.n,p.n,p.a])).b-o.b)>1&&lIn(e,f,o,c,y)}}function TPn(e){var n,t,i,r,c,o;if(r=new qr(e.e,0),i=new qr(e.a,0),e.d)for(t=0;tKee;){for(c=n,o=0;k.Math.abs(n-c)0),r.a.Xb(r.c=--r.b),F_n(e,e.b-o,c,i,r),at(r.b0),i.a.Xb(i.c=--i.b)}if(!e.d)for(t=0;t0?(e.f[b.p]=S/(b.e.c.length+b.g.c.length),e.c=k.Math.min(e.c,e.f[b.p]),e.b=k.Math.max(e.b,e.f[b.p])):l&&(e.f[b.p]=S)}}function NPn(e){e.b=null,e.bb=null,e.fb=null,e.qb=null,e.a=null,e.c=null,e.d=null,e.e=null,e.f=null,e.n=null,e.M=null,e.L=null,e.Q=null,e.R=null,e.K=null,e.db=null,e.eb=null,e.g=null,e.i=null,e.j=null,e.k=null,e.gb=null,e.o=null,e.p=null,e.q=null,e.r=null,e.$=null,e.ib=null,e.S=null,e.T=null,e.t=null,e.s=null,e.u=null,e.v=null,e.w=null,e.B=null,e.A=null,e.C=null,e.D=null,e.F=null,e.G=null,e.H=null,e.I=null,e.J=null,e.P=null,e.Z=null,e.U=null,e.V=null,e.W=null,e.X=null,e.Y=null,e._=null,e.ab=null,e.cb=null,e.hb=null,e.nb=null,e.lb=null,e.mb=null,e.ob=null,e.pb=null,e.jb=null,e.kb=null,e.N=!1,e.O=!1}function IPn(e,n,t){var i,r,c,o;for(t.Tg("Graph transformation ("+e.a+")",1),o=Vb(n.a),c=new P(n.b);c.a=l.b.c)&&(l.b=n),(!l.c||n.c<=l.c.c)&&(l.d=l.c,l.c=n),(!l.e||n.d>=l.e.d)&&(l.e=n),(!l.f||n.d<=l.f.d)&&(l.f=n);return i=new oz((n8(),fp)),VT(e,Ztn,new Su(F(z(QN,1),On,377,0,[i]))),o=new oz(gm),VT(e,Wtn,new Su(F(z(QN,1),On,377,0,[o]))),r=new oz(bm),VT(e,Qtn,new Su(F(z(QN,1),On,377,0,[r]))),c=new oz(O3),VT(e,Ytn,new Su(F(z(QN,1),On,377,0,[c]))),CW(i.c,fp),CW(r.c,bm),CW(c.c,O3),CW(o.c,gm),l.a.c.length=0,Sr(l.a,i.c),Sr(l.a,Ks(r.c)),Sr(l.a,c.c),Sr(l.a,Ks(o.c)),l}function LPn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A;for(n.Tg(fWe,1),S=ne(re(je(e,(Qh(),_m)))),o=ne(re(je(e,(Ha(),Fx)))),l=u(je(e,zx),104),Yhe((!e.a&&(e.a=new we(Ft,e,10,11)),e.a)),b=qKe((!e.a&&(e.a=new we(Ft,e,10,11)),e.a),S,o),!e.a&&(e.a=new we(Ft,e,10,11)),h=new P(b);h.a0&&(e.a=f+(S-1)*c,n.c.b+=e.a,n.f.b+=e.a)),A.a.gc()!=0&&(y=new EV(1,c),S=jge(y,n,A,O,n.f.b+f-n.c.b),S>0&&(n.f.b+=f+(S-1)*c))}function WKe(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te;for(b=ne(re(C(e,(Ie(),Cg)))),i=ne(re(C(e,m4e))),y=new z6,he(y,Cg,b+i),h=n,B=h.d,O=h.c.i,q=h.d.i,D=zse(O.c),V=zse(q.c),r=new Oe,p=D;p<=V;p++)l=new za(e),Mf(l,(Fn(),dr)),he(l,(me(),mi),h),he(l,Zi,(Br(),to)),he(l,jH,y),S=u(Pe(e.b,p),25),p==D?H0(l,S.a.c.length-t,S):Or(l,S),te=ne(re(C(h,Ud))),te<0&&(te=0,he(h,Ud,te)),l.o.b=te,A=k.Math.floor(te/2),o=new Qu,Ar(o,(De(),Vn)),wu(o,l),o.n.b=A,f=new Qu,Ar(f,et),wu(f,l),f.n.b=A,Gr(h,o),c=new Ow,Pu(c,h),he(c,Wc,null),fc(c,f),Gr(c,B),Hxn(l,h,c),Gn(r.c,c),h=c;return r}function $Pn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V;if(O=n.b.c.length,!(O<3)){for(S=se($t,ni,30,O,15,1),p=0,b=new P(n.b);b.ao)&&hr(e.b,u(D.b,17));++l}c=o}}}function iZ(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V;for(f=u(Rd(e,(De(),Vn)).Jc().Pb(),12).e,S=u(Rd(e,et).Jc().Pb(),12).g,l=f.c.length,V=La(u(Pe(e.j,0),12));l-- >0;){for(O=(kn(0,f.c.length),u(f.c[0],17)),r=(kn(0,S.c.length),u(S.c[0],17)),q=r.d.e,c=pu(q,r,0),Kyn(O,r.d,c),fc(r,null),Gr(r,null),A=O.a,n&&Vt(A,new wc(V)),i=St(r.a,0);i.b!=i.d.c;)t=u(jt(i),8),Vt(A,new wc(t));for(B=O.b,y=new P(r.b);y.a-2;default:return!1}switch(n=e.Pj(),e.p){case 0:return n!=null&&Fe(ze(n))!=qj(e.k,0);case 1:return n!=null&&u(n,221).a!=Rt(e.k)<<24>>24;case 2:return n!=null&&u(n,180).a!=(Rt(e.k)&yr);case 6:return n!=null&&qj(u(n,190).a,e.k);case 5:return n!=null&&u(n,15).a!=Rt(e.k);case 7:return n!=null&&u(n,191).a!=Rt(e.k)<<16>>16;case 3:return n!=null&&ne(re(n))!=e.j;case 4:return n!=null&&u(n,164).a!=e.j;default:return n==null?e.n!=null:!gi(n,e.n)}}function oN(e,n,t){var i,r,c,o;return e.ml()&&e.ll()&&(o=wV(e,u(t,57)),ue(o)!==ue(t))?(e.vj(n),e.Bj(n,z$e(e,n,o)),e.$k()&&(c=(r=u(t,52),e.kl()?e.il()?r.Qh(e.b,Oc(u(Mn(Go(e.b),e.Jj()),19)).n,u(Mn(Go(e.b),e.Jj()).Fk(),29).ik(),null):r.Qh(e.b,Ji(r.Ah(),Oc(u(Mn(Go(e.b),e.Jj()),19))),null,null):r.Qh(e.b,-1-e.Jj(),null,null)),!u(o,52).Mh()&&(c=(i=u(o,52),e.kl()?e.il()?i.Oh(e.b,Oc(u(Mn(Go(e.b),e.Jj()),19)).n,u(Mn(Go(e.b),e.Jj()).Fk(),29).ik(),c):i.Oh(e.b,Ji(i.Ah(),Oc(u(Mn(Go(e.b),e.Jj()),19))),null,c):i.Oh(e.b,-1-e.Jj(),null,c))),c&&c.mj()),Fs(e.b)&&e.Hj(e.Gj(9,t,o,n,!1)),o):t}function ZKe(e){var n,t,i,r,c,o,l,f,h,b;for(i=new Oe,o=new P(e.e.a);o.a0&&(o=k.Math.max(o,UBe(e.C.b+i.d.b,r))),b=i,p=r,y=c;e.C&&e.C.c>0&&(S=y+e.C.c,h&&(S+=b.d.c),o=k.Math.max(o,(Na(),Rf(qa),k.Math.abs(p-1)<=qa||p==1||isNaN(p)&&isNaN(1)?0:S/(1-p)))),t.n.b=0,t.a.a=o}function nVe(e,n){var t,i,r,c,o,l,f,h,b,p,y,S;if(t=u(zc(e.b,n),127),f=u(u(vi(e.r,n),22),83),f.dc()){t.n.d=0,t.n.a=0;return}for(h=e.u.Gc((ps(),Z1)),o=0,e.A.Gc((Vs(),_g))&&NXe(e,n),l=f.Jc(),b=null,y=0,p=0;l.Ob();)i=u(l.Pb(),115),c=ne(re(i.b.mf((H$(),mJ)))),r=i.b.Kf().b,b?(S=p+b.d.a+e.w+i.d.d,o=k.Math.max(o,(Na(),Rf(qa),k.Math.abs(y-c)<=qa||y==c||isNaN(y)&&isNaN(c)?0:S/(c-y)))):e.C&&e.C.d>0&&(o=k.Math.max(o,UBe(e.C.d+i.d.d,c))),b=i,y=c,p=r;e.C&&e.C.a>0&&(S=p+e.C.a,h&&(S+=b.d.a),o=k.Math.max(o,(Na(),Rf(qa),k.Math.abs(y-1)<=qa||y==1||isNaN(y)&&isNaN(1)?0:S/(1-y)))),t.n.d=0,t.a.b=o}function tVe(e,n,t){var i,r,c,o,l,f;for(this.g=e,l=n.d.length,f=t.d.length,this.d=se(u1,Fd,9,l+f,0,1),o=0;o0?NY(this,this.f/this.a):Ia(n.g,n.d[0]).a!=null&&Ia(t.g,t.d[0]).a!=null?NY(this,(ne(Ia(n.g,n.d[0]).a)+ne(Ia(t.g,t.d[0]).a))/2):Ia(n.g,n.d[0]).a!=null?NY(this,Ia(n.g,n.d[0]).a):Ia(t.g,t.d[0]).a!=null&&NY(this,Ia(t.g,t.d[0]).a)}function BPn(e,n,t,i,r,c,o,l){var f,h,b,p,y,S,A,O,D,B;if(A=!1,h=Ebe(t.q,n.f+n.b-t.q.f),S=i.f>n.b&&l,B=r-(t.q.e+h-o),p=(f=aS(i,B,!1),f.a),S&&p>i.f)return!1;if(S){for(y=0,D=new P(n.d);D.a=(kn(c,e.c.length),u(e.c[c],186)).e,!S&&p>n.b&&!b)?!1:((b||S||p<=n.b)&&(b&&p>n.b?(t.d=p,tO(t,$Ge(t,p))):(WHe(t.q,h),t.c=!0),tO(i,r-(t.s+t.r)),LO(i,t.q.e+t.q.d,n.f),kB(n,i),e.c.length>c&&(BO((kn(c,e.c.length),u(e.c[c],186)),i),(kn(c,e.c.length),u(e.c[c],186)).a.c.length==0&&Cd(e,c)),A=!0),A)}function zPn(e,n){var t,i,r,c,o,l,f,h,b,p;for(e.a=new yDe(hkn(Yx)),i=new P(n.a);i.a0&&(Qn(0,t.length),t.charCodeAt(0)!=47)))throw R(new qn("invalid opaquePart: "+t));if(e&&!(n!=null&&xj(SG,n.toLowerCase()))&&!(t==null||!jQ(t,oA,sA)))throw R(new qn(JZe+t));if(e&&n!=null&&xj(SG,n.toLowerCase())&&!BAn(t))throw R(new qn(JZe+t));if(!qjn(i))throw R(new qn("invalid device: "+i));if(!Hkn(r))throw o=r==null?"invalid segments: null":"invalid segment: "+$kn(r),R(new qn(o));if(!(c==null||ah(c,Xo(35))==-1))throw R(new qn("invalid query: "+c))}function rVe(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B;if(y=new wc(e.o),B=n.a/y.a,l=n.b/y.b,O=n.a-y.a,c=n.b-y.b,t)for(r=ue(C(e,(Ie(),Zi)))===ue((Br(),to)),A=new P(e.j);A.a=1&&(D-o>0&&p>=0?(f.n.a+=O,f.n.b+=c*o):D-o<0&&b>=0&&(f.n.a+=O*D,f.n.b+=c));e.o.a=n.a,e.o.b=n.b,he(e,(Ie(),Ag),(Vs(),i=u(la(iA),10),new _l(i,u(Df(i,i.length),10),0)))}function GPn(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B;if(t.Tg("Network simplex layering",1),e.b=n,B=u(C(n,(Ie(),jx)),15).a*4,D=e.b.a,D.c.length<1){t.Ug();return}for(c=$Dn(e,D),O=null,r=St(c,0);r.b!=r.d.c;){for(i=u(jt(r),16),l=B*lc(k.Math.sqrt(i.gc())),o=QDn(i),zW(_oe(Qbn(Loe(YK(o),l),O),!0),t.dh(1)),y=e.b.b,A=new P(o.a);A.a1)for(O=se($t,ni,30,e.b.b.c.length,15,1),p=0,h=new P(e.b.b);h.a0){rz(e,t,0),t.a+=String.fromCharCode(i),r=TEn(n,c),rz(e,t,r),c+=r-1;continue}i==39?c+10&&A.a<=0){f.c.length=0,Gn(f.c,A);break}S=A.i-A.d,S>=l&&(S>l&&(f.c.length=0,l=S),Gn(f.c,A))}f.c.length!=0&&(o=u(Pe(f,fz(r,f.c.length)),116),V.a.Ac(o)!=null,o.g=b++,oge(o,n,t,i),f.c.length=0)}for(D=e.c.length+1,y=new P(e);y.aIr||n.o==Og&&b=l&&r<=f)l<=r&&c<=f?(t[b++]=r,t[b++]=c,i+=2):l<=r?(t[b++]=r,t[b++]=f,e.b[i]=f+1,o+=2):c<=f?(t[b++]=l,t[b++]=c,i+=2):(t[b++]=l,t[b++]=f,e.b[i]=f+1);else if(fY0)&&l<10);Poe(e.c,new kc),cVe(e),B3n(e.c),DPn(e.f)}function t$n(e,n){var t,i,r,c,o,l,f,h,b,p,y;switch(e.k.g){case 1:if(i=u(C(e,(me(),mi)),17),t=u(C(i,K3e),78),t?Fe(ze(C(i,qd)))&&(t=k1e(t)):t=new xs,h=u(C(e,Ea),12),h){if(b=mu(F(z(Lr,1),Me,8,0,[h.i.n,h.n,h.a])),n<=b.a)return b.b;Ki(t,b,t.a,t.a.a)}if(p=u(C(e,gf),12),p){if(y=mu(F(z(Lr,1),Me,8,0,[p.i.n,p.n,p.a])),y.a<=n)return y.b;Ki(t,y,t.c.b,t.c)}if(t.b>=2){for(f=St(t,0),o=u(jt(f),8),l=u(jt(f),8);l.a0&&EO(h,!0,(vr(),ru)),l.k==(Fn(),wr)&&LDe(h),ei(e.f,l,n)}}function oVe(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q;for(h=Vi,b=Vi,l=Ir,f=Ir,y=new P(n.i);y.a=e.j?(++e.j,Te(e.b,ke(1)),Te(e.c,b)):(i=e.d[n.p][1],ul(e.b,h,ke(u(Pe(e.b,h),15).a+1-i)),ul(e.c,h,ne(re(Pe(e.c,h)))+b-i*e.f)),(e.r==(X0(),pI)&&(u(Pe(e.b,h),15).a>e.k||u(Pe(e.b,h-1),15).a>e.k)||e.r==mI&&(ne(re(Pe(e.c,h)))>e.n||ne(re(Pe(e.c,h-1)))>e.n))&&(f=!1),o=new Un(Yn(cr(n).a.Jc(),new ee));ht(o);)c=u(rt(o),17),l=c.c.i,e.g[l.p]==h&&(p=sVe(e,l),r=r+u(p.a,15).a,f=f&&Fe(ze(p.b)));return e.g[n.p]=h,r=r+e.d[n.p][0],new jc(ke(r),($n(),!!f))}function r$n(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe;return y=e.c[n],S=e.c[t],A=u(C(y,(me(),Dy)),16),!!A&&A.gc()!=0&&A.Gc(S)||(O=y.k!=(Fn(),dr)&&S.k!=dr,D=u(C(y,bp),9),B=u(C(S,bp),9),q=D!=B,V=!!D&&D!=y||!!B&&B!=S,te=UQ(y,(De(),Kn)),be=UQ(S,bt),V=V|(UQ(y,bt)||UQ(S,Kn)),fe=V&&q||te||be,O&&fe)||y.k==(Fn(),wo)&&S.k==Wi||S.k==(Fn(),wo)&&y.k==Wi?!1:(b=e.c[n],c=e.c[t],r=GHe(e.e,b,c,(De(),Vn)),f=GHe(e.i,b,c,et),NNn(e.f,b,c),h=Qze(e.b,b,c)+u(r.a,15).a+u(f.a,15).a+e.f.d,l=Qze(e.b,c,b)+u(r.b,15).a+u(f.b,15).a+e.f.b,e.a&&(p=u(C(b,mi),12),o=u(C(c,mi),12),i=CHe(e.g,p,o),h+=u(i.a,15).a,l+=u(i.b,15).a),h>l)}function lVe(e,n){var t,i,r,c,o;t=ne(re(C(n,(Ie(),Kf)))),t<2&&he(n,Kf,2),i=u(C(n,wl),86),i==(vr(),nh)&&he(n,wl,UB(n)),r=u(C(n,Dun),15),r.a==0?he(n,(me(),Ly),new yQ):he(n,(me(),Ly),new VR(r.a)),c=ze(C(n,vx)),c==null&&he(n,vx,($n(),ue(C(n,Y1))===ue((z1(),q7)))),er(new mn(null,new vn(n.a,16)),new Zue(e)),er(lu(new mn(null,new vn(n.b,16)),new b1),new eoe(e)),o=new iVe(n),he(n,(me(),z3),o),zT(e.a),aa(e.a,(zr(),Xf),u(C(n,By),188)),aa(e.a,c1,u(C(n,wH),188)),aa(e.a,eo,u(C(n,px),188)),aa(e.a,no,u(C(n,yH),188)),aa(e.a,Pc,L7n(u(C(n,Y1),222))),Fse(e.a,ZRn(n)),he(n,kie,uN(e.a,n))}function jge(e,n,t,i,r){var c,o,l,f,h,b,p,y,S,A,O,D,B;for(p=new wt,o=new Oe,iqe(e,t,e.d.zg(),o,p),iqe(e,i,e.d.Ag(),o,p),e.b=.2*(O=fUe(lu(new mn(null,new vn(o,16)),new vM)),D=fUe(lu(new mn(null,new vn(o,16)),new yM)),k.Math.min(O,D)),c=0,l=0;l=2&&(B=IUe(o,!0,y),!e.e&&(e.e=new CEe(e)),MEn(e.e,B,o,e.b)),lGe(o,y),f$n(o),S=-1,b=new P(o);b.a0&&(t+=f.n.a+f.o.a/2,++p),A=new P(f.j);A.a0&&(t/=p),B=se(Jr,Jc,30,i.a.c.length,15,1),l=0,h=new P(i.a);h.a-1){for(r=St(l,0);r.b!=r.d.c;)i=u(jt(r),132),i.v=o;for(;l.b!=0;)for(i=u(nW(l,0),132),t=new P(i.i);t.a-1){for(c=new P(l);c.a0)&&(dw(f,k.Math.min(f.o,r.o-1)),m0(f,f.i-1),f.i==0&&Gn(l.c,f))}}function hVe(e,n,t,i,r){var c,o,l,f;return f=Vi,o=!1,l=dge(e,Nr(new Se(n.a,n.b),e),pi(new Se(t.a,t.b),r),Nr(new Se(i.a,i.b),t)),c=!!l&&!(k.Math.abs(l.a-e.a)<=rp&&k.Math.abs(l.b-e.b)<=rp||k.Math.abs(l.a-n.a)<=rp&&k.Math.abs(l.b-n.b)<=rp),l=dge(e,Nr(new Se(n.a,n.b),e),t,r),l&&((k.Math.abs(l.a-e.a)<=rp&&k.Math.abs(l.b-e.b)<=rp)==(k.Math.abs(l.a-n.a)<=rp&&k.Math.abs(l.b-n.b)<=rp)||c?f=k.Math.min(f,aE(Nr(l,t))):o=!0),l=dge(e,Nr(new Se(n.a,n.b),e),i,r),l&&(o||(k.Math.abs(l.a-e.a)<=rp&&k.Math.abs(l.b-e.b)<=rp)==(k.Math.abs(l.a-n.a)<=rp&&k.Math.abs(l.b-n.b)<=rp)||c)&&(f=k.Math.min(f,aE(Nr(l,i)))),f}function dVe(e){a2(e,new qw(UP(l2(u2(s2(o2(new gd,W0),uQe),"Minimizes the stress within a layout using stress majorization. Stress exists if the euclidean distance between a pair of nodes doesn't match their graph theoretic distance, that is, the shortest path between the two nodes. The method allows to specify individual edge lengths."),new m5),$o))),xe(e,W0,ES,Le(dve)),xe(e,W0,aF,($n(),!0)),xe(e,W0,k3,Le(Ptn)),xe(e,W0,my,Le($tn)),xe(e,W0,py,Le(Rtn)),xe(e,W0,K8,Le(Ltn)),xe(e,W0,SS,Le(gve)),xe(e,W0,V8,Le(Btn)),xe(e,W0,swe,Le(hve)),xe(e,W0,fwe,Le(fve)),xe(e,W0,awe,Le(ave)),xe(e,W0,hwe,Le(bve)),xe(e,W0,lwe,Le(EJ))}function a$n(e){var n,t,i,r,c,o,l,f;for(n=null,i=new P(e);i.a0&&t.c==0&&(!n&&(n=new Oe),Gn(n.c,t));if(n)for(;n.c.length!=0;){if(t=u(Cd(n,0),239),t.b&&t.b.c.length>0){for(c=(!t.b&&(t.b=new Oe),new P(t.b));c.apu(e,t,0))return new jc(r,t)}else if(ne(Ia(r.g,r.d[0]).a)>ne(Ia(t.g,t.d[0]).a))return new jc(r,t)}for(l=(!t.e&&(t.e=new Oe),t.e).Jc();l.Ob();)o=u(l.Pb(),239),f=(!o.b&&(o.b=new Oe),o.b),N2(0,f.c.length),_j(f.c,0,t),o.c==f.c.length&&Gn(n.c,o)}return null}function bS(e,n){var t,i,r,c,o,l,f,h,b;if(n.e==5){uVe(e,n);return}if(h=n,!(h.b==null||e.b==null)){for(h3(e),hS(e),h3(h),hS(h),t=se($t,ni,30,e.b.length+h.b.length,15,1),b=0,i=0,o=0;i=l&&r<=f)l<=r&&c<=f?i+=2:l<=r?(e.b[i]=f+1,o+=2):c<=f?(t[b++]=r,t[b++]=l-1,i+=2):(t[b++]=r,t[b++]=l-1,e.b[i]=f+1,o+=2);else if(f0),u(b.a.Xb(b.c=--b.b),17));c!=i&&b.b>0;)e.a[c.p]=!0,e.a[i.p]=!0,c=(at(b.b>0),u(b.a.Xb(b.c=--b.b),17));b.b>0&&As(b)}}function bVe(e,n,t){var i,r,c,o,l,f,h,b,p,y;if(t)for(i=-1,b=new qr(n,0);b.b0?r-=864e5:r+=864e5,f=new jle(mc(Lu(n.q.getTime()),r))),b=new h4,h=e.a.length,c=0;c=97&&i<=122||i>=65&&i<=90){for(o=c+1;o=h)throw R(new qn("Missing trailing '"));o+1=14&&b<=16))?n.a._b(i)?(t.a?Kt(t.a,t.b):t.a=new tl(t.d),Xj(t.a,"[...]")):(l=G4(i),h=new E2(n),D1(t,wVe(l,h))):X(i,171)?D1(t,cTn(u(i,171))):X(i,195)?D1(t,XAn(u(i,195))):X(i,201)?D1(t,ZMn(u(i,201))):X(i,2073)?D1(t,KAn(u(i,2073))):X(i,54)?D1(t,rTn(u(i,54))):X(i,584)?D1(t,mTn(u(i,584))):X(i,830)?D1(t,iTn(u(i,830))):X(i,108)&&D1(t,tTn(u(i,108))):D1(t,i==null?Vo:fu(i));return t.a?t.e.length==0?t.a.a:t.a.a+(""+t.e):t.c}function D8(e,n){var t,i,r,c;c=e.F,n==null?(e.F=null,c8(e,null)):(e.F=(_n(n),n),i=ah(n,Xo(60)),i!=-1?(r=(Qr(0,i,n.length),n.substr(0,i)),ah(n,Xo(46))==-1&&!gn(r,ly)&&!gn(r,BS)&&!gn(r,VF)&&!gn(r,zS)&&!gn(r,FS)&&!gn(r,JS)&&!gn(r,HS)&&!gn(r,GS)&&(r=nen),t=z$(n,Xo(62)),t!=-1&&(r+=""+(Qn(t+1,n.length+1),n.substr(t+1))),c8(e,r)):(r=n,ah(n,Xo(46))==-1&&(i=ah(n,Xo(91)),i!=-1&&(r=(Qr(0,i,n.length),n.substr(0,i))),!gn(r,ly)&&!gn(r,BS)&&!gn(r,VF)&&!gn(r,zS)&&!gn(r,FS)&&!gn(r,JS)&&!gn(r,HS)&&!gn(r,GS)?(r=nen,i!=-1&&(r+=""+(Qn(i,n.length+1),n.substr(i)))):r=n),c8(e,r),r==n&&(e.F=e.D))),(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,5,c,n))}function m$n(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A;if(e.c=e.e,A=ze(C(n,(Ie(),_un))),S=A==null||(_n(A),A),c=u(C(n,(me(),po)),22).Gc((Ic(),Kl)),r=u(C(n,Zi),102),t=!(r==(Br(),Dg)||r==a1||r==to),S&&(t||!c)){for(p=new P(n.a);p.a=0)return r=Fjn(e,(Qr(1,o,n.length),n.substr(1,o-1))),b=(Qr(o+1,f,n.length),n.substr(o+1,f-(o+1))),GRn(e,b,r)}else{if(t=-1,Mme==null&&(Mme=new RegExp("\\d")),Mme.test(String.fromCharCode(l))&&(t=Hle(n,Xo(46),f-1),t>=0)){i=u(aY(e,YRe(e,(Qr(1,t,n.length),n.substr(1,t-1))),!1),61),h=0;try{h=al((Qn(t+1,n.length+1),n.substr(t+1)),Xr,oi)}catch(y){throw y=sr(y),X(y,131)?(c=y,R(new sB(c))):R(y)}if(h>16==-10?t=u(e.Cb,293).Wk(n,t):e.Db>>16==-15&&(!n&&(n=(jn(),rh)),!h&&(h=(jn(),rh)),e.Cb.Vh()&&(f=new L1(e.Cb,1,13,h,n,$d(Ts(u(e.Cb,62)),e),!1),t?t.lj(f):t=f));else if(X(e.Cb,88))e.Db>>16==-23&&(X(n,88)||(n=(jn(),jf)),X(h,88)||(h=(jn(),jf)),e.Cb.Vh()&&(f=new L1(e.Cb,1,10,h,n,$d(Vu(u(e.Cb,29)),e),!1),t?t.lj(f):t=f));else if(X(e.Cb,446))for(l=u(e.Cb,834),o=(!l.b&&(l.b=new IP(new jX)),l.b),c=(i=new B2(new sn(o.a).a),new DP(i));c.a.b;)r=u(t3(c.a).jd(),87),t=_8(r,Iz(r,l),t)}return t}function y$n(e,n){var t,i,r,c,o,l,f,h,b,p,y;for(o=Fe(ze(je(e,(Ie(),Sm)))),y=u(je(e,Mm),22),f=!1,h=!1,p=new st((!e.c&&(e.c=new we($s,e,9,9)),e.c));p.e!=p.i.gc()&&(!f||!h);){for(c=u(ft(p),125),l=0,r=Uh(Rl(F(z(Xl,1),On,20,0,[(!c.d&&(c.d=new Nn(pr,c,8,5)),c.d),(!c.e&&(c.e=new Nn(pr,c,7,4)),c.e)])));ht(r)&&(i=u(rt(r),85),b=o&&Uw(i)&&Fe(ze(je(i,xg))),t=YKe((!i.b&&(i.b=new Nn(mt,i,4,7)),i.b),c)?e==Fi(iu(u(K((!i.c&&(i.c=new Nn(mt,i,5,8)),i.c),0),84))):e==Fi(iu(u(K((!i.b&&(i.b=new Nn(mt,i,4,7)),i.b),0),84))),!((b||t)&&(++l,l>1))););(l>0||y.Gc((ps(),Z1))&&(!c.n&&(c.n=new we(Eu,c,1,7)),c.n).i>0)&&(f=!0),l>1&&(h=!0)}f&&n.Ec((Ic(),Kl)),h&&n.Ec((Ic(),ux))}function mVe(e){var n,t,i,r,c,o,l,f,h,b,p,y;if(y=u(je(e,(Xt(),Ig)),22),y.dc())return null;if(l=0,o=0,y.Gc((Vs(),XI))){for(b=u(je(e,Vx),102),i=2,t=2,r=2,c=2,n=Fi(e)?u(je(Fi(e),Ng),86):u(je(e,Ng),86),h=new st((!e.c&&(e.c=new we($s,e,9,9)),e.c));h.e!=h.i.gc();)if(f=u(ft(h),125),p=u(je(f,t5),64),p==(De(),ju)&&(p=uge(f,n),Ei(f,t5,p)),b==(Br(),to))switch(p.g){case 1:i=k.Math.max(i,f.i+f.g);break;case 2:t=k.Math.max(t,f.j+f.f);break;case 3:r=k.Math.max(r,f.i+f.g);break;case 4:c=k.Math.max(c,f.j+f.f)}else switch(p.g){case 1:i+=f.g+2;break;case 2:t+=f.f+2;break;case 3:r+=f.g+2;break;case 4:c+=f.f+2}l=k.Math.max(i,r),o=k.Math.max(t,c)}return Yw(e,l,o,!0,!0)}function k$n(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O;for(r=null,i=new P(n.a);i.a1)for(r=e.e.b,Vt(e.e,f),l=f.a.ec().Jc();l.Ob();)o=u(l.Pb(),9),ei(e.c,o,ke(r))}}function j$n(e,n,t,i){var r,c,o,l,f,h,b,p,y,S;for(c=new Pqe(n),p=VIn(e,n,c),S=k.Math.max(ne(re(C(n,(Ie(),Ud)))),1),b=new P(p.a);b.a=0){for(f=null,l=new qr(b.a,h+1);l.b0,h?h&&(y=B.p,o?++y:--y,p=u(Pe(B.c.a,y),9),i=Nze(p),S=!(BUe(i,fe,t[0])||VIe(i,fe,t[0]))):S=!0),A=!1,be=n.D.i,be&&be.c&&l.e&&(b=o&&be.p>0||!o&&be.p=0&&Oo?1:Bb(isNaN(0),isNaN(o)))<0&&(Rf(Mh),(k.Math.abs(o-1)<=Mh||o==1||isNaN(o)&&isNaN(1)?0:o<1?-1:o>1?1:Bb(isNaN(o),isNaN(1)))<0)&&(Rf(Mh),(k.Math.abs(0-l)<=Mh||l==0||isNaN(0)&&isNaN(l)?0:0l?1:Bb(isNaN(0),isNaN(l)))<0)&&(Rf(Mh),(k.Math.abs(l-1)<=Mh||l==1||isNaN(l)&&isNaN(1)?0:l<1?-1:l>1?1:Bb(isNaN(l),isNaN(1)))<0)),c)}function O$n(e){var n,t,i,r,c,o,l,f,h,b,p;for(e.j=se($t,ni,30,e.g,15,1),e.o=new Oe,er(lu(new mn(null,new vn(e.e.b,16)),new pv),new EEe(e)),e.a=se(ts,ma,30,e.b,16,1),CO(new mn(null,new vn(e.e.b,16)),new xEe(e)),i=(p=new Oe,er(li(lu(new mn(null,new vn(e.e.b,16)),new B5),new SEe(e)),new lCe(e,p)),p),f=new P(i);f.a=h.c.c.length?b=Bae((Fn(),Wi),dr):b=Bae((Fn(),dr),dr),b*=2,c=t.a.g,t.a.g=k.Math.max(c,c+(b-c)),o=t.b.g,t.b.g=k.Math.max(o,o+(b-o)),r=n}}function Qz(e,n){var t;if(e.e)throw R(new Uc((M1(gte),UZ+gte.k+XZ)));if(!Hgn(e.a,n))throw R(new du(RYe+n+BYe));if(n==e.d)return e;switch(t=e.d,e.d=n,t.g){case 0:switch(n.g){case 2:Hw(e);break;case 1:B0(e),Hw(e);break;case 4:l3(e),Hw(e);break;case 3:l3(e),B0(e),Hw(e)}break;case 2:switch(n.g){case 1:B0(e),LW(e);break;case 4:l3(e),Hw(e);break;case 3:l3(e),B0(e),Hw(e)}break;case 1:switch(n.g){case 2:B0(e),LW(e);break;case 4:B0(e),l3(e),Hw(e);break;case 3:B0(e),l3(e),B0(e),Hw(e)}break;case 4:switch(n.g){case 2:l3(e),Hw(e);break;case 1:l3(e),B0(e),Hw(e);break;case 3:B0(e),LW(e)}break;case 3:switch(n.g){case 2:B0(e),l3(e),Hw(e);break;case 1:B0(e),l3(e),B0(e),Hw(e);break;case 4:B0(e),LW(e)}}return e}function p3(e,n){var t;if(e.d)throw R(new Uc((M1(Tte),UZ+Tte.k+XZ)));if(!Jgn(e.a,n))throw R(new du(RYe+n+BYe));if(n==e.c)return e;switch(t=e.c,e.c=n,t.g){case 0:switch(n.g){case 2:ig(e);break;case 1:R0(e),ig(e);break;case 4:f3(e),ig(e);break;case 3:f3(e),R0(e),ig(e)}break;case 2:switch(n.g){case 1:R0(e),PW(e);break;case 4:f3(e),ig(e);break;case 3:f3(e),R0(e),ig(e)}break;case 1:switch(n.g){case 2:R0(e),PW(e);break;case 4:R0(e),f3(e),ig(e);break;case 3:R0(e),f3(e),R0(e),ig(e)}break;case 4:switch(n.g){case 2:f3(e),ig(e);break;case 1:f3(e),R0(e),ig(e);break;case 3:R0(e),PW(e)}break;case 3:switch(n.g){case 2:R0(e),f3(e),ig(e);break;case 1:R0(e),f3(e),R0(e),ig(e);break;case 4:R0(e),PW(e)}}return e}function N$n(e){var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V;for(p=e.b,b=new qr(p,0),y2(b,new Xu(e)),q=!1,o=1;b.b0&&(n.a+=To),Wz(u(ft(l),174),n);for(n.a+=nee,f=new j4((!i.c&&(i.c=new Nn(mt,i,5,8)),i.c));f.e!=f.i.gc();)f.e>0&&(n.a+=To),Wz(u(ft(f),174),n);n.a+=")"}}function I$n(e,n,t){var i,r,c,o,l,f,h,b;for(f=new st((!e.a&&(e.a=new we(Ft,e,10,11)),e.a));f.e!=f.i.gc();)for(l=u(ft(f),26),r=new Un(Yn(U0(l).a.Jc(),new ee));ht(r);){if(i=u(rt(r),85),!i.b&&(i.b=new Nn(mt,i,4,7)),!(i.b.i<=1&&(!i.c&&(i.c=new Nn(mt,i,5,8)),i.c.i<=1)))throw R(new a4("Graph must not contain hyperedges."));if(!eS(i)&&l!=iu(u(K((!i.c&&(i.c=new Nn(mt,i,5,8)),i.c),0),84)))for(h=new tNe,Pu(h,i),he(h,(L0(),My),i),xP(h,u(bu(Xc(t.f,l)),155)),nX(h,u(zn(t,iu(u(K((!i.c&&(i.c=new Nn(mt,i,5,8)),i.c),0),84))),155)),Te(n.c,h),o=new st((!i.n&&(i.n=new we(Eu,i,1,7)),i.n));o.e!=o.i.gc();)c=u(ft(o),157),b=new fPe(h,c.a),Pu(b,c),he(b,My,c),b.e.a=k.Math.max(c.g,1),b.e.b=k.Math.max(c.f,1),hge(b),Te(n.d,b)}}function D$n(e,n,t){var i,r,c,o,l,f,h,b,p,y;switch(t.Tg("Node promotion heuristic",1),e.i=n,e.r=u(C(n,(Ie(),dI)),243),e.r!=(X0(),_7)&&e.r!=xx?cRn(e):NIn(e),b=u(C(e.i,i4e),15).a,c=new Nq,e.r.g){case 2:case 1:I8(e,c);break;case 3:for(e.r=TH,I8(e,c),f=0,l=new P(e.b);l.ae.k&&(e.r=pI,I8(e,c));break;case 4:for(e.r=TH,I8(e,c),h=0,r=new P(e.c);r.ae.n&&(e.r=mI,I8(e,c));break;case 6:y=lc(k.Math.ceil(e.g.length*b/100)),I8(e,new jje(y));break;case 5:p=lc(k.Math.ceil(e.e*b/100)),I8(e,new Eje(p));break;case 8:eYe(e,!0);break;case 9:eYe(e,!1);break;default:I8(e,c)}e.r!=_7&&e.r!=xx?QNn(e,n):wDn(e,n),t.Ug()}function _$n(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V;for(p=new Mge(e),j4n(p,!(n==(vr(),Vl)||n==eh)),b=p.a,y=new o4,r=(wa(),F(z(dm,1),Ee,237,0,[Ou,No,Nu])),o=0,f=r.length;o0&&(y.d+=b.n.d,y.d+=b.d),y.a>0&&(y.a+=b.n.a,y.a+=b.d),y.b>0&&(y.b+=b.n.b,y.b+=b.d),y.c>0&&(y.c+=b.n.c,y.c+=b.d),y}function kVe(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A;for(y=t.d,p=t.c,c=new Se(t.f.a+t.d.b+t.d.c,t.f.b+t.d.d+t.d.a),o=c.b,h=new P(e.a);h.a0&&(e.c[n.c.p][n.p].d+=Ds(e.i,24)*kN*.07000000029802322-.03500000014901161,e.c[n.c.p][n.p].a=e.c[n.c.p][n.p].d/e.c[n.c.p][n.p].b)}}function P$n(e){var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O,D;for(A=new P(e);A.ai.d,i.d=k.Math.max(i.d,n),l&&t&&(i.d=k.Math.max(i.d,i.a),i.a=i.d+r);break;case 3:t=n>i.a,i.a=k.Math.max(i.a,n),l&&t&&(i.a=k.Math.max(i.a,i.d),i.d=i.a+r);break;case 2:t=n>i.c,i.c=k.Math.max(i.c,n),l&&t&&(i.c=k.Math.max(i.b,i.c),i.b=i.c+r);break;case 4:t=n>i.b,i.b=k.Math.max(i.b,n),l&&t&&(i.b=k.Math.max(i.b,i.c),i.c=i.b+r)}}}function EVe(e,n){var t,i,r,c,o,l,f,h,b;return h="",n.length==0?e.le(Jge,pZ,-1,-1):(b=V2(n),gn(b.substr(0,3),"at ")&&(b=(Qn(3,b.length+1),b.substr(3))),b=b.replace(/\[.*?\]/g,""),o=b.indexOf("("),o==-1?(o=b.indexOf("@"),o==-1?(h=b,b=""):(h=V2((Qn(o+1,b.length+1),b.substr(o+1))),b=V2((Qr(0,o,b.length),b.substr(0,o))))):(t=b.indexOf(")",o),h=(Qr(o+1,t,b.length),b.substr(o+1,t-(o+1))),b=V2((Qr(0,o,b.length),b.substr(0,o)))),o=ah(b,Xo(46)),o!=-1&&(b=(Qn(o+1,b.length+1),b.substr(o+1))),(b.length==0||gn(b,"Anonymous function"))&&(b=pZ),l=z$(h,Xo(58)),r=Hle(h,Xo(58),l-1),f=-1,i=-1,c=Jge,l!=-1&&r!=-1&&(c=(Qr(0,r,h.length),h.substr(0,r)),f=kOe((Qr(r+1,l,h.length),h.substr(r+1,l-(r+1)))),i=kOe((Qn(l+1,h.length+1),h.substr(l+1)))),e.le(c,b,f,i))}function R$n(e){var n,t,i,r,c,o,l,f,h,b,p;for(h=new P(e);h.a0||b.j==Vn&&b.e.c.length-b.g.c.length<0)){n=!1;break}for(r=new P(b.g);r.a=h&&be>=D&&(y+=A.n.b+O.n.b+O.a.b-te,++l));if(t)for(o=new P(q.e);o.a=h&&be>=D&&(y+=A.n.b+O.n.b+O.a.b-te,++l))}l>0&&(fe+=y/l,++S)}S>0?(n.a=r*fe/S,n.g=S):(n.a=0,n.g=0)}function xge(e,n,t,i){var r,c,o,l,f;return l=new Mge(n),_Nn(l,i),r=!0,e&&e.nf((Xt(),Ng))&&(c=u(e.mf((Xt(),Ng)),86),r=c==(vr(),nh)||c==Zc||c==ru),EXe(l,!1),Ao(l.e.Pf(),new Kle(l,!1,r)),HV(l,l.f,(wa(),Ou),(De(),Kn)),HV(l,l.f,Nu,bt),HV(l,l.g,Ou,Vn),HV(l,l.g,Nu,et),GJe(l,Kn),GJe(l,bt),BDe(l,et),BDe(l,Vn),v2(),o=l.A.Gc((Vs(),Jm))&&l.B.Gc((_s(),VI))?iJe(l):null,o&&Zbn(l.a,o),$$n(l),rxn(l),cxn(l),d$n(l),A_n(l),Oxn(l),NQ(l,Kn),NQ(l,bt),bDn(l),tPn(l),t&&(Yjn(l),Nxn(l),NQ(l,et),NQ(l,Vn),f=l.B.Gc((_s(),rA)),fqe(l,f,Kn),fqe(l,f,bt),aqe(l,f,et),aqe(l,f,Vn),er(new mn(null,new vn(new ot(l.i),0)),new Gg),er(li(new mn(null,Jfe(l.r).a.oc()),new qg),new Ug),HAn(l),l.e.Nf(l.o),er(new mn(null,Jfe(l.r).a.oc()),new sd)),l.o}function z$n(e){var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O;for(h=Vi,i=new P(e.a.b);i.a1)for(S=new wge(A,V,i),cc(V,new aCe(e,S)),Gn(o.c,S),p=V.a.ec().Jc();p.Ob();)b=u(p.Pb(),49),qo(c,b.b);if(l.a.gc()>1)for(S=new wge(A,l,i),cc(l,new hCe(e,S)),Gn(o.c,S),p=l.a.ec().Jc();p.Ob();)b=u(p.Pb(),49),qo(c,b.b)}}function G$n(e,n){var t,i,r,c,o,l;if(u(C(n,(me(),po)),22).Gc((Ic(),Kl))){for(l=new P(n.a);l.a=0&&o0&&(u(zc(e.b,n),127).a.b=t)}function Q$n(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B;for(S=0,i=new ar,c=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));c.e!=c.i.gc();)r=u(ft(c),26),Fe(ze(je(r,(Ie(),Mg))))||(p=Fi(r),Xz(p)&&!Fe(ze(je(r,aH)))&&(Ei(r,(me(),Oi),ke(S)),++S,ba(r,jm)&&hr(i,u(je(r,jm),15))),xVe(e,r,t));for(he(t,(me(),sb),ke(S)),he(t,oI,ke(i.a.gc())),S=0,b=new st((!n.b&&(n.b=new we(pr,n,12,3)),n.b));b.e!=b.i.gc();)f=u(ft(b),85),Xz(n)&&(Ei(f,Oi,ke(S)),++S),D=dW(f),B=jGe(f),y=Fe(ze(je(D,(Ie(),Sm)))),O=!Fe(ze(je(f,Mg))),A=y&&Uw(f)&&Fe(ze(je(f,xg))),o=Fi(D)==n&&Fi(D)==Fi(B),l=(Fi(D)==n&&B==n)^(Fi(B)==n&&D==n),O&&!A&&(l||o)&&Ige(e,f,n,t);if(Fi(n))for(h=new st(UDe(Fi(n)));h.e!=h.i.gc();)f=u(ft(h),85),D=dW(f),D==n&&Uw(f)&&(A=Fe(ze(je(D,(Ie(),Sm))))&&Fe(ze(je(f,xg))),A&&Ige(e,f,n,t))}function W$n(e){var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,_e,on,cn,Tn,In;for(fe=new Oe,A=new P(e.b);A.a=n.length)return{done:!0};var r=n[i++];return{value:[r,t.get(r)],done:!1}}}},KIn()||(e.prototype.createObject=function(){return{}},e.prototype.get=function(n){return this.obj[":"+n]},e.prototype.set=function(n,t){this.obj[":"+n]=t},e.prototype[FZ]=function(n){delete this.obj[":"+n]},e.prototype.keys=function(){var n=[];for(var t in this.obj)t.charCodeAt(0)==58&&n.push(t.substring(1));return n}),e}function Ti(){Ti=Y,Lx=new ki(owe),new Pi("DEPTH",ke(0)),wre=new Pi("FAN",ke(0)),pye=new Pi(VQe,ke(0)),db=new Pi("ROOT",($n(),!1)),vre=new Pi("LEFTNEIGHBOR",null),csn=new Pi("RIGHTNEIGHBOR",null),$H=new Pi("LEFTSIBLING",null),yre=new Pi("RIGHTSIBLING",null),gre=new Pi("DUMMY",!1),new Pi("LEVEL",ke(0)),yye=new Pi("REMOVABLE_EDGES",new xi),SI=new Pi("XCOOR",ke(0)),xI=new Pi("YCOOR",ke(0)),RH=new Pi("LEVELHEIGHT",0),Sa=new Pi("LEVELMIN",0),Vf=new Pi("LEVELMAX",0),pre=new Pi("GRAPH_XMIN",0),mre=new Pi("GRAPH_YMIN",0),mye=new Pi("GRAPH_XMAX",0),vye=new Pi("GRAPH_YMAX",0),wye=new Pi("COMPACT_LEVEL_ASCENSION",!1),bre=new Pi("COMPACT_CONSTRAINTS",new Oe),_x=new Pi("ID",""),Px=new Pi("POSITION",ke(0)),Vd=new Pi("PRELIM",0),$7=new Pi("MODIFIER",0),P7=new ki(rQe),EI=new ki(cQe)}function tRn(e){cge();var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O,D;if(e==null)return null;if(p=e.length*8,p==0)return"";for(l=p%24,S=p/24|0,y=l!=0?S+1:S,c=null,c=se(Wl,Eh,30,y*4,15,1),h=0,b=0,n=0,t=0,i=0,o=0,r=0,f=0;f>24,h=(n&3)<<24>>24,A=(n&-128)==0?n>>2<<24>>24:(n>>2^192)<<24>>24,O=(t&-128)==0?t>>4<<24>>24:(t>>4^240)<<24>>24,D=(i&-128)==0?i>>6<<24>>24:(i>>6^252)<<24>>24,c[o++]=r0[A],c[o++]=r0[O|h<<4],c[o++]=r0[b<<2|D],c[o++]=r0[i&63];return l==8?(n=e[r],h=(n&3)<<24>>24,A=(n&-128)==0?n>>2<<24>>24:(n>>2^192)<<24>>24,c[o++]=r0[A],c[o++]=r0[h<<4],c[o++]=61,c[o++]=61):l==16&&(n=e[r],t=e[r+1],b=(t&15)<<24>>24,h=(n&3)<<24>>24,A=(n&-128)==0?n>>2<<24>>24:(n>>2^192)<<24>>24,O=(t&-128)==0?t>>4<<24>>24:(t>>4^240)<<24>>24,c[o++]=r0[A],c[o++]=r0[O|h<<4],c[o++]=r0[b<<2],c[o++]=61),ph(c,0,c.length)}function iRn(e,n){var t,i,r,c,o,l,f;if(e.e==0&&e.p>0&&(e.p=-(e.p-1)),e.p>Xr&&Fae(n,e.p-Q0),o=n.q.getDate(),UT(n,1),e.k>=0&&D4n(n,e.k),e.c>=0?UT(n,e.c):e.k>=0?(f=new p1e(n.q.getFullYear()-Q0,n.q.getMonth(),35),i=35-f.q.getDate(),UT(n,k.Math.min(i,o))):UT(n,o),e.f<0&&(e.f=n.q.getHours()),e.b>0&&e.f<12&&(e.f+=12),Hwn(n,e.f==24&&e.g?0:e.f),e.j>=0&&a9n(n,e.j),e.n>=0&&S9n(n,e.n),e.i>=0&&rTe(n,mc(hc(FO(Lu(n.q.getTime()),zd),zd),e.i)),e.a&&(r=new r$,Fae(r,r.q.getFullYear()-Q0-80),HX(Lu(n.q.getTime()),Lu(r.q.getTime()))&&Fae(n,r.q.getFullYear()-Q0+100)),e.d>=0){if(e.c==-1)t=(7+e.d-n.q.getDay())%7,t>3&&(t-=7),l=n.q.getMonth(),UT(n,n.q.getDate()+t),n.q.getMonth()!=l&&UT(n,n.q.getDate()+(t>0?-7:7));else if(n.q.getDay()!=e.d)return!1}return e.o>Xr&&(c=n.q.getTimezoneOffset(),rTe(n,mc(Lu(n.q.getTime()),(e.o-c)*60*zd))),!0}function TVe(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te;if(r=C(n,(me(),mi)),!!X(r,206)){for(A=u(r,26),O=n.e,y=new wc(n.c),c=n.d,y.a+=c.b,y.b+=c.d,te=u(je(A,(Ie(),kH)),182),cs(te,(_s(),aG))&&(S=u(je(A,l4e),104),WU(S,c.a),tX(S,c.d),ZU(S,c.b),eX(S,c.c)),t=new Oe,b=new P(n.a);b.ai.c.length-1;)Te(i,new jc(E3,Fpe));t=u(C(r,Dh),15).a,x1(u(C(e,kp),86))?(r.e.ane(re((kn(t,i.c.length),u(i.c[t],49)).b))&&HC((kn(t,i.c.length),u(i.c[t],49)),r.e.a+r.f.a)):(r.e.bne(re((kn(t,i.c.length),u(i.c[t],49)).b))&&HC((kn(t,i.c.length),u(i.c[t],49)),r.e.b+r.f.b))}for(c=St(e.b,0);c.b!=c.d.c;)r=u(jt(c),40),t=u(C(r,(Mu(),Dh)),15).a,he(r,(Ti(),Sa),re((kn(t,i.c.length),u(i.c[t],49)).a)),he(r,Vf,re((kn(t,i.c.length),u(i.c[t],49)).b));n.Ug()}function cRn(e){var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O;for(e.o=ne(re(C(e.i,(Ie(),Tg)))),e.f=ne(re(C(e.i,lb))),e.j=e.i.b.c.length,l=e.j-1,y=0,e.k=0,e.n=0,e.b=Pf(se(jr,Me,15,e.j,0,1)),e.c=Pf(se(gr,Me,346,e.j,7,1)),o=new P(e.i.b);o.a0&&Te(e.q,b),Te(e.p,b);n-=i,S=f+n,h+=n*e.f,ul(e.b,l,ke(S)),ul(e.c,l,h),e.k=k.Math.max(e.k,S),e.n=k.Math.max(e.n,h),e.e+=n,n+=O}}function IVe(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V;if(n.b!=0){for(S=new xi,l=null,A=null,i=lc(k.Math.floor(k.Math.log(n.b)*k.Math.LOG10E)+1),f=0,V=St(n,0);V.b!=V.d.c;)for(B=u(jt(V),40),ue(A)!==ue(C(B,(Ti(),_x)))&&(A=Pt(C(B,_x)),f=0),A!=null?l=A+bLe(f++,i):l=bLe(f++,i),he(B,_x,l),D=(r=St(new S1(B).a.d,0),new Cv(r));WC(D.a);)O=u(jt(D.a),65).c,Ki(S,O,S.c.b,S.c),he(O,_x,l);for(y=new wt,o=0;o0&&(V-=S),pge(o,V),b=0,y=new P(o.a);y.a0),l.a.Xb(l.c=--l.b)),f=.4*i*b,!c&&l.b0&&(f=(Qn(0,n.length),n.charCodeAt(0)),f!=64)){if(f==37&&(p=n.lastIndexOf("%"),h=!1,p!=0&&(p==y-1||(h=(Qn(p+1,n.length),n.charCodeAt(p+1)==46))))){if(o=(Qr(1,p,n.length),n.substr(1,p-1)),V=gn("%",o)?null:Tge(o),i=0,h)try{i=al((Qn(p+2,n.length+1),n.substr(p+2)),Xr,oi)}catch(te){throw te=sr(te),X(te,131)?(l=te,R(new sB(l))):R(te)}for(D=Uhe(e.Dh());D.Ob();)if(A=IB(D),X(A,504)&&(r=u(A,587),q=r.d,(V==null?q==null:gn(V,q))&&i--==0))return r;return null}if(b=n.lastIndexOf("."),S=b==-1?n:(Qr(0,b,n.length),n.substr(0,b)),t=0,b!=-1)try{t=al((Qn(b+1,n.length+1),n.substr(b+1)),Xr,oi)}catch(te){if(te=sr(te),X(te,131))S=n;else throw R(te)}for(S=gn("%",S)?null:Tge(S),O=Uhe(e.Dh());O.Ob();)if(A=IB(O),X(A,197)&&(c=u(A,197),B=c.ve(),(S==null?B==null:gn(S,B))&&t--==0))return c;return null}return pVe(e,n)}function hRn(e){var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q;for(b=new wt,f=new Nw,i=new P(e.a.a.b);i.an.d.c){if(S=e.c[n.a.d],D=e.c[p.a.d],S==D)continue;Jf(Of(Tf(Nf(Cf(new tf,1),100),S),D))}}}}}function dRn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe;if(y=u(u(vi(e.r,n),22),83),n==(De(),et)||n==Vn){AVe(e,n);return}for(c=n==Kn?(Rw(),KN):(Rw(),VN),te=n==Kn?(Uo(),ja):(Uo(),Uf),t=u(zc(e.b,n),127),i=t.i,r=i.c+Yv(F(z(Jr,1),Jc,30,15,[t.n.b,e.C.b,e.k])),B=i.c+i.b-Yv(F(z(Jr,1),Jc,30,15,[t.n.c,e.C.c,e.k])),o=$oe(Vle(c),e.t),q=n==Kn?Ir:Vi,p=y.Jc();p.Ob();)h=u(p.Pb(),115),!(!h.c||h.c.d.c.length<=0)&&(D=h.b.Kf(),O=h.e,S=h.c,A=S.i,A.b=(f=S.n,S.e.a+f.b+f.c),A.a=(l=S.n,S.e.b+l.d+l.a),HT(te,ewe),S.f=te,ga(S,(ws(),qf)),A.c=O.a-(A.b-D.a)/2,be=k.Math.min(r,O.a),fe=k.Math.max(B,O.a+D.a),A.cfe&&(A.c=fe-A.b),Te(o.d,new aV(A,U1e(o,A))),q=n==Kn?k.Math.max(q,O.b+h.b.Kf().b):k.Math.min(q,O.b));for(q+=n==Kn?e.t:-e.t,V=ade((o.e=q,o)),V>0&&(u(zc(e.b,n),127).a.b=V),b=y.Jc();b.Ob();)h=u(b.Pb(),115),!(!h.c||h.c.d.c.length<=0)&&(A=h.c.i,A.c-=h.e.a,A.d-=h.e.b)}function bRn(e,n){KW();var t,i,r,c,o,l,f,h,b,p,y,S,A,O;if(f=ao(e,0)<0,f&&(e=Od(e)),ao(e,0)==0)switch(n){case 0:return"0";case 1:return z8;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return S=new y0,n<0?S.a+="0E+":S.a+="0E",S.a+=n==Xr?"2147483648":""+-n,S.a}b=18,p=se(Wl,Eh,30,b+1,15,1),t=b,O=e;do h=O,O=FO(O,10),p[--t]=Rt(mc(48,lf(h,hc(O,10))))&yr;while(ao(O,0)!=0);if(r=lf(lf(lf(b,t),n),1),n==0)return f&&(p[--t]=45),ph(p,t,b-t);if(n>0&&ao(r,-6)>=0){if(ao(r,0)>=0){for(c=t+Rt(r),l=b-1;l>=c;l--)p[l+1]=p[l];return p[++c]=46,f&&(p[--t]=45),ph(p,t,b-t+1)}for(o=2;HX(o,mc(Od(r),1));o++)p[--t]=48;return p[--t]=46,p[--t]=48,f&&(p[--t]=45),ph(p,t,b-t)}return A=t+1,i=b,y=new h4,f&&(y.a+="-"),i-A>=1?(qb(y,p[t]),y.a+=".",y.a+=ph(p,t+1,b-t-1)):y.a+=ph(p,t,b-t),y.a+="E",ao(r,0)>0&&(y.a+="+"),y.a+=""+cE(r),y.a}function DVe(e){a2(e,new qw(UP(l2(u2(s2(o2(new gd,Gl),"ELK Radial"),'A radial layout provider which is based on the algorithm of Peter Eades published in "Drawing free trees.", published by International Institute for Advanced Study of Social Information Science, Fujitsu Limited in 1991. The radial layouter takes a tree and places the nodes in radial order around the root. The nodes of the same tree level are placed on the same radius.'),new IM),Gl))),xe(e,Gl,NF,Le(nln)),xe(e,Gl,om,Le(tln)),xe(e,Gl,k3,Le(Qsn)),xe(e,Gl,my,Le(Wsn)),xe(e,Gl,py,Le(Zsn)),xe(e,Gl,K8,Le(Ysn)),xe(e,Gl,SS,Le(Vye)),xe(e,Gl,V8,Le(eln)),xe(e,Gl,ene,Le(Dre)),xe(e,Gl,Zee,Le(_re)),xe(e,Gl,$F,Le(Qye)),xe(e,Gl,nne,Le(Lre)),xe(e,Gl,tne,Le(Wye)),xe(e,Gl,c2e,Le(Zye)),xe(e,Gl,r2e,Le(Yye)),xe(e,Gl,e2e,Le(HH)),xe(e,Gl,n2e,Le(GH)),xe(e,Gl,t2e,Le(AI)),xe(e,Gl,i2e,Le(e6e)),xe(e,Gl,Zpe,Le(Kye))}function Yw(e,n,t,i,r){var c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe;if(D=new Se(e.g,e.f),O=R0e(e),O.a=k.Math.max(O.a,n),O.b=k.Math.max(O.b,t),fe=O.a/D.a,b=O.b/D.b,te=O.a-D.a,f=O.b-D.b,i)for(o=Fi(e)?u(je(Fi(e),(Xt(),Ng)),86):u(je(e,(Xt(),Ng)),86),l=ue(je(e,(Xt(),Vx)))===ue((Br(),to)),q=new st((!e.c&&(e.c=new we($s,e,9,9)),e.c));q.e!=q.i.gc();)switch(B=u(ft(q),125),V=u(je(B,t5),64),V==(De(),ju)&&(V=uge(B,o),Ei(B,t5,V)),V.g){case 1:l||Os(B,B.i*fe);break;case 2:Os(B,B.i+te),l||Ns(B,B.j*b);break;case 3:l||Os(B,B.i*fe),Ns(B,B.j+f);break;case 4:l||Ns(B,B.j*b)}if(vw(e,O.a,O.b),r)for(y=new st((!e.n&&(e.n=new we(Eu,e,1,7)),e.n));y.e!=y.i.gc();)p=u(ft(y),157),S=p.i+p.g/2,A=p.j+p.f/2,be=S/D.a,h=A/D.b,be+h>=1&&(be-h>0&&A>=0?(Os(p,p.i+te),Ns(p,p.j+f*h)):be-h<0&&S>=0&&(Os(p,p.i+te*be),Ns(p,p.j+f)));return Ei(e,(Xt(),Ig),(Vs(),c=u(la(iA),10),new _l(c,u(Df(c,c.length),10),0))),new Se(fe,b)}function Zz(e){var n,t,i,r,c,o,l,f,h,b,p;if(e==null)throw R(new fh(Vo));if(h=e,c=e.length,f=!1,c>0&&(n=(Qn(0,e.length),e.charCodeAt(0)),(n==45||n==43)&&(e=(Qn(1,e.length+1),e.substr(1)),--c,f=n==45)),c==0)throw R(new fh(Zw+h+'"'));for(;e.length>0&&(Qn(0,e.length),e.charCodeAt(0)==48);)e=(Qn(1,e.length+1),e.substr(1)),--c;if(c>(hKe(),tnn)[10])throw R(new fh(Zw+h+'"'));for(r=0;r0&&(p=-parseInt((Qr(0,i,e.length),e.substr(0,i)),10),e=(Qn(i,e.length+1),e.substr(i)),c-=i,t=!1);c>=o;){if(i=parseInt((Qr(0,o,e.length),e.substr(0,o)),10),e=(Qn(o,e.length+1),e.substr(o)),c-=o,t)t=!1;else{if(ao(p,l)<0)throw R(new fh(Zw+h+'"'));p=hc(p,b)}p=lf(p,i)}if(ao(p,0)>0)throw R(new fh(Zw+h+'"'));if(!f&&(p=Od(p),ao(p,0)<0))throw R(new fh(Zw+h+'"'));return p}function Tge(e){eZ();var n,t,i,r,c,o,l,f;if(e==null)return null;if(r=ah(e,Xo(37)),r<0)return e;for(f=new tl((Qr(0,r,e.length),e.substr(0,r))),n=se(ds,A3,30,4,15,1),l=0,i=0,o=e.length;rr+2&&ZY((Qn(r+1,e.length),e.charCodeAt(r+1)),G8e,q8e)&&ZY((Qn(r+2,e.length),e.charCodeAt(r+2)),G8e,q8e))if(t=Bvn((Qn(r+1,e.length),e.charCodeAt(r+1)),(Qn(r+2,e.length),e.charCodeAt(r+2))),r+=2,i>0?(t&192)==128?n[l++]=t<<24>>24:i=0:t>=128&&((t&224)==192?(n[l++]=t<<24>>24,i=2):(t&240)==224?(n[l++]=t<<24>>24,i=3):(t&248)==240&&(n[l++]=t<<24>>24,i=4)),i>0){if(l==i){switch(l){case 2:{qb(f,((n[0]&31)<<6|n[1]&63)&yr);break}case 3:{qb(f,((n[0]&15)<<12|(n[1]&63)<<6|n[2]&63)&yr);break}}l=0,i=0}}else{for(c=0;c=2){if((!e.a&&(e.a=new we($i,e,6,6)),e.a).i==0)t=(j0(),r=new yo,r),Et((!e.a&&(e.a=new we($i,e,6,6)),e.a),t);else if((!e.a&&(e.a=new we($i,e,6,6)),e.a).i>1)for(y=new j4((!e.a&&(e.a=new we($i,e,6,6)),e.a));y.e!=y.i.gc();)VE(y);sge(n,u(K((!e.a&&(e.a=new we($i,e,6,6)),e.a),0),170))}if(p)for(i=new st((!e.a&&(e.a=new we($i,e,6,6)),e.a));i.e!=i.i.gc();)for(t=u(ft(i),170),h=new st((!t.a&&(t.a=new mr(yl,t,5)),t.a));h.e!=h.i.gc();)f=u(ft(h),372),l.a=k.Math.max(l.a,f.a),l.b=k.Math.max(l.b,f.b);for(o=new st((!e.n&&(e.n=new we(Eu,e,1,7)),e.n));o.e!=o.i.gc();)c=u(ft(o),157),b=u(je(c,Qx),8),b&&Il(c,b.a,b.b),p&&(l.a=k.Math.max(l.a,c.i+c.g),l.b=k.Math.max(l.b,c.j+c.f));return l}function LVe(e,n,t,i,r){var c,o,l;if(MRe(e,n),o=n[0],c=rc(t.c,0),l=-1,j1e(t))if(i>0){if(o+i>e.length)return!1;l=Cz((Qr(0,o+i,e.length),e.substr(0,o+i)),n)}else l=Cz(e,n);switch(c){case 71:return l=a3(e,o,F(z(He,1),Me,2,6,[vYe,yYe]),n),r.e=l,!0;case 77:return _In(e,n,r,l,o);case 76:return LIn(e,n,r,l,o);case 69:return $Cn(e,n,o,r);case 99:return RCn(e,n,o,r);case 97:return l=a3(e,o,F(z(He,1),Me,2,6,["AM","PM"]),n),r.b=l,!0;case 121:return PIn(e,n,o,l,t,r);case 100:return l<=0?!1:(r.c=l,!0);case 83:return l<0?!1:gEn(l,o,n[0],r);case 104:l==12&&(l=0);case 75:case 72:return l<0?!1:(r.f=l,r.g=!1,!0);case 107:return l<0?!1:(r.f=l,r.g=!0,!0);case 109:return l<0?!1:(r.j=l,!0);case 115:return l<0?!1:(r.n=l,!0);case 90:if(oon[f]&&(D=f),p=new P(e.a.b);p.a=l){at(q.b>0),q.a.Xb(q.c=--q.b);break}else D.a>f&&(i?(Sr(i.b,D.b),i.a=k.Math.max(i.a,D.a),As(q)):(Te(D.b,b),D.c=k.Math.min(D.c,f),D.a=k.Math.max(D.a,l),i=D));i||(i=new hxe,i.c=f,i.a=l,y2(q,i),Te(i.b,b))}for(o=e.b,h=0,B=new P(t);B.a1;){if(r=MNn(n),p=c.g,A=u(je(n,zx),104),O=ne(re(je(n,KH))),(!n.a&&(n.a=new we(Ft,n,10,11)),n.a).i>1&&ne(re(je(n,(Qh(),Gre))))!=Vi&&(c.c+(A.b+A.c))/(c.b+(A.d+A.a))1&&ne(re(je(n,(Qh(),Hre))))!=Vi&&(c.c+(A.b+A.c))/(c.b+(A.d+A.a))>O&&Ei(r,(Qh(),_m),k.Math.max(ne(re(je(n,Bx))),ne(re(je(r,_m)))-ne(re(je(n,Hre))))),S=new Ose(i,b),f=WVe(S,r,y),h=f.g,h>=p&&h==h){for(o=0;o<(!r.a&&(r.a=new we(Ft,r,10,11)),r.a).i;o++)xqe(e,u(K((!r.a&&(r.a=new we(Ft,r,10,11)),r.a),o),26),u(K((!n.a&&(n.a=new we(Ft,n,10,11)),n.a),o),26));WRe(n,S),y4n(c,f.c),v4n(c,f.b)}--l}Ei(n,(Qh(),R7),c.b),Ei(n,Fy,c.c),t.Ug()}function vRn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,_e,on,cn;for(n.Tg("Compound graph postprocessor",1),t=Fe(ze(C(e,(Ie(),Hie)))),l=u(C(e,(me(),q3e)),229),b=new ar,B=l.ec().Jc();B.Ob();){for(D=u(B.Pb(),17),o=new bs(l.cc(D)),En(),Tr(o,new noe(e)),be=m7n((kn(0,o.c.length),u(o.c[0],250))),_e=XBe(u(Pe(o,o.c.length-1),250)),V=be.i,Q9(_e.i,V)?q=V.e:q=_r(V),p=cSn(D,o),qs(D.a),y=null,c=new P(o);c.axh,cn=k.Math.abs(y.b-A.b)>xh,(!t&&on&&cn||t&&(on||cn))&&Vt(D.a,te)),ac(D.a,i),i.b==0?y=te:y=(at(i.b!=0),u(i.c.b.c,8)),V7n(S,p,O),XBe(r)==_e&&(_r(_e.i)!=r.a&&(O=new Vr,L0e(O,_r(_e.i),q)),he(D,Eie,O)),nCn(S,D,q),b.a.yc(S,b);fc(D,be),Gr(D,_e)}for(h=b.a.ec().Jc();h.Ob();)f=u(h.Pb(),17),fc(f,null),Gr(f,null);n.Ug()}function yRn(e,n){var t,i,r,c,o,l,f,h,b,p,y;for(r=u(C(e,(Mu(),kp)),86),b=r==(vr(),Zc)||r==ru?eh:ru,t=u(gs(li(new mn(null,new vn(e.b,16)),new vv),Cs(new zi,new bi,new Cc,F(z(Qo,1),Ee,130,0,[(zl(),Yo)]))),16),f=u(gs(So(t.Mc(),new PEe(n)),Cs(new zi,new bi,new Cc,F(z(Qo,1),Ee,130,0,[Yo]))),16),f.Fc(u(gs(So(t.Mc(),new $Ee(n)),Cs(new zi,new bi,new Cc,F(z(Qo,1),Ee,130,0,[Yo]))),18)),f.gd(new REe(b)),y=new kd(new BEe(r)),i=new wt,l=f.Jc();l.Ob();)o=u(l.Pb(),240),h=u(o.a,40),Fe(ze(o.c))?(y.a.yc(h,($n(),ib))==null,new o9(y.a.Xc(h,!1)).a.gc()>0&&ei(i,h,u(new o9(y.a.Xc(h,!1)).a.Tc(),40)),new o9(y.a.$c(h,!0)).a.gc()>1&&ei(i,tJe(y,h),h)):(new o9(y.a.Xc(h,!1)).a.gc()>0&&(c=u(new o9(y.a.Xc(h,!1)).a.Tc(),40),ue(c)===ue(bu(Xc(i.f,h)))&&u(C(h,(Ti(),bre)),16).Ec(c)),new o9(y.a.$c(h,!0)).a.gc()>1&&(p=tJe(y,h),ue(bu(Xc(i.f,p)))===ue(h)&&u(C(p,(Ti(),bre)),16).Ec(h)),y.a.Ac(h)!=null)}function PVe(e){var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te;if(e.gc()==1)return u(e.Xb(0),235);if(e.gc()<=0)return new WR;for(r=e.Jc();r.Ob();){for(t=u(r.Pb(),235),A=0,b=oi,p=oi,f=Xr,h=Xr,S=new P(t.e);S.al&&(V=0,te+=o+B,o=0),KDn(O,t,V,te),n=k.Math.max(n,V+D.a),o=k.Math.max(o,D.b),V+=D.a+B;return O}function kRn(e){cge();var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O,D;if(e==null||(c=lB(e),A=wjn(c),A%4!=0))return null;if(O=A/4|0,O==0)return se(ds,A3,30,0,15,1);for(p=null,n=0,t=0,i=0,r=0,o=0,l=0,f=0,h=0,S=0,y=0,b=0,p=se(ds,A3,30,O*3,15,1);S>4)<<24>>24,p[y++]=((t&15)<<4|i>>2&15)<<24>>24,p[y++]=(i<<6|r)<<24>>24}return!nT(o=c[b++])||!nT(l=c[b++])?null:(n=ch[o],t=ch[l],f=c[b++],h=c[b++],ch[f]==-1||ch[h]==-1?f==61&&h==61?(t&15)!=0?null:(D=se(ds,A3,30,S*3+1,15,1),Wu(p,0,D,0,S*3),D[y]=(n<<2|t>>4)<<24>>24,D):f!=61&&h==61?(i=ch[f],(i&3)!=0?null:(D=se(ds,A3,30,S*3+2,15,1),Wu(p,0,D,0,S*3),D[y++]=(n<<2|t>>4)<<24>>24,D[y]=((t&15)<<4|i>>2&15)<<24>>24,D)):null:(i=ch[f],r=ch[h],p[y++]=(n<<2|t>>4)<<24>>24,p[y++]=((t&15)<<4|i>>2&15)<<24>>24,p[y++]=(i<<6|r)<<24>>24,p))}function jRn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be;for(n.Tg(xQe,1),A=u(C(e,(Ie(),Y1)),222),r=new P(e.b);r.a=2){for(O=!0,y=new P(c.j),t=u(_(y),12),S=null;y.a0)if(i=p.gc(),h=lc(k.Math.floor((i+1)/2))-1,r=lc(k.Math.ceil((i+1)/2))-1,n.o==Qa)for(b=r;b>=h;b--)n.a[te.p]==te&&(O=u(p.Xb(b),49),A=u(O.a,9),!rf(t,O.b)&&S>e.b.e[A.p]&&(n.a[A.p]=te,n.g[te.p]=n.g[A.p],n.a[te.p]=n.g[te.p],n.f[n.g[te.p].p]=($n(),!!(Fe(n.f[n.g[te.p].p])&te.k==(Fn(),dr))),S=e.b.e[A.p]));else for(b=h;b<=r;b++)n.a[te.p]==te&&(B=u(p.Xb(b),49),D=u(B.a,9),!rf(t,B.b)&&S0&&(r=u(Pe(D.c.a,fe-1),9),o=e.i[r.p],on=k.Math.ceil(zv(e.n,r,D)),c=be.a.e-D.d.d-(o.a.e+r.o.b+r.d.a)-on),h=Vi,fe0&&_e.a.e.e-_e.a.a-(_e.b.e.e-_e.b.a)<0,A=V.a.e.e-V.a.a-(V.b.e.e-V.b.a)<0&&_e.a.e.e-_e.a.a-(_e.b.e.e-_e.b.a)>0,S=V.a.e.e+V.b.a<_e.b.e.e+_e.a.a,y=V.a.e.e+V.b.a>_e.b.e.e+_e.a.a,te=0,!O&&!A&&(y?c+p>0?te=p:h-i>0&&(te=i):S&&(c+l>0?te=l:h-q>0&&(te=q))),be.a.e+=te,be.b&&(be.d.e+=te),!1))}function RVe(e,n,t){var i,r,c,o,l,f,h,b,p,y;if(i=new _f(n.Jf().a,n.Jf().b,n.Kf().a,n.Kf().b),r=new y4,e.c)for(o=new P(n.Pf());o.a0&&Or(S,(kn(t,n.c.length),u(n.c[t],25))),c=0,y=!0,B=Ks(Vb(cr(S))),f=B.Jc();f.Ob();){for(l=u(f.Pb(),17),y=!1,p=l,h=0;h(kn(h,n.c.length),u(n.c[h],25)).a.c.length?Or(r,(kn(h,n.c.length),u(n.c[h],25))):H0(r,i+c,(kn(h,n.c.length),u(n.c[h],25))),p=OW(p,r);t>0&&(c+=1)}if(y){for(h=0;h(kn(h,n.c.length),u(n.c[h],25)).a.c.length?Or(r,(kn(h,n.c.length),u(n.c[h],25))):H0(r,i+c,(kn(h,n.c.length),u(n.c[h],25)));t>0&&(c+=1)}for(o=!1,O=new Un(Yn(Ii(S).a.Jc(),new ee));ht(O);){for(A=u(rt(O),17),p=A,b=t+1;b(kn(h,n.c.length),u(n.c[h],25)).a.c.length?Or(D,(kn(h,n.c.length),u(n.c[h],25))):H0(D,i+1,(kn(h,n.c.length),u(n.c[h],25))));o&&(c+=1),o=!0}return c>0?c-1:0}function K0(e,n){ai();var t,i,r,c,o,l,f,h,b,p,y,S,A;if(Aj(Y7)==0){for(p=se(nzn,Me,121,Ehn.length,0,1),o=0;oh&&(i.a+=GTe(se(Wl,Eh,30,-h,15,1))),i.a+="Is",ah(f,Xo(32))>=0)for(r=0;r=i.o.b/2}else q=!p;q?(B=u(C(i,(me(),$y)),16),B?y?c=B:(r=u(C(i,Oy),16),r?B.gc()<=r.gc()?c=B:c=r:(c=new Oe,he(i,Oy,c))):(c=new Oe,he(i,$y,c))):(r=u(C(i,(me(),Oy)),16),r?p?c=r:(B=u(C(i,$y),16),B?r.gc()<=B.gc()?c=r:c=B:(c=new Oe,he(i,$y,c))):(c=new Oe,he(i,Oy,c))),c.Ec(e),he(e,(me(),tH),t),n.d==t?(Gr(n,null),t.e.c.length+t.g.c.length==0&&wu(t,null),jkn(t)):(fc(n,null),t.e.c.length+t.g.c.length==0&&wu(t,null)),qs(n.a)}function MRn(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,_e,on,cn,Tn,In,lt,Qt,Ui;for(t.Tg("MinWidth layering",1),S=n.b,_e=n.a,Ui=u(C(n,(Ie(),n4e)),15).a,l=u(C(n,t4e),15).a,e.b=ne(re(C(n,Kf))),e.d=Vi,te=new P(_e);te.aS&&(c&&(gc(fe,y),gc(on,ke(h.b-1))),Qt=t.b,Ui+=y+n,y=0,b=k.Math.max(b,t.b+t.c+lt)),Os(l,Qt),Ns(l,Ui),b=k.Math.max(b,Qt+lt+t.c),y=k.Math.max(y,p),Qt+=lt+n;if(b=k.Math.max(b,i),In=Ui+y+t.a,In0?(h=0,D&&(h+=l),h+=(cn-1)*o,V&&(h+=l),on&&V&&(h=k.Math.max(h,XNn(V,o,q,_e))),h=e.a&&(i=lLn(e,q),b=k.Math.max(b,i.b),te=k.Math.max(te,i.d),Te(l,new jc(q,i)));for(on=new Oe,h=0;h0),D.a.Xb(D.c=--D.b),cn=new Xu(e.b),y2(D,cn),at(D.b0){for(y=b<100?null:new k0(b),h=new t1e(n),A=h.g,B=se($t,ni,30,b,15,1),i=0,te=new _w(b),r=0;r=0;)if(S!=null?gi(S,A[f]):ue(S)===ue(A[f])){B.length<=i&&(D=B,B=se($t,ni,30,2*B.length,15,1),Wu(D,0,B,0,i)),B[i++]=r,Et(te,A[f]);break e}if(S=S,ue(S)===ue(l))break}}if(h=te,A=te.g,b=i,i>B.length&&(D=B,B=se($t,ni,30,i,15,1),Wu(D,0,B,0,i)),i>0){for(V=!0,c=0;c=0;)ey(e,B[o]);if(i!=b){for(r=b;--r>=i;)ey(h,r);D=B,B=se($t,ni,30,i,15,1),Wu(D,0,B,0,i)}n=h}}}else for(n=axn(e,n),r=e.i;--r>=0;)n.Gc(e.g[r])&&(ey(e,r),V=!0);if(V){if(B!=null){for(t=n.gc(),p=t==1?bE(e,4,n.Jc().Pb(),null,B[0],O):bE(e,6,n,B,B[0],O),y=t<100?null:new k0(t),r=n.Jc();r.Ob();)S=r.Pb(),y=qle(e,u(S,75),y);y?(y.lj(p),y.mj()):hi(e.e,p)}else{for(y=y2n(n.gc()),r=n.Jc();r.Ob();)S=r.Pb(),y=qle(e,u(S,75),y);y&&y.mj()}return!0}else return!1}function IRn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V;for(t=new XJe(n),t.a||c_n(n),h=iDn(n),f=new Nw,D=new rXe,O=new P(n.a);O.a0||t.o==Qa&&r=t}function _Rn(e){var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,_e,on,cn,Tn;for(V=e.a,te=0,be=V.length;te0?(p=u(Pe(y.c.a,o-1),9),on=zv(e.b,y,p),D=y.n.b-y.d.d-(p.n.b+p.o.b+p.d.a+on)):D=y.n.b-y.d.d,h=k.Math.min(D,h),o1&&(o=k.Math.min(o,k.Math.abs(u(Yu(l.a,1),8).b-b.b)))));else for(O=new P(n.j);O.ar&&(c=y.a-r,o=oi,i.c.length=0,r=y.a),y.a>=r&&(Gn(i.c,l),l.a.b>1&&(o=k.Math.min(o,k.Math.abs(u(Yu(l.a,l.a.b-2),8).b-y.b)))));if(i.c.length!=0&&c>n.o.a/2&&o>n.o.b/2){for(S=new Qu,wu(S,n),Ar(S,(De(),Kn)),S.n.a=n.o.a/2,B=new Qu,wu(B,n),Ar(B,bt),B.n.a=n.o.a/2,B.n.b=n.o.b,f=new P(i);f.a=h.b?fc(l,B):fc(l,S)):(h=u(Cvn(l.a),8),D=l.a.b==0?La(l.c):u(If(l.a),8),D.b>=h.b?Gr(l,B):Gr(l,S)),p=u(C(l,(Ie(),Wc)),78),p&&H2(p,h,!0);n.n.a=r-n.o.a/2}}function $Rn(e,n,t){var i,r,c,o,l,f,h,b,p,y;for(l=St(e.b,0);l.b!=l.d.c;)if(o=u(jt(l),40),!gn(o.c,_F))for(h=aOn(o,e),n==(vr(),Zc)||n==ru?Tr(h,new S_):Tr(h,new iU),f=h.c.length,i=0;i=0?S=Y4(l):S=NO(Y4(l)),e.of(O7,S)),h=new Vr,y=!1,e.nf(vp)?(wle(h,u(e.mf(vp),8)),y=!0):Zwn(h,o.a/2,o.b/2),S.g){case 4:he(b,ku,(Xs(),V1)),he(b,rH,(tg(),L3)),b.o.b=o.b,O<0&&(b.o.a=-O),Ar(p,(De(),et)),y||(h.a=o.a),h.a-=o.a;break;case 2:he(b,ku,(Xs(),Sg)),he(b,rH,(tg(),E7)),b.o.b=o.b,O<0&&(b.o.a=-O),Ar(p,(De(),Vn)),y||(h.a=0);break;case 1:he(b,jg,(_1(),$3)),b.o.a=o.a,O<0&&(b.o.b=-O),Ar(p,(De(),bt)),y||(h.b=o.b),h.b-=o.b;break;case 3:he(b,jg,(_1(),Ty)),b.o.a=o.a,O<0&&(b.o.b=-O),Ar(p,(De(),Kn)),y||(h.b=0)}if(wle(p.n,h),he(b,vp,h),n==Dg||n==a1||n==to){if(A=0,n==Dg&&e.nf(Xd))switch(S.g){case 1:case 2:A=u(e.mf(Xd),15).a;break;case 3:case 4:A=-u(e.mf(Xd),15).a}else switch(S.g){case 4:case 2:A=c.b,n==a1&&(A/=r.b);break;case 1:case 3:A=c.a,n==a1&&(A/=r.a)}he(b,gp,A)}return he(b,Iu,S),b}function RRn(){zoe();function e(i){var r=this;this.dispatch=function(c){var o=c.data;switch(o.cmd){case"algorithms":var l=fde((En(),new Hr(new ot(Lg.b))));i.postMessage({id:o.id,data:l});break;case"categories":var f=fde((En(),new Hr(new ot(Lg.c))));i.postMessage({id:o.id,data:f});break;case"options":var h=fde((En(),new Hr(new ot(Lg.d))));i.postMessage({id:o.id,data:h});break;case"register":aPn(o.algorithms),i.postMessage({id:o.id});break;case"layout":rPn(o.graph,o.layoutOptions||{},o.options||{}),i.postMessage({id:o.id,data:o.graph});break}},this.saveDispatch=function(c){try{r.dispatch(c)}catch(o){i.postMessage({id:c.data.id,error:o})}}}function n(i){var r=this;this.dispatcher=new e({postMessage:function(c){r.onmessage({data:c})}}),this.postMessage=function(c){setTimeout(function(){r.dispatcher.saveDispatch({data:c})},0)}}if(typeof document===qZ&&typeof self!==qZ){var t=new e(self);self.onmessage=t.saveDispatch}else typeof M!==qZ&&M.exports&&(Object.defineProperty(N,"__esModule",{value:!0}),M.exports={default:n,Worker:n})}function oZ(e,n,t,i,r,c,o){var l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,_e,on,cn,Tn,In,lt,Qt,Ui;for(O=0,Tn=0,h=new P(e.b);h.aO&&(c&&(gc(fe,S),gc(on,ke(b.b-1)),Te(e.d,A),l.c.length=0),Qt=t.b,Ui+=S+n,S=0,p=k.Math.max(p,t.b+t.c+lt)),Gn(l.c,f),FJe(f,Qt,Ui),p=k.Math.max(p,Qt+lt+t.c),S=k.Math.max(S,y),Qt+=lt+n,A=f;if(Sr(e.a,l),Te(e.d,u(Pe(l,l.c.length-1),167)),p=k.Math.max(p,i),In=Ui+S+t.a,Inr.d.d+r.d.a?b.f.d=!0:(b.f.d=!0,b.f.a=!0))),i.b!=i.d.c&&(n=t);b&&(c=u(zn(e.f,o.d.i),60),n.bc.d.d+c.d.a?b.f.d=!0:(b.f.d=!0,b.f.a=!0))}for(l=new Un(Yn(cr(S).a.Jc(),new ee));ht(l);)o=u(rt(l),17),o.a.b!=0&&(n=u(If(o.a),8),o.d.j==(De(),Kn)&&(D=new lS(n,new Se(n.a,r.d.d),r,o),D.f.a=!0,D.a=o.d,Gn(O.c,D)),o.d.j==bt&&(D=new lS(n,new Se(n.a,r.d.d+r.d.a),r,o),D.f.d=!0,D.a=o.d,Gn(O.c,D)))}return O}function GRn(e,n,t){var i,r,c,o,l,f,h,b,p,y;for(f=new Oe,p=n.length,o=d1e(t),h=0;h=A&&(q>A&&(S.c.length=0,A=q),Gn(S.c,o));S.c.length!=0&&(y=u(Pe(S,fz(n,S.c.length)),132),In.a.Ac(y)!=null,y.s=O++,mbe(y,cn,fe),S.c.length=0)}for(te=e.c.length+1,l=new P(e);l.aTn.s&&(As(t),qo(Tn.i,i),i.c>0&&(i.a=Tn,Te(Tn.t,i),i.b=_e,Te(_e.i,i)))}function GVe(e,n,t,i,r){var c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,_e,on,cn,Tn,In;for(O=new xo(n.b),te=new xo(n.b),y=new xo(n.b),on=new xo(n.b),D=new xo(n.b),_e=St(n,0);_e.b!=_e.d.c;)for(be=u(jt(_e),12),l=new P(be.g);l.a0,B=be.g.c.length>0,h&&B?Gn(y.c,be):h?Gn(O.c,be):B&&Gn(te.c,be);for(A=new P(O);A.aq.mh()-h.b&&(y=q.mh()-h.b),S>q.nh()-h.d&&(S=q.nh()-h.d),b0){for(V=St(e.f,0);V.b!=V.d.c;)q=u(jt(V),9),q.p+=y-e.e;_0e(e),qs(e.f),Dbe(e,i,S)}else{for(Vt(e.f,S),S.p=i,e.e=k.Math.max(e.e,i),c=new Un(Yn(cr(S).a.Jc(),new ee));ht(c);)r=u(rt(c),17),!r.c.i.c&&r.c.i.k==(Fn(),Uu)&&(Vt(e.f,r.c.i),r.c.i.p=i-1);e.c=i}else _0e(e),qs(e.f),i=0,ht(new Un(Yn(cr(S).a.Jc(),new ee)))?(y=0,y=qJe(y,S),i=y+2,Dbe(e,i,S)):(Vt(e.f,S),S.p=0,e.e=k.Math.max(e.e,0),e.b=u(Pe(e.d.b,0),25),e.c=0);for(e.f.b==0||_0e(e),e.d.a.c.length=0,B=new Oe,h=new P(e.d.b);h.a=48&&n<=57){for(i=n-48;r=48&&n<=57;)if(i=i*10+n-48,i<0)throw R(new Bt(Ht((Lt(),Z2e))))}else throw R(new Bt(Ht((Lt(),DZe))));if(t=i,n==44){if(r>=e.j)throw R(new Bt(Ht((Lt(),LZe))));if((n=rc(e.i,r++))>=48&&n<=57){for(t=n-48;r=48&&n<=57;)if(t=t*10+n-48,t<0)throw R(new Bt(Ht((Lt(),Z2e))));if(i>t)throw R(new Bt(Ht((Lt(),PZe))))}else t=-1}if(n!=125)throw R(new Bt(Ht((Lt(),_Ze))));e._l(r)?(c=(ai(),ai(),new D2(9,c)),e.d=r+1):(c=(ai(),ai(),new D2(3,c)),e.d=r),c.Mm(i),c.Lm(t),fi(e)}}return c}function YRn(e){var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be;for(r=1,S=new Oe,i=0;i=u(Pe(e.b,i),25).a.c.length/4)continue}if(u(Pe(e.b,i),25).a.c.length>n){for(te=new Oe,Te(te,u(Pe(e.b,i),25)),o=0;o1)for(A=new j4((!e.a&&(e.a=new we($i,e,6,6)),e.a));A.e!=A.i.gc();)VE(A);for(o=u(K((!e.a&&(e.a=new we($i,e,6,6)),e.a),0),170),D=Qt,Qt>be+te?D=be+te:Qtfe+O?B=fe+O:Uibe-te&&Dfe-O&&BQt+lt?on=Qt+lt:beUi+_e?cn=Ui+_e:feQt-lt&&onUi-_e&&cnt&&(y=t-1),S=c0+Ds(n,24)*kN*p-p/2,S<0?S=1:S>i&&(S=i-1),r=(j0(),f=new Jk,f),wB(r,y),pB(r,S),Et((!o.a&&(o.a=new mr(yl,o,5)),o.a),r)}function fZ(e,n){KW();var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,_e;if(V=e.e,b=e.d,r=e.a,V==0)switch(n){case 0:return"0";case 1:return z8;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return B=new y0,B.a+="0E",B.a+=-n,B.a}if(O=b*10+1+7,D=se(Wl,Eh,30,O+1,15,1),t=O,b==1)if(c=r[0],c<0){_e=Rr(c,Dc);do p=_e,_e=FO(_e,10),D[--t]=48+Rt(lf(p,hc(_e,10)))&yr;while(ao(_e,0)!=0)}else{_e=c;do p=_e,_e=_e/10|0,D[--t]=48+(p-_e*10)&yr;while(_e!=0)}else{te=se($t,ni,30,b,15,1),fe=b,Wu(r,0,te,0,fe);e:for(;;){for(q=0,l=fe-1;l>=0;l--)be=mc(qh(q,32),Rr(te[l],Dc)),S=tMn(be),te[l]=Rt(S),q=Rt(Sw(S,32));A=Rt(q),y=t;do D[--t]=48+A%10&yr;while((A=A/10|0)!=0&&t!=0);for(i=9-y+t,o=0;o0;o++)D[--t]=48;for(f=fe-1;te[f]==0;f--)if(f==0)break e;fe=f+1}for(;D[t]==48;)++t}return h=V<0,h&&(D[--t]=45),ph(D,t,O-t)}function KVe(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe;switch(e.c=n,e.g=new wt,t=(Rb(),new v0(e.c)),i=new OP(t),ode(i),V=Pt(je(e.c,(HO(),q6e))),f=u(je(e.c,cce),330),be=u(je(e.c,uce),427),o=u(je(e.c,J6e),477),te=u(je(e.c,rce),428),e.j=ne(re(je(e.c,qln))),l=e.a,f.g){case 0:l=e.a;break;case 1:l=e.b;break;case 2:l=e.i;break;case 3:l=e.e;break;case 4:l=e.f;break;default:throw R(new qn(BF+(f.f!=null?f.f:""+f.g)))}if(e.d=new N_e(l,be,o),he(e.d,(Z9(),WS),ze(je(e.c,Hln))),e.d.c=Fe(ze(je(e.c,H6e))),OR(e.c).i==0)return e.d;for(p=new st(OR(e.c));p.e!=p.i.gc();){for(b=u(ft(p),26),S=b.g/2,y=b.f/2,fe=new Se(b.i+S,b.j+y);so(e.g,fe);)m2(fe,(k.Math.random()-.5)*xh,(k.Math.random()-.5)*xh);O=u(je(b,(Xt(),z7)),140),D=new X_e(fe,new _f(fe.a-S-e.j/2-O.b,fe.b-y-e.j/2-O.d,b.g+e.j+(O.b+O.c),b.f+e.j+(O.d+O.a))),Te(e.d.i,D),ei(e.g,fe,new jc(D,b))}switch(te.g){case 0:if(V==null)e.d.d=u(Pe(e.d.i,0),68);else for(q=new P(e.d.i);q.a0?lt+1:1);for(o=new P(fe.g);o.a0?lt+1:1)}e.d[h]==0?Vt(e.f,O):e.a[h]==0&&Vt(e.g,O),++h}for(A=-1,S=1,p=new Oe,e.e=u(C(n,(me(),Ly)),234);kl>0;){for(;e.f.b!=0;)Ui=u(nV(e.f),9),e.c[Ui.p]=A--,Ybe(e,Ui),--kl;for(;e.g.b!=0;)Es=u(nV(e.g),9),e.c[Es.p]=S++,Ybe(e,Es),--kl;if(kl>0){for(y=Xr,q=new P(V);q.a=y&&(te>y&&(p.c.length=0,y=te),Gn(p.c,O)));b=e.qg(p),e.c[b.p]=S++,Ybe(e,b),--kl}}for(Qt=V.c.length+1,h=0;he.c[eu]&&(Bd(i,!0),he(n,Ny,($n(),!0)));e.a=null,e.d=null,e.c=null,qs(e.g),qs(e.f),t.Ug()}function YVe(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe;for(be=u(K((!e.a&&(e.a=new we($i,e,6,6)),e.a),0),170),b=new xs,te=new wt,fe=lKe(be),Ko(te.f,be,fe),y=new wt,i=new xi,A=Uh(Rl(F(z(Xl,1),On,20,0,[(!n.d&&(n.d=new Nn(pr,n,8,5)),n.d),(!n.e&&(n.e=new Nn(pr,n,7,4)),n.e)])));ht(A);){if(S=u(rt(A),85),(!e.a&&(e.a=new we($i,e,6,6)),e.a).i!=1)throw R(new qn(FWe+(!e.a&&(e.a=new we($i,e,6,6)),e.a).i));S!=e&&(D=u(K((!S.a&&(S.a=new we($i,S,6,6)),S.a),0),170),Ki(i,D,i.c.b,i.c),O=u(bu(Xc(te.f,D)),13),O||(O=lKe(D),Ko(te.f,D,O)),p=t?Nr(new wc(u(Pe(fe,fe.c.length-1),8)),u(Pe(O,O.c.length-1),8)):Nr(new wc((kn(0,fe.c.length),u(fe.c[0],8))),(kn(0,O.c.length),u(O.c[0],8))),Ko(y.f,D,p))}if(i.b!=0)for(B=u(Pe(fe,t?fe.c.length-1:0),8),h=1;h1&&Ki(b,B,b.c.b,b.c),OY(r)));B=q}return b}function QVe(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,_e,on,cn,Tn;for(t.Tg(WQe,1),Tn=u(gs(li(new mn(null,new vn(n,16)),new A_),Cs(new zi,new bi,new Cc,F(z(Qo,1),Ee,130,0,[(zl(),Yo)]))),16),b=u(gs(li(new mn(null,new vn(n,16)),new FEe(n)),Cs(new zi,new bi,new Cc,F(z(Qo,1),Ee,130,0,[Yo]))),16),A=u(gs(li(new mn(null,new vn(n,16)),new zEe(n)),Cs(new zi,new bi,new Cc,F(z(Qo,1),Ee,130,0,[Yo]))),16),O=se(PH,LF,40,n.gc(),0,1),o=0;o=0&&cn=0&&!O[S]){O[S]=r,b.ed(l),--l;break}if(S=cn-y,S=0&&!O[S]){O[S]=r,b.ed(l),--l;break}}for(A.gd(new OM),f=O.length-1;f>=0;f--)!O[f]&&!A.dc()&&(O[f]=u(A.Xb(0),40),A.ed(0));for(h=0;hy&&BO((kn(y,n.c.length),u(n.c[y],186)),b),b=null;n.c.length>y&&(kn(y,n.c.length),u(n.c[y],186)).a.c.length==0;)qo(n,(kn(y,n.c.length),n.c[y]));if(!b){--o;continue}if(!Fe(ze(u(Pe(b.b,0),26).mf((Ha(),CI))))&&m_n(n,A,c,b,D,t,y,i)){O=!0;continue}if(D){if(S=A.b,p=b.f,!Fe(ze(u(Pe(b.b,0),26).mf(CI)))&&BPn(n,A,c,b,t,y,i,r)){if(O=!0,S=e.j){e.a=-1,e.c=1;return}if(n=rc(e.i,e.d++),e.a=n,e.b==1){switch(n){case 92:if(i=10,e.d>=e.j)throw R(new Bt(Ht((Lt(),XF))));e.a=rc(e.i,e.d++);break;case 45:(e.e&512)==512&&e.d=e.j||rc(e.i,e.d)!=63)break;if(++e.d>=e.j)throw R(new Bt(Ht((Lt(),Nne))));switch(n=rc(e.i,e.d++),n){case 58:i=13;break;case 61:i=14;break;case 33:i=15;break;case 91:i=19;break;case 62:i=18;break;case 60:if(e.d>=e.j)throw R(new Bt(Ht((Lt(),Nne))));if(n=rc(e.i,e.d++),n==61)i=16;else if(n==33)i=17;else throw R(new Bt(Ht((Lt(),gZe))));break;case 35:for(;e.d=e.j)throw R(new Bt(Ht((Lt(),XF))));e.a=rc(e.i,e.d++);break;default:i=0}e.c=i}function uBn(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D;if(t.Tg("Process compaction",1),!!Fe(ze(C(n,(Mu(),Sye))))){for(r=u(C(n,kp),86),S=ne(re(C(n,jre))),NLn(e,n,r),yRn(n,S/2/2),A=n.b,Zb(A,new DEe(r)),h=St(A,0);h.b!=h.d.c;)if(f=u(jt(h),40),!Fe(ze(C(f,(Ti(),db))))){if(i=rDn(f,r),O=Z_n(f,n),p=0,y=0,i)switch(D=i.e,r.g){case 2:p=D.a-S-f.f.a,O.e.a-S-f.f.ap&&(p=O.e.a+O.f.a+S),y=p+f.f.a;break;case 4:p=D.b-S-f.f.b,O.e.b-S-f.f.bp&&(p=O.e.b+O.f.b+S),y=p+f.f.b}else if(O)switch(r.g){case 2:p=O.e.a-S-f.f.a,y=p+f.f.a;break;case 1:p=O.e.a+O.f.a+S,y=p+f.f.a;break;case 4:p=O.e.b-S-f.f.b,y=p+f.f.b;break;case 3:p=O.e.b+O.f.b+S,y=p+f.f.b}ue(C(n,kre))===ue((IE(),jI))?(c=p,o=y,l=R1(li(new mn(null,new vn(e.a,16)),new gCe(c,o))),l.a!=null?r==(vr(),Zc)||r==ru?f.e.a=p:f.e.b=p:(r==(vr(),Zc)||r==Vl?l=R1(li(nBe(new mn(null,new vn(e.a,16))),new _Ee(c))):l=R1(li(nBe(new mn(null,new vn(e.a,16))),new LEe(c))),l.a!=null&&(r==Zc||r==ru?f.e.a=ne(re((at(l.a!=null),u(l.a,49)).a)):f.e.b=ne(re((at(l.a!=null),u(l.a,49)).a)))),l.a!=null&&(b=pu(e.a,(at(l.a!=null),l.a),0),b>0&&b!=u(C(f,Dh),15).a&&(he(f,wye,($n(),!0)),he(f,Dh,ke(b))))):r==(vr(),Zc)||r==ru?f.e.a=p:f.e.b=p}t.Ug()}}function oBn(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be;if(t.Tg("Coffman-Graham Layering",1),n.a.c.length==0){t.Ug();return}for(be=u(C(n,(Ie(),e4e)),15).a,f=0,o=0,y=new P(n.a);y.a=be||!jEn(B,i))&&(i=RDe(n,b)),Or(B,i),c=new Un(Yn(cr(B).a.Jc(),new ee));ht(c);)r=u(rt(c),17),!e.a[r.p]&&(O=r.c.i,--e.e[O.p],e.e[O.p]==0&&C4(k8(S,O),F8));for(h=b.c.length-1;h>=0;--h)Te(n.b,(kn(h,b.c.length),u(b.c[h],25)));n.a.c.length=0,t.Ug()}function ZVe(e){var n,t,i,r,c,o,l,f,h;for(e.b=1,fi(e),n=null,e.c==0&&e.a==94?(fi(e),n=(ai(),ai(),new cl(4)),ho(n,0,a7),l=new cl(4)):l=(ai(),ai(),new cl(4)),r=!0;(h=e.c)!=1;){if(h==0&&e.a==93&&!r){n&&(bS(n,l),l=n);break}if(t=e.a,i=!1,h==10)switch(t){case 100:case 68:case 119:case 87:case 115:case 83:tm(l,O8(t)),i=!0;break;case 105:case 73:case 99:case 67:t=(tm(l,O8(t)),-1),t<0&&(i=!0);break;case 112:case 80:if(f=Q0e(e,t),!f)throw R(new Bt(Ht((Lt(),Ine))));tm(l,f),i=!0;break;default:t=Lbe(e)}else if(h==24&&!r){if(n&&(bS(n,l),l=n),c=ZVe(e),bS(l,c),e.c!=0||e.a!=93)throw R(new Bt(Ht((Lt(),xZe))));break}if(fi(e),!i){if(h==0){if(t==91)throw R(new Bt(Ht((Lt(),Q2e))));if(t==93)throw R(new Bt(Ht((Lt(),W2e))));if(t==45&&!r&&e.a!=93)throw R(new Bt(Ht((Lt(),Dne))))}if(e.c!=0||e.a!=45||t==45&&r)ho(l,t,t);else{if(fi(e),(h=e.c)==1)throw R(new Bt(Ht((Lt(),KF))));if(h==0&&e.a==93)ho(l,t,t),ho(l,45,45);else{if(h==0&&e.a==93||h==24)throw R(new Bt(Ht((Lt(),Dne))));if(o=e.a,h==0){if(o==91)throw R(new Bt(Ht((Lt(),Q2e))));if(o==93)throw R(new Bt(Ht((Lt(),W2e))));if(o==45)throw R(new Bt(Ht((Lt(),Dne))))}else h==10&&(o=Lbe(e));if(fi(e),t>o)throw R(new Bt(Ht((Lt(),CZe))));ho(l,t,o)}}}r=!1}if(e.c==1)throw R(new Bt(Ht((Lt(),KF))));return h3(l),hS(l),e.b=0,fi(e),l}function eYe(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te;te=!1;do for(te=!1,c=n?new it(e.a.b).a.gc()-2:1;n?c>=0:cu(C(D,Oi),15).a)&&(V=!1);if(V){for(f=n?c+1:c-1,l=Pae(e.a,ke(f)),o=!1,q=!0,i=!1,b=St(l,0);b.b!=b.d.c;)h=u(jt(b),9),wi(h,Oi)?h.p!=p.p&&(o=o|(n?u(C(h,Oi),15).au(C(p,Oi),15).a),q=!1):!o&&q&&h.k==(Fn(),Uu)&&(i=!0,n?y=u(rt(new Un(Yn(cr(h).a.Jc(),new ee))),17).c.i:y=u(rt(new Un(Yn(Ii(h).a.Jc(),new ee))),17).d.i,y==p&&(n?t=u(rt(new Un(Yn(Ii(h).a.Jc(),new ee))),17).d.i:t=u(rt(new Un(Yn(cr(h).a.Jc(),new ee))),17).c.i,(n?u(p2(e.a,t),15).a-u(p2(e.a,y),15).a:u(p2(e.a,y),15).a-u(p2(e.a,t),15).a)<=2&&(q=!1)));if(i&&q&&(n?t=u(rt(new Un(Yn(Ii(p).a.Jc(),new ee))),17).d.i:t=u(rt(new Un(Yn(cr(p).a.Jc(),new ee))),17).c.i,(n?u(p2(e.a,t),15).a-u(p2(e.a,p),15).a:u(p2(e.a,p),15).a-u(p2(e.a,t),15).a)<=2&&t.k==(Fn(),Wi)&&(q=!1)),o||q){for(O=LUe(e,p,n);O.a.gc()!=0;)A=u(O.a.ec().Jc().Pb(),9),O.a.Ac(A)!=null,ac(O,LUe(e,A,n));--S,te=!0}}}while(te)}function sBn(e){Ct(e.c,Ut,F(z(He,1),Me,2,6,[sc,"http://www.w3.org/2001/XMLSchema#decimal"])),Ct(e.d,Ut,F(z(He,1),Me,2,6,[sc,"http://www.w3.org/2001/XMLSchema#integer"])),Ct(e.e,Ut,F(z(He,1),Me,2,6,[sc,"http://www.w3.org/2001/XMLSchema#boolean"])),Ct(e.f,Ut,F(z(He,1),Me,2,6,[sc,"EBoolean",ui,"EBoolean:Object"])),Ct(e.i,Ut,F(z(He,1),Me,2,6,[sc,"http://www.w3.org/2001/XMLSchema#byte"])),Ct(e.g,Ut,F(z(He,1),Me,2,6,[sc,"http://www.w3.org/2001/XMLSchema#hexBinary"])),Ct(e.j,Ut,F(z(He,1),Me,2,6,[sc,"EByte",ui,"EByte:Object"])),Ct(e.n,Ut,F(z(He,1),Me,2,6,[sc,"EChar",ui,"EChar:Object"])),Ct(e.t,Ut,F(z(He,1),Me,2,6,[sc,"http://www.w3.org/2001/XMLSchema#double"])),Ct(e.u,Ut,F(z(He,1),Me,2,6,[sc,"EDouble",ui,"EDouble:Object"])),Ct(e.F,Ut,F(z(He,1),Me,2,6,[sc,"http://www.w3.org/2001/XMLSchema#float"])),Ct(e.G,Ut,F(z(He,1),Me,2,6,[sc,"EFloat",ui,"EFloat:Object"])),Ct(e.I,Ut,F(z(He,1),Me,2,6,[sc,"http://www.w3.org/2001/XMLSchema#int"])),Ct(e.J,Ut,F(z(He,1),Me,2,6,[sc,"EInt",ui,"EInt:Object"])),Ct(e.N,Ut,F(z(He,1),Me,2,6,[sc,"http://www.w3.org/2001/XMLSchema#long"])),Ct(e.O,Ut,F(z(He,1),Me,2,6,[sc,"ELong",ui,"ELong:Object"])),Ct(e.Z,Ut,F(z(He,1),Me,2,6,[sc,"http://www.w3.org/2001/XMLSchema#short"])),Ct(e.$,Ut,F(z(He,1),Me,2,6,[sc,"EShort",ui,"EShort:Object"])),Ct(e._,Ut,F(z(He,1),Me,2,6,[sc,"http://www.w3.org/2001/XMLSchema#string"]))}function Ie(){Ie=Y,zie=(Xt(),_fn),w4e=Lfn,gI=Pfn,Kf=$fn,G3=q9e,Cg=U9e,Om=X9e,I7=K9e,D7=V9e,Fie=cG,Tg=Qd,Jie=Rfn,kx=W9e,jH=Xy,bI=(Dge(),Hcn),Tm=Gcn,lb=qcn,Nm=Ucn,Iun=new Yr(RI,ke(0)),N7=zcn,g4e=Fcn,zy=Jcn,x4e=bun,m4e=Vcn,v4e=Wcn,Gie=cun,y4e=nun,k4e=iun,EH=mun,qie=gun,E4e=fun,j4e=sun,S4e=hun,r4e=jcn,Pie=mcn,pH=pcn,$ie=ycn,mp=_cn,yx=Lcn,_ie=Urn,X5e=Krn,$un=J7,Run=uG,Pun=zm,Lun=F7,p4e=(V4(),Hm),new Yr(Ky,p4e),f4e=new yw(12),l4e=new Yr(s1,f4e),G5e=(z1(),q7),Y1=new Yr(j9e,G5e),Am=new Yr(Ps,0),Dun=new Yr(Sce,ke(1)),sH=new Yr(B7,q8),Mg=rG,Zi=Vx,O7=t5,xun=_I,Nh=kfn,Em=W3,_un=new Yr(xce,($n(),!0)),Sm=LI,xg=wce,Ag=Ig,kH=bb,Bie=$m,H5e=(vr(),nh),wl=new Yr(Ng,H5e),pp=e5,vH=O9e,Mm=Rm,Nun=Ece,d4e=H9e,h4e=(u3(),HI),new Yr(R9e,h4e),Cun=vce,Tun=yce,Oun=kce,Mun=mce,Hie=Kcn,wH=wcn,dI=gcn,jx=Xcn,ku=scn,By=Rrn,px=$rn,C7=jrn,z5e=Ern,Nie=Mrn,hI=Srn,Iie=Lrn,c4e=Ecn,u4e=Scn,Z5e=tcn,yH=Rcn,Rie=Mcn,Lie=Qrn,s4e=Icn,U5e=Grn,Die=qrn,Oie=DI,o4e=xcn,fH=rrn,P5e=irn,lH=trn,Y5e=ecn,V5e=Zrn,Q5e=ncn,T7=n5,Wc=Z3,Ud=xfn,Ih=gce,H3=bce,F5e=Trn,Xd=jce,dx=Sfn,gH=Mfn,vp=z9e,a4e=Ofn,xm=Nfn,n4e=fcn,t4e=hcn,Cm=Uy,Aie=nrn,i4e=bcn,bH=Frn,dH=zrn,mH=z7,e4e=ccn,vx=Tcn,wI=Y9e,J5e=Brn,b4e=Bcn,q5e=Jrn,jun=Nrn,Eun=Irn,Aun=ocn,Sun=Drn,W5e=pce,mx=lcn,hH=_rn,o1=krn,Cie=mrn,aI=urn,Mie=orn,aH=vrn,bx=crn,Tie=yrn,jm=prn,wx=wrn,kun=grn,Ry=srn,gx=brn,B5e=drn,$5e=lrn,R5e=arn,K5e=Wrn}function lBn(e,n,t,i,r,c,o){var l,f,h,b,p,y,S,A;return y=u(i.a,15).a,S=u(i.b,15).a,p=e.b,A=e.c,l=0,b=0,n==(vr(),Zc)||n==ru?(b=oT(LFe(C2(So(new mn(null,new vn(t.b,16)),new N_),new MM))),p.e.b+p.f.b/2>b?(h=++S,l=ne(re(Js(S2(So(new mn(null,new vn(t.b,16)),new mCe(r,h)),new uw))))):(f=++y,l=ne(re(Js(O4(So(new mn(null,new vn(t.b,16)),new vCe(r,f)),new Dk)))))):(b=oT(LFe(C2(So(new mn(null,new vn(t.b,16)),new E_),new L6))),p.e.a+p.f.a/2>b?(h=++S,l=ne(re(Js(S2(So(new mn(null,new vn(t.b,16)),new pCe(r,h)),new CM))))):(f=++y,l=ne(re(Js(O4(So(new mn(null,new vn(t.b,16)),new wCe(r,f)),new TM)))))),n==Zc?(gc(e.a,new Se(ne(re(C(p,(Ti(),Sa))))-r,l)),gc(e.a,new Se(A.e.a+A.f.a+r+c,l)),gc(e.a,new Se(A.e.a+A.f.a+r+c,A.e.b+A.f.b/2)),gc(e.a,new Se(A.e.a+A.f.a,A.e.b+A.f.b/2))):n==ru?(gc(e.a,new Se(ne(re(C(p,(Ti(),Vf))))+r,p.e.b+p.f.b/2)),gc(e.a,new Se(p.e.a+p.f.a+r,l)),gc(e.a,new Se(A.e.a-r-c,l)),gc(e.a,new Se(A.e.a-r-c,A.e.b+A.f.b/2)),gc(e.a,new Se(A.e.a,A.e.b+A.f.b/2))):n==Vl?(gc(e.a,new Se(l,ne(re(C(p,(Ti(),Sa))))-r)),gc(e.a,new Se(l,A.e.b+A.f.b+r+c)),gc(e.a,new Se(A.e.a+A.f.a/2,A.e.b+A.f.b+r+c)),gc(e.a,new Se(A.e.a+A.f.a/2,A.e.b+A.f.b+r))):(e.a.b==0||(u(If(e.a),8).b=ne(re(C(p,(Ti(),Vf))))+r*u(o.b,15).a),gc(e.a,new Se(l,ne(re(C(p,(Ti(),Vf))))+r*u(o.b,15).a)),gc(e.a,new Se(l,A.e.b-r*u(o.a,15).a-c))),new jc(ke(y),ke(S))}function fBn(e){var n,t,i,r,c,o,l,f,h,b,p,y,S;if(o=!0,p=null,i=null,r=null,n=!1,S=$an,h=null,c=null,l=0,f=IQ(e,l,U8e,X8e),f=0&&gn(e.substr(l,2),"//")?(l+=2,f=IQ(e,l,oA,sA),i=(Qr(l,f,e.length),e.substr(l,f-l)),l=f):p!=null&&(l==e.length||(Qn(l,e.length),e.charCodeAt(l)!=47))&&(o=!1,f=rle(e,Xo(35),l),f==-1&&(f=e.length),i=(Qr(l,f,e.length),e.substr(l,f-l)),l=f);if(!t&&l0&&rc(b,b.length-1)==58&&(r=b,l=f)),lo?(Ys(e,n,t),1):(Ys(e,t,n),-1)}for(q=e.f,V=0,te=q.length;V0?Ys(e,n,t):Ys(e,t,n),i;if(!wi(n,(me(),Oi))||!wi(t,Oi))return c=cW(e,n),l=cW(e,t),c>l?(Ys(e,n,t),1):(Ys(e,t,n),-1)}if(!y&&!A&&(i=tYe(e,n,t),i!=0))return i>0?Ys(e,n,t):Ys(e,t,n),i}return wi(n,(me(),Oi))&&wi(t,Oi)?(c=Kw(n,t,e.c,u(C(e.c,sb),15).a),l=Kw(t,n,e.c,u(C(e.c,sb),15).a),c>l?(Ys(e,n,t),1):(Ys(e,t,n),-1)):(Ys(e,t,n),-1)}function nYe(){nYe=Y,lZ(),Wt=new Nw,wn(Wt,(De(),ea),ih),wn(Wt,mf,ih),wn(Wt,ks,ih),wn(Wt,na,ih),wn(Wt,es,ih),wn(Wt,js,ih),wn(Wt,na,ea),wn(Wt,ih,Yl),wn(Wt,ea,Yl),wn(Wt,mf,Yl),wn(Wt,ks,Yl),wn(Wt,Zo,Yl),wn(Wt,na,Yl),wn(Wt,es,Yl),wn(Wt,js,Yl),wn(Wt,zo,Yl),wn(Wt,ih,ml),wn(Wt,ea,ml),wn(Wt,Yl,ml),wn(Wt,mf,ml),wn(Wt,ks,ml),wn(Wt,Zo,ml),wn(Wt,na,ml),wn(Wt,zo,ml),wn(Wt,vl,ml),wn(Wt,es,ml),wn(Wt,hs,ml),wn(Wt,js,ml),wn(Wt,ea,mf),wn(Wt,ks,mf),wn(Wt,na,mf),wn(Wt,js,mf),wn(Wt,ea,ks),wn(Wt,mf,ks),wn(Wt,na,ks),wn(Wt,ks,ks),wn(Wt,es,ks),wn(Wt,ih,Ql),wn(Wt,ea,Ql),wn(Wt,Yl,Ql),wn(Wt,ml,Ql),wn(Wt,mf,Ql),wn(Wt,ks,Ql),wn(Wt,Zo,Ql),wn(Wt,na,Ql),wn(Wt,vl,Ql),wn(Wt,zo,Ql),wn(Wt,js,Ql),wn(Wt,es,Ql),wn(Wt,mo,Ql),wn(Wt,ih,vl),wn(Wt,ea,vl),wn(Wt,Yl,vl),wn(Wt,mf,vl),wn(Wt,ks,vl),wn(Wt,Zo,vl),wn(Wt,na,vl),wn(Wt,zo,vl),wn(Wt,js,vl),wn(Wt,hs,vl),wn(Wt,mo,vl),wn(Wt,ea,zo),wn(Wt,mf,zo),wn(Wt,ks,zo),wn(Wt,na,zo),wn(Wt,vl,zo),wn(Wt,js,zo),wn(Wt,es,zo),wn(Wt,ih,Wo),wn(Wt,ea,Wo),wn(Wt,Yl,Wo),wn(Wt,mf,Wo),wn(Wt,ks,Wo),wn(Wt,Zo,Wo),wn(Wt,na,Wo),wn(Wt,zo,Wo),wn(Wt,js,Wo),wn(Wt,ea,es),wn(Wt,Yl,es),wn(Wt,ml,es),wn(Wt,ks,es),wn(Wt,ih,hs),wn(Wt,ea,hs),wn(Wt,ml,hs),wn(Wt,mf,hs),wn(Wt,ks,hs),wn(Wt,Zo,hs),wn(Wt,na,hs),wn(Wt,na,mo),wn(Wt,ks,mo),wn(Wt,zo,ih),wn(Wt,zo,mf),wn(Wt,zo,Yl),wn(Wt,Zo,ih),wn(Wt,Zo,ea),wn(Wt,Zo,ml)}function aBn(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe;switch(t.Tg("Brandes & Koepf node placement",1),e.a=n,e.c=G_n(n),i=u(C(n,(Ie(),Rie)),282),S=Fe(ze(C(n,vx))),e.d=i==(JO(),WJ)&&!S||i==lie,$Pn(e,n),be=null,fe=null,B=null,q=null,D=(sl(4,rm),new xo(4)),u(C(n,Rie),282).g){case 3:B=new b3(n,e.c.d,(Da(),Og),(dh(),Kd)),Gn(D.c,B);break;case 1:q=new b3(n,e.c.d,(Da(),Qa),(dh(),Kd)),Gn(D.c,q);break;case 4:be=new b3(n,e.c.d,(Da(),Og),(dh(),yp)),Gn(D.c,be);break;case 2:fe=new b3(n,e.c.d,(Da(),Qa),(dh(),yp)),Gn(D.c,fe);break;default:B=new b3(n,e.c.d,(Da(),Og),(dh(),Kd)),q=new b3(n,e.c.d,Qa,Kd),be=new b3(n,e.c.d,Og,yp),fe=new b3(n,e.c.d,Qa,yp),Gn(D.c,be),Gn(D.c,fe),Gn(D.c,B),Gn(D.c,q)}for(r=new fCe(n,e.c),l=new P(D);l.aAW(c))&&(p=c);for(!p&&(p=(kn(0,D.c.length),u(D.c[0],185))),O=new P(n.b);O.a0?(Ys(e,t,n),1):(Ys(e,n,t),-1);if(b&&V)return Ys(e,t,n),1;if(p&&q)return Ys(e,n,t),-1;if(p&&V)return 0}else for(cn=new P(h.j);cn.ap&&(In=0,lt+=b+_e,b=0),KXe(be,o,In,lt),n=k.Math.max(n,In+fe.a),b=k.Math.max(b,fe.b),In+=fe.a+_e;for(te=new wt,t=new wt,cn=new P(e);cn.a=-1900?1:0,t>=4?Kt(e,F(z(He,1),Me,2,6,[vYe,yYe])[l]):Kt(e,F(z(He,1),Me,2,6,["BC","AD"])[l]);break;case 121:WEn(e,t,i);break;case 77:XDn(e,t,i);break;case 107:f=r.q.getHours(),f==0?Vh(e,24,t):Vh(e,f,t);break;case 83:lNn(e,t,r);break;case 69:b=i.q.getDay(),t==5?Kt(e,F(z(He,1),Me,2,6,["S","M","T","W","T","F","S"])[b]):t==4?Kt(e,F(z(He,1),Me,2,6,[OZ,NZ,IZ,DZ,_Z,LZ,PZ])[b]):Kt(e,F(z(He,1),Me,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[b]);break;case 97:r.q.getHours()>=12&&r.q.getHours()<24?Kt(e,F(z(He,1),Me,2,6,["AM","PM"])[1]):Kt(e,F(z(He,1),Me,2,6,["AM","PM"])[0]);break;case 104:p=r.q.getHours()%12,p==0?Vh(e,12,t):Vh(e,p,t);break;case 75:y=r.q.getHours()%12,Vh(e,y,t);break;case 72:S=r.q.getHours(),Vh(e,S,t);break;case 99:A=i.q.getDay(),t==5?Kt(e,F(z(He,1),Me,2,6,["S","M","T","W","T","F","S"])[A]):t==4?Kt(e,F(z(He,1),Me,2,6,[OZ,NZ,IZ,DZ,_Z,LZ,PZ])[A]):t==3?Kt(e,F(z(He,1),Me,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[A]):Vh(e,A,1);break;case 76:O=i.q.getMonth(),t==5?Kt(e,F(z(He,1),Me,2,6,["J","F","M","A","M","J","J","A","S","O","N","D"])[O]):t==4?Kt(e,F(z(He,1),Me,2,6,[vZ,yZ,kZ,jZ,ay,EZ,SZ,xZ,AZ,MZ,CZ,TZ])[O]):t==3?Kt(e,F(z(He,1),Me,2,6,["Jan","Feb","Mar","Apr",ay,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])[O]):Vh(e,O+1,t);break;case 81:D=i.q.getMonth()/3|0,t<4?Kt(e,F(z(He,1),Me,2,6,["Q1","Q2","Q3","Q4"])[D]):Kt(e,F(z(He,1),Me,2,6,["1st quarter","2nd quarter","3rd quarter","4th quarter"])[D]);break;case 100:B=i.q.getDate(),Vh(e,B,t);break;case 109:h=r.q.getMinutes(),Vh(e,h,t);break;case 115:o=r.q.getSeconds(),Vh(e,o,t);break;case 122:t<4?Kt(e,c.c[0]):Kt(e,c.c[1]);break;case 118:Kt(e,c.b);break;case 90:t<3?Kt(e,hTn(c)):t==3?Kt(e,wTn(c)):Kt(e,pTn(c.a));break;default:return!1}return!0}function Ige(e,n,t,i){var r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,_e,on,cn,Tn,In,lt,Qt;if(PXe(n),f=u(K((!n.b&&(n.b=new Nn(mt,n,4,7)),n.b),0),84),b=u(K((!n.c&&(n.c=new Nn(mt,n,5,8)),n.c),0),84),l=iu(f),h=iu(b),o=(!n.a&&(n.a=new we($i,n,6,6)),n.a).i==0?null:u(K((!n.a&&(n.a=new we($i,n,6,6)),n.a),0),170),_e=u(zn(e.a,l),9),In=u(zn(e.a,h),9),on=null,lt=null,X(f,193)&&(fe=u(zn(e.a,f),246),X(fe,12)?on=u(fe,12):X(fe,9)&&(_e=u(fe,9),on=u(Pe(_e.j,0),12))),X(b,193)&&(Tn=u(zn(e.a,b),246),X(Tn,12)?lt=u(Tn,12):X(Tn,9)&&(In=u(Tn,9),lt=u(Pe(In.j,0),12))),!_e||!In)throw R(new a4("The source or the target of edge "+n+" could not be found. This usually happens when an edge connects a node laid out by ELK Layered to a node in another level of hierarchy laid out by either another instance of ELK Layered or another layout algorithm alltogether. The former can be solved by setting the hierarchyHandling option to INCLUDE_CHILDREN."));for(O=new Ow,Pu(O,n),he(O,(me(),mi),n),he(O,(Ie(),Wc),null),S=u(C(i,po),22),_e==In&&S.Ec((Ic(),ox)),on||(be=(Nc(),Io),cn=null,o&&$v(u(C(_e,Zi),102))&&(cn=new Se(o.j,o.k),aPe(cn,T2(n)),RPe(cn,t),P2(h,l)&&(be=ys,pi(cn,_e.n))),on=BKe(_e,cn,be,i)),lt||(be=(Nc(),ys),Qt=null,o&&$v(u(C(In,Zi),102))&&(Qt=new Se(o.b,o.c),aPe(Qt,T2(n)),RPe(Qt,t)),lt=BKe(In,Qt,be,_r(In))),fc(O,on),Gr(O,lt),(on.e.c.length>1||on.g.c.length>1||lt.e.c.length>1||lt.g.c.length>1)&&S.Ec((Ic(),ux)),y=new st((!n.n&&(n.n=new we(Eu,n,1,7)),n.n));y.e!=y.i.gc();)if(p=u(ft(y),157),!Fe(ze(je(p,Mg)))&&p.a)switch(D=aQ(p),Te(O.b,D),u(C(D,Ih),279).g){case 1:case 2:S.Ec((Ic(),x7));break;case 0:S.Ec((Ic(),S7)),he(D,Ih,(Ra(),H7))}if(c=u(C(i,px),301),B=u(C(i,yH),328),r=c==(zE(),tI)||B==(GE(),Zie),o&&(!o.a&&(o.a=new mr(yl,o,5)),o.a).i!=0&&r){for(q=hCn(o),A=new xs,te=St(q,0);te.b!=te.d.c;)V=u(jt(te),8),Vt(A,new wc(V));he(O,K3e,A)}return O}function gBn(e,n,t,i){var r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,_e,on,cn,Tn,In,lt,Qt,Ui;for(cn=0,Tn=0,_e=new wt,be=u(Js(S2(So(new mn(null,new vn(e.b,16)),new j_),new Ik)),15).a+1,on=se($t,ni,30,be,15,1),D=se($t,ni,30,be,15,1),O=0;O1)for(l=lt+1;lh.b.e.b*(1-B)+h.c.e.b*B));A++);if(fe.gc()>0&&(Qt=h.a.b==0?pc(h.b.e):u(If(h.a),8),V=pi(pc(u(fe.Xb(fe.gc()-1),40).e),u(fe.Xb(fe.gc()-1),40).f),y=pi(pc(u(fe.Xb(0),40).e),u(fe.Xb(0),40).f),A>=fe.gc()-1&&Qt.b>V.b&&h.c.e.b>V.b||A<=0&&Qt.bh.b.e.a*(1-B)+h.c.e.a*B));A++);if(fe.gc()>0&&(Qt=h.a.b==0?pc(h.b.e):u(If(h.a),8),V=pi(pc(u(fe.Xb(fe.gc()-1),40).e),u(fe.Xb(fe.gc()-1),40).f),y=pi(pc(u(fe.Xb(0),40).e),u(fe.Xb(0),40).f),A>=fe.gc()-1&&Qt.a>V.a&&h.c.e.a>V.a||A<=0&&Qt.a=ne(re(C(e,(Ti(),vye))))&&++Tn):(S.f&&S.d.e.a<=ne(re(C(e,(Ti(),pre))))&&++cn,S.g&&S.c.e.a+S.c.f.a>=ne(re(C(e,(Ti(),mye))))&&++Tn)}else te==0?K0e(h):te<0&&(++on[lt],++D[Ui],In=lBn(h,n,e,new jc(ke(cn),ke(Tn)),t,i,new jc(ke(D[Ui]),ke(on[lt]))),cn=u(In.a,15).a,Tn=u(In.b,15).a)}function wBn(e){e.gb||(e.gb=!0,e.b=Au(e,0),Yi(e.b,18),_i(e.b,19),e.a=Au(e,1),Yi(e.a,1),_i(e.a,2),_i(e.a,3),_i(e.a,4),_i(e.a,5),e.o=Au(e,2),Yi(e.o,8),Yi(e.o,9),_i(e.o,10),_i(e.o,11),_i(e.o,12),_i(e.o,13),_i(e.o,14),_i(e.o,15),_i(e.o,16),_i(e.o,17),_i(e.o,18),_i(e.o,19),_i(e.o,20),_i(e.o,21),_i(e.o,22),_i(e.o,23),Yc(e.o),Yc(e.o),Yc(e.o),Yc(e.o),Yc(e.o),Yc(e.o),Yc(e.o),Yc(e.o),Yc(e.o),Yc(e.o),e.p=Au(e,3),Yi(e.p,2),Yi(e.p,3),Yi(e.p,4),Yi(e.p,5),_i(e.p,6),_i(e.p,7),Yc(e.p),Yc(e.p),e.q=Au(e,4),Yi(e.q,8),e.v=Au(e,5),_i(e.v,9),Yc(e.v),Yc(e.v),Yc(e.v),e.w=Au(e,6),Yi(e.w,2),Yi(e.w,3),Yi(e.w,4),_i(e.w,5),e.B=Au(e,7),_i(e.B,1),Yc(e.B),Yc(e.B),Yc(e.B),e.Q=Au(e,8),_i(e.Q,0),Yc(e.Q),e.R=Au(e,9),Yi(e.R,1),e.S=Au(e,10),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),e.T=Au(e,11),_i(e.T,10),_i(e.T,11),_i(e.T,12),_i(e.T,13),_i(e.T,14),Yc(e.T),Yc(e.T),e.U=Au(e,12),Yi(e.U,2),Yi(e.U,3),_i(e.U,4),_i(e.U,5),_i(e.U,6),_i(e.U,7),Yc(e.U),e.V=Au(e,13),_i(e.V,10),e.W=Au(e,14),Yi(e.W,18),Yi(e.W,19),Yi(e.W,20),_i(e.W,21),_i(e.W,22),_i(e.W,23),e.bb=Au(e,15),Yi(e.bb,10),Yi(e.bb,11),Yi(e.bb,12),Yi(e.bb,13),Yi(e.bb,14),Yi(e.bb,15),Yi(e.bb,16),_i(e.bb,17),Yc(e.bb),Yc(e.bb),e.eb=Au(e,16),Yi(e.eb,2),Yi(e.eb,3),Yi(e.eb,4),Yi(e.eb,5),Yi(e.eb,6),Yi(e.eb,7),_i(e.eb,8),_i(e.eb,9),e.ab=Au(e,17),Yi(e.ab,0),Yi(e.ab,1),e.H=Au(e,18),_i(e.H,0),_i(e.H,1),_i(e.H,2),_i(e.H,3),_i(e.H,4),_i(e.H,5),Yc(e.H),e.db=Au(e,19),_i(e.db,2),e.c=ci(e,20),e.d=ci(e,21),e.e=ci(e,22),e.f=ci(e,23),e.i=ci(e,24),e.g=ci(e,25),e.j=ci(e,26),e.k=ci(e,27),e.n=ci(e,28),e.r=ci(e,29),e.s=ci(e,30),e.t=ci(e,31),e.u=ci(e,32),e.fb=ci(e,33),e.A=ci(e,34),e.C=ci(e,35),e.D=ci(e,36),e.F=ci(e,37),e.G=ci(e,38),e.I=ci(e,39),e.J=ci(e,40),e.L=ci(e,41),e.M=ci(e,42),e.N=ci(e,43),e.O=ci(e,44),e.P=ci(e,45),e.X=ci(e,46),e.Y=ci(e,47),e.Z=ci(e,48),e.$=ci(e,49),e._=ci(e,50),e.cb=ci(e,51),e.K=ci(e,52))}function pBn(e,n,t,i){var r,c,o,l,f,h,b,p,y,S,A;for(p=St(e.b,0);p.b!=p.d.c;)if(b=u(jt(p),40),!gn(b.c,_F))for(c=u(gs(new mn(null,new vn(OTn(b,e),16)),Cs(new zi,new bi,new Cc,F(z(Qo,1),Ee,130,0,[(zl(),Yo)]))),16),n==(vr(),Zc)||n==ru?c.gd(new C_):c.gd(new T_),A=c.gc(),r=0;r0&&(l=u(If(u(c.Xb(r),65).a),8).a,y=b.e.a+b.f.a/2,f=u(If(u(c.Xb(r),65).a),8).b,S=b.e.b+b.f.b/2,i>0&&k.Math.abs(f-S)/(k.Math.abs(l-y)/40)>50&&(S>f?gc(u(c.Xb(r),65).a,new Se(b.e.a+b.f.a+i/5.3,b.e.b+b.f.b*o-i/2)):gc(u(c.Xb(r),65).a,new Se(b.e.a+b.f.a+i/5.3,b.e.b+b.f.b*o+i/2)))),gc(u(c.Xb(r),65).a,new Se(b.e.a+b.f.a,b.e.b+b.f.b*o))):n==ru?(h=ne(re(C(b,(Ti(),Sa)))),b.e.a-i>h?gc(u(c.Xb(r),65).a,new Se(h-t,b.e.b+b.f.b*o)):u(c.Xb(r),65).a.b>0&&(l=u(If(u(c.Xb(r),65).a),8).a,y=b.e.a+b.f.a/2,f=u(If(u(c.Xb(r),65).a),8).b,S=b.e.b+b.f.b/2,i>0&&k.Math.abs(f-S)/(k.Math.abs(l-y)/40)>50&&(S>f?gc(u(c.Xb(r),65).a,new Se(b.e.a-i/5.3,b.e.b+b.f.b*o-i/2)):gc(u(c.Xb(r),65).a,new Se(b.e.a-i/5.3,b.e.b+b.f.b*o+i/2)))),gc(u(c.Xb(r),65).a,new Se(b.e.a,b.e.b+b.f.b*o))):n==Vl?(h=ne(re(C(b,(Ti(),Vf)))),b.e.b+b.f.b+i0&&(l=u(If(u(c.Xb(r),65).a),8).a,y=b.e.a+b.f.a/2,f=u(If(u(c.Xb(r),65).a),8).b,S=b.e.b+b.f.b/2,i>0&&k.Math.abs(l-y)/(k.Math.abs(f-S)/40)>50&&(y>l?gc(u(c.Xb(r),65).a,new Se(b.e.a+b.f.a*o-i/2,b.e.b+i/5.3+b.f.b)):gc(u(c.Xb(r),65).a,new Se(b.e.a+b.f.a*o+i/2,b.e.b+i/5.3+b.f.b)))),gc(u(c.Xb(r),65).a,new Se(b.e.a+b.f.a*o,b.e.b+b.f.b))):(h=ne(re(C(b,(Ti(),Sa)))),zze(u(c.Xb(r),65),e)?gc(u(c.Xb(r),65).a,new Se(b.e.a+b.f.a*o,u(If(u(c.Xb(r),65).a),8).b)):b.e.b-i>h?gc(u(c.Xb(r),65).a,new Se(b.e.a+b.f.a*o,h-t)):u(c.Xb(r),65).a.b>0&&(l=u(If(u(c.Xb(r),65).a),8).a,y=b.e.a+b.f.a/2,f=u(If(u(c.Xb(r),65).a),8).b,S=b.e.b+b.f.b/2,i>0&&k.Math.abs(l-y)/(k.Math.abs(f-S)/40)>50&&(y>l?gc(u(c.Xb(r),65).a,new Se(b.e.a+b.f.a*o-i/2,b.e.b-i/5.3)):gc(u(c.Xb(r),65).a,new Se(b.e.a+b.f.a*o+i/2,b.e.b-i/5.3)))),gc(u(c.Xb(r),65).a,new Se(b.e.a+b.f.a*o,b.e.b)))}function rYe(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe;if(o=n,y=t,so(e.a,o)){if(rf(u(zn(e.a,o),47),y))return 1}else ei(e.a,o,new ar);if(so(e.a,y)){if(rf(u(zn(e.a,y),47),o))return-1}else ei(e.a,y,new ar);if(so(e.e,o)){if(rf(u(zn(e.e,o),47),y))return-1}else ei(e.e,o,new ar);if(so(e.e,y)){if(rf(u(zn(e.a,y),47),o))return 1}else ei(e.e,y,new ar);if(o.j!=y.j)return be=uwn(o.j,y.j),be>0?Hl(e,o,y,1):Hl(e,y,o,1),be;if(fe=1,o.e.c.length!=0&&y.e.c.length!=0){if((o.j==(De(),Vn)&&y.j==Vn||o.j==Kn&&y.j==Kn||o.j==bt&&y.j==bt)&&(fe=-fe),b=u(Pe(o.e,0),17).c,D=u(Pe(y.e,0),17).c,f=b.i,A=D.i,f==A)for(V=new P(f.j);V.a0?(Hl(e,o,y,fe),fe):(Hl(e,y,o,fe),-fe);if(i=jFe(u(gs(vV(e.d),Cs(new zi,new bi,new Cc,F(z(Qo,1),Ee,130,0,[(zl(),Yo)]))),20),f,A),i!=0)return i>0?(Hl(e,o,y,fe),fe):(Hl(e,y,o,fe),-fe);if(e.c&&(be=WJe(e,o,y),be!=0))return be>0?(Hl(e,o,y,fe),fe):(Hl(e,y,o,fe),-fe)}return o.g.c.length!=0&&y.g.c.length!=0?((o.j==(De(),Vn)&&y.j==Vn||o.j==bt&&y.j==bt)&&(fe=-fe),p=u(C(o,(me(),vie)),9),B=u(C(y,vie),9),e.f==(F1(),tre)&&p&&B&&wi(p,Oi)&&wi(B,Oi)?(l=Kw(p,B,e.b,u(C(e.b,sb),15).a),S=Kw(B,p,e.b,u(C(e.b,sb),15).a),l>S?(Hl(e,o,y,fe),fe):(Hl(e,y,o,fe),-fe)):e.c&&(be=WJe(e,o,y),be!=0)?be>0?(Hl(e,o,y,fe),fe):(Hl(e,y,o,fe),-fe):(h=0,O=0,wi(u(Pe(o.g,0),17),Oi)&&(h=Kw(u(Pe(o.g,0),246),u(Pe(y.g,0),246),e.b,o.g.c.length+o.e.c.length)),wi(u(Pe(y.g,0),17),Oi)&&(O=Kw(u(Pe(y.g,0),246),u(Pe(o.g,0),246),e.b,y.g.c.length+y.e.c.length)),p&&p==B||e.g&&(e.g._b(p)&&(h=u(e.g.xc(p),15).a),e.g._b(B)&&(O=u(e.g.xc(B),15).a)),h>O?(Hl(e,o,y,fe),fe):(Hl(e,y,o,fe),-fe))):o.e.c.length!=0&&y.g.c.length!=0?(Hl(e,o,y,fe),1):o.g.c.length!=0&&y.e.c.length!=0?(Hl(e,y,o,fe),-1):wi(o,(me(),Oi))&&wi(y,Oi)?(c=o.i.j.c.length,l=Kw(o,y,e.b,c),S=Kw(y,o,e.b,c),(o.j==(De(),Vn)&&y.j==Vn||o.j==bt&&y.j==bt)&&(fe=-fe),l>S?(Hl(e,o,y,fe),fe):(Hl(e,y,o,fe),-fe)):(Hl(e,y,o,fe),-fe)}function me(){me=Y;var e,n;mi=new ki(owe),G3e=new ki("coordinateOrigin"),kie=new ki("processors"),H3e=new Pi("compoundNode",($n(),!1)),sI=new Pi("insideConnections",!1),K3e=new ki("originalBendpoints"),V3e=new ki("originalDummyNodePosition"),Y3e=new ki("originalLabelEdge"),lx=new ki("representedLabels"),sx=new ki("endLabels"),Iy=new ki("endLabel.origin"),_y=new Pi("labelSide",(fl(),JI)),R3=new Pi("maxEdgeThickness",0),qd=new Pi("reversed",!1),Ly=new ki(iQe),Ea=new Pi("longEdgeSource",null),gf=new Pi("longEdgeTarget",null),km=new Pi("longEdgeHasLabelDummies",!1),lI=new Pi("longEdgeBeforeLabelDummy",!1),rH=new Pi("edgeConstraint",(tg(),iie)),bp=new ki("inLayerLayoutUnit"),jg=new Pi("inLayerConstraint",(_1(),uI)),Dy=new Pi("inLayerSuccessorConstraint",new Oe),X3e=new Pi("inLayerSuccessorConstraintBetweenNonDummies",!1),vs=new ki("portDummy"),iH=new Pi("crossingHint",ke(0)),po=new Pi("graphProperties",(n=u(la(fie),10),new _l(n,u(Df(n,n.length),10),0))),Iu=new Pi("externalPortSide",(De(),ju)),U3e=new Pi("externalPortSize",new Vr),wie=new ki("externalPortReplacedDummies"),cH=new ki("externalPortReplacedDummy"),K1=new Pi("externalPortConnections",(e=u(la(xc),10),new _l(e,u(Df(e,e.length),10),0))),gp=new Pi(WYe,0),J3e=new ki("barycenterAssociates"),$y=new ki("TopSideComments"),Oy=new ki("BottomSideComments"),tH=new ki("CommentConnectionPort"),mie=new Pi("inputCollect",!1),yie=new Pi("outputCollect",!1),Ny=new Pi("cyclic",!1),q3e=new ki("crossHierarchyMap"),Eie=new ki("targetOffset"),new Pi("splineLabelSize",new Vr),z3=new ki("spacings"),uH=new Pi("partitionConstraint",!1),dp=new ki("breakingPoint.info"),Z3e=new ki("splines.survivingEdge"),Eg=new ki("splines.route.start"),F3=new ki("splines.edgeChain"),W3e=new ki("originalPortConstraints"),wp=new ki("selfLoopHolder"),M7=new ki("splines.nsPortY"),Oi=new ki("modelOrder"),sb=new ki("modelOrder.maximum"),oI=new ki("modelOrderGroups.cb.number"),vie=new ki("longEdgeTargetNode"),ob=new Pi(TQe,!1),B3=new Pi(TQe,!1),pie=new ki("layerConstraints.hiddenNodes"),Q3e=new ki("layerConstraints.opposidePort"),jie=new ki("targetNode.modelOrder"),Py=new Pi("tarjan.lowlink",ke(oi)),fx=new Pi("tarjan.id",ke(-1)),oH=new Pi("tarjan.onstack",!1),Win=new Pi("partOfCycle",!1),J3=new ki("medianHeuristic.weight")}function Xt(){Xt=Y;var e,n;qy=new ki(mWe),Bm=new ki(vWe),p9e=(Yh(),lce),kfn=new fn(ppe,p9e),B7=new fn(U8,null),jfn=new ki(N2e),v9e=(sg(),Ci(hce,F(z(dce,1),Ee,299,0,[ace]))),DI=new fn(OF,v9e),_I=new fn(PN,($n(),!1)),y9e=(vr(),nh),Ng=new fn(Jee,y9e),E9e=(z1(),Ace),j9e=new fn(LN,E9e),Afn=new fn(T2e,!1),x9e=(B1(),lG),W3=new fn(TF,x9e),P9e=new yw(12),s1=new fn(sm,P9e),PI=new fn(ES,!1),pce=new fn(IF,!1),$I=new fn(SS,!1),F9e=(Br(),pb),Vx=new fn(ZZ,F9e),Uy=new ki(NF),RI=new ki(xN),Sce=new ki(fF),xce=new ki(jS),C9e=new xs,Z3=new fn(Cpe,C9e),Sfn=new fn(Ipe,!1),Mfn=new fn(Dpe,!1),new fn(yWe,0),T9e=new pj,z7=new fn(Lpe,T9e),rG=new fn(gpe,!1),Dfn=new fn(kWe,1),Pm=new ki(jWe),Lm=new ki(EWe),J7=new fn(AN,!1),new fn(SWe,!0),ke(0),new fn(xWe,ke(100)),new fn(AWe,!1),ke(0),new fn(MWe,ke(4e3)),ke(0),new fn(CWe,ke(400)),new fn(TWe,!1),new fn(OWe,!1),new fn(NWe,!0),new fn(IWe,!1),m9e=(YB(),Ice),Efn=new fn(O2e,m9e),M9e=(EE(),qI),Tfn=new fn(DWe,M9e),A9e=(s8(),BI),Cfn=new fn(_We,A9e),_fn=new fn(ipe,10),Lfn=new fn(rpe,10),Pfn=new fn(cpe,20),$fn=new fn(upe,10),q9e=new fn(WZ,2),U9e=new fn(Fee,10),X9e=new fn(ope,0),cG=new fn(fpe,5),K9e=new fn(spe,1),V9e=new fn(lpe,1),Qd=new fn(om,20),Rfn=new fn(ape,10),W9e=new fn(hpe,10),Xy=new ki(dpe),Q9e=new mTe,Y9e=new fn(Ppe,Q9e),Nfn=new ki(Gee),$9e=!1,Ofn=new fn(Hee,$9e),N9e=new yw(5),O9e=new fn(ype,N9e),I9e=(Q2(),n=u(la($c),10),new _l(n,u(Df(n,n.length),10),0)),e5=new fn(K8,I9e),B9e=(u3(),wb),R9e=new fn(Epe,B9e),vce=new ki(Spe),yce=new ki(xpe),kce=new ki(Ape),mce=new ki(Mpe),D9e=(e=u(la(iA),10),new _l(e,u(Df(e,e.length),10),0)),Ig=new fn(k3,D9e),L9e=rn((_s(),X7)),bb=new fn(py,L9e),_9e=new Se(0,0),n5=new fn(my,_9e),$m=new fn(X8,!1),k9e=(Ra(),H7),gce=new fn(Ope,k9e),bce=new fn(aF,!1),ke(1),new fn(LWe,null),z9e=new ki(_pe),jce=new ki(Npe),G9e=(De(),ju),t5=new fn(wpe,G9e),Ps=new ki(bpe),J9e=(ps(),rn(mb)),Rm=new fn(V8,J9e),Ece=new fn(kpe,!1),H9e=new fn(jpe,!0),ke(1),Hfn=new fn(dne,ke(3)),ke(1),qfn=new fn(I2e,ke(4)),uG=new fn(MN,1),oG=new fn(bne,null),zm=new fn(CN,150),F7=new fn(TN,1.414),Ky=new fn(np,null),Bfn=new fn(D2e,1),LI=new fn(mpe,!1),wce=new fn(vpe,!1),xfn=new fn(Tpe,1),S9e=(Sz(),Cce),new fn(PWe,S9e),Ifn=!0,Gfn=(KR(),Nce),Ffn=(V4(),Hm),Jfn=Hm,zfn=Hm}function Ur(){Ur=Y,Bve=new br("DIRECTION_PREPROCESSOR",0),Pve=new br("COMMENT_PREPROCESSOR",1),N3=new br("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER",2),_te=new br("INTERACTIVE_EXTERNAL_PORT_POSITIONER",3),r3e=new br("PARTITION_PREPROCESSOR",4),OJ=new br("LABEL_DUMMY_INSERTER",5),zJ=new br("SELF_LOOP_PREPROCESSOR",6),pm=new br("LAYER_CONSTRAINT_PREPROCESSOR",7),t3e=new br("PARTITION_MIDPROCESSOR",8),Xve=new br("HIGH_DEGREE_NODE_LAYER_PROCESSOR",9),e3e=new br("NODE_PROMOTION",10),wm=new br("LAYER_CONSTRAINT_POSTPROCESSOR",11),i3e=new br("PARTITION_POSTPROCESSOR",12),Gve=new br("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR",13),c3e=new br("SEMI_INTERACTIVE_CROSSMIN_PROCESSOR",14),Ove=new br("BREAKING_POINT_INSERTER",15),_J=new br("LONG_EDGE_SPLITTER",16),Lte=new br("PORT_SIDE_PROCESSOR",17),CJ=new br("INVERTED_PORT_PROCESSOR",18),$J=new br("PORT_LIST_SORTER",19),o3e=new br("SORT_BY_INPUT_ORDER_OF_MODEL",20),PJ=new br("NORTH_SOUTH_PORT_PREPROCESSOR",21),Nve=new br("BREAKING_POINT_PROCESSOR",22),n3e=new br(kQe,23),s3e=new br(jQe,24),RJ=new br("SELF_LOOP_PORT_RESTORER",25),Tve=new br("ALTERNATING_LAYER_UNZIPPER",26),u3e=new br("SINGLE_EDGE_GRAPH_WRAPPER",27),TJ=new br("IN_LAYER_CONSTRAINT_PROCESSOR",28),Fve=new br("END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR",29),Wve=new br("LABEL_AND_NODE_SIZE_PROCESSOR",30),Qve=new br("INNERMOST_NODE_MARGIN_CALCULATOR",31),FJ=new br("SELF_LOOP_ROUTER",32),_ve=new br("COMMENT_NODE_MARGIN_CALCULATOR",33),MJ=new br("END_LABEL_PREPROCESSOR",34),IJ=new br("LABEL_DUMMY_SWITCHER",35),Dve=new br("CENTER_LABEL_MANAGEMENT_PROCESSOR",36),p7=new br("LABEL_SIDE_SELECTOR",37),Vve=new br("HYPEREDGE_DUMMY_MERGER",38),qve=new br("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR",39),Zve=new br("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR",40),tx=new br("HIERARCHICAL_PORT_POSITION_PROCESSOR",41),$ve=new br("CONSTRAINTS_POSTPROCESSOR",42),Lve=new br("COMMENT_POSTPROCESSOR",43),Yve=new br("HYPERNODE_PROCESSOR",44),Uve=new br("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER",45),DJ=new br("LONG_EDGE_JOINER",46),BJ=new br("SELF_LOOP_POSTPROCESSOR",47),Ive=new br("BREAKING_POINT_REMOVER",48),LJ=new br("NORTH_SOUTH_PORT_POSTPROCESSOR",49),Kve=new br("HORIZONTAL_COMPACTOR",50),NJ=new br("LABEL_DUMMY_REMOVER",51),Jve=new br("FINAL_SPLINE_BENDPOINTS_CALCULATOR",52),zve=new br("END_LABEL_SORTER",53),Cy=new br("REVERSED_EDGE_RESTORER",54),AJ=new br("END_LABEL_POSTPROCESSOR",55),Hve=new br("HIERARCHICAL_NODE_RESIZER",56),Rve=new br("DIRECTION_POSTPROCESSOR",57)}function mBn(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,_e,on,cn,Tn,In,lt,Qt,Ui,Es,eu,kl,s5,c0,ta,nd,Zl,n6,wA,td,Ca,u0,$g,Rg,t6,Bg,zg,id,Qm,M7e,Mp,pA,Vce,i6,mA,Wm,vA,Yce,_hn;for(M7e=0,Qt=n,eu=0,c0=Qt.length;eu0&&(e.a[Ca.p]=M7e++)}for(mA=0,Ui=t,kl=0,ta=Ui.length;kl0;){for(Ca=(at(t6.b>0),u(t6.a.Xb(t6.c=--t6.b),12)),Rg=0,l=new P(Ca.e);l.a0&&(Ca.j==(De(),Kn)?(e.a[Ca.p]=mA,++mA):(e.a[Ca.p]=mA+nd+n6,++n6))}mA+=n6}for($g=new wt,A=new Fh,lt=n,Es=0,s5=lt.length;Esh.b&&(h.b=Bg)):Ca.i.c==Qm&&(Bgh.c&&(h.c=Bg));for(G9(O,0,O.length,null),i6=se($t,ni,30,O.length,15,1),i=se($t,ni,30,mA+1,15,1),B=0;B0;)_e%2>0&&(r+=Yce[_e+1]),_e=(_e-1)/2|0,++Yce[_e];for(cn=se(jon,On,370,O.length*2,0,1),te=0;te0&>(Es.f),je(B,oG)!=null&&(!B.a&&(B.a=new we(Ft,B,10,11)),!!B.a)&&(!B.a&&(B.a=new we(Ft,B,10,11)),B.a).i>0?(l=u(je(B,oG),521),Rg=l.Sg(B),vw(B,k.Math.max(B.g,Rg.a+nd.b+nd.c),k.Math.max(B.f,Rg.b+nd.d+nd.a))):(!B.a&&(B.a=new we(Ft,B,10,11)),B.a).i!=0&&(Rg=new Se(ne(re(je(B,zm))),ne(re(je(B,zm)))/ne(re(je(B,F7)))),vw(B,k.Math.max(B.g,Rg.a+nd.b+nd.c),k.Math.max(B.f,Rg.b+nd.d+nd.a)));if(ta=u(je(n,s1),104),S=n.g-(ta.b+ta.c),y=n.f-(ta.d+ta.a),zg.ah("Available Child Area: ("+S+"|"+y+")"),Ei(n,B7,S/y),DJe(n,r,i.dh(s5)),u(je(n,Ky),281)==gG&&(sZ(n),vw(n,ta.b+ne(re(je(n,Pm)))+ta.c,ta.d+ne(re(je(n,Lm)))+ta.a)),zg.ah("Executed layout algorithm: "+Pt(je(n,qy))+" on node "+n.k),u(je(n,Ky),281)==Hm){if(S<0||y<0)throw R(new md("The size defined by the parent parallel node is too small for the space provided by the paddings of the child hierarchical node. "+n.k));for(ba(n,Pm)||ba(n,Lm)||sZ(n),O=ne(re(je(n,Pm))),A=ne(re(je(n,Lm))),zg.ah("Desired Child Area: ("+O+"|"+A+")"),n6=S/O,wA=y/A,Zl=k.Math.min(n6,k.Math.min(wA,ne(re(je(n,Bfn))))),Ei(n,uG,Zl),zg.ah(n.k+" -- Local Scale Factor (X|Y): ("+n6+"|"+wA+")"),te=u(je(n,DI),22),c=0,o=0,Zl'?":gn(gZe,e)?"'(?<' or '(? toIndex: ",Yge=", toIndex: ",Qge="Index: ",Wge=", Size: ",J8="org.eclipse.elk.alg.common",Yt={51:1},_Ye="org.eclipse.elk.alg.common.compaction",LYe="Scanline/EventHandler",t1="org.eclipse.elk.alg.common.compaction.oned",PYe="CNode belongs to another CGroup.",$Ye="ISpacingsHandler/1",UZ="The ",XZ=" instance has been finished already.",RYe="The direction ",BYe=" is not supported by the CGraph instance.",zYe="OneDimensionalCompactor",FYe="OneDimensionalCompactor/lambda$0$Type",JYe="Quadruplet",HYe="ScanlineConstraintCalculator",GYe="ScanlineConstraintCalculator/ConstraintsScanlineHandler",qYe="ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type",UYe="ScanlineConstraintCalculator/Timestamp",XYe="ScanlineConstraintCalculator/lambda$0$Type",Sh={178:1,48:1},vS="org.eclipse.elk.alg.common.networksimplex",ma={171:1,3:1,4:1},KYe="org.eclipse.elk.alg.common.nodespacing",dg="org.eclipse.elk.alg.common.nodespacing.cellsystem",H8="CENTER",VYe={216:1,337:1},Zge={3:1,4:1,5:1,592:1},by="LEFT",gy="RIGHT",ewe="Vertical alignment cannot be null",nwe="BOTTOM",sF="org.eclipse.elk.alg.common.nodespacing.internal",yS="UNDEFINED",qa=.01,jN="org.eclipse.elk.alg.common.nodespacing.internal.algorithm",YYe="LabelPlacer/lambda$0$Type",QYe="LabelPlacer/lambda$1$Type",WYe="portRatioOrPosition",G8="org.eclipse.elk.alg.common.overlaps",KZ="DOWN",wy="org.eclipse.elk.alg.common.spore",um={3:1,4:1,5:1,198:1},ZYe={3:1,6:1,4:1,5:1,90:1,110:1},VZ="org.eclipse.elk.alg.force",twe="ComponentsProcessor",eQe="ComponentsProcessor/1",iwe="ElkGraphImporter/lambda$0$Type",ep={214:1},y3="org.eclipse.elk.core",EN="org.eclipse.elk.graph.properties",nQe="IPropertyHolder",SN="org.eclipse.elk.alg.force.graph",tQe="Component Layout",rwe="org.eclipse.elk.alg.force.model",yu="org.eclipse.elk.core.data",lF="org.eclipse.elk.force.model",cwe="org.eclipse.elk.force.iterations",uwe="org.eclipse.elk.force.repulsivePower",YZ="org.eclipse.elk.force.temperature",xh=.001,QZ="org.eclipse.elk.force.repulsion",Ua={148:1},kS="org.eclipse.elk.alg.force.options",q8=1.600000023841858,$o="org.eclipse.elk.force",xN="org.eclipse.elk.priority",om="org.eclipse.elk.spacing.nodeNode",WZ="org.eclipse.elk.spacing.edgeLabel",U8="org.eclipse.elk.aspectRatio",fF="org.eclipse.elk.randomSeed",jS="org.eclipse.elk.separateConnectedComponents",sm="org.eclipse.elk.padding",ES="org.eclipse.elk.interactive",ZZ="org.eclipse.elk.portConstraints",aF="org.eclipse.elk.edgeLabels.inline",SS="org.eclipse.elk.omitNodeMicroLayout",X8="org.eclipse.elk.nodeSize.fixedGraphSize",py="org.eclipse.elk.nodeSize.options",k3="org.eclipse.elk.nodeSize.constraints",K8="org.eclipse.elk.nodeLabels.placement",V8="org.eclipse.elk.portLabels.placement",AN="org.eclipse.elk.topdownLayout",MN="org.eclipse.elk.topdown.scaleFactor",CN="org.eclipse.elk.topdown.hierarchicalNodeWidth",TN="org.eclipse.elk.topdown.hierarchicalNodeAspectRatio",np="org.eclipse.elk.topdown.nodeType",owe="origin",iQe="random",rQe="boundingBox.upLeft",cQe="boundingBox.lowRight",swe="org.eclipse.elk.stress.fixed",lwe="org.eclipse.elk.stress.desiredEdgeLength",fwe="org.eclipse.elk.stress.dimension",awe="org.eclipse.elk.stress.epsilon",hwe="org.eclipse.elk.stress.iterationLimit",W0="org.eclipse.elk.stress",uQe="ELK Stress",my="org.eclipse.elk.nodeSize.minimum",hF="org.eclipse.elk.alg.force.stress",oQe="Layered layout",vy="org.eclipse.elk.alg.layered",ON="org.eclipse.elk.alg.layered.compaction.components",xS="org.eclipse.elk.alg.layered.compaction.oned",dF="org.eclipse.elk.alg.layered.compaction.oned.algs",bg="org.eclipse.elk.alg.layered.compaction.recthull",Xa="org.eclipse.elk.alg.layered.components",va="NONE",eee="MODEL_ORDER",qu={3:1,6:1,4:1,10:1,5:1,126:1},sQe={3:1,6:1,4:1,5:1,135:1,90:1,110:1},bF="org.eclipse.elk.alg.layered.compound",Mi={43:1},Zu="org.eclipse.elk.alg.layered.graph",nee=" -> ",lQe="Not supported by LGraph",dwe="Port side is undefined",Y8={3:1,6:1,4:1,5:1,323:1,135:1,90:1,110:1},Fd={3:1,6:1,4:1,5:1,135:1,199:1,209:1,90:1,110:1},fQe={3:1,6:1,4:1,5:1,135:1,2004:1,209:1,90:1,110:1},aQe=`([{"' \r +`)}return[]}function oxn(e){var n;return n=(TBe(),nnn),n[e>>>28]|n[e>>24&15]<<4|n[e>>20&15]<<8|n[e>>16&15]<<12|n[e>>12&15]<<16|n[e>>8&15]<<20|n[e>>4&15]<<24|n[e&15]<<28}function jHe(e){var n,t,i;e.b==e.c&&(i=e.a.length,t=b1e(k.Math.max(8,i))<<1,e.b!=0?(n=Df(e.a,t),_Be(e,n,i),e.a=n,e.b=0):r2(e.a,t),e.c=i)}function sxn(e,n){var t;return t=e.b,t.nf((Xt(),Ps))?t.$f()==(Ie(),Yn)?-t.Kf().a-ne(re(t.mf(Ps))):n+ne(re(t.mf(Ps))):t.$f()==(Ie(),Yn)?-t.Kf().a:n}function $O(e){var n;return e.b.c.length!=0&&u(Le(e.b,0),70).a?u(Le(e.b,0),70).a:(n=IV(e),n??""+(e.c?pu(e.c.a,e,0):-1))}function wz(e){var n;return e.f.c.length!=0&&u(Le(e.f,0),70).a?u(Le(e.f,0),70).a:(n=IV(e),n??""+(e.i?pu(e.i.j,e,0):-1))}function lxn(e,n){var t,i;if(n<0||n>=e.gc())return null;for(t=n;t0?e.c:0),r=k.Math.max(r,n.d),++i;e.e=c,e.b=r}function fxn(e){var n,t;if(!e.b)for(e.b=JR(u(e.f,125).jh().i),t=new st(u(e.f,125).jh());t.e!=t.i.gc();)n=u(ft(t),157),Ce(e.b,new MX(n));return e.b}function axn(e,n){var t,i,r;if(n.dc())return A9(),A9(),tD;for(t=new VOe(e,n.gc()),r=new st(e);r.e!=r.i.gc();)i=ft(r),n.Gc(i)&&Et(t,i);return t}function $de(e,n,t,i){return n==0?i?(!e.o&&(e.o=new os((Gu(),h1),Zd,e,0)),e.o):(!e.o&&(e.o=new os((Gu(),h1),Zd,e,0)),nO(e.o)):sz(e,n,t,i)}function ZQ(e){var n,t;if(e.rb)for(n=0,t=e.rb.i;n>22),r+=i>>22,r<0)?!1:(e.l=t&Ls,e.m=i&Ls,e.h=r&G1,!0)}function eW(e,n,t,i,r,c,o){var l,f;return!(n.Re()&&(f=e.a.Le(t,i),f<0||!r&&f==0)||n.Se()&&(l=e.a.Le(t,c),l>0||!o&&l==0))}function gxn(e,n){i8();var t;if(t=e.j.g-n.j.g,t!=0)return 0;switch(e.j.g){case 2:return kQ(n,h3e)-kQ(e,h3e);case 4:return kQ(e,a3e)-kQ(n,a3e)}return 0}function wxn(e){switch(e.g){case 0:return rie;case 1:return cie;case 2:return uie;case 3:return oie;case 4:return YJ;case 5:return sie;default:return null}}function Qc(e,n,t){var i,r;return i=(r=new kX,cg(r,n),Mo(r,t),Et((!e.c&&(e.c=new we(jp,e,12,10)),e.c),r),r),Nd(i,0),$2(i,1),Pd(i,!0),Ld(i,!0),i}function ey(e,n){var t,i;if(n>=e.i)throw R(new EK(n,e.i));return++e.j,t=e.g[n],i=e.i-n-1,i>0&&Wu(e.g,n+1,e.g,n,i),ir(e.g,--e.i,null),e.Oi(n,t),e.Li(),t}function EHe(e,n){var t,i;return e.Db>>16==17?e.Cb.Qh(e,21,vf,n):(i=Oc(u(Cn((t=u(Kn(e,16),29),t||e.fi()),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function pxn(e){var n,t,i,r;for(En(),Tr(e.c,e.a),r=new P(e.c);r.at.a.c.length))throw R(new Un("index must be >= 0 and <= layer node count"));e.c&&qo(e.c.a,e),e.c=t,t&&zb(t.a,n,e)}function NHe(e,n){this.c=new wt,this.a=e,this.b=n,this.d=u(C(e,(me(),z3)),316),ue(C(e,(Oe(),o4e)))===ue((uO(),QJ))?this.e=new yxe:this.e=new vxe}function Exn(e,n){var t,i,r,c;for(c=0,i=new P(e);i.a0?n:0),++t;return new Ee(i,r)}function Sxn(e,n){var t,i;for(e.b=0,e.d=new BP,i=new P(n.a);i.a>16==6?e.Cb.Qh(e,6,pr,n):(i=Oc(u(Cn((t=u(Kn(e,16),29),t||(Gu(),wG)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function Hde(e,n){var t,i;return e.Db>>16==7?e.Cb.Qh(e,1,QI,n):(i=Oc(u(Cn((t=u(Kn(e,16),29),t||(Gu(),L8e)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function Gde(e,n){var t,i;return e.Db>>16==9?e.Cb.Qh(e,9,Ft,n):(i=Oc(u(Cn((t=u(Kn(e,16),29),t||(Gu(),$8e)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function _He(e,n){var t,i;return e.Db>>16==5?e.Cb.Qh(e,9,xG,n):(i=Oc(u(Cn((t=u(Kn(e,16),29),t||(jn(),n0)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function LHe(e,n){var t,i;return e.Db>>16==7?e.Cb.Qh(e,6,Aa,n):(i=Oc(u(Cn((t=u(Kn(e,16),29),t||(jn(),i0)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function qde(e,n){var t,i;return e.Db>>16==3?e.Cb.Qh(e,0,ZI,n):(i=Oc(u(Cn((t=u(Kn(e,16),29),t||(jn(),e0)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function Ude(e,n){var t,i;return e.Db>>16==3?e.Cb.Qh(e,12,Ft,n):(i=Oc(u(Cn((t=u(Kn(e,16),29),t||(Gu(),_8e)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function Cxn(e,n,t){var i,r,c;for(t<0&&(t=0),c=e.i,r=t;rRZ)return m8(e,i);if(i==e)return!0}}return!1}function Oxn(e){switch(H$(),e.q.g){case 5:jqe(e,(Ie(),Vn)),jqe(e,bt);break;case 4:CUe(e,(Ie(),Vn)),CUe(e,bt);break;default:OVe(e,(Ie(),Vn)),OVe(e,bt)}}function Nxn(e){switch(H$(),e.q.g){case 5:Fqe(e,(Ie(),nt)),Fqe(e,Yn);break;case 4:zJe(e,(Ie(),nt)),zJe(e,Yn);break;default:NVe(e,(Ie(),nt)),NVe(e,Yn)}}function Ixn(e){var n,t;n=u(C(e,(Hf(),Etn)),15),n?(t=n.a,t==0?he(e,(L0(),jJ),new yQ):he(e,(L0(),jJ),new VR(t))):he(e,(L0(),jJ),new VR(1))}function Dxn(e,n){var t;switch(t=e.i,n.g){case 1:return-(e.n.b+e.o.b);case 2:return e.n.a-t.o.a;case 3:return e.n.b-t.o.b;case 4:return-(e.n.a+e.o.a)}return 0}function _xn(e,n){switch(e.g){case 0:return n==(Xs(),V1)?JJ:HJ;case 1:return n==(Xs(),V1)?JJ:eI;case 2:return n==(Xs(),V1)?eI:HJ;default:return eI}}function BO(e,n){var t,i,r;for(qo(e.a,n),e.e-=n.r+(e.a.c.length==0?0:e.c),r=qee,i=new P(e.a);i.a>16==11?e.Cb.Qh(e,10,Ft,n):(i=Oc(u(Cn((t=u(Kn(e,16),29),t||(Gu(),P8e)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function PHe(e,n){var t,i;return e.Db>>16==10?e.Cb.Qh(e,11,vf,n):(i=Oc(u(Cn((t=u(Kn(e,16),29),t||(jn(),t0)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function $He(e,n){var t,i;return e.Db>>16==10?e.Cb.Qh(e,12,yf,n):(i=Oc(u(Cn((t=u(Kn(e,16),29),t||(jn(),Km)),e.Db>>16),19)),e.Cb.Qh(e,i.n,i.f,n))}function RHe(e,n){var t,i,r,c,o;if(n)for(r=n.a.length,t=new Jb(r),o=(t.b-t.a)*t.c<0?(S0(),Eb):new M0(t);o.Ob();)c=u(o.Pb(),15),i=F9(n,c.a),i&&jUe(e,i)}function Fxn(){nse();var e,n;for(sBn((C0(),Bn)),WRn(Bn),ZQ(Bn),Q8e=(jn(),rh),n=new P(u7e);n.a>19,h=n.h>>19,f!=h?h-f:(r=e.h,l=n.h,r!=l?r-l:(i=e.m,o=n.m,i!=o?i-o:(t=e.l,c=n.l,t-c)))}function BHe(e,n,t){var i,r,c,o,l;for(r=e[t.g],l=new P(n.d);l.a0?e.b:0),++t;n.b=i,n.e=r}function zHe(e){var n,t,i;if(i=e.b,wMe(e.i,i.length)){for(t=i.length*2,e.b=le(Wne,gN,308,t,0,1),e.c=le(Wne,gN,308,t,0,1),e.f=t-1,e.i=0,n=e.a;n;n=n.c)XO(e,n,n);++e.g}}function KE(e,n){return e.b.a=k.Math.min(e.b.a,n.c),e.b.b=k.Math.min(e.b.b,n.d),e.a.a=k.Math.max(e.a.a,n.c),e.a.b=k.Math.max(e.a.b,n.d),qn(e.c,n),!0}function Hxn(e,n,t){var i;i=n.c.i,i.k==(Fn(),dr)?(he(e,(me(),Ea),u(C(i,Ea),12)),he(e,gf,u(C(i,gf),12))):(he(e,(me(),Ea),n.c),he(e,gf,t.d))}function v8(e,n,t){M8();var i,r,c,o,l,f;return o=n/2,c=t/2,i=k.Math.abs(e.a),r=k.Math.abs(e.b),l=1,f=1,i>o&&(l=o/i),r>c&&(f=c/r),A1(e,k.Math.min(l,f)),e}function Gxn(){Uz();var e,n;try{if(n=u(r0e((E0(),kf),o7),2075),n)return n}catch(t){if(t=sr(t),X(t,101))e=t,Ffe((Lt(),e));else throw R(t)}return new hU}function qxn(){Uz();var e,n;try{if(n=u(r0e((E0(),kf),hf),2002),n)return n}catch(t){if(t=sr(t),X(t,101))e=t,Ffe((Lt(),e));else throw R(t)}return new lw}function Uxn(){H$e();var e,n;try{if(n=u(r0e((E0(),kf),vg),2084),n)return n}catch(t){if(t=sr(t),X(t,101))e=t,Ffe((Lt(),e));else throw R(t)}return new lC}function Xxn(e,n,t){var i,r;return r=e.e,e.e=n,(e.Db&4)!=0&&(e.Db&1)==0&&(i=new Dr(e,1,4,r,n),t?t.lj(i):t=i),r!=n&&(n?t=_8(e,Iz(e,n),t):t=_8(e,e.a,t)),t}function FHe(){r$.call(this),this.e=-1,this.a=!1,this.p=Xr,this.k=-1,this.c=-1,this.b=-1,this.g=!1,this.f=-1,this.j=-1,this.n=-1,this.i=-1,this.d=-1,this.o=Xr}function Kxn(e,n){var t,i,r;if(i=e.b.d.d,e.a||(i+=e.b.d.a),r=n.b.d.d,n.a||(r+=n.b.d.a),t=ji(i,r),t==0){if(!e.a&&n.a)return-1;if(!n.a&&e.a)return 1}return t}function Vxn(e,n){var t,i,r;if(i=e.b.b.d,e.a||(i+=e.b.b.a),r=n.b.b.d,n.a||(r+=n.b.b.a),t=ji(i,r),t==0){if(!e.a&&n.a)return-1;if(!n.a&&e.a)return 1}return t}function Yxn(e,n){var t,i,r;if(i=e.b.g.d,e.a||(i+=e.b.g.a),r=n.b.g.d,n.a||(r+=n.b.g.a),t=ji(i,r),t==0){if(!e.a&&n.a)return-1;if(!n.a&&e.a)return 1}return t}function Vde(){Vde=Y,Ftn=Eo(qt(qt(qt(new or,(zr(),no),(Ur(),Qve)),no,Wve),Pc,Zve),Pc,zve),Htn=qt(qt(new or,no,Dve),no,Fve),Jtn=Eo(new or,Pc,Hve)}function Qxn(e){var n,t,i,r,c;for(n=u(C(e,(me(),sx)),92),c=e.n,i=n.Bc().Jc();i.Ob();)t=u(i.Pb(),318),r=t.i,r.c+=c.a,r.d+=c.b,t.c?dXe(t):bXe(t);he(e,sx,null)}function Wxn(e,n,t){var i,r;switch(r=e.b,i=r.d,n.g){case 1:return-i.d-t;case 2:return r.o.a+i.c+t;case 3:return r.o.b+i.a+t;case 4:return-i.b-t;default:return-1}}function JHe(e,n){var t,i;for(i=new P(n);i.a0&&(o=(c&oi)%e.d.length,r=W0e(e,o,c,n),r)?(l=r.ld(t),l):(i=e.ak(c,n,t),e.c.Ec(i),null)}function Wde(e,n){var t,i,r,c;switch(_d(e,n).Il()){case 3:case 2:{for(t=g3(n),r=0,c=t.i;r=0;i--)if(bn(e[i].d,n)||bn(e[i].d,t)){e.length>=i+1&&e.splice(0,i+1);break}return e}function FO(e,n){var t;return su(e)&&su(n)&&(t=e/n,mN0&&(e.b+=2,e.a+=i):(e.b+=1,e.a+=k.Math.min(i,r))}function VHe(e,n){var t,i;if(i=!1,$r(n)&&(i=!0,D4(e,new M2(Pt(n)))),i||X(n,242)&&(i=!0,D4(e,(t=UK(u(n,242)),new Av(t)))),!i)throw R(new CX(U2e))}function gAn(e,n,t,i){var r,c,o;return r=new L1(e.e,1,10,(o=n.c,X(o,88)?u(o,29):(jn(),jf)),(c=t.c,X(c,88)?u(c,29):(jn(),jf)),$d(e,n),!1),i?i.lj(r):i=r,i}function n0e(e){var n,t;switch(u(C(_r(e),(Oe(),Z5e)),420).g){case 0:return n=e.n,t=e.o,new Ee(n.a+t.a/2,n.b+t.b/2);case 1:return new wc(e.n);default:return null}}function JO(){JO=Y,WJ=new Pj(va,0),T3e=new Pj("LEFTUP",1),N3e=new Pj("RIGHTUP",2),C3e=new Pj("LEFTDOWN",3),O3e=new Pj("RIGHTDOWN",4),lie=new Pj("BALANCED",5)}function wAn(e,n,t){var i,r,c;if(i=ji(e.a[n.p],e.a[t.p]),i==0){if(r=u(C(n,(me(),Dy)),16),c=u(C(t,Dy),16),r.Gc(t))return-1;if(c.Gc(n))return 1}return i}function pAn(e){switch(e.g){case 1:return new $_;case 2:return new _k;case 3:return new H5;case 0:return null;default:throw R(new Un(Wee+(e.f!=null?e.f:""+e.g)))}}function t0e(e,n,t){switch(n){case 1:!e.n&&(e.n=new we(Eu,e,1,7)),kt(e.n),!e.n&&(e.n=new we(Eu,e,1,7)),nr(e.n,u(t,18));return;case 2:V9(e,Pt(t));return}E1e(e,n,t)}function i0e(e,n,t){switch(n){case 3:Lw(e,ne(re(t)));return;case 4:Pw(e,ne(re(t)));return;case 5:Os(e,ne(re(t)));return;case 6:Ns(e,ne(re(t)));return}t0e(e,n,t)}function pz(e,n,t){var i,r,c;c=(i=new kX,i),r=Fa(c,n,null),r&&r.mj(),Mo(c,t),Et((!e.c&&(e.c=new we(jp,e,12,10)),e.c),c),Nd(c,0),$2(c,1),Pd(c,!0),Ld(c,!0)}function r0e(e,n){var t,i,r;return t=Dj(e.i,n),X(t,241)?(r=u(t,241),r.wi()==null,r.ti()):X(t,493)?(i=u(t,1999),r=i.b,r):null}function mAn(e,n,t,i){var r,c;return Nt(n),Nt(t),c=u(nE(e.d,n),15),SRe(!!c,"Row %s not in %s",n,e.e),r=u(nE(e.b,t),15),SRe(!!r,"Column %s not in %s",t,e.c),Eze(e,c.a,r.a,i)}function vAn(e){var n,t,i,r,c,o;for(t=null,r=e,c=0,o=r.length;c1||l==-1?(c=u(f,16),r.Wb(tEn(e,c))):r.Wb(FW(e,u(f,57)))))}function AAn(e,n,t,i){kMe();var r=Kne;function c(){for(var o=0;o0)return!1;return!0}function TAn(e){switch(u(C(e.b,(Oe(),U5e)),381).g){case 1:er(So(lu(new mn(null,new yn(e.d,16)),new tw),new r_),new iM);break;case 2:uDn(e);break;case 0:ZCn(e)}}function OAn(e,n,t){var i,r,c;for(i=t,!i&&(i=new s4),i.Tg("Layout",e.a.c.length),c=new P(e.a);c.aKee)return t;r>-1e-6&&++t}return t}function vz(e,n,t){if(X(n,271))return iNn(e,u(n,85),t);if(X(n,276))return Lxn(e,u(n,276),t);throw R(new Un(s7+Ja(new Su(F(z(Mr,1),Nn,1,5,[n,t])))))}function yz(e,n,t){if(X(n,271))return rNn(e,u(n,85),t);if(X(n,276))return Pxn(e,u(n,276),t);throw R(new Un(s7+Ja(new Su(F(z(Mr,1),Nn,1,5,[n,t])))))}function u0e(e,n){var t;n!=e.b?(t=null,e.b&&(t=LR(e.b,e,-4,t)),n&&(t=Z4(n,e,-4,t)),t=mFe(e,n,t),t&&t.mj()):(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,3,n,n))}function ZHe(e,n){var t;n!=e.f?(t=null,e.f&&(t=LR(e.f,e,-1,t)),n&&(t=Z4(n,e,-1,t)),t=vFe(e,n,t),t&&t.mj()):(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,0,n,n))}function LAn(e,n,t,i){var r,c,o,l;return Fs(e.e)&&(r=n.Jk(),l=n.kd(),c=t.kd(),o=O0(e,1,r,l,c,r.Hk()?N8(e,r,c,X(r,103)&&(u(r,19).Bb&Ec)!=0):-1,!0),i?i.lj(o):i=o),i}function eGe(e){var n,t,i;if(e==null)return null;if(t=u(e,16),t.dc())return"";for(i=new vd,n=t.Jc();n.Ob();)Bc(i,(Si(),Pt(n.Pb()))),i.a+=" ";return jK(i,i.a.length-1)}function nGe(e){var n,t,i;if(e==null)return null;if(t=u(e,16),t.dc())return"";for(i=new vd,n=t.Jc();n.Ob();)Bc(i,(Si(),Pt(n.Pb()))),i.a+=" ";return jK(i,i.a.length-1)}function PAn(e,n){var t,i,r,c,o;for(c=new P(n.a);c.a0&&rc(e,e.length-1)==33)try{return n=wUe(of(e,0,e.length-1)),n.e==null}catch(t){if(t=sr(t),!X(t,32))throw R(t)}return!1}function zAn(e,n,t){var i,r,c;switch(i=_r(n),r=UB(i),c=new Qu,wu(c,n),t.g){case 1:Ar(c,NO(Y4(r)));break;case 2:Ar(c,Y4(r))}return he(c,(Oe(),Am),re(C(e,Am))),c}function o0e(e){var n,t;return n=u(ct(new Xn(Qn(cr(e.a).a.Jc(),new ee))),17),t=u(ct(new Xn(Qn(Ii(e.a).a.Jc(),new ee))),17),Fe(ze(C(n,(me(),qd))))||Fe(ze(C(t,qd)))}function X2(){X2=Y,nI=new lT("ONE_SIDE",0),UJ=new lT("TWO_SIDES_CORNER",1),XJ=new lT("TWO_SIDES_OPPOSING",2),qJ=new lT("THREE_SIDES",3),GJ=new lT("FOUR_SIDES",4)}function rGe(e,n){var t,i,r,c;for(c=new Te,r=0,i=n.Jc();i.Ob();){for(t=ve(u(i.Pb(),15).a+r);t.a=e.f)break;qn(c.c,t)}return c}function FAn(e){var n,t;for(t=new P(e.e.b);t.a0&&xHe(this,this.c-1,(Ie(),nt)),this.c0&&e[0].length>0&&(this.c=Fe(ze(C(_r(e[0][0]),(me(),X3e))))),this.a=le(bon,Ae,2079,e.length,0,2),this.b=le(gon,Ae,2080,e.length,0,2),this.d=new hFe}function qAn(e){return e.c.length==0?!1:(kn(0,e.c.length),u(e.c[0],17)).c.i.k==(Fn(),dr)?!0:Vv(So(new mn(null,new yn(e,16)),new jk),new l_)}function oGe(e,n){var t,i,r,c,o,l,f;for(l=W2(n),c=n.f,f=n.g,o=k.Math.sqrt(c*c+f*f),r=0,i=new P(l);i.a=0?(t=FO(e,rF),i=AQ(e,rF)):(n=Hb(e,1),t=FO(n,5e8),i=AQ(n,5e8),i=mc(qh(i,1),Rr(e,1))),bh(qh(i,32),Rr(t,Dc))}function iMn(e,n,t,i){var r,c,o,l,f;for(r=null,c=0,l=new P(n);l.a1;n>>=1)(n&1)!=0&&(i=Kv(i,t)),t.d==1?t=Kv(t,t):t=new AJe(eKe(t.a,t.d,le($t,ni,30,t.d<<1,15,1)));return i=Kv(i,t),i}function w0e(){w0e=Y;var e,n,t,i;for(qme=le(Jr,Jc,30,25,15,1),Ume=le(Jr,Jc,30,33,15,1),i=152587890625e-16,n=32;n>=0;n--)Ume[n]=i,i*=.5;for(t=1,e=24;e>=0;e--)qme[e]=t,t*=.5}function sMn(e){var n,t;if(Fe(ze(ke(e,(Oe(),Sm))))){for(t=new Xn(Qn(U0(e).a.Jc(),new ee));ht(t);)if(n=u(ct(t),85),Uw(n)&&Fe(ze(ke(n,xg))))return!0}return!1}function fGe(e){var n,t,i,r;for(n=new xi,t=new xi,r=St(e,0);r.b!=r.d.c;)i=u(jt(r),12),i.e.c.length==0?Ki(t,i,t.c.b,t.c):Ki(n,i,n.c.b,n.c);return Ks(n).Fc(t),n}function aGe(e,n){var t,i,r;hr(e.f,n)&&(n.b=e,i=n.c,pu(e.j,i,0)!=-1||Ce(e.j,i),r=n.d,pu(e.j,r,0)!=-1||Ce(e.j,r),t=n.a.b,t.c.length!=0&&(!e.i&&(e.i=new OJe(e)),$7n(e.i,t)))}function lMn(e){var n,t,i,r,c;return t=e.c.d,i=t.j,r=e.d.d,c=r.j,i==c?t.p=0&&bn(e.substr(n,3),"GMT")||n>=0&&bn(e.substr(n,3),"UTC"))&&(t[0]=n+3),Zbe(e,t,i)}function aMn(e,n){var t,i,r,c,o;for(c=e.g.a,o=e.g.b,i=new P(e.d);i.at;c--)e[c]|=n[c-t-1]>>>o,e[c-1]=n[c-t-1]<0&&Wu(e.g,n,e.g,n+i,l),o=t.Jc(),e.i+=i,r=0;r>4&15,c=e[i]&15,o[r++]=R8e[t],o[r++]=R8e[c];return ph(o,0,o.length)}function Xo(e){var n,t;return e>=Ec?(n=vN+(e-Ec>>10&1023)&yr,t=56320+(e-Ec&1023)&yr,String.fromCharCode(n)+(""+String.fromCharCode(t))):String.fromCharCode(e&yr)}function kMn(e,n){v2();var t,i,r,c;return r=u(u(vi(e.r,n),22),83),r.gc()>=2?(i=u(r.Jc().Pb(),115),t=e.u.Gc((ps(),tA)),c=e.u.Gc(Yy),!i.a&&!t&&(r.gc()==2||c)):!1}function gGe(e,n,t,i,r){var c,o,l;for(c=cXe(e,n,t,i,r),l=!1;!c;)Oz(e,r,!0),l=!0,c=cXe(e,n,t,i,r);l&&Oz(e,r,!1),o=QY(r),o.c.length!=0&&(e.d&&e.d.Fg(o),gGe(e,r,t,i,o))}function Ez(){Ez=Y,Jre=new k$("NODE_SIZE_REORDERER",0),Bre=new k$("INTERACTIVE_NODE_REORDERER",1),Fre=new k$("MIN_SIZE_PRE_PROCESSOR",2),zre=new k$("MIN_SIZE_POST_PROCESSOR",3)}function Sz(){Sz=Y,Cce=new Fj(va,0),c8e=new Fj("DIRECTED",1),o8e=new Fj("UNDIRECTED",2),i8e=new Fj("ASSOCIATION",3),u8e=new Fj("GENERALIZATION",4),r8e=new Fj("DEPENDENCY",5)}function jMn(e,n){var t;if(!_a(e))throw R(new Uc(zWe));switch(t=_a(e),n.g){case 1:return-(e.j+e.f);case 2:return e.i-t.g;case 3:return e.j-t.f;case 4:return-(e.i+e.g)}return 0}function EMn(e,n,t){var i,r,c;return i=n.Jk(),c=n.kd(),r=i.Hk()?O0(e,4,i,c,null,N8(e,i,c,X(i,103)&&(u(i,19).Bb&Ec)!=0),!0):O0(e,i.rk()?2:1,i,c,i.gk(),-1,!0),t?t.lj(r):t=r,t}function k8(e,n){var t,i;for(Ln(n),i=e.b.c.length,Ce(e.b,n);i>0;){if(t=i,i=(i-1)/2|0,e.a.Le(Le(e.b,i),n)<=0)return ul(e.b,t,n),!0;ul(e.b,t,Le(e.b,i))}return ul(e.b,i,n),!0}function v0e(e,n,t,i){var r,c;if(r=0,t)r=FB(e.a[t.g][n.g],i);else for(c=0;c=l)}function wGe(e){switch(e.g){case 0:return new K_;case 1:return new PM;default:throw R(new Un("No implementation is available for the width approximator "+(e.f!=null?e.f:""+e.g)))}}function y0e(e,n,t,i){var r;if(r=!1,$r(i)&&(r=!0,O9(n,t,Pt(i))),r||b2(i)&&(r=!0,y0e(e,n,t,i)),r||X(i,242)&&(r=!0,Xb(n,t,u(i,242))),!r)throw R(new CX(U2e))}function xMn(e,n){var t,i,r;if(t=n.ni(e.a),t&&(r=pa((!t.b&&(t.b=new Hs((jn(),Ac),Du,t)),t.b),af),r!=null)){for(i=1;i<(ls(),s7e).length;++i)if(bn(s7e[i],r))return i}return 0}function AMn(e,n){var t,i,r;if(t=n.ni(e.a),t&&(r=pa((!t.b&&(t.b=new Hs((jn(),Ac),Du,t)),t.b),af),r!=null)){for(i=1;i<(ls(),l7e).length;++i)if(bn(l7e[i],r))return i}return 0}function pGe(e,n){var t,i,r,c;if(Ln(n),c=e.a.gc(),c0?1:0;c.a[r]!=t;)c=c.a[r],r=e.a.Le(t.d,c.d)>0?1:0;c.a[r]=i,i.b=t.b,i.a[0]=t.a[0],i.a[1]=t.a[1],t.a[0]=null,t.a[1]=null}function TMn(e){var n,t,i,r;for(n=new Te,t=le(ts,ma,30,e.a.c.length,16,1),$fe(t,t.length),r=new P(e.a);r.a0&&VXe((kn(0,t.c.length),u(t.c[0],25)),e),t.c.length>1&&VXe(u(Le(t,t.c.length-1),25),e),n.Ug()}function NMn(e){ps();var n,t;return n=Ci(Z1,F(z(fG,1),je,280,0,[mb])),!(pO(PR(n,e))>1||(t=Ci(tA,F(z(fG,1),je,280,0,[nA,Yy])),pO(PR(t,e))>1))}function j0e(e,n){var t;t=lo((E0(),kf),e),X(t,493)?Kc(kf,e,new YCe(this,n)):Kc(kf,e,this),bW(this,n),n==(g9(),Y8e)?(this.wb=u(this,2e3),u(n,2002)):this.wb=(C0(),Bn)}function IMn(e){var n,t,i;if(e==null)return null;for(n=null,t=0;tc}function kGe(e,n){var t,i,r;if(S0e(e,n))return!0;for(i=new P(n);i.a=r||n<0)throw R(new jo(Cne+n+pg+r));if(t>=r||t<0)throw R(new jo(Tne+t+pg+r));return n!=t?i=(c=e.Aj(t),e.oj(n,c),c):i=e.vj(t),i}function EGe(e){var n,t,i;if(i=e,e)for(n=0,t=e.Bh();t;t=t.Bh()){if(++n>RZ)return EGe(t);if(i=t,t==e)throw R(new Uc("There is a cycle in the containment hierarchy of "+e))}return i}function Ja(e){var n,t,i;for(i=new ng(To,"[","]"),t=e.Jc();t.Ob();)n=t.Pb(),D1(i,ue(n)===ue(e)?"(this Collection)":n==null?Vo:fu(n));return i.a?i.e.length==0?i.a.a:i.a.a+(""+i.e):i.c}function S0e(e,n){var t,i;if(i=!1,n.gc()<2)return!1;for(t=0;t1&&(e.j.b+=e.e)):(e.j.a+=t.a,e.j.b=k.Math.max(e.j.b,t.b),e.d.c.length>1&&(e.j.a+=e.e))}function G0(){G0=Y,Tin=F(z(xc,1),qu,64,0,[(Ie(),Vn),nt,bt]),Cin=F(z(xc,1),qu,64,0,[nt,bt,Yn]),Oin=F(z(xc,1),qu,64,0,[bt,Yn,Vn]),Nin=F(z(xc,1),qu,64,0,[Yn,Vn,nt])}function xGe(e){var n,t,i,r,c,o,l,f,h;for(this.a=KJe(e),this.b=new Te,t=e,i=0,r=t.length;iFK(e.d).c?(e.i+=e.g.c,TQ(e.d)):FK(e.d).c>FK(e.g).c?(e.e+=e.d.c,TQ(e.g)):(e.i+=SIe(e.g),e.e+=SIe(e.d),TQ(e.g),TQ(e.d))}function FMn(e,n,t){var i,r,c,o;for(c=n.q,o=n.r,new Kb((da(),ab),n,c,1),new Kb(ab,c,o,1),r=new P(t);r.al&&(f=l/i),r>c&&(h=c/r),o=k.Math.min(f,h),e.a+=o*(n.a-e.a),e.b+=o*(n.b-e.b)}function qMn(e,n,t,i,r){var c,o;for(o=!1,c=u(Le(t.b,0),26);K_n(e,n,c,i,r)&&(o=!0,NAn(t,c),t.b.c.length!=0);)c=u(Le(t.b,0),26);return t.b.c.length==0&&BO(t.j,t),o&&bz(n.q),o}function A0e(e,n,t,i){var r,c;return t==0?(!e.o&&(e.o=new os((Gu(),h1),Zd,e,0)),K$(e.o,n,i)):(c=u(Cn((r=u(Kn(e,16),29),r||e.fi()),t),69),c.uk().yk(e,Lo(e),t-dt(e.fi()),n,i))}function bW(e,n){var t;n!=e.sb?(t=null,e.sb&&(t=u(e.sb,52).Qh(e,1,cA,t)),n&&(t=u(n,52).Oh(e,1,cA,t)),t=B1e(e,n,t),t&&t.mj()):(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,4,n,n))}function TGe(e,n){var t,i,r,c;if(n)r=$1(n,"x"),t=new hSe(e),Wv(t.a,(Ln(r),r)),c=$1(n,"y"),i=new dSe(e),Zv(i.a,(Ln(c),c));else throw R(new lh("All edge sections need an end point."))}function OGe(e,n){var t,i,r,c;if(n)r=$1(n,"x"),t=new lSe(e),e3(t.a,(Ln(r),r)),c=$1(n,"y"),i=new fSe(e),n3(i.a,(Ln(c),c));else throw R(new lh("All edge sections need a start point."))}function UMn(e,n){var t,i,r,c,o,l,f;for(i=Yze(e),c=0,l=i.length;c>22-n,r=e.h<>22-n):n<44?(t=0,i=e.l<>44-n):(t=0,i=0,r=e.l<=zd?"error":i>=900?"warn":i>=800?"info":"log"),pDe(t,e.a),e.b&&Mbe(n,t,e.b,"Exception: ",!0))}function _Ge(e,n){var t,i,r,c,o;for(r=n==1?Cte:Mte,i=r.a.ec().Jc();i.Ob();)for(t=u(i.Pb(),86),o=u(vi(e.f.c,t),22).Jc();o.Ob();)c=u(o.Pb(),49),Ce(e.b.b,u(c.b,82)),Ce(e.b.a,u(c.b,82).d)}function LGe(e,n,t,i){var r,c,o,l,f;switch(f=e.b,c=n.d,o=c.j,l=xde(o,f.d[o.g],t),r=pi(pc(c.n),c.a),c.j.g){case 3:case 1:l.a+=r.a;break;case 2:l.b+=r.b;break;case 4:l.b+=r.b}Ki(i,l,i.c.b,i.c)}function YMn(e,n){var t,i,r,c;for(c=n.b.j,e.a=le($t,ni,30,c.c.length,15,1),r=0,i=0;ie)throw R(new Un("k must be smaller than n"));return n==0||n==e?1:e==0?0:Zde(e)/(Zde(n)*Zde(e-n))}function M0e(e,n){var t,i,r,c;for(t=new MK(e);t.g==null&&!t.c?mae(t):t.g==null||t.i!=0&&u(t.g[t.i-1],50).Ob();)if(c=u(Nz(t),57),X(c,174))for(i=u(c,174),r=0;r>4],n[t*2+1]=OG[c&15];return ph(n,0,n.length)}function lCn(e){var n,t,i;switch(i=e.c.length,i){case 0:return OV(),Ken;case 1:return n=u(pqe(new P(e)),45),Jpn(n.jd(),n.kd());default:return t=u(Ba(e,le(yg,tF,45,e.c.length,0,1)),175),new ise(t)}}function Rd(e,n){switch(n.g){case 1:return M4(e.j,(ss(),xve));case 2:return M4(e.j,(ss(),Eve));case 3:return M4(e.j,(ss(),Mve));case 4:return M4(e.j,(ss(),Cve));default:return En(),En(),Sc}}function fCn(e,n){var t,i,r;t=$vn(n,e.e),i=u(zn(e.g.f,t),15).a,r=e.a.c.length-1,e.a.c.length!=0&&u(Le(e.a,r),295).c==i?(++u(Le(e.a,r),295).a,++u(Le(e.a,r),295).b):Ce(e.a,new COe(i))}function q0(){q0=Y,nln=(Xt(),Uy),tln=Qd,Qsn=Ig,Wsn=n5,Zsn=bb,Ysn=e5,Vye=$I,eln=Rm,Dre=(Gbe(),Bsn),_re=zsn,Qye=Gsn,Lre=Xsn,Wye=qsn,Zye=Usn,Yye=Fsn,HH=Jsn,GH=Hsn,AI=Ksn,e6e=Vsn,Kye=Rsn}function $Ge(e,n){var t,i,r,c,o;if(e.e<=n||wyn(e,e.g,n))return e.g;for(c=e.r,i=e.g,o=e.r,r=(c-i)/2+i;i+11&&(e.e.b+=e.a)):(e.e.a+=t.a,e.e.b=k.Math.max(e.e.b,t.b),e.d.c.length>1&&(e.e.a+=e.a))}function dCn(e){var n,t,i,r;switch(r=e.i,n=r.b,i=r.j,t=r.g,r.a.g){case 0:t.a=(e.g.b.o.a-i.a)/2;break;case 1:t.a=n.d.n.a+n.d.a.a;break;case 2:t.a=n.d.n.a+n.d.a.a-i.a;break;case 3:t.b=n.d.n.b+n.d.a.b}}function bCn(e,n,t){var i,r,c;for(r=new Xn(Qn(wh(t).a.Jc(),new ee));ht(r);)i=u(ct(r),17),!uc(i)&&!(!uc(i)&&i.c.i.c==i.d.i.c)&&(c=NUe(e,i,t,new mxe),c.c.length>1&&qn(n.c,c))}function zGe(e,n,t,i,r){if(ii&&(e.a=i),e.br&&(e.b=r),e}function gCn(e){if(X(e,144))return PNn(u(e,144));if(X(e,233))return Xjn(u(e,233));if(X(e,21))return KMn(u(e,21));throw R(new Un(s7+Ja(new Su(F(z(Mr,1),Nn,1,5,[e])))))}function wCn(e,n,t,i,r){var c,o,l;for(c=!0,o=0;o>>r|t[o+i+1]<>>r,++o}return c}function N0e(e,n,t,i){var r,c,o;if(n.k==(Fn(),dr)){for(c=new Xn(Qn(cr(n).a.Jc(),new ee));ht(c);)if(r=u(ct(c),17),o=r.c.i.k,o==dr&&e.c.a[r.c.i.c.p]==i&&e.c.a[n.c.p]==t)return!0}return!1}function pCn(e,n){var t,i,r,c;return n&=63,t=e.h&G1,n<22?(c=t>>>n,r=e.m>>n|t<<22-n,i=e.l>>n|e.m<<22-n):n<44?(c=0,r=t>>>n-22,i=e.m>>n-22|e.h<<44-n):(c=0,r=0,i=t>>>n-44),_o(i&Ls,r&Ls,c&G1)}function FGe(e,n,t,i){var r;this.b=i,this.e=e==(rg(),Cx),r=n[t],this.d=j2(ts,[Ae,ma],[171,30],16,[r.length,r.length],2),this.a=j2($t,[Ae,ni],[54,30],15,[r.length,r.length],2),this.c=new h0e(n,t)}function mCn(e){var n,t,i;for(e.k=new Sae((Ie(),F(z(xc,1),qu,64,0,[ju,Vn,nt,bt,Yn])).length,e.j.c.length),i=new P(e.j);i.a=t)return E8(e,n,i.p),!0;return!1}function a3(e,n,t,i){var r,c,o,l,f,h;for(o=t.length,c=0,r=-1,h=URe((Wn(n,e.length+1),e.substr(n)),(VK(),Hme)),l=0;lc&&C3n(h,URe(t[l],Hme))&&(r=l,c=f);return r>=0&&(i[0]=n+c),r}function kCn(e,n,t){var i,r,c,o,l,f,h,b;c=e.d.p,l=c.e,f=c.r,e.g=new NT(f),o=e.d.o.c.p,i=o>0?l[o-1]:le(u1,Fd,9,0,0,1),r=l[o],h=ot?F0e(e,t,"start index"):n<0||n>t?F0e(n,t,"end index"):cS("end index (%s) must not be less than start index (%s)",F(z(Mr,1),Nn,1,5,[ve(n),ve(e)]))}function UGe(e,n){var t,i,r,c;for(i=0,r=e.length;i0&&XGe(e,c,t));n.p=0}function xCn(e){var n,t,i,r;for(n=qb(Kt(new tl("Predicates."),"and"),40),t=!0,r=new qc(e);r.b=0?e.hi(r):q0e(e,i);else throw R(new Un(nb+i.ve()+LS));else throw R(new Un(QWe+n+WWe));else Fl(e,t,i)}function I0e(e){var n,t;if(t=null,n=!1,X(e,210)&&(n=!0,t=u(e,210).a),n||X(e,265)&&(n=!0,t=""+u(e,265).a),n||X(e,479)&&(n=!0,t=""+u(e,479).a),!n)throw R(new CX(U2e));return t}function D0e(e,n,t){var i,r,c,o,l,f;for(f=Po(e.e.Ah(),n),i=0,l=e.i,r=u(e.g,122),o=0;o=e.d.b.c.length&&(n=new Xu(e.d),n.p=i.p-1,Ce(e.d.b,n),t=new Xu(e.d),t.p=i.p,Ce(e.d.b,t)),Or(i,u(Le(e.d.b,i.p),25))}function CCn(e){var n,t,i,r;for(t=new xi,ac(t,e.o),i=new BP;t.b!=0;)n=u(t.b==0?null:(at(t.b!=0),$l(t,t.a.a)),500),r=$Ve(e,n,!0),r&&Ce(i.a,n);for(;i.a.c.length!=0;)n=u(T1e(i),500),$Ve(e,n,!1)}function Ue(e){var n;this.c=new xi,this.f=e.e,this.e=e.d,this.i=e.g,this.d=e.c,this.b=e.b,this.k=e.j,this.a=e.a,e.i?this.j=e.i:this.j=(n=u(la(Wa),10),new _l(n,u(Df(n,n.length),10),0)),this.g=e.f}function lg(){lg=Y,o9e=new p4(yS,0),xr=new p4("BOOLEAN",1),dc=new p4("INT",2),Gy=new p4("STRING",3),ec=new p4("DOUBLE",4),Bi=new p4("ENUM",5),Hy=new p4("ENUMSET",6),Za=new p4("OBJECT",7)}function YE(e,n){var t,i,r,c,o;i=k.Math.min(e.c,n.c),c=k.Math.min(e.d,n.d),r=k.Math.max(e.c+e.b,n.c+n.b),o=k.Math.max(e.d+e.a,n.d+n.a),r=(r/2|0))for(this.e=i?i.c:null,this.d=r;t++0;)She(this);this.b=n,this.a=null}function NCn(e,n){var t,i;n.a?eIn(e,n):(t=u(BX(e.b,n.b),60),t&&t==e.a[n.b.f]&&t.a&&t.a!=n.b.a&&t.c.Ec(n.b),i=u(RX(e.b,n.b),60),i&&e.a[i.f]==n.b&&i.a&&i.a!=n.b.a&&n.b.c.Ec(i),DK(e.b,n.b))}function eqe(e,n){var t,i;if(t=u(zc(e.b,n),127),u(u(vi(e.r,n),22),83).dc()){t.n.b=0,t.n.c=0;return}t.n.b=e.C.b,t.n.c=e.C.c,e.A.Gc((Vs(),_g))&&OXe(e,n),i=wSn(e,n),NW(e,n)==(u3(),wb)&&(i+=2*e.w),t.a.a=i}function nqe(e,n){var t,i;if(t=u(zc(e.b,n),127),u(u(vi(e.r,n),22),83).dc()){t.n.d=0,t.n.a=0;return}t.n.d=e.C.d,t.n.a=e.C.a,e.A.Gc((Vs(),_g))&&NXe(e,n),i=gSn(e,n),NW(e,n)==(u3(),wb)&&(i+=2*e.w),t.a.b=i}function ICn(e,n){var t,i,r,c;for(c=new Te,i=new P(n);i.ai&&(Wn(n-1,e.length),e.charCodeAt(n-1)<=32);)--n;return i>0||nt.a&&(i.Gc((sg(),qx))?r=(n.a-t.a)/2:i.Gc(Ux)&&(r=n.a-t.a)),n.b>t.b&&(i.Gc((sg(),Kx))?c=(n.b-t.b)/2:i.Gc(Xx)&&(c=n.b-t.b)),k0e(e,r,c)}function uqe(e,n,t,i,r,c,o,l,f,h,b,p,y){X(e.Cb,88)&&Y2(Ms(u(e.Cb,88)),4),Mo(e,t),e.f=o,a8(e,l),h8(e,f),l8(e,h),f8(e,b),Pd(e,p),d8(e,y),Ld(e,!0),Nd(e,r),e.Xk(c),cg(e,n),i!=null&&(e.i=null,xB(e,i))}function F0e(e,n,t){if(e<0)return cS(oYe,F(z(Mr,1),Nn,1,5,[t,ve(e)]));if(n<0)throw R(new Un(sYe+n));return cS("%s (%s) must not be greater than size (%s)",F(z(Mr,1),Nn,1,5,[t,ve(e),ve(n)]))}function J0e(e,n,t,i,r,c){var o,l,f,h;if(o=i-t,o<7){zjn(n,t,i,c);return}if(f=t+r,l=i+r,h=f+(l-f>>1),J0e(n,e,f,h,-r,c),J0e(n,e,h,l,-r,c),c.Le(e[h-1],e[h])<=0){for(;t=0?e.$h(c,t):ybe(e,r,t);else throw R(new Un(nb+r.ve()+LS));else throw R(new Un(QWe+n+WWe));else Jl(e,i,r,t)}function oqe(e){var n,t;if(e.f){for(;e.n>0;){if(n=u(e.k.Xb(e.n-1),75),t=n.Jk(),X(t,103)&&(u(t,19).Bb&Ru)!=0&&(!e.e||t.nk()!=K7||t.Jj()!=0)&&n.kd()!=null)return!0;--e.n}return!1}else return e.n>0}function sqe(e){var n,t,i,r;if(t=u(e,52).Yh(),t)try{if(i=null,n=x8((E0(),kf),ZXe(Kjn(t))),n&&(r=n.Zh(),r&&(i=r.Dl(Pbn(t.e)))),i&&i!=e)return sqe(i)}catch(c){if(c=sr(c),!X(c,63))throw R(c)}return e}function KCn(e,n,t){var i,r,c;t.Tg("Remove overlaps",1),t.bh(n,Ype),i=u(ke(n,(Gv(),V3)),26),e.f=i,e.a=RQ(u(ke(n,(q0(),AI)),303)),r=re(ke(n,(Xt(),Qd))),t4(e,(Ln(r),r)),c=W2(i),yVe(e,n,c,t),t.bh(n,PF)}function VCn(e){var n,t,i;if(Fe(ze(ke(e,(Xt(),LI))))){for(i=new Te,t=new Xn(Qn(U0(e).a.Jc(),new ee));ht(t);)n=u(ct(t),85),Uw(n)&&Fe(ze(ke(n,wce)))&&qn(i.c,n);return i}else return En(),En(),Sc}function lqe(e){if(!e)return nAe(),Zen;var n=e.valueOf?e.valueOf():e;if(n!==e){var t=rte[typeof n];return t?t(n):F1e(typeof n)}else return e instanceof Array||e instanceof k.Array?new i9(e):new c9(e)}function fqe(e,n,t){var i,r,c;switch(c=e.o,i=u(zc(e.p,t),253),r=i.i,r.b=WE(i),r.a=QE(i),r.b=k.Math.max(r.b,c.a),r.b>c.a&&!n&&(r.b=c.a),r.c=-(r.b-c.a)/2,t.g){case 1:r.d=-r.a;break;case 3:r.d=c.b}GW(i),qW(i)}function aqe(e,n,t){var i,r,c;switch(c=e.o,i=u(zc(e.p,t),253),r=i.i,r.b=WE(i),r.a=QE(i),r.a=k.Math.max(r.a,c.b),r.a>c.b&&!n&&(r.a=c.b),r.d=-(r.a-c.b)/2,t.g){case 4:r.c=-r.b;break;case 2:r.c=c.a}GW(i),qW(i)}function YCn(e,n){var t,i,r;return X(n.g,9)&&u(n.g,9).k==(Fn(),wr)?Vi:(r=R4(n),r?k.Math.max(0,e.b/2-.5):(t=Xv(n),t?(i=ne(re(G2(t,(Oe(),Tg)))),k.Math.max(0,i/2-.5)):Vi))}function QCn(e,n){var t,i,r;return X(n.g,9)&&u(n.g,9).k==(Fn(),wr)?Vi:(r=R4(n),r?k.Math.max(0,e.b/2-.5):(t=Xv(n),t?(i=ne(re(G2(t,(Oe(),Tg)))),k.Math.max(0,i/2-.5)):Vi))}function WCn(e,n){var t,i,r,c,o;if(!n.dc()){if(r=u(n.Xb(0),132),n.gc()==1){VUe(e,r,r,1,0,n);return}for(t=1;t0)try{r=al(n,Xr,oi)}catch(c){throw c=sr(c),X(c,131)?(i=c,R(new sB(i))):R(c)}return t=(!e.a&&(e.a=new dX(e)),e.a),r=0?u(K(t,r),57):null}function nTn(e,n){if(e<0)return cS(oYe,F(z(Mr,1),Nn,1,5,["index",ve(e)]));if(n<0)throw R(new Un(sYe+n));return cS("%s (%s) must be less than size (%s)",F(z(Mr,1),Nn,1,5,["index",ve(e),ve(n)]))}function tTn(e){var n,t,i,r,c;if(e==null)return Vo;for(c=new ng(To,"[","]"),t=e,i=0,r=t.length;i=0?e.Ih(t,!0,!0):Xw(e,r,!0),163)),u(i,219).Xl(n);else throw R(new Un(nb+n.ve()+LS))}function U0e(e){var n,t;return e>-0x800000000000&&e<0x800000000000?e==0?0:(n=e<0,n&&(e=-e),t=lc(k.Math.floor(k.Math.log(e)/.6931471805599453)),(!n||e!=k.Math.pow(2,t))&&++t,t):OFe(Lu(e))}function dTn(e){var n,t,i,r,c,o,l;for(c=new Fh,t=new P(e);t.a2&&l.e.b+l.j.b<=2&&(r=l,i=o),c.a.yc(r,c),r.q=i);return c}function bTn(e,n,t){t.Tg("Eades radial",1),t.bh(n,PF),e.d=u(ke(n,(Gv(),V3)),26),e.c=ne(re(ke(n,(q0(),GH)))),e.e=RQ(u(ke(n,AI),303)),e.a=Zjn(u(ke(n,e6e),426)),e.b=pAn(u(ke(n,Yye),354)),nAn(e),t.bh(n,PF)}function gTn(e,n){if(n.Tg("Target Width Setter",1),ba(e,(Ha(),Kre)))Ei(e,(Qh(),_m),re(ke(e,Kre)));else throw R(new md("A target width has to be set if the TargetWidthWidthApproximator should be used."));n.Ug()}function mqe(e,n){var t,i,r;return i=new za(e),Pu(i,n),he(i,(me(),cH),n),he(i,(Oe(),Zi),(Br(),to)),he(i,Nh,(Yh(),tG)),Mf(i,(Fn(),wr)),t=new Qu,wu(t,i),Ar(t,(Ie(),Yn)),r=new Qu,wu(r,i),Ar(r,nt),i}function vqe(e,n){var t,i,r,c,o;for(e.c[n.p]=!0,Ce(e.a,n),o=new P(n.j);o.a=c)o.$b();else for(r=o.Jc(),i=0;i0?Noe():o<0&&Sqe(e,n,-o),!0):!1}function QE(e){var n,t,i,r,c,o,l;if(l=0,e.b==0){for(o=tHe(e,!0),n=0,i=o,r=0,c=i.length;r0&&(l+=t,++n);n>1&&(l+=e.c*(n-1))}else l=sAe(HY(C2(li(vV(e.a),new ud),new Cp)));return l>0?l+e.n.d+e.n.a:0}function WE(e){var n,t,i,r,c,o,l;if(l=0,e.b==0)l=sAe(HY(C2(li(vV(e.a),new b5),new l0)));else{for(o=iHe(e,!0),n=0,i=o,r=0,c=i.length;r0&&(l+=t,++n);n>1&&(l+=e.c*(n-1))}return l>0?l+e.n.b+e.n.c:0}function kTn(e){var n,t;if(e.c.length!=2)throw R(new Uc("Order only allowed for two paths."));n=(kn(0,e.c.length),u(e.c[0],17)),t=(kn(1,e.c.length),u(e.c[1],17)),n.d.i!=t.c.i&&(e.c.length=0,qn(e.c,t),qn(e.c,n))}function xqe(e,n,t){var i;for(vw(t,n.g,n.f),Il(t,n.i,n.j),i=0;i<(!n.a&&(n.a=new we(Ft,n,10,11)),n.a).i;i++)xqe(e,u(K((!n.a&&(n.a=new we(Ft,n,10,11)),n.a),i),26),u(K((!t.a&&(t.a=new we(Ft,t,10,11)),t.a),i),26))}function jTn(e,n){var t,i,r,c;for(c=u(zc(e.b,n),127),t=c.a,r=u(u(vi(e.r,n),22),83).Jc();r.Ob();)i=u(r.Pb(),115),i.c&&(t.a=k.Math.max(t.a,wfe(i.c)));if(t.a>0)switch(n.g){case 2:c.n.c=e.s;break;case 4:c.n.b=e.s}}function ETn(e,n){var t,i,r;return t=u(C(n,(Hf(),Ay)),15).a-u(C(e,Ay),15).a,t==0?(i=Nr(pc(u(C(e,(L0(),YN)),8)),u(C(e,ZS),8)),r=Nr(pc(u(C(n,YN),8)),u(C(n,ZS),8)),ji(i.a*i.b,r.a*r.b)):t}function STn(e,n){var t,i,r;return t=u(C(n,(Mu(),BH)),15).a-u(C(e,BH),15).a,t==0?(i=Nr(pc(u(C(e,(Ti(),EI)),8)),u(C(e,P7),8)),r=Nr(pc(u(C(n,EI),8)),u(C(n,P7),8)),ji(i.a*i.b,r.a*r.b)):t}function Aqe(e){var n,t;return t=new y0,t.a+="e_",n=F7n(e),n!=null&&(t.a+=""+n),e.c&&e.d&&(Kt((t.a+=" ",t),wz(e.c)),Kt(uo((t.a+="[",t),e.c.i),"]"),Kt((t.a+=nee,t),wz(e.d)),Kt(uo((t.a+="[",t),e.d.i),"]")),t.a}function Mqe(e){switch(e.g){case 0:return new DU;case 1:return new lP;case 2:return new _U;case 3:return new AC;default:throw R(new Un("No implementation is available for the layout phase "+(e.f!=null?e.f:""+e.g)))}}function V0e(e,n,t,i,r){var c;switch(c=0,r.g){case 1:c=k.Math.max(0,n.b+e.b-(t.b+i));break;case 3:c=k.Math.max(0,-e.b-i);break;case 2:c=k.Math.max(0,-e.a-i);break;case 4:c=k.Math.max(0,n.a+e.a-(t.a+i))}return c}function Cqe(e,n,t){var i,r,c,o,l;if(t)for(r=t.a.length,i=new Jb(r),l=(i.b-i.a)*i.c<0?(S0(),Eb):new M0(i);l.Ob();)o=u(l.Pb(),15),c=F9(t,o.a),F2e in c.a||Ane in c.a?CDn(e,c,n):VRn(e,c,n),npn(u(zn(e.c,g8(c)),85))}function Y0e(e){var n,t;switch(e.b){case-1:return!0;case 0:return t=e.t,t>1||t==-1?(e.b=-1,!0):(n=ff(e),n&&(Tc(),n.jk()==een)?(e.b=-1,!0):(e.b=1,!1));default:case 1:return!1}}function Q0e(e,n){var t,i,r,c;if(fi(e),e.c!=0||e.a!=123)throw R(new Bt(Ht((Lt(),jZe))));if(c=n==112,i=e.d,t=E9(e.i,125,i),t<0)throw R(new Bt(Ht((Lt(),EZe))));return r=of(e.i,i,t),e.d=t+1,$$e(r,c,(e.e&512)==512)}function xTn(e){var n,t,i,r,c,o,l;for(l=Jh(e.c.length),r=new P(e);r.a=0&&i=0?e.Ih(t,!0,!0):Xw(e,r,!0),163)),u(i,219).Ul(n);throw R(new Un(nb+n.ve()+pne))}function MTn(){nse();var e;return ehn?u(x8((E0(),kf),hf),2e3):(ti(yg,new DL),p$n(),e=u(X(lo((E0(),kf),hf),548)?lo(kf,hf):new NDe,548),ehn=!0,wBn(e),jBn(e),ei((ese(),V8e),e,new Ev),Kc(kf,hf,e),e)}function CTn(e,n){var t,i,r,c;e.j=-1,Fs(e.e)?(t=e.i,c=e.i!=0,WT(e,n),i=new L1(e.e,3,e.c,null,n,t,c),r=n.xl(e.e,e.c,null),r=cGe(e,n,r),r?(r.lj(i),r.mj()):hi(e.e,i)):(WT(e,n),r=n.xl(e.e,e.c,null),r&&r.mj())}function Cz(e,n){var t,i,r;if(r=0,i=n[0],i>=e.length)return-1;for(t=(Wn(i,e.length),e.charCodeAt(i));t>=48&&t<=57&&(r=r*10+(t-48),++i,!(i>=e.length));)t=(Wn(i,e.length),e.charCodeAt(i));return i>n[0]?n[0]=i:r=-1,r}function TTn(e,n,t){var i,r,c,o,l;o=e.c,l=e.d,c=mu(F(z(Lr,1),Ae,8,0,[o.i.n,o.n,o.a])).b,r=(c+mu(F(z(Lr,1),Ae,8,0,[l.i.n,l.n,l.a])).b)/2,i=null,o.j==(Ie(),nt)?i=new Ee(n+o.i.c.c.a+t,r):i=new Ee(n-t,r),S9(e.a,0,i)}function Uw(e){var n,t,i,r;for(n=null,i=Uh(Rl(F(z(Xl,1),Nn,20,0,[(!e.b&&(e.b=new In(mt,e,4,7)),e.b),(!e.c&&(e.c=new In(mt,e,5,8)),e.c)])));ht(i);)if(t=u(ct(i),84),r=iu(t),!n)n=r;else if(n!=r)return!1;return!0}function EW(e,n,t){var i;if(++e.j,n>=e.i)throw R(new jo(Cne+n+pg+e.i));if(t>=e.i)throw R(new jo(Tne+t+pg+e.i));return i=e.g[t],n!=t&&(n>16),n=i>>16&16,t=16-n,e=e>>n,i=e-256,n=i>>16&8,t+=n,e<<=n,i=e-cm,n=i>>16&4,t+=n,e<<=n,i=e-jh,n=i>>16&2,t+=n,e<<=n,i=e>>14,n=i&~(i>>1),t+2-n)}function OTn(e,n){var t,i,r;for(r=new Te,i=St(n.a,0);i.b!=i.d.c;)t=u(jt(i),65),t.c.g==e.g&&ue(C(t.b,(Mu(),Dh)))!==ue(C(t.c,Dh))&&!Vv(new mn(null,new yn(r,16)),new NEe(t))&&qn(r.c,t);return Tr(r,new Ck),r}function Oqe(e,n,t){var i,r,c,o;return X(n,155)&&X(t,155)?(c=u(n,155),o=u(t,155),e.a[c.a][o.a]+e.a[o.a][c.a]):X(n,251)&&X(t,251)&&(i=u(n,251),r=u(t,251),i.a==r.a)?u(C(r.a,(Hf(),Ay)),15).a:0}function Nqe(e,n){var t,i,r,c,o,l,f,h;for(h=ne(re(C(n,(Oe(),kx)))),f=e[0].n.a+e[0].o.a+e[0].d.c+h,l=1;l=0?t:(l=aE(Nr(new Ee(o.c+o.b/2,o.d+o.a/2),new Ee(c.c+c.b/2,c.d+c.a/2))),-(sKe(c,o)-1)*l)}function ITn(e,n,t){var i;er(new mn(null,(!t.a&&(t.a=new we($i,t,6,6)),new yn(t.a,16))),new ICe(e,n)),er(new mn(null,(!t.n&&(t.n=new we(Eu,t,1,7)),new yn(t.n,16))),new DCe(e,n)),i=u(ke(t,(Xt(),Z3)),78),i&&Zhe(i,e,n)}function Xw(e,n,t){var i,r,c;if(c=w3((ls(),nc),e.Ah(),n),c)return Tc(),u(c,69).vk()||(c=$4(Vc(nc,c))),r=(i=e.Fh(c),u(i>=0?e.Ih(i,!0,!0):Xw(e,c,!0),163)),u(r,219).Ql(n,t);throw R(new Un(nb+n.ve()+pne))}function W0e(e,n,t,i){var r,c,o,l,f;if(r=e.d[n],r){if(c=r.g,f=r.i,i!=null){for(l=0;l=t&&(i=n,h=(f.c+f.a)/2,o=h-t,f.c<=h-t&&(r=new WK(f.c,o),zb(e,i++,r)),l=h+t,l<=f.a&&(c=new WK(l,f.a),N2(i,e.c.length),_j(e.c,i,c)))}function Lqe(e,n,t){var i,r,c,o,l,f;if(!n.dc()){for(r=new xi,f=n.Jc();f.Ob();)for(l=u(f.Pb(),40),ei(e.a,ve(l.g),ve(t)),o=(i=St(new S1(l).a.d,0),new Cv(i));WC(o.a);)c=u(jt(o.a),65).c,Ki(r,c,r.c.b,r.c);Lqe(e,r,t+1)}}function Z0e(e){var n;if(!e.c&&e.g==null)e.d=e._i(e.f),Et(e,e.d),n=e.d;else{if(e.g==null)return!0;if(e.i==0)return!1;n=u(e.g[e.i-1],50)}return n==e.b&&null.Tm>=null.Sm()?(Nz(e),Z0e(e)):n.Ob()}function Pqe(e){if(this.a=e,e.c.i.k==(Fn(),wr))this.c=e.c,this.d=u(C(e.c.i,(me(),Iu)),64);else if(e.d.i.k==wr)this.c=e.d,this.d=u(C(e.d.i,(me(),Iu)),64);else throw R(new Un("Edge "+e+" is not an external edge."))}function $qe(e,n){var t,i,r;r=e.b,e.b=n,(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,3,r,e.b)),n?n!=e&&(Mo(e,n.zb),IY(e,n.d),t=(i=n.c,i??n.zb),_Y(e,t==null||bn(t,n.zb)?null:t)):(Mo(e,null),IY(e,0),_Y(e,null))}function Rqe(e){!tte&&(tte=SRn());var n=e.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g,function(t){return m4n(t)});return'"'+n+'"'}function ebe(e,n,t,i,r,c){var o,l,f,h,b;if(r!=0)for(ue(e)===ue(t)&&(e=e.slice(n,n+r),n=0),f=t,l=n,h=n+r;l=o)throw R(new k2(n,o));return r=t[n],o==1?i=null:(i=le(Bce,_ne,415,o-1,0,1),Wu(t,0,i,0,n),c=o-n-1,c>0&&Wu(t,n+1,i,n,c)),p8(e,i),cqe(e,n,r),r}function Bqe(e){var n,t;if(e.f){for(;e.n0)for(o=e.c.d,l=e.d.d,r=A1(Nr(new Ee(l.a,l.b),o),1/(i+1)),c=new Ee(o.a,o.b),t=new P(e.a);t.a0?c=Y4(t):c=NO(Y4(t))),Ei(n,O7,c)}function Gqe(e,n){var t,i;if(e.c.length!=0){if(e.c.length==2)sy((kn(0,e.c.length),u(e.c[0],9)),(fl(),l1)),sy((kn(1,e.c.length),u(e.c[1],9)),gb);else for(i=new P(e);i.a0&&nN(e,t,n),c):i.a!=null?(nN(e,n,t),-1):r.a!=null?(nN(e,t,n),1):0}function qqe(e){UV();var n,t,i,r,c,o,l;for(t=new D0,r=new P(e.e.b);r.a=0;)i=t[c],o.$l(i.Jk())&&Et(r,i);!JVe(e,r)&&Fs(e.e)&&f9(e,n.Hk()?O0(e,6,n,(En(),Sc),null,-1,!1):O0(e,n.rk()?2:1,n,null,null,-1,!1))}function JTn(e,n){var t,i,r,c,o;return e.a==(j8(),cx)?!0:(c=n.a.c,t=n.a.c+n.a.b,!(n.j&&(i=n.A,o=i.c.c.a-i.o.a/2,r=c-(i.n.a+i.o.a),r>o)||n.q&&(i=n.C,o=i.c.c.a-i.o.a/2,r=i.n.a-t,r>o)))}function Xqe(e,n,t){var i,r,c,o,l,f;for(i=0,f=t,n||(i=t*(e.c.length-1),f*=-1),c=new P(e);c.a=0?e.xh(null):e.Mh().Qh(e,-1-n,null,null)),e.yh(u(r,52),t),i&&i.mj(),e.sh()&&e.th()&&t>-1&&hi(e,new Dr(e,9,t,c,r)),r):c}function rbe(e,n){var t,i,r,c,o;for(c=e.b.Ae(n),i=(t=e.a.get(c),t??le(Mr,Nn,1,0,5,1)),o=0;o>5,r>=e.d)return e.e<0;if(t=e.a[r],n=1<<(n&31),e.e<0){if(i=WBe(e),r>16)),16).bd(c),l0&&(!(x1(e.a.c)&&n.n.d)&&!(Rv(e.a.c)&&n.n.b)&&(n.g.d+=k.Math.max(0,i/2-.5)),!(x1(e.a.c)&&n.n.a)&&!(Rv(e.a.c)&&n.n.c)&&(n.g.a-=i-1))}function uUe(e,n,t){var i,r,c,o,l,f;c=u(Le(n.e,0),17).c,i=c.i,r=i.k,f=u(Le(t.g,0),17).d,o=f.i,l=o.k,r==(Fn(),dr)?he(e,(me(),Ea),u(C(i,Ea),12)):he(e,(me(),Ea),c),l==dr?he(e,(me(),gf),u(C(o,gf),12)):he(e,(me(),gf),f)}function oUe(e,n){var t,i,r,c,o,l;for(c=new P(e.b);c.a>n,c=e.m>>n|t<<22-n,r=e.l>>n|e.m<<22-n):n<44?(o=i?G1:0,c=t>>n-22,r=e.m>>n-22|t<<44-n):(o=i?G1:0,c=i?Ls:0,r=t>>n-44),_o(r&Ls,c&Ls,o&G1)}function sUe(e,n){var t,i,r,c,o,l,f,h,b;if(e.a.f>0&&X(n,45)&&(e.a.Zj(),h=u(n,45),f=h.jd(),c=f==null?0:Ni(f),o=Nle(e.a,c),t=e.a.d[o],t)){for(i=u(t.g,374),b=t.i,l=0;l=2)for(t=r.Jc(),n=re(t.Pb());t.Ob();)c=n,n=re(t.Pb()),i=k.Math.min(i,(Ln(n),n-(Ln(c),c)));return i}function aOn(e,n){var t,i,r;for(r=new Te,i=St(n.a,0);i.b!=i.d.c;)t=u(jt(i),65),t.b.g==e.g&&!bn(t.b.c,_F)&&ue(C(t.b,(Mu(),Dh)))!==ue(C(t.c,Dh))&&!Vv(new mn(null,new yn(r,16)),new IEe(t))&&qn(r.c,t);return Tr(r,new cw),r}function hOn(e,n){var t,i,r;if(ue(n)===ue(Nt(e)))return!0;if(!X(n,16)||(i=u(n,16),r=e.gc(),r!=i.gc()))return!1;if(X(i,59)){for(t=0;t0&&(r=t),o=new P(e.f.e);o.a0?r+=n:r+=1;return r}function yOn(e,n){var t,i,r,c,o,l,f,h,b,p;h=e,f=wE(h,"individualSpacings"),f&&(i=ba(n,(Xt(),Xy)),o=!i,o&&(r=new z6,Ei(n,Xy,r)),l=u(ke(n,Xy),379),p=f,c=null,p&&(c=(b=zY(p,le(He,Ae,2,0,6,1)),new $X(p,b))),c&&(t=new HCe(p,l),cc(c,t)))}function kOn(e,n){var t,i,r,c,o,l,f,h,b,p,y;return f=null,p=e,b=null,(oZe in p.a||sZe in p.a||HF in p.a)&&(h=null,y=l1e(n),o=wE(p,oZe),t=new wSe(y),YFe(t.a,o),l=wE(p,sZe),i=new xSe(y),QFe(i.a,l),c=Dw(p,HF),r=new CSe(y),h=(iGe(r.a,c),c),b=h),f=b,f}function jOn(e,n){var t,i,r;if(n===e)return!0;if(X(n,540)){if(r=u(n,833),e.a.d!=r.a.d||qv(e).gc()!=qv(r).gc())return!1;for(i=qv(r).Jc();i.Ob();)if(t=u(i.Pb(),416),uLe(e,t.a.jd())!=u(t.a.kd(),18).gc())return!1;return!0}return!1}function EOn(e,n){var t,i,r,c;for(c=new P(n.a);c.an.c?1:e.bn.b?1:e.a!=n.a?Ni(e.a)-Ni(n.a):e.d==(vE(),Ox)&&n.d==Tx?-1:e.d==Tx&&n.d==Ox?1:0}function AW(e){var n,t,i,r,c,o,l,f;for(r=Vi,i=Ir,t=new P(e.e.b);t.a0&&r0):r<0&&-r0):!1}function xOn(e,n,t,i){var r,c,o,l,f,h,b,p;for(r=(n-e.d)/e.c.c.length,c=0,e.a+=t,e.d=n,p=new P(e.c);p.a>24;return o}function MOn(e){if(e.xe()){var n=e.c;n.ye()?e.o="["+n.n:n.xe()?e.o="["+n.ve():e.o="[L"+n.ve()+";",e.b=n.ue()+"[]",e.k=n.we()+"[]";return}var t=e.j,i=e.d;i=i.split("/"),e.o=CQ(".",[t,CQ("$",i)]),e.b=CQ(".",[t,CQ(".",i)]),e.k=i[i.length-1]}function COn(e,n){var t,i,r,c,o;for(o=null,c=new P(e.e.a);c.a0&&lN(n,(kn(i-1,e.c.length),u(e.c[i-1],9)),r)>0;)ul(e,i,(kn(i-1,e.c.length),u(e.c[i-1],9))),--i;kn(i,e.c.length),e.c[i]=r}n.b=new wt,n.g=new wt}function yUe(e,n,t){var i,r,c;for(i=1;i0&&n.Le((kn(r-1,e.c.length),u(e.c[r-1],9)),c)>0;)ul(e,r,(kn(r-1,e.c.length),u(e.c[r-1],9))),--r;kn(r,e.c.length),e.c[r]=c}t.a=new wt,t.b=new wt}function Oz(e,n,t){var i,r,c,o,l,f,h,b,p,y;for(c=n.Jc();c.Ob();)r=u(c.Pb(),26),b=r.i+r.g/2,y=r.j+r.f/2,f=e.f,o=f.i+f.g/2,l=f.j+f.f/2,h=b-o,p=y-l,i=k.Math.sqrt(h*h+p*p),h*=e.e/i,p*=e.e/i,t?(b-=h,y-=p):(b+=h,y+=p),Os(r,b-r.g/2),Ns(r,y-r.f/2)}function h3(e){var n,t,i;if(!e.c&&e.b!=null){for(n=e.b.length-4;n>=0;n-=2)for(t=0;t<=n;t+=2)(e.b[t]>e.b[t+2]||e.b[t]===e.b[t+2]&&e.b[t+1]>e.b[t+3])&&(i=e.b[t+2],e.b[t+2]=e.b[t],e.b[t]=i,i=e.b[t+3],e.b[t+3]=e.b[t+1],e.b[t+1]=i);e.c=!0}}function Ff(e){var n,t;return t=new tl(Pb(e.Pm)),t.a+="@",Kt(t,(n=Ni(e)>>>0,n.toString(16))),e.Sh()?(t.a+=" (eProxyURI: ",uo(t,e.Yh()),e.Hh()&&(t.a+=" eClass: ",uo(t,e.Hh())),t.a+=")"):e.Hh()&&(t.a+=" (eClass: ",uo(t,e.Hh()),t.a+=")"),t.a}function nS(e){var n,t,i,r;if(e.e)throw R(new Uc((M1(gte),UZ+gte.k+XZ)));for(e.d==(vr(),nh)&&Qz(e,Zc),t=new P(e.a.a);t.a>24}return t}function _On(e,n,t){var i,r,c;if(r=u(zc(e.i,n),318),!r)if(r=new GRe(e.d,n,t),I4(e.i,n,r),mde(n))epn(e.a,n.c,n.b,r);else switch(c=TCn(n),i=u(zc(e.p,c),253),c.g){case 1:case 3:r.j=!0,AX(i,n.b,r);break;case 4:case 2:r.k=!0,AX(i,n.c,r)}return r}function LOn(e,n,t,i){var r,c,o,l,f,h;if(l=new J6,f=Po(e.e.Ah(),n),r=u(e.g,122),Tc(),u(n,69).vk())for(o=0;o=0)return r;for(c=1,l=new P(n.j);l.a=0)return r;for(c=1,l=new P(n.j);l.a=0?(n||(n=new Ej,i>0&&Bc(n,(Qr(0,i,e.length),e.substr(0,i)))),n.a+="\\",_9(n,t&yr)):n&&_9(n,t&yr);return n?n.a:e}function $On(e){var n,t,i;for(t=new P(e.a.a.b);t.a0&&(!(x1(e.a.c)&&n.n.d)&&!(Rv(e.a.c)&&n.n.b)&&(n.g.d-=k.Math.max(0,i/2-.5)),!(x1(e.a.c)&&n.n.a)&&!(Rv(e.a.c)&&n.n.c)&&(n.g.a+=k.Math.max(0,i-1)))}function AUe(e,n,t){var i,r;if((e.c-e.b&e.a.length-1)==2)n==(Ie(),Vn)||n==nt?(bB(u(OE(e),16),(fl(),l1)),bB(u(OE(e),16),gb)):(bB(u(OE(e),16),(fl(),gb)),bB(u(OE(e),16),l1));else for(r=new dE(e);r.a!=r.b;)i=u(JB(r),16),bB(i,t)}function ROn(e,n,t){var i,r,c,o,l,f,h,b,p;for(b=-1,p=0,l=n,f=0,h=l.length;f0&&++p;++b}return p}function BOn(e,n){var t,i,r,c,o,l,f;for(r=T9(new roe(e)),l=new qr(r,r.c.length),c=T9(new roe(n)),f=new qr(c,c.c.length),o=null;l.b>0&&f.b>0&&(t=(at(l.b>0),u(l.a.Xb(l.c=--l.b),26)),i=(at(f.b>0),u(f.a.Xb(f.c=--f.b),26)),t==i);)o=t;return o}function zOn(e,n){var t,i,r,c;for(n.Tg("Self-Loop pre-processing",1),i=new P(e.a);i.agLe(e,t)?(i=vu(t,(Ie(),nt)),e.d=i.dc()?0:iV(u(i.Xb(0),12)),o=vu(n,Yn),e.b=o.dc()?0:iV(u(o.Xb(0),12))):(r=vu(t,(Ie(),Yn)),e.d=r.dc()?0:iV(u(r.Xb(0),12)),c=vu(n,nt),e.b=c.dc()?0:iV(u(c.Xb(0),12)))}function FOn(e){var n,t,i,r,c,o,l,f;n=!0,r=null,c=null;e:for(f=new P(e.a);f.ae.c));o++)r.a>=e.s&&(c<0&&(c=o),l=o);return f=(e.s+e.c)/2,c>=0&&(i=ADn(e,n,c,l),f=Ngn((kn(i,n.c.length),u(n.c[i],340))),PTn(n,i,t)),f}function Ct(e,n,t){var i,r,c,o,l,f,h;for(o=(c=new Nb,c),Hhe(o,(Ln(n),n)),h=(!o.b&&(o.b=new Hs((jn(),Ac),Du,o)),o.b),f=1;f=2}function qOn(e,n,t,i,r){var c,o,l,f,h,b;for(c=e.c.d.j,o=u(Yu(t,0),8),b=1;b1||(n=Ci(Yf,F(z($c,1),je,96,0,[W1,Qf])),pO(PR(n,e))>1)||(i=Ci(Zf,F(z($c,1),je,96,0,[f1,pf])),pO(PR(i,e))>1))}function TUe(e){var n,t,i,r,c,o,l;for(n=0,i=new P(e.a);i.a0&&(i.b.n-=i.c,i.b.n<=0&&i.b.u>0&&Vt(n,i.b));for(r=new P(e.i);r.a0&&(i.a.u-=i.c,i.a.u<=0&&i.a.n>0&&Vt(t,i.a))}function Nz(e){var n,t,i,r,c;if(e.g==null&&(e.d=e._i(e.f),Et(e,e.d),e.c))return c=e.f,c;if(n=u(e.g[e.i-1],50),r=n.Pb(),e.e=n,t=e._i(r),t.Ob())e.d=t,Et(e,t);else for(e.d=null;!n.Ob()&&(ir(e.g,--e.i,null),e.i!=0);)i=u(e.g[e.i-1],50),n=i;return r}function XOn(e,n){var t,i,r,c,o,l;if(i=n,r=i.Jk(),J1(e.e,r)){if(r.Qi()&&qR(e,r,i.kd()))return!1}else for(l=Po(e.e.Ah(),r),t=u(e.g,122),c=0;c1||t>1)return 2;return n+t==1?2:0}function Ds(e,n){var t,i,r,c,o,l;return c=e.a*JZ+e.b*1502,l=e.b*JZ+11,t=k.Math.floor(l*kN),c+=t,l-=t*Uge,c%=Uge,e.a=c,e.b=l,n<=24?k.Math.floor(e.a*qme[n]):(r=e.a*(1<=2147483648&&(i-=4294967296),i)}function IUe(e,n,t){var i,r,c,o,l,f,h;for(c=new Te,h=new xi,o=new xi,hLn(e,h,o,n),XPn(e,h,o,n,t),f=new P(e);f.ai.b.g&&qn(c.c,i);return c}function ZOn(e,n,t){var i,r,c,o,l,f;for(l=e.c,o=(t.q?t.q:(En(),En(),r1)).vc().Jc();o.Ob();)c=u(o.Pb(),45),i=!w9(li(new mn(null,new yn(l,16)),new s9(new yCe(n,c)))).zd(($b(),Sy)),i&&(f=c.kd(),X(f,4)&&(r=yde(f),r!=null&&(f=r)),n.of(u(c.jd(),147),f))}function eNn(e,n){var t,i,r,c;for(n.Tg("Resize child graph to fit parent.",1),i=new P(e.b);i.a1)for(r=new P(e.a);r.a=0?e.Ih(i,!0,!0):Xw(e,c,!0),163)),u(r,219).Vl(n,t)}else throw R(new Un(nb+n.ve()+LS))}function iNn(e,n,t){var i,r,c,o,l,f;if(f=Ele(e,u(zn(e.e,n),26)),l=null,f)switch(f.g){case 3:i=Xse(e,T2(n)),l=(Ln(t),t+(Ln(i),i));break;case 2:r=Xse(e,T2(n)),o=(Ln(t),t+(Ln(r),r)),c=Xse(e,u(zn(e.e,n),26)),l=o-(Ln(c),c);break;default:l=t}else l=t;return l}function rNn(e,n,t){var i,r,c,o,l,f;if(f=Ele(e,u(zn(e.e,n),26)),l=null,f)switch(f.g){case 3:i=Kse(e,T2(n)),l=(Ln(t),t+(Ln(i),i));break;case 2:r=Kse(e,T2(n)),o=(Ln(t),t+(Ln(r),r)),c=Kse(e,u(zn(e.e,n),26)),l=o-(Ln(c),c);break;default:l=t}else l=t;return l}function Iz(e,n){var t,i,r,c,o;if(n){for(c=X(e.Cb,88)||X(e.Cb,103),o=!c&&X(e.Cb,335),i=new st((!n.a&&(n.a=new iE(n,Rc,n)),n.a));i.e!=i.i.gc();)if(t=u(ft(i),87),r=Gz(t),c?X(r,88):o?X(r,159):r)return r;return c?(jn(),jf):(jn(),rh)}else return null}function cNn(e,n){var t,i,r,c,o;for(t=new Te,r=lu(new mn(null,new yn(e,16)),new z5),c=lu(new mn(null,new yn(e,16)),new Mk),o=V9n(w9n(C2(wNn(F(z(DBn,1),Nn,832,0,[r,c])),new m_))),i=1;i=2*n&&Ce(t,new WK(o[i-1]+n,o[i]-n));return t}function DUe(e,n,t){var i,r,c,o,l,f,h,b;if(t)for(c=t.a.length,i=new Jb(c),l=(i.b-i.a)*i.c<0?(S0(),Eb):new M0(i);l.Ob();)o=u(l.Pb(),15),r=F9(t,o.a),r&&(f=j6n(e,(h=(j0(),b=new voe,b),n&&kbe(h,n),h),r),V9(f,N1(r,Ch)),jz(r,f),H0e(r,f),nQ(e,r,f))}function Dz(e){var n,t,i,r,c,o;if(!e.j){if(o=new EL,n=lA,c=n.a.yc(e,n),c==null){for(i=new st(tu(e));i.e!=i.i.gc();)t=u(ft(i),29),r=Dz(t),nr(o,r),Et(o,t);n.a.Ac(e)!=null}F2(o),e.j=new Pv((u(K(ge((C0(),Bn).o),11),19),o.i),o.g),Ms(e).b&=-33}return e.j}function uNn(e){var n,t,i,r;if(e==null)return null;if(i=bo(e,!0),r=qN.length,bn(i.substr(i.length-r,r),qN)){if(t=i.length,t==4){if(n=(Wn(0,i.length),i.charCodeAt(0)),n==43)return g7e;if(n==45)return khn}else if(t==3)return g7e}return new aoe(i)}function oNn(e){var n,t,i;return t=e.l,(t&t-1)!=0||(i=e.m,(i&i-1)!=0)||(n=e.h,(n&n-1)!=0)||n==0&&i==0&&t==0?-1:n==0&&i==0&&t!=0?Phe(t):n==0&&i!=0&&t==0?Phe(i)+22:n!=0&&i==0&&t==0?Phe(n)+44:-1}function d3(e,n){var t,i,r,c,o;for(r=n.a&e.f,c=null,i=e.b[r];;i=i.b){if(i==n){c?c.b=n.b:e.b[r]=n.b;break}c=i}for(o=n.f&e.f,c=null,t=e.c[o];;t=t.d){if(t==n){c?c.d=n.d:e.c[o]=n.d;break}c=t}n.e?n.e.c=n.c:e.a=n.c,n.c?n.c.e=n.e:e.e=n.e,--e.i,++e.g}function sNn(e,n){var t;n.d?n.d.b=n.b:e.a=n.b,n.b?n.b.d=n.d:e.e=n.d,!n.e&&!n.c?(t=u(uf(u(z4(e.b,n.a),262)),262),t.a=0,++e.c):(t=u(uf(u(zn(e.b,n.a),262)),262),--t.a,n.e?n.e.c=n.c:t.b=u(uf(n.c),497),n.c?n.c.e=n.e:t.c=u(uf(n.e),497)),--e.d}function CW(e,n){var t,i,r,c;for(c=new qr(e,0),t=(at(c.b0),c.a.Xb(c.c=--c.b),y2(c,r),at(c.b3&&Vh(e,0,n-3))}function fNn(e){var n,t,i,r;return ue(C(e,(Oe(),Em)))===ue((B1(),Wd))?!e.e&&ue(C(e,hI))!==ue((e8(),rI)):(i=u(C(e,Nie),302),r=Fe(ze(C(e,Iie)))||ue(C(e,px))===ue((zE(),tI)),n=u(C(e,z5e),15).a,t=e.a.c.length,!r&&i!=(e8(),rI)&&(n==0||n>t))}function aNn(e,n){var t,i,r,c,o,l,f;for(r=e.Jc();r.Ob();)for(i=u(r.Pb(),9),l=new Qu,wu(l,i),Ar(l,(Ie(),nt)),he(l,(me(),uH),($n(),!0)),o=n.Jc();o.Ob();)c=u(o.Pb(),9),f=new Qu,wu(f,c),Ar(f,Yn),he(f,uH,!0),t=new Ow,he(t,uH,!0),fc(t,l),Gr(t,f)}function hNn(e){var n,t;for(t=0;t0);t++);if(t>0&&t0);n++);return n>0&&t>16!=6&&n){if(m8(e,n))throw R(new Un(PS+Kqe(e)));i=null,e.Cb&&(i=(t=e.Db>>16,t>=0?Jde(e,i):e.Cb.Qh(e,-1-t,null,i))),n&&(i=Z4(n,e,6,i)),i=Tle(e,n,i),i&&i.mj()}else(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,6,n,n))}function _z(e,n){var t,i;if(n!=e.Cb||e.Db>>16!=3&&n){if(m8(e,n))throw R(new Un(PS+RKe(e)));i=null,e.Cb&&(i=(t=e.Db>>16,t>=0?Ude(e,i):e.Cb.Qh(e,-1-t,null,i))),n&&(i=Z4(n,e,12,i)),i=Cle(e,n,i),i&&i.mj()}else(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,3,n,n))}function kbe(e,n){var t,i;if(n!=e.Cb||e.Db>>16!=9&&n){if(m8(e,n))throw R(new Un(PS+LXe(e)));i=null,e.Cb&&(i=(t=e.Db>>16,t>=0?Gde(e,i):e.Cb.Qh(e,-1-t,null,i))),n&&(i=Z4(n,e,9,i)),i=Ole(e,n,i),i&&i.mj()}else(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,9,n,n))}function A8(e){var n,t,i,r,c;if(i=ff(e),c=e.j,c==null&&i)return e.Hk()?null:i.gk();if(X(i,159)){if(t=i.hk(),t&&(r=t.ti(),r!=e.i)){if(n=u(i,159),n.lk())try{e.g=r.qi(n,c)}catch(o){if(o=sr(o),X(o,80))e.g=null;else throw R(o)}e.i=r}return e.g}return null}function RUe(e){var n;return n=new Te,Ce(n,new g4(new Ee(e.c,e.d),new Ee(e.c+e.b,e.d))),Ce(n,new g4(new Ee(e.c,e.d),new Ee(e.c,e.d+e.a))),Ce(n,new g4(new Ee(e.c+e.b,e.d+e.a),new Ee(e.c+e.b,e.d))),Ce(n,new g4(new Ee(e.c+e.b,e.d+e.a),new Ee(e.c,e.d+e.a))),n}function bNn(e){var n,t,i,r;for(i=e.a.d.j,r=e.c.d.j,t=new P(e.i.d);t.a>>0),t.toString(16)),qEn(G7n(),(y9(),"Exception during lenientFormat for "+i),n),"<"+i+" threw "+Pb(n.Pm)+">";throw R(r)}}function wNn(e){var n,t,i,r,c,o,l,f,h;for(i=!1,n=336,t=0,c=new eNe(e.length),l=e,f=0,h=l.length;f1)for(n=kw((t=new Lb,++e.b,t),e.d),l=St(c,0);l.b!=l.d.c;)o=u(jt(l),124),Jf(Of(Tf(Nf(Cf(new tf,1),0),n),o))}function Lz(e,n){var t,i;if(n!=e.Cb||e.Db>>16!=11&&n){if(m8(e,n))throw R(new Un(PS+Jbe(e)));i=null,e.Cb&&(i=(t=e.Db>>16,t>=0?Xde(e,i):e.Cb.Qh(e,-1-t,null,i))),n&&(i=Z4(n,e,10,i)),i=Gle(e,n,i),i&&i.mj()}else(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,11,n,n))}function kNn(e,n,t){var i,r,c,o,l,f;if(c=0,o=0,e.c)for(f=new P(e.d.i.j);f.ac.a?-1:r.af){for(b=e.d,e.d=le(z8e,nme,67,2*f+4,0,1),c=0;c=9223372036854776e3?(U9(),jme):(r=!1,e<0&&(r=!0,e=-e),i=0,e>=hg&&(i=lc(e/hg),e-=i*hg),t=0,e>=dy&&(t=lc(e/dy),e-=t*dy),n=lc(e),c=_o(n,t,i),r&&eQ(c),c)}function DNn(e){var n,t,i,r,c;if(c=new Te,Ao(e.b,new Kke(c)),e.b.c.length=0,c.c.length!=0){for(n=(kn(0,c.c.length),u(c.c[0],80)),t=1,i=c.c.length;t>16!=7&&n){if(m8(e,n))throw R(new Un(PS+HGe(e)));i=null,e.Cb&&(i=(t=e.Db>>16,t>=0?Hde(e,i):e.Cb.Qh(e,-1-t,null,i))),n&&(i=u(n,52).Oh(e,1,QI,i)),i=Mfe(e,n,i),i&&i.mj()}else(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,7,n,n))}function FUe(e,n){var t,i;if(n!=e.Cb||e.Db>>16!=3&&n){if(m8(e,n))throw R(new Un(PS+IFe(e)));i=null,e.Cb&&(i=(t=e.Db>>16,t>=0?qde(e,i):e.Cb.Qh(e,-1-t,null,i))),n&&(i=u(n,52).Oh(e,0,ZI,i)),i=Cfe(e,n,i),i&&i.mj()}else(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,3,n,n))}function TW(e,n){C8();var t,i,r,c,o,l,f,h,b;return n.d>e.d&&(l=e,e=n,n=l),n.d<63?EIn(e,n):(o=(e.d&-2)<<4,h=Vae(e,o),b=Vae(n,o),i=VW(e,B4(h,o)),r=VW(n,B4(b,o)),f=TW(h,b),t=TW(i,r),c=TW(VW(h,i),VW(r,b)),c=tZ(tZ(c,f),t),c=B4(c,o),f=B4(f,o<<1),tZ(tZ(f,c),t))}function WO(){WO=Y,Vie=new Iv(zQe,0),M4e=new Iv("LONGEST_PATH",1),C4e=new Iv("LONGEST_PATH_SOURCE",2),Xie=new Iv("COFFMAN_GRAHAM",3),A4e=new Iv(cee,4),T4e=new Iv("STRETCH_WIDTH",5),xH=new Iv("MIN_WIDTH",6),Uie=new Iv("BF_MODEL_ORDER",7),Kie=new Iv("DF_MODEL_ORDER",8)}function RNn(e,n){var t,i,r,c,o,l;if(!e.tb){for(c=(!e.rb&&(e.rb=new x2(e,Ma,e)),e.rb),l=new b4(c.i),r=new st(c);r.e!=r.i.gc();)i=u(ft(r),143),o=i.ve(),t=u(o==null?Ko(l.f,null,i):Bw(l.i,o,i),143),t&&(o==null?Ko(l.f,null,t):Bw(l.i,o,t));e.tb=l}return u(lo(e.tb,n),143)}function ZO(e,n){var t,i,r,c,o;if((e.i==null&&kh(e),e.i).length,!e.p){for(o=new b4((3*e.g.i/2|0)+1),r=new E4(e.g);r.e!=r.i.gc();)i=u(PQ(r),179),c=i.ve(),t=u(c==null?Ko(o.f,null,i):Bw(o.i,c,i),179),t&&(c==null?Ko(o.f,null,t):Bw(o.i,c,t));e.p=o}return u(lo(e.p,n),179)}function Mbe(e,n,t,i,r){var c,o,l,f,h;for(LEn(i+_R(t,t.ge()),r),pDe(n,Wjn(t)),c=t.f,c&&Mbe(e,n,c,"Caused by: ",!1),l=(t.k==null&&(t.k=le(nte,Ae,80,0,0,1)),t.k),f=0,h=l.length;f=0;c+=t?1:-1)o=o|n.c.jg(f,c,t,i&&!Fe(ze(C(n.j,(me(),ob))))&&!Fe(ze(C(n.j,(me(),B3))))),o=o|n.q.tg(f,c,t),o=o|CXe(e,f[c],t,i);return hr(e.c,n),o}function $z(e,n,t){var i,r,c,o,l,f,h,b,p,y;for(b=ULe(e.j),p=0,y=b.length;p1&&(e.a=!0),h3n(u(t.b,68),pi(pc(u(n.b,68).c),A1(Nr(pc(u(t.b,68).a),u(n.b,68).a),r))),tLe(e,n),HUe(e,t)}function GUe(e){var n,t,i,r,c,o,l;for(c=new P(e.a.a);c.a0&&c>0?o.p=n++:i>0?o.p=t++:c>0?o.p=r++:o.p=t++}En(),Tr(e.j,new _q)}function HNn(e){var n,t;t=null,n=u(Le(e.g,0),17);do{if(t=n.d.i,wi(t,(me(),gf)))return u(C(t,gf),12).i;if(t.k!=(Fn(),Wi)&&ht(new Xn(Qn(Ii(t).a.Jc(),new ee))))n=u(ct(new Xn(Qn(Ii(t).a.Jc(),new ee))),17);else if(t.k!=Wi)return null}while(t&&t.k!=(Fn(),Wi));return t}function GNn(e,n){var t,i,r,c,o,l,f,h,b;for(l=n.j,o=n.g,f=u(Le(l,l.c.length-1),113),b=(kn(0,l.c.length),u(l.c[0],113)),h=QQ(e,o,f,b),c=1;ch&&(f=t,b=r,h=i);n.a=b,n.c=f}function Kw(e,n,t,i){var r,c;if(r=ue(C(t,(Oe(),gx)))===ue(($0(),ym)),c=u(C(t,B5e),16),wi(e,(me(),Oi)))if(r){if(c.Gc(C(e,wx))&&c.Gc(C(n,wx)))return i*u(C(e,wx),15).a+u(C(e,Oi),15).a}else return u(C(e,Oi),15).a;else return-1;return u(C(e,Oi),15).a}function qNn(e,n,t){var i,r,c,o,l,f,h;for(h=new kd(new bEe(e)),o=F(z(uin,1),fQe,12,0,[n,t]),l=0,f=o.length;lf-e.b&&lf-e.a&&lt.p?1:0:c.Ob()?1:-1}function ZNn(e,n){var t,i,r,c,o,l;n.Tg(fWe,1),r=u(ke(e,(Ha(),zx)),104),c=(!e.a&&(e.a=new we(Ft,e,10,11)),e.a),o=yxn(c),l=k.Math.max(o.a,ne(re(ke(e,(Qh(),Bx))))-(r.b+r.c)),i=k.Math.max(o.b,ne(re(ke(e,UH)))-(r.d+r.a)),t=i-o.b,Ei(e,Rx,t),Ei(e,Fy,l),Ei(e,R7,i+t),n.Ug()}function Rz(e){var n,t;if((!e.a&&(e.a=new we($i,e,6,6)),e.a).i==0)return l1e(e);for(n=u(K((!e.a&&(e.a=new we($i,e,6,6)),e.a),0),170),kt((!n.a&&(n.a=new mr(yl,n,5)),n.a)),e3(n,0),n3(n,0),Wv(n,0),Zv(n,0),t=(!e.a&&(e.a=new we($i,e,6,6)),e.a);t.i>1;)Z2(t,t.i-1);return n}function Po(e,n){Tc();var t,i,r,c;return n?n==(Si(),vhn)||(n==ohn||n==Pg||n==uhn)&&e!=d7e?new Age(e,n):(i=u(n,682),t=i.Yk(),t||($9(Vc((ls(),nc),n)),t=i.Yk()),c=(!t.i&&(t.i=new wt),t.i),r=u(bu(Xc(c.f,e)),2003),!r&&ei(c,e,r=new Age(e,n)),r):ihn}function eIn(e,n){var t,i;if(i=RT(e.b,n.b),!i)throw R(new Uc("Invalid hitboxes for scanline constraint calculation."));(Sze(n.b,u(jgn(e.b,n.b),60))||Sze(n.b,u(kgn(e.b,n.b),60)))&&jd(),e.a[n.b.f]=u(BX(e.b,n.b),60),t=u(RX(e.b,n.b),60),t&&(e.a[t.f]=n.b)}function nIn(e,n){var t,i,r,c,o,l,f,h,b;for(f=u(C(e,(me(),mi)),12),h=mu(F(z(Lr,1),Ae,8,0,[f.i.n,f.n,f.a])).a,b=e.i.n.b,t=gh(e.e),r=t,c=0,o=r.length;c0?c.a?(l=c.b.Kf().a,t>l&&(r=(t-l)/2,c.d.b=r,c.d.c=r)):c.d.c=e.s+t:uE(e.u)&&(i=m0e(c.b),i.c<0&&(c.d.b=-i.c),i.c+i.b>c.b.Kf().a&&(c.d.c=i.c+i.b-c.b.Kf().a))}function oIn(e,n){var t,i,r,c,o;o=new Te,t=n;do c=u(zn(e.b,t),132),c.B=t.c,c.D=t.d,qn(o.c,c),t=u(zn(e.k,t),17);while(t);return i=(kn(0,o.c.length),u(o.c[0],132)),i.j=!0,i.A=u(i.d.a.ec().Jc().Pb(),17).c.i,r=u(Le(o,o.c.length-1),132),r.q=!0,r.C=u(r.d.a.ec().Jc().Pb(),17).d.i,o}function sIn(e){var n,t;t=u(C(e,(Oe(),ku)),165),n=u(C(e,(me(),jg)),315),t==(Xs(),V1)?(he(e,ku,fI),he(e,jg,(_1(),$3))):t==Sg?(he(e,ku,fI),he(e,jg,(_1(),Ty))):n==(_1(),$3)?(he(e,ku,V1),he(e,jg,uI)):n==Ty&&(he(e,ku,Sg),he(e,jg,uI))}function Bz(){Bz=Y,kI=new Xp,Jon=qt(new or,(zr(),eo),(Ur(),CJ)),qon=Eo(qt(new or,eo,PJ),Pc,LJ),Uon=mh(mh(Nj(Eo(qt(new or,Xf,zJ),Pc,BJ),no),RJ),FJ),Hon=Eo(qt(qt(qt(new or,c1,OJ),no,IJ),no,p7),Pc,NJ),Gon=Eo(qt(qt(new or,no,p7),no,MJ),Pc,AJ)}function rS(){rS=Y,Von=qt(Eo(new or,(zr(),Pc),(Ur(),Jve)),eo,CJ),Zon=mh(mh(Nj(Eo(qt(new or,Xf,zJ),Pc,BJ),no),RJ),FJ),Yon=Eo(qt(qt(qt(new or,c1,OJ),no,IJ),no,p7),Pc,NJ),Won=qt(qt(new or,eo,PJ),Pc,LJ),Qon=Eo(qt(qt(new or,no,p7),no,MJ),Pc,AJ)}function lIn(e,n,t,i,r){var c,o;(!uc(n)&&n.c.i.c==n.d.i.c||!NBe(mu(F(z(Lr,1),Ae,8,0,[r.i.n,r.n,r.a])),t))&&!uc(n)&&(n.c==r?S9(n.a,0,new wc(t)):Vt(n.a,new wc(t)),i&&!rf(e.a,t)&&(o=u(C(n,(Oe(),Wc)),78),o||(o=new xs,he(n,Wc,o)),c=new wc(t),Ki(o,c,o.c.b,o.c),hr(e.a,c)))}function XUe(e,n){var t,i,r,c;for(c=Rt(hc(e1,Xh(Rt(hc(n==null?0:Ni(n),n1)),15))),t=c&e.b.length-1,r=null,i=e.b[t];i;r=i,i=i.a)if(i.d==c&&C1(i.i,n))return r?r.a=i.a:e.b[t]=i.a,aAe(u(uf(i.c),593),u(uf(i.f),593)),VC(u(uf(i.b),227),u(uf(i.e),227)),--e.f,++e.e,!0;return!1}function fIn(e){var n,t;for(t=new Xn(Qn(cr(e).a.Jc(),new ee));ht(t);)if(n=u(ct(t),17),n.c.i.k!=(Fn(),Uu))throw R(new md(ree+$O(e)+"' has its layer constraint set to FIRST, but has at least one incoming edge that does not come from a FIRST_SEPARATE node. That must not happen."))}function KUe(e,n){var t,i,r,c,o,l,f,h,b,p,y;r=n?new rw:new oM,c=!1;do for(c=!1,h=n?Ks(e.b):e.b,f=h.Jc();f.Ob();)for(l=u(f.Pb(),25),y=Vb(l.a),n||Ks(y),p=new P(y);p.a=0;o+=r?1:-1){for(l=n[o],f=i==(Ie(),nt)?r?vu(l,i):Ks(vu(l,i)):r?Ks(vu(l,i)):vu(l,i),c&&(e.c[l.p]=f.gc()),p=f.Jc();p.Ob();)b=u(p.Pb(),12),e.d[b.p]=h++;Sr(t,f)}}function YUe(e,n,t){var i,r,c,o,l,f,h,b;for(c=ne(re(e.b.Jc().Pb())),h=ne(re(q7n(n.b))),i=A1(pc(e.a),h-t),r=A1(pc(n.a),t-c),b=pi(i,r),A1(b,1/(h-c)),this.a=b,this.b=new Te,l=!0,o=e.b.Jc(),o.Pb();o.Ob();)f=ne(re(o.Pb())),l&&f-t>Kee&&(this.b.Ec(t),l=!1),this.b.Ec(f);l&&this.b.Ec(t)}function hIn(e){var n,t,i,r;if(TDn(e,e.n),e.d.c.length>0){for(kj(e.c);obe(e,u(L(new P(e.e.a)),124))>5,n&=31,i>=e.d)return e.e<0?(yh(),cnn):(yh(),VS);if(c=e.d-i,r=le($t,ni,30,c+1,15,1),wCn(r,c,e.a,i,n),e.e<0){for(t=0;t0&&e.a[t]<<32-n!=0){for(t=0;t=0?!1:(t=w3((ls(),nc),r,n),t?(i=t.Gk(),(i>1||i==-1)&&Cw(Vc(nc,t))!=3):!0)):!1}function mIn(e,n,t,i){var r,c,o,l,f,h,b,p,y,S;if(f=e.c.d,h=e.d.d,f.j!=h.j)for(S=e.b,b=null,l=null,o=DEn(e),o&&S.i&&(b=e.b.i.i,l=S.i.j),r=f.j,p=null;r!=h.j;)p=n==0?qB(r):X1e(r),c=xde(r,S.d[r.g],t),y=xde(p,S.d[p.g],t),o&&b&&l&&(r==b?HFe(c,b,l):p==b&&HFe(y,b,l)),Vt(i,pi(c,y)),r=p}function Obe(e,n,t){var i,r,c,o,l,f;if(i=sgn(t,e.length),o=e[i],c=wAe(t,o.length),o[c].k==(Fn(),wr))for(f=n.j,r=0;r0&&(t[0]+=e.d,o-=t[0]),t[2]>0&&(t[2]+=e.d,o-=t[2]),c=k.Math.max(0,o),t[1]=k.Math.max(t[1],o),Qae(e,No,r.c+i.b+t[0]-(t[1]-o)/2,t),n==No&&(e.c.b=c,e.c.c=r.c+i.b+(c-o)/2)}function rXe(){this.c=le(Jr,Jc,30,(Ie(),F(z(xc,1),qu,64,0,[ju,Vn,nt,bt,Yn])).length,15,1),this.b=le(Jr,Jc,30,F(z(xc,1),qu,64,0,[ju,Vn,nt,bt,Yn]).length,15,1),this.a=le(Jr,Jc,30,F(z(xc,1),qu,64,0,[ju,Vn,nt,bt,Yn]).length,15,1),use(this.c,Vi),use(this.b,Ir),use(this.a,Ir)}function SIn(e,n,t,i){var r,c,o,l,f;for(f=n.i,l=t[f.g][e.d[f.g]],r=!1,o=new P(n.d);o.a=r&&(e.c=!1,e.a=!1),e.b[i++]=r,e.b[i]=c,e.c||h3(e)}}function xIn(e,n,t){var i,r,c,o,l,f,h;for(h=n.d,e.a=new xo(h.c.length),e.c=new wt,l=new P(h);l.a=0?e.Ih(h,!1,!0):Xw(e,t,!1),61));e:for(c=p.Jc();c.Ob();){for(r=u(c.Pb(),57),b=0;be.d[o.p]&&(t+=Hae(e.b,c),I0(e.a,ve(c)));for(;!jj(e.a);)Ehe(e.b,u(N4(e.a),15).a)}return t}function oXe(e,n,t){var i,r,c,o;for(c=(!n.a&&(n.a=new we(Ft,n,10,11)),n.a).i,r=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));r.e!=r.i.gc();)i=u(ft(r),26),(!i.a&&(i.a=new we(Ft,i,10,11)),i.a).i==0||(c+=oXe(e,i,!1));if(t)for(o=Fi(n);o;)c+=(!o.a&&(o.a=new we(Ft,o,10,11)),o.a).i,o=Fi(o);return c}function Z2(e,n){var t,i,r,c;return e.Nj()?(i=null,r=e.Oj(),e.Rj()&&(i=e.Tj(e.Yi(n),null)),t=e.Gj(4,c=ey(e,n),null,n,r),e.Kj()&&c!=null&&(i=e.Mj(c,i)),i?(i.lj(t),i.mj()):e.Hj(t),c):(c=ey(e,n),e.Kj()&&c!=null&&(i=e.Mj(c,null),i&&i.mj()),c)}function IIn(e){var n,t,i,r,c,o,l,f,h,b;for(h=e.a,n=new ar,f=0,i=new P(e.d);i.al.d&&(b=l.d+l.a+h));t.c.d=b,n.a.yc(t,n),f=k.Math.max(f,t.c.d+t.c.a)}return f}function DIn(e,n,t){var i,r,c,o,l,f;for(o=u(C(e,(me(),pie)),16).Jc();o.Ob();){switch(c=u(o.Pb(),9),u(C(c,(Oe(),ku)),165).g){case 2:Or(c,n);break;case 4:Or(c,t)}for(r=new Xn(Qn(wh(c).a.Jc(),new ee));ht(r);)i=u(ct(r),17),!(i.c&&i.d)&&(l=!i.d,f=u(C(i,Q3e),12),l?Gr(i,f):fc(i,f))}}function Ic(){Ic=Y,ZJ=new h2("COMMENTS",0),Kl=new h2("EXTERNAL_PORTS",1),ux=new h2("HYPEREDGES",2),eH=new h2("HYPERNODES",3),A7=new h2("NON_FREE_PORTS",4),P3=new h2("NORTH_SOUTH_PORTS",5),ox=new h2(CQe,6),S7=new h2("CENTER_LABELS",7),x7=new h2("END_LABELS",8),nH=new h2("PARTITIONS",9)}function _In(e,n,t,i,r){return i<0?(i=a3(e,r,F(z(He,1),Ae,2,6,[vZ,yZ,kZ,jZ,ay,EZ,SZ,xZ,AZ,MZ,CZ,TZ]),n),i<0&&(i=a3(e,r,F(z(He,1),Ae,2,6,["Jan","Feb","Mar","Apr",ay,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),n)),i<0?!1:(t.k=i,!0)):i>0?(t.k=i-1,!0):!1}function LIn(e,n,t,i,r){return i<0?(i=a3(e,r,F(z(He,1),Ae,2,6,[vZ,yZ,kZ,jZ,ay,EZ,SZ,xZ,AZ,MZ,CZ,TZ]),n),i<0&&(i=a3(e,r,F(z(He,1),Ae,2,6,["Jan","Feb","Mar","Apr",ay,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),n)),i<0?!1:(t.k=i,!0)):i>0?(t.k=i-1,!0):!1}function PIn(e,n,t,i,r,c){var o,l,f,h;if(l=32,i<0){if(n[0]>=e.length||(l=rc(e,n[0]),l!=43&&l!=45)||(++n[0],i=Cz(e,n),i<0))return!1;l==45&&(i=-i)}return l==32&&n[0]-t==2&&r.b==2&&(f=new r$,h=f.q.getFullYear()-Q0+Q0-80,o=h%100,c.a=i==o,i+=(h/100|0)*100+(i=0?J0(e):lE(J0(Od(e)))),YS[n]=N$(qh(e,n),0)?J0(qh(e,n)):lE(J0(Od(qh(e,n)))),e=hc(e,5);for(;n=h&&(f=i);f&&(b=k.Math.max(b,f.a.o.a)),b>y&&(p=h,y=b)}return p}function FIn(e){var n,t,i,r,c,o,l;for(c=new kd(u(Nt(new Op),51)),l=Ir,t=new P(e.d);t.arWe?Tr(f,e.b):i<=rWe&&i>cWe?Tr(f,e.d):i<=cWe&&i>uWe?Tr(f,e.c):i<=uWe&&Tr(f,e.a),c=aXe(e,f,c);return r}function hXe(e,n,t,i){var r,c,o,l,f,h;for(r=(i.c+i.a)/2,qs(n.j),Vt(n.j,r),qs(t.e),Vt(t.e,r),h=new bAe,l=new P(e.f);l.a1,l&&(i=new Ee(r,t.b),Vt(n.a,i)),xE(n.a,F(z(Lr,1),Ae,8,0,[y,p]))}function Dbe(e,n,t){var i,r;for(n=48;t--)dA[t]=t-48<<24>>24;for(i=70;i>=65;i--)dA[i]=i-65+10<<24>>24;for(r=102;r>=97;r--)dA[r]=r-97+10<<24>>24;for(c=0;c<10;c++)OG[c]=48+c&yr;for(e=10;e<=15;e++)OG[e]=65+e-10&yr}function wXe(e,n){n.Tg("Process graph bounds",1),he(e,(Ti(),pre),oT(GY(C2(new mn(null,new yn(e.b,16)),new eU)))),he(e,mre,oT(GY(C2(new mn(null,new yn(e.b,16)),new Bs)))),he(e,mye,oT(HY(C2(new mn(null,new yn(e.b,16)),new jM)))),he(e,vye,oT(HY(C2(new mn(null,new yn(e.b,16)),new EM)))),n.Ug()}function UIn(e){var n,t,i,r,c;r=u(C(e,(Oe(),Ag)),22),c=u(C(e,kH),22),t=new Ee(e.f.a+e.d.b+e.d.c,e.f.b+e.d.d+e.d.a),n=new wc(t),r.Gc((Vs(),Jm))&&(i=u(C(e,T7),8),c.Gc((_s(),X7))&&(i.a<=0&&(i.a=20),i.b<=0&&(i.b=20)),n.a=k.Math.max(t.a,i.a),n.b=k.Math.max(t.b,i.b)),Fe(ze(C(e,Bie)))||mLn(e,t,n)}function XIn(e){var n,t,i,r,c,o,l;for(n=!1,t=0,r=new P(e.d.b);r.a>19!=0)return"-"+pXe(t8(e));for(t=e,i="";!(t.l==0&&t.m==0&&t.h==0);){if(r=lY(rF),t=mge(t,r,!0),n=""+IAe(tb),!(t.l==0&&t.m==0&&t.h==0))for(c=9-n.length;c>0;c--)n="0"+n;i=n+i}return i}function KIn(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var e="__proto__",n=Object.create(null);if(n[e]!==void 0)return!1;var t=Object.getOwnPropertyNames(n);return!(t.length!=0||(n[e]=42,n[e]!==42)||Object.getOwnPropertyNames(n).length==0)}function VIn(e,n,t){var i,r,c,o,l,f,h,b,p;for(i=t.c,r=t.d,l=La(n.c),f=La(n.d),i==n.c?(l=vbe(e,l,r),f=mGe(n.d)):(l=mGe(n.c),f=vbe(e,f,r)),h=new XP(n.a),Ki(h,l,h.a,h.a.a),Ki(h,f,h.c.b,h.c),o=n.c==i,p=new uxe,c=0;c=e.a||!b0e(n,t))return-1;if(I2(u(i.Kb(n),20)))return 1;for(r=0,o=u(i.Kb(n),20).Jc();o.Ob();)if(c=u(o.Pb(),17),f=c.c.i==n?c.d.i:c.c.i,l=Pbe(e,f,t,i),l==-1||(r=k.Math.max(r,l),r>e.c-1))return-1;return r+1}function Ha(){Ha=Y,KH=new Yr((Xt(),B7),1.3),Cln=new Yr($m,($n(),!1)),k6e=new yw(15),zx=new Yr(s1,k6e),Fx=new Yr(Qd,15),Sln=DI,Mln=Ig,Tln=n5,Oln=bb,Aln=e5,Ure=$I,Nln=Rm,x6e=(nge(),kln),S6e=yln,Kre=Eln,A6e=jln,y6e=pln,Xre=wln,v6e=gln,E6e=vln,p6e=PI,xln=pce,MI=hln,w6e=aln,CI=dln,j6e=mln,m6e=bln}function mXe(e,n){var t,i,r,c,o,l;if(ue(n)===ue(e))return!0;if(!X(n,16)||(i=u(n,16),l=e.gc(),i.gc()!=l))return!1;if(o=i.Jc(),e.Wi()){for(t=0;t0){if(e.Zj(),n!=null){for(c=0;c>24;case 97:case 98:case 99:case 100:case 101:case 102:return e-97+10<<24>>24;case 65:case 66:case 67:case 68:case 69:case 70:return e-65+10<<24>>24;default:throw R(new fh("Invalid hexadecimal"))}}function yXe(e,n,t,i){var r,c,o,l,f,h;for(f=iW(e,t),h=iW(n,t),r=!1;f&&h&&(i||nxn(f,h,t));)o=iW(f,t),l=iW(h,t),cO(n),cO(e),c=f.c,iZ(f,!1),iZ(h,!1),t?(H0(n,h.p,c),n.p=h.p,H0(e,f.p+1,c),e.p=f.p):(H0(e,f.p,c),e.p=f.p,H0(n,h.p+1,c),n.p=h.p),Or(f,null),Or(h,null),f=o,h=l,r=!0;return r}function kXe(e){switch(e.g){case 0:return new uP;case 1:return new oP;case 3:return new OMe;case 4:return new C6;case 5:return new cNe;case 6:return new ko;case 2:return new sP;case 7:return new EC;case 8:return new jC;default:throw R(new Un("No implementation is available for the layerer "+(e.f!=null?e.f:""+e.g)))}}function ZIn(e,n,t,i){var r,c,o,l,f;for(r=!1,c=!1,l=new P(i.j);l.a=n.length)throw R(new jo("Greedy SwitchDecider: Free layer not in graph."));this.c=n[e],this.e=new NT(i),RY(this.e,this.c,(Ie(),Yn)),this.i=new NT(i),RY(this.i,this.c,nt),this.f=new OIe(this.c),this.a=!c&&r.i&&!r.s&&this.c[0].k==(Fn(),wr),this.a&&kCn(this,e,n.length)}function EXe(e,n){var t,i,r,c,o,l;c=!e.B.Gc((_s(),KI)),o=e.B.Gc(Oce),e.a=new uJe(o,c,e.c),e.n&&sae(e.a.n,e.n),AX(e.g,(wa(),No),e.a),n||(i=new HE(1,c,e.c),i.n.a=e.k,I4(e.p,(Ie(),Vn),i),r=new HE(1,c,e.c),r.n.d=e.k,I4(e.p,bt,r),l=new HE(0,c,e.c),l.n.c=e.k,I4(e.p,Yn,l),t=new HE(0,c,e.c),t.n.b=e.k,I4(e.p,nt,t))}function nDn(e){var n,t,i;switch(n=u(C(e.d,(Oe(),Y1)),222),n.g){case 2:t=HRn(e);break;case 3:t=(i=new Te,er(li(So(lu(lu(new mn(null,new yn(e.d.b,16)),new nw),new n_),new yk),new h0),new Gje(i)),i);break;default:throw R(new Uc("Compaction not supported for "+n+" edges."))}dPn(e,t),cc(new it(e.g),new zje(e))}function tDn(e,n){var t,i,r,c,o,l,f;if(n.Tg("Process directions",1),t=u(C(e,(Mu(),kp)),86),t!=(vr(),eh))for(r=St(e.b,0);r.b!=r.d.c;){switch(i=u(jt(r),40),l=u(C(i,(Ti(),SI)),15).a,f=u(C(i,xI),15).a,t.g){case 4:f*=-1;break;case 1:c=l,l=f,f=c;break;case 2:o=l,l=-f,f=o}he(i,SI,ve(l)),he(i,xI,ve(f))}n.Ug()}function iDn(e){var n,t,i,r,c,o,l,f;for(f=new zPe,l=new P(e.a);l.a0&&n=0)return!1;if(n.p=t.b,Ce(t.e,n),r==(Fn(),dr)||r==wo){for(o=new P(n.j);o.ae.d[l.p]&&(t+=Hae(e.b,c),I0(e.a,ve(c)))):++o;for(t+=e.b.d*o;!jj(e.a);)Ehe(e.b,u(N4(e.a),15).a)}return t}function _Xe(e){var n,t,i,r,c,o;return c=0,n=ff(e),n.ik()&&(c|=4),(e.Bb&as)!=0&&(c|=2),X(e,103)?(t=u(e,19),r=Oc(t),(t.Bb&Ru)!=0&&(c|=32),r&&(dt(O2(r)),c|=8,o=r.t,(o>1||o==-1)&&(c|=16),(r.Bb&Ru)!=0&&(c|=64)),(t.Bb&Ec)!=0&&(c|=V0),c|=Gf):X(n,459)?c|=512:(i=n.ik(),i&&(i.i&1)!=0&&(c|=256)),(e.Bb&512)!=0&&(c|=128),c}function gDn(e,n){var t;return e.f==Gce?(t=Cw(Vc((ls(),nc),n)),e.e?t==4&&n!=(cy(),Zy)&&n!=(cy(),Wy)&&n!=(cy(),qce)&&n!=(cy(),Uce):t==2):e.d&&(e.d.Gc(n)||e.d.Gc($4(Vc((ls(),nc),n)))||e.d.Gc(w3((ls(),nc),e.b,n)))?!0:e.f&&jbe((ls(),e.f),FT(Vc(nc,n)))?(t=Cw(Vc(nc,n)),e.e?t==4:t==2):!1}function wDn(e,n){var t,i,r,c,o,l,f,h;for(c=new Te,n.b.c.length=0,t=u(gs(Eae(new mn(null,new yn(new it(e.a.b),1))),Cs(new zi,new bi,new Cc,F(z(Qo,1),je,130,0,[(zl(),Yo)]))),16),r=t.Jc();r.Ob();)if(i=u(r.Pb(),15),o=Pae(e.a,i),o.b!=0)for(l=new Xu(n),qn(c.c,l),l.p=i.a,h=St(o,0);h.b!=h.d.c;)f=u(jt(h),9),Or(f,l);Sr(n.b,c)}function LW(e){var n,t,i,r,c,o,l;for(l=new wt,i=new P(e.a.b);i.agg&&(r-=gg),l=u(ke(i,Uy),8),h=l.a,p=l.b+e,c=k.Math.atan2(p,h),c<0&&(c+=gg),c+=n,c>gg&&(c-=gg),Na(),Rf(1e-10),k.Math.abs(r-c)<=1e-10||r==c||isNaN(r)&&isNaN(c)?0:rc?1:Bb(isNaN(r),isNaN(c))}function Fbe(e,n,t,i){var r,c,o;n&&(c=ne(re(C(n,(Ti(),Vd))))+i,o=t+ne(re(C(n,RH)))/2,he(n,SI,ve(Rt(Lu(k.Math.round(c))))),he(n,xI,ve(Rt(Lu(k.Math.round(o))))),n.d.b==0||Fbe(e,u(R$((r=St(new S1(n).a.d,0),new Cv(r))),40),t+ne(re(C(n,RH)))+e.b,i+ne(re(C(n,$7)))),C(n,yre)!=null&&Fbe(e,u(C(n,yre),40),t,i))}function yDn(e,n){var t,i,r,c;if(c=u(ke(e,(Xt(),t5)),64).g-u(ke(n,t5),64).g,c!=0)return c;if(t=u(ke(e,jce),15),i=u(ke(n,jce),15),t&&i&&(r=t.a-i.a,r!=0))return r;switch(u(ke(e,t5),64).g){case 1:return ji(e.i,n.i);case 2:return ji(e.j,n.j);case 3:return ji(n.i,e.i);case 4:return ji(n.j,e.j);default:throw R(new Uc(dwe))}}function Jbe(e){var n,t,i;return(e.Db&64)!=0?gW(e):(n=new tl(R2e),t=e.k,t?Kt(Kt((n.a+=' "',n),t),'"'):(!e.n&&(e.n=new we(Eu,e,1,7)),e.n.i>0&&(i=(!e.n&&(e.n=new we(Eu,e,1,7)),u(K(e.n,0),157)).a,!i||Kt(Kt((n.a+=' "',n),i),'"'))),Kt(ww(Kt(ww(Kt(ww(Kt(ww((n.a+=" (",n),e.i),","),e.j)," | "),e.g),","),e.f),")"),n.a)}function LXe(e){var n,t,i;return(e.Db&64)!=0?gW(e):(n=new tl(B2e),t=e.k,t?Kt(Kt((n.a+=' "',n),t),'"'):(!e.n&&(e.n=new we(Eu,e,1,7)),e.n.i>0&&(i=(!e.n&&(e.n=new we(Eu,e,1,7)),u(K(e.n,0),157)).a,!i||Kt(Kt((n.a+=' "',n),i),'"'))),Kt(ww(Kt(ww(Kt(ww(Kt(ww((n.a+=" (",n),e.i),","),e.j)," | "),e.g),","),e.f),")"),n.a)}function kDn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A;for(S=-1,A=0,b=n,p=0,y=b.length;p0&&++A;++S}return A}function jDn(e,n){var t,i,r,c,o;for(n==(DE(),ure)&&qO(u(vi(e.a,(X2(),nI)),16)),r=u(vi(e.a,(X2(),nI)),16).Jc();r.Ob();)switch(i=u(r.Pb(),107),t=u(Le(i.j,0),113).d.j,c=new bs(i.j),Tr(c,new I5),n.g){case 2:sW(e,c,t,($w(),ub),1);break;case 1:case 0:o=hNn(c),sW(e,new N0(c,0,o),t,($w(),ub),0),sW(e,new N0(c,o,c.c.length),t,ub,1)}}function EDn(e){var n,t,i,r,c,o,l;for(r=u(C(e,(me(),bp)),9),i=e.j,t=(kn(0,i.c.length),u(i.c[0],12)),o=new P(r.j);o.ar.p?(Ar(c,bt),c.d&&(l=c.o.b,n=c.a.b,c.a.b=l-n)):c.j==bt&&r.p>e.p&&(Ar(c,Vn),c.d&&(l=c.o.b,n=c.a.b,c.a.b=-(l-n)));break}return r}function Hbe(e,n){var t,i,r,c,o,l,f;if(n==null||n.length==0)return null;if(r=u(lo(e.a,n),144),!r){for(i=(l=new ot(e.b).a.vc().Jc(),new Hi(l));i.a.Ob();)if(t=(c=u(i.a.Pb(),45),u(c.kd(),144)),o=t.c,f=n.length,bn(o.substr(o.length-f,f),n)&&(n.length==o.length||rc(o,o.length-n.length-1)==46)){if(r)return null;r=t}r&&Kc(e.a,n,r)}return r}function T8(e,n,t){var i,r,c,o,l,f,h,b,p,y;for(c=new Ee(n,t),b=new P(e.a);b.a1,l&&(i=new Ee(r,t.b),Vt(n.a,i)),xE(n.a,F(z(Lr,1),Ae,8,0,[y,p]))}function X0(){X0=Y,CH=new d2(va,0),pI=new d2("NIKOLOV",1),mI=new d2("NIKOLOV_PIXEL",2),P4e=new d2("NIKOLOV_IMPROVED",3),$4e=new d2("NIKOLOV_IMPROVED_PIXEL",4),L4e=new d2("DUMMYNODE_PERCENTAGE",5),R4e=new d2("NODECOUNT_PERCENTAGE",6),TH=new d2("NO_BOUNDARY",7),_7=new d2("MODEL_ORDER_LEFT_TO_RIGHT",8),xx=new d2("MODEL_ORDER_RIGHT_TO_LEFT",9)}function $W(e,n){var t,i,r,c,o,l,f,h,b,p,y,S;return b=null,y=hbe(e,n),i=null,l=u(ke(n,(Xt(),Tfn)),300),l?i=l:i=(EE(),qI),S=i,S==(EE(),qI)&&(r=null,h=u(zn(e.r,y),300),h?r=h:r=Tce,S=r),ei(e.r,n,S),c=null,f=u(ke(n,Cfn),278),f?c=f:c=(s8(),BI),p=c,p==(s8(),BI)&&(o=null,t=u(zn(e.b,y),278),t?o=t:o=sG,p=o),b=u(ei(e.b,n,p),278),b}function _Dn(e){var n,t,i,r,c;for(i=e.length,n=new Ej,c=0;c=40,o&&D_n(e),qLn(e),hIn(e),t=RFe(e),i=0;t&&i0&&Vt(e.g,c)):(e.d[o]-=h+1,e.d[o]<=0&&e.a[o]>0&&Vt(e.f,c))))}function KXe(e,n,t,i){var r,c,o,l,f,h,b;for(f=new Ee(t,i),Nr(f,u(C(n,(Ti(),P7)),8)),b=St(n.b,0);b.b!=b.d.c;)h=u(jt(b),40),pi(h.e,f),Vt(e.b,h);for(l=u(gs(yae(new mn(null,new yn(n.a,16))),Cs(new zi,new bi,new Cc,F(z(Qo,1),je,130,0,[(zl(),Yo)]))),16).Jc();l.Ob();){for(o=u(l.Pb(),65),c=St(o.a,0);c.b!=c.d.c;)r=u(jt(c),8),r.a+=f.a,r.b+=f.b;Vt(e.a,o)}}function Qbe(e,n){var t,i,r,c;if(0<(X(e,18)?u(e,18).gc():ha(e.Jc()))){if(r=n,1=0&&f1)&&n==1&&u(e.a[e.b],9).k==(Fn(),Uu)?sy(u(e.a[e.b],9),(fl(),l1)):i&&(!t||(e.c-e.b&e.a.length-1)>1)&&n==1&&u(e.a[e.c-1&e.a.length-1],9).k==(Fn(),Uu)?sy(u(e.a[e.c-1&e.a.length-1],9),(fl(),gb)):(e.c-e.b&e.a.length-1)==2?(sy(u(OE(e),9),(fl(),l1)),sy(u(OE(e),9),gb)):NOn(e,r),zae(e)}function QDn(e){var n,t,i,r,c,o,l,f;for(f=new wt,n=new wX,o=e.Jc();o.Ob();)r=u(o.Pb(),9),l=kw(iT(new Lb,r),n),Ko(f.f,r,l);for(c=e.Jc();c.Ob();)for(r=u(c.Pb(),9),i=new Xn(Qn(Ii(r).a.Jc(),new ee));ht(i);)t=u(ct(i),17),!uc(t)&&Jf(Of(Tf(Cf(Nf(new tf,k.Math.max(1,u(C(t,(Oe(),g4e)),15).a)),1),u(zn(f,t.c.i),124)),u(zn(f,t.d.i),124)));return n}function QXe(e,n,t,i){var r,c,o,l,f,h,b,p,y,S;if(C8n(e,n,t),c=n[t],S=i?(Ie(),Yn):(Ie(),nt),Wwn(n.length,t,i)){for(r=n[i?t-1:t+1],rhe(e,r,i?(Nc(),Io):(Nc(),ys)),f=c,b=0,y=f.length;bc*2?(b=new gB(p),h=us(o)/Gs(o),f=oZ(b,n,new o4,t,i,r,h),pi(fa(b.e),f),p.c.length=0,c=0,qn(p.c,b),qn(p.c,o),c=us(b)*Gs(b)+us(o)*Gs(o)):(qn(p.c,o),c+=us(o)*Gs(o));return p}function ZDn(e,n){var t,i,r,c,o,l,f;for(n.Tg("Port order processing",1),f=u(C(e,(Oe(),b4e)),421),i=new P(e.b);i.at?n:t;h<=p;++h)h==t?l=i++:(c=r[h],b=A.$l(c.Jk()),h==n&&(f=h==p&&!b?i-1:i),b&&++i);return y=u(BE(e,n,t),75),l!=f&&f9(e,new rO(e.e,7,o,ve(l),S.kd(),f)),y}}else return u(EW(e,n,t),75);return u(BE(e,n,t),75)}function Wbe(e,n){var t,i,r,c,o,l,f,h,b,p;for(p=0,c=new Fv,I0(c,n);c.b!=c.c;)for(f=u(N4(c),218),h=0,b=u(C(n.j,(Oe(),o1)),269),u(C(n.j,gx),329),o=ne(re(C(n.j,aI))),l=ne(re(C(n.j,Mie))),b!=(F1(),fb)&&(h+=o*ROn(n.j,f.e,b),h+=l*kDn(n.j,f.e)),p+=yHe(f.d,f.e)+h,r=new P(f.b);r.a=0&&(l=bxn(e,o),!(l&&(h<22?f.l|=1<>>1,o.m=b>>>1|(p&1)<<21,o.l=y>>>1|(b&1)<<21,--h;return t&&eQ(f),c&&(i?(tb=t8(e),r&&(tb=Aze(tb,(U9(),Eme)))):tb=_o(e.l,e.m,e.h)),f}function t_n(e,n){var t,i,r,c,o,l,f,h,b,p;for(h=e.e[n.c.p][n.p]+1,f=n.c.a.c.length+1,l=new P(e.a);l.a0&&(Wn(0,e.length),e.charCodeAt(0)==45||(Wn(0,e.length),e.charCodeAt(0)==43))?1:0,i=o;it)throw R(new fh(Zw+e+'"'));return l}function i_n(e){var n,t,i,r,c,o,l;for(o=new xi,c=new P(e.a);c.a=e.length)return t.o=0,!0;switch(rc(e,n[0])){case 43:r=1;break;case 45:r=-1;break;default:return t.o=0,!0}if(++n[0],c=n[0],o=Cz(e,n),o==0&&n[0]==c)return!1;if(n[0]l&&(l=r,b.c.length=0),r==l&&Ce(b,new jc(t.c.i,t)));En(),Tr(b,e.c),zb(e.b,f.p,b)}}function l_n(e,n){var t,i,r,c,o,l,f,h,b;for(o=new P(n.b);o.al&&(l=r,b.c.length=0),r==l&&Ce(b,new jc(t.d.i,t)));En(),Tr(b,e.c),zb(e.f,f.p,b)}}function f_n(e){var n,t,i,r,c,o,l;for(c=_a(e),r=new st((!e.e&&(e.e=new In(pr,e,7,4)),e.e));r.e!=r.i.gc();)if(i=u(ft(r),85),l=iu(u(K((!i.c&&(i.c=new In(mt,i,5,8)),i.c),0),84)),!P2(l,c))return!0;for(t=new st((!e.d&&(e.d=new In(pr,e,8,5)),e.d));t.e!=t.i.gc();)if(n=u(ft(t),85),o=iu(u(K((!n.b&&(n.b=new In(mt,n,4,7)),n.b),0),84)),!P2(o,c))return!0;return!1}function a_n(e){var n,t,i,r,c;i=u(C(e,(me(),mi)),26),c=u(ke(i,(Oe(),Ag)),182).Gc((Vs(),_g)),e.e||(r=u(C(e,po),22),n=new Ee(e.f.a+e.d.b+e.d.c,e.f.b+e.d.d+e.d.a),r.Gc((Ic(),Kl))?(Ei(i,Zi,(Br(),to)),Yw(i,n.a,n.b,!1,!0)):Fe(ze(ke(i,Bie)))||Yw(i,n.a,n.b,!0,!0)),c?Ei(i,Ag,rn(_g)):Ei(i,Ag,(t=u(la(iA),10),new _l(t,u(Df(t,t.length),10),0)))}function h_n(e,n){var t,i,r,c,o,l,f,h;if(h=ze(C(n,(Mu(),jsn))),h==null||(Ln(h),h)){for(FTn(e,n),r=new Te,f=St(n.b,0);f.b!=f.d.c;)o=u(jt(f),40),t=P0e(e,o,null),t&&(Pu(t,n),qn(r.c,t));if(e.a=null,e.b=null,r.c.length>1)for(i=new P(r);i.a=0&&l!=t&&(c=new Dr(e,1,l,o,null),i?i.lj(c):i=c),t>=0&&(c=new Dr(e,1,t,l==t?o:null,n),i?i.lj(c):i=c)),i}function ZXe(e){var n,t,i;if(e.b==null){if(i=new vd,e.i!=null&&(Bc(i,e.i),i.a+=":"),(e.f&256)!=0){for((e.f&256)!=0&&e.a!=null&&(x5n(e.i)||(i.a+="//"),Bc(i,e.a)),e.d!=null&&(i.a+="/",Bc(i,e.d)),(e.f&16)!=0&&(i.a+="/"),n=0,t=e.j.length;ny?!1:(p=(f=aS(i,y,!1),f.a),b+l+p<=n.b&&(tO(t,c-t.s),t.c=!0,tO(i,c-t.s),LO(i,t.s,t.t+t.d+l),i.k=!0,i1e(t.q,i),S=!0,r&&(kB(n,i),i.j=n,e.c.length>o&&(BO((kn(o,e.c.length),u(e.c[o],186)),i),(kn(o,e.c.length),u(e.c[o],186)).a.c.length==0&&Cd(e,o)))),S)}function v_n(e,n){var t,i,r,c,o,l;if(n.Tg("Partition midprocessing",1),r=new Nw,er(li(new mn(null,new yn(e.a,16)),new m6),new Sje(r)),r.d!=0){for(l=u(gs(Eae((c=r.i,new mn(null,(c||(r.i=new Hv(r,r.c))).Lc()))),Cs(new zi,new bi,new Cc,F(z(Qo,1),je,130,0,[(zl(),Yo)]))),16),i=l.Jc(),t=u(i.Pb(),15);i.Ob();)o=u(i.Pb(),15),aNn(u(vi(r,t),22),u(vi(r,o),22)),t=o;n.Ug()}}function oS(e,n){var t,i,r,c,o;if(e.Ab){if(e.Ab){if(o=e.Ab.i,o>0){if(r=u(e.Ab.g,1995),n==null){for(c=0;ct.s&&lf+A&&(O=p.g+y.g,y.a=(y.g*y.a+p.g*p.a)/O,y.g=O,p.f=y,t=!0)),c=l,p=y;return t}function j_n(e,n,t){var i,r,c,o,l,f,h,b;for(t.Tg(XQe,1),Hu(e.b),Hu(e.a),l=null,c=St(n.b,0);!l&&c.b!=c.d.c;)h=u(jt(c),40),Fe(ze(C(h,(Ti(),db))))&&(l=h);for(f=new xi,Ki(f,l,f.c.b,f.c),IVe(e,f),b=St(n.b,0);b.b!=b.d.c;)h=u(jt(b),40),o=Pt(C(h,(Ti(),_x))),r=lo(e.b,o)!=null?u(lo(e.b,o),15).a:0,he(h,wre,ve(r)),i=1+(lo(e.a,o)!=null?u(lo(e.a,o),15).a:0),he(h,pye,ve(i));t.Ug()}function cKe(e){a2(e,new qw(l2(u2(s2(o2(new gd,cp),"ELK Box"),"Algorithm for packing of unconnected boxes, i.e. graphs without edges."),new UM))),Se(e,cp,sm,g9e),Se(e,cp,om,15),Se(e,cp,xN,ve(0)),Se(e,cp,T2e,_e(h9e)),Se(e,cp,k3,_e(wfn)),Se(e,cp,py,_e(pfn)),Se(e,cp,U8,pWe),Se(e,cp,ES,_e(d9e)),Se(e,cp,my,_e(b9e)),Se(e,cp,O2e,_e(fce)),Se(e,cp,OF,_e(gfn))}function uKe(e,n){var t,i,r,c,o,l,f,h,b;if(r=e.i,o=r.o.a,c=r.o.b,o<=0&&c<=0)return Ie(),ju;switch(h=e.n.a,b=e.n.b,l=e.o.a,t=e.o.b,n.g){case 2:case 1:if(h<0)return Ie(),Yn;if(h+l>o)return Ie(),nt;break;case 4:case 3:if(b<0)return Ie(),Vn;if(b+t>c)return Ie(),bt}return f=(h+l/2)/o,i=(b+t/2)/c,f+i<=1&&f-i<=0?(Ie(),Yn):f+i>=1&&f-i>=0?(Ie(),nt):i<.5?(Ie(),Vn):(Ie(),bt)}function oKe(e,n,t,i,r,c,o){var l,f,h,b,p,y;for(y=new y4,h=n.Jc();h.Ob();)for(l=u(h.Pb(),837),p=new P(l.Pf());p.a0?l.a?(h=l.b.Kf().b,r>h&&(e.v||l.c.d.c.length==1?(o=(r-h)/2,l.d.d=o,l.d.a=o):(t=u(Le(l.c.d,0),187).Kf().b,i=(t-h)/2,l.d.d=k.Math.max(0,i),l.d.a=r-i-h))):l.d.a=e.t+r:uE(e.u)&&(c=m0e(l.b),c.d<0&&(l.d.d=-c.d),c.d+c.a>l.b.Kf().b&&(l.d.a=c.d+c.a-l.b.Kf().b))}function Hf(){Hf=Y,Ay=new Yr((Xt(),RI),ve(1)),kJ=new Yr(Qd,80),xtn=new Yr(q9e,5),gtn=new Yr(B7,q8),Etn=new Yr(Sce,ve(1)),Stn=new Yr(xce,($n(),!0)),cve=new yw(50),ktn=new Yr(s1,cve),tve=PI,uve=Vx,wtn=new Yr(bce,!1),rve=$I,vtn=$m,ytn=bb,mtn=Ig,ptn=e5,jtn=Rm,ive=(C0e(),stn),jte=htn,yJ=otn,kte=ltn,ove=atn,Ctn=J7,Ttn=uG,Mtn=zm,Atn=F7,sve=(V4(),Hm),new Yr(Ky,sve)}function x_n(e,n){var t;switch(aO(e)){case 6:return $r(n);case 7:return g2(n);case 8:return b2(n);case 3:return Array.isArray(n)&&(t=aO(n),!(t>=14&&t<=16));case 11:return n!=null&&typeof n===hZ;case 12:return n!=null&&(typeof n===fN||typeof n==hZ);case 0:return $Q(n,e.__elementTypeId$);case 2:return mV(n)&&n.Rm!==wn;case 1:return mV(n)&&n.Rm!==wn||$Q(n,e.__elementTypeId$);default:return!0}}function A_n(e){var n,t,i,r;i=e.o,v2(),e.A.dc()||gi(e.A,Qme)?r=i.a:(e.D?r=k.Math.max(i.a,WE(e.f)):r=WE(e.f),e.A.Gc((Vs(),UI))&&!e.B.Gc((_s(),rA))&&(r=k.Math.max(r,WE(u(zc(e.p,(Ie(),Vn)),253))),r=k.Math.max(r,WE(u(zc(e.p,bt),253)))),n=tze(e),n&&(r=k.Math.max(r,n.a))),Fe(ze(e.e.Rf().mf((Xt(),$m))))?i.a=k.Math.max(i.a,r):i.a=r,t=e.f.i,t.c=0,t.b=r,GW(e.f)}function sKe(e,n){var t,i,r,c;return i=k.Math.min(k.Math.abs(e.c-(n.c+n.b)),k.Math.abs(e.c+e.b-n.c)),c=k.Math.min(k.Math.abs(e.d-(n.d+n.a)),k.Math.abs(e.d+e.a-n.d)),t=k.Math.abs(e.c+e.b/2-(n.c+n.b/2)),t>e.b/2+n.b/2||(r=k.Math.abs(e.d+e.a/2-(n.d+n.a/2)),r>e.a/2+n.a/2)?1:t==0&&r==0?0:t==0?c/r+1:r==0?i/t+1:k.Math.min(i/t,c/r)+1}function M_n(e,n){var t,i,r,c,o,l,f;for(c=0,l=0,f=0,r=new P(e.f.e);r.a0&&e.d!=(kE(),xte)&&(l+=o*(i.d.a+e.a[n.a][i.a]*(n.d.a-i.d.a)/t)),t>0&&e.d!=(kE(),Ete)&&(f+=o*(i.d.b+e.a[n.a][i.a]*(n.d.b-i.d.b)/t)));switch(e.d.g){case 1:return new Ee(l/c,n.d.b);case 2:return new Ee(n.d.a,f/c);default:return new Ee(l/c,f/c)}}function lKe(e){var n,t,i,r,c,o;for(t=(!e.a&&(e.a=new mr(yl,e,5)),e.a).i+2,o=new xo(t),Ce(o,new Ee(e.j,e.k)),er(new mn(null,(!e.a&&(e.a=new mr(yl,e,5)),new yn(e.a,16))),new iSe(o)),Ce(o,new Ee(e.b,e.c)),n=1;n0&&(EO(f,!1,(vr(),Zc)),EO(f,!0,ru)),Ao(n.g,new nCe(e,t)),ei(e.g,n,t)}function nge(){nge=Y,mln=new an(s2e,($n(),!1)),ve(-1),aln=new an(l2e,ve(-1)),ve(-1),hln=new an(f2e,ve(-1)),dln=new an(a2e,!1),bln=new an(h2e,!1),g6e=(QR(),Vre),jln=new an(d2e,g6e),Eln=new an(b2e,-1),b6e=(VB(),qre),kln=new an(g2e,b6e),yln=new an(w2e,!0),h6e=(uB(),Yre),pln=new an(p2e,h6e),wln=new an(m2e,!1),ve(1),gln=new an(v2e,ve(1)),d6e=(GB(),Qre),vln=new an(y2e,d6e)}function hKe(){hKe=Y;var e;for(Nme=F(z($t,1),ni,30,15,[-1,-1,30,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5]),cte=le($t,ni,30,37,15,1),tnn=F(z($t,1),ni,30,15,[-1,-1,63,40,32,28,25,23,21,20,19,19,18,18,17,17,16,16,16,15,15,15,15,14,14,14,14,14,14,13,13,13,13,13,13,13,13]),Ime=le(Ap,xYe,30,37,14,1),e=2;e<=36;e++)cte[e]=lc(k.Math.pow(e,Nme[e])),Ime[e]=FO(bN,cte[e])}function C_n(e){var n;if((!e.a&&(e.a=new we($i,e,6,6)),e.a).i!=1)throw R(new Un(FWe+(!e.a&&(e.a=new we($i,e,6,6)),e.a).i));return n=new xs,VY(u(K((!e.b&&(e.b=new In(mt,e,4,7)),e.b),0),84))&&ac(n,YVe(e,VY(u(K((!e.b&&(e.b=new In(mt,e,4,7)),e.b),0),84)),!1)),VY(u(K((!e.c&&(e.c=new In(mt,e,5,8)),e.c),0),84))&&ac(n,YVe(e,VY(u(K((!e.c&&(e.c=new In(mt,e,5,8)),e.c),0),84)),!0)),n}function dKe(e,n){var t,i,r,c,o;for(n.d?r=e.a.c==(dh(),yp)?cr(n.b):Ii(n.b):r=e.a.c==(dh(),Kd)?cr(n.b):Ii(n.b),c=!1,i=new Xn(Qn(r.a.Jc(),new ee));ht(i);)if(t=u(ct(i),17),o=Fe(e.a.f[e.a.g[n.b.p].p]),!(!o&&!uc(t)&&t.c.i.c==t.d.i.c)&&!(Fe(e.a.n[e.a.g[n.b.p].p])||Fe(e.a.n[e.a.g[n.b.p].p]))&&(c=!0,rf(e.b,e.a.g[QSn(t,n.b).p])))return n.c=!0,n.a=t,n;return n.c=c,n.a=null,n}function tge(e,n,t){var i,r,c,o,l,f,h;if(i=t.gc(),i==0)return!1;if(e.Nj())if(f=e.Oj(),lde(e,n,t),o=i==1?e.Gj(3,null,t.Jc().Pb(),n,f):e.Gj(5,null,t,n,f),e.Kj()){for(l=i<100?null:new k0(i),c=n+i,r=n;r0){for(o=0;o>16==-15&&e.Cb.Vh()&&EY(new mY(e.Cb,9,13,t,e.c,$d(Ts(u(e.Cb,62)),e))):X(e.Cb,88)&&e.Db>>16==-23&&e.Cb.Vh()&&(n=e.c,X(n,88)||(n=(jn(),jf)),X(t,88)||(t=(jn(),jf)),EY(new mY(e.Cb,9,10,t,n,$d(Vu(u(e.Cb,29)),e)))))),e.c}function wKe(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A;if(n==t)return!0;if(n=ube(e,n),t=ube(e,t),i=GQ(n),i){if(b=GQ(t),b!=i)return b?(f=i.kk(),A=b.kk(),f==A&&f!=null):!1;if(o=(!n.d&&(n.d=new mr(Rc,n,1)),n.d),c=o.i,y=(!t.d&&(t.d=new mr(Rc,t,1)),t.d),c==y.i){for(h=0;h0,l=KB(n,c),fle(t?l.b:l.g,n),r3(l).c.length==1&&Ki(i,l,i.c.b,i.c),r=new jc(c,n),I0(e.o,r),qo(e.e.a,c))}function vKe(e,n){var t,i,r,c,o,l,f;return i=k.Math.abs(vR(e.b).a-vR(n.b).a),l=k.Math.abs(vR(e.b).b-vR(n.b).b),r=0,f=0,t=1,o=1,i>e.b.b/2+n.b.b/2&&(r=k.Math.min(k.Math.abs(e.b.c-(n.b.c+n.b.b)),k.Math.abs(e.b.c+e.b.b-n.b.c)),t=1-r/i),l>e.b.a/2+n.b.a/2&&(f=k.Math.min(k.Math.abs(e.b.d-(n.b.d+n.b.a)),k.Math.abs(e.b.d+e.b.a-n.b.d)),o=1-f/l),c=k.Math.min(t,o),(1-c)*k.Math.sqrt(i*i+l*l)}function __n(e){var n,t,i,r;for(uZ(e,e.e,e.f,(Iw(),hb),!0,e.c,e.i),uZ(e,e.e,e.f,hb,!1,e.c,e.i),uZ(e,e.e,e.f,X3,!0,e.c,e.i),uZ(e,e.e,e.f,X3,!1,e.c,e.i),N_n(e,e.c,e.e,e.f,e.i),i=new qr(e.i,0);i.b=65;t--)ch[t]=t-65<<24>>24;for(i=122;i>=97;i--)ch[i]=i-97+26<<24>>24;for(r=57;r>=48;r--)ch[r]=r-48+52<<24>>24;for(ch[43]=62,ch[47]=63,c=0;c<=25;c++)r0[c]=65+c&yr;for(o=26,f=0;o<=51;++o,f++)r0[o]=97+f&yr;for(e=52,l=0;e<=61;++e,l++)r0[e]=48+l&yr;r0[62]=43,r0[63]=47}function yKe(e,n){var t,i,r,c,o,l;return r=Whe(e),l=Whe(n),r==l?e.e==n.e&&e.a<54&&n.a<54?e.fn.f?1:0:(i=e.e-n.e,t=(e.d>0?e.d:k.Math.floor((e.a-1)*AYe)+1)-(n.d>0?n.d:k.Math.floor((n.a-1)*AYe)+1),t>i+1?r:t0&&(o=Kv(o,IKe(i))),kJe(c,o))):rh&&(y=0,S+=f+n,f=0),T8(o,y,S),t=k.Math.max(t,y+b.a),f=k.Math.max(f,b.b),y+=b.a+n;return new Ee(t+n,S+f+n)}function uge(e,n){var t,i,r,c,o,l,f;if(!_a(e))throw R(new Uc(zWe));if(i=_a(e),c=i.g,r=i.f,c<=0&&r<=0)return Ie(),ju;switch(l=e.i,f=e.j,n.g){case 2:case 1:if(l<0)return Ie(),Yn;if(l+e.g>c)return Ie(),nt;break;case 4:case 3:if(f<0)return Ie(),Vn;if(f+e.f>r)return Ie(),bt}return o=(l+e.g/2)/c,t=(f+e.f/2)/r,o+t<=1&&o-t<=0?(Ie(),Yn):o+t>=1&&o-t>=0?(Ie(),nt):t<.5?(Ie(),Vn):(Ie(),bt)}function $_n(e,n,t,i,r){var c,o;if(c=mc(Rr(n[0],Dc),Rr(i[0],Dc)),e[0]=Rt(c),c=Sw(c,32),t>=r){for(o=1;o0&&(r.b[o++]=0,r.b[o++]=c.b[0]-1),n=1;n0&&(Db(f,f.d-r.d),r.c==(da(),ab)&&iX(f,f.a-r.d),f.d<=0&&f.i>0&&Ki(n,f,n.c.b,n.c)));for(c=new P(e.f);c.a0&&(m0(l,l.i-r.d),r.c==(da(),ab)&&CP(l,l.b-r.d),l.i<=0&&l.d>0&&Ki(t,l,t.c.b,t.c)))}function z_n(e,n,t,i,r){var c,o,l,f,h,b,p,y,S;for(En(),Tr(e,new VM),o=_T(e),S=new Te,y=new Te,l=null,f=0;o.b!=0;)c=u(o.b==0?null:(at(o.b!=0),$l(o,o.a.a)),167),!l||us(l)*Gs(l)/21&&(f>us(l)*Gs(l)/2||o.b==0)&&(p=new gB(y),b=us(l)/Gs(l),h=oZ(p,n,new o4,t,i,r,b),pi(fa(p.e),h),l=p,qn(S.c,p),f=0,y.c.length=0));return Sr(S,y),S}function Wu(e,n,t,i,r){jd();var c,o,l,f,h,b,p;if(Rfe(e,"src"),Rfe(t,"dest"),p=Us(e),f=Us(t),ffe((p.i&4)!=0,"srcType is not an array"),ffe((f.i&4)!=0,"destType is not an array"),b=p.c,o=f.c,ffe((b.i&1)!=0?b==o:(o.i&1)==0,"Array types don't match"),akn(e,n,t,i,r),(b.i&1)==0&&p!=f)if(h=G4(e),c=G4(t),ue(e)===ue(t)&&ni;)ir(c,l,h[--n]);else for(l=i+r;i0),i.a.Xb(i.c=--i.b),p>y+f&&As(i);for(o=new P(S);o.a0),i.a.Xb(i.c=--i.b)}}function J_n(){ai();var e,n,t,i,r,c;if(Kce)return Kce;for(e=new cl(4),tm(e,K0(Une,!0)),bS(e,K0("M",!0)),bS(e,K0("C",!0)),c=new cl(4),i=0;i<11;i++)ho(c,i,i);return n=new cl(4),tm(n,K0("M",!0)),ho(n,4448,4607),ho(n,65438,65439),r=new Vj(2),fg(r,e),fg(r,gA),t=new Vj(2),t.Hm(dR(c,K0("L",!0))),t.Hm(n),t=new D2(3,t),t=new zfe(r,t),Kce=t,Kce}function nm(e,n){var t,i,r,c,o,l,f,h;for(t=new RegExp(n,"g"),f=le(He,Ae,2,0,6,1),i=0,h=e,c=null;;)if(l=t.exec(h),l==null||h==""){f[i]=h;break}else o=l.index,f[i]=(Qr(0,o,h.length),h.substr(0,o)),h=of(h,o+l[0].length,h.length),t.lastIndex=0,c==h&&(f[i]=(Qr(0,1,h.length),h.substr(0,1)),h=(Wn(1,h.length+1),h.substr(1))),c=h,++i;if(e.length>0){for(r=f.length;r>0&&f[r-1]=="";)--r;rb&&(b=f);for(h=k.Math.pow(4,n),b>h&&(h=b),y=(k.Math.log(h)-k.Math.log(1))/n,c=k.Math.exp(y),r=c,o=0;o0&&(p-=i[0]+e.c,i[0]+=e.c),i[2]>0&&(p-=i[2]+e.c),i[1]=k.Math.max(i[1],p),gR(e.a[1],t.c+n.b+i[0]-(i[1]-p)/2,i[1]);for(c=e.a,l=0,h=c.length;l0?(e.n.c.length-1)*e.i:0,i=new P(e.n);i.a1)for(i=St(r,0);i.b!=i.d.c;)for(t=u(jt(i),235),c=0,f=new P(t.e);f.a0&&(n[0]+=e.c,p-=n[0]),n[2]>0&&(p-=n[2]+e.c),n[1]=k.Math.max(n[1],p),wR(e.a[1],i.d+t.d+n[0]-(n[1]-p)/2,n[1]);else for(A=i.d+t.d,S=i.a-t.d-t.a,o=e.a,f=0,b=o.length;f=n.o&&t.f<=n.f||n.a*.5<=t.f&&n.a*1.5>=t.f){if(o=u(Le(n.n,n.n.c.length-1),208),o.e+o.d+t.g+r<=i&&(c=u(Le(n.n,n.n.c.length-1),208),c.f-e.f+t.f<=e.b||e.a.c.length==1))return ede(n,t),!0;if(n.s+t.g<=i&&n.t+n.d+t.f+r<=e.f+e.b)return Ce(n.b,t),l=u(Le(n.n,n.n.c.length-1),208),Ce(n.n,new RR(n.s,l.f+l.a+n.i,n.i)),Dde(u(Le(n.n,n.n.c.length-1),208),t),EKe(n,t),!0}return!1}function qz(e,n,t,i){var r,c,o,l,f;if(f=Po(e.e.Ah(),n),r=u(e.g,122),Tc(),u(n,69).vk()){for(o=0;o0||zw(r.b.d,e.b.d+e.b.a)==0&&i.b<0||zw(r.b.d+r.b.a,e.b.d)==0&&i.b>0){l=0;break}}else l=k.Math.min(l,dqe(e,r,i));l=k.Math.min(l,xKe(e,c,l,i))}return l}function sge(e,n){var t,i,r,c,o,l,f;if(e.b<2)throw R(new Un("The vector chain must contain at least a source and a target point."));for(r=(at(e.b!=0),u(e.a.a.c,8)),kT(n,r.a,r.b),f=new j4((!n.a&&(n.a=new mr(yl,n,5)),n.a)),o=St(e,1);o.a=0&&c!=t))throw R(new Un(BN));for(r=0,f=0;fne(Ia(o.g,o.d[0]).a)?(at(f.b>0),f.a.Xb(f.c=--f.b),y2(f,o),r=!0):l.e&&l.e.gc()>0&&(c=(!l.e&&(l.e=new Te),l.e).Kc(n),h=(!l.e&&(l.e=new Te),l.e).Kc(t),(c||h)&&((!l.e&&(l.e=new Te),l.e).Ec(o),++o.c));r||qn(i.c,o)}function Q_n(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B;return p=e.a.i+e.a.g/2,y=e.a.i+e.a.g/2,A=n.i+n.g/2,D=n.j+n.f/2,l=new Ee(A,D),h=u(ke(n,(Xt(),Uy)),8),h.a=h.a+p,h.b=h.b+y,c=(l.b-h.b)/(l.a-h.a),i=l.b-c*l.a,O=t.i+t.g/2,B=t.j+t.f/2,f=new Ee(O,B),b=u(ke(t,Uy),8),b.a=b.a+p,b.b=b.b+y,o=(f.b-b.b)/(f.a-b.a),r=f.b-o*f.a,S=(i-r)/(o-c),h.a>>0,"0"+n.toString(16)),i="\\x"+of(t,t.length-2,t.length)):e>=Ec?(t=(n=e>>>0,"0"+n.toString(16)),i="\\v"+of(t,t.length-6,t.length)):i=""+String.fromCharCode(e&yr)}return i}function OKe(e,n){var t,i,r,c,o,l,f,h,b;for(c=new P(e.b);c.at){n.Ug();return}switch(u(C(e,(Oe(),Gie)),350).g){case 2:c=new x6;break;case 0:c=new Jp;break;default:c=new lM}if(i=c.mg(e,r),!c.ng())switch(u(C(e,EH),351).g){case 2:i=bqe(r,i);break;case 1:i=rGe(r,i)}WLn(e,r,i),n.Ug()}function sS(e,n){var t,i,r,c,o,l,f,h;n%=24,e.q.getHours()!=n&&(i=new k.Date(e.q.getTime()),i.setDate(i.getDate()+1),l=e.q.getTimezoneOffset()-i.getTimezoneOffset(),l>0&&(f=l/60|0,h=l%60,r=e.q.getDate(),t=e.q.getHours(),t+f>=24&&++r,c=new k.Date(e.q.getFullYear(),e.q.getMonth(),r,n+f,e.q.getMinutes()+h,e.q.getSeconds(),e.q.getMilliseconds()),e.q.setTime(c.getTime()))),o=e.q.getTime(),e.q.setTime(o+36e5),e.q.getHours()!=n&&e.q.setTime(o)}function rLn(e,n){var t,i,r,c;if(R4n(e.d,e.e),e.c.a.$b(),ne(re(C(n.j,(Oe(),aI))))!=0||ne(re(C(n.j,aI)))!=0)for(t=E3,ue(C(n.j,o1))!==ue((F1(),fb))&&he(n.j,(me(),ob),($n(),!0)),c=u(C(n.j,jx),15).a,r=0;rr&&++h,Ce(o,(kn(l+h,n.c.length),u(n.c[l+h],15))),f+=(kn(l+h,n.c.length),u(n.c[l+h],15)).a-i,++t;t=D&&e.e[f.p]>A*e.b||V>=t*D)&&(qn(y.c,l),l=new Te,ac(o,c),c.a.$b(),h-=b,S=k.Math.max(S,h*e.b+O),h+=V,q=V,V=0,b=0,O=0);return new jc(S,y)}function UW(e){var n,t,i,r,c,o,l;if(!e.d){if(l=new dU,n=lA,c=n.a.yc(e,n),c==null){for(i=new st(tu(e));i.e!=i.i.gc();)t=u(ft(i),29),nr(l,UW(t));n.a.Ac(e)!=null,n.a.gc()==0}for(o=l.i,r=(!e.q&&(e.q=new we(yf,e,11,10)),new st(e.q));r.e!=r.i.gc();++o)u(ft(r),403);nr(l,(!e.q&&(e.q=new we(yf,e,11,10)),e.q)),F2(l),e.d=new Pv((u(K(ge((C0(),Bn).o),9),19),l.i),l.g),e.e=u(l.g,678),e.e==null&&(e.e=Wan),Ms(e).b&=-17}return e.d}function N8(e,n,t,i){var r,c,o,l,f,h;if(h=Po(e.e.Ah(),n),f=0,r=u(e.g,122),Tc(),u(n,69).vk()){for(o=0;o1||A==-1)if(p=u(O,72),y=u(b,72),p.dc())y.$b();else for(o=!!Oc(n),c=0,l=e.a?p.Jc():p.Gi();l.Ob();)h=u(l.Pb(),57),r=u($a(e,h),57),r?(o?(f=y.bd(r),f==-1?y.Ei(c,r):c!=f&&y.Si(c,r)):y.Ei(c,r),++c):e.b&&!o&&(y.Ei(c,h),++c);else O==null?b.Wb(null):(r=$a(e,O),r==null?e.b&&!Oc(n)&&b.Wb(O):b.Wb(r))}function lLn(e,n){var t,i,r,c,o,l,f,h;for(t=new w6,r=new Xn(Qn(cr(n).a.Jc(),new ee));ht(r);)if(i=u(ct(r),17),!uc(i)&&(l=i.c.i,b0e(l,xJ))){if(h=Pbe(e,l,xJ,SJ),h==-1)continue;t.b=k.Math.max(t.b,h),!t.a&&(t.a=new Te),Ce(t.a,l)}for(o=new Xn(Qn(Ii(n).a.Jc(),new ee));ht(o);)if(c=u(ct(o),17),!uc(c)&&(f=c.d.i,b0e(f,SJ))){if(h=Pbe(e,f,SJ,xJ),h==-1)continue;t.d=k.Math.max(t.d,h),!t.c&&(t.c=new Te),Ce(t.c,f)}return t}function fLn(e,n,t,i){var r,c,o,l,f,h,b;if(t.d.i!=n.i){for(r=new za(e),Mf(r,(Fn(),dr)),he(r,(me(),mi),t),he(r,(Oe(),Zi),(Br(),to)),qn(i.c,r),o=new Qu,wu(o,r),Ar(o,(Ie(),Yn)),l=new Qu,wu(l,r),Ar(l,nt),b=t.d,Gr(t,o),c=new Ow,Pu(c,t),he(c,Wc,null),fc(c,l),Gr(c,b),h=new qr(t.b,0);h.b1e6)throw R(new HP("power of ten too big"));if(e<=oi)return B4(VO(Ey[1],n),n);for(i=VO(Ey[1],oi),r=i,t=Lu(e-oi),n=lc(e%oi);ao(t,oi)>0;)r=Kv(r,i),t=lf(t,oi);for(r=Kv(r,VO(Ey[1],n)),r=B4(r,oi),t=Lu(e-oi);ao(t,oi)>0;)r=B4(r,oi),t=lf(t,oi);return r=B4(r,n),r}function DKe(e){var n,t,i,r,c,o,l,f,h,b;for(f=new P(e.a);f.ah&&i>h)b=l,h=ne(n.p[l.p])+ne(n.d[l.p])+l.o.b+l.d.a;else{r=!1,t.$g()&&t.ah("bk node placement breaks on "+l+" which should have been after "+b);break}if(!r)break}return t.$g()&&t.ah(n+" is feasible: "+r),r}function age(e,n,t,i){var r,c,o,l,f,h,b,p,y;if(c=new za(e),Mf(c,(Fn(),wo)),he(c,(Oe(),Zi),(Br(),to)),r=0,n){for(o=new Qu,he(o,(me(),mi),n),he(c,mi,n.i),Ar(o,(Ie(),Yn)),wu(o,c),y=gh(n.e),h=y,b=0,p=h.length;b0){if(r<0&&b.a&&(r=f,c=h[0],i=0),r>=0){if(l=b.b,f==r&&(l-=i++,l==0))return 0;if(!LVe(n,h,b,l,o)){f=r-1,h[0]=c;continue}}else if(r=-1,!LVe(n,h,b,0,o))return 0}else{if(r=-1,rc(b.c,0)==32){if(p=h[0],MRe(n,h),h[0]>p)continue}else if(V5n(n,b.c,h[0])){h[0]+=b.c.length;continue}return 0}return iRn(o,t)?h[0]:0}function gLn(e,n,t){var i,r,c,o,l,f,h,b,p,y;for(b=new mR(new nje(t)),l=le(ts,ma,30,e.f.e.c.length,16,1),$fe(l,l.length),t[n.a]=0,h=new P(e.f.e);h.a=l.a?c.b>=l.b?(i.a=l.a+(c.a-l.a)/2+r,i.b=l.b+(c.b-l.b)/2-r-e.e.b):(i.a=l.a+(c.a-l.a)/2+r,i.b=c.b+(l.b-c.b)/2+r):c.b>=l.b?(i.a=c.a+(l.a-c.a)/2+r,i.b=l.b+(c.b-l.b)/2+r):(i.a=c.a+(l.a-c.a)/2+r,i.b=c.b+(l.b-c.b)/2-r-e.e.b))}function fS(e){var n,t,i,r,c,o,l,f;if(!e.f){if(f=new iC,l=new iC,n=lA,o=n.a.yc(e,n),o==null){for(c=new st(tu(e));c.e!=c.i.gc();)r=u(ft(c),29),nr(f,fS(r));n.a.Ac(e)!=null,n.a.gc()==0}for(i=(!e.s&&(e.s=new we(ns,e,21,17)),new st(e.s));i.e!=i.i.gc();)t=u(ft(i),179),X(t,103)&&Et(l,u(t,19));F2(l),e.r=new oIe(e,(u(K(ge((C0(),Bn).o),6),19),l.i),l.g),nr(f,e.r),F2(f),e.f=new Pv((u(K(ge(Bn.o),5),19),f.i),f.g),Ms(e).b&=-3}return e.f}function Uz(){Uz=Y,R8e=F(z(Wl,1),Eh,30,15,[48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70]),Can=new RegExp(`[ +\r\f]+`);try{uA=F(z(ezn,1),Nn,2076,0,[new KC(($se(),ZB("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ",TT((zP(),zP(),XS))))),new KC(ZB("yyyy-MM-dd'T'HH:mm:ss'.'SSS",TT(XS))),new KC(ZB("yyyy-MM-dd'T'HH:mm:ss",TT(XS))),new KC(ZB("yyyy-MM-dd'T'HH:mm",TT(XS))),new KC(ZB("yyyy-MM-dd",TT(XS)))])}catch(e){if(e=sr(e),!X(e,80))throw R(e)}}function wLn(e){var n,t,i,r,c,o,l;for(t=null,l=null,i=u(C(e.b,(Oe(),Die)),348),i==(DE(),vI)&&(t=new Te,l=new Te),o=new P(e.d);o.at);return c}function LKe(e,n){var t,i,r,c;if(r=Ds(e.d,1)!=0,i=Mz(e,n),i==0&&Fe(ze(C(n.j,(me(),ob)))))return 0;!Fe(ze(C(n.j,(me(),ob))))&&!Fe(ze(C(n.j,B3)))||ue(C(n.j,(Oe(),o1)))===ue((F1(),fb))?n.c.kg(n.e,r):r=Fe(ze(C(n.j,ob))),eN(e,n,r,!0),Fe(ze(C(n.j,B3)))&&he(n.j,B3,($n(),!1)),Fe(ze(C(n.j,ob)))&&(he(n.j,ob,($n(),!1)),he(n.j,B3,!0)),t=Mz(e,n);do{if(Qhe(e),t==0)return 0;r=!r,c=t,eN(e,n,r,!1),t=Mz(e,n)}while(c>t);return c}function mLn(e,n,t){var i,r,c,o,l;if(i=u(C(e,(Oe(),Oie)),22),t.a>n.a&&(i.Gc((sg(),qx))?e.c.a+=(t.a-n.a)/2:i.Gc(Ux)&&(e.c.a+=t.a-n.a)),t.b>n.b&&(i.Gc((sg(),Kx))?e.c.b+=(t.b-n.b)/2:i.Gc(Xx)&&(e.c.b+=t.b-n.b)),u(C(e,(me(),po)),22).Gc((Ic(),Kl))&&(t.a>n.a||t.b>n.b))for(l=new P(e.a);l.an.a&&(i.Gc((sg(),qx))?e.c.a+=(t.a-n.a)/2:i.Gc(Ux)&&(e.c.a+=t.a-n.a)),t.b>n.b&&(i.Gc((sg(),Kx))?e.c.b+=(t.b-n.b)/2:i.Gc(Xx)&&(e.c.b+=t.b-n.b)),u(C(e,(me(),po)),22).Gc((Ic(),Kl))&&(t.a>n.a||t.b>n.b))for(o=new P(e.a);o.a=0&&p<=1&&y>=0&&y<=1?pi(new Ee(e.a,e.b),A1(new Ee(n.a,n.b),p)):null}function aS(e,n,t){var i,r,c,o,l,f,h,b,p,y;for(c=0,o=e.t,r=0,i=0,f=0,y=0,p=0,t&&(e.n.c.length=0,Ce(e.n,new RR(e.s,e.t,e.i))),l=0,b=new P(e.b);b.a0?e.i:0)>n&&f>0&&(c=0,o+=f+e.i,r=k.Math.max(r,y),i+=f+e.i,f=0,y=0,t&&(++p,Ce(e.n,new RR(e.s,o,e.i))),l=0),y+=h.g+(l>0?e.i:0),f=k.Math.max(f,h.f),t&&Dde(u(Le(e.n,p),208),h),c+=h.g+(l>0?e.i:0),++l;return r=k.Math.max(r,y),i+=f,t&&(e.r=r,e.d=i,Pde(e.j)),new _f(e.s,e.t,r,i)}function Xz(e){var n,t,i;return t=ue(ke(e,(Oe(),By)))===ue((YO(),nie))||ue(ke(e,By))===ue(Yte)||ue(ke(e,By))===ue(Qte)||ue(ke(e,By))===ue(Zte)||ue(ke(e,By))===ue(tie)||ue(ke(e,By))===ue(iI),i=ue(ke(e,wH))===ue((WO(),Uie))||ue(ke(e,wH))===ue(Kie)||ue(ke(e,dI))===ue((X0(),_7))||ue(ke(e,dI))===ue((X0(),xx)),n=ue(ke(e,o1))!==ue((F1(),fb))||Fe(ze(ke(e,C7)))||ue(ke(e,bx))!==ue((W4(),ex))||ne(re(ke(e,aI)))!=0||ne(re(ke(e,Mie)))!=0,t||i||n}function g3(e){var n,t,i,r,c,o,l,f;if(!e.a){if(e.o=null,f=new BSe(e),n=new Af,t=lA,l=t.a.yc(e,t),l==null){for(o=new st(tu(e));o.e!=o.i.gc();)c=u(ft(o),29),nr(f,g3(c));t.a.Ac(e)!=null,t.a.gc()==0}for(r=(!e.s&&(e.s=new we(ns,e,21,17)),new st(e.s));r.e!=r.i.gc();)i=u(ft(r),179),X(i,335)&&Et(n,u(i,38));F2(n),e.k=new uIe(e,(u(K(ge((C0(),Bn).o),7),19),n.i),n.g),nr(f,e.k),F2(f),e.a=new Pv((u(K(ge(Bn.o),4),19),f.i),f.g),Ms(e).b&=-2}return e.a}function kLn(e){var n,t,i,r,c,o,l,f,h,b,p,y;if(l=e.d,p=u(C(e,(me(),$y)),16),n=u(C(e,Oy),16),!(!p&&!n)){if(c=ne(re(G2(e,(Oe(),zie)))),o=ne(re(G2(e,w4e))),y=0,p){for(h=0,r=p.Jc();r.Ob();)i=u(r.Pb(),9),h=k.Math.max(h,i.o.b),y+=i.o.a;y+=c*(p.gc()-1),l.d+=h+o}if(t=0,n){for(h=0,r=n.Jc();r.Ob();)i=u(r.Pb(),9),h=k.Math.max(h,i.o.b),t+=i.o.a;t+=c*(n.gc()-1),l.a+=h+o}f=k.Math.max(y,t),f>e.o.a&&(b=(f-e.o.a)/2,l.b=k.Math.max(l.b,b),l.c=k.Math.max(l.c,b))}}function bge(e,n,t,i){var r,c,o,l,f,h,b;if(b=Po(e.e.Ah(),n),r=0,c=u(e.g,122),f=null,Tc(),u(n,69).vk()){for(l=0;ll?1:-1:M1e(e.a,n.a,c),r==-1)p=-f,b=o==f?hY(n.a,l,e.a,c):bY(n.a,l,e.a,c);else if(p=o,o==f){if(r==0)return yh(),VS;b=hY(e.a,c,n.a,l)}else b=bY(e.a,c,n.a,l);return h=new Gb(p,b.length,b),gE(h),h}function SLn(e,n){var t,i,r,c;if(c=kKe(n),!n.c&&(n.c=new we($s,n,9,9)),er(new mn(null,(!n.c&&(n.c=new we($s,n,9,9)),new yn(n.c,16))),new cje(c)),r=u(C(c,(me(),po)),22),y$n(n,r),r.Gc((Ic(),Kl)))for(i=new st((!n.c&&(n.c=new we($s,n,9,9)),n.c));i.e!=i.i.gc();)t=u(ft(i),125),q$n(e,n,c,t);return u(ke(n,(Oe(),Ag)),182).gc()!=0&&sXe(n,c),Fe(ze(C(c,a4e)))&&r.Ec(nH),wi(c,bI)&&Wxe(new tde(ne(re(C(c,bI)))),c),ue(ke(n,Em))===ue((B1(),Wd))?dBn(e,n,c):Q$n(e,n,c),c}function bo(e,n){var t,i,r,c,o,l,f;if(e==null)return null;if(c=e.length,c==0)return"";for(f=le(Wl,Eh,30,c,15,1),Qr(0,c,e.length),Qr(0,c,f.length),cDe(e,0,c,f,0),t=null,l=n,r=0,o=0;r0?of(t.a,0,c-1):""):(Qr(0,c-1,e.length),e.substr(0,c-1)):t?t.a:e}function xLn(e,n,t){var i,r,c;if(wi(n,(Oe(),ku))&&(ue(C(n,ku))===ue((Xs(),V1))||ue(C(n,ku))===ue(Sg))||wi(t,ku)&&(ue(C(t,ku))===ue((Xs(),V1))||ue(C(t,ku))===ue(Sg)))return 0;if(i=_r(n),r=dDn(e,n,t),r!=0)return r;if(wi(n,(me(),Oi))&&wi(t,Oi)){if(c=oo(Kw(n,t,i,u(C(i,sb),15).a),Kw(t,n,i,u(C(i,sb),15).a)),ue(C(i,gx))===ue(($0(),cI))&&ue(C(n,wx))!==ue(C(t,wx))&&(c=0),c<0)return nN(e,n,t),c;if(c>0)return nN(e,t,n),c}return zTn(e,n,t)}function PKe(e,n){var t,i,r,c,o,l,f,h,b,p,y;for(i=new Xn(Qn(U0(n).a.Jc(),new ee));ht(i);)t=u(ct(i),85),X(K((!t.b&&(t.b=new In(mt,t,4,7)),t.b),0),193)||(f=iu(u(K((!t.c&&(t.c=new In(mt,t,5,8)),t.c),0),84)),eS(t)||(o=n.i+n.g/2,l=n.j+n.f/2,b=f.i+f.g/2,p=f.j+f.f/2,y=new Vr,y.a=b-o,y.b=p-l,c=new Ee(y.a,y.b),v8(c,n.g,n.f),y.a-=c.a,y.b-=c.b,o=b-y.a,l=p-y.b,h=new Ee(y.a,y.b),v8(h,f.g,f.f),y.a-=h.a,y.b-=h.b,b=o+y.a,p=l+y.b,r=Rz(t),e3(r,o),n3(r,l),Wv(r,b),Zv(r,p),PKe(e,f)))}function tm(e,n){var t,i,r,c,o;if(o=u(n,137),h3(e),h3(o),o.b!=null){if(e.c=!0,e.b==null){e.b=le($t,ni,30,o.b.length,15,1),Wu(o.b,0,e.b,0,o.b.length);return}for(c=le($t,ni,30,e.b.length+o.b.length,15,1),t=0,i=0,r=0;t=e.b.length?(c[r++]=o.b[i++],c[r++]=o.b[i++]):i>=o.b.length?(c[r++]=e.b[t++],c[r++]=e.b[t++]):o.b[i]0?e.i:0)),++n;for(K1e(e.n,f),e.d=t,e.r=i,e.g=0,e.f=0,e.e=0,e.o=Vi,e.p=Vi,c=new P(e.b);c.a0&&(r=(!e.n&&(e.n=new we(Eu,e,1,7)),u(K(e.n,0),157)).a,!r||Kt(Kt((n.a+=' "',n),r),'"'))),t=(!e.b&&(e.b=new In(mt,e,4,7)),!(e.b.i<=1&&(!e.c&&(e.c=new In(mt,e,5,8)),e.c.i<=1))),t?n.a+=" [":n.a+=" ",Kt(n,nle(new IX,new st(e.b))),t&&(n.a+="]"),n.a+=nee,t&&(n.a+="["),Kt(n,nle(new IX,new st(e.c))),t&&(n.a+="]"),n.a)}function MLn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,De,un,cn,On;for(be=e.c,fe=n.c,t=pu(be.a,e,0),i=pu(fe.a,n,0),V=u(Fw(e,(Nc(),ys)).Jc().Pb(),12),cn=u(Fw(e,Io).Jc().Pb(),12),te=u(Fw(n,ys).Jc().Pb(),12),On=u(Fw(n,Io).Jc().Pb(),12),B=gh(V.e),De=gh(cn.g),q=gh(te.e),un=gh(On.g),H0(e,i,fe),o=q,b=0,A=o.length;b0&&f[i]&&(A=zv(e.b,f[i],r)),O=k.Math.max(O,r.c.c.b+A);for(c=new P(b.e);c.ab?new Kb((da(),Dm),t,n,h-b):h>0&&b>0&&(new Kb((da(),Dm),n,t,0),new Kb(Dm,t,n,0))),o)}function NLn(e,n,t){var i,r,c;for(e.a=new Te,c=St(n.b,0);c.b!=c.d.c;){for(r=u(jt(c),40);u(C(r,(Mu(),Dh)),15).a>e.a.c.length-1;)Ce(e.a,new jc(E3,Fpe));i=u(C(r,Dh),15).a,t==(vr(),Zc)||t==ru?(r.e.ane(re(u(Le(e.a,i),49).b))&&HC(u(Le(e.a,i),49),r.e.a+r.f.a)):(r.e.bne(re(u(Le(e.a,i),49).b))&&HC(u(Le(e.a,i),49),r.e.b+r.f.b))}}function BKe(e,n,t,i){var r,c,o,l,f,h,b;if(c=UB(i),l=Fe(ze(C(i,(Oe(),c4e)))),(l||Fe(ze(C(e,gH))))&&!$v(u(C(e,Zi),102)))r=Y4(c),f=ege(e,t,t==(Nc(),Io)?r:NO(r));else switch(f=new Qu,wu(f,e),n?(b=f.n,b.a=n.a-e.n.a,b.b=n.b-e.n.b,zGe(b,0,0,e.o.a,e.o.b),Ar(f,uKe(f,c))):(r=Y4(c),Ar(f,t==(Nc(),Io)?r:NO(r))),o=u(C(i,(me(),po)),22),h=f.j,c.g){case 2:case 1:(h==(Ie(),Vn)||h==bt)&&o.Ec((Ic(),P3));break;case 4:case 3:(h==(Ie(),nt)||h==Yn)&&o.Ec((Ic(),P3))}return f}function zKe(e,n){var t,i,r,c,o,l;for(o=new B2(new sn(e.f.b).a);o.b;){if(c=t3(o),r=u(c.jd(),591),n==1){if(r.yf()!=(vr(),Vl)&&r.yf()!=eh)continue}else if(r.yf()!=(vr(),Zc)&&r.yf()!=ru)continue;switch(i=u(u(c.kd(),49).b,82),l=u(u(c.kd(),49).a,194),t=l.c,r.yf().g){case 2:i.g.c=e.e.a,i.g.b=k.Math.max(1,i.g.b+t);break;case 1:i.g.c=i.g.c+t,i.g.b=k.Math.max(1,i.g.b-t);break;case 4:i.g.d=e.e.b,i.g.a=k.Math.max(1,i.g.a+t);break;case 3:i.g.d=i.g.d+t,i.g.a=k.Math.max(1,i.g.a-t)}}}function ILn(e,n){var t,i,r,c,o,l,f,h,b,p;for(n.Tg("Simple node placement",1),p=u(C(e,(me(),z3)),316),l=0,c=new P(e.b);c.a1)throw R(new Un(GN));f||(c=Kh(n,i.Jc().Pb()),o.Ec(c))}return h1e(e,D0e(e,n,t),o)}function Vz(e,n,t){var i,r,c,o,l,f,h,b;if(J1(e.e,n))f=(Tc(),u(n,69).vk()?new uR(n,e):new vT(n,e)),Tz(f.c,f.b),Yj(f,u(t,18));else{for(b=Po(e.e.Ah(),n),i=u(e.g,122),o=0;o"}f!=null&&(n.a+=""+f)}else e.e?(l=e.e.zb,l!=null&&(n.a+=""+l)):(n.a+="?",e.b?(n.a+=" super ",QW(e.b,n)):e.f&&(n.a+=" extends ",QW(e.f,n)))}function BLn(e){e.b=null,e.a=null,e.o=null,e.q=null,e.v=null,e.w=null,e.B=null,e.p=null,e.Q=null,e.R=null,e.S=null,e.T=null,e.U=null,e.V=null,e.W=null,e.bb=null,e.eb=null,e.ab=null,e.H=null,e.db=null,e.c=null,e.d=null,e.f=null,e.n=null,e.r=null,e.s=null,e.u=null,e.G=null,e.J=null,e.e=null,e.j=null,e.i=null,e.g=null,e.k=null,e.t=null,e.F=null,e.I=null,e.L=null,e.M=null,e.O=null,e.P=null,e.$=null,e.N=null,e.Z=null,e.cb=null,e.K=null,e.D=null,e.A=null,e.C=null,e._=null,e.fb=null,e.X=null,e.Y=null,e.gb=!1,e.hb=!1}function zLn(e){var n,t,i,r;if(i=fZ((!e.c&&(e.c=XT(Lu(e.f))),e.c),0),e.e==0||e.a==0&&e.f!=-1&&e.e<0)return i;if(n=Whe(e)<0?1:0,t=e.e,r=(i.length+1+k.Math.abs(lc(e.e)),new h4),n==1&&(r.a+="-"),e.e>0)if(t-=i.length-n,t>=0){for(r.a+="0.";t>kg.length;t-=kg.length)MIe(r,kg);ZOe(r,kg,lc(t)),Kt(r,(Wn(n,i.length+1),i.substr(n)))}else t=n-t,Kt(r,of(i,n,lc(t))),r.a+=".",Kt(r,qfe(i,lc(t)));else{for(Kt(r,(Wn(n,i.length+1),i.substr(n)));t<-kg.length;t+=kg.length)MIe(r,kg);ZOe(r,kg,lc(-t))}return r.a}function WW(e){var n,t,i,r,c,o,l,f,h;return!(e.k!=(Fn(),Wi)||e.j.c.length<=1||(c=u(C(e,(Oe(),Zi)),102),c==(Br(),to))||(r=(U2(),(e.q?e.q:(En(),En(),r1))._b(mp)?i=u(C(e,mp),203):i=u(C(_r(e),yx),203),i),r==MH)||!(r==U3||r==q3)&&(o=ne(re(G2(e,kx))),n=u(C(e,wI),140),!n&&(n=new $le(o,o,o,o)),h=vu(e,(Ie(),Yn)),f=n.d+n.a+(h.gc()-1)*o,f>e.o.b||(t=vu(e,nt),l=n.d+n.a+(t.gc()-1)*o,l>e.o.b)))}function FLn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D;n.Tg("Orthogonal edge routing",1),h=ne(re(C(e,(Oe(),Nm)))),t=ne(re(C(e,Tm))),i=ne(re(C(e,lb))),y=new EV(0,t),D=0,o=new qr(e.b,0),l=null,b=null,f=null,p=null;do b=o.b0?(S=(A-1)*t,l&&(S+=i),b&&(S+=i),S0;for(l=u(C(e.c.i,xm),15).a,c=u(gs(li(n.Mc(),new Aje(l)),Cs(new zi,new bi,new Cc,F(z(Qo,1),je,130,0,[(zl(),Yo)]))),16),o=new xi,b=new ar,Vt(o,e.c.i),hr(b,e.c.i);o.b!=0;){if(t=u(o.b==0?null:(at(o.b!=0),$l(o,o.a.a)),9),c.Gc(t))return!0;for(r=new Xn(Qn(Ii(t).a.Jc(),new ee));ht(r);)i=u(ct(r),17),f=i.d.i,b.a._b(f)||(b.a.yc(f,b),Ki(o,f,o.c.b,o.c))}return!1}function qKe(e,n,t){var i,r,c,o,l,f,h,b,p;for(p=new Te,b=new Cae(0,t),c=0,kB(b,new iQ(0,0,b,t)),r=0,h=new st(e);h.e!=h.i.gc();)f=u(ft(h),26),i=u(Le(b.a,b.a.c.length-1),173),l=r+f.g+(u(Le(b.a,0),173).b.c.length==0?0:t),(l>n||Fe(ze(ke(f,(Ha(),CI)))))&&(r=0,c+=b.b+t,qn(p.c,b),b=new Cae(c,t),i=new iQ(0,b.f,b,t),kB(b,i),r=0),i.b.c.length==0||!Fe(ze(ke(Fi(f),(Ha(),Xre))))&&(f.f>=i.o&&f.f<=i.f||i.a*.5<=f.f&&i.a*1.5>=f.f)?ede(i,f):(o=new iQ(i.s+i.r+t,b.f,b,t),kB(b,o),ede(o,f)),r=f.i+f.g;return qn(p.c,b),p}function hS(e){var n,t,i,r;if(!(e.b==null||e.b.length<=2)&&!e.a){for(n=0,r=0;r=e.b[r+1])r+=2;else if(t0)for(i=new bs(u(vi(e.a,c),22)),En(),Tr(i,new noe(n)),r=new qr(c.b,0);r.b0&&i>=-6?i>=0?jT(c,t-lc(e.e),"."):(UY(c,n-1,n-1,"0."),jT(c,n+1,ph(kg,0,-lc(i)-1))):(t-n>=1&&(jT(c,n,"."),++t),jT(c,t,"E"),i>0&&jT(c,++t,"+"),jT(c,++t,""+cE(Lu(i)))),e.g=c.a,e.g))}function QLn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,De;i=ne(re(C(n,(Oe(),s4e)))),be=u(C(n,jx),15).a,y=4,r=3,fe=20/be,S=!1,f=0,o=oi;do{for(c=f!=1,p=f!=0,De=0,D=e.a,q=0,te=D.length;qbe)?(f=2,o=oi):f==0?(f=1,o=De):(f=0,o=De)):(S=De>=o||o-De=Ec?Bc(t,V1e(i)):_9(t,i&yr),o=new JV(10,null,0),I3n(e.a,o,l-1)):(t=(o.Km().length+c,new Ej),Bc(t,o.Km())),n.e==0?(i=n.Im(),i>=Ec?Bc(t,V1e(i)):_9(t,i&yr)):Bc(t,n.Km()),u(o,517).b=t.a}}function WLn(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D;if(!t.dc()){for(l=0,y=0,i=t.Jc(),A=u(i.Pb(),15).a;l0?1:Bb(isNaN(i),isNaN(0)))>=0^(Rf(Mh),(k.Math.abs(l)<=Mh||l==0||isNaN(l)&&isNaN(0)?0:l<0?-1:l>0?1:Bb(isNaN(l),isNaN(0)))>=0)?k.Math.max(l,i):(Rf(Mh),(k.Math.abs(i)<=Mh||i==0||isNaN(i)&&isNaN(0)?0:i<0?-1:i>0?1:Bb(isNaN(i),isNaN(0)))>0?k.Math.sqrt(l*l+i*i):-k.Math.sqrt(l*l+i*i))}function tPn(e){var n,t,i,r;r=e.o,v2(),e.A.dc()||gi(e.A,Qme)?n=r.b:(e.D?n=k.Math.max(r.b,QE(e.f)):n=QE(e.f),e.A.Gc((Vs(),UI))&&!e.B.Gc((_s(),rA))&&(n=k.Math.max(n,QE(u(zc(e.p,(Ie(),nt)),253))),n=k.Math.max(n,QE(u(zc(e.p,Yn),253)))),t=tze(e),t&&(n=k.Math.max(n,t.b)),e.A.Gc(XI)&&(e.q==(Br(),a1)||e.q==to)&&(n=k.Math.max(n,rR(u(zc(e.b,(Ie(),nt)),127))),n=k.Math.max(n,rR(u(zc(e.b,Yn),127))))),Fe(ze(e.e.Rf().mf((Xt(),$m))))?r.b=k.Math.max(r.b,n):r.b=n,i=e.f.i,i.d=0,i.a=n,qW(e.f)}function iPn(e,n,t,i,r,c,o,l){var f,h,b,p;switch(f=Pf(F(z(KBn,1),Nn,238,0,[n,t,i,r])),p=null,e.b.g){case 1:p=Pf(F(z(M6e,1),Nn,523,0,[new Pk,new LM,new P6]));break;case 0:p=Pf(F(z(M6e,1),Nn,523,0,[new P6,new LM,new Pk]));break;case 2:p=Pf(F(z(M6e,1),Nn,523,0,[new LM,new Pk,new P6]))}for(b=new P(p);b.a1&&(f=h.Gg(f,e.a,l));return f.c.length==1?u(Le(f,f.c.length-1),238):f.c.length==2?HLn((kn(0,f.c.length),u(f.c[0],238)),(kn(1,f.c.length),u(f.c[1],238)),o,c):null}function rPn(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A;r=new c9(e),c=new Qqe,i=(QT(c.n),QT(c.p),Hu(c.c),QT(c.f),QT(c.o),Hu(c.q),Hu(c.d),Hu(c.g),Hu(c.k),Hu(c.e),Hu(c.i),Hu(c.j),Hu(c.r),Hu(c.b),y=kqe(c,r,null),jUe(c,r),y),n&&(f=new c9(n),o=jLn(f),M0e(i,F(z(u9e,1),Nn,524,0,[o]))),p=!1,b=!1,t&&(f=new c9(t),UF in f.a&&(p=O1(f,UF).oe().a),hZe in f.a&&(b=O1(f,hZe).oe().a)),h=pAe(hBe(new s4,p),b),aCn(new zM,i,h),UF in r.a&&$f(r,UF,null),(p||b)&&(l=new l4,gKe(h,l,p,b),$f(r,UF,l)),S=new kSe(c),Fze(new MK(i),S),A=new jSe(c),Fze(new MK(i),A)}function cPn(e,n,t){var i,r,c,o,l,f,h;for(t.Tg("Find roots",1),e.a.c.length=0,r=St(n.b,0);r.b!=r.d.c;)i=u(jt(r),40),i.b.b==0&&(he(i,(Ti(),db),($n(),!0)),Ce(e.a,i));switch(e.a.c.length){case 0:c=new tQ(0,n,"DUMMY_ROOT"),he(c,(Ti(),db),($n(),!0)),he(c,gre,!0),Vt(n.b,c);break;case 1:break;default:for(o=new tQ(0,n,_F),f=new P(e.a);f.a=k.Math.abs(i.b)?(i.b=0,c.d+c.a>o.d&&c.do.c&&c.c0){if(n=new Nse(e.i,e.g),t=e.i,c=t<100?null:new k0(t),e.Rj())for(i=0;i0){for(l=e.g,h=e.i,yE(e),c=h<100?null:new k0(h),i=0;i>13|(e.m&15)<<9,r=e.m>>4&8191,c=e.m>>17|(e.h&255)<<5,o=(e.h&1048320)>>8,l=n.l&8191,f=n.l>>13|(n.m&15)<<9,h=n.m>>4&8191,b=n.m>>17|(n.h&255)<<5,p=(n.h&1048320)>>8,un=t*l,cn=i*l,On=r*l,Dn=c*l,lt=o*l,f!=0&&(cn+=t*f,On+=i*f,Dn+=r*f,lt+=c*f),h!=0&&(On+=t*h,Dn+=i*h,lt+=r*h),b!=0&&(Dn+=t*b,lt+=i*b),p!=0&&(lt+=t*p),S=un&Ls,A=(cn&511)<<13,y=S+A,D=un>>22,B=cn>>9,q=(On&262143)<<4,V=(Dn&31)<<17,O=D+B+q+V,be=On>>18,fe=Dn>>5,De=(lt&4095)<<8,te=be+fe+De,O+=y>>22,y&=Ls,te+=O>>22,O&=Ls,te&=G1,_o(y,O,te)}function VKe(e){var n,t,i,r,c,o,l;if(l=u(Le(e.j,0),12),l.g.c.length!=0&&l.e.c.length!=0)throw R(new Uc("Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges."));if(l.g.c.length!=0){for(c=Vi,t=new P(l.g);t.a0&&XGe(e,l,p);for(r=new P(p);r.a4)if(e.dk(n)){if(e.$k()){if(r=u(n,52),i=r.Bh(),f=i==e.e&&(e.kl()?r.vh(r.Ch(),e.gl())==e.hl():-1-r.Ch()==e.Jj()),e.ll()&&!f&&!i&&r.Gh()){for(c=0;ce.d[o.p]&&(t+=Hae(e.b,c)*u(f.b,15).a,I0(e.a,ve(c)));for(;!jj(e.a);)Ehe(e.b,u(N4(e.a),15).a)}return t}function fPn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D;for(n.Tg(JQe,1),S=new Te,b=k.Math.max(e.a.c.length,u(C(e,(me(),sb)),15).a),t=b*u(C(e,oI),15).a,l=ue(C(e,(Oe(),Ry)))===ue(($0(),ym)),O=new P(e.a);O.a0&&(h=e.n.a/c);break;case 2:case 4:r=e.i.o.b,r>0&&(h=e.n.b/r)}he(e,(me(),gp),h)}if(f=e.o,o=e.a,i)o.a=i.a,o.b=i.b,e.d=!0;else if(n!=th&&n!=pb&&l!=ju)switch(l.g){case 1:o.a=f.a/2;break;case 2:o.a=f.a,o.b=f.b/2;break;case 3:o.a=f.a/2,o.b=f.b;break;case 4:o.b=f.b/2}else o.a=f.a/2,o.b=f.b/2}function dS(e){var n,t,i,r,c,o,l,f,h,b;if(e.Nj())if(b=e.Cj(),f=e.Oj(),b>0)if(n=new t1e(e.nj()),t=b,c=t<100?null:new k0(t),MT(e,t,n.g),r=t==1?e.Gj(4,K(n,0),null,0,f):e.Gj(6,n,null,-1,f),e.Kj()){for(i=new st(n);i.e!=i.i.gc();)c=e.Mj(ft(i),c);c?(c.lj(r),c.mj()):e.Hj(r)}else c?(c.lj(r),c.mj()):e.Hj(r);else MT(e,e.Cj(),e.Dj()),e.Hj(e.Gj(6,(En(),Sc),null,-1,f));else if(e.Kj())if(b=e.Cj(),b>0){for(l=e.Dj(),h=b,MT(e,b,l),c=h<100?null:new k0(h),i=0;i1&&us(o)*Gs(o)/2>l[0]){for(c=0;cl[c];)++c;A=new N0(O,0,c+1),p=new gB(A),b=us(o)/Gs(o),f=oZ(p,n,new o4,t,i,r,b),pi(fa(p.e),f),C4(k8(y,p),F8),S=new N0(O,c+1,O.c.length),zde(y,S),O.c.length=0,h=0,NIe(l,l.length,0)}else D=y.b.c.length==0?null:Le(y.b,0),D!=null&&$Y(y,0),h>0&&(l[h]=l[h-1]),l[h]+=us(o)*Gs(o),++h,qn(O.c,o);return O}function vPn(e,n){var t,i,r,c;t=n.b,c=new bs(t.j),r=0,i=t.j,i.c.length=0,xw(u(eg(e.b,(Ie(),Vn),($w(),hp)),16),t),r=PO(c,r,new E6,i),xw(u(eg(e.b,Vn,ub),16),t),r=PO(c,r,new ad,i),xw(u(eg(e.b,Vn,ap),16),t),xw(u(eg(e.b,nt,hp),16),t),xw(u(eg(e.b,nt,ub),16),t),r=PO(c,r,new hd,i),xw(u(eg(e.b,nt,ap),16),t),xw(u(eg(e.b,bt,hp),16),t),r=PO(c,r,new Rp,i),xw(u(eg(e.b,bt,ub),16),t),r=PO(c,r,new Cb,i),xw(u(eg(e.b,bt,ap),16),t),xw(u(eg(e.b,Yn,hp),16),t),r=PO(c,r,new fd,i),xw(u(eg(e.b,Yn,ub),16),t),xw(u(eg(e.b,Yn,ap),16),t)}function yPn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O;for(n.Tg("Layer size calculation",1),b=Vi,h=Ir,r=!1,l=new P(e.b);l.a.5?B-=o*2*(A-.5):A<.5&&(B+=c*2*(.5-A)),r=l.d.b,BD.a-O-b&&(B=D.a-O-b),l.n.a=n+B}}function jPn(e){var n,t,i,r,c;if(i=u(C(e,(Oe(),ku)),165),i==(Xs(),V1)){for(t=new Xn(Qn(cr(e).a.Jc(),new ee));ht(t);)if(n=u(ct(t),17),!UPe(n))throw R(new md(ree+$O(e)+"' has its layer constraint set to FIRST_SEPARATE, but has at least one incoming edge. FIRST_SEPARATE nodes must not have incoming edges."))}else if(i==Sg){for(c=new Xn(Qn(Ii(e).a.Jc(),new ee));ht(c);)if(r=u(ct(c),17),!UPe(r))throw R(new md(ree+$O(e)+"' has its layer constraint set to LAST_SEPARATE, but has at least one outgoing edge. LAST_SEPARATE nodes must not have outgoing edges."))}}function uN(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A;if(e.e&&e.c.c>19!=0&&(n=t8(n),f=!f),o=oNn(n),c=!1,r=!1,i=!1,e.h==pN&&e.m==0&&e.l==0)if(r=!0,c=!0,o==-1)e=wTe((U9(),jme)),i=!0,f=!f;else return l=lbe(e,o),f&&eQ(l),t&&(tb=_o(0,0,0)),l;else e.h>>19!=0&&(c=!0,e=t8(e),i=!0,f=!f);return o!=-1?pkn(e,o,f,c,t):Kde(e,n)<0?(t&&(c?tb=t8(e):tb=_o(e.l,e.m,e.h)),_o(0,0,0)):n_n(i?e:_o(e.l,e.m,e.h),n,f,c,r,t)}function tZ(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A;if(o=e.e,f=n.e,o==0)return n;if(f==0)return e;if(c=e.d,l=n.d,c+l==2)return t=Rr(e.a[0],Dc),i=Rr(n.a[0],Dc),o==f?(b=mc(t,i),A=Rt(b),S=Rt(Hb(b,32)),S==0?new I1(o,A):new Gb(o,2,F(z($t,1),ni,30,15,[A,S]))):(yh(),N$(o<0?lf(i,t):lf(t,i),0)?J0(o<0?lf(i,t):lf(t,i)):lE(J0(Od(o<0?lf(i,t):lf(t,i)))));if(o==f)y=o,p=c>=l?bY(e.a,c,n.a,l):bY(n.a,l,e.a,c);else{if(r=c!=l?c>l?1:-1:M1e(e.a,n.a,c),r==0)return yh(),VS;r==1?(y=o,p=hY(e.a,c,n.a,l)):(y=f,p=hY(n.a,l,e.a,c))}return h=new Gb(y,p.length,p),gE(h),h}function SPn(e,n){var t,i,r,c,o,l,f;if(!(e.g>n.f||n.g>e.f)){for(t=0,i=0,o=e.w.a.ec().Jc();o.Ob();)r=u(o.Pb(),12),bQ(mu(F(z(Lr,1),Ae,8,0,[r.i.n,r.n,r.a])).b,n.g,n.f)&&++t;for(l=e.r.a.ec().Jc();l.Ob();)r=u(l.Pb(),12),bQ(mu(F(z(Lr,1),Ae,8,0,[r.i.n,r.n,r.a])).b,n.g,n.f)&&--t;for(f=n.w.a.ec().Jc();f.Ob();)r=u(f.Pb(),12),bQ(mu(F(z(Lr,1),Ae,8,0,[r.i.n,r.n,r.a])).b,e.g,e.f)&&++i;for(c=n.r.a.ec().Jc();c.Ob();)r=u(c.Pb(),12),bQ(mu(F(z(Lr,1),Ae,8,0,[r.i.n,r.n,r.a])).b,e.g,e.f)&&--i;t=0)return t;switch(Cw(Vc(e,t))){case 2:{if(bn("",_d(e,t.ok()).ve())){if(f=FT(Vc(e,t)),l=$9(Vc(e,t)),b=gbe(e,n,f,l),b)return b;for(r=qbe(e,n),o=0,p=r.gc();o1)throw R(new Un(GN));for(b=Po(e.e.Ah(),n),i=u(e.g,122),o=0;o1,h=new Pa(y.b);gu(h.a)||gu(h.b);)f=u(gu(h.a)?L(h.a):L(h.b),17),p=f.c==y?f.d:f.c,k.Math.abs(mu(F(z(Lr,1),Ae,8,0,[p.i.n,p.n,p.a])).b-o.b)>1&&lIn(e,f,o,c,y)}}function TPn(e){var n,t,i,r,c,o;if(r=new qr(e.e,0),i=new qr(e.a,0),e.d)for(t=0;tKee;){for(c=n,o=0;k.Math.abs(n-c)0),r.a.Xb(r.c=--r.b),F_n(e,e.b-o,c,i,r),at(r.b0),i.a.Xb(i.c=--i.b)}if(!e.d)for(t=0;t0?(e.f[b.p]=S/(b.e.c.length+b.g.c.length),e.c=k.Math.min(e.c,e.f[b.p]),e.b=k.Math.max(e.b,e.f[b.p])):l&&(e.f[b.p]=S)}}function NPn(e){e.b=null,e.bb=null,e.fb=null,e.qb=null,e.a=null,e.c=null,e.d=null,e.e=null,e.f=null,e.n=null,e.M=null,e.L=null,e.Q=null,e.R=null,e.K=null,e.db=null,e.eb=null,e.g=null,e.i=null,e.j=null,e.k=null,e.gb=null,e.o=null,e.p=null,e.q=null,e.r=null,e.$=null,e.ib=null,e.S=null,e.T=null,e.t=null,e.s=null,e.u=null,e.v=null,e.w=null,e.B=null,e.A=null,e.C=null,e.D=null,e.F=null,e.G=null,e.H=null,e.I=null,e.J=null,e.P=null,e.Z=null,e.U=null,e.V=null,e.W=null,e.X=null,e.Y=null,e._=null,e.ab=null,e.cb=null,e.hb=null,e.nb=null,e.lb=null,e.mb=null,e.ob=null,e.pb=null,e.jb=null,e.kb=null,e.N=!1,e.O=!1}function IPn(e,n,t){var i,r,c,o;for(t.Tg("Graph transformation ("+e.a+")",1),o=Vb(n.a),c=new P(n.b);c.a=l.b.c)&&(l.b=n),(!l.c||n.c<=l.c.c)&&(l.d=l.c,l.c=n),(!l.e||n.d>=l.e.d)&&(l.e=n),(!l.f||n.d<=l.f.d)&&(l.f=n);return i=new oz((n8(),fp)),VT(e,Ztn,new Su(F(z(QN,1),Nn,377,0,[i]))),o=new oz(gm),VT(e,Wtn,new Su(F(z(QN,1),Nn,377,0,[o]))),r=new oz(bm),VT(e,Qtn,new Su(F(z(QN,1),Nn,377,0,[r]))),c=new oz(O3),VT(e,Ytn,new Su(F(z(QN,1),Nn,377,0,[c]))),CW(i.c,fp),CW(r.c,bm),CW(c.c,O3),CW(o.c,gm),l.a.c.length=0,Sr(l.a,i.c),Sr(l.a,Ks(r.c)),Sr(l.a,c.c),Sr(l.a,Ks(o.c)),l}function LPn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A;for(n.Tg(fWe,1),S=ne(re(ke(e,(Qh(),_m)))),o=ne(re(ke(e,(Ha(),Fx)))),l=u(ke(e,zx),104),Yhe((!e.a&&(e.a=new we(Ft,e,10,11)),e.a)),b=qKe((!e.a&&(e.a=new we(Ft,e,10,11)),e.a),S,o),!e.a&&(e.a=new we(Ft,e,10,11)),h=new P(b);h.a0&&(e.a=f+(S-1)*c,n.c.b+=e.a,n.f.b+=e.a)),A.a.gc()!=0&&(y=new EV(1,c),S=jge(y,n,A,O,n.f.b+f-n.c.b),S>0&&(n.f.b+=f+(S-1)*c))}function WKe(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te;for(b=ne(re(C(e,(Oe(),Cg)))),i=ne(re(C(e,m4e))),y=new z6,he(y,Cg,b+i),h=n,B=h.d,O=h.c.i,q=h.d.i,D=zse(O.c),V=zse(q.c),r=new Te,p=D;p<=V;p++)l=new za(e),Mf(l,(Fn(),dr)),he(l,(me(),mi),h),he(l,Zi,(Br(),to)),he(l,jH,y),S=u(Le(e.b,p),25),p==D?H0(l,S.a.c.length-t,S):Or(l,S),te=ne(re(C(h,Ud))),te<0&&(te=0,he(h,Ud,te)),l.o.b=te,A=k.Math.floor(te/2),o=new Qu,Ar(o,(Ie(),Yn)),wu(o,l),o.n.b=A,f=new Qu,Ar(f,nt),wu(f,l),f.n.b=A,Gr(h,o),c=new Ow,Pu(c,h),he(c,Wc,null),fc(c,f),Gr(c,B),Hxn(l,h,c),qn(r.c,c),h=c;return r}function $Pn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V;if(O=n.b.c.length,!(O<3)){for(S=le($t,ni,30,O,15,1),p=0,b=new P(n.b);b.ao)&&hr(e.b,u(D.b,17));++l}c=o}}}function iZ(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V;for(f=u(Rd(e,(Ie(),Yn)).Jc().Pb(),12).e,S=u(Rd(e,nt).Jc().Pb(),12).g,l=f.c.length,V=La(u(Le(e.j,0),12));l-- >0;){for(O=(kn(0,f.c.length),u(f.c[0],17)),r=(kn(0,S.c.length),u(S.c[0],17)),q=r.d.e,c=pu(q,r,0),Kyn(O,r.d,c),fc(r,null),Gr(r,null),A=O.a,n&&Vt(A,new wc(V)),i=St(r.a,0);i.b!=i.d.c;)t=u(jt(i),8),Vt(A,new wc(t));for(B=O.b,y=new P(r.b);y.a-2;default:return!1}switch(n=e.Pj(),e.p){case 0:return n!=null&&Fe(ze(n))!=qj(e.k,0);case 1:return n!=null&&u(n,221).a!=Rt(e.k)<<24>>24;case 2:return n!=null&&u(n,180).a!=(Rt(e.k)&yr);case 6:return n!=null&&qj(u(n,190).a,e.k);case 5:return n!=null&&u(n,15).a!=Rt(e.k);case 7:return n!=null&&u(n,191).a!=Rt(e.k)<<16>>16;case 3:return n!=null&&ne(re(n))!=e.j;case 4:return n!=null&&u(n,164).a!=e.j;default:return n==null?e.n!=null:!gi(n,e.n)}}function oN(e,n,t){var i,r,c,o;return e.ml()&&e.ll()&&(o=wV(e,u(t,57)),ue(o)!==ue(t))?(e.vj(n),e.Bj(n,z$e(e,n,o)),e.$k()&&(c=(r=u(t,52),e.kl()?e.il()?r.Qh(e.b,Oc(u(Cn(Go(e.b),e.Jj()),19)).n,u(Cn(Go(e.b),e.Jj()).Fk(),29).ik(),null):r.Qh(e.b,Ji(r.Ah(),Oc(u(Cn(Go(e.b),e.Jj()),19))),null,null):r.Qh(e.b,-1-e.Jj(),null,null)),!u(o,52).Mh()&&(c=(i=u(o,52),e.kl()?e.il()?i.Oh(e.b,Oc(u(Cn(Go(e.b),e.Jj()),19)).n,u(Cn(Go(e.b),e.Jj()).Fk(),29).ik(),c):i.Oh(e.b,Ji(i.Ah(),Oc(u(Cn(Go(e.b),e.Jj()),19))),null,c):i.Oh(e.b,-1-e.Jj(),null,c))),c&&c.mj()),Fs(e.b)&&e.Hj(e.Gj(9,t,o,n,!1)),o):t}function ZKe(e){var n,t,i,r,c,o,l,f,h,b;for(i=new Te,o=new P(e.e.a);o.a0&&(o=k.Math.max(o,UBe(e.C.b+i.d.b,r))),b=i,p=r,y=c;e.C&&e.C.c>0&&(S=y+e.C.c,h&&(S+=b.d.c),o=k.Math.max(o,(Na(),Rf(qa),k.Math.abs(p-1)<=qa||p==1||isNaN(p)&&isNaN(1)?0:S/(1-p)))),t.n.b=0,t.a.a=o}function nVe(e,n){var t,i,r,c,o,l,f,h,b,p,y,S;if(t=u(zc(e.b,n),127),f=u(u(vi(e.r,n),22),83),f.dc()){t.n.d=0,t.n.a=0;return}for(h=e.u.Gc((ps(),Z1)),o=0,e.A.Gc((Vs(),_g))&&NXe(e,n),l=f.Jc(),b=null,y=0,p=0;l.Ob();)i=u(l.Pb(),115),c=ne(re(i.b.mf((H$(),mJ)))),r=i.b.Kf().b,b?(S=p+b.d.a+e.w+i.d.d,o=k.Math.max(o,(Na(),Rf(qa),k.Math.abs(y-c)<=qa||y==c||isNaN(y)&&isNaN(c)?0:S/(c-y)))):e.C&&e.C.d>0&&(o=k.Math.max(o,UBe(e.C.d+i.d.d,c))),b=i,y=c,p=r;e.C&&e.C.a>0&&(S=p+e.C.a,h&&(S+=b.d.a),o=k.Math.max(o,(Na(),Rf(qa),k.Math.abs(y-1)<=qa||y==1||isNaN(y)&&isNaN(1)?0:S/(1-y)))),t.n.d=0,t.a.b=o}function tVe(e,n,t){var i,r,c,o,l,f;for(this.g=e,l=n.d.length,f=t.d.length,this.d=le(u1,Fd,9,l+f,0,1),o=0;o0?NY(this,this.f/this.a):Ia(n.g,n.d[0]).a!=null&&Ia(t.g,t.d[0]).a!=null?NY(this,(ne(Ia(n.g,n.d[0]).a)+ne(Ia(t.g,t.d[0]).a))/2):Ia(n.g,n.d[0]).a!=null?NY(this,Ia(n.g,n.d[0]).a):Ia(t.g,t.d[0]).a!=null&&NY(this,Ia(t.g,t.d[0]).a)}function BPn(e,n,t,i,r,c,o,l){var f,h,b,p,y,S,A,O,D,B;if(A=!1,h=Ebe(t.q,n.f+n.b-t.q.f),S=i.f>n.b&&l,B=r-(t.q.e+h-o),p=(f=aS(i,B,!1),f.a),S&&p>i.f)return!1;if(S){for(y=0,D=new P(n.d);D.a=(kn(c,e.c.length),u(e.c[c],186)).e,!S&&p>n.b&&!b)?!1:((b||S||p<=n.b)&&(b&&p>n.b?(t.d=p,tO(t,$Ge(t,p))):(WHe(t.q,h),t.c=!0),tO(i,r-(t.s+t.r)),LO(i,t.q.e+t.q.d,n.f),kB(n,i),e.c.length>c&&(BO((kn(c,e.c.length),u(e.c[c],186)),i),(kn(c,e.c.length),u(e.c[c],186)).a.c.length==0&&Cd(e,c)),A=!0),A)}function zPn(e,n){var t,i,r,c,o,l,f,h,b,p;for(e.a=new yDe(hkn(Yx)),i=new P(n.a);i.a0&&(Wn(0,t.length),t.charCodeAt(0)!=47)))throw R(new Un("invalid opaquePart: "+t));if(e&&!(n!=null&&xj(SG,n.toLowerCase()))&&!(t==null||!jQ(t,oA,sA)))throw R(new Un(JZe+t));if(e&&n!=null&&xj(SG,n.toLowerCase())&&!BAn(t))throw R(new Un(JZe+t));if(!qjn(i))throw R(new Un("invalid device: "+i));if(!Hkn(r))throw o=r==null?"invalid segments: null":"invalid segment: "+$kn(r),R(new Un(o));if(!(c==null||ah(c,Xo(35))==-1))throw R(new Un("invalid query: "+c))}function rVe(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B;if(y=new wc(e.o),B=n.a/y.a,l=n.b/y.b,O=n.a-y.a,c=n.b-y.b,t)for(r=ue(C(e,(Oe(),Zi)))===ue((Br(),to)),A=new P(e.j);A.a=1&&(D-o>0&&p>=0?(f.n.a+=O,f.n.b+=c*o):D-o<0&&b>=0&&(f.n.a+=O*D,f.n.b+=c));e.o.a=n.a,e.o.b=n.b,he(e,(Oe(),Ag),(Vs(),i=u(la(iA),10),new _l(i,u(Df(i,i.length),10),0)))}function GPn(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B;if(t.Tg("Network simplex layering",1),e.b=n,B=u(C(n,(Oe(),jx)),15).a*4,D=e.b.a,D.c.length<1){t.Ug();return}for(c=$Dn(e,D),O=null,r=St(c,0);r.b!=r.d.c;){for(i=u(jt(r),16),l=B*lc(k.Math.sqrt(i.gc())),o=QDn(i),zW(_oe(Qbn(Loe(YK(o),l),O),!0),t.dh(1)),y=e.b.b,A=new P(o.a);A.a1)for(O=le($t,ni,30,e.b.b.c.length,15,1),p=0,h=new P(e.b.b);h.a0){rz(e,t,0),t.a+=String.fromCharCode(i),r=TEn(n,c),rz(e,t,r),c+=r-1;continue}i==39?c+10&&A.a<=0){f.c.length=0,qn(f.c,A);break}S=A.i-A.d,S>=l&&(S>l&&(f.c.length=0,l=S),qn(f.c,A))}f.c.length!=0&&(o=u(Le(f,fz(r,f.c.length)),116),V.a.Ac(o)!=null,o.g=b++,oge(o,n,t,i),f.c.length=0)}for(D=e.c.length+1,y=new P(e);y.aIr||n.o==Og&&b=l&&r<=f)l<=r&&c<=f?(t[b++]=r,t[b++]=c,i+=2):l<=r?(t[b++]=r,t[b++]=f,e.b[i]=f+1,o+=2):c<=f?(t[b++]=l,t[b++]=c,i+=2):(t[b++]=l,t[b++]=f,e.b[i]=f+1);else if(fY0)&&l<10);Poe(e.c,new kc),cVe(e),B3n(e.c),DPn(e.f)}function t$n(e,n){var t,i,r,c,o,l,f,h,b,p,y;switch(e.k.g){case 1:if(i=u(C(e,(me(),mi)),17),t=u(C(i,K3e),78),t?Fe(ze(C(i,qd)))&&(t=k1e(t)):t=new xs,h=u(C(e,Ea),12),h){if(b=mu(F(z(Lr,1),Ae,8,0,[h.i.n,h.n,h.a])),n<=b.a)return b.b;Ki(t,b,t.a,t.a.a)}if(p=u(C(e,gf),12),p){if(y=mu(F(z(Lr,1),Ae,8,0,[p.i.n,p.n,p.a])),y.a<=n)return y.b;Ki(t,y,t.c.b,t.c)}if(t.b>=2){for(f=St(t,0),o=u(jt(f),8),l=u(jt(f),8);l.a0&&EO(h,!0,(vr(),ru)),l.k==(Fn(),wr)&&LDe(h),ei(e.f,l,n)}}function oVe(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q;for(h=Vi,b=Vi,l=Ir,f=Ir,y=new P(n.i);y.a=e.j?(++e.j,Ce(e.b,ve(1)),Ce(e.c,b)):(i=e.d[n.p][1],ul(e.b,h,ve(u(Le(e.b,h),15).a+1-i)),ul(e.c,h,ne(re(Le(e.c,h)))+b-i*e.f)),(e.r==(X0(),pI)&&(u(Le(e.b,h),15).a>e.k||u(Le(e.b,h-1),15).a>e.k)||e.r==mI&&(ne(re(Le(e.c,h)))>e.n||ne(re(Le(e.c,h-1)))>e.n))&&(f=!1),o=new Xn(Qn(cr(n).a.Jc(),new ee));ht(o);)c=u(ct(o),17),l=c.c.i,e.g[l.p]==h&&(p=sVe(e,l),r=r+u(p.a,15).a,f=f&&Fe(ze(p.b)));return e.g[n.p]=h,r=r+e.d[n.p][0],new jc(ve(r),($n(),!!f))}function r$n(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe;return y=e.c[n],S=e.c[t],A=u(C(y,(me(),Dy)),16),!!A&&A.gc()!=0&&A.Gc(S)||(O=y.k!=(Fn(),dr)&&S.k!=dr,D=u(C(y,bp),9),B=u(C(S,bp),9),q=D!=B,V=!!D&&D!=y||!!B&&B!=S,te=UQ(y,(Ie(),Vn)),be=UQ(S,bt),V=V|(UQ(y,bt)||UQ(S,Vn)),fe=V&&q||te||be,O&&fe)||y.k==(Fn(),wo)&&S.k==Wi||S.k==(Fn(),wo)&&y.k==Wi?!1:(b=e.c[n],c=e.c[t],r=GHe(e.e,b,c,(Ie(),Yn)),f=GHe(e.i,b,c,nt),NNn(e.f,b,c),h=Qze(e.b,b,c)+u(r.a,15).a+u(f.a,15).a+e.f.d,l=Qze(e.b,c,b)+u(r.b,15).a+u(f.b,15).a+e.f.b,e.a&&(p=u(C(b,mi),12),o=u(C(c,mi),12),i=CHe(e.g,p,o),h+=u(i.a,15).a,l+=u(i.b,15).a),h>l)}function lVe(e,n){var t,i,r,c,o;t=ne(re(C(n,(Oe(),Kf)))),t<2&&he(n,Kf,2),i=u(C(n,wl),86),i==(vr(),nh)&&he(n,wl,UB(n)),r=u(C(n,Dun),15),r.a==0?he(n,(me(),Ly),new yQ):he(n,(me(),Ly),new VR(r.a)),c=ze(C(n,vx)),c==null&&he(n,vx,($n(),ue(C(n,Y1))===ue((z1(),q7)))),er(new mn(null,new yn(n.a,16)),new Zue(e)),er(lu(new mn(null,new yn(n.b,16)),new b1),new eoe(e)),o=new iVe(n),he(n,(me(),z3),o),zT(e.a),aa(e.a,(zr(),Xf),u(C(n,By),188)),aa(e.a,c1,u(C(n,wH),188)),aa(e.a,eo,u(C(n,px),188)),aa(e.a,no,u(C(n,yH),188)),aa(e.a,Pc,L7n(u(C(n,Y1),222))),Fse(e.a,ZRn(n)),he(n,kie,uN(e.a,n))}function jge(e,n,t,i,r){var c,o,l,f,h,b,p,y,S,A,O,D,B;for(p=new wt,o=new Te,iqe(e,t,e.d.zg(),o,p),iqe(e,i,e.d.Ag(),o,p),e.b=.2*(O=fUe(lu(new mn(null,new yn(o,16)),new vM)),D=fUe(lu(new mn(null,new yn(o,16)),new yM)),k.Math.min(O,D)),c=0,l=0;l=2&&(B=IUe(o,!0,y),!e.e&&(e.e=new CEe(e)),MEn(e.e,B,o,e.b)),lGe(o,y),f$n(o),S=-1,b=new P(o);b.a0&&(t+=f.n.a+f.o.a/2,++p),A=new P(f.j);A.a0&&(t/=p),B=le(Jr,Jc,30,i.a.c.length,15,1),l=0,h=new P(i.a);h.a-1){for(r=St(l,0);r.b!=r.d.c;)i=u(jt(r),132),i.v=o;for(;l.b!=0;)for(i=u(nW(l,0),132),t=new P(i.i);t.a-1){for(c=new P(l);c.a0)&&(dw(f,k.Math.min(f.o,r.o-1)),m0(f,f.i-1),f.i==0&&qn(l.c,f))}}function hVe(e,n,t,i,r){var c,o,l,f;return f=Vi,o=!1,l=dge(e,Nr(new Ee(n.a,n.b),e),pi(new Ee(t.a,t.b),r),Nr(new Ee(i.a,i.b),t)),c=!!l&&!(k.Math.abs(l.a-e.a)<=rp&&k.Math.abs(l.b-e.b)<=rp||k.Math.abs(l.a-n.a)<=rp&&k.Math.abs(l.b-n.b)<=rp),l=dge(e,Nr(new Ee(n.a,n.b),e),t,r),l&&((k.Math.abs(l.a-e.a)<=rp&&k.Math.abs(l.b-e.b)<=rp)==(k.Math.abs(l.a-n.a)<=rp&&k.Math.abs(l.b-n.b)<=rp)||c?f=k.Math.min(f,aE(Nr(l,t))):o=!0),l=dge(e,Nr(new Ee(n.a,n.b),e),i,r),l&&(o||(k.Math.abs(l.a-e.a)<=rp&&k.Math.abs(l.b-e.b)<=rp)==(k.Math.abs(l.a-n.a)<=rp&&k.Math.abs(l.b-n.b)<=rp)||c)&&(f=k.Math.min(f,aE(Nr(l,i)))),f}function dVe(e){a2(e,new qw(UP(l2(u2(s2(o2(new gd,W0),uQe),"Minimizes the stress within a layout using stress majorization. Stress exists if the euclidean distance between a pair of nodes doesn't match their graph theoretic distance, that is, the shortest path between the two nodes. The method allows to specify individual edge lengths."),new m5),$o))),Se(e,W0,ES,_e(dve)),Se(e,W0,aF,($n(),!0)),Se(e,W0,k3,_e(Ptn)),Se(e,W0,my,_e($tn)),Se(e,W0,py,_e(Rtn)),Se(e,W0,K8,_e(Ltn)),Se(e,W0,SS,_e(gve)),Se(e,W0,V8,_e(Btn)),Se(e,W0,swe,_e(hve)),Se(e,W0,fwe,_e(fve)),Se(e,W0,awe,_e(ave)),Se(e,W0,hwe,_e(bve)),Se(e,W0,lwe,_e(EJ))}function a$n(e){var n,t,i,r,c,o,l,f;for(n=null,i=new P(e);i.a0&&t.c==0&&(!n&&(n=new Te),qn(n.c,t));if(n)for(;n.c.length!=0;){if(t=u(Cd(n,0),239),t.b&&t.b.c.length>0){for(c=(!t.b&&(t.b=new Te),new P(t.b));c.apu(e,t,0))return new jc(r,t)}else if(ne(Ia(r.g,r.d[0]).a)>ne(Ia(t.g,t.d[0]).a))return new jc(r,t)}for(l=(!t.e&&(t.e=new Te),t.e).Jc();l.Ob();)o=u(l.Pb(),239),f=(!o.b&&(o.b=new Te),o.b),N2(0,f.c.length),_j(f.c,0,t),o.c==f.c.length&&qn(n.c,o)}return null}function bS(e,n){var t,i,r,c,o,l,f,h,b;if(n.e==5){uVe(e,n);return}if(h=n,!(h.b==null||e.b==null)){for(h3(e),hS(e),h3(h),hS(h),t=le($t,ni,30,e.b.length+h.b.length,15,1),b=0,i=0,o=0;i=l&&r<=f)l<=r&&c<=f?i+=2:l<=r?(e.b[i]=f+1,o+=2):c<=f?(t[b++]=r,t[b++]=l-1,i+=2):(t[b++]=r,t[b++]=l-1,e.b[i]=f+1,o+=2);else if(f0),u(b.a.Xb(b.c=--b.b),17));c!=i&&b.b>0;)e.a[c.p]=!0,e.a[i.p]=!0,c=(at(b.b>0),u(b.a.Xb(b.c=--b.b),17));b.b>0&&As(b)}}function bVe(e,n,t){var i,r,c,o,l,f,h,b,p,y;if(t)for(i=-1,b=new qr(n,0);b.b0?r-=864e5:r+=864e5,f=new jle(mc(Lu(n.q.getTime()),r))),b=new h4,h=e.a.length,c=0;c=97&&i<=122||i>=65&&i<=90){for(o=c+1;o=h)throw R(new Un("Missing trailing '"));o+1=14&&b<=16))?n.a._b(i)?(t.a?Kt(t.a,t.b):t.a=new tl(t.d),Xj(t.a,"[...]")):(l=G4(i),h=new E2(n),D1(t,wVe(l,h))):X(i,171)?D1(t,cTn(u(i,171))):X(i,195)?D1(t,XAn(u(i,195))):X(i,201)?D1(t,ZMn(u(i,201))):X(i,2073)?D1(t,KAn(u(i,2073))):X(i,54)?D1(t,rTn(u(i,54))):X(i,584)?D1(t,mTn(u(i,584))):X(i,830)?D1(t,iTn(u(i,830))):X(i,108)&&D1(t,tTn(u(i,108))):D1(t,i==null?Vo:fu(i));return t.a?t.e.length==0?t.a.a:t.a.a+(""+t.e):t.c}function D8(e,n){var t,i,r,c;c=e.F,n==null?(e.F=null,c8(e,null)):(e.F=(Ln(n),n),i=ah(n,Xo(60)),i!=-1?(r=(Qr(0,i,n.length),n.substr(0,i)),ah(n,Xo(46))==-1&&!bn(r,ly)&&!bn(r,BS)&&!bn(r,VF)&&!bn(r,zS)&&!bn(r,FS)&&!bn(r,JS)&&!bn(r,HS)&&!bn(r,GS)&&(r=nen),t=z$(n,Xo(62)),t!=-1&&(r+=""+(Wn(t+1,n.length+1),n.substr(t+1))),c8(e,r)):(r=n,ah(n,Xo(46))==-1&&(i=ah(n,Xo(91)),i!=-1&&(r=(Qr(0,i,n.length),n.substr(0,i))),!bn(r,ly)&&!bn(r,BS)&&!bn(r,VF)&&!bn(r,zS)&&!bn(r,FS)&&!bn(r,JS)&&!bn(r,HS)&&!bn(r,GS)?(r=nen,i!=-1&&(r+=""+(Wn(i,n.length+1),n.substr(i)))):r=n),c8(e,r),r==n&&(e.F=e.D))),(e.Db&4)!=0&&(e.Db&1)==0&&hi(e,new Dr(e,1,5,c,n))}function m$n(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A;if(e.c=e.e,A=ze(C(n,(Oe(),_un))),S=A==null||(Ln(A),A),c=u(C(n,(me(),po)),22).Gc((Ic(),Kl)),r=u(C(n,Zi),102),t=!(r==(Br(),Dg)||r==a1||r==to),S&&(t||!c)){for(p=new P(n.a);p.a=0)return r=Fjn(e,(Qr(1,o,n.length),n.substr(1,o-1))),b=(Qr(o+1,f,n.length),n.substr(o+1,f-(o+1))),GRn(e,b,r)}else{if(t=-1,Mme==null&&(Mme=new RegExp("\\d")),Mme.test(String.fromCharCode(l))&&(t=Hle(n,Xo(46),f-1),t>=0)){i=u(aY(e,YRe(e,(Qr(1,t,n.length),n.substr(1,t-1))),!1),61),h=0;try{h=al((Wn(t+1,n.length+1),n.substr(t+1)),Xr,oi)}catch(y){throw y=sr(y),X(y,131)?(c=y,R(new sB(c))):R(y)}if(h>16==-10?t=u(e.Cb,293).Wk(n,t):e.Db>>16==-15&&(!n&&(n=(jn(),rh)),!h&&(h=(jn(),rh)),e.Cb.Vh()&&(f=new L1(e.Cb,1,13,h,n,$d(Ts(u(e.Cb,62)),e),!1),t?t.lj(f):t=f));else if(X(e.Cb,88))e.Db>>16==-23&&(X(n,88)||(n=(jn(),jf)),X(h,88)||(h=(jn(),jf)),e.Cb.Vh()&&(f=new L1(e.Cb,1,10,h,n,$d(Vu(u(e.Cb,29)),e),!1),t?t.lj(f):t=f));else if(X(e.Cb,446))for(l=u(e.Cb,834),o=(!l.b&&(l.b=new IP(new jX)),l.b),c=(i=new B2(new sn(o.a).a),new DP(i));c.a.b;)r=u(t3(c.a).jd(),87),t=_8(r,Iz(r,l),t)}return t}function y$n(e,n){var t,i,r,c,o,l,f,h,b,p,y;for(o=Fe(ze(ke(e,(Oe(),Sm)))),y=u(ke(e,Mm),22),f=!1,h=!1,p=new st((!e.c&&(e.c=new we($s,e,9,9)),e.c));p.e!=p.i.gc()&&(!f||!h);){for(c=u(ft(p),125),l=0,r=Uh(Rl(F(z(Xl,1),Nn,20,0,[(!c.d&&(c.d=new In(pr,c,8,5)),c.d),(!c.e&&(c.e=new In(pr,c,7,4)),c.e)])));ht(r)&&(i=u(ct(r),85),b=o&&Uw(i)&&Fe(ze(ke(i,xg))),t=YKe((!i.b&&(i.b=new In(mt,i,4,7)),i.b),c)?e==Fi(iu(u(K((!i.c&&(i.c=new In(mt,i,5,8)),i.c),0),84))):e==Fi(iu(u(K((!i.b&&(i.b=new In(mt,i,4,7)),i.b),0),84))),!((b||t)&&(++l,l>1))););(l>0||y.Gc((ps(),Z1))&&(!c.n&&(c.n=new we(Eu,c,1,7)),c.n).i>0)&&(f=!0),l>1&&(h=!0)}f&&n.Ec((Ic(),Kl)),h&&n.Ec((Ic(),ux))}function mVe(e){var n,t,i,r,c,o,l,f,h,b,p,y;if(y=u(ke(e,(Xt(),Ig)),22),y.dc())return null;if(l=0,o=0,y.Gc((Vs(),XI))){for(b=u(ke(e,Vx),102),i=2,t=2,r=2,c=2,n=Fi(e)?u(ke(Fi(e),Ng),86):u(ke(e,Ng),86),h=new st((!e.c&&(e.c=new we($s,e,9,9)),e.c));h.e!=h.i.gc();)if(f=u(ft(h),125),p=u(ke(f,t5),64),p==(Ie(),ju)&&(p=uge(f,n),Ei(f,t5,p)),b==(Br(),to))switch(p.g){case 1:i=k.Math.max(i,f.i+f.g);break;case 2:t=k.Math.max(t,f.j+f.f);break;case 3:r=k.Math.max(r,f.i+f.g);break;case 4:c=k.Math.max(c,f.j+f.f)}else switch(p.g){case 1:i+=f.g+2;break;case 2:t+=f.f+2;break;case 3:r+=f.g+2;break;case 4:c+=f.f+2}l=k.Math.max(i,r),o=k.Math.max(t,c)}return Yw(e,l,o,!0,!0)}function k$n(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O;for(r=null,i=new P(n.a);i.a1)for(r=e.e.b,Vt(e.e,f),l=f.a.ec().Jc();l.Ob();)o=u(l.Pb(),9),ei(e.c,o,ve(r))}}function j$n(e,n,t,i){var r,c,o,l,f,h,b,p,y,S;for(c=new Pqe(n),p=VIn(e,n,c),S=k.Math.max(ne(re(C(n,(Oe(),Ud)))),1),b=new P(p.a);b.a=0){for(f=null,l=new qr(b.a,h+1);l.b0,h?h&&(y=B.p,o?++y:--y,p=u(Le(B.c.a,y),9),i=Nze(p),S=!(BUe(i,fe,t[0])||VIe(i,fe,t[0]))):S=!0),A=!1,be=n.D.i,be&&be.c&&l.e&&(b=o&&be.p>0||!o&&be.p=0&&Oo?1:Bb(isNaN(0),isNaN(o)))<0&&(Rf(Mh),(k.Math.abs(o-1)<=Mh||o==1||isNaN(o)&&isNaN(1)?0:o<1?-1:o>1?1:Bb(isNaN(o),isNaN(1)))<0)&&(Rf(Mh),(k.Math.abs(0-l)<=Mh||l==0||isNaN(0)&&isNaN(l)?0:0l?1:Bb(isNaN(0),isNaN(l)))<0)&&(Rf(Mh),(k.Math.abs(l-1)<=Mh||l==1||isNaN(l)&&isNaN(1)?0:l<1?-1:l>1?1:Bb(isNaN(l),isNaN(1)))<0)),c)}function O$n(e){var n,t,i,r,c,o,l,f,h,b,p;for(e.j=le($t,ni,30,e.g,15,1),e.o=new Te,er(lu(new mn(null,new yn(e.e.b,16)),new pv),new EEe(e)),e.a=le(ts,ma,30,e.b,16,1),CO(new mn(null,new yn(e.e.b,16)),new xEe(e)),i=(p=new Te,er(li(lu(new mn(null,new yn(e.e.b,16)),new B5),new SEe(e)),new lCe(e,p)),p),f=new P(i);f.a=h.c.c.length?b=Bae((Fn(),Wi),dr):b=Bae((Fn(),dr),dr),b*=2,c=t.a.g,t.a.g=k.Math.max(c,c+(b-c)),o=t.b.g,t.b.g=k.Math.max(o,o+(b-o)),r=n}}function Qz(e,n){var t;if(e.e)throw R(new Uc((M1(gte),UZ+gte.k+XZ)));if(!Hgn(e.a,n))throw R(new du(RYe+n+BYe));if(n==e.d)return e;switch(t=e.d,e.d=n,t.g){case 0:switch(n.g){case 2:Hw(e);break;case 1:B0(e),Hw(e);break;case 4:l3(e),Hw(e);break;case 3:l3(e),B0(e),Hw(e)}break;case 2:switch(n.g){case 1:B0(e),LW(e);break;case 4:l3(e),Hw(e);break;case 3:l3(e),B0(e),Hw(e)}break;case 1:switch(n.g){case 2:B0(e),LW(e);break;case 4:B0(e),l3(e),Hw(e);break;case 3:B0(e),l3(e),B0(e),Hw(e)}break;case 4:switch(n.g){case 2:l3(e),Hw(e);break;case 1:l3(e),B0(e),Hw(e);break;case 3:B0(e),LW(e)}break;case 3:switch(n.g){case 2:B0(e),l3(e),Hw(e);break;case 1:B0(e),l3(e),B0(e),Hw(e);break;case 4:B0(e),LW(e)}}return e}function p3(e,n){var t;if(e.d)throw R(new Uc((M1(Tte),UZ+Tte.k+XZ)));if(!Jgn(e.a,n))throw R(new du(RYe+n+BYe));if(n==e.c)return e;switch(t=e.c,e.c=n,t.g){case 0:switch(n.g){case 2:ig(e);break;case 1:R0(e),ig(e);break;case 4:f3(e),ig(e);break;case 3:f3(e),R0(e),ig(e)}break;case 2:switch(n.g){case 1:R0(e),PW(e);break;case 4:f3(e),ig(e);break;case 3:f3(e),R0(e),ig(e)}break;case 1:switch(n.g){case 2:R0(e),PW(e);break;case 4:R0(e),f3(e),ig(e);break;case 3:R0(e),f3(e),R0(e),ig(e)}break;case 4:switch(n.g){case 2:f3(e),ig(e);break;case 1:f3(e),R0(e),ig(e);break;case 3:R0(e),PW(e)}break;case 3:switch(n.g){case 2:R0(e),f3(e),ig(e);break;case 1:R0(e),f3(e),R0(e),ig(e);break;case 4:R0(e),PW(e)}}return e}function N$n(e){var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V;for(p=e.b,b=new qr(p,0),y2(b,new Xu(e)),q=!1,o=1;b.b0&&(n.a+=To),Wz(u(ft(l),174),n);for(n.a+=nee,f=new j4((!i.c&&(i.c=new In(mt,i,5,8)),i.c));f.e!=f.i.gc();)f.e>0&&(n.a+=To),Wz(u(ft(f),174),n);n.a+=")"}}function I$n(e,n,t){var i,r,c,o,l,f,h,b;for(f=new st((!e.a&&(e.a=new we(Ft,e,10,11)),e.a));f.e!=f.i.gc();)for(l=u(ft(f),26),r=new Xn(Qn(U0(l).a.Jc(),new ee));ht(r);){if(i=u(ct(r),85),!i.b&&(i.b=new In(mt,i,4,7)),!(i.b.i<=1&&(!i.c&&(i.c=new In(mt,i,5,8)),i.c.i<=1)))throw R(new a4("Graph must not contain hyperedges."));if(!eS(i)&&l!=iu(u(K((!i.c&&(i.c=new In(mt,i,5,8)),i.c),0),84)))for(h=new tNe,Pu(h,i),he(h,(L0(),My),i),xP(h,u(bu(Xc(t.f,l)),155)),nX(h,u(zn(t,iu(u(K((!i.c&&(i.c=new In(mt,i,5,8)),i.c),0),84))),155)),Ce(n.c,h),o=new st((!i.n&&(i.n=new we(Eu,i,1,7)),i.n));o.e!=o.i.gc();)c=u(ft(o),157),b=new fPe(h,c.a),Pu(b,c),he(b,My,c),b.e.a=k.Math.max(c.g,1),b.e.b=k.Math.max(c.f,1),hge(b),Ce(n.d,b)}}function D$n(e,n,t){var i,r,c,o,l,f,h,b,p,y;switch(t.Tg("Node promotion heuristic",1),e.i=n,e.r=u(C(n,(Oe(),dI)),243),e.r!=(X0(),_7)&&e.r!=xx?cRn(e):NIn(e),b=u(C(e.i,i4e),15).a,c=new Nq,e.r.g){case 2:case 1:I8(e,c);break;case 3:for(e.r=TH,I8(e,c),f=0,l=new P(e.b);l.ae.k&&(e.r=pI,I8(e,c));break;case 4:for(e.r=TH,I8(e,c),h=0,r=new P(e.c);r.ae.n&&(e.r=mI,I8(e,c));break;case 6:y=lc(k.Math.ceil(e.g.length*b/100)),I8(e,new jje(y));break;case 5:p=lc(k.Math.ceil(e.e*b/100)),I8(e,new Eje(p));break;case 8:eYe(e,!0);break;case 9:eYe(e,!1);break;default:I8(e,c)}e.r!=_7&&e.r!=xx?QNn(e,n):wDn(e,n),t.Ug()}function _$n(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V;for(p=new Mge(e),j4n(p,!(n==(vr(),Vl)||n==eh)),b=p.a,y=new o4,r=(wa(),F(z(dm,1),je,237,0,[Ou,No,Nu])),o=0,f=r.length;o0&&(y.d+=b.n.d,y.d+=b.d),y.a>0&&(y.a+=b.n.a,y.a+=b.d),y.b>0&&(y.b+=b.n.b,y.b+=b.d),y.c>0&&(y.c+=b.n.c,y.c+=b.d),y}function kVe(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A;for(y=t.d,p=t.c,c=new Ee(t.f.a+t.d.b+t.d.c,t.f.b+t.d.d+t.d.a),o=c.b,h=new P(e.a);h.a0&&(e.c[n.c.p][n.p].d+=Ds(e.i,24)*kN*.07000000029802322-.03500000014901161,e.c[n.c.p][n.p].a=e.c[n.c.p][n.p].d/e.c[n.c.p][n.p].b)}}function P$n(e){var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O,D;for(A=new P(e);A.ai.d,i.d=k.Math.max(i.d,n),l&&t&&(i.d=k.Math.max(i.d,i.a),i.a=i.d+r);break;case 3:t=n>i.a,i.a=k.Math.max(i.a,n),l&&t&&(i.a=k.Math.max(i.a,i.d),i.d=i.a+r);break;case 2:t=n>i.c,i.c=k.Math.max(i.c,n),l&&t&&(i.c=k.Math.max(i.b,i.c),i.b=i.c+r);break;case 4:t=n>i.b,i.b=k.Math.max(i.b,n),l&&t&&(i.b=k.Math.max(i.b,i.c),i.c=i.b+r)}}}function EVe(e,n){var t,i,r,c,o,l,f,h,b;return h="",n.length==0?e.le(Jge,pZ,-1,-1):(b=V2(n),bn(b.substr(0,3),"at ")&&(b=(Wn(3,b.length+1),b.substr(3))),b=b.replace(/\[.*?\]/g,""),o=b.indexOf("("),o==-1?(o=b.indexOf("@"),o==-1?(h=b,b=""):(h=V2((Wn(o+1,b.length+1),b.substr(o+1))),b=V2((Qr(0,o,b.length),b.substr(0,o))))):(t=b.indexOf(")",o),h=(Qr(o+1,t,b.length),b.substr(o+1,t-(o+1))),b=V2((Qr(0,o,b.length),b.substr(0,o)))),o=ah(b,Xo(46)),o!=-1&&(b=(Wn(o+1,b.length+1),b.substr(o+1))),(b.length==0||bn(b,"Anonymous function"))&&(b=pZ),l=z$(h,Xo(58)),r=Hle(h,Xo(58),l-1),f=-1,i=-1,c=Jge,l!=-1&&r!=-1&&(c=(Qr(0,r,h.length),h.substr(0,r)),f=kOe((Qr(r+1,l,h.length),h.substr(r+1,l-(r+1)))),i=kOe((Wn(l+1,h.length+1),h.substr(l+1)))),e.le(c,b,f,i))}function R$n(e){var n,t,i,r,c,o,l,f,h,b,p;for(h=new P(e);h.a0||b.j==Yn&&b.e.c.length-b.g.c.length<0)){n=!1;break}for(r=new P(b.g);r.a=h&&be>=D&&(y+=A.n.b+O.n.b+O.a.b-te,++l));if(t)for(o=new P(q.e);o.a=h&&be>=D&&(y+=A.n.b+O.n.b+O.a.b-te,++l))}l>0&&(fe+=y/l,++S)}S>0?(n.a=r*fe/S,n.g=S):(n.a=0,n.g=0)}function xge(e,n,t,i){var r,c,o,l,f;return l=new Mge(n),_Nn(l,i),r=!0,e&&e.nf((Xt(),Ng))&&(c=u(e.mf((Xt(),Ng)),86),r=c==(vr(),nh)||c==Zc||c==ru),EXe(l,!1),Ao(l.e.Pf(),new Kle(l,!1,r)),HV(l,l.f,(wa(),Ou),(Ie(),Vn)),HV(l,l.f,Nu,bt),HV(l,l.g,Ou,Yn),HV(l,l.g,Nu,nt),GJe(l,Vn),GJe(l,bt),BDe(l,nt),BDe(l,Yn),v2(),o=l.A.Gc((Vs(),Jm))&&l.B.Gc((_s(),VI))?iJe(l):null,o&&Zbn(l.a,o),$$n(l),rxn(l),cxn(l),d$n(l),A_n(l),Oxn(l),NQ(l,Vn),NQ(l,bt),bDn(l),tPn(l),t&&(Yjn(l),Nxn(l),NQ(l,nt),NQ(l,Yn),f=l.B.Gc((_s(),rA)),fqe(l,f,Vn),fqe(l,f,bt),aqe(l,f,nt),aqe(l,f,Yn),er(new mn(null,new yn(new ot(l.i),0)),new Gg),er(li(new mn(null,Jfe(l.r).a.oc()),new qg),new Ug),HAn(l),l.e.Nf(l.o),er(new mn(null,Jfe(l.r).a.oc()),new sd)),l.o}function z$n(e){var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O;for(h=Vi,i=new P(e.a.b);i.a1)for(S=new wge(A,V,i),cc(V,new aCe(e,S)),qn(o.c,S),p=V.a.ec().Jc();p.Ob();)b=u(p.Pb(),49),qo(c,b.b);if(l.a.gc()>1)for(S=new wge(A,l,i),cc(l,new hCe(e,S)),qn(o.c,S),p=l.a.ec().Jc();p.Ob();)b=u(p.Pb(),49),qo(c,b.b)}}function G$n(e,n){var t,i,r,c,o,l;if(u(C(n,(me(),po)),22).Gc((Ic(),Kl))){for(l=new P(n.a);l.a=0&&o0&&(u(zc(e.b,n),127).a.b=t)}function Q$n(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B;for(S=0,i=new ar,c=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));c.e!=c.i.gc();)r=u(ft(c),26),Fe(ze(ke(r,(Oe(),Mg))))||(p=Fi(r),Xz(p)&&!Fe(ze(ke(r,aH)))&&(Ei(r,(me(),Oi),ve(S)),++S,ba(r,jm)&&hr(i,u(ke(r,jm),15))),xVe(e,r,t));for(he(t,(me(),sb),ve(S)),he(t,oI,ve(i.a.gc())),S=0,b=new st((!n.b&&(n.b=new we(pr,n,12,3)),n.b));b.e!=b.i.gc();)f=u(ft(b),85),Xz(n)&&(Ei(f,Oi,ve(S)),++S),D=dW(f),B=jGe(f),y=Fe(ze(ke(D,(Oe(),Sm)))),O=!Fe(ze(ke(f,Mg))),A=y&&Uw(f)&&Fe(ze(ke(f,xg))),o=Fi(D)==n&&Fi(D)==Fi(B),l=(Fi(D)==n&&B==n)^(Fi(B)==n&&D==n),O&&!A&&(l||o)&&Ige(e,f,n,t);if(Fi(n))for(h=new st(UDe(Fi(n)));h.e!=h.i.gc();)f=u(ft(h),85),D=dW(f),D==n&&Uw(f)&&(A=Fe(ze(ke(D,(Oe(),Sm))))&&Fe(ze(ke(f,xg))),A&&Ige(e,f,n,t))}function W$n(e){var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,De,un,cn,On,Dn;for(fe=new Te,A=new P(e.b);A.a=n.length)return{done:!0};var r=n[i++];return{value:[r,t.get(r)],done:!1}}}},KIn()||(e.prototype.createObject=function(){return{}},e.prototype.get=function(n){return this.obj[":"+n]},e.prototype.set=function(n,t){this.obj[":"+n]=t},e.prototype[FZ]=function(n){delete this.obj[":"+n]},e.prototype.keys=function(){var n=[];for(var t in this.obj)t.charCodeAt(0)==58&&n.push(t.substring(1));return n}),e}function Ti(){Ti=Y,Lx=new ki(owe),new Pi("DEPTH",ve(0)),wre=new Pi("FAN",ve(0)),pye=new Pi(VQe,ve(0)),db=new Pi("ROOT",($n(),!1)),vre=new Pi("LEFTNEIGHBOR",null),csn=new Pi("RIGHTNEIGHBOR",null),$H=new Pi("LEFTSIBLING",null),yre=new Pi("RIGHTSIBLING",null),gre=new Pi("DUMMY",!1),new Pi("LEVEL",ve(0)),yye=new Pi("REMOVABLE_EDGES",new xi),SI=new Pi("XCOOR",ve(0)),xI=new Pi("YCOOR",ve(0)),RH=new Pi("LEVELHEIGHT",0),Sa=new Pi("LEVELMIN",0),Vf=new Pi("LEVELMAX",0),pre=new Pi("GRAPH_XMIN",0),mre=new Pi("GRAPH_YMIN",0),mye=new Pi("GRAPH_XMAX",0),vye=new Pi("GRAPH_YMAX",0),wye=new Pi("COMPACT_LEVEL_ASCENSION",!1),bre=new Pi("COMPACT_CONSTRAINTS",new Te),_x=new Pi("ID",""),Px=new Pi("POSITION",ve(0)),Vd=new Pi("PRELIM",0),$7=new Pi("MODIFIER",0),P7=new ki(rQe),EI=new ki(cQe)}function tRn(e){cge();var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O,D;if(e==null)return null;if(p=e.length*8,p==0)return"";for(l=p%24,S=p/24|0,y=l!=0?S+1:S,c=null,c=le(Wl,Eh,30,y*4,15,1),h=0,b=0,n=0,t=0,i=0,o=0,r=0,f=0;f>24,h=(n&3)<<24>>24,A=(n&-128)==0?n>>2<<24>>24:(n>>2^192)<<24>>24,O=(t&-128)==0?t>>4<<24>>24:(t>>4^240)<<24>>24,D=(i&-128)==0?i>>6<<24>>24:(i>>6^252)<<24>>24,c[o++]=r0[A],c[o++]=r0[O|h<<4],c[o++]=r0[b<<2|D],c[o++]=r0[i&63];return l==8?(n=e[r],h=(n&3)<<24>>24,A=(n&-128)==0?n>>2<<24>>24:(n>>2^192)<<24>>24,c[o++]=r0[A],c[o++]=r0[h<<4],c[o++]=61,c[o++]=61):l==16&&(n=e[r],t=e[r+1],b=(t&15)<<24>>24,h=(n&3)<<24>>24,A=(n&-128)==0?n>>2<<24>>24:(n>>2^192)<<24>>24,O=(t&-128)==0?t>>4<<24>>24:(t>>4^240)<<24>>24,c[o++]=r0[A],c[o++]=r0[O|h<<4],c[o++]=r0[b<<2],c[o++]=61),ph(c,0,c.length)}function iRn(e,n){var t,i,r,c,o,l,f;if(e.e==0&&e.p>0&&(e.p=-(e.p-1)),e.p>Xr&&Fae(n,e.p-Q0),o=n.q.getDate(),UT(n,1),e.k>=0&&D4n(n,e.k),e.c>=0?UT(n,e.c):e.k>=0?(f=new p1e(n.q.getFullYear()-Q0,n.q.getMonth(),35),i=35-f.q.getDate(),UT(n,k.Math.min(i,o))):UT(n,o),e.f<0&&(e.f=n.q.getHours()),e.b>0&&e.f<12&&(e.f+=12),Hwn(n,e.f==24&&e.g?0:e.f),e.j>=0&&a9n(n,e.j),e.n>=0&&S9n(n,e.n),e.i>=0&&rTe(n,mc(hc(FO(Lu(n.q.getTime()),zd),zd),e.i)),e.a&&(r=new r$,Fae(r,r.q.getFullYear()-Q0-80),HX(Lu(n.q.getTime()),Lu(r.q.getTime()))&&Fae(n,r.q.getFullYear()-Q0+100)),e.d>=0){if(e.c==-1)t=(7+e.d-n.q.getDay())%7,t>3&&(t-=7),l=n.q.getMonth(),UT(n,n.q.getDate()+t),n.q.getMonth()!=l&&UT(n,n.q.getDate()+(t>0?-7:7));else if(n.q.getDay()!=e.d)return!1}return e.o>Xr&&(c=n.q.getTimezoneOffset(),rTe(n,mc(Lu(n.q.getTime()),(e.o-c)*60*zd))),!0}function TVe(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te;if(r=C(n,(me(),mi)),!!X(r,206)){for(A=u(r,26),O=n.e,y=new wc(n.c),c=n.d,y.a+=c.b,y.b+=c.d,te=u(ke(A,(Oe(),kH)),182),cs(te,(_s(),aG))&&(S=u(ke(A,l4e),104),WU(S,c.a),tX(S,c.d),ZU(S,c.b),eX(S,c.c)),t=new Te,b=new P(n.a);b.ai.c.length-1;)Ce(i,new jc(E3,Fpe));t=u(C(r,Dh),15).a,x1(u(C(e,kp),86))?(r.e.ane(re((kn(t,i.c.length),u(i.c[t],49)).b))&&HC((kn(t,i.c.length),u(i.c[t],49)),r.e.a+r.f.a)):(r.e.bne(re((kn(t,i.c.length),u(i.c[t],49)).b))&&HC((kn(t,i.c.length),u(i.c[t],49)),r.e.b+r.f.b))}for(c=St(e.b,0);c.b!=c.d.c;)r=u(jt(c),40),t=u(C(r,(Mu(),Dh)),15).a,he(r,(Ti(),Sa),re((kn(t,i.c.length),u(i.c[t],49)).a)),he(r,Vf,re((kn(t,i.c.length),u(i.c[t],49)).b));n.Ug()}function cRn(e){var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O;for(e.o=ne(re(C(e.i,(Oe(),Tg)))),e.f=ne(re(C(e.i,lb))),e.j=e.i.b.c.length,l=e.j-1,y=0,e.k=0,e.n=0,e.b=Pf(le(jr,Ae,15,e.j,0,1)),e.c=Pf(le(gr,Ae,346,e.j,7,1)),o=new P(e.i.b);o.a0&&Ce(e.q,b),Ce(e.p,b);n-=i,S=f+n,h+=n*e.f,ul(e.b,l,ve(S)),ul(e.c,l,h),e.k=k.Math.max(e.k,S),e.n=k.Math.max(e.n,h),e.e+=n,n+=O}}function IVe(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V;if(n.b!=0){for(S=new xi,l=null,A=null,i=lc(k.Math.floor(k.Math.log(n.b)*k.Math.LOG10E)+1),f=0,V=St(n,0);V.b!=V.d.c;)for(B=u(jt(V),40),ue(A)!==ue(C(B,(Ti(),_x)))&&(A=Pt(C(B,_x)),f=0),A!=null?l=A+bLe(f++,i):l=bLe(f++,i),he(B,_x,l),D=(r=St(new S1(B).a.d,0),new Cv(r));WC(D.a);)O=u(jt(D.a),65).c,Ki(S,O,S.c.b,S.c),he(O,_x,l);for(y=new wt,o=0;o0&&(V-=S),pge(o,V),b=0,y=new P(o.a);y.a0),l.a.Xb(l.c=--l.b)),f=.4*i*b,!c&&l.b0&&(f=(Wn(0,n.length),n.charCodeAt(0)),f!=64)){if(f==37&&(p=n.lastIndexOf("%"),h=!1,p!=0&&(p==y-1||(h=(Wn(p+1,n.length),n.charCodeAt(p+1)==46))))){if(o=(Qr(1,p,n.length),n.substr(1,p-1)),V=bn("%",o)?null:Tge(o),i=0,h)try{i=al((Wn(p+2,n.length+1),n.substr(p+2)),Xr,oi)}catch(te){throw te=sr(te),X(te,131)?(l=te,R(new sB(l))):R(te)}for(D=Uhe(e.Dh());D.Ob();)if(A=IB(D),X(A,504)&&(r=u(A,587),q=r.d,(V==null?q==null:bn(V,q))&&i--==0))return r;return null}if(b=n.lastIndexOf("."),S=b==-1?n:(Qr(0,b,n.length),n.substr(0,b)),t=0,b!=-1)try{t=al((Wn(b+1,n.length+1),n.substr(b+1)),Xr,oi)}catch(te){if(te=sr(te),X(te,131))S=n;else throw R(te)}for(S=bn("%",S)?null:Tge(S),O=Uhe(e.Dh());O.Ob();)if(A=IB(O),X(A,197)&&(c=u(A,197),B=c.ve(),(S==null?B==null:bn(S,B))&&t--==0))return c;return null}return pVe(e,n)}function hRn(e){var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q;for(b=new wt,f=new Nw,i=new P(e.a.a.b);i.an.d.c){if(S=e.c[n.a.d],D=e.c[p.a.d],S==D)continue;Jf(Of(Tf(Nf(Cf(new tf,1),100),S),D))}}}}}function dRn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe;if(y=u(u(vi(e.r,n),22),83),n==(Ie(),nt)||n==Yn){AVe(e,n);return}for(c=n==Vn?(Rw(),KN):(Rw(),VN),te=n==Vn?(Uo(),ja):(Uo(),Uf),t=u(zc(e.b,n),127),i=t.i,r=i.c+Yv(F(z(Jr,1),Jc,30,15,[t.n.b,e.C.b,e.k])),B=i.c+i.b-Yv(F(z(Jr,1),Jc,30,15,[t.n.c,e.C.c,e.k])),o=$oe(Vle(c),e.t),q=n==Vn?Ir:Vi,p=y.Jc();p.Ob();)h=u(p.Pb(),115),!(!h.c||h.c.d.c.length<=0)&&(D=h.b.Kf(),O=h.e,S=h.c,A=S.i,A.b=(f=S.n,S.e.a+f.b+f.c),A.a=(l=S.n,S.e.b+l.d+l.a),HT(te,ewe),S.f=te,ga(S,(ws(),qf)),A.c=O.a-(A.b-D.a)/2,be=k.Math.min(r,O.a),fe=k.Math.max(B,O.a+D.a),A.cfe&&(A.c=fe-A.b),Ce(o.d,new aV(A,U1e(o,A))),q=n==Vn?k.Math.max(q,O.b+h.b.Kf().b):k.Math.min(q,O.b));for(q+=n==Vn?e.t:-e.t,V=ade((o.e=q,o)),V>0&&(u(zc(e.b,n),127).a.b=V),b=y.Jc();b.Ob();)h=u(b.Pb(),115),!(!h.c||h.c.d.c.length<=0)&&(A=h.c.i,A.c-=h.e.a,A.d-=h.e.b)}function bRn(e,n){KW();var t,i,r,c,o,l,f,h,b,p,y,S,A,O;if(f=ao(e,0)<0,f&&(e=Od(e)),ao(e,0)==0)switch(n){case 0:return"0";case 1:return z8;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return S=new y0,n<0?S.a+="0E+":S.a+="0E",S.a+=n==Xr?"2147483648":""+-n,S.a}b=18,p=le(Wl,Eh,30,b+1,15,1),t=b,O=e;do h=O,O=FO(O,10),p[--t]=Rt(mc(48,lf(h,hc(O,10))))&yr;while(ao(O,0)!=0);if(r=lf(lf(lf(b,t),n),1),n==0)return f&&(p[--t]=45),ph(p,t,b-t);if(n>0&&ao(r,-6)>=0){if(ao(r,0)>=0){for(c=t+Rt(r),l=b-1;l>=c;l--)p[l+1]=p[l];return p[++c]=46,f&&(p[--t]=45),ph(p,t,b-t+1)}for(o=2;HX(o,mc(Od(r),1));o++)p[--t]=48;return p[--t]=46,p[--t]=48,f&&(p[--t]=45),ph(p,t,b-t)}return A=t+1,i=b,y=new h4,f&&(y.a+="-"),i-A>=1?(qb(y,p[t]),y.a+=".",y.a+=ph(p,t+1,b-t-1)):y.a+=ph(p,t,b-t),y.a+="E",ao(r,0)>0&&(y.a+="+"),y.a+=""+cE(r),y.a}function DVe(e){a2(e,new qw(UP(l2(u2(s2(o2(new gd,Gl),"ELK Radial"),'A radial layout provider which is based on the algorithm of Peter Eades published in "Drawing free trees.", published by International Institute for Advanced Study of Social Information Science, Fujitsu Limited in 1991. The radial layouter takes a tree and places the nodes in radial order around the root. The nodes of the same tree level are placed on the same radius.'),new IM),Gl))),Se(e,Gl,NF,_e(nln)),Se(e,Gl,om,_e(tln)),Se(e,Gl,k3,_e(Qsn)),Se(e,Gl,my,_e(Wsn)),Se(e,Gl,py,_e(Zsn)),Se(e,Gl,K8,_e(Ysn)),Se(e,Gl,SS,_e(Vye)),Se(e,Gl,V8,_e(eln)),Se(e,Gl,ene,_e(Dre)),Se(e,Gl,Zee,_e(_re)),Se(e,Gl,$F,_e(Qye)),Se(e,Gl,nne,_e(Lre)),Se(e,Gl,tne,_e(Wye)),Se(e,Gl,c2e,_e(Zye)),Se(e,Gl,r2e,_e(Yye)),Se(e,Gl,e2e,_e(HH)),Se(e,Gl,n2e,_e(GH)),Se(e,Gl,t2e,_e(AI)),Se(e,Gl,i2e,_e(e6e)),Se(e,Gl,Zpe,_e(Kye))}function Yw(e,n,t,i,r){var c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe;if(D=new Ee(e.g,e.f),O=R0e(e),O.a=k.Math.max(O.a,n),O.b=k.Math.max(O.b,t),fe=O.a/D.a,b=O.b/D.b,te=O.a-D.a,f=O.b-D.b,i)for(o=Fi(e)?u(ke(Fi(e),(Xt(),Ng)),86):u(ke(e,(Xt(),Ng)),86),l=ue(ke(e,(Xt(),Vx)))===ue((Br(),to)),q=new st((!e.c&&(e.c=new we($s,e,9,9)),e.c));q.e!=q.i.gc();)switch(B=u(ft(q),125),V=u(ke(B,t5),64),V==(Ie(),ju)&&(V=uge(B,o),Ei(B,t5,V)),V.g){case 1:l||Os(B,B.i*fe);break;case 2:Os(B,B.i+te),l||Ns(B,B.j*b);break;case 3:l||Os(B,B.i*fe),Ns(B,B.j+f);break;case 4:l||Ns(B,B.j*b)}if(vw(e,O.a,O.b),r)for(y=new st((!e.n&&(e.n=new we(Eu,e,1,7)),e.n));y.e!=y.i.gc();)p=u(ft(y),157),S=p.i+p.g/2,A=p.j+p.f/2,be=S/D.a,h=A/D.b,be+h>=1&&(be-h>0&&A>=0?(Os(p,p.i+te),Ns(p,p.j+f*h)):be-h<0&&S>=0&&(Os(p,p.i+te*be),Ns(p,p.j+f)));return Ei(e,(Xt(),Ig),(Vs(),c=u(la(iA),10),new _l(c,u(Df(c,c.length),10),0))),new Ee(fe,b)}function Zz(e){var n,t,i,r,c,o,l,f,h,b,p;if(e==null)throw R(new fh(Vo));if(h=e,c=e.length,f=!1,c>0&&(n=(Wn(0,e.length),e.charCodeAt(0)),(n==45||n==43)&&(e=(Wn(1,e.length+1),e.substr(1)),--c,f=n==45)),c==0)throw R(new fh(Zw+h+'"'));for(;e.length>0&&(Wn(0,e.length),e.charCodeAt(0)==48);)e=(Wn(1,e.length+1),e.substr(1)),--c;if(c>(hKe(),tnn)[10])throw R(new fh(Zw+h+'"'));for(r=0;r0&&(p=-parseInt((Qr(0,i,e.length),e.substr(0,i)),10),e=(Wn(i,e.length+1),e.substr(i)),c-=i,t=!1);c>=o;){if(i=parseInt((Qr(0,o,e.length),e.substr(0,o)),10),e=(Wn(o,e.length+1),e.substr(o)),c-=o,t)t=!1;else{if(ao(p,l)<0)throw R(new fh(Zw+h+'"'));p=hc(p,b)}p=lf(p,i)}if(ao(p,0)>0)throw R(new fh(Zw+h+'"'));if(!f&&(p=Od(p),ao(p,0)<0))throw R(new fh(Zw+h+'"'));return p}function Tge(e){eZ();var n,t,i,r,c,o,l,f;if(e==null)return null;if(r=ah(e,Xo(37)),r<0)return e;for(f=new tl((Qr(0,r,e.length),e.substr(0,r))),n=le(ds,A3,30,4,15,1),l=0,i=0,o=e.length;rr+2&&ZY((Wn(r+1,e.length),e.charCodeAt(r+1)),G8e,q8e)&&ZY((Wn(r+2,e.length),e.charCodeAt(r+2)),G8e,q8e))if(t=Bvn((Wn(r+1,e.length),e.charCodeAt(r+1)),(Wn(r+2,e.length),e.charCodeAt(r+2))),r+=2,i>0?(t&192)==128?n[l++]=t<<24>>24:i=0:t>=128&&((t&224)==192?(n[l++]=t<<24>>24,i=2):(t&240)==224?(n[l++]=t<<24>>24,i=3):(t&248)==240&&(n[l++]=t<<24>>24,i=4)),i>0){if(l==i){switch(l){case 2:{qb(f,((n[0]&31)<<6|n[1]&63)&yr);break}case 3:{qb(f,((n[0]&15)<<12|(n[1]&63)<<6|n[2]&63)&yr);break}}l=0,i=0}}else{for(c=0;c=2){if((!e.a&&(e.a=new we($i,e,6,6)),e.a).i==0)t=(j0(),r=new yo,r),Et((!e.a&&(e.a=new we($i,e,6,6)),e.a),t);else if((!e.a&&(e.a=new we($i,e,6,6)),e.a).i>1)for(y=new j4((!e.a&&(e.a=new we($i,e,6,6)),e.a));y.e!=y.i.gc();)VE(y);sge(n,u(K((!e.a&&(e.a=new we($i,e,6,6)),e.a),0),170))}if(p)for(i=new st((!e.a&&(e.a=new we($i,e,6,6)),e.a));i.e!=i.i.gc();)for(t=u(ft(i),170),h=new st((!t.a&&(t.a=new mr(yl,t,5)),t.a));h.e!=h.i.gc();)f=u(ft(h),372),l.a=k.Math.max(l.a,f.a),l.b=k.Math.max(l.b,f.b);for(o=new st((!e.n&&(e.n=new we(Eu,e,1,7)),e.n));o.e!=o.i.gc();)c=u(ft(o),157),b=u(ke(c,Qx),8),b&&Il(c,b.a,b.b),p&&(l.a=k.Math.max(l.a,c.i+c.g),l.b=k.Math.max(l.b,c.j+c.f));return l}function LVe(e,n,t,i,r){var c,o,l;if(MRe(e,n),o=n[0],c=rc(t.c,0),l=-1,j1e(t))if(i>0){if(o+i>e.length)return!1;l=Cz((Qr(0,o+i,e.length),e.substr(0,o+i)),n)}else l=Cz(e,n);switch(c){case 71:return l=a3(e,o,F(z(He,1),Ae,2,6,[vYe,yYe]),n),r.e=l,!0;case 77:return _In(e,n,r,l,o);case 76:return LIn(e,n,r,l,o);case 69:return $Cn(e,n,o,r);case 99:return RCn(e,n,o,r);case 97:return l=a3(e,o,F(z(He,1),Ae,2,6,["AM","PM"]),n),r.b=l,!0;case 121:return PIn(e,n,o,l,t,r);case 100:return l<=0?!1:(r.c=l,!0);case 83:return l<0?!1:gEn(l,o,n[0],r);case 104:l==12&&(l=0);case 75:case 72:return l<0?!1:(r.f=l,r.g=!1,!0);case 107:return l<0?!1:(r.f=l,r.g=!0,!0);case 109:return l<0?!1:(r.j=l,!0);case 115:return l<0?!1:(r.n=l,!0);case 90:if(oun[f]&&(D=f),p=new P(e.a.b);p.a=l){at(q.b>0),q.a.Xb(q.c=--q.b);break}else D.a>f&&(i?(Sr(i.b,D.b),i.a=k.Math.max(i.a,D.a),As(q)):(Ce(D.b,b),D.c=k.Math.min(D.c,f),D.a=k.Math.max(D.a,l),i=D));i||(i=new hxe,i.c=f,i.a=l,y2(q,i),Ce(i.b,b))}for(o=e.b,h=0,B=new P(t);B.a1;){if(r=MNn(n),p=c.g,A=u(ke(n,zx),104),O=ne(re(ke(n,KH))),(!n.a&&(n.a=new we(Ft,n,10,11)),n.a).i>1&&ne(re(ke(n,(Qh(),Gre))))!=Vi&&(c.c+(A.b+A.c))/(c.b+(A.d+A.a))1&&ne(re(ke(n,(Qh(),Hre))))!=Vi&&(c.c+(A.b+A.c))/(c.b+(A.d+A.a))>O&&Ei(r,(Qh(),_m),k.Math.max(ne(re(ke(n,Bx))),ne(re(ke(r,_m)))-ne(re(ke(n,Hre))))),S=new Ose(i,b),f=WVe(S,r,y),h=f.g,h>=p&&h==h){for(o=0;o<(!r.a&&(r.a=new we(Ft,r,10,11)),r.a).i;o++)xqe(e,u(K((!r.a&&(r.a=new we(Ft,r,10,11)),r.a),o),26),u(K((!n.a&&(n.a=new we(Ft,n,10,11)),n.a),o),26));WRe(n,S),y4n(c,f.c),v4n(c,f.b)}--l}Ei(n,(Qh(),R7),c.b),Ei(n,Fy,c.c),t.Ug()}function vRn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,De,un,cn;for(n.Tg("Compound graph postprocessor",1),t=Fe(ze(C(e,(Oe(),Hie)))),l=u(C(e,(me(),q3e)),229),b=new ar,B=l.ec().Jc();B.Ob();){for(D=u(B.Pb(),17),o=new bs(l.cc(D)),En(),Tr(o,new noe(e)),be=m7n((kn(0,o.c.length),u(o.c[0],250))),De=XBe(u(Le(o,o.c.length-1),250)),V=be.i,Q9(De.i,V)?q=V.e:q=_r(V),p=cSn(D,o),qs(D.a),y=null,c=new P(o);c.axh,cn=k.Math.abs(y.b-A.b)>xh,(!t&&un&&cn||t&&(un||cn))&&Vt(D.a,te)),ac(D.a,i),i.b==0?y=te:y=(at(i.b!=0),u(i.c.b.c,8)),V7n(S,p,O),XBe(r)==De&&(_r(De.i)!=r.a&&(O=new Vr,L0e(O,_r(De.i),q)),he(D,Eie,O)),nCn(S,D,q),b.a.yc(S,b);fc(D,be),Gr(D,De)}for(h=b.a.ec().Jc();h.Ob();)f=u(h.Pb(),17),fc(f,null),Gr(f,null);n.Ug()}function yRn(e,n){var t,i,r,c,o,l,f,h,b,p,y;for(r=u(C(e,(Mu(),kp)),86),b=r==(vr(),Zc)||r==ru?eh:ru,t=u(gs(li(new mn(null,new yn(e.b,16)),new vv),Cs(new zi,new bi,new Cc,F(z(Qo,1),je,130,0,[(zl(),Yo)]))),16),f=u(gs(So(t.Mc(),new PEe(n)),Cs(new zi,new bi,new Cc,F(z(Qo,1),je,130,0,[Yo]))),16),f.Fc(u(gs(So(t.Mc(),new $Ee(n)),Cs(new zi,new bi,new Cc,F(z(Qo,1),je,130,0,[Yo]))),18)),f.gd(new REe(b)),y=new kd(new BEe(r)),i=new wt,l=f.Jc();l.Ob();)o=u(l.Pb(),240),h=u(o.a,40),Fe(ze(o.c))?(y.a.yc(h,($n(),ib))==null,new o9(y.a.Xc(h,!1)).a.gc()>0&&ei(i,h,u(new o9(y.a.Xc(h,!1)).a.Tc(),40)),new o9(y.a.$c(h,!0)).a.gc()>1&&ei(i,tJe(y,h),h)):(new o9(y.a.Xc(h,!1)).a.gc()>0&&(c=u(new o9(y.a.Xc(h,!1)).a.Tc(),40),ue(c)===ue(bu(Xc(i.f,h)))&&u(C(h,(Ti(),bre)),16).Ec(c)),new o9(y.a.$c(h,!0)).a.gc()>1&&(p=tJe(y,h),ue(bu(Xc(i.f,p)))===ue(h)&&u(C(p,(Ti(),bre)),16).Ec(h)),y.a.Ac(h)!=null)}function PVe(e){var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te;if(e.gc()==1)return u(e.Xb(0),235);if(e.gc()<=0)return new WR;for(r=e.Jc();r.Ob();){for(t=u(r.Pb(),235),A=0,b=oi,p=oi,f=Xr,h=Xr,S=new P(t.e);S.al&&(V=0,te+=o+B,o=0),KDn(O,t,V,te),n=k.Math.max(n,V+D.a),o=k.Math.max(o,D.b),V+=D.a+B;return O}function kRn(e){cge();var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O,D;if(e==null||(c=lB(e),A=wjn(c),A%4!=0))return null;if(O=A/4|0,O==0)return le(ds,A3,30,0,15,1);for(p=null,n=0,t=0,i=0,r=0,o=0,l=0,f=0,h=0,S=0,y=0,b=0,p=le(ds,A3,30,O*3,15,1);S>4)<<24>>24,p[y++]=((t&15)<<4|i>>2&15)<<24>>24,p[y++]=(i<<6|r)<<24>>24}return!nT(o=c[b++])||!nT(l=c[b++])?null:(n=ch[o],t=ch[l],f=c[b++],h=c[b++],ch[f]==-1||ch[h]==-1?f==61&&h==61?(t&15)!=0?null:(D=le(ds,A3,30,S*3+1,15,1),Wu(p,0,D,0,S*3),D[y]=(n<<2|t>>4)<<24>>24,D):f!=61&&h==61?(i=ch[f],(i&3)!=0?null:(D=le(ds,A3,30,S*3+2,15,1),Wu(p,0,D,0,S*3),D[y++]=(n<<2|t>>4)<<24>>24,D[y]=((t&15)<<4|i>>2&15)<<24>>24,D)):null:(i=ch[f],r=ch[h],p[y++]=(n<<2|t>>4)<<24>>24,p[y++]=((t&15)<<4|i>>2&15)<<24>>24,p[y++]=(i<<6|r)<<24>>24,p))}function jRn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be;for(n.Tg(xQe,1),A=u(C(e,(Oe(),Y1)),222),r=new P(e.b);r.a=2){for(O=!0,y=new P(c.j),t=u(L(y),12),S=null;y.a0)if(i=p.gc(),h=lc(k.Math.floor((i+1)/2))-1,r=lc(k.Math.ceil((i+1)/2))-1,n.o==Qa)for(b=r;b>=h;b--)n.a[te.p]==te&&(O=u(p.Xb(b),49),A=u(O.a,9),!rf(t,O.b)&&S>e.b.e[A.p]&&(n.a[A.p]=te,n.g[te.p]=n.g[A.p],n.a[te.p]=n.g[te.p],n.f[n.g[te.p].p]=($n(),!!(Fe(n.f[n.g[te.p].p])&te.k==(Fn(),dr))),S=e.b.e[A.p]));else for(b=h;b<=r;b++)n.a[te.p]==te&&(B=u(p.Xb(b),49),D=u(B.a,9),!rf(t,B.b)&&S0&&(r=u(Le(D.c.a,fe-1),9),o=e.i[r.p],un=k.Math.ceil(zv(e.n,r,D)),c=be.a.e-D.d.d-(o.a.e+r.o.b+r.d.a)-un),h=Vi,fe0&&De.a.e.e-De.a.a-(De.b.e.e-De.b.a)<0,A=V.a.e.e-V.a.a-(V.b.e.e-V.b.a)<0&&De.a.e.e-De.a.a-(De.b.e.e-De.b.a)>0,S=V.a.e.e+V.b.aDe.b.e.e+De.a.a,te=0,!O&&!A&&(y?c+p>0?te=p:h-i>0&&(te=i):S&&(c+l>0?te=l:h-q>0&&(te=q))),be.a.e+=te,be.b&&(be.d.e+=te),!1))}function RVe(e,n,t){var i,r,c,o,l,f,h,b,p,y;if(i=new _f(n.Jf().a,n.Jf().b,n.Kf().a,n.Kf().b),r=new y4,e.c)for(o=new P(n.Pf());o.a0&&Or(S,(kn(t,n.c.length),u(n.c[t],25))),c=0,y=!0,B=Ks(Vb(cr(S))),f=B.Jc();f.Ob();){for(l=u(f.Pb(),17),y=!1,p=l,h=0;h(kn(h,n.c.length),u(n.c[h],25)).a.c.length?Or(r,(kn(h,n.c.length),u(n.c[h],25))):H0(r,i+c,(kn(h,n.c.length),u(n.c[h],25))),p=OW(p,r);t>0&&(c+=1)}if(y){for(h=0;h(kn(h,n.c.length),u(n.c[h],25)).a.c.length?Or(r,(kn(h,n.c.length),u(n.c[h],25))):H0(r,i+c,(kn(h,n.c.length),u(n.c[h],25)));t>0&&(c+=1)}for(o=!1,O=new Xn(Qn(Ii(S).a.Jc(),new ee));ht(O);){for(A=u(ct(O),17),p=A,b=t+1;b(kn(h,n.c.length),u(n.c[h],25)).a.c.length?Or(D,(kn(h,n.c.length),u(n.c[h],25))):H0(D,i+1,(kn(h,n.c.length),u(n.c[h],25))));o&&(c+=1),o=!0}return c>0?c-1:0}function K0(e,n){ai();var t,i,r,c,o,l,f,h,b,p,y,S,A;if(Aj(Y7)==0){for(p=le(nzn,Ae,121,Ehn.length,0,1),o=0;oh&&(i.a+=GTe(le(Wl,Eh,30,-h,15,1))),i.a+="Is",ah(f,Xo(32))>=0)for(r=0;r=i.o.b/2}else q=!p;q?(B=u(C(i,(me(),$y)),16),B?y?c=B:(r=u(C(i,Oy),16),r?B.gc()<=r.gc()?c=B:c=r:(c=new Te,he(i,Oy,c))):(c=new Te,he(i,$y,c))):(r=u(C(i,(me(),Oy)),16),r?p?c=r:(B=u(C(i,$y),16),B?r.gc()<=B.gc()?c=r:c=B:(c=new Te,he(i,$y,c))):(c=new Te,he(i,Oy,c))),c.Ec(e),he(e,(me(),tH),t),n.d==t?(Gr(n,null),t.e.c.length+t.g.c.length==0&&wu(t,null),jkn(t)):(fc(n,null),t.e.c.length+t.g.c.length==0&&wu(t,null)),qs(n.a)}function MRn(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,De,un,cn,On,Dn,lt,Qt,Ui;for(t.Tg("MinWidth layering",1),S=n.b,De=n.a,Ui=u(C(n,(Oe(),n4e)),15).a,l=u(C(n,t4e),15).a,e.b=ne(re(C(n,Kf))),e.d=Vi,te=new P(De);te.aS&&(c&&(gc(fe,y),gc(un,ve(h.b-1))),Qt=t.b,Ui+=y+n,y=0,b=k.Math.max(b,t.b+t.c+lt)),Os(l,Qt),Ns(l,Ui),b=k.Math.max(b,Qt+lt+t.c),y=k.Math.max(y,p),Qt+=lt+n;if(b=k.Math.max(b,i),Dn=Ui+y+t.a,Dn0?(h=0,D&&(h+=l),h+=(cn-1)*o,V&&(h+=l),un&&V&&(h=k.Math.max(h,XNn(V,o,q,De))),h=e.a&&(i=lLn(e,q),b=k.Math.max(b,i.b),te=k.Math.max(te,i.d),Ce(l,new jc(q,i)));for(un=new Te,h=0;h0),D.a.Xb(D.c=--D.b),cn=new Xu(e.b),y2(D,cn),at(D.b0){for(y=b<100?null:new k0(b),h=new t1e(n),A=h.g,B=le($t,ni,30,b,15,1),i=0,te=new _w(b),r=0;r=0;)if(S!=null?gi(S,A[f]):ue(S)===ue(A[f])){B.length<=i&&(D=B,B=le($t,ni,30,2*B.length,15,1),Wu(D,0,B,0,i)),B[i++]=r,Et(te,A[f]);break e}if(S=S,ue(S)===ue(l))break}}if(h=te,A=te.g,b=i,i>B.length&&(D=B,B=le($t,ni,30,i,15,1),Wu(D,0,B,0,i)),i>0){for(V=!0,c=0;c=0;)ey(e,B[o]);if(i!=b){for(r=b;--r>=i;)ey(h,r);D=B,B=le($t,ni,30,i,15,1),Wu(D,0,B,0,i)}n=h}}}else for(n=axn(e,n),r=e.i;--r>=0;)n.Gc(e.g[r])&&(ey(e,r),V=!0);if(V){if(B!=null){for(t=n.gc(),p=t==1?bE(e,4,n.Jc().Pb(),null,B[0],O):bE(e,6,n,B,B[0],O),y=t<100?null:new k0(t),r=n.Jc();r.Ob();)S=r.Pb(),y=qle(e,u(S,75),y);y?(y.lj(p),y.mj()):hi(e.e,p)}else{for(y=y2n(n.gc()),r=n.Jc();r.Ob();)S=r.Pb(),y=qle(e,u(S,75),y);y&&y.mj()}return!0}else return!1}function IRn(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V;for(t=new XJe(n),t.a||c_n(n),h=iDn(n),f=new Nw,D=new rXe,O=new P(n.a);O.a0||t.o==Qa&&r=t}function _Rn(e){var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,De,un,cn,On;for(V=e.a,te=0,be=V.length;te0?(p=u(Le(y.c.a,o-1),9),un=zv(e.b,y,p),D=y.n.b-y.d.d-(p.n.b+p.o.b+p.d.a+un)):D=y.n.b-y.d.d,h=k.Math.min(D,h),o1&&(o=k.Math.min(o,k.Math.abs(u(Yu(l.a,1),8).b-b.b)))));else for(O=new P(n.j);O.ar&&(c=y.a-r,o=oi,i.c.length=0,r=y.a),y.a>=r&&(qn(i.c,l),l.a.b>1&&(o=k.Math.min(o,k.Math.abs(u(Yu(l.a,l.a.b-2),8).b-y.b)))));if(i.c.length!=0&&c>n.o.a/2&&o>n.o.b/2){for(S=new Qu,wu(S,n),Ar(S,(Ie(),Vn)),S.n.a=n.o.a/2,B=new Qu,wu(B,n),Ar(B,bt),B.n.a=n.o.a/2,B.n.b=n.o.b,f=new P(i);f.a=h.b?fc(l,B):fc(l,S)):(h=u(Cvn(l.a),8),D=l.a.b==0?La(l.c):u(If(l.a),8),D.b>=h.b?Gr(l,B):Gr(l,S)),p=u(C(l,(Oe(),Wc)),78),p&&H2(p,h,!0);n.n.a=r-n.o.a/2}}function $Rn(e,n,t){var i,r,c,o,l,f,h,b,p,y;for(l=St(e.b,0);l.b!=l.d.c;)if(o=u(jt(l),40),!bn(o.c,_F))for(h=aOn(o,e),n==(vr(),Zc)||n==ru?Tr(h,new S_):Tr(h,new iU),f=h.c.length,i=0;i=0?S=Y4(l):S=NO(Y4(l)),e.of(O7,S)),h=new Vr,y=!1,e.nf(vp)?(wle(h,u(e.mf(vp),8)),y=!0):Zwn(h,o.a/2,o.b/2),S.g){case 4:he(b,ku,(Xs(),V1)),he(b,rH,(tg(),L3)),b.o.b=o.b,O<0&&(b.o.a=-O),Ar(p,(Ie(),nt)),y||(h.a=o.a),h.a-=o.a;break;case 2:he(b,ku,(Xs(),Sg)),he(b,rH,(tg(),E7)),b.o.b=o.b,O<0&&(b.o.a=-O),Ar(p,(Ie(),Yn)),y||(h.a=0);break;case 1:he(b,jg,(_1(),$3)),b.o.a=o.a,O<0&&(b.o.b=-O),Ar(p,(Ie(),bt)),y||(h.b=o.b),h.b-=o.b;break;case 3:he(b,jg,(_1(),Ty)),b.o.a=o.a,O<0&&(b.o.b=-O),Ar(p,(Ie(),Vn)),y||(h.b=0)}if(wle(p.n,h),he(b,vp,h),n==Dg||n==a1||n==to){if(A=0,n==Dg&&e.nf(Xd))switch(S.g){case 1:case 2:A=u(e.mf(Xd),15).a;break;case 3:case 4:A=-u(e.mf(Xd),15).a}else switch(S.g){case 4:case 2:A=c.b,n==a1&&(A/=r.b);break;case 1:case 3:A=c.a,n==a1&&(A/=r.a)}he(b,gp,A)}return he(b,Iu,S),b}function RRn(){zoe();function e(i){var r=this;this.dispatch=function(c){var o=c.data;switch(o.cmd){case"algorithms":var l=fde((En(),new Hr(new ot(Lg.b))));i.postMessage({id:o.id,data:l});break;case"categories":var f=fde((En(),new Hr(new ot(Lg.c))));i.postMessage({id:o.id,data:f});break;case"options":var h=fde((En(),new Hr(new ot(Lg.d))));i.postMessage({id:o.id,data:h});break;case"register":aPn(o.algorithms),i.postMessage({id:o.id});break;case"layout":rPn(o.graph,o.layoutOptions||{},o.options||{}),i.postMessage({id:o.id,data:o.graph});break}},this.saveDispatch=function(c){try{r.dispatch(c)}catch(o){i.postMessage({id:c.data.id,error:o})}}}function n(i){var r=this;this.dispatcher=new e({postMessage:function(c){r.onmessage({data:c})}}),this.postMessage=function(c){setTimeout(function(){r.dispatcher.saveDispatch({data:c})},0)}}if(typeof document===qZ&&typeof self!==qZ){var t=new e(self);self.onmessage=t.saveDispatch}else typeof M!==qZ&&M.exports&&(Object.defineProperty(N,"__esModule",{value:!0}),M.exports={default:n,Worker:n})}function oZ(e,n,t,i,r,c,o){var l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,De,un,cn,On,Dn,lt,Qt,Ui;for(O=0,On=0,h=new P(e.b);h.aO&&(c&&(gc(fe,S),gc(un,ve(b.b-1)),Ce(e.d,A),l.c.length=0),Qt=t.b,Ui+=S+n,S=0,p=k.Math.max(p,t.b+t.c+lt)),qn(l.c,f),FJe(f,Qt,Ui),p=k.Math.max(p,Qt+lt+t.c),S=k.Math.max(S,y),Qt+=lt+n,A=f;if(Sr(e.a,l),Ce(e.d,u(Le(l,l.c.length-1),167)),p=k.Math.max(p,i),Dn=Ui+S+t.a,Dnr.d.d+r.d.a?b.f.d=!0:(b.f.d=!0,b.f.a=!0))),i.b!=i.d.c&&(n=t);b&&(c=u(zn(e.f,o.d.i),60),n.bc.d.d+c.d.a?b.f.d=!0:(b.f.d=!0,b.f.a=!0))}for(l=new Xn(Qn(cr(S).a.Jc(),new ee));ht(l);)o=u(ct(l),17),o.a.b!=0&&(n=u(If(o.a),8),o.d.j==(Ie(),Vn)&&(D=new lS(n,new Ee(n.a,r.d.d),r,o),D.f.a=!0,D.a=o.d,qn(O.c,D)),o.d.j==bt&&(D=new lS(n,new Ee(n.a,r.d.d+r.d.a),r,o),D.f.d=!0,D.a=o.d,qn(O.c,D)))}return O}function GRn(e,n,t){var i,r,c,o,l,f,h,b,p,y;for(f=new Te,p=n.length,o=d1e(t),h=0;h=A&&(q>A&&(S.c.length=0,A=q),qn(S.c,o));S.c.length!=0&&(y=u(Le(S,fz(n,S.c.length)),132),Dn.a.Ac(y)!=null,y.s=O++,mbe(y,cn,fe),S.c.length=0)}for(te=e.c.length+1,l=new P(e);l.aOn.s&&(As(t),qo(On.i,i),i.c>0&&(i.a=On,Ce(On.t,i),i.b=De,Ce(De.i,i)))}function GVe(e,n,t,i,r){var c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,De,un,cn,On,Dn;for(O=new xo(n.b),te=new xo(n.b),y=new xo(n.b),un=new xo(n.b),D=new xo(n.b),De=St(n,0);De.b!=De.d.c;)for(be=u(jt(De),12),l=new P(be.g);l.a0,B=be.g.c.length>0,h&&B?qn(y.c,be):h?qn(O.c,be):B&&qn(te.c,be);for(A=new P(O);A.aq.mh()-h.b&&(y=q.mh()-h.b),S>q.nh()-h.d&&(S=q.nh()-h.d),b0){for(V=St(e.f,0);V.b!=V.d.c;)q=u(jt(V),9),q.p+=y-e.e;_0e(e),qs(e.f),Dbe(e,i,S)}else{for(Vt(e.f,S),S.p=i,e.e=k.Math.max(e.e,i),c=new Xn(Qn(cr(S).a.Jc(),new ee));ht(c);)r=u(ct(c),17),!r.c.i.c&&r.c.i.k==(Fn(),Uu)&&(Vt(e.f,r.c.i),r.c.i.p=i-1);e.c=i}else _0e(e),qs(e.f),i=0,ht(new Xn(Qn(cr(S).a.Jc(),new ee)))?(y=0,y=qJe(y,S),i=y+2,Dbe(e,i,S)):(Vt(e.f,S),S.p=0,e.e=k.Math.max(e.e,0),e.b=u(Le(e.d.b,0),25),e.c=0);for(e.f.b==0||_0e(e),e.d.a.c.length=0,B=new Te,h=new P(e.d.b);h.a=48&&n<=57){for(i=n-48;r=48&&n<=57;)if(i=i*10+n-48,i<0)throw R(new Bt(Ht((Lt(),Z2e))))}else throw R(new Bt(Ht((Lt(),DZe))));if(t=i,n==44){if(r>=e.j)throw R(new Bt(Ht((Lt(),LZe))));if((n=rc(e.i,r++))>=48&&n<=57){for(t=n-48;r=48&&n<=57;)if(t=t*10+n-48,t<0)throw R(new Bt(Ht((Lt(),Z2e))));if(i>t)throw R(new Bt(Ht((Lt(),PZe))))}else t=-1}if(n!=125)throw R(new Bt(Ht((Lt(),_Ze))));e._l(r)?(c=(ai(),ai(),new D2(9,c)),e.d=r+1):(c=(ai(),ai(),new D2(3,c)),e.d=r),c.Mm(i),c.Lm(t),fi(e)}}return c}function YRn(e){var n,t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be;for(r=1,S=new Te,i=0;i=u(Le(e.b,i),25).a.c.length/4)continue}if(u(Le(e.b,i),25).a.c.length>n){for(te=new Te,Ce(te,u(Le(e.b,i),25)),o=0;o1)for(A=new j4((!e.a&&(e.a=new we($i,e,6,6)),e.a));A.e!=A.i.gc();)VE(A);for(o=u(K((!e.a&&(e.a=new we($i,e,6,6)),e.a),0),170),D=Qt,Qt>be+te?D=be+te:Qtfe+O?B=fe+O:Uibe-te&&Dfe-O&&BQt+lt?un=Qt+lt:beUi+De?cn=Ui+De:feQt-lt&&unUi-De&&cnt&&(y=t-1),S=c0+Ds(n,24)*kN*p-p/2,S<0?S=1:S>i&&(S=i-1),r=(j0(),f=new Jk,f),wB(r,y),pB(r,S),Et((!o.a&&(o.a=new mr(yl,o,5)),o.a),r)}function fZ(e,n){KW();var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,De;if(V=e.e,b=e.d,r=e.a,V==0)switch(n){case 0:return"0";case 1:return z8;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return B=new y0,B.a+="0E",B.a+=-n,B.a}if(O=b*10+1+7,D=le(Wl,Eh,30,O+1,15,1),t=O,b==1)if(c=r[0],c<0){De=Rr(c,Dc);do p=De,De=FO(De,10),D[--t]=48+Rt(lf(p,hc(De,10)))&yr;while(ao(De,0)!=0)}else{De=c;do p=De,De=De/10|0,D[--t]=48+(p-De*10)&yr;while(De!=0)}else{te=le($t,ni,30,b,15,1),fe=b,Wu(r,0,te,0,fe);e:for(;;){for(q=0,l=fe-1;l>=0;l--)be=mc(qh(q,32),Rr(te[l],Dc)),S=tMn(be),te[l]=Rt(S),q=Rt(Sw(S,32));A=Rt(q),y=t;do D[--t]=48+A%10&yr;while((A=A/10|0)!=0&&t!=0);for(i=9-y+t,o=0;o0;o++)D[--t]=48;for(f=fe-1;te[f]==0;f--)if(f==0)break e;fe=f+1}for(;D[t]==48;)++t}return h=V<0,h&&(D[--t]=45),ph(D,t,O-t)}function KVe(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe;switch(e.c=n,e.g=new wt,t=(Rb(),new v0(e.c)),i=new OP(t),ode(i),V=Pt(ke(e.c,(HO(),q6e))),f=u(ke(e.c,cce),330),be=u(ke(e.c,uce),427),o=u(ke(e.c,J6e),477),te=u(ke(e.c,rce),428),e.j=ne(re(ke(e.c,qln))),l=e.a,f.g){case 0:l=e.a;break;case 1:l=e.b;break;case 2:l=e.i;break;case 3:l=e.e;break;case 4:l=e.f;break;default:throw R(new Un(BF+(f.f!=null?f.f:""+f.g)))}if(e.d=new N_e(l,be,o),he(e.d,(Z9(),WS),ze(ke(e.c,Hln))),e.d.c=Fe(ze(ke(e.c,H6e))),OR(e.c).i==0)return e.d;for(p=new st(OR(e.c));p.e!=p.i.gc();){for(b=u(ft(p),26),S=b.g/2,y=b.f/2,fe=new Ee(b.i+S,b.j+y);so(e.g,fe);)m2(fe,(k.Math.random()-.5)*xh,(k.Math.random()-.5)*xh);O=u(ke(b,(Xt(),z7)),140),D=new X_e(fe,new _f(fe.a-S-e.j/2-O.b,fe.b-y-e.j/2-O.d,b.g+e.j+(O.b+O.c),b.f+e.j+(O.d+O.a))),Ce(e.d.i,D),ei(e.g,fe,new jc(D,b))}switch(te.g){case 0:if(V==null)e.d.d=u(Le(e.d.i,0),68);else for(q=new P(e.d.i);q.a0?lt+1:1);for(o=new P(fe.g);o.a0?lt+1:1)}e.d[h]==0?Vt(e.f,O):e.a[h]==0&&Vt(e.g,O),++h}for(A=-1,S=1,p=new Te,e.e=u(C(n,(me(),Ly)),234);kl>0;){for(;e.f.b!=0;)Ui=u(nV(e.f),9),e.c[Ui.p]=A--,Ybe(e,Ui),--kl;for(;e.g.b!=0;)Es=u(nV(e.g),9),e.c[Es.p]=S++,Ybe(e,Es),--kl;if(kl>0){for(y=Xr,q=new P(V);q.a=y&&(te>y&&(p.c.length=0,y=te),qn(p.c,O)));b=e.qg(p),e.c[b.p]=S++,Ybe(e,b),--kl}}for(Qt=V.c.length+1,h=0;he.c[eu]&&(Bd(i,!0),he(n,Ny,($n(),!0)));e.a=null,e.d=null,e.c=null,qs(e.g),qs(e.f),t.Ug()}function YVe(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe;for(be=u(K((!e.a&&(e.a=new we($i,e,6,6)),e.a),0),170),b=new xs,te=new wt,fe=lKe(be),Ko(te.f,be,fe),y=new wt,i=new xi,A=Uh(Rl(F(z(Xl,1),Nn,20,0,[(!n.d&&(n.d=new In(pr,n,8,5)),n.d),(!n.e&&(n.e=new In(pr,n,7,4)),n.e)])));ht(A);){if(S=u(ct(A),85),(!e.a&&(e.a=new we($i,e,6,6)),e.a).i!=1)throw R(new Un(FWe+(!e.a&&(e.a=new we($i,e,6,6)),e.a).i));S!=e&&(D=u(K((!S.a&&(S.a=new we($i,S,6,6)),S.a),0),170),Ki(i,D,i.c.b,i.c),O=u(bu(Xc(te.f,D)),13),O||(O=lKe(D),Ko(te.f,D,O)),p=t?Nr(new wc(u(Le(fe,fe.c.length-1),8)),u(Le(O,O.c.length-1),8)):Nr(new wc((kn(0,fe.c.length),u(fe.c[0],8))),(kn(0,O.c.length),u(O.c[0],8))),Ko(y.f,D,p))}if(i.b!=0)for(B=u(Le(fe,t?fe.c.length-1:0),8),h=1;h1&&Ki(b,B,b.c.b,b.c),OY(r)));B=q}return b}function QVe(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,De,un,cn,On;for(t.Tg(WQe,1),On=u(gs(li(new mn(null,new yn(n,16)),new A_),Cs(new zi,new bi,new Cc,F(z(Qo,1),je,130,0,[(zl(),Yo)]))),16),b=u(gs(li(new mn(null,new yn(n,16)),new FEe(n)),Cs(new zi,new bi,new Cc,F(z(Qo,1),je,130,0,[Yo]))),16),A=u(gs(li(new mn(null,new yn(n,16)),new zEe(n)),Cs(new zi,new bi,new Cc,F(z(Qo,1),je,130,0,[Yo]))),16),O=le(PH,LF,40,n.gc(),0,1),o=0;o=0&&cn=0&&!O[S]){O[S]=r,b.ed(l),--l;break}if(S=cn-y,S=0&&!O[S]){O[S]=r,b.ed(l),--l;break}}for(A.gd(new OM),f=O.length-1;f>=0;f--)!O[f]&&!A.dc()&&(O[f]=u(A.Xb(0),40),A.ed(0));for(h=0;hy&&BO((kn(y,n.c.length),u(n.c[y],186)),b),b=null;n.c.length>y&&(kn(y,n.c.length),u(n.c[y],186)).a.c.length==0;)qo(n,(kn(y,n.c.length),n.c[y]));if(!b){--o;continue}if(!Fe(ze(u(Le(b.b,0),26).mf((Ha(),CI))))&&m_n(n,A,c,b,D,t,y,i)){O=!0;continue}if(D){if(S=A.b,p=b.f,!Fe(ze(u(Le(b.b,0),26).mf(CI)))&&BPn(n,A,c,b,t,y,i,r)){if(O=!0,S=e.j){e.a=-1,e.c=1;return}if(n=rc(e.i,e.d++),e.a=n,e.b==1){switch(n){case 92:if(i=10,e.d>=e.j)throw R(new Bt(Ht((Lt(),XF))));e.a=rc(e.i,e.d++);break;case 45:(e.e&512)==512&&e.d=e.j||rc(e.i,e.d)!=63)break;if(++e.d>=e.j)throw R(new Bt(Ht((Lt(),Nne))));switch(n=rc(e.i,e.d++),n){case 58:i=13;break;case 61:i=14;break;case 33:i=15;break;case 91:i=19;break;case 62:i=18;break;case 60:if(e.d>=e.j)throw R(new Bt(Ht((Lt(),Nne))));if(n=rc(e.i,e.d++),n==61)i=16;else if(n==33)i=17;else throw R(new Bt(Ht((Lt(),gZe))));break;case 35:for(;e.d=e.j)throw R(new Bt(Ht((Lt(),XF))));e.a=rc(e.i,e.d++);break;default:i=0}e.c=i}function uBn(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D;if(t.Tg("Process compaction",1),!!Fe(ze(C(n,(Mu(),Sye))))){for(r=u(C(n,kp),86),S=ne(re(C(n,jre))),NLn(e,n,r),yRn(n,S/2/2),A=n.b,Zb(A,new DEe(r)),h=St(A,0);h.b!=h.d.c;)if(f=u(jt(h),40),!Fe(ze(C(f,(Ti(),db))))){if(i=rDn(f,r),O=Z_n(f,n),p=0,y=0,i)switch(D=i.e,r.g){case 2:p=D.a-S-f.f.a,O.e.a-S-f.f.ap&&(p=O.e.a+O.f.a+S),y=p+f.f.a;break;case 4:p=D.b-S-f.f.b,O.e.b-S-f.f.bp&&(p=O.e.b+O.f.b+S),y=p+f.f.b}else if(O)switch(r.g){case 2:p=O.e.a-S-f.f.a,y=p+f.f.a;break;case 1:p=O.e.a+O.f.a+S,y=p+f.f.a;break;case 4:p=O.e.b-S-f.f.b,y=p+f.f.b;break;case 3:p=O.e.b+O.f.b+S,y=p+f.f.b}ue(C(n,kre))===ue((IE(),jI))?(c=p,o=y,l=R1(li(new mn(null,new yn(e.a,16)),new gCe(c,o))),l.a!=null?r==(vr(),Zc)||r==ru?f.e.a=p:f.e.b=p:(r==(vr(),Zc)||r==Vl?l=R1(li(nBe(new mn(null,new yn(e.a,16))),new _Ee(c))):l=R1(li(nBe(new mn(null,new yn(e.a,16))),new LEe(c))),l.a!=null&&(r==Zc||r==ru?f.e.a=ne(re((at(l.a!=null),u(l.a,49)).a)):f.e.b=ne(re((at(l.a!=null),u(l.a,49)).a)))),l.a!=null&&(b=pu(e.a,(at(l.a!=null),l.a),0),b>0&&b!=u(C(f,Dh),15).a&&(he(f,wye,($n(),!0)),he(f,Dh,ve(b))))):r==(vr(),Zc)||r==ru?f.e.a=p:f.e.b=p}t.Ug()}}function oBn(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be;if(t.Tg("Coffman-Graham Layering",1),n.a.c.length==0){t.Ug();return}for(be=u(C(n,(Oe(),e4e)),15).a,f=0,o=0,y=new P(n.a);y.a=be||!jEn(B,i))&&(i=RDe(n,b)),Or(B,i),c=new Xn(Qn(cr(B).a.Jc(),new ee));ht(c);)r=u(ct(c),17),!e.a[r.p]&&(O=r.c.i,--e.e[O.p],e.e[O.p]==0&&C4(k8(S,O),F8));for(h=b.c.length-1;h>=0;--h)Ce(n.b,(kn(h,b.c.length),u(b.c[h],25)));n.a.c.length=0,t.Ug()}function ZVe(e){var n,t,i,r,c,o,l,f,h;for(e.b=1,fi(e),n=null,e.c==0&&e.a==94?(fi(e),n=(ai(),ai(),new cl(4)),ho(n,0,a7),l=new cl(4)):l=(ai(),ai(),new cl(4)),r=!0;(h=e.c)!=1;){if(h==0&&e.a==93&&!r){n&&(bS(n,l),l=n);break}if(t=e.a,i=!1,h==10)switch(t){case 100:case 68:case 119:case 87:case 115:case 83:tm(l,O8(t)),i=!0;break;case 105:case 73:case 99:case 67:t=(tm(l,O8(t)),-1),t<0&&(i=!0);break;case 112:case 80:if(f=Q0e(e,t),!f)throw R(new Bt(Ht((Lt(),Ine))));tm(l,f),i=!0;break;default:t=Lbe(e)}else if(h==24&&!r){if(n&&(bS(n,l),l=n),c=ZVe(e),bS(l,c),e.c!=0||e.a!=93)throw R(new Bt(Ht((Lt(),xZe))));break}if(fi(e),!i){if(h==0){if(t==91)throw R(new Bt(Ht((Lt(),Q2e))));if(t==93)throw R(new Bt(Ht((Lt(),W2e))));if(t==45&&!r&&e.a!=93)throw R(new Bt(Ht((Lt(),Dne))))}if(e.c!=0||e.a!=45||t==45&&r)ho(l,t,t);else{if(fi(e),(h=e.c)==1)throw R(new Bt(Ht((Lt(),KF))));if(h==0&&e.a==93)ho(l,t,t),ho(l,45,45);else{if(h==0&&e.a==93||h==24)throw R(new Bt(Ht((Lt(),Dne))));if(o=e.a,h==0){if(o==91)throw R(new Bt(Ht((Lt(),Q2e))));if(o==93)throw R(new Bt(Ht((Lt(),W2e))));if(o==45)throw R(new Bt(Ht((Lt(),Dne))))}else h==10&&(o=Lbe(e));if(fi(e),t>o)throw R(new Bt(Ht((Lt(),CZe))));ho(l,t,o)}}}r=!1}if(e.c==1)throw R(new Bt(Ht((Lt(),KF))));return h3(l),hS(l),e.b=0,fi(e),l}function eYe(e,n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te;te=!1;do for(te=!1,c=n?new it(e.a.b).a.gc()-2:1;n?c>=0:cu(C(D,Oi),15).a)&&(V=!1);if(V){for(f=n?c+1:c-1,l=Pae(e.a,ve(f)),o=!1,q=!0,i=!1,b=St(l,0);b.b!=b.d.c;)h=u(jt(b),9),wi(h,Oi)?h.p!=p.p&&(o=o|(n?u(C(h,Oi),15).au(C(p,Oi),15).a),q=!1):!o&&q&&h.k==(Fn(),Uu)&&(i=!0,n?y=u(ct(new Xn(Qn(cr(h).a.Jc(),new ee))),17).c.i:y=u(ct(new Xn(Qn(Ii(h).a.Jc(),new ee))),17).d.i,y==p&&(n?t=u(ct(new Xn(Qn(Ii(h).a.Jc(),new ee))),17).d.i:t=u(ct(new Xn(Qn(cr(h).a.Jc(),new ee))),17).c.i,(n?u(p2(e.a,t),15).a-u(p2(e.a,y),15).a:u(p2(e.a,y),15).a-u(p2(e.a,t),15).a)<=2&&(q=!1)));if(i&&q&&(n?t=u(ct(new Xn(Qn(Ii(p).a.Jc(),new ee))),17).d.i:t=u(ct(new Xn(Qn(cr(p).a.Jc(),new ee))),17).c.i,(n?u(p2(e.a,t),15).a-u(p2(e.a,p),15).a:u(p2(e.a,p),15).a-u(p2(e.a,t),15).a)<=2&&t.k==(Fn(),Wi)&&(q=!1)),o||q){for(O=LUe(e,p,n);O.a.gc()!=0;)A=u(O.a.ec().Jc().Pb(),9),O.a.Ac(A)!=null,ac(O,LUe(e,A,n));--S,te=!0}}}while(te)}function sBn(e){Ct(e.c,Ut,F(z(He,1),Ae,2,6,[sc,"http://www.w3.org/2001/XMLSchema#decimal"])),Ct(e.d,Ut,F(z(He,1),Ae,2,6,[sc,"http://www.w3.org/2001/XMLSchema#integer"])),Ct(e.e,Ut,F(z(He,1),Ae,2,6,[sc,"http://www.w3.org/2001/XMLSchema#boolean"])),Ct(e.f,Ut,F(z(He,1),Ae,2,6,[sc,"EBoolean",ui,"EBoolean:Object"])),Ct(e.i,Ut,F(z(He,1),Ae,2,6,[sc,"http://www.w3.org/2001/XMLSchema#byte"])),Ct(e.g,Ut,F(z(He,1),Ae,2,6,[sc,"http://www.w3.org/2001/XMLSchema#hexBinary"])),Ct(e.j,Ut,F(z(He,1),Ae,2,6,[sc,"EByte",ui,"EByte:Object"])),Ct(e.n,Ut,F(z(He,1),Ae,2,6,[sc,"EChar",ui,"EChar:Object"])),Ct(e.t,Ut,F(z(He,1),Ae,2,6,[sc,"http://www.w3.org/2001/XMLSchema#double"])),Ct(e.u,Ut,F(z(He,1),Ae,2,6,[sc,"EDouble",ui,"EDouble:Object"])),Ct(e.F,Ut,F(z(He,1),Ae,2,6,[sc,"http://www.w3.org/2001/XMLSchema#float"])),Ct(e.G,Ut,F(z(He,1),Ae,2,6,[sc,"EFloat",ui,"EFloat:Object"])),Ct(e.I,Ut,F(z(He,1),Ae,2,6,[sc,"http://www.w3.org/2001/XMLSchema#int"])),Ct(e.J,Ut,F(z(He,1),Ae,2,6,[sc,"EInt",ui,"EInt:Object"])),Ct(e.N,Ut,F(z(He,1),Ae,2,6,[sc,"http://www.w3.org/2001/XMLSchema#long"])),Ct(e.O,Ut,F(z(He,1),Ae,2,6,[sc,"ELong",ui,"ELong:Object"])),Ct(e.Z,Ut,F(z(He,1),Ae,2,6,[sc,"http://www.w3.org/2001/XMLSchema#short"])),Ct(e.$,Ut,F(z(He,1),Ae,2,6,[sc,"EShort",ui,"EShort:Object"])),Ct(e._,Ut,F(z(He,1),Ae,2,6,[sc,"http://www.w3.org/2001/XMLSchema#string"]))}function Oe(){Oe=Y,zie=(Xt(),_fn),w4e=Lfn,gI=Pfn,Kf=$fn,G3=q9e,Cg=U9e,Om=X9e,I7=K9e,D7=V9e,Fie=cG,Tg=Qd,Jie=Rfn,kx=W9e,jH=Xy,bI=(Dge(),Hcn),Tm=Gcn,lb=qcn,Nm=Ucn,Iun=new Yr(RI,ve(0)),N7=zcn,g4e=Fcn,zy=Jcn,x4e=bun,m4e=Vcn,v4e=Wcn,Gie=cun,y4e=nun,k4e=iun,EH=mun,qie=gun,E4e=fun,j4e=sun,S4e=hun,r4e=jcn,Pie=mcn,pH=pcn,$ie=ycn,mp=_cn,yx=Lcn,_ie=Urn,X5e=Krn,$un=J7,Run=uG,Pun=zm,Lun=F7,p4e=(V4(),Hm),new Yr(Ky,p4e),f4e=new yw(12),l4e=new Yr(s1,f4e),G5e=(z1(),q7),Y1=new Yr(j9e,G5e),Am=new Yr(Ps,0),Dun=new Yr(Sce,ve(1)),sH=new Yr(B7,q8),Mg=rG,Zi=Vx,O7=t5,xun=_I,Nh=kfn,Em=W3,_un=new Yr(xce,($n(),!0)),Sm=LI,xg=wce,Ag=Ig,kH=bb,Bie=$m,H5e=(vr(),nh),wl=new Yr(Ng,H5e),pp=e5,vH=O9e,Mm=Rm,Nun=Ece,d4e=H9e,h4e=(u3(),HI),new Yr(R9e,h4e),Cun=vce,Tun=yce,Oun=kce,Mun=mce,Hie=Kcn,wH=wcn,dI=gcn,jx=Xcn,ku=scn,By=Rrn,px=$rn,C7=jrn,z5e=Ern,Nie=Mrn,hI=Srn,Iie=Lrn,c4e=Ecn,u4e=Scn,Z5e=tcn,yH=Rcn,Rie=Mcn,Lie=Qrn,s4e=Icn,U5e=Grn,Die=qrn,Oie=DI,o4e=xcn,fH=rrn,P5e=irn,lH=trn,Y5e=ecn,V5e=Zrn,Q5e=ncn,T7=n5,Wc=Z3,Ud=xfn,Ih=gce,H3=bce,F5e=Trn,Xd=jce,dx=Sfn,gH=Mfn,vp=z9e,a4e=Ofn,xm=Nfn,n4e=fcn,t4e=hcn,Cm=Uy,Aie=nrn,i4e=bcn,bH=Frn,dH=zrn,mH=z7,e4e=ccn,vx=Tcn,wI=Y9e,J5e=Brn,b4e=Bcn,q5e=Jrn,jun=Nrn,Eun=Irn,Aun=ocn,Sun=Drn,W5e=pce,mx=lcn,hH=_rn,o1=krn,Cie=mrn,aI=urn,Mie=orn,aH=vrn,bx=crn,Tie=yrn,jm=prn,wx=wrn,kun=grn,Ry=srn,gx=brn,B5e=drn,$5e=lrn,R5e=arn,K5e=Wrn}function lBn(e,n,t,i,r,c,o){var l,f,h,b,p,y,S,A;return y=u(i.a,15).a,S=u(i.b,15).a,p=e.b,A=e.c,l=0,b=0,n==(vr(),Zc)||n==ru?(b=oT(LFe(C2(So(new mn(null,new yn(t.b,16)),new N_),new MM))),p.e.b+p.f.b/2>b?(h=++S,l=ne(re(Js(S2(So(new mn(null,new yn(t.b,16)),new mCe(r,h)),new uw))))):(f=++y,l=ne(re(Js(O4(So(new mn(null,new yn(t.b,16)),new vCe(r,f)),new Dk)))))):(b=oT(LFe(C2(So(new mn(null,new yn(t.b,16)),new E_),new L6))),p.e.a+p.f.a/2>b?(h=++S,l=ne(re(Js(S2(So(new mn(null,new yn(t.b,16)),new pCe(r,h)),new CM))))):(f=++y,l=ne(re(Js(O4(So(new mn(null,new yn(t.b,16)),new wCe(r,f)),new TM)))))),n==Zc?(gc(e.a,new Ee(ne(re(C(p,(Ti(),Sa))))-r,l)),gc(e.a,new Ee(A.e.a+A.f.a+r+c,l)),gc(e.a,new Ee(A.e.a+A.f.a+r+c,A.e.b+A.f.b/2)),gc(e.a,new Ee(A.e.a+A.f.a,A.e.b+A.f.b/2))):n==ru?(gc(e.a,new Ee(ne(re(C(p,(Ti(),Vf))))+r,p.e.b+p.f.b/2)),gc(e.a,new Ee(p.e.a+p.f.a+r,l)),gc(e.a,new Ee(A.e.a-r-c,l)),gc(e.a,new Ee(A.e.a-r-c,A.e.b+A.f.b/2)),gc(e.a,new Ee(A.e.a,A.e.b+A.f.b/2))):n==Vl?(gc(e.a,new Ee(l,ne(re(C(p,(Ti(),Sa))))-r)),gc(e.a,new Ee(l,A.e.b+A.f.b+r+c)),gc(e.a,new Ee(A.e.a+A.f.a/2,A.e.b+A.f.b+r+c)),gc(e.a,new Ee(A.e.a+A.f.a/2,A.e.b+A.f.b+r))):(e.a.b==0||(u(If(e.a),8).b=ne(re(C(p,(Ti(),Vf))))+r*u(o.b,15).a),gc(e.a,new Ee(l,ne(re(C(p,(Ti(),Vf))))+r*u(o.b,15).a)),gc(e.a,new Ee(l,A.e.b-r*u(o.a,15).a-c))),new jc(ve(y),ve(S))}function fBn(e){var n,t,i,r,c,o,l,f,h,b,p,y,S;if(o=!0,p=null,i=null,r=null,n=!1,S=$an,h=null,c=null,l=0,f=IQ(e,l,U8e,X8e),f=0&&bn(e.substr(l,2),"//")?(l+=2,f=IQ(e,l,oA,sA),i=(Qr(l,f,e.length),e.substr(l,f-l)),l=f):p!=null&&(l==e.length||(Wn(l,e.length),e.charCodeAt(l)!=47))&&(o=!1,f=rle(e,Xo(35),l),f==-1&&(f=e.length),i=(Qr(l,f,e.length),e.substr(l,f-l)),l=f);if(!t&&l0&&rc(b,b.length-1)==58&&(r=b,l=f)),lo?(Ys(e,n,t),1):(Ys(e,t,n),-1)}for(q=e.f,V=0,te=q.length;V0?Ys(e,n,t):Ys(e,t,n),i;if(!wi(n,(me(),Oi))||!wi(t,Oi))return c=cW(e,n),l=cW(e,t),c>l?(Ys(e,n,t),1):(Ys(e,t,n),-1)}if(!y&&!A&&(i=tYe(e,n,t),i!=0))return i>0?Ys(e,n,t):Ys(e,t,n),i}return wi(n,(me(),Oi))&&wi(t,Oi)?(c=Kw(n,t,e.c,u(C(e.c,sb),15).a),l=Kw(t,n,e.c,u(C(e.c,sb),15).a),c>l?(Ys(e,n,t),1):(Ys(e,t,n),-1)):(Ys(e,t,n),-1)}function nYe(){nYe=Y,lZ(),Wt=new Nw,gn(Wt,(Ie(),ea),ih),gn(Wt,mf,ih),gn(Wt,ks,ih),gn(Wt,na,ih),gn(Wt,es,ih),gn(Wt,js,ih),gn(Wt,na,ea),gn(Wt,ih,Yl),gn(Wt,ea,Yl),gn(Wt,mf,Yl),gn(Wt,ks,Yl),gn(Wt,Zo,Yl),gn(Wt,na,Yl),gn(Wt,es,Yl),gn(Wt,js,Yl),gn(Wt,zo,Yl),gn(Wt,ih,ml),gn(Wt,ea,ml),gn(Wt,Yl,ml),gn(Wt,mf,ml),gn(Wt,ks,ml),gn(Wt,Zo,ml),gn(Wt,na,ml),gn(Wt,zo,ml),gn(Wt,vl,ml),gn(Wt,es,ml),gn(Wt,hs,ml),gn(Wt,js,ml),gn(Wt,ea,mf),gn(Wt,ks,mf),gn(Wt,na,mf),gn(Wt,js,mf),gn(Wt,ea,ks),gn(Wt,mf,ks),gn(Wt,na,ks),gn(Wt,ks,ks),gn(Wt,es,ks),gn(Wt,ih,Ql),gn(Wt,ea,Ql),gn(Wt,Yl,Ql),gn(Wt,ml,Ql),gn(Wt,mf,Ql),gn(Wt,ks,Ql),gn(Wt,Zo,Ql),gn(Wt,na,Ql),gn(Wt,vl,Ql),gn(Wt,zo,Ql),gn(Wt,js,Ql),gn(Wt,es,Ql),gn(Wt,mo,Ql),gn(Wt,ih,vl),gn(Wt,ea,vl),gn(Wt,Yl,vl),gn(Wt,mf,vl),gn(Wt,ks,vl),gn(Wt,Zo,vl),gn(Wt,na,vl),gn(Wt,zo,vl),gn(Wt,js,vl),gn(Wt,hs,vl),gn(Wt,mo,vl),gn(Wt,ea,zo),gn(Wt,mf,zo),gn(Wt,ks,zo),gn(Wt,na,zo),gn(Wt,vl,zo),gn(Wt,js,zo),gn(Wt,es,zo),gn(Wt,ih,Wo),gn(Wt,ea,Wo),gn(Wt,Yl,Wo),gn(Wt,mf,Wo),gn(Wt,ks,Wo),gn(Wt,Zo,Wo),gn(Wt,na,Wo),gn(Wt,zo,Wo),gn(Wt,js,Wo),gn(Wt,ea,es),gn(Wt,Yl,es),gn(Wt,ml,es),gn(Wt,ks,es),gn(Wt,ih,hs),gn(Wt,ea,hs),gn(Wt,ml,hs),gn(Wt,mf,hs),gn(Wt,ks,hs),gn(Wt,Zo,hs),gn(Wt,na,hs),gn(Wt,na,mo),gn(Wt,ks,mo),gn(Wt,zo,ih),gn(Wt,zo,mf),gn(Wt,zo,Yl),gn(Wt,Zo,ih),gn(Wt,Zo,ea),gn(Wt,Zo,ml)}function aBn(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe;switch(t.Tg("Brandes & Koepf node placement",1),e.a=n,e.c=G_n(n),i=u(C(n,(Oe(),Rie)),282),S=Fe(ze(C(n,vx))),e.d=i==(JO(),WJ)&&!S||i==lie,$Pn(e,n),be=null,fe=null,B=null,q=null,D=(sl(4,rm),new xo(4)),u(C(n,Rie),282).g){case 3:B=new b3(n,e.c.d,(Da(),Og),(dh(),Kd)),qn(D.c,B);break;case 1:q=new b3(n,e.c.d,(Da(),Qa),(dh(),Kd)),qn(D.c,q);break;case 4:be=new b3(n,e.c.d,(Da(),Og),(dh(),yp)),qn(D.c,be);break;case 2:fe=new b3(n,e.c.d,(Da(),Qa),(dh(),yp)),qn(D.c,fe);break;default:B=new b3(n,e.c.d,(Da(),Og),(dh(),Kd)),q=new b3(n,e.c.d,Qa,Kd),be=new b3(n,e.c.d,Og,yp),fe=new b3(n,e.c.d,Qa,yp),qn(D.c,be),qn(D.c,fe),qn(D.c,B),qn(D.c,q)}for(r=new fCe(n,e.c),l=new P(D);l.aAW(c))&&(p=c);for(!p&&(p=(kn(0,D.c.length),u(D.c[0],185))),O=new P(n.b);O.a0?(Ys(e,t,n),1):(Ys(e,n,t),-1);if(b&&V)return Ys(e,t,n),1;if(p&&q)return Ys(e,n,t),-1;if(p&&V)return 0}else for(cn=new P(h.j);cn.ap&&(Dn=0,lt+=b+De,b=0),KXe(be,o,Dn,lt),n=k.Math.max(n,Dn+fe.a),b=k.Math.max(b,fe.b),Dn+=fe.a+De;for(te=new wt,t=new wt,cn=new P(e);cn.a=-1900?1:0,t>=4?Kt(e,F(z(He,1),Ae,2,6,[vYe,yYe])[l]):Kt(e,F(z(He,1),Ae,2,6,["BC","AD"])[l]);break;case 121:WEn(e,t,i);break;case 77:XDn(e,t,i);break;case 107:f=r.q.getHours(),f==0?Vh(e,24,t):Vh(e,f,t);break;case 83:lNn(e,t,r);break;case 69:b=i.q.getDay(),t==5?Kt(e,F(z(He,1),Ae,2,6,["S","M","T","W","T","F","S"])[b]):t==4?Kt(e,F(z(He,1),Ae,2,6,[OZ,NZ,IZ,DZ,_Z,LZ,PZ])[b]):Kt(e,F(z(He,1),Ae,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[b]);break;case 97:r.q.getHours()>=12&&r.q.getHours()<24?Kt(e,F(z(He,1),Ae,2,6,["AM","PM"])[1]):Kt(e,F(z(He,1),Ae,2,6,["AM","PM"])[0]);break;case 104:p=r.q.getHours()%12,p==0?Vh(e,12,t):Vh(e,p,t);break;case 75:y=r.q.getHours()%12,Vh(e,y,t);break;case 72:S=r.q.getHours(),Vh(e,S,t);break;case 99:A=i.q.getDay(),t==5?Kt(e,F(z(He,1),Ae,2,6,["S","M","T","W","T","F","S"])[A]):t==4?Kt(e,F(z(He,1),Ae,2,6,[OZ,NZ,IZ,DZ,_Z,LZ,PZ])[A]):t==3?Kt(e,F(z(He,1),Ae,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[A]):Vh(e,A,1);break;case 76:O=i.q.getMonth(),t==5?Kt(e,F(z(He,1),Ae,2,6,["J","F","M","A","M","J","J","A","S","O","N","D"])[O]):t==4?Kt(e,F(z(He,1),Ae,2,6,[vZ,yZ,kZ,jZ,ay,EZ,SZ,xZ,AZ,MZ,CZ,TZ])[O]):t==3?Kt(e,F(z(He,1),Ae,2,6,["Jan","Feb","Mar","Apr",ay,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])[O]):Vh(e,O+1,t);break;case 81:D=i.q.getMonth()/3|0,t<4?Kt(e,F(z(He,1),Ae,2,6,["Q1","Q2","Q3","Q4"])[D]):Kt(e,F(z(He,1),Ae,2,6,["1st quarter","2nd quarter","3rd quarter","4th quarter"])[D]);break;case 100:B=i.q.getDate(),Vh(e,B,t);break;case 109:h=r.q.getMinutes(),Vh(e,h,t);break;case 115:o=r.q.getSeconds(),Vh(e,o,t);break;case 122:t<4?Kt(e,c.c[0]):Kt(e,c.c[1]);break;case 118:Kt(e,c.b);break;case 90:t<3?Kt(e,hTn(c)):t==3?Kt(e,wTn(c)):Kt(e,pTn(c.a));break;default:return!1}return!0}function Ige(e,n,t,i){var r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,De,un,cn,On,Dn,lt,Qt;if(PXe(n),f=u(K((!n.b&&(n.b=new In(mt,n,4,7)),n.b),0),84),b=u(K((!n.c&&(n.c=new In(mt,n,5,8)),n.c),0),84),l=iu(f),h=iu(b),o=(!n.a&&(n.a=new we($i,n,6,6)),n.a).i==0?null:u(K((!n.a&&(n.a=new we($i,n,6,6)),n.a),0),170),De=u(zn(e.a,l),9),Dn=u(zn(e.a,h),9),un=null,lt=null,X(f,193)&&(fe=u(zn(e.a,f),246),X(fe,12)?un=u(fe,12):X(fe,9)&&(De=u(fe,9),un=u(Le(De.j,0),12))),X(b,193)&&(On=u(zn(e.a,b),246),X(On,12)?lt=u(On,12):X(On,9)&&(Dn=u(On,9),lt=u(Le(Dn.j,0),12))),!De||!Dn)throw R(new a4("The source or the target of edge "+n+" could not be found. This usually happens when an edge connects a node laid out by ELK Layered to a node in another level of hierarchy laid out by either another instance of ELK Layered or another layout algorithm alltogether. The former can be solved by setting the hierarchyHandling option to INCLUDE_CHILDREN."));for(O=new Ow,Pu(O,n),he(O,(me(),mi),n),he(O,(Oe(),Wc),null),S=u(C(i,po),22),De==Dn&&S.Ec((Ic(),ox)),un||(be=(Nc(),Io),cn=null,o&&$v(u(C(De,Zi),102))&&(cn=new Ee(o.j,o.k),aPe(cn,T2(n)),RPe(cn,t),P2(h,l)&&(be=ys,pi(cn,De.n))),un=BKe(De,cn,be,i)),lt||(be=(Nc(),ys),Qt=null,o&&$v(u(C(Dn,Zi),102))&&(Qt=new Ee(o.b,o.c),aPe(Qt,T2(n)),RPe(Qt,t)),lt=BKe(Dn,Qt,be,_r(Dn))),fc(O,un),Gr(O,lt),(un.e.c.length>1||un.g.c.length>1||lt.e.c.length>1||lt.g.c.length>1)&&S.Ec((Ic(),ux)),y=new st((!n.n&&(n.n=new we(Eu,n,1,7)),n.n));y.e!=y.i.gc();)if(p=u(ft(y),157),!Fe(ze(ke(p,Mg)))&&p.a)switch(D=aQ(p),Ce(O.b,D),u(C(D,Ih),279).g){case 1:case 2:S.Ec((Ic(),x7));break;case 0:S.Ec((Ic(),S7)),he(D,Ih,(Ra(),H7))}if(c=u(C(i,px),301),B=u(C(i,yH),328),r=c==(zE(),tI)||B==(GE(),Zie),o&&(!o.a&&(o.a=new mr(yl,o,5)),o.a).i!=0&&r){for(q=hCn(o),A=new xs,te=St(q,0);te.b!=te.d.c;)V=u(jt(te),8),Vt(A,new wc(V));he(O,K3e,A)}return O}function gBn(e,n,t,i){var r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,De,un,cn,On,Dn,lt,Qt,Ui;for(cn=0,On=0,De=new wt,be=u(Js(S2(So(new mn(null,new yn(e.b,16)),new j_),new Ik)),15).a+1,un=le($t,ni,30,be,15,1),D=le($t,ni,30,be,15,1),O=0;O1)for(l=lt+1;lh.b.e.b*(1-B)+h.c.e.b*B));A++);if(fe.gc()>0&&(Qt=h.a.b==0?pc(h.b.e):u(If(h.a),8),V=pi(pc(u(fe.Xb(fe.gc()-1),40).e),u(fe.Xb(fe.gc()-1),40).f),y=pi(pc(u(fe.Xb(0),40).e),u(fe.Xb(0),40).f),A>=fe.gc()-1&&Qt.b>V.b&&h.c.e.b>V.b||A<=0&&Qt.bh.b.e.a*(1-B)+h.c.e.a*B));A++);if(fe.gc()>0&&(Qt=h.a.b==0?pc(h.b.e):u(If(h.a),8),V=pi(pc(u(fe.Xb(fe.gc()-1),40).e),u(fe.Xb(fe.gc()-1),40).f),y=pi(pc(u(fe.Xb(0),40).e),u(fe.Xb(0),40).f),A>=fe.gc()-1&&Qt.a>V.a&&h.c.e.a>V.a||A<=0&&Qt.a=ne(re(C(e,(Ti(),vye))))&&++On):(S.f&&S.d.e.a<=ne(re(C(e,(Ti(),pre))))&&++cn,S.g&&S.c.e.a+S.c.f.a>=ne(re(C(e,(Ti(),mye))))&&++On)}else te==0?K0e(h):te<0&&(++un[lt],++D[Ui],Dn=lBn(h,n,e,new jc(ve(cn),ve(On)),t,i,new jc(ve(D[Ui]),ve(un[lt]))),cn=u(Dn.a,15).a,On=u(Dn.b,15).a)}function wBn(e){e.gb||(e.gb=!0,e.b=Au(e,0),Yi(e.b,18),_i(e.b,19),e.a=Au(e,1),Yi(e.a,1),_i(e.a,2),_i(e.a,3),_i(e.a,4),_i(e.a,5),e.o=Au(e,2),Yi(e.o,8),Yi(e.o,9),_i(e.o,10),_i(e.o,11),_i(e.o,12),_i(e.o,13),_i(e.o,14),_i(e.o,15),_i(e.o,16),_i(e.o,17),_i(e.o,18),_i(e.o,19),_i(e.o,20),_i(e.o,21),_i(e.o,22),_i(e.o,23),Yc(e.o),Yc(e.o),Yc(e.o),Yc(e.o),Yc(e.o),Yc(e.o),Yc(e.o),Yc(e.o),Yc(e.o),Yc(e.o),e.p=Au(e,3),Yi(e.p,2),Yi(e.p,3),Yi(e.p,4),Yi(e.p,5),_i(e.p,6),_i(e.p,7),Yc(e.p),Yc(e.p),e.q=Au(e,4),Yi(e.q,8),e.v=Au(e,5),_i(e.v,9),Yc(e.v),Yc(e.v),Yc(e.v),e.w=Au(e,6),Yi(e.w,2),Yi(e.w,3),Yi(e.w,4),_i(e.w,5),e.B=Au(e,7),_i(e.B,1),Yc(e.B),Yc(e.B),Yc(e.B),e.Q=Au(e,8),_i(e.Q,0),Yc(e.Q),e.R=Au(e,9),Yi(e.R,1),e.S=Au(e,10),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),Yc(e.S),e.T=Au(e,11),_i(e.T,10),_i(e.T,11),_i(e.T,12),_i(e.T,13),_i(e.T,14),Yc(e.T),Yc(e.T),e.U=Au(e,12),Yi(e.U,2),Yi(e.U,3),_i(e.U,4),_i(e.U,5),_i(e.U,6),_i(e.U,7),Yc(e.U),e.V=Au(e,13),_i(e.V,10),e.W=Au(e,14),Yi(e.W,18),Yi(e.W,19),Yi(e.W,20),_i(e.W,21),_i(e.W,22),_i(e.W,23),e.bb=Au(e,15),Yi(e.bb,10),Yi(e.bb,11),Yi(e.bb,12),Yi(e.bb,13),Yi(e.bb,14),Yi(e.bb,15),Yi(e.bb,16),_i(e.bb,17),Yc(e.bb),Yc(e.bb),e.eb=Au(e,16),Yi(e.eb,2),Yi(e.eb,3),Yi(e.eb,4),Yi(e.eb,5),Yi(e.eb,6),Yi(e.eb,7),_i(e.eb,8),_i(e.eb,9),e.ab=Au(e,17),Yi(e.ab,0),Yi(e.ab,1),e.H=Au(e,18),_i(e.H,0),_i(e.H,1),_i(e.H,2),_i(e.H,3),_i(e.H,4),_i(e.H,5),Yc(e.H),e.db=Au(e,19),_i(e.db,2),e.c=ci(e,20),e.d=ci(e,21),e.e=ci(e,22),e.f=ci(e,23),e.i=ci(e,24),e.g=ci(e,25),e.j=ci(e,26),e.k=ci(e,27),e.n=ci(e,28),e.r=ci(e,29),e.s=ci(e,30),e.t=ci(e,31),e.u=ci(e,32),e.fb=ci(e,33),e.A=ci(e,34),e.C=ci(e,35),e.D=ci(e,36),e.F=ci(e,37),e.G=ci(e,38),e.I=ci(e,39),e.J=ci(e,40),e.L=ci(e,41),e.M=ci(e,42),e.N=ci(e,43),e.O=ci(e,44),e.P=ci(e,45),e.X=ci(e,46),e.Y=ci(e,47),e.Z=ci(e,48),e.$=ci(e,49),e._=ci(e,50),e.cb=ci(e,51),e.K=ci(e,52))}function pBn(e,n,t,i){var r,c,o,l,f,h,b,p,y,S,A;for(p=St(e.b,0);p.b!=p.d.c;)if(b=u(jt(p),40),!bn(b.c,_F))for(c=u(gs(new mn(null,new yn(OTn(b,e),16)),Cs(new zi,new bi,new Cc,F(z(Qo,1),je,130,0,[(zl(),Yo)]))),16),n==(vr(),Zc)||n==ru?c.gd(new C_):c.gd(new T_),A=c.gc(),r=0;r0&&(l=u(If(u(c.Xb(r),65).a),8).a,y=b.e.a+b.f.a/2,f=u(If(u(c.Xb(r),65).a),8).b,S=b.e.b+b.f.b/2,i>0&&k.Math.abs(f-S)/(k.Math.abs(l-y)/40)>50&&(S>f?gc(u(c.Xb(r),65).a,new Ee(b.e.a+b.f.a+i/5.3,b.e.b+b.f.b*o-i/2)):gc(u(c.Xb(r),65).a,new Ee(b.e.a+b.f.a+i/5.3,b.e.b+b.f.b*o+i/2)))),gc(u(c.Xb(r),65).a,new Ee(b.e.a+b.f.a,b.e.b+b.f.b*o))):n==ru?(h=ne(re(C(b,(Ti(),Sa)))),b.e.a-i>h?gc(u(c.Xb(r),65).a,new Ee(h-t,b.e.b+b.f.b*o)):u(c.Xb(r),65).a.b>0&&(l=u(If(u(c.Xb(r),65).a),8).a,y=b.e.a+b.f.a/2,f=u(If(u(c.Xb(r),65).a),8).b,S=b.e.b+b.f.b/2,i>0&&k.Math.abs(f-S)/(k.Math.abs(l-y)/40)>50&&(S>f?gc(u(c.Xb(r),65).a,new Ee(b.e.a-i/5.3,b.e.b+b.f.b*o-i/2)):gc(u(c.Xb(r),65).a,new Ee(b.e.a-i/5.3,b.e.b+b.f.b*o+i/2)))),gc(u(c.Xb(r),65).a,new Ee(b.e.a,b.e.b+b.f.b*o))):n==Vl?(h=ne(re(C(b,(Ti(),Vf)))),b.e.b+b.f.b+i0&&(l=u(If(u(c.Xb(r),65).a),8).a,y=b.e.a+b.f.a/2,f=u(If(u(c.Xb(r),65).a),8).b,S=b.e.b+b.f.b/2,i>0&&k.Math.abs(l-y)/(k.Math.abs(f-S)/40)>50&&(y>l?gc(u(c.Xb(r),65).a,new Ee(b.e.a+b.f.a*o-i/2,b.e.b+i/5.3+b.f.b)):gc(u(c.Xb(r),65).a,new Ee(b.e.a+b.f.a*o+i/2,b.e.b+i/5.3+b.f.b)))),gc(u(c.Xb(r),65).a,new Ee(b.e.a+b.f.a*o,b.e.b+b.f.b))):(h=ne(re(C(b,(Ti(),Sa)))),zze(u(c.Xb(r),65),e)?gc(u(c.Xb(r),65).a,new Ee(b.e.a+b.f.a*o,u(If(u(c.Xb(r),65).a),8).b)):b.e.b-i>h?gc(u(c.Xb(r),65).a,new Ee(b.e.a+b.f.a*o,h-t)):u(c.Xb(r),65).a.b>0&&(l=u(If(u(c.Xb(r),65).a),8).a,y=b.e.a+b.f.a/2,f=u(If(u(c.Xb(r),65).a),8).b,S=b.e.b+b.f.b/2,i>0&&k.Math.abs(l-y)/(k.Math.abs(f-S)/40)>50&&(y>l?gc(u(c.Xb(r),65).a,new Ee(b.e.a+b.f.a*o-i/2,b.e.b-i/5.3)):gc(u(c.Xb(r),65).a,new Ee(b.e.a+b.f.a*o+i/2,b.e.b-i/5.3)))),gc(u(c.Xb(r),65).a,new Ee(b.e.a+b.f.a*o,b.e.b)))}function rYe(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe;if(o=n,y=t,so(e.a,o)){if(rf(u(zn(e.a,o),47),y))return 1}else ei(e.a,o,new ar);if(so(e.a,y)){if(rf(u(zn(e.a,y),47),o))return-1}else ei(e.a,y,new ar);if(so(e.e,o)){if(rf(u(zn(e.e,o),47),y))return-1}else ei(e.e,o,new ar);if(so(e.e,y)){if(rf(u(zn(e.a,y),47),o))return 1}else ei(e.e,y,new ar);if(o.j!=y.j)return be=uwn(o.j,y.j),be>0?Hl(e,o,y,1):Hl(e,y,o,1),be;if(fe=1,o.e.c.length!=0&&y.e.c.length!=0){if((o.j==(Ie(),Yn)&&y.j==Yn||o.j==Vn&&y.j==Vn||o.j==bt&&y.j==bt)&&(fe=-fe),b=u(Le(o.e,0),17).c,D=u(Le(y.e,0),17).c,f=b.i,A=D.i,f==A)for(V=new P(f.j);V.a0?(Hl(e,o,y,fe),fe):(Hl(e,y,o,fe),-fe);if(i=jFe(u(gs(vV(e.d),Cs(new zi,new bi,new Cc,F(z(Qo,1),je,130,0,[(zl(),Yo)]))),20),f,A),i!=0)return i>0?(Hl(e,o,y,fe),fe):(Hl(e,y,o,fe),-fe);if(e.c&&(be=WJe(e,o,y),be!=0))return be>0?(Hl(e,o,y,fe),fe):(Hl(e,y,o,fe),-fe)}return o.g.c.length!=0&&y.g.c.length!=0?((o.j==(Ie(),Yn)&&y.j==Yn||o.j==bt&&y.j==bt)&&(fe=-fe),p=u(C(o,(me(),vie)),9),B=u(C(y,vie),9),e.f==(F1(),tre)&&p&&B&&wi(p,Oi)&&wi(B,Oi)?(l=Kw(p,B,e.b,u(C(e.b,sb),15).a),S=Kw(B,p,e.b,u(C(e.b,sb),15).a),l>S?(Hl(e,o,y,fe),fe):(Hl(e,y,o,fe),-fe)):e.c&&(be=WJe(e,o,y),be!=0)?be>0?(Hl(e,o,y,fe),fe):(Hl(e,y,o,fe),-fe):(h=0,O=0,wi(u(Le(o.g,0),17),Oi)&&(h=Kw(u(Le(o.g,0),246),u(Le(y.g,0),246),e.b,o.g.c.length+o.e.c.length)),wi(u(Le(y.g,0),17),Oi)&&(O=Kw(u(Le(y.g,0),246),u(Le(o.g,0),246),e.b,y.g.c.length+y.e.c.length)),p&&p==B||e.g&&(e.g._b(p)&&(h=u(e.g.xc(p),15).a),e.g._b(B)&&(O=u(e.g.xc(B),15).a)),h>O?(Hl(e,o,y,fe),fe):(Hl(e,y,o,fe),-fe))):o.e.c.length!=0&&y.g.c.length!=0?(Hl(e,o,y,fe),1):o.g.c.length!=0&&y.e.c.length!=0?(Hl(e,y,o,fe),-1):wi(o,(me(),Oi))&&wi(y,Oi)?(c=o.i.j.c.length,l=Kw(o,y,e.b,c),S=Kw(y,o,e.b,c),(o.j==(Ie(),Yn)&&y.j==Yn||o.j==bt&&y.j==bt)&&(fe=-fe),l>S?(Hl(e,o,y,fe),fe):(Hl(e,y,o,fe),-fe)):(Hl(e,y,o,fe),-fe)}function me(){me=Y;var e,n;mi=new ki(owe),G3e=new ki("coordinateOrigin"),kie=new ki("processors"),H3e=new Pi("compoundNode",($n(),!1)),sI=new Pi("insideConnections",!1),K3e=new ki("originalBendpoints"),V3e=new ki("originalDummyNodePosition"),Y3e=new ki("originalLabelEdge"),lx=new ki("representedLabels"),sx=new ki("endLabels"),Iy=new ki("endLabel.origin"),_y=new Pi("labelSide",(fl(),JI)),R3=new Pi("maxEdgeThickness",0),qd=new Pi("reversed",!1),Ly=new ki(iQe),Ea=new Pi("longEdgeSource",null),gf=new Pi("longEdgeTarget",null),km=new Pi("longEdgeHasLabelDummies",!1),lI=new Pi("longEdgeBeforeLabelDummy",!1),rH=new Pi("edgeConstraint",(tg(),iie)),bp=new ki("inLayerLayoutUnit"),jg=new Pi("inLayerConstraint",(_1(),uI)),Dy=new Pi("inLayerSuccessorConstraint",new Te),X3e=new Pi("inLayerSuccessorConstraintBetweenNonDummies",!1),vs=new ki("portDummy"),iH=new Pi("crossingHint",ve(0)),po=new Pi("graphProperties",(n=u(la(fie),10),new _l(n,u(Df(n,n.length),10),0))),Iu=new Pi("externalPortSide",(Ie(),ju)),U3e=new Pi("externalPortSize",new Vr),wie=new ki("externalPortReplacedDummies"),cH=new ki("externalPortReplacedDummy"),K1=new Pi("externalPortConnections",(e=u(la(xc),10),new _l(e,u(Df(e,e.length),10),0))),gp=new Pi(WYe,0),J3e=new ki("barycenterAssociates"),$y=new ki("TopSideComments"),Oy=new ki("BottomSideComments"),tH=new ki("CommentConnectionPort"),mie=new Pi("inputCollect",!1),yie=new Pi("outputCollect",!1),Ny=new Pi("cyclic",!1),q3e=new ki("crossHierarchyMap"),Eie=new ki("targetOffset"),new Pi("splineLabelSize",new Vr),z3=new ki("spacings"),uH=new Pi("partitionConstraint",!1),dp=new ki("breakingPoint.info"),Z3e=new ki("splines.survivingEdge"),Eg=new ki("splines.route.start"),F3=new ki("splines.edgeChain"),W3e=new ki("originalPortConstraints"),wp=new ki("selfLoopHolder"),M7=new ki("splines.nsPortY"),Oi=new ki("modelOrder"),sb=new ki("modelOrder.maximum"),oI=new ki("modelOrderGroups.cb.number"),vie=new ki("longEdgeTargetNode"),ob=new Pi(TQe,!1),B3=new Pi(TQe,!1),pie=new ki("layerConstraints.hiddenNodes"),Q3e=new ki("layerConstraints.opposidePort"),jie=new ki("targetNode.modelOrder"),Py=new Pi("tarjan.lowlink",ve(oi)),fx=new Pi("tarjan.id",ve(-1)),oH=new Pi("tarjan.onstack",!1),Win=new Pi("partOfCycle",!1),J3=new ki("medianHeuristic.weight")}function Xt(){Xt=Y;var e,n;qy=new ki(mWe),Bm=new ki(vWe),p9e=(Yh(),lce),kfn=new an(ppe,p9e),B7=new an(U8,null),jfn=new ki(N2e),v9e=(sg(),Ci(hce,F(z(dce,1),je,299,0,[ace]))),DI=new an(OF,v9e),_I=new an(PN,($n(),!1)),y9e=(vr(),nh),Ng=new an(Jee,y9e),E9e=(z1(),Ace),j9e=new an(LN,E9e),Afn=new an(T2e,!1),x9e=(B1(),lG),W3=new an(TF,x9e),P9e=new yw(12),s1=new an(sm,P9e),PI=new an(ES,!1),pce=new an(IF,!1),$I=new an(SS,!1),F9e=(Br(),pb),Vx=new an(ZZ,F9e),Uy=new ki(NF),RI=new ki(xN),Sce=new ki(fF),xce=new ki(jS),C9e=new xs,Z3=new an(Cpe,C9e),Sfn=new an(Ipe,!1),Mfn=new an(Dpe,!1),new an(yWe,0),T9e=new pj,z7=new an(Lpe,T9e),rG=new an(gpe,!1),Dfn=new an(kWe,1),Pm=new ki(jWe),Lm=new ki(EWe),J7=new an(AN,!1),new an(SWe,!0),ve(0),new an(xWe,ve(100)),new an(AWe,!1),ve(0),new an(MWe,ve(4e3)),ve(0),new an(CWe,ve(400)),new an(TWe,!1),new an(OWe,!1),new an(NWe,!0),new an(IWe,!1),m9e=(YB(),Ice),Efn=new an(O2e,m9e),M9e=(EE(),qI),Tfn=new an(DWe,M9e),A9e=(s8(),BI),Cfn=new an(_We,A9e),_fn=new an(ipe,10),Lfn=new an(rpe,10),Pfn=new an(cpe,20),$fn=new an(upe,10),q9e=new an(WZ,2),U9e=new an(Fee,10),X9e=new an(ope,0),cG=new an(fpe,5),K9e=new an(spe,1),V9e=new an(lpe,1),Qd=new an(om,20),Rfn=new an(ape,10),W9e=new an(hpe,10),Xy=new ki(dpe),Q9e=new mTe,Y9e=new an(Ppe,Q9e),Nfn=new ki(Gee),$9e=!1,Ofn=new an(Hee,$9e),N9e=new yw(5),O9e=new an(ype,N9e),I9e=(Q2(),n=u(la($c),10),new _l(n,u(Df(n,n.length),10),0)),e5=new an(K8,I9e),B9e=(u3(),wb),R9e=new an(Epe,B9e),vce=new ki(Spe),yce=new ki(xpe),kce=new ki(Ape),mce=new ki(Mpe),D9e=(e=u(la(iA),10),new _l(e,u(Df(e,e.length),10),0)),Ig=new an(k3,D9e),L9e=rn((_s(),X7)),bb=new an(py,L9e),_9e=new Ee(0,0),n5=new an(my,_9e),$m=new an(X8,!1),k9e=(Ra(),H7),gce=new an(Ope,k9e),bce=new an(aF,!1),ve(1),new an(LWe,null),z9e=new ki(_pe),jce=new ki(Npe),G9e=(Ie(),ju),t5=new an(wpe,G9e),Ps=new ki(bpe),J9e=(ps(),rn(mb)),Rm=new an(V8,J9e),Ece=new an(kpe,!1),H9e=new an(jpe,!0),ve(1),Hfn=new an(dne,ve(3)),ve(1),qfn=new an(I2e,ve(4)),uG=new an(MN,1),oG=new an(bne,null),zm=new an(CN,150),F7=new an(TN,1.414),Ky=new an(np,null),Bfn=new an(D2e,1),LI=new an(mpe,!1),wce=new an(vpe,!1),xfn=new an(Tpe,1),S9e=(Sz(),Cce),new an(PWe,S9e),Ifn=!0,Gfn=(KR(),Nce),Ffn=(V4(),Hm),Jfn=Hm,zfn=Hm}function Ur(){Ur=Y,Bve=new br("DIRECTION_PREPROCESSOR",0),Pve=new br("COMMENT_PREPROCESSOR",1),N3=new br("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER",2),_te=new br("INTERACTIVE_EXTERNAL_PORT_POSITIONER",3),r3e=new br("PARTITION_PREPROCESSOR",4),OJ=new br("LABEL_DUMMY_INSERTER",5),zJ=new br("SELF_LOOP_PREPROCESSOR",6),pm=new br("LAYER_CONSTRAINT_PREPROCESSOR",7),t3e=new br("PARTITION_MIDPROCESSOR",8),Xve=new br("HIGH_DEGREE_NODE_LAYER_PROCESSOR",9),e3e=new br("NODE_PROMOTION",10),wm=new br("LAYER_CONSTRAINT_POSTPROCESSOR",11),i3e=new br("PARTITION_POSTPROCESSOR",12),Gve=new br("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR",13),c3e=new br("SEMI_INTERACTIVE_CROSSMIN_PROCESSOR",14),Ove=new br("BREAKING_POINT_INSERTER",15),_J=new br("LONG_EDGE_SPLITTER",16),Lte=new br("PORT_SIDE_PROCESSOR",17),CJ=new br("INVERTED_PORT_PROCESSOR",18),$J=new br("PORT_LIST_SORTER",19),o3e=new br("SORT_BY_INPUT_ORDER_OF_MODEL",20),PJ=new br("NORTH_SOUTH_PORT_PREPROCESSOR",21),Nve=new br("BREAKING_POINT_PROCESSOR",22),n3e=new br(kQe,23),s3e=new br(jQe,24),RJ=new br("SELF_LOOP_PORT_RESTORER",25),Tve=new br("ALTERNATING_LAYER_UNZIPPER",26),u3e=new br("SINGLE_EDGE_GRAPH_WRAPPER",27),TJ=new br("IN_LAYER_CONSTRAINT_PROCESSOR",28),Fve=new br("END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR",29),Wve=new br("LABEL_AND_NODE_SIZE_PROCESSOR",30),Qve=new br("INNERMOST_NODE_MARGIN_CALCULATOR",31),FJ=new br("SELF_LOOP_ROUTER",32),_ve=new br("COMMENT_NODE_MARGIN_CALCULATOR",33),MJ=new br("END_LABEL_PREPROCESSOR",34),IJ=new br("LABEL_DUMMY_SWITCHER",35),Dve=new br("CENTER_LABEL_MANAGEMENT_PROCESSOR",36),p7=new br("LABEL_SIDE_SELECTOR",37),Vve=new br("HYPEREDGE_DUMMY_MERGER",38),qve=new br("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR",39),Zve=new br("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR",40),tx=new br("HIERARCHICAL_PORT_POSITION_PROCESSOR",41),$ve=new br("CONSTRAINTS_POSTPROCESSOR",42),Lve=new br("COMMENT_POSTPROCESSOR",43),Yve=new br("HYPERNODE_PROCESSOR",44),Uve=new br("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER",45),DJ=new br("LONG_EDGE_JOINER",46),BJ=new br("SELF_LOOP_POSTPROCESSOR",47),Ive=new br("BREAKING_POINT_REMOVER",48),LJ=new br("NORTH_SOUTH_PORT_POSTPROCESSOR",49),Kve=new br("HORIZONTAL_COMPACTOR",50),NJ=new br("LABEL_DUMMY_REMOVER",51),Jve=new br("FINAL_SPLINE_BENDPOINTS_CALCULATOR",52),zve=new br("END_LABEL_SORTER",53),Cy=new br("REVERSED_EDGE_RESTORER",54),AJ=new br("END_LABEL_POSTPROCESSOR",55),Hve=new br("HIERARCHICAL_NODE_RESIZER",56),Rve=new br("DIRECTION_POSTPROCESSOR",57)}function mBn(e,n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,De,un,cn,On,Dn,lt,Qt,Ui,Es,eu,kl,s5,c0,ta,nd,Zl,n6,wA,td,Ca,u0,$g,Rg,t6,Bg,zg,id,Qm,M7e,Mp,pA,Vce,i6,mA,Wm,vA,Yce,_hn;for(M7e=0,Qt=n,eu=0,c0=Qt.length;eu0&&(e.a[Ca.p]=M7e++)}for(mA=0,Ui=t,kl=0,ta=Ui.length;kl0;){for(Ca=(at(t6.b>0),u(t6.a.Xb(t6.c=--t6.b),12)),Rg=0,l=new P(Ca.e);l.a0&&(Ca.j==(Ie(),Vn)?(e.a[Ca.p]=mA,++mA):(e.a[Ca.p]=mA+nd+n6,++n6))}mA+=n6}for($g=new wt,A=new Fh,lt=n,Es=0,s5=lt.length;Esh.b&&(h.b=Bg)):Ca.i.c==Qm&&(Bgh.c&&(h.c=Bg));for(G9(O,0,O.length,null),i6=le($t,ni,30,O.length,15,1),i=le($t,ni,30,mA+1,15,1),B=0;B0;)De%2>0&&(r+=Yce[De+1]),De=(De-1)/2|0,++Yce[De];for(cn=le(jon,Nn,370,O.length*2,0,1),te=0;te0&>(Es.f),ke(B,oG)!=null&&(!B.a&&(B.a=new we(Ft,B,10,11)),!!B.a)&&(!B.a&&(B.a=new we(Ft,B,10,11)),B.a).i>0?(l=u(ke(B,oG),521),Rg=l.Sg(B),vw(B,k.Math.max(B.g,Rg.a+nd.b+nd.c),k.Math.max(B.f,Rg.b+nd.d+nd.a))):(!B.a&&(B.a=new we(Ft,B,10,11)),B.a).i!=0&&(Rg=new Ee(ne(re(ke(B,zm))),ne(re(ke(B,zm)))/ne(re(ke(B,F7)))),vw(B,k.Math.max(B.g,Rg.a+nd.b+nd.c),k.Math.max(B.f,Rg.b+nd.d+nd.a)));if(ta=u(ke(n,s1),104),S=n.g-(ta.b+ta.c),y=n.f-(ta.d+ta.a),zg.ah("Available Child Area: ("+S+"|"+y+")"),Ei(n,B7,S/y),DJe(n,r,i.dh(s5)),u(ke(n,Ky),281)==gG&&(sZ(n),vw(n,ta.b+ne(re(ke(n,Pm)))+ta.c,ta.d+ne(re(ke(n,Lm)))+ta.a)),zg.ah("Executed layout algorithm: "+Pt(ke(n,qy))+" on node "+n.k),u(ke(n,Ky),281)==Hm){if(S<0||y<0)throw R(new md("The size defined by the parent parallel node is too small for the space provided by the paddings of the child hierarchical node. "+n.k));for(ba(n,Pm)||ba(n,Lm)||sZ(n),O=ne(re(ke(n,Pm))),A=ne(re(ke(n,Lm))),zg.ah("Desired Child Area: ("+O+"|"+A+")"),n6=S/O,wA=y/A,Zl=k.Math.min(n6,k.Math.min(wA,ne(re(ke(n,Bfn))))),Ei(n,uG,Zl),zg.ah(n.k+" -- Local Scale Factor (X|Y): ("+n6+"|"+wA+")"),te=u(ke(n,DI),22),c=0,o=0,Zl'?":bn(gZe,e)?"'(?<' or '(? toIndex: ",Yge=", toIndex: ",Qge="Index: ",Wge=", Size: ",J8="org.eclipse.elk.alg.common",Yt={51:1},_Ye="org.eclipse.elk.alg.common.compaction",LYe="Scanline/EventHandler",t1="org.eclipse.elk.alg.common.compaction.oned",PYe="CNode belongs to another CGroup.",$Ye="ISpacingsHandler/1",UZ="The ",XZ=" instance has been finished already.",RYe="The direction ",BYe=" is not supported by the CGraph instance.",zYe="OneDimensionalCompactor",FYe="OneDimensionalCompactor/lambda$0$Type",JYe="Quadruplet",HYe="ScanlineConstraintCalculator",GYe="ScanlineConstraintCalculator/ConstraintsScanlineHandler",qYe="ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type",UYe="ScanlineConstraintCalculator/Timestamp",XYe="ScanlineConstraintCalculator/lambda$0$Type",Sh={178:1,48:1},vS="org.eclipse.elk.alg.common.networksimplex",ma={171:1,3:1,4:1},KYe="org.eclipse.elk.alg.common.nodespacing",dg="org.eclipse.elk.alg.common.nodespacing.cellsystem",H8="CENTER",VYe={216:1,337:1},Zge={3:1,4:1,5:1,592:1},by="LEFT",gy="RIGHT",ewe="Vertical alignment cannot be null",nwe="BOTTOM",sF="org.eclipse.elk.alg.common.nodespacing.internal",yS="UNDEFINED",qa=.01,jN="org.eclipse.elk.alg.common.nodespacing.internal.algorithm",YYe="LabelPlacer/lambda$0$Type",QYe="LabelPlacer/lambda$1$Type",WYe="portRatioOrPosition",G8="org.eclipse.elk.alg.common.overlaps",KZ="DOWN",wy="org.eclipse.elk.alg.common.spore",um={3:1,4:1,5:1,198:1},ZYe={3:1,6:1,4:1,5:1,90:1,110:1},VZ="org.eclipse.elk.alg.force",twe="ComponentsProcessor",eQe="ComponentsProcessor/1",iwe="ElkGraphImporter/lambda$0$Type",ep={214:1},y3="org.eclipse.elk.core",EN="org.eclipse.elk.graph.properties",nQe="IPropertyHolder",SN="org.eclipse.elk.alg.force.graph",tQe="Component Layout",rwe="org.eclipse.elk.alg.force.model",yu="org.eclipse.elk.core.data",lF="org.eclipse.elk.force.model",cwe="org.eclipse.elk.force.iterations",uwe="org.eclipse.elk.force.repulsivePower",YZ="org.eclipse.elk.force.temperature",xh=.001,QZ="org.eclipse.elk.force.repulsion",Ua={148:1},kS="org.eclipse.elk.alg.force.options",q8=1.600000023841858,$o="org.eclipse.elk.force",xN="org.eclipse.elk.priority",om="org.eclipse.elk.spacing.nodeNode",WZ="org.eclipse.elk.spacing.edgeLabel",U8="org.eclipse.elk.aspectRatio",fF="org.eclipse.elk.randomSeed",jS="org.eclipse.elk.separateConnectedComponents",sm="org.eclipse.elk.padding",ES="org.eclipse.elk.interactive",ZZ="org.eclipse.elk.portConstraints",aF="org.eclipse.elk.edgeLabels.inline",SS="org.eclipse.elk.omitNodeMicroLayout",X8="org.eclipse.elk.nodeSize.fixedGraphSize",py="org.eclipse.elk.nodeSize.options",k3="org.eclipse.elk.nodeSize.constraints",K8="org.eclipse.elk.nodeLabels.placement",V8="org.eclipse.elk.portLabels.placement",AN="org.eclipse.elk.topdownLayout",MN="org.eclipse.elk.topdown.scaleFactor",CN="org.eclipse.elk.topdown.hierarchicalNodeWidth",TN="org.eclipse.elk.topdown.hierarchicalNodeAspectRatio",np="org.eclipse.elk.topdown.nodeType",owe="origin",iQe="random",rQe="boundingBox.upLeft",cQe="boundingBox.lowRight",swe="org.eclipse.elk.stress.fixed",lwe="org.eclipse.elk.stress.desiredEdgeLength",fwe="org.eclipse.elk.stress.dimension",awe="org.eclipse.elk.stress.epsilon",hwe="org.eclipse.elk.stress.iterationLimit",W0="org.eclipse.elk.stress",uQe="ELK Stress",my="org.eclipse.elk.nodeSize.minimum",hF="org.eclipse.elk.alg.force.stress",oQe="Layered layout",vy="org.eclipse.elk.alg.layered",ON="org.eclipse.elk.alg.layered.compaction.components",xS="org.eclipse.elk.alg.layered.compaction.oned",dF="org.eclipse.elk.alg.layered.compaction.oned.algs",bg="org.eclipse.elk.alg.layered.compaction.recthull",Xa="org.eclipse.elk.alg.layered.components",va="NONE",eee="MODEL_ORDER",qu={3:1,6:1,4:1,10:1,5:1,126:1},sQe={3:1,6:1,4:1,5:1,135:1,90:1,110:1},bF="org.eclipse.elk.alg.layered.compound",Mi={43:1},Zu="org.eclipse.elk.alg.layered.graph",nee=" -> ",lQe="Not supported by LGraph",dwe="Port side is undefined",Y8={3:1,6:1,4:1,5:1,323:1,135:1,90:1,110:1},Fd={3:1,6:1,4:1,5:1,135:1,199:1,209:1,90:1,110:1},fQe={3:1,6:1,4:1,5:1,135:1,2004:1,209:1,90:1,110:1},aQe=`([{"' \r `,hQe=`)]}"' \r -`,dQe="The given string contains parts that cannot be parsed as numbers.",NN="org.eclipse.elk.core.math",bQe={3:1,4:1,140:1,213:1,414:1},gQe={3:1,4:1,104:1,213:1,414:1},Jd="org.eclipse.elk.alg.layered.graph.transform",wQe="ElkGraphImporter",pQe="ElkGraphImporter/lambda$1$Type",mQe="ElkGraphImporter/lambda$2$Type",vQe="ElkGraphImporter/lambda$4$Type",Wn="org.eclipse.elk.alg.layered.intermediate",yQe="Node margin calculation",kQe="ONE_SIDED_GREEDY_SWITCH",jQe="TWO_SIDED_GREEDY_SWITCH",tee="No implementation is available for the layout processor ",iee="IntermediateProcessorStrategy",ree="Node '",EQe="FIRST_SEPARATE",SQe="LAST_SEPARATE",xQe="Odd port side processing",lr="org.eclipse.elk.alg.layered.intermediate.compaction",AS="org.eclipse.elk.alg.layered.intermediate.greedyswitch",i1="org.eclipse.elk.alg.layered.p3order.counting",MS={220:1},yy="org.eclipse.elk.alg.layered.intermediate.loops",bl="org.eclipse.elk.alg.layered.intermediate.loops.ordering",Z0="org.eclipse.elk.alg.layered.intermediate.loops.routing",gF="org.eclipse.elk.alg.layered.intermediate.preserveorder",Ah="org.eclipse.elk.alg.layered.intermediate.wrapping",Tu="org.eclipse.elk.alg.layered.options",cee="INTERACTIVE",bwe="GREEDY",AQe="DEPTH_FIRST",MQe="EDGE_LENGTH",CQe="SELF_LOOPS",TQe="firstTryWithInitialOrder",gwe="org.eclipse.elk.layered.directionCongruency",wwe="org.eclipse.elk.layered.feedbackEdges",wF="org.eclipse.elk.layered.interactiveReferencePoint",pwe="org.eclipse.elk.layered.mergeEdges",mwe="org.eclipse.elk.layered.mergeHierarchyEdges",vwe="org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides",ywe="org.eclipse.elk.layered.portSortingStrategy",kwe="org.eclipse.elk.layered.thoroughness",jwe="org.eclipse.elk.layered.unnecessaryBendpoints",Ewe="org.eclipse.elk.layered.generatePositionAndLayerIds",IN="org.eclipse.elk.layered.cycleBreaking.strategy",DN="org.eclipse.elk.layered.layering.strategy",Swe="org.eclipse.elk.layered.layering.layerConstraint",xwe="org.eclipse.elk.layered.layering.layerChoiceConstraint",Awe="org.eclipse.elk.layered.layering.layerId",uee="org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth",oee="org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor",see="org.eclipse.elk.layered.layering.nodePromotion.strategy",lee="org.eclipse.elk.layered.layering.nodePromotion.maxIterations",fee="org.eclipse.elk.layered.layering.coffmanGraham.layerBound",CS="org.eclipse.elk.layered.crossingMinimization.strategy",Mwe="org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder",aee="org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness",hee="org.eclipse.elk.layered.crossingMinimization.semiInteractive",Cwe="org.eclipse.elk.layered.crossingMinimization.inLayerPredOf",Twe="org.eclipse.elk.layered.crossingMinimization.inLayerSuccOf",Owe="org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint",Nwe="org.eclipse.elk.layered.crossingMinimization.positionId",Iwe="org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold",dee="org.eclipse.elk.layered.crossingMinimization.greedySwitch.type",pF="org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type",j3="org.eclipse.elk.layered.nodePlacement.strategy",mF="org.eclipse.elk.layered.nodePlacement.favorStraightEdges",bee="org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening",gee="org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment",wee="org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening",pee="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility",mee="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default",Dwe="org.eclipse.elk.layered.edgeRouting.selfLoopDistribution",_we="org.eclipse.elk.layered.edgeRouting.selfLoopOrdering",vF="org.eclipse.elk.layered.edgeRouting.splines.mode",yF="org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor",vee="org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth",Lwe="org.eclipse.elk.layered.spacing.baseValue",Pwe="org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers",$we="org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers",Rwe="org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers",Bwe="org.eclipse.elk.layered.priority.direction",zwe="org.eclipse.elk.layered.priority.shortness",Fwe="org.eclipse.elk.layered.priority.straightness",yee="org.eclipse.elk.layered.compaction.connectedComponents",Jwe="org.eclipse.elk.layered.compaction.postCompaction.strategy",Hwe="org.eclipse.elk.layered.compaction.postCompaction.constraints",kF="org.eclipse.elk.layered.highDegreeNodes.treatment",kee="org.eclipse.elk.layered.highDegreeNodes.threshold",jee="org.eclipse.elk.layered.highDegreeNodes.treeHeight",q1="org.eclipse.elk.layered.wrapping.strategy",jF="org.eclipse.elk.layered.wrapping.additionalEdgeSpacing",EF="org.eclipse.elk.layered.wrapping.correctionFactor",TS="org.eclipse.elk.layered.wrapping.cutting.strategy",Eee="org.eclipse.elk.layered.wrapping.cutting.cuts",See="org.eclipse.elk.layered.wrapping.cutting.msd.freedom",SF="org.eclipse.elk.layered.wrapping.validify.strategy",xF="org.eclipse.elk.layered.wrapping.validify.forbiddenIndices",AF="org.eclipse.elk.layered.wrapping.multiEdge.improveCuts",MF="org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty",xee="org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges",Aee="org.eclipse.elk.layered.layerUnzipping.strategy",Mee="org.eclipse.elk.layered.layerUnzipping.minimizeEdgeLength",Cee="org.eclipse.elk.layered.layerUnzipping.layerSplit",Tee="org.eclipse.elk.layered.layerUnzipping.resetOnLongEdges",Gwe="org.eclipse.elk.layered.edgeLabels.sideSelection",qwe="org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy",CF="org.eclipse.elk.layered.considerModelOrder.strategy",Uwe="org.eclipse.elk.layered.considerModelOrder.portModelOrder",_N="org.eclipse.elk.layered.considerModelOrder.noModelOrder",Oee="org.eclipse.elk.layered.considerModelOrder.components",Xwe="org.eclipse.elk.layered.considerModelOrder.longEdgeStrategy",Nee="org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence",Iee="org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence",Dee="org.eclipse.elk.layered.considerModelOrder.groupModelOrder.cycleBreakingId",_ee="org.eclipse.elk.layered.considerModelOrder.groupModelOrder.crossingMinimizationId",Lee="org.eclipse.elk.layered.considerModelOrder.groupModelOrder.componentGroupId",Kwe="org.eclipse.elk.layered.considerModelOrder.groupModelOrder.cbGroupOrderStrategy",Pee="org.eclipse.elk.layered.considerModelOrder.groupModelOrder.cbPreferredSourceId",$ee="org.eclipse.elk.layered.considerModelOrder.groupModelOrder.cbPreferredTargetId",Vwe="org.eclipse.elk.layered.considerModelOrder.groupModelOrder.cmGroupOrderStrategy",Ywe="org.eclipse.elk.layered.considerModelOrder.groupModelOrder.cmEnforcedGroupOrders",Ree="layering",OQe="layering.minWidth",NQe="layering.nodePromotion",Q8="crossingMinimization",TF="org.eclipse.elk.hierarchyHandling",IQe="crossingMinimization.greedySwitch",DQe="nodePlacement",_Qe="nodePlacement.bk",LQe="edgeRouting",LN="org.eclipse.elk.edgeRouting",Ka="spacing",Qwe="priority",Wwe="compaction",PQe="compaction.postCompaction",$Qe="Specifies whether and how post-process compaction is applied.",Zwe="highDegreeNodes",epe="wrapping",RQe="wrapping.cutting",BQe="wrapping.validify",npe="wrapping.multiEdge",Bee="layerUnzipping",zee="edgeLabels",OS="considerModelOrder",W8="considerModelOrder.groupModelOrder",tpe="Group ID of the Node Type",ipe="org.eclipse.elk.spacing.commentComment",rpe="org.eclipse.elk.spacing.commentNode",cpe="org.eclipse.elk.spacing.componentComponent",upe="org.eclipse.elk.spacing.edgeEdge",Fee="org.eclipse.elk.spacing.edgeNode",ope="org.eclipse.elk.spacing.labelLabel",spe="org.eclipse.elk.spacing.labelPortHorizontal",lpe="org.eclipse.elk.spacing.labelPortVertical",fpe="org.eclipse.elk.spacing.labelNode",ape="org.eclipse.elk.spacing.nodeSelfLoop",hpe="org.eclipse.elk.spacing.portPort",dpe="org.eclipse.elk.spacing.individual",bpe="org.eclipse.elk.port.borderOffset",gpe="org.eclipse.elk.noLayout",wpe="org.eclipse.elk.port.side",PN="org.eclipse.elk.debugMode",ppe="org.eclipse.elk.alignment",mpe="org.eclipse.elk.insideSelfLoops.activate",vpe="org.eclipse.elk.insideSelfLoops.yo",Jee="org.eclipse.elk.direction",ype="org.eclipse.elk.nodeLabels.padding",kpe="org.eclipse.elk.portLabels.nextToPortIfPossible",jpe="org.eclipse.elk.portLabels.treatAsGroup",Epe="org.eclipse.elk.portAlignment.default",Spe="org.eclipse.elk.portAlignment.north",xpe="org.eclipse.elk.portAlignment.south",Ape="org.eclipse.elk.portAlignment.west",Mpe="org.eclipse.elk.portAlignment.east",OF="org.eclipse.elk.contentAlignment",Cpe="org.eclipse.elk.junctionPoints",Tpe="org.eclipse.elk.edge.thickness",Ope="org.eclipse.elk.edgeLabels.placement",Npe="org.eclipse.elk.port.index",Ipe="org.eclipse.elk.commentBox",Dpe="org.eclipse.elk.hypernode",_pe="org.eclipse.elk.port.anchor",Hee="org.eclipse.elk.partitioning.activate",Gee="org.eclipse.elk.partitioning.partition",NF="org.eclipse.elk.position",Lpe="org.eclipse.elk.margins",Ppe="org.eclipse.elk.spacing.portsSurrounding",IF="org.eclipse.elk.interactiveLayout",$u="org.eclipse.elk.core.util",$pe={3:1,4:1,5:1,590:1},zQe="NETWORK_SIMPLEX",Rpe="SIMPLE",oc={95:1,43:1},tp="org.eclipse.elk.alg.layered.p1cycles",FQe="Depth-first cycle removal",JQe="Model order cycle breaking",U1="org.eclipse.elk.alg.layered.p2layers",Bpe={406:1,220:1},HQe={830:1,3:1,4:1},Ro="org.eclipse.elk.alg.layered.p3order",E3=17976931348623157e292,qee=5e-324,Lc="org.eclipse.elk.alg.layered.p4nodes",GQe={3:1,4:1,5:1,838:1},Mh=1e-5,eb="org.eclipse.elk.alg.layered.p4nodes.bk",Uee="org.eclipse.elk.alg.layered.p5edges",ya="org.eclipse.elk.alg.layered.p5edges.orthogonal",Xee="org.eclipse.elk.alg.layered.p5edges.orthogonal.direction",Kee=1e-6,lm="org.eclipse.elk.alg.layered.p5edges.splines",Vee=.09999999999999998,DF=1e-8,qQe=4.71238898038469,UQe=1.5707963267948966,zpe=3.141592653589793,X1="org.eclipse.elk.alg.mrtree",Yee=.10000000149011612,_F="SUPER_ROOT",NS="org.eclipse.elk.alg.mrtree.graph",Fpe=-17976931348623157e292,go="org.eclipse.elk.alg.mrtree.intermediate",XQe="Processor compute fanout",LF={3:1,6:1,4:1,5:1,522:1,90:1,110:1},KQe="Set neighbors in level",$N="org.eclipse.elk.alg.mrtree.options",VQe="DESCENDANTS",Jpe="org.eclipse.elk.mrtree.compaction",Hpe="org.eclipse.elk.mrtree.edgeEndTextureLength",Gpe="org.eclipse.elk.mrtree.treeLevel",qpe="org.eclipse.elk.mrtree.positionConstraint",Upe="org.eclipse.elk.mrtree.weighting",Xpe="org.eclipse.elk.mrtree.edgeRoutingMode",Kpe="org.eclipse.elk.mrtree.searchOrder",YQe="Position Constraint",Bo="org.eclipse.elk.mrtree",QQe="org.eclipse.elk.tree",WQe="Processor arrange level",Z8="org.eclipse.elk.alg.mrtree.p2order",Qs="org.eclipse.elk.alg.mrtree.p4route",Vpe="org.eclipse.elk.alg.radial",gg=6.283185307179586,Ype="Before",PF="After",Qpe="org.eclipse.elk.alg.radial.intermediate",ZQe="COMPACTION",Qee="org.eclipse.elk.alg.radial.intermediate.compaction",eWe={3:1,4:1,5:1,90:1},Wpe="org.eclipse.elk.alg.radial.intermediate.optimization",Wee="No implementation is available for the layout option ",IS="org.eclipse.elk.alg.radial.options",nWe="CompactionStrategy",Zpe="org.eclipse.elk.radial.centerOnRoot",e2e="org.eclipse.elk.radial.orderId",n2e="org.eclipse.elk.radial.radius",$F="org.eclipse.elk.radial.rotate",Zee="org.eclipse.elk.radial.compactor",ene="org.eclipse.elk.radial.compactionStepSize",t2e="org.eclipse.elk.radial.sorter",i2e="org.eclipse.elk.radial.wedgeCriteria",r2e="org.eclipse.elk.radial.optimizationCriteria",nne="org.eclipse.elk.radial.rotation.targetAngle",tne="org.eclipse.elk.radial.rotation.computeAdditionalWedgeSpace",c2e="org.eclipse.elk.radial.rotation.outgoingEdgeAngles",tWe="Compaction",u2e="rotation",Gl="org.eclipse.elk.radial",iWe="org.eclipse.elk.alg.radial.p1position.wedge",o2e="org.eclipse.elk.alg.radial.sorting",rWe=5.497787143782138,cWe=3.9269908169872414,uWe=2.356194490192345,oWe="org.eclipse.elk.alg.rectpacking",DS="org.eclipse.elk.alg.rectpacking.intermediate",ine="org.eclipse.elk.alg.rectpacking.options",s2e="org.eclipse.elk.rectpacking.trybox",l2e="org.eclipse.elk.rectpacking.currentPosition",f2e="org.eclipse.elk.rectpacking.desiredPosition",a2e="org.eclipse.elk.rectpacking.inNewRow",h2e="org.eclipse.elk.rectpacking.orderBySize",d2e="org.eclipse.elk.rectpacking.widthApproximation.strategy",b2e="org.eclipse.elk.rectpacking.widthApproximation.targetWidth",g2e="org.eclipse.elk.rectpacking.widthApproximation.optimizationGoal",w2e="org.eclipse.elk.rectpacking.widthApproximation.lastPlaceShift",p2e="org.eclipse.elk.rectpacking.packing.strategy",m2e="org.eclipse.elk.rectpacking.packing.compaction.rowHeightReevaluation",v2e="org.eclipse.elk.rectpacking.packing.compaction.iterations",y2e="org.eclipse.elk.rectpacking.whiteSpaceElimination.strategy",rne="widthApproximation",sWe="Compaction Strategy",lWe="packing.compaction",ms="org.eclipse.elk.rectpacking",e7="org.eclipse.elk.alg.rectpacking.p1widthapproximation",RF="org.eclipse.elk.alg.rectpacking.p2packing",fWe="No Compaction",k2e="org.eclipse.elk.alg.rectpacking.p3whitespaceelimination",RN="org.eclipse.elk.alg.rectpacking.util",BF="No implementation available for ",fm="org.eclipse.elk.alg.spore",am="org.eclipse.elk.alg.spore.options",ip="org.eclipse.elk.sporeCompaction",cne="org.eclipse.elk.underlyingLayoutAlgorithm",j2e="org.eclipse.elk.processingOrder.treeConstruction",E2e="org.eclipse.elk.processingOrder.spanningTreeCostFunction",une="org.eclipse.elk.processingOrder.preferredRoot",one="org.eclipse.elk.processingOrder.rootSelection",sne="org.eclipse.elk.structure.structureExtractionStrategy",S2e="org.eclipse.elk.compaction.compactionStrategy",x2e="org.eclipse.elk.compaction.orthogonal",A2e="org.eclipse.elk.overlapRemoval.maxIterations",M2e="org.eclipse.elk.overlapRemoval.runScanline",lne="processingOrder",aWe="overlapRemoval",n7="org.eclipse.elk.sporeOverlap",hWe="org.eclipse.elk.alg.spore.p1structure",fne="org.eclipse.elk.alg.spore.p2processingorder",ane="org.eclipse.elk.alg.spore.p3execution",dWe="Topdown Layout",bWe="Invalid index: ",t7="org.eclipse.elk.core.alg",S3={342:1},hm={296:1},gWe="Make sure its type is registered with the ",C2e=" utility class.",i7="true",hne="false",wWe="Couldn't clone property '",rp=.05,Oo="org.eclipse.elk.core.options",pWe=1.2999999523162842,cp="org.eclipse.elk.box",T2e="org.eclipse.elk.expandNodes",O2e="org.eclipse.elk.box.packingMode",mWe="org.eclipse.elk.algorithm",vWe="org.eclipse.elk.resolvedAlgorithm",N2e="org.eclipse.elk.bendPoints",EBn="org.eclipse.elk.labelManager",yWe="org.eclipse.elk.softwrappingFuzziness",kWe="org.eclipse.elk.scaleFactor",jWe="org.eclipse.elk.childAreaWidth",EWe="org.eclipse.elk.childAreaHeight",SWe="org.eclipse.elk.animate",xWe="org.eclipse.elk.animTimeFactor",AWe="org.eclipse.elk.layoutAncestors",MWe="org.eclipse.elk.maxAnimTime",CWe="org.eclipse.elk.minAnimTime",TWe="org.eclipse.elk.progressBar",OWe="org.eclipse.elk.validateGraph",NWe="org.eclipse.elk.validateOptions",IWe="org.eclipse.elk.zoomToFit",DWe="org.eclipse.elk.json.shapeCoords",_We="org.eclipse.elk.json.edgeCoords",SBn="org.eclipse.elk.font.name",LWe="org.eclipse.elk.font.size",dne="org.eclipse.elk.topdown.sizeCategories",I2e="org.eclipse.elk.topdown.sizeCategoriesHierarchicalNodeWeight",bne="org.eclipse.elk.topdown.sizeApproximator",D2e="org.eclipse.elk.topdown.scaleCap",PWe="org.eclipse.elk.edge.type",$We="partitioning",RWe="nodeLabels",zF="portAlignment",gne="nodeSize",wne="port",_2e="portLabels",r7="topdown",BWe="insideSelfLoops",L2e="INHERIT",c7="org.eclipse.elk.fixed",FF="org.eclipse.elk.random",JF={3:1,35:1,23:1,521:1,288:1},zWe="port must have a parent node to calculate the port side",FWe="The edge needs to have exactly one edge section. Found: ",_S="org.eclipse.elk.core.util.adapters",ql="org.eclipse.emf.ecore",x3="org.eclipse.elk.graph",JWe="EMapPropertyHolder",HWe="ElkBendPoint",GWe="ElkGraphElement",qWe="ElkConnectableShape",P2e="ElkEdge",UWe="ElkEdgeSection",XWe="EModelElement",KWe="ENamedElement",$2e="ElkLabel",R2e="ElkNode",B2e="ElkPort",VWe={94:1,93:1},ky="org.eclipse.emf.common.notify.impl",nb="The feature '",LS="' is not a valid changeable feature",YWe="Expecting null",pne="' is not a valid feature",QWe="The feature ID",WWe=" is not a valid feature ID",Ru=32768,ZWe={109:1,94:1,93:1,57:1,52:1,100:1},Jn="org.eclipse.emf.ecore.impl",wg="org.eclipse.elk.graph.impl",PS="Recursive containment not allowed for ",u7="The datatype '",up="' is not a valid classifier",mne="The value '",A3={195:1,3:1,4:1},vne="The class '",o7="http://www.eclipse.org/elk/ElkGraph",z2e="property",$S="value",yne="source",eZe="properties",nZe="identifier",kne="height",jne="width",Ene="parent",Sne="text",xne="children",tZe="hierarchical",F2e="sources",Ane="targets",Mne="sections",HF="bendPoints",J2e="outgoingShape",H2e="incomingShape",G2e="outgoingSections",q2e="incomingSections",yc="org.eclipse.emf.common.util",U2e="Severe implementation error in the Json to ElkGraph importer.",Ch="id",Wr="org.eclipse.elk.graph.json",s7="Unhandled parameter types: ",iZe="startPoint",rZe="An edge must have at least one source and one target (edge id: '",l7="').",cZe="Referenced edge section does not exist: ",uZe=" (edge id: '",X2e="target",oZe="sourcePoint",sZe="targetPoint",GF="group",ui="name",lZe="connectableShape cannot be null",fZe="edge cannot be null",aZe="Passed edge is not 'simple'.",qF="org.eclipse.elk.graph.util",BN="The 'no duplicates' constraint is violated",Cne="targetIndex=",pg=", size=",Tne="sourceIndex=",Th={3:1,4:1,20:1,31:1,56:1,18:1,16:1,59:1,71:1,67:1,61:1},One={3:1,4:1,20:1,31:1,56:1,18:1,50:1,16:1,59:1,71:1,67:1,61:1,585:1},UF="logging",hZe="measureExecutionTime",dZe="parser.parse.1",bZe="parser.parse.2",XF="parser.next.1",Nne="parser.next.2",gZe="parser.next.3",wZe="parser.next.4",mg="parser.factor.1",K2e="parser.factor.2",pZe="parser.factor.3",mZe="parser.factor.4",vZe="parser.factor.5",yZe="parser.factor.6",kZe="parser.atom.1",jZe="parser.atom.2",EZe="parser.atom.3",V2e="parser.atom.4",Ine="parser.atom.5",Y2e="parser.cc.1",KF="parser.cc.2",SZe="parser.cc.3",xZe="parser.cc.5",Q2e="parser.cc.6",W2e="parser.cc.7",Dne="parser.cc.8",AZe="parser.ope.1",MZe="parser.ope.2",CZe="parser.ope.3",Hd="parser.descape.1",TZe="parser.descape.2",OZe="parser.descape.3",NZe="parser.descape.4",IZe="parser.descape.5",Ul="parser.process.1",DZe="parser.quantifier.1",_Ze="parser.quantifier.2",LZe="parser.quantifier.3",PZe="parser.quantifier.4",Z2e="parser.quantifier.5",$Ze="org.eclipse.emf.common.notify",eme={415:1,676:1},RZe={3:1,4:1,20:1,31:1,56:1,18:1,16:1,71:1,61:1},zN={373:1,151:1},RS="index=",_ne={3:1,4:1,5:1,129:1},BZe={3:1,4:1,20:1,31:1,56:1,18:1,16:1,59:1,71:1,61:1},nme={3:1,6:1,4:1,5:1,198:1},zZe={3:1,4:1,5:1,175:1,374:1},Gf=1024,FZe=";/?:@&=+$,",JZe="invalid authority: ",HZe="EAnnotation",GZe="ETypedElement",qZe="EStructuralFeature",UZe="EAttribute",XZe="EClassifier",KZe="EEnumLiteral",VZe="EGenericType",YZe="EOperation",QZe="EParameter",WZe="EReference",ZZe="ETypeParameter",Ri="org.eclipse.emf.ecore.util",Lne={77:1},tme={3:1,20:1,18:1,16:1,61:1,586:1,77:1,72:1,98:1},een="org.eclipse.emf.ecore.util.FeatureMap$Entry",as=8192,BS="byte",VF="char",zS="double",FS="float",JS="int",HS="long",GS="short",nen="java.lang.Object",M3={3:1,4:1,5:1,255:1},ime={3:1,4:1,5:1,678:1},ten={3:1,4:1,20:1,31:1,56:1,18:1,16:1,59:1,71:1,67:1,61:1,72:1},au={3:1,4:1,20:1,31:1,56:1,18:1,16:1,59:1,71:1,67:1,61:1,77:1,72:1,98:1},FN="mixed",Ut="http:///org/eclipse/emf/ecore/util/ExtendedMetaData",af="kind",ien={3:1,4:1,5:1,679:1},rme={3:1,4:1,20:1,31:1,56:1,18:1,16:1,71:1,61:1,77:1,72:1,98:1},YF={20:1,31:1,56:1,18:1,16:1,61:1,72:1},QF={50:1,128:1,287:1},WF={75:1,344:1},ZF="The value of type '",eJ="' must be of type '",C3=1306,hf="http://www.eclipse.org/emf/2002/Ecore",nJ=-32768,op="constraints",sc="baseType",ren="getEStructuralFeature",cen="getFeatureID",qS="feature",uen="getOperationID",cme="operation",oen="defaultValue",sen="eTypeParameters",len="isInstance",fen="getEEnumLiteral",aen="eContainingClass",ii={58:1},hen={3:1,4:1,5:1,122:1},den="org.eclipse.emf.ecore.resource",ben={94:1,93:1,588:1,1996:1},Pne="org.eclipse.emf.ecore.resource.impl",ume="unspecified",JN="simple",tJ="attribute",gen="attributeWildcard",iJ="element",$ne="elementWildcard",ka="collapse",Rne="itemType",rJ="namespace",HN="##targetNamespace",df="whiteSpace",ome="wildcards",vg="http://www.eclipse.org/emf/2003/XMLType",Bne="##any",f7="uninitialized",GN="The multiplicity constraint is violated",cJ="org.eclipse.emf.ecore.xml.type",wen="ProcessingInstruction",pen="SimpleAnyType",men="XMLTypeDocumentRoot",kr="org.eclipse.emf.ecore.xml.type.impl",qN="INF",ven="processing",yen="ENTITIES_._base",sme="minLength",lme="ENTITY",uJ="NCName",ken="IDREFS_._base",fme="integer",zne="token",Fne="pattern",jen="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*",ame="\\i\\c*",Een="[\\i-[:]][\\c-[:]]*",Sen="nonPositiveInteger",UN="maxInclusive",hme="NMTOKEN",xen="NMTOKENS_._base",dme="nonNegativeInteger",XN="minInclusive",Aen="normalizedString",Men="unsignedByte",Cen="unsignedInt",Ten="18446744073709551615",Oen="unsignedShort",Nen="processingInstruction",Gd="org.eclipse.emf.ecore.xml.type.internal",a7=1114111,Ien="Internal Error: shorthands: \\u",US="xml:isDigit",Jne="xml:isWord",Hne="xml:isSpace",Gne="xml:isNameChar",qne="xml:isInitialNameChar",Den="09٠٩۰۹०९০৯੦੯૦૯୦୯௧௯౦౯೦೯൦൯๐๙໐໙༠༩",_en="AZazÀÖØöøıĴľŁňŊžƀǃǍǰǴǵǺȗɐʨʻˁΆΆΈΊΌΌΎΡΣώϐϖϚϚϜϜϞϞϠϠϢϳЁЌЎяёќўҁҐӄӇӈӋӌӐӫӮӵӸӹԱՖՙՙաֆאתװײءغفيٱڷںھۀێېۓەەۥۦअहऽऽक़ॡঅঌএঐওনপরললশহড়ঢ়য়ৡৰৱਅਊਏਐਓਨਪਰਲਲ਼ਵਸ਼ਸਹਖ਼ੜਫ਼ਫ਼ੲੴઅઋઍઍએઑઓનપરલળવહઽઽૠૠଅଌଏଐଓନପରଲଳଶହଽଽଡ଼ଢ଼ୟୡஅஊஎஐஒகஙசஜஜஞடணதநபமவஷஹఅఌఎఐఒనపళవహౠౡಅಌಎಐಒನಪಳವಹೞೞೠೡഅഌഎഐഒനപഹൠൡกฮะะาำเๅກຂຄຄງຈຊຊຍຍດທນຟມຣລລວວສຫອຮະະາຳຽຽເໄཀཇཉཀྵႠჅაჶᄀᄀᄂᄃᄅᄇᄉᄉᄋᄌᄎᄒᄼᄼᄾᄾᅀᅀᅌᅌᅎᅎᅐᅐᅔᅕᅙᅙᅟᅡᅣᅣᅥᅥᅧᅧᅩᅩᅭᅮᅲᅳᅵᅵᆞᆞᆨᆨᆫᆫᆮᆯᆷᆸᆺᆺᆼᇂᇫᇫᇰᇰᇹᇹḀẛẠỹἀἕἘἝἠὅὈὍὐὗὙὙὛὛὝὝὟώᾀᾴᾶᾼιιῂῄῆῌῐΐῖΊῠῬῲῴῶῼΩΩKÅ℮℮ↀↂ〇〇〡〩ぁゔァヺㄅㄬ一龥가힣",Len="Private Use",Une="ASSIGNED",Xne="\0€ÿĀſƀɏɐʯʰ˿̀ͯͰϿЀӿ԰֏֐׿؀ۿ܀ݏހ޿ऀॿঀ৿਀੿઀૿଀୿஀௿ఀ౿ಀ೿ഀൿ඀෿฀๿຀໿ༀ࿿က႟Ⴀჿᄀᇿሀ፿Ꭰ᏿᐀ᙿ ᚟ᚠ᛿ក៿᠀᢯Ḁỿἀ῿ ⁰₟₠⃏⃐⃿℀⅏⅐↏←⇿∀⋿⌀⏿␀␿⑀⑟①⓿─╿▀▟■◿☀⛿✀➿⠀⣿⺀⻿⼀⿟⿰⿿ 〿぀ゟ゠ヿ㄀ㄯ㄰㆏㆐㆟ㆠㆿ㈀㋿㌀㏿㐀䶵一鿿ꀀ꒏꒐꓏가힣豈﫿ffﭏﭐ﷿︠︯︰﹏﹐﹯ﹰ﻾\uFEFF\uFEFF＀￯",bme="UNASSIGNED",h7={3:1,121:1},Pen="org.eclipse.emf.ecore.xml.type.util",oJ={3:1,4:1,5:1,376:1},gme="org.eclipse.xtext.xbase.lib",$en="Cannot add elements to a Range",Ren="Cannot set elements in a Range",Ben="Cannot remove elements from a Range",zen="user.agent",s,sJ,Kne;k.goog=k.goog||{},k.goog.global=k.goog.global||k,sJ={},m(1,null,{},U),s.Fb=function(n){return gTe(this,n)},s.Gb=function(){return this.Pm},s.Hb=function(){return jw(this)},s.Ib=function(){var n;return Pb(Us(this))+"@"+(n=Ni(this)>>>0,n.toString(16))},s.equals=function(e){return this.Fb(e)},s.hashCode=function(){return this.Hb()},s.toString=function(){return this.Ib()};var Fen,Jen,Hen;m(298,1,{298:1,2086:1},g1e),s.te=function(n){var t;return t=new g1e,t.i=4,n>1?t.c=G_e(this,n-1):t.c=this,t},s.ue=function(){return M1(this),this.b},s.ve=function(){return Pb(this)},s.we=function(){return M1(this),this.k},s.xe=function(){return(this.i&4)!=0},s.ye=function(){return(this.i&1)!=0},s.Ib=function(){return xhe(this)},s.i=0;var Mr=v(Cu,"Object",1),wme=v(Cu,"Class",298);m(2058,1,aN),v(hN,"Optional",2058),m(1160,2058,aN,G),s.Fb=function(n){return n===this},s.Hb=function(){return 2040732332},s.Ib=function(){return"Optional.absent()"},s.Jb=function(n){return Nt(n),vj(),Vne};var Vne;v(hN,"Absent",1160),m(627,1,{},IX),v(hN,"Joiner",627);var xBn=Gi(hN,"Predicate");m(577,1,{178:1,577:1,3:1,48:1},DC),s.Mb=function(n){return Hze(this,n)},s.Lb=function(n){return Hze(this,n)},s.Fb=function(n){var t;return X(n,577)?(t=u(n,577),abe(this.a,t.a)):!1},s.Hb=function(){return y1e(this.a)+306654252},s.Ib=function(){return xCn(this.a)},v(hN,"Predicates/AndPredicate",577),m(411,2058,{411:1,3:1},e9),s.Fb=function(n){var t;return X(n,411)?(t=u(n,411),gi(this.a,t.a)):!1},s.Hb=function(){return 1502476572+Ni(this.a)},s.Ib=function(){return lYe+this.a+")"},s.Jb=function(n){return new e9(NR(n.Kb(this.a),"the Function passed to Optional.transform() must not return null."))},v(hN,"Present",411),m(204,1,L8),s.Nb=function(n){Zr(this,n)},s.Qb=function(){cAe()},v(hn,"UnmodifiableIterator",204),m(2038,204,P8),s.Qb=function(){cAe()},s.Rb=function(n){throw R(new _t)},s.Wb=function(n){throw R(new _t)},v(hn,"UnmodifiableListIterator",2038),m(392,2038,P8),s.Ob=function(){return this.b0},s.Pb=function(){if(this.b>=this.c)throw R(new hu);return this.Xb(this.b++)},s.Tb=function(){return this.b},s.Ub=function(){if(this.b<=0)throw R(new hu);return this.Xb(--this.b)},s.Vb=function(){return this.b-1},s.b=0,s.c=0,v(hn,"AbstractIndexedListIterator",392),m(702,204,L8),s.Ob=function(){return PY(this)},s.Pb=function(){return vhe(this)},s.e=1,v(hn,"AbstractIterator",702),m(2046,1,{229:1}),s.Zb=function(){var n;return n=this.f,n||(this.f=this.ac())},s.Fb=function(n){return rQ(this,n)},s.Hb=function(){return Ni(this.Zb())},s.dc=function(){return this.gc()==0},s.ec=function(){return T4(this)},s.Ib=function(){return fu(this.Zb())},v(hn,"AbstractMultimap",2046),m(730,2046,ag),s.$b=function(){yB(this)},s._b=function(n){return jAe(this,n)},s.ac=function(){return new p9(this,this.c)},s.ic=function(n){return this.hc()},s.bc=function(){return new Hv(this,this.c)},s.jc=function(){return this.mc(this.hc())},s.kc=function(){return new Gxe(this)},s.lc=function(){return aW(this.c.vc().Lc(),new Z,64,this.d)},s.cc=function(n){return vi(this,n)},s.fc=function(n){return AO(this,n)},s.gc=function(){return this.d},s.mc=function(n){return En(),new Hr(n)},s.nc=function(){return new Hxe(this)},s.oc=function(){return aW(this.c.Bc().Lc(),new ie,64,this.d)},s.pc=function(n,t){return new nB(this,n,t,null)},s.d=0,v(hn,"AbstractMapBasedMultimap",730),m(1661,730,ag),s.hc=function(){return new xo(this.a)},s.jc=function(){return En(),En(),Sc},s.cc=function(n){return u(vi(this,n),16)},s.fc=function(n){return u(AO(this,n),16)},s.Zb=function(){return L4(this)},s.Fb=function(n){return rQ(this,n)},s.qc=function(n){return u(vi(this,n),16)},s.rc=function(n){return u(AO(this,n),16)},s.mc=function(n){return IR(u(n,16))},s.pc=function(n,t){return ZLe(this,n,u(t,16),null)},v(hn,"AbstractListMultimap",1661),m(736,1,Fr),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return this.c.Ob()||this.e.Ob()},s.Pb=function(){var n;return this.e.Ob()||(n=u(this.c.Pb(),45),this.b=n.jd(),this.a=u(n.kd(),18),this.e=this.a.Jc()),this.sc(this.b,this.e.Pb())},s.Qb=function(){this.e.Qb(),u(uf(this.a),18).dc()&&this.c.Qb(),--this.d.d},v(hn,"AbstractMapBasedMultimap/Itr",736),m(1098,736,Fr,Hxe),s.sc=function(n,t){return t},v(hn,"AbstractMapBasedMultimap/1",1098),m(1099,1,{},ie),s.Kb=function(n){return u(n,18).Lc()},v(hn,"AbstractMapBasedMultimap/1methodref$spliterator$Type",1099),m(1100,736,Fr,Gxe),s.sc=function(n,t){return new pw(n,t)},v(hn,"AbstractMapBasedMultimap/2",1100);var pme=Gi(pt,"Map");m(2027,1,Ww),s.wc=function(n){wO(this,n)},s.$b=function(){this.vc().$b()},s.tc=function(n){return XQ(this,n)},s._b=function(n){return!!l0e(this,n,!1)},s.uc=function(n){var t,i,r;for(i=this.vc().Jc();i.Ob();)if(t=u(i.Pb(),45),r=t.kd(),ue(n)===ue(r)||n!=null&&gi(n,r))return!0;return!1},s.Fb=function(n){var t,i,r;if(n===this)return!0;if(!X(n,92)||(r=u(n,92),this.gc()!=r.gc()))return!1;for(i=r.vc().Jc();i.Ob();)if(t=u(i.Pb(),45),!this.tc(t))return!1;return!0},s.xc=function(n){return bu(l0e(this,n,!1))},s.Hb=function(){return a1e(this.vc())},s.dc=function(){return this.gc()==0},s.ec=function(){return new it(this)},s.yc=function(n,t){throw R(new pd("Put not supported on this map"))},s.zc=function(n){AE(this,n)},s.Ac=function(n){return bu(l0e(this,n,!0))},s.gc=function(){return this.vc().gc()},s.Ib=function(){return sGe(this)},s.Bc=function(){return new ot(this)},v(pt,"AbstractMap",2027),m(2047,2027,Ww),s.bc=function(){return new QP(this)},s.vc=function(){return FIe(this)},s.ec=function(){var n;return n=this.g,n||(this.g=this.bc())},s.Bc=function(){var n;return n=this.i,n||(this.i=new dMe(this))},v(hn,"Maps/ViewCachingAbstractMap",2047),m(395,2047,Ww,p9),s.xc=function(n){return k8n(this,n)},s.Ac=function(n){return Ikn(this,n)},s.$b=function(){this.d==this.e.c?this.e.$b():sR(new yfe(this))},s._b=function(n){return kFe(this.d,n)},s.Dc=function(){return new gP(this)},s.Cc=function(){return this.Dc()},s.Fb=function(n){return this===n||gi(this.d,n)},s.Hb=function(){return Ni(this.d)},s.ec=function(){return this.e.ec()},s.gc=function(){return this.d.gc()},s.Ib=function(){return fu(this.d)},v(hn,"AbstractMapBasedMultimap/AsMap",395);var Xl=Gi(Cu,"Iterable");m(31,1,im),s.Ic=function(n){cc(this,n)},s.Lc=function(){return new vn(this,0)},s.Mc=function(){return new mn(null,this.Lc())},s.Ec=function(n){throw R(new pd("Add not supported on this collection"))},s.Fc=function(n){return ac(this,n)},s.$b=function(){rae(this)},s.Gc=function(n){return H2(this,n,!1)},s.Hc=function(n){return jO(this,n)},s.dc=function(){return this.gc()==0},s.Kc=function(n){return H2(this,n,!0)},s.Nc=function(){return Ofe(this)},s.Oc=function(n){return qE(this,n)},s.Ib=function(){return Ja(this)},v(pt,"AbstractCollection",31);var bf=Gi(pt,"Set");m(Ga,31,fs),s.Lc=function(){return new vn(this,1)},s.Fb=function(n){return EJe(this,n)},s.Hb=function(){return a1e(this)},v(pt,"AbstractSet",Ga),m(2030,Ga,fs),v(hn,"Sets/ImprovedAbstractSet",2030),m(2031,2030,fs),s.$b=function(){this.Pc().$b()},s.Gc=function(n){return rJe(this,n)},s.dc=function(){return this.Pc().dc()},s.Kc=function(n){var t;return this.Gc(n)&&X(n,45)?(t=u(n,45),this.Pc().ec().Kc(t.jd())):!1},s.gc=function(){return this.Pc().gc()},v(hn,"Maps/EntrySet",2031),m(1096,2031,fs,gP),s.Gc=function(n){return $1e(this.a.d.vc(),n)},s.Jc=function(){return new yfe(this.a)},s.Pc=function(){return this.a},s.Kc=function(n){var t;return $1e(this.a.d.vc(),n)?(t=u(uf(u(n,45)),45),c9n(this.a.e,t.jd()),!0):!1},s.Lc=function(){return DT(this.a.d.vc().Lc(),new wP(this.a))},v(hn,"AbstractMapBasedMultimap/AsMap/AsMapEntries",1096),m(1097,1,{},wP),s.Kb=function(n){return PPe(this.a,u(n,45))},v(hn,"AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type",1097),m(734,1,Fr,yfe),s.Nb=function(n){Zr(this,n)},s.Pb=function(){var n;return n=u(this.b.Pb(),45),this.a=u(n.kd(),18),PPe(this.c,n)},s.Ob=function(){return this.b.Ob()},s.Qb=function(){M9(!!this.a),this.b.Qb(),this.c.e.d-=this.a.gc(),this.a.$b(),this.a=null},v(hn,"AbstractMapBasedMultimap/AsMap/AsMapIterator",734),m(530,2030,fs,QP),s.$b=function(){this.b.$b()},s.Gc=function(n){return this.b._b(n)},s.Ic=function(n){Nt(n),this.b.wc(new uj(n))},s.dc=function(){return this.b.dc()},s.Jc=function(){return new yj(this.b.vc().Jc())},s.Kc=function(n){return this.b._b(n)?(this.b.Ac(n),!0):!1},s.gc=function(){return this.b.gc()},v(hn,"Maps/KeySet",530),m(332,530,fs,Hv),s.$b=function(){var n;sR((n=this.b.vc().Jc(),new Uoe(this,n)))},s.Hc=function(n){return this.b.ec().Hc(n)},s.Fb=function(n){return this===n||gi(this.b.ec(),n)},s.Hb=function(){return Ni(this.b.ec())},s.Jc=function(){var n;return n=this.b.vc().Jc(),new Uoe(this,n)},s.Kc=function(n){var t,i;return i=0,t=u(this.b.Ac(n),18),t&&(i=t.gc(),t.$b(),this.a.d-=i),i>0},s.Lc=function(){return this.b.ec().Lc()},v(hn,"AbstractMapBasedMultimap/KeySet",332),m(735,1,Fr,Uoe),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return this.c.Ob()},s.Pb=function(){return this.a=u(this.c.Pb(),45),this.a.jd()},s.Qb=function(){var n;M9(!!this.a),n=u(this.a.kd(),18),this.c.Qb(),this.b.a.d-=n.gc(),n.$b(),this.a=null},v(hn,"AbstractMapBasedMultimap/KeySet/1",735),m(489,395,{92:1,134:1},AT),s.bc=function(){return this.Qc()},s.ec=function(){return this.Sc()},s.Qc=function(){return new eT(this.c,this.Uc())},s.Rc=function(){return this.Uc().Rc()},s.Sc=function(){var n;return n=this.b,n||(this.b=this.Qc())},s.Tc=function(){return this.Uc().Tc()},s.Uc=function(){return u(this.d,134)},v(hn,"AbstractMapBasedMultimap/SortedAsMap",489),m(437,489,$ge,eE),s.bc=function(){return new m9(this.a,u(u(this.d,134),138))},s.Qc=function(){return new m9(this.a,u(u(this.d,134),138))},s.ec=function(){var n;return n=this.b,u(n||(this.b=new m9(this.a,u(u(this.d,134),138))),277)},s.Sc=function(){var n;return n=this.b,u(n||(this.b=new m9(this.a,u(u(this.d,134),138))),277)},s.Uc=function(){return u(u(this.d,134),138)},s.Vc=function(n){return u(u(this.d,134),138).Vc(n)},s.Wc=function(n){return u(u(this.d,134),138).Wc(n)},s.Xc=function(n,t){return new eE(this.a,u(u(this.d,134),138).Xc(n,t))},s.Yc=function(n){return u(u(this.d,134),138).Yc(n)},s.Zc=function(n){return u(u(this.d,134),138).Zc(n)},s.$c=function(n,t){return new eE(this.a,u(u(this.d,134),138).$c(n,t))},v(hn,"AbstractMapBasedMultimap/NavigableAsMap",437),m(488,332,fYe,eT),s.Lc=function(){return this.b.ec().Lc()},v(hn,"AbstractMapBasedMultimap/SortedKeySet",488),m(394,488,Rge,m9),v(hn,"AbstractMapBasedMultimap/NavigableKeySet",394),m(539,31,im,nB),s.Ec=function(n){var t,i;return Is(this),i=this.d.dc(),t=this.d.Ec(n),t&&(++this.f.d,i&&OT(this)),t},s.Fc=function(n){var t,i,r;return n.dc()?!1:(r=(Is(this),this.d.gc()),t=this.d.Fc(n),t&&(i=this.d.gc(),this.f.d+=i-r,r==0&&OT(this)),t)},s.$b=function(){var n;n=(Is(this),this.d.gc()),n!=0&&(this.d.$b(),this.f.d-=n,bR(this))},s.Gc=function(n){return Is(this),this.d.Gc(n)},s.Hc=function(n){return Is(this),this.d.Hc(n)},s.Fb=function(n){return n===this?!0:(Is(this),gi(this.d,n))},s.Hb=function(){return Is(this),Ni(this.d)},s.Jc=function(){return Is(this),new rfe(this)},s.Kc=function(n){var t;return Is(this),t=this.d.Kc(n),t&&(--this.f.d,bR(this)),t},s.gc=function(){return iTe(this)},s.Lc=function(){return Is(this),this.d.Lc()},s.Ib=function(){return Is(this),fu(this.d)},v(hn,"AbstractMapBasedMultimap/WrappedCollection",539);var gl=Gi(pt,"List");m(732,539,{20:1,31:1,18:1,16:1},Nfe),s.gd=function(n){Zb(this,n)},s.Lc=function(){return Is(this),this.d.Lc()},s._c=function(n,t){var i;Is(this),i=this.d.dc(),u(this.d,16)._c(n,t),++this.a.d,i&&OT(this)},s.ad=function(n,t){var i,r,c;return t.dc()?!1:(c=(Is(this),this.d.gc()),i=u(this.d,16).ad(n,t),i&&(r=this.d.gc(),this.a.d+=r-c,c==0&&OT(this)),i)},s.Xb=function(n){return Is(this),u(this.d,16).Xb(n)},s.bd=function(n){return Is(this),u(this.d,16).bd(n)},s.cd=function(){return Is(this),new _Te(this)},s.dd=function(n){return Is(this),new e_e(this,n)},s.ed=function(n){var t;return Is(this),t=u(this.d,16).ed(n),--this.a.d,bR(this),t},s.fd=function(n,t){return Is(this),u(this.d,16).fd(n,t)},s.hd=function(n,t){return Is(this),ZLe(this.a,this.e,u(this.d,16).hd(n,t),this.b?this.b:this)},v(hn,"AbstractMapBasedMultimap/WrappedList",732),m(1095,732,{20:1,31:1,18:1,16:1,59:1},jOe),v(hn,"AbstractMapBasedMultimap/RandomAccessWrappedList",1095),m(619,1,Fr,rfe),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return R9(this),this.b.Ob()},s.Pb=function(){return R9(this),this.b.Pb()},s.Qb=function(){cOe(this)},v(hn,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",619),m(733,619,Wh,_Te,e_e),s.Qb=function(){cOe(this)},s.Rb=function(n){var t;t=iTe(this.a)==0,(R9(this),u(this.b,128)).Rb(n),++this.a.a.d,t&&OT(this.a)},s.Sb=function(){return(R9(this),u(this.b,128)).Sb()},s.Tb=function(){return(R9(this),u(this.b,128)).Tb()},s.Ub=function(){return(R9(this),u(this.b,128)).Ub()},s.Vb=function(){return(R9(this),u(this.b,128)).Vb()},s.Wb=function(n){(R9(this),u(this.b,128)).Wb(n)},v(hn,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",733),m(731,539,fYe,Sle),s.Lc=function(){return Is(this),this.d.Lc()},v(hn,"AbstractMapBasedMultimap/WrappedSortedSet",731),m(1094,731,Rge,TTe),v(hn,"AbstractMapBasedMultimap/WrappedNavigableSet",1094),m(1093,539,fs,KOe),s.Lc=function(){return Is(this),this.d.Lc()},v(hn,"AbstractMapBasedMultimap/WrappedSet",1093),m(1102,1,{},Z),s.Kb=function(n){return g9n(u(n,45))},v(hn,"AbstractMapBasedMultimap/lambda$1$Type",1102),m(1101,1,{},n9),s.Kb=function(n){return new pw(this.a,n)},v(hn,"AbstractMapBasedMultimap/lambda$2$Type",1101);var yg=Gi(pt,"Map/Entry");m(358,1,dZ),s.Fb=function(n){var t;return X(n,45)?(t=u(n,45),C1(this.jd(),t.jd())&&C1(this.kd(),t.kd())):!1},s.Hb=function(){var n,t;return n=this.jd(),t=this.kd(),(n==null?0:Ni(n))^(t==null?0:Ni(t))},s.ld=function(n){throw R(new _t)},s.Ib=function(){return this.jd()+"="+this.kd()},v(hn,aYe,358),m(V0,31,im),s.$b=function(){this.md().$b()},s.Gc=function(n){var t;return X(n,45)?(t=u(n,45),$yn(this.md(),t.jd(),t.kd())):!1},s.Kc=function(n){var t;return X(n,45)?(t=u(n,45),RLe(this.md(),t.jd(),t.kd())):!1},s.gc=function(){return this.md().d},v(hn,"Multimaps/Entries",V0),m(737,V0,im,E1),s.Jc=function(){return this.a.kc()},s.md=function(){return this.a},s.Lc=function(){return this.a.lc()},v(hn,"AbstractMultimap/Entries",737),m(738,737,fs,xoe),s.Lc=function(){return this.a.lc()},s.Fb=function(n){return T0e(this,n)},s.Hb=function(){return JBe(this)},v(hn,"AbstractMultimap/EntrySet",738),m(739,31,im,_C),s.$b=function(){this.a.$b()},s.Gc=function(n){return Ckn(this.a,n)},s.Jc=function(){return this.a.nc()},s.gc=function(){return this.a.d},s.Lc=function(){return this.a.oc()},v(hn,"AbstractMultimap/Values",739),m(2049,31,{833:1,20:1,31:1,18:1}),s.Ic=function(n){Nt(n),qv(this).Ic(new YU(n))},s.Lc=function(){var n;return n=qv(this).Lc(),aW(n,new Ne,64|n.wd()&1296,this.a.d)},s.Ec=function(n){return Noe(),!0},s.Fc=function(n){return Nt(this),Nt(n),X(n,540)?qyn(u(n,833)):!n.dc()&&MY(this,n.Jc())},s.Gc=function(n){var t;return t=u(J2(L4(this.a),n),18),(t?t.gc():0)>0},s.Fb=function(n){return jOn(this,n)},s.Hb=function(){return Ni(qv(this))},s.dc=function(){return qv(this).dc()},s.Kc=function(n){return Sqe(this,n,1)>0},s.Ib=function(){return fu(qv(this))},v(hn,"AbstractMultiset",2049),m(2051,2030,fs),s.$b=function(){yB(this.a.a)},s.Gc=function(n){var t,i;return X(n,490)?(i=u(n,416),u(i.a.kd(),18).gc()<=0?!1:(t=uLe(this.a,i.a.jd()),t==u(i.a.kd(),18).gc())):!1},s.Kc=function(n){var t,i,r,c;return X(n,490)&&(i=u(n,416),t=i.a.jd(),r=u(i.a.kd(),18).gc(),r!=0)?(c=this.a,yTn(c,t,r)):!1},v(hn,"Multisets/EntrySet",2051),m(1108,2051,fs,cj),s.Jc=function(){return new Vxe(FIe(L4(this.a.a)).Jc())},s.gc=function(){return L4(this.a.a).gc()},v(hn,"AbstractMultiset/EntrySet",1108),m(618,730,ag),s.hc=function(){return this.nd()},s.jc=function(){return this.od()},s.cc=function(n){return this.pd(n)},s.fc=function(n){return this.qd(n)},s.Zb=function(){var n;return n=this.f,n||(this.f=this.ac())},s.od=function(){return En(),En(),bJ},s.Fb=function(n){return rQ(this,n)},s.pd=function(n){return u(vi(this,n),22)},s.qd=function(n){return u(AO(this,n),22)},s.mc=function(n){return En(),new h9(u(n,22))},s.pc=function(n,t){return new KOe(this,n,u(t,22))},v(hn,"AbstractSetMultimap",618),m(1689,618,ag),s.hc=function(){return new kd(this.b)},s.nd=function(){return new kd(this.b)},s.jc=function(){return Ufe(new kd(this.b))},s.od=function(){return Ufe(new kd(this.b))},s.cc=function(n){return u(u(vi(this,n),22),83)},s.pd=function(n){return u(u(vi(this,n),22),83)},s.fc=function(n){return u(u(AO(this,n),22),83)},s.qd=function(n){return u(u(AO(this,n),22),83)},s.mc=function(n){return X(n,277)?Ufe(u(n,277)):(En(),new ole(u(n,83)))},s.Zb=function(){var n;return n=this.f,n||(this.f=X(this.c,138)?new eE(this,u(this.c,138)):X(this.c,134)?new AT(this,u(this.c,134)):new p9(this,this.c))},s.pc=function(n,t){return X(t,277)?new TTe(this,n,u(t,277)):new Sle(this,n,u(t,83))},v(hn,"AbstractSortedSetMultimap",1689),m(1690,1689,ag),s.Zb=function(){var n;return n=this.f,u(u(n||(this.f=X(this.c,138)?new eE(this,u(this.c,138)):X(this.c,134)?new AT(this,u(this.c,134)):new p9(this,this.c)),134),138)},s.ec=function(){var n;return n=this.i,u(u(n||(this.i=X(this.c,138)?new m9(this,u(this.c,138)):X(this.c,134)?new eT(this,u(this.c,134)):new Hv(this,this.c)),83),277)},s.bc=function(){return X(this.c,138)?new m9(this,u(this.c,138)):X(this.c,134)?new eT(this,u(this.c,134)):new Hv(this,this.c)},v(hn,"AbstractSortedKeySortedSetMultimap",1690),m(2071,1,{2008:1}),s.Fb=function(n){return aAn(this,n)},s.Hb=function(){var n;return a1e((n=this.g,n||(this.g=new p0(this))))},s.Ib=function(){var n;return sGe((n=this.f,n||(this.f=new ele(this))))},v(hn,"AbstractTable",2071),m(669,Ga,fs,p0),s.$b=function(){uAe()},s.Gc=function(n){var t,i;return X(n,468)?(t=u(n,687),i=u(J2(aDe(this.a),x0(t.c.e,t.b)),92),!!i&&$1e(i.vc(),new pw(x0(t.c.c,t.a),F4(t.c,t.b,t.a)))):!1},s.Jc=function(){return G5n(this.a)},s.Kc=function(n){var t,i;return X(n,468)?(t=u(n,687),i=u(J2(aDe(this.a),x0(t.c.e,t.b)),92),!!i&&Wkn(i.vc(),new pw(x0(t.c.c,t.a),F4(t.c,t.b,t.a)))):!1},s.gc=function(){return pIe(this.a)},s.Lc=function(){return Xyn(this.a)},v(hn,"AbstractTable/CellSet",669),m(1987,31,im,JU),s.$b=function(){uAe()},s.Gc=function(n){return nMn(this.a,n)},s.Jc=function(){return q5n(this.a)},s.gc=function(){return pIe(this.a)},s.Lc=function(){return NLe(this.a)},v(hn,"AbstractTable/Values",1987),m(1662,1661,ag),v(hn,"ArrayListMultimapGwtSerializationDependencies",1662),m(506,1662,ag,NX,Sae),s.hc=function(){return new xo(this.a)},s.a=0,v(hn,"ArrayListMultimap",506),m(668,2071,{668:1,2008:1,3:1},Eqe),v(hn,"ArrayTable",668),m(1983,392,P8,tOe),s.Xb=function(n){return new w1e(this.a,n)},v(hn,"ArrayTable/1",1983),m(1984,1,{},HU),s.rd=function(n){return new w1e(this.a,n)},v(hn,"ArrayTable/1methodref$getCell$Type",1984),m(2072,1,{687:1}),s.Fb=function(n){var t;return n===this?!0:X(n,468)?(t=u(n,687),C1(x0(this.c.e,this.b),x0(t.c.e,t.b))&&C1(x0(this.c.c,this.a),x0(t.c.c,t.a))&&C1(F4(this.c,this.b,this.a),F4(t.c,t.b,t.a))):!1},s.Hb=function(){return zB(F(z(Mr,1),On,1,5,[x0(this.c.e,this.b),x0(this.c.c,this.a),F4(this.c,this.b,this.a)]))},s.Ib=function(){return"("+x0(this.c.e,this.b)+","+x0(this.c.c,this.a)+")="+F4(this.c,this.b,this.a)},v(hn,"Tables/AbstractCell",2072),m(468,2072,{468:1,687:1},w1e),s.a=0,s.b=0,s.d=0,v(hn,"ArrayTable/2",468),m(1986,1,{},W5),s.rd=function(n){return F$e(this.a,n)},v(hn,"ArrayTable/2methodref$getValue$Type",1986),m(1985,392,P8,iOe),s.Xb=function(n){return F$e(this.a,n)},v(hn,"ArrayTable/3",1985),m(2039,2027,Ww),s.$b=function(){sR(this.kc())},s.vc=function(){return new oj(this)},s.lc=function(){return new GDe(this.kc(),this.gc())},v(hn,"Maps/IteratorBasedAbstractMap",2039),m(826,2039,Ww),s.$b=function(){throw R(new _t)},s._b=function(n){return EAe(this.c,n)},s.kc=function(){return new rOe(this,this.c.b.c.gc())},s.lc=function(){return rV(this.c.b.c.gc(),16,new pP(this))},s.xc=function(n){var t;return t=u(nE(this.c,n),15),t?this.td(t.a):null},s.dc=function(){return this.c.b.c.dc()},s.ec=function(){return dV(this.c)},s.yc=function(n,t){var i;if(i=u(nE(this.c,n),15),!i)throw R(new qn(this.sd()+" "+n+" not in "+dV(this.c)));return this.ud(i.a,t)},s.Ac=function(n){throw R(new _t)},s.gc=function(){return this.c.b.c.gc()},v(hn,"ArrayTable/ArrayMap",826),m(1982,1,{},pP),s.rd=function(n){return bDe(this.a,n)},v(hn,"ArrayTable/ArrayMap/0methodref$getEntry$Type",1982),m(1980,358,dZ,QAe),s.jd=function(){return bpn(this.a,this.b)},s.kd=function(){return this.a.td(this.b)},s.ld=function(n){return this.a.ud(this.b,n)},s.b=0,v(hn,"ArrayTable/ArrayMap/1",1980),m(1981,392,P8,rOe),s.Xb=function(n){return bDe(this.a,n)},v(hn,"ArrayTable/ArrayMap/2",1981),m(1979,826,Ww,tDe),s.sd=function(){return"Column"},s.td=function(n){return F4(this.b,this.a,n)},s.ud=function(n,t){return Eze(this.b,this.a,n,t)},s.a=0,v(hn,"ArrayTable/Row",1979),m(827,826,Ww,ele),s.td=function(n){return new tDe(this.a,n)},s.yc=function(n,t){return u(t,92),$bn()},s.ud=function(n,t){return u(t,92),Rbn()},s.sd=function(){return"Row"},v(hn,"ArrayTable/RowMap",827),m(1126,1,dl,WAe),s.yd=function(n){return(this.a.wd()&-262&n)!=0},s.wd=function(){return this.a.wd()&-262},s.xd=function(){return this.a.xd()},s.Nb=function(n){this.a.Nb(new eMe(n,this.b))},s.zd=function(n){return this.a.zd(new ZAe(n,this.b))},v(hn,"CollectSpliterators/1",1126),m(1127,1,ct,ZAe),s.Ad=function(n){this.a.Ad(this.b.Kb(n))},v(hn,"CollectSpliterators/1/lambda$0$Type",1127),m(1128,1,ct,eMe),s.Ad=function(n){this.a.Ad(this.b.Kb(n))},v(hn,"CollectSpliterators/1/lambda$1$Type",1128),m(1123,1,dl,ENe),s.yd=function(n){return((16464|this.b)&n)!=0},s.wd=function(){return 16464|this.b},s.xd=function(){return this.a.xd()},s.Nb=function(n){this.a.Oe(new tMe(n,this.c))},s.zd=function(n){return this.a.Pe(new nMe(n,this.c))},s.b=0,v(hn,"CollectSpliterators/1WithCharacteristics",1123),m(1124,1,dN,nMe),s.Bd=function(n){this.a.Ad(this.b.rd(n))},v(hn,"CollectSpliterators/1WithCharacteristics/lambda$0$Type",1124),m(1125,1,dN,tMe),s.Bd=function(n){this.a.Ad(this.b.rd(n))},v(hn,"CollectSpliterators/1WithCharacteristics/lambda$1$Type",1125),m(1119,1,dl),s.yd=function(n){return(this.a&n)!=0},s.wd=function(){return this.a},s.xd=function(){return this.e&&(this.b=Gse(this.b,this.e.xd())),Gse(this.b,0)},s.Nb=function(n){this.e&&(this.e.Nb(n),this.e=null),this.c.Nb(new iMe(this,n)),this.b=0},s.zd=function(n){for(;;){if(this.e&&this.e.zd(n))return qj(this.b,bN)&&(this.b=lf(this.b,1)),!0;if(this.e=null,!this.c.zd(new Z5(this)))return!1}},s.a=0,s.b=0,v(hn,"CollectSpliterators/FlatMapSpliterator",1119),m(1121,1,ct,Z5),s.Ad=function(n){s2n(this.a,n)},v(hn,"CollectSpliterators/FlatMapSpliterator/lambda$0$Type",1121),m(1122,1,ct,iMe),s.Ad=function(n){y5n(this.a,this.b,n)},v(hn,"CollectSpliterators/FlatMapSpliterator/lambda$1$Type",1122),m(1120,1119,dl,lPe),v(hn,"CollectSpliterators/FlatMapSpliteratorOfObject",1120),m(254,1,bZ),s.Dd=function(n){return this.Cd(u(n,254))},s.Cd=function(n){var t;return n==(SX(),Qne)?1:n==(EX(),Yne)?-1:(t=(tR(),gO(this.a,n.a)),t!=0?t:($n(),X(this,513)==X(n,513)?0:X(this,513)?1:-1))},s.Gd=function(){return this.a},s.Fb=function(n){return Lde(this,n)},v(hn,"Cut",254),m(1793,254,bZ,Jxe),s.Cd=function(n){return n==this?0:1},s.Ed=function(n){throw R(new loe)},s.Fd=function(n){n.a+="+∞)"},s.Gd=function(){throw R(new Uc(dYe))},s.Hb=function(){return jd(),jde(this)},s.Hd=function(n){return!1},s.Ib=function(){return"+∞"};var Yne;v(hn,"Cut/AboveAll",1793),m(513,254,{254:1,513:1,3:1,35:1},sOe),s.Ed=function(n){uo((n.a+="(",n),this.a)},s.Fd=function(n){qb(uo(n,this.a),93)},s.Hb=function(){return~Ni(this.a)},s.Hd=function(n){return tR(),gO(this.a,n)<0},s.Ib=function(){return"/"+this.a+"\\"},v(hn,"Cut/AboveValue",513),m(1792,254,bZ,Fxe),s.Cd=function(n){return n==this?0:-1},s.Ed=function(n){n.a+="(-∞"},s.Fd=function(n){throw R(new loe)},s.Gd=function(){throw R(new Uc(dYe))},s.Hb=function(){return jd(),jde(this)},s.Hd=function(n){return!0},s.Ib=function(){return"-∞"};var Qne;v(hn,"Cut/BelowAll",1792),m(1794,254,bZ,lOe),s.Ed=function(n){uo((n.a+="[",n),this.a)},s.Fd=function(n){qb(uo(n,this.a),41)},s.Hb=function(){return Ni(this.a)},s.Hd=function(n){return tR(),gO(this.a,n)<=0},s.Ib=function(){return"\\"+this.a+"/"},v(hn,"Cut/BelowValue",1794),m(535,1,Zh),s.Ic=function(n){cc(this,n)},s.Ib=function(){return Cjn(u(NR(this,"use Optional.orNull() instead of Optional.or(null)"),20).Jc())},v(hn,"FluentIterable",535),m(433,535,Zh,Kj),s.Jc=function(){return new Un(Yn(this.a.Jc(),new ee))},v(hn,"FluentIterable/2",433),m(36,1,{},ee),s.Kb=function(n){return u(n,20).Jc()},s.Fb=function(n){return this===n},v(hn,"FluentIterable/2/0methodref$iterator$Type",36),m(1040,535,Zh,ETe),s.Jc=function(){return Uh(this)},v(hn,"FluentIterable/3",1040),m(714,392,P8,sle),s.Xb=function(n){return this.a[n].Jc()},v(hn,"FluentIterable/3/1",714),m(2032,1,{}),s.Ib=function(){return fu(this.Id().b)},v(hn,"ForwardingObject",2032),m(2033,2032,bYe),s.Id=function(){return this.Jd()},s.Ic=function(n){cc(this,n)},s.Lc=function(){return new vn(this,0)},s.Mc=function(){return new mn(null,this.Lc())},s.Ec=function(n){return this.Jd(),MAe()},s.Fc=function(n){return this.Jd(),CAe()},s.$b=function(){this.Jd(),TAe()},s.Gc=function(n){return this.Jd().Gc(n)},s.Hc=function(n){return this.Jd().Hc(n)},s.dc=function(){return this.Jd().b.dc()},s.Jc=function(){return this.Jd().Jc()},s.Kc=function(n){return this.Jd(),OAe()},s.gc=function(){return this.Jd().b.gc()},s.Nc=function(){return this.Jd().Nc()},s.Oc=function(n){return this.Jd().Oc(n)},v(hn,"ForwardingCollection",2033),m(2040,31,Bge),s.Jc=function(){return this.Md()},s.Ec=function(n){throw R(new _t)},s.Fc=function(n){throw R(new _t)},s.Kd=function(){var n;return n=this.c,n||(this.c=this.Ld())},s.$b=function(){throw R(new _t)},s.Gc=function(n){return n!=null&&H2(this,n,!1)},s.Ld=function(){switch(this.gc()){case 0:return oR(),ete;case 1:return new GK(Nt(this.Md().Pb()));default:return new cfe(this,this.Nc())}},s.Kc=function(n){throw R(new _t)},v(hn,"ImmutableCollection",2040),m(1259,2040,Bge,vP),s.Jc=function(){return J4(new ic(this.a.b.Jc()))},s.Gc=function(n){return n!=null&&xj(this.a,n)},s.Hc=function(n){return Koe(this.a,n)},s.dc=function(){return this.a.b.dc()},s.Md=function(){return J4(new ic(this.a.b.Jc()))},s.gc=function(){return this.a.b.gc()},s.Nc=function(){return this.a.b.Nc()},s.Oc=function(n){return Voe(this.a,n)},s.Ib=function(){return fu(this.a.b)},v(hn,"ForwardingImmutableCollection",1259),m(311,2040,$8),s.Jc=function(){return this.Md()},s.cd=function(){return this.Nd(0)},s.dd=function(n){return this.Nd(n)},s.gd=function(n){Zb(this,n)},s.Lc=function(){return new vn(this,16)},s.hd=function(n,t){return this.Od(n,t)},s._c=function(n,t){throw R(new _t)},s.ad=function(n,t){throw R(new _t)},s.Kd=function(){return this},s.Fb=function(n){return hOn(this,n)},s.Hb=function(){return B7n(this)},s.bd=function(n){return n==null?-1:USn(this,n)},s.Md=function(){return this.Nd(0)},s.Nd=function(n){return PK(this,n)},s.ed=function(n){throw R(new _t)},s.fd=function(n,t){throw R(new _t)},s.Od=function(n,t){var i;return XB((i=new aMe(this),new N0(i,n,t)))},v(hn,"ImmutableList",311),m(2067,311,$8),s.Jc=function(){return J4(this.Pd().Jc())},s.hd=function(n,t){return XB(this.Pd().hd(n,t))},s.Gc=function(n){return n!=null&&this.Pd().Gc(n)},s.Hc=function(n){return this.Pd().Hc(n)},s.Fb=function(n){return gi(this.Pd(),n)},s.Xb=function(n){return x0(this,n)},s.Hb=function(){return Ni(this.Pd())},s.bd=function(n){return this.Pd().bd(n)},s.dc=function(){return this.Pd().dc()},s.Md=function(){return J4(this.Pd().Jc())},s.gc=function(){return this.Pd().gc()},s.Od=function(n,t){return XB(this.Pd().hd(n,t))},s.Nc=function(){return this.Pd().Oc(se(Mr,On,1,this.Pd().gc(),5,1))},s.Oc=function(n){return this.Pd().Oc(n)},s.Ib=function(){return fu(this.Pd())},v(hn,"ForwardingImmutableList",2067),m(717,1,R8),s.vc=function(){return Fb(this)},s.wc=function(n){wO(this,n)},s.ec=function(){return dV(this)},s.Bc=function(){return this.Td()},s.$b=function(){throw R(new _t)},s._b=function(n){return this.xc(n)!=null},s.uc=function(n){return this.Td().Gc(n)},s.Rd=function(){return new UU(this)},s.Sd=function(){return new XU(this)},s.Fb=function(n){return Tkn(this,n)},s.Hb=function(){return Fb(this).Hb()},s.dc=function(){return this.gc()==0},s.yc=function(n,t){return Bbn()},s.Ac=function(n){throw R(new _t)},s.Ib=function(){return VMn(this)},s.Td=function(){return this.e?this.e:this.e=this.Sd()},s.c=null,s.d=null,s.e=null,v(hn,"ImmutableMap",717),m(718,717,R8),s._b=function(n){return EAe(this,n)},s.uc=function(n){return mMe(this.b,n)},s.Qd=function(){return uFe(new mP(this))},s.Rd=function(){return uFe(PDe(this.b))},s.Sd=function(){return new vP($De(this.b))},s.Fb=function(n){return yMe(this.b,n)},s.xc=function(n){return nE(this,n)},s.Hb=function(){return Ni(this.b.c)},s.dc=function(){return this.b.c.dc()},s.gc=function(){return this.b.c.gc()},s.Ib=function(){return fu(this.b.c)},v(hn,"ForwardingImmutableMap",718),m(2034,2033,gZ),s.Id=function(){return this.Ud()},s.Jd=function(){return this.Ud()},s.Lc=function(){return new vn(this,1)},s.Fb=function(n){return n===this||this.Ud().Fb(n)},s.Hb=function(){return this.Ud().Hb()},v(hn,"ForwardingSet",2034),m(1055,2034,gZ,mP),s.Id=function(){return P9(this.a.b)},s.Jd=function(){return P9(this.a.b)},s.Gc=function(n){if(X(n,45)&&u(n,45).jd()==null)return!1;try{return vMe(P9(this.a.b),n)}catch(t){if(t=sr(t),X(t,211))return!1;throw R(t)}},s.Ud=function(){return P9(this.a.b)},s.Oc=function(n){var t,i;return t=j_e(P9(this.a.b),n),P9(this.a.b).b.gc()=0?"+":"")+(i/60|0),t=_$(k.Math.abs(i)%60),(yGe(),lnn)[this.q.getDay()]+" "+fnn[this.q.getMonth()]+" "+_$(this.q.getDate())+" "+_$(this.q.getHours())+":"+_$(this.q.getMinutes())+":"+_$(this.q.getSeconds())+" GMT"+n+t+" "+this.q.getFullYear()};var aJ=v(pt,"Date",205);m(1977,205,EYe,FHe),s.a=!1,s.b=0,s.c=0,s.d=0,s.e=0,s.f=0,s.g=!1,s.i=0,s.j=0,s.k=0,s.n=0,s.o=0,s.p=0,v("com.google.gwt.i18n.shared.impl","DateRecord",1977),m(2026,1,{}),s.ne=function(){return null},s.oe=function(){return null},s.pe=function(){return null},s.qe=function(){return null},s.re=function(){return null},v(hy,"JSONValue",2026),m(139,2026,{139:1},wd,i9),s.Fb=function(n){return X(n,139)?Mae(this.a,u(n,139).a):!1},s.me=function(){return cbn},s.Hb=function(){return aae(this.a)},s.ne=function(){return this},s.Ib=function(){var n,t,i;for(i=new tl("["),t=0,n=this.a.length;t0&&(i.a+=","),uo(i,L2(this,t));return i.a+="]",i.a},v(hy,"JSONArray",139),m(479,2026,{479:1},r9),s.me=function(){return ubn},s.oe=function(){return this},s.Ib=function(){return $n(),""+this.a},s.a=!1;var Qen,Wen;v(hy,"JSONBoolean",479),m(981,63,H1,Yxe),v(hy,"JSONException",981),m(1017,2026,{},nt),s.me=function(){return fbn},s.Ib=function(){return Vo};var Zen;v(hy,"JSONNull",1017),m(265,2026,{265:1},Av),s.Fb=function(n){return X(n,265)?this.a==u(n,265).a:!1},s.me=function(){return obn},s.Hb=function(){return v4(this.a)},s.pe=function(){return this},s.Ib=function(){return this.a+""},s.a=0,v(hy,"JSONNumber",265),m(149,2026,{149:1},l4,c9),s.Fb=function(n){return X(n,149)?Mae(this.a,u(n,149).a):!1},s.me=function(){return sbn},s.Hb=function(){return aae(this.a)},s.qe=function(){return this},s.Ib=function(){var n,t,i,r,c,o,l;for(l=new tl("{"),n=!0,o=zY(this,se(He,Me,2,0,6,1)),i=o,r=0,c=i.length;r=0?":"+this.c:"")+")"},s.c=0;var _me=v(Cu,"StackTraceElement",324);Hen={3:1,472:1,35:1,2:1};var He=v(Cu,zge,2);m(111,418,{472:1},vd,Ej,cf),v(Cu,"StringBuffer",111),m(106,418,{472:1},y0,h4,tl),v(Cu,"StringBuilder",106),m(691,99,cF,Ioe),v(Cu,"StringIndexOutOfBoundsException",691),m(2107,1,{});var inn;m(46,63,{3:1,101:1,63:1,80:1,46:1},_t,pd),v(Cu,"UnsupportedOperationException",46),m(247,242,{3:1,35:1,242:1,247:1},TO,Joe),s.Dd=function(n){return yKe(this,u(n,247))},s.se=function(){return K2(XKe(this))},s.Fb=function(n){var t;return this===n?!0:X(n,247)?(t=u(n,247),this.e==t.e&&yKe(this,t)==0):!1},s.Hb=function(){var n;return this.b!=0?this.b:this.a<54?(n=Lu(this.f),this.b=Rt(Rr(n,-1)),this.b=33*this.b+Rt(Rr(Sw(n,32),-1)),this.b=17*this.b+lc(this.e),this.b):(this.b=17*pFe(this.c)+lc(this.e),this.b)},s.Ib=function(){return XKe(this)},s.a=0,s.b=0,s.d=0,s.e=0,s.f=0;var rnn,kg,Lme,Pme,$me,Rme,Bme,zme,ute=v("java.math","BigDecimal",247);m(91,242,{3:1,35:1,242:1,91:1},I1,dLe,Gb,AJe,A0),s.Dd=function(n){return kJe(this,u(n,91))},s.se=function(){return K2(fZ(this,0))},s.Fb=function(n){return ude(this,n)},s.Hb=function(){return pFe(this)},s.Ib=function(){return fZ(this,0)},s.b=-2,s.c=0,s.d=0,s.e=0;var cnn,hJ,unn,ote,dJ,VS,T3=v("java.math","BigInteger",91),onn,snn,Ey,YS;m(484,2027,Ww),s.$b=function(){Hu(this)},s._b=function(n){return so(this,n)},s.uc=function(n){return nFe(this,n,this.i)||nFe(this,n,this.f)},s.vc=function(){return new sn(this)},s.xc=function(n){return zn(this,n)},s.yc=function(n,t){return ei(this,n,t)},s.Ac=function(n){return z4(this,n)},s.gc=function(){return Aj(this)},s.g=0,v(pt,"AbstractHashMap",484),m(306,Ga,fs,sn),s.$b=function(){this.a.$b()},s.Gc=function(n){return HLe(this,n)},s.Jc=function(){return new B2(this.a)},s.Kc=function(n){var t;return HLe(this,n)?(t=u(n,45).jd(),this.a.Ac(t),!0):!1},s.gc=function(){return this.a.gc()},v(pt,"AbstractHashMap/EntrySet",306),m(307,1,Fr,B2),s.Nb=function(n){Zr(this,n)},s.Pb=function(){return t3(this)},s.Ob=function(){return this.b},s.Qb=function(){wRe(this)},s.b=!1,s.d=0,v(pt,"AbstractHashMap/EntrySetIterator",307),m(417,1,Fr,qc),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return FX(this)},s.Pb=function(){return oae(this)},s.Qb=function(){As(this)},s.b=0,s.c=-1,v(pt,"AbstractList/IteratorImpl",417),m(97,417,Wh,qr),s.Qb=function(){As(this)},s.Rb=function(n){y2(this,n)},s.Sb=function(){return this.b>0},s.Tb=function(){return this.b},s.Ub=function(){return at(this.b>0),this.a.Xb(this.c=--this.b)},s.Vb=function(){return this.b-1},s.Wb=function(n){w2(this.c!=-1),this.a.fd(this.c,n)},v(pt,"AbstractList/ListIteratorImpl",97),m(258,56,B8,N0),s._c=function(n,t){N2(n,this.b),this.c._c(this.a+n,t),++this.b},s.Xb=function(n){return kn(n,this.b),this.c.Xb(this.a+n)},s.ed=function(n){var t;return kn(n,this.b),t=this.c.ed(this.a+n),--this.b,t},s.fd=function(n,t){return kn(n,this.b),this.c.fd(this.a+n,t)},s.gc=function(){return this.b},s.a=0,s.b=0,v(pt,"AbstractList/SubList",258),m(232,Ga,fs,it),s.$b=function(){this.a.$b()},s.Gc=function(n){return this.a._b(n)},s.Jc=function(){var n;return n=this.a.vc().Jc(),new gt(n)},s.Kc=function(n){return this.a._b(n)?(this.a.Ac(n),!0):!1},s.gc=function(){return this.a.gc()},v(pt,"AbstractMap/1",232),m(529,1,Fr,gt),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return this.a.Ob()},s.Pb=function(){var n;return n=u(this.a.Pb(),45),n.jd()},s.Qb=function(){this.a.Qb()},v(pt,"AbstractMap/1/1",529),m(230,31,im,ot),s.$b=function(){this.a.$b()},s.Gc=function(n){return this.a.uc(n)},s.Jc=function(){var n;return n=this.a.vc().Jc(),new Hi(n)},s.gc=function(){return this.a.gc()},v(pt,"AbstractMap/2",230),m(304,1,Fr,Hi),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return this.a.Ob()},s.Pb=function(){var n;return n=u(this.a.Pb(),45),n.kd()},s.Qb=function(){this.a.Qb()},v(pt,"AbstractMap/2/1",304),m(480,1,{480:1,45:1}),s.Fb=function(n){var t;return X(n,45)?(t=u(n,45),Ku(this.d,t.jd())&&Ku(this.e,t.kd())):!1},s.jd=function(){return this.d},s.kd=function(){return this.e},s.Hb=function(){return Bv(this.d)^Bv(this.e)},s.ld=function(n){return Ile(this,n)},s.Ib=function(){return this.d+"="+this.e},v(pt,"AbstractMap/AbstractEntry",480),m(390,480,{480:1,390:1,45:1},u$),v(pt,"AbstractMap/SimpleEntry",390),m(2044,1,BZ),s.Fb=function(n){var t;return X(n,45)?(t=u(n,45),Ku(this.jd(),t.jd())&&Ku(this.kd(),t.kd())):!1},s.Hb=function(){return Bv(this.jd())^Bv(this.kd())},s.Ib=function(){return this.jd()+"="+this.kd()},v(pt,aYe,2044),m(2052,2027,$ge),s.Vc=function(n){return LX(this.Ce(n))},s.tc=function(n){return $Pe(this,n)},s._b=function(n){return Dle(this,n)},s.vc=function(){return new Xi(this)},s.Rc=function(){return iDe(this.Ee())},s.Wc=function(n){return LX(this.Fe(n))},s.xc=function(n){var t;return t=n,bu(this.De(t))},s.Yc=function(n){return LX(this.Ge(n))},s.ec=function(){return new _u(this)},s.Tc=function(){return iDe(this.He())},s.Zc=function(n){return LX(this.Ie(n))},v(pt,"AbstractNavigableMap",2052),m(620,Ga,fs,Xi),s.Gc=function(n){return X(n,45)&&$Pe(this.b,u(n,45))},s.Jc=function(){return this.b.Be()},s.Kc=function(n){var t;return X(n,45)?(t=u(n,45),this.b.Je(t)):!1},s.gc=function(){return this.b.gc()},v(pt,"AbstractNavigableMap/EntrySet",620),m(1115,Ga,Rge,_u),s.Lc=function(){return new l$(this)},s.$b=function(){this.a.$b()},s.Gc=function(n){return Dle(this.a,n)},s.Jc=function(){var n;return n=this.a.vc().b.Be(),new Lke(n)},s.Kc=function(n){return Dle(this.a,n)?(this.a.Ac(n),!0):!1},s.gc=function(){return this.a.gc()},v(pt,"AbstractNavigableMap/NavigableKeySet",1115),m(1116,1,Fr,Lke),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return FX(this.a.a)},s.Pb=function(){var n;return n=TOe(this.a),n.jd()},s.Qb=function(){INe(this.a)},v(pt,"AbstractNavigableMap/NavigableKeySet/1",1116),m(2065,31,im),s.Ec=function(n){return C4(k8(this,n),F8),!0},s.Fc=function(n){return _n(n),LT(n!=this,"Can't add a queue to itself"),ac(this,n)},s.$b=function(){for(;CY(this)!=null;);},v(pt,"AbstractQueue",2065),m(314,31,{4:1,20:1,31:1,18:1},Fv,_Le),s.Ec=function(n){return Lae(this,n),!0},s.$b=function(){zae(this)},s.Gc=function(n){return vze(new dE(this),n)},s.dc=function(){return jj(this)},s.Jc=function(){return new dE(this)},s.Kc=function(n){return x4n(new dE(this),n)},s.gc=function(){return this.c-this.b&this.a.length-1},s.Lc=function(){return new vn(this,272)},s.Oc=function(n){var t;return t=this.c-this.b&this.a.length-1,n.lengtht&&ir(n,t,null),n},s.b=0,s.c=0,v(pt,"ArrayDeque",314),m(448,1,Fr,dE),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return this.a!=this.b},s.Pb=function(){return JB(this)},s.Qb=function(){vBe(this)},s.a=0,s.b=0,s.c=-1,v(pt,"ArrayDeque/IteratorImpl",448),m(13,56,MYe,Oe,xo,bs),s._c=function(n,t){zb(this,n,t)},s.Ec=function(n){return Te(this,n)},s.ad=function(n,t){return N1e(this,n,t)},s.Fc=function(n){return Sr(this,n)},s.$b=function(){r2(this.c,0)},s.Gc=function(n){return pu(this,n,0)!=-1},s.Ic=function(n){Ao(this,n)},s.Xb=function(n){return Pe(this,n)},s.bd=function(n){return pu(this,n,0)},s.dc=function(){return this.c.length==0},s.Jc=function(){return new P(this)},s.ed=function(n){return Cd(this,n)},s.Kc=function(n){return qo(this,n)},s.ae=function(n,t){cLe(this,n,t)},s.fd=function(n,t){return ul(this,n,t)},s.gc=function(){return this.c.length},s.gd=function(n){Tr(this,n)},s.Nc=function(){return iR(this.c)},s.Oc=function(n){return Ba(this,n)};var ABn=v(pt,"ArrayList",13);m(7,1,Fr,P),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return gu(this)},s.Pb=function(){return _(this)},s.Qb=function(){sE(this)},s.a=0,s.b=-1,v(pt,"ArrayList/1",7),m(2074,k.Function,{},pn),s.Ke=function(n,t){return ji(n,t)},m(123,56,CYe,Su),s.Gc=function(n){return mBe(this,n)!=-1},s.Ic=function(n){var t,i,r,c;for(_n(n),i=this.a,r=0,c=i.length;r0)throw R(new qn(Kge+n+" greater than "+this.e));return this.f.Re()?C_e(this.c,this.b,this.a,n,t):iLe(this.c,n,t)},s.yc=function(n,t){if(!eW(this.c,this.f,n,this.b,this.a,this.e,this.d))throw R(new qn(n+" outside the range "+this.b+" to "+this.e));return $ze(this.c,n,t)},s.Ac=function(n){var t;return t=n,eW(this.c,this.f,t,this.b,this.a,this.e,this.d)?T_e(this.c,t):null},s.Je=function(n){return xR(this,n.jd())&&uhe(this.c,n)},s.gc=function(){var n,t,i;if(this.f.Re()?this.a?t=b8(this.c,this.b,!0):t=b8(this.c,this.b,!1):t=mhe(this.c),!(t&&xR(this,t.d)&&t))return 0;for(n=0,i=new FY(this.c,this.f,this.b,this.a,this.e,this.d);FX(i.a);i.b=u(oae(i.a),45))++n;return n},s.$c=function(n,t){if(this.f.Re()&&this.c.a.Le(n,this.b)<0)throw R(new qn(Kge+n+NYe+this.b));return this.f.Se()?C_e(this.c,n,t,this.e,this.d):rLe(this.c,n,t)},s.a=!1,s.d=!1,v(pt,"TreeMap/SubMap",622),m(309,23,HZ,o$),s.Re=function(){return!1},s.Se=function(){return!1};var fte,ate,hte,dte,gJ=yt(pt,"TreeMap/SubMapType",309,Tt,n6n,M2n);m(1112,309,HZ,MTe),s.Se=function(){return!0},yt(pt,"TreeMap/SubMapType/1",1112,gJ,null,null),m(1113,309,HZ,BTe),s.Re=function(){return!0},s.Se=function(){return!0},yt(pt,"TreeMap/SubMapType/2",1113,gJ,null,null),m(1114,309,HZ,CTe),s.Re=function(){return!0},yt(pt,"TreeMap/SubMapType/3",1114,gJ,null,null);var wnn;m(141,Ga,{3:1,20:1,31:1,18:1,277:1,22:1,83:1,141:1},pX,lle,kd,o9),s.Lc=function(){return new l$(this)},s.Ec=function(n){return RT(this,n)},s.$b=function(){this.a.$b()},s.Gc=function(n){return this.a._b(n)},s.Jc=function(){return this.a.ec().Jc()},s.Kc=function(n){return DK(this,n)},s.gc=function(){return this.a.gc()};var IBn=v(pt,"TreeSet",141);m(1052,1,{},Rke),s.Te=function(n,t){return Xpn(this.a,n,t)},v(GZ,"BinaryOperator/lambda$0$Type",1052),m(1053,1,{},Bke),s.Te=function(n,t){return Kpn(this.a,n,t)},v(GZ,"BinaryOperator/lambda$1$Type",1053),m(935,1,{},Fu),s.Kb=function(n){return n},v(GZ,"Function/lambda$0$Type",935),m(388,1,zt,s9),s.Mb=function(n){return!this.a.Mb(n)},v(GZ,"Predicate/lambda$2$Type",388),m(567,1,{567:1});var pnn=v(mS,"Handler",567);m(2069,1,aN),s.ve=function(){return"DUMMY"},s.Ib=function(){return this.ve()};var Xme;v(mS,"Level",2069),m(1672,2069,aN,Rs),s.ve=function(){return"INFO"},v(mS,"Level/LevelInfo",1672),m(1824,1,{},ixe);var bte;v(mS,"LogManager",1824),m(1866,1,aN,NNe),s.b=null,v(mS,"LogRecord",1866),m(511,1,{511:1},oY),s.e=!1;var mnn=!1,vnn=!1,Va=!1,ynn=!1,knn=!1;v(mS,"Logger",511),m(819,567,{567:1},Er),v(mS,"SimpleConsoleLogHandler",819),m(130,23,{3:1,35:1,23:1,130:1},GX);var Kme,Yo,Vme,Qo=yt(_c,"Collector/Characteristics",130,Tt,B4n,C2n),jnn;m(746,1,{},Bfe),v(_c,"CollectorImpl",746),m(1050,1,{},Kr),s.Te=function(n,t){return ajn(u(n,212),u(t,212))},v(_c,"Collectors/10methodref$merge$Type",1050),m(1051,1,{},Mt),s.Kb=function(n){return DLe(u(n,212))},v(_c,"Collectors/11methodref$toString$Type",1051),m(152,1,{},bi),s.Wd=function(n,t){u(n,18).Ec(t)},v(_c,"Collectors/20methodref$add$Type",152),m(154,1,{},zi),s.Ve=function(){return new Oe},v(_c,"Collectors/21methodref$ctor$Type",154),m(1049,1,{},cu),s.Wd=function(n,t){D1(u(n,212),u(t,472))},v(_c,"Collectors/9methodref$add$Type",1049),m(1048,1,{},YNe),s.Ve=function(){return new ng(this.a,this.b,this.c)},v(_c,"Collectors/lambda$15$Type",1048),m(153,1,{},Cc),s.Te=function(n,t){return Egn(u(n,18),u(t,18))},v(_c,"Collectors/lambda$45$Type",153),m(538,1,{}),s.Ye=function(){hE(this)},s.d=!1,v(_c,"TerminatableStream",538),m(768,538,Vge,xle),s.Ye=function(){hE(this)},v(_c,"DoubleStreamImpl",768),m(1297,724,dl,QNe),s.Pe=function(n){return RSn(this,u(n,189))},s.a=null,v(_c,"DoubleStreamImpl/2",1297),m(1298,1,yN,zke),s.Ne=function(n){wwn(this.a,n)},v(_c,"DoubleStreamImpl/2/lambda$0$Type",1298),m(1295,1,yN,Fke),s.Ne=function(n){gwn(this.a,n)},v(_c,"DoubleStreamImpl/lambda$0$Type",1295),m(1296,1,yN,Jke),s.Ne=function(n){lJe(this.a,n)},v(_c,"DoubleStreamImpl/lambda$2$Type",1296),m(1351,723,dl,HPe),s.Pe=function(n){return Gyn(this,u(n,202))},s.a=0,s.b=0,s.c=0,v(_c,"IntStream/5",1351),m(793,538,Vge,Ale),s.Ye=function(){hE(this)},s.Ze=function(){return T0(this),this.a},v(_c,"IntStreamImpl",793),m(794,538,Vge,Yoe),s.Ye=function(){hE(this)},s.Ze=function(){return T0(this),Yse(),gnn},v(_c,"IntStreamImpl/Empty",794),m(1651,1,dN,Hke),s.Bd=function(n){nze(this.a,n)},v(_c,"IntStreamImpl/lambda$4$Type",1651);var DBn=Gi(_c,"Stream");m(28,538,{520:1,677:1,832:1},mn),s.Ye=function(){hE(this)};var Sy;v(_c,"StreamImpl",28),m(1072,486,dl,jNe),s.zd=function(n){for(;G9n(this);){if(this.a.zd(n))return!0;hE(this.b),this.b=null,this.a=null}return!1},v(_c,"StreamImpl/1",1072),m(1073,1,ct,Gke),s.Ad=function(n){Ivn(this.a,u(n,832))},v(_c,"StreamImpl/1/lambda$0$Type",1073),m(1074,1,zt,qke),s.Mb=function(n){return hr(this.a,n)},v(_c,"StreamImpl/1methodref$add$Type",1074),m(1075,486,dl,n_e),s.zd=function(n){var t;return this.a||(t=new Oe,this.b.a.Nb(new Uke(t)),En(),Tr(t,this.c),this.a=new vn(t,16)),HRe(this.a,n)},s.a=null,v(_c,"StreamImpl/5",1075),m(1076,1,ct,Uke),s.Ad=function(n){Te(this.a,n)},v(_c,"StreamImpl/5/2methodref$add$Type",1076),m(725,486,dl,whe),s.zd=function(n){for(this.b=!1;!this.b&&this.c.zd(new zMe(this,n)););return this.b},s.b=!1,v(_c,"StreamImpl/FilterSpliterator",725),m(1066,1,ct,zMe),s.Ad=function(n){S3n(this.a,this.b,n)},v(_c,"StreamImpl/FilterSpliterator/lambda$0$Type",1066),m(1061,724,dl,ZPe),s.Pe=function(n){return m2n(this,u(n,189))},v(_c,"StreamImpl/MapToDoubleSpliterator",1061),m(1065,1,ct,FMe),s.Ad=function(n){Bgn(this.a,this.b,n)},v(_c,"StreamImpl/MapToDoubleSpliterator/lambda$0$Type",1065),m(1060,723,dl,e$e),s.Pe=function(n){return v2n(this,u(n,202))},v(_c,"StreamImpl/MapToIntSpliterator",1060),m(1064,1,ct,JMe),s.Ad=function(n){zgn(this.a,this.b,n)},v(_c,"StreamImpl/MapToIntSpliterator/lambda$0$Type",1064),m(722,486,dl,the),s.zd=function(n){return SNe(this,n)},v(_c,"StreamImpl/MapToObjSpliterator",722),m(1063,1,ct,HMe),s.Ad=function(n){Fgn(this.a,this.b,n)},v(_c,"StreamImpl/MapToObjSpliterator/lambda$0$Type",1063),m(1062,486,dl,yBe),s.zd=function(n){for(;JX(this.b,0);){if(!this.a.zd(new ef))return!1;this.b=lf(this.b,1)}return this.a.zd(n)},s.b=0,v(_c,"StreamImpl/SkipSpliterator",1062),m(1067,1,ct,ef),s.Ad=function(n){},v(_c,"StreamImpl/SkipSpliterator/lambda$0$Type",1067),m(617,1,ct,Oa),s.Ad=function(n){SP(this,n)},v(_c,"StreamImpl/ValueConsumer",617),m(1068,1,ct,ia),s.Ad=function(n){$b()},v(_c,"StreamImpl/lambda$0$Type",1068),m(1069,1,ct,o0),s.Ad=function(n){$b()},v(_c,"StreamImpl/lambda$1$Type",1069),m(1070,1,{},Xke),s.Te=function(n,t){return x2n(this.a,n,t)},v(_c,"StreamImpl/lambda$4$Type",1070),m(1071,1,ct,GMe),s.Ad=function(n){e2n(this.b,this.a,n)},v(_c,"StreamImpl/lambda$5$Type",1071),m(1077,1,ct,Kke),s.Ad=function(n){J7n(this.a,u(n,375))},v(_c,"TerminatableStream/lambda$0$Type",1077),m(2104,1,{}),m(1976,1,{},xb),v("javaemul.internal","ConsoleLogger",1976);var _Bn=0;m(2096,1,{}),m(1800,1,ct,Sl),s.Ad=function(n){u(n,321)},v(J8,"BowyerWatsonTriangulation/lambda$0$Type",1800),m(1801,1,ct,Vke),s.Ad=function(n){ac(this.a,u(n,321).e)},v(J8,"BowyerWatsonTriangulation/lambda$1$Type",1801),m(1802,1,ct,cd),s.Ad=function(n){u(n,177)},v(J8,"BowyerWatsonTriangulation/lambda$2$Type",1802),m(1797,1,Yt,Yke),s.Le=function(n,t){return T6n(this.a,u(n,177),u(t,177))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(J8,"NaiveMinST/lambda$0$Type",1797),m(440,1,{},dj),v(J8,"NodeMicroLayout",440),m(177,1,{177:1},g4),s.Fb=function(n){var t;return X(n,177)?(t=u(n,177),Ku(this.a,t.a)&&Ku(this.b,t.b)||Ku(this.a,t.b)&&Ku(this.b,t.a)):!1},s.Hb=function(){return Bv(this.a)+Bv(this.b)};var LBn=v(J8,"TEdge",177);m(321,1,{321:1},lge),s.Fb=function(n){var t;return X(n,321)?(t=u(n,321),oB(this,t.a)&&oB(this,t.b)&&oB(this,t.c)):!1},s.Hb=function(){return Bv(this.a)+Bv(this.b)+Bv(this.c)},v(J8,"TTriangle",321),m(225,1,{225:1},P$),v(J8,"Tree",225),m(1183,1,{},q_e),v(_Ye,"Scanline",1183);var Enn=Gi(_Ye,LYe);m(1728,1,{},qRe),v(t1,"CGraph",1728),m(320,1,{320:1},R_e),s.b=0,s.c=0,s.d=0,s.g=0,s.i=0,s.k=Ir,v(t1,"CGroup",320),m(814,1,{},doe),v(t1,"CGroup/CGroupBuilder",814),m(60,1,{60:1},rNe),s.Ib=function(){var n;return this.j?Pt(this.j.Kb(this)):(M1(wJ),wJ.o+"@"+(n=jw(this)>>>0,n.toString(16)))},s.f=0,s.i=Ir;var wJ=v(t1,"CNode",60);m(813,1,{},boe),v(t1,"CNode/CNodeBuilder",813);var Snn;m(1551,1,{},s0),s.df=function(n,t){return 0},s.ef=function(n,t){return 0},v(t1,$Ye,1551),m(1830,1,{},uh),s.af=function(n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D;for(b=Vi,r=new P(n.a.b);r.ar.d.c||r.d.c==o.d.c&&r.d.b0?n+this.n.d+this.n.a:0},s.gf=function(){var n,t,i,r,c;if(c=0,this.e)this.b?c=this.b.a:this.a[1][1]&&(c=this.a[1][1].gf());else if(this.g)c=ide(this,tW(this,null,!0));else for(t=(wa(),F(z(dm,1),Ee,237,0,[Ou,No,Nu])),i=0,r=t.length;i0?c+this.n.b+this.n.c:0},s.hf=function(){var n,t,i,r,c;if(this.g)for(n=tW(this,null,!1),i=(wa(),F(z(dm,1),Ee,237,0,[Ou,No,Nu])),r=0,c=i.length;r0&&(r[0]+=this.d,i-=r[0]),r[2]>0&&(r[2]+=this.d,i-=r[2]),this.c.a=k.Math.max(0,i),this.c.d=t.d+n.d+(this.c.a-i)/2,r[1]=k.Math.max(r[1],i),Wae(this,No,t.d+n.d+r[0]-(r[1]-i)/2,r)},s.b=null,s.d=0,s.e=!1,s.f=!1,s.g=!1;var wte=0,pJ=0;v(dg,"GridContainerCell",1499),m(461,23,{3:1,35:1,23:1,461:1},UX);var rb,Oh,qf,Nnn=yt(dg,"HorizontalLabelAlignment",461,Tt,nyn,T2n),Inn;m(318,216,{216:1,318:1},O_e,GRe,E_e),s.ff=function(){return sIe(this)},s.gf=function(){return wfe(this)},s.a=0,s.c=!1;var PBn=v(dg,"LabelCell",318);m(253,337,{216:1,337:1,253:1},HE),s.ff=function(){return QE(this)},s.gf=function(){return WE(this)},s.hf=function(){GW(this)},s.jf=function(){qW(this)},s.b=0,s.c=0,s.d=!1,v(dg,"StripContainerCell",253),m(1655,1,zt,b5),s.Mb=function(n){return _bn(u(n,216))},v(dg,"StripContainerCell/lambda$0$Type",1655),m(1656,1,{},l0),s.We=function(n){return u(n,216).gf()},v(dg,"StripContainerCell/lambda$1$Type",1656),m(1657,1,zt,ud),s.Mb=function(n){return Lbn(u(n,216))},v(dg,"StripContainerCell/lambda$2$Type",1657),m(1658,1,{},Cp),s.We=function(n){return u(n,216).ff()},v(dg,"StripContainerCell/lambda$3$Type",1658),m(462,23,{3:1,35:1,23:1,462:1},XX);var Uf,cb,ja,Dnn=yt(dg,"VerticalLabelAlignment",462,Tt,tyn,O2n),_nn;m(787,1,{},Mge),s.c=0,s.d=0,s.k=0,s.s=0,s.t=0,s.v=!1,s.w=0,s.D=!1,s.F=!1,v(sF,"NodeContext",787),m(1497,1,Yt,oh),s.Le=function(n,t){return vTe(u(n,64),u(t,64))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(sF,"NodeContext/0methodref$comparePortSides$Type",1497),m(1498,1,Yt,Tp),s.Le=function(n,t){return mMn(u(n,115),u(t,115))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(sF,"NodeContext/1methodref$comparePortContexts$Type",1498),m(168,23,{3:1,35:1,23:1,168:1},Bl);var Lnn,Pnn,$nn,Rnn,Bnn,znn,Fnn,Jnn,Hnn,Gnn,qnn,Unn,Xnn,Knn,Vnn,Ynn,Qnn,Wnn,Znn,etn,ntn,pte,ttn=yt(sF,"NodeLabelLocation",168,Tt,DQ,N2n),itn;m(115,1,{115:1},zqe),s.a=!1,v(sF,"PortContext",115),m(1502,1,ct,Gg),s.Ad=function(n){_Ae(u(n,318))},v(jN,YYe,1502),m(1503,1,zt,qg),s.Mb=function(n){return!!u(n,115).c},v(jN,QYe,1503),m(1504,1,ct,Ug),s.Ad=function(n){_Ae(u(n,115).c)},v(jN,"LabelPlacer/lambda$2$Type",1504);var Qme;m(1501,1,ct,sd),s.Ad=function(n){v2(),dbn(u(n,115))},v(jN,"NodeLabelAndSizeUtilities/lambda$0$Type",1501),m(788,1,ct,Kle),s.Ad=function(n){Mgn(this.b,this.c,this.a,u(n,187))},s.a=!1,s.c=!1,v(jN,"NodeLabelCellCreator/lambda$0$Type",788),m(1500,1,ct,Zke),s.Ad=function(n){pbn(this.a,u(n,187))},v(jN,"PortContextCreator/lambda$0$Type",1500);var mJ;m(1872,1,{},Xg),v(G8,"GreedyRectangleStripOverlapRemover",1872),m(1873,1,Yt,Mb),s.Le=function(n,t){return cpn(u(n,226),u(t,226))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(G8,"GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type",1873),m(1826,1,{},sxe),s.a=5,s.e=0,v(G8,"RectangleStripOverlapRemover",1826),m(1827,1,Yt,g5),s.Le=function(n,t){return upn(u(n,226),u(t,226))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(G8,"RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type",1827),m(1829,1,Yt,Op),s.Le=function(n,t){return z3n(u(n,226),u(t,226))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(G8,"RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type",1829),m(409,23,{3:1,35:1,23:1,409:1},s$);var KN,mte,vte,VN,rtn=yt(G8,"RectangleStripOverlapRemover/OverlapRemovalDirection",409,Tt,Zyn,I2n),ctn;m(226,1,{226:1},aV),v(G8,"RectangleStripOverlapRemover/RectangleNode",226),m(1828,1,ct,eje),s.Ad=function(n){VSn(this.a,u(n,226))},v(G8,"RectangleStripOverlapRemover/lambda$1$Type",1828);var utn=!1,QS,Wme;m(1798,1,ct,Np),s.Ad=function(n){KKe(u(n,225))},v(wy,"DepthFirstCompaction/0methodref$compactTree$Type",1798),m(810,1,ct,Wue),s.Ad=function(n){b5n(this.a,u(n,225))},v(wy,"DepthFirstCompaction/lambda$1$Type",810),m(1799,1,ct,LNe),s.Ad=function(n){PEn(this.a,this.b,this.c,u(n,225))},v(wy,"DepthFirstCompaction/lambda$2$Type",1799);var WS,Zme;m(68,1,{68:1},X_e),v(wy,"Node",68),m(1179,1,{},$Te),v(wy,"ScanlineOverlapCheck",1179),m(1180,1,{683:1},m_e),s._e=function(n){Gpn(this,u(n,442))},v(wy,"ScanlineOverlapCheck/OverlapsScanlineHandler",1180),m(1181,1,Yt,uu),s.Le=function(n,t){return Ejn(u(n,68),u(t,68))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(wy,"ScanlineOverlapCheck/OverlapsScanlineHandler/lambda$0$Type",1181),m(442,1,{442:1},lse),s.a=!1,v(wy,"ScanlineOverlapCheck/Timestamp",442),m(1182,1,Yt,w5),s.Le=function(n,t){return Vxn(u(n,442),u(t,442))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(wy,"ScanlineOverlapCheck/lambda$0$Type",1182),m(545,1,{},Kg),v("org.eclipse.elk.alg.common.utils","SVGImage",545),m(748,1,{},rv),v(VZ,twe,748),m(1164,1,Yt,p5),s.Le=function(n,t){return ETn(u(n,235),u(t,235))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(VZ,eQe,1164),m(1165,1,ct,qMe),s.Ad=function(n){gyn(this.b,this.a,u(n,251))},v(VZ,iwe,1165),m(214,1,ep),v(y3,"AbstractLayoutProvider",214),m(726,214,ep,goe),s.kf=function(n,t){OUe(this,n,t)},v(VZ,"ForceLayoutProvider",726);var $Bn=Gi(EN,nQe);m(150,1,{3:1,105:1,150:1},Vg),s.of=function(n,t){return SO(this,n,t)},s.lf=function(){return EIe(this)},s.mf=function(n){return C(this,n)},s.nf=function(n){return wi(this,n)},v(EN,"MapPropertyHolder",150),m(313,150,{3:1,313:1,105:1,150:1}),v(SN,"FParticle",313),m(251,313,{3:1,251:1,313:1,105:1,150:1},sDe),s.Ib=function(){var n;return this.a?(n=pu(this.a.a,this,0),n>=0?"b"+n+"["+iY(this.a)+"]":"b["+iY(this.a)+"]"):"b_"+jw(this)},v(SN,"FBendpoint",251),m(291,150,{3:1,291:1,105:1,150:1},tNe),s.Ib=function(){return iY(this)},v(SN,"FEdge",291),m(235,150,{3:1,235:1,105:1,150:1},WR);var RBn=v(SN,"FGraph",235);m(445,313,{3:1,445:1,313:1,105:1,150:1},fPe),s.Ib=function(){return this.b==null||this.b.length==0?"l["+iY(this.a)+"]":"l_"+this.b},v(SN,"FLabel",445),m(155,313,{3:1,155:1,313:1,105:1,150:1},RTe),s.Ib=function(){return Aae(this)},s.a=0,v(SN,"FNode",155),m(2062,1,{}),s.qf=function(n){ige(this,n)},s.rf=function(){bHe(this)},s.d=0,v(rwe,"AbstractForceModel",2062),m(631,2062,{631:1},ize),s.pf=function(n,t){var i,r,c,o,l;return QKe(this.f,n,t),c=Nr(pc(t.d),n.d),l=k.Math.sqrt(c.a*c.a+c.b*c.b),r=k.Math.max(0,l-aE(n.e)/2-aE(t.e)/2),i=Oqe(this.e,n,t),i>0?o=-N3n(r,this.c)*i:o=ypn(r,this.b)*u(C(n,(Hf(),Ay)),15).a,A1(c,o/l),c},s.qf=function(n){ige(this,n),this.a=u(C(n,(Hf(),yJ)),15).a,this.c=ne(re(C(n,kJ))),this.b=ne(re(C(n,kte)))},s.sf=function(n){return n0&&(o-=Obn(r,this.a)*i),A1(c,o*this.b/l),c},s.qf=function(n){var t,i,r,c,o,l,f;for(ige(this,n),this.b=ne(re(C(n,(Hf(),jte)))),this.c=this.b/u(C(n,yJ),15).a,r=n.e.c.length,o=0,c=0,f=new P(n.e);f.a0},s.a=0,s.b=0,s.c=0,v(rwe,"FruchtermanReingoldModel",632);var xy=Gi(yu,"ILayoutMetaDataProvider");m(844,1,Ua,vC),s.tf=function(n){en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,lF),""),"Force Model"),"Determines the model for force calculation."),eve),(lg(),Bi)),nve),rn((vh(),Cn))))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,cwe),""),"Iterations"),"The number of iterations on the force model."),ke(300)),dc),jr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,uwe),""),"Repulsive Power"),"Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model"),ke(0)),dc),jr),rn(xa)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,YZ),""),"FR Temperature"),"The temperature is used as a scaling factor for particle displacements."),xh),ec),gr),rn(Cn)))),qi(n,YZ,lF,dtn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,QZ),""),"Eades Repulsion"),"Factor for repulsive forces in Eades' model."),5),ec),gr),rn(Cn)))),qi(n,QZ,lF,ftn),BVe((new tP,n))};var otn,stn,eve,ltn,ftn,atn,htn,dtn;v(kS,"ForceMetaDataProvider",844),m(424,23,{3:1,35:1,23:1,424:1},fse);var yte,vJ,nve=yt(kS,"ForceModelStrategy",424,Tt,a4n,_2n),btn;m(984,1,Ua,tP),s.tf=function(n){BVe(n)};var gtn,wtn,tve,yJ,ive,ptn,mtn,vtn,ytn,rve,ktn,cve,uve,jtn,Ay,Etn,kte,ove,Stn,xtn,kJ,jte,Atn,Mtn,Ctn,sve,Ttn;v(kS,"ForceOptions",984),m(985,1,{},cv),s.uf=function(){var n;return n=new goe,n},s.vf=function(n){},v(kS,"ForceOptions/ForceFactory",985);var YN,ZS,My,jJ;m(845,1,Ua,iP),s.tf=function(n){en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,swe),""),"Fixed Position"),"Prevent that the node is moved by the layout algorithm."),($n(),!1)),(lg(),xr)),Qi),rn((vh(),fr))))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,lwe),""),"Desired Edge Length"),"Either specified for parent nodes or for individual edges, where the latter takes higher precedence."),100),ec),gr),Ci(Cn,F(z(Wa,1),Ee,160,0,[xa]))))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,fwe),""),"Layout Dimension"),"Dimensions that are permitted to be altered during layout."),lve),Bi),wve),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,awe),""),"Stress Epsilon"),"Termination criterion for the iterative process."),xh),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,hwe),""),"Iteration Limit"),"Maximum number of performed iterations. Takes higher precedence than 'epsilon'."),ke(oi)),dc),jr),rn(Cn)))),dVe((new AU,n))};var Otn,Ntn,lve,Itn,Dtn,_tn;v(kS,"StressMetaDataProvider",845),m(988,1,Ua,AU),s.tf=function(n){dVe(n)};var EJ,fve,ave,hve,dve,bve,Ltn,Ptn,$tn,Rtn,gve,Btn;v(kS,"StressOptions",988),m(989,1,{},m5),s.uf=function(){var n;return n=new iNe,n},s.vf=function(n){},v(kS,"StressOptions/StressFactory",989),m(1080,214,ep,iNe),s.kf=function(n,t){var i,r,c,o,l;for(t.Tg(uQe,1),Fe(ze(je(n,(RO(),dve))))?Fe(ze(je(n,gve)))||qT((i=new dj((Rb(),new v0(n))),i)):OUe(new goe,n,t.dh(1)),c=Ize(n),r=SKe(this.a,c),l=r.Jc();l.Ob();)o=u(l.Pb(),235),!(o.e.c.length<=1)&&(ULn(this.b,o),mOn(this.b),Ao(o.d,new v5));c=PVe(r),qVe(c),t.Ug()},v(hF,"StressLayoutProvider",1080),m(1081,1,ct,v5),s.Ad=function(n){hge(u(n,445))},v(hF,"StressLayoutProvider/lambda$0$Type",1081),m(986,1,{},txe),s.c=0,s.e=0,s.g=0,v(hF,"StressMajorization",986),m(384,23,{3:1,35:1,23:1,384:1},KX);var Ete,Ste,xte,wve=yt(hF,"StressMajorization/Dimension",384,Tt,Z4n,L2n),ztn;m(987,1,Yt,nje),s.Le=function(n,t){return a2n(this.a,u(n,155),u(t,155))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(hF,"StressMajorization/lambda$0$Type",987),m(1161,1,{},pLe),v(vy,"ElkLayered",1161),m(1162,1,ct,tje),s.Ad=function(n){uTn(this.a,u(n,37))},v(vy,"ElkLayered/lambda$0$Type",1162),m(1163,1,ct,ije),s.Ad=function(n){p2n(this.a,u(n,37))},v(vy,"ElkLayered/lambda$1$Type",1163),m(1246,1,{},PTe);var Ftn,Jtn,Htn;v(vy,"GraphConfigurator",1246),m(757,1,ct,Zue),s.Ad=function(n){NGe(this.a,u(n,9))},v(vy,"GraphConfigurator/lambda$0$Type",757),m(758,1,{},b1),s.Kb=function(n){return Vde(),new mn(null,new vn(u(n,25).a,16))},v(vy,"GraphConfigurator/lambda$1$Type",758),m(759,1,ct,eoe),s.Ad=function(n){NGe(this.a,u(n,9))},v(vy,"GraphConfigurator/lambda$2$Type",759),m(1079,214,ep,rxe),s.kf=function(n,t){var i;i=SLn(new fxe,n),ue(je(n,(Ie(),Em)))===ue((B1(),Wd))?Djn(this.a,i,t):bOn(this.a,i,t),t.Zg()||TVe(new kC,i)},v(vy,"LayeredLayoutProvider",1079),m(363,23,{3:1,35:1,23:1,363:1},sT);var Xf,c1,eo,no,Pc,pve=yt(vy,"LayeredPhases",363,Tt,V6n,P2n),Gtn;m(1683,1,{},EBe),s.i=0;var qtn;v(ON,"ComponentsToCGraphTransformer",1683);var Utn;m(1684,1,{},Ws),s.wf=function(n,t){return k.Math.min(n.a!=null?ne(n.a):n.c.i,t.a!=null?ne(t.a):t.c.i)},s.xf=function(n,t){return k.Math.min(n.a!=null?ne(n.a):n.c.i,t.a!=null?ne(t.a):t.c.i)},v(ON,"ComponentsToCGraphTransformer/1",1684),m(82,1,{82:1}),s.i=0,s.k=!0,s.o=Ir;var Ate=v(xS,"CNode",82);m(460,82,{460:1,82:1},hle,Sde),s.Ib=function(){return""},v(ON,"ComponentsToCGraphTransformer/CRectNode",460),m(1652,1,{},xf);var Mte,Cte;v(ON,"OneDimensionalComponentsCompaction",1652),m(1653,1,{},vt),s.Kb=function(n){return N4n(u(n,49))},s.Fb=function(n){return this===n},v(ON,"OneDimensionalComponentsCompaction/lambda$0$Type",1653),m(1654,1,{},kc),s.Kb=function(n){return Rjn(u(n,49))},s.Fb=function(n){return this===n},v(ON,"OneDimensionalComponentsCompaction/lambda$1$Type",1654),m(1686,1,{},yDe),v(xS,"CGraph",1686),m(194,1,{194:1},OQ),s.b=0,s.c=0,s.e=0,s.g=!0,s.i=Ir,v(xS,"CGroup",194),m(1685,1,{},tc),s.wf=function(n,t){return k.Math.max(n.a!=null?ne(n.a):n.c.i,t.a!=null?ne(t.a):t.c.i)},s.xf=function(n,t){return k.Math.max(n.a!=null?ne(n.a):n.c.i,t.a!=null?ne(t.a):t.c.i)},v(xS,$Ye,1685),m(1687,1,{},Iqe),s.d=!1;var Xtn,Tte=v(xS,zYe,1687);m(1688,1,{},tk),s.Kb=function(n){return Zoe(),$n(),u(u(n,49).a,82).d.e!=0},s.Fb=function(n){return this===n},v(xS,FYe,1688),m(817,1,{},mfe),s.a=!1,s.b=!1,s.c=!1,s.d=!1,v(xS,JYe,817),m(1868,1,{},_Ie),v(dF,HYe,1868);var QN=Gi(bg,LYe);m(1869,1,{377:1},p_e),s._e=function(n){kIn(this,u(n,465))},v(dF,GYe,1869),m(1870,1,Yt,f0),s.Le=function(n,t){return S5n(u(n,82),u(t,82))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(dF,qYe,1870),m(465,1,{465:1},ase),s.a=!1,v(dF,UYe,465),m(1871,1,Yt,Yg),s.Le=function(n,t){return Yxn(u(n,465),u(t,465))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(dF,XYe,1871),m(146,1,{146:1},k9,ofe),s.Fb=function(n){var t;return n==null||BBn!=Us(n)?!1:(t=u(n,146),Ku(this.c,t.c)&&Ku(this.d,t.d))},s.Hb=function(){return zB(F(z(Mr,1),On,1,5,[this.c,this.d]))},s.Ib=function(){return"("+this.c+To+this.d+(this.a?"cx":"")+this.b+")"},s.a=!0,s.c=0,s.d=0;var BBn=v(bg,"Point",146);m(408,23,{3:1,35:1,23:1,408:1},f$);var fp,bm,O3,gm,Ktn=yt(bg,"Point/Quadrant",408,Tt,e6n,D2n),Vtn;m(1674,1,{},cxe),s.b=null,s.c=null,s.d=null,s.e=null,s.f=null;var Ytn,Qtn,Wtn,Ztn,ein;v(bg,"RectilinearConvexHull",1674),m(569,1,{377:1},oz),s._e=function(n){z9n(this,u(n,146))},s.b=0;var mve;v(bg,"RectilinearConvexHull/MaximalElementsEventHandler",569),m(1676,1,Yt,a6),s.Le=function(n,t){return j5n(re(n),re(t))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(bg,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",1676),m(1675,1,{377:1},TRe),s._e=function(n){$Nn(this,u(n,146))},s.a=0,s.b=null,s.c=null,s.d=null,s.e=null,v(bg,"RectilinearConvexHull/RectangleEventHandler",1675),m(1677,1,Yt,Ip),s.Le=function(n,t){return Syn(u(n,146),u(t,146))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(bg,"RectilinearConvexHull/lambda$0$Type",1677),m(1678,1,Yt,Dp),s.Le=function(n,t){return xyn(u(n,146),u(t,146))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(bg,"RectilinearConvexHull/lambda$1$Type",1678),m(1679,1,Yt,_p),s.Le=function(n,t){return Myn(u(n,146),u(t,146))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(bg,"RectilinearConvexHull/lambda$2$Type",1679),m(1680,1,Yt,Lp),s.Le=function(n,t){return Ayn(u(n,146),u(t,146))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(bg,"RectilinearConvexHull/lambda$3$Type",1680),m(1681,1,Yt,xl),s.Le=function(n,t){return DMn(u(n,146),u(t,146))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(bg,"RectilinearConvexHull/lambda$4$Type",1681),m(1682,1,{},U_e),v(bg,"Scanline",1682),m(2066,1,{}),v(Xa,"AbstractGraphPlacer",2066),m(336,1,{336:1},MOe),s.Df=function(n){return this.Ef(n)?(wn(this.b,u(C(n,(me(),K1)),22),n),!0):!1},s.Ef=function(n){var t,i,r,c;for(t=u(C(n,(me(),K1)),22),c=u(vi(Ai,t),22),r=c.Jc();r.Ob();)if(i=u(r.Pb(),22),!u(vi(this.b,i),16).dc())return!1;return!0};var Ai;v(Xa,"ComponentGroup",336),m(766,2066,{},woe),s.Ff=function(n){var t,i;for(i=new P(this.a);i.ai&&(p=0,y+=f+r,f=0),h=o.c,T8(o,p+h.a,y+h.b),fa(h),c=k.Math.max(c,p+b.a),f=k.Math.max(f,b.b),p+=b.a+r;t.f.a=c,t.f.b=y+f},s.Hf=function(n,t){var i,r,c,o,l;if(ue(C(t,(Ie(),bx)))===ue((W4(),ex))){for(r=n.Jc();r.Ob();){for(i=u(r.Pb(),37),l=0,o=new P(i.a);o.ai&&!u(C(o,(me(),K1)),22).Gc((De(),Kn))||h&&u(C(h,(me(),K1)),22).Gc((De(),et))||u(C(o,(me(),K1)),22).Gc((De(),Vn)))&&(S=y,A+=f+r,f=0),b=o.c,u(C(o,(me(),K1)),22).Gc((De(),Kn))&&(S=c+r),T8(o,S+b.a,A+b.b),c=k.Math.max(c,S+p.a),u(C(o,K1),22).Gc(bt)&&(y=k.Math.max(y,S+p.a+r)),fa(b),f=k.Math.max(f,p.b),S+=p.a+r,h=o;t.f.a=c,t.f.b=A+f},s.Hf=function(n,t){},v(Xa,"ModelOrderRowGraphPlacer",1277),m(1275,1,Yt,OA),s.Le=function(n,t){return z7n(u(n,37),u(t,37))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Xa,"SimpleRowGraphPlacer/1",1275);var tin;m(1245,1,Sh,h6),s.Lb=function(n){var t;return t=u(C(u(n,250).b,(Ie(),Wc)),78),!!t&&t.b!=0},s.Fb=function(n){return this===n},s.Mb=function(n){var t;return t=u(C(u(n,250).b,(Ie(),Wc)),78),!!t&&t.b!=0},v(bF,"CompoundGraphPostprocessor/1",1245),m(1244,1,Mi,axe),s.If=function(n,t){YJe(this,u(n,37),t)},v(bF,"CompoundGraphPreprocessor",1244),m(444,1,{444:1},$Fe),s.c=!1,v(bF,"CompoundGraphPreprocessor/ExternalPort",444),m(250,1,{250:1},W$),s.Ib=function(){return RK(this.c)+":"+Aqe(this.b)},v(bF,"CrossHierarchyEdge",250),m(764,1,Yt,noe),s.Le=function(n,t){return jxn(this,u(n,250),u(t,250))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(bF,"CrossHierarchyEdgeComparator",764),m(246,150,{3:1,246:1,105:1,150:1}),s.p=0,v(Zu,"LGraphElement",246),m(17,246,{3:1,17:1,246:1,105:1,150:1},Ow),s.Ib=function(){return Aqe(this)};var w7=v(Zu,"LEdge",17);m(37,246,{3:1,20:1,37:1,246:1,105:1,150:1},$he),s.Ic=function(n){cc(this,n)},s.Jc=function(){return new P(this.b)},s.Ib=function(){return this.b.c.length==0?"G-unlayered"+Ja(this.a):this.a.c.length==0?"G-layered"+Ja(this.b):"G[layerless"+Ja(this.a)+", layers"+Ja(this.b)+"]"};var iin=v(Zu,"LGraph",37),rin;m(655,1,{}),s.Jf=function(){return this.e.n},s.mf=function(n){return C(this.e,n)},s.Kf=function(){return this.e.o},s.Lf=function(){return this.e.p},s.nf=function(n){return wi(this.e,n)},s.Mf=function(n){this.e.n.a=n.a,this.e.n.b=n.b},s.Nf=function(n){this.e.o.a=n.a,this.e.o.b=n.b},s.Of=function(n){this.e.p=n},v(Zu,"LGraphAdapters/AbstractLShapeAdapter",655),m(464,1,{837:1},bj),s.Pf=function(){var n,t;if(!this.b)for(this.b=Jh(this.a.b.c.length),t=new P(this.a.b);t.a0&&dFe((Qn(t-1,n.length),n.charCodeAt(t-1)),hQe);)--t;if(o> ",n),wz(i)),Kt(uo((n.a+="[",n),i.i),"]")),n.a},s.c=!0,s.d=!1;var Eve,Sve,xve,Ave,Mve,Cve,uin=v(Zu,"LPort",12);m(399,1,Zh,l9),s.Ic=function(n){cc(this,n)},s.Jc=function(){var n;return n=new P(this.a.e),new rje(n)},v(Zu,"LPort/1",399),m(1273,1,Fr,rje),s.Nb=function(n){Zr(this,n)},s.Pb=function(){return u(_(this.a),17).c},s.Ob=function(){return gu(this.a)},s.Qb=function(){sE(this.a)},v(Zu,"LPort/1/1",1273),m(365,1,Zh,i4),s.Ic=function(n){cc(this,n)},s.Jc=function(){var n;return n=new P(this.a.g),new toe(n)},v(Zu,"LPort/2",365),m(763,1,Fr,toe),s.Nb=function(n){Zr(this,n)},s.Pb=function(){return u(_(this.a),17).d},s.Ob=function(){return gu(this.a)},s.Qb=function(){sE(this.a)},v(Zu,"LPort/2/1",763),m(1266,1,Zh,XMe),s.Ic=function(n){cc(this,n)},s.Jc=function(){return new Pa(this)},v(Zu,"LPort/CombineIter",1266),m(207,1,Fr,Pa),s.Nb=function(n){Zr(this,n)},s.Qb=function(){AAe()},s.Ob=function(){return Zj(this)},s.Pb=function(){return gu(this.a)?_(this.a):_(this.b)},v(Zu,"LPort/CombineIter/1",207),m(1267,1,Sh,k5),s.Lb=function(n){return qIe(n)},s.Fb=function(n){return this===n},s.Mb=function(n){return ss(),u(n,12).g.c.length!=0},v(Zu,"LPort/lambda$0$Type",1267),m(1268,1,Sh,a0),s.Lb=function(n){return UIe(n)},s.Fb=function(n){return this===n},s.Mb=function(n){return ss(),u(n,12).e.c.length!=0},v(Zu,"LPort/lambda$1$Type",1268),m(1269,1,Sh,_h),s.Lb=function(n){return ss(),u(n,12).j==(De(),Kn)},s.Fb=function(n){return this===n},s.Mb=function(n){return ss(),u(n,12).j==(De(),Kn)},v(Zu,"LPort/lambda$2$Type",1269),m(1270,1,Sh,uk),s.Lb=function(n){return ss(),u(n,12).j==(De(),et)},s.Fb=function(n){return this===n},s.Mb=function(n){return ss(),u(n,12).j==(De(),et)},v(Zu,"LPort/lambda$3$Type",1270),m(1271,1,Sh,NA),s.Lb=function(n){return ss(),u(n,12).j==(De(),bt)},s.Fb=function(n){return this===n},s.Mb=function(n){return ss(),u(n,12).j==(De(),bt)},v(Zu,"LPort/lambda$4$Type",1271),m(1272,1,Sh,j5),s.Lb=function(n){return ss(),u(n,12).j==(De(),Vn)},s.Fb=function(n){return this===n},s.Mb=function(n){return ss(),u(n,12).j==(De(),Vn)},v(Zu,"LPort/lambda$5$Type",1272),m(25,246,{3:1,20:1,246:1,25:1,105:1,150:1},Xu),s.Ic=function(n){cc(this,n)},s.Jc=function(){return new P(this.a)},s.Ib=function(){return"L_"+pu(this.b.b,this,0)+Ja(this.a)},v(Zu,"Layer",25),m(1659,1,{},L$e),s.b=0,v(Zu,"Tarjan",1659),m(1282,1,{},fxe),v(Jd,wQe,1282),m(1286,1,{},ok),s.Kb=function(n){return iu(u(n,84))},v(Jd,"ElkGraphImporter/0methodref$connectableShapeToNode$Type",1286),m(1289,1,{},ov),s.Kb=function(n){return iu(u(n,84))},v(Jd,"ElkGraphImporter/1methodref$connectableShapeToNode$Type",1289),m(1283,1,ct,cje),s.Ad=function(n){Hqe(this.a,u(n,125))},v(Jd,iwe,1283),m(1284,1,ct,uje),s.Ad=function(n){Hqe(this.a,u(n,125))},v(Jd,pQe,1284),m(1285,1,{},Lh),s.Kb=function(n){return new mn(null,new vn(tae(u(n,85)),16))},v(Jd,mQe,1285),m(1287,1,zt,oje),s.Mb=function(n){return dwn(this.a,u(n,26))},v(Jd,vQe,1287),m(1288,1,{},sv),s.Kb=function(n){return new mn(null,new vn(v5n(u(n,85)),16))},v(Jd,"ElkGraphImporter/lambda$5$Type",1288),m(1290,1,zt,sje),s.Mb=function(n){return bwn(this.a,u(n,26))},v(Jd,"ElkGraphImporter/lambda$7$Type",1290),m(1291,1,zt,sk),s.Mb=function(n){return _5n(u(n,85))},v(Jd,"ElkGraphImporter/lambda$8$Type",1291),m(1261,1,{},kC);var oin;v(Jd,"ElkGraphLayoutTransferrer",1261),m(1262,1,zt,lje),s.Mb=function(n){return c2n(this.a,u(n,17))},v(Jd,"ElkGraphLayoutTransferrer/lambda$0$Type",1262),m(1263,1,ct,fje),s.Ad=function(n){cT(),Te(this.a,u(n,17))},v(Jd,"ElkGraphLayoutTransferrer/lambda$1$Type",1263),m(1264,1,zt,aje),s.Mb=function(n){return qpn(this.a,u(n,17))},v(Jd,"ElkGraphLayoutTransferrer/lambda$2$Type",1264),m(1265,1,ct,hje),s.Ad=function(n){cT(),Te(this.a,u(n,17))},v(Jd,"ElkGraphLayoutTransferrer/lambda$3$Type",1265),m(806,1,{},Lle),v(Wn,"BiLinkedHashMultiMap",806),m(1511,1,Mi,d6),s.If=function(n,t){c7n(u(n,37),t)},v(Wn,"CommentNodeMarginCalculator",1511),m(1512,1,{},Wg),s.Kb=function(n){return new mn(null,new vn(u(n,25).a,16))},v(Wn,"CommentNodeMarginCalculator/lambda$0$Type",1512),m(1513,1,ct,kD),s.Ad=function(n){kLn(u(n,9))},v(Wn,"CommentNodeMarginCalculator/lambda$1$Type",1513),m(1514,1,Mi,IA),s.If=function(n,t){CIn(u(n,37),t)},v(Wn,"CommentPostprocessor",1514),m(1515,1,Mi,jD),s.If=function(n,t){K$n(u(n,37),t)},v(Wn,"CommentPreprocessor",1515),m(1516,1,Mi,E5),s.If=function(n,t){FNn(u(n,37),t)},v(Wn,"ConstraintsPostprocessor",1516),m(1517,1,Mi,oq),s.If=function(n,t){O7n(u(n,37),t)},v(Wn,"EdgeAndLayerConstraintEdgeReverser",1517),m(1518,1,Mi,ED),s.If=function(n,t){cEn(u(n,37),t)},v(Wn,"EndLabelPostprocessor",1518),m(1519,1,{},SD),s.Kb=function(n){return new mn(null,new vn(u(n,25).a,16))},v(Wn,"EndLabelPostprocessor/lambda$0$Type",1519),m(1520,1,zt,DA),s.Mb=function(n){return H6n(u(n,9))},v(Wn,"EndLabelPostprocessor/lambda$1$Type",1520),m(1521,1,ct,sq),s.Ad=function(n){Qxn(u(n,9))},v(Wn,"EndLabelPostprocessor/lambda$2$Type",1521),m(1522,1,Mi,lq),s.If=function(n,t){DCn(u(n,37),t)},v(Wn,"EndLabelPreprocessor",1522),m(1523,1,{},lk),s.Kb=function(n){return new mn(null,new vn(u(n,25).a,16))},v(Wn,"EndLabelPreprocessor/lambda$0$Type",1523),m(1524,1,ct,PNe),s.Ad=function(n){Cgn(this.a,this.b,this.c,u(n,9))},s.a=0,s.b=0,s.c=!1,v(Wn,"EndLabelPreprocessor/lambda$1$Type",1524),m(1525,1,zt,Zg),s.Mb=function(n){return ue(C(u(n,70),(Ie(),Ih)))===ue((Ra(),G7))},v(Wn,"EndLabelPreprocessor/lambda$2$Type",1525),m(1526,1,ct,dje),s.Ad=function(n){Vt(this.a,u(n,70))},v(Wn,"EndLabelPreprocessor/lambda$3$Type",1526),m(1527,1,zt,_A),s.Mb=function(n){return ue(C(u(n,70),(Ie(),Ih)))===ue((Ra(),Fm))},v(Wn,"EndLabelPreprocessor/lambda$4$Type",1527),m(1528,1,ct,bje),s.Ad=function(n){Vt(this.a,u(n,70))},v(Wn,"EndLabelPreprocessor/lambda$5$Type",1528),m(1576,1,Mi,MU),s.If=function(n,t){yjn(u(n,37),t)};var sin;v(Wn,"EndLabelSorter",1576),m(1577,1,Yt,LA),s.Le=function(n,t){return FEn(u(n,455),u(t,455))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Wn,"EndLabelSorter/1",1577),m(455,1,{455:1},s_e),v(Wn,"EndLabelSorter/LabelGroup",455),m(1578,1,{},S5),s.Kb=function(n){return rT(),new mn(null,new vn(u(n,25).a,16))},v(Wn,"EndLabelSorter/lambda$0$Type",1578),m(1579,1,zt,x5),s.Mb=function(n){return rT(),u(n,9).k==(Fn(),Wi)},v(Wn,"EndLabelSorter/lambda$1$Type",1579),m(1580,1,ct,xD),s.Ad=function(n){XMn(u(n,9))},v(Wn,"EndLabelSorter/lambda$2$Type",1580),m(1581,1,zt,PA),s.Mb=function(n){return rT(),ue(C(u(n,70),(Ie(),Ih)))===ue((Ra(),Fm))},v(Wn,"EndLabelSorter/lambda$3$Type",1581),m(1582,1,zt,AD),s.Mb=function(n){return rT(),ue(C(u(n,70),(Ie(),Ih)))===ue((Ra(),G7))},v(Wn,"EndLabelSorter/lambda$4$Type",1582),m(1529,1,Mi,b6),s.If=function(n,t){RLn(this,u(n,37))},s.b=0,s.c=0,v(Wn,"FinalSplineBendpointsCalculator",1529),m(1530,1,{},ew),s.Kb=function(n){return new mn(null,new vn(u(n,25).a,16))},v(Wn,"FinalSplineBendpointsCalculator/lambda$0$Type",1530),m(1531,1,{},$A),s.Kb=function(n){return new mn(null,new A2(new Un(Yn(Ii(u(n,9)).a.Jc(),new ee))))},v(Wn,"FinalSplineBendpointsCalculator/lambda$1$Type",1531),m(1532,1,zt,g6),s.Mb=function(n){return!uc(u(n,17))},v(Wn,"FinalSplineBendpointsCalculator/lambda$2$Type",1532),m(1533,1,zt,$p),s.Mb=function(n){return wi(u(n,17),(me(),Eg))},v(Wn,"FinalSplineBendpointsCalculator/lambda$3$Type",1533),m(1534,1,ct,gje),s.Ad=function(n){UDn(this.a,u(n,132))},v(Wn,"FinalSplineBendpointsCalculator/lambda$4$Type",1534),m(1535,1,ct,RA),s.Ad=function(n){qO(u(n,17).a)},v(Wn,"FinalSplineBendpointsCalculator/lambda$5$Type",1535),m(790,1,Mi,ioe),s.If=function(n,t){IPn(this,u(n,37),t)},v(Wn,"GraphTransformer",790),m(502,23,{3:1,35:1,23:1,502:1},hse);var Dte,ZN,lin=yt(Wn,"GraphTransformer/Mode",502,Tt,h4n,B2n),fin;m(1536,1,Mi,fk),s.If=function(n,t){eNn(u(n,37),t)},v(Wn,"HierarchicalNodeResizingProcessor",1536),m(1537,1,Mi,MD),s.If=function(n,t){U8n(u(n,37),t)},v(Wn,"HierarchicalPortConstraintProcessor",1537),m(1538,1,Yt,ak),s.Le=function(n,t){return oSn(u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Wn,"HierarchicalPortConstraintProcessor/NodeComparator",1538),m(1539,1,Mi,hk),s.If=function(n,t){B_n(u(n,37),t)},v(Wn,"HierarchicalPortDummySizeProcessor",1539),m(1540,1,Mi,CD),s.If=function(n,t){WIn(this,u(n,37),t)},s.a=0,v(Wn,"HierarchicalPortOrthogonalEdgeRouter",1540),m(1541,1,Yt,Ph),s.Le=function(n,t){return opn(u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Wn,"HierarchicalPortOrthogonalEdgeRouter/1",1541),m(1542,1,Yt,lv),s.Le=function(n,t){return q9n(u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Wn,"HierarchicalPortOrthogonalEdgeRouter/2",1542),m(1543,1,Mi,dk),s.If=function(n,t){OMn(u(n,37),t)},v(Wn,"HierarchicalPortPositionProcessor",1543),m(1544,1,Mi,yC),s.If=function(n,t){NRn(this,u(n,37))},s.a=0,s.c=0;var SJ,xJ;v(Wn,"HighDegreeNodeLayeringProcessor",1544),m(566,1,{566:1},w6),s.b=-1,s.d=-1,v(Wn,"HighDegreeNodeLayeringProcessor/HighDegreeNodeInformation",566),m(1545,1,{},fq),s.Kb=function(n){return IT(),cr(u(n,9))},s.Fb=function(n){return this===n},v(Wn,"HighDegreeNodeLayeringProcessor/lambda$0$Type",1545),m(1546,1,{},BA),s.Kb=function(n){return IT(),Ii(u(n,9))},s.Fb=function(n){return this===n},v(Wn,"HighDegreeNodeLayeringProcessor/lambda$1$Type",1546),m(1552,1,Mi,zA),s.If=function(n,t){O_n(this,u(n,37),t)},v(Wn,"HyperedgeDummyMerger",1552),m(791,1,{},Wle),s.a=!1,s.b=!1,s.c=!1,v(Wn,"HyperedgeDummyMerger/MergeState",791),m(1553,1,{},p6),s.Kb=function(n){return new mn(null,new vn(u(n,25).a,16))},v(Wn,"HyperedgeDummyMerger/lambda$0$Type",1553),m(1554,1,{},bk),s.Kb=function(n){return new mn(null,new vn(u(n,9).j,16))},v(Wn,"HyperedgeDummyMerger/lambda$1$Type",1554),m(1555,1,ct,TD),s.Ad=function(n){u(n,12).p=-1},v(Wn,"HyperedgeDummyMerger/lambda$2$Type",1555),m(1556,1,Mi,hq),s.If=function(n,t){T_n(u(n,37),t)},v(Wn,"HypernodesProcessor",1556),m(1557,1,Mi,dq),s.If=function(n,t){R_n(u(n,37),t)},v(Wn,"InLayerConstraintProcessor",1557),m(1558,1,Mi,FA),s.If=function(n,t){y7n(u(n,37),t)},v(Wn,"InnermostNodeMarginCalculator",1558),m(1559,1,Mi,bq),s.If=function(n,t){G$n(this,u(n,37))},s.a=Ir,s.b=Ir,s.c=Vi,s.d=Vi;var zBn=v(Wn,"InteractiveExternalPortPositioner",1559);m(1560,1,{},gq),s.Kb=function(n){return u(n,17).d.i},s.Fb=function(n){return this===n},v(Wn,"InteractiveExternalPortPositioner/lambda$0$Type",1560),m(1561,1,{},wje),s.Kb=function(n){return spn(this.a,re(n))},s.Fb=function(n){return this===n},v(Wn,"InteractiveExternalPortPositioner/lambda$1$Type",1561),m(1562,1,{},wq),s.Kb=function(n){return u(n,17).c.i},s.Fb=function(n){return this===n},v(Wn,"InteractiveExternalPortPositioner/lambda$2$Type",1562),m(1563,1,{},pje),s.Kb=function(n){return lpn(this.a,re(n))},s.Fb=function(n){return this===n},v(Wn,"InteractiveExternalPortPositioner/lambda$3$Type",1563),m(1564,1,{},mje),s.Kb=function(n){return i2n(this.a,re(n))},s.Fb=function(n){return this===n},v(Wn,"InteractiveExternalPortPositioner/lambda$4$Type",1564),m(1565,1,{},vje),s.Kb=function(n){return r2n(this.a,re(n))},s.Fb=function(n){return this===n},v(Wn,"InteractiveExternalPortPositioner/lambda$5$Type",1565),m(79,23,{3:1,35:1,23:1,79:1,196:1},br),s.bg=function(){switch(this.g){case 15:return new iw;case 22:return new Hp;case 48:return new sM;case 29:case 36:return new Sq;case 33:return new d6;case 43:return new IA;case 1:return new jD;case 42:return new E5;case 57:return new ioe((Y9(),ZN));case 0:return new ioe((Y9(),Dte));case 2:return new oq;case 55:return new ED;case 34:return new lq;case 52:return new b6;case 56:return new fk;case 13:return new MD;case 39:return new hk;case 45:return new CD;case 41:return new dk;case 9:return new yC;case 50:return new yOe;case 38:return new zA;case 44:return new hq;case 28:return new dq;case 31:return new FA;case 3:return new bq;case 18:return new aq;case 30:return new pq;case 5:return new CU;case 51:return new yq;case 35:return new W6;case 37:return new xq;case 53:return new MU;case 11:return new ND;case 7:return new TU;case 40:return new Aq;case 46:return new Mq;case 16:return new Cq;case 10:return new jCe;case 49:return new Iq;case 21:return new Dq;case 23:return new JP((rg(),Cx));case 8:return new HA;case 12:return new Lq;case 4:return new ID;case 19:return new rP;case 17:return new RD;case 54:return new v6;case 6:return new Jq;case 25:return new dxe;case 26:return new uM;case 47:return new qA;case 32:return new oNe;case 14:return new UD;case 27:return new Yq;case 20:return new j6;case 24:return new JP((rg(),NH));default:throw R(new qn(tee+(this.f!=null?this.f:""+this.g)))}};var Tve,Ove,Nve,Ive,Dve,_ve,Lve,Pve,$ve,Rve,Bve,N3,AJ,MJ,zve,Fve,Jve,Hve,Gve,qve,Uve,tx,Xve,Kve,Vve,Yve,Qve,_te,CJ,TJ,Wve,OJ,NJ,IJ,p7,wm,pm,Zve,DJ,_J,e3e,LJ,PJ,n3e,t3e,i3e,r3e,$J,Lte,Cy,RJ,BJ,zJ,FJ,c3e,u3e,o3e,s3e,FBn=yt(Wn,iee,79,Tt,JUe,z2n),ain;m(1566,1,Mi,aq),s.If=function(n,t){F$n(u(n,37),t)},v(Wn,"InvertedPortProcessor",1566),m(1567,1,Mi,pq),s.If=function(n,t){zDn(u(n,37),t)},v(Wn,"LabelAndNodeSizeProcessor",1567),m(1568,1,zt,mq),s.Mb=function(n){return u(n,9).k==(Fn(),Wi)},v(Wn,"LabelAndNodeSizeProcessor/lambda$0$Type",1568),m(1569,1,zt,OD),s.Mb=function(n){return u(n,9).k==(Fn(),wr)},v(Wn,"LabelAndNodeSizeProcessor/lambda$1$Type",1569),m(1570,1,ct,BNe),s.Ad=function(n){Tgn(this.b,this.a,this.c,u(n,9))},s.a=!1,s.c=!1,v(Wn,"LabelAndNodeSizeProcessor/lambda$2$Type",1570),m(1571,1,Mi,CU),s.If=function(n,t){v$n(u(n,37),t)};var hin;v(Wn,"LabelDummyInserter",1571),m(1572,1,Sh,vq),s.Lb=function(n){return ue(C(u(n,70),(Ie(),Ih)))===ue((Ra(),H7))},s.Fb=function(n){return this===n},s.Mb=function(n){return ue(C(u(n,70),(Ie(),Ih)))===ue((Ra(),H7))},v(Wn,"LabelDummyInserter/1",1572),m(1573,1,Mi,yq),s.If=function(n,t){u$n(u(n,37),t)},v(Wn,"LabelDummyRemover",1573),m(1574,1,zt,kq),s.Mb=function(n){return Fe(ze(C(u(n,70),(Ie(),H3))))},v(Wn,"LabelDummyRemover/lambda$0$Type",1574),m(1332,1,Mi,W6),s.If=function(n,t){e$n(this,u(n,37),t)},s.a=null;var Pte;v(Wn,"LabelDummySwitcher",1332),m(294,1,{294:1},RXe),s.c=0,s.d=null,s.f=0,v(Wn,"LabelDummySwitcher/LabelDummyInfo",294),m(1333,1,{},jq),s.Kb=function(n){return q4(),new mn(null,new vn(u(n,25).a,16))},v(Wn,"LabelDummySwitcher/lambda$0$Type",1333),m(1334,1,zt,JA),s.Mb=function(n){return q4(),u(n,9).k==(Fn(),Uu)},v(Wn,"LabelDummySwitcher/lambda$1$Type",1334),m(1335,1,{},yje),s.Kb=function(n){return Upn(this.a,u(n,9))},v(Wn,"LabelDummySwitcher/lambda$2$Type",1335),m(1336,1,ct,kje),s.Ad=function(n){K3n(this.a,u(n,294))},v(Wn,"LabelDummySwitcher/lambda$3$Type",1336),m(1337,1,Yt,Eq),s.Le=function(n,t){return E3n(u(n,294),u(t,294))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Wn,"LabelDummySwitcher/lambda$4$Type",1337),m(789,1,Mi,Sq),s.If=function(n,t){x9n(u(n,37),t)},v(Wn,"LabelManagementProcessor",789),m(1575,1,Mi,xq),s.If=function(n,t){pIn(u(n,37),t)},v(Wn,"LabelSideSelector",1575),m(1583,1,Mi,ND),s.If=function(n,t){tLn(u(n,37),t)},v(Wn,"LayerConstraintPostprocessor",1583),m(1584,1,Mi,TU),s.If=function(n,t){eOn(u(n,37),t)};var l3e;v(Wn,"LayerConstraintPreprocessor",1584),m(367,23,{3:1,35:1,23:1,367:1},h$);var eI,JJ,HJ,$te,din=yt(Wn,"LayerConstraintPreprocessor/HiddenNodeConnections",367,Tt,i6n,jmn),bin;m(1585,1,Mi,Aq),s.If=function(n,t){yPn(u(n,37),t)},v(Wn,"LayerSizeAndGraphHeightCalculator",1585),m(1586,1,Mi,Mq),s.If=function(n,t){nNn(u(n,37),t)},v(Wn,"LongEdgeJoiner",1586),m(1587,1,Mi,Cq),s.If=function(n,t){YLn(u(n,37),t)},v(Wn,"LongEdgeSplitter",1587),m(1588,1,Mi,jCe),s.If=function(n,t){D$n(this,u(n,37),t)},s.e=0,s.f=0,s.j=0,s.k=0,s.n=0,s.o=0;var gin,win;v(Wn,"NodePromotion",1588),m(1589,1,Yt,Tq),s.Le=function(n,t){return Skn(u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Wn,"NodePromotion/1",1589),m(1590,1,Yt,Oq),s.Le=function(n,t){return xkn(u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Wn,"NodePromotion/2",1590),m(1591,1,{},Nq),s.Kb=function(n){return u(n,49),Y$(),$n(),!0},s.Fb=function(n){return this===n},v(Wn,"NodePromotion/lambda$0$Type",1591),m(1592,1,{},jje),s.Kb=function(n){return O4n(this.a,u(n,49))},s.Fb=function(n){return this===n},s.a=0,v(Wn,"NodePromotion/lambda$1$Type",1592),m(1593,1,{},Eje),s.Kb=function(n){return T4n(this.a,u(n,49))},s.Fb=function(n){return this===n},s.a=0,v(Wn,"NodePromotion/lambda$2$Type",1593),m(1594,1,Mi,Iq),s.If=function(n,t){jRn(u(n,37),t)},v(Wn,"NorthSouthPortPostprocessor",1594),m(1595,1,Mi,Dq),s.If=function(n,t){CRn(u(n,37),t)},v(Wn,"NorthSouthPortPreprocessor",1595),m(1596,1,Yt,_q),s.Le=function(n,t){return H7n(u(n,12),u(t,12))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Wn,"NorthSouthPortPreprocessor/lambda$0$Type",1596),m(1597,1,Mi,HA),s.If=function(n,t){v_n(u(n,37),t)},v(Wn,"PartitionMidprocessor",1597),m(1598,1,zt,m6),s.Mb=function(n){return wi(u(n,9),(Ie(),xm))},v(Wn,"PartitionMidprocessor/lambda$0$Type",1598),m(1599,1,ct,Sje),s.Ad=function(n){D5n(this.a,u(n,9))},v(Wn,"PartitionMidprocessor/lambda$1$Type",1599),m(1600,1,Mi,Lq),s.If=function(n,t){jNn(u(n,37),t)},v(Wn,"PartitionPostprocessor",1600),m(1601,1,Mi,ID),s.If=function(n,t){xDn(u(n,37),t)},v(Wn,"PartitionPreprocessor",1601),m(1602,1,zt,DD),s.Mb=function(n){return wi(u(n,9),(Ie(),xm))},v(Wn,"PartitionPreprocessor/lambda$0$Type",1602),m(1603,1,zt,_D),s.Mb=function(n){return wi(u(n,9),(Ie(),xm))},v(Wn,"PartitionPreprocessor/lambda$1$Type",1603),m(1604,1,{},LD),s.Kb=function(n){return new mn(null,new A2(new Un(Yn(Ii(u(n,9)).a.Jc(),new ee))))},v(Wn,"PartitionPreprocessor/lambda$2$Type",1604),m(1605,1,zt,xje),s.Mb=function(n){return hgn(this.a,u(n,17))},v(Wn,"PartitionPreprocessor/lambda$3$Type",1605),m(1606,1,ct,PD),s.Ad=function(n){tkn(u(n,17))},v(Wn,"PartitionPreprocessor/lambda$4$Type",1606),m(1607,1,zt,Aje),s.Mb=function(n){return V3n(this.a,u(n,9))},s.a=0,v(Wn,"PartitionPreprocessor/lambda$5$Type",1607),m(1608,1,Mi,rP),s.If=function(n,t){ZDn(u(n,37),t)};var f3e,pin,min,vin,a3e,h3e;v(Wn,"PortListSorter",1608),m(1609,1,{},A5),s.Kb=function(n){return i8(),u(n,12).e},v(Wn,"PortListSorter/lambda$0$Type",1609),m(1610,1,{},Pq),s.Kb=function(n){return i8(),u(n,12).g},v(Wn,"PortListSorter/lambda$1$Type",1610),m(1611,1,Yt,$q),s.Le=function(n,t){return hPe(u(n,12),u(t,12))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Wn,"PortListSorter/lambda$2$Type",1611),m(1612,1,Yt,Rq),s.Le=function(n,t){return gxn(u(n,12),u(t,12))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Wn,"PortListSorter/lambda$3$Type",1612),m(1613,1,Yt,$D),s.Le=function(n,t){return fKe(u(n,12),u(t,12))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Wn,"PortListSorter/lambda$4$Type",1613),m(1614,1,Mi,RD),s.If=function(n,t){oOn(u(n,37),t)},v(Wn,"PortSideProcessor",1614),m(1615,1,Mi,v6),s.If=function(n,t){aDn(u(n,37),t)},v(Wn,"ReversedEdgeRestorer",1615),m(1620,1,Mi,dxe),s.If=function(n,t){WSn(this,u(n,37),t)},v(Wn,"SelfLoopPortRestorer",1620),m(1621,1,{},y6),s.Kb=function(n){return new mn(null,new vn(u(n,25).a,16))},v(Wn,"SelfLoopPortRestorer/lambda$0$Type",1621),m(1622,1,zt,Bq),s.Mb=function(n){return u(n,9).k==(Fn(),Wi)},v(Wn,"SelfLoopPortRestorer/lambda$1$Type",1622),m(1623,1,zt,gk),s.Mb=function(n){return wi(u(n,9),(me(),wp))},v(Wn,"SelfLoopPortRestorer/lambda$2$Type",1623),m(1624,1,{},BD),s.Kb=function(n){return u(C(u(n,9),(me(),wp)),338)},v(Wn,"SelfLoopPortRestorer/lambda$3$Type",1624),m(1625,1,ct,Mje),s.Ad=function(n){oCn(this.a,u(n,338))},v(Wn,"SelfLoopPortRestorer/lambda$4$Type",1625),m(792,1,ct,GA),s.Ad=function(n){mCn(u(n,107))},v(Wn,"SelfLoopPortRestorer/lambda$5$Type",792),m(1627,1,Mi,qA),s.If=function(n,t){fSn(u(n,37),t)},v(Wn,"SelfLoopPostProcessor",1627),m(1628,1,{},UA),s.Kb=function(n){return new mn(null,new vn(u(n,25).a,16))},v(Wn,"SelfLoopPostProcessor/lambda$0$Type",1628),m(1629,1,zt,zD),s.Mb=function(n){return u(n,9).k==(Fn(),Wi)},v(Wn,"SelfLoopPostProcessor/lambda$1$Type",1629),m(1630,1,zt,FD),s.Mb=function(n){return wi(u(n,9),(me(),wp))},v(Wn,"SelfLoopPostProcessor/lambda$2$Type",1630),m(1631,1,ct,JD),s.Ad=function(n){bAn(u(n,9))},v(Wn,"SelfLoopPostProcessor/lambda$3$Type",1631),m(1632,1,{},zq),s.Kb=function(n){return new mn(null,new vn(u(n,107).f,1))},v(Wn,"SelfLoopPostProcessor/lambda$4$Type",1632),m(1633,1,ct,Cje),s.Ad=function(n){Qyn(this.a,u(n,341))},v(Wn,"SelfLoopPostProcessor/lambda$5$Type",1633),m(1634,1,zt,Fq),s.Mb=function(n){return!!u(n,107).i},v(Wn,"SelfLoopPostProcessor/lambda$6$Type",1634),m(1635,1,ct,Tje),s.Ad=function(n){Tbn(this.a,u(n,107))},v(Wn,"SelfLoopPostProcessor/lambda$7$Type",1635),m(1616,1,Mi,Jq),s.If=function(n,t){zOn(u(n,37),t)},v(Wn,"SelfLoopPreProcessor",1616),m(1617,1,{},Hq),s.Kb=function(n){return new mn(null,new vn(u(n,107).f,1))},v(Wn,"SelfLoopPreProcessor/lambda$0$Type",1617),m(1618,1,{},Gq),s.Kb=function(n){return u(n,341).a},v(Wn,"SelfLoopPreProcessor/lambda$1$Type",1618),m(1619,1,ct,g1),s.Ad=function(n){Nwn(u(n,17))},v(Wn,"SelfLoopPreProcessor/lambda$2$Type",1619),m(1636,1,Mi,oNe),s.If=function(n,t){GMn(this,u(n,37),t)},v(Wn,"SelfLoopRouter",1636),m(1637,1,{},k6),s.Kb=function(n){return new mn(null,new vn(u(n,25).a,16))},v(Wn,"SelfLoopRouter/lambda$0$Type",1637),m(1638,1,zt,HD),s.Mb=function(n){return u(n,9).k==(Fn(),Wi)},v(Wn,"SelfLoopRouter/lambda$1$Type",1638),m(1639,1,zt,GD),s.Mb=function(n){return wi(u(n,9),(me(),wp))},v(Wn,"SelfLoopRouter/lambda$2$Type",1639),m(1640,1,{},qD),s.Kb=function(n){return u(C(u(n,9),(me(),wp)),338)},v(Wn,"SelfLoopRouter/lambda$3$Type",1640),m(1641,1,ct,KMe),s.Ad=function(n){M5n(this.a,this.b,u(n,338))},v(Wn,"SelfLoopRouter/lambda$4$Type",1641),m(1642,1,Mi,UD),s.If=function(n,t){rIn(u(n,37),t)},v(Wn,"SemiInteractiveCrossMinProcessor",1642),m(1643,1,zt,XA),s.Mb=function(n){return u(n,9).k==(Fn(),Wi)},v(Wn,"SemiInteractiveCrossMinProcessor/lambda$0$Type",1643),m(1644,1,zt,qq),s.Mb=function(n){return EIe(u(n,9))._b((Ie(),Cm))},v(Wn,"SemiInteractiveCrossMinProcessor/lambda$1$Type",1644),m(1645,1,Yt,M5),s.Le=function(n,t){return t7n(u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Wn,"SemiInteractiveCrossMinProcessor/lambda$2$Type",1645),m(1646,1,{},KA),s.Te=function(n,t){return I5n(u(n,9),u(t,9))},v(Wn,"SemiInteractiveCrossMinProcessor/lambda$3$Type",1646),m(1648,1,Mi,j6),s.If=function(n,t){RPn(u(n,37),t)},v(Wn,"SortByInputModelProcessor",1648),m(1649,1,zt,VA),s.Mb=function(n){return u(n,12).g.c.length!=0},v(Wn,"SortByInputModelProcessor/lambda$0$Type",1649),m(1650,1,ct,Oje),s.Ad=function(n){ECn(this.a,u(n,12))},v(Wn,"SortByInputModelProcessor/lambda$1$Type",1650),m(1729,804,{},PBe),s.bf=function(n){var t,i,r,c;switch(this.c=n,this.a.g){case 2:t=new Oe,er(li(new mn(null,new vn(this.c.a.b,16)),new ZD),new ZMe(this,t)),UO(this,new fv),Ao(t,new C5),t.c.length=0,er(li(new mn(null,new vn(this.c.a.b,16)),new YA),new Ije(t)),UO(this,new KD),Ao(t,new av),t.c.length=0,i=LTe(GY(C2(new mn(null,new vn(this.c.a.b,16)),new Dje(this))),new VD),er(new mn(null,new vn(this.c.a.a,16)),new YMe(i,t)),UO(this,new QD),Ao(t,new Uq),t.c.length=0;break;case 3:r=new Oe,UO(this,new XD),c=LTe(GY(C2(new mn(null,new vn(this.c.a.b,16)),new Nje(this))),new YD),er(li(new mn(null,new vn(this.c.a.b,16)),new Xq),new WMe(c,r)),UO(this,new Kq),Ao(r,new WD),r.c.length=0;break;default:throw R(new nxe)}},s.b=0,v(lr,"EdgeAwareScanlineConstraintCalculation",1729),m(1730,1,Sh,XD),s.Lb=function(n){return X(u(n,60).g,156)},s.Fb=function(n){return this===n},s.Mb=function(n){return X(u(n,60).g,156)},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$0$Type",1730),m(1731,1,{},Nje),s.We=function(n){return YCn(this.a,u(n,60))},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$1$Type",1731),m(1739,1,iF,VMe),s.be=function(){XE(this.a,this.b,-1)},s.b=0,v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$10$Type",1739),m(1741,1,Sh,fv),s.Lb=function(n){return X(u(n,60).g,156)},s.Fb=function(n){return this===n},s.Mb=function(n){return X(u(n,60).g,156)},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$11$Type",1741),m(1742,1,ct,C5),s.Ad=function(n){u(n,375).be()},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$12$Type",1742),m(1743,1,zt,YA),s.Mb=function(n){return X(u(n,60).g,9)},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$13$Type",1743),m(1745,1,ct,Ije),s.Ad=function(n){Bjn(this.a,u(n,60))},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$14$Type",1745),m(1744,1,iF,tCe),s.be=function(){XE(this.b,this.a,-1)},s.a=0,v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$15$Type",1744),m(1746,1,Sh,KD),s.Lb=function(n){return X(u(n,60).g,9)},s.Fb=function(n){return this===n},s.Mb=function(n){return X(u(n,60).g,9)},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$16$Type",1746),m(1747,1,ct,av),s.Ad=function(n){u(n,375).be()},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$17$Type",1747),m(1748,1,{},Dje),s.We=function(n){return QCn(this.a,u(n,60))},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$18$Type",1748),m(1749,1,{},VD),s.Ue=function(){return 0},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$19$Type",1749),m(1732,1,{},YD),s.Ue=function(){return 0},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$2$Type",1732),m(1751,1,ct,YMe),s.Ad=function(n){g3n(this.a,this.b,u(n,320))},s.a=0,v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$20$Type",1751),m(1750,1,iF,QMe),s.be=function(){hUe(this.a,this.b,-1)},s.b=0,v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$21$Type",1750),m(1752,1,Sh,QD),s.Lb=function(n){return u(n,60),!0},s.Fb=function(n){return this===n},s.Mb=function(n){return u(n,60),!0},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$22$Type",1752),m(1753,1,ct,Uq),s.Ad=function(n){u(n,375).be()},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$23$Type",1753),m(1733,1,zt,Xq),s.Mb=function(n){return X(u(n,60).g,9)},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$3$Type",1733),m(1735,1,ct,WMe),s.Ad=function(n){w3n(this.a,this.b,u(n,60))},s.a=0,v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$4$Type",1735),m(1734,1,iF,iCe),s.be=function(){XE(this.b,this.a,-1)},s.a=0,v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$5$Type",1734),m(1736,1,Sh,Kq),s.Lb=function(n){return u(n,60),!0},s.Fb=function(n){return this===n},s.Mb=function(n){return u(n,60),!0},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$6$Type",1736),m(1737,1,ct,WD),s.Ad=function(n){u(n,375).be()},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$7$Type",1737),m(1738,1,zt,ZD),s.Mb=function(n){return X(u(n,60).g,156)},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$8$Type",1738),m(1740,1,ct,ZMe),s.Ad=function(n){x8n(this.a,this.b,u(n,60))},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$9$Type",1740),m(1547,1,Mi,yOe),s.If=function(n,t){ZLn(this,u(n,37),t)};var yin;v(lr,"HorizontalGraphCompactor",1547),m(1548,1,{},_je),s.df=function(n,t){var i,r,c;return yhe(n,t)||(i=Xv(n),r=Xv(t),i&&i.k==(Fn(),wr)||r&&r.k==(Fn(),wr))?0:(c=u(C(this.a.a,(me(),z3)),316),hpn(c,i?i.k:(Fn(),dr),r?r.k:(Fn(),dr)))},s.ef=function(n,t){var i,r,c;return yhe(n,t)?1:(i=Xv(n),r=Xv(t),c=u(C(this.a.a,(me(),z3)),316),ale(c,i?i.k:(Fn(),dr),r?r.k:(Fn(),dr)))},v(lr,"HorizontalGraphCompactor/1",1548),m(1549,1,{},QA),s.cf=function(n,t){return Cj(),n.a.i==0},v(lr,"HorizontalGraphCompactor/lambda$0$Type",1549),m(1550,1,{},Lje),s.cf=function(n,t){return L5n(this.a,n,t)},v(lr,"HorizontalGraphCompactor/lambda$1$Type",1550),m(1696,1,{},bRe);var kin,jin;v(lr,"LGraphToCGraphTransformer",1696),m(1704,1,zt,h0),s.Mb=function(n){return n!=null},v(lr,"LGraphToCGraphTransformer/0methodref$nonNull$Type",1704),m(1697,1,{},wk),s.Kb=function(n){return il(),fu(C(u(u(n,60).g,9),(me(),mi)))},v(lr,"LGraphToCGraphTransformer/lambda$0$Type",1697),m(1698,1,{},ld),s.Kb=function(n){return il(),CFe(u(u(n,60).g,156))},v(lr,"LGraphToCGraphTransformer/lambda$1$Type",1698),m(1707,1,zt,T5),s.Mb=function(n){return il(),X(u(n,60).g,9)},v(lr,"LGraphToCGraphTransformer/lambda$10$Type",1707),m(1708,1,ct,WA),s.Ad=function(n){A5n(u(n,60))},v(lr,"LGraphToCGraphTransformer/lambda$11$Type",1708),m(1709,1,zt,pk),s.Mb=function(n){return il(),X(u(n,60).g,156)},v(lr,"LGraphToCGraphTransformer/lambda$12$Type",1709),m(1713,1,ct,mk),s.Ad=function(n){rjn(u(n,60))},v(lr,"LGraphToCGraphTransformer/lambda$13$Type",1713),m(1710,1,ct,Pje),s.Ad=function(n){own(this.a,u(n,8))},s.a=0,v(lr,"LGraphToCGraphTransformer/lambda$14$Type",1710),m(1711,1,ct,$je),s.Ad=function(n){lwn(this.a,u(n,119))},s.a=0,v(lr,"LGraphToCGraphTransformer/lambda$15$Type",1711),m(1712,1,ct,Rje),s.Ad=function(n){swn(this.a,u(n,8))},s.a=0,v(lr,"LGraphToCGraphTransformer/lambda$16$Type",1712),m(1714,1,{},ZA),s.Kb=function(n){return il(),new mn(null,new A2(new Un(Yn(Ii(u(n,9)).a.Jc(),new ee))))},v(lr,"LGraphToCGraphTransformer/lambda$17$Type",1714),m(1715,1,zt,hv),s.Mb=function(n){return il(),uc(u(n,17))},v(lr,"LGraphToCGraphTransformer/lambda$18$Type",1715),m(1716,1,ct,Bje),s.Ad=function(n){n8n(this.a,u(n,17))},v(lr,"LGraphToCGraphTransformer/lambda$19$Type",1716),m(1700,1,ct,zje),s.Ad=function(n){Oyn(this.a,u(n,156))},v(lr,"LGraphToCGraphTransformer/lambda$2$Type",1700),m(1717,1,{},e_),s.Kb=function(n){return il(),new mn(null,new vn(u(n,25).a,16))},v(lr,"LGraphToCGraphTransformer/lambda$20$Type",1717),m(1718,1,{},vk),s.Kb=function(n){return il(),new mn(null,new A2(new Un(Yn(Ii(u(n,9)).a.Jc(),new ee))))},v(lr,"LGraphToCGraphTransformer/lambda$21$Type",1718),m(1719,1,{},O5),s.Kb=function(n){return il(),u(C(u(n,17),(me(),Eg)),16)},v(lr,"LGraphToCGraphTransformer/lambda$22$Type",1719),m(1720,1,zt,Vq),s.Mb=function(n){return dpn(u(n,16))},v(lr,"LGraphToCGraphTransformer/lambda$23$Type",1720),m(1721,1,ct,Fje),s.Ad=function(n){WCn(this.a,u(n,16))},v(lr,"LGraphToCGraphTransformer/lambda$24$Type",1721),m(1722,1,{},w1),s.Kb=function(n){return il(),new mn(null,new A2(new Un(Yn(Ii(u(n,9)).a.Jc(),new ee))))},v(lr,"LGraphToCGraphTransformer/lambda$25$Type",1722),m(1723,1,zt,eM),s.Mb=function(n){return il(),uc(u(n,17))},v(lr,"LGraphToCGraphTransformer/lambda$26$Type",1723),m(1725,1,ct,Jje),s.Ad=function(n){K8n(this.a,u(n,17))},v(lr,"LGraphToCGraphTransformer/lambda$27$Type",1725),m(1724,1,ct,Hje),s.Ad=function(n){egn(this.a,u(n,70))},s.a=0,v(lr,"LGraphToCGraphTransformer/lambda$28$Type",1724),m(1699,1,ct,eCe),s.Ad=function(n){O6n(this.a,this.b,u(n,156))},v(lr,"LGraphToCGraphTransformer/lambda$3$Type",1699),m(1701,1,{},nw),s.Kb=function(n){return il(),new mn(null,new vn(u(n,25).a,16))},v(lr,"LGraphToCGraphTransformer/lambda$4$Type",1701),m(1702,1,{},n_),s.Kb=function(n){return il(),new mn(null,new A2(new Un(Yn(Ii(u(n,9)).a.Jc(),new ee))))},v(lr,"LGraphToCGraphTransformer/lambda$5$Type",1702),m(1703,1,{},yk),s.Kb=function(n){return il(),u(C(u(n,17),(me(),Eg)),16)},v(lr,"LGraphToCGraphTransformer/lambda$6$Type",1703),m(1705,1,ct,Gje),s.Ad=function(n){lTn(this.a,u(n,16))},v(lr,"LGraphToCGraphTransformer/lambda$8$Type",1705),m(1706,1,ct,nCe),s.Ad=function(n){Iwn(this.a,this.b,u(n,156))},v(lr,"LGraphToCGraphTransformer/lambda$9$Type",1706),m(1695,1,{},dv),s.af=function(n){var t,i,r,c,o;for(this.a=n,this.d=new wX,this.c=se(Yme,On,124,this.a.a.a.c.length,0,1),this.b=0,i=new P(this.a.a.a);i.a>>0,n.toString(16))},s.equals=function(e){return this.Fb(e)},s.hashCode=function(){return this.Hb()},s.toString=function(){return this.Ib()};var Fen,Jen,Hen;m(298,1,{298:1,2086:1},g1e),s.te=function(n){var t;return t=new g1e,t.i=4,n>1?t.c=G_e(this,n-1):t.c=this,t},s.ue=function(){return M1(this),this.b},s.ve=function(){return Pb(this)},s.we=function(){return M1(this),this.k},s.xe=function(){return(this.i&4)!=0},s.ye=function(){return(this.i&1)!=0},s.Ib=function(){return xhe(this)},s.i=0;var Mr=v(Cu,"Object",1),wme=v(Cu,"Class",298);m(2058,1,aN),v(hN,"Optional",2058),m(1160,2058,aN,G),s.Fb=function(n){return n===this},s.Hb=function(){return 2040732332},s.Ib=function(){return"Optional.absent()"},s.Jb=function(n){return Nt(n),vj(),Vne};var Vne;v(hN,"Absent",1160),m(627,1,{},IX),v(hN,"Joiner",627);var xBn=Gi(hN,"Predicate");m(577,1,{178:1,577:1,3:1,48:1},DC),s.Mb=function(n){return Hze(this,n)},s.Lb=function(n){return Hze(this,n)},s.Fb=function(n){var t;return X(n,577)?(t=u(n,577),abe(this.a,t.a)):!1},s.Hb=function(){return y1e(this.a)+306654252},s.Ib=function(){return xCn(this.a)},v(hN,"Predicates/AndPredicate",577),m(411,2058,{411:1,3:1},e9),s.Fb=function(n){var t;return X(n,411)?(t=u(n,411),gi(this.a,t.a)):!1},s.Hb=function(){return 1502476572+Ni(this.a)},s.Ib=function(){return lYe+this.a+")"},s.Jb=function(n){return new e9(NR(n.Kb(this.a),"the Function passed to Optional.transform() must not return null."))},v(hN,"Present",411),m(204,1,L8),s.Nb=function(n){Zr(this,n)},s.Qb=function(){cAe()},v(dn,"UnmodifiableIterator",204),m(2038,204,P8),s.Qb=function(){cAe()},s.Rb=function(n){throw R(new _t)},s.Wb=function(n){throw R(new _t)},v(dn,"UnmodifiableListIterator",2038),m(392,2038,P8),s.Ob=function(){return this.b0},s.Pb=function(){if(this.b>=this.c)throw R(new hu);return this.Xb(this.b++)},s.Tb=function(){return this.b},s.Ub=function(){if(this.b<=0)throw R(new hu);return this.Xb(--this.b)},s.Vb=function(){return this.b-1},s.b=0,s.c=0,v(dn,"AbstractIndexedListIterator",392),m(702,204,L8),s.Ob=function(){return PY(this)},s.Pb=function(){return vhe(this)},s.e=1,v(dn,"AbstractIterator",702),m(2046,1,{229:1}),s.Zb=function(){var n;return n=this.f,n||(this.f=this.ac())},s.Fb=function(n){return rQ(this,n)},s.Hb=function(){return Ni(this.Zb())},s.dc=function(){return this.gc()==0},s.ec=function(){return T4(this)},s.Ib=function(){return fu(this.Zb())},v(dn,"AbstractMultimap",2046),m(730,2046,ag),s.$b=function(){yB(this)},s._b=function(n){return jAe(this,n)},s.ac=function(){return new p9(this,this.c)},s.ic=function(n){return this.hc()},s.bc=function(){return new Hv(this,this.c)},s.jc=function(){return this.mc(this.hc())},s.kc=function(){return new Gxe(this)},s.lc=function(){return aW(this.c.vc().Lc(),new Z,64,this.d)},s.cc=function(n){return vi(this,n)},s.fc=function(n){return AO(this,n)},s.gc=function(){return this.d},s.mc=function(n){return En(),new Hr(n)},s.nc=function(){return new Hxe(this)},s.oc=function(){return aW(this.c.Bc().Lc(),new ie,64,this.d)},s.pc=function(n,t){return new nB(this,n,t,null)},s.d=0,v(dn,"AbstractMapBasedMultimap",730),m(1661,730,ag),s.hc=function(){return new xo(this.a)},s.jc=function(){return En(),En(),Sc},s.cc=function(n){return u(vi(this,n),16)},s.fc=function(n){return u(AO(this,n),16)},s.Zb=function(){return L4(this)},s.Fb=function(n){return rQ(this,n)},s.qc=function(n){return u(vi(this,n),16)},s.rc=function(n){return u(AO(this,n),16)},s.mc=function(n){return IR(u(n,16))},s.pc=function(n,t){return ZLe(this,n,u(t,16),null)},v(dn,"AbstractListMultimap",1661),m(736,1,Fr),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return this.c.Ob()||this.e.Ob()},s.Pb=function(){var n;return this.e.Ob()||(n=u(this.c.Pb(),45),this.b=n.jd(),this.a=u(n.kd(),18),this.e=this.a.Jc()),this.sc(this.b,this.e.Pb())},s.Qb=function(){this.e.Qb(),u(uf(this.a),18).dc()&&this.c.Qb(),--this.d.d},v(dn,"AbstractMapBasedMultimap/Itr",736),m(1098,736,Fr,Hxe),s.sc=function(n,t){return t},v(dn,"AbstractMapBasedMultimap/1",1098),m(1099,1,{},ie),s.Kb=function(n){return u(n,18).Lc()},v(dn,"AbstractMapBasedMultimap/1methodref$spliterator$Type",1099),m(1100,736,Fr,Gxe),s.sc=function(n,t){return new pw(n,t)},v(dn,"AbstractMapBasedMultimap/2",1100);var pme=Gi(pt,"Map");m(2027,1,Ww),s.wc=function(n){wO(this,n)},s.$b=function(){this.vc().$b()},s.tc=function(n){return XQ(this,n)},s._b=function(n){return!!l0e(this,n,!1)},s.uc=function(n){var t,i,r;for(i=this.vc().Jc();i.Ob();)if(t=u(i.Pb(),45),r=t.kd(),ue(n)===ue(r)||n!=null&&gi(n,r))return!0;return!1},s.Fb=function(n){var t,i,r;if(n===this)return!0;if(!X(n,92)||(r=u(n,92),this.gc()!=r.gc()))return!1;for(i=r.vc().Jc();i.Ob();)if(t=u(i.Pb(),45),!this.tc(t))return!1;return!0},s.xc=function(n){return bu(l0e(this,n,!1))},s.Hb=function(){return a1e(this.vc())},s.dc=function(){return this.gc()==0},s.ec=function(){return new it(this)},s.yc=function(n,t){throw R(new pd("Put not supported on this map"))},s.zc=function(n){AE(this,n)},s.Ac=function(n){return bu(l0e(this,n,!0))},s.gc=function(){return this.vc().gc()},s.Ib=function(){return sGe(this)},s.Bc=function(){return new ot(this)},v(pt,"AbstractMap",2027),m(2047,2027,Ww),s.bc=function(){return new QP(this)},s.vc=function(){return FIe(this)},s.ec=function(){var n;return n=this.g,n||(this.g=this.bc())},s.Bc=function(){var n;return n=this.i,n||(this.i=new dMe(this))},v(dn,"Maps/ViewCachingAbstractMap",2047),m(395,2047,Ww,p9),s.xc=function(n){return k8n(this,n)},s.Ac=function(n){return Ikn(this,n)},s.$b=function(){this.d==this.e.c?this.e.$b():sR(new yfe(this))},s._b=function(n){return kFe(this.d,n)},s.Dc=function(){return new gP(this)},s.Cc=function(){return this.Dc()},s.Fb=function(n){return this===n||gi(this.d,n)},s.Hb=function(){return Ni(this.d)},s.ec=function(){return this.e.ec()},s.gc=function(){return this.d.gc()},s.Ib=function(){return fu(this.d)},v(dn,"AbstractMapBasedMultimap/AsMap",395);var Xl=Gi(Cu,"Iterable");m(31,1,im),s.Ic=function(n){cc(this,n)},s.Lc=function(){return new yn(this,0)},s.Mc=function(){return new mn(null,this.Lc())},s.Ec=function(n){throw R(new pd("Add not supported on this collection"))},s.Fc=function(n){return ac(this,n)},s.$b=function(){rae(this)},s.Gc=function(n){return H2(this,n,!1)},s.Hc=function(n){return jO(this,n)},s.dc=function(){return this.gc()==0},s.Kc=function(n){return H2(this,n,!0)},s.Nc=function(){return Ofe(this)},s.Oc=function(n){return qE(this,n)},s.Ib=function(){return Ja(this)},v(pt,"AbstractCollection",31);var bf=Gi(pt,"Set");m(Ga,31,fs),s.Lc=function(){return new yn(this,1)},s.Fb=function(n){return EJe(this,n)},s.Hb=function(){return a1e(this)},v(pt,"AbstractSet",Ga),m(2030,Ga,fs),v(dn,"Sets/ImprovedAbstractSet",2030),m(2031,2030,fs),s.$b=function(){this.Pc().$b()},s.Gc=function(n){return rJe(this,n)},s.dc=function(){return this.Pc().dc()},s.Kc=function(n){var t;return this.Gc(n)&&X(n,45)?(t=u(n,45),this.Pc().ec().Kc(t.jd())):!1},s.gc=function(){return this.Pc().gc()},v(dn,"Maps/EntrySet",2031),m(1096,2031,fs,gP),s.Gc=function(n){return $1e(this.a.d.vc(),n)},s.Jc=function(){return new yfe(this.a)},s.Pc=function(){return this.a},s.Kc=function(n){var t;return $1e(this.a.d.vc(),n)?(t=u(uf(u(n,45)),45),c9n(this.a.e,t.jd()),!0):!1},s.Lc=function(){return DT(this.a.d.vc().Lc(),new wP(this.a))},v(dn,"AbstractMapBasedMultimap/AsMap/AsMapEntries",1096),m(1097,1,{},wP),s.Kb=function(n){return PPe(this.a,u(n,45))},v(dn,"AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type",1097),m(734,1,Fr,yfe),s.Nb=function(n){Zr(this,n)},s.Pb=function(){var n;return n=u(this.b.Pb(),45),this.a=u(n.kd(),18),PPe(this.c,n)},s.Ob=function(){return this.b.Ob()},s.Qb=function(){M9(!!this.a),this.b.Qb(),this.c.e.d-=this.a.gc(),this.a.$b(),this.a=null},v(dn,"AbstractMapBasedMultimap/AsMap/AsMapIterator",734),m(530,2030,fs,QP),s.$b=function(){this.b.$b()},s.Gc=function(n){return this.b._b(n)},s.Ic=function(n){Nt(n),this.b.wc(new uj(n))},s.dc=function(){return this.b.dc()},s.Jc=function(){return new yj(this.b.vc().Jc())},s.Kc=function(n){return this.b._b(n)?(this.b.Ac(n),!0):!1},s.gc=function(){return this.b.gc()},v(dn,"Maps/KeySet",530),m(332,530,fs,Hv),s.$b=function(){var n;sR((n=this.b.vc().Jc(),new Uoe(this,n)))},s.Hc=function(n){return this.b.ec().Hc(n)},s.Fb=function(n){return this===n||gi(this.b.ec(),n)},s.Hb=function(){return Ni(this.b.ec())},s.Jc=function(){var n;return n=this.b.vc().Jc(),new Uoe(this,n)},s.Kc=function(n){var t,i;return i=0,t=u(this.b.Ac(n),18),t&&(i=t.gc(),t.$b(),this.a.d-=i),i>0},s.Lc=function(){return this.b.ec().Lc()},v(dn,"AbstractMapBasedMultimap/KeySet",332),m(735,1,Fr,Uoe),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return this.c.Ob()},s.Pb=function(){return this.a=u(this.c.Pb(),45),this.a.jd()},s.Qb=function(){var n;M9(!!this.a),n=u(this.a.kd(),18),this.c.Qb(),this.b.a.d-=n.gc(),n.$b(),this.a=null},v(dn,"AbstractMapBasedMultimap/KeySet/1",735),m(489,395,{92:1,134:1},AT),s.bc=function(){return this.Qc()},s.ec=function(){return this.Sc()},s.Qc=function(){return new eT(this.c,this.Uc())},s.Rc=function(){return this.Uc().Rc()},s.Sc=function(){var n;return n=this.b,n||(this.b=this.Qc())},s.Tc=function(){return this.Uc().Tc()},s.Uc=function(){return u(this.d,134)},v(dn,"AbstractMapBasedMultimap/SortedAsMap",489),m(437,489,$ge,eE),s.bc=function(){return new m9(this.a,u(u(this.d,134),138))},s.Qc=function(){return new m9(this.a,u(u(this.d,134),138))},s.ec=function(){var n;return n=this.b,u(n||(this.b=new m9(this.a,u(u(this.d,134),138))),277)},s.Sc=function(){var n;return n=this.b,u(n||(this.b=new m9(this.a,u(u(this.d,134),138))),277)},s.Uc=function(){return u(u(this.d,134),138)},s.Vc=function(n){return u(u(this.d,134),138).Vc(n)},s.Wc=function(n){return u(u(this.d,134),138).Wc(n)},s.Xc=function(n,t){return new eE(this.a,u(u(this.d,134),138).Xc(n,t))},s.Yc=function(n){return u(u(this.d,134),138).Yc(n)},s.Zc=function(n){return u(u(this.d,134),138).Zc(n)},s.$c=function(n,t){return new eE(this.a,u(u(this.d,134),138).$c(n,t))},v(dn,"AbstractMapBasedMultimap/NavigableAsMap",437),m(488,332,fYe,eT),s.Lc=function(){return this.b.ec().Lc()},v(dn,"AbstractMapBasedMultimap/SortedKeySet",488),m(394,488,Rge,m9),v(dn,"AbstractMapBasedMultimap/NavigableKeySet",394),m(539,31,im,nB),s.Ec=function(n){var t,i;return Is(this),i=this.d.dc(),t=this.d.Ec(n),t&&(++this.f.d,i&&OT(this)),t},s.Fc=function(n){var t,i,r;return n.dc()?!1:(r=(Is(this),this.d.gc()),t=this.d.Fc(n),t&&(i=this.d.gc(),this.f.d+=i-r,r==0&&OT(this)),t)},s.$b=function(){var n;n=(Is(this),this.d.gc()),n!=0&&(this.d.$b(),this.f.d-=n,bR(this))},s.Gc=function(n){return Is(this),this.d.Gc(n)},s.Hc=function(n){return Is(this),this.d.Hc(n)},s.Fb=function(n){return n===this?!0:(Is(this),gi(this.d,n))},s.Hb=function(){return Is(this),Ni(this.d)},s.Jc=function(){return Is(this),new rfe(this)},s.Kc=function(n){var t;return Is(this),t=this.d.Kc(n),t&&(--this.f.d,bR(this)),t},s.gc=function(){return iTe(this)},s.Lc=function(){return Is(this),this.d.Lc()},s.Ib=function(){return Is(this),fu(this.d)},v(dn,"AbstractMapBasedMultimap/WrappedCollection",539);var gl=Gi(pt,"List");m(732,539,{20:1,31:1,18:1,16:1},Nfe),s.gd=function(n){Zb(this,n)},s.Lc=function(){return Is(this),this.d.Lc()},s._c=function(n,t){var i;Is(this),i=this.d.dc(),u(this.d,16)._c(n,t),++this.a.d,i&&OT(this)},s.ad=function(n,t){var i,r,c;return t.dc()?!1:(c=(Is(this),this.d.gc()),i=u(this.d,16).ad(n,t),i&&(r=this.d.gc(),this.a.d+=r-c,c==0&&OT(this)),i)},s.Xb=function(n){return Is(this),u(this.d,16).Xb(n)},s.bd=function(n){return Is(this),u(this.d,16).bd(n)},s.cd=function(){return Is(this),new _Te(this)},s.dd=function(n){return Is(this),new e_e(this,n)},s.ed=function(n){var t;return Is(this),t=u(this.d,16).ed(n),--this.a.d,bR(this),t},s.fd=function(n,t){return Is(this),u(this.d,16).fd(n,t)},s.hd=function(n,t){return Is(this),ZLe(this.a,this.e,u(this.d,16).hd(n,t),this.b?this.b:this)},v(dn,"AbstractMapBasedMultimap/WrappedList",732),m(1095,732,{20:1,31:1,18:1,16:1,59:1},jOe),v(dn,"AbstractMapBasedMultimap/RandomAccessWrappedList",1095),m(619,1,Fr,rfe),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return R9(this),this.b.Ob()},s.Pb=function(){return R9(this),this.b.Pb()},s.Qb=function(){cOe(this)},v(dn,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",619),m(733,619,Wh,_Te,e_e),s.Qb=function(){cOe(this)},s.Rb=function(n){var t;t=iTe(this.a)==0,(R9(this),u(this.b,128)).Rb(n),++this.a.a.d,t&&OT(this.a)},s.Sb=function(){return(R9(this),u(this.b,128)).Sb()},s.Tb=function(){return(R9(this),u(this.b,128)).Tb()},s.Ub=function(){return(R9(this),u(this.b,128)).Ub()},s.Vb=function(){return(R9(this),u(this.b,128)).Vb()},s.Wb=function(n){(R9(this),u(this.b,128)).Wb(n)},v(dn,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",733),m(731,539,fYe,Sle),s.Lc=function(){return Is(this),this.d.Lc()},v(dn,"AbstractMapBasedMultimap/WrappedSortedSet",731),m(1094,731,Rge,TTe),v(dn,"AbstractMapBasedMultimap/WrappedNavigableSet",1094),m(1093,539,fs,KOe),s.Lc=function(){return Is(this),this.d.Lc()},v(dn,"AbstractMapBasedMultimap/WrappedSet",1093),m(1102,1,{},Z),s.Kb=function(n){return g9n(u(n,45))},v(dn,"AbstractMapBasedMultimap/lambda$1$Type",1102),m(1101,1,{},n9),s.Kb=function(n){return new pw(this.a,n)},v(dn,"AbstractMapBasedMultimap/lambda$2$Type",1101);var yg=Gi(pt,"Map/Entry");m(358,1,dZ),s.Fb=function(n){var t;return X(n,45)?(t=u(n,45),C1(this.jd(),t.jd())&&C1(this.kd(),t.kd())):!1},s.Hb=function(){var n,t;return n=this.jd(),t=this.kd(),(n==null?0:Ni(n))^(t==null?0:Ni(t))},s.ld=function(n){throw R(new _t)},s.Ib=function(){return this.jd()+"="+this.kd()},v(dn,aYe,358),m(V0,31,im),s.$b=function(){this.md().$b()},s.Gc=function(n){var t;return X(n,45)?(t=u(n,45),$yn(this.md(),t.jd(),t.kd())):!1},s.Kc=function(n){var t;return X(n,45)?(t=u(n,45),RLe(this.md(),t.jd(),t.kd())):!1},s.gc=function(){return this.md().d},v(dn,"Multimaps/Entries",V0),m(737,V0,im,E1),s.Jc=function(){return this.a.kc()},s.md=function(){return this.a},s.Lc=function(){return this.a.lc()},v(dn,"AbstractMultimap/Entries",737),m(738,737,fs,xoe),s.Lc=function(){return this.a.lc()},s.Fb=function(n){return T0e(this,n)},s.Hb=function(){return JBe(this)},v(dn,"AbstractMultimap/EntrySet",738),m(739,31,im,_C),s.$b=function(){this.a.$b()},s.Gc=function(n){return Ckn(this.a,n)},s.Jc=function(){return this.a.nc()},s.gc=function(){return this.a.d},s.Lc=function(){return this.a.oc()},v(dn,"AbstractMultimap/Values",739),m(2049,31,{833:1,20:1,31:1,18:1}),s.Ic=function(n){Nt(n),qv(this).Ic(new YU(n))},s.Lc=function(){var n;return n=qv(this).Lc(),aW(n,new Ne,64|n.wd()&1296,this.a.d)},s.Ec=function(n){return Noe(),!0},s.Fc=function(n){return Nt(this),Nt(n),X(n,540)?qyn(u(n,833)):!n.dc()&&MY(this,n.Jc())},s.Gc=function(n){var t;return t=u(J2(L4(this.a),n),18),(t?t.gc():0)>0},s.Fb=function(n){return jOn(this,n)},s.Hb=function(){return Ni(qv(this))},s.dc=function(){return qv(this).dc()},s.Kc=function(n){return Sqe(this,n,1)>0},s.Ib=function(){return fu(qv(this))},v(dn,"AbstractMultiset",2049),m(2051,2030,fs),s.$b=function(){yB(this.a.a)},s.Gc=function(n){var t,i;return X(n,490)?(i=u(n,416),u(i.a.kd(),18).gc()<=0?!1:(t=uLe(this.a,i.a.jd()),t==u(i.a.kd(),18).gc())):!1},s.Kc=function(n){var t,i,r,c;return X(n,490)&&(i=u(n,416),t=i.a.jd(),r=u(i.a.kd(),18).gc(),r!=0)?(c=this.a,yTn(c,t,r)):!1},v(dn,"Multisets/EntrySet",2051),m(1108,2051,fs,cj),s.Jc=function(){return new Vxe(FIe(L4(this.a.a)).Jc())},s.gc=function(){return L4(this.a.a).gc()},v(dn,"AbstractMultiset/EntrySet",1108),m(618,730,ag),s.hc=function(){return this.nd()},s.jc=function(){return this.od()},s.cc=function(n){return this.pd(n)},s.fc=function(n){return this.qd(n)},s.Zb=function(){var n;return n=this.f,n||(this.f=this.ac())},s.od=function(){return En(),En(),bJ},s.Fb=function(n){return rQ(this,n)},s.pd=function(n){return u(vi(this,n),22)},s.qd=function(n){return u(AO(this,n),22)},s.mc=function(n){return En(),new h9(u(n,22))},s.pc=function(n,t){return new KOe(this,n,u(t,22))},v(dn,"AbstractSetMultimap",618),m(1689,618,ag),s.hc=function(){return new kd(this.b)},s.nd=function(){return new kd(this.b)},s.jc=function(){return Ufe(new kd(this.b))},s.od=function(){return Ufe(new kd(this.b))},s.cc=function(n){return u(u(vi(this,n),22),83)},s.pd=function(n){return u(u(vi(this,n),22),83)},s.fc=function(n){return u(u(AO(this,n),22),83)},s.qd=function(n){return u(u(AO(this,n),22),83)},s.mc=function(n){return X(n,277)?Ufe(u(n,277)):(En(),new ole(u(n,83)))},s.Zb=function(){var n;return n=this.f,n||(this.f=X(this.c,138)?new eE(this,u(this.c,138)):X(this.c,134)?new AT(this,u(this.c,134)):new p9(this,this.c))},s.pc=function(n,t){return X(t,277)?new TTe(this,n,u(t,277)):new Sle(this,n,u(t,83))},v(dn,"AbstractSortedSetMultimap",1689),m(1690,1689,ag),s.Zb=function(){var n;return n=this.f,u(u(n||(this.f=X(this.c,138)?new eE(this,u(this.c,138)):X(this.c,134)?new AT(this,u(this.c,134)):new p9(this,this.c)),134),138)},s.ec=function(){var n;return n=this.i,u(u(n||(this.i=X(this.c,138)?new m9(this,u(this.c,138)):X(this.c,134)?new eT(this,u(this.c,134)):new Hv(this,this.c)),83),277)},s.bc=function(){return X(this.c,138)?new m9(this,u(this.c,138)):X(this.c,134)?new eT(this,u(this.c,134)):new Hv(this,this.c)},v(dn,"AbstractSortedKeySortedSetMultimap",1690),m(2071,1,{2008:1}),s.Fb=function(n){return aAn(this,n)},s.Hb=function(){var n;return a1e((n=this.g,n||(this.g=new p0(this))))},s.Ib=function(){var n;return sGe((n=this.f,n||(this.f=new ele(this))))},v(dn,"AbstractTable",2071),m(669,Ga,fs,p0),s.$b=function(){uAe()},s.Gc=function(n){var t,i;return X(n,468)?(t=u(n,687),i=u(J2(aDe(this.a),x0(t.c.e,t.b)),92),!!i&&$1e(i.vc(),new pw(x0(t.c.c,t.a),F4(t.c,t.b,t.a)))):!1},s.Jc=function(){return G5n(this.a)},s.Kc=function(n){var t,i;return X(n,468)?(t=u(n,687),i=u(J2(aDe(this.a),x0(t.c.e,t.b)),92),!!i&&Wkn(i.vc(),new pw(x0(t.c.c,t.a),F4(t.c,t.b,t.a)))):!1},s.gc=function(){return pIe(this.a)},s.Lc=function(){return Xyn(this.a)},v(dn,"AbstractTable/CellSet",669),m(1987,31,im,JU),s.$b=function(){uAe()},s.Gc=function(n){return nMn(this.a,n)},s.Jc=function(){return q5n(this.a)},s.gc=function(){return pIe(this.a)},s.Lc=function(){return NLe(this.a)},v(dn,"AbstractTable/Values",1987),m(1662,1661,ag),v(dn,"ArrayListMultimapGwtSerializationDependencies",1662),m(506,1662,ag,NX,Sae),s.hc=function(){return new xo(this.a)},s.a=0,v(dn,"ArrayListMultimap",506),m(668,2071,{668:1,2008:1,3:1},Eqe),v(dn,"ArrayTable",668),m(1983,392,P8,tOe),s.Xb=function(n){return new w1e(this.a,n)},v(dn,"ArrayTable/1",1983),m(1984,1,{},HU),s.rd=function(n){return new w1e(this.a,n)},v(dn,"ArrayTable/1methodref$getCell$Type",1984),m(2072,1,{687:1}),s.Fb=function(n){var t;return n===this?!0:X(n,468)?(t=u(n,687),C1(x0(this.c.e,this.b),x0(t.c.e,t.b))&&C1(x0(this.c.c,this.a),x0(t.c.c,t.a))&&C1(F4(this.c,this.b,this.a),F4(t.c,t.b,t.a))):!1},s.Hb=function(){return zB(F(z(Mr,1),Nn,1,5,[x0(this.c.e,this.b),x0(this.c.c,this.a),F4(this.c,this.b,this.a)]))},s.Ib=function(){return"("+x0(this.c.e,this.b)+","+x0(this.c.c,this.a)+")="+F4(this.c,this.b,this.a)},v(dn,"Tables/AbstractCell",2072),m(468,2072,{468:1,687:1},w1e),s.a=0,s.b=0,s.d=0,v(dn,"ArrayTable/2",468),m(1986,1,{},W5),s.rd=function(n){return F$e(this.a,n)},v(dn,"ArrayTable/2methodref$getValue$Type",1986),m(1985,392,P8,iOe),s.Xb=function(n){return F$e(this.a,n)},v(dn,"ArrayTable/3",1985),m(2039,2027,Ww),s.$b=function(){sR(this.kc())},s.vc=function(){return new oj(this)},s.lc=function(){return new GDe(this.kc(),this.gc())},v(dn,"Maps/IteratorBasedAbstractMap",2039),m(826,2039,Ww),s.$b=function(){throw R(new _t)},s._b=function(n){return EAe(this.c,n)},s.kc=function(){return new rOe(this,this.c.b.c.gc())},s.lc=function(){return rV(this.c.b.c.gc(),16,new pP(this))},s.xc=function(n){var t;return t=u(nE(this.c,n),15),t?this.td(t.a):null},s.dc=function(){return this.c.b.c.dc()},s.ec=function(){return dV(this.c)},s.yc=function(n,t){var i;if(i=u(nE(this.c,n),15),!i)throw R(new Un(this.sd()+" "+n+" not in "+dV(this.c)));return this.ud(i.a,t)},s.Ac=function(n){throw R(new _t)},s.gc=function(){return this.c.b.c.gc()},v(dn,"ArrayTable/ArrayMap",826),m(1982,1,{},pP),s.rd=function(n){return bDe(this.a,n)},v(dn,"ArrayTable/ArrayMap/0methodref$getEntry$Type",1982),m(1980,358,dZ,QAe),s.jd=function(){return bpn(this.a,this.b)},s.kd=function(){return this.a.td(this.b)},s.ld=function(n){return this.a.ud(this.b,n)},s.b=0,v(dn,"ArrayTable/ArrayMap/1",1980),m(1981,392,P8,rOe),s.Xb=function(n){return bDe(this.a,n)},v(dn,"ArrayTable/ArrayMap/2",1981),m(1979,826,Ww,tDe),s.sd=function(){return"Column"},s.td=function(n){return F4(this.b,this.a,n)},s.ud=function(n,t){return Eze(this.b,this.a,n,t)},s.a=0,v(dn,"ArrayTable/Row",1979),m(827,826,Ww,ele),s.td=function(n){return new tDe(this.a,n)},s.yc=function(n,t){return u(t,92),$bn()},s.ud=function(n,t){return u(t,92),Rbn()},s.sd=function(){return"Row"},v(dn,"ArrayTable/RowMap",827),m(1126,1,dl,WAe),s.yd=function(n){return(this.a.wd()&-262&n)!=0},s.wd=function(){return this.a.wd()&-262},s.xd=function(){return this.a.xd()},s.Nb=function(n){this.a.Nb(new eMe(n,this.b))},s.zd=function(n){return this.a.zd(new ZAe(n,this.b))},v(dn,"CollectSpliterators/1",1126),m(1127,1,ut,ZAe),s.Ad=function(n){this.a.Ad(this.b.Kb(n))},v(dn,"CollectSpliterators/1/lambda$0$Type",1127),m(1128,1,ut,eMe),s.Ad=function(n){this.a.Ad(this.b.Kb(n))},v(dn,"CollectSpliterators/1/lambda$1$Type",1128),m(1123,1,dl,ENe),s.yd=function(n){return((16464|this.b)&n)!=0},s.wd=function(){return 16464|this.b},s.xd=function(){return this.a.xd()},s.Nb=function(n){this.a.Oe(new tMe(n,this.c))},s.zd=function(n){return this.a.Pe(new nMe(n,this.c))},s.b=0,v(dn,"CollectSpliterators/1WithCharacteristics",1123),m(1124,1,dN,nMe),s.Bd=function(n){this.a.Ad(this.b.rd(n))},v(dn,"CollectSpliterators/1WithCharacteristics/lambda$0$Type",1124),m(1125,1,dN,tMe),s.Bd=function(n){this.a.Ad(this.b.rd(n))},v(dn,"CollectSpliterators/1WithCharacteristics/lambda$1$Type",1125),m(1119,1,dl),s.yd=function(n){return(this.a&n)!=0},s.wd=function(){return this.a},s.xd=function(){return this.e&&(this.b=Gse(this.b,this.e.xd())),Gse(this.b,0)},s.Nb=function(n){this.e&&(this.e.Nb(n),this.e=null),this.c.Nb(new iMe(this,n)),this.b=0},s.zd=function(n){for(;;){if(this.e&&this.e.zd(n))return qj(this.b,bN)&&(this.b=lf(this.b,1)),!0;if(this.e=null,!this.c.zd(new Z5(this)))return!1}},s.a=0,s.b=0,v(dn,"CollectSpliterators/FlatMapSpliterator",1119),m(1121,1,ut,Z5),s.Ad=function(n){s2n(this.a,n)},v(dn,"CollectSpliterators/FlatMapSpliterator/lambda$0$Type",1121),m(1122,1,ut,iMe),s.Ad=function(n){y5n(this.a,this.b,n)},v(dn,"CollectSpliterators/FlatMapSpliterator/lambda$1$Type",1122),m(1120,1119,dl,lPe),v(dn,"CollectSpliterators/FlatMapSpliteratorOfObject",1120),m(254,1,bZ),s.Dd=function(n){return this.Cd(u(n,254))},s.Cd=function(n){var t;return n==(SX(),Qne)?1:n==(EX(),Yne)?-1:(t=(tR(),gO(this.a,n.a)),t!=0?t:($n(),X(this,513)==X(n,513)?0:X(this,513)?1:-1))},s.Gd=function(){return this.a},s.Fb=function(n){return Lde(this,n)},v(dn,"Cut",254),m(1793,254,bZ,Jxe),s.Cd=function(n){return n==this?0:1},s.Ed=function(n){throw R(new loe)},s.Fd=function(n){n.a+="+∞)"},s.Gd=function(){throw R(new Uc(dYe))},s.Hb=function(){return jd(),jde(this)},s.Hd=function(n){return!1},s.Ib=function(){return"+∞"};var Yne;v(dn,"Cut/AboveAll",1793),m(513,254,{254:1,513:1,3:1,35:1},sOe),s.Ed=function(n){uo((n.a+="(",n),this.a)},s.Fd=function(n){qb(uo(n,this.a),93)},s.Hb=function(){return~Ni(this.a)},s.Hd=function(n){return tR(),gO(this.a,n)<0},s.Ib=function(){return"/"+this.a+"\\"},v(dn,"Cut/AboveValue",513),m(1792,254,bZ,Fxe),s.Cd=function(n){return n==this?0:-1},s.Ed=function(n){n.a+="(-∞"},s.Fd=function(n){throw R(new loe)},s.Gd=function(){throw R(new Uc(dYe))},s.Hb=function(){return jd(),jde(this)},s.Hd=function(n){return!0},s.Ib=function(){return"-∞"};var Qne;v(dn,"Cut/BelowAll",1792),m(1794,254,bZ,lOe),s.Ed=function(n){uo((n.a+="[",n),this.a)},s.Fd=function(n){qb(uo(n,this.a),41)},s.Hb=function(){return Ni(this.a)},s.Hd=function(n){return tR(),gO(this.a,n)<=0},s.Ib=function(){return"\\"+this.a+"/"},v(dn,"Cut/BelowValue",1794),m(535,1,Zh),s.Ic=function(n){cc(this,n)},s.Ib=function(){return Cjn(u(NR(this,"use Optional.orNull() instead of Optional.or(null)"),20).Jc())},v(dn,"FluentIterable",535),m(433,535,Zh,Kj),s.Jc=function(){return new Xn(Qn(this.a.Jc(),new ee))},v(dn,"FluentIterable/2",433),m(36,1,{},ee),s.Kb=function(n){return u(n,20).Jc()},s.Fb=function(n){return this===n},v(dn,"FluentIterable/2/0methodref$iterator$Type",36),m(1040,535,Zh,ETe),s.Jc=function(){return Uh(this)},v(dn,"FluentIterable/3",1040),m(714,392,P8,sle),s.Xb=function(n){return this.a[n].Jc()},v(dn,"FluentIterable/3/1",714),m(2032,1,{}),s.Ib=function(){return fu(this.Id().b)},v(dn,"ForwardingObject",2032),m(2033,2032,bYe),s.Id=function(){return this.Jd()},s.Ic=function(n){cc(this,n)},s.Lc=function(){return new yn(this,0)},s.Mc=function(){return new mn(null,this.Lc())},s.Ec=function(n){return this.Jd(),MAe()},s.Fc=function(n){return this.Jd(),CAe()},s.$b=function(){this.Jd(),TAe()},s.Gc=function(n){return this.Jd().Gc(n)},s.Hc=function(n){return this.Jd().Hc(n)},s.dc=function(){return this.Jd().b.dc()},s.Jc=function(){return this.Jd().Jc()},s.Kc=function(n){return this.Jd(),OAe()},s.gc=function(){return this.Jd().b.gc()},s.Nc=function(){return this.Jd().Nc()},s.Oc=function(n){return this.Jd().Oc(n)},v(dn,"ForwardingCollection",2033),m(2040,31,Bge),s.Jc=function(){return this.Md()},s.Ec=function(n){throw R(new _t)},s.Fc=function(n){throw R(new _t)},s.Kd=function(){var n;return n=this.c,n||(this.c=this.Ld())},s.$b=function(){throw R(new _t)},s.Gc=function(n){return n!=null&&H2(this,n,!1)},s.Ld=function(){switch(this.gc()){case 0:return oR(),ete;case 1:return new GK(Nt(this.Md().Pb()));default:return new cfe(this,this.Nc())}},s.Kc=function(n){throw R(new _t)},v(dn,"ImmutableCollection",2040),m(1259,2040,Bge,vP),s.Jc=function(){return J4(new ic(this.a.b.Jc()))},s.Gc=function(n){return n!=null&&xj(this.a,n)},s.Hc=function(n){return Koe(this.a,n)},s.dc=function(){return this.a.b.dc()},s.Md=function(){return J4(new ic(this.a.b.Jc()))},s.gc=function(){return this.a.b.gc()},s.Nc=function(){return this.a.b.Nc()},s.Oc=function(n){return Voe(this.a,n)},s.Ib=function(){return fu(this.a.b)},v(dn,"ForwardingImmutableCollection",1259),m(311,2040,$8),s.Jc=function(){return this.Md()},s.cd=function(){return this.Nd(0)},s.dd=function(n){return this.Nd(n)},s.gd=function(n){Zb(this,n)},s.Lc=function(){return new yn(this,16)},s.hd=function(n,t){return this.Od(n,t)},s._c=function(n,t){throw R(new _t)},s.ad=function(n,t){throw R(new _t)},s.Kd=function(){return this},s.Fb=function(n){return hOn(this,n)},s.Hb=function(){return B7n(this)},s.bd=function(n){return n==null?-1:USn(this,n)},s.Md=function(){return this.Nd(0)},s.Nd=function(n){return PK(this,n)},s.ed=function(n){throw R(new _t)},s.fd=function(n,t){throw R(new _t)},s.Od=function(n,t){var i;return XB((i=new aMe(this),new N0(i,n,t)))},v(dn,"ImmutableList",311),m(2067,311,$8),s.Jc=function(){return J4(this.Pd().Jc())},s.hd=function(n,t){return XB(this.Pd().hd(n,t))},s.Gc=function(n){return n!=null&&this.Pd().Gc(n)},s.Hc=function(n){return this.Pd().Hc(n)},s.Fb=function(n){return gi(this.Pd(),n)},s.Xb=function(n){return x0(this,n)},s.Hb=function(){return Ni(this.Pd())},s.bd=function(n){return this.Pd().bd(n)},s.dc=function(){return this.Pd().dc()},s.Md=function(){return J4(this.Pd().Jc())},s.gc=function(){return this.Pd().gc()},s.Od=function(n,t){return XB(this.Pd().hd(n,t))},s.Nc=function(){return this.Pd().Oc(le(Mr,Nn,1,this.Pd().gc(),5,1))},s.Oc=function(n){return this.Pd().Oc(n)},s.Ib=function(){return fu(this.Pd())},v(dn,"ForwardingImmutableList",2067),m(717,1,R8),s.vc=function(){return Fb(this)},s.wc=function(n){wO(this,n)},s.ec=function(){return dV(this)},s.Bc=function(){return this.Td()},s.$b=function(){throw R(new _t)},s._b=function(n){return this.xc(n)!=null},s.uc=function(n){return this.Td().Gc(n)},s.Rd=function(){return new UU(this)},s.Sd=function(){return new XU(this)},s.Fb=function(n){return Tkn(this,n)},s.Hb=function(){return Fb(this).Hb()},s.dc=function(){return this.gc()==0},s.yc=function(n,t){return Bbn()},s.Ac=function(n){throw R(new _t)},s.Ib=function(){return VMn(this)},s.Td=function(){return this.e?this.e:this.e=this.Sd()},s.c=null,s.d=null,s.e=null,v(dn,"ImmutableMap",717),m(718,717,R8),s._b=function(n){return EAe(this,n)},s.uc=function(n){return mMe(this.b,n)},s.Qd=function(){return uFe(new mP(this))},s.Rd=function(){return uFe(PDe(this.b))},s.Sd=function(){return new vP($De(this.b))},s.Fb=function(n){return yMe(this.b,n)},s.xc=function(n){return nE(this,n)},s.Hb=function(){return Ni(this.b.c)},s.dc=function(){return this.b.c.dc()},s.gc=function(){return this.b.c.gc()},s.Ib=function(){return fu(this.b.c)},v(dn,"ForwardingImmutableMap",718),m(2034,2033,gZ),s.Id=function(){return this.Ud()},s.Jd=function(){return this.Ud()},s.Lc=function(){return new yn(this,1)},s.Fb=function(n){return n===this||this.Ud().Fb(n)},s.Hb=function(){return this.Ud().Hb()},v(dn,"ForwardingSet",2034),m(1055,2034,gZ,mP),s.Id=function(){return P9(this.a.b)},s.Jd=function(){return P9(this.a.b)},s.Gc=function(n){if(X(n,45)&&u(n,45).jd()==null)return!1;try{return vMe(P9(this.a.b),n)}catch(t){if(t=sr(t),X(t,211))return!1;throw R(t)}},s.Ud=function(){return P9(this.a.b)},s.Oc=function(n){var t,i;return t=j_e(P9(this.a.b),n),P9(this.a.b).b.gc()=0?"+":"")+(i/60|0),t=_$(k.Math.abs(i)%60),(yGe(),lnn)[this.q.getDay()]+" "+fnn[this.q.getMonth()]+" "+_$(this.q.getDate())+" "+_$(this.q.getHours())+":"+_$(this.q.getMinutes())+":"+_$(this.q.getSeconds())+" GMT"+n+t+" "+this.q.getFullYear()};var aJ=v(pt,"Date",205);m(1977,205,EYe,FHe),s.a=!1,s.b=0,s.c=0,s.d=0,s.e=0,s.f=0,s.g=!1,s.i=0,s.j=0,s.k=0,s.n=0,s.o=0,s.p=0,v("com.google.gwt.i18n.shared.impl","DateRecord",1977),m(2026,1,{}),s.ne=function(){return null},s.oe=function(){return null},s.pe=function(){return null},s.qe=function(){return null},s.re=function(){return null},v(hy,"JSONValue",2026),m(139,2026,{139:1},wd,i9),s.Fb=function(n){return X(n,139)?Mae(this.a,u(n,139).a):!1},s.me=function(){return cbn},s.Hb=function(){return aae(this.a)},s.ne=function(){return this},s.Ib=function(){var n,t,i;for(i=new tl("["),t=0,n=this.a.length;t0&&(i.a+=","),uo(i,L2(this,t));return i.a+="]",i.a},v(hy,"JSONArray",139),m(479,2026,{479:1},r9),s.me=function(){return ubn},s.oe=function(){return this},s.Ib=function(){return $n(),""+this.a},s.a=!1;var Qen,Wen;v(hy,"JSONBoolean",479),m(981,63,H1,Yxe),v(hy,"JSONException",981),m(1017,2026,{},tt),s.me=function(){return fbn},s.Ib=function(){return Vo};var Zen;v(hy,"JSONNull",1017),m(265,2026,{265:1},Av),s.Fb=function(n){return X(n,265)?this.a==u(n,265).a:!1},s.me=function(){return obn},s.Hb=function(){return v4(this.a)},s.pe=function(){return this},s.Ib=function(){return this.a+""},s.a=0,v(hy,"JSONNumber",265),m(149,2026,{149:1},l4,c9),s.Fb=function(n){return X(n,149)?Mae(this.a,u(n,149).a):!1},s.me=function(){return sbn},s.Hb=function(){return aae(this.a)},s.qe=function(){return this},s.Ib=function(){var n,t,i,r,c,o,l;for(l=new tl("{"),n=!0,o=zY(this,le(He,Ae,2,0,6,1)),i=o,r=0,c=i.length;r=0?":"+this.c:"")+")"},s.c=0;var _me=v(Cu,"StackTraceElement",324);Hen={3:1,472:1,35:1,2:1};var He=v(Cu,zge,2);m(111,418,{472:1},vd,Ej,cf),v(Cu,"StringBuffer",111),m(106,418,{472:1},y0,h4,tl),v(Cu,"StringBuilder",106),m(691,99,cF,Ioe),v(Cu,"StringIndexOutOfBoundsException",691),m(2107,1,{});var inn;m(46,63,{3:1,101:1,63:1,80:1,46:1},_t,pd),v(Cu,"UnsupportedOperationException",46),m(247,242,{3:1,35:1,242:1,247:1},TO,Joe),s.Dd=function(n){return yKe(this,u(n,247))},s.se=function(){return K2(XKe(this))},s.Fb=function(n){var t;return this===n?!0:X(n,247)?(t=u(n,247),this.e==t.e&&yKe(this,t)==0):!1},s.Hb=function(){var n;return this.b!=0?this.b:this.a<54?(n=Lu(this.f),this.b=Rt(Rr(n,-1)),this.b=33*this.b+Rt(Rr(Sw(n,32),-1)),this.b=17*this.b+lc(this.e),this.b):(this.b=17*pFe(this.c)+lc(this.e),this.b)},s.Ib=function(){return XKe(this)},s.a=0,s.b=0,s.d=0,s.e=0,s.f=0;var rnn,kg,Lme,Pme,$me,Rme,Bme,zme,ute=v("java.math","BigDecimal",247);m(91,242,{3:1,35:1,242:1,91:1},I1,dLe,Gb,AJe,A0),s.Dd=function(n){return kJe(this,u(n,91))},s.se=function(){return K2(fZ(this,0))},s.Fb=function(n){return ude(this,n)},s.Hb=function(){return pFe(this)},s.Ib=function(){return fZ(this,0)},s.b=-2,s.c=0,s.d=0,s.e=0;var cnn,hJ,unn,ote,dJ,VS,T3=v("java.math","BigInteger",91),onn,snn,Ey,YS;m(484,2027,Ww),s.$b=function(){Hu(this)},s._b=function(n){return so(this,n)},s.uc=function(n){return nFe(this,n,this.i)||nFe(this,n,this.f)},s.vc=function(){return new sn(this)},s.xc=function(n){return zn(this,n)},s.yc=function(n,t){return ei(this,n,t)},s.Ac=function(n){return z4(this,n)},s.gc=function(){return Aj(this)},s.g=0,v(pt,"AbstractHashMap",484),m(306,Ga,fs,sn),s.$b=function(){this.a.$b()},s.Gc=function(n){return HLe(this,n)},s.Jc=function(){return new B2(this.a)},s.Kc=function(n){var t;return HLe(this,n)?(t=u(n,45).jd(),this.a.Ac(t),!0):!1},s.gc=function(){return this.a.gc()},v(pt,"AbstractHashMap/EntrySet",306),m(307,1,Fr,B2),s.Nb=function(n){Zr(this,n)},s.Pb=function(){return t3(this)},s.Ob=function(){return this.b},s.Qb=function(){wRe(this)},s.b=!1,s.d=0,v(pt,"AbstractHashMap/EntrySetIterator",307),m(417,1,Fr,qc),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return FX(this)},s.Pb=function(){return oae(this)},s.Qb=function(){As(this)},s.b=0,s.c=-1,v(pt,"AbstractList/IteratorImpl",417),m(97,417,Wh,qr),s.Qb=function(){As(this)},s.Rb=function(n){y2(this,n)},s.Sb=function(){return this.b>0},s.Tb=function(){return this.b},s.Ub=function(){return at(this.b>0),this.a.Xb(this.c=--this.b)},s.Vb=function(){return this.b-1},s.Wb=function(n){w2(this.c!=-1),this.a.fd(this.c,n)},v(pt,"AbstractList/ListIteratorImpl",97),m(258,56,B8,N0),s._c=function(n,t){N2(n,this.b),this.c._c(this.a+n,t),++this.b},s.Xb=function(n){return kn(n,this.b),this.c.Xb(this.a+n)},s.ed=function(n){var t;return kn(n,this.b),t=this.c.ed(this.a+n),--this.b,t},s.fd=function(n,t){return kn(n,this.b),this.c.fd(this.a+n,t)},s.gc=function(){return this.b},s.a=0,s.b=0,v(pt,"AbstractList/SubList",258),m(232,Ga,fs,it),s.$b=function(){this.a.$b()},s.Gc=function(n){return this.a._b(n)},s.Jc=function(){var n;return n=this.a.vc().Jc(),new gt(n)},s.Kc=function(n){return this.a._b(n)?(this.a.Ac(n),!0):!1},s.gc=function(){return this.a.gc()},v(pt,"AbstractMap/1",232),m(529,1,Fr,gt),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return this.a.Ob()},s.Pb=function(){var n;return n=u(this.a.Pb(),45),n.jd()},s.Qb=function(){this.a.Qb()},v(pt,"AbstractMap/1/1",529),m(230,31,im,ot),s.$b=function(){this.a.$b()},s.Gc=function(n){return this.a.uc(n)},s.Jc=function(){var n;return n=this.a.vc().Jc(),new Hi(n)},s.gc=function(){return this.a.gc()},v(pt,"AbstractMap/2",230),m(304,1,Fr,Hi),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return this.a.Ob()},s.Pb=function(){var n;return n=u(this.a.Pb(),45),n.kd()},s.Qb=function(){this.a.Qb()},v(pt,"AbstractMap/2/1",304),m(480,1,{480:1,45:1}),s.Fb=function(n){var t;return X(n,45)?(t=u(n,45),Ku(this.d,t.jd())&&Ku(this.e,t.kd())):!1},s.jd=function(){return this.d},s.kd=function(){return this.e},s.Hb=function(){return Bv(this.d)^Bv(this.e)},s.ld=function(n){return Ile(this,n)},s.Ib=function(){return this.d+"="+this.e},v(pt,"AbstractMap/AbstractEntry",480),m(390,480,{480:1,390:1,45:1},u$),v(pt,"AbstractMap/SimpleEntry",390),m(2044,1,BZ),s.Fb=function(n){var t;return X(n,45)?(t=u(n,45),Ku(this.jd(),t.jd())&&Ku(this.kd(),t.kd())):!1},s.Hb=function(){return Bv(this.jd())^Bv(this.kd())},s.Ib=function(){return this.jd()+"="+this.kd()},v(pt,aYe,2044),m(2052,2027,$ge),s.Vc=function(n){return LX(this.Ce(n))},s.tc=function(n){return $Pe(this,n)},s._b=function(n){return Dle(this,n)},s.vc=function(){return new Xi(this)},s.Rc=function(){return iDe(this.Ee())},s.Wc=function(n){return LX(this.Fe(n))},s.xc=function(n){var t;return t=n,bu(this.De(t))},s.Yc=function(n){return LX(this.Ge(n))},s.ec=function(){return new _u(this)},s.Tc=function(){return iDe(this.He())},s.Zc=function(n){return LX(this.Ie(n))},v(pt,"AbstractNavigableMap",2052),m(620,Ga,fs,Xi),s.Gc=function(n){return X(n,45)&&$Pe(this.b,u(n,45))},s.Jc=function(){return this.b.Be()},s.Kc=function(n){var t;return X(n,45)?(t=u(n,45),this.b.Je(t)):!1},s.gc=function(){return this.b.gc()},v(pt,"AbstractNavigableMap/EntrySet",620),m(1115,Ga,Rge,_u),s.Lc=function(){return new l$(this)},s.$b=function(){this.a.$b()},s.Gc=function(n){return Dle(this.a,n)},s.Jc=function(){var n;return n=this.a.vc().b.Be(),new Lke(n)},s.Kc=function(n){return Dle(this.a,n)?(this.a.Ac(n),!0):!1},s.gc=function(){return this.a.gc()},v(pt,"AbstractNavigableMap/NavigableKeySet",1115),m(1116,1,Fr,Lke),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return FX(this.a.a)},s.Pb=function(){var n;return n=TOe(this.a),n.jd()},s.Qb=function(){INe(this.a)},v(pt,"AbstractNavigableMap/NavigableKeySet/1",1116),m(2065,31,im),s.Ec=function(n){return C4(k8(this,n),F8),!0},s.Fc=function(n){return Ln(n),LT(n!=this,"Can't add a queue to itself"),ac(this,n)},s.$b=function(){for(;CY(this)!=null;);},v(pt,"AbstractQueue",2065),m(314,31,{4:1,20:1,31:1,18:1},Fv,_Le),s.Ec=function(n){return Lae(this,n),!0},s.$b=function(){zae(this)},s.Gc=function(n){return vze(new dE(this),n)},s.dc=function(){return jj(this)},s.Jc=function(){return new dE(this)},s.Kc=function(n){return x4n(new dE(this),n)},s.gc=function(){return this.c-this.b&this.a.length-1},s.Lc=function(){return new yn(this,272)},s.Oc=function(n){var t;return t=this.c-this.b&this.a.length-1,n.lengtht&&ir(n,t,null),n},s.b=0,s.c=0,v(pt,"ArrayDeque",314),m(448,1,Fr,dE),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return this.a!=this.b},s.Pb=function(){return JB(this)},s.Qb=function(){vBe(this)},s.a=0,s.b=0,s.c=-1,v(pt,"ArrayDeque/IteratorImpl",448),m(13,56,MYe,Te,xo,bs),s._c=function(n,t){zb(this,n,t)},s.Ec=function(n){return Ce(this,n)},s.ad=function(n,t){return N1e(this,n,t)},s.Fc=function(n){return Sr(this,n)},s.$b=function(){r2(this.c,0)},s.Gc=function(n){return pu(this,n,0)!=-1},s.Ic=function(n){Ao(this,n)},s.Xb=function(n){return Le(this,n)},s.bd=function(n){return pu(this,n,0)},s.dc=function(){return this.c.length==0},s.Jc=function(){return new P(this)},s.ed=function(n){return Cd(this,n)},s.Kc=function(n){return qo(this,n)},s.ae=function(n,t){cLe(this,n,t)},s.fd=function(n,t){return ul(this,n,t)},s.gc=function(){return this.c.length},s.gd=function(n){Tr(this,n)},s.Nc=function(){return iR(this.c)},s.Oc=function(n){return Ba(this,n)};var ABn=v(pt,"ArrayList",13);m(7,1,Fr,P),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return gu(this)},s.Pb=function(){return L(this)},s.Qb=function(){sE(this)},s.a=0,s.b=-1,v(pt,"ArrayList/1",7),m(2074,k.Function,{},pn),s.Ke=function(n,t){return ji(n,t)},m(123,56,CYe,Su),s.Gc=function(n){return mBe(this,n)!=-1},s.Ic=function(n){var t,i,r,c;for(Ln(n),i=this.a,r=0,c=i.length;r0)throw R(new Un(Kge+n+" greater than "+this.e));return this.f.Re()?C_e(this.c,this.b,this.a,n,t):iLe(this.c,n,t)},s.yc=function(n,t){if(!eW(this.c,this.f,n,this.b,this.a,this.e,this.d))throw R(new Un(n+" outside the range "+this.b+" to "+this.e));return $ze(this.c,n,t)},s.Ac=function(n){var t;return t=n,eW(this.c,this.f,t,this.b,this.a,this.e,this.d)?T_e(this.c,t):null},s.Je=function(n){return xR(this,n.jd())&&uhe(this.c,n)},s.gc=function(){var n,t,i;if(this.f.Re()?this.a?t=b8(this.c,this.b,!0):t=b8(this.c,this.b,!1):t=mhe(this.c),!(t&&xR(this,t.d)&&t))return 0;for(n=0,i=new FY(this.c,this.f,this.b,this.a,this.e,this.d);FX(i.a);i.b=u(oae(i.a),45))++n;return n},s.$c=function(n,t){if(this.f.Re()&&this.c.a.Le(n,this.b)<0)throw R(new Un(Kge+n+NYe+this.b));return this.f.Se()?C_e(this.c,n,t,this.e,this.d):rLe(this.c,n,t)},s.a=!1,s.d=!1,v(pt,"TreeMap/SubMap",622),m(309,23,HZ,o$),s.Re=function(){return!1},s.Se=function(){return!1};var fte,ate,hte,dte,gJ=yt(pt,"TreeMap/SubMapType",309,Tt,n6n,M2n);m(1112,309,HZ,MTe),s.Se=function(){return!0},yt(pt,"TreeMap/SubMapType/1",1112,gJ,null,null),m(1113,309,HZ,BTe),s.Re=function(){return!0},s.Se=function(){return!0},yt(pt,"TreeMap/SubMapType/2",1113,gJ,null,null),m(1114,309,HZ,CTe),s.Re=function(){return!0},yt(pt,"TreeMap/SubMapType/3",1114,gJ,null,null);var wnn;m(141,Ga,{3:1,20:1,31:1,18:1,277:1,22:1,83:1,141:1},pX,lle,kd,o9),s.Lc=function(){return new l$(this)},s.Ec=function(n){return RT(this,n)},s.$b=function(){this.a.$b()},s.Gc=function(n){return this.a._b(n)},s.Jc=function(){return this.a.ec().Jc()},s.Kc=function(n){return DK(this,n)},s.gc=function(){return this.a.gc()};var IBn=v(pt,"TreeSet",141);m(1052,1,{},Rke),s.Te=function(n,t){return Xpn(this.a,n,t)},v(GZ,"BinaryOperator/lambda$0$Type",1052),m(1053,1,{},Bke),s.Te=function(n,t){return Kpn(this.a,n,t)},v(GZ,"BinaryOperator/lambda$1$Type",1053),m(935,1,{},Fu),s.Kb=function(n){return n},v(GZ,"Function/lambda$0$Type",935),m(388,1,zt,s9),s.Mb=function(n){return!this.a.Mb(n)},v(GZ,"Predicate/lambda$2$Type",388),m(567,1,{567:1});var pnn=v(mS,"Handler",567);m(2069,1,aN),s.ve=function(){return"DUMMY"},s.Ib=function(){return this.ve()};var Xme;v(mS,"Level",2069),m(1672,2069,aN,Rs),s.ve=function(){return"INFO"},v(mS,"Level/LevelInfo",1672),m(1824,1,{},ixe);var bte;v(mS,"LogManager",1824),m(1866,1,aN,NNe),s.b=null,v(mS,"LogRecord",1866),m(511,1,{511:1},oY),s.e=!1;var mnn=!1,vnn=!1,Va=!1,ynn=!1,knn=!1;v(mS,"Logger",511),m(819,567,{567:1},Er),v(mS,"SimpleConsoleLogHandler",819),m(130,23,{3:1,35:1,23:1,130:1},GX);var Kme,Yo,Vme,Qo=yt(_c,"Collector/Characteristics",130,Tt,B4n,C2n),jnn;m(746,1,{},Bfe),v(_c,"CollectorImpl",746),m(1050,1,{},Kr),s.Te=function(n,t){return ajn(u(n,212),u(t,212))},v(_c,"Collectors/10methodref$merge$Type",1050),m(1051,1,{},Mt),s.Kb=function(n){return DLe(u(n,212))},v(_c,"Collectors/11methodref$toString$Type",1051),m(152,1,{},bi),s.Wd=function(n,t){u(n,18).Ec(t)},v(_c,"Collectors/20methodref$add$Type",152),m(154,1,{},zi),s.Ve=function(){return new Te},v(_c,"Collectors/21methodref$ctor$Type",154),m(1049,1,{},cu),s.Wd=function(n,t){D1(u(n,212),u(t,472))},v(_c,"Collectors/9methodref$add$Type",1049),m(1048,1,{},YNe),s.Ve=function(){return new ng(this.a,this.b,this.c)},v(_c,"Collectors/lambda$15$Type",1048),m(153,1,{},Cc),s.Te=function(n,t){return Egn(u(n,18),u(t,18))},v(_c,"Collectors/lambda$45$Type",153),m(538,1,{}),s.Ye=function(){hE(this)},s.d=!1,v(_c,"TerminatableStream",538),m(768,538,Vge,xle),s.Ye=function(){hE(this)},v(_c,"DoubleStreamImpl",768),m(1297,724,dl,QNe),s.Pe=function(n){return RSn(this,u(n,189))},s.a=null,v(_c,"DoubleStreamImpl/2",1297),m(1298,1,yN,zke),s.Ne=function(n){wwn(this.a,n)},v(_c,"DoubleStreamImpl/2/lambda$0$Type",1298),m(1295,1,yN,Fke),s.Ne=function(n){gwn(this.a,n)},v(_c,"DoubleStreamImpl/lambda$0$Type",1295),m(1296,1,yN,Jke),s.Ne=function(n){lJe(this.a,n)},v(_c,"DoubleStreamImpl/lambda$2$Type",1296),m(1351,723,dl,HPe),s.Pe=function(n){return Gyn(this,u(n,202))},s.a=0,s.b=0,s.c=0,v(_c,"IntStream/5",1351),m(793,538,Vge,Ale),s.Ye=function(){hE(this)},s.Ze=function(){return T0(this),this.a},v(_c,"IntStreamImpl",793),m(794,538,Vge,Yoe),s.Ye=function(){hE(this)},s.Ze=function(){return T0(this),Yse(),gnn},v(_c,"IntStreamImpl/Empty",794),m(1651,1,dN,Hke),s.Bd=function(n){nze(this.a,n)},v(_c,"IntStreamImpl/lambda$4$Type",1651);var DBn=Gi(_c,"Stream");m(28,538,{520:1,677:1,832:1},mn),s.Ye=function(){hE(this)};var Sy;v(_c,"StreamImpl",28),m(1072,486,dl,jNe),s.zd=function(n){for(;G9n(this);){if(this.a.zd(n))return!0;hE(this.b),this.b=null,this.a=null}return!1},v(_c,"StreamImpl/1",1072),m(1073,1,ut,Gke),s.Ad=function(n){Ivn(this.a,u(n,832))},v(_c,"StreamImpl/1/lambda$0$Type",1073),m(1074,1,zt,qke),s.Mb=function(n){return hr(this.a,n)},v(_c,"StreamImpl/1methodref$add$Type",1074),m(1075,486,dl,n_e),s.zd=function(n){var t;return this.a||(t=new Te,this.b.a.Nb(new Uke(t)),En(),Tr(t,this.c),this.a=new yn(t,16)),HRe(this.a,n)},s.a=null,v(_c,"StreamImpl/5",1075),m(1076,1,ut,Uke),s.Ad=function(n){Ce(this.a,n)},v(_c,"StreamImpl/5/2methodref$add$Type",1076),m(725,486,dl,whe),s.zd=function(n){for(this.b=!1;!this.b&&this.c.zd(new zMe(this,n)););return this.b},s.b=!1,v(_c,"StreamImpl/FilterSpliterator",725),m(1066,1,ut,zMe),s.Ad=function(n){S3n(this.a,this.b,n)},v(_c,"StreamImpl/FilterSpliterator/lambda$0$Type",1066),m(1061,724,dl,ZPe),s.Pe=function(n){return m2n(this,u(n,189))},v(_c,"StreamImpl/MapToDoubleSpliterator",1061),m(1065,1,ut,FMe),s.Ad=function(n){Bgn(this.a,this.b,n)},v(_c,"StreamImpl/MapToDoubleSpliterator/lambda$0$Type",1065),m(1060,723,dl,e$e),s.Pe=function(n){return v2n(this,u(n,202))},v(_c,"StreamImpl/MapToIntSpliterator",1060),m(1064,1,ut,JMe),s.Ad=function(n){zgn(this.a,this.b,n)},v(_c,"StreamImpl/MapToIntSpliterator/lambda$0$Type",1064),m(722,486,dl,the),s.zd=function(n){return SNe(this,n)},v(_c,"StreamImpl/MapToObjSpliterator",722),m(1063,1,ut,HMe),s.Ad=function(n){Fgn(this.a,this.b,n)},v(_c,"StreamImpl/MapToObjSpliterator/lambda$0$Type",1063),m(1062,486,dl,yBe),s.zd=function(n){for(;JX(this.b,0);){if(!this.a.zd(new ef))return!1;this.b=lf(this.b,1)}return this.a.zd(n)},s.b=0,v(_c,"StreamImpl/SkipSpliterator",1062),m(1067,1,ut,ef),s.Ad=function(n){},v(_c,"StreamImpl/SkipSpliterator/lambda$0$Type",1067),m(617,1,ut,Oa),s.Ad=function(n){SP(this,n)},v(_c,"StreamImpl/ValueConsumer",617),m(1068,1,ut,ia),s.Ad=function(n){$b()},v(_c,"StreamImpl/lambda$0$Type",1068),m(1069,1,ut,o0),s.Ad=function(n){$b()},v(_c,"StreamImpl/lambda$1$Type",1069),m(1070,1,{},Xke),s.Te=function(n,t){return x2n(this.a,n,t)},v(_c,"StreamImpl/lambda$4$Type",1070),m(1071,1,ut,GMe),s.Ad=function(n){e2n(this.b,this.a,n)},v(_c,"StreamImpl/lambda$5$Type",1071),m(1077,1,ut,Kke),s.Ad=function(n){J7n(this.a,u(n,375))},v(_c,"TerminatableStream/lambda$0$Type",1077),m(2104,1,{}),m(1976,1,{},xb),v("javaemul.internal","ConsoleLogger",1976);var _Bn=0;m(2096,1,{}),m(1800,1,ut,Sl),s.Ad=function(n){u(n,321)},v(J8,"BowyerWatsonTriangulation/lambda$0$Type",1800),m(1801,1,ut,Vke),s.Ad=function(n){ac(this.a,u(n,321).e)},v(J8,"BowyerWatsonTriangulation/lambda$1$Type",1801),m(1802,1,ut,cd),s.Ad=function(n){u(n,177)},v(J8,"BowyerWatsonTriangulation/lambda$2$Type",1802),m(1797,1,Yt,Yke),s.Le=function(n,t){return T6n(this.a,u(n,177),u(t,177))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(J8,"NaiveMinST/lambda$0$Type",1797),m(440,1,{},dj),v(J8,"NodeMicroLayout",440),m(177,1,{177:1},g4),s.Fb=function(n){var t;return X(n,177)?(t=u(n,177),Ku(this.a,t.a)&&Ku(this.b,t.b)||Ku(this.a,t.b)&&Ku(this.b,t.a)):!1},s.Hb=function(){return Bv(this.a)+Bv(this.b)};var LBn=v(J8,"TEdge",177);m(321,1,{321:1},lge),s.Fb=function(n){var t;return X(n,321)?(t=u(n,321),oB(this,t.a)&&oB(this,t.b)&&oB(this,t.c)):!1},s.Hb=function(){return Bv(this.a)+Bv(this.b)+Bv(this.c)},v(J8,"TTriangle",321),m(225,1,{225:1},P$),v(J8,"Tree",225),m(1183,1,{},q_e),v(_Ye,"Scanline",1183);var Enn=Gi(_Ye,LYe);m(1728,1,{},qRe),v(t1,"CGraph",1728),m(320,1,{320:1},R_e),s.b=0,s.c=0,s.d=0,s.g=0,s.i=0,s.k=Ir,v(t1,"CGroup",320),m(814,1,{},doe),v(t1,"CGroup/CGroupBuilder",814),m(60,1,{60:1},rNe),s.Ib=function(){var n;return this.j?Pt(this.j.Kb(this)):(M1(wJ),wJ.o+"@"+(n=jw(this)>>>0,n.toString(16)))},s.f=0,s.i=Ir;var wJ=v(t1,"CNode",60);m(813,1,{},boe),v(t1,"CNode/CNodeBuilder",813);var Snn;m(1551,1,{},s0),s.df=function(n,t){return 0},s.ef=function(n,t){return 0},v(t1,$Ye,1551),m(1830,1,{},uh),s.af=function(n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D;for(b=Vi,r=new P(n.a.b);r.ar.d.c||r.d.c==o.d.c&&r.d.b0?n+this.n.d+this.n.a:0},s.gf=function(){var n,t,i,r,c;if(c=0,this.e)this.b?c=this.b.a:this.a[1][1]&&(c=this.a[1][1].gf());else if(this.g)c=ide(this,tW(this,null,!0));else for(t=(wa(),F(z(dm,1),je,237,0,[Ou,No,Nu])),i=0,r=t.length;i0?c+this.n.b+this.n.c:0},s.hf=function(){var n,t,i,r,c;if(this.g)for(n=tW(this,null,!1),i=(wa(),F(z(dm,1),je,237,0,[Ou,No,Nu])),r=0,c=i.length;r0&&(r[0]+=this.d,i-=r[0]),r[2]>0&&(r[2]+=this.d,i-=r[2]),this.c.a=k.Math.max(0,i),this.c.d=t.d+n.d+(this.c.a-i)/2,r[1]=k.Math.max(r[1],i),Wae(this,No,t.d+n.d+r[0]-(r[1]-i)/2,r)},s.b=null,s.d=0,s.e=!1,s.f=!1,s.g=!1;var wte=0,pJ=0;v(dg,"GridContainerCell",1499),m(461,23,{3:1,35:1,23:1,461:1},UX);var rb,Oh,qf,Nnn=yt(dg,"HorizontalLabelAlignment",461,Tt,nyn,T2n),Inn;m(318,216,{216:1,318:1},O_e,GRe,E_e),s.ff=function(){return sIe(this)},s.gf=function(){return wfe(this)},s.a=0,s.c=!1;var PBn=v(dg,"LabelCell",318);m(253,337,{216:1,337:1,253:1},HE),s.ff=function(){return QE(this)},s.gf=function(){return WE(this)},s.hf=function(){GW(this)},s.jf=function(){qW(this)},s.b=0,s.c=0,s.d=!1,v(dg,"StripContainerCell",253),m(1655,1,zt,b5),s.Mb=function(n){return _bn(u(n,216))},v(dg,"StripContainerCell/lambda$0$Type",1655),m(1656,1,{},l0),s.We=function(n){return u(n,216).gf()},v(dg,"StripContainerCell/lambda$1$Type",1656),m(1657,1,zt,ud),s.Mb=function(n){return Lbn(u(n,216))},v(dg,"StripContainerCell/lambda$2$Type",1657),m(1658,1,{},Cp),s.We=function(n){return u(n,216).ff()},v(dg,"StripContainerCell/lambda$3$Type",1658),m(462,23,{3:1,35:1,23:1,462:1},XX);var Uf,cb,ja,Dnn=yt(dg,"VerticalLabelAlignment",462,Tt,tyn,O2n),_nn;m(787,1,{},Mge),s.c=0,s.d=0,s.k=0,s.s=0,s.t=0,s.v=!1,s.w=0,s.D=!1,s.F=!1,v(sF,"NodeContext",787),m(1497,1,Yt,oh),s.Le=function(n,t){return vTe(u(n,64),u(t,64))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(sF,"NodeContext/0methodref$comparePortSides$Type",1497),m(1498,1,Yt,Tp),s.Le=function(n,t){return mMn(u(n,115),u(t,115))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(sF,"NodeContext/1methodref$comparePortContexts$Type",1498),m(168,23,{3:1,35:1,23:1,168:1},Bl);var Lnn,Pnn,$nn,Rnn,Bnn,znn,Fnn,Jnn,Hnn,Gnn,qnn,Unn,Xnn,Knn,Vnn,Ynn,Qnn,Wnn,Znn,etn,ntn,pte,ttn=yt(sF,"NodeLabelLocation",168,Tt,DQ,N2n),itn;m(115,1,{115:1},zqe),s.a=!1,v(sF,"PortContext",115),m(1502,1,ut,Gg),s.Ad=function(n){_Ae(u(n,318))},v(jN,YYe,1502),m(1503,1,zt,qg),s.Mb=function(n){return!!u(n,115).c},v(jN,QYe,1503),m(1504,1,ut,Ug),s.Ad=function(n){_Ae(u(n,115).c)},v(jN,"LabelPlacer/lambda$2$Type",1504);var Qme;m(1501,1,ut,sd),s.Ad=function(n){v2(),dbn(u(n,115))},v(jN,"NodeLabelAndSizeUtilities/lambda$0$Type",1501),m(788,1,ut,Kle),s.Ad=function(n){Mgn(this.b,this.c,this.a,u(n,187))},s.a=!1,s.c=!1,v(jN,"NodeLabelCellCreator/lambda$0$Type",788),m(1500,1,ut,Zke),s.Ad=function(n){pbn(this.a,u(n,187))},v(jN,"PortContextCreator/lambda$0$Type",1500);var mJ;m(1872,1,{},Xg),v(G8,"GreedyRectangleStripOverlapRemover",1872),m(1873,1,Yt,Mb),s.Le=function(n,t){return cpn(u(n,226),u(t,226))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(G8,"GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type",1873),m(1826,1,{},sxe),s.a=5,s.e=0,v(G8,"RectangleStripOverlapRemover",1826),m(1827,1,Yt,g5),s.Le=function(n,t){return upn(u(n,226),u(t,226))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(G8,"RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type",1827),m(1829,1,Yt,Op),s.Le=function(n,t){return z3n(u(n,226),u(t,226))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(G8,"RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type",1829),m(409,23,{3:1,35:1,23:1,409:1},s$);var KN,mte,vte,VN,rtn=yt(G8,"RectangleStripOverlapRemover/OverlapRemovalDirection",409,Tt,Zyn,I2n),ctn;m(226,1,{226:1},aV),v(G8,"RectangleStripOverlapRemover/RectangleNode",226),m(1828,1,ut,eje),s.Ad=function(n){VSn(this.a,u(n,226))},v(G8,"RectangleStripOverlapRemover/lambda$1$Type",1828);var utn=!1,QS,Wme;m(1798,1,ut,Np),s.Ad=function(n){KKe(u(n,225))},v(wy,"DepthFirstCompaction/0methodref$compactTree$Type",1798),m(810,1,ut,Wue),s.Ad=function(n){b5n(this.a,u(n,225))},v(wy,"DepthFirstCompaction/lambda$1$Type",810),m(1799,1,ut,LNe),s.Ad=function(n){PEn(this.a,this.b,this.c,u(n,225))},v(wy,"DepthFirstCompaction/lambda$2$Type",1799);var WS,Zme;m(68,1,{68:1},X_e),v(wy,"Node",68),m(1179,1,{},$Te),v(wy,"ScanlineOverlapCheck",1179),m(1180,1,{683:1},m_e),s._e=function(n){Gpn(this,u(n,442))},v(wy,"ScanlineOverlapCheck/OverlapsScanlineHandler",1180),m(1181,1,Yt,uu),s.Le=function(n,t){return Ejn(u(n,68),u(t,68))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(wy,"ScanlineOverlapCheck/OverlapsScanlineHandler/lambda$0$Type",1181),m(442,1,{442:1},lse),s.a=!1,v(wy,"ScanlineOverlapCheck/Timestamp",442),m(1182,1,Yt,w5),s.Le=function(n,t){return Vxn(u(n,442),u(t,442))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(wy,"ScanlineOverlapCheck/lambda$0$Type",1182),m(545,1,{},Kg),v("org.eclipse.elk.alg.common.utils","SVGImage",545),m(748,1,{},rv),v(VZ,twe,748),m(1164,1,Yt,p5),s.Le=function(n,t){return ETn(u(n,235),u(t,235))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(VZ,eQe,1164),m(1165,1,ut,qMe),s.Ad=function(n){gyn(this.b,this.a,u(n,251))},v(VZ,iwe,1165),m(214,1,ep),v(y3,"AbstractLayoutProvider",214),m(726,214,ep,goe),s.kf=function(n,t){OUe(this,n,t)},v(VZ,"ForceLayoutProvider",726);var $Bn=Gi(EN,nQe);m(150,1,{3:1,105:1,150:1},Vg),s.of=function(n,t){return SO(this,n,t)},s.lf=function(){return EIe(this)},s.mf=function(n){return C(this,n)},s.nf=function(n){return wi(this,n)},v(EN,"MapPropertyHolder",150),m(313,150,{3:1,313:1,105:1,150:1}),v(SN,"FParticle",313),m(251,313,{3:1,251:1,313:1,105:1,150:1},sDe),s.Ib=function(){var n;return this.a?(n=pu(this.a.a,this,0),n>=0?"b"+n+"["+iY(this.a)+"]":"b["+iY(this.a)+"]"):"b_"+jw(this)},v(SN,"FBendpoint",251),m(291,150,{3:1,291:1,105:1,150:1},tNe),s.Ib=function(){return iY(this)},v(SN,"FEdge",291),m(235,150,{3:1,235:1,105:1,150:1},WR);var RBn=v(SN,"FGraph",235);m(445,313,{3:1,445:1,313:1,105:1,150:1},fPe),s.Ib=function(){return this.b==null||this.b.length==0?"l["+iY(this.a)+"]":"l_"+this.b},v(SN,"FLabel",445),m(155,313,{3:1,155:1,313:1,105:1,150:1},RTe),s.Ib=function(){return Aae(this)},s.a=0,v(SN,"FNode",155),m(2062,1,{}),s.qf=function(n){ige(this,n)},s.rf=function(){bHe(this)},s.d=0,v(rwe,"AbstractForceModel",2062),m(631,2062,{631:1},ize),s.pf=function(n,t){var i,r,c,o,l;return QKe(this.f,n,t),c=Nr(pc(t.d),n.d),l=k.Math.sqrt(c.a*c.a+c.b*c.b),r=k.Math.max(0,l-aE(n.e)/2-aE(t.e)/2),i=Oqe(this.e,n,t),i>0?o=-N3n(r,this.c)*i:o=ypn(r,this.b)*u(C(n,(Hf(),Ay)),15).a,A1(c,o/l),c},s.qf=function(n){ige(this,n),this.a=u(C(n,(Hf(),yJ)),15).a,this.c=ne(re(C(n,kJ))),this.b=ne(re(C(n,kte)))},s.sf=function(n){return n0&&(o-=Obn(r,this.a)*i),A1(c,o*this.b/l),c},s.qf=function(n){var t,i,r,c,o,l,f;for(ige(this,n),this.b=ne(re(C(n,(Hf(),jte)))),this.c=this.b/u(C(n,yJ),15).a,r=n.e.c.length,o=0,c=0,f=new P(n.e);f.a0},s.a=0,s.b=0,s.c=0,v(rwe,"FruchtermanReingoldModel",632);var xy=Gi(yu,"ILayoutMetaDataProvider");m(844,1,Ua,vC),s.tf=function(n){nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,lF),""),"Force Model"),"Determines the model for force calculation."),eve),(lg(),Bi)),nve),rn((vh(),Tn))))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,cwe),""),"Iterations"),"The number of iterations on the force model."),ve(300)),dc),jr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,uwe),""),"Repulsive Power"),"Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model"),ve(0)),dc),jr),rn(xa)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,YZ),""),"FR Temperature"),"The temperature is used as a scaling factor for particle displacements."),xh),ec),gr),rn(Tn)))),qi(n,YZ,lF,dtn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,QZ),""),"Eades Repulsion"),"Factor for repulsive forces in Eades' model."),5),ec),gr),rn(Tn)))),qi(n,QZ,lF,ftn),BVe((new tP,n))};var otn,stn,eve,ltn,ftn,atn,htn,dtn;v(kS,"ForceMetaDataProvider",844),m(424,23,{3:1,35:1,23:1,424:1},fse);var yte,vJ,nve=yt(kS,"ForceModelStrategy",424,Tt,a4n,_2n),btn;m(984,1,Ua,tP),s.tf=function(n){BVe(n)};var gtn,wtn,tve,yJ,ive,ptn,mtn,vtn,ytn,rve,ktn,cve,uve,jtn,Ay,Etn,kte,ove,Stn,xtn,kJ,jte,Atn,Mtn,Ctn,sve,Ttn;v(kS,"ForceOptions",984),m(985,1,{},cv),s.uf=function(){var n;return n=new goe,n},s.vf=function(n){},v(kS,"ForceOptions/ForceFactory",985);var YN,ZS,My,jJ;m(845,1,Ua,iP),s.tf=function(n){nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,swe),""),"Fixed Position"),"Prevent that the node is moved by the layout algorithm."),($n(),!1)),(lg(),xr)),Qi),rn((vh(),fr))))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,lwe),""),"Desired Edge Length"),"Either specified for parent nodes or for individual edges, where the latter takes higher precedence."),100),ec),gr),Ci(Tn,F(z(Wa,1),je,160,0,[xa]))))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,fwe),""),"Layout Dimension"),"Dimensions that are permitted to be altered during layout."),lve),Bi),wve),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,awe),""),"Stress Epsilon"),"Termination criterion for the iterative process."),xh),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,hwe),""),"Iteration Limit"),"Maximum number of performed iterations. Takes higher precedence than 'epsilon'."),ve(oi)),dc),jr),rn(Tn)))),dVe((new AU,n))};var Otn,Ntn,lve,Itn,Dtn,_tn;v(kS,"StressMetaDataProvider",845),m(988,1,Ua,AU),s.tf=function(n){dVe(n)};var EJ,fve,ave,hve,dve,bve,Ltn,Ptn,$tn,Rtn,gve,Btn;v(kS,"StressOptions",988),m(989,1,{},m5),s.uf=function(){var n;return n=new iNe,n},s.vf=function(n){},v(kS,"StressOptions/StressFactory",989),m(1080,214,ep,iNe),s.kf=function(n,t){var i,r,c,o,l;for(t.Tg(uQe,1),Fe(ze(ke(n,(RO(),dve))))?Fe(ze(ke(n,gve)))||qT((i=new dj((Rb(),new v0(n))),i)):OUe(new goe,n,t.dh(1)),c=Ize(n),r=SKe(this.a,c),l=r.Jc();l.Ob();)o=u(l.Pb(),235),!(o.e.c.length<=1)&&(ULn(this.b,o),mOn(this.b),Ao(o.d,new v5));c=PVe(r),qVe(c),t.Ug()},v(hF,"StressLayoutProvider",1080),m(1081,1,ut,v5),s.Ad=function(n){hge(u(n,445))},v(hF,"StressLayoutProvider/lambda$0$Type",1081),m(986,1,{},txe),s.c=0,s.e=0,s.g=0,v(hF,"StressMajorization",986),m(384,23,{3:1,35:1,23:1,384:1},KX);var Ete,Ste,xte,wve=yt(hF,"StressMajorization/Dimension",384,Tt,Z4n,L2n),ztn;m(987,1,Yt,nje),s.Le=function(n,t){return a2n(this.a,u(n,155),u(t,155))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(hF,"StressMajorization/lambda$0$Type",987),m(1161,1,{},pLe),v(vy,"ElkLayered",1161),m(1162,1,ut,tje),s.Ad=function(n){uTn(this.a,u(n,37))},v(vy,"ElkLayered/lambda$0$Type",1162),m(1163,1,ut,ije),s.Ad=function(n){p2n(this.a,u(n,37))},v(vy,"ElkLayered/lambda$1$Type",1163),m(1246,1,{},PTe);var Ftn,Jtn,Htn;v(vy,"GraphConfigurator",1246),m(757,1,ut,Zue),s.Ad=function(n){NGe(this.a,u(n,9))},v(vy,"GraphConfigurator/lambda$0$Type",757),m(758,1,{},b1),s.Kb=function(n){return Vde(),new mn(null,new yn(u(n,25).a,16))},v(vy,"GraphConfigurator/lambda$1$Type",758),m(759,1,ut,eoe),s.Ad=function(n){NGe(this.a,u(n,9))},v(vy,"GraphConfigurator/lambda$2$Type",759),m(1079,214,ep,rxe),s.kf=function(n,t){var i;i=SLn(new fxe,n),ue(ke(n,(Oe(),Em)))===ue((B1(),Wd))?Djn(this.a,i,t):bOn(this.a,i,t),t.Zg()||TVe(new kC,i)},v(vy,"LayeredLayoutProvider",1079),m(363,23,{3:1,35:1,23:1,363:1},sT);var Xf,c1,eo,no,Pc,pve=yt(vy,"LayeredPhases",363,Tt,V6n,P2n),Gtn;m(1683,1,{},EBe),s.i=0;var qtn;v(ON,"ComponentsToCGraphTransformer",1683);var Utn;m(1684,1,{},Ws),s.wf=function(n,t){return k.Math.min(n.a!=null?ne(n.a):n.c.i,t.a!=null?ne(t.a):t.c.i)},s.xf=function(n,t){return k.Math.min(n.a!=null?ne(n.a):n.c.i,t.a!=null?ne(t.a):t.c.i)},v(ON,"ComponentsToCGraphTransformer/1",1684),m(82,1,{82:1}),s.i=0,s.k=!0,s.o=Ir;var Ate=v(xS,"CNode",82);m(460,82,{460:1,82:1},hle,Sde),s.Ib=function(){return""},v(ON,"ComponentsToCGraphTransformer/CRectNode",460),m(1652,1,{},xf);var Mte,Cte;v(ON,"OneDimensionalComponentsCompaction",1652),m(1653,1,{},vt),s.Kb=function(n){return N4n(u(n,49))},s.Fb=function(n){return this===n},v(ON,"OneDimensionalComponentsCompaction/lambda$0$Type",1653),m(1654,1,{},kc),s.Kb=function(n){return Rjn(u(n,49))},s.Fb=function(n){return this===n},v(ON,"OneDimensionalComponentsCompaction/lambda$1$Type",1654),m(1686,1,{},yDe),v(xS,"CGraph",1686),m(194,1,{194:1},OQ),s.b=0,s.c=0,s.e=0,s.g=!0,s.i=Ir,v(xS,"CGroup",194),m(1685,1,{},tc),s.wf=function(n,t){return k.Math.max(n.a!=null?ne(n.a):n.c.i,t.a!=null?ne(t.a):t.c.i)},s.xf=function(n,t){return k.Math.max(n.a!=null?ne(n.a):n.c.i,t.a!=null?ne(t.a):t.c.i)},v(xS,$Ye,1685),m(1687,1,{},Iqe),s.d=!1;var Xtn,Tte=v(xS,zYe,1687);m(1688,1,{},tk),s.Kb=function(n){return Zoe(),$n(),u(u(n,49).a,82).d.e!=0},s.Fb=function(n){return this===n},v(xS,FYe,1688),m(817,1,{},mfe),s.a=!1,s.b=!1,s.c=!1,s.d=!1,v(xS,JYe,817),m(1868,1,{},_Ie),v(dF,HYe,1868);var QN=Gi(bg,LYe);m(1869,1,{377:1},p_e),s._e=function(n){kIn(this,u(n,465))},v(dF,GYe,1869),m(1870,1,Yt,f0),s.Le=function(n,t){return S5n(u(n,82),u(t,82))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(dF,qYe,1870),m(465,1,{465:1},ase),s.a=!1,v(dF,UYe,465),m(1871,1,Yt,Yg),s.Le=function(n,t){return Yxn(u(n,465),u(t,465))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(dF,XYe,1871),m(146,1,{146:1},k9,ofe),s.Fb=function(n){var t;return n==null||BBn!=Us(n)?!1:(t=u(n,146),Ku(this.c,t.c)&&Ku(this.d,t.d))},s.Hb=function(){return zB(F(z(Mr,1),Nn,1,5,[this.c,this.d]))},s.Ib=function(){return"("+this.c+To+this.d+(this.a?"cx":"")+this.b+")"},s.a=!0,s.c=0,s.d=0;var BBn=v(bg,"Point",146);m(408,23,{3:1,35:1,23:1,408:1},f$);var fp,bm,O3,gm,Ktn=yt(bg,"Point/Quadrant",408,Tt,e6n,D2n),Vtn;m(1674,1,{},cxe),s.b=null,s.c=null,s.d=null,s.e=null,s.f=null;var Ytn,Qtn,Wtn,Ztn,ein;v(bg,"RectilinearConvexHull",1674),m(569,1,{377:1},oz),s._e=function(n){z9n(this,u(n,146))},s.b=0;var mve;v(bg,"RectilinearConvexHull/MaximalElementsEventHandler",569),m(1676,1,Yt,a6),s.Le=function(n,t){return j5n(re(n),re(t))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(bg,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",1676),m(1675,1,{377:1},TRe),s._e=function(n){$Nn(this,u(n,146))},s.a=0,s.b=null,s.c=null,s.d=null,s.e=null,v(bg,"RectilinearConvexHull/RectangleEventHandler",1675),m(1677,1,Yt,Ip),s.Le=function(n,t){return Syn(u(n,146),u(t,146))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(bg,"RectilinearConvexHull/lambda$0$Type",1677),m(1678,1,Yt,Dp),s.Le=function(n,t){return xyn(u(n,146),u(t,146))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(bg,"RectilinearConvexHull/lambda$1$Type",1678),m(1679,1,Yt,_p),s.Le=function(n,t){return Myn(u(n,146),u(t,146))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(bg,"RectilinearConvexHull/lambda$2$Type",1679),m(1680,1,Yt,Lp),s.Le=function(n,t){return Ayn(u(n,146),u(t,146))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(bg,"RectilinearConvexHull/lambda$3$Type",1680),m(1681,1,Yt,xl),s.Le=function(n,t){return DMn(u(n,146),u(t,146))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(bg,"RectilinearConvexHull/lambda$4$Type",1681),m(1682,1,{},U_e),v(bg,"Scanline",1682),m(2066,1,{}),v(Xa,"AbstractGraphPlacer",2066),m(336,1,{336:1},MOe),s.Df=function(n){return this.Ef(n)?(gn(this.b,u(C(n,(me(),K1)),22),n),!0):!1},s.Ef=function(n){var t,i,r,c;for(t=u(C(n,(me(),K1)),22),c=u(vi(Ai,t),22),r=c.Jc();r.Ob();)if(i=u(r.Pb(),22),!u(vi(this.b,i),16).dc())return!1;return!0};var Ai;v(Xa,"ComponentGroup",336),m(766,2066,{},woe),s.Ff=function(n){var t,i;for(i=new P(this.a);i.ai&&(p=0,y+=f+r,f=0),h=o.c,T8(o,p+h.a,y+h.b),fa(h),c=k.Math.max(c,p+b.a),f=k.Math.max(f,b.b),p+=b.a+r;t.f.a=c,t.f.b=y+f},s.Hf=function(n,t){var i,r,c,o,l;if(ue(C(t,(Oe(),bx)))===ue((W4(),ex))){for(r=n.Jc();r.Ob();){for(i=u(r.Pb(),37),l=0,o=new P(i.a);o.ai&&!u(C(o,(me(),K1)),22).Gc((Ie(),Vn))||h&&u(C(h,(me(),K1)),22).Gc((Ie(),nt))||u(C(o,(me(),K1)),22).Gc((Ie(),Yn)))&&(S=y,A+=f+r,f=0),b=o.c,u(C(o,(me(),K1)),22).Gc((Ie(),Vn))&&(S=c+r),T8(o,S+b.a,A+b.b),c=k.Math.max(c,S+p.a),u(C(o,K1),22).Gc(bt)&&(y=k.Math.max(y,S+p.a+r)),fa(b),f=k.Math.max(f,p.b),S+=p.a+r,h=o;t.f.a=c,t.f.b=A+f},s.Hf=function(n,t){},v(Xa,"ModelOrderRowGraphPlacer",1277),m(1275,1,Yt,OA),s.Le=function(n,t){return z7n(u(n,37),u(t,37))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Xa,"SimpleRowGraphPlacer/1",1275);var tin;m(1245,1,Sh,h6),s.Lb=function(n){var t;return t=u(C(u(n,250).b,(Oe(),Wc)),78),!!t&&t.b!=0},s.Fb=function(n){return this===n},s.Mb=function(n){var t;return t=u(C(u(n,250).b,(Oe(),Wc)),78),!!t&&t.b!=0},v(bF,"CompoundGraphPostprocessor/1",1245),m(1244,1,Mi,axe),s.If=function(n,t){YJe(this,u(n,37),t)},v(bF,"CompoundGraphPreprocessor",1244),m(444,1,{444:1},$Fe),s.c=!1,v(bF,"CompoundGraphPreprocessor/ExternalPort",444),m(250,1,{250:1},W$),s.Ib=function(){return RK(this.c)+":"+Aqe(this.b)},v(bF,"CrossHierarchyEdge",250),m(764,1,Yt,noe),s.Le=function(n,t){return jxn(this,u(n,250),u(t,250))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(bF,"CrossHierarchyEdgeComparator",764),m(246,150,{3:1,246:1,105:1,150:1}),s.p=0,v(Zu,"LGraphElement",246),m(17,246,{3:1,17:1,246:1,105:1,150:1},Ow),s.Ib=function(){return Aqe(this)};var w7=v(Zu,"LEdge",17);m(37,246,{3:1,20:1,37:1,246:1,105:1,150:1},$he),s.Ic=function(n){cc(this,n)},s.Jc=function(){return new P(this.b)},s.Ib=function(){return this.b.c.length==0?"G-unlayered"+Ja(this.a):this.a.c.length==0?"G-layered"+Ja(this.b):"G[layerless"+Ja(this.a)+", layers"+Ja(this.b)+"]"};var iin=v(Zu,"LGraph",37),rin;m(655,1,{}),s.Jf=function(){return this.e.n},s.mf=function(n){return C(this.e,n)},s.Kf=function(){return this.e.o},s.Lf=function(){return this.e.p},s.nf=function(n){return wi(this.e,n)},s.Mf=function(n){this.e.n.a=n.a,this.e.n.b=n.b},s.Nf=function(n){this.e.o.a=n.a,this.e.o.b=n.b},s.Of=function(n){this.e.p=n},v(Zu,"LGraphAdapters/AbstractLShapeAdapter",655),m(464,1,{837:1},bj),s.Pf=function(){var n,t;if(!this.b)for(this.b=Jh(this.a.b.c.length),t=new P(this.a.b);t.a0&&dFe((Wn(t-1,n.length),n.charCodeAt(t-1)),hQe);)--t;if(o> ",n),wz(i)),Kt(uo((n.a+="[",n),i.i),"]")),n.a},s.c=!0,s.d=!1;var Eve,Sve,xve,Ave,Mve,Cve,uin=v(Zu,"LPort",12);m(399,1,Zh,l9),s.Ic=function(n){cc(this,n)},s.Jc=function(){var n;return n=new P(this.a.e),new rje(n)},v(Zu,"LPort/1",399),m(1273,1,Fr,rje),s.Nb=function(n){Zr(this,n)},s.Pb=function(){return u(L(this.a),17).c},s.Ob=function(){return gu(this.a)},s.Qb=function(){sE(this.a)},v(Zu,"LPort/1/1",1273),m(365,1,Zh,i4),s.Ic=function(n){cc(this,n)},s.Jc=function(){var n;return n=new P(this.a.g),new toe(n)},v(Zu,"LPort/2",365),m(763,1,Fr,toe),s.Nb=function(n){Zr(this,n)},s.Pb=function(){return u(L(this.a),17).d},s.Ob=function(){return gu(this.a)},s.Qb=function(){sE(this.a)},v(Zu,"LPort/2/1",763),m(1266,1,Zh,XMe),s.Ic=function(n){cc(this,n)},s.Jc=function(){return new Pa(this)},v(Zu,"LPort/CombineIter",1266),m(207,1,Fr,Pa),s.Nb=function(n){Zr(this,n)},s.Qb=function(){AAe()},s.Ob=function(){return Zj(this)},s.Pb=function(){return gu(this.a)?L(this.a):L(this.b)},v(Zu,"LPort/CombineIter/1",207),m(1267,1,Sh,k5),s.Lb=function(n){return qIe(n)},s.Fb=function(n){return this===n},s.Mb=function(n){return ss(),u(n,12).g.c.length!=0},v(Zu,"LPort/lambda$0$Type",1267),m(1268,1,Sh,a0),s.Lb=function(n){return UIe(n)},s.Fb=function(n){return this===n},s.Mb=function(n){return ss(),u(n,12).e.c.length!=0},v(Zu,"LPort/lambda$1$Type",1268),m(1269,1,Sh,_h),s.Lb=function(n){return ss(),u(n,12).j==(Ie(),Vn)},s.Fb=function(n){return this===n},s.Mb=function(n){return ss(),u(n,12).j==(Ie(),Vn)},v(Zu,"LPort/lambda$2$Type",1269),m(1270,1,Sh,uk),s.Lb=function(n){return ss(),u(n,12).j==(Ie(),nt)},s.Fb=function(n){return this===n},s.Mb=function(n){return ss(),u(n,12).j==(Ie(),nt)},v(Zu,"LPort/lambda$3$Type",1270),m(1271,1,Sh,NA),s.Lb=function(n){return ss(),u(n,12).j==(Ie(),bt)},s.Fb=function(n){return this===n},s.Mb=function(n){return ss(),u(n,12).j==(Ie(),bt)},v(Zu,"LPort/lambda$4$Type",1271),m(1272,1,Sh,j5),s.Lb=function(n){return ss(),u(n,12).j==(Ie(),Yn)},s.Fb=function(n){return this===n},s.Mb=function(n){return ss(),u(n,12).j==(Ie(),Yn)},v(Zu,"LPort/lambda$5$Type",1272),m(25,246,{3:1,20:1,246:1,25:1,105:1,150:1},Xu),s.Ic=function(n){cc(this,n)},s.Jc=function(){return new P(this.a)},s.Ib=function(){return"L_"+pu(this.b.b,this,0)+Ja(this.a)},v(Zu,"Layer",25),m(1659,1,{},L$e),s.b=0,v(Zu,"Tarjan",1659),m(1282,1,{},fxe),v(Jd,wQe,1282),m(1286,1,{},ok),s.Kb=function(n){return iu(u(n,84))},v(Jd,"ElkGraphImporter/0methodref$connectableShapeToNode$Type",1286),m(1289,1,{},ov),s.Kb=function(n){return iu(u(n,84))},v(Jd,"ElkGraphImporter/1methodref$connectableShapeToNode$Type",1289),m(1283,1,ut,cje),s.Ad=function(n){Hqe(this.a,u(n,125))},v(Jd,iwe,1283),m(1284,1,ut,uje),s.Ad=function(n){Hqe(this.a,u(n,125))},v(Jd,pQe,1284),m(1285,1,{},Lh),s.Kb=function(n){return new mn(null,new yn(tae(u(n,85)),16))},v(Jd,mQe,1285),m(1287,1,zt,oje),s.Mb=function(n){return dwn(this.a,u(n,26))},v(Jd,vQe,1287),m(1288,1,{},sv),s.Kb=function(n){return new mn(null,new yn(v5n(u(n,85)),16))},v(Jd,"ElkGraphImporter/lambda$5$Type",1288),m(1290,1,zt,sje),s.Mb=function(n){return bwn(this.a,u(n,26))},v(Jd,"ElkGraphImporter/lambda$7$Type",1290),m(1291,1,zt,sk),s.Mb=function(n){return _5n(u(n,85))},v(Jd,"ElkGraphImporter/lambda$8$Type",1291),m(1261,1,{},kC);var oin;v(Jd,"ElkGraphLayoutTransferrer",1261),m(1262,1,zt,lje),s.Mb=function(n){return c2n(this.a,u(n,17))},v(Jd,"ElkGraphLayoutTransferrer/lambda$0$Type",1262),m(1263,1,ut,fje),s.Ad=function(n){cT(),Ce(this.a,u(n,17))},v(Jd,"ElkGraphLayoutTransferrer/lambda$1$Type",1263),m(1264,1,zt,aje),s.Mb=function(n){return qpn(this.a,u(n,17))},v(Jd,"ElkGraphLayoutTransferrer/lambda$2$Type",1264),m(1265,1,ut,hje),s.Ad=function(n){cT(),Ce(this.a,u(n,17))},v(Jd,"ElkGraphLayoutTransferrer/lambda$3$Type",1265),m(806,1,{},Lle),v(Zn,"BiLinkedHashMultiMap",806),m(1511,1,Mi,d6),s.If=function(n,t){c7n(u(n,37),t)},v(Zn,"CommentNodeMarginCalculator",1511),m(1512,1,{},Wg),s.Kb=function(n){return new mn(null,new yn(u(n,25).a,16))},v(Zn,"CommentNodeMarginCalculator/lambda$0$Type",1512),m(1513,1,ut,kD),s.Ad=function(n){kLn(u(n,9))},v(Zn,"CommentNodeMarginCalculator/lambda$1$Type",1513),m(1514,1,Mi,IA),s.If=function(n,t){CIn(u(n,37),t)},v(Zn,"CommentPostprocessor",1514),m(1515,1,Mi,jD),s.If=function(n,t){K$n(u(n,37),t)},v(Zn,"CommentPreprocessor",1515),m(1516,1,Mi,E5),s.If=function(n,t){FNn(u(n,37),t)},v(Zn,"ConstraintsPostprocessor",1516),m(1517,1,Mi,oq),s.If=function(n,t){O7n(u(n,37),t)},v(Zn,"EdgeAndLayerConstraintEdgeReverser",1517),m(1518,1,Mi,ED),s.If=function(n,t){cEn(u(n,37),t)},v(Zn,"EndLabelPostprocessor",1518),m(1519,1,{},SD),s.Kb=function(n){return new mn(null,new yn(u(n,25).a,16))},v(Zn,"EndLabelPostprocessor/lambda$0$Type",1519),m(1520,1,zt,DA),s.Mb=function(n){return H6n(u(n,9))},v(Zn,"EndLabelPostprocessor/lambda$1$Type",1520),m(1521,1,ut,sq),s.Ad=function(n){Qxn(u(n,9))},v(Zn,"EndLabelPostprocessor/lambda$2$Type",1521),m(1522,1,Mi,lq),s.If=function(n,t){DCn(u(n,37),t)},v(Zn,"EndLabelPreprocessor",1522),m(1523,1,{},lk),s.Kb=function(n){return new mn(null,new yn(u(n,25).a,16))},v(Zn,"EndLabelPreprocessor/lambda$0$Type",1523),m(1524,1,ut,PNe),s.Ad=function(n){Cgn(this.a,this.b,this.c,u(n,9))},s.a=0,s.b=0,s.c=!1,v(Zn,"EndLabelPreprocessor/lambda$1$Type",1524),m(1525,1,zt,Zg),s.Mb=function(n){return ue(C(u(n,70),(Oe(),Ih)))===ue((Ra(),G7))},v(Zn,"EndLabelPreprocessor/lambda$2$Type",1525),m(1526,1,ut,dje),s.Ad=function(n){Vt(this.a,u(n,70))},v(Zn,"EndLabelPreprocessor/lambda$3$Type",1526),m(1527,1,zt,_A),s.Mb=function(n){return ue(C(u(n,70),(Oe(),Ih)))===ue((Ra(),Fm))},v(Zn,"EndLabelPreprocessor/lambda$4$Type",1527),m(1528,1,ut,bje),s.Ad=function(n){Vt(this.a,u(n,70))},v(Zn,"EndLabelPreprocessor/lambda$5$Type",1528),m(1576,1,Mi,MU),s.If=function(n,t){yjn(u(n,37),t)};var sin;v(Zn,"EndLabelSorter",1576),m(1577,1,Yt,LA),s.Le=function(n,t){return FEn(u(n,455),u(t,455))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Zn,"EndLabelSorter/1",1577),m(455,1,{455:1},s_e),v(Zn,"EndLabelSorter/LabelGroup",455),m(1578,1,{},S5),s.Kb=function(n){return rT(),new mn(null,new yn(u(n,25).a,16))},v(Zn,"EndLabelSorter/lambda$0$Type",1578),m(1579,1,zt,x5),s.Mb=function(n){return rT(),u(n,9).k==(Fn(),Wi)},v(Zn,"EndLabelSorter/lambda$1$Type",1579),m(1580,1,ut,xD),s.Ad=function(n){XMn(u(n,9))},v(Zn,"EndLabelSorter/lambda$2$Type",1580),m(1581,1,zt,PA),s.Mb=function(n){return rT(),ue(C(u(n,70),(Oe(),Ih)))===ue((Ra(),Fm))},v(Zn,"EndLabelSorter/lambda$3$Type",1581),m(1582,1,zt,AD),s.Mb=function(n){return rT(),ue(C(u(n,70),(Oe(),Ih)))===ue((Ra(),G7))},v(Zn,"EndLabelSorter/lambda$4$Type",1582),m(1529,1,Mi,b6),s.If=function(n,t){RLn(this,u(n,37))},s.b=0,s.c=0,v(Zn,"FinalSplineBendpointsCalculator",1529),m(1530,1,{},ew),s.Kb=function(n){return new mn(null,new yn(u(n,25).a,16))},v(Zn,"FinalSplineBendpointsCalculator/lambda$0$Type",1530),m(1531,1,{},$A),s.Kb=function(n){return new mn(null,new A2(new Xn(Qn(Ii(u(n,9)).a.Jc(),new ee))))},v(Zn,"FinalSplineBendpointsCalculator/lambda$1$Type",1531),m(1532,1,zt,g6),s.Mb=function(n){return!uc(u(n,17))},v(Zn,"FinalSplineBendpointsCalculator/lambda$2$Type",1532),m(1533,1,zt,$p),s.Mb=function(n){return wi(u(n,17),(me(),Eg))},v(Zn,"FinalSplineBendpointsCalculator/lambda$3$Type",1533),m(1534,1,ut,gje),s.Ad=function(n){UDn(this.a,u(n,132))},v(Zn,"FinalSplineBendpointsCalculator/lambda$4$Type",1534),m(1535,1,ut,RA),s.Ad=function(n){qO(u(n,17).a)},v(Zn,"FinalSplineBendpointsCalculator/lambda$5$Type",1535),m(790,1,Mi,ioe),s.If=function(n,t){IPn(this,u(n,37),t)},v(Zn,"GraphTransformer",790),m(502,23,{3:1,35:1,23:1,502:1},hse);var Dte,ZN,lin=yt(Zn,"GraphTransformer/Mode",502,Tt,h4n,B2n),fin;m(1536,1,Mi,fk),s.If=function(n,t){eNn(u(n,37),t)},v(Zn,"HierarchicalNodeResizingProcessor",1536),m(1537,1,Mi,MD),s.If=function(n,t){U8n(u(n,37),t)},v(Zn,"HierarchicalPortConstraintProcessor",1537),m(1538,1,Yt,ak),s.Le=function(n,t){return oSn(u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Zn,"HierarchicalPortConstraintProcessor/NodeComparator",1538),m(1539,1,Mi,hk),s.If=function(n,t){B_n(u(n,37),t)},v(Zn,"HierarchicalPortDummySizeProcessor",1539),m(1540,1,Mi,CD),s.If=function(n,t){WIn(this,u(n,37),t)},s.a=0,v(Zn,"HierarchicalPortOrthogonalEdgeRouter",1540),m(1541,1,Yt,Ph),s.Le=function(n,t){return opn(u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Zn,"HierarchicalPortOrthogonalEdgeRouter/1",1541),m(1542,1,Yt,lv),s.Le=function(n,t){return q9n(u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Zn,"HierarchicalPortOrthogonalEdgeRouter/2",1542),m(1543,1,Mi,dk),s.If=function(n,t){OMn(u(n,37),t)},v(Zn,"HierarchicalPortPositionProcessor",1543),m(1544,1,Mi,yC),s.If=function(n,t){NRn(this,u(n,37))},s.a=0,s.c=0;var SJ,xJ;v(Zn,"HighDegreeNodeLayeringProcessor",1544),m(566,1,{566:1},w6),s.b=-1,s.d=-1,v(Zn,"HighDegreeNodeLayeringProcessor/HighDegreeNodeInformation",566),m(1545,1,{},fq),s.Kb=function(n){return IT(),cr(u(n,9))},s.Fb=function(n){return this===n},v(Zn,"HighDegreeNodeLayeringProcessor/lambda$0$Type",1545),m(1546,1,{},BA),s.Kb=function(n){return IT(),Ii(u(n,9))},s.Fb=function(n){return this===n},v(Zn,"HighDegreeNodeLayeringProcessor/lambda$1$Type",1546),m(1552,1,Mi,zA),s.If=function(n,t){O_n(this,u(n,37),t)},v(Zn,"HyperedgeDummyMerger",1552),m(791,1,{},Wle),s.a=!1,s.b=!1,s.c=!1,v(Zn,"HyperedgeDummyMerger/MergeState",791),m(1553,1,{},p6),s.Kb=function(n){return new mn(null,new yn(u(n,25).a,16))},v(Zn,"HyperedgeDummyMerger/lambda$0$Type",1553),m(1554,1,{},bk),s.Kb=function(n){return new mn(null,new yn(u(n,9).j,16))},v(Zn,"HyperedgeDummyMerger/lambda$1$Type",1554),m(1555,1,ut,TD),s.Ad=function(n){u(n,12).p=-1},v(Zn,"HyperedgeDummyMerger/lambda$2$Type",1555),m(1556,1,Mi,hq),s.If=function(n,t){T_n(u(n,37),t)},v(Zn,"HypernodesProcessor",1556),m(1557,1,Mi,dq),s.If=function(n,t){R_n(u(n,37),t)},v(Zn,"InLayerConstraintProcessor",1557),m(1558,1,Mi,FA),s.If=function(n,t){y7n(u(n,37),t)},v(Zn,"InnermostNodeMarginCalculator",1558),m(1559,1,Mi,bq),s.If=function(n,t){G$n(this,u(n,37))},s.a=Ir,s.b=Ir,s.c=Vi,s.d=Vi;var zBn=v(Zn,"InteractiveExternalPortPositioner",1559);m(1560,1,{},gq),s.Kb=function(n){return u(n,17).d.i},s.Fb=function(n){return this===n},v(Zn,"InteractiveExternalPortPositioner/lambda$0$Type",1560),m(1561,1,{},wje),s.Kb=function(n){return spn(this.a,re(n))},s.Fb=function(n){return this===n},v(Zn,"InteractiveExternalPortPositioner/lambda$1$Type",1561),m(1562,1,{},wq),s.Kb=function(n){return u(n,17).c.i},s.Fb=function(n){return this===n},v(Zn,"InteractiveExternalPortPositioner/lambda$2$Type",1562),m(1563,1,{},pje),s.Kb=function(n){return lpn(this.a,re(n))},s.Fb=function(n){return this===n},v(Zn,"InteractiveExternalPortPositioner/lambda$3$Type",1563),m(1564,1,{},mje),s.Kb=function(n){return i2n(this.a,re(n))},s.Fb=function(n){return this===n},v(Zn,"InteractiveExternalPortPositioner/lambda$4$Type",1564),m(1565,1,{},vje),s.Kb=function(n){return r2n(this.a,re(n))},s.Fb=function(n){return this===n},v(Zn,"InteractiveExternalPortPositioner/lambda$5$Type",1565),m(79,23,{3:1,35:1,23:1,79:1,196:1},br),s.bg=function(){switch(this.g){case 15:return new iw;case 22:return new Hp;case 48:return new sM;case 29:case 36:return new Sq;case 33:return new d6;case 43:return new IA;case 1:return new jD;case 42:return new E5;case 57:return new ioe((Y9(),ZN));case 0:return new ioe((Y9(),Dte));case 2:return new oq;case 55:return new ED;case 34:return new lq;case 52:return new b6;case 56:return new fk;case 13:return new MD;case 39:return new hk;case 45:return new CD;case 41:return new dk;case 9:return new yC;case 50:return new yOe;case 38:return new zA;case 44:return new hq;case 28:return new dq;case 31:return new FA;case 3:return new bq;case 18:return new aq;case 30:return new pq;case 5:return new CU;case 51:return new yq;case 35:return new W6;case 37:return new xq;case 53:return new MU;case 11:return new ND;case 7:return new TU;case 40:return new Aq;case 46:return new Mq;case 16:return new Cq;case 10:return new jCe;case 49:return new Iq;case 21:return new Dq;case 23:return new JP((rg(),Cx));case 8:return new HA;case 12:return new Lq;case 4:return new ID;case 19:return new rP;case 17:return new RD;case 54:return new v6;case 6:return new Jq;case 25:return new dxe;case 26:return new uM;case 47:return new qA;case 32:return new oNe;case 14:return new UD;case 27:return new Yq;case 20:return new j6;case 24:return new JP((rg(),NH));default:throw R(new Un(tee+(this.f!=null?this.f:""+this.g)))}};var Tve,Ove,Nve,Ive,Dve,_ve,Lve,Pve,$ve,Rve,Bve,N3,AJ,MJ,zve,Fve,Jve,Hve,Gve,qve,Uve,tx,Xve,Kve,Vve,Yve,Qve,_te,CJ,TJ,Wve,OJ,NJ,IJ,p7,wm,pm,Zve,DJ,_J,e3e,LJ,PJ,n3e,t3e,i3e,r3e,$J,Lte,Cy,RJ,BJ,zJ,FJ,c3e,u3e,o3e,s3e,FBn=yt(Zn,iee,79,Tt,JUe,z2n),ain;m(1566,1,Mi,aq),s.If=function(n,t){F$n(u(n,37),t)},v(Zn,"InvertedPortProcessor",1566),m(1567,1,Mi,pq),s.If=function(n,t){zDn(u(n,37),t)},v(Zn,"LabelAndNodeSizeProcessor",1567),m(1568,1,zt,mq),s.Mb=function(n){return u(n,9).k==(Fn(),Wi)},v(Zn,"LabelAndNodeSizeProcessor/lambda$0$Type",1568),m(1569,1,zt,OD),s.Mb=function(n){return u(n,9).k==(Fn(),wr)},v(Zn,"LabelAndNodeSizeProcessor/lambda$1$Type",1569),m(1570,1,ut,BNe),s.Ad=function(n){Tgn(this.b,this.a,this.c,u(n,9))},s.a=!1,s.c=!1,v(Zn,"LabelAndNodeSizeProcessor/lambda$2$Type",1570),m(1571,1,Mi,CU),s.If=function(n,t){v$n(u(n,37),t)};var hin;v(Zn,"LabelDummyInserter",1571),m(1572,1,Sh,vq),s.Lb=function(n){return ue(C(u(n,70),(Oe(),Ih)))===ue((Ra(),H7))},s.Fb=function(n){return this===n},s.Mb=function(n){return ue(C(u(n,70),(Oe(),Ih)))===ue((Ra(),H7))},v(Zn,"LabelDummyInserter/1",1572),m(1573,1,Mi,yq),s.If=function(n,t){u$n(u(n,37),t)},v(Zn,"LabelDummyRemover",1573),m(1574,1,zt,kq),s.Mb=function(n){return Fe(ze(C(u(n,70),(Oe(),H3))))},v(Zn,"LabelDummyRemover/lambda$0$Type",1574),m(1332,1,Mi,W6),s.If=function(n,t){e$n(this,u(n,37),t)},s.a=null;var Pte;v(Zn,"LabelDummySwitcher",1332),m(294,1,{294:1},RXe),s.c=0,s.d=null,s.f=0,v(Zn,"LabelDummySwitcher/LabelDummyInfo",294),m(1333,1,{},jq),s.Kb=function(n){return q4(),new mn(null,new yn(u(n,25).a,16))},v(Zn,"LabelDummySwitcher/lambda$0$Type",1333),m(1334,1,zt,JA),s.Mb=function(n){return q4(),u(n,9).k==(Fn(),Uu)},v(Zn,"LabelDummySwitcher/lambda$1$Type",1334),m(1335,1,{},yje),s.Kb=function(n){return Upn(this.a,u(n,9))},v(Zn,"LabelDummySwitcher/lambda$2$Type",1335),m(1336,1,ut,kje),s.Ad=function(n){K3n(this.a,u(n,294))},v(Zn,"LabelDummySwitcher/lambda$3$Type",1336),m(1337,1,Yt,Eq),s.Le=function(n,t){return E3n(u(n,294),u(t,294))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Zn,"LabelDummySwitcher/lambda$4$Type",1337),m(789,1,Mi,Sq),s.If=function(n,t){x9n(u(n,37),t)},v(Zn,"LabelManagementProcessor",789),m(1575,1,Mi,xq),s.If=function(n,t){pIn(u(n,37),t)},v(Zn,"LabelSideSelector",1575),m(1583,1,Mi,ND),s.If=function(n,t){tLn(u(n,37),t)},v(Zn,"LayerConstraintPostprocessor",1583),m(1584,1,Mi,TU),s.If=function(n,t){eOn(u(n,37),t)};var l3e;v(Zn,"LayerConstraintPreprocessor",1584),m(367,23,{3:1,35:1,23:1,367:1},h$);var eI,JJ,HJ,$te,din=yt(Zn,"LayerConstraintPreprocessor/HiddenNodeConnections",367,Tt,i6n,jmn),bin;m(1585,1,Mi,Aq),s.If=function(n,t){yPn(u(n,37),t)},v(Zn,"LayerSizeAndGraphHeightCalculator",1585),m(1586,1,Mi,Mq),s.If=function(n,t){nNn(u(n,37),t)},v(Zn,"LongEdgeJoiner",1586),m(1587,1,Mi,Cq),s.If=function(n,t){YLn(u(n,37),t)},v(Zn,"LongEdgeSplitter",1587),m(1588,1,Mi,jCe),s.If=function(n,t){D$n(this,u(n,37),t)},s.e=0,s.f=0,s.j=0,s.k=0,s.n=0,s.o=0;var gin,win;v(Zn,"NodePromotion",1588),m(1589,1,Yt,Tq),s.Le=function(n,t){return Skn(u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Zn,"NodePromotion/1",1589),m(1590,1,Yt,Oq),s.Le=function(n,t){return xkn(u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Zn,"NodePromotion/2",1590),m(1591,1,{},Nq),s.Kb=function(n){return u(n,49),Y$(),$n(),!0},s.Fb=function(n){return this===n},v(Zn,"NodePromotion/lambda$0$Type",1591),m(1592,1,{},jje),s.Kb=function(n){return O4n(this.a,u(n,49))},s.Fb=function(n){return this===n},s.a=0,v(Zn,"NodePromotion/lambda$1$Type",1592),m(1593,1,{},Eje),s.Kb=function(n){return T4n(this.a,u(n,49))},s.Fb=function(n){return this===n},s.a=0,v(Zn,"NodePromotion/lambda$2$Type",1593),m(1594,1,Mi,Iq),s.If=function(n,t){jRn(u(n,37),t)},v(Zn,"NorthSouthPortPostprocessor",1594),m(1595,1,Mi,Dq),s.If=function(n,t){CRn(u(n,37),t)},v(Zn,"NorthSouthPortPreprocessor",1595),m(1596,1,Yt,_q),s.Le=function(n,t){return H7n(u(n,12),u(t,12))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Zn,"NorthSouthPortPreprocessor/lambda$0$Type",1596),m(1597,1,Mi,HA),s.If=function(n,t){v_n(u(n,37),t)},v(Zn,"PartitionMidprocessor",1597),m(1598,1,zt,m6),s.Mb=function(n){return wi(u(n,9),(Oe(),xm))},v(Zn,"PartitionMidprocessor/lambda$0$Type",1598),m(1599,1,ut,Sje),s.Ad=function(n){D5n(this.a,u(n,9))},v(Zn,"PartitionMidprocessor/lambda$1$Type",1599),m(1600,1,Mi,Lq),s.If=function(n,t){jNn(u(n,37),t)},v(Zn,"PartitionPostprocessor",1600),m(1601,1,Mi,ID),s.If=function(n,t){xDn(u(n,37),t)},v(Zn,"PartitionPreprocessor",1601),m(1602,1,zt,DD),s.Mb=function(n){return wi(u(n,9),(Oe(),xm))},v(Zn,"PartitionPreprocessor/lambda$0$Type",1602),m(1603,1,zt,_D),s.Mb=function(n){return wi(u(n,9),(Oe(),xm))},v(Zn,"PartitionPreprocessor/lambda$1$Type",1603),m(1604,1,{},LD),s.Kb=function(n){return new mn(null,new A2(new Xn(Qn(Ii(u(n,9)).a.Jc(),new ee))))},v(Zn,"PartitionPreprocessor/lambda$2$Type",1604),m(1605,1,zt,xje),s.Mb=function(n){return hgn(this.a,u(n,17))},v(Zn,"PartitionPreprocessor/lambda$3$Type",1605),m(1606,1,ut,PD),s.Ad=function(n){tkn(u(n,17))},v(Zn,"PartitionPreprocessor/lambda$4$Type",1606),m(1607,1,zt,Aje),s.Mb=function(n){return V3n(this.a,u(n,9))},s.a=0,v(Zn,"PartitionPreprocessor/lambda$5$Type",1607),m(1608,1,Mi,rP),s.If=function(n,t){ZDn(u(n,37),t)};var f3e,pin,min,vin,a3e,h3e;v(Zn,"PortListSorter",1608),m(1609,1,{},A5),s.Kb=function(n){return i8(),u(n,12).e},v(Zn,"PortListSorter/lambda$0$Type",1609),m(1610,1,{},Pq),s.Kb=function(n){return i8(),u(n,12).g},v(Zn,"PortListSorter/lambda$1$Type",1610),m(1611,1,Yt,$q),s.Le=function(n,t){return hPe(u(n,12),u(t,12))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Zn,"PortListSorter/lambda$2$Type",1611),m(1612,1,Yt,Rq),s.Le=function(n,t){return gxn(u(n,12),u(t,12))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Zn,"PortListSorter/lambda$3$Type",1612),m(1613,1,Yt,$D),s.Le=function(n,t){return fKe(u(n,12),u(t,12))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Zn,"PortListSorter/lambda$4$Type",1613),m(1614,1,Mi,RD),s.If=function(n,t){oOn(u(n,37),t)},v(Zn,"PortSideProcessor",1614),m(1615,1,Mi,v6),s.If=function(n,t){aDn(u(n,37),t)},v(Zn,"ReversedEdgeRestorer",1615),m(1620,1,Mi,dxe),s.If=function(n,t){WSn(this,u(n,37),t)},v(Zn,"SelfLoopPortRestorer",1620),m(1621,1,{},y6),s.Kb=function(n){return new mn(null,new yn(u(n,25).a,16))},v(Zn,"SelfLoopPortRestorer/lambda$0$Type",1621),m(1622,1,zt,Bq),s.Mb=function(n){return u(n,9).k==(Fn(),Wi)},v(Zn,"SelfLoopPortRestorer/lambda$1$Type",1622),m(1623,1,zt,gk),s.Mb=function(n){return wi(u(n,9),(me(),wp))},v(Zn,"SelfLoopPortRestorer/lambda$2$Type",1623),m(1624,1,{},BD),s.Kb=function(n){return u(C(u(n,9),(me(),wp)),338)},v(Zn,"SelfLoopPortRestorer/lambda$3$Type",1624),m(1625,1,ut,Mje),s.Ad=function(n){oCn(this.a,u(n,338))},v(Zn,"SelfLoopPortRestorer/lambda$4$Type",1625),m(792,1,ut,GA),s.Ad=function(n){mCn(u(n,107))},v(Zn,"SelfLoopPortRestorer/lambda$5$Type",792),m(1627,1,Mi,qA),s.If=function(n,t){fSn(u(n,37),t)},v(Zn,"SelfLoopPostProcessor",1627),m(1628,1,{},UA),s.Kb=function(n){return new mn(null,new yn(u(n,25).a,16))},v(Zn,"SelfLoopPostProcessor/lambda$0$Type",1628),m(1629,1,zt,zD),s.Mb=function(n){return u(n,9).k==(Fn(),Wi)},v(Zn,"SelfLoopPostProcessor/lambda$1$Type",1629),m(1630,1,zt,FD),s.Mb=function(n){return wi(u(n,9),(me(),wp))},v(Zn,"SelfLoopPostProcessor/lambda$2$Type",1630),m(1631,1,ut,JD),s.Ad=function(n){bAn(u(n,9))},v(Zn,"SelfLoopPostProcessor/lambda$3$Type",1631),m(1632,1,{},zq),s.Kb=function(n){return new mn(null,new yn(u(n,107).f,1))},v(Zn,"SelfLoopPostProcessor/lambda$4$Type",1632),m(1633,1,ut,Cje),s.Ad=function(n){Qyn(this.a,u(n,341))},v(Zn,"SelfLoopPostProcessor/lambda$5$Type",1633),m(1634,1,zt,Fq),s.Mb=function(n){return!!u(n,107).i},v(Zn,"SelfLoopPostProcessor/lambda$6$Type",1634),m(1635,1,ut,Tje),s.Ad=function(n){Tbn(this.a,u(n,107))},v(Zn,"SelfLoopPostProcessor/lambda$7$Type",1635),m(1616,1,Mi,Jq),s.If=function(n,t){zOn(u(n,37),t)},v(Zn,"SelfLoopPreProcessor",1616),m(1617,1,{},Hq),s.Kb=function(n){return new mn(null,new yn(u(n,107).f,1))},v(Zn,"SelfLoopPreProcessor/lambda$0$Type",1617),m(1618,1,{},Gq),s.Kb=function(n){return u(n,341).a},v(Zn,"SelfLoopPreProcessor/lambda$1$Type",1618),m(1619,1,ut,g1),s.Ad=function(n){Nwn(u(n,17))},v(Zn,"SelfLoopPreProcessor/lambda$2$Type",1619),m(1636,1,Mi,oNe),s.If=function(n,t){GMn(this,u(n,37),t)},v(Zn,"SelfLoopRouter",1636),m(1637,1,{},k6),s.Kb=function(n){return new mn(null,new yn(u(n,25).a,16))},v(Zn,"SelfLoopRouter/lambda$0$Type",1637),m(1638,1,zt,HD),s.Mb=function(n){return u(n,9).k==(Fn(),Wi)},v(Zn,"SelfLoopRouter/lambda$1$Type",1638),m(1639,1,zt,GD),s.Mb=function(n){return wi(u(n,9),(me(),wp))},v(Zn,"SelfLoopRouter/lambda$2$Type",1639),m(1640,1,{},qD),s.Kb=function(n){return u(C(u(n,9),(me(),wp)),338)},v(Zn,"SelfLoopRouter/lambda$3$Type",1640),m(1641,1,ut,KMe),s.Ad=function(n){M5n(this.a,this.b,u(n,338))},v(Zn,"SelfLoopRouter/lambda$4$Type",1641),m(1642,1,Mi,UD),s.If=function(n,t){rIn(u(n,37),t)},v(Zn,"SemiInteractiveCrossMinProcessor",1642),m(1643,1,zt,XA),s.Mb=function(n){return u(n,9).k==(Fn(),Wi)},v(Zn,"SemiInteractiveCrossMinProcessor/lambda$0$Type",1643),m(1644,1,zt,qq),s.Mb=function(n){return EIe(u(n,9))._b((Oe(),Cm))},v(Zn,"SemiInteractiveCrossMinProcessor/lambda$1$Type",1644),m(1645,1,Yt,M5),s.Le=function(n,t){return t7n(u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Zn,"SemiInteractiveCrossMinProcessor/lambda$2$Type",1645),m(1646,1,{},KA),s.Te=function(n,t){return I5n(u(n,9),u(t,9))},v(Zn,"SemiInteractiveCrossMinProcessor/lambda$3$Type",1646),m(1648,1,Mi,j6),s.If=function(n,t){RPn(u(n,37),t)},v(Zn,"SortByInputModelProcessor",1648),m(1649,1,zt,VA),s.Mb=function(n){return u(n,12).g.c.length!=0},v(Zn,"SortByInputModelProcessor/lambda$0$Type",1649),m(1650,1,ut,Oje),s.Ad=function(n){ECn(this.a,u(n,12))},v(Zn,"SortByInputModelProcessor/lambda$1$Type",1650),m(1729,804,{},PBe),s.bf=function(n){var t,i,r,c;switch(this.c=n,this.a.g){case 2:t=new Te,er(li(new mn(null,new yn(this.c.a.b,16)),new ZD),new ZMe(this,t)),UO(this,new fv),Ao(t,new C5),t.c.length=0,er(li(new mn(null,new yn(this.c.a.b,16)),new YA),new Ije(t)),UO(this,new KD),Ao(t,new av),t.c.length=0,i=LTe(GY(C2(new mn(null,new yn(this.c.a.b,16)),new Dje(this))),new VD),er(new mn(null,new yn(this.c.a.a,16)),new YMe(i,t)),UO(this,new QD),Ao(t,new Uq),t.c.length=0;break;case 3:r=new Te,UO(this,new XD),c=LTe(GY(C2(new mn(null,new yn(this.c.a.b,16)),new Nje(this))),new YD),er(li(new mn(null,new yn(this.c.a.b,16)),new Xq),new WMe(c,r)),UO(this,new Kq),Ao(r,new WD),r.c.length=0;break;default:throw R(new nxe)}},s.b=0,v(lr,"EdgeAwareScanlineConstraintCalculation",1729),m(1730,1,Sh,XD),s.Lb=function(n){return X(u(n,60).g,156)},s.Fb=function(n){return this===n},s.Mb=function(n){return X(u(n,60).g,156)},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$0$Type",1730),m(1731,1,{},Nje),s.We=function(n){return YCn(this.a,u(n,60))},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$1$Type",1731),m(1739,1,iF,VMe),s.be=function(){XE(this.a,this.b,-1)},s.b=0,v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$10$Type",1739),m(1741,1,Sh,fv),s.Lb=function(n){return X(u(n,60).g,156)},s.Fb=function(n){return this===n},s.Mb=function(n){return X(u(n,60).g,156)},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$11$Type",1741),m(1742,1,ut,C5),s.Ad=function(n){u(n,375).be()},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$12$Type",1742),m(1743,1,zt,YA),s.Mb=function(n){return X(u(n,60).g,9)},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$13$Type",1743),m(1745,1,ut,Ije),s.Ad=function(n){Bjn(this.a,u(n,60))},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$14$Type",1745),m(1744,1,iF,tCe),s.be=function(){XE(this.b,this.a,-1)},s.a=0,v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$15$Type",1744),m(1746,1,Sh,KD),s.Lb=function(n){return X(u(n,60).g,9)},s.Fb=function(n){return this===n},s.Mb=function(n){return X(u(n,60).g,9)},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$16$Type",1746),m(1747,1,ut,av),s.Ad=function(n){u(n,375).be()},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$17$Type",1747),m(1748,1,{},Dje),s.We=function(n){return QCn(this.a,u(n,60))},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$18$Type",1748),m(1749,1,{},VD),s.Ue=function(){return 0},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$19$Type",1749),m(1732,1,{},YD),s.Ue=function(){return 0},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$2$Type",1732),m(1751,1,ut,YMe),s.Ad=function(n){g3n(this.a,this.b,u(n,320))},s.a=0,v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$20$Type",1751),m(1750,1,iF,QMe),s.be=function(){hUe(this.a,this.b,-1)},s.b=0,v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$21$Type",1750),m(1752,1,Sh,QD),s.Lb=function(n){return u(n,60),!0},s.Fb=function(n){return this===n},s.Mb=function(n){return u(n,60),!0},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$22$Type",1752),m(1753,1,ut,Uq),s.Ad=function(n){u(n,375).be()},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$23$Type",1753),m(1733,1,zt,Xq),s.Mb=function(n){return X(u(n,60).g,9)},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$3$Type",1733),m(1735,1,ut,WMe),s.Ad=function(n){w3n(this.a,this.b,u(n,60))},s.a=0,v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$4$Type",1735),m(1734,1,iF,iCe),s.be=function(){XE(this.b,this.a,-1)},s.a=0,v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$5$Type",1734),m(1736,1,Sh,Kq),s.Lb=function(n){return u(n,60),!0},s.Fb=function(n){return this===n},s.Mb=function(n){return u(n,60),!0},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$6$Type",1736),m(1737,1,ut,WD),s.Ad=function(n){u(n,375).be()},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$7$Type",1737),m(1738,1,zt,ZD),s.Mb=function(n){return X(u(n,60).g,156)},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$8$Type",1738),m(1740,1,ut,ZMe),s.Ad=function(n){x8n(this.a,this.b,u(n,60))},v(lr,"EdgeAwareScanlineConstraintCalculation/lambda$9$Type",1740),m(1547,1,Mi,yOe),s.If=function(n,t){ZLn(this,u(n,37),t)};var yin;v(lr,"HorizontalGraphCompactor",1547),m(1548,1,{},_je),s.df=function(n,t){var i,r,c;return yhe(n,t)||(i=Xv(n),r=Xv(t),i&&i.k==(Fn(),wr)||r&&r.k==(Fn(),wr))?0:(c=u(C(this.a.a,(me(),z3)),316),hpn(c,i?i.k:(Fn(),dr),r?r.k:(Fn(),dr)))},s.ef=function(n,t){var i,r,c;return yhe(n,t)?1:(i=Xv(n),r=Xv(t),c=u(C(this.a.a,(me(),z3)),316),ale(c,i?i.k:(Fn(),dr),r?r.k:(Fn(),dr)))},v(lr,"HorizontalGraphCompactor/1",1548),m(1549,1,{},QA),s.cf=function(n,t){return Cj(),n.a.i==0},v(lr,"HorizontalGraphCompactor/lambda$0$Type",1549),m(1550,1,{},Lje),s.cf=function(n,t){return L5n(this.a,n,t)},v(lr,"HorizontalGraphCompactor/lambda$1$Type",1550),m(1696,1,{},bRe);var kin,jin;v(lr,"LGraphToCGraphTransformer",1696),m(1704,1,zt,h0),s.Mb=function(n){return n!=null},v(lr,"LGraphToCGraphTransformer/0methodref$nonNull$Type",1704),m(1697,1,{},wk),s.Kb=function(n){return il(),fu(C(u(u(n,60).g,9),(me(),mi)))},v(lr,"LGraphToCGraphTransformer/lambda$0$Type",1697),m(1698,1,{},ld),s.Kb=function(n){return il(),CFe(u(u(n,60).g,156))},v(lr,"LGraphToCGraphTransformer/lambda$1$Type",1698),m(1707,1,zt,T5),s.Mb=function(n){return il(),X(u(n,60).g,9)},v(lr,"LGraphToCGraphTransformer/lambda$10$Type",1707),m(1708,1,ut,WA),s.Ad=function(n){A5n(u(n,60))},v(lr,"LGraphToCGraphTransformer/lambda$11$Type",1708),m(1709,1,zt,pk),s.Mb=function(n){return il(),X(u(n,60).g,156)},v(lr,"LGraphToCGraphTransformer/lambda$12$Type",1709),m(1713,1,ut,mk),s.Ad=function(n){rjn(u(n,60))},v(lr,"LGraphToCGraphTransformer/lambda$13$Type",1713),m(1710,1,ut,Pje),s.Ad=function(n){own(this.a,u(n,8))},s.a=0,v(lr,"LGraphToCGraphTransformer/lambda$14$Type",1710),m(1711,1,ut,$je),s.Ad=function(n){lwn(this.a,u(n,119))},s.a=0,v(lr,"LGraphToCGraphTransformer/lambda$15$Type",1711),m(1712,1,ut,Rje),s.Ad=function(n){swn(this.a,u(n,8))},s.a=0,v(lr,"LGraphToCGraphTransformer/lambda$16$Type",1712),m(1714,1,{},ZA),s.Kb=function(n){return il(),new mn(null,new A2(new Xn(Qn(Ii(u(n,9)).a.Jc(),new ee))))},v(lr,"LGraphToCGraphTransformer/lambda$17$Type",1714),m(1715,1,zt,hv),s.Mb=function(n){return il(),uc(u(n,17))},v(lr,"LGraphToCGraphTransformer/lambda$18$Type",1715),m(1716,1,ut,Bje),s.Ad=function(n){n8n(this.a,u(n,17))},v(lr,"LGraphToCGraphTransformer/lambda$19$Type",1716),m(1700,1,ut,zje),s.Ad=function(n){Oyn(this.a,u(n,156))},v(lr,"LGraphToCGraphTransformer/lambda$2$Type",1700),m(1717,1,{},e_),s.Kb=function(n){return il(),new mn(null,new yn(u(n,25).a,16))},v(lr,"LGraphToCGraphTransformer/lambda$20$Type",1717),m(1718,1,{},vk),s.Kb=function(n){return il(),new mn(null,new A2(new Xn(Qn(Ii(u(n,9)).a.Jc(),new ee))))},v(lr,"LGraphToCGraphTransformer/lambda$21$Type",1718),m(1719,1,{},O5),s.Kb=function(n){return il(),u(C(u(n,17),(me(),Eg)),16)},v(lr,"LGraphToCGraphTransformer/lambda$22$Type",1719),m(1720,1,zt,Vq),s.Mb=function(n){return dpn(u(n,16))},v(lr,"LGraphToCGraphTransformer/lambda$23$Type",1720),m(1721,1,ut,Fje),s.Ad=function(n){WCn(this.a,u(n,16))},v(lr,"LGraphToCGraphTransformer/lambda$24$Type",1721),m(1722,1,{},w1),s.Kb=function(n){return il(),new mn(null,new A2(new Xn(Qn(Ii(u(n,9)).a.Jc(),new ee))))},v(lr,"LGraphToCGraphTransformer/lambda$25$Type",1722),m(1723,1,zt,eM),s.Mb=function(n){return il(),uc(u(n,17))},v(lr,"LGraphToCGraphTransformer/lambda$26$Type",1723),m(1725,1,ut,Jje),s.Ad=function(n){K8n(this.a,u(n,17))},v(lr,"LGraphToCGraphTransformer/lambda$27$Type",1725),m(1724,1,ut,Hje),s.Ad=function(n){egn(this.a,u(n,70))},s.a=0,v(lr,"LGraphToCGraphTransformer/lambda$28$Type",1724),m(1699,1,ut,eCe),s.Ad=function(n){O6n(this.a,this.b,u(n,156))},v(lr,"LGraphToCGraphTransformer/lambda$3$Type",1699),m(1701,1,{},nw),s.Kb=function(n){return il(),new mn(null,new yn(u(n,25).a,16))},v(lr,"LGraphToCGraphTransformer/lambda$4$Type",1701),m(1702,1,{},n_),s.Kb=function(n){return il(),new mn(null,new A2(new Xn(Qn(Ii(u(n,9)).a.Jc(),new ee))))},v(lr,"LGraphToCGraphTransformer/lambda$5$Type",1702),m(1703,1,{},yk),s.Kb=function(n){return il(),u(C(u(n,17),(me(),Eg)),16)},v(lr,"LGraphToCGraphTransformer/lambda$6$Type",1703),m(1705,1,ut,Gje),s.Ad=function(n){lTn(this.a,u(n,16))},v(lr,"LGraphToCGraphTransformer/lambda$8$Type",1705),m(1706,1,ut,nCe),s.Ad=function(n){Iwn(this.a,this.b,u(n,156))},v(lr,"LGraphToCGraphTransformer/lambda$9$Type",1706),m(1695,1,{},dv),s.af=function(n){var t,i,r,c,o;for(this.a=n,this.d=new wX,this.c=le(Yme,Nn,124,this.a.a.a.c.length,0,1),this.b=0,i=new P(this.a.a.a);i.a=D&&(Te(o,ke(p)),V=k.Math.max(V,te[p-1]-y),f+=O,B+=te[p-1]-B,y=te[p-1],O=h[p]),O=k.Math.max(O,h[p]),++p;f+=O}A=k.Math.min(1/V,1/t.b/f),A>r&&(r=A,i=o)}return i},s.ng=function(){return!1},v(Ah,"MSDCutIndexHeuristic",803),m(1647,1,Mi,Yq),s.If=function(n,t){iLn(u(n,37),t)},v(Ah,"SingleEdgeGraphWrapper",1647),m(231,23,{3:1,35:1,23:1,231:1},Lj);var D3,y7,k7,vm,ix,_3,j7=yt(Tu,"CenterEdgeLabelPlacementStrategy",231,Tt,M9n,q2n),_in;m(422,23,{3:1,35:1,23:1,422:1},dse);var b3e,Kte,g3e=yt(Tu,"ConstraintCalculationStrategy",422,Tt,Q5n,U2n),Lin;m(301,23,{3:1,35:1,23:1,301:1,188:1,196:1},b$),s.bg=function(){return kUe(this)},s.og=function(){return kUe(this)};var tI,rx,w3e,p3e,m3e=yt(Tu,"CrossingMinimizationStrategy",301,Tt,r6n,X2n),Pin;m(350,23,{3:1,35:1,23:1,350:1},VX);var v3e,Vte,KJ,y3e=yt(Tu,"CuttingStrategy",350,Tt,F4n,K2n),$in;m(267,23,{3:1,35:1,23:1,267:1,188:1,196:1},Nv),s.bg=function(){return xXe(this)},s.og=function(){return xXe(this)};var Yte,k3e,Qte,Wte,Zte,eie,nie,tie,iI,j3e=yt(Tu,"CycleBreakingStrategy",267,Tt,F8n,V2n),Rin;m(419,23,{3:1,35:1,23:1,419:1},bse);var VJ,E3e,S3e=yt(Tu,"DirectionCongruency",419,Tt,W5n,Y2n),Bin;m(449,23,{3:1,35:1,23:1,449:1},QX);var E7,iie,L3,zin=yt(Tu,"EdgeConstraint",449,Tt,J4n,Q2n),Fin;m(284,23,{3:1,35:1,23:1,284:1},Rj);var rie,cie,uie,oie,YJ,sie,x3e=yt(Tu,"EdgeLabelSideSelection",284,Tt,C9n,W2n),Jin;m(476,23,{3:1,35:1,23:1,476:1},gse);var QJ,A3e,M3e=yt(Tu,"EdgeStraighteningStrategy",476,Tt,Z5n,Z2n),Hin;m(282,23,{3:1,35:1,23:1,282:1},Pj);var lie,C3e,T3e,WJ,O3e,N3e,I3e=yt(Tu,"FixedAlignment",282,Tt,T9n,emn),Gin;m(283,23,{3:1,35:1,23:1,283:1},$j);var D3e,_3e,L3e,P3e,cx,$3e,R3e=yt(Tu,"GraphCompactionStrategy",283,Tt,O9n,nmn),qin;m(261,23,{3:1,35:1,23:1,261:1},h2);var S7,ZJ,x7,Kl,ux,eH,A7,P3,nH,ox,fie=yt(Tu,"GraphProperties",261,Tt,b7n,tmn),Uin;m(302,23,{3:1,35:1,23:1,302:1},WX);var rI,aie,hie,die=yt(Tu,"GreedySwitchType",302,Tt,H4n,imn),Xin;m(329,23,{3:1,35:1,23:1,329:1},ZX);var ym,B3e,cI,bie=yt(Tu,"GroupOrderStrategy",329,Tt,G4n,rmn),Kin;m(315,23,{3:1,35:1,23:1,315:1},eK);var Ty,uI,$3,Vin=yt(Tu,"InLayerConstraint",315,Tt,q4n,cmn),Yin;m(420,23,{3:1,35:1,23:1,420:1},wse);var gie,z3e,F3e=yt(Tu,"InteractiveReferencePoint",420,Tt,e4n,umn),Qin,J3e,Oy,dp,oI,tH,H3e,G3e,iH,q3e,Ny,rH,sx,Iy,K1,wie,cH,Iu,U3e,ob,po,pie,mie,sI,jg,bp,Dy,X3e,Win,_y,lI,km,Ea,gf,vie,R3,sb,Oi,mi,K3e,V3e,Y3e,Q3e,W3e,yie,uH,vs,gp,kie,Ly,lx,qd,B3,wp,z3,F3,M7,Eg,Z3e,jie,Eie,fx,Py,oH,$y,J3;m(165,23,{3:1,35:1,23:1,165:1},fT);var ax,V1,hx,Sg,fI,e5e=yt(Tu,"LayerConstraint",165,Tt,Z6n,omn),Zin;m(423,23,{3:1,35:1,23:1,423:1},pse);var Sie,xie,n5e=yt(Tu,"LayerUnzippingStrategy",423,Tt,n4n,smn),ern;m(843,1,Ua,xC),s.tf=function(n){en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,gwe),""),"Direction Congruency"),"Specifies how drawings of the same graph with different layout directions compare to each other: either a natural reading direction is preserved or the drawings are rotated versions of each other."),b5e),(lg(),Bi)),S3e),rn((vh(),Cn))))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,wwe),""),"Feedback Edges"),"Whether feedback edges should be highlighted by routing around the nodes."),($n(),!1)),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,wF),""),"Interactive Reference Point"),"Determines which point of a node is considered by interactive layout phases."),y5e),Bi),F3e),rn(Cn)))),qi(n,wF,IN,rcn),qi(n,wF,CS,icn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,pwe),""),"Merge Edges"),"Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port."),!1),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,mwe),""),"Merge Hierarchy-Crossing Edges"),"If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port."),!0),xr),Qi),rn(Cn)))),en(n,new qe(tgn(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,vwe),""),"Allow Non-Flow Ports To Switch Sides"),"Specifies whether non-flow ports may switch sides if their node's port constraints are either FIXED_SIDE or FIXED_ORDER. A non-flow port is a port on a side that is not part of the currently configured layout flow. For instance, given a left-to-right layout direction, north and south ports would be considered non-flow ports. Further note that the underlying criterium whether to switch sides or not solely relies on the minimization of edge crossings. Hence, edge length and other aesthetics criteria are not addressed."),!1),xr),Qi),rn(Yd)),F(z(He,1),Me,2,6,["org.eclipse.elk.layered.northOrSouthPort"])))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,ywe),""),"Port Sorting Strategy"),"Only relevant for nodes with FIXED_SIDE port constraints. Determines the way a node's ports are distributed on the sides of a node if their order is not prescribed. The option is set on parent nodes."),N5e),Bi),J4e),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,kwe),""),"Thoroughness"),"How much effort should be spent to produce a nice layout."),ke(7)),dc),jr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,jwe),""),"Add Unnecessary Bendpoints"),"Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction."),!1),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Ewe),""),"Generate Position and Layer IDs"),"If enabled position id and layer id are generated, which are usually only used internally when setting the interactiveLayout option. This option should be specified on the root node."),!1),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,IN),"cycleBreaking"),"Cycle Breaking Strategy"),"Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right)."),d5e),Bi),j3e),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,DN),Ree),"Node Layering Strategy"),"Strategy for node layering."),E5e),Bi),O4e),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Swe),Ree),"Layer Constraint"),"Determines a constraint on the placement of the node regarding the layering."),k5e),Bi),e5e),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,xwe),Ree),"Layer Choice Constraint"),"Allows to set a constraint regarding the layer placement of a node. Let i be the value of teh constraint. Assumed the drawing has n layers and i < n. If set to i, it expresses that the node should be placed in i-th layer. Should i>=n be true then the node is placed in the last layer of the drawing. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),null),dc),jr),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Awe),Ree),"Layer ID"),"Layer identifier that was calculated by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."),ke(-1)),dc),jr),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,uee),OQe),"Upper Bound On Width [MinWidth Layerer]"),"Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."),ke(4)),dc),jr),rn(Cn)))),qi(n,uee,DN,acn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,oee),OQe),"Upper Layer Estimation Scaling Factor [MinWidth Layerer]"),"Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."),ke(2)),dc),jr),rn(Cn)))),qi(n,oee,DN,dcn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,see),NQe),"Node Promotion Strategy"),"Reduces number of dummy nodes after layering phase (if possible)."),j5e),Bi),B4e),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,lee),NQe),"Max Node Promotion Iterations"),"Limits the number of iterations for node promotion."),ke(0)),dc),jr),rn(Cn)))),qi(n,lee,see,null),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,fee),"layering.coffmanGraham"),"Layer Bound"),"The maximum number of nodes allowed per layer."),ke(oi)),dc),jr),rn(Cn)))),qi(n,fee,DN,ucn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,CS),Q8),"Crossing Minimization Strategy"),"Strategy for crossing minimization."),h5e),Bi),m3e),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Mwe),Q8),"Force Node Model Order"),"The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES."),!1),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,aee),Q8),"Hierarchical Sweepiness"),"How likely it is to use cross-hierarchy (1) vs bottom-up (-1)."),.1),ec),gr),rn(Cn)))),qi(n,aee,TF,Orn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,hee),Q8),"Semi-Interactive Crossing Minimization"),"Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."),!1),xr),Qi),rn(Cn)))),qi(n,hee,CS,Prn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Cwe),Q8),"In Layer Predecessor of"),"Allows to set a constraint which specifies of which node the current node is the predecessor. If set to 's' then the node is the predecessor of 's' and is in the same layer"),null),Gy),He),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Twe),Q8),"In Layer Successor of"),"Allows to set a constraint which specifies of which node the current node is the successor. If set to 's' then the node is the successor of 's' and is in the same layer"),null),Gy),He),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Owe),Q8),"Position Choice Constraint"),"Allows to set a constraint regarding the position placement of a node in a layer. Assumed the layer in which the node placed includes n other nodes and i < n. If set to i, it expresses that the node should be placed at the i-th position. Should i>=n be true then the node is placed at the last position in the layer. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),null),dc),jr),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Nwe),Q8),"Position ID"),"Position within a layer that was determined by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."),ke(-1)),dc),jr),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Iwe),IQe),"Greedy Switch Activation Threshold"),"By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."),ke(40)),dc),jr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,dee),IQe),"Greedy Switch Crossing Minimization"),"Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular crossing minimization as a post-processor. Note that if 'hierarchyHandling' is set to 'INCLUDE_CHILDREN', the 'greedySwitchHierarchical.type' option must be used."),a5e),Bi),die),rn(Cn)))),qi(n,dee,CS,Crn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,pF),"crossingMinimization.greedySwitchHierarchical"),"Greedy Switch Crossing Minimization (hierarchical)"),"Activates the greedy switch heuristic in case hierarchical layout is used. The differences to the non-hierarchical case (see 'greedySwitch.type') are: 1) greedy switch is inactive by default, 3) only the option value set on the node at which hierarchical layout starts is relevant, and 2) if it's activated by the user, it properly addresses hierarchy-crossing edges."),f5e),Bi),die),rn(Cn)))),qi(n,pF,CS,xrn),qi(n,pF,TF,Arn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,j3),DQe),"Node Placement Strategy"),"Strategy for node placement."),O5e),Bi),_4e),rn(Cn)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,mF),DQe),"Favor Straight Edges Over Balancing"),"Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."),xr),Qi),rn(Cn)))),qi(n,mF,j3,Ocn),qi(n,mF,j3,Ncn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,bee),_Qe),"BK Edge Straightening"),"Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."),M5e),Bi),M3e),rn(Cn)))),qi(n,bee,j3,Acn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,gee),_Qe),"BK Fixed Alignment"),"Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four."),C5e),Bi),I3e),rn(Cn)))),qi(n,gee,j3,Ccn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,wee),"nodePlacement.linearSegments"),"Linear Segments Deflection Dampening"),"Dampens the movement of nodes to keep the diagram from getting too large."),.3),ec),gr),rn(Cn)))),qi(n,wee,j3,Dcn),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,pee),"nodePlacement.networkSimplex"),"Node Flexibility"),"Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."),Bi),Wie),rn(fr)))),qi(n,pee,j3,$cn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,mee),"nodePlacement.networkSimplex.nodeFlexibility"),"Node Flexibility Default"),"Default value of the 'nodeFlexibility' option for the children of a hierarchical node."),T5e),Bi),Wie),rn(Cn)))),qi(n,mee,j3,Pcn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Dwe),LQe),"Self-Loop Distribution"),"Alter the distribution of the loops around the node. It only takes effect for PortConstraints.FREE."),p5e),Bi),q4e),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,_we),LQe),"Self-Loop Ordering"),"Alter the ordering of the loops they can either be stacked or sequenced. It only takes effect for PortConstraints.FREE."),m5e),Bi),U4e),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,vF),"edgeRouting.splines"),"Spline Routing Mode"),"Specifies the way control points are assembled for each individual edge. CONSERVATIVE ensures that edges are properly routed around the nodes but feels rather orthogonal at times. SLOPPY uses fewer control points to obtain curvier edge routes but may result in edges overlapping nodes."),v5e),Bi),K4e),rn(Cn)))),qi(n,vF,LN,Xrn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,yF),"edgeRouting.splines.sloppy"),"Sloppy Spline Layer Spacing Factor"),"Spacing factor for routing area between layers when using sloppy spline routing."),.2),ec),gr),rn(Cn)))),qi(n,yF,LN,Vrn),qi(n,yF,vF,Yrn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,vee),"edgeRouting.polyline"),"Sloped Edge Zone Width"),"Width of the strip to the left and to the right of each layer where the polyline edge router is allowed to refrain from ensuring that edges are routed horizontally. This prevents awkward bend points for nodes that extent almost to the edge of their layer."),2),ec),gr),rn(Cn)))),qi(n,vee,LN,Hrn),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,Lwe),Ka),"Spacing Base Value"),"An optional base value for all other layout options of the 'spacing' group. It can be used to conveniently alter the overall 'spaciousness' of the drawing. Whenever an explicit value is set for the other layout options, this base value will have no effect. The base value is not inherited, i.e. it must be set for each hierarchical node."),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Pwe),Ka),"Edge Node Between Layers Spacing"),"The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."),10),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,$we),Ka),"Edge Edge Between Layer Spacing"),"Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."),10),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Rwe),Ka),"Node Node Between Layers Spacing"),"The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."),20),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Bwe),Qwe),"Direction Priority"),"Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase."),ke(0)),dc),jr),rn(xa)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,zwe),Qwe),"Shortness Priority"),"Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase."),ke(0)),dc),jr),rn(xa)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Fwe),Qwe),"Straightness Priority"),"Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement."),ke(0)),dc),jr),rn(xa)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,yee),Wwe),"Connected Components Compaction"),"Tries to further compact components (disconnected sub-graphs)."),!1),xr),Qi),rn(Cn)))),qi(n,yee,jS,!0),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Jwe),PQe),"Post Compaction Strategy"),$Qe),i5e),Bi),R3e),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Hwe),PQe),"Post Compaction Constraint Calculation"),$Qe),t5e),Bi),g3e),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,kF),Zwe),"High Degree Node Treatment"),"Makes room around high degree nodes to place leafs and trees."),!1),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,kee),Zwe),"High Degree Node Threshold"),"Whether a node is considered to have a high degree."),ke(16)),dc),jr),rn(Cn)))),qi(n,kee,kF,!0),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,jee),Zwe),"High Degree Node Maximum Tree Height"),"Maximum height of a subtree connected to a high degree node to be moved to separate layers."),ke(5)),dc),jr),rn(Cn)))),qi(n,jee,kF,!0),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,q1),epe),"Graph Wrapping Strategy"),"For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."),_5e),Bi),W4e),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,jF),epe),"Additional Wrapped Edges Spacing"),"To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing."),10),ec),gr),rn(Cn)))),qi(n,jF,q1,Ycn),qi(n,jF,q1,Qcn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,EF),epe),"Correction Factor for Wrapping"),"At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simply multiplied with the 'aspect ratio' layout option."),1),ec),gr),rn(Cn)))),qi(n,EF,q1,Zcn),qi(n,EF,q1,eun),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,TS),RQe),"Cutting Strategy"),"The strategy by which the layer indexes are determined at which the layering crumbles into chunks."),D5e),Bi),y3e),rn(Cn)))),qi(n,TS,q1,uun),qi(n,TS,q1,oun),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,Eee),RQe),"Manually Specified Cuts"),"Allows the user to specify her own cuts for a certain graph."),Za),gl),rn(Cn)))),qi(n,Eee,TS,tun),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,See),"wrapping.cutting.msd"),"MSD Freedom"),"The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts."),I5e),dc),jr),rn(Cn)))),qi(n,See,TS,run),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,SF),BQe),"Validification Strategy"),"When wrapping graphs, one can specify indices that are not allowed as split points. The validification strategy makes sure every computed split point is allowed."),L5e),Bi),Q4e),rn(Cn)))),qi(n,SF,q1,vun),qi(n,SF,q1,yun),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,xF),BQe),"Valid Indices for Wrapping"),null),Za),gl),rn(Cn)))),qi(n,xF,q1,wun),qi(n,xF,q1,pun),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,AF),npe),"Improve Cuts"),"For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought."),!0),xr),Qi),rn(Cn)))),qi(n,AF,q1,aun),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,MF),npe),"Distance Penalty When Improving Cuts"),null),2),ec),gr),rn(Cn)))),qi(n,MF,q1,lun),qi(n,MF,AF,!0),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,xee),npe),"Improve Wrapped Edges"),"The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges."),!0),xr),Qi),rn(Cn)))),qi(n,xee,q1,dun),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Aee),Bee),"Layer Unzipping Strategy"),"The strategy to use for unzipping a layer into multiple sublayers while maintaining the existing ordering of nodes and edges after crossing minimization. The default value is 'NONE'."),A5e),Bi),n5e),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Mee),Bee),"Minimize Edge Length Heuristic"),"Use a heuristic to decide whether or not to actually perform the layer split with the goal of minimizing the total edge length. This option only works when layerSplit is set to 2. The property can be set to the nodes in a layer, which then applies the property for the layer. If any node sets the value to true, then the value is set to true for the entire layer."),!1),xr),Qi),rn(fr)))),qi(n,Mee,Cee,vcn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Cee),Bee),"Unzipping Layer Split"),"Defines the number of sublayers to split a layer into. The property can be set to the nodes in a layer, which then applies the property for the layer. If multiple nodes set the value to different values, then the lowest value is chosen."),S5e),dc),jr),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Tee),Bee),"Reset Alternation on Long Edges"),"If set to true, nodes will always be placed in the first sublayer after a long edge when using the ALTERNATING strategy. Otherwise long edge dummies are treated the same as regular nodes. The default value is true. The property can be set to the nodes in a layer, which then applies the property for the layer. If any node sets the value to false, then the value is set to false for the entire layer."),x5e),xr),Qi),rn(fr)))),qi(n,Tee,Aee,kcn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Gwe),zee),"Edge Label Side Selection"),"Method to decide on edge label sides."),w5e),Bi),x3e),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,qwe),zee),"Edge Center Label Placement Strategy"),"Determines in which layer center labels of long edges should be placed."),g5e),Bi),j7),Ci(Cn,F(z(Wa,1),Ee,160,0,[Q1]))))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,CF),OS),"Consider Model Order"),"Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting."),l5e),Bi),F4e),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Uwe),OS),"Consider Port Order"),"If disabled the port order of output ports is derived from the edge order and input ports are ordered by their incoming connections. If enabled all ports are ordered by the port model order."),!1),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,_N),OS),"No Model Order"),"Set on a node to not set a model order for this node even though it is a real node."),!1),xr),Qi),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Oee),OS),"Consider Model Order for Components"),"If set to NONE the usual ordering strategy (by cumulative node priority and size of nodes) is used. INSIDE_PORT_SIDES orders the components with external ports only inside the groups with the same port side. FORCE_MODEL_ORDER enforces the mode order on components. This option might produce bad alignments and sub optimal drawings in terms of used area since the ordering should be respected."),r5e),Bi),yve),rn(Cn)))),qi(n,Oee,jS,null),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Xwe),OS),"Long Edge Ordering Strategy"),"Indicates whether long edges are sorted under, over, or equal to nodes that have no connection to a previous layer in a left-to-right or right-to-left layout. Under and over changes to right and left in a vertical layout."),s5e),Bi),I4e),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Nee),OS),"Crossing Counter Node Order Influence"),"Indicates with what percentage (1 for 100%) violations of the node model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal node order. Defaults to no influence (0)."),0),ec),gr),rn(Cn)))),qi(n,Nee,CF,null),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Iee),OS),"Crossing Counter Port Order Influence"),"Indicates with what percentage (1 for 100%) violations of the port model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal port order. Defaults to no influence (0)."),0),ec),gr),rn(Cn)))),qi(n,Iee,CF,null),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Dee),W8),tpe),"Used to define partial ordering groups during cycle breaking. A lower group id means that the group is sorted before other groups. A group model order of 0 is the default group."),ke(0)),dc),jr),rn(fr)))),qi(n,Dee,_N,!1),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,_ee),W8),tpe),"Used to define partial ordering groups during crossing minimization. A lower group id means that the group is sorted before other groups. A group model order of 0 is the default group."),ke(0)),dc),jr),Ci(fr,F(z(Wa,1),Ee,160,0,[xa,Yd]))))),qi(n,_ee,_N,!1),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Lee),W8),tpe),"Used to define partial ordering groups during component packing. A lower group id means that the group is sorted before other groups. A group model order of 0 is the default group."),ke(0)),dc),jr),Ci(fr,F(z(Wa,1),Ee,160,0,[xa,Yd]))))),qi(n,Lee,_N,!1),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Kwe),W8),"Cycle Breaking Group Ordering Strategy"),"Determines how to count ordering violations during cycle breaking. NONE: They do not count. ENFORCED: A group with a higher model order is before a node with a smaller. MODEL_ORDER: The model order counts instead of the model order group id ordering."),c5e),Bi),bie),rn(Cn)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,Pee),W8),"Cycle Breaking Preferred Source Id"),"The model order group id for which should be preferred as a source if possible."),dc),jr),rn(Cn)))),qi(n,Pee,IN,frn),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,$ee),W8),"Cycle Breaking Preferred Target Id"),"The model order group id for which should be preferred as a target if possible."),dc),jr),rn(Cn)))),qi(n,$ee,IN,hrn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Vwe),W8),"Crossing Minimization Group Ordering Strategy"),"Determines how to count ordering violations during crossing minimization. NONE: They do not count. ENFORCED: A group with a lower id is before a group with a higher id. MODEL_ORDER: The model order counts instead of the model order group id ordering."),o5e),Bi),bie),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Ywe),W8),"Crossing Minimization Enforced Group Orders"),"Holds all group ids which are enforcing their order during crossing minimization strategies. E.g. if only groups 2 and -1 (default) enforce their ordering. Other groups e.g. the group of timer nodes can be ordered arbitrarily if it helps and the mentioned groups may not change their order."),u5e),Za),gl),rn(Cn)))),cYe((new NU,n))};var nrn,trn,irn,t5e,rrn,i5e,crn,r5e,urn,orn,srn,c5e,lrn,frn,arn,hrn,drn,u5e,brn,o5e,grn,wrn,prn,mrn,s5e,vrn,yrn,krn,l5e,jrn,Ern,Srn,f5e,xrn,Arn,Mrn,a5e,Crn,Trn,Orn,Nrn,Irn,Drn,_rn,Lrn,Prn,$rn,h5e,Rrn,d5e,Brn,b5e,zrn,g5e,Frn,w5e,Jrn,Hrn,Grn,p5e,qrn,m5e,Urn,v5e,Xrn,Krn,Vrn,Yrn,Qrn,Wrn,Zrn,ecn,ncn,tcn,y5e,icn,rcn,ccn,ucn,ocn,scn,k5e,lcn,fcn,acn,hcn,dcn,bcn,gcn,j5e,wcn,E5e,pcn,S5e,mcn,vcn,ycn,x5e,kcn,jcn,A5e,Ecn,Scn,xcn,M5e,Acn,Mcn,C5e,Ccn,Tcn,Ocn,Ncn,Icn,Dcn,_cn,Lcn,T5e,Pcn,$cn,Rcn,O5e,Bcn,N5e,zcn,Fcn,Jcn,Hcn,Gcn,qcn,Ucn,Xcn,Kcn,Vcn,Ycn,Qcn,Wcn,Zcn,eun,nun,tun,iun,I5e,run,cun,D5e,uun,oun,sun,lun,fun,aun,hun,dun,bun,_5e,gun,wun,pun,mun,L5e,vun,yun;v(Tu,"LayeredMetaDataProvider",843),m(982,1,Ua,NU),s.tf=function(n){cYe(n)};var Nh,Aie,sH,dx,lH,P5e,fH,bx,aI,Mie,Ry,$5e,R5e,B5e,gx,kun,wx,jm,Cie,aH,Tie,o1,Oie,C7,z5e,hI,Nie,F5e,jun,Eun,Sun,hH,Iie,px,By,xun,wl,J5e,H5e,dH,H3,Ih,bH,Y1,G5e,q5e,U5e,Die,_ie,X5e,Ud,Lie,K5e,Em,V5e,Y5e,Q5e,gH,Sm,xg,W5e,Z5e,Wc,e4e,Aun,ku,mx,n4e,t4e,i4e,dI,wH,pH,Pie,$ie,r4e,mH,c4e,u4e,vH,pp,o4e,Rie,vx,s4e,mp,yx,yH,Ag,Bie,T7,kH,Mg,l4e,f4e,a4e,xm,h4e,Mun,Cun,Tun,Oun,vp,Am,Zi,Xd,Nun,Mm,d4e,O7,b4e,Cm,Iun,N7,g4e,zy,Dun,_un,bI,zie,w4e,gI,Kf,Tm,G3,Cg,lb,jH,Om,Fie,I7,D7,Tg,Nm,Jie,wI,kx,jx,Lun,Pun,$un,p4e,Run,Hie,m4e,v4e,y4e,k4e,Gie,j4e,E4e,S4e,x4e,qie,EH;v(Tu,"LayeredOptions",982),m(983,1,{},Qq),s.uf=function(){var n;return n=new rxe,n},s.vf=function(n){},v(Tu,"LayeredOptions/LayeredFactory",983),m(1345,1,{}),s.a=0;var Bun;v($u,"ElkSpacings/AbstractSpacingsBuilder",1345),m(778,1345,{},tde);var SH,zun;v(Tu,"LayeredSpacings/LayeredSpacingsBuilder",778),m(268,23,{3:1,35:1,23:1,268:1,188:1,196:1},Iv),s.bg=function(){return kXe(this)},s.og=function(){return kXe(this)};var Uie,Xie,Kie,A4e,M4e,C4e,xH,Vie,T4e,O4e=yt(Tu,"LayeringStrategy",268,Tt,J8n,lmn),Fun;m(352,23,{3:1,35:1,23:1,352:1},nK);var Yie,N4e,AH,I4e=yt(Tu,"LongEdgeOrderingStrategy",352,Tt,U4n,fmn),Jun;m(203,23,{3:1,35:1,23:1,203:1},g$);var q3,U3,MH,Qie,Wie=yt(Tu,"NodeFlexibility",203,Tt,c6n,amn),Hun;m(328,23,{3:1,35:1,23:1,328:1,188:1,196:1},aT),s.bg=function(){return lUe(this)},s.og=function(){return lUe(this)};var Ex,Zie,ere,Sx,D4e,_4e=yt(Tu,"NodePlacementStrategy",328,Tt,W6n,hmn),Gun;m(243,23,{3:1,35:1,23:1,243:1},d2);var L4e,_7,xx,pI,P4e,$4e,mI,R4e,CH,TH,B4e=yt(Tu,"NodePromotionStrategy",243,Tt,d7n,dmn),qun;m(269,23,{3:1,35:1,23:1,269:1},w$);var z4e,fb,nre,tre,F4e=yt(Tu,"OrderingStrategy",269,Tt,u6n,bmn),Uun;m(421,23,{3:1,35:1,23:1,421:1},mse);var ire,rre,J4e=yt(Tu,"PortSortingStrategy",421,Tt,t4n,gmn),Xun;m(452,23,{3:1,35:1,23:1,452:1},tK);var ys,Io,Ax,Kun=yt(Tu,"PortType",452,Tt,X4n,wmn),Vun;m(381,23,{3:1,35:1,23:1,381:1},iK);var H4e,cre,G4e,q4e=yt(Tu,"SelfLoopDistributionStrategy",381,Tt,K4n,pmn),Yun;m(348,23,{3:1,35:1,23:1,348:1},rK);var ure,vI,ore,U4e=yt(Tu,"SelfLoopOrderingStrategy",348,Tt,V4n,mmn),Qun;m(316,1,{316:1},iVe),v(Tu,"Spacings",316),m(349,23,{3:1,35:1,23:1,349:1},cK);var sre,X4e,Mx,K4e=yt(Tu,"SplineRoutingMode",349,Tt,Y4n,vmn),Wun;m(351,23,{3:1,35:1,23:1,351:1},uK);var lre,V4e,Y4e,Q4e=yt(Tu,"ValidifyStrategy",351,Tt,Q4n,ymn),Zun;m(382,23,{3:1,35:1,23:1,382:1},oK);var Im,fre,L7,W4e=yt(Tu,"WrappingStrategy",382,Tt,W4n,kmn),eon;m(1361,1,oc,SC),s.pg=function(n){return u(n,37),non},s.If=function(n,t){FPn(this,u(n,37),t)};var non;v(tp,"BFSNodeOrderCycleBreaker",1361),m(1359,1,oc,cP),s.pg=function(n){return u(n,37),ton},s.If=function(n,t){PLn(this,u(n,37),t)};var ton;v(tp,"DFSNodeOrderCycleBreaker",1359),m(1360,1,ct,RNe),s.Ad=function(n){RDn(this.a,this.c,this.b,u(n,17))},s.b=!1,v(tp,"DFSNodeOrderCycleBreaker/lambda$0$Type",1360),m(1353,1,oc,Z6),s.pg=function(n){return u(n,37),ion},s.If=function(n,t){LLn(this,u(n,37),t)};var ion;v(tp,"DepthFirstCycleBreaker",1353),m(779,1,oc,Afe),s.pg=function(n){return u(n,37),ron},s.If=function(n,t){tBn(this,u(n,37),t)},s.qg=function(n){return u(Pe(n,fz(this.e,n.c.length)),9)};var ron;v(tp,"GreedyCycleBreaker",779),m(1356,779,oc,xCe),s.qg=function(n){var t,i,r,c,o,l,f,h,b;for(b=null,r=oi,h=k.Math.max(this.b.a.c.length,u(C(this.b,(me(),sb)),15).a),t=h*u(C(this.b,oI),15).a,c=new A6,i=ue(C(this.b,(Ie(),Ry)))===ue(($0(),ym)),f=new P(n);f.ao&&(r=o,b=l));return b||u(Pe(n,fz(this.e,n.c.length)),9)},v(tp,"GreedyModelOrderCycleBreaker",1356),m(505,1,{},A6),s.a=0,s.b=0,v(tp,"GroupModelOrderCalculator",505),m(1354,1,oc,tj),s.pg=function(n){return u(n,37),con},s.If=function(n,t){sPn(this,u(n,37),t)};var con;v(tp,"InteractiveCycleBreaker",1354),m(1355,1,oc,nj),s.pg=function(n){return u(n,37),uon},s.If=function(n,t){fPn(u(n,37),t)};var uon;v(tp,"ModelOrderCycleBreaker",1355),m(780,1,oc),s.pg=function(n){return u(n,37),oon},s.If=function(n,t){W_n(this,u(n,37),t)},s.rg=function(n,t){var i,r,c,o,l,f,h,b,p,y;for(l=0;lb&&(h=S,y=b),pha(new Un(Yn(Ii(f).a.Jc(),new ee))))for(c=new Un(Yn(cr(h).a.Jc(),new ee));ht(c);)r=u(rt(c),17),u(Yu(this.d,l),22).Gc(r.c.i)&&Te(this.c,r);else for(c=new Un(Yn(Ii(f).a.Jc(),new ee));ht(c);)r=u(rt(c),17),u(Yu(this.d,l),22).Gc(r.d.i)&&Te(this.c,r)}},v(tp,"SCCNodeTypeCycleBreaker",1358),m(1357,780,oc,MCe),s.rg=function(n,t){var i,r,c,o,l,f,h,b,p,y,S,A;for(l=0;lb&&(h=S,y=b),pha(new Un(Yn(Ii(f).a.Jc(),new ee))))for(c=new Un(Yn(cr(h).a.Jc(),new ee));ht(c);)r=u(rt(c),17),u(Yu(this.d,l),22).Gc(r.c.i)&&Te(this.c,r);else for(c=new Un(Yn(Ii(f).a.Jc(),new ee));ht(c);)r=u(rt(c),17),u(Yu(this.d,l),22).Gc(r.d.i)&&Te(this.c,r)}},v(tp,"SCConnectivity",1357),m(1373,1,oc,EC),s.pg=function(n){return u(n,37),son},s.If=function(n,t){uRn(this,u(n,37),t)};var son;v(U1,"BreadthFirstModelOrderLayerer",1373),m(1374,1,Yt,fM),s.Le=function(n,t){return qCn(u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(U1,"BreadthFirstModelOrderLayerer/lambda$0$Type",1374),m(1364,1,oc,OMe),s.pg=function(n){return u(n,37),lon},s.If=function(n,t){oBn(this,u(n,37),t)};var lon;v(U1,"CoffmanGrahamLayerer",1364),m(1365,1,Yt,Zje),s.Le=function(n,t){return WNn(this.a,u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(U1,"CoffmanGrahamLayerer/0methodref$compareNodesInTopo$Type",1365),m(1366,1,Yt,eEe),s.Le=function(n,t){return d3n(this.a,u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(U1,"CoffmanGrahamLayerer/lambda$1$Type",1366),m(1375,1,oc,jC),s.pg=function(n){return u(n,37),fon},s.If=function(n,t){XRn(this,u(n,37),t)},s.c=0,s.e=0;var fon;v(U1,"DepthFirstModelOrderLayerer",1375),m(1376,1,Yt,M6),s.Le=function(n,t){return UCn(u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(U1,"DepthFirstModelOrderLayerer/lambda$0$Type",1376),m(1367,1,oc,C6),s.pg=function(n){return u(n,37),qt(qt(qt(new or,(zr(),Xf),(Ur(),_te)),c1,pm),eo,wm)},s.If=function(n,t){pRn(u(n,37),t)},v(U1,"InteractiveLayerer",1367),m(564,1,{564:1},hxe),s.a=0,s.c=0,v(U1,"InteractiveLayerer/LayerSpan",564),m(1363,1,oc,oP),s.pg=function(n){return u(n,37),aon},s.If=function(n,t){UNn(this,u(n,37),t)};var aon;v(U1,"LongestPathLayerer",1363),m(1372,1,oc,sP),s.pg=function(n){return u(n,37),hon},s.If=function(n,t){dIn(this,u(n,37),t)};var hon;v(U1,"LongestPathSourceLayerer",1372),m(1370,1,oc,ko),s.pg=function(n){return u(n,37),qt(qt(qt(new or,(zr(),Xf),(Ur(),N3)),c1,pm),eo,wm)},s.If=function(n,t){MRn(this,u(n,37),t)},s.a=0,s.b=0,s.d=0;var Z4e,eye;v(U1,"MinWidthLayerer",1370),m(1371,1,Yt,nEe),s.Le=function(n,t){return _7n(this,u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(U1,"MinWidthLayerer/MinOutgoingEdgesComparator",1371),m(1362,1,oc,uP),s.pg=function(n){return u(n,37),don},s.If=function(n,t){GPn(this,u(n,37),t)};var don;v(U1,"NetworkSimplexLayerer",1362),m(1368,1,oc,cNe),s.pg=function(n){return u(n,37),qt(qt(qt(new or,(zr(),Xf),(Ur(),N3)),c1,pm),eo,wm)},s.If=function(n,t){T$n(this,u(n,37),t)},s.d=0,s.f=0,s.g=0,s.i=0,s.s=0,s.t=0,s.u=0,v(U1,"StretchWidthLayerer",1368),m(1369,1,Yt,Zq),s.Le=function(n,t){return b9n(u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(U1,"StretchWidthLayerer/1",1369),m(406,1,Bpe),s.eg=function(n,t,i,r,c,o){},s.tg=function(n,t,i){return QXe(this,n,t,i)},s.dg=function(){this.g=se(Ym,HQe,30,this.d,15,1),this.f=se(Ym,HQe,30,this.d,15,1)},s.fg=function(n,t){this.e[n]=se($t,ni,30,t[n].length,15,1)},s.gg=function(n,t,i){var r;r=i[n][t],r.p=t,this.e[n][t]=t},s.hg=function(n,t,i,r){u(Pe(r[n][t].j,i),12).p=this.d++},s.b=0,s.c=0,s.d=0,v(Ro,"AbstractBarycenterPortDistributor",406),m(1663,1,Yt,tEe),s.Le=function(n,t){return JEn(this.a,u(n,12),u(t,12))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Ro,"AbstractBarycenterPortDistributor/lambda$0$Type",1663),m(816,1,MS,Dae),s.eg=function(n,t,i,r,c,o){},s.gg=function(n,t,i){},s.hg=function(n,t,i,r){},s.cg=function(){return!1},s.dg=function(){this.c=this.e.a,this.g=this.f.g},s.fg=function(n,t){t[n][0].c.p=n},s.ig=function(){return!1},s.ug=function(n,t,i,r){i?JHe(this,n):(KHe(this,n,r),bVe(this,n,t)),n.c.length>1&&(Fe(ze(C(_r((kn(0,n.c.length),u(n.c[0],9))),(Ie(),C7))))?yUe(n,this.d,u(this,660)):(En(),Tr(n,this.d)),fze(this.e,n))},s.jg=function(n,t,i,r){var c,o,l,f,h,b,p;for(t!=xIe(i,n.length)&&(o=n[t-(i?1:-1)],rhe(this.f,o,i?(Nc(),Io):(Nc(),ys))),c=n[t][0],p=!r||c.k==(Fn(),wr),b=Pf(n[t]),this.ug(b,p,!1,i),l=0,h=new P(b);h.a"),n0?GV(this.a,n[t-1],n[t]):!i&&t1&&(Fe(ze(C(_r((kn(0,n.c.length),u(n.c[0],9))),(Ie(),C7))))?yUe(n,this.d,this):(En(),Tr(n,this.d)),Fe(ze(C(_r((kn(0,n.c.length),u(n.c[0],9))),C7)))||fze(this.e,n))},v(Ro,"ModelOrderBarycenterHeuristic",660),m(1843,1,Yt,fEe),s.Le=function(n,t){return xLn(this.a,u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Ro,"ModelOrderBarycenterHeuristic/lambda$0$Type",1843),m(1383,1,oc,fP),s.pg=function(n){var t;return u(n,37),t=L$(kon),qt(t,(zr(),eo),(Ur(),$J)),t},s.If=function(n,t){F5n((u(n,37),t))};var kon;v(Ro,"NoCrossingMinimizer",1383),m(796,406,Bpe,Roe),s.sg=function(n,t,i){var r,c,o,l,f,h,b,p,y,S,A;switch(y=this.g,i.g){case 1:{for(c=0,o=0,p=new P(n.j);p.a1&&(c.j==(De(),et)?this.b[n]=!0:c.j==Vn&&n>0&&(this.b[n-1]=!0))},s.f=0,v(i1,"AllCrossingsCounter",1838),m(583,1,{},CB),s.b=0,s.d=0,v(i1,"BinaryIndexedTree",583),m(519,1,{},NT);var nye,IH;v(i1,"CrossingsCounter",519),m(1912,1,Yt,aEe),s.Le=function(n,t){return i3n(this.a,u(n,12),u(t,12))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(i1,"CrossingsCounter/lambda$0$Type",1912),m(1913,1,Yt,hEe),s.Le=function(n,t){return r3n(this.a,u(n,12),u(t,12))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(i1,"CrossingsCounter/lambda$1$Type",1913),m(1914,1,Yt,dEe),s.Le=function(n,t){return c3n(this.a,u(n,12),u(t,12))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(i1,"CrossingsCounter/lambda$2$Type",1914),m(1915,1,Yt,bEe),s.Le=function(n,t){return u3n(this.a,u(n,12),u(t,12))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(i1,"CrossingsCounter/lambda$3$Type",1915),m(1916,1,ct,gEe),s.Ad=function(n){Q9n(this.a,u(n,12))},v(i1,"CrossingsCounter/lambda$4$Type",1916),m(1917,1,zt,wEe),s.Mb=function(n){return Ggn(this.a,u(n,12))},v(i1,"CrossingsCounter/lambda$5$Type",1917),m(1918,1,ct,pEe),s.Ad=function(n){nTe(this,n)},v(i1,"CrossingsCounter/lambda$6$Type",1918),m(1919,1,ct,uCe),s.Ad=function(n){var t;C9(),I0(this.b,(t=this.a,u(n,12),t))},v(i1,"CrossingsCounter/lambda$7$Type",1919),m(823,1,Sh,bM),s.Lb=function(n){return C9(),wi(u(n,12),(me(),vs))},s.Fb=function(n){return this===n},s.Mb=function(n){return C9(),wi(u(n,12),(me(),vs))},v(i1,"CrossingsCounter/lambda$8$Type",823),m(1911,1,{},mEe),v(i1,"HyperedgeCrossingsCounter",1911),m(467,1,{35:1,467:1},uNe),s.Dd=function(n){return NEn(this,u(n,467))},s.b=0,s.c=0,s.e=0,s.f=0;var JBn=v(i1,"HyperedgeCrossingsCounter/Hyperedge",467);m(370,1,{35:1,370:1},CR),s.Dd=function(n){return SOn(this,u(n,370))},s.b=0,s.c=0;var jon=v(i1,"HyperedgeCrossingsCounter/HyperedgeCorner",370);m(518,23,{3:1,35:1,23:1,518:1},vse);var Tx,Ox,Eon=yt(i1,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",518,Tt,i4n,xmn),Son;m(1385,1,oc,OU),s.pg=function(n){return u(C(u(n,37),(me(),po)),22).Gc((Ic(),Kl))?xon:null},s.If=function(n,t){eAn(this,u(n,37),t)};var xon;v(Lc,"InteractiveNodePlacer",1385),m(1386,1,oc,CC),s.pg=function(n){return u(C(u(n,37),(me(),po)),22).Gc((Ic(),Kl))?Aon:null},s.If=function(n,t){zSn(this,u(n,37),t)};var Aon,DH,_H;v(Lc,"LinearSegmentsNodePlacer",1386),m(263,1,{35:1,263:1},poe),s.Dd=function(n){return rgn(this,u(n,263))},s.Fb=function(n){var t;return X(n,263)?(t=u(n,263),this.b==t.b):!1},s.Hb=function(){return this.b},s.Ib=function(){return"ls"+Ja(this.e)},s.a=0,s.b=0,s.c=-1,s.d=-1,s.g=0;var Mon=v(Lc,"LinearSegmentsNodePlacer/LinearSegment",263);m(1388,1,oc,LIe),s.pg=function(n){return u(C(u(n,37),(me(),po)),22).Gc((Ic(),Kl))?Con:null},s.If=function(n,t){KRn(this,u(n,37),t)},s.b=0,s.g=0;var Con;v(Lc,"NetworkSimplexPlacer",1388),m(1407,1,Yt,gv),s.Le=function(n,t){return oo(u(n,15).a,u(t,15).a)},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Lc,"NetworkSimplexPlacer/0methodref$compare$Type",1407),m(1409,1,Yt,hM),s.Le=function(n,t){return oo(u(n,15).a,u(t,15).a)},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Lc,"NetworkSimplexPlacer/1methodref$compare$Type",1409),m(644,1,{644:1},oCe);var HBn=v(Lc,"NetworkSimplexPlacer/EdgeRep",644);m(405,1,{405:1},cae),s.b=!1;var GBn=v(Lc,"NetworkSimplexPlacer/NodeRep",405);m(500,13,{3:1,4:1,20:1,31:1,56:1,13:1,18:1,16:1,59:1,500:1},mxe),v(Lc,"NetworkSimplexPlacer/Path",500),m(1389,1,{},jk),s.Kb=function(n){return u(n,17).d.i.k},v(Lc,"NetworkSimplexPlacer/Path/lambda$0$Type",1389),m(1390,1,zt,l_),s.Mb=function(n){return u(n,249)==(Fn(),dr)},v(Lc,"NetworkSimplexPlacer/Path/lambda$1$Type",1390),m(1391,1,{},f_),s.Kb=function(n){return u(n,17).d.i},v(Lc,"NetworkSimplexPlacer/Path/lambda$2$Type",1391),m(1392,1,zt,vEe),s.Mb=function(n){return UOe(cJe(u(n,9)))},v(Lc,"NetworkSimplexPlacer/Path/lambda$3$Type",1392),m(1393,1,zt,R5),s.Mb=function(n){return Gvn(u(n,12))},v(Lc,"NetworkSimplexPlacer/lambda$0$Type",1393),m(1394,1,ct,sCe),s.Ad=function(n){Pwn(this.a,this.b,u(n,12))},v(Lc,"NetworkSimplexPlacer/lambda$1$Type",1394),m(1403,1,ct,yEe),s.Ad=function(n){aTn(this.a,u(n,17))},v(Lc,"NetworkSimplexPlacer/lambda$10$Type",1403),m(1404,1,{},dM),s.Kb=function(n){return rl(),new mn(null,new vn(u(n,25).a,16))},v(Lc,"NetworkSimplexPlacer/lambda$11$Type",1404),m(1405,1,ct,kEe),s.Ad=function(n){qIn(this.a,u(n,9))},v(Lc,"NetworkSimplexPlacer/lambda$12$Type",1405),m(1406,1,{},Ek),s.Kb=function(n){return rl(),ke(u(n,124).e)},v(Lc,"NetworkSimplexPlacer/lambda$13$Type",1406),m(1408,1,{},Sk),s.Kb=function(n){return rl(),ke(u(n,124).e)},v(Lc,"NetworkSimplexPlacer/lambda$15$Type",1408),m(1410,1,zt,a_),s.Mb=function(n){return rl(),u(n,405).c.k==(Fn(),Wi)},v(Lc,"NetworkSimplexPlacer/lambda$17$Type",1410),m(1411,1,zt,h_),s.Mb=function(n){return rl(),u(n,405).c.j.c.length>1},v(Lc,"NetworkSimplexPlacer/lambda$18$Type",1411),m(1412,1,ct,JDe),s.Ad=function(n){nEn(this.c,this.b,this.d,this.a,u(n,405))},s.c=0,s.d=0,v(Lc,"NetworkSimplexPlacer/lambda$19$Type",1412),m(1395,1,{},wv),s.Kb=function(n){return rl(),new mn(null,new vn(u(n,25).a,16))},v(Lc,"NetworkSimplexPlacer/lambda$2$Type",1395),m(1413,1,ct,jEe),s.Ad=function(n){zwn(this.a,u(n,12))},s.a=0,v(Lc,"NetworkSimplexPlacer/lambda$20$Type",1413),m(1414,1,{},pv),s.Kb=function(n){return rl(),new mn(null,new vn(u(n,25).a,16))},v(Lc,"NetworkSimplexPlacer/lambda$21$Type",1414),m(1415,1,ct,EEe),s.Ad=function(n){Uwn(this.a,u(n,9))},v(Lc,"NetworkSimplexPlacer/lambda$22$Type",1415),m(1416,1,zt,d_),s.Mb=function(n){return UOe(n)},v(Lc,"NetworkSimplexPlacer/lambda$23$Type",1416),m(1417,1,{},B5),s.Kb=function(n){return rl(),new mn(null,new vn(u(n,25).a,16))},v(Lc,"NetworkSimplexPlacer/lambda$24$Type",1417),m(1418,1,zt,SEe),s.Mb=function(n){return Zgn(this.a,u(n,9))},v(Lc,"NetworkSimplexPlacer/lambda$25$Type",1418),m(1419,1,ct,lCe),s.Ad=function(n){bCn(this.a,this.b,u(n,9))},v(Lc,"NetworkSimplexPlacer/lambda$26$Type",1419),m(1420,1,zt,T6),s.Mb=function(n){return rl(),!uc(u(n,17))},v(Lc,"NetworkSimplexPlacer/lambda$27$Type",1420),m(1421,1,zt,xk),s.Mb=function(n){return rl(),!uc(u(n,17))},v(Lc,"NetworkSimplexPlacer/lambda$28$Type",1421),m(1422,1,{},xEe),s.Te=function(n,t){return Bwn(this.a,u(n,25),u(t,25))},v(Lc,"NetworkSimplexPlacer/lambda$29$Type",1422),m(1396,1,{},O6),s.Kb=function(n){return rl(),new mn(null,new A2(new Un(Yn(Ii(u(n,9)).a.Jc(),new ee))))},v(Lc,"NetworkSimplexPlacer/lambda$3$Type",1396),m(1397,1,zt,Ak),s.Mb=function(n){return rl(),Fyn(u(n,17))},v(Lc,"NetworkSimplexPlacer/lambda$4$Type",1397),m(1398,1,ct,AEe),s.Ad=function(n){eLn(this.a,u(n,17))},v(Lc,"NetworkSimplexPlacer/lambda$5$Type",1398),m(1399,1,{},b_),s.Kb=function(n){return rl(),new mn(null,new vn(u(n,25).a,16))},v(Lc,"NetworkSimplexPlacer/lambda$6$Type",1399),m(1400,1,zt,mv),s.Mb=function(n){return rl(),u(n,9).k==(Fn(),Wi)},v(Lc,"NetworkSimplexPlacer/lambda$7$Type",1400),m(1401,1,{},g_),s.Kb=function(n){return rl(),new mn(null,new A2(new Un(Yn(wh(u(n,9)).a.Jc(),new ee))))},v(Lc,"NetworkSimplexPlacer/lambda$8$Type",1401),m(1402,1,zt,qp),s.Mb=function(n){return rl(),Jvn(u(n,17))},v(Lc,"NetworkSimplexPlacer/lambda$9$Type",1402),m(1384,1,oc,TC),s.pg=function(n){return u(C(u(n,37),(me(),po)),22).Gc((Ic(),Kl))?Ton:null},s.If=function(n,t){ILn(u(n,37),t)};var Ton;v(Lc,"SimpleNodePlacer",1384),m(185,1,{185:1},b3),s.Ib=function(){var n;return n="",this.c==(dh(),yp)?n+=gy:this.c==Kd&&(n+=by),this.o==(Da(),Og)?n+=KZ:this.o==Qa?n+="UP":n+="BALANCED",n},v(eb,"BKAlignedLayout",185),m(509,23,{3:1,35:1,23:1,509:1},yse);var Kd,yp,Oon=yt(eb,"BKAlignedLayout/HDirection",509,Tt,c4n,Amn),Non;m(508,23,{3:1,35:1,23:1,508:1},kse);var Og,Qa,Ion=yt(eb,"BKAlignedLayout/VDirection",508,Tt,r4n,Mmn),Don;m(1664,1,{},fCe),v(eb,"BKAligner",1664),m(1667,1,{},NHe),v(eb,"BKCompactor",1667),m(652,1,{652:1},gM),s.a=0,v(eb,"BKCompactor/ClassEdge",652),m(456,1,{456:1},bxe),s.a=null,s.b=0,v(eb,"BKCompactor/ClassNode",456),m(1387,1,oc,SCe),s.pg=function(n){return u(C(u(n,37),(me(),po)),22).Gc((Ic(),Kl))?_on:null},s.If=function(n,t){aBn(this,u(n,37),t)},s.d=!1;var _on;v(eb,"BKNodePlacer",1387),m(1665,1,{},wM),s.d=0,v(eb,"NeighborhoodInformation",1665),m(1666,1,Yt,MEe),s.Le=function(n,t){return h8n(this,u(n,49),u(t,49))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(eb,"NeighborhoodInformation/NeighborComparator",1666),m(809,1,{}),v(eb,"ThresholdStrategy",809),m(1795,809,{},vxe),s.vg=function(n,t,i){return this.a.o==(Da(),Qa)?Vi:Ir},s.wg=function(){},v(eb,"ThresholdStrategy/NullThresholdStrategy",1795),m(576,1,{576:1},dCe),s.c=!1,s.d=!1,v(eb,"ThresholdStrategy/Postprocessable",576),m(1796,809,{},yxe),s.vg=function(n,t,i){var r,c,o;return c=t==i,r=this.a.a[i.p]==t,c||r?(o=n,this.a.c==(dh(),yp)?(c&&(o=YW(this,t,!0)),!isNaN(o)&&!isFinite(o)&&r&&(o=YW(this,i,!1))):(c&&(o=YW(this,t,!0)),!isNaN(o)&&!isFinite(o)&&r&&(o=YW(this,i,!1))),o):n},s.wg=function(){for(var n,t,i,r,c;this.d.b!=0;)c=u(M_e(this.d),576),r=dKe(this,c),r.a&&(n=r.a,i=Fe(this.a.f[this.a.g[c.b.p].p]),!(!i&&!uc(n)&&n.c.i.c==n.d.i.c)&&(t=gUe(this,c),t||yTe(this.e,c)));for(;this.e.a.c.length!=0;)gUe(this,u(T1e(this.e),576))},v(eb,"ThresholdStrategy/SimpleThresholdStrategy",1796),m(635,1,{635:1,188:1,196:1},Up),s.bg=function(){return lze(this)},s.og=function(){return lze(this)};var are;v(Uee,"EdgeRouterFactory",635),m(1445,1,oc,LU),s.pg=function(n){return jIn(u(n,37))},s.If=function(n,t){FLn(u(n,37),t)};var Lon,Pon,$on,Ron,Bon,tye,zon,Fon;v(Uee,"OrthogonalEdgeRouter",1445),m(1438,1,oc,ECe),s.pg=function(n){return lAn(u(n,37))},s.If=function(n,t){fRn(this,u(n,37),t)};var Jon,Hon,Gon,qon,kI,Uon;v(Uee,"PolylineEdgeRouter",1438),m(1439,1,Sh,Xp),s.Lb=function(n){return u1e(u(n,9))},s.Fb=function(n){return this===n},s.Mb=function(n){return u1e(u(n,9))},v(Uee,"PolylineEdgeRouter/1",1439),m(1851,1,zt,N6),s.Mb=function(n){return u(n,133).c==(da(),ab)},v(ya,"HyperEdgeCycleDetector/lambda$0$Type",1851),m(1852,1,{},pM),s.Xe=function(n){return u(n,133).d},v(ya,"HyperEdgeCycleDetector/lambda$1$Type",1852),m(1853,1,zt,mM),s.Mb=function(n){return u(n,133).c==(da(),ab)},v(ya,"HyperEdgeCycleDetector/lambda$2$Type",1853),m(1854,1,{},I6),s.Xe=function(n){return u(n,133).d},v(ya,"HyperEdgeCycleDetector/lambda$3$Type",1854),m(1855,1,{},D6),s.Xe=function(n){return u(n,133).d},v(ya,"HyperEdgeCycleDetector/lambda$4$Type",1855),m(1856,1,{},w_),s.Xe=function(n){return u(n,133).d},v(ya,"HyperEdgeCycleDetector/lambda$5$Type",1856),m(116,1,{35:1,116:1},yO),s.Dd=function(n){return cgn(this,u(n,116))},s.Fb=function(n){var t;return X(n,116)?(t=u(n,116),this.g==t.g):!1},s.Hb=function(){return this.g},s.Ib=function(){var n,t,i,r;for(n=new tl("{"),r=new P(this.n);r.a"+this.b+" ("+jpn(this.c)+")"},s.d=0,v(ya,"HyperEdgeSegmentDependency",133),m(515,23,{3:1,35:1,23:1,515:1},jse);var ab,Dm,Xon=yt(ya,"HyperEdgeSegmentDependency/DependencyType",515,Tt,u4n,Cmn),Kon;m(1857,1,{},CEe),v(ya,"HyperEdgeSegmentSplitter",1857),m(1858,1,{},bAe),s.a=0,s.b=0,v(ya,"HyperEdgeSegmentSplitter/AreaRating",1858),m(340,1,{340:1},WK),s.a=0,s.b=0,s.c=0,v(ya,"HyperEdgeSegmentSplitter/FreeArea",340),m(1859,1,Yt,p_),s.Le=function(n,t){return b2n(u(n,116),u(t,116))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(ya,"HyperEdgeSegmentSplitter/lambda$0$Type",1859),m(1860,1,ct,HDe),s.Ad=function(n){N6n(this.a,this.d,this.c,this.b,u(n,116))},s.b=0,v(ya,"HyperEdgeSegmentSplitter/lambda$1$Type",1860),m(1861,1,{},z5),s.Kb=function(n){return new mn(null,new vn(u(n,116).e,16))},v(ya,"HyperEdgeSegmentSplitter/lambda$2$Type",1861),m(1862,1,{},Mk),s.Kb=function(n){return new mn(null,new vn(u(n,116).j,16))},v(ya,"HyperEdgeSegmentSplitter/lambda$3$Type",1862),m(1863,1,{},m_),s.We=function(n){return ne(re(n))},v(ya,"HyperEdgeSegmentSplitter/lambda$4$Type",1863),m(653,1,{},EV),s.a=0,s.b=0,s.c=0,v(ya,"OrthogonalRoutingGenerator",653),m(1668,1,{},vM),s.Kb=function(n){return new mn(null,new vn(u(n,116).e,16))},v(ya,"OrthogonalRoutingGenerator/lambda$0$Type",1668),m(1669,1,{},yM),s.Kb=function(n){return new mn(null,new vn(u(n,116).j,16))},v(ya,"OrthogonalRoutingGenerator/lambda$1$Type",1669),m(661,1,{}),v(Xee,"BaseRoutingDirectionStrategy",661),m(1849,661,{},kxe),s.xg=function(n,t,i){var r,c,o,l,f,h,b,p,y,S,A,O,D;if(!(n.r&&!n.q))for(p=t+n.o*i,b=new P(n.n);b.axh&&(o=p,c=n,r=new Se(y,o),Vt(l.a,r),Vw(this,l,c,r,!1),S=n.r,S&&(A=ne(re(Yu(S.e,0))),r=new Se(A,o),Vt(l.a,r),Vw(this,l,c,r,!1),o=t+S.o*i,c=S,r=new Se(A,o),Vt(l.a,r),Vw(this,l,c,r,!1)),r=new Se(D,o),Vt(l.a,r),Vw(this,l,c,r,!1)))},s.yg=function(n){return n.i.n.a+n.n.a+n.a.a},s.zg=function(){return De(),bt},s.Ag=function(){return De(),Kn},v(Xee,"NorthToSouthRoutingStrategy",1849),m(1850,661,{},jxe),s.xg=function(n,t,i){var r,c,o,l,f,h,b,p,y,S,A,O,D;if(!(n.r&&!n.q))for(p=t-n.o*i,b=new P(n.n);b.axh&&(o=p,c=n,r=new Se(y,o),Vt(l.a,r),Vw(this,l,c,r,!1),S=n.r,S&&(A=ne(re(Yu(S.e,0))),r=new Se(A,o),Vt(l.a,r),Vw(this,l,c,r,!1),o=t-S.o*i,c=S,r=new Se(A,o),Vt(l.a,r),Vw(this,l,c,r,!1)),r=new Se(D,o),Vt(l.a,r),Vw(this,l,c,r,!1)))},s.yg=function(n){return n.i.n.a+n.n.a+n.a.a},s.zg=function(){return De(),Kn},s.Ag=function(){return De(),bt},v(Xee,"SouthToNorthRoutingStrategy",1850),m(1848,661,{},Exe),s.xg=function(n,t,i){var r,c,o,l,f,h,b,p,y,S,A,O,D;if(!(n.r&&!n.q))for(p=t+n.o*i,b=new P(n.n);b.axh&&(o=p,c=n,r=new Se(o,y),Vt(l.a,r),Vw(this,l,c,r,!0),S=n.r,S&&(A=ne(re(Yu(S.e,0))),r=new Se(o,A),Vt(l.a,r),Vw(this,l,c,r,!0),o=t+S.o*i,c=S,r=new Se(o,A),Vt(l.a,r),Vw(this,l,c,r,!0)),r=new Se(o,D),Vt(l.a,r),Vw(this,l,c,r,!0)))},s.yg=function(n){return n.i.n.b+n.n.b+n.a.b},s.zg=function(){return De(),et},s.Ag=function(){return De(),Vn},v(Xee,"WestToEastRoutingStrategy",1848),m(812,1,{},fge),s.Ib=function(){return Ja(this.a)},s.b=0,s.c=!1,s.d=!1,s.f=0,v(lm,"NubSpline",812),m(410,1,{410:1},YUe,x_e),v(lm,"NubSpline/PolarCP",410),m(1440,1,oc,kHe),s.pg=function(n){return YAn(u(n,37))},s.If=function(n,t){ORn(this,u(n,37),t)};var Von,Yon,Qon,Won,Zon;v(lm,"SplineEdgeRouter",1440),m(273,1,{273:1},ZR),s.Ib=function(){return this.a+" ->("+this.c+") "+this.b},s.c=0,v(lm,"SplineEdgeRouter/Dependency",273),m(454,23,{3:1,35:1,23:1,454:1},Ese);var hb,X3,esn=yt(lm,"SplineEdgeRouter/SideToProcess",454,Tt,o4n,Tmn),nsn;m(1441,1,zt,p1),s.Mb=function(n){return rS(),!u(n,132).o},v(lm,"SplineEdgeRouter/lambda$0$Type",1441),m(1442,1,{},bd),s.Xe=function(n){return rS(),u(n,132).v+1},v(lm,"SplineEdgeRouter/lambda$1$Type",1442),m(1443,1,ct,aCe),s.Ad=function(n){Xvn(this.a,this.b,u(n,49))},v(lm,"SplineEdgeRouter/lambda$2$Type",1443),m(1444,1,ct,hCe),s.Ad=function(n){Kvn(this.a,this.b,u(n,49))},v(lm,"SplineEdgeRouter/lambda$3$Type",1444),m(132,1,{35:1,132:1},rqe,wge),s.Dd=function(n){return ugn(this,u(n,132))},s.b=0,s.e=!1,s.f=0,s.g=0,s.j=!1,s.k=!1,s.n=0,s.o=!1,s.p=!1,s.q=!1,s.s=0,s.u=0,s.v=0,s.F=0,v(lm,"SplineSegment",132),m(457,1,{457:1},Kp),s.a=0,s.b=!1,s.c=!1,s.d=!1,s.e=!1,s.f=0,v(lm,"SplineSegment/EdgeInformation",457),m(1167,1,{},kM),v(X1,twe,1167),m(1168,1,Yt,v_),s.Le=function(n,t){return STn(u(n,120),u(t,120))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(X1,eQe,1168),m(1166,1,{},LAe),v(X1,"MrTree",1166),m(398,23,{3:1,35:1,23:1,398:1,188:1,196:1},m$),s.bg=function(){return Mqe(this)},s.og=function(){return Mqe(this)};var LH,Nx,Ix,Dx,iye=yt(X1,"TreeLayoutPhases",398,Tt,l6n,Omn),tsn;m(1082,214,ep,sNe),s.kf=function(n,t){var i,r,c,o,l,f,h,b;for(Fe(ze(je(n,(Mu(),Cye))))||qT((i=new dj((Rb(),new v0(n))),i)),l=t.dh(Yee),l.Tg("build tGraph",1),f=(h=new ZT,Pu(h,n),he(h,(Ti(),Lx),n),b=new wt,u_n(n,h,b),E_n(n,h,b),h),l.Ug(),l=t.dh(Yee),l.Tg("Split graph",1),o=h_n(this.a,f),l.Ug(),c=new P(o);c.a"+Yb(this.c):"e_"+Ni(this)},v(NS,"TEdge",65),m(120,150,{3:1,120:1,105:1,150:1},ZT),s.Ib=function(){var n,t,i,r,c;for(c=null,r=St(this.b,0);r.b!=r.d.c;)i=u(jt(r),40),c+=(i.c==null||i.c.length==0?"n_"+i.g:"n_"+i.c)+` + endInLayerEdge=`,uo(n,this.c),n.a},v(Ah,"BreakingPointInserter/BPInfo",317),m(650,1,{650:1},Wje),s.a=!1,s.b=0,s.c=0,v(Ah,"BreakingPointInserter/Cut",650),m(1506,1,Mi,Hp),s.If=function(n,t){VOn(u(n,37),t)},v(Ah,"BreakingPointProcessor",1506),m(1507,1,zt,rw),s.Mb=function(n){return FRe(u(n,9))},v(Ah,"BreakingPointProcessor/0methodref$isEnd$Type",1507),m(1508,1,zt,oM),s.Mb=function(n){return JRe(u(n,9))},v(Ah,"BreakingPointProcessor/1methodref$isStart$Type",1508),m(1509,1,Mi,sM),s.If=function(n,t){mNn(this,u(n,37),t)},v(Ah,"BreakingPointRemover",1509),m(1510,1,ut,L5),s.Ad=function(n){u(n,132).k=!0},v(Ah,"BreakingPointRemover/lambda$0$Type",1510),m(798,1,{},sbe),s.b=0,s.e=0,s.f=0,s.j=0,v(Ah,"GraphStats",798),m(799,1,{},S6),s.Te=function(n,t){return k.Math.max(ne(re(n)),ne(re(t)))},v(Ah,"GraphStats/0methodref$max$Type",799),m(800,1,{},Gp),s.Te=function(n,t){return k.Math.max(ne(re(n)),ne(re(t)))},v(Ah,"GraphStats/2methodref$max$Type",800),m(1692,1,{},ua),s.Te=function(n,t){return Smn(re(n),re(t))},v(Ah,"GraphStats/lambda$1$Type",1692),m(1693,1,{},Yje),s.Kb=function(n){return PJe(this.a,u(n,25))},v(Ah,"GraphStats/lambda$2$Type",1693),m(1694,1,{},Qje),s.Kb=function(n){return PUe(this.a,u(n,25))},v(Ah,"GraphStats/lambda$6$Type",1694),m(801,1,{},x6),s.mg=function(n,t){var i;return i=u(C(n,(Oe(),y4e)),16),i||(En(),En(),Sc)},s.ng=function(){return!1},v(Ah,"ICutIndexCalculator/ManualCutIndexCalculator",801),m(803,1,{},lM),s.mg=function(n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be;for(be=(t.n==null&&lHe(t),t.n),h=(t.d==null&&lHe(t),t.d),te=le(Jr,Jc,30,be.length,15,1),te[0]=be[0],q=be[0],b=1;b=D&&(Ce(o,ve(p)),V=k.Math.max(V,te[p-1]-y),f+=O,B+=te[p-1]-B,y=te[p-1],O=h[p]),O=k.Math.max(O,h[p]),++p;f+=O}A=k.Math.min(1/V,1/t.b/f),A>r&&(r=A,i=o)}return i},s.ng=function(){return!1},v(Ah,"MSDCutIndexHeuristic",803),m(1647,1,Mi,Yq),s.If=function(n,t){iLn(u(n,37),t)},v(Ah,"SingleEdgeGraphWrapper",1647),m(231,23,{3:1,35:1,23:1,231:1},Lj);var D3,y7,k7,vm,ix,_3,j7=yt(Tu,"CenterEdgeLabelPlacementStrategy",231,Tt,M9n,q2n),_in;m(422,23,{3:1,35:1,23:1,422:1},dse);var b3e,Kte,g3e=yt(Tu,"ConstraintCalculationStrategy",422,Tt,Q5n,U2n),Lin;m(301,23,{3:1,35:1,23:1,301:1,188:1,196:1},b$),s.bg=function(){return kUe(this)},s.og=function(){return kUe(this)};var tI,rx,w3e,p3e,m3e=yt(Tu,"CrossingMinimizationStrategy",301,Tt,r6n,X2n),Pin;m(350,23,{3:1,35:1,23:1,350:1},VX);var v3e,Vte,KJ,y3e=yt(Tu,"CuttingStrategy",350,Tt,F4n,K2n),$in;m(267,23,{3:1,35:1,23:1,267:1,188:1,196:1},Nv),s.bg=function(){return xXe(this)},s.og=function(){return xXe(this)};var Yte,k3e,Qte,Wte,Zte,eie,nie,tie,iI,j3e=yt(Tu,"CycleBreakingStrategy",267,Tt,F8n,V2n),Rin;m(419,23,{3:1,35:1,23:1,419:1},bse);var VJ,E3e,S3e=yt(Tu,"DirectionCongruency",419,Tt,W5n,Y2n),Bin;m(449,23,{3:1,35:1,23:1,449:1},QX);var E7,iie,L3,zin=yt(Tu,"EdgeConstraint",449,Tt,J4n,Q2n),Fin;m(284,23,{3:1,35:1,23:1,284:1},Rj);var rie,cie,uie,oie,YJ,sie,x3e=yt(Tu,"EdgeLabelSideSelection",284,Tt,C9n,W2n),Jin;m(476,23,{3:1,35:1,23:1,476:1},gse);var QJ,A3e,M3e=yt(Tu,"EdgeStraighteningStrategy",476,Tt,Z5n,Z2n),Hin;m(282,23,{3:1,35:1,23:1,282:1},Pj);var lie,C3e,T3e,WJ,O3e,N3e,I3e=yt(Tu,"FixedAlignment",282,Tt,T9n,emn),Gin;m(283,23,{3:1,35:1,23:1,283:1},$j);var D3e,_3e,L3e,P3e,cx,$3e,R3e=yt(Tu,"GraphCompactionStrategy",283,Tt,O9n,nmn),qin;m(261,23,{3:1,35:1,23:1,261:1},h2);var S7,ZJ,x7,Kl,ux,eH,A7,P3,nH,ox,fie=yt(Tu,"GraphProperties",261,Tt,b7n,tmn),Uin;m(302,23,{3:1,35:1,23:1,302:1},WX);var rI,aie,hie,die=yt(Tu,"GreedySwitchType",302,Tt,H4n,imn),Xin;m(329,23,{3:1,35:1,23:1,329:1},ZX);var ym,B3e,cI,bie=yt(Tu,"GroupOrderStrategy",329,Tt,G4n,rmn),Kin;m(315,23,{3:1,35:1,23:1,315:1},eK);var Ty,uI,$3,Vin=yt(Tu,"InLayerConstraint",315,Tt,q4n,cmn),Yin;m(420,23,{3:1,35:1,23:1,420:1},wse);var gie,z3e,F3e=yt(Tu,"InteractiveReferencePoint",420,Tt,e4n,umn),Qin,J3e,Oy,dp,oI,tH,H3e,G3e,iH,q3e,Ny,rH,sx,Iy,K1,wie,cH,Iu,U3e,ob,po,pie,mie,sI,jg,bp,Dy,X3e,Win,_y,lI,km,Ea,gf,vie,R3,sb,Oi,mi,K3e,V3e,Y3e,Q3e,W3e,yie,uH,vs,gp,kie,Ly,lx,qd,B3,wp,z3,F3,M7,Eg,Z3e,jie,Eie,fx,Py,oH,$y,J3;m(165,23,{3:1,35:1,23:1,165:1},fT);var ax,V1,hx,Sg,fI,e5e=yt(Tu,"LayerConstraint",165,Tt,Z6n,omn),Zin;m(423,23,{3:1,35:1,23:1,423:1},pse);var Sie,xie,n5e=yt(Tu,"LayerUnzippingStrategy",423,Tt,n4n,smn),ern;m(843,1,Ua,xC),s.tf=function(n){nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,gwe),""),"Direction Congruency"),"Specifies how drawings of the same graph with different layout directions compare to each other: either a natural reading direction is preserved or the drawings are rotated versions of each other."),b5e),(lg(),Bi)),S3e),rn((vh(),Tn))))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,wwe),""),"Feedback Edges"),"Whether feedback edges should be highlighted by routing around the nodes."),($n(),!1)),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,wF),""),"Interactive Reference Point"),"Determines which point of a node is considered by interactive layout phases."),y5e),Bi),F3e),rn(Tn)))),qi(n,wF,IN,rcn),qi(n,wF,CS,icn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,pwe),""),"Merge Edges"),"Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,mwe),""),"Merge Hierarchy-Crossing Edges"),"If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port."),!0),xr),Qi),rn(Tn)))),nn(n,new Ue(tgn(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,vwe),""),"Allow Non-Flow Ports To Switch Sides"),"Specifies whether non-flow ports may switch sides if their node's port constraints are either FIXED_SIDE or FIXED_ORDER. A non-flow port is a port on a side that is not part of the currently configured layout flow. For instance, given a left-to-right layout direction, north and south ports would be considered non-flow ports. Further note that the underlying criterium whether to switch sides or not solely relies on the minimization of edge crossings. Hence, edge length and other aesthetics criteria are not addressed."),!1),xr),Qi),rn(Yd)),F(z(He,1),Ae,2,6,["org.eclipse.elk.layered.northOrSouthPort"])))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,ywe),""),"Port Sorting Strategy"),"Only relevant for nodes with FIXED_SIDE port constraints. Determines the way a node's ports are distributed on the sides of a node if their order is not prescribed. The option is set on parent nodes."),N5e),Bi),J4e),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,kwe),""),"Thoroughness"),"How much effort should be spent to produce a nice layout."),ve(7)),dc),jr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,jwe),""),"Add Unnecessary Bendpoints"),"Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Ewe),""),"Generate Position and Layer IDs"),"If enabled position id and layer id are generated, which are usually only used internally when setting the interactiveLayout option. This option should be specified on the root node."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,IN),"cycleBreaking"),"Cycle Breaking Strategy"),"Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right)."),d5e),Bi),j3e),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,DN),Ree),"Node Layering Strategy"),"Strategy for node layering."),E5e),Bi),O4e),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Swe),Ree),"Layer Constraint"),"Determines a constraint on the placement of the node regarding the layering."),k5e),Bi),e5e),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,xwe),Ree),"Layer Choice Constraint"),"Allows to set a constraint regarding the layer placement of a node. Let i be the value of teh constraint. Assumed the drawing has n layers and i < n. If set to i, it expresses that the node should be placed in i-th layer. Should i>=n be true then the node is placed in the last layer of the drawing. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),null),dc),jr),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Awe),Ree),"Layer ID"),"Layer identifier that was calculated by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."),ve(-1)),dc),jr),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,uee),OQe),"Upper Bound On Width [MinWidth Layerer]"),"Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."),ve(4)),dc),jr),rn(Tn)))),qi(n,uee,DN,acn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,oee),OQe),"Upper Layer Estimation Scaling Factor [MinWidth Layerer]"),"Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."),ve(2)),dc),jr),rn(Tn)))),qi(n,oee,DN,dcn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,see),NQe),"Node Promotion Strategy"),"Reduces number of dummy nodes after layering phase (if possible)."),j5e),Bi),B4e),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,lee),NQe),"Max Node Promotion Iterations"),"Limits the number of iterations for node promotion."),ve(0)),dc),jr),rn(Tn)))),qi(n,lee,see,null),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,fee),"layering.coffmanGraham"),"Layer Bound"),"The maximum number of nodes allowed per layer."),ve(oi)),dc),jr),rn(Tn)))),qi(n,fee,DN,ucn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,CS),Q8),"Crossing Minimization Strategy"),"Strategy for crossing minimization."),h5e),Bi),m3e),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Mwe),Q8),"Force Node Model Order"),"The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,aee),Q8),"Hierarchical Sweepiness"),"How likely it is to use cross-hierarchy (1) vs bottom-up (-1)."),.1),ec),gr),rn(Tn)))),qi(n,aee,TF,Orn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,hee),Q8),"Semi-Interactive Crossing Minimization"),"Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."),!1),xr),Qi),rn(Tn)))),qi(n,hee,CS,Prn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Cwe),Q8),"In Layer Predecessor of"),"Allows to set a constraint which specifies of which node the current node is the predecessor. If set to 's' then the node is the predecessor of 's' and is in the same layer"),null),Gy),He),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Twe),Q8),"In Layer Successor of"),"Allows to set a constraint which specifies of which node the current node is the successor. If set to 's' then the node is the successor of 's' and is in the same layer"),null),Gy),He),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Owe),Q8),"Position Choice Constraint"),"Allows to set a constraint regarding the position placement of a node in a layer. Assumed the layer in which the node placed includes n other nodes and i < n. If set to i, it expresses that the node should be placed at the i-th position. Should i>=n be true then the node is placed at the last position in the layer. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),null),dc),jr),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Nwe),Q8),"Position ID"),"Position within a layer that was determined by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."),ve(-1)),dc),jr),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Iwe),IQe),"Greedy Switch Activation Threshold"),"By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."),ve(40)),dc),jr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,dee),IQe),"Greedy Switch Crossing Minimization"),"Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular crossing minimization as a post-processor. Note that if 'hierarchyHandling' is set to 'INCLUDE_CHILDREN', the 'greedySwitchHierarchical.type' option must be used."),a5e),Bi),die),rn(Tn)))),qi(n,dee,CS,Crn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,pF),"crossingMinimization.greedySwitchHierarchical"),"Greedy Switch Crossing Minimization (hierarchical)"),"Activates the greedy switch heuristic in case hierarchical layout is used. The differences to the non-hierarchical case (see 'greedySwitch.type') are: 1) greedy switch is inactive by default, 3) only the option value set on the node at which hierarchical layout starts is relevant, and 2) if it's activated by the user, it properly addresses hierarchy-crossing edges."),f5e),Bi),die),rn(Tn)))),qi(n,pF,CS,xrn),qi(n,pF,TF,Arn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,j3),DQe),"Node Placement Strategy"),"Strategy for node placement."),O5e),Bi),_4e),rn(Tn)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,mF),DQe),"Favor Straight Edges Over Balancing"),"Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."),xr),Qi),rn(Tn)))),qi(n,mF,j3,Ocn),qi(n,mF,j3,Ncn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,bee),_Qe),"BK Edge Straightening"),"Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."),M5e),Bi),M3e),rn(Tn)))),qi(n,bee,j3,Acn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,gee),_Qe),"BK Fixed Alignment"),"Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four."),C5e),Bi),I3e),rn(Tn)))),qi(n,gee,j3,Ccn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,wee),"nodePlacement.linearSegments"),"Linear Segments Deflection Dampening"),"Dampens the movement of nodes to keep the diagram from getting too large."),.3),ec),gr),rn(Tn)))),qi(n,wee,j3,Dcn),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,pee),"nodePlacement.networkSimplex"),"Node Flexibility"),"Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."),Bi),Wie),rn(fr)))),qi(n,pee,j3,$cn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,mee),"nodePlacement.networkSimplex.nodeFlexibility"),"Node Flexibility Default"),"Default value of the 'nodeFlexibility' option for the children of a hierarchical node."),T5e),Bi),Wie),rn(Tn)))),qi(n,mee,j3,Pcn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Dwe),LQe),"Self-Loop Distribution"),"Alter the distribution of the loops around the node. It only takes effect for PortConstraints.FREE."),p5e),Bi),q4e),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,_we),LQe),"Self-Loop Ordering"),"Alter the ordering of the loops they can either be stacked or sequenced. It only takes effect for PortConstraints.FREE."),m5e),Bi),U4e),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,vF),"edgeRouting.splines"),"Spline Routing Mode"),"Specifies the way control points are assembled for each individual edge. CONSERVATIVE ensures that edges are properly routed around the nodes but feels rather orthogonal at times. SLOPPY uses fewer control points to obtain curvier edge routes but may result in edges overlapping nodes."),v5e),Bi),K4e),rn(Tn)))),qi(n,vF,LN,Xrn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,yF),"edgeRouting.splines.sloppy"),"Sloppy Spline Layer Spacing Factor"),"Spacing factor for routing area between layers when using sloppy spline routing."),.2),ec),gr),rn(Tn)))),qi(n,yF,LN,Vrn),qi(n,yF,vF,Yrn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,vee),"edgeRouting.polyline"),"Sloped Edge Zone Width"),"Width of the strip to the left and to the right of each layer where the polyline edge router is allowed to refrain from ensuring that edges are routed horizontally. This prevents awkward bend points for nodes that extent almost to the edge of their layer."),2),ec),gr),rn(Tn)))),qi(n,vee,LN,Hrn),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,Lwe),Ka),"Spacing Base Value"),"An optional base value for all other layout options of the 'spacing' group. It can be used to conveniently alter the overall 'spaciousness' of the drawing. Whenever an explicit value is set for the other layout options, this base value will have no effect. The base value is not inherited, i.e. it must be set for each hierarchical node."),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Pwe),Ka),"Edge Node Between Layers Spacing"),"The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."),10),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,$we),Ka),"Edge Edge Between Layer Spacing"),"Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."),10),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Rwe),Ka),"Node Node Between Layers Spacing"),"The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."),20),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Bwe),Qwe),"Direction Priority"),"Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase."),ve(0)),dc),jr),rn(xa)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,zwe),Qwe),"Shortness Priority"),"Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase."),ve(0)),dc),jr),rn(xa)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Fwe),Qwe),"Straightness Priority"),"Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement."),ve(0)),dc),jr),rn(xa)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,yee),Wwe),"Connected Components Compaction"),"Tries to further compact components (disconnected sub-graphs)."),!1),xr),Qi),rn(Tn)))),qi(n,yee,jS,!0),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Jwe),PQe),"Post Compaction Strategy"),$Qe),i5e),Bi),R3e),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Hwe),PQe),"Post Compaction Constraint Calculation"),$Qe),t5e),Bi),g3e),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,kF),Zwe),"High Degree Node Treatment"),"Makes room around high degree nodes to place leafs and trees."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,kee),Zwe),"High Degree Node Threshold"),"Whether a node is considered to have a high degree."),ve(16)),dc),jr),rn(Tn)))),qi(n,kee,kF,!0),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,jee),Zwe),"High Degree Node Maximum Tree Height"),"Maximum height of a subtree connected to a high degree node to be moved to separate layers."),ve(5)),dc),jr),rn(Tn)))),qi(n,jee,kF,!0),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,q1),epe),"Graph Wrapping Strategy"),"For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."),_5e),Bi),W4e),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,jF),epe),"Additional Wrapped Edges Spacing"),"To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing."),10),ec),gr),rn(Tn)))),qi(n,jF,q1,Ycn),qi(n,jF,q1,Qcn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,EF),epe),"Correction Factor for Wrapping"),"At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simply multiplied with the 'aspect ratio' layout option."),1),ec),gr),rn(Tn)))),qi(n,EF,q1,Zcn),qi(n,EF,q1,eun),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,TS),RQe),"Cutting Strategy"),"The strategy by which the layer indexes are determined at which the layering crumbles into chunks."),D5e),Bi),y3e),rn(Tn)))),qi(n,TS,q1,uun),qi(n,TS,q1,oun),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,Eee),RQe),"Manually Specified Cuts"),"Allows the user to specify her own cuts for a certain graph."),Za),gl),rn(Tn)))),qi(n,Eee,TS,tun),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,See),"wrapping.cutting.msd"),"MSD Freedom"),"The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts."),I5e),dc),jr),rn(Tn)))),qi(n,See,TS,run),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,SF),BQe),"Validification Strategy"),"When wrapping graphs, one can specify indices that are not allowed as split points. The validification strategy makes sure every computed split point is allowed."),L5e),Bi),Q4e),rn(Tn)))),qi(n,SF,q1,vun),qi(n,SF,q1,yun),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,xF),BQe),"Valid Indices for Wrapping"),null),Za),gl),rn(Tn)))),qi(n,xF,q1,wun),qi(n,xF,q1,pun),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,AF),npe),"Improve Cuts"),"For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought."),!0),xr),Qi),rn(Tn)))),qi(n,AF,q1,aun),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,MF),npe),"Distance Penalty When Improving Cuts"),null),2),ec),gr),rn(Tn)))),qi(n,MF,q1,lun),qi(n,MF,AF,!0),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,xee),npe),"Improve Wrapped Edges"),"The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges."),!0),xr),Qi),rn(Tn)))),qi(n,xee,q1,dun),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Aee),Bee),"Layer Unzipping Strategy"),"The strategy to use for unzipping a layer into multiple sublayers while maintaining the existing ordering of nodes and edges after crossing minimization. The default value is 'NONE'."),A5e),Bi),n5e),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Mee),Bee),"Minimize Edge Length Heuristic"),"Use a heuristic to decide whether or not to actually perform the layer split with the goal of minimizing the total edge length. This option only works when layerSplit is set to 2. The property can be set to the nodes in a layer, which then applies the property for the layer. If any node sets the value to true, then the value is set to true for the entire layer."),!1),xr),Qi),rn(fr)))),qi(n,Mee,Cee,vcn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Cee),Bee),"Unzipping Layer Split"),"Defines the number of sublayers to split a layer into. The property can be set to the nodes in a layer, which then applies the property for the layer. If multiple nodes set the value to different values, then the lowest value is chosen."),S5e),dc),jr),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Tee),Bee),"Reset Alternation on Long Edges"),"If set to true, nodes will always be placed in the first sublayer after a long edge when using the ALTERNATING strategy. Otherwise long edge dummies are treated the same as regular nodes. The default value is true. The property can be set to the nodes in a layer, which then applies the property for the layer. If any node sets the value to false, then the value is set to false for the entire layer."),x5e),xr),Qi),rn(fr)))),qi(n,Tee,Aee,kcn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Gwe),zee),"Edge Label Side Selection"),"Method to decide on edge label sides."),w5e),Bi),x3e),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,qwe),zee),"Edge Center Label Placement Strategy"),"Determines in which layer center labels of long edges should be placed."),g5e),Bi),j7),Ci(Tn,F(z(Wa,1),je,160,0,[Q1]))))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,CF),OS),"Consider Model Order"),"Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting."),l5e),Bi),F4e),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Uwe),OS),"Consider Port Order"),"If disabled the port order of output ports is derived from the edge order and input ports are ordered by their incoming connections. If enabled all ports are ordered by the port model order."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,_N),OS),"No Model Order"),"Set on a node to not set a model order for this node even though it is a real node."),!1),xr),Qi),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Oee),OS),"Consider Model Order for Components"),"If set to NONE the usual ordering strategy (by cumulative node priority and size of nodes) is used. INSIDE_PORT_SIDES orders the components with external ports only inside the groups with the same port side. FORCE_MODEL_ORDER enforces the mode order on components. This option might produce bad alignments and sub optimal drawings in terms of used area since the ordering should be respected."),r5e),Bi),yve),rn(Tn)))),qi(n,Oee,jS,null),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Xwe),OS),"Long Edge Ordering Strategy"),"Indicates whether long edges are sorted under, over, or equal to nodes that have no connection to a previous layer in a left-to-right or right-to-left layout. Under and over changes to right and left in a vertical layout."),s5e),Bi),I4e),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Nee),OS),"Crossing Counter Node Order Influence"),"Indicates with what percentage (1 for 100%) violations of the node model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal node order. Defaults to no influence (0)."),0),ec),gr),rn(Tn)))),qi(n,Nee,CF,null),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Iee),OS),"Crossing Counter Port Order Influence"),"Indicates with what percentage (1 for 100%) violations of the port model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal port order. Defaults to no influence (0)."),0),ec),gr),rn(Tn)))),qi(n,Iee,CF,null),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Dee),W8),tpe),"Used to define partial ordering groups during cycle breaking. A lower group id means that the group is sorted before other groups. A group model order of 0 is the default group."),ve(0)),dc),jr),rn(fr)))),qi(n,Dee,_N,!1),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,_ee),W8),tpe),"Used to define partial ordering groups during crossing minimization. A lower group id means that the group is sorted before other groups. A group model order of 0 is the default group."),ve(0)),dc),jr),Ci(fr,F(z(Wa,1),je,160,0,[xa,Yd]))))),qi(n,_ee,_N,!1),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Lee),W8),tpe),"Used to define partial ordering groups during component packing. A lower group id means that the group is sorted before other groups. A group model order of 0 is the default group."),ve(0)),dc),jr),Ci(fr,F(z(Wa,1),je,160,0,[xa,Yd]))))),qi(n,Lee,_N,!1),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Kwe),W8),"Cycle Breaking Group Ordering Strategy"),"Determines how to count ordering violations during cycle breaking. NONE: They do not count. ENFORCED: A group with a higher model order is before a node with a smaller. MODEL_ORDER: The model order counts instead of the model order group id ordering."),c5e),Bi),bie),rn(Tn)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,Pee),W8),"Cycle Breaking Preferred Source Id"),"The model order group id for which should be preferred as a source if possible."),dc),jr),rn(Tn)))),qi(n,Pee,IN,frn),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,$ee),W8),"Cycle Breaking Preferred Target Id"),"The model order group id for which should be preferred as a target if possible."),dc),jr),rn(Tn)))),qi(n,$ee,IN,hrn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Vwe),W8),"Crossing Minimization Group Ordering Strategy"),"Determines how to count ordering violations during crossing minimization. NONE: They do not count. ENFORCED: A group with a lower id is before a group with a higher id. MODEL_ORDER: The model order counts instead of the model order group id ordering."),o5e),Bi),bie),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Ywe),W8),"Crossing Minimization Enforced Group Orders"),"Holds all group ids which are enforcing their order during crossing minimization strategies. E.g. if only groups 2 and -1 (default) enforce their ordering. Other groups e.g. the group of timer nodes can be ordered arbitrarily if it helps and the mentioned groups may not change their order."),u5e),Za),gl),rn(Tn)))),cYe((new NU,n))};var nrn,trn,irn,t5e,rrn,i5e,crn,r5e,urn,orn,srn,c5e,lrn,frn,arn,hrn,drn,u5e,brn,o5e,grn,wrn,prn,mrn,s5e,vrn,yrn,krn,l5e,jrn,Ern,Srn,f5e,xrn,Arn,Mrn,a5e,Crn,Trn,Orn,Nrn,Irn,Drn,_rn,Lrn,Prn,$rn,h5e,Rrn,d5e,Brn,b5e,zrn,g5e,Frn,w5e,Jrn,Hrn,Grn,p5e,qrn,m5e,Urn,v5e,Xrn,Krn,Vrn,Yrn,Qrn,Wrn,Zrn,ecn,ncn,tcn,y5e,icn,rcn,ccn,ucn,ocn,scn,k5e,lcn,fcn,acn,hcn,dcn,bcn,gcn,j5e,wcn,E5e,pcn,S5e,mcn,vcn,ycn,x5e,kcn,jcn,A5e,Ecn,Scn,xcn,M5e,Acn,Mcn,C5e,Ccn,Tcn,Ocn,Ncn,Icn,Dcn,_cn,Lcn,T5e,Pcn,$cn,Rcn,O5e,Bcn,N5e,zcn,Fcn,Jcn,Hcn,Gcn,qcn,Ucn,Xcn,Kcn,Vcn,Ycn,Qcn,Wcn,Zcn,eun,nun,tun,iun,I5e,run,cun,D5e,uun,oun,sun,lun,fun,aun,hun,dun,bun,_5e,gun,wun,pun,mun,L5e,vun,yun;v(Tu,"LayeredMetaDataProvider",843),m(982,1,Ua,NU),s.tf=function(n){cYe(n)};var Nh,Aie,sH,dx,lH,P5e,fH,bx,aI,Mie,Ry,$5e,R5e,B5e,gx,kun,wx,jm,Cie,aH,Tie,o1,Oie,C7,z5e,hI,Nie,F5e,jun,Eun,Sun,hH,Iie,px,By,xun,wl,J5e,H5e,dH,H3,Ih,bH,Y1,G5e,q5e,U5e,Die,_ie,X5e,Ud,Lie,K5e,Em,V5e,Y5e,Q5e,gH,Sm,xg,W5e,Z5e,Wc,e4e,Aun,ku,mx,n4e,t4e,i4e,dI,wH,pH,Pie,$ie,r4e,mH,c4e,u4e,vH,pp,o4e,Rie,vx,s4e,mp,yx,yH,Ag,Bie,T7,kH,Mg,l4e,f4e,a4e,xm,h4e,Mun,Cun,Tun,Oun,vp,Am,Zi,Xd,Nun,Mm,d4e,O7,b4e,Cm,Iun,N7,g4e,zy,Dun,_un,bI,zie,w4e,gI,Kf,Tm,G3,Cg,lb,jH,Om,Fie,I7,D7,Tg,Nm,Jie,wI,kx,jx,Lun,Pun,$un,p4e,Run,Hie,m4e,v4e,y4e,k4e,Gie,j4e,E4e,S4e,x4e,qie,EH;v(Tu,"LayeredOptions",982),m(983,1,{},Qq),s.uf=function(){var n;return n=new rxe,n},s.vf=function(n){},v(Tu,"LayeredOptions/LayeredFactory",983),m(1345,1,{}),s.a=0;var Bun;v($u,"ElkSpacings/AbstractSpacingsBuilder",1345),m(778,1345,{},tde);var SH,zun;v(Tu,"LayeredSpacings/LayeredSpacingsBuilder",778),m(268,23,{3:1,35:1,23:1,268:1,188:1,196:1},Iv),s.bg=function(){return kXe(this)},s.og=function(){return kXe(this)};var Uie,Xie,Kie,A4e,M4e,C4e,xH,Vie,T4e,O4e=yt(Tu,"LayeringStrategy",268,Tt,J8n,lmn),Fun;m(352,23,{3:1,35:1,23:1,352:1},nK);var Yie,N4e,AH,I4e=yt(Tu,"LongEdgeOrderingStrategy",352,Tt,U4n,fmn),Jun;m(203,23,{3:1,35:1,23:1,203:1},g$);var q3,U3,MH,Qie,Wie=yt(Tu,"NodeFlexibility",203,Tt,c6n,amn),Hun;m(328,23,{3:1,35:1,23:1,328:1,188:1,196:1},aT),s.bg=function(){return lUe(this)},s.og=function(){return lUe(this)};var Ex,Zie,ere,Sx,D4e,_4e=yt(Tu,"NodePlacementStrategy",328,Tt,W6n,hmn),Gun;m(243,23,{3:1,35:1,23:1,243:1},d2);var L4e,_7,xx,pI,P4e,$4e,mI,R4e,CH,TH,B4e=yt(Tu,"NodePromotionStrategy",243,Tt,d7n,dmn),qun;m(269,23,{3:1,35:1,23:1,269:1},w$);var z4e,fb,nre,tre,F4e=yt(Tu,"OrderingStrategy",269,Tt,u6n,bmn),Uun;m(421,23,{3:1,35:1,23:1,421:1},mse);var ire,rre,J4e=yt(Tu,"PortSortingStrategy",421,Tt,t4n,gmn),Xun;m(452,23,{3:1,35:1,23:1,452:1},tK);var ys,Io,Ax,Kun=yt(Tu,"PortType",452,Tt,X4n,wmn),Vun;m(381,23,{3:1,35:1,23:1,381:1},iK);var H4e,cre,G4e,q4e=yt(Tu,"SelfLoopDistributionStrategy",381,Tt,K4n,pmn),Yun;m(348,23,{3:1,35:1,23:1,348:1},rK);var ure,vI,ore,U4e=yt(Tu,"SelfLoopOrderingStrategy",348,Tt,V4n,mmn),Qun;m(316,1,{316:1},iVe),v(Tu,"Spacings",316),m(349,23,{3:1,35:1,23:1,349:1},cK);var sre,X4e,Mx,K4e=yt(Tu,"SplineRoutingMode",349,Tt,Y4n,vmn),Wun;m(351,23,{3:1,35:1,23:1,351:1},uK);var lre,V4e,Y4e,Q4e=yt(Tu,"ValidifyStrategy",351,Tt,Q4n,ymn),Zun;m(382,23,{3:1,35:1,23:1,382:1},oK);var Im,fre,L7,W4e=yt(Tu,"WrappingStrategy",382,Tt,W4n,kmn),eon;m(1361,1,oc,SC),s.pg=function(n){return u(n,37),non},s.If=function(n,t){FPn(this,u(n,37),t)};var non;v(tp,"BFSNodeOrderCycleBreaker",1361),m(1359,1,oc,cP),s.pg=function(n){return u(n,37),ton},s.If=function(n,t){PLn(this,u(n,37),t)};var ton;v(tp,"DFSNodeOrderCycleBreaker",1359),m(1360,1,ut,RNe),s.Ad=function(n){RDn(this.a,this.c,this.b,u(n,17))},s.b=!1,v(tp,"DFSNodeOrderCycleBreaker/lambda$0$Type",1360),m(1353,1,oc,Z6),s.pg=function(n){return u(n,37),ion},s.If=function(n,t){LLn(this,u(n,37),t)};var ion;v(tp,"DepthFirstCycleBreaker",1353),m(779,1,oc,Afe),s.pg=function(n){return u(n,37),ron},s.If=function(n,t){tBn(this,u(n,37),t)},s.qg=function(n){return u(Le(n,fz(this.e,n.c.length)),9)};var ron;v(tp,"GreedyCycleBreaker",779),m(1356,779,oc,xCe),s.qg=function(n){var t,i,r,c,o,l,f,h,b;for(b=null,r=oi,h=k.Math.max(this.b.a.c.length,u(C(this.b,(me(),sb)),15).a),t=h*u(C(this.b,oI),15).a,c=new A6,i=ue(C(this.b,(Oe(),Ry)))===ue(($0(),ym)),f=new P(n);f.ao&&(r=o,b=l));return b||u(Le(n,fz(this.e,n.c.length)),9)},v(tp,"GreedyModelOrderCycleBreaker",1356),m(505,1,{},A6),s.a=0,s.b=0,v(tp,"GroupModelOrderCalculator",505),m(1354,1,oc,tj),s.pg=function(n){return u(n,37),con},s.If=function(n,t){sPn(this,u(n,37),t)};var con;v(tp,"InteractiveCycleBreaker",1354),m(1355,1,oc,nj),s.pg=function(n){return u(n,37),uon},s.If=function(n,t){fPn(u(n,37),t)};var uon;v(tp,"ModelOrderCycleBreaker",1355),m(780,1,oc),s.pg=function(n){return u(n,37),oon},s.If=function(n,t){W_n(this,u(n,37),t)},s.rg=function(n,t){var i,r,c,o,l,f,h,b,p,y;for(l=0;lb&&(h=S,y=b),pha(new Xn(Qn(Ii(f).a.Jc(),new ee))))for(c=new Xn(Qn(cr(h).a.Jc(),new ee));ht(c);)r=u(ct(c),17),u(Yu(this.d,l),22).Gc(r.c.i)&&Ce(this.c,r);else for(c=new Xn(Qn(Ii(f).a.Jc(),new ee));ht(c);)r=u(ct(c),17),u(Yu(this.d,l),22).Gc(r.d.i)&&Ce(this.c,r)}},v(tp,"SCCNodeTypeCycleBreaker",1358),m(1357,780,oc,MCe),s.rg=function(n,t){var i,r,c,o,l,f,h,b,p,y,S,A;for(l=0;lb&&(h=S,y=b),pha(new Xn(Qn(Ii(f).a.Jc(),new ee))))for(c=new Xn(Qn(cr(h).a.Jc(),new ee));ht(c);)r=u(ct(c),17),u(Yu(this.d,l),22).Gc(r.c.i)&&Ce(this.c,r);else for(c=new Xn(Qn(Ii(f).a.Jc(),new ee));ht(c);)r=u(ct(c),17),u(Yu(this.d,l),22).Gc(r.d.i)&&Ce(this.c,r)}},v(tp,"SCConnectivity",1357),m(1373,1,oc,EC),s.pg=function(n){return u(n,37),son},s.If=function(n,t){uRn(this,u(n,37),t)};var son;v(U1,"BreadthFirstModelOrderLayerer",1373),m(1374,1,Yt,fM),s.Le=function(n,t){return qCn(u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(U1,"BreadthFirstModelOrderLayerer/lambda$0$Type",1374),m(1364,1,oc,OMe),s.pg=function(n){return u(n,37),lon},s.If=function(n,t){oBn(this,u(n,37),t)};var lon;v(U1,"CoffmanGrahamLayerer",1364),m(1365,1,Yt,Zje),s.Le=function(n,t){return WNn(this.a,u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(U1,"CoffmanGrahamLayerer/0methodref$compareNodesInTopo$Type",1365),m(1366,1,Yt,eEe),s.Le=function(n,t){return d3n(this.a,u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(U1,"CoffmanGrahamLayerer/lambda$1$Type",1366),m(1375,1,oc,jC),s.pg=function(n){return u(n,37),fon},s.If=function(n,t){XRn(this,u(n,37),t)},s.c=0,s.e=0;var fon;v(U1,"DepthFirstModelOrderLayerer",1375),m(1376,1,Yt,M6),s.Le=function(n,t){return UCn(u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(U1,"DepthFirstModelOrderLayerer/lambda$0$Type",1376),m(1367,1,oc,C6),s.pg=function(n){return u(n,37),qt(qt(qt(new or,(zr(),Xf),(Ur(),_te)),c1,pm),eo,wm)},s.If=function(n,t){pRn(u(n,37),t)},v(U1,"InteractiveLayerer",1367),m(564,1,{564:1},hxe),s.a=0,s.c=0,v(U1,"InteractiveLayerer/LayerSpan",564),m(1363,1,oc,oP),s.pg=function(n){return u(n,37),aon},s.If=function(n,t){UNn(this,u(n,37),t)};var aon;v(U1,"LongestPathLayerer",1363),m(1372,1,oc,sP),s.pg=function(n){return u(n,37),hon},s.If=function(n,t){dIn(this,u(n,37),t)};var hon;v(U1,"LongestPathSourceLayerer",1372),m(1370,1,oc,ko),s.pg=function(n){return u(n,37),qt(qt(qt(new or,(zr(),Xf),(Ur(),N3)),c1,pm),eo,wm)},s.If=function(n,t){MRn(this,u(n,37),t)},s.a=0,s.b=0,s.d=0;var Z4e,eye;v(U1,"MinWidthLayerer",1370),m(1371,1,Yt,nEe),s.Le=function(n,t){return _7n(this,u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(U1,"MinWidthLayerer/MinOutgoingEdgesComparator",1371),m(1362,1,oc,uP),s.pg=function(n){return u(n,37),don},s.If=function(n,t){GPn(this,u(n,37),t)};var don;v(U1,"NetworkSimplexLayerer",1362),m(1368,1,oc,cNe),s.pg=function(n){return u(n,37),qt(qt(qt(new or,(zr(),Xf),(Ur(),N3)),c1,pm),eo,wm)},s.If=function(n,t){T$n(this,u(n,37),t)},s.d=0,s.f=0,s.g=0,s.i=0,s.s=0,s.t=0,s.u=0,v(U1,"StretchWidthLayerer",1368),m(1369,1,Yt,Zq),s.Le=function(n,t){return b9n(u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(U1,"StretchWidthLayerer/1",1369),m(406,1,Bpe),s.eg=function(n,t,i,r,c,o){},s.tg=function(n,t,i){return QXe(this,n,t,i)},s.dg=function(){this.g=le(Ym,HQe,30,this.d,15,1),this.f=le(Ym,HQe,30,this.d,15,1)},s.fg=function(n,t){this.e[n]=le($t,ni,30,t[n].length,15,1)},s.gg=function(n,t,i){var r;r=i[n][t],r.p=t,this.e[n][t]=t},s.hg=function(n,t,i,r){u(Le(r[n][t].j,i),12).p=this.d++},s.b=0,s.c=0,s.d=0,v(Ro,"AbstractBarycenterPortDistributor",406),m(1663,1,Yt,tEe),s.Le=function(n,t){return JEn(this.a,u(n,12),u(t,12))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Ro,"AbstractBarycenterPortDistributor/lambda$0$Type",1663),m(816,1,MS,Dae),s.eg=function(n,t,i,r,c,o){},s.gg=function(n,t,i){},s.hg=function(n,t,i,r){},s.cg=function(){return!1},s.dg=function(){this.c=this.e.a,this.g=this.f.g},s.fg=function(n,t){t[n][0].c.p=n},s.ig=function(){return!1},s.ug=function(n,t,i,r){i?JHe(this,n):(KHe(this,n,r),bVe(this,n,t)),n.c.length>1&&(Fe(ze(C(_r((kn(0,n.c.length),u(n.c[0],9))),(Oe(),C7))))?yUe(n,this.d,u(this,660)):(En(),Tr(n,this.d)),fze(this.e,n))},s.jg=function(n,t,i,r){var c,o,l,f,h,b,p;for(t!=xIe(i,n.length)&&(o=n[t-(i?1:-1)],rhe(this.f,o,i?(Nc(),Io):(Nc(),ys))),c=n[t][0],p=!r||c.k==(Fn(),wr),b=Pf(n[t]),this.ug(b,p,!1,i),l=0,h=new P(b);h.a"),n0?GV(this.a,n[t-1],n[t]):!i&&t1&&(Fe(ze(C(_r((kn(0,n.c.length),u(n.c[0],9))),(Oe(),C7))))?yUe(n,this.d,this):(En(),Tr(n,this.d)),Fe(ze(C(_r((kn(0,n.c.length),u(n.c[0],9))),C7)))||fze(this.e,n))},v(Ro,"ModelOrderBarycenterHeuristic",660),m(1843,1,Yt,fEe),s.Le=function(n,t){return xLn(this.a,u(n,9),u(t,9))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Ro,"ModelOrderBarycenterHeuristic/lambda$0$Type",1843),m(1383,1,oc,fP),s.pg=function(n){var t;return u(n,37),t=L$(kon),qt(t,(zr(),eo),(Ur(),$J)),t},s.If=function(n,t){F5n((u(n,37),t))};var kon;v(Ro,"NoCrossingMinimizer",1383),m(796,406,Bpe,Roe),s.sg=function(n,t,i){var r,c,o,l,f,h,b,p,y,S,A;switch(y=this.g,i.g){case 1:{for(c=0,o=0,p=new P(n.j);p.a1&&(c.j==(Ie(),nt)?this.b[n]=!0:c.j==Yn&&n>0&&(this.b[n-1]=!0))},s.f=0,v(i1,"AllCrossingsCounter",1838),m(583,1,{},CB),s.b=0,s.d=0,v(i1,"BinaryIndexedTree",583),m(519,1,{},NT);var nye,IH;v(i1,"CrossingsCounter",519),m(1912,1,Yt,aEe),s.Le=function(n,t){return i3n(this.a,u(n,12),u(t,12))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(i1,"CrossingsCounter/lambda$0$Type",1912),m(1913,1,Yt,hEe),s.Le=function(n,t){return r3n(this.a,u(n,12),u(t,12))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(i1,"CrossingsCounter/lambda$1$Type",1913),m(1914,1,Yt,dEe),s.Le=function(n,t){return c3n(this.a,u(n,12),u(t,12))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(i1,"CrossingsCounter/lambda$2$Type",1914),m(1915,1,Yt,bEe),s.Le=function(n,t){return u3n(this.a,u(n,12),u(t,12))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(i1,"CrossingsCounter/lambda$3$Type",1915),m(1916,1,ut,gEe),s.Ad=function(n){Q9n(this.a,u(n,12))},v(i1,"CrossingsCounter/lambda$4$Type",1916),m(1917,1,zt,wEe),s.Mb=function(n){return Ggn(this.a,u(n,12))},v(i1,"CrossingsCounter/lambda$5$Type",1917),m(1918,1,ut,pEe),s.Ad=function(n){nTe(this,n)},v(i1,"CrossingsCounter/lambda$6$Type",1918),m(1919,1,ut,uCe),s.Ad=function(n){var t;C9(),I0(this.b,(t=this.a,u(n,12),t))},v(i1,"CrossingsCounter/lambda$7$Type",1919),m(823,1,Sh,bM),s.Lb=function(n){return C9(),wi(u(n,12),(me(),vs))},s.Fb=function(n){return this===n},s.Mb=function(n){return C9(),wi(u(n,12),(me(),vs))},v(i1,"CrossingsCounter/lambda$8$Type",823),m(1911,1,{},mEe),v(i1,"HyperedgeCrossingsCounter",1911),m(467,1,{35:1,467:1},uNe),s.Dd=function(n){return NEn(this,u(n,467))},s.b=0,s.c=0,s.e=0,s.f=0;var JBn=v(i1,"HyperedgeCrossingsCounter/Hyperedge",467);m(370,1,{35:1,370:1},CR),s.Dd=function(n){return SOn(this,u(n,370))},s.b=0,s.c=0;var jon=v(i1,"HyperedgeCrossingsCounter/HyperedgeCorner",370);m(518,23,{3:1,35:1,23:1,518:1},vse);var Tx,Ox,Eon=yt(i1,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",518,Tt,i4n,xmn),Son;m(1385,1,oc,OU),s.pg=function(n){return u(C(u(n,37),(me(),po)),22).Gc((Ic(),Kl))?xon:null},s.If=function(n,t){eAn(this,u(n,37),t)};var xon;v(Lc,"InteractiveNodePlacer",1385),m(1386,1,oc,CC),s.pg=function(n){return u(C(u(n,37),(me(),po)),22).Gc((Ic(),Kl))?Aon:null},s.If=function(n,t){zSn(this,u(n,37),t)};var Aon,DH,_H;v(Lc,"LinearSegmentsNodePlacer",1386),m(263,1,{35:1,263:1},poe),s.Dd=function(n){return rgn(this,u(n,263))},s.Fb=function(n){var t;return X(n,263)?(t=u(n,263),this.b==t.b):!1},s.Hb=function(){return this.b},s.Ib=function(){return"ls"+Ja(this.e)},s.a=0,s.b=0,s.c=-1,s.d=-1,s.g=0;var Mon=v(Lc,"LinearSegmentsNodePlacer/LinearSegment",263);m(1388,1,oc,LIe),s.pg=function(n){return u(C(u(n,37),(me(),po)),22).Gc((Ic(),Kl))?Con:null},s.If=function(n,t){KRn(this,u(n,37),t)},s.b=0,s.g=0;var Con;v(Lc,"NetworkSimplexPlacer",1388),m(1407,1,Yt,gv),s.Le=function(n,t){return oo(u(n,15).a,u(t,15).a)},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Lc,"NetworkSimplexPlacer/0methodref$compare$Type",1407),m(1409,1,Yt,hM),s.Le=function(n,t){return oo(u(n,15).a,u(t,15).a)},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Lc,"NetworkSimplexPlacer/1methodref$compare$Type",1409),m(644,1,{644:1},oCe);var HBn=v(Lc,"NetworkSimplexPlacer/EdgeRep",644);m(405,1,{405:1},cae),s.b=!1;var GBn=v(Lc,"NetworkSimplexPlacer/NodeRep",405);m(500,13,{3:1,4:1,20:1,31:1,56:1,13:1,18:1,16:1,59:1,500:1},mxe),v(Lc,"NetworkSimplexPlacer/Path",500),m(1389,1,{},jk),s.Kb=function(n){return u(n,17).d.i.k},v(Lc,"NetworkSimplexPlacer/Path/lambda$0$Type",1389),m(1390,1,zt,l_),s.Mb=function(n){return u(n,249)==(Fn(),dr)},v(Lc,"NetworkSimplexPlacer/Path/lambda$1$Type",1390),m(1391,1,{},f_),s.Kb=function(n){return u(n,17).d.i},v(Lc,"NetworkSimplexPlacer/Path/lambda$2$Type",1391),m(1392,1,zt,vEe),s.Mb=function(n){return UOe(cJe(u(n,9)))},v(Lc,"NetworkSimplexPlacer/Path/lambda$3$Type",1392),m(1393,1,zt,R5),s.Mb=function(n){return Gvn(u(n,12))},v(Lc,"NetworkSimplexPlacer/lambda$0$Type",1393),m(1394,1,ut,sCe),s.Ad=function(n){Pwn(this.a,this.b,u(n,12))},v(Lc,"NetworkSimplexPlacer/lambda$1$Type",1394),m(1403,1,ut,yEe),s.Ad=function(n){aTn(this.a,u(n,17))},v(Lc,"NetworkSimplexPlacer/lambda$10$Type",1403),m(1404,1,{},dM),s.Kb=function(n){return rl(),new mn(null,new yn(u(n,25).a,16))},v(Lc,"NetworkSimplexPlacer/lambda$11$Type",1404),m(1405,1,ut,kEe),s.Ad=function(n){qIn(this.a,u(n,9))},v(Lc,"NetworkSimplexPlacer/lambda$12$Type",1405),m(1406,1,{},Ek),s.Kb=function(n){return rl(),ve(u(n,124).e)},v(Lc,"NetworkSimplexPlacer/lambda$13$Type",1406),m(1408,1,{},Sk),s.Kb=function(n){return rl(),ve(u(n,124).e)},v(Lc,"NetworkSimplexPlacer/lambda$15$Type",1408),m(1410,1,zt,a_),s.Mb=function(n){return rl(),u(n,405).c.k==(Fn(),Wi)},v(Lc,"NetworkSimplexPlacer/lambda$17$Type",1410),m(1411,1,zt,h_),s.Mb=function(n){return rl(),u(n,405).c.j.c.length>1},v(Lc,"NetworkSimplexPlacer/lambda$18$Type",1411),m(1412,1,ut,JDe),s.Ad=function(n){nEn(this.c,this.b,this.d,this.a,u(n,405))},s.c=0,s.d=0,v(Lc,"NetworkSimplexPlacer/lambda$19$Type",1412),m(1395,1,{},wv),s.Kb=function(n){return rl(),new mn(null,new yn(u(n,25).a,16))},v(Lc,"NetworkSimplexPlacer/lambda$2$Type",1395),m(1413,1,ut,jEe),s.Ad=function(n){zwn(this.a,u(n,12))},s.a=0,v(Lc,"NetworkSimplexPlacer/lambda$20$Type",1413),m(1414,1,{},pv),s.Kb=function(n){return rl(),new mn(null,new yn(u(n,25).a,16))},v(Lc,"NetworkSimplexPlacer/lambda$21$Type",1414),m(1415,1,ut,EEe),s.Ad=function(n){Uwn(this.a,u(n,9))},v(Lc,"NetworkSimplexPlacer/lambda$22$Type",1415),m(1416,1,zt,d_),s.Mb=function(n){return UOe(n)},v(Lc,"NetworkSimplexPlacer/lambda$23$Type",1416),m(1417,1,{},B5),s.Kb=function(n){return rl(),new mn(null,new yn(u(n,25).a,16))},v(Lc,"NetworkSimplexPlacer/lambda$24$Type",1417),m(1418,1,zt,SEe),s.Mb=function(n){return Zgn(this.a,u(n,9))},v(Lc,"NetworkSimplexPlacer/lambda$25$Type",1418),m(1419,1,ut,lCe),s.Ad=function(n){bCn(this.a,this.b,u(n,9))},v(Lc,"NetworkSimplexPlacer/lambda$26$Type",1419),m(1420,1,zt,T6),s.Mb=function(n){return rl(),!uc(u(n,17))},v(Lc,"NetworkSimplexPlacer/lambda$27$Type",1420),m(1421,1,zt,xk),s.Mb=function(n){return rl(),!uc(u(n,17))},v(Lc,"NetworkSimplexPlacer/lambda$28$Type",1421),m(1422,1,{},xEe),s.Te=function(n,t){return Bwn(this.a,u(n,25),u(t,25))},v(Lc,"NetworkSimplexPlacer/lambda$29$Type",1422),m(1396,1,{},O6),s.Kb=function(n){return rl(),new mn(null,new A2(new Xn(Qn(Ii(u(n,9)).a.Jc(),new ee))))},v(Lc,"NetworkSimplexPlacer/lambda$3$Type",1396),m(1397,1,zt,Ak),s.Mb=function(n){return rl(),Fyn(u(n,17))},v(Lc,"NetworkSimplexPlacer/lambda$4$Type",1397),m(1398,1,ut,AEe),s.Ad=function(n){eLn(this.a,u(n,17))},v(Lc,"NetworkSimplexPlacer/lambda$5$Type",1398),m(1399,1,{},b_),s.Kb=function(n){return rl(),new mn(null,new yn(u(n,25).a,16))},v(Lc,"NetworkSimplexPlacer/lambda$6$Type",1399),m(1400,1,zt,mv),s.Mb=function(n){return rl(),u(n,9).k==(Fn(),Wi)},v(Lc,"NetworkSimplexPlacer/lambda$7$Type",1400),m(1401,1,{},g_),s.Kb=function(n){return rl(),new mn(null,new A2(new Xn(Qn(wh(u(n,9)).a.Jc(),new ee))))},v(Lc,"NetworkSimplexPlacer/lambda$8$Type",1401),m(1402,1,zt,qp),s.Mb=function(n){return rl(),Jvn(u(n,17))},v(Lc,"NetworkSimplexPlacer/lambda$9$Type",1402),m(1384,1,oc,TC),s.pg=function(n){return u(C(u(n,37),(me(),po)),22).Gc((Ic(),Kl))?Ton:null},s.If=function(n,t){ILn(u(n,37),t)};var Ton;v(Lc,"SimpleNodePlacer",1384),m(185,1,{185:1},b3),s.Ib=function(){var n;return n="",this.c==(dh(),yp)?n+=gy:this.c==Kd&&(n+=by),this.o==(Da(),Og)?n+=KZ:this.o==Qa?n+="UP":n+="BALANCED",n},v(eb,"BKAlignedLayout",185),m(509,23,{3:1,35:1,23:1,509:1},yse);var Kd,yp,Oon=yt(eb,"BKAlignedLayout/HDirection",509,Tt,c4n,Amn),Non;m(508,23,{3:1,35:1,23:1,508:1},kse);var Og,Qa,Ion=yt(eb,"BKAlignedLayout/VDirection",508,Tt,r4n,Mmn),Don;m(1664,1,{},fCe),v(eb,"BKAligner",1664),m(1667,1,{},NHe),v(eb,"BKCompactor",1667),m(652,1,{652:1},gM),s.a=0,v(eb,"BKCompactor/ClassEdge",652),m(456,1,{456:1},bxe),s.a=null,s.b=0,v(eb,"BKCompactor/ClassNode",456),m(1387,1,oc,SCe),s.pg=function(n){return u(C(u(n,37),(me(),po)),22).Gc((Ic(),Kl))?_on:null},s.If=function(n,t){aBn(this,u(n,37),t)},s.d=!1;var _on;v(eb,"BKNodePlacer",1387),m(1665,1,{},wM),s.d=0,v(eb,"NeighborhoodInformation",1665),m(1666,1,Yt,MEe),s.Le=function(n,t){return h8n(this,u(n,49),u(t,49))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(eb,"NeighborhoodInformation/NeighborComparator",1666),m(809,1,{}),v(eb,"ThresholdStrategy",809),m(1795,809,{},vxe),s.vg=function(n,t,i){return this.a.o==(Da(),Qa)?Vi:Ir},s.wg=function(){},v(eb,"ThresholdStrategy/NullThresholdStrategy",1795),m(576,1,{576:1},dCe),s.c=!1,s.d=!1,v(eb,"ThresholdStrategy/Postprocessable",576),m(1796,809,{},yxe),s.vg=function(n,t,i){var r,c,o;return c=t==i,r=this.a.a[i.p]==t,c||r?(o=n,this.a.c==(dh(),yp)?(c&&(o=YW(this,t,!0)),!isNaN(o)&&!isFinite(o)&&r&&(o=YW(this,i,!1))):(c&&(o=YW(this,t,!0)),!isNaN(o)&&!isFinite(o)&&r&&(o=YW(this,i,!1))),o):n},s.wg=function(){for(var n,t,i,r,c;this.d.b!=0;)c=u(M_e(this.d),576),r=dKe(this,c),r.a&&(n=r.a,i=Fe(this.a.f[this.a.g[c.b.p].p]),!(!i&&!uc(n)&&n.c.i.c==n.d.i.c)&&(t=gUe(this,c),t||yTe(this.e,c)));for(;this.e.a.c.length!=0;)gUe(this,u(T1e(this.e),576))},v(eb,"ThresholdStrategy/SimpleThresholdStrategy",1796),m(635,1,{635:1,188:1,196:1},Up),s.bg=function(){return lze(this)},s.og=function(){return lze(this)};var are;v(Uee,"EdgeRouterFactory",635),m(1445,1,oc,LU),s.pg=function(n){return jIn(u(n,37))},s.If=function(n,t){FLn(u(n,37),t)};var Lon,Pon,$on,Ron,Bon,tye,zon,Fon;v(Uee,"OrthogonalEdgeRouter",1445),m(1438,1,oc,ECe),s.pg=function(n){return lAn(u(n,37))},s.If=function(n,t){fRn(this,u(n,37),t)};var Jon,Hon,Gon,qon,kI,Uon;v(Uee,"PolylineEdgeRouter",1438),m(1439,1,Sh,Xp),s.Lb=function(n){return u1e(u(n,9))},s.Fb=function(n){return this===n},s.Mb=function(n){return u1e(u(n,9))},v(Uee,"PolylineEdgeRouter/1",1439),m(1851,1,zt,N6),s.Mb=function(n){return u(n,133).c==(da(),ab)},v(ya,"HyperEdgeCycleDetector/lambda$0$Type",1851),m(1852,1,{},pM),s.Xe=function(n){return u(n,133).d},v(ya,"HyperEdgeCycleDetector/lambda$1$Type",1852),m(1853,1,zt,mM),s.Mb=function(n){return u(n,133).c==(da(),ab)},v(ya,"HyperEdgeCycleDetector/lambda$2$Type",1853),m(1854,1,{},I6),s.Xe=function(n){return u(n,133).d},v(ya,"HyperEdgeCycleDetector/lambda$3$Type",1854),m(1855,1,{},D6),s.Xe=function(n){return u(n,133).d},v(ya,"HyperEdgeCycleDetector/lambda$4$Type",1855),m(1856,1,{},w_),s.Xe=function(n){return u(n,133).d},v(ya,"HyperEdgeCycleDetector/lambda$5$Type",1856),m(116,1,{35:1,116:1},yO),s.Dd=function(n){return cgn(this,u(n,116))},s.Fb=function(n){var t;return X(n,116)?(t=u(n,116),this.g==t.g):!1},s.Hb=function(){return this.g},s.Ib=function(){var n,t,i,r;for(n=new tl("{"),r=new P(this.n);r.a"+this.b+" ("+jpn(this.c)+")"},s.d=0,v(ya,"HyperEdgeSegmentDependency",133),m(515,23,{3:1,35:1,23:1,515:1},jse);var ab,Dm,Xon=yt(ya,"HyperEdgeSegmentDependency/DependencyType",515,Tt,u4n,Cmn),Kon;m(1857,1,{},CEe),v(ya,"HyperEdgeSegmentSplitter",1857),m(1858,1,{},bAe),s.a=0,s.b=0,v(ya,"HyperEdgeSegmentSplitter/AreaRating",1858),m(340,1,{340:1},WK),s.a=0,s.b=0,s.c=0,v(ya,"HyperEdgeSegmentSplitter/FreeArea",340),m(1859,1,Yt,p_),s.Le=function(n,t){return b2n(u(n,116),u(t,116))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(ya,"HyperEdgeSegmentSplitter/lambda$0$Type",1859),m(1860,1,ut,HDe),s.Ad=function(n){N6n(this.a,this.d,this.c,this.b,u(n,116))},s.b=0,v(ya,"HyperEdgeSegmentSplitter/lambda$1$Type",1860),m(1861,1,{},z5),s.Kb=function(n){return new mn(null,new yn(u(n,116).e,16))},v(ya,"HyperEdgeSegmentSplitter/lambda$2$Type",1861),m(1862,1,{},Mk),s.Kb=function(n){return new mn(null,new yn(u(n,116).j,16))},v(ya,"HyperEdgeSegmentSplitter/lambda$3$Type",1862),m(1863,1,{},m_),s.We=function(n){return ne(re(n))},v(ya,"HyperEdgeSegmentSplitter/lambda$4$Type",1863),m(653,1,{},EV),s.a=0,s.b=0,s.c=0,v(ya,"OrthogonalRoutingGenerator",653),m(1668,1,{},vM),s.Kb=function(n){return new mn(null,new yn(u(n,116).e,16))},v(ya,"OrthogonalRoutingGenerator/lambda$0$Type",1668),m(1669,1,{},yM),s.Kb=function(n){return new mn(null,new yn(u(n,116).j,16))},v(ya,"OrthogonalRoutingGenerator/lambda$1$Type",1669),m(661,1,{}),v(Xee,"BaseRoutingDirectionStrategy",661),m(1849,661,{},kxe),s.xg=function(n,t,i){var r,c,o,l,f,h,b,p,y,S,A,O,D;if(!(n.r&&!n.q))for(p=t+n.o*i,b=new P(n.n);b.axh&&(o=p,c=n,r=new Ee(y,o),Vt(l.a,r),Vw(this,l,c,r,!1),S=n.r,S&&(A=ne(re(Yu(S.e,0))),r=new Ee(A,o),Vt(l.a,r),Vw(this,l,c,r,!1),o=t+S.o*i,c=S,r=new Ee(A,o),Vt(l.a,r),Vw(this,l,c,r,!1)),r=new Ee(D,o),Vt(l.a,r),Vw(this,l,c,r,!1)))},s.yg=function(n){return n.i.n.a+n.n.a+n.a.a},s.zg=function(){return Ie(),bt},s.Ag=function(){return Ie(),Vn},v(Xee,"NorthToSouthRoutingStrategy",1849),m(1850,661,{},jxe),s.xg=function(n,t,i){var r,c,o,l,f,h,b,p,y,S,A,O,D;if(!(n.r&&!n.q))for(p=t-n.o*i,b=new P(n.n);b.axh&&(o=p,c=n,r=new Ee(y,o),Vt(l.a,r),Vw(this,l,c,r,!1),S=n.r,S&&(A=ne(re(Yu(S.e,0))),r=new Ee(A,o),Vt(l.a,r),Vw(this,l,c,r,!1),o=t-S.o*i,c=S,r=new Ee(A,o),Vt(l.a,r),Vw(this,l,c,r,!1)),r=new Ee(D,o),Vt(l.a,r),Vw(this,l,c,r,!1)))},s.yg=function(n){return n.i.n.a+n.n.a+n.a.a},s.zg=function(){return Ie(),Vn},s.Ag=function(){return Ie(),bt},v(Xee,"SouthToNorthRoutingStrategy",1850),m(1848,661,{},Exe),s.xg=function(n,t,i){var r,c,o,l,f,h,b,p,y,S,A,O,D;if(!(n.r&&!n.q))for(p=t+n.o*i,b=new P(n.n);b.axh&&(o=p,c=n,r=new Ee(o,y),Vt(l.a,r),Vw(this,l,c,r,!0),S=n.r,S&&(A=ne(re(Yu(S.e,0))),r=new Ee(o,A),Vt(l.a,r),Vw(this,l,c,r,!0),o=t+S.o*i,c=S,r=new Ee(o,A),Vt(l.a,r),Vw(this,l,c,r,!0)),r=new Ee(o,D),Vt(l.a,r),Vw(this,l,c,r,!0)))},s.yg=function(n){return n.i.n.b+n.n.b+n.a.b},s.zg=function(){return Ie(),nt},s.Ag=function(){return Ie(),Yn},v(Xee,"WestToEastRoutingStrategy",1848),m(812,1,{},fge),s.Ib=function(){return Ja(this.a)},s.b=0,s.c=!1,s.d=!1,s.f=0,v(lm,"NubSpline",812),m(410,1,{410:1},YUe,x_e),v(lm,"NubSpline/PolarCP",410),m(1440,1,oc,kHe),s.pg=function(n){return YAn(u(n,37))},s.If=function(n,t){ORn(this,u(n,37),t)};var Von,Yon,Qon,Won,Zon;v(lm,"SplineEdgeRouter",1440),m(273,1,{273:1},ZR),s.Ib=function(){return this.a+" ->("+this.c+") "+this.b},s.c=0,v(lm,"SplineEdgeRouter/Dependency",273),m(454,23,{3:1,35:1,23:1,454:1},Ese);var hb,X3,esn=yt(lm,"SplineEdgeRouter/SideToProcess",454,Tt,o4n,Tmn),nsn;m(1441,1,zt,p1),s.Mb=function(n){return rS(),!u(n,132).o},v(lm,"SplineEdgeRouter/lambda$0$Type",1441),m(1442,1,{},bd),s.Xe=function(n){return rS(),u(n,132).v+1},v(lm,"SplineEdgeRouter/lambda$1$Type",1442),m(1443,1,ut,aCe),s.Ad=function(n){Xvn(this.a,this.b,u(n,49))},v(lm,"SplineEdgeRouter/lambda$2$Type",1443),m(1444,1,ut,hCe),s.Ad=function(n){Kvn(this.a,this.b,u(n,49))},v(lm,"SplineEdgeRouter/lambda$3$Type",1444),m(132,1,{35:1,132:1},rqe,wge),s.Dd=function(n){return ugn(this,u(n,132))},s.b=0,s.e=!1,s.f=0,s.g=0,s.j=!1,s.k=!1,s.n=0,s.o=!1,s.p=!1,s.q=!1,s.s=0,s.u=0,s.v=0,s.F=0,v(lm,"SplineSegment",132),m(457,1,{457:1},Kp),s.a=0,s.b=!1,s.c=!1,s.d=!1,s.e=!1,s.f=0,v(lm,"SplineSegment/EdgeInformation",457),m(1167,1,{},kM),v(X1,twe,1167),m(1168,1,Yt,v_),s.Le=function(n,t){return STn(u(n,120),u(t,120))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(X1,eQe,1168),m(1166,1,{},LAe),v(X1,"MrTree",1166),m(398,23,{3:1,35:1,23:1,398:1,188:1,196:1},m$),s.bg=function(){return Mqe(this)},s.og=function(){return Mqe(this)};var LH,Nx,Ix,Dx,iye=yt(X1,"TreeLayoutPhases",398,Tt,l6n,Omn),tsn;m(1082,214,ep,sNe),s.kf=function(n,t){var i,r,c,o,l,f,h,b;for(Fe(ze(ke(n,(Mu(),Cye))))||qT((i=new dj((Rb(),new v0(n))),i)),l=t.dh(Yee),l.Tg("build tGraph",1),f=(h=new ZT,Pu(h,n),he(h,(Ti(),Lx),n),b=new wt,u_n(n,h,b),E_n(n,h,b),h),l.Ug(),l=t.dh(Yee),l.Tg("Split graph",1),o=h_n(this.a,f),l.Ug(),c=new P(o);c.a"+Yb(this.c):"e_"+Ni(this)},v(NS,"TEdge",65),m(120,150,{3:1,120:1,105:1,150:1},ZT),s.Ib=function(){var n,t,i,r,c;for(c=null,r=St(this.b,0);r.b!=r.d.c;)i=u(jt(r),40),c+=(i.c==null||i.c.length==0?"n_"+i.g:"n_"+i.c)+` `;for(t=St(this.a,0);t.b!=t.d.c;)n=u(jt(t),65),c+=(n.b&&n.c?Yb(n.b)+"->"+Yb(n.c):"e_"+Ni(n))+` -`;return c};var qBn=v(NS,"TGraph",120);m(633,494,{3:1,494:1,633:1,105:1,150:1}),v(NS,"TShape",633),m(40,633,{3:1,494:1,40:1,633:1,105:1,150:1},tQ),s.Ib=function(){return Yb(this)};var PH=v(NS,"TNode",40);m(236,1,Zh,S1),s.Ic=function(n){cc(this,n)},s.Jc=function(){var n;return n=St(this.a.d,0),new Cv(n)},v(NS,"TNode/2",236),m(334,1,Fr,Cv),s.Nb=function(n){Zr(this,n)},s.Pb=function(){return u(jt(this.a),65).c},s.Ob=function(){return WC(this.a)},s.Qb=function(){OY(this.a)},v(NS,"TNode/2/1",334),m(1893,1,Mi,vo),s.If=function(n,t){uBn(this,u(n,120),t)},v(go,"CompactionProcessor",1893),m(1894,1,Yt,DEe),s.Le=function(n,t){return I7n(this.a,u(n,40),u(t,40))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(go,"CompactionProcessor/lambda$0$Type",1894),m(1895,1,zt,gCe),s.Mb=function(n){return K5n(this.b,this.a,u(n,49))},s.a=0,s.b=0,v(go,"CompactionProcessor/lambda$1$Type",1895),m(1904,1,Yt,Ml),s.Le=function(n,t){return F3n(u(n,40),u(t,40))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(go,"CompactionProcessor/lambda$10$Type",1904),m(1905,1,Yt,Tk),s.Le=function(n,t){return fpn(u(n,40),u(t,40))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(go,"CompactionProcessor/lambda$11$Type",1905),m(1906,1,Yt,F5),s.Le=function(n,t){return J3n(u(n,40),u(t,40))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(go,"CompactionProcessor/lambda$12$Type",1906),m(1896,1,zt,_Ee),s.Mb=function(n){return Ywn(this.a,u(n,49))},s.a=0,v(go,"CompactionProcessor/lambda$2$Type",1896),m(1897,1,zt,LEe),s.Mb=function(n){return Qwn(this.a,u(n,49))},s.a=0,v(go,"CompactionProcessor/lambda$3$Type",1897),m(1898,1,zt,vv),s.Mb=function(n){return u(n,40).c.indexOf(_F)==-1},v(go,"CompactionProcessor/lambda$4$Type",1898),m(1899,1,{},PEe),s.Kb=function(n){return Byn(this.a,u(n,40))},s.a=0,v(go,"CompactionProcessor/lambda$5$Type",1899),m(Q0,1,{},$Ee),s.Kb=function(n){return Z9n(this.a,u(n,40))},s.a=0,v(go,"CompactionProcessor/lambda$6$Type",Q0),m(1901,1,Yt,REe),s.Le=function(n,t){return o9n(this.a,u(n,240),u(t,240))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(go,"CompactionProcessor/lambda$7$Type",1901),m(1902,1,Yt,BEe),s.Le=function(n,t){return s9n(this.a,u(n,40),u(t,40))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(go,"CompactionProcessor/lambda$8$Type",1902),m(1903,1,Yt,Ok),s.Le=function(n,t){return apn(u(n,40),u(t,40))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(go,"CompactionProcessor/lambda$9$Type",1903),m(1891,1,Mi,_6),s.If=function(n,t){tDn(u(n,120),t)},v(go,"DirectionProcessor",1891),m(1883,1,Mi,lNe),s.If=function(n,t){j_n(this,u(n,120),t)},v(go,"FanProcessor",1883),m(1251,1,Mi,J5),s.If=function(n,t){wXe(u(n,120),t)},v(go,"GraphBoundsProcessor",1251),m(1252,1,{},eU),s.We=function(n){return u(n,40).e.a},v(go,"GraphBoundsProcessor/lambda$0$Type",1252),m(1253,1,{},Bs),s.We=function(n){return u(n,40).e.b},v(go,"GraphBoundsProcessor/lambda$1$Type",1253),m(1254,1,{},jM),s.We=function(n){return Ign(u(n,40))},v(go,"GraphBoundsProcessor/lambda$2$Type",1254),m(1255,1,{},EM),s.We=function(n){return Dgn(u(n,40))},v(go,"GraphBoundsProcessor/lambda$3$Type",1255),m(264,23,{3:1,35:1,23:1,264:1,196:1},mw),s.bg=function(){switch(this.g){case 0:return new $xe;case 1:return new lNe;case 2:return new Pxe;case 3:return new xM;case 4:return new k_;case 8:return new y_;case 5:return new _6;case 6:return new sh;case 7:return new vo;case 9:return new J5;case 10:return new el;default:throw R(new qn(tee+(this.f!=null?this.f:""+this.g)))}};var rye,cye,uye,oye,sye,lye,fye,aye,hye,dye,hre,UBn=yt(go,iee,264,Tt,sze,Nmn),isn;m(1890,1,Mi,y_),s.If=function(n,t){rRn(u(n,120),t)},v(go,"LevelCoordinatesProcessor",1890),m(1888,1,Mi,k_),s.If=function(n,t){ANn(this,u(n,120),t)},s.a=0,v(go,"LevelHeightProcessor",1888),m(1889,1,Zh,nU),s.Ic=function(n){cc(this,n)},s.Jc=function(){return En(),v9(),g7},v(go,"LevelHeightProcessor/1",1889),m(1884,1,Mi,Pxe),s.If=function(n,t){BIn(this,u(n,120),t)},v(go,"LevelProcessor",1884),m(1885,1,zt,SM),s.Mb=function(n){return Fe(ze(C(u(n,40),(Ti(),db))))},v(go,"LevelProcessor/lambda$0$Type",1885),m(1886,1,Mi,xM),s.If=function(n,t){_Cn(this,u(n,120),t)},s.a=0,v(go,"NeighborsProcessor",1886),m(1887,1,Zh,AM),s.Ic=function(n){cc(this,n)},s.Jc=function(){return En(),v9(),g7},v(go,"NeighborsProcessor/1",1887),m(1892,1,Mi,sh),s.If=function(n,t){y_n(this,u(n,120),t)},s.a=0,v(go,"NodePositionProcessor",1892),m(1882,1,Mi,$xe),s.If=function(n,t){cPn(this,u(n,120),t)},v(go,"RootProcessor",1882),m(1907,1,Mi,el),s.If=function(n,t){jSn(u(n,120),t)},v(go,"Untreeifyer",1907),m(385,23,{3:1,35:1,23:1,385:1},lK);var jI,dre,bye,gye=yt($N,"EdgeRoutingMode",385,Tt,iyn,Imn),rsn,EI,P7,bre,wye,pye,gre,wre,mye,pre,vye,mre,_x,vre,$H,RH,Vf,Sa,$7,Lx,Px,Vd,yye,csn,yre,db,SI,xI;m(846,1,Ua,MC),s.tf=function(n){en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Jpe),""),YQe),"Turns on Tree compaction which decreases the size of the whole tree by placing nodes of multiple levels in one large level"),($n(),!1)),(lg(),xr)),Qi),rn((vh(),Cn))))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Hpe),""),"Edge End Texture Length"),"Should be set to the length of the texture at the end of an edge. This value can be used to improve the Edge Routing."),7),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Gpe),""),"Tree Level"),"The index for the tree level the node is in"),ke(0)),dc),jr),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,qpe),""),YQe),"When set to a positive number this option will force the algorithm to place the node to the specified position within the trees layer if weighting is set to constraint"),ke(-1)),dc),jr),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Upe),""),"Weighting of Nodes"),"Which weighting to use when computing a node order."),Eye),Bi),Lye),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Xpe),""),"Edge Routing Mode"),"Chooses an Edge Routing algorithm."),kye),Bi),gye),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Kpe),""),"Search Order"),"Which search order to use when computing a spanning tree."),jye),Bi),$ye),rn(Cn)))),zVe((new hP,n))};var usn,osn,ssn,kye,lsn,fsn,jye,asn,hsn,Eye;v($N,"MrTreeMetaDataProvider",846),m(990,1,Ua,hP),s.tf=function(n){zVe(n)};var dsn,Sye,xye,kp,Aye,Mye,kre,bsn,gsn,wsn,psn,msn,vsn,ysn,Cye,Tye,Oye,ksn,K3,BH,Nye,jsn,Iye,jre,Esn,Ssn,xsn,Dye,Asn,Dh,_ye;v($N,"MrTreeOptions",990),m(991,1,{},Nk),s.uf=function(){var n;return n=new sNe,n},s.vf=function(n){},v($N,"MrTreeOptions/MrtreeFactory",991),m(353,23,{3:1,35:1,23:1,353:1},v$);var Ere,zH,Sre,xre,Lye=yt($N,"OrderWeighting",353,Tt,d6n,Dmn),Msn;m(425,23,{3:1,35:1,23:1,425:1},Sse);var Pye,Are,$ye=yt($N,"TreeifyingOrder",425,Tt,s4n,_mn),Csn;m(1446,1,oc,DU),s.pg=function(n){return u(n,120),Tsn},s.If=function(n,t){s7n(this,u(n,120),t)};var Tsn;v("org.eclipse.elk.alg.mrtree.p1treeify","DFSTreeifyer",1446),m(1447,1,oc,lP),s.pg=function(n){return u(n,120),Osn},s.If=function(n,t){HIn(this,u(n,120),t)};var Osn;v(Z8,"NodeOrderer",1447),m(1454,1,{},tU),s.rd=function(n){return aIe(n)},v(Z8,"NodeOrderer/0methodref$lambda$6$Type",1454),m(1448,1,zt,x_),s.Mb=function(n){return H4(),Fe(ze(C(u(n,40),(Ti(),db))))},v(Z8,"NodeOrderer/lambda$0$Type",1448),m(1449,1,zt,A_),s.Mb=function(n){return H4(),u(C(u(n,40),(Mu(),K3)),15).a<0},v(Z8,"NodeOrderer/lambda$1$Type",1449),m(1450,1,zt,FEe),s.Mb=function(n){return V8n(this.a,u(n,40))},v(Z8,"NodeOrderer/lambda$2$Type",1450),m(1451,1,zt,zEe),s.Mb=function(n){return zyn(this.a,u(n,40))},v(Z8,"NodeOrderer/lambda$3$Type",1451),m(1452,1,Yt,OM),s.Le=function(n,t){return b8n(u(n,40),u(t,40))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Z8,"NodeOrderer/lambda$4$Type",1452),m(1453,1,zt,M_),s.Mb=function(n){return H4(),u(C(u(n,40),(Ti(),wre)),15).a!=0},v(Z8,"NodeOrderer/lambda$5$Type",1453),m(1455,1,oc,_U),s.pg=function(n){return u(n,120),Nsn},s.If=function(n,t){VDn(this,u(n,120),t)},s.b=0;var Nsn;v("org.eclipse.elk.alg.mrtree.p3place","NodePlacer",1455),m(1456,1,oc,AC),s.pg=function(n){return u(n,120),Isn},s.If=function(n,t){ODn(u(n,120),t)};var Isn,XBn=v(Qs,"EdgeRouter",1456);m(1458,1,Yt,Ik),s.Le=function(n,t){return oo(u(n,15).a,u(t,15).a)},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/0methodref$compare$Type",1458),m(1463,1,{},MM),s.We=function(n){return ne(re(n))},v(Qs,"EdgeRouter/1methodref$doubleValue$Type",1463),m(1465,1,Yt,uw),s.Le=function(n,t){return ji(ne(re(n)),ne(re(t)))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/2methodref$compare$Type",1465),m(1467,1,Yt,Dk),s.Le=function(n,t){return ji(ne(re(n)),ne(re(t)))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/3methodref$compare$Type",1467),m(1469,1,{},L6),s.We=function(n){return ne(re(n))},v(Qs,"EdgeRouter/4methodref$doubleValue$Type",1469),m(1471,1,Yt,CM),s.Le=function(n,t){return ji(ne(re(n)),ne(re(t)))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/5methodref$compare$Type",1471),m(1473,1,Yt,TM),s.Le=function(n,t){return ji(ne(re(n)),ne(re(t)))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/6methodref$compare$Type",1473),m(1457,1,{},j_),s.Kb=function(n){return P1(),u(C(u(n,40),(Mu(),Dh)),15)},v(Qs,"EdgeRouter/lambda$0$Type",1457),m(1468,1,{},E_),s.Kb=function(n){return Epn(u(n,40))},v(Qs,"EdgeRouter/lambda$11$Type",1468),m(1470,1,{},pCe),s.Kb=function(n){return qvn(this.b,this.a,u(n,40))},s.a=0,s.b=0,v(Qs,"EdgeRouter/lambda$13$Type",1470),m(1472,1,{},wCe),s.Kb=function(n){return Apn(this.b,this.a,u(n,40))},s.a=0,s.b=0,v(Qs,"EdgeRouter/lambda$15$Type",1472),m(1474,1,Yt,S_),s.Le=function(n,t){return eSn(u(n,65),u(t,65))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/lambda$17$Type",1474),m(1475,1,Yt,iU),s.Le=function(n,t){return nSn(u(n,65),u(t,65))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/lambda$18$Type",1475),m(1476,1,Yt,C_),s.Le=function(n,t){return iSn(u(n,65),u(t,65))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/lambda$19$Type",1476),m(1459,1,zt,JEe),s.Mb=function(n){return E4n(this.a,u(n,40))},s.a=0,v(Qs,"EdgeRouter/lambda$2$Type",1459),m(1477,1,Yt,T_),s.Le=function(n,t){return tSn(u(n,65),u(t,65))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/lambda$20$Type",1477),m(1460,1,Yt,O_),s.Le=function(n,t){return _vn(u(n,40),u(t,40))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/lambda$3$Type",1460),m(1461,1,Yt,NM),s.Le=function(n,t){return Lvn(u(n,40),u(t,40))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/lambda$4$Type",1461),m(1462,1,{},N_),s.Kb=function(n){return Spn(u(n,40))},v(Qs,"EdgeRouter/lambda$5$Type",1462),m(1464,1,{},mCe),s.Kb=function(n){return Uvn(this.b,this.a,u(n,40))},s.a=0,s.b=0,v(Qs,"EdgeRouter/lambda$7$Type",1464),m(1466,1,{},vCe),s.Kb=function(n){return xpn(this.b,this.a,u(n,40))},s.a=0,s.b=0,v(Qs,"EdgeRouter/lambda$9$Type",1466),m(662,1,{662:1},fHe),s.e=0,s.f=!1,s.g=!1,v(Qs,"MultiLevelEdgeNodeNodeGap",662),m(1864,1,Yt,I_),s.Le=function(n,t){return P4n(u(n,240),u(t,240))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"MultiLevelEdgeNodeNodeGap/lambda$0$Type",1864),m(1865,1,Yt,D_),s.Le=function(n,t){return $4n(u(n,240),u(t,240))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"MultiLevelEdgeNodeNodeGap/lambda$1$Type",1865);var V3;m(487,23,{3:1,35:1,23:1,487:1,188:1,196:1},xse),s.bg=function(){return KFe(this)},s.og=function(){return KFe(this)};var FH,Y3,Rye=yt(Vpe,"RadialLayoutPhases",487,Tt,l4n,Lmn),Dsn;m(1083,214,ep,RAe),s.kf=function(n,t){var i,r,c,o,l,f;if(i=UUe(this,n),t.Tg("Radial layout",i.c.length),Fe(ze(je(n,(q0(),Vye))))||qT((r=new dj((Rb(),new v0(n))),r)),f=ZAn(n),Ei(n,(Gv(),V3),f),!f)throw R(new qn("The given graph is not a tree!"));for(c=ne(re(je(n,GH))),c==0&&(c=yqe(n)),Ei(n,GH,c),l=new P(UUe(this,n));l.a=3)for(fe=u(K(te,0),26),_e=u(K(te,1),26),o=0;o+2=fe.f+_e.f+p||_e.f>=be.f+fe.f+p){on=!0;break}else++o;else on=!0;if(!on){for(S=te.i,f=new st(te);f.e!=f.i.gc();)l=u(ft(f),26),Ei(l,(Xt(),RI),ke(S)),--S;jKe(n,new s4),t.Ug();return}for(i=(zT(this.a),aa(this.a,(ez(),$x),u(je(n,A6e),188)),aa(this.a,qH,u(je(n,y6e),188)),aa(this.a,Rre,u(je(n,E6e),188)),Fse(this.a,(Tn=new or,qt(Tn,$x,(Ez(),Fre)),qt(Tn,qH,zre),Fe(ze(je(n,m6e)))&&qt(Tn,$x,Jre),Fe(ze(je(n,p6e)))&&qt(Tn,$x,Bre),Tn)),uN(this.a,n)),b=1/i.c.length,O=new P(i);O.a0&&wFe((Qn(t-1,n.length),n.charCodeAt(t-1)),hQe);)--t;if(r>=t)throw R(new qn("The given string does not contain any numbers."));if(c=nm((Qr(r,t,n.length),n.substr(r,t-r)),`,|;|\r| -`),c.length!=2)throw R(new qn("Exactly two numbers are expected, "+c.length+" were found."));try{this.a=K2(V2(c[0])),this.b=K2(V2(c[1]))}catch(o){throw o=sr(o),X(o,131)?(i=o,R(new qn(dQe+i))):R(o)}},s.Ib=function(){return"("+this.a+","+this.b+")"},s.a=0,s.b=0;var Lr=v(NN,"KVector",8);m(78,66,{3:1,4:1,20:1,31:1,56:1,18:1,66:1,16:1,78:1,414:1},xs,XP,IOe),s.Nc=function(){return Okn(this)},s.ag=function(n){var t,i,r,c,o,l;r=nm(n,`,|;|\\(|\\)|\\[|\\]|\\{|\\}| | | -`),qs(this);try{for(i=0,o=0,c=0,l=0;i0&&(o%2==0?c=K2(r[i]):l=K2(r[i]),o>0&&o%2!=0&&Vt(this,new Se(c,l)),++o),++i}catch(f){throw f=sr(f),X(f,131)?(t=f,R(new qn("The given string does not match the expected format for vectors."+t))):R(f)}},s.Ib=function(){var n,t,i;for(n=new tl("("),t=St(this,0);t.b!=t.d.c;)i=u(jt(t),8),Kt(n,i.a+","+i.b),t.b!=t.d.c&&(n.a+="; ");return(n.a+=")",n).a};var l9e=v(NN,"KVectorChain",78);m(256,23,{3:1,35:1,23:1,256:1},Bj);var lce,nG,tG,NI,II,iG,f9e=yt(Oo,"Alignment",256,Tt,N9n,svn),bfn;m(975,1,Ua,NC),s.tf=function(n){cKe(n)};var a9e,fce,gfn,h9e,d9e,wfn,b9e,pfn,mfn,g9e,w9e,vfn;v(Oo,"BoxLayouterOptions",975),m(976,1,{},UM),s.uf=function(){var n;return n=new bL,n},s.vf=function(n){},v(Oo,"BoxLayouterOptions/BoxFactory",976),m(299,23,{3:1,35:1,23:1,299:1},zj);var qx,ace,Ux,Xx,Kx,hce,dce=yt(Oo,"ContentAlignment",299,Tt,I9n,lvn),yfn;m(689,1,Ua,OC),s.tf=function(n){en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,mWe),""),"Layout Algorithm"),"Select a specific layout algorithm."),(lg(),Gy)),He),rn((vh(),Cn))))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,vWe),""),"Resolved Layout Algorithm"),"Meta data associated with the selected algorithm."),Za),YBn),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,ppe),""),"Alignment"),"Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm."),p9e),Bi),f9e),rn(fr)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,U8),""),"Aspect Ratio"),"The desired aspect ratio of the drawing, that is the quotient of width by height."),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,N2e),""),"Bend Points"),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),Za),l9e),rn(xa)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,OF),""),"Content Alignment"),"Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option."),v9e),Hy),dce),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,PN),""),"Debug Mode"),"Whether additional debug information shall be generated."),($n(),!1)),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Jee),""),"Direction"),"Overall direction of edges: horizontal (right / left) or vertical (down / up)."),y9e),Bi),Yx),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,LN),""),"Edge Routing"),"What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline."),E9e),Bi),Mce),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,T2e),""),"Expand Nodes"),"If active, nodes are expanded to fill the area of their parent."),!1),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,TF),""),"Hierarchy Handling"),"Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."),x9e),Bi),b8e),Ci(Cn,F(z(Wa,1),Ee,160,0,[fr]))))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,sm),""),"Padding"),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),P9e),Za),jve),Ci(Cn,F(z(Wa,1),Ee,160,0,[fr]))))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,ES),""),"Interactive"),"Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible."),!1),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,IF),""),"interactive Layout"),"Whether the graph should be changeable interactively and by setting constraints"),!1),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,SS),""),"Omit Node Micro Layout"),"Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout."),!1),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,ZZ),""),"Port Constraints"),"Defines constraints of the position of the ports of a node."),F9e),Bi),p8e),rn(fr)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,NF),""),"Position"),"The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."),Za),Lr),Ci(fr,F(z(Wa,1),Ee,160,0,[Yd,Q1]))))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,xN),""),"Priority"),"Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used."),dc),jr),Ci(fr,F(z(Wa,1),Ee,160,0,[xa]))))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,fF),""),"Randomization Seed"),"Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time)."),dc),jr),rn(Cn)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,jS),""),"Separate Connected Components"),"Whether each connected component should be processed separately."),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Cpe),""),"Junction Points"),"This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order."),C9e),Za),l9e),rn(xa)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Ipe),""),"Comment Box"),"Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related."),!1),xr),Qi),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Dpe),""),"Hypernode"),"Whether the node should be handled as a hypernode."),!1),xr),Qi),rn(fr)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,EBn),""),"Label Manager"),"Label managers can shorten labels upon a layout algorithm's request."),Za),tzn),Ci(Cn,F(z(Wa,1),Ee,160,0,[Q1]))))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,yWe),""),"Softwrapping Fuzziness"),"Determines the amount of fuzziness to be used when performing softwrapping on labels. The value expresses the percent of overhang that is permitted for each line. If the next line would take up less space than this threshold, it is appended to the current line instead of being placed in a new line."),0),ec),gr),rn(Q1)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Lpe),""),"Margins"),"Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."),T9e),Za),kve),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,gpe),""),"No Layout"),"No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."),!1),xr),Qi),Ci(fr,F(z(Wa,1),Ee,160,0,[xa,Yd,Q1]))))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,kWe),""),"Scale Factor"),"The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."),1),ec),gr),rn(fr)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,jWe),""),"Child Area Width"),"The width of the area occupied by the laid out children of a node."),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,EWe),""),"Child Area Height"),"The height of the area occupied by the laid out children of a node."),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,AN),""),dWe),"Turns topdown layout on and off. If this option is enabled, hierarchical layout will be computed first for the root node and then for its children recursively. Layouts are then scaled down to fit the area provided by their parents. Graphs must follow a certain structure for topdown layout to work properly. {@link TopdownNodeTypes.PARALLEL_NODE} nodes must have children of type {@link TopdownNodeTypes.HIERARCHICAL_NODE} and must define {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} for their children. Furthermore they need to be laid out using an algorithm that is a {@link TopdownLayoutProvider}. Hierarchical nodes can also be parents of other hierarchical nodes and can optionally use a {@link TopdownSizeApproximator} to dynamically set sizes during topdown layout. In this case {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} should be set on the node itself rather than the parent. The values are then used by the size approximator as base values. Hierarchical nodes require the layout option {@link nodeSize.fixedGraphSize} to be true to prevent the algorithm used there from resizing the hierarchical node. This option is not supported if 'Hierarchy Handling' is set to 'INCLUDE_CHILDREN'"),!1),xr),Qi),rn(Cn)))),qi(n,AN,np,null),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,SWe),""),"Animate"),"Whether the shift from the old layout to the new computed layout shall be animated."),!0),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,xWe),""),"Animation Time Factor"),"Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."),ke(100)),dc),jr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,AWe),""),"Layout Ancestors"),"Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process."),!1),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,MWe),""),"Maximal Animation Time"),"The maximal time for animations, in milliseconds."),ke(4e3)),dc),jr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,CWe),""),"Minimal Animation Time"),"The minimal time for animations, in milliseconds."),ke(400)),dc),jr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,TWe),""),"Progress Bar"),"Whether a progress bar shall be displayed during layout computations."),!1),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,OWe),""),"Validate Graph"),"Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!1),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,NWe),""),"Validate Options"),"Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!0),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,IWe),""),"Zoom to Fit"),"Whether the zoom level shall be set to view the whole diagram after layout."),!1),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,O2e),"box"),"Box Layout Mode"),"Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better."),m9e),Bi),O8e),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,DWe),"json"),"Shape Coords"),"For layouts transferred into JSON graphs, specify the coordinate system to be used for nodes, ports, and labels of nodes and ports."),M9e),Bi),y8e),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,_We),"json"),"Edge Coords"),"For layouts transferred into JSON graphs, specify the coordinate system to be used for edge route points and edge labels."),A9e),Bi),n8e),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,ipe),Ka),"Comment Comment Spacing"),"Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing."),10),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,rpe),Ka),"Comment Node Spacing"),"Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing."),10),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,cpe),Ka),"Components Spacing"),"Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."),20),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,upe),Ka),"Edge Spacing"),"Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines."),10),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,WZ),Ka),"Edge Label Spacing"),"The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."),2),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Fee),Ka),"Edge Node Spacing"),"Spacing to be preserved between nodes and edges."),10),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,ope),Ka),"Label Spacing"),"Determines the amount of space to be left between two labels of the same graph element."),0),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,fpe),Ka),"Label Node Spacing"),"Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."),5),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,spe),Ka),"Horizontal spacing between Label and Port"),"Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,lpe),Ka),"Vertical spacing between Label and Port"),"Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,om),Ka),"Node Spacing"),"The minimal distance to be preserved between each two nodes."),20),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,ape),Ka),"Node Self Loop Spacing"),"Spacing to be preserved between a node and its self loops."),10),ec),gr),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,hpe),Ka),"Port Spacing"),"Spacing between pairs of ports of the same node."),10),ec),gr),Ci(Cn,F(z(Wa,1),Ee,160,0,[fr]))))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,dpe),Ka),"Individual Spacing"),"Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent."),Za),wan),Ci(fr,F(z(Wa,1),Ee,160,0,[xa,Yd,Q1]))))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Ppe),Ka),"Additional Port Space"),"Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border."),Q9e),Za),kve),rn(Cn)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,Gee),$We),"Layout Partition"),"Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction)."),dc),jr),Ci(Cn,F(z(Wa,1),Ee,160,0,[fr]))))),qi(n,Gee,Hee,Ifn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Hee),$We),"Layout Partitioning"),"Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle."),$9e),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,ype),RWe),"Node Label Padding"),"Define padding for node labels that are placed inside of a node."),N9e),Za),jve),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,K8),RWe),"Node Label Placement"),"Hints for where node labels are to be placed; if empty, the node label's position is not modified."),I9e),Hy),$c),Ci(fr,F(z(Wa,1),Ee,160,0,[Q1]))))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Epe),zF),"Port Alignment"),"Defines the default port distribution for a node. May be overridden for each side individually."),B9e),Bi),eA),rn(fr)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,Spe),zF),"Port Alignment (North)"),"Defines how ports on the northern side are placed, overriding the node's general port alignment."),Bi),eA),rn(fr)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,xpe),zF),"Port Alignment (South)"),"Defines how ports on the southern side are placed, overriding the node's general port alignment."),Bi),eA),rn(fr)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,Ape),zF),"Port Alignment (West)"),"Defines how ports on the western side are placed, overriding the node's general port alignment."),Bi),eA),rn(fr)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,Mpe),zF),"Port Alignment (East)"),"Defines how ports on the eastern side are placed, overriding the node's general port alignment."),Bi),eA),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,k3),gne),"Node Size Constraints"),"What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed."),D9e),Hy),iA),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,py),gne),"Node Size Options"),"Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications."),L9e),Hy),k8e),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,my),gne),"Node Size Minimum"),"The minimal size to which a node can be reduced."),_9e),Za),Lr),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,X8),gne),"Fixed Graph Size"),"By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so."),!1),xr),Qi),rn(Cn)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Ope),zee),"Edge Label Placement"),"Gives a hint on where to put edge labels."),k9e),Bi),t8e),rn(Q1)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,aF),zee),"Inline Edge Labels"),"If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."),!1),xr),Qi),rn(Q1)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,SBn),"font"),"Font Name"),"Font name used for a label."),Gy),He),rn(Q1)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,LWe),"font"),"Font Size"),"Font size used for a label."),dc),jr),rn(Q1)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,_pe),wne),"Port Anchor Offset"),"The offset to the port position where connections shall be attached."),Za),Lr),rn(Yd)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,Npe),wne),"Port Index"),"The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."),dc),jr),rn(Yd)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,wpe),wne),"Port Side"),"The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."),G9e),Bi),xc),rn(Yd)))),en(n,new qe(We(Qe(Ze(Xe(Ye(Ke(Ve(new Ge,bpe),wne),"Port Border Offset"),"The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."),ec),gr),rn(Yd)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,V8),_2e),"Port Label Placement"),"Decides on a placement method for port labels; if empty, the node label's position is not modified."),J9e),Hy),fG),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,kpe),_2e),"Port Labels Next to Port"),"Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE."),!1),xr),Qi),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,jpe),_2e),"Treat Port Labels as Group"),"If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port."),!0),xr),Qi),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,dne),r7),"Number of size categories"),"Defines the number of categories to use for the FIXED_INTEGER_RATIO_BOXES size approximator."),ke(3)),dc),jr),rn(Cn)))),qi(n,dne,bne,Gfn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,I2e),r7),"Weight of a node containing children for determining the graph size"),"When determining the graph size for the size categorisation, this value determines how many times a node containing children is weighted more than a simple node. For example setting this value to four would result in a graph containing a simple node and a hierarchical node to be counted as having a size of five."),ke(4)),dc),jr),rn(Cn)))),qi(n,I2e,dne,null),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,MN),r7),"Topdown Scale Factor"),"The scaling factor to be applied to the nodes laid out within the node in recursive topdown layout. The difference to 'Scale Factor' is that the node itself is not scaled. This value has to be set on hierarchical nodes."),1),ec),gr),rn(Cn)))),qi(n,MN,np,Ffn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,bne),r7),"Topdown Size Approximator"),"The size approximator to be used to set sizes of hierarchical nodes during topdown layout. The default value is null, which results in nodes keeping whatever size is defined for them e.g. through parent parallel node or by manually setting the size."),null),Za),QBn),rn(fr)))),qi(n,bne,np,Jfn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,CN),r7),"Topdown Hierarchical Node Width"),"The fixed size of a hierarchical node when using topdown layout. If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself."),150),ec),gr),Ci(Cn,F(z(Wa,1),Ee,160,0,[fr]))))),qi(n,CN,np,null),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,TN),r7),"Topdown Hierarchical Node Aspect Ratio"),"The fixed aspect ratio of a hierarchical node when using topdown layout. Default is 1/sqrt(2). If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself."),1.414),ec),gr),Ci(Cn,F(z(Wa,1),Ee,160,0,[fr]))))),qi(n,TN,np,null),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,np),r7),"Topdown Node Type"),"The different node types used for topdown layout. If the node type is set to {@link TopdownNodeTypes.PARALLEL_NODE} the algorithm must be set to a {@link TopdownLayoutProvider} such as {@link TopdownPacking}. The {@link nodeSize.fixedGraphSize} option is technically only required for hierarchical nodes."),null),Bi),E8e),rn(fr)))),qi(n,np,X8,null),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,D2e),r7),"Topdown Scale Cap"),"Determines the upper limit for the topdown scale factor. The default value is 1.0 which ensures that nested children never end up appearing larger than their parents in terms of unit sizes such as the font size. If the limit is larger, nodes will fully utilize the available space, but it is counteriniuitive for inner nodes to have a larger scale than outer nodes."),1),ec),gr),rn(Cn)))),qi(n,D2e,np,zfn),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,mpe),BWe),"Activate Inside Self Loops"),"Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."),!1),xr),Qi),rn(fr)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,vpe),BWe),"Inside Self Loop"),"Whether a self loop should be routed inside a node instead of around that node."),!1),xr),Qi),rn(xa)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,Tpe),"edge"),"Edge Thickness"),"The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it."),1),ec),gr),rn(xa)))),en(n,new qe(We(Qe(Ze(an(Xe(Ye(Ke(Ve(new Ge,PWe),"edge"),"Edge Type"),"The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations."),S9e),Bi),s8e),rn(xa)))),Oj(n,new P4(Sj(b9(d9(new d0,Rn),"Layered"),'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.'))),Oj(n,new P4(Sj(b9(d9(new d0,"org.eclipse.elk.orthogonal"),"Orthogonal"),`Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia '86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.`))),Oj(n,new P4(Sj(b9(d9(new d0,$o),"Force"),"Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984."))),Oj(n,new P4(Sj(b9(d9(new d0,"org.eclipse.elk.circle"),"Circle"),"Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph."))),Oj(n,new P4(Sj(b9(d9(new d0,QQe),"Tree"),"Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type."))),Oj(n,new P4(Sj(b9(d9(new d0,"org.eclipse.elk.planar"),"Planar"),"Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable."))),Oj(n,new P4(Sj(b9(d9(new d0,Gl),"Radial"),"Radial layout algorithms usually position the nodes of the graph on concentric circles."))),HXe((new BU,n)),cKe((new NC,n)),gXe((new zU,n))};var qy,kfn,p9e,B7,jfn,Efn,m9e,Lm,Pm,Sfn,DI,v9e,_I,Ng,y9e,bce,gce,k9e,j9e,E9e,xfn,S9e,Afn,W3,x9e,Mfn,LI,wce,PI,pce,Cfn,A9e,Tfn,M9e,Z3,C9e,z7,T9e,O9e,N9e,e5,I9e,Ig,D9e,$m,n5,_9e,bb,L9e,rG,$I,s1,P9e,Ofn,$9e,Nfn,Ifn,R9e,B9e,mce,vce,yce,kce,z9e,Ps,Vx,F9e,jce,Ece,Rm,J9e,H9e,t5,G9e,Uy,RI,Sce,Bm,Dfn,xce,_fn,Lfn,Pfn,$fn,q9e,U9e,Xy,X9e,cG,K9e,V9e,Qd,Rfn,Y9e,Q9e,W9e,F7,zm,J7,Ky,Bfn,zfn,uG,Ffn,oG,Jfn,Hfn,Gfn,qfn;v(Oo,"CoreOptions",689),m(86,23,{3:1,35:1,23:1,86:1},wT);var eh,Zc,ru,nh,Vl,Yx=yt(Oo,"Direction",86,Tt,q6n,cvn),Ufn;m(278,23,{3:1,35:1,23:1,278:1},j$);var sG,BI,Z9e,e8e,n8e=yt(Oo,"EdgeCoords",278,Tt,b6n,uvn),Xfn;m(279,23,{3:1,35:1,23:1,279:1},pK);var H7,Fm,G7,t8e=yt(Oo,"EdgeLabelPlacement",279,Tt,ayn,ovn),Kfn;m(222,23,{3:1,35:1,23:1,222:1},E$);var q7,zI,Vy,Ace,Mce=yt(Oo,"EdgeRouting",222,Tt,g6n,rvn),Vfn;m(327,23,{3:1,35:1,23:1,327:1},Fj);var i8e,r8e,c8e,u8e,Cce,o8e,s8e=yt(Oo,"EdgeType",327,Tt,L9n,gvn),Yfn;m(973,1,Ua,BU),s.tf=function(n){HXe(n)};var l8e,f8e,a8e,h8e,Qfn,d8e,Qx;v(Oo,"FixedLayouterOptions",973),m(974,1,{},XM),s.uf=function(){var n;return n=new ow,n},s.vf=function(n){},v(Oo,"FixedLayouterOptions/FixedFactory",974),m(347,23,{3:1,35:1,23:1,347:1},mK);var Wd,lG,Wx,b8e=yt(Oo,"HierarchyHandling",347,Tt,hyn,wvn),Wfn,QBn=Gi(Oo,"ITopdownSizeApproximator");m(292,23,{3:1,35:1,23:1,292:1},S$);var l1,gb,FI,JI,Zfn=yt(Oo,"LabelSide",292,Tt,w6n,bvn),ean;m(96,23,{3:1,35:1,23:1,96:1},Dv);var W1,Yf,wf,Qf,pl,Wf,pf,f1,Zf,$c=yt(Oo,"NodeLabelPlacement",96,Tt,P8n,fvn),nan;m(257,23,{3:1,35:1,23:1,257:1},pT);var g8e,Zx,wb,w8e,HI,eA=yt(Oo,"PortAlignment",257,Tt,i9n,avn),tan;m(102,23,{3:1,35:1,23:1,102:1},Jj);var Dg,to,a1,U7,th,pb,p8e=yt(Oo,"PortConstraints",102,Tt,_9n,hvn),ian;m(280,23,{3:1,35:1,23:1,280:1},Hj);var nA,tA,Z1,GI,mb,Yy,fG=yt(Oo,"PortLabelPlacement",280,Tt,D9n,dvn),ran;m(64,23,{3:1,35:1,23:1,64:1},mT);var et,Kn,Yl,Ql,Wo,zo,ih,ea,ks,hs,mo,js,Zo,es,na,ml,vl,mf,bt,ju,Vn,xc=yt(Oo,"PortSide",64,Tt,U6n,yvn),can;m(977,1,Ua,zU),s.tf=function(n){gXe(n)};var uan,oan,m8e,san,lan;v(Oo,"RandomLayouterOptions",977),m(978,1,{},KM),s.uf=function(){var n;return n=new WM,n},s.vf=function(n){},v(Oo,"RandomLayouterOptions/RandomFactory",978),m(300,23,{3:1,35:1,23:1,300:1},vK);var qI,Tce,v8e,y8e=yt(Oo,"ShapeCoords",300,Tt,dyn,kvn),fan;m(380,23,{3:1,35:1,23:1,380:1},x$);var Jm,UI,XI,_g,iA=yt(Oo,"SizeConstraint",380,Tt,m6n,jvn),aan;m(266,23,{3:1,35:1,23:1,266:1},_v);var KI,aG,X7,Oce,VI,rA,hG,dG,bG,k8e=yt(Oo,"SizeOptions",266,Tt,H8n,mvn),han;m(281,23,{3:1,35:1,23:1,281:1},yK);var Hm,j8e,gG,E8e=yt(Oo,"TopdownNodeTypes",281,Tt,byn,vvn),dan;m(288,23,JF);var S8e,Nce,x8e,A8e,YI=yt(Oo,"TopdownSizeApproximator",288,Tt,p6n,pvn);m(969,288,JF,wIe),s.Sg=function(n){return ZJe(n)},yt(Oo,"TopdownSizeApproximator/1",969,YI,null,null),m(970,288,JF,WIe),s.Sg=function(n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,_e,on,cn,Tn;for(t=u(je(n,(Xt(),Bm)),144),_e=(j0(),A=new mj,A),QO(_e,n),on=new wt,o=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));o.e!=o.i.gc();)r=u(ft(o),26),V=(S=new mj,S),Lz(V,_e),QO(V,r),Tn=ZJe(r),vw(V,k.Math.max(r.g,Tn.a),k.Math.max(r.f,Tn.b)),Ko(on.f,r,V);for(c=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));c.e!=c.i.gc();)for(r=u(ft(c),26),p=new st((!r.e&&(r.e=new Nn(pr,r,7,4)),r.e));p.e!=p.i.gc();)b=u(ft(p),85),be=u(bu(Xc(on.f,r)),26),fe=u(zn(on,K((!b.c&&(b.c=new Nn(mt,b,5,8)),b.c),0)),26),te=(y=new kv,y),Et((!te.b&&(te.b=new Nn(mt,te,4,7)),te.b),be),Et((!te.c&&(te.c=new Nn(mt,te,5,8)),te.c),fe),_z(te,Fi(be)),QO(te,b);D=u(GT(t.f),214);try{D.kf(_e,new b0),Wfe(t.f,D)}catch(In){throw In=sr(In),X(In,101)?(O=In,R(O)):R(In)}return ba(_e,Pm)||ba(_e,Lm)||sZ(_e),h=ne(re(je(_e,Pm))),f=ne(re(je(_e,Lm))),l=h/f,i=ne(re(je(_e,zm)))*k.Math.sqrt((!_e.a&&(_e.a=new we(Ft,_e,10,11)),_e.a).i),cn=u(je(_e,s1),104),q=cn.b+cn.c+1,B=cn.d+cn.a+1,new Se(k.Math.max(q,i),k.Math.max(B,i/l))},yt(Oo,"TopdownSizeApproximator/2",970,YI,null,null),m(971,288,JF,S_e),s.Sg=function(n){var t,i,r,c,o,l;return i=ne(re(je(n,(Xt(),zm)))),t=i/ne(re(je(n,F7))),r=H_n(n),o=u(je(n,s1),104),c=ne(re(Le(Qd))),Fi(n)&&(c=ne(re(je(Fi(n),Qd)))),l=A1(new Se(i,t),r),pi(l,new Se(-(o.b+o.c)-c,-(o.d+o.a)-c))},yt(Oo,"TopdownSizeApproximator/3",971,YI,null,null),m(972,288,JF,ZIe),s.Sg=function(n){var t,i,r,c,o,l,f,h,b,p;for(l=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));l.e!=l.i.gc();)o=u(ft(l),26),je(o,(Xt(),oG))!=null&&(!o.a&&(o.a=new we(Ft,o,10,11)),!!o.a)&&(!o.a&&(o.a=new we(Ft,o,10,11)),o.a).i>0?(i=u(je(o,oG),521),p=i.Sg(o),b=u(je(o,s1),104),vw(o,k.Math.max(o.g,p.a+b.b+b.c),k.Math.max(o.f,p.b+b.d+b.a))):(!o.a&&(o.a=new we(Ft,o,10,11)),o.a).i!=0&&vw(o,ne(re(je(o,zm))),ne(re(je(o,zm)))/ne(re(je(o,F7))));t=u(je(n,(Xt(),Bm)),144),h=u(GT(t.f),214);try{h.kf(n,new b0),Wfe(t.f,h)}catch(y){throw y=sr(y),X(y,101)?(f=y,R(f)):R(y)}return Ei(n,qy,c7),bPe(n),sZ(n),c=ne(re(je(n,Pm))),r=ne(re(je(n,Lm))),new Se(c,r)},yt(Oo,"TopdownSizeApproximator/4",972,YI,null,null);var ban;m(345,1,{852:1},s4),s.Tg=function(n,t){return hGe(this,n,t)},s.Ug=function(){RGe(this)},s.Vg=function(){return this.q},s.Wg=function(){return this.f?IR(this.f):null},s.Xg=function(){return IR(this.a)},s.Yg=function(){return this.p},s.Zg=function(){return!1},s.$g=function(){return this.n},s._g=function(){return this.p!=null&&!this.b},s.ah=function(n){var t;this.n&&(t=n,Te(this.f,t))},s.bh=function(n,t){var i,r;this.n&&n&&Iyn(this,(i=new dDe,r=FW(i,n),C$n(i),r),(RB(),Dce))},s.dh=function(n){var t;return this.b?null:(t=v8n(this,this.g),Vt(this.a,t),t.i=this,this.d=n,t)},s.eh=function(n){n>0&&!this.b&&Vhe(this,n)},s.b=!1,s.c=0,s.d=-1,s.e=null,s.f=null,s.g=-1,s.j=!1,s.k=!1,s.n=!1,s.o=0,s.q=0,s.r=0,v($u,"BasicProgressMonitor",345),m(706,214,ep,bL),s.kf=function(n,t){jKe(n,t)},v($u,"BoxLayoutProvider",706),m(965,1,Yt,eSe),s.Le=function(n,t){return CNn(this,u(n,26),u(t,26))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},s.a=!1,v($u,"BoxLayoutProvider/1",965),m(167,1,{167:1},gB,NOe),s.Ib=function(){return this.c?Jbe(this.c):Ja(this.b)},v($u,"BoxLayoutProvider/Group",167),m(326,23,{3:1,35:1,23:1,326:1},A$);var M8e,C8e,T8e,Ice,O8e=yt($u,"BoxLayoutProvider/PackingMode",326,Tt,v6n,Evn),gan;m(966,1,Yt,VM),s.Le=function(n,t){return R5n(u(n,167),u(t,167))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v($u,"BoxLayoutProvider/lambda$0$Type",966),m(967,1,Yt,zk),s.Le=function(n,t){return C5n(u(n,167),u(t,167))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v($u,"BoxLayoutProvider/lambda$1$Type",967),m(968,1,Yt,YM),s.Le=function(n,t){return T5n(u(n,167),u(t,167))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v($u,"BoxLayoutProvider/lambda$2$Type",968),m(1338,1,{829:1},gL),s.Lg=function(n,t){return e$(),!X(t,174)||DAe((X4(),u(n,174)),t)},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type",1338),m(1339,1,ct,nSe),s.Ad=function(n){Nkn(this.a,u(n,147))},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type",1339),m(1340,1,ct,QM),s.Ad=function(n){u(n,105),e$()},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type",1340),m(1344,1,ct,tSe),s.Ad=function(n){i7n(this.a,u(n,105))},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type",1344),m(1342,1,zt,CCe),s.Mb=function(n){return dkn(this.a,this.b,u(n,147))},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type",1342),m(1341,1,zt,TCe),s.Mb=function(n){return Mpn(this.a,this.b,u(n,829))},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type",1341),m(1343,1,ct,OCe),s.Ad=function(n){A3n(this.a,this.b,u(n,147))},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type",1343),m(930,1,{},wL),s.Kb=function(n){return xTe(n)},s.Fb=function(n){return this===n},v($u,"ElkUtil/lambda$0$Type",930),m(931,1,ct,NCe),s.Ad=function(n){ITn(this.a,this.b,u(n,85))},s.a=0,s.b=0,v($u,"ElkUtil/lambda$1$Type",931),m(932,1,ct,ICe),s.Ad=function(n){Cbn(this.a,this.b,u(n,170))},s.a=0,s.b=0,v($u,"ElkUtil/lambda$2$Type",932),m(933,1,ct,DCe),s.Ad=function(n){jwn(this.a,this.b,u(n,157))},s.a=0,s.b=0,v($u,"ElkUtil/lambda$3$Type",933),m(934,1,ct,iSe),s.Ad=function(n){Vvn(this.a,u(n,372))},v($u,"ElkUtil/lambda$4$Type",934),m(331,1,{35:1,331:1},ibn),s.Dd=function(n){return Xwn(this,u(n,242))},s.Fb=function(n){var t;return X(n,331)?(t=u(n,331),this.a==t.a):!1},s.Hb=function(){return lc(this.a)},s.Ib=function(){return this.a+" (exclusive)"},s.a=0,v($u,"ExclusiveBounds/ExclusiveLowerBound",331),m(1088,214,ep,ow),s.kf=function(n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,_e,on,cn;for(t.Tg("Fixed Layout",1),o=u(je(n,(Xt(),j9e)),222),y=0,S=0,V=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));V.e!=V.i.gc();){for(B=u(ft(V),26),cn=u(je(B,(BB(),Qx)),8),cn&&(Il(B,cn.a,cn.b),u(je(B,f8e),182).Gc((Vs(),Jm))&&(A=u(je(B,h8e),8),A.a>0&&A.b>0&&Yw(B,A.a,A.b,!0,!0))),y=k.Math.max(y,B.i+B.g),S=k.Math.max(S,B.j+B.f),b=new st((!B.n&&(B.n=new we(Eu,B,1,7)),B.n));b.e!=b.i.gc();)f=u(ft(b),157),cn=u(je(f,Qx),8),cn&&Il(f,cn.a,cn.b),y=k.Math.max(y,B.i+f.i+f.g),S=k.Math.max(S,B.j+f.j+f.f);for(fe=new st((!B.c&&(B.c=new we($s,B,9,9)),B.c));fe.e!=fe.i.gc();)for(be=u(ft(fe),125),cn=u(je(be,Qx),8),cn&&Il(be,cn.a,cn.b),_e=B.i+be.i,on=B.j+be.j,y=k.Math.max(y,_e+be.g),S=k.Math.max(S,on+be.f),h=new st((!be.n&&(be.n=new we(Eu,be,1,7)),be.n));h.e!=h.i.gc();)f=u(ft(h),157),cn=u(je(f,Qx),8),cn&&Il(f,cn.a,cn.b),y=k.Math.max(y,_e+f.i+f.g),S=k.Math.max(S,on+f.j+f.f);for(c=new Un(Yn(U0(B).a.Jc(),new ee));ht(c);)i=u(rt(c),85),p=_Ve(i),y=k.Math.max(y,p.a),S=k.Math.max(S,p.b);for(r=new Un(Yn(MW(B).a.Jc(),new ee));ht(r);)i=u(rt(r),85),Fi(dW(i))!=n&&(p=_Ve(i),y=k.Math.max(y,p.a),S=k.Math.max(S,p.b))}if(o==(z1(),q7))for(q=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));q.e!=q.i.gc();)for(B=u(ft(q),26),r=new Un(Yn(U0(B).a.Jc(),new ee));ht(r);)i=u(rt(r),85),l=C_n(i),l.b==0?Ei(i,Z3,null):Ei(i,Z3,l);Fe(ze(je(n,(BB(),a8e))))||(te=u(je(n,Qfn),104),D=y+te.b+te.c,O=S+te.d+te.a,Yw(n,D,O,!0,!0)),t.Ug()},v($u,"FixedLayoutProvider",1088),m(379,150,{3:1,414:1,379:1,105:1,150:1},z6,jRe),s.ag=function(n){var t,i,r,c,o,l,f,h,b;if(n)try{for(h=nm(n,";,;"),o=h,l=0,f=o.length;l>16&yr|t^r<<16},s.Jc=function(){return new rSe(this)},s.Ib=function(){return this.a==null&&this.b==null?"pair(null,null)":this.a==null?"pair(null,"+fu(this.b)+")":this.b==null?"pair("+fu(this.a)+",null)":"pair("+fu(this.a)+","+fu(this.b)+")"},v($u,"Pair",49),m(979,1,Fr,rSe),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return!this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)},s.Pb=function(){if(!this.c&&!this.b&&this.a.a!=null)return this.b=!0,this.a.a;if(!this.c&&this.a.b!=null)return this.c=!0,this.a.b;throw R(new hu)},s.Qb=function(){throw this.c&&this.a.b!=null?this.a.b=null:this.b&&this.a.a!=null&&(this.a.a=null),R(new is)},s.b=!1,s.c=!1,v($u,"Pair/1",979),m(1078,214,ep,WM),s.kf=function(n,t){var i,r,c,o,l;if(t.Tg("Random Layout",1),(!n.a&&(n.a=new we(Ft,n,10,11)),n.a).i==0){t.Ug();return}o=u(je(n,(bde(),san)),15),o&&o.a!=0?c=new VR(o.a):c=new yQ,i=QC(re(je(n,uan))),l=QC(re(je(n,lan))),r=u(je(n,oan),104),V$n(n,c,i,l,r),t.Ug()},v($u,"RandomLayoutProvider",1078),m(240,1,{240:1},eV),s.Fb=function(n){return Ku(this.a,u(n,240).a)&&Ku(this.b,u(n,240).b)&&Ku(this.c,u(n,240).c)},s.Hb=function(){return zB(F(z(Mr,1),On,1,5,[this.a,this.b,this.c]))},s.Ib=function(){return"("+this.a+To+this.b+To+this.c+")"},v($u,"Triple",240);var van;m(550,1,{}),s.Jf=function(){return new Se(this.f.i,this.f.j)},s.mf=function(n){return k_e(n,(Xt(),Ps))?je(this.f,yan):je(this.f,n)},s.Kf=function(){return new Se(this.f.g,this.f.f)},s.Lf=function(){return this.g},s.nf=function(n){return ba(this.f,n)},s.Mf=function(n){Os(this.f,n.a),Ns(this.f,n.b)},s.Nf=function(n){Pw(this.f,n.a),Lw(this.f,n.b)},s.Of=function(n){this.g=n},s.g=0;var yan;v(_S,"ElkGraphAdapters/AbstractElkGraphElementAdapter",550),m(552,1,{837:1},NP),s.Pf=function(){var n,t;if(!this.b)for(this.b=JR(NV(this.a).i),t=new st(NV(this.a));t.e!=t.i.gc();)n=u(ft(t),157),Te(this.b,new MX(n));return this.b},s.b=null,v(_S,"ElkGraphAdapters/ElkEdgeAdapter",552),m(260,550,{},v0),s.Qf=function(){return vHe(this)},s.a=null,v(_S,"ElkGraphAdapters/ElkGraphAdapter",260),m(630,550,{187:1},MX),v(_S,"ElkGraphAdapters/ElkLabelAdapter",630),m(551,550,{685:1},q$),s.Pf=function(){return txn(this)},s.Tf=function(){var n;return n=u(je(this.f,(Xt(),z7)),140),!n&&(n=new pj),n},s.Vf=function(){return ixn(this)},s.Xf=function(n){var t;t=new QK(n),Ei(this.f,(Xt(),z7),t)},s.Yf=function(n){Ei(this.f,(Xt(),s1),new Yle(n))},s.Rf=function(){return this.d},s.Sf=function(){var n,t;if(!this.a)for(this.a=new Oe,t=new Un(Yn(MW(u(this.f,26)).a.Jc(),new ee));ht(t);)n=u(rt(t),85),Te(this.a,new NP(n));return this.a},s.Uf=function(){var n,t;if(!this.c)for(this.c=new Oe,t=new Un(Yn(U0(u(this.f,26)).a.Jc(),new ee));ht(t);)n=u(rt(t),85),Te(this.c,new NP(n));return this.c},s.Wf=function(){return OR(u(this.f,26)).i!=0||Fe(ze(u(this.f,26).mf((Xt(),LI))))},s.Zf=function(){e8n(this,(Rb(),van))},s.a=null,s.b=null,s.c=null,s.d=null,s.e=null,v(_S,"ElkGraphAdapters/ElkNodeAdapter",551),m(1249,550,{836:1},cSe),s.Pf=function(){return fxn(this)},s.Sf=function(){var n,t;if(!this.a)for(this.a=Jh(u(this.f,125).gh().i),t=new st(u(this.f,125).gh());t.e!=t.i.gc();)n=u(ft(t),85),Te(this.a,new NP(n));return this.a},s.Uf=function(){var n,t;if(!this.c)for(this.c=Jh(u(this.f,125).hh().i),t=new st(u(this.f,125).hh());t.e!=t.i.gc();)n=u(ft(t),85),Te(this.c,new NP(n));return this.c},s.$f=function(){return u(u(this.f,125).mf((Xt(),t5)),64)},s._f=function(){var n,t,i,r,c,o,l,f;for(r=_a(u(this.f,125)),i=new st(u(this.f,125).hh());i.e!=i.i.gc();)for(n=u(ft(i),85),f=new st((!n.c&&(n.c=new Nn(mt,n,5,8)),n.c));f.e!=f.i.gc();){if(l=u(ft(f),84),P2(iu(l),r))return!0;if(iu(l)==r&&Fe(ze(je(n,(Xt(),wce)))))return!0}for(t=new st(u(this.f,125).gh());t.e!=t.i.gc();)for(n=u(ft(t),85),o=new st((!n.b&&(n.b=new Nn(mt,n,4,7)),n.b));o.e!=o.i.gc();)if(c=u(ft(o),84),P2(iu(c),r))return!0;return!1},s.a=null,s.b=null,s.c=null,v(_S,"ElkGraphAdapters/ElkPortAdapter",1249),m(1250,1,Yt,mL),s.Le=function(n,t){return yDn(u(n,125),u(t,125))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(_S,"ElkGraphAdapters/PortComparator",1250);var vb=Gi(ql,"EObject"),K7=Gi(x3,JWe),yl=Gi(x3,HWe),QI=Gi(x3,GWe),WI=Gi(x3,"ElkShape"),mt=Gi(x3,qWe),pr=Gi(x3,P2e),$i=Gi(x3,UWe),ZI=Gi(ql,XWe),cA=Gi(ql,"EFactory"),kan,_ce=Gi(ql,KWe),Aa=Gi(ql,"EPackage"),Pr,jan,Ean,_8e,wG,San,L8e,P8e,$8e,h1,xan,Aan,Eu=Gi(x3,$2e),Ft=Gi(x3,R2e),$s=Gi(x3,B2e);m(93,1,VWe),s.qh=function(){return this.rh(),null},s.rh=function(){return null},s.sh=function(){return this.rh(),!1},s.th=function(){return!1},s.uh=function(n){hi(this,n)},v(ky,"BasicNotifierImpl",93),m(100,93,ZWe),s.Vh=function(){return Fs(this)},s.vh=function(n,t){return n},s.wh=function(){throw R(new _t)},s.xh=function(n){var t;return t=Oc(u(Mn(this.Ah(),this.Ch()),19)),this.Mh().Qh(this,t.n,t.f,n)},s.yh=function(n,t){throw R(new _t)},s.zh=function(n,t,i){return hl(this,n,t,i)},s.Ah=function(){var n;return this.wh()&&(n=this.wh().Lk(),n)?n:this.fi()},s.Bh=function(){return xW(this)},s.Ch=function(){throw R(new _t)},s.Dh=function(){var n,t;return t=this.Xh().Mk(),!t&&this.wh().Rk(t=(Ij(),n=dae(kh(this.Ah())),n==null?Jce:new ST(this,n))),t},s.Eh=function(n,t){return n},s.Fh=function(n){var t;return t=n.nk(),t?n.Jj():Ji(this.Ah(),n)},s.Gh=function(){var n;return n=this.wh(),n?n.Ok():null},s.Hh=function(){return this.wh()?this.wh().Lk():null},s.Ih=function(n,t,i){return sz(this,n,t,i)},s.Jh=function(n){return H9(this,n)},s.Kh=function(n,t){return aY(this,n,t)},s.Lh=function(){var n;return n=this.wh(),!!n&&n.Pk()},s.Mh=function(){throw R(new _t)},s.Nh=function(){return iz(this)},s.Oh=function(n,t,i,r){return Z4(this,n,t,r)},s.Ph=function(n,t,i){var r;return r=u(Mn(this.Ah(),t),69),r.uk().xk(this,this.ei(),t-this.gi(),n,i)},s.Qh=function(n,t,i,r){return LR(this,n,t,r)},s.Rh=function(n,t,i){var r;return r=u(Mn(this.Ah(),t),69),r.uk().yk(this,this.ei(),t-this.gi(),n,i)},s.Sh=function(){return!!this.wh()&&!!this.wh().Nk()},s.Th=function(n){return LQ(this,n)},s.Uh=function(n){return P_e(this,n)},s.Wh=function(n){return pVe(this,n)},s.Xh=function(){throw R(new _t)},s.Yh=function(){return this.wh()?this.wh().Nk():null},s.Zh=function(){return iz(this)},s.$h=function(n,t){yW(this,n,t)},s._h=function(n){this.Xh().Qk(n)},s.ai=function(n){this.Xh().Tk(n)},s.bi=function(n){this.Xh().Sk(n)},s.ci=function(n,t){var i,r,c,o;return o=this.Gh(),o&&n&&(t=vc(o.Cl(),this,t),o.Gl(this)),r=this.Mh(),r&&((RW(this,this.Mh(),this.Ch()).Bb&Ec)!=0?(c=r.Nh(),c&&(n?!o&&c.Gl(this):c.Fl(this))):(t=(i=this.Ch(),i>=0?this.xh(t):this.Mh().Qh(this,-1-i,null,t)),t=this.zh(null,-1,t))),this.ai(n),t},s.di=function(n){var t,i,r,c,o,l,f,h;if(i=this.Ah(),o=Ji(i,n),t=this.gi(),o>=t)return u(n,69).uk().Bk(this,this.ei(),o-t);if(o<=-1)if(l=w3((ls(),nc),i,n),l){if(Tc(),u(l,69).vk()||(l=$4(Vc(nc,l))),c=(r=this.Fh(l),u(r>=0?this.Ih(r,!0,!0):Xw(this,l,!0),163)),h=l.Gk(),h>1||h==-1)return u(u(c,219).Ql(n,!1),77)}else throw R(new qn(nb+n.ve()+pne));else if(n.Hk())return r=this.Fh(n),u(r>=0?this.Ih(r,!1,!0):Xw(this,n,!1),77);return f=new VCe(this,n),f},s.ei=function(){return khe(this)},s.fi=function(){return(C0(),Bn).S},s.gi=function(){return dt(this.fi())},s.hi=function(n){pW(this,n)},s.Ib=function(){return Ff(this)},v(Jn,"BasicEObjectImpl",100);var Man;m(117,100,{109:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1}),s.ii=function(n){var t;return t=jhe(this),t[n]},s.ji=function(n,t){var i;i=jhe(this),ir(i,n,t)},s.ki=function(n){var t;t=jhe(this),ir(t,n,null)},s.qh=function(){return u(Xn(this,4),129)},s.rh=function(){throw R(new _t)},s.sh=function(){return(this.Db&4)!=0},s.wh=function(){throw R(new _t)},s.li=function(n){Q4(this,2,n)},s.yh=function(n,t){this.Db=t<<16|this.Db&255,this.li(n)},s.Ah=function(){return Go(this)},s.Ch=function(){return this.Db>>16},s.Dh=function(){var n,t;return Ij(),t=dae(kh((n=u(Xn(this,16),29),n||this.fi()))),t==null?Jce:new ST(this,t)},s.th=function(){return(this.Db&1)==0},s.Gh=function(){return u(Xn(this,128),1996)},s.Hh=function(){return u(Xn(this,16),29)},s.Lh=function(){return(this.Db&32)!=0},s.Mh=function(){return u(Xn(this,2),52)},s.Sh=function(){return(this.Db&64)!=0},s.Xh=function(){throw R(new _t)},s.Yh=function(){return u(Xn(this,64),290)},s._h=function(n){Q4(this,16,n)},s.ai=function(n){Q4(this,128,n)},s.bi=function(n){Q4(this,64,n)},s.ei=function(){return Lo(this)},s.Db=0,v(Jn,"MinimalEObjectImpl",117),m(118,117,{109:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),s.li=function(n){this.Cb=n},s.Mh=function(){return this.Cb},v(Jn,"MinimalEObjectImpl/Container",118),m(2045,118,{109:1,343:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),s.Ih=function(n,t,i){return $de(this,n,t,i)},s.Rh=function(n,t,i){return A0e(this,n,t,i)},s.Th=function(n){return Oae(this,n)},s.$h=function(n,t){E1e(this,n,t)},s.fi=function(){return Gu(),Aan},s.hi=function(n){f1e(this,n)},s.lf=function(){return BJe(this)},s.fh=function(){return!this.o&&(this.o=new os((Gu(),h1),Zd,this,0)),this.o},s.mf=function(n){return je(this,n)},s.nf=function(n){return ba(this,n)},s.of=function(n,t){return Ei(this,n,t)},v(wg,"EMapPropertyHolderImpl",2045),m(559,118,{109:1,372:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},Jk),s.Ih=function(n,t,i){switch(n){case 0:return this.a;case 1:return this.b}return sz(this,n,t,i)},s.Th=function(n){switch(n){case 0:return this.a!=0;case 1:return this.b!=0}return LQ(this,n)},s.$h=function(n,t){switch(n){case 0:wB(this,ne(re(t)));return;case 1:pB(this,ne(re(t)));return}yW(this,n,t)},s.fi=function(){return Gu(),jan},s.hi=function(n){switch(n){case 0:wB(this,0);return;case 1:pB(this,0);return}pW(this,n)},s.Ib=function(){var n;return(this.Db&64)!=0?Ff(this):(n=new cf(Ff(this)),n.a+=" (x: ",Tv(n,this.a),n.a+=", y: ",Tv(n,this.b),n.a+=")",n.a)},s.a=0,s.b=0,v(wg,"ElkBendPointImpl",559),m(727,2045,{109:1,343:1,174:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),s.Ih=function(n,t,i){return J1e(this,n,t,i)},s.Ph=function(n,t,i){return lW(this,n,t,i)},s.Rh=function(n,t,i){return KY(this,n,t,i)},s.Th=function(n){return r1e(this,n)},s.$h=function(n,t){t0e(this,n,t)},s.fi=function(){return Gu(),San},s.hi=function(n){R1e(this,n)},s.ih=function(){return this.k},s.jh=function(){return NV(this)},s.Ib=function(){return vQ(this)},s.k=null,v(wg,"ElkGraphElementImpl",727),m(728,727,{109:1,343:1,174:1,276:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),s.Ih=function(n,t,i){return nde(this,n,t,i)},s.Th=function(n){return sde(this,n)},s.$h=function(n,t){i0e(this,n,t)},s.fi=function(){return Gu(),xan},s.hi=function(n){dde(this,n)},s.kh=function(){return this.f},s.lh=function(){return this.g},s.mh=function(){return this.i},s.nh=function(){return this.j},s.oh=function(n,t){vw(this,n,t)},s.ph=function(n,t){Il(this,n,t)},s.Ib=function(){return gW(this)},s.f=0,s.g=0,s.i=0,s.j=0,v(wg,"ElkShapeImpl",728),m(729,728,{109:1,343:1,84:1,174:1,276:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),s.Ih=function(n,t,i){return Nde(this,n,t,i)},s.Ph=function(n,t,i){return Yde(this,n,t,i)},s.Rh=function(n,t,i){return Qde(this,n,t,i)},s.Th=function(n){return v1e(this,n)},s.$h=function(n,t){fbe(this,n,t)},s.fi=function(){return Gu(),Ean},s.hi=function(n){Ade(this,n)},s.gh=function(){return!this.d&&(this.d=new Nn(pr,this,8,5)),this.d},s.hh=function(){return!this.e&&(this.e=new Nn(pr,this,7,4)),this.e},v(wg,"ElkConnectableShapeImpl",729),m(271,727,{109:1,343:1,85:1,174:1,271:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},kv),s.xh=function(n){return Ude(this,n)},s.Ih=function(n,t,i){switch(n){case 3:return T2(this);case 4:return!this.b&&(this.b=new Nn(mt,this,4,7)),this.b;case 5:return!this.c&&(this.c=new Nn(mt,this,5,8)),this.c;case 6:return!this.a&&(this.a=new we($i,this,6,6)),this.a;case 7:return $n(),!this.b&&(this.b=new Nn(mt,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new Nn(mt,this,5,8)),this.c.i<=1));case 8:return $n(),!!eS(this);case 9:return $n(),!!Uw(this);case 10:return $n(),!this.b&&(this.b=new Nn(mt,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new Nn(mt,this,5,8)),this.c.i!=0)}return J1e(this,n,t,i)},s.Ph=function(n,t,i){var r;switch(t){case 3:return this.Cb&&(i=(r=this.Db>>16,r>=0?Ude(this,i):this.Cb.Qh(this,-1-r,null,i))),Cle(this,u(n,26),i);case 4:return!this.b&&(this.b=new Nn(mt,this,4,7)),Co(this.b,n,i);case 5:return!this.c&&(this.c=new Nn(mt,this,5,8)),Co(this.c,n,i);case 6:return!this.a&&(this.a=new we($i,this,6,6)),Co(this.a,n,i)}return lW(this,n,t,i)},s.Rh=function(n,t,i){switch(t){case 3:return Cle(this,null,i);case 4:return!this.b&&(this.b=new Nn(mt,this,4,7)),vc(this.b,n,i);case 5:return!this.c&&(this.c=new Nn(mt,this,5,8)),vc(this.c,n,i);case 6:return!this.a&&(this.a=new we($i,this,6,6)),vc(this.a,n,i)}return KY(this,n,t,i)},s.Th=function(n){switch(n){case 3:return!!T2(this);case 4:return!!this.b&&this.b.i!=0;case 5:return!!this.c&&this.c.i!=0;case 6:return!!this.a&&this.a.i!=0;case 7:return!this.b&&(this.b=new Nn(mt,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new Nn(mt,this,5,8)),this.c.i<=1));case 8:return eS(this);case 9:return Uw(this);case 10:return!this.b&&(this.b=new Nn(mt,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new Nn(mt,this,5,8)),this.c.i!=0)}return r1e(this,n)},s.$h=function(n,t){switch(n){case 3:_z(this,u(t,26));return;case 4:!this.b&&(this.b=new Nn(mt,this,4,7)),kt(this.b),!this.b&&(this.b=new Nn(mt,this,4,7)),nr(this.b,u(t,18));return;case 5:!this.c&&(this.c=new Nn(mt,this,5,8)),kt(this.c),!this.c&&(this.c=new Nn(mt,this,5,8)),nr(this.c,u(t,18));return;case 6:!this.a&&(this.a=new we($i,this,6,6)),kt(this.a),!this.a&&(this.a=new we($i,this,6,6)),nr(this.a,u(t,18));return}t0e(this,n,t)},s.fi=function(){return Gu(),_8e},s.hi=function(n){switch(n){case 3:_z(this,null);return;case 4:!this.b&&(this.b=new Nn(mt,this,4,7)),kt(this.b);return;case 5:!this.c&&(this.c=new Nn(mt,this,5,8)),kt(this.c);return;case 6:!this.a&&(this.a=new we($i,this,6,6)),kt(this.a);return}R1e(this,n)},s.Ib=function(){return RKe(this)},v(wg,"ElkEdgeImpl",271),m(443,2045,{109:1,343:1,170:1,443:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},yo),s.xh=function(n){return Jde(this,n)},s.Ih=function(n,t,i){switch(n){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return!this.a&&(this.a=new mr(yl,this,5)),this.a;case 6:return L_e(this);case 7:return t?zQ(this):this.i;case 8:return t?BQ(this):this.f;case 9:return!this.g&&(this.g=new Nn($i,this,9,10)),this.g;case 10:return!this.e&&(this.e=new Nn($i,this,10,9)),this.e;case 11:return this.d}return $de(this,n,t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?Jde(this,i):this.Cb.Qh(this,-1-c,null,i))),Tle(this,u(n,85),i);case 9:return!this.g&&(this.g=new Nn($i,this,9,10)),Co(this.g,n,i);case 10:return!this.e&&(this.e=new Nn($i,this,10,9)),Co(this.e,n,i)}return o=u(Mn((r=u(Xn(this,16),29),r||(Gu(),wG)),t),69),o.uk().xk(this,Lo(this),t-dt((Gu(),wG)),n,i)},s.Rh=function(n,t,i){switch(t){case 5:return!this.a&&(this.a=new mr(yl,this,5)),vc(this.a,n,i);case 6:return Tle(this,null,i);case 9:return!this.g&&(this.g=new Nn($i,this,9,10)),vc(this.g,n,i);case 10:return!this.e&&(this.e=new Nn($i,this,10,9)),vc(this.e,n,i)}return A0e(this,n,t,i)},s.Th=function(n){switch(n){case 1:return this.j!=0;case 2:return this.k!=0;case 3:return this.b!=0;case 4:return this.c!=0;case 5:return!!this.a&&this.a.i!=0;case 6:return!!L_e(this);case 7:return!!this.i;case 8:return!!this.f;case 9:return!!this.g&&this.g.i!=0;case 10:return!!this.e&&this.e.i!=0;case 11:return this.d!=null}return Oae(this,n)},s.$h=function(n,t){switch(n){case 1:e3(this,ne(re(t)));return;case 2:n3(this,ne(re(t)));return;case 3:Wv(this,ne(re(t)));return;case 4:Zv(this,ne(re(t)));return;case 5:!this.a&&(this.a=new mr(yl,this,5)),kt(this.a),!this.a&&(this.a=new mr(yl,this,5)),nr(this.a,u(t,18));return;case 6:$Ue(this,u(t,85));return;case 7:SB(this,u(t,84));return;case 8:EB(this,u(t,84));return;case 9:!this.g&&(this.g=new Nn($i,this,9,10)),kt(this.g),!this.g&&(this.g=new Nn($i,this,9,10)),nr(this.g,u(t,18));return;case 10:!this.e&&(this.e=new Nn($i,this,10,9)),kt(this.e),!this.e&&(this.e=new Nn($i,this,10,9)),nr(this.e,u(t,18));return;case 11:Xhe(this,Pt(t));return}E1e(this,n,t)},s.fi=function(){return Gu(),wG},s.hi=function(n){switch(n){case 1:e3(this,0);return;case 2:n3(this,0);return;case 3:Wv(this,0);return;case 4:Zv(this,0);return;case 5:!this.a&&(this.a=new mr(yl,this,5)),kt(this.a);return;case 6:$Ue(this,null);return;case 7:SB(this,null);return;case 8:EB(this,null);return;case 9:!this.g&&(this.g=new Nn($i,this,9,10)),kt(this.g);return;case 10:!this.e&&(this.e=new Nn($i,this,10,9)),kt(this.e);return;case 11:Xhe(this,null);return}f1e(this,n)},s.Ib=function(){return Kqe(this)},s.b=0,s.c=0,s.d=null,s.j=0,s.k=0,v(wg,"ElkEdgeSectionImpl",443),m(161,118,{109:1,94:1,93:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1}),s.Ih=function(n,t,i){var r;return n==0?(!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab):Pl(this,n-dt(this.fi()),Mn((r=u(Xn(this,16),29),r||this.fi()),n),t,i)},s.Ph=function(n,t,i){var r,c;return t==0?(!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i)):(c=u(Mn((r=u(Xn(this,16),29),r||this.fi()),t),69),c.uk().xk(this,Lo(this),t-dt(this.fi()),n,i))},s.Rh=function(n,t,i){var r,c;return t==0?(!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i)):(c=u(Mn((r=u(Xn(this,16),29),r||this.fi()),t),69),c.uk().yk(this,Lo(this),t-dt(this.fi()),n,i))},s.Th=function(n){var t;return n==0?!!this.Ab&&this.Ab.i!=0:Ll(this,n-dt(this.fi()),Mn((t=u(Xn(this,16),29),t||this.fi()),n))},s.Wh=function(n){return Cge(this,n)},s.$h=function(n,t){var i;if(n===0){!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return}Jl(this,n-dt(this.fi()),Mn((i=u(Xn(this,16),29),i||this.fi()),n),t)},s.ai=function(n){Q4(this,128,n)},s.fi=function(){return jn(),qan},s.hi=function(n){var t;if(n===0){!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return}Fl(this,n-dt(this.fi()),Mn((t=u(Xn(this,16),29),t||this.fi()),n))},s.mi=function(){this.Bb|=1},s.ni=function(n){return oS(this,n)},s.Bb=0,v(Jn,"EModelElementImpl",161),m(710,161,{109:1,94:1,93:1,469:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1},IC),s.oi=function(n,t){return fVe(this,n,t)},s.pi=function(n){var t,i,r,c,o;if(this.a!=ol(n)||(n.Bb&256)!=0)throw R(new qn(vne+n.zb+up));for(r=tu(n);Vu(r.a).i!=0;){if(i=u(oN(r,0,(t=u(K(Vu(r.a),0),87),o=t.c,X(o,88)?u(o,29):(jn(),jf))),29),Gw(i))return c=ol(i).ti().pi(i),u(c,52)._h(n),c;r=tu(i)}return(n.D!=null?n.D:n.B)=="java.util.Map$Entry"?new gIe(n):new bfe(n)},s.qi=function(n,t){return Qw(this,n,t)},s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.a}return Pl(this,n-dt((jn(),jb)),Mn((r=u(Xn(this,16),29),r||jb),n),t,i)},s.Ph=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 1:return this.a&&(i=u(this.a,52).Qh(this,4,Aa,i)),P1e(this,u(n,241),i)}return c=u(Mn((r=u(Xn(this,16),29),r||(jn(),jb)),t),69),c.uk().xk(this,Lo(this),t-dt((jn(),jb)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 1:return P1e(this,null,i)}return c=u(Mn((r=u(Xn(this,16),29),r||(jn(),jb)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),jb)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return!!this.a}return Ll(this,n-dt((jn(),jb)),Mn((t=u(Xn(this,16),29),t||jb),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:SGe(this,u(t,241));return}Jl(this,n-dt((jn(),jb)),Mn((i=u(Xn(this,16),29),i||jb),n),t)},s.fi=function(){return jn(),jb},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:SGe(this,null);return}Fl(this,n-dt((jn(),jb)),Mn((t=u(Xn(this,16),29),t||jb),n))};var uA,R8e,Can;v(Jn,"EFactoryImpl",710),m(1018,710,{109:1,2075:1,94:1,93:1,469:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1},hU),s.oi=function(n,t){switch(n.fk()){case 12:return u(t,147).Og();case 13:return fu(t);default:throw R(new qn(u7+n.ve()+up))}},s.pi=function(n){var t,i,r,c,o,l,f,h;switch(n.G==-1&&(n.G=(t=ol(n),t?$d(t.si(),n):-1)),n.G){case 4:return o=new ZM,o;case 6:return l=new mj,l;case 7:return f=new voe,f;case 8:return r=new kv,r;case 9:return i=new Jk,i;case 10:return c=new yo,c;case 11:return h=new F6,h;default:throw R(new qn(vne+n.zb+up))}},s.qi=function(n,t){switch(n.fk()){case 13:case 12:return null;default:throw R(new qn(u7+n.ve()+up))}},v(wg,"ElkGraphFactoryImpl",1018),m(439,161,{109:1,94:1,93:1,158:1,197:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1}),s.Dh=function(){var n,t;return t=(n=u(Xn(this,16),29),dae(kh(n||this.fi()))),t==null?(Ij(),Ij(),Jce):new POe(this,t)},s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.ve()}return Pl(this,n-dt(this.fi()),Mn((r=u(Xn(this,16),29),r||this.fi()),n),t,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null}return Ll(this,n-dt(this.fi()),Mn((t=u(Xn(this,16),29),t||this.fi()),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:this.ri(Pt(t));return}Jl(this,n-dt(this.fi()),Mn((i=u(Xn(this,16),29),i||this.fi()),n),t)},s.fi=function(){return jn(),Uan},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:this.ri(null);return}Fl(this,n-dt(this.fi()),Mn((t=u(Xn(this,16),29),t||this.fi()),n))},s.ve=function(){return this.zb},s.ri=function(n){Mo(this,n)},s.Ib=function(){return LE(this)},s.zb=null,v(Jn,"ENamedElementImpl",439),m(184,439,{109:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,52:1,100:1,161:1,184:1,117:1,118:1,680:1},u_e),s.xh=function(n){return LHe(this,n)},s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return!this.rb&&(this.rb=new x2(this,Ma,this)),this.rb;case 6:return!this.vb&&(this.vb=new x4(Aa,this,6,7)),this.vb;case 7:return t?this.Db>>16==7?u(this.Cb,241):null:J_e(this)}return Pl(this,n-dt((jn(),i0)),Mn((r=u(Xn(this,16),29),r||i0),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 4:return this.sb&&(i=u(this.sb,52).Qh(this,1,cA,i)),B1e(this,u(n,469),i);case 5:return!this.rb&&(this.rb=new x2(this,Ma,this)),Co(this.rb,n,i);case 6:return!this.vb&&(this.vb=new x4(Aa,this,6,7)),Co(this.vb,n,i);case 7:return this.Cb&&(i=(c=this.Db>>16,c>=0?LHe(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,7,i)}return o=u(Mn((r=u(Xn(this,16),29),r||(jn(),i0)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),i0)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 4:return B1e(this,null,i);case 5:return!this.rb&&(this.rb=new x2(this,Ma,this)),vc(this.rb,n,i);case 6:return!this.vb&&(this.vb=new x4(Aa,this,6,7)),vc(this.vb,n,i);case 7:return hl(this,null,7,i)}return c=u(Mn((r=u(Xn(this,16),29),r||(jn(),i0)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),i0)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.yb!=null;case 3:return this.xb!=null;case 4:return!!this.sb;case 5:return!!this.rb&&this.rb.i!=0;case 6:return!!this.vb&&this.vb.i!=0;case 7:return!!J_e(this)}return Ll(this,n-dt((jn(),i0)),Mn((t=u(Xn(this,16),29),t||i0),n))},s.Wh=function(n){var t;return t=RNn(this,n),t||Cge(this,n)},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:Mo(this,Pt(t));return;case 2:OB(this,Pt(t));return;case 3:TB(this,Pt(t));return;case 4:bW(this,u(t,469));return;case 5:!this.rb&&(this.rb=new x2(this,Ma,this)),kt(this.rb),!this.rb&&(this.rb=new x2(this,Ma,this)),nr(this.rb,u(t,18));return;case 6:!this.vb&&(this.vb=new x4(Aa,this,6,7)),kt(this.vb),!this.vb&&(this.vb=new x4(Aa,this,6,7)),nr(this.vb,u(t,18));return}Jl(this,n-dt((jn(),i0)),Mn((i=u(Xn(this,16),29),i||i0),n),t)},s.bi=function(n){var t,i;if(n&&this.rb)for(i=new st(this.rb);i.e!=i.i.gc();)t=ft(i),X(t,360)&&(u(t,360).w=null);Q4(this,64,n)},s.fi=function(){return jn(),i0},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:Mo(this,null);return;case 2:OB(this,null);return;case 3:TB(this,null);return;case 4:bW(this,null);return;case 5:!this.rb&&(this.rb=new x2(this,Ma,this)),kt(this.rb);return;case 6:!this.vb&&(this.vb=new x4(Aa,this,6,7)),kt(this.vb);return}Fl(this,n-dt((jn(),i0)),Mn((t=u(Xn(this,16),29),t||i0),n))},s.mi=function(){ZQ(this)},s.si=function(){return!this.rb&&(this.rb=new x2(this,Ma,this)),this.rb},s.ti=function(){return this.sb},s.ui=function(){return this.ub},s.vi=function(){return this.xb},s.wi=function(){return this.yb},s.xi=function(n){this.ub=n},s.Ib=function(){var n;return(this.Db&64)!=0?LE(this):(n=new cf(LE(this)),n.a+=" (nsURI: ",Bc(n,this.yb),n.a+=", nsPrefix: ",Bc(n,this.xb),n.a+=")",n.a)},s.xb=null,s.yb=null,v(Jn,"EPackageImpl",184),m(556,184,{109:1,2077:1,556:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,52:1,100:1,161:1,184:1,117:1,118:1,680:1},tUe),s.q=!1,s.r=!1;var Tan=!1;v(wg,"ElkGraphPackageImpl",556),m(362,728,{109:1,343:1,174:1,157:1,276:1,362:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},ZM),s.xh=function(n){return Hde(this,n)},s.Ih=function(n,t,i){switch(n){case 7:return vae(this);case 8:return this.a}return nde(this,n,t,i)},s.Ph=function(n,t,i){var r;return t===7?(this.Cb&&(i=(r=this.Db>>16,r>=0?Hde(this,i):this.Cb.Qh(this,-1-r,null,i))),Mfe(this,u(n,174),i)):lW(this,n,t,i)},s.Rh=function(n,t,i){return t==7?Mfe(this,null,i):KY(this,n,t,i)},s.Th=function(n){switch(n){case 7:return!!vae(this);case 8:return!gn("",this.a)}return sde(this,n)},s.$h=function(n,t){switch(n){case 7:Abe(this,u(t,174));return;case 8:Ghe(this,Pt(t));return}i0e(this,n,t)},s.fi=function(){return Gu(),L8e},s.hi=function(n){switch(n){case 7:Abe(this,null);return;case 8:Ghe(this,"");return}dde(this,n)},s.Ib=function(){return HGe(this)},s.a="",v(wg,"ElkLabelImpl",362),m(206,729,{109:1,343:1,84:1,174:1,26:1,276:1,206:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},mj),s.xh=function(n){return Xde(this,n)},s.Ih=function(n,t,i){switch(n){case 9:return!this.c&&(this.c=new we($s,this,9,9)),this.c;case 10:return!this.a&&(this.a=new we(Ft,this,10,11)),this.a;case 11:return Fi(this);case 12:return!this.b&&(this.b=new we(pr,this,12,3)),this.b;case 13:return $n(),!this.a&&(this.a=new we(Ft,this,10,11)),this.a.i>0}return Nde(this,n,t,i)},s.Ph=function(n,t,i){var r;switch(t){case 9:return!this.c&&(this.c=new we($s,this,9,9)),Co(this.c,n,i);case 10:return!this.a&&(this.a=new we(Ft,this,10,11)),Co(this.a,n,i);case 11:return this.Cb&&(i=(r=this.Db>>16,r>=0?Xde(this,i):this.Cb.Qh(this,-1-r,null,i))),Gle(this,u(n,26),i);case 12:return!this.b&&(this.b=new we(pr,this,12,3)),Co(this.b,n,i)}return Yde(this,n,t,i)},s.Rh=function(n,t,i){switch(t){case 9:return!this.c&&(this.c=new we($s,this,9,9)),vc(this.c,n,i);case 10:return!this.a&&(this.a=new we(Ft,this,10,11)),vc(this.a,n,i);case 11:return Gle(this,null,i);case 12:return!this.b&&(this.b=new we(pr,this,12,3)),vc(this.b,n,i)}return Qde(this,n,t,i)},s.Th=function(n){switch(n){case 9:return!!this.c&&this.c.i!=0;case 10:return!!this.a&&this.a.i!=0;case 11:return!!Fi(this);case 12:return!!this.b&&this.b.i!=0;case 13:return!this.a&&(this.a=new we(Ft,this,10,11)),this.a.i>0}return v1e(this,n)},s.$h=function(n,t){switch(n){case 9:!this.c&&(this.c=new we($s,this,9,9)),kt(this.c),!this.c&&(this.c=new we($s,this,9,9)),nr(this.c,u(t,18));return;case 10:!this.a&&(this.a=new we(Ft,this,10,11)),kt(this.a),!this.a&&(this.a=new we(Ft,this,10,11)),nr(this.a,u(t,18));return;case 11:Lz(this,u(t,26));return;case 12:!this.b&&(this.b=new we(pr,this,12,3)),kt(this.b),!this.b&&(this.b=new we(pr,this,12,3)),nr(this.b,u(t,18));return}fbe(this,n,t)},s.fi=function(){return Gu(),P8e},s.hi=function(n){switch(n){case 9:!this.c&&(this.c=new we($s,this,9,9)),kt(this.c);return;case 10:!this.a&&(this.a=new we(Ft,this,10,11)),kt(this.a);return;case 11:Lz(this,null);return;case 12:!this.b&&(this.b=new we(pr,this,12,3)),kt(this.b);return}Ade(this,n)},s.Ib=function(){return Jbe(this)},v(wg,"ElkNodeImpl",206),m(193,729,{109:1,343:1,84:1,174:1,125:1,276:1,193:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},voe),s.xh=function(n){return Gde(this,n)},s.Ih=function(n,t,i){return n==9?_a(this):Nde(this,n,t,i)},s.Ph=function(n,t,i){var r;return t===9?(this.Cb&&(i=(r=this.Db>>16,r>=0?Gde(this,i):this.Cb.Qh(this,-1-r,null,i))),Ole(this,u(n,26),i)):Yde(this,n,t,i)},s.Rh=function(n,t,i){return t==9?Ole(this,null,i):Qde(this,n,t,i)},s.Th=function(n){return n==9?!!_a(this):v1e(this,n)},s.$h=function(n,t){if(n===9){kbe(this,u(t,26));return}fbe(this,n,t)},s.fi=function(){return Gu(),$8e},s.hi=function(n){if(n===9){kbe(this,null);return}Ade(this,n)},s.Ib=function(){return LXe(this)},v(wg,"ElkPortImpl",193);var Oan=Gi(yc,"BasicEMap/Entry");m(1091,118,{109:1,45:1,94:1,93:1,136:1,57:1,114:1,52:1,100:1,117:1,118:1},F6),s.Fb=function(n){return this===n},s.jd=function(){return this.b},s.Hb=function(){return jw(this)},s.Ai=function(n){zhe(this,u(n,147))},s.Ih=function(n,t,i){switch(n){case 0:return this.b;case 1:return this.c}return sz(this,n,t,i)},s.Th=function(n){switch(n){case 0:return!!this.b;case 1:return this.c!=null}return LQ(this,n)},s.$h=function(n,t){switch(n){case 0:zhe(this,u(t,147));return;case 1:Fhe(this,t);return}yW(this,n,t)},s.fi=function(){return Gu(),h1},s.hi=function(n){switch(n){case 0:zhe(this,null);return;case 1:Fhe(this,null);return}pW(this,n)},s.yi=function(){var n;return this.a==-1&&(n=this.b,this.a=n?Ni(n):0),this.a},s.kd=function(){return this.c},s.zi=function(n){this.a=n},s.ld=function(n){var t;return t=this.c,Fhe(this,n),t},s.Ib=function(){var n;return(this.Db&64)!=0?Ff(this):(n=new y0,Kt(Kt(Kt(n,this.b?this.b.Og():Vo),nee),Wj(this.c)),n.a)},s.a=-1,s.c=null;var Zd=v(wg,"ElkPropertyToValueMapEntryImpl",1091);m(980,1,{},Yp),v(Wr,"JsonAdapter",980),m(215,63,H1,lh),v(Wr,"JsonImportException",215),m(850,1,{},Qqe),v(Wr,"JsonImporter",850),m(884,1,{},_Ce),s.Bi=function(n){qHe(this.a,this.b,u(n,139))},v(Wr,"JsonImporter/lambda$0$Type",884),m(885,1,{},LCe),s.Bi=function(n){Cqe(this.a,this.b,u(n,139))},v(Wr,"JsonImporter/lambda$1$Type",885),m(893,1,{},uSe),s.Bi=function(n){zDe(this.a,u(n,149))},v(Wr,"JsonImporter/lambda$10$Type",893),m(895,1,{},PCe),s.Bi=function(n){gqe(this.a,this.b,u(n,139))},v(Wr,"JsonImporter/lambda$11$Type",895),m(896,1,{},$Ce),s.Bi=function(n){wqe(this.a,this.b,u(n,139))},v(Wr,"JsonImporter/lambda$12$Type",896),m(902,1,{},YDe),s.Bi=function(n){BGe(this.a,this.b,this.c,this.d,u(n,139))},v(Wr,"JsonImporter/lambda$13$Type",902),m(901,1,{},QDe),s.Bi=function(n){tKe(this.a,this.b,this.c,this.d,u(n,149))},v(Wr,"JsonImporter/lambda$14$Type",901),m(897,1,{},RCe),s.Bi=function(n){hNe(this.a,this.b,Pt(n))},v(Wr,"JsonImporter/lambda$15$Type",897),m(898,1,{},BCe),s.Bi=function(n){dNe(this.a,this.b,Pt(n))},v(Wr,"JsonImporter/lambda$16$Type",898),m(899,1,{},zCe),s.Bi=function(n){AHe(this.b,this.a,u(n,139))},v(Wr,"JsonImporter/lambda$17$Type",899),m(900,1,{},FCe),s.Bi=function(n){MHe(this.b,this.a,u(n,139))},v(Wr,"JsonImporter/lambda$18$Type",900),m(905,1,{},oSe),s.Bi=function(n){OGe(this.a,u(n,149))},v(Wr,"JsonImporter/lambda$19$Type",905),m(886,1,{},sSe),s.Bi=function(n){RHe(this.a,u(n,139))},v(Wr,"JsonImporter/lambda$2$Type",886),m(903,1,{},lSe),s.Bi=function(n){e3(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$20$Type",903),m(904,1,{},fSe),s.Bi=function(n){n3(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$21$Type",904),m(908,1,{},aSe),s.Bi=function(n){TGe(this.a,u(n,149))},v(Wr,"JsonImporter/lambda$22$Type",908),m(906,1,{},hSe),s.Bi=function(n){Wv(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$23$Type",906),m(907,1,{},dSe),s.Bi=function(n){Zv(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$24$Type",907),m(910,1,{},bSe),s.Bi=function(n){tGe(this.a,u(n,139))},v(Wr,"JsonImporter/lambda$25$Type",910),m(909,1,{},gSe),s.Bi=function(n){FDe(this.a,u(n,149))},v(Wr,"JsonImporter/lambda$26$Type",909),m(911,1,ct,JCe),s.Ad=function(n){R9n(this.b,this.a,Pt(n))},v(Wr,"JsonImporter/lambda$27$Type",911),m(912,1,ct,HCe),s.Ad=function(n){B9n(this.b,this.a,Pt(n))},v(Wr,"JsonImporter/lambda$28$Type",912),m(913,1,{},GCe),s.Bi=function(n){aUe(this.a,this.b,u(n,139))},v(Wr,"JsonImporter/lambda$29$Type",913),m(889,1,{},wSe),s.Bi=function(n){YFe(this.a,u(n,149))},v(Wr,"JsonImporter/lambda$3$Type",889),m(914,1,{},qCe),s.Bi=function(n){DUe(this.a,this.b,u(n,139))},v(Wr,"JsonImporter/lambda$30$Type",914),m(915,1,{},pSe),s.Bi=function(n){mRe(this.a,re(n))},v(Wr,"JsonImporter/lambda$31$Type",915),m(916,1,{},mSe),s.Bi=function(n){vRe(this.a,re(n))},v(Wr,"JsonImporter/lambda$32$Type",916),m(917,1,{},vSe),s.Bi=function(n){yRe(this.a,re(n))},v(Wr,"JsonImporter/lambda$33$Type",917),m(918,1,{},ySe),s.Bi=function(n){kRe(this.a,re(n))},v(Wr,"JsonImporter/lambda$34$Type",918),m(919,1,{},kSe),s.Bi=function(n){LMn(this.a,u(n,57))},v(Wr,"JsonImporter/lambda$35$Type",919),m(920,1,{},jSe),s.Bi=function(n){PMn(this.a,u(n,57))},v(Wr,"JsonImporter/lambda$36$Type",920),m(924,1,{},VDe),v(Wr,"JsonImporter/lambda$37$Type",924),m(921,1,ct,qNe),s.Ad=function(n){a7n(this.a,this.c,this.b,u(n,372))},v(Wr,"JsonImporter/lambda$38$Type",921),m(922,1,ct,UCe),s.Ad=function(n){Ygn(this.a,this.b,u(n,170))},v(Wr,"JsonImporter/lambda$39$Type",922),m(887,1,{},ESe),s.Bi=function(n){e3(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$4$Type",887),m(923,1,ct,XCe),s.Ad=function(n){Qgn(this.a,this.b,u(n,170))},v(Wr,"JsonImporter/lambda$40$Type",923),m(925,1,ct,UNe),s.Ad=function(n){h7n(this.a,this.b,this.c,u(n,8))},v(Wr,"JsonImporter/lambda$41$Type",925),m(888,1,{},SSe),s.Bi=function(n){n3(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$5$Type",888),m(892,1,{},xSe),s.Bi=function(n){QFe(this.a,u(n,149))},v(Wr,"JsonImporter/lambda$6$Type",892),m(890,1,{},ASe),s.Bi=function(n){Wv(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$7$Type",890),m(891,1,{},MSe),s.Bi=function(n){Zv(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$8$Type",891),m(894,1,{},CSe),s.Bi=function(n){iGe(this.a,u(n,139))},v(Wr,"JsonImporter/lambda$9$Type",894),m(944,1,ct,TSe),s.Ad=function(n){D4(this.a,new M2(Pt(n)))},v(Wr,"JsonMetaDataConverter/lambda$0$Type",944),m(945,1,ct,OSe),s.Ad=function(n){H3n(this.a,u(n,244))},v(Wr,"JsonMetaDataConverter/lambda$1$Type",945),m(946,1,ct,NSe),s.Ad=function(n){_4n(this.a,u(n,144))},v(Wr,"JsonMetaDataConverter/lambda$2$Type",946),m(947,1,ct,ISe),s.Ad=function(n){G3n(this.a,u(n,160))},v(Wr,"JsonMetaDataConverter/lambda$3$Type",947),m(244,23,{3:1,35:1,23:1,244:1},m4);var pG,mG,Lce,vG,yG,kG,Pce,$ce,jG=yt(EN,"GraphFeature",244,Tt,p8n,xvn),Nan;m(11,1,{35:1,147:1},ki,Pi,fn,Yr),s.Dd=function(n){return Kwn(this,u(n,147))},s.Fb=function(n){return k_e(this,n)},s.Rg=function(){return Le(this)},s.Og=function(){return this.b},s.Hb=function(){return Id(this.b)},s.Ib=function(){return this.b},v(EN,"Property",11),m(657,1,Yt,hX),s.Le=function(n,t){return Tjn(this,u(n,105),u(t,105))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(EN,"PropertyHolderComparator",657),m(698,1,Fr,roe),s.Nb=function(n){Zr(this,n)},s.Pb=function(){return H9n(this)},s.Qb=function(){AAe()},s.Ob=function(){return!!this.a},v(qF,"ElkGraphUtil/AncestorIterator",698);var B8e=Gi(yc,"EList");m(71,56,{20:1,31:1,56:1,18:1,16:1,71:1,61:1}),s._c=function(n,t){RE(this,n,t)},s.Ec=function(n){return Et(this,n)},s.ad=function(n,t){return h1e(this,n,t)},s.Fc=function(n){return nr(this,n)},s.Gi=function(){return new E4(this)},s.Hi=function(){return new ET(this)},s.Ii=function(n){return bO(this,n)},s.Ji=function(){return!0},s.Ki=function(n,t){},s.Li=function(){},s.Mi=function(n,t){gY(this,n,t)},s.Ni=function(n,t,i){},s.Oi=function(n,t){},s.Pi=function(n,t,i){},s.Fb=function(n){return mXe(this,n)},s.Hb=function(){return s1e(this)},s.Qi=function(){return!1},s.Jc=function(){return new st(this)},s.cd=function(){return new j4(this)},s.dd=function(n){var t;if(t=this.gc(),n<0||n>t)throw R(new k2(n,t));return new yV(this,n)},s.Si=function(n,t){this.Ri(n,this.bd(t))},s.Kc=function(n){return fB(this,n)},s.Ui=function(n,t){return t},s.fd=function(n,t){return o3(this,n,t)},s.Ib=function(){return rde(this)},s.Wi=function(){return!0},s.Xi=function(n,t){return r8(this,t)},v(yc,"AbstractEList",71),m(67,71,Th,J6,_w,t1e),s.Ci=function(n,t){return fW(this,n,t)},s.Di=function(n){return oHe(this,n)},s.Ei=function(n,t){MO(this,n,t)},s.Fi=function(n){WT(this,n)},s.Yi=function(n){return phe(this,n)},s.$b=function(){yE(this)},s.Gc=function(n){return y8(this,n)},s.Xb=function(n){return K(this,n)},s.Zi=function(n){var t,i,r;++this.j,i=this.g==null?0:this.g.length,n>i&&(r=this.g,t=i+(i/2|0)+4,t=0?(this.ed(t),!0):!1},s.Vi=function(n,t){return this.Bj(n,this.Xi(n,t))},s.gc=function(){return this.Cj()},s.Nc=function(){return this.Dj()},s.Oc=function(n){return this.Ej(n)},s.Ib=function(){return this.Fj()},v(yc,"DelegatingEList",2055),m(2056,2055,RZe),s.Ci=function(n,t){return tge(this,n,t)},s.Di=function(n){return this.Ci(this.Cj(),n)},s.Ei=function(n,t){iUe(this,n,t)},s.Fi=function(n){Uqe(this,n)},s.Ji=function(){return!this.Kj()},s.$b=function(){dS(this)},s.Gj=function(n,t,i,r,c){return new v_e(this,n,t,i,r,c)},s.Hj=function(n){hi(this.hj(),n)},s.Ij=function(){return null},s.Jj=function(){return-1},s.hj=function(){return null},s.Kj=function(){return!1},s.Lj=function(n,t){return t},s.Mj=function(n,t){return t},s.Nj=function(){return!1},s.Oj=function(){return!this.yj()},s.Ri=function(n,t){var i,r;return this.Nj()?(r=this.Oj(),i=E0e(this,n,t),this.Hj(this.Gj(7,ke(t),i,n,r)),i):E0e(this,n,t)},s.ed=function(n){var t,i,r,c;return this.Nj()?(i=null,r=this.Oj(),t=this.Gj(4,c=cR(this,n),null,n,r),this.Kj()&&c?(i=this.Mj(c,i),i?(i.lj(t),i.mj()):this.Hj(t)):i?(i.lj(t),i.mj()):this.Hj(t),c):(c=cR(this,n),this.Kj()&&c&&(i=this.Mj(c,null),i&&i.mj()),c)},s.Vi=function(n,t){return bKe(this,n,t)},v(ky,"DelegatingNotifyingListImpl",2056),m(151,1,zN),s.lj=function(n){return s0e(this,n)},s.mj=function(){EY(this)},s.ej=function(){return this.d},s.Ij=function(){return null},s.Pj=function(){return null},s.fj=function(n){return-1},s.gj=function(){return ZUe(this)},s.hj=function(){return null},s.ij=function(){return Nbe(this)},s.jj=function(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o},s.Qj=function(){return!1},s.kj=function(n){var t,i,r,c,o,l,f,h,b,p,y;switch(this.d){case 1:case 2:switch(c=n.ej(),c){case 1:case 2:if(o=n.hj(),ue(o)===ue(this.hj())&&this.fj(null)==n.fj(null))return this.g=n.gj(),n.ej()==1&&(this.d=1),!0}case 4:{switch(c=n.ej(),c){case 4:{if(o=n.hj(),ue(o)===ue(this.hj())&&this.fj(null)==n.fj(null))return b=yge(this),h=this.o<0?this.o<-2?-2-this.o-1:-1:this.o,l=n.jj(),this.d=6,y=new _w(2),h<=l?(Et(y,this.n),Et(y,n.ij()),this.g=F(z($t,1),ni,30,15,[this.o=h,l+1])):(Et(y,n.ij()),Et(y,this.n),this.g=F(z($t,1),ni,30,15,[this.o=l,h])),this.n=y,b||(this.o=-2-this.o-1),!0;break}}break}case 6:{switch(c=n.ej(),c){case 4:{if(o=n.hj(),ue(o)===ue(this.hj())&&this.fj(null)==n.fj(null)){for(b=yge(this),l=n.jj(),p=u(this.g,54),r=se($t,ni,30,p.length+1,15,1),t=0;t>>0,t.toString(16))),r.a+=" (eventType: ",this.d){case 1:{r.a+="SET";break}case 2:{r.a+="UNSET";break}case 3:{r.a+="ADD";break}case 5:{r.a+="ADD_MANY";break}case 4:{r.a+="REMOVE";break}case 6:{r.a+="REMOVE_MANY";break}case 7:{r.a+="MOVE";break}case 8:{r.a+="REMOVING_ADAPTER";break}case 9:{r.a+="RESOLVE";break}default:{_X(r,this.d);break}}if(FXe(this)&&(r.a+=", touch: true"),r.a+=", position: ",_X(r,this.o<0?this.o<-2?-2-this.o-1:-1:this.o),r.a+=", notifier: ",Uj(r,this.hj()),r.a+=", feature: ",Uj(r,this.Ij()),r.a+=", oldValue: ",Uj(r,Nbe(this)),r.a+=", newValue: ",this.d==6&&X(this.g,54)){for(i=u(this.g,54),r.a+="[",n=0;n10?((!this.b||this.c.j!=this.a)&&(this.b=new E2(this),this.a=this.j),rf(this.b,n)):y8(this,n)},s.Wi=function(){return!0},s.a=0,v(yc,"AbstractEList/1",949),m(305,99,cF,k2),v(yc,"AbstractEList/BasicIndexOutOfBoundsException",305),m(42,1,Fr,st),s.Nb=function(n){Zr(this,n)},s.Vj=function(){if(this.i.j!=this.f)throw R(new Nl)},s.Wj=function(){return ft(this)},s.Ob=function(){return this.e!=this.i.gc()},s.Pb=function(){return this.Wj()},s.Qb=function(){VE(this)},s.e=0,s.f=0,s.g=-1,v(yc,"AbstractEList/EIterator",42),m(286,42,Wh,j4,yV),s.Qb=function(){VE(this)},s.Rb=function(n){sJe(this,n)},s.Xj=function(){var n;try{return n=this.d.Xb(--this.e),this.Vj(),this.g=this.e,n}catch(t){throw t=sr(t),X(t,99)?(this.Vj(),R(new hu)):R(t)}},s.Yj=function(n){sHe(this,n)},s.Sb=function(){return this.e!=0},s.Tb=function(){return this.e},s.Ub=function(){return this.Xj()},s.Vb=function(){return this.e-1},s.Wb=function(n){this.Yj(n)},v(yc,"AbstractEList/EListIterator",286),m(355,42,Fr,E4),s.Wj=function(){return PQ(this)},s.Qb=function(){throw R(new _t)},v(yc,"AbstractEList/NonResolvingEIterator",355),m(391,286,Wh,ET,Xle),s.Rb=function(n){throw R(new _t)},s.Wj=function(){var n;try{return n=this.c.Ti(this.e),this.Vj(),this.g=this.e++,n}catch(t){throw t=sr(t),X(t,99)?(this.Vj(),R(new hu)):R(t)}},s.Xj=function(){var n;try{return n=this.c.Ti(--this.e),this.Vj(),this.g=this.e,n}catch(t){throw t=sr(t),X(t,99)?(this.Vj(),R(new hu)):R(t)}},s.Qb=function(){throw R(new _t)},s.Wb=function(n){throw R(new _t)},v(yc,"AbstractEList/NonResolvingEListIterator",391),m(2042,71,BZe),s.Ci=function(n,t){var i,r,c,o,l,f,h,b,p,y,S;if(c=t.gc(),c!=0){for(b=u(Xn(this.a,4),129),p=b==null?0:b.length,S=p+c,r=oQ(this,S),y=p-n,y>0&&Wu(b,n,r,n+c,y),h=t.Jc(),l=0;li)throw R(new k2(n,i));return new _De(this,n)},s.$b=function(){var n,t;++this.j,n=u(Xn(this.a,4),129),t=n==null?0:n.length,p8(this,null),gY(this,t,n)},s.Gc=function(n){var t,i,r,c,o;if(t=u(Xn(this.a,4),129),t!=null){if(n!=null){for(r=t,c=0,o=r.length;c=i)throw R(new k2(n,i));return t[n]},s.bd=function(n){var t,i,r;if(t=u(Xn(this.a,4),129),t!=null){if(n!=null){for(i=0,r=t.length;ii)throw R(new k2(n,i));return new DDe(this,n)},s.Ri=function(n,t){var i,r,c;if(i=pJe(this),c=i==null?0:i.length,n>=c)throw R(new jo(Cne+n+pg+c));if(t>=c)throw R(new jo(Tne+t+pg+c));return r=i[t],n!=t&&(n0&&Wu(n,0,t,0,i),t},s.Oc=function(n){var t,i,r;return t=u(Xn(this.a,4),129),r=t==null?0:t.length,r>0&&(n.lengthr&&ir(n,r,null),n};var Ian;v(yc,"ArrayDelegatingEList",2042),m(1032,42,Fr,FPe),s.Vj=function(){if(this.b.j!=this.f||ue(u(Xn(this.b.a,4),129))!==ue(this.a))throw R(new Nl)},s.Qb=function(){VE(this),this.a=u(Xn(this.b.a,4),129)},v(yc,"ArrayDelegatingEList/EIterator",1032),m(712,286,Wh,eDe,DDe),s.Vj=function(){if(this.b.j!=this.f||ue(u(Xn(this.b.a,4),129))!==ue(this.a))throw R(new Nl)},s.Yj=function(n){sHe(this,n),this.a=u(Xn(this.b.a,4),129)},s.Qb=function(){VE(this),this.a=u(Xn(this.b.a,4),129)},v(yc,"ArrayDelegatingEList/EListIterator",712),m(1033,355,Fr,JPe),s.Vj=function(){if(this.b.j!=this.f||ue(u(Xn(this.b.a,4),129))!==ue(this.a))throw R(new Nl)},v(yc,"ArrayDelegatingEList/NonResolvingEIterator",1033),m(713,391,Wh,nDe,_De),s.Vj=function(){if(this.b.j!=this.f||ue(u(Xn(this.b.a,4),129))!==ue(this.a))throw R(new Nl)},v(yc,"ArrayDelegatingEList/NonResolvingEListIterator",713),m(605,305,cF,EK),v(yc,"BasicEList/BasicIndexOutOfBoundsException",605),m(699,67,Th,Nse),s._c=function(n,t){throw R(new _t)},s.Ec=function(n){throw R(new _t)},s.ad=function(n,t){throw R(new _t)},s.Fc=function(n){throw R(new _t)},s.$b=function(){throw R(new _t)},s.Zi=function(n){throw R(new _t)},s.Jc=function(){return this.Gi()},s.cd=function(){return this.Hi()},s.dd=function(n){return this.Ii(n)},s.Ri=function(n,t){throw R(new _t)},s.Si=function(n,t){throw R(new _t)},s.ed=function(n){throw R(new _t)},s.Kc=function(n){throw R(new _t)},s.fd=function(n,t){throw R(new _t)},v(yc,"BasicEList/UnmodifiableEList",699),m(711,1,{3:1,20:1,18:1,16:1,61:1,586:1}),s._c=function(n,t){$wn(this,n,u(t,45))},s.Ec=function(n){return Npn(this,u(n,45))},s.Ic=function(n){cc(this,n)},s.Xb=function(n){return u(K(this.c,n),136)},s.Ri=function(n,t){return u(this.c.Ri(n,t),45)},s.Si=function(n,t){Rwn(this,n,u(t,45))},s.ed=function(n){return u(this.c.ed(n),45)},s.fd=function(n,t){return U3n(this,n,u(t,45))},s.gd=function(n){Zb(this,n)},s.Lc=function(){return new vn(this,16)},s.Mc=function(){return new mn(null,new vn(this,16))},s.ad=function(n,t){return this.c.ad(n,t)},s.Fc=function(n){return this.c.Fc(n)},s.$b=function(){this.c.$b()},s.Gc=function(n){return this.c.Gc(n)},s.Hc=function(n){return jO(this.c,n)},s.Zj=function(){var n,t,i;if(this.d==null){for(this.d=se(z8e,nme,67,2*this.f+1,0,1),i=this.e,this.f=0,t=this.c.Jc();t.e!=t.i.gc();)n=u(t.Wj(),136),az(this,n);this.e=i}},s.Fb=function(n){return xNe(this,n)},s.Hb=function(){return s1e(this.c)},s.bd=function(n){return this.c.bd(n)},s.$j=function(){this.c=new DSe(this)},s.dc=function(){return this.f==0},s.Jc=function(){return this.c.Jc()},s.cd=function(){return this.c.cd()},s.dd=function(n){return this.c.dd(n)},s._j=function(){return nO(this)},s.ak=function(n,t,i){return new XNe(n,t,i)},s.bk=function(){return new yL},s.Kc=function(n){return pBe(this,n)},s.gc=function(){return this.f},s.hd=function(n,t){return new N0(this.c,n,t)},s.Nc=function(){return this.c.Nc()},s.Oc=function(n){return this.c.Oc(n)},s.Ib=function(){return rde(this.c)},s.e=0,s.f=0,v(yc,"BasicEMap",711),m(1027,67,Th,DSe),s.Ki=function(n,t){vbn(this,u(t,136))},s.Ni=function(n,t,i){var r;++(r=this,u(t,136),r).a.e},s.Oi=function(n,t){ybn(this,u(t,136))},s.Pi=function(n,t,i){ppn(this,u(t,136),u(i,136))},s.Mi=function(n,t){aze(this.a)},v(yc,"BasicEMap/1",1027),m(1028,67,Th,yL),s.$i=function(n){return se(ZBn,zZe,611,n,0,1)},v(yc,"BasicEMap/2",1028),m(1029,Ga,fs,_Se),s.$b=function(){this.a.c.$b()},s.Gc=function(n){return xQ(this.a,n)},s.Jc=function(){return this.a.f==0?(A9(),tD.a):new mAe(this.a)},s.Kc=function(n){var t;return t=this.a.f,nz(this.a,n),this.a.f!=t},s.gc=function(){return this.a.f},v(yc,"BasicEMap/3",1029),m(1030,31,im,LSe),s.$b=function(){this.a.c.$b()},s.Gc=function(n){return vXe(this.a,n)},s.Jc=function(){return this.a.f==0?(A9(),tD.a):new vAe(this.a)},s.gc=function(){return this.a.f},v(yc,"BasicEMap/4",1030),m(1031,Ga,fs,PSe),s.$b=function(){this.a.c.$b()},s.Gc=function(n){var t,i,r,c,o,l,f,h,b;if(this.a.f>0&&X(n,45)&&(this.a.Zj(),h=u(n,45),f=h.jd(),c=f==null?0:Ni(f),o=Nle(this.a,c),t=this.a.d[o],t)){for(i=u(t.g,374),b=t.i,l=0;l"+this.c},s.a=0;var ZBn=v(yc,"BasicEMap/EntryImpl",611);m(534,1,{},G6),v(yc,"BasicEMap/View",534);var tD;m(769,1,{}),s.Fb=function(n){return abe((En(),Sc),n)},s.Hb=function(){return y1e((En(),Sc))},s.Ib=function(){return Ja((En(),Sc))},v(yc,"ECollections/BasicEmptyUnmodifiableEList",769),m(1302,1,Wh,eC),s.Nb=function(n){Zr(this,n)},s.Rb=function(n){throw R(new _t)},s.Ob=function(){return!1},s.Sb=function(){return!1},s.Pb=function(){throw R(new hu)},s.Tb=function(){return 0},s.Ub=function(){throw R(new hu)},s.Vb=function(){return-1},s.Qb=function(){throw R(new _t)},s.Wb=function(n){throw R(new _t)},v(yc,"ECollections/BasicEmptyUnmodifiableEList/1",1302),m(1300,769,{20:1,18:1,16:1,61:1},xxe),s._c=function(n,t){FAe()},s.Ec=function(n){return zAe()},s.ad=function(n,t){return JAe()},s.Fc=function(n){return HAe()},s.$b=function(){GAe()},s.Gc=function(n){return!1},s.Hc=function(n){return!1},s.Ic=function(n){cc(this,n)},s.Xb=function(n){return Pse((En(),n)),null},s.bd=function(n){return-1},s.dc=function(){return!0},s.Jc=function(){return this.a},s.cd=function(){return this.a},s.dd=function(n){return this.a},s.Ri=function(n,t){return qAe()},s.Si=function(n,t){UAe()},s.ed=function(n){return XAe()},s.Kc=function(n){return KAe()},s.fd=function(n,t){return VAe()},s.gc=function(){return 0},s.gd=function(n){Zb(this,n)},s.Lc=function(){return new vn(this,16)},s.Mc=function(){return new mn(null,new vn(this,16))},s.hd=function(n,t){return En(),new N0(Sc,n,t)},s.Nc=function(){return Ofe((En(),Sc))},s.Oc=function(n){return En(),qE(Sc,n)},v(yc,"ECollections/EmptyUnmodifiableEList",1300),m(1301,769,{20:1,18:1,16:1,61:1,586:1},Axe),s._c=function(n,t){FAe()},s.Ec=function(n){return zAe()},s.ad=function(n,t){return JAe()},s.Fc=function(n){return HAe()},s.$b=function(){GAe()},s.Gc=function(n){return!1},s.Hc=function(n){return!1},s.Ic=function(n){cc(this,n)},s.Xb=function(n){return Pse((En(),n)),null},s.bd=function(n){return-1},s.dc=function(){return!0},s.Jc=function(){return this.a},s.cd=function(){return this.a},s.dd=function(n){return this.a},s.Ri=function(n,t){return qAe()},s.Si=function(n,t){UAe()},s.ed=function(n){return XAe()},s.Kc=function(n){return KAe()},s.fd=function(n,t){return VAe()},s.gc=function(){return 0},s.gd=function(n){Zb(this,n)},s.Lc=function(){return new vn(this,16)},s.Mc=function(){return new mn(null,new vn(this,16))},s.hd=function(n,t){return En(),new N0(Sc,n,t)},s.Nc=function(){return Ofe((En(),Sc))},s.Oc=function(n){return En(),qE(Sc,n)},s._j=function(){return En(),En(),r1},v(yc,"ECollections/EmptyUnmodifiableEMap",1301);var J8e=Gi(yc,"Enumerator"),EG;m(290,1,{290:1},DW),s.Fb=function(n){var t;return this===n?!0:X(n,290)?(t=u(n,290),this.f==t.f&&l3n(this.i,t.i)&&uV(this.a,(this.f&256)!=0?(t.f&256)!=0?t.a:null:(t.f&256)!=0?null:t.a)&&uV(this.d,t.d)&&uV(this.g,t.g)&&uV(this.e,t.e)&&hSn(this,t)):!1},s.Hb=function(){return this.f},s.Ib=function(){return ZXe(this)},s.f=0;var Dan=0,_an=0,Lan=0,Pan=0,H8e=0,G8e=0,q8e=0,U8e=0,X8e=0,$an,oA=0,sA=0,Ran=0,Ban=0,SG,K8e;v(yc,"URI",290),m(1090,44,v3,Mxe),s.yc=function(n,t){return u(Kc(this,Pt(n),u(t,290)),290)},v(yc,"URI/URICache",1090),m(492,67,Th,nC,aR),s.Qi=function(){return!0},v(yc,"UniqueEList",492),m(578,63,H1,sB),v(yc,"WrappedException",578);var Zt=Gi(ql,HZe),Gm=Gi(ql,GZe),ns=Gi(ql,qZe),qm=Gi(ql,UZe),Ma=Gi(ql,XZe),vf=Gi(ql,"EClass"),zce=Gi(ql,"EDataType"),zan;m(1198,44,v3,Cxe),s.xc=function(n){return $r(n)?lo(this,n):bu(Xc(this.f,n))},v(ql,"EDataType/Internal/ConversionDelegate/Factory/Registry/Impl",1198);var xG=Gi(ql,"EEnum"),ed=Gi(ql,KZe),Rc=Gi(ql,VZe),yf=Gi(ql,YZe),kf,jp=Gi(ql,QZe),Um=Gi(ql,WZe);m(1023,1,{},tC),s.Ib=function(){return"NIL"},v(ql,"EStructuralFeature/Internal/DynamicValueHolder/1",1023);var Fan;m(1022,44,v3,Txe),s.xc=function(n){return $r(n)?lo(this,n):bu(Xc(this.f,n))},v(ql,"EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl",1022);var Fo=Gi(ql,ZZe),Qy=Gi(ql,"EValidator/PatternMatcher"),V8e,Y8e,Bn,e0,Xm,yb,Jan,Han,Gan,kb,n0,jb,Ep,rh,qan,Uan,jf,t0,Xan,i0,Km,i5,Ac,Kan,Van,Sp,AG=Gi(Ri,"FeatureMap/Entry");m(533,1,{75:1},C$),s.Jk=function(){return this.a},s.kd=function(){return this.b},v(Jn,"BasicEObjectImpl/1",533),m(1021,1,Lne,VCe),s.Dk=function(n){return aY(this.a,this.b,n)},s.Oj=function(){return P_e(this.a,this.b)},s.Wb=function(n){pae(this.a,this.b,n)},s.Ek=function(){h5n(this.a,this.b)},v(Jn,"BasicEObjectImpl/4",1021),m(2043,1,{114:1}),s.Kk=function(n){this.e=n==0?Yan:se(Mr,On,1,n,5,1)},s.ii=function(n){return this.e[n]},s.ji=function(n,t){this.e[n]=t},s.ki=function(n){this.e[n]=null},s.Lk=function(){return this.c},s.Mk=function(){throw R(new _t)},s.Nk=function(){throw R(new _t)},s.Ok=function(){return this.d},s.Pk=function(){return this.e!=null},s.Qk=function(n){this.c=n},s.Rk=function(n){throw R(new _t)},s.Sk=function(n){throw R(new _t)},s.Tk=function(n){this.d=n};var Yan;v(Jn,"BasicEObjectImpl/EPropertiesHolderBaseImpl",2043),m(192,2043,{114:1},nl),s.Mk=function(){return this.a},s.Nk=function(){return this.b},s.Rk=function(n){this.a=n},s.Sk=function(n){this.b=n},v(Jn,"BasicEObjectImpl/EPropertiesHolderImpl",192),m(501,100,ZWe,jv),s.rh=function(){return this.f},s.wh=function(){return this.k},s.yh=function(n,t){this.g=n,this.i=t},s.Ah=function(){return(this.j&2)==0?this.fi():this.Xh().Lk()},s.Ch=function(){return this.i},s.th=function(){return(this.j&1)!=0},s.Mh=function(){return this.g},s.Sh=function(){return(this.j&4)!=0},s.Xh=function(){return!this.k&&(this.k=new nl),this.k},s._h=function(n){this.Xh().Qk(n),n?this.j|=2:this.j&=-3},s.bi=function(n){this.Xh().Sk(n),n?this.j|=4:this.j&=-5},s.fi=function(){return(C0(),Bn).S},s.i=0,s.j=1,v(Jn,"EObjectImpl",501),m(785,501,{109:1,94:1,93:1,57:1,114:1,52:1,100:1},bfe),s.ii=function(n){return this.e[n]},s.ji=function(n,t){this.e[n]=t},s.ki=function(n){this.e[n]=null},s.Ah=function(){return this.d},s.Fh=function(n){return Ji(this.d,n)},s.Hh=function(){return this.d},s.Lh=function(){return this.e!=null},s.Xh=function(){return!this.k&&(this.k=new kL),this.k},s._h=function(n){this.d=n},s.ei=function(){var n;return this.e==null&&(n=dt(this.d),this.e=n==0?Qan:se(Mr,On,1,n,5,1)),this},s.gi=function(){return 0};var Qan;v(Jn,"DynamicEObjectImpl",785),m(1483,785,{109:1,45:1,94:1,93:1,136:1,57:1,114:1,52:1,100:1},gIe),s.Fb=function(n){return this===n},s.Hb=function(){return jw(this)},s._h=function(n){this.d=n,this.b=ZO(n,"key"),this.c=ZO(n,$S)},s.yi=function(){var n;return this.a==-1&&(n=SY(this,this.b),this.a=n==null?0:Ni(n)),this.a},s.jd=function(){return SY(this,this.b)},s.kd=function(){return SY(this,this.c)},s.zi=function(n){this.a=n},s.Ai=function(n){pae(this,this.b,n)},s.ld=function(n){var t;return t=SY(this,this.c),pae(this,this.c,n),t},s.a=0,v(Jn,"DynamicEObjectImpl/BasicEMapEntry",1483),m(1484,1,{114:1},kL),s.Kk=function(n){throw R(new _t)},s.ii=function(n){throw R(new _t)},s.ji=function(n,t){throw R(new _t)},s.ki=function(n){throw R(new _t)},s.Lk=function(){throw R(new _t)},s.Mk=function(){return this.a},s.Nk=function(){return this.b},s.Ok=function(){return this.c},s.Pk=function(){throw R(new _t)},s.Qk=function(n){throw R(new _t)},s.Rk=function(n){this.a=n},s.Sk=function(n){this.b=n},s.Tk=function(n){this.c=n},v(Jn,"DynamicEObjectImpl/DynamicEPropertiesHolderImpl",1484),m(504,161,{109:1,94:1,93:1,587:1,158:1,57:1,114:1,52:1,100:1,504:1,161:1,117:1,118:1},Nb),s.xh=function(n){return qde(this,n)},s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.d;case 2:return i?(!this.b&&(this.b=new Hs((jn(),Ac),Du,this)),this.b):(!this.b&&(this.b=new Hs((jn(),Ac),Du,this)),nO(this.b));case 3:return H_e(this);case 4:return!this.a&&(this.a=new mr(vb,this,4)),this.a;case 5:return!this.c&&(this.c=new Jv(vb,this,5)),this.c}return Pl(this,n-dt((jn(),e0)),Mn((r=u(Xn(this,16),29),r||e0),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 3:return this.Cb&&(i=(c=this.Db>>16,c>=0?qde(this,i):this.Cb.Qh(this,-1-c,null,i))),Cfe(this,u(n,158),i)}return o=u(Mn((r=u(Xn(this,16),29),r||(jn(),e0)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),e0)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 2:return!this.b&&(this.b=new Hs((jn(),Ac),Du,this)),K$(this.b,n,i);case 3:return Cfe(this,null,i);case 4:return!this.a&&(this.a=new mr(vb,this,4)),vc(this.a,n,i)}return c=u(Mn((r=u(Xn(this,16),29),r||(jn(),e0)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),e0)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.d!=null;case 2:return!!this.b&&this.b.f!=0;case 3:return!!H_e(this);case 4:return!!this.a&&this.a.i!=0;case 5:return!!this.c&&this.c.i!=0}return Ll(this,n-dt((jn(),e0)),Mn((t=u(Xn(this,16),29),t||e0),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:Yvn(this,Pt(t));return;case 2:!this.b&&(this.b=new Hs((jn(),Ac),Du,this)),NB(this.b,t);return;case 3:FUe(this,u(t,158));return;case 4:!this.a&&(this.a=new mr(vb,this,4)),kt(this.a),!this.a&&(this.a=new mr(vb,this,4)),nr(this.a,u(t,18));return;case 5:!this.c&&(this.c=new Jv(vb,this,5)),kt(this.c),!this.c&&(this.c=new Jv(vb,this,5)),nr(this.c,u(t,18));return}Jl(this,n-dt((jn(),e0)),Mn((i=u(Xn(this,16),29),i||e0),n),t)},s.fi=function(){return jn(),e0},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:Hhe(this,null);return;case 2:!this.b&&(this.b=new Hs((jn(),Ac),Du,this)),this.b.c.$b();return;case 3:FUe(this,null);return;case 4:!this.a&&(this.a=new mr(vb,this,4)),kt(this.a);return;case 5:!this.c&&(this.c=new Jv(vb,this,5)),kt(this.c);return}Fl(this,n-dt((jn(),e0)),Mn((t=u(Xn(this,16),29),t||e0),n))},s.Ib=function(){return IFe(this)},s.d=null,v(Jn,"EAnnotationImpl",504),m(142,711,tme,os),s.Ei=function(n,t){kwn(this,n,u(t,45))},s.Uk=function(n,t){return k2n(this,u(n,45),t)},s.Yi=function(n){return u(u(this.c,72).Yi(n),136)},s.Gi=function(){return u(this.c,72).Gi()},s.Hi=function(){return u(this.c,72).Hi()},s.Ii=function(n){return u(this.c,72).Ii(n)},s.Vk=function(n,t){return K$(this,n,t)},s.Dk=function(n){return u(this.c,77).Dk(n)},s.$j=function(){},s.Oj=function(){return u(this.c,77).Oj()},s.ak=function(n,t,i){var r;return r=u(ol(this.b).ti().pi(this.b),136),r.zi(n),r.Ai(t),r.ld(i),r},s.bk=function(){return new uoe(this)},s.Wb=function(n){NB(this,n)},s.Ek=function(){u(this.c,77).Ek()},v(Ri,"EcoreEMap",142),m(169,142,tme,Hs),s.Zj=function(){var n,t,i,r,c,o;if(this.d==null){for(o=se(z8e,nme,67,2*this.f+1,0,1),i=this.c.Jc();i.e!=i.i.gc();)t=u(i.Wj(),136),r=t.yi(),c=(r&oi)%o.length,n=o[c],!n&&(n=o[c]=new uoe(this)),n.Ec(t);this.d=o}},v(Jn,"EAnnotationImpl/1",169),m(293,439,{109:1,94:1,93:1,158:1,197:1,57:1,114:1,470:1,52:1,100:1,161:1,293:1,117:1,118:1}),s.Ih=function(n,t,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $n(),(this.Bb&256)!=0;case 3:return $n(),(this.Bb&512)!=0;case 4:return ke(this.s);case 5:return ke(this.t);case 6:return $n(),!!this.Hk();case 7:return $n(),c=this.s,c>=1;case 8:return t?ff(this):this.r;case 9:return this.q}return Pl(this,n-dt(this.fi()),Mn((r=u(Xn(this,16),29),r||this.fi()),n),t,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 9:return SV(this,i)}return c=u(Mn((r=u(Xn(this,16),29),r||this.fi()),t),69),c.uk().yk(this,Lo(this),t-dt(this.fi()),n,i)},s.Th=function(n){var t,i;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.Hk();case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&Mw(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&Mw(this.q).i==0)}return Ll(this,n-dt(this.fi()),Mn((t=u(Xn(this,16),29),t||this.fi()),n))},s.$h=function(n,t){var i,r;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:this.ri(Pt(t));return;case 2:Ld(this,Fe(ze(t)));return;case 3:Pd(this,Fe(ze(t)));return;case 4:Nd(this,u(t,15).a);return;case 5:this.Xk(u(t,15).a);return;case 8:cg(this,u(t,143));return;case 9:r=Fa(this,u(t,87),null),r&&r.mj();return}Jl(this,n-dt(this.fi()),Mn((i=u(Xn(this,16),29),i||this.fi()),n),t)},s.fi=function(){return jn(),Van},s.hi=function(n){var t,i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:this.ri(null);return;case 2:Ld(this,!0);return;case 3:Pd(this,!0);return;case 4:Nd(this,0);return;case 5:this.Xk(1);return;case 8:cg(this,null);return;case 9:i=Fa(this,null,null),i&&i.mj();return}Fl(this,n-dt(this.fi()),Mn((t=u(Xn(this,16),29),t||this.fi()),n))},s.mi=function(){ff(this),this.Bb|=1},s.Fk=function(){return ff(this)},s.Gk=function(){return this.t},s.Hk=function(){var n;return n=this.t,n>1||n==-1},s.Qi=function(){return(this.Bb&512)!=0},s.Wk=function(n,t){return z1e(this,n,t)},s.Xk=function(n){$2(this,n)},s.Ib=function(){return tbe(this)},s.s=0,s.t=1,v(Jn,"ETypedElementImpl",293),m(451,293,{109:1,94:1,93:1,158:1,197:1,57:1,179:1,69:1,114:1,470:1,52:1,100:1,161:1,451:1,293:1,117:1,118:1,682:1}),s.xh=function(n){return EHe(this,n)},s.Ih=function(n,t,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $n(),(this.Bb&256)!=0;case 3:return $n(),(this.Bb&512)!=0;case 4:return ke(this.s);case 5:return ke(this.t);case 6:return $n(),!!this.Hk();case 7:return $n(),c=this.s,c>=1;case 8:return t?ff(this):this.r;case 9:return this.q;case 10:return $n(),(this.Bb&Gf)!=0;case 11:return $n(),(this.Bb&V0)!=0;case 12:return $n(),(this.Bb&cm)!=0;case 13:return this.j;case 14:return A8(this);case 15:return $n(),(this.Bb&as)!=0;case 16:return $n(),(this.Bb&jh)!=0;case 17:return O2(this)}return Pl(this,n-dt(this.fi()),Mn((r=u(Xn(this,16),29),r||this.fi()),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 17:return this.Cb&&(i=(c=this.Db>>16,c>=0?EHe(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,17,i)}return o=u(Mn((r=u(Xn(this,16),29),r||this.fi()),t),69),o.uk().xk(this,Lo(this),t-dt(this.fi()),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 9:return SV(this,i);case 17:return hl(this,null,17,i)}return c=u(Mn((r=u(Xn(this,16),29),r||this.fi()),t),69),c.uk().yk(this,Lo(this),t-dt(this.fi()),n,i)},s.Th=function(n){var t,i;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.Hk();case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&Mw(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&Mw(this.q).i==0);case 10:return(this.Bb&Gf)==0;case 11:return(this.Bb&V0)!=0;case 12:return(this.Bb&cm)!=0;case 13:return this.j!=null;case 14:return A8(this)!=null;case 15:return(this.Bb&as)!=0;case 16:return(this.Bb&jh)!=0;case 17:return!!O2(this)}return Ll(this,n-dt(this.fi()),Mn((t=u(Xn(this,16),29),t||this.fi()),n))},s.$h=function(n,t){var i,r;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:XV(this,Pt(t));return;case 2:Ld(this,Fe(ze(t)));return;case 3:Pd(this,Fe(ze(t)));return;case 4:Nd(this,u(t,15).a);return;case 5:this.Xk(u(t,15).a);return;case 8:cg(this,u(t,143));return;case 9:r=Fa(this,u(t,87),null),r&&r.mj();return;case 10:l8(this,Fe(ze(t)));return;case 11:h8(this,Fe(ze(t)));return;case 12:a8(this,Fe(ze(t)));return;case 13:Dse(this,Pt(t));return;case 15:f8(this,Fe(ze(t)));return;case 16:d8(this,Fe(ze(t)));return}Jl(this,n-dt(this.fi()),Mn((i=u(Xn(this,16),29),i||this.fi()),n),t)},s.fi=function(){return jn(),Kan},s.hi=function(n){var t,i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:X(this.Cb,88)&&Y2(Ms(u(this.Cb,88)),4),Mo(this,null);return;case 2:Ld(this,!0);return;case 3:Pd(this,!0);return;case 4:Nd(this,0);return;case 5:this.Xk(1);return;case 8:cg(this,null);return;case 9:i=Fa(this,null,null),i&&i.mj();return;case 10:l8(this,!0);return;case 11:h8(this,!1);return;case 12:a8(this,!1);return;case 13:this.i=null,xB(this,null);return;case 15:f8(this,!1);return;case 16:d8(this,!1);return}Fl(this,n-dt(this.fi()),Mn((t=u(Xn(this,16),29),t||this.fi()),n))},s.mi=function(){$9(Vc((ls(),nc),this)),ff(this),this.Bb|=1},s.nk=function(){return this.f},s.gk=function(){return A8(this)},s.ok=function(){return O2(this)},s.sk=function(){return null},s.Yk=function(){return this.k},s.Jj=function(){return this.n},s.tk=function(){return mz(this)},s.uk=function(){var n,t,i,r,c,o,l,f,h;return this.p||(i=O2(this),(i.i==null&&kh(i),i.i).length,r=this.sk(),r&&dt(O2(r)),c=ff(this),l=c.ik(),n=l?(l.i&1)!=0?l==ts?Qi:l==$t?jr:l==Ym?b7:l==Jr?gr:l==Ap?sp:l==o5?lp:l==ds?jy:KS:l:null,t=A8(this),f=c.gk(),Ljn(this),(this.Bb&jh)!=0&&((o=Wde((ls(),nc),i))&&o!=this||(o=$4(Vc(nc,this))))?this.p=new QCe(this,o):this.Hk()?this.$k()?r?(this.Bb&as)!=0?n?this._k()?this.p=new Ub(47,n,this,r):this.p=new Ub(5,n,this,r):this._k()?this.p=new Wb(46,this,r):this.p=new Wb(4,this,r):n?this._k()?this.p=new Ub(49,n,this,r):this.p=new Ub(7,n,this,r):this._k()?this.p=new Wb(48,this,r):this.p=new Wb(6,this,r):(this.Bb&as)!=0?n?n==yg?this.p=new xd(50,Oan,this):this._k()?this.p=new xd(43,n,this):this.p=new xd(1,n,this):this._k()?this.p=new Md(42,this):this.p=new Md(0,this):n?n==yg?this.p=new xd(41,Oan,this):this._k()?this.p=new xd(45,n,this):this.p=new xd(3,n,this):this._k()?this.p=new Md(44,this):this.p=new Md(2,this):X(c,159)?n==AG?this.p=new Md(40,this):(this.Bb&512)!=0?(this.Bb&as)!=0?n?this.p=new xd(9,n,this):this.p=new Md(8,this):n?this.p=new xd(11,n,this):this.p=new Md(10,this):(this.Bb&as)!=0?n?this.p=new xd(13,n,this):this.p=new Md(12,this):n?this.p=new xd(15,n,this):this.p=new Md(14,this):r?(h=r.t,h>1||h==-1?this._k()?(this.Bb&as)!=0?n?this.p=new Ub(25,n,this,r):this.p=new Wb(24,this,r):n?this.p=new Ub(27,n,this,r):this.p=new Wb(26,this,r):(this.Bb&as)!=0?n?this.p=new Ub(29,n,this,r):this.p=new Wb(28,this,r):n?this.p=new Ub(31,n,this,r):this.p=new Wb(30,this,r):this._k()?(this.Bb&as)!=0?n?this.p=new Ub(33,n,this,r):this.p=new Wb(32,this,r):n?this.p=new Ub(35,n,this,r):this.p=new Wb(34,this,r):(this.Bb&as)!=0?n?this.p=new Ub(37,n,this,r):this.p=new Wb(36,this,r):n?this.p=new Ub(39,n,this,r):this.p=new Wb(38,this,r)):this._k()?(this.Bb&as)!=0?n?this.p=new xd(17,n,this):this.p=new Md(16,this):n?this.p=new xd(19,n,this):this.p=new Md(18,this):(this.Bb&as)!=0?n?this.p=new xd(21,n,this):this.p=new Md(20,this):n?this.p=new xd(23,n,this):this.p=new Md(22,this):this.Zk()?this._k()?this.p=new zNe(u(c,29),this,r):this.p=new bae(u(c,29),this,r):X(c,159)?n==AG?this.p=new Md(40,this):(this.Bb&as)!=0?n?this.p=new $Ie(t,f,this,(MQ(),l==$t?i7e:l==ts?W8e:l==Ap?r7e:l==Ym?t7e:l==Jr?n7e:l==o5?c7e:l==ds?Z8e:l==Wl?e7e:Hce)):this.p=new ZDe(u(c,159),t,f,this):n?this.p=new PIe(t,f,this,(MQ(),l==$t?i7e:l==ts?W8e:l==Ap?r7e:l==Ym?t7e:l==Jr?n7e:l==o5?c7e:l==ds?Z8e:l==Wl?e7e:Hce)):this.p=new WDe(u(c,159),t,f,this):this.$k()?r?(this.Bb&as)!=0?this._k()?this.p=new JNe(u(c,29),this,r):this.p=new Zle(u(c,29),this,r):this._k()?this.p=new FNe(u(c,29),this,r):this.p=new ZK(u(c,29),this,r):(this.Bb&as)!=0?this._k()?this.p=new ROe(u(c,29),this):this.p=new mle(u(c,29),this):this._k()?this.p=new $Oe(u(c,29),this):this.p=new BK(u(c,29),this):this._k()?r?(this.Bb&as)!=0?this.p=new HNe(u(c,29),this,r):this.p=new efe(u(c,29),this,r):(this.Bb&as)!=0?this.p=new BOe(u(c,29),this):this.p=new vle(u(c,29),this):r?(this.Bb&as)!=0?this.p=new GNe(u(c,29),this,r):this.p=new nfe(u(c,29),this,r):(this.Bb&as)!=0?this.p=new zOe(u(c,29),this):this.p=new fR(u(c,29),this)),this.p},s.pk=function(){return(this.Bb&Gf)!=0},s.Zk=function(){return!1},s.$k=function(){return!1},s.qk=function(){return(this.Bb&jh)!=0},s.vk=function(){return AY(this)},s._k=function(){return!1},s.rk=function(){return(this.Bb&as)!=0},s.al=function(n){this.k=n},s.ri=function(n){XV(this,n)},s.Ib=function(){return Jz(this)},s.e=!1,s.n=0,v(Jn,"EStructuralFeatureImpl",451),m(335,451,{109:1,94:1,93:1,38:1,158:1,197:1,57:1,179:1,69:1,114:1,470:1,52:1,100:1,335:1,161:1,451:1,293:1,117:1,118:1,682:1},vX),s.Ih=function(n,t,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $n(),(this.Bb&256)!=0;case 3:return $n(),(this.Bb&512)!=0;case 4:return ke(this.s);case 5:return ke(this.t);case 6:return $n(),!!Y0e(this);case 7:return $n(),c=this.s,c>=1;case 8:return t?ff(this):this.r;case 9:return this.q;case 10:return $n(),(this.Bb&Gf)!=0;case 11:return $n(),(this.Bb&V0)!=0;case 12:return $n(),(this.Bb&cm)!=0;case 13:return this.j;case 14:return A8(this);case 15:return $n(),(this.Bb&as)!=0;case 16:return $n(),(this.Bb&jh)!=0;case 17:return O2(this);case 18:return $n(),(this.Bb&Ru)!=0;case 19:return t?XY(this):n$e(this)}return Pl(this,n-dt((jn(),Xm)),Mn((r=u(Xn(this,16),29),r||Xm),n),t,i)},s.Th=function(n){var t,i;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return Y0e(this);case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&Mw(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&Mw(this.q).i==0);case 10:return(this.Bb&Gf)==0;case 11:return(this.Bb&V0)!=0;case 12:return(this.Bb&cm)!=0;case 13:return this.j!=null;case 14:return A8(this)!=null;case 15:return(this.Bb&as)!=0;case 16:return(this.Bb&jh)!=0;case 17:return!!O2(this);case 18:return(this.Bb&Ru)!=0;case 19:return!!n$e(this)}return Ll(this,n-dt((jn(),Xm)),Mn((t=u(Xn(this,16),29),t||Xm),n))},s.$h=function(n,t){var i,r;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:XV(this,Pt(t));return;case 2:Ld(this,Fe(ze(t)));return;case 3:Pd(this,Fe(ze(t)));return;case 4:Nd(this,u(t,15).a);return;case 5:xAe(this,u(t,15).a);return;case 8:cg(this,u(t,143));return;case 9:r=Fa(this,u(t,87),null),r&&r.mj();return;case 10:l8(this,Fe(ze(t)));return;case 11:h8(this,Fe(ze(t)));return;case 12:a8(this,Fe(ze(t)));return;case 13:Dse(this,Pt(t));return;case 15:f8(this,Fe(ze(t)));return;case 16:d8(this,Fe(ze(t)));return;case 18:mQ(this,Fe(ze(t)));return}Jl(this,n-dt((jn(),Xm)),Mn((i=u(Xn(this,16),29),i||Xm),n),t)},s.fi=function(){return jn(),Xm},s.hi=function(n){var t,i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:X(this.Cb,88)&&Y2(Ms(u(this.Cb,88)),4),Mo(this,null);return;case 2:Ld(this,!0);return;case 3:Pd(this,!0);return;case 4:Nd(this,0);return;case 5:this.b=0,$2(this,1);return;case 8:cg(this,null);return;case 9:i=Fa(this,null,null),i&&i.mj();return;case 10:l8(this,!0);return;case 11:h8(this,!1);return;case 12:a8(this,!1);return;case 13:this.i=null,xB(this,null);return;case 15:f8(this,!1);return;case 16:d8(this,!1);return;case 18:mQ(this,!1);return}Fl(this,n-dt((jn(),Xm)),Mn((t=u(Xn(this,16),29),t||Xm),n))},s.mi=function(){XY(this),$9(Vc((ls(),nc),this)),ff(this),this.Bb|=1},s.Hk=function(){return Y0e(this)},s.Wk=function(n,t){return this.b=0,this.a=null,z1e(this,n,t)},s.Xk=function(n){xAe(this,n)},s.Ib=function(){var n;return(this.Db&64)!=0?Jz(this):(n=new cf(Jz(this)),n.a+=" (iD: ",yd(n,(this.Bb&Ru)!=0),n.a+=")",n.a)},s.b=0,v(Jn,"EAttributeImpl",335),m(360,439,{109:1,94:1,93:1,143:1,158:1,197:1,57:1,114:1,52:1,100:1,360:1,161:1,117:1,118:1,681:1}),s.bl=function(n){return n.Ah()==this},s.xh=function(n){return WQ(this,n)},s.yh=function(n,t){this.w=null,this.Db=t<<16|this.Db&255,this.Cb=n},s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return Gw(this);case 4:return this.gk();case 5:return this.F;case 6:return t?ol(this):z9(this);case 7:return!this.A&&(this.A=new rs(Fo,this,7)),this.A}return Pl(this,n-dt(this.fi()),Mn((r=u(Xn(this,16),29),r||this.fi()),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?WQ(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,6,i)}return o=u(Mn((r=u(Xn(this,16),29),r||this.fi()),t),69),o.uk().xk(this,Lo(this),t-dt(this.fi()),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 6:return hl(this,null,6,i);case 7:return!this.A&&(this.A=new rs(Fo,this,7)),vc(this.A,n,i)}return c=u(Mn((r=u(Xn(this,16),29),r||this.fi()),t),69),c.uk().yk(this,Lo(this),t-dt(this.fi()),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Gw(this);case 4:return this.gk()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!z9(this);case 7:return!!this.A&&this.A.i!=0}return Ll(this,n-dt(this.fi()),Mn((t=u(Xn(this,16),29),t||this.fi()),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:zR(this,Pt(t));return;case 2:AK(this,Pt(t));return;case 5:D8(this,Pt(t));return;case 7:!this.A&&(this.A=new rs(Fo,this,7)),kt(this.A),!this.A&&(this.A=new rs(Fo,this,7)),nr(this.A,u(t,18));return}Jl(this,n-dt(this.fi()),Mn((i=u(Xn(this,16),29),i||this.fi()),n),t)},s.fi=function(){return jn(),Jan},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:X(this.Cb,184)&&(u(this.Cb,184).tb=null),Mo(this,null);return;case 2:c8(this,null),K9(this,this.D);return;case 5:D8(this,null);return;case 7:!this.A&&(this.A=new rs(Fo,this,7)),kt(this.A);return}Fl(this,n-dt(this.fi()),Mn((t=u(Xn(this,16),29),t||this.fi()),n))},s.fk=function(){var n;return this.G==-1&&(this.G=(n=ol(this),n?$d(n.si(),this):-1)),this.G},s.gk=function(){return null},s.hk=function(){return ol(this)},s.cl=function(){return this.v},s.ik=function(){return Gw(this)},s.jk=function(){return this.D!=null?this.D:this.B},s.kk=function(){return this.F},s.dk=function(n){return JW(this,n)},s.dl=function(n){this.v=n},s.el=function(n){GBe(this,n)},s.fl=function(n){this.C=n},s.ri=function(n){zR(this,n)},s.Ib=function(){return QB(this)},s.C=null,s.D=null,s.G=-1,v(Jn,"EClassifierImpl",360),m(88,360,{109:1,94:1,93:1,29:1,143:1,158:1,197:1,57:1,114:1,52:1,100:1,88:1,360:1,161:1,471:1,117:1,118:1,681:1},rj),s.bl=function(n){return o2n(this,n.Ah())},s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return Gw(this);case 4:return null;case 5:return this.F;case 6:return t?ol(this):z9(this);case 7:return!this.A&&(this.A=new rs(Fo,this,7)),this.A;case 8:return $n(),(this.Bb&256)!=0;case 9:return $n(),(this.Bb&512)!=0;case 10:return tu(this);case 11:return!this.q&&(this.q=new we(yf,this,11,10)),this.q;case 12:return g3(this);case 13:return fS(this);case 14:return fS(this),this.r;case 15:return g3(this),this.k;case 16:return B0e(this);case 17:return UW(this);case 18:return kh(this);case 19:return Dz(this);case 20:return g3(this),this.o;case 21:return!this.s&&(this.s=new we(ns,this,21,17)),this.s;case 22:return Vu(this);case 23:return IW(this)}return Pl(this,n-dt((jn(),yb)),Mn((r=u(Xn(this,16),29),r||yb),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?WQ(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,6,i);case 11:return!this.q&&(this.q=new we(yf,this,11,10)),Co(this.q,n,i);case 21:return!this.s&&(this.s=new we(ns,this,21,17)),Co(this.s,n,i)}return o=u(Mn((r=u(Xn(this,16),29),r||(jn(),yb)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),yb)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 6:return hl(this,null,6,i);case 7:return!this.A&&(this.A=new rs(Fo,this,7)),vc(this.A,n,i);case 11:return!this.q&&(this.q=new we(yf,this,11,10)),vc(this.q,n,i);case 21:return!this.s&&(this.s=new we(ns,this,21,17)),vc(this.s,n,i);case 22:return vc(Vu(this),n,i)}return c=u(Mn((r=u(Xn(this,16),29),r||(jn(),yb)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),yb)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Gw(this);case 4:return!1;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!z9(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)!=0;case 9:return(this.Bb&512)!=0;case 10:return!!this.u&&Vu(this.u.a).i!=0&&!(this.n&&FQ(this.n));case 11:return!!this.q&&this.q.i!=0;case 12:return g3(this).i!=0;case 13:return fS(this).i!=0;case 14:return fS(this),this.r.i!=0;case 15:return g3(this),this.k.i!=0;case 16:return B0e(this).i!=0;case 17:return UW(this).i!=0;case 18:return kh(this).i!=0;case 19:return Dz(this).i!=0;case 20:return g3(this),!!this.o;case 21:return!!this.s&&this.s.i!=0;case 22:return!!this.n&&FQ(this.n);case 23:return IW(this).i!=0}return Ll(this,n-dt((jn(),yb)),Mn((t=u(Xn(this,16),29),t||yb),n))},s.Wh=function(n){var t;return t=this.i==null||this.q&&this.q.i!=0?null:ZO(this,n),t||Cge(this,n)},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:zR(this,Pt(t));return;case 2:AK(this,Pt(t));return;case 5:D8(this,Pt(t));return;case 7:!this.A&&(this.A=new rs(Fo,this,7)),kt(this.A),!this.A&&(this.A=new rs(Fo,this,7)),nr(this.A,u(t,18));return;case 8:H1e(this,Fe(ze(t)));return;case 9:G1e(this,Fe(ze(t)));return;case 10:dS(tu(this)),nr(tu(this),u(t,18));return;case 11:!this.q&&(this.q=new we(yf,this,11,10)),kt(this.q),!this.q&&(this.q=new we(yf,this,11,10)),nr(this.q,u(t,18));return;case 21:!this.s&&(this.s=new we(ns,this,21,17)),kt(this.s),!this.s&&(this.s=new we(ns,this,21,17)),nr(this.s,u(t,18));return;case 22:kt(Vu(this)),nr(Vu(this),u(t,18));return}Jl(this,n-dt((jn(),yb)),Mn((i=u(Xn(this,16),29),i||yb),n),t)},s.fi=function(){return jn(),yb},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:X(this.Cb,184)&&(u(this.Cb,184).tb=null),Mo(this,null);return;case 2:c8(this,null),K9(this,this.D);return;case 5:D8(this,null);return;case 7:!this.A&&(this.A=new rs(Fo,this,7)),kt(this.A);return;case 8:H1e(this,!1);return;case 9:G1e(this,!1);return;case 10:this.u&&dS(this.u);return;case 11:!this.q&&(this.q=new we(yf,this,11,10)),kt(this.q);return;case 21:!this.s&&(this.s=new we(ns,this,21,17)),kt(this.s);return;case 22:this.n&&kt(this.n);return}Fl(this,n-dt((jn(),yb)),Mn((t=u(Xn(this,16),29),t||yb),n))},s.mi=function(){var n,t;if(g3(this),fS(this),B0e(this),UW(this),kh(this),Dz(this),IW(this),yE(Tvn(Ms(this))),this.s)for(n=0,t=this.s.i;n=0;--t)K(this,t);return hde(this,n)},s.Ek=function(){kt(this)},s.Xi=function(n,t){return wBe(this,n,t)},v(Ri,"EcoreEList",623),m(491,623,au,PT),s.Ji=function(){return!1},s.Jj=function(){return this.c},s.Kj=function(){return!1},s.ml=function(){return!0},s.Qi=function(){return!0},s.Ui=function(n,t){return t},s.Wi=function(){return!1},s.c=0,v(Ri,"EObjectEList",491),m(81,491,au,mr),s.Kj=function(){return!0},s.kl=function(){return!1},s.$k=function(){return!0},v(Ri,"EObjectContainmentEList",81),m(543,81,au,B$),s.Li=function(){this.b=!0},s.Oj=function(){return this.b},s.Ek=function(){var n;kt(this),Fs(this.e)?(n=this.b,this.b=!1,hi(this.e,new Lf(this.e,2,this.c,n,!1))):this.b=!1},s.b=!1,v(Ri,"EObjectContainmentEList/Unsettable",543),m(1130,543,au,RIe),s.Ri=function(n,t){var i,r;return i=u(BE(this,n,t),87),Fs(this.e)&&f9(this,new rO(this.a,7,(jn(),Han),ke(t),(r=i.c,X(r,88)?u(r,29):jf),n)),i},s.Sj=function(n,t){return dEn(this,u(n,87),t)},s.Tj=function(n,t){return bEn(this,u(n,87),t)},s.Uj=function(n,t,i){return gAn(this,u(n,87),u(t,87),i)},s.Gj=function(n,t,i,r,c){switch(n){case 3:return bE(this,n,t,i,r,this.i>1);case 5:return bE(this,n,t,i,r,this.i-u(i,16).gc()>0);default:return new L1(this.e,n,this.c,t,i,r,!0)}},s.Rj=function(){return!0},s.Oj=function(){return FQ(this)},s.Ek=function(){kt(this)},v(Jn,"EClassImpl/1",1130),m(1144,1143,eme),s.bj=function(n){var t,i,r,c,o,l,f;if(i=n.ej(),i!=8){if(r=QEn(n),r==0)switch(i){case 1:case 9:{f=n.ij(),f!=null&&(t=Ms(u(f,471)),!t.c&&(t.c=new Ol),fB(t.c,n.hj())),l=n.gj(),l!=null&&(c=u(l,471),(c.Bb&1)==0&&(t=Ms(c),!t.c&&(t.c=new Ol),Et(t.c,u(n.hj(),29))));break}case 3:{l=n.gj(),l!=null&&(c=u(l,471),(c.Bb&1)==0&&(t=Ms(c),!t.c&&(t.c=new Ol),Et(t.c,u(n.hj(),29))));break}case 5:{if(l=n.gj(),l!=null)for(o=u(l,18).Jc();o.Ob();)c=u(o.Pb(),471),(c.Bb&1)==0&&(t=Ms(c),!t.c&&(t.c=new Ol),Et(t.c,u(n.hj(),29)));break}case 4:{f=n.ij(),f!=null&&(c=u(f,471),(c.Bb&1)==0&&(t=Ms(c),!t.c&&(t.c=new Ol),fB(t.c,n.hj())));break}case 6:{if(f=n.ij(),f!=null)for(o=u(f,18).Jc();o.Ob();)c=u(o.Pb(),471),(c.Bb&1)==0&&(t=Ms(c),!t.c&&(t.c=new Ol),fB(t.c,n.hj()));break}}this.ol(r)}},s.ol=function(n){MXe(this,n)},s.b=63,v(Jn,"ESuperAdapter",1144),m(1145,1144,eme,RSe),s.ol=function(n){Y2(this,n)},v(Jn,"EClassImpl/10",1145),m(1134,699,au),s.Ci=function(n,t){return fW(this,n,t)},s.Di=function(n){return oHe(this,n)},s.Ei=function(n,t){MO(this,n,t)},s.Fi=function(n){WT(this,n)},s.Yi=function(n){return phe(this,n)},s.Vi=function(n,t){return xY(this,n,t)},s.Uk=function(n,t){throw R(new _t)},s.Gi=function(){return new E4(this)},s.Hi=function(){return new ET(this)},s.Ii=function(n){return bO(this,n)},s.Vk=function(n,t){throw R(new _t)},s.Dk=function(n){return this},s.Oj=function(){return this.i!=0},s.Wb=function(n){throw R(new _t)},s.Ek=function(){throw R(new _t)},v(Ri,"EcoreEList/UnmodifiableEList",1134),m(333,1134,au,Pv),s.Wi=function(){return!1},v(Ri,"EcoreEList/UnmodifiableEList/FastCompare",333),m(1137,333,au,Pze),s.bd=function(n){var t,i,r;if(X(n,179)&&(t=u(n,179),i=t.Jj(),i!=-1)){for(r=this.i;i4)if(this.dk(n)){if(this.$k()){if(r=u(n,52),i=r.Bh(),f=i==this.b&&(this.kl()?r.vh(r.Ch(),u(Mn(Go(this.b),this.Jj()).Fk(),29).ik())==Oc(u(Mn(Go(this.b),this.Jj()),19)).n:-1-r.Ch()==this.Jj()),this.ll()&&!f&&!i&&r.Gh()){for(c=0;c1||r==-1)):!1},s.kl=function(){var n,t,i;return t=Mn(Go(this.b),this.Jj()),X(t,103)?(n=u(t,19),i=Oc(n),!!i):!1},s.ll=function(){var n,t;return t=Mn(Go(this.b),this.Jj()),X(t,103)?(n=u(t,19),(n.Bb&Ec)!=0):!1},s.bd=function(n){var t,i,r,c;if(r=this.xj(n),r>=0)return r;if(this.ml()){for(i=0,c=this.Cj();i=0;--n)oN(this,n,this.vj(n));return this.Dj()},s.Oc=function(n){var t;if(this.ll())for(t=this.Cj()-1;t>=0;--t)oN(this,t,this.vj(t));return this.Ej(n)},s.Ek=function(){dS(this)},s.Xi=function(n,t){return z$e(this,n,t)},v(Ri,"DelegatingEcoreEList",744),m(1140,744,rme,YOe),s.oj=function(n,t){Ppn(this,n,u(t,29))},s.pj=function(n){Ewn(this,u(n,29))},s.vj=function(n){var t,i;return t=u(K(Vu(this.a),n),87),i=t.c,X(i,88)?u(i,29):(jn(),jf)},s.Aj=function(n){var t,i;return t=u(Z2(Vu(this.a),n),87),i=t.c,X(i,88)?u(i,29):(jn(),jf)},s.Bj=function(n,t){return HSn(this,n,u(t,29))},s.Ji=function(){return!1},s.Gj=function(n,t,i,r,c){return null},s.qj=function(){return new FSe(this)},s.rj=function(){kt(Vu(this.a))},s.sj=function(n){return DFe(this,n)},s.tj=function(n){var t,i;for(i=n.Jc();i.Ob();)if(t=i.Pb(),!DFe(this,t))return!1;return!0},s.uj=function(n){var t,i,r;if(X(n,16)&&(r=u(n,16),r.gc()==Vu(this.a).i)){for(t=r.Jc(),i=new st(this);t.Ob();)if(ue(t.Pb())!==ue(ft(i)))return!1;return!0}return!1},s.wj=function(){var n,t,i,r,c;for(i=1,t=new st(Vu(this.a));t.e!=t.i.gc();)n=u(ft(t),87),r=(c=n.c,X(c,88)?u(c,29):(jn(),jf)),i=31*i+(r?jw(r):0);return i},s.xj=function(n){var t,i,r,c;for(r=0,i=new st(Vu(this.a));i.e!=i.i.gc();){if(t=u(ft(i),87),ue(n)===ue((c=t.c,X(c,88)?u(c,29):(jn(),jf))))return r;++r}return-1},s.yj=function(){return Vu(this.a).i==0},s.zj=function(){return null},s.Cj=function(){return Vu(this.a).i},s.Dj=function(){var n,t,i,r,c,o;for(o=Vu(this.a).i,c=se(Mr,On,1,o,5,1),i=0,t=new st(Vu(this.a));t.e!=t.i.gc();)n=u(ft(t),87),c[i++]=(r=n.c,X(r,88)?u(r,29):(jn(),jf));return c},s.Ej=function(n){var t,i,r,c,o,l,f;for(f=Vu(this.a).i,n.lengthf&&ir(n,f,null),r=0,i=new st(Vu(this.a));i.e!=i.i.gc();)t=u(ft(i),87),o=(l=t.c,X(l,88)?u(l,29):(jn(),jf)),ir(n,r++,o);return n},s.Fj=function(){var n,t,i,r,c;for(c=new vd,c.a+="[",n=Vu(this.a),t=0,r=Vu(this.a).i;t>16,c>=0?WQ(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,6,i);case 9:return!this.a&&(this.a=new we(ed,this,9,5)),Co(this.a,n,i)}return o=u(Mn((r=u(Xn(this,16),29),r||(jn(),kb)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),kb)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 6:return hl(this,null,6,i);case 7:return!this.A&&(this.A=new rs(Fo,this,7)),vc(this.A,n,i);case 9:return!this.a&&(this.a=new we(ed,this,9,5)),vc(this.a,n,i)}return c=u(Mn((r=u(Xn(this,16),29),r||(jn(),kb)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),kb)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Gw(this);case 4:return!!O1e(this);case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!z9(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)==0;case 9:return!!this.a&&this.a.i!=0}return Ll(this,n-dt((jn(),kb)),Mn((t=u(Xn(this,16),29),t||kb),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:zR(this,Pt(t));return;case 2:AK(this,Pt(t));return;case 5:D8(this,Pt(t));return;case 7:!this.A&&(this.A=new rs(Fo,this,7)),kt(this.A),!this.A&&(this.A=new rs(Fo,this,7)),nr(this.A,u(t,18));return;case 8:HB(this,Fe(ze(t)));return;case 9:!this.a&&(this.a=new we(ed,this,9,5)),kt(this.a),!this.a&&(this.a=new we(ed,this,9,5)),nr(this.a,u(t,18));return}Jl(this,n-dt((jn(),kb)),Mn((i=u(Xn(this,16),29),i||kb),n),t)},s.fi=function(){return jn(),kb},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:X(this.Cb,184)&&(u(this.Cb,184).tb=null),Mo(this,null);return;case 2:c8(this,null),K9(this,this.D);return;case 5:D8(this,null);return;case 7:!this.A&&(this.A=new rs(Fo,this,7)),kt(this.A);return;case 8:HB(this,!0);return;case 9:!this.a&&(this.a=new we(ed,this,9,5)),kt(this.a);return}Fl(this,n-dt((jn(),kb)),Mn((t=u(Xn(this,16),29),t||kb),n))},s.mi=function(){var n,t;if(this.a)for(n=0,t=this.a.i;n>16==5?u(this.Cb,675):null}return Pl(this,n-dt((jn(),n0)),Mn((r=u(Xn(this,16),29),r||n0),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 5:return this.Cb&&(i=(c=this.Db>>16,c>=0?_He(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,5,i)}return o=u(Mn((r=u(Xn(this,16),29),r||(jn(),n0)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),n0)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 5:return hl(this,null,5,i)}return c=u(Mn((r=u(Xn(this,16),29),r||(jn(),n0)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),n0)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.d!=0;case 3:return!!this.b;case 4:return this.c!=null;case 5:return!!(this.Db>>16==5&&u(this.Cb,675))}return Ll(this,n-dt((jn(),n0)),Mn((t=u(Xn(this,16),29),t||n0),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:Mo(this,Pt(t));return;case 2:IY(this,u(t,15).a);return;case 3:$qe(this,u(t,2001));return;case 4:_Y(this,Pt(t));return}Jl(this,n-dt((jn(),n0)),Mn((i=u(Xn(this,16),29),i||n0),n),t)},s.fi=function(){return jn(),n0},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:Mo(this,null);return;case 2:IY(this,0);return;case 3:$qe(this,null);return;case 4:_Y(this,null);return}Fl(this,n-dt((jn(),n0)),Mn((t=u(Xn(this,16),29),t||n0),n))},s.Ib=function(){var n;return n=this.c,n??this.zb},s.b=null,s.c=null,s.d=0,v(Jn,"EEnumLiteralImpl",568);var ezn=Gi(Jn,"EFactoryImpl/InternalEDateTimeFormat");m(485,1,{2076:1},KC),v(Jn,"EFactoryImpl/1ClientInternalEDateTimeFormat",485),m(248,118,{109:1,94:1,93:1,87:1,57:1,114:1,52:1,100:1,248:1,117:1,118:1},gw),s.zh=function(n,t,i){var r;return i=hl(this,n,t,i),this.e&&X(n,179)&&(r=Iz(this,this.e),r!=this.c&&(i=_8(this,r,i))),i},s.Ih=function(n,t,i){var r;switch(n){case 0:return this.f;case 1:return!this.d&&(this.d=new mr(Rc,this,1)),this.d;case 2:return t?Gz(this):this.c;case 3:return this.b;case 4:return this.e;case 5:return t?GQ(this):this.a}return Pl(this,n-dt((jn(),Ep)),Mn((r=u(Xn(this,16),29),r||Ep),n),t,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return vFe(this,null,i);case 1:return!this.d&&(this.d=new mr(Rc,this,1)),vc(this.d,n,i);case 3:return mFe(this,null,i)}return c=u(Mn((r=u(Xn(this,16),29),r||(jn(),Ep)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),Ep)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.f;case 1:return!!this.d&&this.d.i!=0;case 2:return!!this.c;case 3:return!!this.b;case 4:return!!this.e;case 5:return!!this.a}return Ll(this,n-dt((jn(),Ep)),Mn((t=u(Xn(this,16),29),t||Ep),n))},s.$h=function(n,t){var i;switch(n){case 0:ZHe(this,u(t,87));return;case 1:!this.d&&(this.d=new mr(Rc,this,1)),kt(this.d),!this.d&&(this.d=new mr(Rc,this,1)),nr(this.d,u(t,18));return;case 3:u0e(this,u(t,87));return;case 4:x0e(this,u(t,834));return;case 5:X9(this,u(t,143));return}Jl(this,n-dt((jn(),Ep)),Mn((i=u(Xn(this,16),29),i||Ep),n),t)},s.fi=function(){return jn(),Ep},s.hi=function(n){var t;switch(n){case 0:ZHe(this,null);return;case 1:!this.d&&(this.d=new mr(Rc,this,1)),kt(this.d);return;case 3:u0e(this,null);return;case 4:x0e(this,null);return;case 5:X9(this,null);return}Fl(this,n-dt((jn(),Ep)),Mn((t=u(Xn(this,16),29),t||Ep),n))},s.Ib=function(){var n;return n=new tl(Ff(this)),n.a+=" (expression: ",QW(this,n),n.a+=")",n.a};var Q8e;v(Jn,"EGenericTypeImpl",248),m(2029,2024,YF),s.Ei=function(n,t){WOe(this,n,t)},s.Uk=function(n,t){return WOe(this,this.gc(),n),t},s.Yi=function(n){return Yu(this.nj(),n)},s.Gi=function(){return this.Hi()},s.nj=function(){return new qSe(this)},s.Hi=function(){return this.Ii(0)},s.Ii=function(n){return this.nj().dd(n)},s.Vk=function(n,t){return H2(this,n,!0),t},s.Ri=function(n,t){var i,r;return r=nW(this,t),i=this.dd(n),i.Rb(r),r},s.Si=function(n,t){var i;H2(this,t,!0),i=this.dd(n),i.Rb(t)},v(Ri,"AbstractSequentialInternalEList",2029),m(482,2029,YF,ST),s.Yi=function(n){return Yu(this.nj(),n)},s.Gi=function(){return this.b==null?(Ed(),Ed(),iD):this.ql()},s.nj=function(){return new pTe(this.a,this.b)},s.Hi=function(){return this.b==null?(Ed(),Ed(),iD):this.ql()},s.Ii=function(n){var t,i;if(this.b==null){if(n<0||n>1)throw R(new jo(RS+n+", size=0"));return Ed(),Ed(),iD}for(i=this.ql(),t=0;t0;)if(t=this.c[--this.d],(!this.e||t.nk()!=K7||t.Jj()!=0)&&(!this.tl()||this.b.Uh(t))){if(o=this.b.Kh(t,this.sl()),this.f=(Tc(),u(t,69).vk()),this.f||t.Hk()){if(this.sl()?(r=u(o,16),this.k=r):(r=u(o,72),this.k=this.j=r),X(this.k,59)?(this.o=this.k.gc(),this.n=this.o):this.p=this.j?this.j.Ii(this.k.gc()):this.k.dd(this.k.gc()),this.p?QGe(this,this.p):oqe(this))return c=this.p?this.p.Ub():this.j?this.j.Yi(--this.n):this.k.Xb(--this.n),this.f?(n=u(c,75),n.Jk(),i=n.kd(),this.i=i):(i=c,this.i=i),this.g=-3,!0}else if(o!=null)return this.k=null,this.p=null,i=o,this.i=i,this.g=-2,!0}return this.k=null,this.p=null,this.g=-1,!1}else return c=this.p?this.p.Ub():this.j?this.j.Yi(--this.n):this.k.Xb(--this.n),this.f?(n=u(c,75),n.Jk(),i=n.kd(),this.i=i):(i=c,this.i=i),this.g=-3,!0}},s.Pb=function(){return IB(this)},s.Tb=function(){return this.a},s.Ub=function(){var n;if(this.g<-1||this.Sb())return--this.a,this.g=0,n=this.i,this.Sb(),n;throw R(new hu)},s.Vb=function(){return this.a-1},s.Qb=function(){throw R(new _t)},s.sl=function(){return!1},s.Wb=function(n){throw R(new _t)},s.tl=function(){return!0},s.a=0,s.d=0,s.f=!1,s.g=0,s.n=0,s.o=0;var iD;v(Ri,"EContentsEList/FeatureIteratorImpl",287),m(700,287,QF,ple),s.sl=function(){return!0},v(Ri,"EContentsEList/ResolvingFeatureIteratorImpl",700),m(1147,700,QF,_Oe),s.tl=function(){return!1},v(Jn,"ENamedElementImpl/1/1",1147),m(1148,287,QF,LOe),s.tl=function(){return!1},v(Jn,"ENamedElementImpl/1/2",1148),m(39,151,zN,_2,rY,Dr,mY,L1,Lf,The,yLe,Ohe,kLe,Gae,jLe,Dhe,ELe,qae,SLe,Nhe,xLe,oE,rO,RV,Ihe,ALe,Uae,MLe),s.Ij=function(){return ahe(this)},s.Pj=function(){var n;return n=ahe(this),n?n.gk():null},s.fj=function(n){return this.b==-1&&this.a&&(this.b=this.c.Eh(this.a.Jj(),this.a.nk())),this.c.vh(this.b,n)},s.hj=function(){return this.c},s.Qj=function(){var n;return n=ahe(this),n?n.rk():!1},s.b=-1,v(Jn,"ENotificationImpl",39),m(403,293,{109:1,94:1,93:1,158:1,197:1,57:1,62:1,114:1,470:1,52:1,100:1,161:1,403:1,293:1,117:1,118:1},yX),s.xh=function(n){return PHe(this,n)},s.Ih=function(n,t,i){var r,c,o;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $n(),(this.Bb&256)!=0;case 3:return $n(),(this.Bb&512)!=0;case 4:return ke(this.s);case 5:return ke(this.t);case 6:return $n(),o=this.t,o>1||o==-1;case 7:return $n(),c=this.s,c>=1;case 8:return t?ff(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?u(this.Cb,29):null;case 11:return!this.d&&(this.d=new rs(Fo,this,11)),this.d;case 12:return!this.c&&(this.c=new we(jp,this,12,10)),this.c;case 13:return!this.a&&(this.a=new CT(this,this)),this.a;case 14:return Ts(this)}return Pl(this,n-dt((jn(),t0)),Mn((r=u(Xn(this,16),29),r||t0),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 10:return this.Cb&&(i=(c=this.Db>>16,c>=0?PHe(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,10,i);case 12:return!this.c&&(this.c=new we(jp,this,12,10)),Co(this.c,n,i)}return o=u(Mn((r=u(Xn(this,16),29),r||(jn(),t0)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),t0)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 9:return SV(this,i);case 10:return hl(this,null,10,i);case 11:return!this.d&&(this.d=new rs(Fo,this,11)),vc(this.d,n,i);case 12:return!this.c&&(this.c=new we(jp,this,12,10)),vc(this.c,n,i);case 14:return vc(Ts(this),n,i)}return c=u(Mn((r=u(Xn(this,16),29),r||(jn(),t0)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),t0)),n,i)},s.Th=function(n){var t,i,r;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&Mw(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&Mw(this.q).i==0);case 10:return!!(this.Db>>16==10&&u(this.Cb,29));case 11:return!!this.d&&this.d.i!=0;case 12:return!!this.c&&this.c.i!=0;case 13:return!!this.a&&Ts(this.a.a).i!=0&&!(this.b&&JQ(this.b));case 14:return!!this.b&&JQ(this.b)}return Ll(this,n-dt((jn(),t0)),Mn((t=u(Xn(this,16),29),t||t0),n))},s.$h=function(n,t){var i,r;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:Mo(this,Pt(t));return;case 2:Ld(this,Fe(ze(t)));return;case 3:Pd(this,Fe(ze(t)));return;case 4:Nd(this,u(t,15).a);return;case 5:$2(this,u(t,15).a);return;case 8:cg(this,u(t,143));return;case 9:r=Fa(this,u(t,87),null),r&&r.mj();return;case 11:!this.d&&(this.d=new rs(Fo,this,11)),kt(this.d),!this.d&&(this.d=new rs(Fo,this,11)),nr(this.d,u(t,18));return;case 12:!this.c&&(this.c=new we(jp,this,12,10)),kt(this.c),!this.c&&(this.c=new we(jp,this,12,10)),nr(this.c,u(t,18));return;case 13:!this.a&&(this.a=new CT(this,this)),dS(this.a),!this.a&&(this.a=new CT(this,this)),nr(this.a,u(t,18));return;case 14:kt(Ts(this)),nr(Ts(this),u(t,18));return}Jl(this,n-dt((jn(),t0)),Mn((i=u(Xn(this,16),29),i||t0),n),t)},s.fi=function(){return jn(),t0},s.hi=function(n){var t,i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:Mo(this,null);return;case 2:Ld(this,!0);return;case 3:Pd(this,!0);return;case 4:Nd(this,0);return;case 5:$2(this,1);return;case 8:cg(this,null);return;case 9:i=Fa(this,null,null),i&&i.mj();return;case 11:!this.d&&(this.d=new rs(Fo,this,11)),kt(this.d);return;case 12:!this.c&&(this.c=new we(jp,this,12,10)),kt(this.c);return;case 13:this.a&&dS(this.a);return;case 14:this.b&&kt(this.b);return}Fl(this,n-dt((jn(),t0)),Mn((t=u(Xn(this,16),29),t||t0),n))},s.mi=function(){var n,t;if(this.c)for(n=0,t=this.c.i;nf&&ir(n,f,null),r=0,i=new st(Ts(this.a));i.e!=i.i.gc();)t=u(ft(i),87),o=(l=t.c,l||(jn(),rh)),ir(n,r++,o);return n},s.Fj=function(){var n,t,i,r,c;for(c=new vd,c.a+="[",n=Ts(this.a),t=0,r=Ts(this.a).i;t1);case 5:return bE(this,n,t,i,r,this.i-u(i,16).gc()>0);default:return new L1(this.e,n,this.c,t,i,r,!0)}},s.Rj=function(){return!0},s.Oj=function(){return JQ(this)},s.Ek=function(){kt(this)},v(Jn,"EOperationImpl/2",1331),m(493,1,{1999:1,493:1},YCe),v(Jn,"EPackageImpl/1",493),m(14,81,au,we),s.gl=function(){return this.d},s.hl=function(){return this.b},s.kl=function(){return!0},s.b=0,v(Ri,"EObjectContainmentWithInverseEList",14),m(361,14,au,x4),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectContainmentWithInverseEList/Resolving",361),m(312,361,au,x2),s.Li=function(){this.a.tb=null},v(Jn,"EPackageImpl/2",312),m(1243,1,{},Ss),v(Jn,"EPackageImpl/3",1243),m(721,44,v3,yoe),s._b=function(n){return $r(n)?BV(this,n):!!Xc(this.f,n)},v(Jn,"EPackageRegistryImpl",721),m(503,293,{109:1,94:1,93:1,158:1,197:1,57:1,2078:1,114:1,470:1,52:1,100:1,161:1,503:1,293:1,117:1,118:1},kX),s.xh=function(n){return $He(this,n)},s.Ih=function(n,t,i){var r,c,o;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $n(),(this.Bb&256)!=0;case 3:return $n(),(this.Bb&512)!=0;case 4:return ke(this.s);case 5:return ke(this.t);case 6:return $n(),o=this.t,o>1||o==-1;case 7:return $n(),c=this.s,c>=1;case 8:return t?ff(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?u(this.Cb,62):null}return Pl(this,n-dt((jn(),Km)),Mn((r=u(Xn(this,16),29),r||Km),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 10:return this.Cb&&(i=(c=this.Db>>16,c>=0?$He(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,10,i)}return o=u(Mn((r=u(Xn(this,16),29),r||(jn(),Km)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),Km)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 9:return SV(this,i);case 10:return hl(this,null,10,i)}return c=u(Mn((r=u(Xn(this,16),29),r||(jn(),Km)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),Km)),n,i)},s.Th=function(n){var t,i,r;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&Mw(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&Mw(this.q).i==0);case 10:return!!(this.Db>>16==10&&u(this.Cb,62))}return Ll(this,n-dt((jn(),Km)),Mn((t=u(Xn(this,16),29),t||Km),n))},s.fi=function(){return jn(),Km},v(Jn,"EParameterImpl",503),m(103,451,{109:1,94:1,93:1,158:1,197:1,57:1,19:1,179:1,69:1,114:1,470:1,52:1,100:1,161:1,103:1,451:1,293:1,117:1,118:1,682:1},kle),s.Ih=function(n,t,i){var r,c,o,l;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $n(),(this.Bb&256)!=0;case 3:return $n(),(this.Bb&512)!=0;case 4:return ke(this.s);case 5:return ke(this.t);case 6:return $n(),l=this.t,l>1||l==-1;case 7:return $n(),c=this.s,c>=1;case 8:return t?ff(this):this.r;case 9:return this.q;case 10:return $n(),(this.Bb&Gf)!=0;case 11:return $n(),(this.Bb&V0)!=0;case 12:return $n(),(this.Bb&cm)!=0;case 13:return this.j;case 14:return A8(this);case 15:return $n(),(this.Bb&as)!=0;case 16:return $n(),(this.Bb&jh)!=0;case 17:return O2(this);case 18:return $n(),(this.Bb&Ru)!=0;case 19:return $n(),o=Oc(this),!!(o&&(o.Bb&Ru)!=0);case 20:return $n(),(this.Bb&Ec)!=0;case 21:return t?Oc(this):this.b;case 22:return t?d1e(this):GPe(this);case 23:return!this.a&&(this.a=new Jv(qm,this,23)),this.a}return Pl(this,n-dt((jn(),i5)),Mn((r=u(Xn(this,16),29),r||i5),n),t,i)},s.Th=function(n){var t,i,r,c;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return c=this.t,c>1||c==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&Mw(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&Mw(this.q).i==0);case 10:return(this.Bb&Gf)==0;case 11:return(this.Bb&V0)!=0;case 12:return(this.Bb&cm)!=0;case 13:return this.j!=null;case 14:return A8(this)!=null;case 15:return(this.Bb&as)!=0;case 16:return(this.Bb&jh)!=0;case 17:return!!O2(this);case 18:return(this.Bb&Ru)!=0;case 19:return r=Oc(this),!!r&&(r.Bb&Ru)!=0;case 20:return(this.Bb&Ec)==0;case 21:return!!this.b;case 22:return!!GPe(this);case 23:return!!this.a&&this.a.i!=0}return Ll(this,n-dt((jn(),i5)),Mn((t=u(Xn(this,16),29),t||i5),n))},s.$h=function(n,t){var i,r;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:XV(this,Pt(t));return;case 2:Ld(this,Fe(ze(t)));return;case 3:Pd(this,Fe(ze(t)));return;case 4:Nd(this,u(t,15).a);return;case 5:$2(this,u(t,15).a);return;case 8:cg(this,u(t,143));return;case 9:r=Fa(this,u(t,87),null),r&&r.mj();return;case 10:l8(this,Fe(ze(t)));return;case 11:h8(this,Fe(ze(t)));return;case 12:a8(this,Fe(ze(t)));return;case 13:Dse(this,Pt(t));return;case 15:f8(this,Fe(ze(t)));return;case 16:d8(this,Fe(ze(t)));return;case 18:L4n(this,Fe(ze(t)));return;case 20:Y1e(this,Fe(ze(t)));return;case 21:Khe(this,u(t,19));return;case 23:!this.a&&(this.a=new Jv(qm,this,23)),kt(this.a),!this.a&&(this.a=new Jv(qm,this,23)),nr(this.a,u(t,18));return}Jl(this,n-dt((jn(),i5)),Mn((i=u(Xn(this,16),29),i||i5),n),t)},s.fi=function(){return jn(),i5},s.hi=function(n){var t,i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:X(this.Cb,88)&&Y2(Ms(u(this.Cb,88)),4),Mo(this,null);return;case 2:Ld(this,!0);return;case 3:Pd(this,!0);return;case 4:Nd(this,0);return;case 5:$2(this,1);return;case 8:cg(this,null);return;case 9:i=Fa(this,null,null),i&&i.mj();return;case 10:l8(this,!0);return;case 11:h8(this,!1);return;case 12:a8(this,!1);return;case 13:this.i=null,xB(this,null);return;case 15:f8(this,!1);return;case 16:d8(this,!1);return;case 18:Q1e(this,!1),X(this.Cb,88)&&Y2(Ms(u(this.Cb,88)),2);return;case 20:Y1e(this,!0);return;case 21:Khe(this,null);return;case 23:!this.a&&(this.a=new Jv(qm,this,23)),kt(this.a);return}Fl(this,n-dt((jn(),i5)),Mn((t=u(Xn(this,16),29),t||i5),n))},s.mi=function(){d1e(this),$9(Vc((ls(),nc),this)),ff(this),this.Bb|=1},s.sk=function(){return Oc(this)},s.Zk=function(){var n;return n=Oc(this),!!n&&(n.Bb&Ru)!=0},s.$k=function(){return(this.Bb&Ru)!=0},s._k=function(){return(this.Bb&Ec)!=0},s.Wk=function(n,t){return this.c=null,z1e(this,n,t)},s.Ib=function(){var n;return(this.Db&64)!=0?Jz(this):(n=new cf(Jz(this)),n.a+=" (containment: ",yd(n,(this.Bb&Ru)!=0),n.a+=", resolveProxies: ",yd(n,(this.Bb&Ec)!=0),n.a+=")",n.a)},v(Jn,"EReferenceImpl",103),m(549,118,{109:1,45:1,94:1,93:1,136:1,57:1,114:1,52:1,100:1,549:1,117:1,118:1},$h),s.Fb=function(n){return this===n},s.jd=function(){return this.b},s.kd=function(){return this.c},s.Hb=function(){return jw(this)},s.Ai=function(n){Qvn(this,Pt(n))},s.ld=function(n){return zvn(this,Pt(n))},s.Ih=function(n,t,i){var r;switch(n){case 0:return this.b;case 1:return this.c}return Pl(this,n-dt((jn(),Ac)),Mn((r=u(Xn(this,16),29),r||Ac),n),t,i)},s.Th=function(n){var t;switch(n){case 0:return this.b!=null;case 1:return this.c!=null}return Ll(this,n-dt((jn(),Ac)),Mn((t=u(Xn(this,16),29),t||Ac),n))},s.$h=function(n,t){var i;switch(n){case 0:Wvn(this,Pt(t));return;case 1:Jhe(this,Pt(t));return}Jl(this,n-dt((jn(),Ac)),Mn((i=u(Xn(this,16),29),i||Ac),n),t)},s.fi=function(){return jn(),Ac},s.hi=function(n){var t;switch(n){case 0:qhe(this,null);return;case 1:Jhe(this,null);return}Fl(this,n-dt((jn(),Ac)),Mn((t=u(Xn(this,16),29),t||Ac),n))},s.yi=function(){var n;return this.a==-1&&(n=this.b,this.a=n==null?0:Id(n)),this.a},s.zi=function(n){this.a=n},s.Ib=function(){var n;return(this.Db&64)!=0?Ff(this):(n=new cf(Ff(this)),n.a+=" (key: ",Bc(n,this.b),n.a+=", value: ",Bc(n,this.c),n.a+=")",n.a)},s.a=-1,s.b=null,s.c=null;var Du=v(Jn,"EStringToStringMapEntryImpl",549),Zan=Gi(Ri,"FeatureMap/Entry/Internal");m(562,1,WF),s.vl=function(n){return this.wl(u(n,52))},s.wl=function(n){return this.vl(n)},s.Fb=function(n){var t,i;return this===n?!0:X(n,75)?(t=u(n,75),t.Jk()==this.c?(i=this.kd(),i==null?t.kd()==null:gi(i,t.kd())):!1):!1},s.Jk=function(){return this.c},s.Hb=function(){var n;return n=this.kd(),Ni(this.c)^(n==null?0:Ni(n))},s.Ib=function(){var n,t;return n=this.c,t=ol(n.ok()).vi(),n.ve(),(t!=null&&t.length!=0?t+":"+n.ve():n.ve())+"="+this.kd()},v(Jn,"EStructuralFeatureImpl/BasicFeatureMapEntry",562),m(777,562,WF,Mle),s.wl=function(n){return new Mle(this.c,n)},s.kd=function(){return this.a},s.xl=function(n,t,i){return E7n(this,n,this.a,t,i)},s.yl=function(n,t,i){return S7n(this,n,this.a,t,i)},v(Jn,"EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry",777),m(1304,1,{},QCe),s.wk=function(n,t,i,r,c){var o;return o=u(H9(n,this.b),219),o.Wl(this.a).Dk(r)},s.xk=function(n,t,i,r,c){var o;return o=u(H9(n,this.b),219),o.Nl(this.a,r,c)},s.yk=function(n,t,i,r,c){var o;return o=u(H9(n,this.b),219),o.Ol(this.a,r,c)},s.zk=function(n,t,i){var r;return r=u(H9(n,this.b),219),r.Wl(this.a).Oj()},s.Ak=function(n,t,i,r){var c;c=u(H9(n,this.b),219),c.Wl(this.a).Wb(r)},s.Bk=function(n,t,i){return u(H9(n,this.b),219).Wl(this.a)},s.Ck=function(n,t,i){var r;r=u(H9(n,this.b),219),r.Wl(this.a).Ek()},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator",1304),m(89,1,{},xd,Ub,Md,Wb),s.wk=function(n,t,i,r,c){var o;if(o=t.ii(i),o==null&&t.ji(i,o=eF(this,n)),!c)switch(this.e){case 50:case 41:return u(o,586)._j();case 40:return u(o,219).Tl()}return o},s.xk=function(n,t,i,r,c){var o,l;return l=t.ii(i),l==null&&t.ji(i,l=eF(this,n)),o=u(l,72).Uk(r,c),o},s.yk=function(n,t,i,r,c){var o;return o=t.ii(i),o!=null&&(c=u(o,72).Vk(r,c)),c},s.zk=function(n,t,i){var r;return r=t.ii(i),r!=null&&u(r,77).Oj()},s.Ak=function(n,t,i,r){var c;c=u(t.ii(i),77),!c&&t.ji(i,c=eF(this,n)),c.Wb(r)},s.Bk=function(n,t,i){var r,c;return c=t.ii(i),c==null&&t.ji(i,c=eF(this,n)),X(c,77)?u(c,77):(r=u(t.ii(i),16),new HSe(r))},s.Ck=function(n,t,i){var r;r=u(t.ii(i),77),!r&&t.ji(i,r=eF(this,n)),r.Ek()},s.b=0,s.e=0,v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateMany",89),m(498,1,{}),s.xk=function(n,t,i,r,c){throw R(new _t)},s.yk=function(n,t,i,r,c){throw R(new _t)},s.Bk=function(n,t,i){return new KDe(this,n,t,i)};var d1;v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingle",498),m(1321,1,Lne,KDe),s.Dk=function(n){return this.a.wk(this.c,this.d,this.b,n,!0)},s.Oj=function(){return this.a.zk(this.c,this.d,this.b)},s.Wb=function(n){this.a.Ak(this.c,this.d,this.b,n)},s.Ek=function(){this.a.Ck(this.c,this.d,this.b)},s.b=0,v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingle/1",1321),m(770,498,{},bae),s.wk=function(n,t,i,r,c){return RW(n,n.Mh(),n.Ch())==this.b?this._k()&&r?xW(n):n.Mh():null},s.xk=function(n,t,i,r,c){var o,l;return n.Mh()&&(c=(o=n.Ch(),o>=0?n.xh(c):n.Mh().Qh(n,-1-o,null,c))),l=Ji(n.Ah(),this.e),n.zh(r,l,c)},s.yk=function(n,t,i,r,c){var o;return o=Ji(n.Ah(),this.e),n.zh(null,o,c)},s.zk=function(n,t,i){var r;return r=Ji(n.Ah(),this.e),!!n.Mh()&&n.Ch()==r},s.Ak=function(n,t,i,r){var c,o,l,f,h;if(r!=null&&!JW(this.a,r))throw R(new a9(ZF+(X(r,57)?c0e(u(r,57).Ah()):xhe(Us(r)))+eJ+this.a+"'"));if(c=n.Mh(),l=Ji(n.Ah(),this.e),ue(r)!==ue(c)||n.Ch()!=l&&r!=null){if(m8(n,u(r,57)))throw R(new qn(PS+n.Ib()));h=null,c&&(h=(o=n.Ch(),o>=0?n.xh(h):n.Mh().Qh(n,-1-o,null,h))),f=u(r,52),f&&(h=f.Oh(n,Ji(f.Ah(),this.b),null,h)),h=n.zh(f,l,h),h&&h.mj()}else n.sh()&&n.th()&&hi(n,new Dr(n,1,l,r,r))},s.Ck=function(n,t,i){var r,c,o,l;r=n.Mh(),r?(l=(c=n.Ch(),c>=0?n.xh(null):n.Mh().Qh(n,-1-c,null,null)),o=Ji(n.Ah(),this.e),l=n.zh(null,o,l),l&&l.mj()):n.sh()&&n.th()&&hi(n,new oE(n,1,this.e,null,null))},s._k=function(){return!1},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainer",770),m(1305,770,{},zNe),s._k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving",1305),m(560,498,{}),s.wk=function(n,t,i,r,c){var o;return o=t.ii(i),o==null?this.b:ue(o)===ue(d1)?null:o},s.zk=function(n,t,i){var r;return r=t.ii(i),r!=null&&(ue(r)===ue(d1)||!gi(r,this.b))},s.Ak=function(n,t,i,r){var c,o;n.sh()&&n.th()?(c=(o=t.ii(i),o==null?this.b:ue(o)===ue(d1)?null:o),r==null?this.c!=null?(t.ji(i,null),r=this.b):this.b!=null?t.ji(i,d1):t.ji(i,null):(this.zl(r),t.ji(i,r)),hi(n,this.d.Al(n,1,this.e,c,r))):r==null?this.c!=null?t.ji(i,null):this.b!=null?t.ji(i,d1):t.ji(i,null):(this.zl(r),t.ji(i,r))},s.Ck=function(n,t,i){var r,c;n.sh()&&n.th()?(r=(c=t.ii(i),c==null?this.b:ue(c)===ue(d1)?null:c),t.ki(i),hi(n,this.d.Al(n,1,this.e,r,this.b))):t.ki(i)},s.zl=function(n){throw R(new ZSe)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData",560),m(C3,1,{},sw),s.Al=function(n,t,i,r,c){return new oE(n,t,i,r,c)},s.Bl=function(n,t,i,r,c,o){return new RV(n,t,i,r,c,o)};var W8e,Z8e,e7e,n7e,t7e,i7e,r7e,Hce,c7e;v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator",C3),m(1322,C3,{},SL),s.Al=function(n,t,i,r,c){return new Uae(n,t,i,Fe(ze(r)),Fe(ze(c)))},s.Bl=function(n,t,i,r,c,o){return new MLe(n,t,i,Fe(ze(r)),Fe(ze(c)),o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1",1322),m(1323,C3,{},xL),s.Al=function(n,t,i,r,c){return new The(n,t,i,u(r,221).a,u(c,221).a)},s.Bl=function(n,t,i,r,c,o){return new yLe(n,t,i,u(r,221).a,u(c,221).a,o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2",1323),m(1324,C3,{},AL),s.Al=function(n,t,i,r,c){return new Ohe(n,t,i,u(r,180).a,u(c,180).a)},s.Bl=function(n,t,i,r,c,o){return new kLe(n,t,i,u(r,180).a,u(c,180).a,o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3",1324),m(1325,C3,{},bU),s.Al=function(n,t,i,r,c){return new Gae(n,t,i,ne(re(r)),ne(re(c)))},s.Bl=function(n,t,i,r,c,o){return new jLe(n,t,i,ne(re(r)),ne(re(c)),o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4",1325),m(1326,C3,{},Hk),s.Al=function(n,t,i,r,c){return new Dhe(n,t,i,u(r,164).a,u(c,164).a)},s.Bl=function(n,t,i,r,c,o){return new ELe(n,t,i,u(r,164).a,u(c,164).a,o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5",1326),m(1327,C3,{},Rh),s.Al=function(n,t,i,r,c){return new qae(n,t,i,u(r,15).a,u(c,15).a)},s.Bl=function(n,t,i,r,c,o){return new SLe(n,t,i,u(r,15).a,u(c,15).a,o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6",1327),m(1328,C3,{},g0),s.Al=function(n,t,i,r,c){return new Nhe(n,t,i,u(r,190).a,u(c,190).a)},s.Bl=function(n,t,i,r,c,o){return new xLe(n,t,i,u(r,190).a,u(c,190).a,o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7",1328),m(1329,C3,{},ML),s.Al=function(n,t,i,r,c){return new Ihe(n,t,i,u(r,191).a,u(c,191).a)},s.Bl=function(n,t,i,r,c,o){return new ALe(n,t,i,u(r,191).a,u(c,191).a,o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8",1329),m(1307,560,{},WDe),s.zl=function(n){if(!this.a.dk(n))throw R(new a9(ZF+Us(n)+eJ+this.a+"'"))},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic",1307),m(1308,560,{},PIe),s.zl=function(n){},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic",1308),m(771,560,{}),s.zk=function(n,t,i){var r;return r=t.ii(i),r!=null},s.Ak=function(n,t,i,r){var c,o;n.sh()&&n.th()?(c=!0,o=t.ii(i),o==null?(c=!1,o=this.b):ue(o)===ue(d1)&&(o=null),r==null?this.c!=null?(t.ji(i,null),r=this.b):t.ji(i,d1):(this.zl(r),t.ji(i,r)),hi(n,this.d.Bl(n,1,this.e,o,r,!c))):r==null?this.c!=null?t.ji(i,null):t.ji(i,d1):(this.zl(r),t.ji(i,r))},s.Ck=function(n,t,i){var r,c;n.sh()&&n.th()?(r=!0,c=t.ii(i),c==null?(r=!1,c=this.b):ue(c)===ue(d1)&&(c=null),t.ki(i),hi(n,this.d.Bl(n,2,this.e,c,this.b,r))):t.ki(i)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable",771),m(1309,771,{},ZDe),s.zl=function(n){if(!this.a.dk(n))throw R(new a9(ZF+Us(n)+eJ+this.a+"'"))},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic",1309),m(1310,771,{},$Ie),s.zl=function(n){},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic",1310),m(402,498,{},fR),s.wk=function(n,t,i,r,c){var o,l,f,h,b;if(b=t.ii(i),this.rk()&&ue(b)===ue(d1))return null;if(this._k()&&r&&b!=null){if(f=u(b,52),f.Sh()&&(h=z0(n,f),f!=h)){if(!JW(this.a,h))throw R(new a9(ZF+Us(h)+eJ+this.a+"'"));t.ji(i,b=h),this.$k()&&(o=u(h,52),l=f.Qh(n,this.b?Ji(f.Ah(),this.b):-1-Ji(n.Ah(),this.e),null,null),!o.Mh()&&(l=o.Oh(n,this.b?Ji(o.Ah(),this.b):-1-Ji(n.Ah(),this.e),null,l)),l&&l.mj()),n.sh()&&n.th()&&hi(n,new oE(n,9,this.e,f,h))}return b}else return b},s.xk=function(n,t,i,r,c){var o,l;return l=t.ii(i),ue(l)===ue(d1)&&(l=null),t.ji(i,r),this.Kj()?ue(l)!==ue(r)&&l!=null&&(o=u(l,52),c=o.Qh(n,Ji(o.Ah(),this.b),null,c)):this.$k()&&l!=null&&(c=u(l,52).Qh(n,-1-Ji(n.Ah(),this.e),null,c)),n.sh()&&n.th()&&(!c&&(c=new k0(4)),c.lj(new oE(n,1,this.e,l,r))),c},s.yk=function(n,t,i,r,c){var o;return o=t.ii(i),ue(o)===ue(d1)&&(o=null),t.ki(i),n.sh()&&n.th()&&(!c&&(c=new k0(4)),this.rk()?c.lj(new oE(n,2,this.e,o,null)):c.lj(new oE(n,1,this.e,o,null))),c},s.zk=function(n,t,i){var r;return r=t.ii(i),r!=null},s.Ak=function(n,t,i,r){var c,o,l,f,h;if(r!=null&&!JW(this.a,r))throw R(new a9(ZF+(X(r,57)?c0e(u(r,57).Ah()):xhe(Us(r)))+eJ+this.a+"'"));h=t.ii(i),f=h!=null,this.rk()&&ue(h)===ue(d1)&&(h=null),l=null,this.Kj()?ue(h)!==ue(r)&&(h!=null&&(c=u(h,52),l=c.Qh(n,Ji(c.Ah(),this.b),null,l)),r!=null&&(c=u(r,52),l=c.Oh(n,Ji(c.Ah(),this.b),null,l))):this.$k()&&ue(h)!==ue(r)&&(h!=null&&(l=u(h,52).Qh(n,-1-Ji(n.Ah(),this.e),null,l)),r!=null&&(l=u(r,52).Oh(n,-1-Ji(n.Ah(),this.e),null,l))),r==null&&this.rk()?t.ji(i,d1):t.ji(i,r),n.sh()&&n.th()?(o=new RV(n,1,this.e,h,r,this.rk()&&!f),l?(l.lj(o),l.mj()):hi(n,o)):l&&l.mj()},s.Ck=function(n,t,i){var r,c,o,l,f;f=t.ii(i),l=f!=null,this.rk()&&ue(f)===ue(d1)&&(f=null),o=null,f!=null&&(this.Kj()?(r=u(f,52),o=r.Qh(n,Ji(r.Ah(),this.b),null,o)):this.$k()&&(o=u(f,52).Qh(n,-1-Ji(n.Ah(),this.e),null,o))),t.ki(i),n.sh()&&n.th()?(c=new RV(n,this.rk()?2:1,this.e,f,null,l),o?(o.lj(c),o.mj()):hi(n,c)):o&&o.mj()},s.Kj=function(){return!1},s.$k=function(){return!1},s._k=function(){return!1},s.rk=function(){return!1},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObject",402),m(561,402,{},BK),s.$k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment",561),m(1313,561,{},$Oe),s._k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving",1313),m(773,561,{},mle),s.rk=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable",773),m(1315,773,{},ROe),s._k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving",1315),m(638,561,{},ZK),s.Kj=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse",638),m(1314,638,{},FNe),s._k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving",1314),m(774,638,{},Zle),s.rk=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable",774),m(1316,774,{},JNe),s._k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving",1316),m(639,402,{},vle),s._k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving",639),m(1317,639,{},BOe),s.rk=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable",1317),m(775,639,{},efe),s.Kj=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse",775),m(1318,775,{},HNe),s.rk=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable",1318),m(1311,402,{},zOe),s.rk=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable",1311),m(772,402,{},nfe),s.Kj=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse",772),m(1312,772,{},GNe),s.rk=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable",1312),m(776,562,WF,Qfe),s.wl=function(n){return new Qfe(this.a,this.c,n)},s.kd=function(){return this.b},s.xl=function(n,t,i){return y9n(this,n,this.b,i)},s.yl=function(n,t,i){return k9n(this,n,this.b,i)},v(Jn,"EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry",776),m(1319,1,Lne,HSe),s.Dk=function(n){return this.a},s.Oj=function(){return X(this.a,98)?u(this.a,98).Oj():!this.a.dc()},s.Wb=function(n){this.a.$b(),this.a.Fc(u(n,16))},s.Ek=function(){X(this.a,98)?u(this.a,98).Ek():this.a.$b()},v(Jn,"EStructuralFeatureImpl/SettingMany",1319),m(1320,562,WF,wPe),s.vl=function(n){return new JK((Si(),hA),this.b.oi(this.a,n))},s.kd=function(){return null},s.xl=function(n,t,i){return i},s.yl=function(n,t,i){return i},v(Jn,"EStructuralFeatureImpl/SimpleContentFeatureMapEntry",1320),m(640,562,WF,JK),s.vl=function(n){return new JK(this.c,n)},s.kd=function(){return this.a},s.xl=function(n,t,i){return i},s.yl=function(n,t,i){return i},v(Jn,"EStructuralFeatureImpl/SimpleFeatureMapEntry",640),m(396,492,Th,Ol),s.$i=function(n){return se(vf,On,29,n,0,1)},s.Wi=function(){return!1},v(Jn,"ESuperAdapter/1",396),m(446,439,{109:1,94:1,93:1,158:1,197:1,57:1,114:1,834:1,52:1,100:1,161:1,446:1,117:1,118:1},Gk),s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return!this.a&&(this.a=new iE(this,Rc,this)),this.a}return Pl(this,n-dt((jn(),Sp)),Mn((r=u(Xn(this,16),29),r||Sp),n),t,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 2:return!this.a&&(this.a=new iE(this,Rc,this)),vc(this.a,n,i)}return c=u(Mn((r=u(Xn(this,16),29),r||(jn(),Sp)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),Sp)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!!this.a&&this.a.i!=0}return Ll(this,n-dt((jn(),Sp)),Mn((t=u(Xn(this,16),29),t||Sp),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:Mo(this,Pt(t));return;case 2:!this.a&&(this.a=new iE(this,Rc,this)),kt(this.a),!this.a&&(this.a=new iE(this,Rc,this)),nr(this.a,u(t,18));return}Jl(this,n-dt((jn(),Sp)),Mn((i=u(Xn(this,16),29),i||Sp),n),t)},s.fi=function(){return jn(),Sp},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:Mo(this,null);return;case 2:!this.a&&(this.a=new iE(this,Rc,this)),kt(this.a);return}Fl(this,n-dt((jn(),Sp)),Mn((t=u(Xn(this,16),29),t||Sp),n))},v(Jn,"ETypeParameterImpl",446),m(447,81,au,iE),s.Lj=function(n,t){return hMn(this,u(n,87),t)},s.Mj=function(n,t){return dMn(this,u(n,87),t)},v(Jn,"ETypeParameterImpl/1",447),m(637,44,v3,jX),s.ec=function(){return new IP(this)},v(Jn,"ETypeParameterImpl/2",637),m(557,Ga,fs,IP),s.Ec=function(n){return vNe(this,u(n,87))},s.Fc=function(n){var t,i,r;for(r=!1,i=n.Jc();i.Ob();)t=u(i.Pb(),87),ei(this.a,t,"")==null&&(r=!0);return r},s.$b=function(){Hu(this.a)},s.Gc=function(n){return so(this.a,n)},s.Jc=function(){var n;return n=new B2(new sn(this.a).a),new DP(n)},s.Kc=function(n){return t$e(this,n)},s.gc=function(){return Aj(this.a)},v(Jn,"ETypeParameterImpl/2/1",557),m(558,1,Fr,DP),s.Nb=function(n){Zr(this,n)},s.Pb=function(){return u(t3(this.a).jd(),87)},s.Ob=function(){return this.a.b},s.Qb=function(){wRe(this.a)},v(Jn,"ETypeParameterImpl/2/1/1",558),m(1281,44,v3,Ixe),s._b=function(n){return $r(n)?BV(this,n):!!Xc(this.f,n)},s.xc=function(n){var t,i;return t=$r(n)?lo(this,n):bu(Xc(this.f,n)),X(t,835)?(i=u(t,835),t=i.Ik(),ei(this,u(n,241),t),t):t??(n==null?(zX(),nhn):null)},v(Jn,"EValidatorRegistryImpl",1281),m(1303,710,{109:1,94:1,93:1,469:1,158:1,57:1,114:1,2002:1,52:1,100:1,161:1,117:1,118:1},lw),s.oi=function(n,t){switch(n.fk()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return t==null?null:fu(t);case 25:return I8n(t);case 27:return X9n(t);case 28:return K9n(t);case 29:return t==null?null:JTe(uA[0],u(t,205));case 41:return t==null?"":Pb(u(t,298));case 42:return fu(t);case 50:return Pt(t);default:throw R(new qn(u7+n.ve()+up))}},s.pi=function(n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B;switch(n.G==-1&&(n.G=(S=ol(n),S?$d(S.si(),n):-1)),n.G){case 0:return i=new vX,i;case 1:return t=new Nb,t;case 2:return r=new rj,r;case 4:return c=new PP,c;case 5:return o=new Nxe,o;case 6:return l=new KSe,l;case 7:return f=new IC,f;case 10:return b=new jv,b;case 11:return p=new yX,p;case 12:return y=new u_e,y;case 13:return A=new kX,A;case 14:return O=new kle,O;case 17:return D=new $h,D;case 18:return h=new gw,h;case 19:return B=new Gk,B;default:throw R(new qn(vne+n.zb+up))}},s.qi=function(n,t){switch(n.fk()){case 20:return t==null?null:new Joe(t);case 21:return t==null?null:new A0(t);case 23:case 22:return t==null?null:OEn(t);case 26:case 24:return t==null?null:fO(al(t,-128,127)<<24>>24);case 25:return AOn(t);case 27:return hxn(t);case 28:return dxn(t);case 29:return IMn(t);case 32:case 31:return t==null?null:K2(t);case 38:case 37:return t==null?null:new aoe(t);case 40:case 39:return t==null?null:ke(al(t,Xr,oi));case 41:return null;case 42:return t==null,null;case 44:case 43:return t==null?null:q2(Zz(t));case 49:case 48:return t==null?null:o8(al(t,nJ,32767)<<16>>16);case 50:return t;default:throw R(new qn(u7+n.ve()+up))}},v(Jn,"EcoreFactoryImpl",1303),m(548,184,{109:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,2e3:1,52:1,100:1,161:1,184:1,548:1,117:1,118:1,680:1},NDe),s.gb=!1,s.hb=!1;var u7e,ehn=!1;v(Jn,"EcorePackageImpl",548),m(1199,1,{835:1},Ev),s.Ik=function(){return aOe(),thn},v(Jn,"EcorePackageImpl/1",1199),m(1208,1,ii,fw),s.dk=function(n){return X(n,158)},s.ek=function(n){return se(ZI,On,158,n,0,1)},v(Jn,"EcorePackageImpl/10",1208),m(1209,1,ii,rC),s.dk=function(n){return X(n,197)},s.ek=function(n){return se(_ce,On,197,n,0,1)},v(Jn,"EcorePackageImpl/11",1209),m(1210,1,ii,cC),s.dk=function(n){return X(n,57)},s.ek=function(n){return se(vb,On,57,n,0,1)},v(Jn,"EcorePackageImpl/12",1210),m(1211,1,ii,w0),s.dk=function(n){return X(n,403)},s.ek=function(n){return se(yf,ime,62,n,0,1)},v(Jn,"EcorePackageImpl/13",1211),m(1212,1,ii,CL),s.dk=function(n){return X(n,241)},s.ek=function(n){return se(Aa,On,241,n,0,1)},v(Jn,"EcorePackageImpl/14",1212),m(1213,1,ii,G5),s.dk=function(n){return X(n,503)},s.ek=function(n){return se(jp,On,2078,n,0,1)},v(Jn,"EcorePackageImpl/15",1213),m(1214,1,ii,U6),s.dk=function(n){return X(n,103)},s.ek=function(n){return se(Um,M3,19,n,0,1)},v(Jn,"EcorePackageImpl/16",1214),m(1215,1,ii,X6),s.dk=function(n){return X(n,179)},s.ek=function(n){return se(ns,M3,179,n,0,1)},v(Jn,"EcorePackageImpl/17",1215),m(1216,1,ii,q5),s.dk=function(n){return X(n,470)},s.ek=function(n){return se(Gm,On,470,n,0,1)},v(Jn,"EcorePackageImpl/18",1216),m(1217,1,ii,TL),s.dk=function(n){return X(n,549)},s.ek=function(n){return se(Du,zZe,549,n,0,1)},v(Jn,"EcorePackageImpl/19",1217),m(1200,1,ii,OL),s.dk=function(n){return X(n,335)},s.ek=function(n){return se(qm,M3,38,n,0,1)},v(Jn,"EcorePackageImpl/2",1200),m(1218,1,ii,K6),s.dk=function(n){return X(n,248)},s.ek=function(n){return se(Rc,ien,87,n,0,1)},v(Jn,"EcorePackageImpl/20",1218),m(1219,1,ii,NL),s.dk=function(n){return X(n,446)},s.ek=function(n){return se(Fo,On,834,n,0,1)},v(Jn,"EcorePackageImpl/21",1219),m(1220,1,ii,qk),s.dk=function(n){return b2(n)},s.ek=function(n){return se(Qi,Me,473,n,8,1)},v(Jn,"EcorePackageImpl/22",1220),m(1221,1,ii,IL),s.dk=function(n){return X(n,195)},s.ek=function(n){return se(ds,Me,195,n,0,2)},v(Jn,"EcorePackageImpl/23",1221),m(1222,1,ii,gU),s.dk=function(n){return X(n,221)},s.ek=function(n){return se(jy,Me,221,n,0,1)},v(Jn,"EcorePackageImpl/24",1222),m(1223,1,ii,wU),s.dk=function(n){return X(n,180)},s.ek=function(n){return se(KS,Me,180,n,0,1)},v(Jn,"EcorePackageImpl/25",1223),m(1224,1,ii,Ju),s.dk=function(n){return X(n,205)},s.ek=function(n){return se(aJ,Me,205,n,0,1)},v(Jn,"EcorePackageImpl/26",1224),m(1225,1,ii,Do),s.dk=function(n){return!1},s.ek=function(n){return se(S7e,On,2174,n,0,1)},v(Jn,"EcorePackageImpl/27",1225),m(1226,1,ii,Hc),s.dk=function(n){return g2(n)},s.ek=function(n){return se(gr,Me,346,n,7,1)},v(Jn,"EcorePackageImpl/28",1226),m(1227,1,ii,nu),s.dk=function(n){return X(n,61)},s.ek=function(n){return se(B8e,um,61,n,0,1)},v(Jn,"EcorePackageImpl/29",1227),m(1201,1,ii,io),s.dk=function(n){return X(n,504)},s.ek=function(n){return se(Zt,{3:1,4:1,5:1,1995:1},587,n,0,1)},v(Jn,"EcorePackageImpl/3",1201),m(1228,1,ii,v1),s.dk=function(n){return X(n,568)},s.ek=function(n){return se(J8e,On,2001,n,0,1)},v(Jn,"EcorePackageImpl/30",1228),m(1229,1,ii,Qp),s.dk=function(n){return X(n,163)},s.ek=function(n){return se(a7e,um,163,n,0,1)},v(Jn,"EcorePackageImpl/31",1229),m(1230,1,ii,U5),s.dk=function(n){return X(n,75)},s.ek=function(n){return se(AG,hen,75,n,0,1)},v(Jn,"EcorePackageImpl/32",1230),m(1231,1,ii,uC),s.dk=function(n){return X(n,164)},s.ek=function(n){return se(b7,Me,164,n,0,1)},v(Jn,"EcorePackageImpl/33",1231),m(1232,1,ii,aw),s.dk=function(n){return X(n,15)},s.ek=function(n){return se(jr,Me,15,n,0,1)},v(Jn,"EcorePackageImpl/34",1232),m(1233,1,ii,zs),s.dk=function(n){return X(n,298)},s.ek=function(n){return se(wme,On,298,n,0,1)},v(Jn,"EcorePackageImpl/35",1233),m(1234,1,ii,Wp),s.dk=function(n){return X(n,190)},s.ek=function(n){return se(sp,Me,190,n,0,1)},v(Jn,"EcorePackageImpl/36",1234),m(1235,1,ii,Sv),s.dk=function(n){return X(n,92)},s.ek=function(n){return se(pme,On,92,n,0,1)},v(Jn,"EcorePackageImpl/37",1235),m(1236,1,ii,oC),s.dk=function(n){return X(n,588)},s.ek=function(n){return se(o7e,On,588,n,0,1)},v(Jn,"EcorePackageImpl/38",1236),m(1237,1,ii,y1),s.dk=function(n){return!1},s.ek=function(n){return se(x7e,On,2175,n,0,1)},v(Jn,"EcorePackageImpl/39",1237),m(1202,1,ii,X5),s.dk=function(n){return X(n,88)},s.ek=function(n){return se(vf,On,29,n,0,1)},v(Jn,"EcorePackageImpl/4",1202),m(1238,1,ii,V6),s.dk=function(n){return X(n,191)},s.ek=function(n){return se(lp,Me,191,n,0,1)},v(Jn,"EcorePackageImpl/40",1238),m(1239,1,ii,Bh),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(Jn,"EcorePackageImpl/41",1239),m(1240,1,ii,sC),s.dk=function(n){return X(n,585)},s.ek=function(n){return se(F8e,On,585,n,0,1)},v(Jn,"EcorePackageImpl/42",1240),m(1241,1,ii,Uk),s.dk=function(n){return!1},s.ek=function(n){return se(A7e,Me,2176,n,0,1)},v(Jn,"EcorePackageImpl/43",1241),m(1242,1,ii,DL),s.dk=function(n){return X(n,45)},s.ek=function(n){return se(yg,tF,45,n,0,1)},v(Jn,"EcorePackageImpl/44",1242),m(1203,1,ii,Xk),s.dk=function(n){return X(n,143)},s.ek=function(n){return se(Ma,On,143,n,0,1)},v(Jn,"EcorePackageImpl/5",1203),m(1204,1,ii,Kk),s.dk=function(n){return X(n,159)},s.ek=function(n){return se(zce,On,159,n,0,1)},v(Jn,"EcorePackageImpl/6",1204),m(1205,1,ii,Zp),s.dk=function(n){return X(n,459)},s.ek=function(n){return se(xG,On,675,n,0,1)},v(Jn,"EcorePackageImpl/7",1205),m(1206,1,ii,nf),s.dk=function(n){return X(n,568)},s.ek=function(n){return se(ed,On,684,n,0,1)},v(Jn,"EcorePackageImpl/8",1206),m(1207,1,ii,e2),s.dk=function(n){return X(n,469)},s.ek=function(n){return se(cA,On,469,n,0,1)},v(Jn,"EcorePackageImpl/9",1207),m(1019,2042,BZe,tAe),s.Ki=function(n,t){ljn(this,u(t,415))},s.Oi=function(n,t){cqe(this,n,u(t,415))},v(Jn,"MinimalEObjectImpl/1ArrayDelegatingAdapterList",1019),m(1020,151,zN,kDe),s.hj=function(){return this.a.a},v(Jn,"MinimalEObjectImpl/1ArrayDelegatingAdapterList/1",1020),m(1047,1046,{},ITe),v("org.eclipse.emf.ecore.plugin","EcorePlugin",1047);var o7e=Gi(den,"Resource");m(786,1485,ben),s.Fl=function(n){},s.Gl=function(n){},s.Cl=function(){return!this.a&&(this.a=new dX(this)),this.a},s.Dl=function(n){var t,i,r,c,o;if(r=n.length,r>0)if(Qn(0,n.length),n.charCodeAt(0)==47){for(o=new xo(4),c=1,t=1;t0&&(n=(Qr(0,i,n.length),n.substr(0,i))));return vTn(this,n)},s.El=function(){return this.c},s.Ib=function(){var n;return Pb(this.Pm)+"@"+(n=Ni(this)>>>0,n.toString(16))+" uri='"+this.d+"'"},s.b=!1,v(Pne,"ResourceImpl",786),m(1486,786,ben,GSe),v(Pne,"BinaryResourceImpl",1486),m(1159,697,One),s._i=function(n){return X(n,57)?Y5n(this,u(n,57)):X(n,588)?new st(u(n,588).Cl()):ue(n)===ue(this.f)?u(n,18).Jc():(A9(),tD.a)},s.Ob=function(){return Z0e(this)},s.a=!1,v(Ri,"EcoreUtil/ContentTreeIterator",1159),m(1487,1159,One,QIe),s._i=function(n){return ue(n)===ue(this.f)?u(n,16).Jc():new WLe(u(n,57))},v(Pne,"ResourceImpl/5",1487),m(647,2054,ten,dX),s.Gc=function(n){return this.i<=4?y8(this,n):X(n,52)&&u(n,52).Gh()==this.a},s.Ki=function(n,t){n==this.i-1&&(this.a.b||(this.a.b=!0))},s.Mi=function(n,t){n==0?this.a.b||(this.a.b=!0):gY(this,n,t)},s.Oi=function(n,t){},s.Pi=function(n,t,i){},s.Jj=function(){return 2},s.hj=function(){return this.a},s.Kj=function(){return!0},s.Lj=function(n,t){var i;return i=u(n,52),t=i.ci(this.a,t),t},s.Mj=function(n,t){var i;return i=u(n,52),i.ci(null,t)},s.Nj=function(){return!1},s.Qi=function(){return!0},s.$i=function(n){return se(vb,On,57,n,0,1)},s.Wi=function(){return!1},v(Pne,"ResourceImpl/ContentsEList",647),m(953,2024,B8,qSe),s.dd=function(n){return this.a.Ii(n)},s.gc=function(){return this.a.gc()},v(Ri,"AbstractSequentialInternalEList/1",953);var s7e,l7e,nc,f7e;m(625,1,{},eIe);var MG,CG;v(Ri,"BasicExtendedMetaData",625),m(1150,1,{},WCe),s.Hl=function(){return null},s.Il=function(){return this.a==-2&&qC(this,xMn(this.d,this.b)),this.a},s.Jl=function(){return null},s.Kl=function(){return En(),En(),Sc},s.ve=function(){return this.c==f7&&oX(this,MJe(this.d,this.b)),this.c},s.Ll=function(){return 0},s.a=-2,s.c=f7,v(Ri,"BasicExtendedMetaData/EClassExtendedMetaDataImpl",1150),m(1151,1,{},TLe),s.Hl=function(){return this.a==(J9(),MG)&&TP(this,lDn(this.f,this.b)),this.a},s.Il=function(){return 0},s.Jl=function(){return this.c==(J9(),MG)&&u9(this,fDn(this.f,this.b)),this.c},s.Kl=function(){return!this.d&&lX(this,X_n(this.f,this.b)),this.d},s.ve=function(){return this.e==f7&&XC(this,MJe(this.f,this.b)),this.e},s.Ll=function(){return this.g==-2&&d(this,UAn(this.f,this.b)),this.g},s.e=f7,s.g=-2,v(Ri,"BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl",1151),m(1149,1,{},ZCe),s.b=!1,s.c=!1,v(Ri,"BasicExtendedMetaData/EPackageExtendedMetaDataImpl",1149),m(1152,1,{},OLe),s.c=-2,s.e=f7,s.f=f7,v(Ri,"BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl",1152),m(581,623,au,nR),s.Jj=function(){return this.c},s.ml=function(){return!1},s.Ui=function(n,t){return t},s.c=0,v(Ri,"EDataTypeEList",581);var a7e=Gi(Ri,"FeatureMap");m(76,581,{3:1,4:1,20:1,31:1,56:1,18:1,16:1,59:1,71:1,67:1,61:1,77:1,163:1,219:1,1998:1,72:1,98:1},tr),s._c=function(n,t){ONn(this,n,u(t,75))},s.Ec=function(n){return XOn(this,u(n,75))},s.Fi=function(n){q3n(this,u(n,75))},s.Lj=function(n,t){return j2n(this,u(n,75),t)},s.Mj=function(n,t){return qle(this,u(n,75),t)},s.Ri=function(n,t){return e_n(this,n,t)},s.Ui=function(n,t){return JPn(this,n,u(t,75))},s.fd=function(n,t){return gIn(this,n,u(t,75))},s.Sj=function(n,t){return E2n(this,u(n,75),t)},s.Tj=function(n,t){return MNe(this,u(n,75),t)},s.Uj=function(n,t,i){return LAn(this,u(n,75),u(t,75),i)},s.Xi=function(n,t){return oW(this,n,u(t,75))},s.Ml=function(n,t){return Xbe(this,n,t)},s.ad=function(n,t){var i,r,c,o,l,f,h,b,p;for(b=new _w(t.gc()),c=t.Jc();c.Ob();)if(r=u(c.Pb(),75),o=r.Jk(),J1(this.e,o))(!o.Qi()||!qR(this,o,r.kd())&&!y8(b,r))&&Et(b,r);else{for(p=Po(this.e.Ah(),o),i=u(this.g,122),l=!0,f=0;f=0;)if(t=n[this.c],this.k.$l(t.Jk()))return this.j=this.f?t:t.kd(),this.i=-2,!0;return this.i=-1,this.g=-1,!1},v(Ri,"BasicFeatureMap/FeatureEIterator",412),m(666,412,Wh,SK),s.sl=function(){return!0},v(Ri,"BasicFeatureMap/ResolvingFeatureEIterator",666),m(951,482,YF,UTe),s.nj=function(){return this},v(Ri,"EContentsEList/1",951),m(952,482,YF,pTe),s.sl=function(){return!1},v(Ri,"EContentsEList/2",952),m(950,287,QF,XTe),s.ul=function(n){},s.Ob=function(){return!1},s.Sb=function(){return!1},v(Ri,"EContentsEList/FeatureIteratorImpl/1",950),m(824,581,au,Zse),s.Li=function(){this.a=!0},s.Oj=function(){return this.a},s.Ek=function(){var n;kt(this),Fs(this.e)?(n=this.a,this.a=!1,hi(this.e,new Lf(this.e,2,this.c,n,!1))):this.a=!1},s.a=!1,v(Ri,"EDataTypeEList/Unsettable",824),m(1920,581,au,ZTe),s.Qi=function(){return!0},v(Ri,"EDataTypeUniqueEList",1920),m(1921,824,au,eOe),s.Qi=function(){return!0},v(Ri,"EDataTypeUniqueEList/Unsettable",1921),m(145,81,au,rs),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectContainmentEList/Resolving",145),m(1153,543,au,WTe),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectContainmentEList/Unsettable/Resolving",1153),m(753,14,au,Rle),s.Li=function(){this.a=!0},s.Oj=function(){return this.a},s.Ek=function(){var n;kt(this),Fs(this.e)?(n=this.a,this.a=!1,hi(this.e,new Lf(this.e,2,this.c,n,!1))):this.a=!1},s.a=!1,v(Ri,"EObjectContainmentWithInverseEList/Unsettable",753),m(1187,753,au,bNe),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectContainmentWithInverseEList/Unsettable/Resolving",1187),m(745,491,au,Wse),s.Li=function(){this.a=!0},s.Oj=function(){return this.a},s.Ek=function(){var n;kt(this),Fs(this.e)?(n=this.a,this.a=!1,hi(this.e,new Lf(this.e,2,this.c,n,!1))):this.a=!1},s.a=!1,v(Ri,"EObjectEList/Unsettable",745),m(339,491,au,Jv),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectResolvingEList",339),m(1825,745,au,nOe),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectResolvingEList/Unsettable",1825),m(1488,1,{},K5);var nhn;v(Ri,"EObjectValidator",1488),m(547,491,au,yR),s.gl=function(){return this.d},s.hl=function(){return this.b},s.Kj=function(){return!0},s.kl=function(){return!0},s.b=0,v(Ri,"EObjectWithInverseEList",547),m(1190,547,au,gNe),s.jl=function(){return!0},v(Ri,"EObjectWithInverseEList/ManyInverse",1190),m(626,547,au,qK),s.Li=function(){this.a=!0},s.Oj=function(){return this.a},s.Ek=function(){var n;kt(this),Fs(this.e)?(n=this.a,this.a=!1,hi(this.e,new Lf(this.e,2,this.c,n,!1))):this.a=!1},s.a=!1,v(Ri,"EObjectWithInverseEList/Unsettable",626),m(1189,626,au,wNe),s.jl=function(){return!0},v(Ri,"EObjectWithInverseEList/Unsettable/ManyInverse",1189),m(754,547,au,Ble),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectWithInverseResolvingEList",754),m(33,754,au,Nn),s.jl=function(){return!0},v(Ri,"EObjectWithInverseResolvingEList/ManyInverse",33),m(755,626,au,zle),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectWithInverseResolvingEList/Unsettable",755),m(1188,755,au,pNe),s.jl=function(){return!0},v(Ri,"EObjectWithInverseResolvingEList/Unsettable/ManyInverse",1188),m(1154,623,au),s.Ji=function(){return(this.b&1792)==0},s.Li=function(){this.b|=1},s.il=function(){return(this.b&4)!=0},s.Kj=function(){return(this.b&40)!=0},s.jl=function(){return(this.b&16)!=0},s.kl=function(){return(this.b&8)!=0},s.ll=function(){return(this.b&V0)!=0},s.$k=function(){return(this.b&32)!=0},s.ml=function(){return(this.b&Gf)!=0},s.dk=function(n){return this.d?cPe(this.d,n):this.Jk().Fk().dk(n)},s.Oj=function(){return(this.b&2)!=0?(this.b&1)!=0:this.i!=0},s.Qi=function(){return(this.b&128)!=0},s.Ek=function(){var n;kt(this),(this.b&2)!=0&&(Fs(this.e)?(n=(this.b&1)!=0,this.b&=-2,f9(this,new Lf(this.e,2,Ji(this.e.Ah(),this.Jk()),n,!1))):this.b&=-2)},s.Wi=function(){return(this.b&1536)==0},s.b=0,v(Ri,"EcoreEList/Generic",1154),m(1155,1154,au,f_e),s.Jk=function(){return this.a},v(Ri,"EcoreEList/Dynamic",1155),m(752,67,Th,uoe),s.$i=function(n){return dO(this.a.a,n)},v(Ri,"EcoreEMap/1",752),m(751,81,au,Lfe),s.Ki=function(n,t){az(this.b,u(t,136))},s.Mi=function(n,t){aze(this.b)},s.Ni=function(n,t,i){var r;++(r=this.b,u(t,136),r).e},s.Oi=function(n,t){wQ(this.b,u(t,136))},s.Pi=function(n,t,i){wQ(this.b,u(i,136)),ue(i)===ue(t)&&u(i,136).zi(ywn(u(t,136).jd())),az(this.b,u(t,136))},v(Ri,"EcoreEMap/DelegateEObjectContainmentEList",751),m(1185,142,tme,jBe),v(Ri,"EcoreEMap/Unsettable",1185),m(1186,751,au,mNe),s.Li=function(){this.a=!0},s.Oj=function(){return this.a},s.Ek=function(){var n;kt(this),Fs(this.e)?(n=this.a,this.a=!1,hi(this.e,new Lf(this.e,2,this.c,n,!1))):this.a=!1},s.a=!1,v(Ri,"EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList",1186),m(1158,223,v3,dDe),s.a=!1,s.b=!1,v(Ri,"EcoreUtil/Copier",1158),m(747,1,Fr,WLe),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return hJe(this)},s.Pb=function(){var n;return hJe(this),n=this.b,this.b=null,n},s.Qb=function(){this.a.Qb()},v(Ri,"EcoreUtil/ProperContentIterator",747),m(1489,1488,{},FU);var thn;v(Ri,"EcoreValidator",1489);var ihn;Gi(Ri,"FeatureMapUtil/Validator"),m(1258,1,{2003:1},hw),s.$l=function(n){return!0},v(Ri,"FeatureMapUtil/1",1258),m(760,1,{2003:1},Age),s.$l=function(n){var t;return this.c==n?!0:(t=ze(zn(this.a,n)),t==null?gDn(this,n)?(XPe(this.a,n,($n(),d7)),!0):(XPe(this.a,n,($n(),ib)),!1):t==($n(),d7))},s.e=!1;var Gce;v(Ri,"FeatureMapUtil/BasicValidator",760),m(761,44,v3,Vse),v(Ri,"FeatureMapUtil/BasicValidator/Cache",761),m(495,56,{20:1,31:1,56:1,18:1,16:1,61:1,77:1,72:1,98:1},vT),s._c=function(n,t){eXe(this.c,this.b,n,t)},s.Ec=function(n){return Xbe(this.c,this.b,n)},s.ad=function(n,t){return _Ln(this.c,this.b,n,t)},s.Fc=function(n){return Yj(this,n)},s.Ei=function(n,t){y8n(this.c,this.b,n,t)},s.Uk=function(n,t){return Bbe(this.c,this.b,n,t)},s.Yi=function(n){return Kz(this.c,this.b,n,!1)},s.Gi=function(){return ATe(this.c,this.b)},s.Hi=function(){return hwn(this.c,this.b)},s.Ii=function(n){return j9n(this.c,this.b,n)},s.Vk=function(n,t){return QOe(this,n,t)},s.$b=function(){u4(this)},s.Gc=function(n){return qR(this.c,this.b,n)},s.Hc=function(n){return k7n(this.c,this.b,n)},s.Xb=function(n){return Kz(this.c,this.b,n,!0)},s.Dk=function(n){return this},s.bd=function(n){return I6n(this.c,this.b,n)},s.dc=function(){return T$(this)},s.Oj=function(){return!IO(this.c,this.b)},s.Jc=function(){return r8n(this.c,this.b)},s.cd=function(){return c8n(this.c,this.b)},s.dd=function(n){return Ajn(this.c,this.b,n)},s.Ri=function(n,t){return pKe(this.c,this.b,n,t)},s.Si=function(n,t){A9n(this.c,this.b,n,t)},s.ed=function(n){return GGe(this.c,this.b,n)},s.Kc=function(n){return BDn(this.c,this.b,n)},s.fd=function(n,t){return AKe(this.c,this.b,n,t)},s.Wb=function(n){Tz(this.c,this.b),Yj(this,u(n,16))},s.gc=function(){return Mjn(this.c,this.b)},s.Nc=function(){return Dyn(this.c,this.b)},s.Oc=function(n){return D6n(this.c,this.b,n)},s.Ib=function(){var n,t;for(t=new vd,t.a+="[",n=ATe(this.c,this.b);uQ(n);)Bc(t,Wj(lz(n))),uQ(n)&&(t.a+=To);return t.a+="]",t.a},s.Ek=function(){Tz(this.c,this.b)},v(Ri,"FeatureMapUtil/FeatureEList",495),m(634,39,zN,cY),s.fj=function(n){return $E(this,n)},s.kj=function(n){var t,i,r,c,o,l,f;switch(this.d){case 1:case 2:{if(o=n.hj(),ue(o)===ue(this.c)&&$E(this,null)==n.fj(null))return this.g=n.gj(),n.ej()==1&&(this.d=1),!0;break}case 3:{switch(c=n.ej(),c){case 3:{if(o=n.hj(),ue(o)===ue(this.c)&&$E(this,null)==n.fj(null))return this.d=5,t=new _w(2),Et(t,this.g),Et(t,n.gj()),this.g=t,!0;break}}break}case 5:{switch(c=n.ej(),c){case 3:{if(o=n.hj(),ue(o)===ue(this.c)&&$E(this,null)==n.fj(null))return i=u(this.g,18),i.Ec(n.gj()),!0;break}}break}case 4:{switch(c=n.ej(),c){case 3:{if(o=n.hj(),ue(o)===ue(this.c)&&$E(this,null)==n.fj(null))return this.d=1,this.g=n.gj(),!0;break}case 4:{if(o=n.hj(),ue(o)===ue(this.c)&&$E(this,null)==n.fj(null))return this.d=6,f=new _w(2),Et(f,this.n),Et(f,n.ij()),this.n=f,l=F(z($t,1),ni,30,15,[this.o,n.jj()]),this.g=l,!0;break}}break}case 6:{switch(c=n.ej(),c){case 4:{if(o=n.hj(),ue(o)===ue(this.c)&&$E(this,null)==n.fj(null))return i=u(this.n,18),i.Ec(n.ij()),l=u(this.g,54),r=se($t,ni,30,l.length+1,15,1),Wu(l,0,r,0,l.length),r[l.length]=n.jj(),this.g=r,!0;break}}break}}return!1},v(Ri,"FeatureMapUtil/FeatureENotificationImpl",634),m(553,495,{20:1,31:1,56:1,18:1,16:1,61:1,77:1,163:1,219:1,1998:1,72:1,98:1},uR),s.Ml=function(n,t){return Xbe(this.c,n,t)},s.Nl=function(n,t,i){return Bbe(this.c,n,t,i)},s.Ol=function(n,t,i){return bge(this.c,n,t,i)},s.Pl=function(){return this},s.Ql=function(n,t){return cN(this.c,n,t)},s.Rl=function(n){return u(Kz(this.c,this.b,n,!1),75).Jk()},s.Sl=function(n){return u(Kz(this.c,this.b,n,!1),75).kd()},s.Tl=function(){return this.a},s.Ul=function(n){return!IO(this.c,n)},s.Vl=function(n,t){Vz(this.c,n,t)},s.Wl=function(n){return OBe(this.c,n)},s.Xl=function(n){aHe(this.c,n)},v(Ri,"FeatureMapUtil/FeatureFeatureMap",553),m(1257,1,Lne,tTe),s.Dk=function(n){return Kz(this.b,this.a,-1,n)},s.Oj=function(){return!IO(this.b,this.a)},s.Wb=function(n){Vz(this.b,this.a,n)},s.Ek=function(){Tz(this.b,this.a)},v(Ri,"FeatureMapUtil/FeatureValue",1257);var Wy,qce,Uce,Zy,rhn,rD=Gi(cJ,"AnyType");m(670,63,H1,TX),v(cJ,"InvalidDatatypeValueException",670);var TG=Gi(cJ,wen),cD=Gi(cJ,pen),h7e=Gi(cJ,men),chn,Bu,d7e,Pg,uhn,ohn,shn,lhn,fhn,ahn,hhn,dhn,bhn,ghn,whn,r5,phn,c5,fA,mhn,xp,uD,oD,vhn,aA,hA;m(828,501,{109:1,94:1,93:1,57:1,52:1,100:1,841:1},koe),s.Ih=function(n,t,i){switch(n){case 0:return i?(!this.c&&(this.c=new tr(this,0)),this.c):(!this.c&&(this.c=new tr(this,0)),this.c.b);case 1:return i?(!this.c&&(this.c=new tr(this,0)),u(fo(this.c,(Si(),Pg)),163)):(!this.c&&(this.c=new tr(this,0)),u(u(fo(this.c,(Si(),Pg)),163),219)).Tl();case 2:return i?(!this.b&&(this.b=new tr(this,2)),this.b):(!this.b&&(this.b=new tr(this,2)),this.b.b)}return Pl(this,n-dt(this.fi()),Mn((this.j&2)==0?this.fi():(!this.k&&(this.k=new nl),this.k).Lk(),n),t,i)},s.Rh=function(n,t,i){var r;switch(t){case 0:return!this.c&&(this.c=new tr(this,0)),tN(this.c,n,i);case 1:return(!this.c&&(this.c=new tr(this,0)),u(u(fo(this.c,(Si(),Pg)),163),72)).Vk(n,i);case 2:return!this.b&&(this.b=new tr(this,2)),tN(this.b,n,i)}return r=u(Mn((this.j&2)==0?this.fi():(!this.k&&(this.k=new nl),this.k).Lk(),t),69),r.uk().yk(this,khe(this),t-dt(this.fi()),n,i)},s.Th=function(n){switch(n){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new tr(this,0)),u(fo(this.c,(Si(),Pg)),163)).dc();case 2:return!!this.b&&this.b.i!=0}return Ll(this,n-dt(this.fi()),Mn((this.j&2)==0?this.fi():(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.$h=function(n,t){switch(n){case 0:!this.c&&(this.c=new tr(this,0)),BT(this.c,t);return;case 1:(!this.c&&(this.c=new tr(this,0)),u(u(fo(this.c,(Si(),Pg)),163),219)).Wb(t);return;case 2:!this.b&&(this.b=new tr(this,2)),BT(this.b,t);return}Jl(this,n-dt(this.fi()),Mn((this.j&2)==0?this.fi():(!this.k&&(this.k=new nl),this.k).Lk(),n),t)},s.fi=function(){return Si(),d7e},s.hi=function(n){switch(n){case 0:!this.c&&(this.c=new tr(this,0)),kt(this.c);return;case 1:(!this.c&&(this.c=new tr(this,0)),u(fo(this.c,(Si(),Pg)),163)).$b();return;case 2:!this.b&&(this.b=new tr(this,2)),kt(this.b);return}Fl(this,n-dt(this.fi()),Mn((this.j&2)==0?this.fi():(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.Ib=function(){var n;return(this.j&4)!=0?Ff(this):(n=new cf(Ff(this)),n.a+=" (mixed: ",Uj(n,this.c),n.a+=", anyAttribute: ",Uj(n,this.b),n.a+=")",n.a)},v(kr,"AnyTypeImpl",828),m(671,501,{109:1,94:1,93:1,57:1,52:1,100:1,2081:1,671:1},pU),s.Ih=function(n,t,i){switch(n){case 0:return this.a;case 1:return this.b}return Pl(this,n-dt((Si(),r5)),Mn((this.j&2)==0?r5:(!this.k&&(this.k=new nl),this.k).Lk(),n),t,i)},s.Th=function(n){switch(n){case 0:return this.a!=null;case 1:return this.b!=null}return Ll(this,n-dt((Si(),r5)),Mn((this.j&2)==0?r5:(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.$h=function(n,t){switch(n){case 0:T(this,Pt(t));return;case 1:Q(this,Pt(t));return}Jl(this,n-dt((Si(),r5)),Mn((this.j&2)==0?r5:(!this.k&&(this.k=new nl),this.k).Lk(),n),t)},s.fi=function(){return Si(),r5},s.hi=function(n){switch(n){case 0:this.a=null;return;case 1:this.b=null;return}Fl(this,n-dt((Si(),r5)),Mn((this.j&2)==0?r5:(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.Ib=function(){var n;return(this.j&4)!=0?Ff(this):(n=new cf(Ff(this)),n.a+=" (data: ",Bc(n,this.a),n.a+=", target: ",Bc(n,this.b),n.a+=")",n.a)},s.a=null,s.b=null,v(kr,"ProcessingInstructionImpl",671),m(672,828,{109:1,94:1,93:1,57:1,52:1,100:1,841:1,2082:1,672:1},Dxe),s.Ih=function(n,t,i){switch(n){case 0:return i?(!this.c&&(this.c=new tr(this,0)),this.c):(!this.c&&(this.c=new tr(this,0)),this.c.b);case 1:return i?(!this.c&&(this.c=new tr(this,0)),u(fo(this.c,(Si(),Pg)),163)):(!this.c&&(this.c=new tr(this,0)),u(u(fo(this.c,(Si(),Pg)),163),219)).Tl();case 2:return i?(!this.b&&(this.b=new tr(this,2)),this.b):(!this.b&&(this.b=new tr(this,2)),this.b.b);case 3:return!this.c&&(this.c=new tr(this,0)),Pt(cN(this.c,(Si(),fA),!0));case 4:return Jle(this.a,(!this.c&&(this.c=new tr(this,0)),Pt(cN(this.c,(Si(),fA),!0))));case 5:return this.a}return Pl(this,n-dt((Si(),c5)),Mn((this.j&2)==0?c5:(!this.k&&(this.k=new nl),this.k).Lk(),n),t,i)},s.Th=function(n){switch(n){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new tr(this,0)),u(fo(this.c,(Si(),Pg)),163)).dc();case 2:return!!this.b&&this.b.i!=0;case 3:return!this.c&&(this.c=new tr(this,0)),Pt(cN(this.c,(Si(),fA),!0))!=null;case 4:return Jle(this.a,(!this.c&&(this.c=new tr(this,0)),Pt(cN(this.c,(Si(),fA),!0))))!=null;case 5:return!!this.a}return Ll(this,n-dt((Si(),c5)),Mn((this.j&2)==0?c5:(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.$h=function(n,t){switch(n){case 0:!this.c&&(this.c=new tr(this,0)),BT(this.c,t);return;case 1:(!this.c&&(this.c=new tr(this,0)),u(u(fo(this.c,(Si(),Pg)),163),219)).Wb(t);return;case 2:!this.b&&(this.b=new tr(this,2)),BT(this.b,t);return;case 3:Tae(this,Pt(t));return;case 4:Tae(this,Fle(this.a,t));return;case 5:I(this,u(t,159));return}Jl(this,n-dt((Si(),c5)),Mn((this.j&2)==0?c5:(!this.k&&(this.k=new nl),this.k).Lk(),n),t)},s.fi=function(){return Si(),c5},s.hi=function(n){switch(n){case 0:!this.c&&(this.c=new tr(this,0)),kt(this.c);return;case 1:(!this.c&&(this.c=new tr(this,0)),u(fo(this.c,(Si(),Pg)),163)).$b();return;case 2:!this.b&&(this.b=new tr(this,2)),kt(this.b);return;case 3:!this.c&&(this.c=new tr(this,0)),Vz(this.c,(Si(),fA),null);return;case 4:Tae(this,Fle(this.a,null));return;case 5:this.a=null;return}Fl(this,n-dt((Si(),c5)),Mn((this.j&2)==0?c5:(!this.k&&(this.k=new nl),this.k).Lk(),n))},v(kr,"SimpleAnyTypeImpl",672),m(673,501,{109:1,94:1,93:1,57:1,52:1,100:1,2083:1,673:1},_xe),s.Ih=function(n,t,i){switch(n){case 0:return i?(!this.a&&(this.a=new tr(this,0)),this.a):(!this.a&&(this.a=new tr(this,0)),this.a.b);case 1:return i?(!this.b&&(this.b=new os((jn(),Ac),Du,this,1)),this.b):(!this.b&&(this.b=new os((jn(),Ac),Du,this,1)),nO(this.b));case 2:return i?(!this.c&&(this.c=new os((jn(),Ac),Du,this,2)),this.c):(!this.c&&(this.c=new os((jn(),Ac),Du,this,2)),nO(this.c));case 3:return!this.a&&(this.a=new tr(this,0)),fo(this.a,(Si(),uD));case 4:return!this.a&&(this.a=new tr(this,0)),fo(this.a,(Si(),oD));case 5:return!this.a&&(this.a=new tr(this,0)),fo(this.a,(Si(),aA));case 6:return!this.a&&(this.a=new tr(this,0)),fo(this.a,(Si(),hA))}return Pl(this,n-dt((Si(),xp)),Mn((this.j&2)==0?xp:(!this.k&&(this.k=new nl),this.k).Lk(),n),t,i)},s.Rh=function(n,t,i){var r;switch(t){case 0:return!this.a&&(this.a=new tr(this,0)),tN(this.a,n,i);case 1:return!this.b&&(this.b=new os((jn(),Ac),Du,this,1)),K$(this.b,n,i);case 2:return!this.c&&(this.c=new os((jn(),Ac),Du,this,2)),K$(this.c,n,i);case 5:return!this.a&&(this.a=new tr(this,0)),QOe(fo(this.a,(Si(),aA)),n,i)}return r=u(Mn((this.j&2)==0?(Si(),xp):(!this.k&&(this.k=new nl),this.k).Lk(),t),69),r.uk().yk(this,khe(this),t-dt((Si(),xp)),n,i)},s.Th=function(n){switch(n){case 0:return!!this.a&&this.a.i!=0;case 1:return!!this.b&&this.b.f!=0;case 2:return!!this.c&&this.c.f!=0;case 3:return!this.a&&(this.a=new tr(this,0)),!T$(fo(this.a,(Si(),uD)));case 4:return!this.a&&(this.a=new tr(this,0)),!T$(fo(this.a,(Si(),oD)));case 5:return!this.a&&(this.a=new tr(this,0)),!T$(fo(this.a,(Si(),aA)));case 6:return!this.a&&(this.a=new tr(this,0)),!T$(fo(this.a,(Si(),hA)))}return Ll(this,n-dt((Si(),xp)),Mn((this.j&2)==0?xp:(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.$h=function(n,t){switch(n){case 0:!this.a&&(this.a=new tr(this,0)),BT(this.a,t);return;case 1:!this.b&&(this.b=new os((jn(),Ac),Du,this,1)),NB(this.b,t);return;case 2:!this.c&&(this.c=new os((jn(),Ac),Du,this,2)),NB(this.c,t);return;case 3:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),uD))),!this.a&&(this.a=new tr(this,0)),Yj(fo(this.a,uD),u(t,18));return;case 4:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),oD))),!this.a&&(this.a=new tr(this,0)),Yj(fo(this.a,oD),u(t,18));return;case 5:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),aA))),!this.a&&(this.a=new tr(this,0)),Yj(fo(this.a,aA),u(t,18));return;case 6:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),hA))),!this.a&&(this.a=new tr(this,0)),Yj(fo(this.a,hA),u(t,18));return}Jl(this,n-dt((Si(),xp)),Mn((this.j&2)==0?xp:(!this.k&&(this.k=new nl),this.k).Lk(),n),t)},s.fi=function(){return Si(),xp},s.hi=function(n){switch(n){case 0:!this.a&&(this.a=new tr(this,0)),kt(this.a);return;case 1:!this.b&&(this.b=new os((jn(),Ac),Du,this,1)),this.b.c.$b();return;case 2:!this.c&&(this.c=new os((jn(),Ac),Du,this,2)),this.c.c.$b();return;case 3:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),uD)));return;case 4:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),oD)));return;case 5:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),aA)));return;case 6:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),hA)));return}Fl(this,n-dt((Si(),xp)),Mn((this.j&2)==0?xp:(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.Ib=function(){var n;return(this.j&4)!=0?Ff(this):(n=new cf(Ff(this)),n.a+=" (mixed: ",Uj(n,this.a),n.a+=")",n.a)},v(kr,"XMLTypeDocumentRootImpl",673),m(1990,710,{109:1,94:1,93:1,469:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1,2084:1},lC),s.oi=function(n,t){switch(n.fk()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return t==null?null:fu(t);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return Pt(t);case 6:return Fpn(u(t,195));case 12:case 47:case 49:case 11:return fVe(this,n,t);case 13:return t==null?null:zLn(u(t,247));case 15:case 14:return t==null?null:L3n(ne(re(t)));case 17:return eGe((Si(),t));case 18:return eGe(t);case 21:case 20:return t==null?null:P3n(u(t,164).a);case 27:return zpn(u(t,195));case 30:return hHe((Si(),u(t,16)));case 31:return hHe(u(t,16));case 40:return Bpn((Si(),t));case 42:return nGe((Si(),t));case 43:return nGe(t);case 59:case 48:return Rpn((Si(),t));default:throw R(new qn(u7+n.ve()+up))}},s.pi=function(n){var t,i,r,c,o;switch(n.G==-1&&(n.G=(i=ol(n),i?$d(i.si(),n):-1)),n.G){case 0:return t=new koe,t;case 1:return r=new pU,r;case 2:return c=new Dxe,c;case 3:return o=new _xe,o;default:throw R(new qn(vne+n.zb+up))}},s.qi=function(n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q;switch(n.fk()){case 5:case 52:case 4:return t;case 6:return rSn(t);case 8:case 7:return t==null?null:JAn(t);case 9:return t==null?null:fO(al((r=bo(t,!0),r.length>0&&(Qn(0,r.length),r.charCodeAt(0)==43)?(Qn(1,r.length+1),r.substr(1)):r),-128,127)<<24>>24);case 10:return t==null?null:fO(al((c=bo(t,!0),c.length>0&&(Qn(0,c.length),c.charCodeAt(0)==43)?(Qn(1,c.length+1),c.substr(1)):c),-128,127)<<24>>24);case 11:return Pt(Qw(this,(Si(),shn),t));case 12:return Pt(Qw(this,(Si(),lhn),t));case 13:return t==null?null:new Joe(bo(t,!0));case 15:case 14:return YOn(t);case 16:return Pt(Qw(this,(Si(),fhn),t));case 17:return bJe((Si(),t));case 18:return bJe(t);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return bo(t,!0);case 21:case 20:return uNn(t);case 22:return Pt(Qw(this,(Si(),ahn),t));case 23:return Pt(Qw(this,(Si(),hhn),t));case 24:return Pt(Qw(this,(Si(),dhn),t));case 25:return Pt(Qw(this,(Si(),bhn),t));case 26:return Pt(Qw(this,(Si(),ghn),t));case 27:return VEn(t);case 30:return gJe((Si(),t));case 31:return gJe(t);case 32:return t==null?null:ke(al((p=bo(t,!0),p.length>0&&(Qn(0,p.length),p.charCodeAt(0)==43)?(Qn(1,p.length+1),p.substr(1)):p),Xr,oi));case 33:return t==null?null:new A0((y=bo(t,!0),y.length>0&&(Qn(0,y.length),y.charCodeAt(0)==43)?(Qn(1,y.length+1),y.substr(1)):y));case 34:return t==null?null:ke(al((S=bo(t,!0),S.length>0&&(Qn(0,S.length),S.charCodeAt(0)==43)?(Qn(1,S.length+1),S.substr(1)):S),Xr,oi));case 36:return t==null?null:q2(Zz((A=bo(t,!0),A.length>0&&(Qn(0,A.length),A.charCodeAt(0)==43)?(Qn(1,A.length+1),A.substr(1)):A)));case 37:return t==null?null:q2(Zz((O=bo(t,!0),O.length>0&&(Qn(0,O.length),O.charCodeAt(0)==43)?(Qn(1,O.length+1),O.substr(1)):O)));case 40:return qSn((Si(),t));case 42:return wJe((Si(),t));case 43:return wJe(t);case 44:return t==null?null:new A0((D=bo(t,!0),D.length>0&&(Qn(0,D.length),D.charCodeAt(0)==43)?(Qn(1,D.length+1),D.substr(1)):D));case 45:return t==null?null:new A0((B=bo(t,!0),B.length>0&&(Qn(0,B.length),B.charCodeAt(0)==43)?(Qn(1,B.length+1),B.substr(1)):B));case 46:return bo(t,!1);case 47:return Pt(Qw(this,(Si(),whn),t));case 59:case 48:return GSn((Si(),t));case 49:return Pt(Qw(this,(Si(),phn),t));case 50:return t==null?null:o8(al((q=bo(t,!0),q.length>0&&(Qn(0,q.length),q.charCodeAt(0)==43)?(Qn(1,q.length+1),q.substr(1)):q),nJ,32767)<<16>>16);case 51:return t==null?null:o8(al((o=bo(t,!0),o.length>0&&(Qn(0,o.length),o.charCodeAt(0)==43)?(Qn(1,o.length+1),o.substr(1)):o),nJ,32767)<<16>>16);case 53:return Pt(Qw(this,(Si(),mhn),t));case 55:return t==null?null:o8(al((l=bo(t,!0),l.length>0&&(Qn(0,l.length),l.charCodeAt(0)==43)?(Qn(1,l.length+1),l.substr(1)):l),nJ,32767)<<16>>16);case 56:return t==null?null:o8(al((f=bo(t,!0),f.length>0&&(Qn(0,f.length),f.charCodeAt(0)==43)?(Qn(1,f.length+1),f.substr(1)):f),nJ,32767)<<16>>16);case 57:return t==null?null:q2(Zz((h=bo(t,!0),h.length>0&&(Qn(0,h.length),h.charCodeAt(0)==43)?(Qn(1,h.length+1),h.substr(1)):h)));case 58:return t==null?null:q2(Zz((b=bo(t,!0),b.length>0&&(Qn(0,b.length),b.charCodeAt(0)==43)?(Qn(1,b.length+1),b.substr(1)):b)));case 60:return t==null?null:ke(al((i=bo(t,!0),i.length>0&&(Qn(0,i.length),i.charCodeAt(0)==43)?(Qn(1,i.length+1),i.substr(1)):i),Xr,oi));case 61:return t==null?null:ke(al(bo(t,!0),Xr,oi));default:throw R(new qn(u7+n.ve()+up))}};var yhn,b7e,khn,g7e;v(kr,"XMLTypeFactoryImpl",1990),m(582,184,{109:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,52:1,100:1,161:1,184:1,117:1,118:1,680:1,2006:1,582:1},ODe),s.N=!1,s.O=!1;var jhn=!1;v(kr,"XMLTypePackageImpl",582),m(1923,1,{835:1},fC),s.Ik=function(){return rge(),Nhn},v(kr,"XMLTypePackageImpl/1",1923),m(1932,1,ii,_L),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/10",1932),m(1933,1,ii,Y6),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/11",1933),m(1934,1,ii,aC),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/12",1934),m(1935,1,ii,k1),s.dk=function(n){return g2(n)},s.ek=function(n){return se(gr,Me,346,n,7,1)},v(kr,"XMLTypePackageImpl/13",1935),m(1936,1,ii,LL),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/14",1936),m(1937,1,ii,zh),s.dk=function(n){return X(n,16)},s.ek=function(n){return se(gl,um,16,n,0,1)},v(kr,"XMLTypePackageImpl/15",1937),m(1938,1,ii,PL),s.dk=function(n){return X(n,16)},s.ek=function(n){return se(gl,um,16,n,0,1)},v(kr,"XMLTypePackageImpl/16",1938),m(1939,1,ii,$L),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/17",1939),m(1940,1,ii,n2),s.dk=function(n){return X(n,164)},s.ek=function(n){return se(b7,Me,164,n,0,1)},v(kr,"XMLTypePackageImpl/18",1940),m(1941,1,ii,Vk),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/19",1941),m(1924,1,ii,hC),s.dk=function(n){return X(n,841)},s.ek=function(n){return se(rD,On,841,n,0,1)},v(kr,"XMLTypePackageImpl/2",1924),m(1942,1,ii,V5),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/20",1942),m(1943,1,ii,RL),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/21",1943),m(1944,1,ii,BL),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/22",1944),m(1945,1,ii,zL),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/23",1945),m(1946,1,ii,FL),s.dk=function(n){return X(n,195)},s.ek=function(n){return se(ds,Me,195,n,0,2)},v(kr,"XMLTypePackageImpl/24",1946),m(1947,1,ii,Yk),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/25",1947),m(1948,1,ii,dC),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/26",1948),m(1949,1,ii,mU),s.dk=function(n){return X(n,16)},s.ek=function(n){return se(gl,um,16,n,0,1)},v(kr,"XMLTypePackageImpl/27",1949),m(1950,1,ii,vU),s.dk=function(n){return X(n,16)},s.ek=function(n){return se(gl,um,16,n,0,1)},v(kr,"XMLTypePackageImpl/28",1950),m(1951,1,ii,yU),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/29",1951),m(1925,1,ii,JL),s.dk=function(n){return X(n,671)},s.ek=function(n){return se(TG,On,2081,n,0,1)},v(kr,"XMLTypePackageImpl/3",1925),m(1952,1,ii,HL),s.dk=function(n){return X(n,15)},s.ek=function(n){return se(jr,Me,15,n,0,1)},v(kr,"XMLTypePackageImpl/30",1952),m(1953,1,ii,Y5),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/31",1953),m(1954,1,ii,Qk),s.dk=function(n){return X(n,190)},s.ek=function(n){return se(sp,Me,190,n,0,1)},v(kr,"XMLTypePackageImpl/32",1954),m(1955,1,ii,GL),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/33",1955),m(1956,1,ii,qL),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/34",1956),m(1957,1,ii,UL),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/35",1957),m(1958,1,ii,XL),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/36",1958),m(1959,1,ii,KL),s.dk=function(n){return X(n,16)},s.ek=function(n){return se(gl,um,16,n,0,1)},v(kr,"XMLTypePackageImpl/37",1959),m(1960,1,ii,VL),s.dk=function(n){return X(n,16)},s.ek=function(n){return se(gl,um,16,n,0,1)},v(kr,"XMLTypePackageImpl/38",1960),m(1961,1,ii,Wk),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/39",1961),m(1926,1,ii,YL),s.dk=function(n){return X(n,672)},s.ek=function(n){return se(cD,On,2082,n,0,1)},v(kr,"XMLTypePackageImpl/4",1926),m(1962,1,ii,QL),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/40",1962),m(1963,1,ii,ro),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/41",1963),m(1964,1,ii,bC),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/42",1964),m(1965,1,ii,kU),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/43",1965),m(1966,1,ii,WL),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/44",1966),m(1967,1,ii,jU),s.dk=function(n){return X(n,191)},s.ek=function(n){return se(lp,Me,191,n,0,1)},v(kr,"XMLTypePackageImpl/45",1967),m(1968,1,ii,EU),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/46",1968),m(1969,1,ii,SU),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/47",1969),m(1970,1,ii,Zk),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/48",1970),m(1971,1,ii,Q5),s.dk=function(n){return X(n,191)},s.ek=function(n){return se(lp,Me,191,n,0,1)},v(kr,"XMLTypePackageImpl/49",1971),m(1927,1,ii,gC),s.dk=function(n){return X(n,673)},s.ek=function(n){return se(h7e,On,2083,n,0,1)},v(kr,"XMLTypePackageImpl/5",1927),m(1972,1,ii,ej),s.dk=function(n){return X(n,190)},s.ek=function(n){return se(sp,Me,190,n,0,1)},v(kr,"XMLTypePackageImpl/50",1972),m(1973,1,ii,wC),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/51",1973),m(1974,1,ii,t2),s.dk=function(n){return X(n,15)},s.ek=function(n){return se(jr,Me,15,n,0,1)},v(kr,"XMLTypePackageImpl/52",1974),m(1928,1,ii,Ib),s.dk=function(n){return $r(n)},s.ek=function(n){return se(He,Me,2,n,6,1)},v(kr,"XMLTypePackageImpl/6",1928),m(1929,1,ii,Q6),s.dk=function(n){return X(n,195)},s.ek=function(n){return se(ds,Me,195,n,0,2)},v(kr,"XMLTypePackageImpl/7",1929),m(1930,1,ii,xU),s.dk=function(n){return b2(n)},s.ek=function(n){return se(Qi,Me,473,n,8,1)},v(kr,"XMLTypePackageImpl/8",1930),m(1931,1,ii,ZL),s.dk=function(n){return X(n,221)},s.ek=function(n){return se(jy,Me,221,n,0,1)},v(kr,"XMLTypePackageImpl/9",1931);var ch,r0,dA,OG,J;m(53,63,H1,Bt),v(Gd,"RegEx/ParseException",53),m(820,1,{},pC),s._l=function(n){return ni*16)throw R(new Bt(Ht((Lt(),TZe))));i=i*16+c}while(!0);if(this.a!=125)throw R(new Bt(Ht((Lt(),OZe))));if(i>a7)throw R(new Bt(Ht((Lt(),NZe))));n=i}else{if(c=0,this.c!=0||(c=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(i=c,fi(this),this.c!=0||(c=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));i=i*16+c,n=i}break;case 117:if(r=0,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));t=t*16+r,n=t;break;case 118:if(fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,t>a7)throw R(new Bt(Ht((Lt(),"parser.descappe.4"))));n=t;break;case 65:case 90:case 122:throw R(new Bt(Ht((Lt(),IZe))))}return n},s.bm=function(n){var t,i;switch(n){case 100:i=(this.e&32)==32?K0("Nd",!0):(ai(),NG);break;case 68:i=(this.e&32)==32?K0("Nd",!1):(ai(),k7e);break;case 119:i=(this.e&32)==32?K0("IsWord",!0):(ai(),Q7);break;case 87:i=(this.e&32)==32?K0("IsWord",!1):(ai(),E7e);break;case 115:i=(this.e&32)==32?K0("IsSpace",!0):(ai(),e6);break;case 83:i=(this.e&32)==32?K0("IsSpace",!1):(ai(),j7e);break;default:throw R(new du((t=n,Ien+t.toString(16))))}return i},s.cm=function(n){var t,i,r,c,o,l,f,h,b,p,y,S;for(this.b=1,fi(this),t=null,this.c==0&&this.a==94?(fi(this),n?p=(ai(),ai(),new cl(5)):(t=(ai(),ai(),new cl(4)),ho(t,0,a7),p=new cl(4))):p=(ai(),ai(),new cl(4)),c=!0;(S=this.c)!=1&&!(S==0&&this.a==93&&!c);){if(c=!1,i=this.a,r=!1,S==10)switch(i){case 100:case 68:case 119:case 87:case 115:case 83:tm(p,this.bm(i)),r=!0;break;case 105:case 73:case 99:case 67:i=this.sm(p,i),i<0&&(r=!0);break;case 112:case 80:if(y=Q0e(this,i),!y)throw R(new Bt(Ht((Lt(),Ine))));tm(p,y),r=!0;break;default:i=this.am()}else if(S==20){if(l=E9(this.i,58,this.d),l<0)throw R(new Bt(Ht((Lt(),Y2e))));if(f=!0,rc(this.i,this.d)==94&&(++this.d,f=!1),o=of(this.i,this.d,l),h=$$e(o,f,(this.e&512)==512),!h)throw R(new Bt(Ht((Lt(),SZe))));if(tm(p,h),r=!0,l+1>=this.j||rc(this.i,l+1)!=93)throw R(new Bt(Ht((Lt(),Y2e))));this.d=l+2}if(fi(this),!r)if(this.c!=0||this.a!=45)ho(p,i,i);else{if(fi(this),(S=this.c)==1)throw R(new Bt(Ht((Lt(),KF))));S==0&&this.a==93?(ho(p,i,i),ho(p,45,45)):(b=this.a,S==10&&(b=this.am()),fi(this),ho(p,i,b))}(this.e&Gf)==Gf&&this.c==0&&this.a==44&&fi(this)}if(this.c==1)throw R(new Bt(Ht((Lt(),KF))));return t&&(bS(t,p),p=t),h3(p),hS(p),this.b=0,fi(this),p},s.dm=function(){var n,t,i,r;for(i=this.cm(!1);(r=this.c)!=7;)if(n=this.a,r==0&&(n==45||n==38)||r==4){if(fi(this),this.c!=9)throw R(new Bt(Ht((Lt(),AZe))));if(t=this.cm(!1),r==4)tm(i,t);else if(n==45)bS(i,t);else if(n==38)uVe(i,t);else throw R(new du("ASSERT"))}else throw R(new Bt(Ht((Lt(),MZe))));return fi(this),i},s.em=function(){var n,t;return n=this.a-48,t=(ai(),ai(),new JV(12,null,n)),!this.g&&(this.g=new RP),$P(this.g,new ooe(n)),fi(this),t},s.fm=function(){return fi(this),ai(),xhn},s.gm=function(){return fi(this),ai(),Shn},s.hm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.im=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.jm=function(){return fi(this),vkn()},s.km=function(){return fi(this),ai(),Mhn},s.lm=function(){return fi(this),ai(),Thn},s.mm=function(){var n;if(this.d>=this.j||((n=rc(this.i,this.d++))&65504)!=64)throw R(new Bt(Ht((Lt(),kZe))));return fi(this),ai(),ai(),new Gh(0,n-64)},s.nm=function(){return fi(this),J_n()},s.om=function(){return fi(this),ai(),Ohn},s.pm=function(){var n;return n=(ai(),ai(),new Gh(0,105)),fi(this),n},s.qm=function(){return fi(this),ai(),Chn},s.rm=function(){return fi(this),ai(),Ahn},s.sm=function(n,t){return this.am()},s.tm=function(){return fi(this),ai(),v7e},s.um=function(){var n,t,i,r,c;if(this.d+1>=this.j)throw R(new Bt(Ht((Lt(),mZe))));if(r=-1,t=null,n=rc(this.i,this.d),49<=n&&n<=57){if(r=n-48,!this.g&&(this.g=new RP),$P(this.g,new ooe(r)),++this.d,rc(this.i,this.d)!=41)throw R(new Bt(Ht((Lt(),mg))));++this.d}else switch(n==63&&--this.d,fi(this),t=Oge(this),t.e){case 20:case 21:case 22:case 23:break;case 8:if(this.c!=7)throw R(new Bt(Ht((Lt(),mg))));break;default:throw R(new Bt(Ht((Lt(),vZe))))}if(fi(this),c=Jw(this),i=null,c.e==2){if(c.Nm()!=2)throw R(new Bt(Ht((Lt(),yZe))));i=c.Jm(1),c=c.Jm(0)}if(this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),ai(),ai(),new CRe(r,t,c,i)},s.vm=function(){return fi(this),ai(),y7e},s.wm=function(){var n;if(fi(this),n=kR(24,Jw(this)),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.xm=function(){var n;if(fi(this),n=kR(20,Jw(this)),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.ym=function(){var n;if(fi(this),n=kR(22,Jw(this)),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.zm=function(){var n,t,i,r,c;for(n=0,i=0,t=-1;this.d=this.j)throw R(new Bt(Ht((Lt(),K2e))));if(t==45){for(++this.d;this.d=this.j)throw R(new Bt(Ht((Lt(),K2e))))}if(t==58){if(++this.d,fi(this),r=gDe(Jw(this),n,i),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));fi(this)}else if(t==41)++this.d,fi(this),r=gDe(Jw(this),n,i);else throw R(new Bt(Ht((Lt(),pZe))));return r},s.Am=function(){var n;if(fi(this),n=kR(21,Jw(this)),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.Bm=function(){var n;if(fi(this),n=kR(23,Jw(this)),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.Cm=function(){var n,t;if(fi(this),n=this.f++,t=pV(Jw(this),n),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),t},s.Dm=function(){var n;if(fi(this),n=pV(Jw(this),0),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.Em=function(n){return fi(this),this.c==5?(fi(this),dR(n,(ai(),ai(),new D2(9,n)))):dR(n,(ai(),ai(),new D2(3,n)))},s.Fm=function(n){var t;return fi(this),t=(ai(),ai(),new Vj(2)),this.c==5?(fi(this),fg(t,gA),fg(t,n)):(fg(t,n),fg(t,gA)),t},s.Gm=function(n){return fi(this),this.c==5?(fi(this),ai(),ai(),new D2(9,n)):(ai(),ai(),new D2(3,n))},s.a=0,s.b=0,s.c=0,s.d=0,s.e=0,s.f=1,s.g=null,s.j=0,v(Gd,"RegEx/RegexParser",820),m(1910,820,{},Lxe),s._l=function(n){return!1},s.am=function(){return Lbe(this)},s.bm=function(n){return O8(n)},s.cm=function(n){return ZVe(this)},s.dm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.em=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.fm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.gm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.hm=function(){return fi(this),O8(67)},s.im=function(){return fi(this),O8(73)},s.jm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.km=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.lm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.mm=function(){return fi(this),O8(99)},s.nm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.om=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.pm=function(){return fi(this),O8(105)},s.qm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.rm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.sm=function(n,t){return tm(n,O8(t)),-1},s.tm=function(){return fi(this),ai(),ai(),new Gh(0,94)},s.um=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.vm=function(){return fi(this),ai(),ai(),new Gh(0,36)},s.wm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.xm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.ym=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.zm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.Am=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.Bm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.Cm=function(){var n;if(fi(this),n=pV(Jw(this),0),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.Dm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.Em=function(n){return fi(this),dR(n,(ai(),ai(),new D2(3,n)))},s.Fm=function(n){var t;return fi(this),t=(ai(),ai(),new Vj(2)),fg(t,n),fg(t,gA),t},s.Gm=function(n){return fi(this),ai(),ai(),new D2(3,n)};var u5=null,V7=null;v(Gd,"RegEx/ParserForXMLSchema",1910),m(121,1,h7,bw),s.Hm=function(n){throw R(new du("Not supported."))},s.Im=function(){return-1},s.Jm=function(n){return null},s.Km=function(){return null},s.Lm=function(n){},s.Mm=function(n){},s.Nm=function(){return 0},s.Ib=function(){return this.Om(0)},s.Om=function(n){return this.e==11?".":""},s.e=0;var w7e,Y7,bA,Ehn,p7e,Vm=null,NG,Xce=null,m7e,gA,Kce=null,v7e,y7e,k7e,j7e,E7e,Shn,e6,xhn,Ahn,Mhn,Chn,Q7,Thn,Ohn,nzn=v(Gd,"RegEx/Token",121);m(137,121,{3:1,137:1,121:1},cl),s.Om=function(n){var t,i,r;if(this.e==4)if(this==m7e)i=".";else if(this==NG)i="\\d";else if(this==Q7)i="\\w";else if(this==e6)i="\\s";else{for(r=new vd,r.a+="[",t=0;t0&&(r.a+=","),this.b[t]===this.b[t+1]?Bc(r,rN(this.b[t])):(Bc(r,rN(this.b[t])),r.a+="-",Bc(r,rN(this.b[t+1])));r.a+="]",i=r.a}else if(this==k7e)i="\\D";else if(this==E7e)i="\\W";else if(this==j7e)i="\\S";else{for(r=new vd,r.a+="[^",t=0;t0&&(r.a+=","),this.b[t]===this.b[t+1]?Bc(r,rN(this.b[t])):(Bc(r,rN(this.b[t])),r.a+="-",Bc(r,rN(this.b[t+1])));r.a+="]",i=r.a}return i},s.a=!1,s.c=!1,v(Gd,"RegEx/RangeToken",137),m(580,1,{580:1},ooe),s.a=0,v(Gd,"RegEx/RegexParser/ReferencePosition",580),m(579,1,{3:1,579:1},pMe),s.Fb=function(n){var t;return n==null||!X(n,579)?!1:(t=u(n,579),gn(this.b,t.b)&&this.a==t.a)},s.Hb=function(){return Id(this.b+"/"+Cbe(this.a))},s.Ib=function(){return this.c.Om(this.a)},s.a=0,v(Gd,"RegEx/RegularExpression",579),m(228,121,h7,Gh),s.Im=function(){return this.a},s.Om=function(n){var t,i,r;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:r="\\"+HK(this.a&yr);break;case 12:r="\\f";break;case 10:r="\\n";break;case 13:r="\\r";break;case 9:r="\\t";break;case 27:r="\\e";break;default:this.a>=Ec?(i=(t=this.a>>>0,"0"+t.toString(16)),r="\\v"+of(i,i.length-6,i.length)):r=""+HK(this.a&yr)}break;case 8:this==v7e||this==y7e?r=""+HK(this.a&yr):r="\\"+HK(this.a&yr);break;default:r=null}return r},s.a=0,v(Gd,"RegEx/Token/CharToken",228),m(322,121,h7,D2),s.Jm=function(n){return this.a},s.Lm=function(n){this.b=n},s.Mm=function(n){this.c=n},s.Nm=function(){return 1},s.Om=function(n){var t;if(this.e==3)if(this.c<0&&this.b<0)t=this.a.Om(n)+"*";else if(this.c==this.b)t=this.a.Om(n)+"{"+this.c+"}";else if(this.c>=0&&this.b>=0)t=this.a.Om(n)+"{"+this.c+","+this.b+"}";else if(this.c>=0&&this.b<0)t=this.a.Om(n)+"{"+this.c+",}";else throw R(new du("Token#toString(): CLOSURE "+this.c+To+this.b));else if(this.c<0&&this.b<0)t=this.a.Om(n)+"*?";else if(this.c==this.b)t=this.a.Om(n)+"{"+this.c+"}?";else if(this.c>=0&&this.b>=0)t=this.a.Om(n)+"{"+this.c+","+this.b+"}?";else if(this.c>=0&&this.b<0)t=this.a.Om(n)+"{"+this.c+",}?";else throw R(new du("Token#toString(): NONGREEDYCLOSURE "+this.c+To+this.b));return t},s.b=0,s.c=0,v(Gd,"RegEx/Token/ClosureToken",322),m(821,121,h7,zfe),s.Jm=function(n){return n==0?this.a:this.b},s.Nm=function(){return 2},s.Om=function(n){var t;return this.b.e==3&&this.b.Jm(0)==this.a?t=this.a.Om(n)+"+":this.b.e==9&&this.b.Jm(0)==this.a?t=this.a.Om(n)+"+?":t=this.a.Om(n)+(""+this.b.Om(n)),t},v(Gd,"RegEx/Token/ConcatToken",821),m(1908,121,h7,CRe),s.Jm=function(n){if(n==0)return this.d;if(n==1)return this.b;throw R(new du("Internal Error: "+n))},s.Nm=function(){return this.b?2:1},s.Om=function(n){var t;return this.c>0?t="(?("+this.c+")":this.a.e==8?t="(?("+this.a+")":t="(?"+this.a,this.b?t+=this.d+"|"+this.b+")":t+=this.d+")",t},s.c=0,v(Gd,"RegEx/Token/ConditionToken",1908),m(1909,121,h7,hLe),s.Jm=function(n){return this.b},s.Nm=function(){return 1},s.Om=function(n){return"(?"+(this.a==0?"":Cbe(this.a))+(this.c==0?"":Cbe(this.c))+":"+this.b.Om(n)+")"},s.a=0,s.c=0,v(Gd,"RegEx/Token/ModifierToken",1909),m(822,121,h7,Yfe),s.Jm=function(n){return this.a},s.Nm=function(){return 1},s.Om=function(n){var t;switch(t=null,this.e){case 6:this.b==0?t="(?:"+this.a.Om(n)+")":t="("+this.a.Om(n)+")";break;case 20:t="(?="+this.a.Om(n)+")";break;case 21:t="(?!"+this.a.Om(n)+")";break;case 22:t="(?<="+this.a.Om(n)+")";break;case 23:t="(?"+this.a.Om(n)+")"}return t},s.b=0,v(Gd,"RegEx/Token/ParenToken",822),m(517,121,{3:1,121:1,517:1},JV),s.Km=function(){return this.b},s.Om=function(n){return this.e==12?"\\"+this.a:POn(this.b)},s.a=0,v(Gd,"RegEx/Token/StringToken",517),m(466,121,h7,Vj),s.Hm=function(n){fg(this,n)},s.Jm=function(n){return u(Aw(this.a,n),121)},s.Nm=function(){return this.a?this.a.a.c.length:0},s.Om=function(n){var t,i,r,c,o;if(this.e==1){if(this.a.a.c.length==2)t=u(Aw(this.a,0),121),i=u(Aw(this.a,1),121),i.e==3&&i.Jm(0)==t?c=t.Om(n)+"+":i.e==9&&i.Jm(0)==t?c=t.Om(n)+"+?":c=t.Om(n)+(""+i.Om(n));else{for(o=new vd,r=0;r=this.c.b:this.a<=this.c.b},s.Sb=function(){return this.b>0},s.Tb=function(){return this.b},s.Vb=function(){return this.b-1},s.Qb=function(){throw R(new pd(Ben))},s.a=0,s.b=0,v(gme,"ExclusiveRange/RangeIterator",259);var Wl=L9(VF,"C"),$t=L9(JS,"I"),ts=L9(ly,"Z"),Ap=L9(HS,"J"),ds=L9(BS,"B"),Jr=L9(zS,"D"),Ym=L9(FS,"F"),o5=L9(GS,"S"),tzn=Gi("org.eclipse.elk.core.labels","ILabelManager"),S7e=Gi(yc,"DiagnosticChain"),x7e=Gi(den,"ResourceSet"),A7e=v(yc,"InvocationTargetException",null),Ihn=(GP(),X6n),Dhn=Dhn=AAn;G8n(wbn),u7n("permProps",[[["locale","default"],[zen,"gecko1_8"]],[["locale","default"],[zen,"safari"]]]),Dhn(null,"elk",null)}).call(this)}).call(this,typeof Lhn<"u"?Lhn:typeof self<"u"?self:typeof window<"u"?window:{})},{}],3:[function(x,M,N){function $(pe){"@babel/helpers - typeof";return $=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($e){return typeof $e}:function($e){return $e&&typeof Symbol=="function"&&$e.constructor===Symbol&&$e!==Symbol.prototype?"symbol":typeof $e},$(pe)}function k(pe,$e,ae){return Object.defineProperty(pe,"prototype",{writable:!1}),pe}function H(pe,$e){if(!(pe instanceof $e))throw new TypeError("Cannot call a class as a function")}function U(pe,$e,ae){return $e=Z($e),G(pe,W()?Reflect.construct($e,ae||[],Z(pe).constructor):$e.apply(pe,ae))}function G(pe,$e){if($e&&($($e)=="object"||typeof $e=="function"))return $e;if($e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ie(pe)}function ie(pe){if(pe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return pe}function W(){try{var pe=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(W=function(){return!!pe})()}function Z(pe){return Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function($e){return $e.__proto__||Object.getPrototypeOf($e)},Z(pe)}function le(pe,$e){if(typeof $e!="function"&&$e!==null)throw new TypeError("Super expression must either be null or a function");pe.prototype=Object.create($e&&$e.prototype,{constructor:{value:pe,writable:!0,configurable:!0}}),Object.defineProperty(pe,"prototype",{writable:!1}),$e&&oe(pe,$e)}function oe(pe,$e){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ae,Ne){return ae.__proto__=Ne,ae},oe(pe,$e)}var ee=x("./elk-api.js").default,Ce=(function(pe){function $e(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};H(this,$e);var Ne=Object.assign({},ae),Ue=!1;try{x.resolve("web-worker"),Ue=!0}catch{}if(ae.workerUrl)if(Ue){var ln=x("web-worker");Ne.workerFactory=function(xn){return new ln(xn)}}else console.warn(`Web worker requested but 'web-worker' package not installed. +`;return c};var qBn=v(NS,"TGraph",120);m(633,494,{3:1,494:1,633:1,105:1,150:1}),v(NS,"TShape",633),m(40,633,{3:1,494:1,40:1,633:1,105:1,150:1},tQ),s.Ib=function(){return Yb(this)};var PH=v(NS,"TNode",40);m(236,1,Zh,S1),s.Ic=function(n){cc(this,n)},s.Jc=function(){var n;return n=St(this.a.d,0),new Cv(n)},v(NS,"TNode/2",236),m(334,1,Fr,Cv),s.Nb=function(n){Zr(this,n)},s.Pb=function(){return u(jt(this.a),65).c},s.Ob=function(){return WC(this.a)},s.Qb=function(){OY(this.a)},v(NS,"TNode/2/1",334),m(1893,1,Mi,vo),s.If=function(n,t){uBn(this,u(n,120),t)},v(go,"CompactionProcessor",1893),m(1894,1,Yt,DEe),s.Le=function(n,t){return I7n(this.a,u(n,40),u(t,40))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(go,"CompactionProcessor/lambda$0$Type",1894),m(1895,1,zt,gCe),s.Mb=function(n){return K5n(this.b,this.a,u(n,49))},s.a=0,s.b=0,v(go,"CompactionProcessor/lambda$1$Type",1895),m(1904,1,Yt,Ml),s.Le=function(n,t){return F3n(u(n,40),u(t,40))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(go,"CompactionProcessor/lambda$10$Type",1904),m(1905,1,Yt,Tk),s.Le=function(n,t){return fpn(u(n,40),u(t,40))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(go,"CompactionProcessor/lambda$11$Type",1905),m(1906,1,Yt,F5),s.Le=function(n,t){return J3n(u(n,40),u(t,40))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(go,"CompactionProcessor/lambda$12$Type",1906),m(1896,1,zt,_Ee),s.Mb=function(n){return Ywn(this.a,u(n,49))},s.a=0,v(go,"CompactionProcessor/lambda$2$Type",1896),m(1897,1,zt,LEe),s.Mb=function(n){return Qwn(this.a,u(n,49))},s.a=0,v(go,"CompactionProcessor/lambda$3$Type",1897),m(1898,1,zt,vv),s.Mb=function(n){return u(n,40).c.indexOf(_F)==-1},v(go,"CompactionProcessor/lambda$4$Type",1898),m(1899,1,{},PEe),s.Kb=function(n){return Byn(this.a,u(n,40))},s.a=0,v(go,"CompactionProcessor/lambda$5$Type",1899),m(Q0,1,{},$Ee),s.Kb=function(n){return Z9n(this.a,u(n,40))},s.a=0,v(go,"CompactionProcessor/lambda$6$Type",Q0),m(1901,1,Yt,REe),s.Le=function(n,t){return o9n(this.a,u(n,240),u(t,240))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(go,"CompactionProcessor/lambda$7$Type",1901),m(1902,1,Yt,BEe),s.Le=function(n,t){return s9n(this.a,u(n,40),u(t,40))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(go,"CompactionProcessor/lambda$8$Type",1902),m(1903,1,Yt,Ok),s.Le=function(n,t){return apn(u(n,40),u(t,40))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(go,"CompactionProcessor/lambda$9$Type",1903),m(1891,1,Mi,_6),s.If=function(n,t){tDn(u(n,120),t)},v(go,"DirectionProcessor",1891),m(1883,1,Mi,lNe),s.If=function(n,t){j_n(this,u(n,120),t)},v(go,"FanProcessor",1883),m(1251,1,Mi,J5),s.If=function(n,t){wXe(u(n,120),t)},v(go,"GraphBoundsProcessor",1251),m(1252,1,{},eU),s.We=function(n){return u(n,40).e.a},v(go,"GraphBoundsProcessor/lambda$0$Type",1252),m(1253,1,{},Bs),s.We=function(n){return u(n,40).e.b},v(go,"GraphBoundsProcessor/lambda$1$Type",1253),m(1254,1,{},jM),s.We=function(n){return Ign(u(n,40))},v(go,"GraphBoundsProcessor/lambda$2$Type",1254),m(1255,1,{},EM),s.We=function(n){return Dgn(u(n,40))},v(go,"GraphBoundsProcessor/lambda$3$Type",1255),m(264,23,{3:1,35:1,23:1,264:1,196:1},mw),s.bg=function(){switch(this.g){case 0:return new $xe;case 1:return new lNe;case 2:return new Pxe;case 3:return new xM;case 4:return new k_;case 8:return new y_;case 5:return new _6;case 6:return new sh;case 7:return new vo;case 9:return new J5;case 10:return new el;default:throw R(new Un(tee+(this.f!=null?this.f:""+this.g)))}};var rye,cye,uye,oye,sye,lye,fye,aye,hye,dye,hre,UBn=yt(go,iee,264,Tt,sze,Nmn),isn;m(1890,1,Mi,y_),s.If=function(n,t){rRn(u(n,120),t)},v(go,"LevelCoordinatesProcessor",1890),m(1888,1,Mi,k_),s.If=function(n,t){ANn(this,u(n,120),t)},s.a=0,v(go,"LevelHeightProcessor",1888),m(1889,1,Zh,nU),s.Ic=function(n){cc(this,n)},s.Jc=function(){return En(),v9(),g7},v(go,"LevelHeightProcessor/1",1889),m(1884,1,Mi,Pxe),s.If=function(n,t){BIn(this,u(n,120),t)},v(go,"LevelProcessor",1884),m(1885,1,zt,SM),s.Mb=function(n){return Fe(ze(C(u(n,40),(Ti(),db))))},v(go,"LevelProcessor/lambda$0$Type",1885),m(1886,1,Mi,xM),s.If=function(n,t){_Cn(this,u(n,120),t)},s.a=0,v(go,"NeighborsProcessor",1886),m(1887,1,Zh,AM),s.Ic=function(n){cc(this,n)},s.Jc=function(){return En(),v9(),g7},v(go,"NeighborsProcessor/1",1887),m(1892,1,Mi,sh),s.If=function(n,t){y_n(this,u(n,120),t)},s.a=0,v(go,"NodePositionProcessor",1892),m(1882,1,Mi,$xe),s.If=function(n,t){cPn(this,u(n,120),t)},v(go,"RootProcessor",1882),m(1907,1,Mi,el),s.If=function(n,t){jSn(u(n,120),t)},v(go,"Untreeifyer",1907),m(385,23,{3:1,35:1,23:1,385:1},lK);var jI,dre,bye,gye=yt($N,"EdgeRoutingMode",385,Tt,iyn,Imn),rsn,EI,P7,bre,wye,pye,gre,wre,mye,pre,vye,mre,_x,vre,$H,RH,Vf,Sa,$7,Lx,Px,Vd,yye,csn,yre,db,SI,xI;m(846,1,Ua,MC),s.tf=function(n){nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Jpe),""),YQe),"Turns on Tree compaction which decreases the size of the whole tree by placing nodes of multiple levels in one large level"),($n(),!1)),(lg(),xr)),Qi),rn((vh(),Tn))))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Hpe),""),"Edge End Texture Length"),"Should be set to the length of the texture at the end of an edge. This value can be used to improve the Edge Routing."),7),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Gpe),""),"Tree Level"),"The index for the tree level the node is in"),ve(0)),dc),jr),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,qpe),""),YQe),"When set to a positive number this option will force the algorithm to place the node to the specified position within the trees layer if weighting is set to constraint"),ve(-1)),dc),jr),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Upe),""),"Weighting of Nodes"),"Which weighting to use when computing a node order."),Eye),Bi),Lye),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Xpe),""),"Edge Routing Mode"),"Chooses an Edge Routing algorithm."),kye),Bi),gye),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Kpe),""),"Search Order"),"Which search order to use when computing a spanning tree."),jye),Bi),$ye),rn(Tn)))),zVe((new hP,n))};var usn,osn,ssn,kye,lsn,fsn,jye,asn,hsn,Eye;v($N,"MrTreeMetaDataProvider",846),m(990,1,Ua,hP),s.tf=function(n){zVe(n)};var dsn,Sye,xye,kp,Aye,Mye,kre,bsn,gsn,wsn,psn,msn,vsn,ysn,Cye,Tye,Oye,ksn,K3,BH,Nye,jsn,Iye,jre,Esn,Ssn,xsn,Dye,Asn,Dh,_ye;v($N,"MrTreeOptions",990),m(991,1,{},Nk),s.uf=function(){var n;return n=new sNe,n},s.vf=function(n){},v($N,"MrTreeOptions/MrtreeFactory",991),m(353,23,{3:1,35:1,23:1,353:1},v$);var Ere,zH,Sre,xre,Lye=yt($N,"OrderWeighting",353,Tt,d6n,Dmn),Msn;m(425,23,{3:1,35:1,23:1,425:1},Sse);var Pye,Are,$ye=yt($N,"TreeifyingOrder",425,Tt,s4n,_mn),Csn;m(1446,1,oc,DU),s.pg=function(n){return u(n,120),Tsn},s.If=function(n,t){s7n(this,u(n,120),t)};var Tsn;v("org.eclipse.elk.alg.mrtree.p1treeify","DFSTreeifyer",1446),m(1447,1,oc,lP),s.pg=function(n){return u(n,120),Osn},s.If=function(n,t){HIn(this,u(n,120),t)};var Osn;v(Z8,"NodeOrderer",1447),m(1454,1,{},tU),s.rd=function(n){return aIe(n)},v(Z8,"NodeOrderer/0methodref$lambda$6$Type",1454),m(1448,1,zt,x_),s.Mb=function(n){return H4(),Fe(ze(C(u(n,40),(Ti(),db))))},v(Z8,"NodeOrderer/lambda$0$Type",1448),m(1449,1,zt,A_),s.Mb=function(n){return H4(),u(C(u(n,40),(Mu(),K3)),15).a<0},v(Z8,"NodeOrderer/lambda$1$Type",1449),m(1450,1,zt,FEe),s.Mb=function(n){return V8n(this.a,u(n,40))},v(Z8,"NodeOrderer/lambda$2$Type",1450),m(1451,1,zt,zEe),s.Mb=function(n){return zyn(this.a,u(n,40))},v(Z8,"NodeOrderer/lambda$3$Type",1451),m(1452,1,Yt,OM),s.Le=function(n,t){return b8n(u(n,40),u(t,40))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Z8,"NodeOrderer/lambda$4$Type",1452),m(1453,1,zt,M_),s.Mb=function(n){return H4(),u(C(u(n,40),(Ti(),wre)),15).a!=0},v(Z8,"NodeOrderer/lambda$5$Type",1453),m(1455,1,oc,_U),s.pg=function(n){return u(n,120),Nsn},s.If=function(n,t){VDn(this,u(n,120),t)},s.b=0;var Nsn;v("org.eclipse.elk.alg.mrtree.p3place","NodePlacer",1455),m(1456,1,oc,AC),s.pg=function(n){return u(n,120),Isn},s.If=function(n,t){ODn(u(n,120),t)};var Isn,XBn=v(Qs,"EdgeRouter",1456);m(1458,1,Yt,Ik),s.Le=function(n,t){return oo(u(n,15).a,u(t,15).a)},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/0methodref$compare$Type",1458),m(1463,1,{},MM),s.We=function(n){return ne(re(n))},v(Qs,"EdgeRouter/1methodref$doubleValue$Type",1463),m(1465,1,Yt,uw),s.Le=function(n,t){return ji(ne(re(n)),ne(re(t)))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/2methodref$compare$Type",1465),m(1467,1,Yt,Dk),s.Le=function(n,t){return ji(ne(re(n)),ne(re(t)))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/3methodref$compare$Type",1467),m(1469,1,{},L6),s.We=function(n){return ne(re(n))},v(Qs,"EdgeRouter/4methodref$doubleValue$Type",1469),m(1471,1,Yt,CM),s.Le=function(n,t){return ji(ne(re(n)),ne(re(t)))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/5methodref$compare$Type",1471),m(1473,1,Yt,TM),s.Le=function(n,t){return ji(ne(re(n)),ne(re(t)))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/6methodref$compare$Type",1473),m(1457,1,{},j_),s.Kb=function(n){return P1(),u(C(u(n,40),(Mu(),Dh)),15)},v(Qs,"EdgeRouter/lambda$0$Type",1457),m(1468,1,{},E_),s.Kb=function(n){return Epn(u(n,40))},v(Qs,"EdgeRouter/lambda$11$Type",1468),m(1470,1,{},pCe),s.Kb=function(n){return qvn(this.b,this.a,u(n,40))},s.a=0,s.b=0,v(Qs,"EdgeRouter/lambda$13$Type",1470),m(1472,1,{},wCe),s.Kb=function(n){return Apn(this.b,this.a,u(n,40))},s.a=0,s.b=0,v(Qs,"EdgeRouter/lambda$15$Type",1472),m(1474,1,Yt,S_),s.Le=function(n,t){return eSn(u(n,65),u(t,65))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/lambda$17$Type",1474),m(1475,1,Yt,iU),s.Le=function(n,t){return nSn(u(n,65),u(t,65))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/lambda$18$Type",1475),m(1476,1,Yt,C_),s.Le=function(n,t){return iSn(u(n,65),u(t,65))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/lambda$19$Type",1476),m(1459,1,zt,JEe),s.Mb=function(n){return E4n(this.a,u(n,40))},s.a=0,v(Qs,"EdgeRouter/lambda$2$Type",1459),m(1477,1,Yt,T_),s.Le=function(n,t){return tSn(u(n,65),u(t,65))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/lambda$20$Type",1477),m(1460,1,Yt,O_),s.Le=function(n,t){return _vn(u(n,40),u(t,40))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/lambda$3$Type",1460),m(1461,1,Yt,NM),s.Le=function(n,t){return Lvn(u(n,40),u(t,40))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"EdgeRouter/lambda$4$Type",1461),m(1462,1,{},N_),s.Kb=function(n){return Spn(u(n,40))},v(Qs,"EdgeRouter/lambda$5$Type",1462),m(1464,1,{},mCe),s.Kb=function(n){return Uvn(this.b,this.a,u(n,40))},s.a=0,s.b=0,v(Qs,"EdgeRouter/lambda$7$Type",1464),m(1466,1,{},vCe),s.Kb=function(n){return xpn(this.b,this.a,u(n,40))},s.a=0,s.b=0,v(Qs,"EdgeRouter/lambda$9$Type",1466),m(662,1,{662:1},fHe),s.e=0,s.f=!1,s.g=!1,v(Qs,"MultiLevelEdgeNodeNodeGap",662),m(1864,1,Yt,I_),s.Le=function(n,t){return P4n(u(n,240),u(t,240))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"MultiLevelEdgeNodeNodeGap/lambda$0$Type",1864),m(1865,1,Yt,D_),s.Le=function(n,t){return $4n(u(n,240),u(t,240))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(Qs,"MultiLevelEdgeNodeNodeGap/lambda$1$Type",1865);var V3;m(487,23,{3:1,35:1,23:1,487:1,188:1,196:1},xse),s.bg=function(){return KFe(this)},s.og=function(){return KFe(this)};var FH,Y3,Rye=yt(Vpe,"RadialLayoutPhases",487,Tt,l4n,Lmn),Dsn;m(1083,214,ep,RAe),s.kf=function(n,t){var i,r,c,o,l,f;if(i=UUe(this,n),t.Tg("Radial layout",i.c.length),Fe(ze(ke(n,(q0(),Vye))))||qT((r=new dj((Rb(),new v0(n))),r)),f=ZAn(n),Ei(n,(Gv(),V3),f),!f)throw R(new Un("The given graph is not a tree!"));for(c=ne(re(ke(n,GH))),c==0&&(c=yqe(n)),Ei(n,GH,c),l=new P(UUe(this,n));l.a=3)for(fe=u(K(te,0),26),De=u(K(te,1),26),o=0;o+2=fe.f+De.f+p||De.f>=be.f+fe.f+p){un=!0;break}else++o;else un=!0;if(!un){for(S=te.i,f=new st(te);f.e!=f.i.gc();)l=u(ft(f),26),Ei(l,(Xt(),RI),ve(S)),--S;jKe(n,new s4),t.Ug();return}for(i=(zT(this.a),aa(this.a,(ez(),$x),u(ke(n,A6e),188)),aa(this.a,qH,u(ke(n,y6e),188)),aa(this.a,Rre,u(ke(n,E6e),188)),Fse(this.a,(On=new or,qt(On,$x,(Ez(),Fre)),qt(On,qH,zre),Fe(ze(ke(n,m6e)))&&qt(On,$x,Jre),Fe(ze(ke(n,p6e)))&&qt(On,$x,Bre),On)),uN(this.a,n)),b=1/i.c.length,O=new P(i);O.a0&&wFe((Wn(t-1,n.length),n.charCodeAt(t-1)),hQe);)--t;if(r>=t)throw R(new Un("The given string does not contain any numbers."));if(c=nm((Qr(r,t,n.length),n.substr(r,t-r)),`,|;|\r| +`),c.length!=2)throw R(new Un("Exactly two numbers are expected, "+c.length+" were found."));try{this.a=K2(V2(c[0])),this.b=K2(V2(c[1]))}catch(o){throw o=sr(o),X(o,131)?(i=o,R(new Un(dQe+i))):R(o)}},s.Ib=function(){return"("+this.a+","+this.b+")"},s.a=0,s.b=0;var Lr=v(NN,"KVector",8);m(78,66,{3:1,4:1,20:1,31:1,56:1,18:1,66:1,16:1,78:1,414:1},xs,XP,IOe),s.Nc=function(){return Okn(this)},s.ag=function(n){var t,i,r,c,o,l;r=nm(n,`,|;|\\(|\\)|\\[|\\]|\\{|\\}| | | +`),qs(this);try{for(i=0,o=0,c=0,l=0;i0&&(o%2==0?c=K2(r[i]):l=K2(r[i]),o>0&&o%2!=0&&Vt(this,new Ee(c,l)),++o),++i}catch(f){throw f=sr(f),X(f,131)?(t=f,R(new Un("The given string does not match the expected format for vectors."+t))):R(f)}},s.Ib=function(){var n,t,i;for(n=new tl("("),t=St(this,0);t.b!=t.d.c;)i=u(jt(t),8),Kt(n,i.a+","+i.b),t.b!=t.d.c&&(n.a+="; ");return(n.a+=")",n).a};var l9e=v(NN,"KVectorChain",78);m(256,23,{3:1,35:1,23:1,256:1},Bj);var lce,nG,tG,NI,II,iG,f9e=yt(Oo,"Alignment",256,Tt,N9n,svn),bfn;m(975,1,Ua,NC),s.tf=function(n){cKe(n)};var a9e,fce,gfn,h9e,d9e,wfn,b9e,pfn,mfn,g9e,w9e,vfn;v(Oo,"BoxLayouterOptions",975),m(976,1,{},UM),s.uf=function(){var n;return n=new bL,n},s.vf=function(n){},v(Oo,"BoxLayouterOptions/BoxFactory",976),m(299,23,{3:1,35:1,23:1,299:1},zj);var qx,ace,Ux,Xx,Kx,hce,dce=yt(Oo,"ContentAlignment",299,Tt,I9n,lvn),yfn;m(689,1,Ua,OC),s.tf=function(n){nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,mWe),""),"Layout Algorithm"),"Select a specific layout algorithm."),(lg(),Gy)),He),rn((vh(),Tn))))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,vWe),""),"Resolved Layout Algorithm"),"Meta data associated with the selected algorithm."),Za),YBn),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,ppe),""),"Alignment"),"Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm."),p9e),Bi),f9e),rn(fr)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,U8),""),"Aspect Ratio"),"The desired aspect ratio of the drawing, that is the quotient of width by height."),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,N2e),""),"Bend Points"),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),Za),l9e),rn(xa)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,OF),""),"Content Alignment"),"Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option."),v9e),Hy),dce),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,PN),""),"Debug Mode"),"Whether additional debug information shall be generated."),($n(),!1)),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Jee),""),"Direction"),"Overall direction of edges: horizontal (right / left) or vertical (down / up)."),y9e),Bi),Yx),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,LN),""),"Edge Routing"),"What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline."),E9e),Bi),Mce),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,T2e),""),"Expand Nodes"),"If active, nodes are expanded to fill the area of their parent."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,TF),""),"Hierarchy Handling"),"Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."),x9e),Bi),b8e),Ci(Tn,F(z(Wa,1),je,160,0,[fr]))))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,sm),""),"Padding"),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),P9e),Za),jve),Ci(Tn,F(z(Wa,1),je,160,0,[fr]))))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,ES),""),"Interactive"),"Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,IF),""),"interactive Layout"),"Whether the graph should be changeable interactively and by setting constraints"),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,SS),""),"Omit Node Micro Layout"),"Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,ZZ),""),"Port Constraints"),"Defines constraints of the position of the ports of a node."),F9e),Bi),p8e),rn(fr)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,NF),""),"Position"),"The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."),Za),Lr),Ci(fr,F(z(Wa,1),je,160,0,[Yd,Q1]))))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,xN),""),"Priority"),"Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used."),dc),jr),Ci(fr,F(z(Wa,1),je,160,0,[xa]))))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,fF),""),"Randomization Seed"),"Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time)."),dc),jr),rn(Tn)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,jS),""),"Separate Connected Components"),"Whether each connected component should be processed separately."),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Cpe),""),"Junction Points"),"This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order."),C9e),Za),l9e),rn(xa)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Ipe),""),"Comment Box"),"Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related."),!1),xr),Qi),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Dpe),""),"Hypernode"),"Whether the node should be handled as a hypernode."),!1),xr),Qi),rn(fr)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,EBn),""),"Label Manager"),"Label managers can shorten labels upon a layout algorithm's request."),Za),tzn),Ci(Tn,F(z(Wa,1),je,160,0,[Q1]))))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,yWe),""),"Softwrapping Fuzziness"),"Determines the amount of fuzziness to be used when performing softwrapping on labels. The value expresses the percent of overhang that is permitted for each line. If the next line would take up less space than this threshold, it is appended to the current line instead of being placed in a new line."),0),ec),gr),rn(Q1)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Lpe),""),"Margins"),"Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."),T9e),Za),kve),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,gpe),""),"No Layout"),"No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."),!1),xr),Qi),Ci(fr,F(z(Wa,1),je,160,0,[xa,Yd,Q1]))))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,kWe),""),"Scale Factor"),"The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."),1),ec),gr),rn(fr)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,jWe),""),"Child Area Width"),"The width of the area occupied by the laid out children of a node."),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,EWe),""),"Child Area Height"),"The height of the area occupied by the laid out children of a node."),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,AN),""),dWe),"Turns topdown layout on and off. If this option is enabled, hierarchical layout will be computed first for the root node and then for its children recursively. Layouts are then scaled down to fit the area provided by their parents. Graphs must follow a certain structure for topdown layout to work properly. {@link TopdownNodeTypes.PARALLEL_NODE} nodes must have children of type {@link TopdownNodeTypes.HIERARCHICAL_NODE} and must define {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} for their children. Furthermore they need to be laid out using an algorithm that is a {@link TopdownLayoutProvider}. Hierarchical nodes can also be parents of other hierarchical nodes and can optionally use a {@link TopdownSizeApproximator} to dynamically set sizes during topdown layout. In this case {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} should be set on the node itself rather than the parent. The values are then used by the size approximator as base values. Hierarchical nodes require the layout option {@link nodeSize.fixedGraphSize} to be true to prevent the algorithm used there from resizing the hierarchical node. This option is not supported if 'Hierarchy Handling' is set to 'INCLUDE_CHILDREN'"),!1),xr),Qi),rn(Tn)))),qi(n,AN,np,null),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,SWe),""),"Animate"),"Whether the shift from the old layout to the new computed layout shall be animated."),!0),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,xWe),""),"Animation Time Factor"),"Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."),ve(100)),dc),jr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,AWe),""),"Layout Ancestors"),"Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,MWe),""),"Maximal Animation Time"),"The maximal time for animations, in milliseconds."),ve(4e3)),dc),jr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,CWe),""),"Minimal Animation Time"),"The minimal time for animations, in milliseconds."),ve(400)),dc),jr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,TWe),""),"Progress Bar"),"Whether a progress bar shall be displayed during layout computations."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,OWe),""),"Validate Graph"),"Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,NWe),""),"Validate Options"),"Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!0),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,IWe),""),"Zoom to Fit"),"Whether the zoom level shall be set to view the whole diagram after layout."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,O2e),"box"),"Box Layout Mode"),"Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better."),m9e),Bi),O8e),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,DWe),"json"),"Shape Coords"),"For layouts transferred into JSON graphs, specify the coordinate system to be used for nodes, ports, and labels of nodes and ports."),M9e),Bi),y8e),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,_We),"json"),"Edge Coords"),"For layouts transferred into JSON graphs, specify the coordinate system to be used for edge route points and edge labels."),A9e),Bi),n8e),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,ipe),Ka),"Comment Comment Spacing"),"Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing."),10),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,rpe),Ka),"Comment Node Spacing"),"Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing."),10),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,cpe),Ka),"Components Spacing"),"Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."),20),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,upe),Ka),"Edge Spacing"),"Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines."),10),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,WZ),Ka),"Edge Label Spacing"),"The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."),2),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Fee),Ka),"Edge Node Spacing"),"Spacing to be preserved between nodes and edges."),10),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,ope),Ka),"Label Spacing"),"Determines the amount of space to be left between two labels of the same graph element."),0),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,fpe),Ka),"Label Node Spacing"),"Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."),5),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,spe),Ka),"Horizontal spacing between Label and Port"),"Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,lpe),Ka),"Vertical spacing between Label and Port"),"Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,om),Ka),"Node Spacing"),"The minimal distance to be preserved between each two nodes."),20),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,ape),Ka),"Node Self Loop Spacing"),"Spacing to be preserved between a node and its self loops."),10),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,hpe),Ka),"Port Spacing"),"Spacing between pairs of ports of the same node."),10),ec),gr),Ci(Tn,F(z(Wa,1),je,160,0,[fr]))))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,dpe),Ka),"Individual Spacing"),"Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent."),Za),wan),Ci(fr,F(z(Wa,1),je,160,0,[xa,Yd,Q1]))))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Ppe),Ka),"Additional Port Space"),"Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border."),Q9e),Za),kve),rn(Tn)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,Gee),$We),"Layout Partition"),"Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction)."),dc),jr),Ci(Tn,F(z(Wa,1),je,160,0,[fr]))))),qi(n,Gee,Hee,Ifn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Hee),$We),"Layout Partitioning"),"Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle."),$9e),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,ype),RWe),"Node Label Padding"),"Define padding for node labels that are placed inside of a node."),N9e),Za),jve),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,K8),RWe),"Node Label Placement"),"Hints for where node labels are to be placed; if empty, the node label's position is not modified."),I9e),Hy),$c),Ci(fr,F(z(Wa,1),je,160,0,[Q1]))))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Epe),zF),"Port Alignment"),"Defines the default port distribution for a node. May be overridden for each side individually."),B9e),Bi),eA),rn(fr)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,Spe),zF),"Port Alignment (North)"),"Defines how ports on the northern side are placed, overriding the node's general port alignment."),Bi),eA),rn(fr)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,xpe),zF),"Port Alignment (South)"),"Defines how ports on the southern side are placed, overriding the node's general port alignment."),Bi),eA),rn(fr)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,Ape),zF),"Port Alignment (West)"),"Defines how ports on the western side are placed, overriding the node's general port alignment."),Bi),eA),rn(fr)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,Mpe),zF),"Port Alignment (East)"),"Defines how ports on the eastern side are placed, overriding the node's general port alignment."),Bi),eA),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,k3),gne),"Node Size Constraints"),"What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed."),D9e),Hy),iA),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,py),gne),"Node Size Options"),"Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications."),L9e),Hy),k8e),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,my),gne),"Node Size Minimum"),"The minimal size to which a node can be reduced."),_9e),Za),Lr),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,X8),gne),"Fixed Graph Size"),"By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Ope),zee),"Edge Label Placement"),"Gives a hint on where to put edge labels."),k9e),Bi),t8e),rn(Q1)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,aF),zee),"Inline Edge Labels"),"If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."),!1),xr),Qi),rn(Q1)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,SBn),"font"),"Font Name"),"Font name used for a label."),Gy),He),rn(Q1)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,LWe),"font"),"Font Size"),"Font size used for a label."),dc),jr),rn(Q1)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,_pe),wne),"Port Anchor Offset"),"The offset to the port position where connections shall be attached."),Za),Lr),rn(Yd)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,Npe),wne),"Port Index"),"The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."),dc),jr),rn(Yd)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,wpe),wne),"Port Side"),"The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."),G9e),Bi),xc),rn(Yd)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,bpe),wne),"Port Border Offset"),"The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."),ec),gr),rn(Yd)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,V8),_2e),"Port Label Placement"),"Decides on a placement method for port labels; if empty, the node label's position is not modified."),J9e),Hy),fG),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,kpe),_2e),"Port Labels Next to Port"),"Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE."),!1),xr),Qi),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,jpe),_2e),"Treat Port Labels as Group"),"If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port."),!0),xr),Qi),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,dne),r7),"Number of size categories"),"Defines the number of categories to use for the FIXED_INTEGER_RATIO_BOXES size approximator."),ve(3)),dc),jr),rn(Tn)))),qi(n,dne,bne,Gfn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,I2e),r7),"Weight of a node containing children for determining the graph size"),"When determining the graph size for the size categorisation, this value determines how many times a node containing children is weighted more than a simple node. For example setting this value to four would result in a graph containing a simple node and a hierarchical node to be counted as having a size of five."),ve(4)),dc),jr),rn(Tn)))),qi(n,I2e,dne,null),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,MN),r7),"Topdown Scale Factor"),"The scaling factor to be applied to the nodes laid out within the node in recursive topdown layout. The difference to 'Scale Factor' is that the node itself is not scaled. This value has to be set on hierarchical nodes."),1),ec),gr),rn(Tn)))),qi(n,MN,np,Ffn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,bne),r7),"Topdown Size Approximator"),"The size approximator to be used to set sizes of hierarchical nodes during topdown layout. The default value is null, which results in nodes keeping whatever size is defined for them e.g. through parent parallel node or by manually setting the size."),null),Za),QBn),rn(fr)))),qi(n,bne,np,Jfn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,CN),r7),"Topdown Hierarchical Node Width"),"The fixed size of a hierarchical node when using topdown layout. If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself."),150),ec),gr),Ci(Tn,F(z(Wa,1),je,160,0,[fr]))))),qi(n,CN,np,null),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,TN),r7),"Topdown Hierarchical Node Aspect Ratio"),"The fixed aspect ratio of a hierarchical node when using topdown layout. Default is 1/sqrt(2). If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself."),1.414),ec),gr),Ci(Tn,F(z(Wa,1),je,160,0,[fr]))))),qi(n,TN,np,null),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,np),r7),"Topdown Node Type"),"The different node types used for topdown layout. If the node type is set to {@link TopdownNodeTypes.PARALLEL_NODE} the algorithm must be set to a {@link TopdownLayoutProvider} such as {@link TopdownPacking}. The {@link nodeSize.fixedGraphSize} option is technically only required for hierarchical nodes."),null),Bi),E8e),rn(fr)))),qi(n,np,X8,null),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,D2e),r7),"Topdown Scale Cap"),"Determines the upper limit for the topdown scale factor. The default value is 1.0 which ensures that nested children never end up appearing larger than their parents in terms of unit sizes such as the font size. If the limit is larger, nodes will fully utilize the available space, but it is counteriniuitive for inner nodes to have a larger scale than outer nodes."),1),ec),gr),rn(Tn)))),qi(n,D2e,np,zfn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,mpe),BWe),"Activate Inside Self Loops"),"Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."),!1),xr),Qi),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,vpe),BWe),"Inside Self Loop"),"Whether a self loop should be routed inside a node instead of around that node."),!1),xr),Qi),rn(xa)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Tpe),"edge"),"Edge Thickness"),"The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it."),1),ec),gr),rn(xa)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,PWe),"edge"),"Edge Type"),"The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations."),S9e),Bi),s8e),rn(xa)))),Oj(n,new P4(Sj(b9(d9(new d0,Rn),"Layered"),'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.'))),Oj(n,new P4(Sj(b9(d9(new d0,"org.eclipse.elk.orthogonal"),"Orthogonal"),`Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia '86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.`))),Oj(n,new P4(Sj(b9(d9(new d0,$o),"Force"),"Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984."))),Oj(n,new P4(Sj(b9(d9(new d0,"org.eclipse.elk.circle"),"Circle"),"Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph."))),Oj(n,new P4(Sj(b9(d9(new d0,QQe),"Tree"),"Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type."))),Oj(n,new P4(Sj(b9(d9(new d0,"org.eclipse.elk.planar"),"Planar"),"Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable."))),Oj(n,new P4(Sj(b9(d9(new d0,Gl),"Radial"),"Radial layout algorithms usually position the nodes of the graph on concentric circles."))),HXe((new BU,n)),cKe((new NC,n)),gXe((new zU,n))};var qy,kfn,p9e,B7,jfn,Efn,m9e,Lm,Pm,Sfn,DI,v9e,_I,Ng,y9e,bce,gce,k9e,j9e,E9e,xfn,S9e,Afn,W3,x9e,Mfn,LI,wce,PI,pce,Cfn,A9e,Tfn,M9e,Z3,C9e,z7,T9e,O9e,N9e,e5,I9e,Ig,D9e,$m,n5,_9e,bb,L9e,rG,$I,s1,P9e,Ofn,$9e,Nfn,Ifn,R9e,B9e,mce,vce,yce,kce,z9e,Ps,Vx,F9e,jce,Ece,Rm,J9e,H9e,t5,G9e,Uy,RI,Sce,Bm,Dfn,xce,_fn,Lfn,Pfn,$fn,q9e,U9e,Xy,X9e,cG,K9e,V9e,Qd,Rfn,Y9e,Q9e,W9e,F7,zm,J7,Ky,Bfn,zfn,uG,Ffn,oG,Jfn,Hfn,Gfn,qfn;v(Oo,"CoreOptions",689),m(86,23,{3:1,35:1,23:1,86:1},wT);var eh,Zc,ru,nh,Vl,Yx=yt(Oo,"Direction",86,Tt,q6n,cvn),Ufn;m(278,23,{3:1,35:1,23:1,278:1},j$);var sG,BI,Z9e,e8e,n8e=yt(Oo,"EdgeCoords",278,Tt,b6n,uvn),Xfn;m(279,23,{3:1,35:1,23:1,279:1},pK);var H7,Fm,G7,t8e=yt(Oo,"EdgeLabelPlacement",279,Tt,ayn,ovn),Kfn;m(222,23,{3:1,35:1,23:1,222:1},E$);var q7,zI,Vy,Ace,Mce=yt(Oo,"EdgeRouting",222,Tt,g6n,rvn),Vfn;m(327,23,{3:1,35:1,23:1,327:1},Fj);var i8e,r8e,c8e,u8e,Cce,o8e,s8e=yt(Oo,"EdgeType",327,Tt,L9n,gvn),Yfn;m(973,1,Ua,BU),s.tf=function(n){HXe(n)};var l8e,f8e,a8e,h8e,Qfn,d8e,Qx;v(Oo,"FixedLayouterOptions",973),m(974,1,{},XM),s.uf=function(){var n;return n=new ow,n},s.vf=function(n){},v(Oo,"FixedLayouterOptions/FixedFactory",974),m(347,23,{3:1,35:1,23:1,347:1},mK);var Wd,lG,Wx,b8e=yt(Oo,"HierarchyHandling",347,Tt,hyn,wvn),Wfn,QBn=Gi(Oo,"ITopdownSizeApproximator");m(292,23,{3:1,35:1,23:1,292:1},S$);var l1,gb,FI,JI,Zfn=yt(Oo,"LabelSide",292,Tt,w6n,bvn),ean;m(96,23,{3:1,35:1,23:1,96:1},Dv);var W1,Yf,wf,Qf,pl,Wf,pf,f1,Zf,$c=yt(Oo,"NodeLabelPlacement",96,Tt,P8n,fvn),nan;m(257,23,{3:1,35:1,23:1,257:1},pT);var g8e,Zx,wb,w8e,HI,eA=yt(Oo,"PortAlignment",257,Tt,i9n,avn),tan;m(102,23,{3:1,35:1,23:1,102:1},Jj);var Dg,to,a1,U7,th,pb,p8e=yt(Oo,"PortConstraints",102,Tt,_9n,hvn),ian;m(280,23,{3:1,35:1,23:1,280:1},Hj);var nA,tA,Z1,GI,mb,Yy,fG=yt(Oo,"PortLabelPlacement",280,Tt,D9n,dvn),ran;m(64,23,{3:1,35:1,23:1,64:1},mT);var nt,Vn,Yl,Ql,Wo,zo,ih,ea,ks,hs,mo,js,Zo,es,na,ml,vl,mf,bt,ju,Yn,xc=yt(Oo,"PortSide",64,Tt,U6n,yvn),can;m(977,1,Ua,zU),s.tf=function(n){gXe(n)};var uan,oan,m8e,san,lan;v(Oo,"RandomLayouterOptions",977),m(978,1,{},KM),s.uf=function(){var n;return n=new WM,n},s.vf=function(n){},v(Oo,"RandomLayouterOptions/RandomFactory",978),m(300,23,{3:1,35:1,23:1,300:1},vK);var qI,Tce,v8e,y8e=yt(Oo,"ShapeCoords",300,Tt,dyn,kvn),fan;m(380,23,{3:1,35:1,23:1,380:1},x$);var Jm,UI,XI,_g,iA=yt(Oo,"SizeConstraint",380,Tt,m6n,jvn),aan;m(266,23,{3:1,35:1,23:1,266:1},_v);var KI,aG,X7,Oce,VI,rA,hG,dG,bG,k8e=yt(Oo,"SizeOptions",266,Tt,H8n,mvn),han;m(281,23,{3:1,35:1,23:1,281:1},yK);var Hm,j8e,gG,E8e=yt(Oo,"TopdownNodeTypes",281,Tt,byn,vvn),dan;m(288,23,JF);var S8e,Nce,x8e,A8e,YI=yt(Oo,"TopdownSizeApproximator",288,Tt,p6n,pvn);m(969,288,JF,wIe),s.Sg=function(n){return ZJe(n)},yt(Oo,"TopdownSizeApproximator/1",969,YI,null,null),m(970,288,JF,WIe),s.Sg=function(n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,De,un,cn,On;for(t=u(ke(n,(Xt(),Bm)),144),De=(j0(),A=new mj,A),QO(De,n),un=new wt,o=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));o.e!=o.i.gc();)r=u(ft(o),26),V=(S=new mj,S),Lz(V,De),QO(V,r),On=ZJe(r),vw(V,k.Math.max(r.g,On.a),k.Math.max(r.f,On.b)),Ko(un.f,r,V);for(c=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));c.e!=c.i.gc();)for(r=u(ft(c),26),p=new st((!r.e&&(r.e=new In(pr,r,7,4)),r.e));p.e!=p.i.gc();)b=u(ft(p),85),be=u(bu(Xc(un.f,r)),26),fe=u(zn(un,K((!b.c&&(b.c=new In(mt,b,5,8)),b.c),0)),26),te=(y=new kv,y),Et((!te.b&&(te.b=new In(mt,te,4,7)),te.b),be),Et((!te.c&&(te.c=new In(mt,te,5,8)),te.c),fe),_z(te,Fi(be)),QO(te,b);D=u(GT(t.f),214);try{D.kf(De,new b0),Wfe(t.f,D)}catch(Dn){throw Dn=sr(Dn),X(Dn,101)?(O=Dn,R(O)):R(Dn)}return ba(De,Pm)||ba(De,Lm)||sZ(De),h=ne(re(ke(De,Pm))),f=ne(re(ke(De,Lm))),l=h/f,i=ne(re(ke(De,zm)))*k.Math.sqrt((!De.a&&(De.a=new we(Ft,De,10,11)),De.a).i),cn=u(ke(De,s1),104),q=cn.b+cn.c+1,B=cn.d+cn.a+1,new Ee(k.Math.max(q,i),k.Math.max(B,i/l))},yt(Oo,"TopdownSizeApproximator/2",970,YI,null,null),m(971,288,JF,S_e),s.Sg=function(n){var t,i,r,c,o,l;return i=ne(re(ke(n,(Xt(),zm)))),t=i/ne(re(ke(n,F7))),r=H_n(n),o=u(ke(n,s1),104),c=ne(re(_e(Qd))),Fi(n)&&(c=ne(re(ke(Fi(n),Qd)))),l=A1(new Ee(i,t),r),pi(l,new Ee(-(o.b+o.c)-c,-(o.d+o.a)-c))},yt(Oo,"TopdownSizeApproximator/3",971,YI,null,null),m(972,288,JF,ZIe),s.Sg=function(n){var t,i,r,c,o,l,f,h,b,p;for(l=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));l.e!=l.i.gc();)o=u(ft(l),26),ke(o,(Xt(),oG))!=null&&(!o.a&&(o.a=new we(Ft,o,10,11)),!!o.a)&&(!o.a&&(o.a=new we(Ft,o,10,11)),o.a).i>0?(i=u(ke(o,oG),521),p=i.Sg(o),b=u(ke(o,s1),104),vw(o,k.Math.max(o.g,p.a+b.b+b.c),k.Math.max(o.f,p.b+b.d+b.a))):(!o.a&&(o.a=new we(Ft,o,10,11)),o.a).i!=0&&vw(o,ne(re(ke(o,zm))),ne(re(ke(o,zm)))/ne(re(ke(o,F7))));t=u(ke(n,(Xt(),Bm)),144),h=u(GT(t.f),214);try{h.kf(n,new b0),Wfe(t.f,h)}catch(y){throw y=sr(y),X(y,101)?(f=y,R(f)):R(y)}return Ei(n,qy,c7),bPe(n),sZ(n),c=ne(re(ke(n,Pm))),r=ne(re(ke(n,Lm))),new Ee(c,r)},yt(Oo,"TopdownSizeApproximator/4",972,YI,null,null);var ban;m(345,1,{852:1},s4),s.Tg=function(n,t){return hGe(this,n,t)},s.Ug=function(){RGe(this)},s.Vg=function(){return this.q},s.Wg=function(){return this.f?IR(this.f):null},s.Xg=function(){return IR(this.a)},s.Yg=function(){return this.p},s.Zg=function(){return!1},s.$g=function(){return this.n},s._g=function(){return this.p!=null&&!this.b},s.ah=function(n){var t;this.n&&(t=n,Ce(this.f,t))},s.bh=function(n,t){var i,r;this.n&&n&&Iyn(this,(i=new dDe,r=FW(i,n),C$n(i),r),(RB(),Dce))},s.dh=function(n){var t;return this.b?null:(t=v8n(this,this.g),Vt(this.a,t),t.i=this,this.d=n,t)},s.eh=function(n){n>0&&!this.b&&Vhe(this,n)},s.b=!1,s.c=0,s.d=-1,s.e=null,s.f=null,s.g=-1,s.j=!1,s.k=!1,s.n=!1,s.o=0,s.q=0,s.r=0,v($u,"BasicProgressMonitor",345),m(706,214,ep,bL),s.kf=function(n,t){jKe(n,t)},v($u,"BoxLayoutProvider",706),m(965,1,Yt,eSe),s.Le=function(n,t){return CNn(this,u(n,26),u(t,26))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},s.a=!1,v($u,"BoxLayoutProvider/1",965),m(167,1,{167:1},gB,NOe),s.Ib=function(){return this.c?Jbe(this.c):Ja(this.b)},v($u,"BoxLayoutProvider/Group",167),m(326,23,{3:1,35:1,23:1,326:1},A$);var M8e,C8e,T8e,Ice,O8e=yt($u,"BoxLayoutProvider/PackingMode",326,Tt,v6n,Evn),gan;m(966,1,Yt,VM),s.Le=function(n,t){return R5n(u(n,167),u(t,167))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v($u,"BoxLayoutProvider/lambda$0$Type",966),m(967,1,Yt,zk),s.Le=function(n,t){return C5n(u(n,167),u(t,167))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v($u,"BoxLayoutProvider/lambda$1$Type",967),m(968,1,Yt,YM),s.Le=function(n,t){return T5n(u(n,167),u(t,167))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v($u,"BoxLayoutProvider/lambda$2$Type",968),m(1338,1,{829:1},gL),s.Lg=function(n,t){return e$(),!X(t,174)||DAe((X4(),u(n,174)),t)},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type",1338),m(1339,1,ut,nSe),s.Ad=function(n){Nkn(this.a,u(n,147))},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type",1339),m(1340,1,ut,QM),s.Ad=function(n){u(n,105),e$()},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type",1340),m(1344,1,ut,tSe),s.Ad=function(n){i7n(this.a,u(n,105))},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type",1344),m(1342,1,zt,CCe),s.Mb=function(n){return dkn(this.a,this.b,u(n,147))},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type",1342),m(1341,1,zt,TCe),s.Mb=function(n){return Mpn(this.a,this.b,u(n,829))},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type",1341),m(1343,1,ut,OCe),s.Ad=function(n){A3n(this.a,this.b,u(n,147))},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type",1343),m(930,1,{},wL),s.Kb=function(n){return xTe(n)},s.Fb=function(n){return this===n},v($u,"ElkUtil/lambda$0$Type",930),m(931,1,ut,NCe),s.Ad=function(n){ITn(this.a,this.b,u(n,85))},s.a=0,s.b=0,v($u,"ElkUtil/lambda$1$Type",931),m(932,1,ut,ICe),s.Ad=function(n){Cbn(this.a,this.b,u(n,170))},s.a=0,s.b=0,v($u,"ElkUtil/lambda$2$Type",932),m(933,1,ut,DCe),s.Ad=function(n){jwn(this.a,this.b,u(n,157))},s.a=0,s.b=0,v($u,"ElkUtil/lambda$3$Type",933),m(934,1,ut,iSe),s.Ad=function(n){Vvn(this.a,u(n,372))},v($u,"ElkUtil/lambda$4$Type",934),m(331,1,{35:1,331:1},ibn),s.Dd=function(n){return Xwn(this,u(n,242))},s.Fb=function(n){var t;return X(n,331)?(t=u(n,331),this.a==t.a):!1},s.Hb=function(){return lc(this.a)},s.Ib=function(){return this.a+" (exclusive)"},s.a=0,v($u,"ExclusiveBounds/ExclusiveLowerBound",331),m(1088,214,ep,ow),s.kf=function(n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,De,un,cn;for(t.Tg("Fixed Layout",1),o=u(ke(n,(Xt(),j9e)),222),y=0,S=0,V=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));V.e!=V.i.gc();){for(B=u(ft(V),26),cn=u(ke(B,(BB(),Qx)),8),cn&&(Il(B,cn.a,cn.b),u(ke(B,f8e),182).Gc((Vs(),Jm))&&(A=u(ke(B,h8e),8),A.a>0&&A.b>0&&Yw(B,A.a,A.b,!0,!0))),y=k.Math.max(y,B.i+B.g),S=k.Math.max(S,B.j+B.f),b=new st((!B.n&&(B.n=new we(Eu,B,1,7)),B.n));b.e!=b.i.gc();)f=u(ft(b),157),cn=u(ke(f,Qx),8),cn&&Il(f,cn.a,cn.b),y=k.Math.max(y,B.i+f.i+f.g),S=k.Math.max(S,B.j+f.j+f.f);for(fe=new st((!B.c&&(B.c=new we($s,B,9,9)),B.c));fe.e!=fe.i.gc();)for(be=u(ft(fe),125),cn=u(ke(be,Qx),8),cn&&Il(be,cn.a,cn.b),De=B.i+be.i,un=B.j+be.j,y=k.Math.max(y,De+be.g),S=k.Math.max(S,un+be.f),h=new st((!be.n&&(be.n=new we(Eu,be,1,7)),be.n));h.e!=h.i.gc();)f=u(ft(h),157),cn=u(ke(f,Qx),8),cn&&Il(f,cn.a,cn.b),y=k.Math.max(y,De+f.i+f.g),S=k.Math.max(S,un+f.j+f.f);for(c=new Xn(Qn(U0(B).a.Jc(),new ee));ht(c);)i=u(ct(c),85),p=_Ve(i),y=k.Math.max(y,p.a),S=k.Math.max(S,p.b);for(r=new Xn(Qn(MW(B).a.Jc(),new ee));ht(r);)i=u(ct(r),85),Fi(dW(i))!=n&&(p=_Ve(i),y=k.Math.max(y,p.a),S=k.Math.max(S,p.b))}if(o==(z1(),q7))for(q=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));q.e!=q.i.gc();)for(B=u(ft(q),26),r=new Xn(Qn(U0(B).a.Jc(),new ee));ht(r);)i=u(ct(r),85),l=C_n(i),l.b==0?Ei(i,Z3,null):Ei(i,Z3,l);Fe(ze(ke(n,(BB(),a8e))))||(te=u(ke(n,Qfn),104),D=y+te.b+te.c,O=S+te.d+te.a,Yw(n,D,O,!0,!0)),t.Ug()},v($u,"FixedLayoutProvider",1088),m(379,150,{3:1,414:1,379:1,105:1,150:1},z6,jRe),s.ag=function(n){var t,i,r,c,o,l,f,h,b;if(n)try{for(h=nm(n,";,;"),o=h,l=0,f=o.length;l>16&yr|t^r<<16},s.Jc=function(){return new rSe(this)},s.Ib=function(){return this.a==null&&this.b==null?"pair(null,null)":this.a==null?"pair(null,"+fu(this.b)+")":this.b==null?"pair("+fu(this.a)+",null)":"pair("+fu(this.a)+","+fu(this.b)+")"},v($u,"Pair",49),m(979,1,Fr,rSe),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return!this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)},s.Pb=function(){if(!this.c&&!this.b&&this.a.a!=null)return this.b=!0,this.a.a;if(!this.c&&this.a.b!=null)return this.c=!0,this.a.b;throw R(new hu)},s.Qb=function(){throw this.c&&this.a.b!=null?this.a.b=null:this.b&&this.a.a!=null&&(this.a.a=null),R(new is)},s.b=!1,s.c=!1,v($u,"Pair/1",979),m(1078,214,ep,WM),s.kf=function(n,t){var i,r,c,o,l;if(t.Tg("Random Layout",1),(!n.a&&(n.a=new we(Ft,n,10,11)),n.a).i==0){t.Ug();return}o=u(ke(n,(bde(),san)),15),o&&o.a!=0?c=new VR(o.a):c=new yQ,i=QC(re(ke(n,uan))),l=QC(re(ke(n,lan))),r=u(ke(n,oan),104),V$n(n,c,i,l,r),t.Ug()},v($u,"RandomLayoutProvider",1078),m(240,1,{240:1},eV),s.Fb=function(n){return Ku(this.a,u(n,240).a)&&Ku(this.b,u(n,240).b)&&Ku(this.c,u(n,240).c)},s.Hb=function(){return zB(F(z(Mr,1),Nn,1,5,[this.a,this.b,this.c]))},s.Ib=function(){return"("+this.a+To+this.b+To+this.c+")"},v($u,"Triple",240);var van;m(550,1,{}),s.Jf=function(){return new Ee(this.f.i,this.f.j)},s.mf=function(n){return k_e(n,(Xt(),Ps))?ke(this.f,yan):ke(this.f,n)},s.Kf=function(){return new Ee(this.f.g,this.f.f)},s.Lf=function(){return this.g},s.nf=function(n){return ba(this.f,n)},s.Mf=function(n){Os(this.f,n.a),Ns(this.f,n.b)},s.Nf=function(n){Pw(this.f,n.a),Lw(this.f,n.b)},s.Of=function(n){this.g=n},s.g=0;var yan;v(_S,"ElkGraphAdapters/AbstractElkGraphElementAdapter",550),m(552,1,{837:1},NP),s.Pf=function(){var n,t;if(!this.b)for(this.b=JR(NV(this.a).i),t=new st(NV(this.a));t.e!=t.i.gc();)n=u(ft(t),157),Ce(this.b,new MX(n));return this.b},s.b=null,v(_S,"ElkGraphAdapters/ElkEdgeAdapter",552),m(260,550,{},v0),s.Qf=function(){return vHe(this)},s.a=null,v(_S,"ElkGraphAdapters/ElkGraphAdapter",260),m(630,550,{187:1},MX),v(_S,"ElkGraphAdapters/ElkLabelAdapter",630),m(551,550,{685:1},q$),s.Pf=function(){return txn(this)},s.Tf=function(){var n;return n=u(ke(this.f,(Xt(),z7)),140),!n&&(n=new pj),n},s.Vf=function(){return ixn(this)},s.Xf=function(n){var t;t=new QK(n),Ei(this.f,(Xt(),z7),t)},s.Yf=function(n){Ei(this.f,(Xt(),s1),new Yle(n))},s.Rf=function(){return this.d},s.Sf=function(){var n,t;if(!this.a)for(this.a=new Te,t=new Xn(Qn(MW(u(this.f,26)).a.Jc(),new ee));ht(t);)n=u(ct(t),85),Ce(this.a,new NP(n));return this.a},s.Uf=function(){var n,t;if(!this.c)for(this.c=new Te,t=new Xn(Qn(U0(u(this.f,26)).a.Jc(),new ee));ht(t);)n=u(ct(t),85),Ce(this.c,new NP(n));return this.c},s.Wf=function(){return OR(u(this.f,26)).i!=0||Fe(ze(u(this.f,26).mf((Xt(),LI))))},s.Zf=function(){e8n(this,(Rb(),van))},s.a=null,s.b=null,s.c=null,s.d=null,s.e=null,v(_S,"ElkGraphAdapters/ElkNodeAdapter",551),m(1249,550,{836:1},cSe),s.Pf=function(){return fxn(this)},s.Sf=function(){var n,t;if(!this.a)for(this.a=Jh(u(this.f,125).gh().i),t=new st(u(this.f,125).gh());t.e!=t.i.gc();)n=u(ft(t),85),Ce(this.a,new NP(n));return this.a},s.Uf=function(){var n,t;if(!this.c)for(this.c=Jh(u(this.f,125).hh().i),t=new st(u(this.f,125).hh());t.e!=t.i.gc();)n=u(ft(t),85),Ce(this.c,new NP(n));return this.c},s.$f=function(){return u(u(this.f,125).mf((Xt(),t5)),64)},s._f=function(){var n,t,i,r,c,o,l,f;for(r=_a(u(this.f,125)),i=new st(u(this.f,125).hh());i.e!=i.i.gc();)for(n=u(ft(i),85),f=new st((!n.c&&(n.c=new In(mt,n,5,8)),n.c));f.e!=f.i.gc();){if(l=u(ft(f),84),P2(iu(l),r))return!0;if(iu(l)==r&&Fe(ze(ke(n,(Xt(),wce)))))return!0}for(t=new st(u(this.f,125).gh());t.e!=t.i.gc();)for(n=u(ft(t),85),o=new st((!n.b&&(n.b=new In(mt,n,4,7)),n.b));o.e!=o.i.gc();)if(c=u(ft(o),84),P2(iu(c),r))return!0;return!1},s.a=null,s.b=null,s.c=null,v(_S,"ElkGraphAdapters/ElkPortAdapter",1249),m(1250,1,Yt,mL),s.Le=function(n,t){return yDn(u(n,125),u(t,125))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(_S,"ElkGraphAdapters/PortComparator",1250);var vb=Gi(ql,"EObject"),K7=Gi(x3,JWe),yl=Gi(x3,HWe),QI=Gi(x3,GWe),WI=Gi(x3,"ElkShape"),mt=Gi(x3,qWe),pr=Gi(x3,P2e),$i=Gi(x3,UWe),ZI=Gi(ql,XWe),cA=Gi(ql,"EFactory"),kan,_ce=Gi(ql,KWe),Aa=Gi(ql,"EPackage"),Pr,jan,Ean,_8e,wG,San,L8e,P8e,$8e,h1,xan,Aan,Eu=Gi(x3,$2e),Ft=Gi(x3,R2e),$s=Gi(x3,B2e);m(93,1,VWe),s.qh=function(){return this.rh(),null},s.rh=function(){return null},s.sh=function(){return this.rh(),!1},s.th=function(){return!1},s.uh=function(n){hi(this,n)},v(ky,"BasicNotifierImpl",93),m(100,93,ZWe),s.Vh=function(){return Fs(this)},s.vh=function(n,t){return n},s.wh=function(){throw R(new _t)},s.xh=function(n){var t;return t=Oc(u(Cn(this.Ah(),this.Ch()),19)),this.Mh().Qh(this,t.n,t.f,n)},s.yh=function(n,t){throw R(new _t)},s.zh=function(n,t,i){return hl(this,n,t,i)},s.Ah=function(){var n;return this.wh()&&(n=this.wh().Lk(),n)?n:this.fi()},s.Bh=function(){return xW(this)},s.Ch=function(){throw R(new _t)},s.Dh=function(){var n,t;return t=this.Xh().Mk(),!t&&this.wh().Rk(t=(Ij(),n=dae(kh(this.Ah())),n==null?Jce:new ST(this,n))),t},s.Eh=function(n,t){return n},s.Fh=function(n){var t;return t=n.nk(),t?n.Jj():Ji(this.Ah(),n)},s.Gh=function(){var n;return n=this.wh(),n?n.Ok():null},s.Hh=function(){return this.wh()?this.wh().Lk():null},s.Ih=function(n,t,i){return sz(this,n,t,i)},s.Jh=function(n){return H9(this,n)},s.Kh=function(n,t){return aY(this,n,t)},s.Lh=function(){var n;return n=this.wh(),!!n&&n.Pk()},s.Mh=function(){throw R(new _t)},s.Nh=function(){return iz(this)},s.Oh=function(n,t,i,r){return Z4(this,n,t,r)},s.Ph=function(n,t,i){var r;return r=u(Cn(this.Ah(),t),69),r.uk().xk(this,this.ei(),t-this.gi(),n,i)},s.Qh=function(n,t,i,r){return LR(this,n,t,r)},s.Rh=function(n,t,i){var r;return r=u(Cn(this.Ah(),t),69),r.uk().yk(this,this.ei(),t-this.gi(),n,i)},s.Sh=function(){return!!this.wh()&&!!this.wh().Nk()},s.Th=function(n){return LQ(this,n)},s.Uh=function(n){return P_e(this,n)},s.Wh=function(n){return pVe(this,n)},s.Xh=function(){throw R(new _t)},s.Yh=function(){return this.wh()?this.wh().Nk():null},s.Zh=function(){return iz(this)},s.$h=function(n,t){yW(this,n,t)},s._h=function(n){this.Xh().Qk(n)},s.ai=function(n){this.Xh().Tk(n)},s.bi=function(n){this.Xh().Sk(n)},s.ci=function(n,t){var i,r,c,o;return o=this.Gh(),o&&n&&(t=vc(o.Cl(),this,t),o.Gl(this)),r=this.Mh(),r&&((RW(this,this.Mh(),this.Ch()).Bb&Ec)!=0?(c=r.Nh(),c&&(n?!o&&c.Gl(this):c.Fl(this))):(t=(i=this.Ch(),i>=0?this.xh(t):this.Mh().Qh(this,-1-i,null,t)),t=this.zh(null,-1,t))),this.ai(n),t},s.di=function(n){var t,i,r,c,o,l,f,h;if(i=this.Ah(),o=Ji(i,n),t=this.gi(),o>=t)return u(n,69).uk().Bk(this,this.ei(),o-t);if(o<=-1)if(l=w3((ls(),nc),i,n),l){if(Tc(),u(l,69).vk()||(l=$4(Vc(nc,l))),c=(r=this.Fh(l),u(r>=0?this.Ih(r,!0,!0):Xw(this,l,!0),163)),h=l.Gk(),h>1||h==-1)return u(u(c,219).Ql(n,!1),77)}else throw R(new Un(nb+n.ve()+pne));else if(n.Hk())return r=this.Fh(n),u(r>=0?this.Ih(r,!1,!0):Xw(this,n,!1),77);return f=new VCe(this,n),f},s.ei=function(){return khe(this)},s.fi=function(){return(C0(),Bn).S},s.gi=function(){return dt(this.fi())},s.hi=function(n){pW(this,n)},s.Ib=function(){return Ff(this)},v(Jn,"BasicEObjectImpl",100);var Man;m(117,100,{109:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1}),s.ii=function(n){var t;return t=jhe(this),t[n]},s.ji=function(n,t){var i;i=jhe(this),ir(i,n,t)},s.ki=function(n){var t;t=jhe(this),ir(t,n,null)},s.qh=function(){return u(Kn(this,4),129)},s.rh=function(){throw R(new _t)},s.sh=function(){return(this.Db&4)!=0},s.wh=function(){throw R(new _t)},s.li=function(n){Q4(this,2,n)},s.yh=function(n,t){this.Db=t<<16|this.Db&255,this.li(n)},s.Ah=function(){return Go(this)},s.Ch=function(){return this.Db>>16},s.Dh=function(){var n,t;return Ij(),t=dae(kh((n=u(Kn(this,16),29),n||this.fi()))),t==null?Jce:new ST(this,t)},s.th=function(){return(this.Db&1)==0},s.Gh=function(){return u(Kn(this,128),1996)},s.Hh=function(){return u(Kn(this,16),29)},s.Lh=function(){return(this.Db&32)!=0},s.Mh=function(){return u(Kn(this,2),52)},s.Sh=function(){return(this.Db&64)!=0},s.Xh=function(){throw R(new _t)},s.Yh=function(){return u(Kn(this,64),290)},s._h=function(n){Q4(this,16,n)},s.ai=function(n){Q4(this,128,n)},s.bi=function(n){Q4(this,64,n)},s.ei=function(){return Lo(this)},s.Db=0,v(Jn,"MinimalEObjectImpl",117),m(118,117,{109:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),s.li=function(n){this.Cb=n},s.Mh=function(){return this.Cb},v(Jn,"MinimalEObjectImpl/Container",118),m(2045,118,{109:1,343:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),s.Ih=function(n,t,i){return $de(this,n,t,i)},s.Rh=function(n,t,i){return A0e(this,n,t,i)},s.Th=function(n){return Oae(this,n)},s.$h=function(n,t){E1e(this,n,t)},s.fi=function(){return Gu(),Aan},s.hi=function(n){f1e(this,n)},s.lf=function(){return BJe(this)},s.fh=function(){return!this.o&&(this.o=new os((Gu(),h1),Zd,this,0)),this.o},s.mf=function(n){return ke(this,n)},s.nf=function(n){return ba(this,n)},s.of=function(n,t){return Ei(this,n,t)},v(wg,"EMapPropertyHolderImpl",2045),m(559,118,{109:1,372:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},Jk),s.Ih=function(n,t,i){switch(n){case 0:return this.a;case 1:return this.b}return sz(this,n,t,i)},s.Th=function(n){switch(n){case 0:return this.a!=0;case 1:return this.b!=0}return LQ(this,n)},s.$h=function(n,t){switch(n){case 0:wB(this,ne(re(t)));return;case 1:pB(this,ne(re(t)));return}yW(this,n,t)},s.fi=function(){return Gu(),jan},s.hi=function(n){switch(n){case 0:wB(this,0);return;case 1:pB(this,0);return}pW(this,n)},s.Ib=function(){var n;return(this.Db&64)!=0?Ff(this):(n=new cf(Ff(this)),n.a+=" (x: ",Tv(n,this.a),n.a+=", y: ",Tv(n,this.b),n.a+=")",n.a)},s.a=0,s.b=0,v(wg,"ElkBendPointImpl",559),m(727,2045,{109:1,343:1,174:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),s.Ih=function(n,t,i){return J1e(this,n,t,i)},s.Ph=function(n,t,i){return lW(this,n,t,i)},s.Rh=function(n,t,i){return KY(this,n,t,i)},s.Th=function(n){return r1e(this,n)},s.$h=function(n,t){t0e(this,n,t)},s.fi=function(){return Gu(),San},s.hi=function(n){R1e(this,n)},s.ih=function(){return this.k},s.jh=function(){return NV(this)},s.Ib=function(){return vQ(this)},s.k=null,v(wg,"ElkGraphElementImpl",727),m(728,727,{109:1,343:1,174:1,276:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),s.Ih=function(n,t,i){return nde(this,n,t,i)},s.Th=function(n){return sde(this,n)},s.$h=function(n,t){i0e(this,n,t)},s.fi=function(){return Gu(),xan},s.hi=function(n){dde(this,n)},s.kh=function(){return this.f},s.lh=function(){return this.g},s.mh=function(){return this.i},s.nh=function(){return this.j},s.oh=function(n,t){vw(this,n,t)},s.ph=function(n,t){Il(this,n,t)},s.Ib=function(){return gW(this)},s.f=0,s.g=0,s.i=0,s.j=0,v(wg,"ElkShapeImpl",728),m(729,728,{109:1,343:1,84:1,174:1,276:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),s.Ih=function(n,t,i){return Nde(this,n,t,i)},s.Ph=function(n,t,i){return Yde(this,n,t,i)},s.Rh=function(n,t,i){return Qde(this,n,t,i)},s.Th=function(n){return v1e(this,n)},s.$h=function(n,t){fbe(this,n,t)},s.fi=function(){return Gu(),Ean},s.hi=function(n){Ade(this,n)},s.gh=function(){return!this.d&&(this.d=new In(pr,this,8,5)),this.d},s.hh=function(){return!this.e&&(this.e=new In(pr,this,7,4)),this.e},v(wg,"ElkConnectableShapeImpl",729),m(271,727,{109:1,343:1,85:1,174:1,271:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},kv),s.xh=function(n){return Ude(this,n)},s.Ih=function(n,t,i){switch(n){case 3:return T2(this);case 4:return!this.b&&(this.b=new In(mt,this,4,7)),this.b;case 5:return!this.c&&(this.c=new In(mt,this,5,8)),this.c;case 6:return!this.a&&(this.a=new we($i,this,6,6)),this.a;case 7:return $n(),!this.b&&(this.b=new In(mt,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new In(mt,this,5,8)),this.c.i<=1));case 8:return $n(),!!eS(this);case 9:return $n(),!!Uw(this);case 10:return $n(),!this.b&&(this.b=new In(mt,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new In(mt,this,5,8)),this.c.i!=0)}return J1e(this,n,t,i)},s.Ph=function(n,t,i){var r;switch(t){case 3:return this.Cb&&(i=(r=this.Db>>16,r>=0?Ude(this,i):this.Cb.Qh(this,-1-r,null,i))),Cle(this,u(n,26),i);case 4:return!this.b&&(this.b=new In(mt,this,4,7)),Co(this.b,n,i);case 5:return!this.c&&(this.c=new In(mt,this,5,8)),Co(this.c,n,i);case 6:return!this.a&&(this.a=new we($i,this,6,6)),Co(this.a,n,i)}return lW(this,n,t,i)},s.Rh=function(n,t,i){switch(t){case 3:return Cle(this,null,i);case 4:return!this.b&&(this.b=new In(mt,this,4,7)),vc(this.b,n,i);case 5:return!this.c&&(this.c=new In(mt,this,5,8)),vc(this.c,n,i);case 6:return!this.a&&(this.a=new we($i,this,6,6)),vc(this.a,n,i)}return KY(this,n,t,i)},s.Th=function(n){switch(n){case 3:return!!T2(this);case 4:return!!this.b&&this.b.i!=0;case 5:return!!this.c&&this.c.i!=0;case 6:return!!this.a&&this.a.i!=0;case 7:return!this.b&&(this.b=new In(mt,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new In(mt,this,5,8)),this.c.i<=1));case 8:return eS(this);case 9:return Uw(this);case 10:return!this.b&&(this.b=new In(mt,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new In(mt,this,5,8)),this.c.i!=0)}return r1e(this,n)},s.$h=function(n,t){switch(n){case 3:_z(this,u(t,26));return;case 4:!this.b&&(this.b=new In(mt,this,4,7)),kt(this.b),!this.b&&(this.b=new In(mt,this,4,7)),nr(this.b,u(t,18));return;case 5:!this.c&&(this.c=new In(mt,this,5,8)),kt(this.c),!this.c&&(this.c=new In(mt,this,5,8)),nr(this.c,u(t,18));return;case 6:!this.a&&(this.a=new we($i,this,6,6)),kt(this.a),!this.a&&(this.a=new we($i,this,6,6)),nr(this.a,u(t,18));return}t0e(this,n,t)},s.fi=function(){return Gu(),_8e},s.hi=function(n){switch(n){case 3:_z(this,null);return;case 4:!this.b&&(this.b=new In(mt,this,4,7)),kt(this.b);return;case 5:!this.c&&(this.c=new In(mt,this,5,8)),kt(this.c);return;case 6:!this.a&&(this.a=new we($i,this,6,6)),kt(this.a);return}R1e(this,n)},s.Ib=function(){return RKe(this)},v(wg,"ElkEdgeImpl",271),m(443,2045,{109:1,343:1,170:1,443:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},yo),s.xh=function(n){return Jde(this,n)},s.Ih=function(n,t,i){switch(n){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return!this.a&&(this.a=new mr(yl,this,5)),this.a;case 6:return L_e(this);case 7:return t?zQ(this):this.i;case 8:return t?BQ(this):this.f;case 9:return!this.g&&(this.g=new In($i,this,9,10)),this.g;case 10:return!this.e&&(this.e=new In($i,this,10,9)),this.e;case 11:return this.d}return $de(this,n,t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?Jde(this,i):this.Cb.Qh(this,-1-c,null,i))),Tle(this,u(n,85),i);case 9:return!this.g&&(this.g=new In($i,this,9,10)),Co(this.g,n,i);case 10:return!this.e&&(this.e=new In($i,this,10,9)),Co(this.e,n,i)}return o=u(Cn((r=u(Kn(this,16),29),r||(Gu(),wG)),t),69),o.uk().xk(this,Lo(this),t-dt((Gu(),wG)),n,i)},s.Rh=function(n,t,i){switch(t){case 5:return!this.a&&(this.a=new mr(yl,this,5)),vc(this.a,n,i);case 6:return Tle(this,null,i);case 9:return!this.g&&(this.g=new In($i,this,9,10)),vc(this.g,n,i);case 10:return!this.e&&(this.e=new In($i,this,10,9)),vc(this.e,n,i)}return A0e(this,n,t,i)},s.Th=function(n){switch(n){case 1:return this.j!=0;case 2:return this.k!=0;case 3:return this.b!=0;case 4:return this.c!=0;case 5:return!!this.a&&this.a.i!=0;case 6:return!!L_e(this);case 7:return!!this.i;case 8:return!!this.f;case 9:return!!this.g&&this.g.i!=0;case 10:return!!this.e&&this.e.i!=0;case 11:return this.d!=null}return Oae(this,n)},s.$h=function(n,t){switch(n){case 1:e3(this,ne(re(t)));return;case 2:n3(this,ne(re(t)));return;case 3:Wv(this,ne(re(t)));return;case 4:Zv(this,ne(re(t)));return;case 5:!this.a&&(this.a=new mr(yl,this,5)),kt(this.a),!this.a&&(this.a=new mr(yl,this,5)),nr(this.a,u(t,18));return;case 6:$Ue(this,u(t,85));return;case 7:SB(this,u(t,84));return;case 8:EB(this,u(t,84));return;case 9:!this.g&&(this.g=new In($i,this,9,10)),kt(this.g),!this.g&&(this.g=new In($i,this,9,10)),nr(this.g,u(t,18));return;case 10:!this.e&&(this.e=new In($i,this,10,9)),kt(this.e),!this.e&&(this.e=new In($i,this,10,9)),nr(this.e,u(t,18));return;case 11:Xhe(this,Pt(t));return}E1e(this,n,t)},s.fi=function(){return Gu(),wG},s.hi=function(n){switch(n){case 1:e3(this,0);return;case 2:n3(this,0);return;case 3:Wv(this,0);return;case 4:Zv(this,0);return;case 5:!this.a&&(this.a=new mr(yl,this,5)),kt(this.a);return;case 6:$Ue(this,null);return;case 7:SB(this,null);return;case 8:EB(this,null);return;case 9:!this.g&&(this.g=new In($i,this,9,10)),kt(this.g);return;case 10:!this.e&&(this.e=new In($i,this,10,9)),kt(this.e);return;case 11:Xhe(this,null);return}f1e(this,n)},s.Ib=function(){return Kqe(this)},s.b=0,s.c=0,s.d=null,s.j=0,s.k=0,v(wg,"ElkEdgeSectionImpl",443),m(161,118,{109:1,94:1,93:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1}),s.Ih=function(n,t,i){var r;return n==0?(!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab):Pl(this,n-dt(this.fi()),Cn((r=u(Kn(this,16),29),r||this.fi()),n),t,i)},s.Ph=function(n,t,i){var r,c;return t==0?(!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i)):(c=u(Cn((r=u(Kn(this,16),29),r||this.fi()),t),69),c.uk().xk(this,Lo(this),t-dt(this.fi()),n,i))},s.Rh=function(n,t,i){var r,c;return t==0?(!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i)):(c=u(Cn((r=u(Kn(this,16),29),r||this.fi()),t),69),c.uk().yk(this,Lo(this),t-dt(this.fi()),n,i))},s.Th=function(n){var t;return n==0?!!this.Ab&&this.Ab.i!=0:Ll(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.Wh=function(n){return Cge(this,n)},s.$h=function(n,t){var i;if(n===0){!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return}Jl(this,n-dt(this.fi()),Cn((i=u(Kn(this,16),29),i||this.fi()),n),t)},s.ai=function(n){Q4(this,128,n)},s.fi=function(){return jn(),qan},s.hi=function(n){var t;if(n===0){!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return}Fl(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.mi=function(){this.Bb|=1},s.ni=function(n){return oS(this,n)},s.Bb=0,v(Jn,"EModelElementImpl",161),m(710,161,{109:1,94:1,93:1,469:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1},IC),s.oi=function(n,t){return fVe(this,n,t)},s.pi=function(n){var t,i,r,c,o;if(this.a!=ol(n)||(n.Bb&256)!=0)throw R(new Un(vne+n.zb+up));for(r=tu(n);Vu(r.a).i!=0;){if(i=u(oN(r,0,(t=u(K(Vu(r.a),0),87),o=t.c,X(o,88)?u(o,29):(jn(),jf))),29),Gw(i))return c=ol(i).ti().pi(i),u(c,52)._h(n),c;r=tu(i)}return(n.D!=null?n.D:n.B)=="java.util.Map$Entry"?new gIe(n):new bfe(n)},s.qi=function(n,t){return Qw(this,n,t)},s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.a}return Pl(this,n-dt((jn(),jb)),Cn((r=u(Kn(this,16),29),r||jb),n),t,i)},s.Ph=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 1:return this.a&&(i=u(this.a,52).Qh(this,4,Aa,i)),P1e(this,u(n,241),i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),jb)),t),69),c.uk().xk(this,Lo(this),t-dt((jn(),jb)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 1:return P1e(this,null,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),jb)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),jb)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return!!this.a}return Ll(this,n-dt((jn(),jb)),Cn((t=u(Kn(this,16),29),t||jb),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:SGe(this,u(t,241));return}Jl(this,n-dt((jn(),jb)),Cn((i=u(Kn(this,16),29),i||jb),n),t)},s.fi=function(){return jn(),jb},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:SGe(this,null);return}Fl(this,n-dt((jn(),jb)),Cn((t=u(Kn(this,16),29),t||jb),n))};var uA,R8e,Can;v(Jn,"EFactoryImpl",710),m(1018,710,{109:1,2075:1,94:1,93:1,469:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1},hU),s.oi=function(n,t){switch(n.fk()){case 12:return u(t,147).Og();case 13:return fu(t);default:throw R(new Un(u7+n.ve()+up))}},s.pi=function(n){var t,i,r,c,o,l,f,h;switch(n.G==-1&&(n.G=(t=ol(n),t?$d(t.si(),n):-1)),n.G){case 4:return o=new ZM,o;case 6:return l=new mj,l;case 7:return f=new voe,f;case 8:return r=new kv,r;case 9:return i=new Jk,i;case 10:return c=new yo,c;case 11:return h=new F6,h;default:throw R(new Un(vne+n.zb+up))}},s.qi=function(n,t){switch(n.fk()){case 13:case 12:return null;default:throw R(new Un(u7+n.ve()+up))}},v(wg,"ElkGraphFactoryImpl",1018),m(439,161,{109:1,94:1,93:1,158:1,197:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1}),s.Dh=function(){var n,t;return t=(n=u(Kn(this,16),29),dae(kh(n||this.fi()))),t==null?(Ij(),Ij(),Jce):new POe(this,t)},s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.ve()}return Pl(this,n-dt(this.fi()),Cn((r=u(Kn(this,16),29),r||this.fi()),n),t,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null}return Ll(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:this.ri(Pt(t));return}Jl(this,n-dt(this.fi()),Cn((i=u(Kn(this,16),29),i||this.fi()),n),t)},s.fi=function(){return jn(),Uan},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:this.ri(null);return}Fl(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.ve=function(){return this.zb},s.ri=function(n){Mo(this,n)},s.Ib=function(){return LE(this)},s.zb=null,v(Jn,"ENamedElementImpl",439),m(184,439,{109:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,52:1,100:1,161:1,184:1,117:1,118:1,680:1},u_e),s.xh=function(n){return LHe(this,n)},s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return!this.rb&&(this.rb=new x2(this,Ma,this)),this.rb;case 6:return!this.vb&&(this.vb=new x4(Aa,this,6,7)),this.vb;case 7:return t?this.Db>>16==7?u(this.Cb,241):null:J_e(this)}return Pl(this,n-dt((jn(),i0)),Cn((r=u(Kn(this,16),29),r||i0),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 4:return this.sb&&(i=u(this.sb,52).Qh(this,1,cA,i)),B1e(this,u(n,469),i);case 5:return!this.rb&&(this.rb=new x2(this,Ma,this)),Co(this.rb,n,i);case 6:return!this.vb&&(this.vb=new x4(Aa,this,6,7)),Co(this.vb,n,i);case 7:return this.Cb&&(i=(c=this.Db>>16,c>=0?LHe(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,7,i)}return o=u(Cn((r=u(Kn(this,16),29),r||(jn(),i0)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),i0)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 4:return B1e(this,null,i);case 5:return!this.rb&&(this.rb=new x2(this,Ma,this)),vc(this.rb,n,i);case 6:return!this.vb&&(this.vb=new x4(Aa,this,6,7)),vc(this.vb,n,i);case 7:return hl(this,null,7,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),i0)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),i0)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.yb!=null;case 3:return this.xb!=null;case 4:return!!this.sb;case 5:return!!this.rb&&this.rb.i!=0;case 6:return!!this.vb&&this.vb.i!=0;case 7:return!!J_e(this)}return Ll(this,n-dt((jn(),i0)),Cn((t=u(Kn(this,16),29),t||i0),n))},s.Wh=function(n){var t;return t=RNn(this,n),t||Cge(this,n)},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:Mo(this,Pt(t));return;case 2:OB(this,Pt(t));return;case 3:TB(this,Pt(t));return;case 4:bW(this,u(t,469));return;case 5:!this.rb&&(this.rb=new x2(this,Ma,this)),kt(this.rb),!this.rb&&(this.rb=new x2(this,Ma,this)),nr(this.rb,u(t,18));return;case 6:!this.vb&&(this.vb=new x4(Aa,this,6,7)),kt(this.vb),!this.vb&&(this.vb=new x4(Aa,this,6,7)),nr(this.vb,u(t,18));return}Jl(this,n-dt((jn(),i0)),Cn((i=u(Kn(this,16),29),i||i0),n),t)},s.bi=function(n){var t,i;if(n&&this.rb)for(i=new st(this.rb);i.e!=i.i.gc();)t=ft(i),X(t,360)&&(u(t,360).w=null);Q4(this,64,n)},s.fi=function(){return jn(),i0},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:Mo(this,null);return;case 2:OB(this,null);return;case 3:TB(this,null);return;case 4:bW(this,null);return;case 5:!this.rb&&(this.rb=new x2(this,Ma,this)),kt(this.rb);return;case 6:!this.vb&&(this.vb=new x4(Aa,this,6,7)),kt(this.vb);return}Fl(this,n-dt((jn(),i0)),Cn((t=u(Kn(this,16),29),t||i0),n))},s.mi=function(){ZQ(this)},s.si=function(){return!this.rb&&(this.rb=new x2(this,Ma,this)),this.rb},s.ti=function(){return this.sb},s.ui=function(){return this.ub},s.vi=function(){return this.xb},s.wi=function(){return this.yb},s.xi=function(n){this.ub=n},s.Ib=function(){var n;return(this.Db&64)!=0?LE(this):(n=new cf(LE(this)),n.a+=" (nsURI: ",Bc(n,this.yb),n.a+=", nsPrefix: ",Bc(n,this.xb),n.a+=")",n.a)},s.xb=null,s.yb=null,v(Jn,"EPackageImpl",184),m(556,184,{109:1,2077:1,556:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,52:1,100:1,161:1,184:1,117:1,118:1,680:1},tUe),s.q=!1,s.r=!1;var Tan=!1;v(wg,"ElkGraphPackageImpl",556),m(362,728,{109:1,343:1,174:1,157:1,276:1,362:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},ZM),s.xh=function(n){return Hde(this,n)},s.Ih=function(n,t,i){switch(n){case 7:return vae(this);case 8:return this.a}return nde(this,n,t,i)},s.Ph=function(n,t,i){var r;return t===7?(this.Cb&&(i=(r=this.Db>>16,r>=0?Hde(this,i):this.Cb.Qh(this,-1-r,null,i))),Mfe(this,u(n,174),i)):lW(this,n,t,i)},s.Rh=function(n,t,i){return t==7?Mfe(this,null,i):KY(this,n,t,i)},s.Th=function(n){switch(n){case 7:return!!vae(this);case 8:return!bn("",this.a)}return sde(this,n)},s.$h=function(n,t){switch(n){case 7:Abe(this,u(t,174));return;case 8:Ghe(this,Pt(t));return}i0e(this,n,t)},s.fi=function(){return Gu(),L8e},s.hi=function(n){switch(n){case 7:Abe(this,null);return;case 8:Ghe(this,"");return}dde(this,n)},s.Ib=function(){return HGe(this)},s.a="",v(wg,"ElkLabelImpl",362),m(206,729,{109:1,343:1,84:1,174:1,26:1,276:1,206:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},mj),s.xh=function(n){return Xde(this,n)},s.Ih=function(n,t,i){switch(n){case 9:return!this.c&&(this.c=new we($s,this,9,9)),this.c;case 10:return!this.a&&(this.a=new we(Ft,this,10,11)),this.a;case 11:return Fi(this);case 12:return!this.b&&(this.b=new we(pr,this,12,3)),this.b;case 13:return $n(),!this.a&&(this.a=new we(Ft,this,10,11)),this.a.i>0}return Nde(this,n,t,i)},s.Ph=function(n,t,i){var r;switch(t){case 9:return!this.c&&(this.c=new we($s,this,9,9)),Co(this.c,n,i);case 10:return!this.a&&(this.a=new we(Ft,this,10,11)),Co(this.a,n,i);case 11:return this.Cb&&(i=(r=this.Db>>16,r>=0?Xde(this,i):this.Cb.Qh(this,-1-r,null,i))),Gle(this,u(n,26),i);case 12:return!this.b&&(this.b=new we(pr,this,12,3)),Co(this.b,n,i)}return Yde(this,n,t,i)},s.Rh=function(n,t,i){switch(t){case 9:return!this.c&&(this.c=new we($s,this,9,9)),vc(this.c,n,i);case 10:return!this.a&&(this.a=new we(Ft,this,10,11)),vc(this.a,n,i);case 11:return Gle(this,null,i);case 12:return!this.b&&(this.b=new we(pr,this,12,3)),vc(this.b,n,i)}return Qde(this,n,t,i)},s.Th=function(n){switch(n){case 9:return!!this.c&&this.c.i!=0;case 10:return!!this.a&&this.a.i!=0;case 11:return!!Fi(this);case 12:return!!this.b&&this.b.i!=0;case 13:return!this.a&&(this.a=new we(Ft,this,10,11)),this.a.i>0}return v1e(this,n)},s.$h=function(n,t){switch(n){case 9:!this.c&&(this.c=new we($s,this,9,9)),kt(this.c),!this.c&&(this.c=new we($s,this,9,9)),nr(this.c,u(t,18));return;case 10:!this.a&&(this.a=new we(Ft,this,10,11)),kt(this.a),!this.a&&(this.a=new we(Ft,this,10,11)),nr(this.a,u(t,18));return;case 11:Lz(this,u(t,26));return;case 12:!this.b&&(this.b=new we(pr,this,12,3)),kt(this.b),!this.b&&(this.b=new we(pr,this,12,3)),nr(this.b,u(t,18));return}fbe(this,n,t)},s.fi=function(){return Gu(),P8e},s.hi=function(n){switch(n){case 9:!this.c&&(this.c=new we($s,this,9,9)),kt(this.c);return;case 10:!this.a&&(this.a=new we(Ft,this,10,11)),kt(this.a);return;case 11:Lz(this,null);return;case 12:!this.b&&(this.b=new we(pr,this,12,3)),kt(this.b);return}Ade(this,n)},s.Ib=function(){return Jbe(this)},v(wg,"ElkNodeImpl",206),m(193,729,{109:1,343:1,84:1,174:1,125:1,276:1,193:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},voe),s.xh=function(n){return Gde(this,n)},s.Ih=function(n,t,i){return n==9?_a(this):Nde(this,n,t,i)},s.Ph=function(n,t,i){var r;return t===9?(this.Cb&&(i=(r=this.Db>>16,r>=0?Gde(this,i):this.Cb.Qh(this,-1-r,null,i))),Ole(this,u(n,26),i)):Yde(this,n,t,i)},s.Rh=function(n,t,i){return t==9?Ole(this,null,i):Qde(this,n,t,i)},s.Th=function(n){return n==9?!!_a(this):v1e(this,n)},s.$h=function(n,t){if(n===9){kbe(this,u(t,26));return}fbe(this,n,t)},s.fi=function(){return Gu(),$8e},s.hi=function(n){if(n===9){kbe(this,null);return}Ade(this,n)},s.Ib=function(){return LXe(this)},v(wg,"ElkPortImpl",193);var Oan=Gi(yc,"BasicEMap/Entry");m(1091,118,{109:1,45:1,94:1,93:1,136:1,57:1,114:1,52:1,100:1,117:1,118:1},F6),s.Fb=function(n){return this===n},s.jd=function(){return this.b},s.Hb=function(){return jw(this)},s.Ai=function(n){zhe(this,u(n,147))},s.Ih=function(n,t,i){switch(n){case 0:return this.b;case 1:return this.c}return sz(this,n,t,i)},s.Th=function(n){switch(n){case 0:return!!this.b;case 1:return this.c!=null}return LQ(this,n)},s.$h=function(n,t){switch(n){case 0:zhe(this,u(t,147));return;case 1:Fhe(this,t);return}yW(this,n,t)},s.fi=function(){return Gu(),h1},s.hi=function(n){switch(n){case 0:zhe(this,null);return;case 1:Fhe(this,null);return}pW(this,n)},s.yi=function(){var n;return this.a==-1&&(n=this.b,this.a=n?Ni(n):0),this.a},s.kd=function(){return this.c},s.zi=function(n){this.a=n},s.ld=function(n){var t;return t=this.c,Fhe(this,n),t},s.Ib=function(){var n;return(this.Db&64)!=0?Ff(this):(n=new y0,Kt(Kt(Kt(n,this.b?this.b.Og():Vo),nee),Wj(this.c)),n.a)},s.a=-1,s.c=null;var Zd=v(wg,"ElkPropertyToValueMapEntryImpl",1091);m(980,1,{},Yp),v(Wr,"JsonAdapter",980),m(215,63,H1,lh),v(Wr,"JsonImportException",215),m(850,1,{},Qqe),v(Wr,"JsonImporter",850),m(884,1,{},_Ce),s.Bi=function(n){qHe(this.a,this.b,u(n,139))},v(Wr,"JsonImporter/lambda$0$Type",884),m(885,1,{},LCe),s.Bi=function(n){Cqe(this.a,this.b,u(n,139))},v(Wr,"JsonImporter/lambda$1$Type",885),m(893,1,{},uSe),s.Bi=function(n){zDe(this.a,u(n,149))},v(Wr,"JsonImporter/lambda$10$Type",893),m(895,1,{},PCe),s.Bi=function(n){gqe(this.a,this.b,u(n,139))},v(Wr,"JsonImporter/lambda$11$Type",895),m(896,1,{},$Ce),s.Bi=function(n){wqe(this.a,this.b,u(n,139))},v(Wr,"JsonImporter/lambda$12$Type",896),m(902,1,{},YDe),s.Bi=function(n){BGe(this.a,this.b,this.c,this.d,u(n,139))},v(Wr,"JsonImporter/lambda$13$Type",902),m(901,1,{},QDe),s.Bi=function(n){tKe(this.a,this.b,this.c,this.d,u(n,149))},v(Wr,"JsonImporter/lambda$14$Type",901),m(897,1,{},RCe),s.Bi=function(n){hNe(this.a,this.b,Pt(n))},v(Wr,"JsonImporter/lambda$15$Type",897),m(898,1,{},BCe),s.Bi=function(n){dNe(this.a,this.b,Pt(n))},v(Wr,"JsonImporter/lambda$16$Type",898),m(899,1,{},zCe),s.Bi=function(n){AHe(this.b,this.a,u(n,139))},v(Wr,"JsonImporter/lambda$17$Type",899),m(900,1,{},FCe),s.Bi=function(n){MHe(this.b,this.a,u(n,139))},v(Wr,"JsonImporter/lambda$18$Type",900),m(905,1,{},oSe),s.Bi=function(n){OGe(this.a,u(n,149))},v(Wr,"JsonImporter/lambda$19$Type",905),m(886,1,{},sSe),s.Bi=function(n){RHe(this.a,u(n,139))},v(Wr,"JsonImporter/lambda$2$Type",886),m(903,1,{},lSe),s.Bi=function(n){e3(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$20$Type",903),m(904,1,{},fSe),s.Bi=function(n){n3(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$21$Type",904),m(908,1,{},aSe),s.Bi=function(n){TGe(this.a,u(n,149))},v(Wr,"JsonImporter/lambda$22$Type",908),m(906,1,{},hSe),s.Bi=function(n){Wv(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$23$Type",906),m(907,1,{},dSe),s.Bi=function(n){Zv(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$24$Type",907),m(910,1,{},bSe),s.Bi=function(n){tGe(this.a,u(n,139))},v(Wr,"JsonImporter/lambda$25$Type",910),m(909,1,{},gSe),s.Bi=function(n){FDe(this.a,u(n,149))},v(Wr,"JsonImporter/lambda$26$Type",909),m(911,1,ut,JCe),s.Ad=function(n){R9n(this.b,this.a,Pt(n))},v(Wr,"JsonImporter/lambda$27$Type",911),m(912,1,ut,HCe),s.Ad=function(n){B9n(this.b,this.a,Pt(n))},v(Wr,"JsonImporter/lambda$28$Type",912),m(913,1,{},GCe),s.Bi=function(n){aUe(this.a,this.b,u(n,139))},v(Wr,"JsonImporter/lambda$29$Type",913),m(889,1,{},wSe),s.Bi=function(n){YFe(this.a,u(n,149))},v(Wr,"JsonImporter/lambda$3$Type",889),m(914,1,{},qCe),s.Bi=function(n){DUe(this.a,this.b,u(n,139))},v(Wr,"JsonImporter/lambda$30$Type",914),m(915,1,{},pSe),s.Bi=function(n){mRe(this.a,re(n))},v(Wr,"JsonImporter/lambda$31$Type",915),m(916,1,{},mSe),s.Bi=function(n){vRe(this.a,re(n))},v(Wr,"JsonImporter/lambda$32$Type",916),m(917,1,{},vSe),s.Bi=function(n){yRe(this.a,re(n))},v(Wr,"JsonImporter/lambda$33$Type",917),m(918,1,{},ySe),s.Bi=function(n){kRe(this.a,re(n))},v(Wr,"JsonImporter/lambda$34$Type",918),m(919,1,{},kSe),s.Bi=function(n){LMn(this.a,u(n,57))},v(Wr,"JsonImporter/lambda$35$Type",919),m(920,1,{},jSe),s.Bi=function(n){PMn(this.a,u(n,57))},v(Wr,"JsonImporter/lambda$36$Type",920),m(924,1,{},VDe),v(Wr,"JsonImporter/lambda$37$Type",924),m(921,1,ut,qNe),s.Ad=function(n){a7n(this.a,this.c,this.b,u(n,372))},v(Wr,"JsonImporter/lambda$38$Type",921),m(922,1,ut,UCe),s.Ad=function(n){Ygn(this.a,this.b,u(n,170))},v(Wr,"JsonImporter/lambda$39$Type",922),m(887,1,{},ESe),s.Bi=function(n){e3(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$4$Type",887),m(923,1,ut,XCe),s.Ad=function(n){Qgn(this.a,this.b,u(n,170))},v(Wr,"JsonImporter/lambda$40$Type",923),m(925,1,ut,UNe),s.Ad=function(n){h7n(this.a,this.b,this.c,u(n,8))},v(Wr,"JsonImporter/lambda$41$Type",925),m(888,1,{},SSe),s.Bi=function(n){n3(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$5$Type",888),m(892,1,{},xSe),s.Bi=function(n){QFe(this.a,u(n,149))},v(Wr,"JsonImporter/lambda$6$Type",892),m(890,1,{},ASe),s.Bi=function(n){Wv(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$7$Type",890),m(891,1,{},MSe),s.Bi=function(n){Zv(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$8$Type",891),m(894,1,{},CSe),s.Bi=function(n){iGe(this.a,u(n,139))},v(Wr,"JsonImporter/lambda$9$Type",894),m(944,1,ut,TSe),s.Ad=function(n){D4(this.a,new M2(Pt(n)))},v(Wr,"JsonMetaDataConverter/lambda$0$Type",944),m(945,1,ut,OSe),s.Ad=function(n){H3n(this.a,u(n,244))},v(Wr,"JsonMetaDataConverter/lambda$1$Type",945),m(946,1,ut,NSe),s.Ad=function(n){_4n(this.a,u(n,144))},v(Wr,"JsonMetaDataConverter/lambda$2$Type",946),m(947,1,ut,ISe),s.Ad=function(n){G3n(this.a,u(n,160))},v(Wr,"JsonMetaDataConverter/lambda$3$Type",947),m(244,23,{3:1,35:1,23:1,244:1},m4);var pG,mG,Lce,vG,yG,kG,Pce,$ce,jG=yt(EN,"GraphFeature",244,Tt,p8n,xvn),Nan;m(11,1,{35:1,147:1},ki,Pi,an,Yr),s.Dd=function(n){return Kwn(this,u(n,147))},s.Fb=function(n){return k_e(this,n)},s.Rg=function(){return _e(this)},s.Og=function(){return this.b},s.Hb=function(){return Id(this.b)},s.Ib=function(){return this.b},v(EN,"Property",11),m(657,1,Yt,hX),s.Le=function(n,t){return Tjn(this,u(n,105),u(t,105))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(EN,"PropertyHolderComparator",657),m(698,1,Fr,roe),s.Nb=function(n){Zr(this,n)},s.Pb=function(){return H9n(this)},s.Qb=function(){AAe()},s.Ob=function(){return!!this.a},v(qF,"ElkGraphUtil/AncestorIterator",698);var B8e=Gi(yc,"EList");m(71,56,{20:1,31:1,56:1,18:1,16:1,71:1,61:1}),s._c=function(n,t){RE(this,n,t)},s.Ec=function(n){return Et(this,n)},s.ad=function(n,t){return h1e(this,n,t)},s.Fc=function(n){return nr(this,n)},s.Gi=function(){return new E4(this)},s.Hi=function(){return new ET(this)},s.Ii=function(n){return bO(this,n)},s.Ji=function(){return!0},s.Ki=function(n,t){},s.Li=function(){},s.Mi=function(n,t){gY(this,n,t)},s.Ni=function(n,t,i){},s.Oi=function(n,t){},s.Pi=function(n,t,i){},s.Fb=function(n){return mXe(this,n)},s.Hb=function(){return s1e(this)},s.Qi=function(){return!1},s.Jc=function(){return new st(this)},s.cd=function(){return new j4(this)},s.dd=function(n){var t;if(t=this.gc(),n<0||n>t)throw R(new k2(n,t));return new yV(this,n)},s.Si=function(n,t){this.Ri(n,this.bd(t))},s.Kc=function(n){return fB(this,n)},s.Ui=function(n,t){return t},s.fd=function(n,t){return o3(this,n,t)},s.Ib=function(){return rde(this)},s.Wi=function(){return!0},s.Xi=function(n,t){return r8(this,t)},v(yc,"AbstractEList",71),m(67,71,Th,J6,_w,t1e),s.Ci=function(n,t){return fW(this,n,t)},s.Di=function(n){return oHe(this,n)},s.Ei=function(n,t){MO(this,n,t)},s.Fi=function(n){WT(this,n)},s.Yi=function(n){return phe(this,n)},s.$b=function(){yE(this)},s.Gc=function(n){return y8(this,n)},s.Xb=function(n){return K(this,n)},s.Zi=function(n){var t,i,r;++this.j,i=this.g==null?0:this.g.length,n>i&&(r=this.g,t=i+(i/2|0)+4,t=0?(this.ed(t),!0):!1},s.Vi=function(n,t){return this.Bj(n,this.Xi(n,t))},s.gc=function(){return this.Cj()},s.Nc=function(){return this.Dj()},s.Oc=function(n){return this.Ej(n)},s.Ib=function(){return this.Fj()},v(yc,"DelegatingEList",2055),m(2056,2055,RZe),s.Ci=function(n,t){return tge(this,n,t)},s.Di=function(n){return this.Ci(this.Cj(),n)},s.Ei=function(n,t){iUe(this,n,t)},s.Fi=function(n){Uqe(this,n)},s.Ji=function(){return!this.Kj()},s.$b=function(){dS(this)},s.Gj=function(n,t,i,r,c){return new v_e(this,n,t,i,r,c)},s.Hj=function(n){hi(this.hj(),n)},s.Ij=function(){return null},s.Jj=function(){return-1},s.hj=function(){return null},s.Kj=function(){return!1},s.Lj=function(n,t){return t},s.Mj=function(n,t){return t},s.Nj=function(){return!1},s.Oj=function(){return!this.yj()},s.Ri=function(n,t){var i,r;return this.Nj()?(r=this.Oj(),i=E0e(this,n,t),this.Hj(this.Gj(7,ve(t),i,n,r)),i):E0e(this,n,t)},s.ed=function(n){var t,i,r,c;return this.Nj()?(i=null,r=this.Oj(),t=this.Gj(4,c=cR(this,n),null,n,r),this.Kj()&&c?(i=this.Mj(c,i),i?(i.lj(t),i.mj()):this.Hj(t)):i?(i.lj(t),i.mj()):this.Hj(t),c):(c=cR(this,n),this.Kj()&&c&&(i=this.Mj(c,null),i&&i.mj()),c)},s.Vi=function(n,t){return bKe(this,n,t)},v(ky,"DelegatingNotifyingListImpl",2056),m(151,1,zN),s.lj=function(n){return s0e(this,n)},s.mj=function(){EY(this)},s.ej=function(){return this.d},s.Ij=function(){return null},s.Pj=function(){return null},s.fj=function(n){return-1},s.gj=function(){return ZUe(this)},s.hj=function(){return null},s.ij=function(){return Nbe(this)},s.jj=function(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o},s.Qj=function(){return!1},s.kj=function(n){var t,i,r,c,o,l,f,h,b,p,y;switch(this.d){case 1:case 2:switch(c=n.ej(),c){case 1:case 2:if(o=n.hj(),ue(o)===ue(this.hj())&&this.fj(null)==n.fj(null))return this.g=n.gj(),n.ej()==1&&(this.d=1),!0}case 4:{switch(c=n.ej(),c){case 4:{if(o=n.hj(),ue(o)===ue(this.hj())&&this.fj(null)==n.fj(null))return b=yge(this),h=this.o<0?this.o<-2?-2-this.o-1:-1:this.o,l=n.jj(),this.d=6,y=new _w(2),h<=l?(Et(y,this.n),Et(y,n.ij()),this.g=F(z($t,1),ni,30,15,[this.o=h,l+1])):(Et(y,n.ij()),Et(y,this.n),this.g=F(z($t,1),ni,30,15,[this.o=l,h])),this.n=y,b||(this.o=-2-this.o-1),!0;break}}break}case 6:{switch(c=n.ej(),c){case 4:{if(o=n.hj(),ue(o)===ue(this.hj())&&this.fj(null)==n.fj(null)){for(b=yge(this),l=n.jj(),p=u(this.g,54),r=le($t,ni,30,p.length+1,15,1),t=0;t>>0,t.toString(16))),r.a+=" (eventType: ",this.d){case 1:{r.a+="SET";break}case 2:{r.a+="UNSET";break}case 3:{r.a+="ADD";break}case 5:{r.a+="ADD_MANY";break}case 4:{r.a+="REMOVE";break}case 6:{r.a+="REMOVE_MANY";break}case 7:{r.a+="MOVE";break}case 8:{r.a+="REMOVING_ADAPTER";break}case 9:{r.a+="RESOLVE";break}default:{_X(r,this.d);break}}if(FXe(this)&&(r.a+=", touch: true"),r.a+=", position: ",_X(r,this.o<0?this.o<-2?-2-this.o-1:-1:this.o),r.a+=", notifier: ",Uj(r,this.hj()),r.a+=", feature: ",Uj(r,this.Ij()),r.a+=", oldValue: ",Uj(r,Nbe(this)),r.a+=", newValue: ",this.d==6&&X(this.g,54)){for(i=u(this.g,54),r.a+="[",n=0;n10?((!this.b||this.c.j!=this.a)&&(this.b=new E2(this),this.a=this.j),rf(this.b,n)):y8(this,n)},s.Wi=function(){return!0},s.a=0,v(yc,"AbstractEList/1",949),m(305,99,cF,k2),v(yc,"AbstractEList/BasicIndexOutOfBoundsException",305),m(42,1,Fr,st),s.Nb=function(n){Zr(this,n)},s.Vj=function(){if(this.i.j!=this.f)throw R(new Nl)},s.Wj=function(){return ft(this)},s.Ob=function(){return this.e!=this.i.gc()},s.Pb=function(){return this.Wj()},s.Qb=function(){VE(this)},s.e=0,s.f=0,s.g=-1,v(yc,"AbstractEList/EIterator",42),m(286,42,Wh,j4,yV),s.Qb=function(){VE(this)},s.Rb=function(n){sJe(this,n)},s.Xj=function(){var n;try{return n=this.d.Xb(--this.e),this.Vj(),this.g=this.e,n}catch(t){throw t=sr(t),X(t,99)?(this.Vj(),R(new hu)):R(t)}},s.Yj=function(n){sHe(this,n)},s.Sb=function(){return this.e!=0},s.Tb=function(){return this.e},s.Ub=function(){return this.Xj()},s.Vb=function(){return this.e-1},s.Wb=function(n){this.Yj(n)},v(yc,"AbstractEList/EListIterator",286),m(355,42,Fr,E4),s.Wj=function(){return PQ(this)},s.Qb=function(){throw R(new _t)},v(yc,"AbstractEList/NonResolvingEIterator",355),m(391,286,Wh,ET,Xle),s.Rb=function(n){throw R(new _t)},s.Wj=function(){var n;try{return n=this.c.Ti(this.e),this.Vj(),this.g=this.e++,n}catch(t){throw t=sr(t),X(t,99)?(this.Vj(),R(new hu)):R(t)}},s.Xj=function(){var n;try{return n=this.c.Ti(--this.e),this.Vj(),this.g=this.e,n}catch(t){throw t=sr(t),X(t,99)?(this.Vj(),R(new hu)):R(t)}},s.Qb=function(){throw R(new _t)},s.Wb=function(n){throw R(new _t)},v(yc,"AbstractEList/NonResolvingEListIterator",391),m(2042,71,BZe),s.Ci=function(n,t){var i,r,c,o,l,f,h,b,p,y,S;if(c=t.gc(),c!=0){for(b=u(Kn(this.a,4),129),p=b==null?0:b.length,S=p+c,r=oQ(this,S),y=p-n,y>0&&Wu(b,n,r,n+c,y),h=t.Jc(),l=0;li)throw R(new k2(n,i));return new _De(this,n)},s.$b=function(){var n,t;++this.j,n=u(Kn(this.a,4),129),t=n==null?0:n.length,p8(this,null),gY(this,t,n)},s.Gc=function(n){var t,i,r,c,o;if(t=u(Kn(this.a,4),129),t!=null){if(n!=null){for(r=t,c=0,o=r.length;c=i)throw R(new k2(n,i));return t[n]},s.bd=function(n){var t,i,r;if(t=u(Kn(this.a,4),129),t!=null){if(n!=null){for(i=0,r=t.length;ii)throw R(new k2(n,i));return new DDe(this,n)},s.Ri=function(n,t){var i,r,c;if(i=pJe(this),c=i==null?0:i.length,n>=c)throw R(new jo(Cne+n+pg+c));if(t>=c)throw R(new jo(Tne+t+pg+c));return r=i[t],n!=t&&(n0&&Wu(n,0,t,0,i),t},s.Oc=function(n){var t,i,r;return t=u(Kn(this.a,4),129),r=t==null?0:t.length,r>0&&(n.lengthr&&ir(n,r,null),n};var Ian;v(yc,"ArrayDelegatingEList",2042),m(1032,42,Fr,FPe),s.Vj=function(){if(this.b.j!=this.f||ue(u(Kn(this.b.a,4),129))!==ue(this.a))throw R(new Nl)},s.Qb=function(){VE(this),this.a=u(Kn(this.b.a,4),129)},v(yc,"ArrayDelegatingEList/EIterator",1032),m(712,286,Wh,eDe,DDe),s.Vj=function(){if(this.b.j!=this.f||ue(u(Kn(this.b.a,4),129))!==ue(this.a))throw R(new Nl)},s.Yj=function(n){sHe(this,n),this.a=u(Kn(this.b.a,4),129)},s.Qb=function(){VE(this),this.a=u(Kn(this.b.a,4),129)},v(yc,"ArrayDelegatingEList/EListIterator",712),m(1033,355,Fr,JPe),s.Vj=function(){if(this.b.j!=this.f||ue(u(Kn(this.b.a,4),129))!==ue(this.a))throw R(new Nl)},v(yc,"ArrayDelegatingEList/NonResolvingEIterator",1033),m(713,391,Wh,nDe,_De),s.Vj=function(){if(this.b.j!=this.f||ue(u(Kn(this.b.a,4),129))!==ue(this.a))throw R(new Nl)},v(yc,"ArrayDelegatingEList/NonResolvingEListIterator",713),m(605,305,cF,EK),v(yc,"BasicEList/BasicIndexOutOfBoundsException",605),m(699,67,Th,Nse),s._c=function(n,t){throw R(new _t)},s.Ec=function(n){throw R(new _t)},s.ad=function(n,t){throw R(new _t)},s.Fc=function(n){throw R(new _t)},s.$b=function(){throw R(new _t)},s.Zi=function(n){throw R(new _t)},s.Jc=function(){return this.Gi()},s.cd=function(){return this.Hi()},s.dd=function(n){return this.Ii(n)},s.Ri=function(n,t){throw R(new _t)},s.Si=function(n,t){throw R(new _t)},s.ed=function(n){throw R(new _t)},s.Kc=function(n){throw R(new _t)},s.fd=function(n,t){throw R(new _t)},v(yc,"BasicEList/UnmodifiableEList",699),m(711,1,{3:1,20:1,18:1,16:1,61:1,586:1}),s._c=function(n,t){$wn(this,n,u(t,45))},s.Ec=function(n){return Npn(this,u(n,45))},s.Ic=function(n){cc(this,n)},s.Xb=function(n){return u(K(this.c,n),136)},s.Ri=function(n,t){return u(this.c.Ri(n,t),45)},s.Si=function(n,t){Rwn(this,n,u(t,45))},s.ed=function(n){return u(this.c.ed(n),45)},s.fd=function(n,t){return U3n(this,n,u(t,45))},s.gd=function(n){Zb(this,n)},s.Lc=function(){return new yn(this,16)},s.Mc=function(){return new mn(null,new yn(this,16))},s.ad=function(n,t){return this.c.ad(n,t)},s.Fc=function(n){return this.c.Fc(n)},s.$b=function(){this.c.$b()},s.Gc=function(n){return this.c.Gc(n)},s.Hc=function(n){return jO(this.c,n)},s.Zj=function(){var n,t,i;if(this.d==null){for(this.d=le(z8e,nme,67,2*this.f+1,0,1),i=this.e,this.f=0,t=this.c.Jc();t.e!=t.i.gc();)n=u(t.Wj(),136),az(this,n);this.e=i}},s.Fb=function(n){return xNe(this,n)},s.Hb=function(){return s1e(this.c)},s.bd=function(n){return this.c.bd(n)},s.$j=function(){this.c=new DSe(this)},s.dc=function(){return this.f==0},s.Jc=function(){return this.c.Jc()},s.cd=function(){return this.c.cd()},s.dd=function(n){return this.c.dd(n)},s._j=function(){return nO(this)},s.ak=function(n,t,i){return new XNe(n,t,i)},s.bk=function(){return new yL},s.Kc=function(n){return pBe(this,n)},s.gc=function(){return this.f},s.hd=function(n,t){return new N0(this.c,n,t)},s.Nc=function(){return this.c.Nc()},s.Oc=function(n){return this.c.Oc(n)},s.Ib=function(){return rde(this.c)},s.e=0,s.f=0,v(yc,"BasicEMap",711),m(1027,67,Th,DSe),s.Ki=function(n,t){vbn(this,u(t,136))},s.Ni=function(n,t,i){var r;++(r=this,u(t,136),r).a.e},s.Oi=function(n,t){ybn(this,u(t,136))},s.Pi=function(n,t,i){ppn(this,u(t,136),u(i,136))},s.Mi=function(n,t){aze(this.a)},v(yc,"BasicEMap/1",1027),m(1028,67,Th,yL),s.$i=function(n){return le(ZBn,zZe,611,n,0,1)},v(yc,"BasicEMap/2",1028),m(1029,Ga,fs,_Se),s.$b=function(){this.a.c.$b()},s.Gc=function(n){return xQ(this.a,n)},s.Jc=function(){return this.a.f==0?(A9(),tD.a):new mAe(this.a)},s.Kc=function(n){var t;return t=this.a.f,nz(this.a,n),this.a.f!=t},s.gc=function(){return this.a.f},v(yc,"BasicEMap/3",1029),m(1030,31,im,LSe),s.$b=function(){this.a.c.$b()},s.Gc=function(n){return vXe(this.a,n)},s.Jc=function(){return this.a.f==0?(A9(),tD.a):new vAe(this.a)},s.gc=function(){return this.a.f},v(yc,"BasicEMap/4",1030),m(1031,Ga,fs,PSe),s.$b=function(){this.a.c.$b()},s.Gc=function(n){var t,i,r,c,o,l,f,h,b;if(this.a.f>0&&X(n,45)&&(this.a.Zj(),h=u(n,45),f=h.jd(),c=f==null?0:Ni(f),o=Nle(this.a,c),t=this.a.d[o],t)){for(i=u(t.g,374),b=t.i,l=0;l"+this.c},s.a=0;var ZBn=v(yc,"BasicEMap/EntryImpl",611);m(534,1,{},G6),v(yc,"BasicEMap/View",534);var tD;m(769,1,{}),s.Fb=function(n){return abe((En(),Sc),n)},s.Hb=function(){return y1e((En(),Sc))},s.Ib=function(){return Ja((En(),Sc))},v(yc,"ECollections/BasicEmptyUnmodifiableEList",769),m(1302,1,Wh,eC),s.Nb=function(n){Zr(this,n)},s.Rb=function(n){throw R(new _t)},s.Ob=function(){return!1},s.Sb=function(){return!1},s.Pb=function(){throw R(new hu)},s.Tb=function(){return 0},s.Ub=function(){throw R(new hu)},s.Vb=function(){return-1},s.Qb=function(){throw R(new _t)},s.Wb=function(n){throw R(new _t)},v(yc,"ECollections/BasicEmptyUnmodifiableEList/1",1302),m(1300,769,{20:1,18:1,16:1,61:1},xxe),s._c=function(n,t){FAe()},s.Ec=function(n){return zAe()},s.ad=function(n,t){return JAe()},s.Fc=function(n){return HAe()},s.$b=function(){GAe()},s.Gc=function(n){return!1},s.Hc=function(n){return!1},s.Ic=function(n){cc(this,n)},s.Xb=function(n){return Pse((En(),n)),null},s.bd=function(n){return-1},s.dc=function(){return!0},s.Jc=function(){return this.a},s.cd=function(){return this.a},s.dd=function(n){return this.a},s.Ri=function(n,t){return qAe()},s.Si=function(n,t){UAe()},s.ed=function(n){return XAe()},s.Kc=function(n){return KAe()},s.fd=function(n,t){return VAe()},s.gc=function(){return 0},s.gd=function(n){Zb(this,n)},s.Lc=function(){return new yn(this,16)},s.Mc=function(){return new mn(null,new yn(this,16))},s.hd=function(n,t){return En(),new N0(Sc,n,t)},s.Nc=function(){return Ofe((En(),Sc))},s.Oc=function(n){return En(),qE(Sc,n)},v(yc,"ECollections/EmptyUnmodifiableEList",1300),m(1301,769,{20:1,18:1,16:1,61:1,586:1},Axe),s._c=function(n,t){FAe()},s.Ec=function(n){return zAe()},s.ad=function(n,t){return JAe()},s.Fc=function(n){return HAe()},s.$b=function(){GAe()},s.Gc=function(n){return!1},s.Hc=function(n){return!1},s.Ic=function(n){cc(this,n)},s.Xb=function(n){return Pse((En(),n)),null},s.bd=function(n){return-1},s.dc=function(){return!0},s.Jc=function(){return this.a},s.cd=function(){return this.a},s.dd=function(n){return this.a},s.Ri=function(n,t){return qAe()},s.Si=function(n,t){UAe()},s.ed=function(n){return XAe()},s.Kc=function(n){return KAe()},s.fd=function(n,t){return VAe()},s.gc=function(){return 0},s.gd=function(n){Zb(this,n)},s.Lc=function(){return new yn(this,16)},s.Mc=function(){return new mn(null,new yn(this,16))},s.hd=function(n,t){return En(),new N0(Sc,n,t)},s.Nc=function(){return Ofe((En(),Sc))},s.Oc=function(n){return En(),qE(Sc,n)},s._j=function(){return En(),En(),r1},v(yc,"ECollections/EmptyUnmodifiableEMap",1301);var J8e=Gi(yc,"Enumerator"),EG;m(290,1,{290:1},DW),s.Fb=function(n){var t;return this===n?!0:X(n,290)?(t=u(n,290),this.f==t.f&&l3n(this.i,t.i)&&uV(this.a,(this.f&256)!=0?(t.f&256)!=0?t.a:null:(t.f&256)!=0?null:t.a)&&uV(this.d,t.d)&&uV(this.g,t.g)&&uV(this.e,t.e)&&hSn(this,t)):!1},s.Hb=function(){return this.f},s.Ib=function(){return ZXe(this)},s.f=0;var Dan=0,_an=0,Lan=0,Pan=0,H8e=0,G8e=0,q8e=0,U8e=0,X8e=0,$an,oA=0,sA=0,Ran=0,Ban=0,SG,K8e;v(yc,"URI",290),m(1090,44,v3,Mxe),s.yc=function(n,t){return u(Kc(this,Pt(n),u(t,290)),290)},v(yc,"URI/URICache",1090),m(492,67,Th,nC,aR),s.Qi=function(){return!0},v(yc,"UniqueEList",492),m(578,63,H1,sB),v(yc,"WrappedException",578);var Zt=Gi(ql,HZe),Gm=Gi(ql,GZe),ns=Gi(ql,qZe),qm=Gi(ql,UZe),Ma=Gi(ql,XZe),vf=Gi(ql,"EClass"),zce=Gi(ql,"EDataType"),zan;m(1198,44,v3,Cxe),s.xc=function(n){return $r(n)?lo(this,n):bu(Xc(this.f,n))},v(ql,"EDataType/Internal/ConversionDelegate/Factory/Registry/Impl",1198);var xG=Gi(ql,"EEnum"),ed=Gi(ql,KZe),Rc=Gi(ql,VZe),yf=Gi(ql,YZe),kf,jp=Gi(ql,QZe),Um=Gi(ql,WZe);m(1023,1,{},tC),s.Ib=function(){return"NIL"},v(ql,"EStructuralFeature/Internal/DynamicValueHolder/1",1023);var Fan;m(1022,44,v3,Txe),s.xc=function(n){return $r(n)?lo(this,n):bu(Xc(this.f,n))},v(ql,"EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl",1022);var Fo=Gi(ql,ZZe),Qy=Gi(ql,"EValidator/PatternMatcher"),V8e,Y8e,Bn,e0,Xm,yb,Jan,Han,Gan,kb,n0,jb,Ep,rh,qan,Uan,jf,t0,Xan,i0,Km,i5,Ac,Kan,Van,Sp,AG=Gi(Ri,"FeatureMap/Entry");m(533,1,{75:1},C$),s.Jk=function(){return this.a},s.kd=function(){return this.b},v(Jn,"BasicEObjectImpl/1",533),m(1021,1,Lne,VCe),s.Dk=function(n){return aY(this.a,this.b,n)},s.Oj=function(){return P_e(this.a,this.b)},s.Wb=function(n){pae(this.a,this.b,n)},s.Ek=function(){h5n(this.a,this.b)},v(Jn,"BasicEObjectImpl/4",1021),m(2043,1,{114:1}),s.Kk=function(n){this.e=n==0?Yan:le(Mr,Nn,1,n,5,1)},s.ii=function(n){return this.e[n]},s.ji=function(n,t){this.e[n]=t},s.ki=function(n){this.e[n]=null},s.Lk=function(){return this.c},s.Mk=function(){throw R(new _t)},s.Nk=function(){throw R(new _t)},s.Ok=function(){return this.d},s.Pk=function(){return this.e!=null},s.Qk=function(n){this.c=n},s.Rk=function(n){throw R(new _t)},s.Sk=function(n){throw R(new _t)},s.Tk=function(n){this.d=n};var Yan;v(Jn,"BasicEObjectImpl/EPropertiesHolderBaseImpl",2043),m(192,2043,{114:1},nl),s.Mk=function(){return this.a},s.Nk=function(){return this.b},s.Rk=function(n){this.a=n},s.Sk=function(n){this.b=n},v(Jn,"BasicEObjectImpl/EPropertiesHolderImpl",192),m(501,100,ZWe,jv),s.rh=function(){return this.f},s.wh=function(){return this.k},s.yh=function(n,t){this.g=n,this.i=t},s.Ah=function(){return(this.j&2)==0?this.fi():this.Xh().Lk()},s.Ch=function(){return this.i},s.th=function(){return(this.j&1)!=0},s.Mh=function(){return this.g},s.Sh=function(){return(this.j&4)!=0},s.Xh=function(){return!this.k&&(this.k=new nl),this.k},s._h=function(n){this.Xh().Qk(n),n?this.j|=2:this.j&=-3},s.bi=function(n){this.Xh().Sk(n),n?this.j|=4:this.j&=-5},s.fi=function(){return(C0(),Bn).S},s.i=0,s.j=1,v(Jn,"EObjectImpl",501),m(785,501,{109:1,94:1,93:1,57:1,114:1,52:1,100:1},bfe),s.ii=function(n){return this.e[n]},s.ji=function(n,t){this.e[n]=t},s.ki=function(n){this.e[n]=null},s.Ah=function(){return this.d},s.Fh=function(n){return Ji(this.d,n)},s.Hh=function(){return this.d},s.Lh=function(){return this.e!=null},s.Xh=function(){return!this.k&&(this.k=new kL),this.k},s._h=function(n){this.d=n},s.ei=function(){var n;return this.e==null&&(n=dt(this.d),this.e=n==0?Qan:le(Mr,Nn,1,n,5,1)),this},s.gi=function(){return 0};var Qan;v(Jn,"DynamicEObjectImpl",785),m(1483,785,{109:1,45:1,94:1,93:1,136:1,57:1,114:1,52:1,100:1},gIe),s.Fb=function(n){return this===n},s.Hb=function(){return jw(this)},s._h=function(n){this.d=n,this.b=ZO(n,"key"),this.c=ZO(n,$S)},s.yi=function(){var n;return this.a==-1&&(n=SY(this,this.b),this.a=n==null?0:Ni(n)),this.a},s.jd=function(){return SY(this,this.b)},s.kd=function(){return SY(this,this.c)},s.zi=function(n){this.a=n},s.Ai=function(n){pae(this,this.b,n)},s.ld=function(n){var t;return t=SY(this,this.c),pae(this,this.c,n),t},s.a=0,v(Jn,"DynamicEObjectImpl/BasicEMapEntry",1483),m(1484,1,{114:1},kL),s.Kk=function(n){throw R(new _t)},s.ii=function(n){throw R(new _t)},s.ji=function(n,t){throw R(new _t)},s.ki=function(n){throw R(new _t)},s.Lk=function(){throw R(new _t)},s.Mk=function(){return this.a},s.Nk=function(){return this.b},s.Ok=function(){return this.c},s.Pk=function(){throw R(new _t)},s.Qk=function(n){throw R(new _t)},s.Rk=function(n){this.a=n},s.Sk=function(n){this.b=n},s.Tk=function(n){this.c=n},v(Jn,"DynamicEObjectImpl/DynamicEPropertiesHolderImpl",1484),m(504,161,{109:1,94:1,93:1,587:1,158:1,57:1,114:1,52:1,100:1,504:1,161:1,117:1,118:1},Nb),s.xh=function(n){return qde(this,n)},s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.d;case 2:return i?(!this.b&&(this.b=new Hs((jn(),Ac),Du,this)),this.b):(!this.b&&(this.b=new Hs((jn(),Ac),Du,this)),nO(this.b));case 3:return H_e(this);case 4:return!this.a&&(this.a=new mr(vb,this,4)),this.a;case 5:return!this.c&&(this.c=new Jv(vb,this,5)),this.c}return Pl(this,n-dt((jn(),e0)),Cn((r=u(Kn(this,16),29),r||e0),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 3:return this.Cb&&(i=(c=this.Db>>16,c>=0?qde(this,i):this.Cb.Qh(this,-1-c,null,i))),Cfe(this,u(n,158),i)}return o=u(Cn((r=u(Kn(this,16),29),r||(jn(),e0)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),e0)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 2:return!this.b&&(this.b=new Hs((jn(),Ac),Du,this)),K$(this.b,n,i);case 3:return Cfe(this,null,i);case 4:return!this.a&&(this.a=new mr(vb,this,4)),vc(this.a,n,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),e0)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),e0)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.d!=null;case 2:return!!this.b&&this.b.f!=0;case 3:return!!H_e(this);case 4:return!!this.a&&this.a.i!=0;case 5:return!!this.c&&this.c.i!=0}return Ll(this,n-dt((jn(),e0)),Cn((t=u(Kn(this,16),29),t||e0),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:Yvn(this,Pt(t));return;case 2:!this.b&&(this.b=new Hs((jn(),Ac),Du,this)),NB(this.b,t);return;case 3:FUe(this,u(t,158));return;case 4:!this.a&&(this.a=new mr(vb,this,4)),kt(this.a),!this.a&&(this.a=new mr(vb,this,4)),nr(this.a,u(t,18));return;case 5:!this.c&&(this.c=new Jv(vb,this,5)),kt(this.c),!this.c&&(this.c=new Jv(vb,this,5)),nr(this.c,u(t,18));return}Jl(this,n-dt((jn(),e0)),Cn((i=u(Kn(this,16),29),i||e0),n),t)},s.fi=function(){return jn(),e0},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:Hhe(this,null);return;case 2:!this.b&&(this.b=new Hs((jn(),Ac),Du,this)),this.b.c.$b();return;case 3:FUe(this,null);return;case 4:!this.a&&(this.a=new mr(vb,this,4)),kt(this.a);return;case 5:!this.c&&(this.c=new Jv(vb,this,5)),kt(this.c);return}Fl(this,n-dt((jn(),e0)),Cn((t=u(Kn(this,16),29),t||e0),n))},s.Ib=function(){return IFe(this)},s.d=null,v(Jn,"EAnnotationImpl",504),m(142,711,tme,os),s.Ei=function(n,t){kwn(this,n,u(t,45))},s.Uk=function(n,t){return k2n(this,u(n,45),t)},s.Yi=function(n){return u(u(this.c,72).Yi(n),136)},s.Gi=function(){return u(this.c,72).Gi()},s.Hi=function(){return u(this.c,72).Hi()},s.Ii=function(n){return u(this.c,72).Ii(n)},s.Vk=function(n,t){return K$(this,n,t)},s.Dk=function(n){return u(this.c,77).Dk(n)},s.$j=function(){},s.Oj=function(){return u(this.c,77).Oj()},s.ak=function(n,t,i){var r;return r=u(ol(this.b).ti().pi(this.b),136),r.zi(n),r.Ai(t),r.ld(i),r},s.bk=function(){return new uoe(this)},s.Wb=function(n){NB(this,n)},s.Ek=function(){u(this.c,77).Ek()},v(Ri,"EcoreEMap",142),m(169,142,tme,Hs),s.Zj=function(){var n,t,i,r,c,o;if(this.d==null){for(o=le(z8e,nme,67,2*this.f+1,0,1),i=this.c.Jc();i.e!=i.i.gc();)t=u(i.Wj(),136),r=t.yi(),c=(r&oi)%o.length,n=o[c],!n&&(n=o[c]=new uoe(this)),n.Ec(t);this.d=o}},v(Jn,"EAnnotationImpl/1",169),m(293,439,{109:1,94:1,93:1,158:1,197:1,57:1,114:1,470:1,52:1,100:1,161:1,293:1,117:1,118:1}),s.Ih=function(n,t,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $n(),(this.Bb&256)!=0;case 3:return $n(),(this.Bb&512)!=0;case 4:return ve(this.s);case 5:return ve(this.t);case 6:return $n(),!!this.Hk();case 7:return $n(),c=this.s,c>=1;case 8:return t?ff(this):this.r;case 9:return this.q}return Pl(this,n-dt(this.fi()),Cn((r=u(Kn(this,16),29),r||this.fi()),n),t,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 9:return SV(this,i)}return c=u(Cn((r=u(Kn(this,16),29),r||this.fi()),t),69),c.uk().yk(this,Lo(this),t-dt(this.fi()),n,i)},s.Th=function(n){var t,i;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.Hk();case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&Mw(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&Mw(this.q).i==0)}return Ll(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.$h=function(n,t){var i,r;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:this.ri(Pt(t));return;case 2:Ld(this,Fe(ze(t)));return;case 3:Pd(this,Fe(ze(t)));return;case 4:Nd(this,u(t,15).a);return;case 5:this.Xk(u(t,15).a);return;case 8:cg(this,u(t,143));return;case 9:r=Fa(this,u(t,87),null),r&&r.mj();return}Jl(this,n-dt(this.fi()),Cn((i=u(Kn(this,16),29),i||this.fi()),n),t)},s.fi=function(){return jn(),Van},s.hi=function(n){var t,i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:this.ri(null);return;case 2:Ld(this,!0);return;case 3:Pd(this,!0);return;case 4:Nd(this,0);return;case 5:this.Xk(1);return;case 8:cg(this,null);return;case 9:i=Fa(this,null,null),i&&i.mj();return}Fl(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.mi=function(){ff(this),this.Bb|=1},s.Fk=function(){return ff(this)},s.Gk=function(){return this.t},s.Hk=function(){var n;return n=this.t,n>1||n==-1},s.Qi=function(){return(this.Bb&512)!=0},s.Wk=function(n,t){return z1e(this,n,t)},s.Xk=function(n){$2(this,n)},s.Ib=function(){return tbe(this)},s.s=0,s.t=1,v(Jn,"ETypedElementImpl",293),m(451,293,{109:1,94:1,93:1,158:1,197:1,57:1,179:1,69:1,114:1,470:1,52:1,100:1,161:1,451:1,293:1,117:1,118:1,682:1}),s.xh=function(n){return EHe(this,n)},s.Ih=function(n,t,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $n(),(this.Bb&256)!=0;case 3:return $n(),(this.Bb&512)!=0;case 4:return ve(this.s);case 5:return ve(this.t);case 6:return $n(),!!this.Hk();case 7:return $n(),c=this.s,c>=1;case 8:return t?ff(this):this.r;case 9:return this.q;case 10:return $n(),(this.Bb&Gf)!=0;case 11:return $n(),(this.Bb&V0)!=0;case 12:return $n(),(this.Bb&cm)!=0;case 13:return this.j;case 14:return A8(this);case 15:return $n(),(this.Bb&as)!=0;case 16:return $n(),(this.Bb&jh)!=0;case 17:return O2(this)}return Pl(this,n-dt(this.fi()),Cn((r=u(Kn(this,16),29),r||this.fi()),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 17:return this.Cb&&(i=(c=this.Db>>16,c>=0?EHe(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,17,i)}return o=u(Cn((r=u(Kn(this,16),29),r||this.fi()),t),69),o.uk().xk(this,Lo(this),t-dt(this.fi()),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 9:return SV(this,i);case 17:return hl(this,null,17,i)}return c=u(Cn((r=u(Kn(this,16),29),r||this.fi()),t),69),c.uk().yk(this,Lo(this),t-dt(this.fi()),n,i)},s.Th=function(n){var t,i;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.Hk();case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&Mw(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&Mw(this.q).i==0);case 10:return(this.Bb&Gf)==0;case 11:return(this.Bb&V0)!=0;case 12:return(this.Bb&cm)!=0;case 13:return this.j!=null;case 14:return A8(this)!=null;case 15:return(this.Bb&as)!=0;case 16:return(this.Bb&jh)!=0;case 17:return!!O2(this)}return Ll(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.$h=function(n,t){var i,r;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:XV(this,Pt(t));return;case 2:Ld(this,Fe(ze(t)));return;case 3:Pd(this,Fe(ze(t)));return;case 4:Nd(this,u(t,15).a);return;case 5:this.Xk(u(t,15).a);return;case 8:cg(this,u(t,143));return;case 9:r=Fa(this,u(t,87),null),r&&r.mj();return;case 10:l8(this,Fe(ze(t)));return;case 11:h8(this,Fe(ze(t)));return;case 12:a8(this,Fe(ze(t)));return;case 13:Dse(this,Pt(t));return;case 15:f8(this,Fe(ze(t)));return;case 16:d8(this,Fe(ze(t)));return}Jl(this,n-dt(this.fi()),Cn((i=u(Kn(this,16),29),i||this.fi()),n),t)},s.fi=function(){return jn(),Kan},s.hi=function(n){var t,i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:X(this.Cb,88)&&Y2(Ms(u(this.Cb,88)),4),Mo(this,null);return;case 2:Ld(this,!0);return;case 3:Pd(this,!0);return;case 4:Nd(this,0);return;case 5:this.Xk(1);return;case 8:cg(this,null);return;case 9:i=Fa(this,null,null),i&&i.mj();return;case 10:l8(this,!0);return;case 11:h8(this,!1);return;case 12:a8(this,!1);return;case 13:this.i=null,xB(this,null);return;case 15:f8(this,!1);return;case 16:d8(this,!1);return}Fl(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.mi=function(){$9(Vc((ls(),nc),this)),ff(this),this.Bb|=1},s.nk=function(){return this.f},s.gk=function(){return A8(this)},s.ok=function(){return O2(this)},s.sk=function(){return null},s.Yk=function(){return this.k},s.Jj=function(){return this.n},s.tk=function(){return mz(this)},s.uk=function(){var n,t,i,r,c,o,l,f,h;return this.p||(i=O2(this),(i.i==null&&kh(i),i.i).length,r=this.sk(),r&&dt(O2(r)),c=ff(this),l=c.ik(),n=l?(l.i&1)!=0?l==ts?Qi:l==$t?jr:l==Ym?b7:l==Jr?gr:l==Ap?sp:l==o5?lp:l==ds?jy:KS:l:null,t=A8(this),f=c.gk(),Ljn(this),(this.Bb&jh)!=0&&((o=Wde((ls(),nc),i))&&o!=this||(o=$4(Vc(nc,this))))?this.p=new QCe(this,o):this.Hk()?this.$k()?r?(this.Bb&as)!=0?n?this._k()?this.p=new Ub(47,n,this,r):this.p=new Ub(5,n,this,r):this._k()?this.p=new Wb(46,this,r):this.p=new Wb(4,this,r):n?this._k()?this.p=new Ub(49,n,this,r):this.p=new Ub(7,n,this,r):this._k()?this.p=new Wb(48,this,r):this.p=new Wb(6,this,r):(this.Bb&as)!=0?n?n==yg?this.p=new xd(50,Oan,this):this._k()?this.p=new xd(43,n,this):this.p=new xd(1,n,this):this._k()?this.p=new Md(42,this):this.p=new Md(0,this):n?n==yg?this.p=new xd(41,Oan,this):this._k()?this.p=new xd(45,n,this):this.p=new xd(3,n,this):this._k()?this.p=new Md(44,this):this.p=new Md(2,this):X(c,159)?n==AG?this.p=new Md(40,this):(this.Bb&512)!=0?(this.Bb&as)!=0?n?this.p=new xd(9,n,this):this.p=new Md(8,this):n?this.p=new xd(11,n,this):this.p=new Md(10,this):(this.Bb&as)!=0?n?this.p=new xd(13,n,this):this.p=new Md(12,this):n?this.p=new xd(15,n,this):this.p=new Md(14,this):r?(h=r.t,h>1||h==-1?this._k()?(this.Bb&as)!=0?n?this.p=new Ub(25,n,this,r):this.p=new Wb(24,this,r):n?this.p=new Ub(27,n,this,r):this.p=new Wb(26,this,r):(this.Bb&as)!=0?n?this.p=new Ub(29,n,this,r):this.p=new Wb(28,this,r):n?this.p=new Ub(31,n,this,r):this.p=new Wb(30,this,r):this._k()?(this.Bb&as)!=0?n?this.p=new Ub(33,n,this,r):this.p=new Wb(32,this,r):n?this.p=new Ub(35,n,this,r):this.p=new Wb(34,this,r):(this.Bb&as)!=0?n?this.p=new Ub(37,n,this,r):this.p=new Wb(36,this,r):n?this.p=new Ub(39,n,this,r):this.p=new Wb(38,this,r)):this._k()?(this.Bb&as)!=0?n?this.p=new xd(17,n,this):this.p=new Md(16,this):n?this.p=new xd(19,n,this):this.p=new Md(18,this):(this.Bb&as)!=0?n?this.p=new xd(21,n,this):this.p=new Md(20,this):n?this.p=new xd(23,n,this):this.p=new Md(22,this):this.Zk()?this._k()?this.p=new zNe(u(c,29),this,r):this.p=new bae(u(c,29),this,r):X(c,159)?n==AG?this.p=new Md(40,this):(this.Bb&as)!=0?n?this.p=new $Ie(t,f,this,(MQ(),l==$t?i7e:l==ts?W8e:l==Ap?r7e:l==Ym?t7e:l==Jr?n7e:l==o5?c7e:l==ds?Z8e:l==Wl?e7e:Hce)):this.p=new ZDe(u(c,159),t,f,this):n?this.p=new PIe(t,f,this,(MQ(),l==$t?i7e:l==ts?W8e:l==Ap?r7e:l==Ym?t7e:l==Jr?n7e:l==o5?c7e:l==ds?Z8e:l==Wl?e7e:Hce)):this.p=new WDe(u(c,159),t,f,this):this.$k()?r?(this.Bb&as)!=0?this._k()?this.p=new JNe(u(c,29),this,r):this.p=new Zle(u(c,29),this,r):this._k()?this.p=new FNe(u(c,29),this,r):this.p=new ZK(u(c,29),this,r):(this.Bb&as)!=0?this._k()?this.p=new ROe(u(c,29),this):this.p=new mle(u(c,29),this):this._k()?this.p=new $Oe(u(c,29),this):this.p=new BK(u(c,29),this):this._k()?r?(this.Bb&as)!=0?this.p=new HNe(u(c,29),this,r):this.p=new efe(u(c,29),this,r):(this.Bb&as)!=0?this.p=new BOe(u(c,29),this):this.p=new vle(u(c,29),this):r?(this.Bb&as)!=0?this.p=new GNe(u(c,29),this,r):this.p=new nfe(u(c,29),this,r):(this.Bb&as)!=0?this.p=new zOe(u(c,29),this):this.p=new fR(u(c,29),this)),this.p},s.pk=function(){return(this.Bb&Gf)!=0},s.Zk=function(){return!1},s.$k=function(){return!1},s.qk=function(){return(this.Bb&jh)!=0},s.vk=function(){return AY(this)},s._k=function(){return!1},s.rk=function(){return(this.Bb&as)!=0},s.al=function(n){this.k=n},s.ri=function(n){XV(this,n)},s.Ib=function(){return Jz(this)},s.e=!1,s.n=0,v(Jn,"EStructuralFeatureImpl",451),m(335,451,{109:1,94:1,93:1,38:1,158:1,197:1,57:1,179:1,69:1,114:1,470:1,52:1,100:1,335:1,161:1,451:1,293:1,117:1,118:1,682:1},vX),s.Ih=function(n,t,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $n(),(this.Bb&256)!=0;case 3:return $n(),(this.Bb&512)!=0;case 4:return ve(this.s);case 5:return ve(this.t);case 6:return $n(),!!Y0e(this);case 7:return $n(),c=this.s,c>=1;case 8:return t?ff(this):this.r;case 9:return this.q;case 10:return $n(),(this.Bb&Gf)!=0;case 11:return $n(),(this.Bb&V0)!=0;case 12:return $n(),(this.Bb&cm)!=0;case 13:return this.j;case 14:return A8(this);case 15:return $n(),(this.Bb&as)!=0;case 16:return $n(),(this.Bb&jh)!=0;case 17:return O2(this);case 18:return $n(),(this.Bb&Ru)!=0;case 19:return t?XY(this):n$e(this)}return Pl(this,n-dt((jn(),Xm)),Cn((r=u(Kn(this,16),29),r||Xm),n),t,i)},s.Th=function(n){var t,i;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return Y0e(this);case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&Mw(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&Mw(this.q).i==0);case 10:return(this.Bb&Gf)==0;case 11:return(this.Bb&V0)!=0;case 12:return(this.Bb&cm)!=0;case 13:return this.j!=null;case 14:return A8(this)!=null;case 15:return(this.Bb&as)!=0;case 16:return(this.Bb&jh)!=0;case 17:return!!O2(this);case 18:return(this.Bb&Ru)!=0;case 19:return!!n$e(this)}return Ll(this,n-dt((jn(),Xm)),Cn((t=u(Kn(this,16),29),t||Xm),n))},s.$h=function(n,t){var i,r;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:XV(this,Pt(t));return;case 2:Ld(this,Fe(ze(t)));return;case 3:Pd(this,Fe(ze(t)));return;case 4:Nd(this,u(t,15).a);return;case 5:xAe(this,u(t,15).a);return;case 8:cg(this,u(t,143));return;case 9:r=Fa(this,u(t,87),null),r&&r.mj();return;case 10:l8(this,Fe(ze(t)));return;case 11:h8(this,Fe(ze(t)));return;case 12:a8(this,Fe(ze(t)));return;case 13:Dse(this,Pt(t));return;case 15:f8(this,Fe(ze(t)));return;case 16:d8(this,Fe(ze(t)));return;case 18:mQ(this,Fe(ze(t)));return}Jl(this,n-dt((jn(),Xm)),Cn((i=u(Kn(this,16),29),i||Xm),n),t)},s.fi=function(){return jn(),Xm},s.hi=function(n){var t,i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:X(this.Cb,88)&&Y2(Ms(u(this.Cb,88)),4),Mo(this,null);return;case 2:Ld(this,!0);return;case 3:Pd(this,!0);return;case 4:Nd(this,0);return;case 5:this.b=0,$2(this,1);return;case 8:cg(this,null);return;case 9:i=Fa(this,null,null),i&&i.mj();return;case 10:l8(this,!0);return;case 11:h8(this,!1);return;case 12:a8(this,!1);return;case 13:this.i=null,xB(this,null);return;case 15:f8(this,!1);return;case 16:d8(this,!1);return;case 18:mQ(this,!1);return}Fl(this,n-dt((jn(),Xm)),Cn((t=u(Kn(this,16),29),t||Xm),n))},s.mi=function(){XY(this),$9(Vc((ls(),nc),this)),ff(this),this.Bb|=1},s.Hk=function(){return Y0e(this)},s.Wk=function(n,t){return this.b=0,this.a=null,z1e(this,n,t)},s.Xk=function(n){xAe(this,n)},s.Ib=function(){var n;return(this.Db&64)!=0?Jz(this):(n=new cf(Jz(this)),n.a+=" (iD: ",yd(n,(this.Bb&Ru)!=0),n.a+=")",n.a)},s.b=0,v(Jn,"EAttributeImpl",335),m(360,439,{109:1,94:1,93:1,143:1,158:1,197:1,57:1,114:1,52:1,100:1,360:1,161:1,117:1,118:1,681:1}),s.bl=function(n){return n.Ah()==this},s.xh=function(n){return WQ(this,n)},s.yh=function(n,t){this.w=null,this.Db=t<<16|this.Db&255,this.Cb=n},s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return Gw(this);case 4:return this.gk();case 5:return this.F;case 6:return t?ol(this):z9(this);case 7:return!this.A&&(this.A=new rs(Fo,this,7)),this.A}return Pl(this,n-dt(this.fi()),Cn((r=u(Kn(this,16),29),r||this.fi()),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?WQ(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,6,i)}return o=u(Cn((r=u(Kn(this,16),29),r||this.fi()),t),69),o.uk().xk(this,Lo(this),t-dt(this.fi()),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 6:return hl(this,null,6,i);case 7:return!this.A&&(this.A=new rs(Fo,this,7)),vc(this.A,n,i)}return c=u(Cn((r=u(Kn(this,16),29),r||this.fi()),t),69),c.uk().yk(this,Lo(this),t-dt(this.fi()),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Gw(this);case 4:return this.gk()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!z9(this);case 7:return!!this.A&&this.A.i!=0}return Ll(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:zR(this,Pt(t));return;case 2:AK(this,Pt(t));return;case 5:D8(this,Pt(t));return;case 7:!this.A&&(this.A=new rs(Fo,this,7)),kt(this.A),!this.A&&(this.A=new rs(Fo,this,7)),nr(this.A,u(t,18));return}Jl(this,n-dt(this.fi()),Cn((i=u(Kn(this,16),29),i||this.fi()),n),t)},s.fi=function(){return jn(),Jan},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:X(this.Cb,184)&&(u(this.Cb,184).tb=null),Mo(this,null);return;case 2:c8(this,null),K9(this,this.D);return;case 5:D8(this,null);return;case 7:!this.A&&(this.A=new rs(Fo,this,7)),kt(this.A);return}Fl(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.fk=function(){var n;return this.G==-1&&(this.G=(n=ol(this),n?$d(n.si(),this):-1)),this.G},s.gk=function(){return null},s.hk=function(){return ol(this)},s.cl=function(){return this.v},s.ik=function(){return Gw(this)},s.jk=function(){return this.D!=null?this.D:this.B},s.kk=function(){return this.F},s.dk=function(n){return JW(this,n)},s.dl=function(n){this.v=n},s.el=function(n){GBe(this,n)},s.fl=function(n){this.C=n},s.ri=function(n){zR(this,n)},s.Ib=function(){return QB(this)},s.C=null,s.D=null,s.G=-1,v(Jn,"EClassifierImpl",360),m(88,360,{109:1,94:1,93:1,29:1,143:1,158:1,197:1,57:1,114:1,52:1,100:1,88:1,360:1,161:1,471:1,117:1,118:1,681:1},rj),s.bl=function(n){return o2n(this,n.Ah())},s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return Gw(this);case 4:return null;case 5:return this.F;case 6:return t?ol(this):z9(this);case 7:return!this.A&&(this.A=new rs(Fo,this,7)),this.A;case 8:return $n(),(this.Bb&256)!=0;case 9:return $n(),(this.Bb&512)!=0;case 10:return tu(this);case 11:return!this.q&&(this.q=new we(yf,this,11,10)),this.q;case 12:return g3(this);case 13:return fS(this);case 14:return fS(this),this.r;case 15:return g3(this),this.k;case 16:return B0e(this);case 17:return UW(this);case 18:return kh(this);case 19:return Dz(this);case 20:return g3(this),this.o;case 21:return!this.s&&(this.s=new we(ns,this,21,17)),this.s;case 22:return Vu(this);case 23:return IW(this)}return Pl(this,n-dt((jn(),yb)),Cn((r=u(Kn(this,16),29),r||yb),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?WQ(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,6,i);case 11:return!this.q&&(this.q=new we(yf,this,11,10)),Co(this.q,n,i);case 21:return!this.s&&(this.s=new we(ns,this,21,17)),Co(this.s,n,i)}return o=u(Cn((r=u(Kn(this,16),29),r||(jn(),yb)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),yb)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 6:return hl(this,null,6,i);case 7:return!this.A&&(this.A=new rs(Fo,this,7)),vc(this.A,n,i);case 11:return!this.q&&(this.q=new we(yf,this,11,10)),vc(this.q,n,i);case 21:return!this.s&&(this.s=new we(ns,this,21,17)),vc(this.s,n,i);case 22:return vc(Vu(this),n,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),yb)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),yb)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Gw(this);case 4:return!1;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!z9(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)!=0;case 9:return(this.Bb&512)!=0;case 10:return!!this.u&&Vu(this.u.a).i!=0&&!(this.n&&FQ(this.n));case 11:return!!this.q&&this.q.i!=0;case 12:return g3(this).i!=0;case 13:return fS(this).i!=0;case 14:return fS(this),this.r.i!=0;case 15:return g3(this),this.k.i!=0;case 16:return B0e(this).i!=0;case 17:return UW(this).i!=0;case 18:return kh(this).i!=0;case 19:return Dz(this).i!=0;case 20:return g3(this),!!this.o;case 21:return!!this.s&&this.s.i!=0;case 22:return!!this.n&&FQ(this.n);case 23:return IW(this).i!=0}return Ll(this,n-dt((jn(),yb)),Cn((t=u(Kn(this,16),29),t||yb),n))},s.Wh=function(n){var t;return t=this.i==null||this.q&&this.q.i!=0?null:ZO(this,n),t||Cge(this,n)},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:zR(this,Pt(t));return;case 2:AK(this,Pt(t));return;case 5:D8(this,Pt(t));return;case 7:!this.A&&(this.A=new rs(Fo,this,7)),kt(this.A),!this.A&&(this.A=new rs(Fo,this,7)),nr(this.A,u(t,18));return;case 8:H1e(this,Fe(ze(t)));return;case 9:G1e(this,Fe(ze(t)));return;case 10:dS(tu(this)),nr(tu(this),u(t,18));return;case 11:!this.q&&(this.q=new we(yf,this,11,10)),kt(this.q),!this.q&&(this.q=new we(yf,this,11,10)),nr(this.q,u(t,18));return;case 21:!this.s&&(this.s=new we(ns,this,21,17)),kt(this.s),!this.s&&(this.s=new we(ns,this,21,17)),nr(this.s,u(t,18));return;case 22:kt(Vu(this)),nr(Vu(this),u(t,18));return}Jl(this,n-dt((jn(),yb)),Cn((i=u(Kn(this,16),29),i||yb),n),t)},s.fi=function(){return jn(),yb},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:X(this.Cb,184)&&(u(this.Cb,184).tb=null),Mo(this,null);return;case 2:c8(this,null),K9(this,this.D);return;case 5:D8(this,null);return;case 7:!this.A&&(this.A=new rs(Fo,this,7)),kt(this.A);return;case 8:H1e(this,!1);return;case 9:G1e(this,!1);return;case 10:this.u&&dS(this.u);return;case 11:!this.q&&(this.q=new we(yf,this,11,10)),kt(this.q);return;case 21:!this.s&&(this.s=new we(ns,this,21,17)),kt(this.s);return;case 22:this.n&&kt(this.n);return}Fl(this,n-dt((jn(),yb)),Cn((t=u(Kn(this,16),29),t||yb),n))},s.mi=function(){var n,t;if(g3(this),fS(this),B0e(this),UW(this),kh(this),Dz(this),IW(this),yE(Tvn(Ms(this))),this.s)for(n=0,t=this.s.i;n=0;--t)K(this,t);return hde(this,n)},s.Ek=function(){kt(this)},s.Xi=function(n,t){return wBe(this,n,t)},v(Ri,"EcoreEList",623),m(491,623,au,PT),s.Ji=function(){return!1},s.Jj=function(){return this.c},s.Kj=function(){return!1},s.ml=function(){return!0},s.Qi=function(){return!0},s.Ui=function(n,t){return t},s.Wi=function(){return!1},s.c=0,v(Ri,"EObjectEList",491),m(81,491,au,mr),s.Kj=function(){return!0},s.kl=function(){return!1},s.$k=function(){return!0},v(Ri,"EObjectContainmentEList",81),m(543,81,au,B$),s.Li=function(){this.b=!0},s.Oj=function(){return this.b},s.Ek=function(){var n;kt(this),Fs(this.e)?(n=this.b,this.b=!1,hi(this.e,new Lf(this.e,2,this.c,n,!1))):this.b=!1},s.b=!1,v(Ri,"EObjectContainmentEList/Unsettable",543),m(1130,543,au,RIe),s.Ri=function(n,t){var i,r;return i=u(BE(this,n,t),87),Fs(this.e)&&f9(this,new rO(this.a,7,(jn(),Han),ve(t),(r=i.c,X(r,88)?u(r,29):jf),n)),i},s.Sj=function(n,t){return dEn(this,u(n,87),t)},s.Tj=function(n,t){return bEn(this,u(n,87),t)},s.Uj=function(n,t,i){return gAn(this,u(n,87),u(t,87),i)},s.Gj=function(n,t,i,r,c){switch(n){case 3:return bE(this,n,t,i,r,this.i>1);case 5:return bE(this,n,t,i,r,this.i-u(i,16).gc()>0);default:return new L1(this.e,n,this.c,t,i,r,!0)}},s.Rj=function(){return!0},s.Oj=function(){return FQ(this)},s.Ek=function(){kt(this)},v(Jn,"EClassImpl/1",1130),m(1144,1143,eme),s.bj=function(n){var t,i,r,c,o,l,f;if(i=n.ej(),i!=8){if(r=QEn(n),r==0)switch(i){case 1:case 9:{f=n.ij(),f!=null&&(t=Ms(u(f,471)),!t.c&&(t.c=new Ol),fB(t.c,n.hj())),l=n.gj(),l!=null&&(c=u(l,471),(c.Bb&1)==0&&(t=Ms(c),!t.c&&(t.c=new Ol),Et(t.c,u(n.hj(),29))));break}case 3:{l=n.gj(),l!=null&&(c=u(l,471),(c.Bb&1)==0&&(t=Ms(c),!t.c&&(t.c=new Ol),Et(t.c,u(n.hj(),29))));break}case 5:{if(l=n.gj(),l!=null)for(o=u(l,18).Jc();o.Ob();)c=u(o.Pb(),471),(c.Bb&1)==0&&(t=Ms(c),!t.c&&(t.c=new Ol),Et(t.c,u(n.hj(),29)));break}case 4:{f=n.ij(),f!=null&&(c=u(f,471),(c.Bb&1)==0&&(t=Ms(c),!t.c&&(t.c=new Ol),fB(t.c,n.hj())));break}case 6:{if(f=n.ij(),f!=null)for(o=u(f,18).Jc();o.Ob();)c=u(o.Pb(),471),(c.Bb&1)==0&&(t=Ms(c),!t.c&&(t.c=new Ol),fB(t.c,n.hj()));break}}this.ol(r)}},s.ol=function(n){MXe(this,n)},s.b=63,v(Jn,"ESuperAdapter",1144),m(1145,1144,eme,RSe),s.ol=function(n){Y2(this,n)},v(Jn,"EClassImpl/10",1145),m(1134,699,au),s.Ci=function(n,t){return fW(this,n,t)},s.Di=function(n){return oHe(this,n)},s.Ei=function(n,t){MO(this,n,t)},s.Fi=function(n){WT(this,n)},s.Yi=function(n){return phe(this,n)},s.Vi=function(n,t){return xY(this,n,t)},s.Uk=function(n,t){throw R(new _t)},s.Gi=function(){return new E4(this)},s.Hi=function(){return new ET(this)},s.Ii=function(n){return bO(this,n)},s.Vk=function(n,t){throw R(new _t)},s.Dk=function(n){return this},s.Oj=function(){return this.i!=0},s.Wb=function(n){throw R(new _t)},s.Ek=function(){throw R(new _t)},v(Ri,"EcoreEList/UnmodifiableEList",1134),m(333,1134,au,Pv),s.Wi=function(){return!1},v(Ri,"EcoreEList/UnmodifiableEList/FastCompare",333),m(1137,333,au,Pze),s.bd=function(n){var t,i,r;if(X(n,179)&&(t=u(n,179),i=t.Jj(),i!=-1)){for(r=this.i;i4)if(this.dk(n)){if(this.$k()){if(r=u(n,52),i=r.Bh(),f=i==this.b&&(this.kl()?r.vh(r.Ch(),u(Cn(Go(this.b),this.Jj()).Fk(),29).ik())==Oc(u(Cn(Go(this.b),this.Jj()),19)).n:-1-r.Ch()==this.Jj()),this.ll()&&!f&&!i&&r.Gh()){for(c=0;c1||r==-1)):!1},s.kl=function(){var n,t,i;return t=Cn(Go(this.b),this.Jj()),X(t,103)?(n=u(t,19),i=Oc(n),!!i):!1},s.ll=function(){var n,t;return t=Cn(Go(this.b),this.Jj()),X(t,103)?(n=u(t,19),(n.Bb&Ec)!=0):!1},s.bd=function(n){var t,i,r,c;if(r=this.xj(n),r>=0)return r;if(this.ml()){for(i=0,c=this.Cj();i=0;--n)oN(this,n,this.vj(n));return this.Dj()},s.Oc=function(n){var t;if(this.ll())for(t=this.Cj()-1;t>=0;--t)oN(this,t,this.vj(t));return this.Ej(n)},s.Ek=function(){dS(this)},s.Xi=function(n,t){return z$e(this,n,t)},v(Ri,"DelegatingEcoreEList",744),m(1140,744,rme,YOe),s.oj=function(n,t){Ppn(this,n,u(t,29))},s.pj=function(n){Ewn(this,u(n,29))},s.vj=function(n){var t,i;return t=u(K(Vu(this.a),n),87),i=t.c,X(i,88)?u(i,29):(jn(),jf)},s.Aj=function(n){var t,i;return t=u(Z2(Vu(this.a),n),87),i=t.c,X(i,88)?u(i,29):(jn(),jf)},s.Bj=function(n,t){return HSn(this,n,u(t,29))},s.Ji=function(){return!1},s.Gj=function(n,t,i,r,c){return null},s.qj=function(){return new FSe(this)},s.rj=function(){kt(Vu(this.a))},s.sj=function(n){return DFe(this,n)},s.tj=function(n){var t,i;for(i=n.Jc();i.Ob();)if(t=i.Pb(),!DFe(this,t))return!1;return!0},s.uj=function(n){var t,i,r;if(X(n,16)&&(r=u(n,16),r.gc()==Vu(this.a).i)){for(t=r.Jc(),i=new st(this);t.Ob();)if(ue(t.Pb())!==ue(ft(i)))return!1;return!0}return!1},s.wj=function(){var n,t,i,r,c;for(i=1,t=new st(Vu(this.a));t.e!=t.i.gc();)n=u(ft(t),87),r=(c=n.c,X(c,88)?u(c,29):(jn(),jf)),i=31*i+(r?jw(r):0);return i},s.xj=function(n){var t,i,r,c;for(r=0,i=new st(Vu(this.a));i.e!=i.i.gc();){if(t=u(ft(i),87),ue(n)===ue((c=t.c,X(c,88)?u(c,29):(jn(),jf))))return r;++r}return-1},s.yj=function(){return Vu(this.a).i==0},s.zj=function(){return null},s.Cj=function(){return Vu(this.a).i},s.Dj=function(){var n,t,i,r,c,o;for(o=Vu(this.a).i,c=le(Mr,Nn,1,o,5,1),i=0,t=new st(Vu(this.a));t.e!=t.i.gc();)n=u(ft(t),87),c[i++]=(r=n.c,X(r,88)?u(r,29):(jn(),jf));return c},s.Ej=function(n){var t,i,r,c,o,l,f;for(f=Vu(this.a).i,n.lengthf&&ir(n,f,null),r=0,i=new st(Vu(this.a));i.e!=i.i.gc();)t=u(ft(i),87),o=(l=t.c,X(l,88)?u(l,29):(jn(),jf)),ir(n,r++,o);return n},s.Fj=function(){var n,t,i,r,c;for(c=new vd,c.a+="[",n=Vu(this.a),t=0,r=Vu(this.a).i;t>16,c>=0?WQ(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,6,i);case 9:return!this.a&&(this.a=new we(ed,this,9,5)),Co(this.a,n,i)}return o=u(Cn((r=u(Kn(this,16),29),r||(jn(),kb)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),kb)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 6:return hl(this,null,6,i);case 7:return!this.A&&(this.A=new rs(Fo,this,7)),vc(this.A,n,i);case 9:return!this.a&&(this.a=new we(ed,this,9,5)),vc(this.a,n,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),kb)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),kb)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Gw(this);case 4:return!!O1e(this);case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!z9(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)==0;case 9:return!!this.a&&this.a.i!=0}return Ll(this,n-dt((jn(),kb)),Cn((t=u(Kn(this,16),29),t||kb),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:zR(this,Pt(t));return;case 2:AK(this,Pt(t));return;case 5:D8(this,Pt(t));return;case 7:!this.A&&(this.A=new rs(Fo,this,7)),kt(this.A),!this.A&&(this.A=new rs(Fo,this,7)),nr(this.A,u(t,18));return;case 8:HB(this,Fe(ze(t)));return;case 9:!this.a&&(this.a=new we(ed,this,9,5)),kt(this.a),!this.a&&(this.a=new we(ed,this,9,5)),nr(this.a,u(t,18));return}Jl(this,n-dt((jn(),kb)),Cn((i=u(Kn(this,16),29),i||kb),n),t)},s.fi=function(){return jn(),kb},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:X(this.Cb,184)&&(u(this.Cb,184).tb=null),Mo(this,null);return;case 2:c8(this,null),K9(this,this.D);return;case 5:D8(this,null);return;case 7:!this.A&&(this.A=new rs(Fo,this,7)),kt(this.A);return;case 8:HB(this,!0);return;case 9:!this.a&&(this.a=new we(ed,this,9,5)),kt(this.a);return}Fl(this,n-dt((jn(),kb)),Cn((t=u(Kn(this,16),29),t||kb),n))},s.mi=function(){var n,t;if(this.a)for(n=0,t=this.a.i;n>16==5?u(this.Cb,675):null}return Pl(this,n-dt((jn(),n0)),Cn((r=u(Kn(this,16),29),r||n0),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 5:return this.Cb&&(i=(c=this.Db>>16,c>=0?_He(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,5,i)}return o=u(Cn((r=u(Kn(this,16),29),r||(jn(),n0)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),n0)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 5:return hl(this,null,5,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),n0)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),n0)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.d!=0;case 3:return!!this.b;case 4:return this.c!=null;case 5:return!!(this.Db>>16==5&&u(this.Cb,675))}return Ll(this,n-dt((jn(),n0)),Cn((t=u(Kn(this,16),29),t||n0),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:Mo(this,Pt(t));return;case 2:IY(this,u(t,15).a);return;case 3:$qe(this,u(t,2001));return;case 4:_Y(this,Pt(t));return}Jl(this,n-dt((jn(),n0)),Cn((i=u(Kn(this,16),29),i||n0),n),t)},s.fi=function(){return jn(),n0},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:Mo(this,null);return;case 2:IY(this,0);return;case 3:$qe(this,null);return;case 4:_Y(this,null);return}Fl(this,n-dt((jn(),n0)),Cn((t=u(Kn(this,16),29),t||n0),n))},s.Ib=function(){var n;return n=this.c,n??this.zb},s.b=null,s.c=null,s.d=0,v(Jn,"EEnumLiteralImpl",568);var ezn=Gi(Jn,"EFactoryImpl/InternalEDateTimeFormat");m(485,1,{2076:1},KC),v(Jn,"EFactoryImpl/1ClientInternalEDateTimeFormat",485),m(248,118,{109:1,94:1,93:1,87:1,57:1,114:1,52:1,100:1,248:1,117:1,118:1},gw),s.zh=function(n,t,i){var r;return i=hl(this,n,t,i),this.e&&X(n,179)&&(r=Iz(this,this.e),r!=this.c&&(i=_8(this,r,i))),i},s.Ih=function(n,t,i){var r;switch(n){case 0:return this.f;case 1:return!this.d&&(this.d=new mr(Rc,this,1)),this.d;case 2:return t?Gz(this):this.c;case 3:return this.b;case 4:return this.e;case 5:return t?GQ(this):this.a}return Pl(this,n-dt((jn(),Ep)),Cn((r=u(Kn(this,16),29),r||Ep),n),t,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return vFe(this,null,i);case 1:return!this.d&&(this.d=new mr(Rc,this,1)),vc(this.d,n,i);case 3:return mFe(this,null,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),Ep)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),Ep)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.f;case 1:return!!this.d&&this.d.i!=0;case 2:return!!this.c;case 3:return!!this.b;case 4:return!!this.e;case 5:return!!this.a}return Ll(this,n-dt((jn(),Ep)),Cn((t=u(Kn(this,16),29),t||Ep),n))},s.$h=function(n,t){var i;switch(n){case 0:ZHe(this,u(t,87));return;case 1:!this.d&&(this.d=new mr(Rc,this,1)),kt(this.d),!this.d&&(this.d=new mr(Rc,this,1)),nr(this.d,u(t,18));return;case 3:u0e(this,u(t,87));return;case 4:x0e(this,u(t,834));return;case 5:X9(this,u(t,143));return}Jl(this,n-dt((jn(),Ep)),Cn((i=u(Kn(this,16),29),i||Ep),n),t)},s.fi=function(){return jn(),Ep},s.hi=function(n){var t;switch(n){case 0:ZHe(this,null);return;case 1:!this.d&&(this.d=new mr(Rc,this,1)),kt(this.d);return;case 3:u0e(this,null);return;case 4:x0e(this,null);return;case 5:X9(this,null);return}Fl(this,n-dt((jn(),Ep)),Cn((t=u(Kn(this,16),29),t||Ep),n))},s.Ib=function(){var n;return n=new tl(Ff(this)),n.a+=" (expression: ",QW(this,n),n.a+=")",n.a};var Q8e;v(Jn,"EGenericTypeImpl",248),m(2029,2024,YF),s.Ei=function(n,t){WOe(this,n,t)},s.Uk=function(n,t){return WOe(this,this.gc(),n),t},s.Yi=function(n){return Yu(this.nj(),n)},s.Gi=function(){return this.Hi()},s.nj=function(){return new qSe(this)},s.Hi=function(){return this.Ii(0)},s.Ii=function(n){return this.nj().dd(n)},s.Vk=function(n,t){return H2(this,n,!0),t},s.Ri=function(n,t){var i,r;return r=nW(this,t),i=this.dd(n),i.Rb(r),r},s.Si=function(n,t){var i;H2(this,t,!0),i=this.dd(n),i.Rb(t)},v(Ri,"AbstractSequentialInternalEList",2029),m(482,2029,YF,ST),s.Yi=function(n){return Yu(this.nj(),n)},s.Gi=function(){return this.b==null?(Ed(),Ed(),iD):this.ql()},s.nj=function(){return new pTe(this.a,this.b)},s.Hi=function(){return this.b==null?(Ed(),Ed(),iD):this.ql()},s.Ii=function(n){var t,i;if(this.b==null){if(n<0||n>1)throw R(new jo(RS+n+", size=0"));return Ed(),Ed(),iD}for(i=this.ql(),t=0;t0;)if(t=this.c[--this.d],(!this.e||t.nk()!=K7||t.Jj()!=0)&&(!this.tl()||this.b.Uh(t))){if(o=this.b.Kh(t,this.sl()),this.f=(Tc(),u(t,69).vk()),this.f||t.Hk()){if(this.sl()?(r=u(o,16),this.k=r):(r=u(o,72),this.k=this.j=r),X(this.k,59)?(this.o=this.k.gc(),this.n=this.o):this.p=this.j?this.j.Ii(this.k.gc()):this.k.dd(this.k.gc()),this.p?QGe(this,this.p):oqe(this))return c=this.p?this.p.Ub():this.j?this.j.Yi(--this.n):this.k.Xb(--this.n),this.f?(n=u(c,75),n.Jk(),i=n.kd(),this.i=i):(i=c,this.i=i),this.g=-3,!0}else if(o!=null)return this.k=null,this.p=null,i=o,this.i=i,this.g=-2,!0}return this.k=null,this.p=null,this.g=-1,!1}else return c=this.p?this.p.Ub():this.j?this.j.Yi(--this.n):this.k.Xb(--this.n),this.f?(n=u(c,75),n.Jk(),i=n.kd(),this.i=i):(i=c,this.i=i),this.g=-3,!0}},s.Pb=function(){return IB(this)},s.Tb=function(){return this.a},s.Ub=function(){var n;if(this.g<-1||this.Sb())return--this.a,this.g=0,n=this.i,this.Sb(),n;throw R(new hu)},s.Vb=function(){return this.a-1},s.Qb=function(){throw R(new _t)},s.sl=function(){return!1},s.Wb=function(n){throw R(new _t)},s.tl=function(){return!0},s.a=0,s.d=0,s.f=!1,s.g=0,s.n=0,s.o=0;var iD;v(Ri,"EContentsEList/FeatureIteratorImpl",287),m(700,287,QF,ple),s.sl=function(){return!0},v(Ri,"EContentsEList/ResolvingFeatureIteratorImpl",700),m(1147,700,QF,_Oe),s.tl=function(){return!1},v(Jn,"ENamedElementImpl/1/1",1147),m(1148,287,QF,LOe),s.tl=function(){return!1},v(Jn,"ENamedElementImpl/1/2",1148),m(39,151,zN,_2,rY,Dr,mY,L1,Lf,The,yLe,Ohe,kLe,Gae,jLe,Dhe,ELe,qae,SLe,Nhe,xLe,oE,rO,RV,Ihe,ALe,Uae,MLe),s.Ij=function(){return ahe(this)},s.Pj=function(){var n;return n=ahe(this),n?n.gk():null},s.fj=function(n){return this.b==-1&&this.a&&(this.b=this.c.Eh(this.a.Jj(),this.a.nk())),this.c.vh(this.b,n)},s.hj=function(){return this.c},s.Qj=function(){var n;return n=ahe(this),n?n.rk():!1},s.b=-1,v(Jn,"ENotificationImpl",39),m(403,293,{109:1,94:1,93:1,158:1,197:1,57:1,62:1,114:1,470:1,52:1,100:1,161:1,403:1,293:1,117:1,118:1},yX),s.xh=function(n){return PHe(this,n)},s.Ih=function(n,t,i){var r,c,o;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $n(),(this.Bb&256)!=0;case 3:return $n(),(this.Bb&512)!=0;case 4:return ve(this.s);case 5:return ve(this.t);case 6:return $n(),o=this.t,o>1||o==-1;case 7:return $n(),c=this.s,c>=1;case 8:return t?ff(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?u(this.Cb,29):null;case 11:return!this.d&&(this.d=new rs(Fo,this,11)),this.d;case 12:return!this.c&&(this.c=new we(jp,this,12,10)),this.c;case 13:return!this.a&&(this.a=new CT(this,this)),this.a;case 14:return Ts(this)}return Pl(this,n-dt((jn(),t0)),Cn((r=u(Kn(this,16),29),r||t0),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 10:return this.Cb&&(i=(c=this.Db>>16,c>=0?PHe(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,10,i);case 12:return!this.c&&(this.c=new we(jp,this,12,10)),Co(this.c,n,i)}return o=u(Cn((r=u(Kn(this,16),29),r||(jn(),t0)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),t0)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 9:return SV(this,i);case 10:return hl(this,null,10,i);case 11:return!this.d&&(this.d=new rs(Fo,this,11)),vc(this.d,n,i);case 12:return!this.c&&(this.c=new we(jp,this,12,10)),vc(this.c,n,i);case 14:return vc(Ts(this),n,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),t0)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),t0)),n,i)},s.Th=function(n){var t,i,r;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&Mw(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&Mw(this.q).i==0);case 10:return!!(this.Db>>16==10&&u(this.Cb,29));case 11:return!!this.d&&this.d.i!=0;case 12:return!!this.c&&this.c.i!=0;case 13:return!!this.a&&Ts(this.a.a).i!=0&&!(this.b&&JQ(this.b));case 14:return!!this.b&&JQ(this.b)}return Ll(this,n-dt((jn(),t0)),Cn((t=u(Kn(this,16),29),t||t0),n))},s.$h=function(n,t){var i,r;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:Mo(this,Pt(t));return;case 2:Ld(this,Fe(ze(t)));return;case 3:Pd(this,Fe(ze(t)));return;case 4:Nd(this,u(t,15).a);return;case 5:$2(this,u(t,15).a);return;case 8:cg(this,u(t,143));return;case 9:r=Fa(this,u(t,87),null),r&&r.mj();return;case 11:!this.d&&(this.d=new rs(Fo,this,11)),kt(this.d),!this.d&&(this.d=new rs(Fo,this,11)),nr(this.d,u(t,18));return;case 12:!this.c&&(this.c=new we(jp,this,12,10)),kt(this.c),!this.c&&(this.c=new we(jp,this,12,10)),nr(this.c,u(t,18));return;case 13:!this.a&&(this.a=new CT(this,this)),dS(this.a),!this.a&&(this.a=new CT(this,this)),nr(this.a,u(t,18));return;case 14:kt(Ts(this)),nr(Ts(this),u(t,18));return}Jl(this,n-dt((jn(),t0)),Cn((i=u(Kn(this,16),29),i||t0),n),t)},s.fi=function(){return jn(),t0},s.hi=function(n){var t,i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:Mo(this,null);return;case 2:Ld(this,!0);return;case 3:Pd(this,!0);return;case 4:Nd(this,0);return;case 5:$2(this,1);return;case 8:cg(this,null);return;case 9:i=Fa(this,null,null),i&&i.mj();return;case 11:!this.d&&(this.d=new rs(Fo,this,11)),kt(this.d);return;case 12:!this.c&&(this.c=new we(jp,this,12,10)),kt(this.c);return;case 13:this.a&&dS(this.a);return;case 14:this.b&&kt(this.b);return}Fl(this,n-dt((jn(),t0)),Cn((t=u(Kn(this,16),29),t||t0),n))},s.mi=function(){var n,t;if(this.c)for(n=0,t=this.c.i;nf&&ir(n,f,null),r=0,i=new st(Ts(this.a));i.e!=i.i.gc();)t=u(ft(i),87),o=(l=t.c,l||(jn(),rh)),ir(n,r++,o);return n},s.Fj=function(){var n,t,i,r,c;for(c=new vd,c.a+="[",n=Ts(this.a),t=0,r=Ts(this.a).i;t1);case 5:return bE(this,n,t,i,r,this.i-u(i,16).gc()>0);default:return new L1(this.e,n,this.c,t,i,r,!0)}},s.Rj=function(){return!0},s.Oj=function(){return JQ(this)},s.Ek=function(){kt(this)},v(Jn,"EOperationImpl/2",1331),m(493,1,{1999:1,493:1},YCe),v(Jn,"EPackageImpl/1",493),m(14,81,au,we),s.gl=function(){return this.d},s.hl=function(){return this.b},s.kl=function(){return!0},s.b=0,v(Ri,"EObjectContainmentWithInverseEList",14),m(361,14,au,x4),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectContainmentWithInverseEList/Resolving",361),m(312,361,au,x2),s.Li=function(){this.a.tb=null},v(Jn,"EPackageImpl/2",312),m(1243,1,{},Ss),v(Jn,"EPackageImpl/3",1243),m(721,44,v3,yoe),s._b=function(n){return $r(n)?BV(this,n):!!Xc(this.f,n)},v(Jn,"EPackageRegistryImpl",721),m(503,293,{109:1,94:1,93:1,158:1,197:1,57:1,2078:1,114:1,470:1,52:1,100:1,161:1,503:1,293:1,117:1,118:1},kX),s.xh=function(n){return $He(this,n)},s.Ih=function(n,t,i){var r,c,o;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $n(),(this.Bb&256)!=0;case 3:return $n(),(this.Bb&512)!=0;case 4:return ve(this.s);case 5:return ve(this.t);case 6:return $n(),o=this.t,o>1||o==-1;case 7:return $n(),c=this.s,c>=1;case 8:return t?ff(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?u(this.Cb,62):null}return Pl(this,n-dt((jn(),Km)),Cn((r=u(Kn(this,16),29),r||Km),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 10:return this.Cb&&(i=(c=this.Db>>16,c>=0?$He(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,10,i)}return o=u(Cn((r=u(Kn(this,16),29),r||(jn(),Km)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),Km)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 9:return SV(this,i);case 10:return hl(this,null,10,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),Km)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),Km)),n,i)},s.Th=function(n){var t,i,r;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&Mw(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&Mw(this.q).i==0);case 10:return!!(this.Db>>16==10&&u(this.Cb,62))}return Ll(this,n-dt((jn(),Km)),Cn((t=u(Kn(this,16),29),t||Km),n))},s.fi=function(){return jn(),Km},v(Jn,"EParameterImpl",503),m(103,451,{109:1,94:1,93:1,158:1,197:1,57:1,19:1,179:1,69:1,114:1,470:1,52:1,100:1,161:1,103:1,451:1,293:1,117:1,118:1,682:1},kle),s.Ih=function(n,t,i){var r,c,o,l;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $n(),(this.Bb&256)!=0;case 3:return $n(),(this.Bb&512)!=0;case 4:return ve(this.s);case 5:return ve(this.t);case 6:return $n(),l=this.t,l>1||l==-1;case 7:return $n(),c=this.s,c>=1;case 8:return t?ff(this):this.r;case 9:return this.q;case 10:return $n(),(this.Bb&Gf)!=0;case 11:return $n(),(this.Bb&V0)!=0;case 12:return $n(),(this.Bb&cm)!=0;case 13:return this.j;case 14:return A8(this);case 15:return $n(),(this.Bb&as)!=0;case 16:return $n(),(this.Bb&jh)!=0;case 17:return O2(this);case 18:return $n(),(this.Bb&Ru)!=0;case 19:return $n(),o=Oc(this),!!(o&&(o.Bb&Ru)!=0);case 20:return $n(),(this.Bb&Ec)!=0;case 21:return t?Oc(this):this.b;case 22:return t?d1e(this):GPe(this);case 23:return!this.a&&(this.a=new Jv(qm,this,23)),this.a}return Pl(this,n-dt((jn(),i5)),Cn((r=u(Kn(this,16),29),r||i5),n),t,i)},s.Th=function(n){var t,i,r,c;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return c=this.t,c>1||c==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&Mw(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&Mw(this.q).i==0);case 10:return(this.Bb&Gf)==0;case 11:return(this.Bb&V0)!=0;case 12:return(this.Bb&cm)!=0;case 13:return this.j!=null;case 14:return A8(this)!=null;case 15:return(this.Bb&as)!=0;case 16:return(this.Bb&jh)!=0;case 17:return!!O2(this);case 18:return(this.Bb&Ru)!=0;case 19:return r=Oc(this),!!r&&(r.Bb&Ru)!=0;case 20:return(this.Bb&Ec)==0;case 21:return!!this.b;case 22:return!!GPe(this);case 23:return!!this.a&&this.a.i!=0}return Ll(this,n-dt((jn(),i5)),Cn((t=u(Kn(this,16),29),t||i5),n))},s.$h=function(n,t){var i,r;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:XV(this,Pt(t));return;case 2:Ld(this,Fe(ze(t)));return;case 3:Pd(this,Fe(ze(t)));return;case 4:Nd(this,u(t,15).a);return;case 5:$2(this,u(t,15).a);return;case 8:cg(this,u(t,143));return;case 9:r=Fa(this,u(t,87),null),r&&r.mj();return;case 10:l8(this,Fe(ze(t)));return;case 11:h8(this,Fe(ze(t)));return;case 12:a8(this,Fe(ze(t)));return;case 13:Dse(this,Pt(t));return;case 15:f8(this,Fe(ze(t)));return;case 16:d8(this,Fe(ze(t)));return;case 18:L4n(this,Fe(ze(t)));return;case 20:Y1e(this,Fe(ze(t)));return;case 21:Khe(this,u(t,19));return;case 23:!this.a&&(this.a=new Jv(qm,this,23)),kt(this.a),!this.a&&(this.a=new Jv(qm,this,23)),nr(this.a,u(t,18));return}Jl(this,n-dt((jn(),i5)),Cn((i=u(Kn(this,16),29),i||i5),n),t)},s.fi=function(){return jn(),i5},s.hi=function(n){var t,i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:X(this.Cb,88)&&Y2(Ms(u(this.Cb,88)),4),Mo(this,null);return;case 2:Ld(this,!0);return;case 3:Pd(this,!0);return;case 4:Nd(this,0);return;case 5:$2(this,1);return;case 8:cg(this,null);return;case 9:i=Fa(this,null,null),i&&i.mj();return;case 10:l8(this,!0);return;case 11:h8(this,!1);return;case 12:a8(this,!1);return;case 13:this.i=null,xB(this,null);return;case 15:f8(this,!1);return;case 16:d8(this,!1);return;case 18:Q1e(this,!1),X(this.Cb,88)&&Y2(Ms(u(this.Cb,88)),2);return;case 20:Y1e(this,!0);return;case 21:Khe(this,null);return;case 23:!this.a&&(this.a=new Jv(qm,this,23)),kt(this.a);return}Fl(this,n-dt((jn(),i5)),Cn((t=u(Kn(this,16),29),t||i5),n))},s.mi=function(){d1e(this),$9(Vc((ls(),nc),this)),ff(this),this.Bb|=1},s.sk=function(){return Oc(this)},s.Zk=function(){var n;return n=Oc(this),!!n&&(n.Bb&Ru)!=0},s.$k=function(){return(this.Bb&Ru)!=0},s._k=function(){return(this.Bb&Ec)!=0},s.Wk=function(n,t){return this.c=null,z1e(this,n,t)},s.Ib=function(){var n;return(this.Db&64)!=0?Jz(this):(n=new cf(Jz(this)),n.a+=" (containment: ",yd(n,(this.Bb&Ru)!=0),n.a+=", resolveProxies: ",yd(n,(this.Bb&Ec)!=0),n.a+=")",n.a)},v(Jn,"EReferenceImpl",103),m(549,118,{109:1,45:1,94:1,93:1,136:1,57:1,114:1,52:1,100:1,549:1,117:1,118:1},$h),s.Fb=function(n){return this===n},s.jd=function(){return this.b},s.kd=function(){return this.c},s.Hb=function(){return jw(this)},s.Ai=function(n){Qvn(this,Pt(n))},s.ld=function(n){return zvn(this,Pt(n))},s.Ih=function(n,t,i){var r;switch(n){case 0:return this.b;case 1:return this.c}return Pl(this,n-dt((jn(),Ac)),Cn((r=u(Kn(this,16),29),r||Ac),n),t,i)},s.Th=function(n){var t;switch(n){case 0:return this.b!=null;case 1:return this.c!=null}return Ll(this,n-dt((jn(),Ac)),Cn((t=u(Kn(this,16),29),t||Ac),n))},s.$h=function(n,t){var i;switch(n){case 0:Wvn(this,Pt(t));return;case 1:Jhe(this,Pt(t));return}Jl(this,n-dt((jn(),Ac)),Cn((i=u(Kn(this,16),29),i||Ac),n),t)},s.fi=function(){return jn(),Ac},s.hi=function(n){var t;switch(n){case 0:qhe(this,null);return;case 1:Jhe(this,null);return}Fl(this,n-dt((jn(),Ac)),Cn((t=u(Kn(this,16),29),t||Ac),n))},s.yi=function(){var n;return this.a==-1&&(n=this.b,this.a=n==null?0:Id(n)),this.a},s.zi=function(n){this.a=n},s.Ib=function(){var n;return(this.Db&64)!=0?Ff(this):(n=new cf(Ff(this)),n.a+=" (key: ",Bc(n,this.b),n.a+=", value: ",Bc(n,this.c),n.a+=")",n.a)},s.a=-1,s.b=null,s.c=null;var Du=v(Jn,"EStringToStringMapEntryImpl",549),Zan=Gi(Ri,"FeatureMap/Entry/Internal");m(562,1,WF),s.vl=function(n){return this.wl(u(n,52))},s.wl=function(n){return this.vl(n)},s.Fb=function(n){var t,i;return this===n?!0:X(n,75)?(t=u(n,75),t.Jk()==this.c?(i=this.kd(),i==null?t.kd()==null:gi(i,t.kd())):!1):!1},s.Jk=function(){return this.c},s.Hb=function(){var n;return n=this.kd(),Ni(this.c)^(n==null?0:Ni(n))},s.Ib=function(){var n,t;return n=this.c,t=ol(n.ok()).vi(),n.ve(),(t!=null&&t.length!=0?t+":"+n.ve():n.ve())+"="+this.kd()},v(Jn,"EStructuralFeatureImpl/BasicFeatureMapEntry",562),m(777,562,WF,Mle),s.wl=function(n){return new Mle(this.c,n)},s.kd=function(){return this.a},s.xl=function(n,t,i){return E7n(this,n,this.a,t,i)},s.yl=function(n,t,i){return S7n(this,n,this.a,t,i)},v(Jn,"EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry",777),m(1304,1,{},QCe),s.wk=function(n,t,i,r,c){var o;return o=u(H9(n,this.b),219),o.Wl(this.a).Dk(r)},s.xk=function(n,t,i,r,c){var o;return o=u(H9(n,this.b),219),o.Nl(this.a,r,c)},s.yk=function(n,t,i,r,c){var o;return o=u(H9(n,this.b),219),o.Ol(this.a,r,c)},s.zk=function(n,t,i){var r;return r=u(H9(n,this.b),219),r.Wl(this.a).Oj()},s.Ak=function(n,t,i,r){var c;c=u(H9(n,this.b),219),c.Wl(this.a).Wb(r)},s.Bk=function(n,t,i){return u(H9(n,this.b),219).Wl(this.a)},s.Ck=function(n,t,i){var r;r=u(H9(n,this.b),219),r.Wl(this.a).Ek()},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator",1304),m(89,1,{},xd,Ub,Md,Wb),s.wk=function(n,t,i,r,c){var o;if(o=t.ii(i),o==null&&t.ji(i,o=eF(this,n)),!c)switch(this.e){case 50:case 41:return u(o,586)._j();case 40:return u(o,219).Tl()}return o},s.xk=function(n,t,i,r,c){var o,l;return l=t.ii(i),l==null&&t.ji(i,l=eF(this,n)),o=u(l,72).Uk(r,c),o},s.yk=function(n,t,i,r,c){var o;return o=t.ii(i),o!=null&&(c=u(o,72).Vk(r,c)),c},s.zk=function(n,t,i){var r;return r=t.ii(i),r!=null&&u(r,77).Oj()},s.Ak=function(n,t,i,r){var c;c=u(t.ii(i),77),!c&&t.ji(i,c=eF(this,n)),c.Wb(r)},s.Bk=function(n,t,i){var r,c;return c=t.ii(i),c==null&&t.ji(i,c=eF(this,n)),X(c,77)?u(c,77):(r=u(t.ii(i),16),new HSe(r))},s.Ck=function(n,t,i){var r;r=u(t.ii(i),77),!r&&t.ji(i,r=eF(this,n)),r.Ek()},s.b=0,s.e=0,v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateMany",89),m(498,1,{}),s.xk=function(n,t,i,r,c){throw R(new _t)},s.yk=function(n,t,i,r,c){throw R(new _t)},s.Bk=function(n,t,i){return new KDe(this,n,t,i)};var d1;v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingle",498),m(1321,1,Lne,KDe),s.Dk=function(n){return this.a.wk(this.c,this.d,this.b,n,!0)},s.Oj=function(){return this.a.zk(this.c,this.d,this.b)},s.Wb=function(n){this.a.Ak(this.c,this.d,this.b,n)},s.Ek=function(){this.a.Ck(this.c,this.d,this.b)},s.b=0,v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingle/1",1321),m(770,498,{},bae),s.wk=function(n,t,i,r,c){return RW(n,n.Mh(),n.Ch())==this.b?this._k()&&r?xW(n):n.Mh():null},s.xk=function(n,t,i,r,c){var o,l;return n.Mh()&&(c=(o=n.Ch(),o>=0?n.xh(c):n.Mh().Qh(n,-1-o,null,c))),l=Ji(n.Ah(),this.e),n.zh(r,l,c)},s.yk=function(n,t,i,r,c){var o;return o=Ji(n.Ah(),this.e),n.zh(null,o,c)},s.zk=function(n,t,i){var r;return r=Ji(n.Ah(),this.e),!!n.Mh()&&n.Ch()==r},s.Ak=function(n,t,i,r){var c,o,l,f,h;if(r!=null&&!JW(this.a,r))throw R(new a9(ZF+(X(r,57)?c0e(u(r,57).Ah()):xhe(Us(r)))+eJ+this.a+"'"));if(c=n.Mh(),l=Ji(n.Ah(),this.e),ue(r)!==ue(c)||n.Ch()!=l&&r!=null){if(m8(n,u(r,57)))throw R(new Un(PS+n.Ib()));h=null,c&&(h=(o=n.Ch(),o>=0?n.xh(h):n.Mh().Qh(n,-1-o,null,h))),f=u(r,52),f&&(h=f.Oh(n,Ji(f.Ah(),this.b),null,h)),h=n.zh(f,l,h),h&&h.mj()}else n.sh()&&n.th()&&hi(n,new Dr(n,1,l,r,r))},s.Ck=function(n,t,i){var r,c,o,l;r=n.Mh(),r?(l=(c=n.Ch(),c>=0?n.xh(null):n.Mh().Qh(n,-1-c,null,null)),o=Ji(n.Ah(),this.e),l=n.zh(null,o,l),l&&l.mj()):n.sh()&&n.th()&&hi(n,new oE(n,1,this.e,null,null))},s._k=function(){return!1},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainer",770),m(1305,770,{},zNe),s._k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving",1305),m(560,498,{}),s.wk=function(n,t,i,r,c){var o;return o=t.ii(i),o==null?this.b:ue(o)===ue(d1)?null:o},s.zk=function(n,t,i){var r;return r=t.ii(i),r!=null&&(ue(r)===ue(d1)||!gi(r,this.b))},s.Ak=function(n,t,i,r){var c,o;n.sh()&&n.th()?(c=(o=t.ii(i),o==null?this.b:ue(o)===ue(d1)?null:o),r==null?this.c!=null?(t.ji(i,null),r=this.b):this.b!=null?t.ji(i,d1):t.ji(i,null):(this.zl(r),t.ji(i,r)),hi(n,this.d.Al(n,1,this.e,c,r))):r==null?this.c!=null?t.ji(i,null):this.b!=null?t.ji(i,d1):t.ji(i,null):(this.zl(r),t.ji(i,r))},s.Ck=function(n,t,i){var r,c;n.sh()&&n.th()?(r=(c=t.ii(i),c==null?this.b:ue(c)===ue(d1)?null:c),t.ki(i),hi(n,this.d.Al(n,1,this.e,r,this.b))):t.ki(i)},s.zl=function(n){throw R(new ZSe)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData",560),m(C3,1,{},sw),s.Al=function(n,t,i,r,c){return new oE(n,t,i,r,c)},s.Bl=function(n,t,i,r,c,o){return new RV(n,t,i,r,c,o)};var W8e,Z8e,e7e,n7e,t7e,i7e,r7e,Hce,c7e;v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator",C3),m(1322,C3,{},SL),s.Al=function(n,t,i,r,c){return new Uae(n,t,i,Fe(ze(r)),Fe(ze(c)))},s.Bl=function(n,t,i,r,c,o){return new MLe(n,t,i,Fe(ze(r)),Fe(ze(c)),o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1",1322),m(1323,C3,{},xL),s.Al=function(n,t,i,r,c){return new The(n,t,i,u(r,221).a,u(c,221).a)},s.Bl=function(n,t,i,r,c,o){return new yLe(n,t,i,u(r,221).a,u(c,221).a,o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2",1323),m(1324,C3,{},AL),s.Al=function(n,t,i,r,c){return new Ohe(n,t,i,u(r,180).a,u(c,180).a)},s.Bl=function(n,t,i,r,c,o){return new kLe(n,t,i,u(r,180).a,u(c,180).a,o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3",1324),m(1325,C3,{},bU),s.Al=function(n,t,i,r,c){return new Gae(n,t,i,ne(re(r)),ne(re(c)))},s.Bl=function(n,t,i,r,c,o){return new jLe(n,t,i,ne(re(r)),ne(re(c)),o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4",1325),m(1326,C3,{},Hk),s.Al=function(n,t,i,r,c){return new Dhe(n,t,i,u(r,164).a,u(c,164).a)},s.Bl=function(n,t,i,r,c,o){return new ELe(n,t,i,u(r,164).a,u(c,164).a,o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5",1326),m(1327,C3,{},Rh),s.Al=function(n,t,i,r,c){return new qae(n,t,i,u(r,15).a,u(c,15).a)},s.Bl=function(n,t,i,r,c,o){return new SLe(n,t,i,u(r,15).a,u(c,15).a,o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6",1327),m(1328,C3,{},g0),s.Al=function(n,t,i,r,c){return new Nhe(n,t,i,u(r,190).a,u(c,190).a)},s.Bl=function(n,t,i,r,c,o){return new xLe(n,t,i,u(r,190).a,u(c,190).a,o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7",1328),m(1329,C3,{},ML),s.Al=function(n,t,i,r,c){return new Ihe(n,t,i,u(r,191).a,u(c,191).a)},s.Bl=function(n,t,i,r,c,o){return new ALe(n,t,i,u(r,191).a,u(c,191).a,o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8",1329),m(1307,560,{},WDe),s.zl=function(n){if(!this.a.dk(n))throw R(new a9(ZF+Us(n)+eJ+this.a+"'"))},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic",1307),m(1308,560,{},PIe),s.zl=function(n){},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic",1308),m(771,560,{}),s.zk=function(n,t,i){var r;return r=t.ii(i),r!=null},s.Ak=function(n,t,i,r){var c,o;n.sh()&&n.th()?(c=!0,o=t.ii(i),o==null?(c=!1,o=this.b):ue(o)===ue(d1)&&(o=null),r==null?this.c!=null?(t.ji(i,null),r=this.b):t.ji(i,d1):(this.zl(r),t.ji(i,r)),hi(n,this.d.Bl(n,1,this.e,o,r,!c))):r==null?this.c!=null?t.ji(i,null):t.ji(i,d1):(this.zl(r),t.ji(i,r))},s.Ck=function(n,t,i){var r,c;n.sh()&&n.th()?(r=!0,c=t.ii(i),c==null?(r=!1,c=this.b):ue(c)===ue(d1)&&(c=null),t.ki(i),hi(n,this.d.Bl(n,2,this.e,c,this.b,r))):t.ki(i)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable",771),m(1309,771,{},ZDe),s.zl=function(n){if(!this.a.dk(n))throw R(new a9(ZF+Us(n)+eJ+this.a+"'"))},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic",1309),m(1310,771,{},$Ie),s.zl=function(n){},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic",1310),m(402,498,{},fR),s.wk=function(n,t,i,r,c){var o,l,f,h,b;if(b=t.ii(i),this.rk()&&ue(b)===ue(d1))return null;if(this._k()&&r&&b!=null){if(f=u(b,52),f.Sh()&&(h=z0(n,f),f!=h)){if(!JW(this.a,h))throw R(new a9(ZF+Us(h)+eJ+this.a+"'"));t.ji(i,b=h),this.$k()&&(o=u(h,52),l=f.Qh(n,this.b?Ji(f.Ah(),this.b):-1-Ji(n.Ah(),this.e),null,null),!o.Mh()&&(l=o.Oh(n,this.b?Ji(o.Ah(),this.b):-1-Ji(n.Ah(),this.e),null,l)),l&&l.mj()),n.sh()&&n.th()&&hi(n,new oE(n,9,this.e,f,h))}return b}else return b},s.xk=function(n,t,i,r,c){var o,l;return l=t.ii(i),ue(l)===ue(d1)&&(l=null),t.ji(i,r),this.Kj()?ue(l)!==ue(r)&&l!=null&&(o=u(l,52),c=o.Qh(n,Ji(o.Ah(),this.b),null,c)):this.$k()&&l!=null&&(c=u(l,52).Qh(n,-1-Ji(n.Ah(),this.e),null,c)),n.sh()&&n.th()&&(!c&&(c=new k0(4)),c.lj(new oE(n,1,this.e,l,r))),c},s.yk=function(n,t,i,r,c){var o;return o=t.ii(i),ue(o)===ue(d1)&&(o=null),t.ki(i),n.sh()&&n.th()&&(!c&&(c=new k0(4)),this.rk()?c.lj(new oE(n,2,this.e,o,null)):c.lj(new oE(n,1,this.e,o,null))),c},s.zk=function(n,t,i){var r;return r=t.ii(i),r!=null},s.Ak=function(n,t,i,r){var c,o,l,f,h;if(r!=null&&!JW(this.a,r))throw R(new a9(ZF+(X(r,57)?c0e(u(r,57).Ah()):xhe(Us(r)))+eJ+this.a+"'"));h=t.ii(i),f=h!=null,this.rk()&&ue(h)===ue(d1)&&(h=null),l=null,this.Kj()?ue(h)!==ue(r)&&(h!=null&&(c=u(h,52),l=c.Qh(n,Ji(c.Ah(),this.b),null,l)),r!=null&&(c=u(r,52),l=c.Oh(n,Ji(c.Ah(),this.b),null,l))):this.$k()&&ue(h)!==ue(r)&&(h!=null&&(l=u(h,52).Qh(n,-1-Ji(n.Ah(),this.e),null,l)),r!=null&&(l=u(r,52).Oh(n,-1-Ji(n.Ah(),this.e),null,l))),r==null&&this.rk()?t.ji(i,d1):t.ji(i,r),n.sh()&&n.th()?(o=new RV(n,1,this.e,h,r,this.rk()&&!f),l?(l.lj(o),l.mj()):hi(n,o)):l&&l.mj()},s.Ck=function(n,t,i){var r,c,o,l,f;f=t.ii(i),l=f!=null,this.rk()&&ue(f)===ue(d1)&&(f=null),o=null,f!=null&&(this.Kj()?(r=u(f,52),o=r.Qh(n,Ji(r.Ah(),this.b),null,o)):this.$k()&&(o=u(f,52).Qh(n,-1-Ji(n.Ah(),this.e),null,o))),t.ki(i),n.sh()&&n.th()?(c=new RV(n,this.rk()?2:1,this.e,f,null,l),o?(o.lj(c),o.mj()):hi(n,c)):o&&o.mj()},s.Kj=function(){return!1},s.$k=function(){return!1},s._k=function(){return!1},s.rk=function(){return!1},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObject",402),m(561,402,{},BK),s.$k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment",561),m(1313,561,{},$Oe),s._k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving",1313),m(773,561,{},mle),s.rk=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable",773),m(1315,773,{},ROe),s._k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving",1315),m(638,561,{},ZK),s.Kj=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse",638),m(1314,638,{},FNe),s._k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving",1314),m(774,638,{},Zle),s.rk=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable",774),m(1316,774,{},JNe),s._k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving",1316),m(639,402,{},vle),s._k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving",639),m(1317,639,{},BOe),s.rk=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable",1317),m(775,639,{},efe),s.Kj=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse",775),m(1318,775,{},HNe),s.rk=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable",1318),m(1311,402,{},zOe),s.rk=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable",1311),m(772,402,{},nfe),s.Kj=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse",772),m(1312,772,{},GNe),s.rk=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable",1312),m(776,562,WF,Qfe),s.wl=function(n){return new Qfe(this.a,this.c,n)},s.kd=function(){return this.b},s.xl=function(n,t,i){return y9n(this,n,this.b,i)},s.yl=function(n,t,i){return k9n(this,n,this.b,i)},v(Jn,"EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry",776),m(1319,1,Lne,HSe),s.Dk=function(n){return this.a},s.Oj=function(){return X(this.a,98)?u(this.a,98).Oj():!this.a.dc()},s.Wb=function(n){this.a.$b(),this.a.Fc(u(n,16))},s.Ek=function(){X(this.a,98)?u(this.a,98).Ek():this.a.$b()},v(Jn,"EStructuralFeatureImpl/SettingMany",1319),m(1320,562,WF,wPe),s.vl=function(n){return new JK((Si(),hA),this.b.oi(this.a,n))},s.kd=function(){return null},s.xl=function(n,t,i){return i},s.yl=function(n,t,i){return i},v(Jn,"EStructuralFeatureImpl/SimpleContentFeatureMapEntry",1320),m(640,562,WF,JK),s.vl=function(n){return new JK(this.c,n)},s.kd=function(){return this.a},s.xl=function(n,t,i){return i},s.yl=function(n,t,i){return i},v(Jn,"EStructuralFeatureImpl/SimpleFeatureMapEntry",640),m(396,492,Th,Ol),s.$i=function(n){return le(vf,Nn,29,n,0,1)},s.Wi=function(){return!1},v(Jn,"ESuperAdapter/1",396),m(446,439,{109:1,94:1,93:1,158:1,197:1,57:1,114:1,834:1,52:1,100:1,161:1,446:1,117:1,118:1},Gk),s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return!this.a&&(this.a=new iE(this,Rc,this)),this.a}return Pl(this,n-dt((jn(),Sp)),Cn((r=u(Kn(this,16),29),r||Sp),n),t,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 2:return!this.a&&(this.a=new iE(this,Rc,this)),vc(this.a,n,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),Sp)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),Sp)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!!this.a&&this.a.i!=0}return Ll(this,n-dt((jn(),Sp)),Cn((t=u(Kn(this,16),29),t||Sp),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:Mo(this,Pt(t));return;case 2:!this.a&&(this.a=new iE(this,Rc,this)),kt(this.a),!this.a&&(this.a=new iE(this,Rc,this)),nr(this.a,u(t,18));return}Jl(this,n-dt((jn(),Sp)),Cn((i=u(Kn(this,16),29),i||Sp),n),t)},s.fi=function(){return jn(),Sp},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:Mo(this,null);return;case 2:!this.a&&(this.a=new iE(this,Rc,this)),kt(this.a);return}Fl(this,n-dt((jn(),Sp)),Cn((t=u(Kn(this,16),29),t||Sp),n))},v(Jn,"ETypeParameterImpl",446),m(447,81,au,iE),s.Lj=function(n,t){return hMn(this,u(n,87),t)},s.Mj=function(n,t){return dMn(this,u(n,87),t)},v(Jn,"ETypeParameterImpl/1",447),m(637,44,v3,jX),s.ec=function(){return new IP(this)},v(Jn,"ETypeParameterImpl/2",637),m(557,Ga,fs,IP),s.Ec=function(n){return vNe(this,u(n,87))},s.Fc=function(n){var t,i,r;for(r=!1,i=n.Jc();i.Ob();)t=u(i.Pb(),87),ei(this.a,t,"")==null&&(r=!0);return r},s.$b=function(){Hu(this.a)},s.Gc=function(n){return so(this.a,n)},s.Jc=function(){var n;return n=new B2(new sn(this.a).a),new DP(n)},s.Kc=function(n){return t$e(this,n)},s.gc=function(){return Aj(this.a)},v(Jn,"ETypeParameterImpl/2/1",557),m(558,1,Fr,DP),s.Nb=function(n){Zr(this,n)},s.Pb=function(){return u(t3(this.a).jd(),87)},s.Ob=function(){return this.a.b},s.Qb=function(){wRe(this.a)},v(Jn,"ETypeParameterImpl/2/1/1",558),m(1281,44,v3,Ixe),s._b=function(n){return $r(n)?BV(this,n):!!Xc(this.f,n)},s.xc=function(n){var t,i;return t=$r(n)?lo(this,n):bu(Xc(this.f,n)),X(t,835)?(i=u(t,835),t=i.Ik(),ei(this,u(n,241),t),t):t??(n==null?(zX(),nhn):null)},v(Jn,"EValidatorRegistryImpl",1281),m(1303,710,{109:1,94:1,93:1,469:1,158:1,57:1,114:1,2002:1,52:1,100:1,161:1,117:1,118:1},lw),s.oi=function(n,t){switch(n.fk()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return t==null?null:fu(t);case 25:return I8n(t);case 27:return X9n(t);case 28:return K9n(t);case 29:return t==null?null:JTe(uA[0],u(t,205));case 41:return t==null?"":Pb(u(t,298));case 42:return fu(t);case 50:return Pt(t);default:throw R(new Un(u7+n.ve()+up))}},s.pi=function(n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B;switch(n.G==-1&&(n.G=(S=ol(n),S?$d(S.si(),n):-1)),n.G){case 0:return i=new vX,i;case 1:return t=new Nb,t;case 2:return r=new rj,r;case 4:return c=new PP,c;case 5:return o=new Nxe,o;case 6:return l=new KSe,l;case 7:return f=new IC,f;case 10:return b=new jv,b;case 11:return p=new yX,p;case 12:return y=new u_e,y;case 13:return A=new kX,A;case 14:return O=new kle,O;case 17:return D=new $h,D;case 18:return h=new gw,h;case 19:return B=new Gk,B;default:throw R(new Un(vne+n.zb+up))}},s.qi=function(n,t){switch(n.fk()){case 20:return t==null?null:new Joe(t);case 21:return t==null?null:new A0(t);case 23:case 22:return t==null?null:OEn(t);case 26:case 24:return t==null?null:fO(al(t,-128,127)<<24>>24);case 25:return AOn(t);case 27:return hxn(t);case 28:return dxn(t);case 29:return IMn(t);case 32:case 31:return t==null?null:K2(t);case 38:case 37:return t==null?null:new aoe(t);case 40:case 39:return t==null?null:ve(al(t,Xr,oi));case 41:return null;case 42:return t==null,null;case 44:case 43:return t==null?null:q2(Zz(t));case 49:case 48:return t==null?null:o8(al(t,nJ,32767)<<16>>16);case 50:return t;default:throw R(new Un(u7+n.ve()+up))}},v(Jn,"EcoreFactoryImpl",1303),m(548,184,{109:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,2e3:1,52:1,100:1,161:1,184:1,548:1,117:1,118:1,680:1},NDe),s.gb=!1,s.hb=!1;var u7e,ehn=!1;v(Jn,"EcorePackageImpl",548),m(1199,1,{835:1},Ev),s.Ik=function(){return aOe(),thn},v(Jn,"EcorePackageImpl/1",1199),m(1208,1,ii,fw),s.dk=function(n){return X(n,158)},s.ek=function(n){return le(ZI,Nn,158,n,0,1)},v(Jn,"EcorePackageImpl/10",1208),m(1209,1,ii,rC),s.dk=function(n){return X(n,197)},s.ek=function(n){return le(_ce,Nn,197,n,0,1)},v(Jn,"EcorePackageImpl/11",1209),m(1210,1,ii,cC),s.dk=function(n){return X(n,57)},s.ek=function(n){return le(vb,Nn,57,n,0,1)},v(Jn,"EcorePackageImpl/12",1210),m(1211,1,ii,w0),s.dk=function(n){return X(n,403)},s.ek=function(n){return le(yf,ime,62,n,0,1)},v(Jn,"EcorePackageImpl/13",1211),m(1212,1,ii,CL),s.dk=function(n){return X(n,241)},s.ek=function(n){return le(Aa,Nn,241,n,0,1)},v(Jn,"EcorePackageImpl/14",1212),m(1213,1,ii,G5),s.dk=function(n){return X(n,503)},s.ek=function(n){return le(jp,Nn,2078,n,0,1)},v(Jn,"EcorePackageImpl/15",1213),m(1214,1,ii,U6),s.dk=function(n){return X(n,103)},s.ek=function(n){return le(Um,M3,19,n,0,1)},v(Jn,"EcorePackageImpl/16",1214),m(1215,1,ii,X6),s.dk=function(n){return X(n,179)},s.ek=function(n){return le(ns,M3,179,n,0,1)},v(Jn,"EcorePackageImpl/17",1215),m(1216,1,ii,q5),s.dk=function(n){return X(n,470)},s.ek=function(n){return le(Gm,Nn,470,n,0,1)},v(Jn,"EcorePackageImpl/18",1216),m(1217,1,ii,TL),s.dk=function(n){return X(n,549)},s.ek=function(n){return le(Du,zZe,549,n,0,1)},v(Jn,"EcorePackageImpl/19",1217),m(1200,1,ii,OL),s.dk=function(n){return X(n,335)},s.ek=function(n){return le(qm,M3,38,n,0,1)},v(Jn,"EcorePackageImpl/2",1200),m(1218,1,ii,K6),s.dk=function(n){return X(n,248)},s.ek=function(n){return le(Rc,ien,87,n,0,1)},v(Jn,"EcorePackageImpl/20",1218),m(1219,1,ii,NL),s.dk=function(n){return X(n,446)},s.ek=function(n){return le(Fo,Nn,834,n,0,1)},v(Jn,"EcorePackageImpl/21",1219),m(1220,1,ii,qk),s.dk=function(n){return b2(n)},s.ek=function(n){return le(Qi,Ae,473,n,8,1)},v(Jn,"EcorePackageImpl/22",1220),m(1221,1,ii,IL),s.dk=function(n){return X(n,195)},s.ek=function(n){return le(ds,Ae,195,n,0,2)},v(Jn,"EcorePackageImpl/23",1221),m(1222,1,ii,gU),s.dk=function(n){return X(n,221)},s.ek=function(n){return le(jy,Ae,221,n,0,1)},v(Jn,"EcorePackageImpl/24",1222),m(1223,1,ii,wU),s.dk=function(n){return X(n,180)},s.ek=function(n){return le(KS,Ae,180,n,0,1)},v(Jn,"EcorePackageImpl/25",1223),m(1224,1,ii,Ju),s.dk=function(n){return X(n,205)},s.ek=function(n){return le(aJ,Ae,205,n,0,1)},v(Jn,"EcorePackageImpl/26",1224),m(1225,1,ii,Do),s.dk=function(n){return!1},s.ek=function(n){return le(S7e,Nn,2174,n,0,1)},v(Jn,"EcorePackageImpl/27",1225),m(1226,1,ii,Hc),s.dk=function(n){return g2(n)},s.ek=function(n){return le(gr,Ae,346,n,7,1)},v(Jn,"EcorePackageImpl/28",1226),m(1227,1,ii,nu),s.dk=function(n){return X(n,61)},s.ek=function(n){return le(B8e,um,61,n,0,1)},v(Jn,"EcorePackageImpl/29",1227),m(1201,1,ii,io),s.dk=function(n){return X(n,504)},s.ek=function(n){return le(Zt,{3:1,4:1,5:1,1995:1},587,n,0,1)},v(Jn,"EcorePackageImpl/3",1201),m(1228,1,ii,v1),s.dk=function(n){return X(n,568)},s.ek=function(n){return le(J8e,Nn,2001,n,0,1)},v(Jn,"EcorePackageImpl/30",1228),m(1229,1,ii,Qp),s.dk=function(n){return X(n,163)},s.ek=function(n){return le(a7e,um,163,n,0,1)},v(Jn,"EcorePackageImpl/31",1229),m(1230,1,ii,U5),s.dk=function(n){return X(n,75)},s.ek=function(n){return le(AG,hen,75,n,0,1)},v(Jn,"EcorePackageImpl/32",1230),m(1231,1,ii,uC),s.dk=function(n){return X(n,164)},s.ek=function(n){return le(b7,Ae,164,n,0,1)},v(Jn,"EcorePackageImpl/33",1231),m(1232,1,ii,aw),s.dk=function(n){return X(n,15)},s.ek=function(n){return le(jr,Ae,15,n,0,1)},v(Jn,"EcorePackageImpl/34",1232),m(1233,1,ii,zs),s.dk=function(n){return X(n,298)},s.ek=function(n){return le(wme,Nn,298,n,0,1)},v(Jn,"EcorePackageImpl/35",1233),m(1234,1,ii,Wp),s.dk=function(n){return X(n,190)},s.ek=function(n){return le(sp,Ae,190,n,0,1)},v(Jn,"EcorePackageImpl/36",1234),m(1235,1,ii,Sv),s.dk=function(n){return X(n,92)},s.ek=function(n){return le(pme,Nn,92,n,0,1)},v(Jn,"EcorePackageImpl/37",1235),m(1236,1,ii,oC),s.dk=function(n){return X(n,588)},s.ek=function(n){return le(o7e,Nn,588,n,0,1)},v(Jn,"EcorePackageImpl/38",1236),m(1237,1,ii,y1),s.dk=function(n){return!1},s.ek=function(n){return le(x7e,Nn,2175,n,0,1)},v(Jn,"EcorePackageImpl/39",1237),m(1202,1,ii,X5),s.dk=function(n){return X(n,88)},s.ek=function(n){return le(vf,Nn,29,n,0,1)},v(Jn,"EcorePackageImpl/4",1202),m(1238,1,ii,V6),s.dk=function(n){return X(n,191)},s.ek=function(n){return le(lp,Ae,191,n,0,1)},v(Jn,"EcorePackageImpl/40",1238),m(1239,1,ii,Bh),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(Jn,"EcorePackageImpl/41",1239),m(1240,1,ii,sC),s.dk=function(n){return X(n,585)},s.ek=function(n){return le(F8e,Nn,585,n,0,1)},v(Jn,"EcorePackageImpl/42",1240),m(1241,1,ii,Uk),s.dk=function(n){return!1},s.ek=function(n){return le(A7e,Ae,2176,n,0,1)},v(Jn,"EcorePackageImpl/43",1241),m(1242,1,ii,DL),s.dk=function(n){return X(n,45)},s.ek=function(n){return le(yg,tF,45,n,0,1)},v(Jn,"EcorePackageImpl/44",1242),m(1203,1,ii,Xk),s.dk=function(n){return X(n,143)},s.ek=function(n){return le(Ma,Nn,143,n,0,1)},v(Jn,"EcorePackageImpl/5",1203),m(1204,1,ii,Kk),s.dk=function(n){return X(n,159)},s.ek=function(n){return le(zce,Nn,159,n,0,1)},v(Jn,"EcorePackageImpl/6",1204),m(1205,1,ii,Zp),s.dk=function(n){return X(n,459)},s.ek=function(n){return le(xG,Nn,675,n,0,1)},v(Jn,"EcorePackageImpl/7",1205),m(1206,1,ii,nf),s.dk=function(n){return X(n,568)},s.ek=function(n){return le(ed,Nn,684,n,0,1)},v(Jn,"EcorePackageImpl/8",1206),m(1207,1,ii,e2),s.dk=function(n){return X(n,469)},s.ek=function(n){return le(cA,Nn,469,n,0,1)},v(Jn,"EcorePackageImpl/9",1207),m(1019,2042,BZe,tAe),s.Ki=function(n,t){ljn(this,u(t,415))},s.Oi=function(n,t){cqe(this,n,u(t,415))},v(Jn,"MinimalEObjectImpl/1ArrayDelegatingAdapterList",1019),m(1020,151,zN,kDe),s.hj=function(){return this.a.a},v(Jn,"MinimalEObjectImpl/1ArrayDelegatingAdapterList/1",1020),m(1047,1046,{},ITe),v("org.eclipse.emf.ecore.plugin","EcorePlugin",1047);var o7e=Gi(den,"Resource");m(786,1485,ben),s.Fl=function(n){},s.Gl=function(n){},s.Cl=function(){return!this.a&&(this.a=new dX(this)),this.a},s.Dl=function(n){var t,i,r,c,o;if(r=n.length,r>0)if(Wn(0,n.length),n.charCodeAt(0)==47){for(o=new xo(4),c=1,t=1;t0&&(n=(Qr(0,i,n.length),n.substr(0,i))));return vTn(this,n)},s.El=function(){return this.c},s.Ib=function(){var n;return Pb(this.Pm)+"@"+(n=Ni(this)>>>0,n.toString(16))+" uri='"+this.d+"'"},s.b=!1,v(Pne,"ResourceImpl",786),m(1486,786,ben,GSe),v(Pne,"BinaryResourceImpl",1486),m(1159,697,One),s._i=function(n){return X(n,57)?Y5n(this,u(n,57)):X(n,588)?new st(u(n,588).Cl()):ue(n)===ue(this.f)?u(n,18).Jc():(A9(),tD.a)},s.Ob=function(){return Z0e(this)},s.a=!1,v(Ri,"EcoreUtil/ContentTreeIterator",1159),m(1487,1159,One,QIe),s._i=function(n){return ue(n)===ue(this.f)?u(n,16).Jc():new WLe(u(n,57))},v(Pne,"ResourceImpl/5",1487),m(647,2054,ten,dX),s.Gc=function(n){return this.i<=4?y8(this,n):X(n,52)&&u(n,52).Gh()==this.a},s.Ki=function(n,t){n==this.i-1&&(this.a.b||(this.a.b=!0))},s.Mi=function(n,t){n==0?this.a.b||(this.a.b=!0):gY(this,n,t)},s.Oi=function(n,t){},s.Pi=function(n,t,i){},s.Jj=function(){return 2},s.hj=function(){return this.a},s.Kj=function(){return!0},s.Lj=function(n,t){var i;return i=u(n,52),t=i.ci(this.a,t),t},s.Mj=function(n,t){var i;return i=u(n,52),i.ci(null,t)},s.Nj=function(){return!1},s.Qi=function(){return!0},s.$i=function(n){return le(vb,Nn,57,n,0,1)},s.Wi=function(){return!1},v(Pne,"ResourceImpl/ContentsEList",647),m(953,2024,B8,qSe),s.dd=function(n){return this.a.Ii(n)},s.gc=function(){return this.a.gc()},v(Ri,"AbstractSequentialInternalEList/1",953);var s7e,l7e,nc,f7e;m(625,1,{},eIe);var MG,CG;v(Ri,"BasicExtendedMetaData",625),m(1150,1,{},WCe),s.Hl=function(){return null},s.Il=function(){return this.a==-2&&qC(this,xMn(this.d,this.b)),this.a},s.Jl=function(){return null},s.Kl=function(){return En(),En(),Sc},s.ve=function(){return this.c==f7&&oX(this,MJe(this.d,this.b)),this.c},s.Ll=function(){return 0},s.a=-2,s.c=f7,v(Ri,"BasicExtendedMetaData/EClassExtendedMetaDataImpl",1150),m(1151,1,{},TLe),s.Hl=function(){return this.a==(J9(),MG)&&TP(this,lDn(this.f,this.b)),this.a},s.Il=function(){return 0},s.Jl=function(){return this.c==(J9(),MG)&&u9(this,fDn(this.f,this.b)),this.c},s.Kl=function(){return!this.d&&lX(this,X_n(this.f,this.b)),this.d},s.ve=function(){return this.e==f7&&XC(this,MJe(this.f,this.b)),this.e},s.Ll=function(){return this.g==-2&&d(this,UAn(this.f,this.b)),this.g},s.e=f7,s.g=-2,v(Ri,"BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl",1151),m(1149,1,{},ZCe),s.b=!1,s.c=!1,v(Ri,"BasicExtendedMetaData/EPackageExtendedMetaDataImpl",1149),m(1152,1,{},OLe),s.c=-2,s.e=f7,s.f=f7,v(Ri,"BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl",1152),m(581,623,au,nR),s.Jj=function(){return this.c},s.ml=function(){return!1},s.Ui=function(n,t){return t},s.c=0,v(Ri,"EDataTypeEList",581);var a7e=Gi(Ri,"FeatureMap");m(76,581,{3:1,4:1,20:1,31:1,56:1,18:1,16:1,59:1,71:1,67:1,61:1,77:1,163:1,219:1,1998:1,72:1,98:1},tr),s._c=function(n,t){ONn(this,n,u(t,75))},s.Ec=function(n){return XOn(this,u(n,75))},s.Fi=function(n){q3n(this,u(n,75))},s.Lj=function(n,t){return j2n(this,u(n,75),t)},s.Mj=function(n,t){return qle(this,u(n,75),t)},s.Ri=function(n,t){return e_n(this,n,t)},s.Ui=function(n,t){return JPn(this,n,u(t,75))},s.fd=function(n,t){return gIn(this,n,u(t,75))},s.Sj=function(n,t){return E2n(this,u(n,75),t)},s.Tj=function(n,t){return MNe(this,u(n,75),t)},s.Uj=function(n,t,i){return LAn(this,u(n,75),u(t,75),i)},s.Xi=function(n,t){return oW(this,n,u(t,75))},s.Ml=function(n,t){return Xbe(this,n,t)},s.ad=function(n,t){var i,r,c,o,l,f,h,b,p;for(b=new _w(t.gc()),c=t.Jc();c.Ob();)if(r=u(c.Pb(),75),o=r.Jk(),J1(this.e,o))(!o.Qi()||!qR(this,o,r.kd())&&!y8(b,r))&&Et(b,r);else{for(p=Po(this.e.Ah(),o),i=u(this.g,122),l=!0,f=0;f=0;)if(t=n[this.c],this.k.$l(t.Jk()))return this.j=this.f?t:t.kd(),this.i=-2,!0;return this.i=-1,this.g=-1,!1},v(Ri,"BasicFeatureMap/FeatureEIterator",412),m(666,412,Wh,SK),s.sl=function(){return!0},v(Ri,"BasicFeatureMap/ResolvingFeatureEIterator",666),m(951,482,YF,UTe),s.nj=function(){return this},v(Ri,"EContentsEList/1",951),m(952,482,YF,pTe),s.sl=function(){return!1},v(Ri,"EContentsEList/2",952),m(950,287,QF,XTe),s.ul=function(n){},s.Ob=function(){return!1},s.Sb=function(){return!1},v(Ri,"EContentsEList/FeatureIteratorImpl/1",950),m(824,581,au,Zse),s.Li=function(){this.a=!0},s.Oj=function(){return this.a},s.Ek=function(){var n;kt(this),Fs(this.e)?(n=this.a,this.a=!1,hi(this.e,new Lf(this.e,2,this.c,n,!1))):this.a=!1},s.a=!1,v(Ri,"EDataTypeEList/Unsettable",824),m(1920,581,au,ZTe),s.Qi=function(){return!0},v(Ri,"EDataTypeUniqueEList",1920),m(1921,824,au,eOe),s.Qi=function(){return!0},v(Ri,"EDataTypeUniqueEList/Unsettable",1921),m(145,81,au,rs),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectContainmentEList/Resolving",145),m(1153,543,au,WTe),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectContainmentEList/Unsettable/Resolving",1153),m(753,14,au,Rle),s.Li=function(){this.a=!0},s.Oj=function(){return this.a},s.Ek=function(){var n;kt(this),Fs(this.e)?(n=this.a,this.a=!1,hi(this.e,new Lf(this.e,2,this.c,n,!1))):this.a=!1},s.a=!1,v(Ri,"EObjectContainmentWithInverseEList/Unsettable",753),m(1187,753,au,bNe),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectContainmentWithInverseEList/Unsettable/Resolving",1187),m(745,491,au,Wse),s.Li=function(){this.a=!0},s.Oj=function(){return this.a},s.Ek=function(){var n;kt(this),Fs(this.e)?(n=this.a,this.a=!1,hi(this.e,new Lf(this.e,2,this.c,n,!1))):this.a=!1},s.a=!1,v(Ri,"EObjectEList/Unsettable",745),m(339,491,au,Jv),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectResolvingEList",339),m(1825,745,au,nOe),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectResolvingEList/Unsettable",1825),m(1488,1,{},K5);var nhn;v(Ri,"EObjectValidator",1488),m(547,491,au,yR),s.gl=function(){return this.d},s.hl=function(){return this.b},s.Kj=function(){return!0},s.kl=function(){return!0},s.b=0,v(Ri,"EObjectWithInverseEList",547),m(1190,547,au,gNe),s.jl=function(){return!0},v(Ri,"EObjectWithInverseEList/ManyInverse",1190),m(626,547,au,qK),s.Li=function(){this.a=!0},s.Oj=function(){return this.a},s.Ek=function(){var n;kt(this),Fs(this.e)?(n=this.a,this.a=!1,hi(this.e,new Lf(this.e,2,this.c,n,!1))):this.a=!1},s.a=!1,v(Ri,"EObjectWithInverseEList/Unsettable",626),m(1189,626,au,wNe),s.jl=function(){return!0},v(Ri,"EObjectWithInverseEList/Unsettable/ManyInverse",1189),m(754,547,au,Ble),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectWithInverseResolvingEList",754),m(33,754,au,In),s.jl=function(){return!0},v(Ri,"EObjectWithInverseResolvingEList/ManyInverse",33),m(755,626,au,zle),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectWithInverseResolvingEList/Unsettable",755),m(1188,755,au,pNe),s.jl=function(){return!0},v(Ri,"EObjectWithInverseResolvingEList/Unsettable/ManyInverse",1188),m(1154,623,au),s.Ji=function(){return(this.b&1792)==0},s.Li=function(){this.b|=1},s.il=function(){return(this.b&4)!=0},s.Kj=function(){return(this.b&40)!=0},s.jl=function(){return(this.b&16)!=0},s.kl=function(){return(this.b&8)!=0},s.ll=function(){return(this.b&V0)!=0},s.$k=function(){return(this.b&32)!=0},s.ml=function(){return(this.b&Gf)!=0},s.dk=function(n){return this.d?cPe(this.d,n):this.Jk().Fk().dk(n)},s.Oj=function(){return(this.b&2)!=0?(this.b&1)!=0:this.i!=0},s.Qi=function(){return(this.b&128)!=0},s.Ek=function(){var n;kt(this),(this.b&2)!=0&&(Fs(this.e)?(n=(this.b&1)!=0,this.b&=-2,f9(this,new Lf(this.e,2,Ji(this.e.Ah(),this.Jk()),n,!1))):this.b&=-2)},s.Wi=function(){return(this.b&1536)==0},s.b=0,v(Ri,"EcoreEList/Generic",1154),m(1155,1154,au,f_e),s.Jk=function(){return this.a},v(Ri,"EcoreEList/Dynamic",1155),m(752,67,Th,uoe),s.$i=function(n){return dO(this.a.a,n)},v(Ri,"EcoreEMap/1",752),m(751,81,au,Lfe),s.Ki=function(n,t){az(this.b,u(t,136))},s.Mi=function(n,t){aze(this.b)},s.Ni=function(n,t,i){var r;++(r=this.b,u(t,136),r).e},s.Oi=function(n,t){wQ(this.b,u(t,136))},s.Pi=function(n,t,i){wQ(this.b,u(i,136)),ue(i)===ue(t)&&u(i,136).zi(ywn(u(t,136).jd())),az(this.b,u(t,136))},v(Ri,"EcoreEMap/DelegateEObjectContainmentEList",751),m(1185,142,tme,jBe),v(Ri,"EcoreEMap/Unsettable",1185),m(1186,751,au,mNe),s.Li=function(){this.a=!0},s.Oj=function(){return this.a},s.Ek=function(){var n;kt(this),Fs(this.e)?(n=this.a,this.a=!1,hi(this.e,new Lf(this.e,2,this.c,n,!1))):this.a=!1},s.a=!1,v(Ri,"EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList",1186),m(1158,223,v3,dDe),s.a=!1,s.b=!1,v(Ri,"EcoreUtil/Copier",1158),m(747,1,Fr,WLe),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return hJe(this)},s.Pb=function(){var n;return hJe(this),n=this.b,this.b=null,n},s.Qb=function(){this.a.Qb()},v(Ri,"EcoreUtil/ProperContentIterator",747),m(1489,1488,{},FU);var thn;v(Ri,"EcoreValidator",1489);var ihn;Gi(Ri,"FeatureMapUtil/Validator"),m(1258,1,{2003:1},hw),s.$l=function(n){return!0},v(Ri,"FeatureMapUtil/1",1258),m(760,1,{2003:1},Age),s.$l=function(n){var t;return this.c==n?!0:(t=ze(zn(this.a,n)),t==null?gDn(this,n)?(XPe(this.a,n,($n(),d7)),!0):(XPe(this.a,n,($n(),ib)),!1):t==($n(),d7))},s.e=!1;var Gce;v(Ri,"FeatureMapUtil/BasicValidator",760),m(761,44,v3,Vse),v(Ri,"FeatureMapUtil/BasicValidator/Cache",761),m(495,56,{20:1,31:1,56:1,18:1,16:1,61:1,77:1,72:1,98:1},vT),s._c=function(n,t){eXe(this.c,this.b,n,t)},s.Ec=function(n){return Xbe(this.c,this.b,n)},s.ad=function(n,t){return _Ln(this.c,this.b,n,t)},s.Fc=function(n){return Yj(this,n)},s.Ei=function(n,t){y8n(this.c,this.b,n,t)},s.Uk=function(n,t){return Bbe(this.c,this.b,n,t)},s.Yi=function(n){return Kz(this.c,this.b,n,!1)},s.Gi=function(){return ATe(this.c,this.b)},s.Hi=function(){return hwn(this.c,this.b)},s.Ii=function(n){return j9n(this.c,this.b,n)},s.Vk=function(n,t){return QOe(this,n,t)},s.$b=function(){u4(this)},s.Gc=function(n){return qR(this.c,this.b,n)},s.Hc=function(n){return k7n(this.c,this.b,n)},s.Xb=function(n){return Kz(this.c,this.b,n,!0)},s.Dk=function(n){return this},s.bd=function(n){return I6n(this.c,this.b,n)},s.dc=function(){return T$(this)},s.Oj=function(){return!IO(this.c,this.b)},s.Jc=function(){return r8n(this.c,this.b)},s.cd=function(){return c8n(this.c,this.b)},s.dd=function(n){return Ajn(this.c,this.b,n)},s.Ri=function(n,t){return pKe(this.c,this.b,n,t)},s.Si=function(n,t){A9n(this.c,this.b,n,t)},s.ed=function(n){return GGe(this.c,this.b,n)},s.Kc=function(n){return BDn(this.c,this.b,n)},s.fd=function(n,t){return AKe(this.c,this.b,n,t)},s.Wb=function(n){Tz(this.c,this.b),Yj(this,u(n,16))},s.gc=function(){return Mjn(this.c,this.b)},s.Nc=function(){return Dyn(this.c,this.b)},s.Oc=function(n){return D6n(this.c,this.b,n)},s.Ib=function(){var n,t;for(t=new vd,t.a+="[",n=ATe(this.c,this.b);uQ(n);)Bc(t,Wj(lz(n))),uQ(n)&&(t.a+=To);return t.a+="]",t.a},s.Ek=function(){Tz(this.c,this.b)},v(Ri,"FeatureMapUtil/FeatureEList",495),m(634,39,zN,cY),s.fj=function(n){return $E(this,n)},s.kj=function(n){var t,i,r,c,o,l,f;switch(this.d){case 1:case 2:{if(o=n.hj(),ue(o)===ue(this.c)&&$E(this,null)==n.fj(null))return this.g=n.gj(),n.ej()==1&&(this.d=1),!0;break}case 3:{switch(c=n.ej(),c){case 3:{if(o=n.hj(),ue(o)===ue(this.c)&&$E(this,null)==n.fj(null))return this.d=5,t=new _w(2),Et(t,this.g),Et(t,n.gj()),this.g=t,!0;break}}break}case 5:{switch(c=n.ej(),c){case 3:{if(o=n.hj(),ue(o)===ue(this.c)&&$E(this,null)==n.fj(null))return i=u(this.g,18),i.Ec(n.gj()),!0;break}}break}case 4:{switch(c=n.ej(),c){case 3:{if(o=n.hj(),ue(o)===ue(this.c)&&$E(this,null)==n.fj(null))return this.d=1,this.g=n.gj(),!0;break}case 4:{if(o=n.hj(),ue(o)===ue(this.c)&&$E(this,null)==n.fj(null))return this.d=6,f=new _w(2),Et(f,this.n),Et(f,n.ij()),this.n=f,l=F(z($t,1),ni,30,15,[this.o,n.jj()]),this.g=l,!0;break}}break}case 6:{switch(c=n.ej(),c){case 4:{if(o=n.hj(),ue(o)===ue(this.c)&&$E(this,null)==n.fj(null))return i=u(this.n,18),i.Ec(n.ij()),l=u(this.g,54),r=le($t,ni,30,l.length+1,15,1),Wu(l,0,r,0,l.length),r[l.length]=n.jj(),this.g=r,!0;break}}break}}return!1},v(Ri,"FeatureMapUtil/FeatureENotificationImpl",634),m(553,495,{20:1,31:1,56:1,18:1,16:1,61:1,77:1,163:1,219:1,1998:1,72:1,98:1},uR),s.Ml=function(n,t){return Xbe(this.c,n,t)},s.Nl=function(n,t,i){return Bbe(this.c,n,t,i)},s.Ol=function(n,t,i){return bge(this.c,n,t,i)},s.Pl=function(){return this},s.Ql=function(n,t){return cN(this.c,n,t)},s.Rl=function(n){return u(Kz(this.c,this.b,n,!1),75).Jk()},s.Sl=function(n){return u(Kz(this.c,this.b,n,!1),75).kd()},s.Tl=function(){return this.a},s.Ul=function(n){return!IO(this.c,n)},s.Vl=function(n,t){Vz(this.c,n,t)},s.Wl=function(n){return OBe(this.c,n)},s.Xl=function(n){aHe(this.c,n)},v(Ri,"FeatureMapUtil/FeatureFeatureMap",553),m(1257,1,Lne,tTe),s.Dk=function(n){return Kz(this.b,this.a,-1,n)},s.Oj=function(){return!IO(this.b,this.a)},s.Wb=function(n){Vz(this.b,this.a,n)},s.Ek=function(){Tz(this.b,this.a)},v(Ri,"FeatureMapUtil/FeatureValue",1257);var Wy,qce,Uce,Zy,rhn,rD=Gi(cJ,"AnyType");m(670,63,H1,TX),v(cJ,"InvalidDatatypeValueException",670);var TG=Gi(cJ,wen),cD=Gi(cJ,pen),h7e=Gi(cJ,men),chn,Bu,d7e,Pg,uhn,ohn,shn,lhn,fhn,ahn,hhn,dhn,bhn,ghn,whn,r5,phn,c5,fA,mhn,xp,uD,oD,vhn,aA,hA;m(828,501,{109:1,94:1,93:1,57:1,52:1,100:1,841:1},koe),s.Ih=function(n,t,i){switch(n){case 0:return i?(!this.c&&(this.c=new tr(this,0)),this.c):(!this.c&&(this.c=new tr(this,0)),this.c.b);case 1:return i?(!this.c&&(this.c=new tr(this,0)),u(fo(this.c,(Si(),Pg)),163)):(!this.c&&(this.c=new tr(this,0)),u(u(fo(this.c,(Si(),Pg)),163),219)).Tl();case 2:return i?(!this.b&&(this.b=new tr(this,2)),this.b):(!this.b&&(this.b=new tr(this,2)),this.b.b)}return Pl(this,n-dt(this.fi()),Cn((this.j&2)==0?this.fi():(!this.k&&(this.k=new nl),this.k).Lk(),n),t,i)},s.Rh=function(n,t,i){var r;switch(t){case 0:return!this.c&&(this.c=new tr(this,0)),tN(this.c,n,i);case 1:return(!this.c&&(this.c=new tr(this,0)),u(u(fo(this.c,(Si(),Pg)),163),72)).Vk(n,i);case 2:return!this.b&&(this.b=new tr(this,2)),tN(this.b,n,i)}return r=u(Cn((this.j&2)==0?this.fi():(!this.k&&(this.k=new nl),this.k).Lk(),t),69),r.uk().yk(this,khe(this),t-dt(this.fi()),n,i)},s.Th=function(n){switch(n){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new tr(this,0)),u(fo(this.c,(Si(),Pg)),163)).dc();case 2:return!!this.b&&this.b.i!=0}return Ll(this,n-dt(this.fi()),Cn((this.j&2)==0?this.fi():(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.$h=function(n,t){switch(n){case 0:!this.c&&(this.c=new tr(this,0)),BT(this.c,t);return;case 1:(!this.c&&(this.c=new tr(this,0)),u(u(fo(this.c,(Si(),Pg)),163),219)).Wb(t);return;case 2:!this.b&&(this.b=new tr(this,2)),BT(this.b,t);return}Jl(this,n-dt(this.fi()),Cn((this.j&2)==0?this.fi():(!this.k&&(this.k=new nl),this.k).Lk(),n),t)},s.fi=function(){return Si(),d7e},s.hi=function(n){switch(n){case 0:!this.c&&(this.c=new tr(this,0)),kt(this.c);return;case 1:(!this.c&&(this.c=new tr(this,0)),u(fo(this.c,(Si(),Pg)),163)).$b();return;case 2:!this.b&&(this.b=new tr(this,2)),kt(this.b);return}Fl(this,n-dt(this.fi()),Cn((this.j&2)==0?this.fi():(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.Ib=function(){var n;return(this.j&4)!=0?Ff(this):(n=new cf(Ff(this)),n.a+=" (mixed: ",Uj(n,this.c),n.a+=", anyAttribute: ",Uj(n,this.b),n.a+=")",n.a)},v(kr,"AnyTypeImpl",828),m(671,501,{109:1,94:1,93:1,57:1,52:1,100:1,2081:1,671:1},pU),s.Ih=function(n,t,i){switch(n){case 0:return this.a;case 1:return this.b}return Pl(this,n-dt((Si(),r5)),Cn((this.j&2)==0?r5:(!this.k&&(this.k=new nl),this.k).Lk(),n),t,i)},s.Th=function(n){switch(n){case 0:return this.a!=null;case 1:return this.b!=null}return Ll(this,n-dt((Si(),r5)),Cn((this.j&2)==0?r5:(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.$h=function(n,t){switch(n){case 0:T(this,Pt(t));return;case 1:Q(this,Pt(t));return}Jl(this,n-dt((Si(),r5)),Cn((this.j&2)==0?r5:(!this.k&&(this.k=new nl),this.k).Lk(),n),t)},s.fi=function(){return Si(),r5},s.hi=function(n){switch(n){case 0:this.a=null;return;case 1:this.b=null;return}Fl(this,n-dt((Si(),r5)),Cn((this.j&2)==0?r5:(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.Ib=function(){var n;return(this.j&4)!=0?Ff(this):(n=new cf(Ff(this)),n.a+=" (data: ",Bc(n,this.a),n.a+=", target: ",Bc(n,this.b),n.a+=")",n.a)},s.a=null,s.b=null,v(kr,"ProcessingInstructionImpl",671),m(672,828,{109:1,94:1,93:1,57:1,52:1,100:1,841:1,2082:1,672:1},Dxe),s.Ih=function(n,t,i){switch(n){case 0:return i?(!this.c&&(this.c=new tr(this,0)),this.c):(!this.c&&(this.c=new tr(this,0)),this.c.b);case 1:return i?(!this.c&&(this.c=new tr(this,0)),u(fo(this.c,(Si(),Pg)),163)):(!this.c&&(this.c=new tr(this,0)),u(u(fo(this.c,(Si(),Pg)),163),219)).Tl();case 2:return i?(!this.b&&(this.b=new tr(this,2)),this.b):(!this.b&&(this.b=new tr(this,2)),this.b.b);case 3:return!this.c&&(this.c=new tr(this,0)),Pt(cN(this.c,(Si(),fA),!0));case 4:return Jle(this.a,(!this.c&&(this.c=new tr(this,0)),Pt(cN(this.c,(Si(),fA),!0))));case 5:return this.a}return Pl(this,n-dt((Si(),c5)),Cn((this.j&2)==0?c5:(!this.k&&(this.k=new nl),this.k).Lk(),n),t,i)},s.Th=function(n){switch(n){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new tr(this,0)),u(fo(this.c,(Si(),Pg)),163)).dc();case 2:return!!this.b&&this.b.i!=0;case 3:return!this.c&&(this.c=new tr(this,0)),Pt(cN(this.c,(Si(),fA),!0))!=null;case 4:return Jle(this.a,(!this.c&&(this.c=new tr(this,0)),Pt(cN(this.c,(Si(),fA),!0))))!=null;case 5:return!!this.a}return Ll(this,n-dt((Si(),c5)),Cn((this.j&2)==0?c5:(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.$h=function(n,t){switch(n){case 0:!this.c&&(this.c=new tr(this,0)),BT(this.c,t);return;case 1:(!this.c&&(this.c=new tr(this,0)),u(u(fo(this.c,(Si(),Pg)),163),219)).Wb(t);return;case 2:!this.b&&(this.b=new tr(this,2)),BT(this.b,t);return;case 3:Tae(this,Pt(t));return;case 4:Tae(this,Fle(this.a,t));return;case 5:I(this,u(t,159));return}Jl(this,n-dt((Si(),c5)),Cn((this.j&2)==0?c5:(!this.k&&(this.k=new nl),this.k).Lk(),n),t)},s.fi=function(){return Si(),c5},s.hi=function(n){switch(n){case 0:!this.c&&(this.c=new tr(this,0)),kt(this.c);return;case 1:(!this.c&&(this.c=new tr(this,0)),u(fo(this.c,(Si(),Pg)),163)).$b();return;case 2:!this.b&&(this.b=new tr(this,2)),kt(this.b);return;case 3:!this.c&&(this.c=new tr(this,0)),Vz(this.c,(Si(),fA),null);return;case 4:Tae(this,Fle(this.a,null));return;case 5:this.a=null;return}Fl(this,n-dt((Si(),c5)),Cn((this.j&2)==0?c5:(!this.k&&(this.k=new nl),this.k).Lk(),n))},v(kr,"SimpleAnyTypeImpl",672),m(673,501,{109:1,94:1,93:1,57:1,52:1,100:1,2083:1,673:1},_xe),s.Ih=function(n,t,i){switch(n){case 0:return i?(!this.a&&(this.a=new tr(this,0)),this.a):(!this.a&&(this.a=new tr(this,0)),this.a.b);case 1:return i?(!this.b&&(this.b=new os((jn(),Ac),Du,this,1)),this.b):(!this.b&&(this.b=new os((jn(),Ac),Du,this,1)),nO(this.b));case 2:return i?(!this.c&&(this.c=new os((jn(),Ac),Du,this,2)),this.c):(!this.c&&(this.c=new os((jn(),Ac),Du,this,2)),nO(this.c));case 3:return!this.a&&(this.a=new tr(this,0)),fo(this.a,(Si(),uD));case 4:return!this.a&&(this.a=new tr(this,0)),fo(this.a,(Si(),oD));case 5:return!this.a&&(this.a=new tr(this,0)),fo(this.a,(Si(),aA));case 6:return!this.a&&(this.a=new tr(this,0)),fo(this.a,(Si(),hA))}return Pl(this,n-dt((Si(),xp)),Cn((this.j&2)==0?xp:(!this.k&&(this.k=new nl),this.k).Lk(),n),t,i)},s.Rh=function(n,t,i){var r;switch(t){case 0:return!this.a&&(this.a=new tr(this,0)),tN(this.a,n,i);case 1:return!this.b&&(this.b=new os((jn(),Ac),Du,this,1)),K$(this.b,n,i);case 2:return!this.c&&(this.c=new os((jn(),Ac),Du,this,2)),K$(this.c,n,i);case 5:return!this.a&&(this.a=new tr(this,0)),QOe(fo(this.a,(Si(),aA)),n,i)}return r=u(Cn((this.j&2)==0?(Si(),xp):(!this.k&&(this.k=new nl),this.k).Lk(),t),69),r.uk().yk(this,khe(this),t-dt((Si(),xp)),n,i)},s.Th=function(n){switch(n){case 0:return!!this.a&&this.a.i!=0;case 1:return!!this.b&&this.b.f!=0;case 2:return!!this.c&&this.c.f!=0;case 3:return!this.a&&(this.a=new tr(this,0)),!T$(fo(this.a,(Si(),uD)));case 4:return!this.a&&(this.a=new tr(this,0)),!T$(fo(this.a,(Si(),oD)));case 5:return!this.a&&(this.a=new tr(this,0)),!T$(fo(this.a,(Si(),aA)));case 6:return!this.a&&(this.a=new tr(this,0)),!T$(fo(this.a,(Si(),hA)))}return Ll(this,n-dt((Si(),xp)),Cn((this.j&2)==0?xp:(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.$h=function(n,t){switch(n){case 0:!this.a&&(this.a=new tr(this,0)),BT(this.a,t);return;case 1:!this.b&&(this.b=new os((jn(),Ac),Du,this,1)),NB(this.b,t);return;case 2:!this.c&&(this.c=new os((jn(),Ac),Du,this,2)),NB(this.c,t);return;case 3:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),uD))),!this.a&&(this.a=new tr(this,0)),Yj(fo(this.a,uD),u(t,18));return;case 4:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),oD))),!this.a&&(this.a=new tr(this,0)),Yj(fo(this.a,oD),u(t,18));return;case 5:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),aA))),!this.a&&(this.a=new tr(this,0)),Yj(fo(this.a,aA),u(t,18));return;case 6:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),hA))),!this.a&&(this.a=new tr(this,0)),Yj(fo(this.a,hA),u(t,18));return}Jl(this,n-dt((Si(),xp)),Cn((this.j&2)==0?xp:(!this.k&&(this.k=new nl),this.k).Lk(),n),t)},s.fi=function(){return Si(),xp},s.hi=function(n){switch(n){case 0:!this.a&&(this.a=new tr(this,0)),kt(this.a);return;case 1:!this.b&&(this.b=new os((jn(),Ac),Du,this,1)),this.b.c.$b();return;case 2:!this.c&&(this.c=new os((jn(),Ac),Du,this,2)),this.c.c.$b();return;case 3:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),uD)));return;case 4:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),oD)));return;case 5:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),aA)));return;case 6:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),hA)));return}Fl(this,n-dt((Si(),xp)),Cn((this.j&2)==0?xp:(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.Ib=function(){var n;return(this.j&4)!=0?Ff(this):(n=new cf(Ff(this)),n.a+=" (mixed: ",Uj(n,this.a),n.a+=")",n.a)},v(kr,"XMLTypeDocumentRootImpl",673),m(1990,710,{109:1,94:1,93:1,469:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1,2084:1},lC),s.oi=function(n,t){switch(n.fk()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return t==null?null:fu(t);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return Pt(t);case 6:return Fpn(u(t,195));case 12:case 47:case 49:case 11:return fVe(this,n,t);case 13:return t==null?null:zLn(u(t,247));case 15:case 14:return t==null?null:L3n(ne(re(t)));case 17:return eGe((Si(),t));case 18:return eGe(t);case 21:case 20:return t==null?null:P3n(u(t,164).a);case 27:return zpn(u(t,195));case 30:return hHe((Si(),u(t,16)));case 31:return hHe(u(t,16));case 40:return Bpn((Si(),t));case 42:return nGe((Si(),t));case 43:return nGe(t);case 59:case 48:return Rpn((Si(),t));default:throw R(new Un(u7+n.ve()+up))}},s.pi=function(n){var t,i,r,c,o;switch(n.G==-1&&(n.G=(i=ol(n),i?$d(i.si(),n):-1)),n.G){case 0:return t=new koe,t;case 1:return r=new pU,r;case 2:return c=new Dxe,c;case 3:return o=new _xe,o;default:throw R(new Un(vne+n.zb+up))}},s.qi=function(n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q;switch(n.fk()){case 5:case 52:case 4:return t;case 6:return rSn(t);case 8:case 7:return t==null?null:JAn(t);case 9:return t==null?null:fO(al((r=bo(t,!0),r.length>0&&(Wn(0,r.length),r.charCodeAt(0)==43)?(Wn(1,r.length+1),r.substr(1)):r),-128,127)<<24>>24);case 10:return t==null?null:fO(al((c=bo(t,!0),c.length>0&&(Wn(0,c.length),c.charCodeAt(0)==43)?(Wn(1,c.length+1),c.substr(1)):c),-128,127)<<24>>24);case 11:return Pt(Qw(this,(Si(),shn),t));case 12:return Pt(Qw(this,(Si(),lhn),t));case 13:return t==null?null:new Joe(bo(t,!0));case 15:case 14:return YOn(t);case 16:return Pt(Qw(this,(Si(),fhn),t));case 17:return bJe((Si(),t));case 18:return bJe(t);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return bo(t,!0);case 21:case 20:return uNn(t);case 22:return Pt(Qw(this,(Si(),ahn),t));case 23:return Pt(Qw(this,(Si(),hhn),t));case 24:return Pt(Qw(this,(Si(),dhn),t));case 25:return Pt(Qw(this,(Si(),bhn),t));case 26:return Pt(Qw(this,(Si(),ghn),t));case 27:return VEn(t);case 30:return gJe((Si(),t));case 31:return gJe(t);case 32:return t==null?null:ve(al((p=bo(t,!0),p.length>0&&(Wn(0,p.length),p.charCodeAt(0)==43)?(Wn(1,p.length+1),p.substr(1)):p),Xr,oi));case 33:return t==null?null:new A0((y=bo(t,!0),y.length>0&&(Wn(0,y.length),y.charCodeAt(0)==43)?(Wn(1,y.length+1),y.substr(1)):y));case 34:return t==null?null:ve(al((S=bo(t,!0),S.length>0&&(Wn(0,S.length),S.charCodeAt(0)==43)?(Wn(1,S.length+1),S.substr(1)):S),Xr,oi));case 36:return t==null?null:q2(Zz((A=bo(t,!0),A.length>0&&(Wn(0,A.length),A.charCodeAt(0)==43)?(Wn(1,A.length+1),A.substr(1)):A)));case 37:return t==null?null:q2(Zz((O=bo(t,!0),O.length>0&&(Wn(0,O.length),O.charCodeAt(0)==43)?(Wn(1,O.length+1),O.substr(1)):O)));case 40:return qSn((Si(),t));case 42:return wJe((Si(),t));case 43:return wJe(t);case 44:return t==null?null:new A0((D=bo(t,!0),D.length>0&&(Wn(0,D.length),D.charCodeAt(0)==43)?(Wn(1,D.length+1),D.substr(1)):D));case 45:return t==null?null:new A0((B=bo(t,!0),B.length>0&&(Wn(0,B.length),B.charCodeAt(0)==43)?(Wn(1,B.length+1),B.substr(1)):B));case 46:return bo(t,!1);case 47:return Pt(Qw(this,(Si(),whn),t));case 59:case 48:return GSn((Si(),t));case 49:return Pt(Qw(this,(Si(),phn),t));case 50:return t==null?null:o8(al((q=bo(t,!0),q.length>0&&(Wn(0,q.length),q.charCodeAt(0)==43)?(Wn(1,q.length+1),q.substr(1)):q),nJ,32767)<<16>>16);case 51:return t==null?null:o8(al((o=bo(t,!0),o.length>0&&(Wn(0,o.length),o.charCodeAt(0)==43)?(Wn(1,o.length+1),o.substr(1)):o),nJ,32767)<<16>>16);case 53:return Pt(Qw(this,(Si(),mhn),t));case 55:return t==null?null:o8(al((l=bo(t,!0),l.length>0&&(Wn(0,l.length),l.charCodeAt(0)==43)?(Wn(1,l.length+1),l.substr(1)):l),nJ,32767)<<16>>16);case 56:return t==null?null:o8(al((f=bo(t,!0),f.length>0&&(Wn(0,f.length),f.charCodeAt(0)==43)?(Wn(1,f.length+1),f.substr(1)):f),nJ,32767)<<16>>16);case 57:return t==null?null:q2(Zz((h=bo(t,!0),h.length>0&&(Wn(0,h.length),h.charCodeAt(0)==43)?(Wn(1,h.length+1),h.substr(1)):h)));case 58:return t==null?null:q2(Zz((b=bo(t,!0),b.length>0&&(Wn(0,b.length),b.charCodeAt(0)==43)?(Wn(1,b.length+1),b.substr(1)):b)));case 60:return t==null?null:ve(al((i=bo(t,!0),i.length>0&&(Wn(0,i.length),i.charCodeAt(0)==43)?(Wn(1,i.length+1),i.substr(1)):i),Xr,oi));case 61:return t==null?null:ve(al(bo(t,!0),Xr,oi));default:throw R(new Un(u7+n.ve()+up))}};var yhn,b7e,khn,g7e;v(kr,"XMLTypeFactoryImpl",1990),m(582,184,{109:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,52:1,100:1,161:1,184:1,117:1,118:1,680:1,2006:1,582:1},ODe),s.N=!1,s.O=!1;var jhn=!1;v(kr,"XMLTypePackageImpl",582),m(1923,1,{835:1},fC),s.Ik=function(){return rge(),Nhn},v(kr,"XMLTypePackageImpl/1",1923),m(1932,1,ii,_L),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/10",1932),m(1933,1,ii,Y6),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/11",1933),m(1934,1,ii,aC),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/12",1934),m(1935,1,ii,k1),s.dk=function(n){return g2(n)},s.ek=function(n){return le(gr,Ae,346,n,7,1)},v(kr,"XMLTypePackageImpl/13",1935),m(1936,1,ii,LL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/14",1936),m(1937,1,ii,zh),s.dk=function(n){return X(n,16)},s.ek=function(n){return le(gl,um,16,n,0,1)},v(kr,"XMLTypePackageImpl/15",1937),m(1938,1,ii,PL),s.dk=function(n){return X(n,16)},s.ek=function(n){return le(gl,um,16,n,0,1)},v(kr,"XMLTypePackageImpl/16",1938),m(1939,1,ii,$L),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/17",1939),m(1940,1,ii,n2),s.dk=function(n){return X(n,164)},s.ek=function(n){return le(b7,Ae,164,n,0,1)},v(kr,"XMLTypePackageImpl/18",1940),m(1941,1,ii,Vk),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/19",1941),m(1924,1,ii,hC),s.dk=function(n){return X(n,841)},s.ek=function(n){return le(rD,Nn,841,n,0,1)},v(kr,"XMLTypePackageImpl/2",1924),m(1942,1,ii,V5),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/20",1942),m(1943,1,ii,RL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/21",1943),m(1944,1,ii,BL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/22",1944),m(1945,1,ii,zL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/23",1945),m(1946,1,ii,FL),s.dk=function(n){return X(n,195)},s.ek=function(n){return le(ds,Ae,195,n,0,2)},v(kr,"XMLTypePackageImpl/24",1946),m(1947,1,ii,Yk),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/25",1947),m(1948,1,ii,dC),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/26",1948),m(1949,1,ii,mU),s.dk=function(n){return X(n,16)},s.ek=function(n){return le(gl,um,16,n,0,1)},v(kr,"XMLTypePackageImpl/27",1949),m(1950,1,ii,vU),s.dk=function(n){return X(n,16)},s.ek=function(n){return le(gl,um,16,n,0,1)},v(kr,"XMLTypePackageImpl/28",1950),m(1951,1,ii,yU),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/29",1951),m(1925,1,ii,JL),s.dk=function(n){return X(n,671)},s.ek=function(n){return le(TG,Nn,2081,n,0,1)},v(kr,"XMLTypePackageImpl/3",1925),m(1952,1,ii,HL),s.dk=function(n){return X(n,15)},s.ek=function(n){return le(jr,Ae,15,n,0,1)},v(kr,"XMLTypePackageImpl/30",1952),m(1953,1,ii,Y5),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/31",1953),m(1954,1,ii,Qk),s.dk=function(n){return X(n,190)},s.ek=function(n){return le(sp,Ae,190,n,0,1)},v(kr,"XMLTypePackageImpl/32",1954),m(1955,1,ii,GL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/33",1955),m(1956,1,ii,qL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/34",1956),m(1957,1,ii,UL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/35",1957),m(1958,1,ii,XL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/36",1958),m(1959,1,ii,KL),s.dk=function(n){return X(n,16)},s.ek=function(n){return le(gl,um,16,n,0,1)},v(kr,"XMLTypePackageImpl/37",1959),m(1960,1,ii,VL),s.dk=function(n){return X(n,16)},s.ek=function(n){return le(gl,um,16,n,0,1)},v(kr,"XMLTypePackageImpl/38",1960),m(1961,1,ii,Wk),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/39",1961),m(1926,1,ii,YL),s.dk=function(n){return X(n,672)},s.ek=function(n){return le(cD,Nn,2082,n,0,1)},v(kr,"XMLTypePackageImpl/4",1926),m(1962,1,ii,QL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/40",1962),m(1963,1,ii,ro),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/41",1963),m(1964,1,ii,bC),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/42",1964),m(1965,1,ii,kU),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/43",1965),m(1966,1,ii,WL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/44",1966),m(1967,1,ii,jU),s.dk=function(n){return X(n,191)},s.ek=function(n){return le(lp,Ae,191,n,0,1)},v(kr,"XMLTypePackageImpl/45",1967),m(1968,1,ii,EU),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/46",1968),m(1969,1,ii,SU),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/47",1969),m(1970,1,ii,Zk),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/48",1970),m(1971,1,ii,Q5),s.dk=function(n){return X(n,191)},s.ek=function(n){return le(lp,Ae,191,n,0,1)},v(kr,"XMLTypePackageImpl/49",1971),m(1927,1,ii,gC),s.dk=function(n){return X(n,673)},s.ek=function(n){return le(h7e,Nn,2083,n,0,1)},v(kr,"XMLTypePackageImpl/5",1927),m(1972,1,ii,ej),s.dk=function(n){return X(n,190)},s.ek=function(n){return le(sp,Ae,190,n,0,1)},v(kr,"XMLTypePackageImpl/50",1972),m(1973,1,ii,wC),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/51",1973),m(1974,1,ii,t2),s.dk=function(n){return X(n,15)},s.ek=function(n){return le(jr,Ae,15,n,0,1)},v(kr,"XMLTypePackageImpl/52",1974),m(1928,1,ii,Ib),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/6",1928),m(1929,1,ii,Q6),s.dk=function(n){return X(n,195)},s.ek=function(n){return le(ds,Ae,195,n,0,2)},v(kr,"XMLTypePackageImpl/7",1929),m(1930,1,ii,xU),s.dk=function(n){return b2(n)},s.ek=function(n){return le(Qi,Ae,473,n,8,1)},v(kr,"XMLTypePackageImpl/8",1930),m(1931,1,ii,ZL),s.dk=function(n){return X(n,221)},s.ek=function(n){return le(jy,Ae,221,n,0,1)},v(kr,"XMLTypePackageImpl/9",1931);var ch,r0,dA,OG,J;m(53,63,H1,Bt),v(Gd,"RegEx/ParseException",53),m(820,1,{},pC),s._l=function(n){return ni*16)throw R(new Bt(Ht((Lt(),TZe))));i=i*16+c}while(!0);if(this.a!=125)throw R(new Bt(Ht((Lt(),OZe))));if(i>a7)throw R(new Bt(Ht((Lt(),NZe))));n=i}else{if(c=0,this.c!=0||(c=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(i=c,fi(this),this.c!=0||(c=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));i=i*16+c,n=i}break;case 117:if(r=0,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));t=t*16+r,n=t;break;case 118:if(fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,t>a7)throw R(new Bt(Ht((Lt(),"parser.descappe.4"))));n=t;break;case 65:case 90:case 122:throw R(new Bt(Ht((Lt(),IZe))))}return n},s.bm=function(n){var t,i;switch(n){case 100:i=(this.e&32)==32?K0("Nd",!0):(ai(),NG);break;case 68:i=(this.e&32)==32?K0("Nd",!1):(ai(),k7e);break;case 119:i=(this.e&32)==32?K0("IsWord",!0):(ai(),Q7);break;case 87:i=(this.e&32)==32?K0("IsWord",!1):(ai(),E7e);break;case 115:i=(this.e&32)==32?K0("IsSpace",!0):(ai(),e6);break;case 83:i=(this.e&32)==32?K0("IsSpace",!1):(ai(),j7e);break;default:throw R(new du((t=n,Ien+t.toString(16))))}return i},s.cm=function(n){var t,i,r,c,o,l,f,h,b,p,y,S;for(this.b=1,fi(this),t=null,this.c==0&&this.a==94?(fi(this),n?p=(ai(),ai(),new cl(5)):(t=(ai(),ai(),new cl(4)),ho(t,0,a7),p=new cl(4))):p=(ai(),ai(),new cl(4)),c=!0;(S=this.c)!=1&&!(S==0&&this.a==93&&!c);){if(c=!1,i=this.a,r=!1,S==10)switch(i){case 100:case 68:case 119:case 87:case 115:case 83:tm(p,this.bm(i)),r=!0;break;case 105:case 73:case 99:case 67:i=this.sm(p,i),i<0&&(r=!0);break;case 112:case 80:if(y=Q0e(this,i),!y)throw R(new Bt(Ht((Lt(),Ine))));tm(p,y),r=!0;break;default:i=this.am()}else if(S==20){if(l=E9(this.i,58,this.d),l<0)throw R(new Bt(Ht((Lt(),Y2e))));if(f=!0,rc(this.i,this.d)==94&&(++this.d,f=!1),o=of(this.i,this.d,l),h=$$e(o,f,(this.e&512)==512),!h)throw R(new Bt(Ht((Lt(),SZe))));if(tm(p,h),r=!0,l+1>=this.j||rc(this.i,l+1)!=93)throw R(new Bt(Ht((Lt(),Y2e))));this.d=l+2}if(fi(this),!r)if(this.c!=0||this.a!=45)ho(p,i,i);else{if(fi(this),(S=this.c)==1)throw R(new Bt(Ht((Lt(),KF))));S==0&&this.a==93?(ho(p,i,i),ho(p,45,45)):(b=this.a,S==10&&(b=this.am()),fi(this),ho(p,i,b))}(this.e&Gf)==Gf&&this.c==0&&this.a==44&&fi(this)}if(this.c==1)throw R(new Bt(Ht((Lt(),KF))));return t&&(bS(t,p),p=t),h3(p),hS(p),this.b=0,fi(this),p},s.dm=function(){var n,t,i,r;for(i=this.cm(!1);(r=this.c)!=7;)if(n=this.a,r==0&&(n==45||n==38)||r==4){if(fi(this),this.c!=9)throw R(new Bt(Ht((Lt(),AZe))));if(t=this.cm(!1),r==4)tm(i,t);else if(n==45)bS(i,t);else if(n==38)uVe(i,t);else throw R(new du("ASSERT"))}else throw R(new Bt(Ht((Lt(),MZe))));return fi(this),i},s.em=function(){var n,t;return n=this.a-48,t=(ai(),ai(),new JV(12,null,n)),!this.g&&(this.g=new RP),$P(this.g,new ooe(n)),fi(this),t},s.fm=function(){return fi(this),ai(),xhn},s.gm=function(){return fi(this),ai(),Shn},s.hm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.im=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.jm=function(){return fi(this),vkn()},s.km=function(){return fi(this),ai(),Mhn},s.lm=function(){return fi(this),ai(),Thn},s.mm=function(){var n;if(this.d>=this.j||((n=rc(this.i,this.d++))&65504)!=64)throw R(new Bt(Ht((Lt(),kZe))));return fi(this),ai(),ai(),new Gh(0,n-64)},s.nm=function(){return fi(this),J_n()},s.om=function(){return fi(this),ai(),Ohn},s.pm=function(){var n;return n=(ai(),ai(),new Gh(0,105)),fi(this),n},s.qm=function(){return fi(this),ai(),Chn},s.rm=function(){return fi(this),ai(),Ahn},s.sm=function(n,t){return this.am()},s.tm=function(){return fi(this),ai(),v7e},s.um=function(){var n,t,i,r,c;if(this.d+1>=this.j)throw R(new Bt(Ht((Lt(),mZe))));if(r=-1,t=null,n=rc(this.i,this.d),49<=n&&n<=57){if(r=n-48,!this.g&&(this.g=new RP),$P(this.g,new ooe(r)),++this.d,rc(this.i,this.d)!=41)throw R(new Bt(Ht((Lt(),mg))));++this.d}else switch(n==63&&--this.d,fi(this),t=Oge(this),t.e){case 20:case 21:case 22:case 23:break;case 8:if(this.c!=7)throw R(new Bt(Ht((Lt(),mg))));break;default:throw R(new Bt(Ht((Lt(),vZe))))}if(fi(this),c=Jw(this),i=null,c.e==2){if(c.Nm()!=2)throw R(new Bt(Ht((Lt(),yZe))));i=c.Jm(1),c=c.Jm(0)}if(this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),ai(),ai(),new CRe(r,t,c,i)},s.vm=function(){return fi(this),ai(),y7e},s.wm=function(){var n;if(fi(this),n=kR(24,Jw(this)),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.xm=function(){var n;if(fi(this),n=kR(20,Jw(this)),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.ym=function(){var n;if(fi(this),n=kR(22,Jw(this)),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.zm=function(){var n,t,i,r,c;for(n=0,i=0,t=-1;this.d=this.j)throw R(new Bt(Ht((Lt(),K2e))));if(t==45){for(++this.d;this.d=this.j)throw R(new Bt(Ht((Lt(),K2e))))}if(t==58){if(++this.d,fi(this),r=gDe(Jw(this),n,i),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));fi(this)}else if(t==41)++this.d,fi(this),r=gDe(Jw(this),n,i);else throw R(new Bt(Ht((Lt(),pZe))));return r},s.Am=function(){var n;if(fi(this),n=kR(21,Jw(this)),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.Bm=function(){var n;if(fi(this),n=kR(23,Jw(this)),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.Cm=function(){var n,t;if(fi(this),n=this.f++,t=pV(Jw(this),n),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),t},s.Dm=function(){var n;if(fi(this),n=pV(Jw(this),0),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.Em=function(n){return fi(this),this.c==5?(fi(this),dR(n,(ai(),ai(),new D2(9,n)))):dR(n,(ai(),ai(),new D2(3,n)))},s.Fm=function(n){var t;return fi(this),t=(ai(),ai(),new Vj(2)),this.c==5?(fi(this),fg(t,gA),fg(t,n)):(fg(t,n),fg(t,gA)),t},s.Gm=function(n){return fi(this),this.c==5?(fi(this),ai(),ai(),new D2(9,n)):(ai(),ai(),new D2(3,n))},s.a=0,s.b=0,s.c=0,s.d=0,s.e=0,s.f=1,s.g=null,s.j=0,v(Gd,"RegEx/RegexParser",820),m(1910,820,{},Lxe),s._l=function(n){return!1},s.am=function(){return Lbe(this)},s.bm=function(n){return O8(n)},s.cm=function(n){return ZVe(this)},s.dm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.em=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.fm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.gm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.hm=function(){return fi(this),O8(67)},s.im=function(){return fi(this),O8(73)},s.jm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.km=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.lm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.mm=function(){return fi(this),O8(99)},s.nm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.om=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.pm=function(){return fi(this),O8(105)},s.qm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.rm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.sm=function(n,t){return tm(n,O8(t)),-1},s.tm=function(){return fi(this),ai(),ai(),new Gh(0,94)},s.um=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.vm=function(){return fi(this),ai(),ai(),new Gh(0,36)},s.wm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.xm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.ym=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.zm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.Am=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.Bm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.Cm=function(){var n;if(fi(this),n=pV(Jw(this),0),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.Dm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.Em=function(n){return fi(this),dR(n,(ai(),ai(),new D2(3,n)))},s.Fm=function(n){var t;return fi(this),t=(ai(),ai(),new Vj(2)),fg(t,n),fg(t,gA),t},s.Gm=function(n){return fi(this),ai(),ai(),new D2(3,n)};var u5=null,V7=null;v(Gd,"RegEx/ParserForXMLSchema",1910),m(121,1,h7,bw),s.Hm=function(n){throw R(new du("Not supported."))},s.Im=function(){return-1},s.Jm=function(n){return null},s.Km=function(){return null},s.Lm=function(n){},s.Mm=function(n){},s.Nm=function(){return 0},s.Ib=function(){return this.Om(0)},s.Om=function(n){return this.e==11?".":""},s.e=0;var w7e,Y7,bA,Ehn,p7e,Vm=null,NG,Xce=null,m7e,gA,Kce=null,v7e,y7e,k7e,j7e,E7e,Shn,e6,xhn,Ahn,Mhn,Chn,Q7,Thn,Ohn,nzn=v(Gd,"RegEx/Token",121);m(137,121,{3:1,137:1,121:1},cl),s.Om=function(n){var t,i,r;if(this.e==4)if(this==m7e)i=".";else if(this==NG)i="\\d";else if(this==Q7)i="\\w";else if(this==e6)i="\\s";else{for(r=new vd,r.a+="[",t=0;t0&&(r.a+=","),this.b[t]===this.b[t+1]?Bc(r,rN(this.b[t])):(Bc(r,rN(this.b[t])),r.a+="-",Bc(r,rN(this.b[t+1])));r.a+="]",i=r.a}else if(this==k7e)i="\\D";else if(this==E7e)i="\\W";else if(this==j7e)i="\\S";else{for(r=new vd,r.a+="[^",t=0;t0&&(r.a+=","),this.b[t]===this.b[t+1]?Bc(r,rN(this.b[t])):(Bc(r,rN(this.b[t])),r.a+="-",Bc(r,rN(this.b[t+1])));r.a+="]",i=r.a}return i},s.a=!1,s.c=!1,v(Gd,"RegEx/RangeToken",137),m(580,1,{580:1},ooe),s.a=0,v(Gd,"RegEx/RegexParser/ReferencePosition",580),m(579,1,{3:1,579:1},pMe),s.Fb=function(n){var t;return n==null||!X(n,579)?!1:(t=u(n,579),bn(this.b,t.b)&&this.a==t.a)},s.Hb=function(){return Id(this.b+"/"+Cbe(this.a))},s.Ib=function(){return this.c.Om(this.a)},s.a=0,v(Gd,"RegEx/RegularExpression",579),m(228,121,h7,Gh),s.Im=function(){return this.a},s.Om=function(n){var t,i,r;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:r="\\"+HK(this.a&yr);break;case 12:r="\\f";break;case 10:r="\\n";break;case 13:r="\\r";break;case 9:r="\\t";break;case 27:r="\\e";break;default:this.a>=Ec?(i=(t=this.a>>>0,"0"+t.toString(16)),r="\\v"+of(i,i.length-6,i.length)):r=""+HK(this.a&yr)}break;case 8:this==v7e||this==y7e?r=""+HK(this.a&yr):r="\\"+HK(this.a&yr);break;default:r=null}return r},s.a=0,v(Gd,"RegEx/Token/CharToken",228),m(322,121,h7,D2),s.Jm=function(n){return this.a},s.Lm=function(n){this.b=n},s.Mm=function(n){this.c=n},s.Nm=function(){return 1},s.Om=function(n){var t;if(this.e==3)if(this.c<0&&this.b<0)t=this.a.Om(n)+"*";else if(this.c==this.b)t=this.a.Om(n)+"{"+this.c+"}";else if(this.c>=0&&this.b>=0)t=this.a.Om(n)+"{"+this.c+","+this.b+"}";else if(this.c>=0&&this.b<0)t=this.a.Om(n)+"{"+this.c+",}";else throw R(new du("Token#toString(): CLOSURE "+this.c+To+this.b));else if(this.c<0&&this.b<0)t=this.a.Om(n)+"*?";else if(this.c==this.b)t=this.a.Om(n)+"{"+this.c+"}?";else if(this.c>=0&&this.b>=0)t=this.a.Om(n)+"{"+this.c+","+this.b+"}?";else if(this.c>=0&&this.b<0)t=this.a.Om(n)+"{"+this.c+",}?";else throw R(new du("Token#toString(): NONGREEDYCLOSURE "+this.c+To+this.b));return t},s.b=0,s.c=0,v(Gd,"RegEx/Token/ClosureToken",322),m(821,121,h7,zfe),s.Jm=function(n){return n==0?this.a:this.b},s.Nm=function(){return 2},s.Om=function(n){var t;return this.b.e==3&&this.b.Jm(0)==this.a?t=this.a.Om(n)+"+":this.b.e==9&&this.b.Jm(0)==this.a?t=this.a.Om(n)+"+?":t=this.a.Om(n)+(""+this.b.Om(n)),t},v(Gd,"RegEx/Token/ConcatToken",821),m(1908,121,h7,CRe),s.Jm=function(n){if(n==0)return this.d;if(n==1)return this.b;throw R(new du("Internal Error: "+n))},s.Nm=function(){return this.b?2:1},s.Om=function(n){var t;return this.c>0?t="(?("+this.c+")":this.a.e==8?t="(?("+this.a+")":t="(?"+this.a,this.b?t+=this.d+"|"+this.b+")":t+=this.d+")",t},s.c=0,v(Gd,"RegEx/Token/ConditionToken",1908),m(1909,121,h7,hLe),s.Jm=function(n){return this.b},s.Nm=function(){return 1},s.Om=function(n){return"(?"+(this.a==0?"":Cbe(this.a))+(this.c==0?"":Cbe(this.c))+":"+this.b.Om(n)+")"},s.a=0,s.c=0,v(Gd,"RegEx/Token/ModifierToken",1909),m(822,121,h7,Yfe),s.Jm=function(n){return this.a},s.Nm=function(){return 1},s.Om=function(n){var t;switch(t=null,this.e){case 6:this.b==0?t="(?:"+this.a.Om(n)+")":t="("+this.a.Om(n)+")";break;case 20:t="(?="+this.a.Om(n)+")";break;case 21:t="(?!"+this.a.Om(n)+")";break;case 22:t="(?<="+this.a.Om(n)+")";break;case 23:t="(?"+this.a.Om(n)+")"}return t},s.b=0,v(Gd,"RegEx/Token/ParenToken",822),m(517,121,{3:1,121:1,517:1},JV),s.Km=function(){return this.b},s.Om=function(n){return this.e==12?"\\"+this.a:POn(this.b)},s.a=0,v(Gd,"RegEx/Token/StringToken",517),m(466,121,h7,Vj),s.Hm=function(n){fg(this,n)},s.Jm=function(n){return u(Aw(this.a,n),121)},s.Nm=function(){return this.a?this.a.a.c.length:0},s.Om=function(n){var t,i,r,c,o;if(this.e==1){if(this.a.a.c.length==2)t=u(Aw(this.a,0),121),i=u(Aw(this.a,1),121),i.e==3&&i.Jm(0)==t?c=t.Om(n)+"+":i.e==9&&i.Jm(0)==t?c=t.Om(n)+"+?":c=t.Om(n)+(""+i.Om(n));else{for(o=new vd,r=0;r=this.c.b:this.a<=this.c.b},s.Sb=function(){return this.b>0},s.Tb=function(){return this.b},s.Vb=function(){return this.b-1},s.Qb=function(){throw R(new pd(Ben))},s.a=0,s.b=0,v(gme,"ExclusiveRange/RangeIterator",259);var Wl=L9(VF,"C"),$t=L9(JS,"I"),ts=L9(ly,"Z"),Ap=L9(HS,"J"),ds=L9(BS,"B"),Jr=L9(zS,"D"),Ym=L9(FS,"F"),o5=L9(GS,"S"),tzn=Gi("org.eclipse.elk.core.labels","ILabelManager"),S7e=Gi(yc,"DiagnosticChain"),x7e=Gi(den,"ResourceSet"),A7e=v(yc,"InvocationTargetException",null),Ihn=(GP(),X6n),Dhn=Dhn=AAn;G8n(wbn),u7n("permProps",[[["locale","default"],[zen,"gecko1_8"]],[["locale","default"],[zen,"safari"]]]),Dhn(null,"elk",null)}).call(this)}).call(this,typeof Lhn<"u"?Lhn:typeof self<"u"?self:typeof window<"u"?window:{})},{}],3:[function(x,M,N){function $(pe){"@babel/helpers - typeof";return $=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Pe){return typeof Pe}:function(Pe){return Pe&&typeof Symbol=="function"&&Pe.constructor===Symbol&&Pe!==Symbol.prototype?"symbol":typeof Pe},$(pe)}function k(pe,Pe,ae){return Object.defineProperty(pe,"prototype",{writable:!1}),pe}function H(pe,Pe){if(!(pe instanceof Pe))throw new TypeError("Cannot call a class as a function")}function U(pe,Pe,ae){return Pe=Z(Pe),G(pe,W()?Reflect.construct(Pe,ae||[],Z(pe).constructor):Pe.apply(pe,ae))}function G(pe,Pe){if(Pe&&($(Pe)=="object"||typeof Pe=="function"))return Pe;if(Pe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ie(pe)}function ie(pe){if(pe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return pe}function W(){try{var pe=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(W=function(){return!!pe})()}function Z(pe){return Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Pe){return Pe.__proto__||Object.getPrototypeOf(Pe)},Z(pe)}function se(pe,Pe){if(typeof Pe!="function"&&Pe!==null)throw new TypeError("Super expression must either be null or a function");pe.prototype=Object.create(Pe&&Pe.prototype,{constructor:{value:pe,writable:!0,configurable:!0}}),Object.defineProperty(pe,"prototype",{writable:!1}),Pe&&oe(pe,Pe)}function oe(pe,Pe){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ae,Ne){return ae.__proto__=Ne,ae},oe(pe,Pe)}var ee=x("./elk-api.js").default,Me=(function(pe){function Pe(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};H(this,Pe);var Ne=Object.assign({},ae),Xe=!1;try{x.resolve("web-worker"),Xe=!0}catch{}if(ae.workerUrl)if(Xe){var ln=x("web-worker");Ne.workerFactory=function(xn){return new ln(xn)}}else console.warn(`Web worker requested but 'web-worker' package not installed. Consider installing the package or pass your own 'workerFactory' to ELK's constructor. -... Falling back to non-web worker version.`);if(!Ne.workerFactory){var un=x("./elk-worker.min.js"),An=un.Worker;Ne.workerFactory=function(xn){return new An(xn)}}return U(this,$e,[Ne])}return le($e,pe),k($e)})(ee);Object.defineProperty(M.exports,"__esModule",{value:!0}),M.exports=Ce,Ce.default=Ce},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(x,M,N){var $=typeof Worker<"u"?Worker:void 0;M.exports=$},{}]},{},[3])(3)})})(K7e)),K7e.exports}var cKn=rKn();const uKn=bke(cKn);function ebn(g){if(g.detailMode==="overview")return 190;const E=Math.max(g.applicationId.length,g.modelName.length,...g.inputs.map(x=>x.name.length),...g.outputs.map(x=>x.name.length));return Math.max(310,Math.min(540,235+E*7))}const oKn=new uKn;async function sKn(g,E,x){const M={id:"root",layoutOptions:lKn(x),children:g.map(k=>({id:k.id,width:fKn(k.data),height:aKn(k.data),ports:k.data.nodeKind==="application"?[...nbn(k.data).map((H,U)=>lue(H.id,"WEST",U)),...tbn(k.data).map((H,U)=>lue(H.id,"EAST",U))]:[...(k.data.inputPortIds??[]).map((H,U)=>lue(H,"WEST",U)),...(k.data.outputPortIds??[]).map((H,U)=>lue(H,"EAST",U))],layoutOptions:{"org.eclipse.elk.portConstraints":"FIXED_ORDER"}})),edges:E.map(k=>({id:k.id,sources:[k.sourceHandle??k.source],targets:[k.targetHandle??k.target]}))},N=await oKn.layout(M),$=new Map((N.children??[]).map(k=>[k.id,{x:k.x??0,y:k.y??0}]));return g.map(k=>({...k,position:$.get(k.id)??k.position}))}function lKn(g){return{"elk.algorithm":g==="topology"?"mrtree":"layered","elk.direction":g==="topology"?"DOWN":"RIGHT","elk.spacing.nodeNode":g==="overview"?"24":g==="compact"?"32":"56","elk.layered.spacing.nodeNodeBetweenLayers":g==="overview"?"48":g==="compact"?"60":"110","elk.layered.nodePlacement.strategy":"BRANDES_KOEPF","elk.layered.crossingMinimization.semiInteractive":"true","elk.edgeRouting":"ORTHOGONAL"}}function lue(g,E,x){return{id:g,width:9,height:9,layoutOptions:{"org.eclipse.elk.port.side":E,"org.eclipse.elk.port.index":String(x)}}}function fKn(g){return g.nodeKind==="application"?ebn(g):240}function aKn(g){if(g.nodeKind!=="application")return 112;if(g.detailMode==="overview")return 108;const E=Math.max(g.inputs.length,g.outputs.length),x=Math.max(g.environmentInputs.length,g.environmentOutputs.length);return Math.max(178,142+E*27+(x>0?32+x*27:0))}function nbn(g){return[...g.inputs,...g.environmentInputs]}function tbn(g){return[...g.outputs,...g.environmentOutputs]}function hKn({data:g,selected:E}){const x=g.detailMode==="overview",M=new Set(g.requiredInputPortIds),N=new Set(g.candidatePortIds),$=new Set(g.previousTimeStepPortIds),k=new Set(g.cycleBreakInputPortIds),H=gKn(g);return L.jsxs("section",{className:`model-node application-node ${x?"overview-node":""} ${g.cyclic?"cyclic":""} ${E?"selected":""}`,"data-testid":`application-node-${g.applicationId}`,style:{width:ebn(g)},children:[x&&L.jsx(bKn,{inputs:nbn(g),outputs:tbn(g)}),L.jsxs("header",{className:"node-header",children:[L.jsxs("div",{children:[L.jsx("div",{className:"process",children:g.name||g.applicationId}),L.jsx("div",{className:"model-type",children:g.modelName})]}),L.jsx(Y0n,{size:18})]}),x?L.jsxs("div",{className:"overview-node-summary",children:[L.jsxs("span",{children:[g.targetCount," targets"]}),L.jsxs("span",{children:[g.inputs.length," in"]}),L.jsxs("span",{children:[g.outputs.length," out"]})]}):L.jsxs(L.Fragment,{children:[L.jsxs("div",{className:"node-meta",children:[L.jsxs("span",{className:"meta-chip",title:g.selector.julia,children:[L.jsx(xXn,{size:13})," ",H]}),L.jsxs("span",{className:"meta-chip",title:g.cadence.julia,children:[L.jsx(CXn,{size:13})," ",wKn(g)]})]}),L.jsxs("div",{className:"target-summary",children:[L.jsx("strong",{children:g.targetCount})," concrete target",g.targetCount===1?"":"s"]}),L.jsxs("div",{className:"ports-grid",children:[L.jsx(fue,{title:"Inputs",side:"input",ports:g.inputs,required:M,candidates:N,previous:$,cycleBreaks:k,cycleBreakMode:g.cycleBreakMode,application:g,onCandidateClick:g.onCandidateClick,onPortClick:g.onPortClick,onCycleBreak:g.onCycleBreak}),L.jsx(fue,{title:"Outputs",side:"output",ports:g.outputs,required:M,candidates:N,previous:$,cycleBreaks:k,cycleBreakMode:g.cycleBreakMode,application:g,onCandidateClick:g.onCandidateClick,onPortClick:g.onPortClick,onCycleBreak:g.onCycleBreak})]}),(g.environmentInputs.length>0||g.environmentOutputs.length>0)&&L.jsxs("div",{className:"ports-grid environment-ports",children:[L.jsx(fue,{title:"Environment inputs",side:"input",ports:g.environmentInputs,required:M,candidates:new Set,previous:new Set,cycleBreaks:new Set,cycleBreakMode:!1,application:g,onPortClick:g.onPortClick}),L.jsx(fue,{title:"Environment outputs",side:"output",ports:g.environmentOutputs,required:M,candidates:new Set,previous:new Set,cycleBreaks:new Set,cycleBreakMode:!1,application:g,onPortClick:g.onPortClick})]})]})]})}function dKn({data:g,selected:E}){return L.jsxs("section",{className:`entity-node ${g.nodeKind} ${E?"selected":""}`,"data-testid":`${g.nodeKind}-node`,children:[(g.inputPortIds?.length?g.inputPortIds:[void 0]).map((x,M)=>L.jsx(h5,{id:x,type:"target",position:ur.Left,style:{top:`${Tue(M,g.inputPortIds?.length??1)}%`}},x??"target")),L.jsxs("header",{children:[L.jsx("strong",{children:g.title}),L.jsx("span",{children:g.subtitle})]}),L.jsx("div",{className:"badges",children:g.badges.map(x=>L.jsx("span",{className:"meta-chip",children:x},x))}),(g.outputPortIds?.length?g.outputPortIds:[void 0]).map((x,M)=>L.jsx(h5,{id:x,type:"source",position:ur.Right,style:{top:`${Tue(M,g.outputPortIds?.length??1)}%`}},x??"source"))]})}function fue({title:g,side:E,ports:x,required:M,candidates:N,previous:$,cycleBreaks:k,cycleBreakMode:H,application:U,onCandidateClick:G,onPortClick:ie,onCycleBreak:W}){return L.jsxs("div",{className:`port-column ${E}`,children:[L.jsx("div",{className:"port-title",children:g}),x.map(Z=>L.jsxs("div",{className:`port ${M.has(Z.id)?"required-input":""} ${$.has(Z.id)?"previous":""}`,"data-testid":`port-${E}-${Z.name}`,title:`${Z.name}: ${Z.defaultJulia}`,onClick:le=>{le.stopPropagation(),ie?.(Z)},children:[E==="input"&&L.jsx(h5,{id:Z.id,type:"target",position:ur.Left}),L.jsx("span",{children:Z.name}),N.has(Z.id)&&L.jsx("button",{className:"port-candidate-button nodrag nopan",type:"button",title:E==="input"?"Models that compute this variable":"Models that consume this variable","aria-label":E==="input"?`Models that compute ${Z.name}`:`Models that consume ${Z.name}`,onClick:le=>{le.stopPropagation();const oe=le.currentTarget.getBoundingClientRect();G?.(Z,{x:oe.right,y:oe.top+oe.height/2})},children:L.jsx(SA,{size:11})}),E==="input"&&H&&k.has(Z.id)&&L.jsx("button",{className:"cycle-port-break nodrag nopan",type:"button",title:`Read ${Z.name} from the previous accepted timestep`,"aria-label":`Break cycle at ${U.applicationId}.${Z.name}`,"data-testid":`cycle-break-${U.applicationId}-${Z.name}`,onClick:le=>{le.stopPropagation(),W?.(U,Z)},children:L.jsx(Q0n,{size:12})}),$.has(Z.id)&&L.jsx("small",{className:"previous-label",children:"t-1"}),E==="output"&&L.jsx(h5,{id:Z.id,type:"source",position:ur.Right})]},Z.id))]})}function bKn({inputs:g,outputs:E}){return L.jsxs(L.Fragment,{children:[g.map((x,M)=>L.jsx(h5,{id:x.id,type:"target",position:ur.Left,style:{top:`${Tue(M,g.length)}%`}},x.id)),E.map((x,M)=>L.jsx(h5,{id:x.id,type:"source",position:ur.Right,style:{top:`${Tue(M,E.length)}%`}},x.id))]})}function Tue(g,E){return E<=1?52:28+g/(E-1)*48}function gKn(g){const E=[...g.targetInstances,...g.targetScales,...g.targetKinds];return E.length>0?E.slice(0,2).join(" / "):g.selector.type}function wKn(g){return g.cadence.mode==="default"?"default rate":g.cadence.mode==="period"?`${g.cadence.value} ${g.cadence.unit}`:g.cadence.julia}function pKn({id:g,sourceX:E,sourceY:x,targetX:M,targetY:N,sourcePosition:$=ur.Right,targetPosition:k=ur.Left,markerEnd:H,style:U,data:G}){const[ie,W,Z]=Aue({sourceX:E,sourceY:x,targetX:M,targetY:N,sourcePosition:$,targetPosition:k,borderRadius:14,offset:24}),le=mKn(G);return L.jsxs(L.Fragment,{children:[L.jsx(uq,{id:g,path:ie,markerEnd:H,style:U,interactionWidth:18}),le&&L.jsx(qUn,{children:L.jsx("div",{className:`edge-chip ${G?.kind??""} ${G?.cycle?"cycle":""}`,style:{transform:`translate(-50%, -50%) translate(${W}px, ${Z-12}px)`},children:le})})]})}function mKn(g){return g?g.kind==="manual_call"?g.call||"call":g.kind==="object_topology"||g.kind==="application_target"?"":g.sourceVariable&&g.targetVariable?g.sourceVariable===g.targetVariable?g.sourceVariable:`${g.sourceVariable} → ${g.targetVariable}`:g.kind.replaceAll("_"," "):""}const V7e=_ke("source","degree_days","ToyDegreeDaysCumulModel",[],["TT_cu"]),aue=_ke("lai","lai_dynamic","ToyLAIModel",["TT_cu"],["LAI"]),Y7e=_ke("light","light_interception","Beer",["LAI"],["aPPFD"]),ndn={schemaVersion:2,level:"applications",metadata:{title:"PlantSimEngine Model Graph",modelRevision:0,objectCount:1,instanceCount:0,applicationCount:3,executionCount:3,bindingCount:2,callCount:0,unresolvedInitializationCount:1,cyclic:!1,strictlyCompiled:!0,sceneEnvironmentId:null},objects:[{id:"object:plant",objectId:"plant",scale:"Plant",kind:"plant",species:null,name:"plant",instance:null,parent:null,children:[],hasGeometry:!1,hasStatus:!0}],templates:[],instances:[],applications:[V7e,aue,Y7e],executions:[V7e,aue,Y7e].map(g=>({id:`execution:${g.applicationId}:plant`,applicationId:g.applicationId,applicationNodeId:g.id,objectId:"plant",objectNodeId:"object:plant",modelType:g.modelType,modelParameters:{},overridden:!1})),edges:[idn(V7e,"TT_cu",aue,"TT_cu"),idn(aue,"LAI",Y7e,"LAI")],modelLibrary:[],environments:[],initialization:[{applicationId:"source",objectId:"plant",variable:"TT",role:"input",disposition:"unresolved",value:"-Inf",valueJulia:"-Inf",expectedType:"Float64",sourceApplicationIds:[],sourceObjectIds:[],sourceVariable:null,origin:"missing",previousTimeStep:!1}],diagnostics:[],cycles:[],availableActions:["inspect"]};function _ke(g,E,x,M,N){return{id:`application:${g}`,applicationId:g,owner:{scope:"global",applicationId:g,instance:null,templateId:null},name:g,process:E,modelType:x,modelName:x,module:"PlantSimEngine.Examples",package:"PlantSimEngine",modelParameters:{},selector:{type:"One",multiplicity:"one",criteria:{scale:"Plant"},julia:"One(scale=:Plant)"},targetIds:["plant"],targetCount:1,targetScales:["Plant"],targetKinds:["plant"],targetSpecies:[],targetInstances:[],cadence:{mode:"default",value:null,unit:null,julia:"nothing"},clock:null,inputs:M.map($=>tdn(g,"input",$)),outputs:N.map($=>tdn(g,"output",$)),environmentInputs:[],environmentOutputs:[],inputBindings:{},callBindings:{},environment:null,environmentBindings:{},environmentWindow:{mode:"default",value:null,unit:null,julia:"nothing"},outputRouting:{},updates:[],modelStorage:"shared_application",objectOverrides:[]}}function tdn(g,E,x){return{id:`application:${g}:${E}:${x}`,name:x,role:E,default:"-Inf",defaultJulia:"-Inf",expectedType:"Float64"}}function idn(g,E,x,M){return{id:`binding:${g.applicationId}:${E}:${x.applicationId}:${M}`,source:g.id,target:x.id,sourcePort:`application:${g.applicationId}:output:${E}`,targetPort:`application:${x.applicationId}:input:${M}`,sourceVariable:E,targetVariable:M,sourceApplicationId:g.applicationId,targetApplicationId:x.applicationId,kind:"inferred_same_object",cycle:!1,projection:"applications"}}const vKn={application:hKn,entity:dKn},yKn={modelEdge:pKn};function kKn(){const[g,E]=Be.useState(W7e),[x,M]=Be.useState(()=>W7e().level),[N,$]=Be.useState(()=>W7e().metadata.applicationCount>24?"overview":"detail"),[k,H]=Be.useState(""),[U,G]=Be.useState(null),[ie,W]=Be.useState(null),[Z,le]=Be.useState(null),[oe,ee]=Be.useState(null),[Ce,pe]=Be.useState(!1),[$e,ae]=Be.useState(!1),[Ne,Ue]=Be.useState(!1),[ln,un]=Be.useState(!1),[An,xn]=Be.useState(!1),[nt,dn]=Be.useState(""),[bn,Y]=Be.useState(null),[Je,pn]=Be.useState(null),[Ae,ve]=Be.useState([]),[nn,yn]=Be.useState(null),[Pn,ye]=Be.useState(!1),[Re,tt]=Be.useState(!1),[ut,Jt]=Be.useState(!1),[di,Gt]=Be.useState(null),[xt,si]=Be.useState(null),[Kr,Er]=Be.useState(null),[Mt,bi]=Be.useState(!1),[zi,cu]=Be.useState(null),[Fu,Rs]=Be.useState(!1),[ia,ef]=Be.useState(null),[Oa,Cc]=Be.useState(null),[o0,xb]=Be.useState(null),[Sl,cd]=Be.useState(null),[s0,uh]=Be.useState(null),[ud,b5]=Be.useState(!1),[l0,Cp]=Be.useState(null),[l6,Ab,ra]=UUn([]),[od,Sf,f6]=XUn([]),oh=Be.useMemo(FKn,[]),Tp=Be.useMemo(()=>new Map(g.applications.map(vt=>[vt.applicationId,vt])),[g.applications]),Gg=Be.useMemo(()=>new Set(g.initialization.filter(vt=>vt.role==="input"&&vt.disposition==="unresolved").map(vt=>Q7e(vt.applicationId,"input",vt.variable))),[g.initialization]),qg=Be.useMemo(()=>new Set(g.initialization.filter(vt=>vt.role==="input"&&vt.previousTimeStep).map(vt=>Q7e(vt.applicationId,"input",vt.variable))),[g.initialization]),Ug=Be.useMemo(()=>new Set(g.cycles.flatMap(vt=>vt.applicationIds)),[g.cycles]),sd=Be.useMemo(()=>new Set(g.cycles.flatMap(vt=>vt.breakCandidates.map(kc=>Q7e(kc.applicationId,"input",kc.input)))),[g.cycles]),Xg=Be.useMemo(()=>MKn(g),[g]),Mb=Be.useMemo(()=>oe?CKn(g.modelLibrary,oe.port):[],[oe,g.modelLibrary]),g5=Be.useMemo(()=>oe?OKn(g.applications,oe):[],[oe,g.applications]),Op=Be.useMemo(()=>{const vt=new Map;for(const kc of g.applications)for(const tc of[...kc.inputs,...kc.outputs])vt.set(tc.id,{application:kc,port:tc});return vt},[g.applications]),Np=Be.useMemo(()=>ie?new Set(ie.objectIds.map(u6)):null,[ie]);Be.useEffect(()=>{if(!oh?.websocketUrl)return;const vt=new WebSocket(oh.websocketUrl);return yn(vt),vt.addEventListener("open",()=>{ye(!0),Gt(null)}),vt.addEventListener("close",()=>{ye(!1),Gt("Editor connection closed.")}),vt.addEventListener("message",kc=>{const tc=JSON.parse(kc.data);tc.graph&&E(tc.graph),typeof tc.modelCode=="string"&&dn(tc.modelCode),Y(tc.autosavePath??null),pn(tc.savePath??null),ve(tc.recentPaths??[]),tc.selectorPreview&&uh(tc.selectorPreview),tc.targetPreview&&Er(tc.targetPreview),tc.instancePreview&&cu(tc.instancePreview),tc.ok===!1&&(uh(null),Er(null),cu(null)),tt(!!tc.canUndo),Jt(!!tc.canRedo),Gt(tc.ok===!1?tc.diagnostics?.[0]||"The edit failed.":null)}),()=>vt.close()},[oh?.websocketUrl]),Be.useEffect(()=>{g.metadata.cyclic||(b5(!1),Cp(null))},[g.metadata.cyclic]);const uu=Be.useCallback(vt=>{if(!nn||nn.readyState!==WebSocket.OPEN){Gt("This action requires an interactive Julia editor session.");return}nn.send(JSON.stringify(vt))},[nn]),w5=Be.useCallback((vt,kc,tc)=>{G(vt),le(kc),ee({application:vt,port:kc,x:tc.x,y:tc.y})},[]);Be.useEffect(()=>{const vt=jKn({graph:g,view:x,detailMode:N,query:k,scopedObjectIds:Np,unresolvedPortIds:Gg,previousPortIds:qg,candidatePortIds:Xg,cyclicApplications:Ug,cycleBreakPortIds:sd,cycleBreakMode:ud,openCandidates:w5,onPortClick:le,onCycleBreak:(f0,Yg)=>Cp({application:f0,port:Yg})}),kc=new Set(vt.map(f0=>f0.id)),tc=EKn(g,x).filter(f0=>kc.has(f0.source)&&kc.has(f0.target));sKn(vt,tc,x==="topology"?"topology":N==="overview"?"overview":"data_flow").then(Ab),Sf(tc)},[Xg,ud,sd,Ug,N,g,w5,qg,k,Np,Sf,Ab,Gg,x]);const Kg=Be.useCallback((vt,kc)=>{if(kc.data.nodeKind==="application")G(Tp.get(kc.data.applicationId)??null);else if(G(kc.data.detail),kc.data.nodeKind==="object"){const tc=kc.data.detail;W({label:`subtree ${tc.name||String(tc.objectId)}`,objectIds:xKn(g.objects,tc.objectId)})}else if(kc.data.nodeKind==="instance"){const tc=kc.data.detail;W({label:`instance ${tc.name}`,objectIds:tc.objectIds})}else kc.data.nodeKind==="model"&&W(null);le(null)},[Tp,g.objects]),rv=Be.useCallback(vt=>{oe&&(Er(null),si({mode:"add",initialModelType:vt.type,suggestedSelector:zKn(oe.application)}),Pn||Gt(`${vt.name} matches ${oe.port.name}. Start an interactive Julia editor session to add it to the composite model.`),ee(null))},[oe,Pn]),p5=Be.useCallback(vt=>{if(!Pn){Gt("Adding or updating an application requires an interactive Julia editor session."),si(null);return}uu({action:"edit",kind:vt.applicationRef?"update_application":"add_application",...vt}),si(null)},[Pn,uu]),Vg=Be.useCallback(vt=>{if(!Pn){Gt("Adding a template instance requires an interactive Julia editor session.");return}uu({action:"edit",kind:"add_instance",...vt}),bi(!1),cu(null)},[Pn,uu]),cv=Be.useCallback(vt=>{if(!Pn){Gt("Creating a binding requires an interactive Julia editor session."),cd(null);return}uu({action:"edit",kind:"set_input_binding",...vt}),cd(null)},[Pn,uu]),m5=Be.useCallback(vt=>{if(!Pn){Gt("Adding or updating an object requires an interactive Julia editor session."),ef(null);return}uu({action:"edit",kind:ia?.mode==="update"?"update_object":"add_object",objectId:vt.objectId,configuration:vt.configuration}),ef(null)},[Pn,ia?.mode,uu]),v5=Be.useCallback(vt=>{if(!Pn){Gt("Creating an override requires an interactive Julia editor session."),Cc(null);return}uu({action:"edit",kind:vt.scope==="instance"?"set_instance_override":"set_object_override",...vt}),Cc(null)},[Pn,uu]),b1=Be.useCallback(vt=>{if(!Pn){Gt("Removing an override requires an interactive Julia editor session.");return}uu({action:"edit",kind:vt.scope==="instance"?"remove_instance_override":"remove_object_override",...vt}),Cc(null)},[Pn,uu]),Ws=Be.useCallback(vt=>{if(!vt.sourceHandle||!vt.targetHandle)return;const kc=Op.get(vt.sourceHandle),tc=Op.get(vt.targetHandle);if(!kc||!tc||kc.port.role!=="output"||tc.port.role!=="input"){Gt("Connect an application output to an application input.");return}cd({sourceApplication:kc.application,sourcePort:kc.port,targetApplication:tc.application,targetPort:tc.port}),uh(null)},[Op]),xf=Be.useMemo(()=>{if(!U)return g.initialization;if("applicationId"in U)return g.initialization.filter(vt=>vt.applicationId===U.applicationId);if("objectId"in U)return g.initialization.filter(vt=>String(vt.objectId)===String(U.objectId));if("objectIds"in U){const vt=new Set(U.objectIds.map(u6));return g.initialization.filter(kc=>vt.has(u6(kc.objectId)))}return g.initialization},[g.initialization,U]);return L.jsxs("main",{className:"model-editor-shell","data-testid":"model-graph-viewer",children:[L.jsxs("header",{className:"model-toolbar",children:[L.jsxs("div",{className:"model-brand",children:[L.jsx("span",{className:"brand-mark"}),L.jsxs("div",{children:[L.jsx("small",{children:"PLANTSIMENGINE"}),L.jsx("strong",{children:"Model Graph"})]})]}),L.jsxs("div",{className:"model-search",children:[L.jsx(PXn,{size:17}),L.jsx("input",{value:k,onChange:vt=>H(vt.target.value),placeholder:"Search application, object, or variable"}),k&&L.jsx("button",{"aria-label":"Clear search",onClick:()=>H(""),children:L.jsx(Jg,{size:15})})]}),L.jsxs("div",{className:"model-counts",children:[L.jsxs("span",{children:[g.metadata.applicationCount," applications"]}),L.jsxs("span",{children:[g.metadata.objectCount," objects"]}),g.metadata.unresolvedInitializationCount>0&&L.jsxs("button",{className:"count-warning",onClick:()=>ae(!0),children:[L.jsx(MXn,{size:14})," ",g.metadata.unresolvedInitializationCount," init"]}),g.diagnostics.length>0&&L.jsxs("button",{className:"count-error",onClick:()=>pe(!0),children:[L.jsx(dke,{size:14})," ",g.diagnostics.length]})]}),L.jsxs("nav",{className:"view-tabs","aria-label":"Graph projection",children:[L.jsxs("button",{className:x==="applications"?"active":"",onClick:()=>M("applications"),children:[L.jsx(Y0n,{size:15})," Applications"]}),L.jsxs("button",{className:x==="topology"?"active":"",onClick:()=>M("topology"),children:[L.jsx(NXn,{size:15})," Objects"]}),L.jsxs("button",{className:x==="resolved"?"active":"",onClick:()=>M("resolved"),children:[L.jsx(IXn,{size:15})," Executions"]})]}),L.jsxs("div",{className:"model-actions",children:[oh&&L.jsxs("button",{"data-testid":"open-model",onClick:()=>un(!0),children:[L.jsx(OXn,{size:15})," Open"]}),oh&&L.jsxs("button",{"data-testid":"save-model",onClick:()=>xn(!0),children:[L.jsx(LXn,{size:15})," ",Je?"Saved":"Save"]}),x!=="topology"&&L.jsx("button",{className:N==="overview"?"overview-cta":"",onClick:()=>$(vt=>vt==="overview"?"detail":"overview"),children:N==="overview"?"Overview Mode - Show Detailed View":"Show Overview"}),oh&&L.jsxs("button",{"data-testid":"add-application",onClick:()=>{Er(null),si({mode:"add"})},children:[L.jsx(SA,{size:15})," Add application"]}),oh&&L.jsxs("button",{"data-testid":"add-object",onClick:()=>ef({mode:"add"}),children:[L.jsx(SA,{size:15})," Add object"]}),oh&&g.templates.length>0&&L.jsxs("button",{"data-testid":"add-instance",onClick:()=>{cu(null),bi(!0)},children:[L.jsx(SA,{size:15})," Add instance"]}),oh&&L.jsx("button",{"data-testid":"configure-environment",onClick:()=>Rs(!0),children:"Environment"}),oh&&L.jsx("button",{disabled:!Re,onClick:()=>uu({action:"undo"}),"aria-label":"Undo",children:L.jsx($Xn,{size:15})}),oh&&L.jsx("button",{disabled:!ut,onClick:()=>uu({action:"redo"}),"aria-label":"Redo",children:L.jsx(DXn,{size:15})}),L.jsxs("button",{onClick:()=>Ue(!0),children:[L.jsx(TXn,{size:15})," Model code"]})]})]}),g.metadata.cyclic&&L.jsxs("section",{className:"cycle-callout","data-testid":"cycle-callout",children:[L.jsx(dke,{size:19}),L.jsxs("div",{children:[L.jsx("strong",{children:"Current-step dependency cycle"}),L.jsx("span",{children:"Select a cycle input to read its previous accepted timestep value."})]}),L.jsx("button",{className:ud?"active":"",onClick:()=>{M("applications"),$("detail"),b5(vt=>!vt)},"data-testid":"choose-cycle-break",children:ud?"Cancel break selection":"Choose a break point in graph"})]}),di&&L.jsxs("div",{className:"editor-feedback",children:[di,L.jsx("button",{onClick:()=>Gt(null),children:L.jsx(Jg,{size:14})})]}),ie&&L.jsxs("section",{className:"graph-scope-filter","data-testid":"graph-scope-filter",children:[L.jsxs("span",{children:["Showing ",x==="resolved"?"executions":x==="applications"?"applications":"topology"," for ",L.jsx("strong",{children:ie.label})," (",ie.objectIds.length," objects)"]}),x==="topology"&&L.jsx("button",{onClick:()=>M("applications"),children:"Show related applications"}),L.jsxs("button",{"aria-label":"Clear graph scope",onClick:()=>W(null),children:[L.jsx(Jg,{size:14})," Clear"]})]}),L.jsxs("section",{className:"model-workspace",children:[L.jsx("div",{className:"flow-wrap",children:L.jsxs(HUn,{nodes:l6,edges:od,nodeTypes:vKn,edgeTypes:yKn,onNodesChange:ra,onEdgesChange:f6,onConnect:Ws,onNodeClick:Kg,onEdgeClick:(vt,kc)=>G(kc.data??null),fitView:!0,minZoom:.05,maxZoom:2,children:[L.jsx(WUn,{color:"#d8cdbc",gap:22,size:1}),L.jsx(cXn,{}),L.jsx(mXn,{pannable:!0,zoomable:!0})]})}),L.jsx(IKn,{selection:U,port:Z,initialization:xf,interactive:Pn,onEditApplication:vt=>{Er(null),si({mode:"update",application:vt})},onRemoveApplication:vt=>uu({action:"edit",kind:"remove_application",applicationRef:vt.owner}),onConfigureApplication:vt=>xb(vt.applicationId),onOverrideApplication:Cc,onRemoveInstance:vt=>uu({action:"edit",kind:"remove_instance",name:vt.name}),onEditObject:vt=>ef({mode:"update",object:vt}),onRemoveObject:vt=>uu({action:"edit",kind:"remove_object",objectId:vt.objectId,recursive:!0})})]}),oe&&(Mb.length>0||g5.length>0)&&L.jsx(TKn,{candidate:oe,models:Mb,applications:g5,onSelectModel:rv,onSelectApplication:vt=>{cd(NKn(oe,vt)),uh(null),ee(null)},onClose:()=>ee(null)}),Ce&&L.jsx(DKn,{graph:g,onClose:()=>pe(!1),sendCommand:uu,interactive:Pn}),$e&&L.jsx(_Kn,{graph:g,onClose:()=>ae(!1),sendCommand:uu,interactive:Pn}),Ne&&L.jsx(PKn,{code:nt,onClose:()=>Ue(!1)}),ln&&L.jsx(odn,{mode:"open",recentPaths:Ae,currentPath:Je,autosavePath:bn,onSubmit:vt=>{uu({action:"open_model_code",path:vt}),un(!1)},onClose:()=>un(!1)}),An&&L.jsx(odn,{mode:"save",recentPaths:Ae,currentPath:Je,autosavePath:bn,onSubmit:vt=>{uu({action:"save_model_code",path:vt}),xn(!1)},onClose:()=>xn(!1)}),xt&&L.jsx(RXn,{mode:xt.mode,models:g.modelLibrary,objects:g.objects,application:xt.application,initialModelType:xt.initialModelType,suggestedSelector:xt.suggestedSelector,nameReadOnly:xt.application?.owner.scope==="template",preview:Kr,onPreview:vt=>{Er(null),uu({action:"preview_application_targets",selector:vt,applicationRef:xt.application?.owner})},onSubmit:p5,onClose:()=>{si(null),Er(null)}}),Sl&&L.jsx(UXn,{endpoints:Sl,objects:g.objects,preview:s0,onPreview:vt=>{uh(null),uu({action:"preview_input_binding",...vt})},onSubmit:cv,onClose:()=>{cd(null),uh(null)}}),ia&&L.jsx(nKn,{mode:ia.mode,objects:g.objects,object:ia.object,onSubmit:m5,onClose:()=>ef(null)}),Mt&&L.jsx(ZXn,{templates:g.templates,instances:g.instances,objects:g.objects,preview:zi,onPreview:vt=>{cu(null),uu({action:"preview_instance",...vt})},onSubmit:Vg,onClose:()=>{bi(!1),cu(null)}}),Fu&&L.jsx(WXn,{environments:g.environments,activeId:g.metadata.sceneEnvironmentId,onSubmit:vt=>{uu({action:"edit",kind:"set_model_environment",environmentId:vt}),Rs(!1)},onClose:()=>Rs(!1)}),Oa&&L.jsx(iKn,{application:Oa,models:g.modelLibrary,instances:g.instances,onSubmit:v5,onRemove:b1,onClose:()=>Cc(null)}),o0&&Tp.get(o0)&&L.jsx(HXn,{application:Tp.get(o0),applications:g.applications,environments:g.environments,models:g.modelLibrary,onCommand:uu,onClose:()=>xb(null)}),l0&&L.jsx($Kn,{selection:l0,initialization:g.initialization,onSubmit:(vt,kc)=>{uu({action:"edit",kind:"break_cycle",applicationRef:l0.application.owner,input:l0.port.name,initializeMissing:vt,initialValue:kc}),Cp(null)},onClose:()=>Cp(null)})]})}function jKn({graph:g,view:E,detailMode:x,query:M,scopedObjectIds:N,unresolvedPortIds:$,previousPortIds:k,candidatePortIds:H,cyclicApplications:U,cycleBreakPortIds:G,cycleBreakMode:ie,openCandidates:W,onPortClick:Z,onCycleBreak:le}){const oe=Ce=>!M||JSON.stringify(Ce).toLowerCase().includes(M.toLowerCase());if(E==="topology"){const Ce={entity:"model",objectCount:g.metadata.objectCount,instanceCount:g.metadata.instanceCount,applicationCount:g.metadata.applicationCount},pe={id:"model:root",type:"entity",position:{x:0,y:0},data:{nodeKind:"model",title:g.metadata.title||"Composite model",subtitle:"model root",badges:[`${g.metadata.instanceCount} instances`,`${g.metadata.objectCount} objects`],detail:Ce}},$e=g.templates.filter(oe).map(Ue=>({id:`template:${Ue.id}`,type:"entity",position:{x:0,y:0},data:{nodeKind:"template",title:Ue.name,subtitle:Ue.source==="catalog"?"template preset":"model-local template",badges:[`${Ue.applications.length} applications`,`${Ue.mountedInstances.length} mounts`],detail:Ue}})),ae=g.instances.filter(oe).map(Ue=>({id:Ue.id,type:"entity",position:{x:0,y:0},data:{nodeKind:"instance",title:Ue.name,subtitle:[Ue.kind,Ue.species].filter(Boolean).join(" · ")||"object instance",badges:[`${Ue.objectIds.length} objects`,`${Ue.applicationIds.length} applications`,`${Ue.instanceOverrides.length+Ue.objectOverrides.length} overrides`],detail:Ue}})),Ne=g.objects.filter(oe).map(Ue=>({id:Ue.id,type:"entity",position:{x:0,y:0},data:{nodeKind:"object",title:Ue.name||String(Ue.objectId),subtitle:[Ue.kind,Ue.scale,Ue.instance].filter(Boolean).join(" · "),badges:[Ue.species,Ue.hasStatus?"status":null,Ue.hasGeometry?"geometry":null].filter(Boolean),detail:Ue}}));return[pe,...$e,...ae,...Ne]}if(E==="resolved"){const Ce=new Map(g.applications.map($e=>[$e.applicationId,$e]));return[...g.executions.filter($e=>!N||N.has(u6($e.objectId))).filter(oe).map($e=>{const ae=Ce.get($e.applicationId);return{id:$e.id,type:"entity",position:{x:0,y:0},data:{nodeKind:"execution",title:$e.applicationId,subtitle:`object ${String($e.objectId)}`,badges:[BKn($e.modelType),$e.overridden?"override":"shared"],inputPortIds:[...ae?.inputs??[],...ae?.environmentInputs??[]].map(Ne=>Ne.id),outputPortIds:[...ae?.outputs??[],...ae?.environmentOutputs??[]].map(Ne=>Ne.id),detail:$e}}}),...rdn(g,"resolved")]}return[...g.applications.filter(Ce=>!N||Ce.targetIds.some(pe=>N.has(u6(pe)))).filter(oe).map(Ce=>({id:Ce.id,type:"application",position:{x:0,y:0},data:{...Ce,nodeKind:"application",detailMode:x,cyclic:U.has(Ce.applicationId),requiredInputPortIds:Ce.inputs.filter(pe=>$.has(pe.id)).map(pe=>pe.id),candidatePortIds:[...Ce.inputs,...Ce.outputs].filter(pe=>H.has(pe.id)).map(pe=>pe.id),previousTimeStepPortIds:Ce.inputs.filter(pe=>k.has(pe.id)).map(pe=>pe.id),cycleBreakInputPortIds:Ce.inputs.filter(pe=>G.has(pe.id)).map(pe=>pe.id),cycleBreakMode:ie,onCandidateClick:(pe,$e)=>W(Ce,pe,$e),onPortClick:Z,onCycleBreak:le}})),...rdn(g,"applications")]}function rdn(g,E){const x=g.edges.filter(N=>N.kind==="environment_binding"&&N.projection===E);return[...new Set(x.flatMap(N=>[N.source,N.target]).filter(N=>N.startsWith("environment:")))].map(N=>{const $=N.slice(12),k=g.environments.find(G=>G.id===N),H=cdn(x.filter(G=>G.target===N).map(G=>G.targetPort).filter(Boolean)),U=cdn(x.filter(G=>G.source===N).map(G=>G.sourcePort).filter(Boolean));return{id:N,type:"entity",position:{x:0,y:0},data:{nodeKind:"environment",title:k?.name||$,subtitle:k?.active?"active scene environment":"environment backend",badges:[`${U.length} inputs`,`${H.length} outputs`],inputPortIds:H,outputPortIds:U,detail:k||{provider:$}}}})}function cdn(g){return[...new Set(g)]}function EKn(g,E){return(E==="topology"?[...g.edges,...SKn(g)]:g.edges).filter(M=>AKn(M,E)).map(M=>({id:M.id,source:M.source,target:M.target,sourceHandle:M.sourcePort||void 0,targetHandle:M.targetPort||void 0,type:"modelEdge",data:M,markerEnd:{type:VG.ArrowClosed,color:udn(M),width:16,height:16},style:{stroke:udn(M),strokeWidth:M.cycle?4:M.kind==="manual_call"?2.5:1.8,strokeDasharray:M.kind==="previous_timestep"?"7 5":M.kind==="manual_call"?"3 4":void 0}}))}function SKn(g){const E=[],x=new Set(g.instances.flatMap(M=>M.objectIds.map(u6)));for(const M of g.templates)E.push({id:`topology:model:template:${M.id}`,source:"model:root",target:`template:${M.id}`,kind:"object_topology",projection:"topology",cycle:!1});for(const M of g.instances)E.push({id:`topology:${M.id}:object:${String(M.rootId)}`,source:M.id,target:`object:${String(M.rootId)}`,kind:"object_topology",projection:"topology",cycle:!1});for(const M of g.objects)M.parent===null&&!x.has(u6(M.objectId))&&E.push({id:`topology:model:${M.id}`,source:"model:root",target:M.id,kind:"object_topology",projection:"topology",cycle:!1});return E}function xKn(g,E){const x=new Map;for(const k of g){if(k.parent===null)continue;const H=u6(k.parent);x.set(H,[...x.get(H)??[],k.objectId])}const M=[],N=[E],$=new Set;for(;N.length>0;){const k=N.pop(),H=u6(k);$.has(H)||($.add(H),M.push(k),N.push(...x.get(H)??[]))}return M}function u6(g){const E=String(g);return E.startsWith("object:")?E.slice(7):E}function AKn(g,E){const x=g.projection;return E==="topology"?g.kind==="object_topology"||g.kind==="template_mount":E==="resolved"?x==="resolved":x==="applications"||!x&&!["object_topology","application_target"].includes(g.kind)}function udn(g){return g.cycle?"#cf4937":g.kind==="previous_timestep"?"#317b62":g.kind==="manual_call"?"#be6a54":g.kind==="object_topology"?"#7b7167":g.kind==="environment_binding"?"#367b8b":"#a59687"}function MKn(g){const E=new Set;for(const x of g.applications){for(const M of x.inputs)(g.applications.some($=>$.applicationId!==x.applicationId&&$.outputs.some(k=>k.name===M.name))||g.modelLibrary.some($=>Object.prototype.hasOwnProperty.call($.outputs,M.name)))&&E.add(M.id);for(const M of x.outputs)(g.applications.some($=>$.applicationId!==x.applicationId&&$.inputs.some(k=>k.name===M.name))||g.modelLibrary.some($=>Object.prototype.hasOwnProperty.call($.inputs,M.name)))&&E.add(M.id)}return E}function CKn(g,E){const x=E.role==="input"?"outputs":"inputs";return g.filter(M=>Object.prototype.hasOwnProperty.call(M[x],E.name)).sort((M,N)=>`${M.package}.${M.name}`.localeCompare(`${N.package}.${N.name}`))}function TKn({candidate:g,models:E,applications:x,onSelectModel:M,onSelectApplication:N,onClose:$}){const k=g.port.role==="input"?`Models that compute ${g.port.name}`:`Models that consume ${g.port.name}`;return L.jsxs("section",{className:"candidate-popover",style:{left:Math.min(g.x+8,window.innerWidth-390),top:Math.min(g.y-20,window.innerHeight-480)},children:[L.jsxs("header",{children:[L.jsxs("div",{children:[L.jsx("strong",{children:k}),L.jsx("span",{children:"Exact declared variable-name matches"})]}),L.jsx("button",{onClick:$,children:L.jsx(Jg,{size:15})})]}),L.jsxs("div",{className:"candidate-list",children:[x.length>0&&L.jsx("div",{className:"candidate-section-label",children:"Existing applications"}),x.map(H=>L.jsxs("button",{className:"candidate-card existing",onClick:()=>N(H),children:[L.jsx("strong",{children:H.name||H.applicationId}),L.jsx("span",{children:H.modelName}),L.jsxs("small",{children:[H.targetCount," target",H.targetCount===1?"":"s"]}),L.jsx("div",{children:"Connect without adding another application"})]},H.applicationId)),E.length>0&&L.jsx("div",{className:"candidate-section-label",children:"Available models"}),E.map(H=>L.jsxs("button",{className:"candidate-card",onClick:()=>M(H),children:[L.jsx("strong",{children:H.name}),L.jsx("span",{children:H.process}),L.jsx("small",{children:H.package||H.module}),L.jsxs("div",{children:[Object.keys(H.inputs).length," inputs · ",Object.keys(H.outputs).length," outputs"]})]},H.type))]})]})}function OKn(g,E){return g.filter(x=>x.applicationId!==E.application.applicationId).filter(x=>(E.port.role==="input"?x.outputs:x.inputs).some(N=>N.name===E.port.name)).sort((x,M)=>x.applicationId.localeCompare(M.applicationId))}function NKn(g,E){if(g.port.role==="input"){const M=E.outputs.find(N=>N.name===g.port.name);if(!M)throw new Error(`Application ${E.applicationId} does not output ${g.port.name}.`);return{sourceApplication:E,sourcePort:M,targetApplication:g.application,targetPort:g.port}}const x=E.inputs.find(M=>M.name===g.port.name);if(!x)throw new Error(`Application ${E.applicationId} does not input ${g.port.name}.`);return{sourceApplication:g.application,sourcePort:g.port,targetApplication:E,targetPort:x}}function IKn({selection:g,port:E,initialization:x,interactive:M,onEditApplication:N,onConfigureApplication:$,onRemoveApplication:k,onOverrideApplication:H,onRemoveInstance:U,onEditObject:G,onRemoveObject:ie}){const W=g&&"applicationId"in g&&"selector"in g?g:null,Z=g&&"objectId"in g&&!("applicationId"in g)?g:null,le=g&&"templateId"in g&&"objectIds"in g?g:null;return L.jsxs("aside",{className:"model-inspector",children:[L.jsxs("header",{children:[L.jsx("strong",{children:"Inspector"}),g&&L.jsx("span",{children:RKn(g)})]}),!g&&L.jsxs("div",{className:"empty-inspector",children:[L.jsx(AXn,{size:28}),L.jsx("p",{children:"Select an application, object, execution, or relationship."})]}),g&&L.jsx("pre",{children:JSON.stringify(g,null,2)}),W&&M&&L.jsxs("div",{className:"inspector-actions",children:[L.jsx("button",{onClick:()=>N(W),children:W.owner.scope==="template"?"Edit shared template":"Edit application"}),L.jsx("button",{"data-testid":"configure-application",onClick:()=>$(W),children:"Configure coupling"}),W.owner.scope==="template"&&L.jsx("button",{onClick:()=>H(W),children:"Create override"}),L.jsx("button",{className:"danger",onClick:()=>k(W),children:W.owner.scope==="template"?"Remove from shared template":"Remove application"})]}),le&&M&&L.jsxs("div",{className:"inspector-actions",children:[L.jsx("button",{className:"danger",onClick:()=>U(le),children:"Unmount instance"}),L.jsx("small",{children:"The object subtree is retained."})]}),Z&&M&&L.jsxs("div",{className:"inspector-actions",children:[L.jsx("button",{onClick:()=>G(Z),children:"Edit object"}),L.jsx("button",{className:"danger",onClick:()=>ie(Z),children:"Remove object and descendants"})]}),E&&L.jsxs("section",{children:[L.jsx("h4",{children:"Selected variable"}),L.jsx("code",{children:E.name}),L.jsx("p",{children:E.expectedType})]}),g&&x.length>0&&L.jsxs("section",{className:"inspector-initialization",children:[L.jsx("h4",{children:"Initialization"}),x.slice(0,8).map(oe=>L.jsxs("div",{children:[L.jsx("code",{children:oe.variable}),L.jsx("span",{className:oe.disposition==="unresolved"?"unresolved":"",children:oe.disposition})]},`${oe.applicationId}:${oe.objectId}:${oe.variable}`))]})]})}function DKn({graph:g,onClose:E,sendCommand:x,interactive:M}){return L.jsxs(Fue,{title:"Diagnostics and cycles",onClose:E,children:[g.diagnostics.map(N=>L.jsxs("article",{className:"diagnostic-card",children:[L.jsx("strong",{children:N.code}),L.jsx("p",{children:N.message}),N.suggestions.map($=>L.jsx("small",{children:$},$))]},`${N.code}:${N.message}`)),g.cycles.map(N=>L.jsxs("article",{className:"cycle-card",children:[L.jsx("strong",{children:N.applicationIds.join(" → ")}),L.jsx("p",{children:"Choose an input to read from the previous timestep."}),N.breakCandidates.map($=>{const k=g.applications.find(H=>H.applicationId===$.applicationId)?.owner;return L.jsxs("button",{disabled:!M||!k,onClick:()=>k&&x({action:"edit",kind:"mark_previous_timestep",applicationRef:k,input:$.input}),children:[$.applicationId,".",$.input]},`${$.applicationId}:${$.objectId}:${$.input}`)})]},N.id)),g.diagnostics.length===0&&g.cycles.length===0&&L.jsx("p",{children:"No diagnostics."})]})}function _Kn({graph:g,onClose:E,sendCommand:x,interactive:M}){const N=g.initialization.filter(k=>k.disposition==="unresolved"),$=new Map;for(const k of N){const H=`${k.applicationId}:${k.variable}`;$.set(H,[...$.get(H)||[],k])}return L.jsxs(Fue,{title:"Initialization",onClose:E,children:[[...$.entries()].map(([k,H])=>L.jsx(LKn,{rows:H,interactive:M,sendCommand:x},k)),N.length===0&&L.jsx("p",{children:"No unresolved initial values."})]})}function LKn({rows:g,interactive:E,sendCommand:x}){const[M,N]=Be.useState("float"),[$,k]=Be.useState(""),H=g[0],U={type:M,value:$};return L.jsxs("article",{className:"initialization-group",children:[L.jsxs("header",{children:[L.jsxs("div",{children:[L.jsx("strong",{children:H.variable}),L.jsx("span",{children:H.applicationId})]}),L.jsxs("small",{children:[g.length," object",g.length===1?"":"s"," · expected ",H.expectedType]})]}),L.jsx("p",{children:"Required because the input has no producer, environment source, status value, or usable temporal initialization."}),E&&L.jsxs("div",{className:"initialization-value",children:[L.jsxs("label",{children:["Type",L.jsxs("select",{value:M,onChange:G=>N(G.target.value),children:[L.jsx("option",{value:"float",children:"Float"}),L.jsx("option",{value:"integer",children:"Integer"}),L.jsx("option",{value:"boolean",children:"Boolean"}),L.jsx("option",{value:"symbol",children:"Symbol"}),L.jsx("option",{value:"string",children:"String"}),L.jsx("option",{value:"julia",children:"Julia expression"})]})]}),L.jsxs("label",{children:["Value",L.jsx("input",{value:$,onChange:G=>k(G.target.value)})]}),L.jsx("button",{disabled:!$.trim(),onClick:()=>x({action:"edit",kind:"set_object_statuses",objectIds:g.map(G=>G.objectId),variable:H.variable,value:U}),children:"Set all targets"})]}),L.jsx("div",{className:"initialization-object-list",children:g.map(G=>L.jsxs("div",{children:[L.jsxs("span",{children:["Object ",String(G.objectId)]}),L.jsx("code",{children:G.origin}),E&&L.jsx("button",{disabled:!$.trim(),onClick:()=>x({action:"edit",kind:"set_object_status",objectId:G.objectId,variable:G.variable,value:U}),children:"Set this object"})]},String(G.objectId)))})]})}function PKn({code:g,onClose:E}){return L.jsx(Fue,{title:"Model code",onClose:E,children:L.jsx("pre",{className:"model-code",children:g||"Model code is available from an interactive editor session."})})}function odn({mode:g,recentPaths:E,currentPath:x,autosavePath:M,onSubmit:N,onClose:$}){const[k,H]=Be.useState(x||"");return L.jsx(Fue,{title:g==="open"?"Open Model":"Save Model",onClose:$,children:L.jsxs("div",{className:"model-file-dialog",children:[L.jsx("p",{children:g==="open"?"Open a Julia script whose final binding is `model = CompositeModel(...)`. Future edits will be saved back to that file.":"After the first save, every successful graph edit automatically rewrites this Julia script."}),L.jsxs("label",{children:["Julia file path",L.jsxs("div",{className:"model-path-input",children:[L.jsx("input",{value:k,onChange:U=>H(U.target.value),placeholder:"/absolute/path/to/model.jl",autoFocus:!0}),L.jsx("button",{className:"primary",disabled:!k.trim(),onClick:()=>N(k.trim()),children:g==="open"?"Open":"Save"})]})]}),g==="open"&&E.length>0&&L.jsxs("section",{children:[L.jsx("strong",{children:"Recent models"}),L.jsx("div",{className:"recent-model-list",children:E.map(U=>L.jsxs("button",{onClick:()=>N(U),children:[L.jsx("span",{children:U.split("/").at(-1)}),L.jsx("small",{children:U})]},U))})]}),g==="open"&&M&&L.jsxs("section",{children:[L.jsx("strong",{children:"Recovery autosave"}),L.jsx("button",{className:"recovery-path",onClick:()=>N(M),children:M})]}),L.jsx("small",{children:"Use Git to version saved composite-model scripts and review scientific configuration changes."})]})})}function $Kn({selection:g,initialization:E,onSubmit:x,onClose:M}){const N=E.filter(G=>G.applicationId===g.application.applicationId&&G.variable===g.port.name&&G.disposition!=="supplied"),[$,k]=Be.useState("float"),[H,U]=Be.useState("");return L.jsx("div",{className:"overlay-backdrop",onMouseDown:M,children:L.jsxs("section",{className:"overlay-panel cycle-break-dialog",onMouseDown:G=>G.stopPropagation(),"data-testid":"cycle-break-dialog",children:[L.jsxs("header",{children:[L.jsxs("div",{children:[L.jsx("strong",{children:"Break the current-step cycle"}),L.jsxs("span",{children:[g.application.applicationId,".",g.port.name]})]}),L.jsx("button",{onClick:M,children:L.jsx(Jg,{size:17})})]}),L.jsxs("div",{className:"overlay-content",children:[L.jsx("p",{children:"This changes the application input to read its value from the previous accepted timestep. The model is disconnected from the current value during each run step."}),L.jsxs("div",{className:"cycle-impact",children:[L.jsx("strong",{children:"Application-wide change"}),L.jsxs("span",{children:["It affects all ",g.application.targetCount," targets selected by this application."]})]}),N.length>0&&L.jsxs("fieldset",{children:[L.jsx("legend",{children:"Required initial value"}),L.jsxs("p",{children:[N.length," target",N.length===1?"":"s"," need a value before the first timestep."]}),L.jsxs("div",{className:"form-grid",children:[L.jsxs("label",{children:["Value type",L.jsxs("select",{value:$,onChange:G=>k(G.target.value),children:[L.jsx("option",{value:"float",children:"Float"}),L.jsx("option",{value:"integer",children:"Integer"}),L.jsx("option",{value:"boolean",children:"Boolean"}),L.jsx("option",{value:"symbol",children:"Symbol"}),L.jsx("option",{value:"string",children:"String"}),L.jsx("option",{value:"julia",children:"Julia expression"})]})]}),L.jsxs("label",{children:["Initial value",L.jsx("input",{value:H,onChange:G=>U(G.target.value),autoFocus:!0})]})]})]})]}),L.jsxs("footer",{children:[L.jsx("button",{onClick:M,children:"Cancel"}),L.jsxs("button",{className:"primary",disabled:N.length>0&&!H.trim(),onClick:()=>x(N.length>0,N.length>0?{type:$,value:H}:null),"data-testid":"confirm-cycle-break",children:[L.jsx(Q0n,{size:15})," Use previous timestep"]})]})]})})}function Fue({title:g,onClose:E,children:x}){return L.jsx("div",{className:"overlay-backdrop",onMouseDown:E,children:L.jsxs("section",{className:"overlay-panel",onMouseDown:M=>M.stopPropagation(),children:[L.jsxs("header",{children:[L.jsx("strong",{children:g}),L.jsx("button",{onClick:E,children:L.jsx(Jg,{size:17})})]}),L.jsx("div",{className:"overlay-content",children:x})]})})}function RKn(g){return"applicationId"in g?g.applicationId:"objectId"in g?String(g.objectId):"objectIds"in g?g.name:"entity"in g?"Composite model":"provider"in g?g.provider:"name"in g?g.name:g.kind.replaceAll("_"," ")}function BKn(g){return g.split(".").at(-1)||g}function zKn(g){const E={selectors:[]};return g.targetInstances.length===0&&g.targetScales.length===1&&(E.scale=g.targetScales[0]),g.targetKinds.length===1&&(E.kind=g.targetKinds[0]),g.targetSpecies.length===1&&(E.species=g.targetSpecies[0]),{type:g.targetCount===1?"One":"Many",multiplicity:g.targetCount===1?"one":"many",criteria:E,julia:""}}function Q7e(g,E,x){return`application:${g}:${E}:${x}`}function W7e(){const g=document.getElementById("pse-model-graph-data");if(!g?.textContent)return ndn;try{return JSON.parse(g.textContent)}catch{return ndn}}function FKn(){const g=document.getElementById("pse-editor-config");if(!g?.textContent)return null;try{return JSON.parse(g.textContent)}catch{return null}}class JKn extends Be.Component{state={error:null};static getDerivedStateFromError(E){return{error:E}}componentDidCatch(E,x){console.error("PlantSimEngine model graph frontend failed",E,x)}render(){return this.state.error?L.jsxs("main",{className:"frontend-error","data-testid":"frontend-error",children:[L.jsx(dke,{size:28}),L.jsx("h1",{children:"The graph view could not be rendered"}),L.jsx("p",{children:this.state.error.message}),L.jsxs("button",{onClick:()=>window.location.reload(),children:[L.jsx(_Xn,{size:15})," Reload graph"]})]}):this.props.children}}hzn.createRoot(document.getElementById("root")).render(L.jsx(Be.StrictMode,{children:L.jsx(JKn,{children:L.jsx(kKn,{})})})); +... Falling back to non-web worker version.`);if(!Ne.workerFactory){var on=x("./elk-worker.min.js"),An=on.Worker;Ne.workerFactory=function(xn){return new An(xn)}}return U(this,Pe,[Ne])}return se(Pe,pe),k(Pe)})(ee);Object.defineProperty(M.exports,"__esModule",{value:!0}),M.exports=Me,Me.default=Me},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(x,M,N){var $=typeof Worker<"u"?Worker:void 0;M.exports=$},{}]},{},[3])(3)})})(K7e)),K7e.exports}var uKn=cKn();const oKn=bke(uKn);function ebn(g){if(g.detailMode==="overview")return 190;const E=Math.max(g.applicationId.length,g.modelName.length,...g.inputs.map(x=>x.name.length),...g.outputs.map(x=>x.name.length));return Math.max(310,Math.min(540,235+E*7))}const sKn=new oKn;async function lKn(g,E,x){const M={id:"root",layoutOptions:fKn(x),children:g.map(k=>({id:k.id,width:aKn(k.data),height:hKn(k.data),ports:k.data.nodeKind==="application"?[...nbn(k.data).map((H,U)=>lue(H.id,"WEST",U)),...tbn(k.data).map((H,U)=>lue(H.id,"EAST",U))]:[...(k.data.inputPortIds??[]).map((H,U)=>lue(H,"WEST",U)),...(k.data.outputPortIds??[]).map((H,U)=>lue(H,"EAST",U))],layoutOptions:{"org.eclipse.elk.portConstraints":"FIXED_ORDER"}})),edges:E.map(k=>({id:k.id,sources:[k.sourceHandle??k.source],targets:[k.targetHandle??k.target]}))},N=await sKn.layout(M),$=new Map((N.children??[]).map(k=>[k.id,{x:k.x??0,y:k.y??0}]));return g.map(k=>({...k,position:$.get(k.id)??k.position}))}function fKn(g){return{"elk.algorithm":g==="topology"?"mrtree":"layered","elk.direction":g==="topology"?"DOWN":"RIGHT","elk.spacing.nodeNode":g==="overview"?"24":g==="compact"?"32":"56","elk.layered.spacing.nodeNodeBetweenLayers":g==="overview"?"48":g==="compact"?"60":"110","elk.layered.nodePlacement.strategy":"BRANDES_KOEPF","elk.layered.crossingMinimization.semiInteractive":"true","elk.edgeRouting":"ORTHOGONAL"}}function lue(g,E,x){return{id:g,width:9,height:9,layoutOptions:{"org.eclipse.elk.port.side":E,"org.eclipse.elk.port.index":String(x)}}}function aKn(g){return g.nodeKind==="application"?ebn(g):240}function hKn(g){if(g.nodeKind!=="application")return 112;if(g.detailMode==="overview")return 108;const E=Math.max(g.inputs.length,g.outputs.length),x=Math.max(g.environmentInputs.length,g.environmentOutputs.length);return Math.max(178,142+E*27+(x>0?32+x*27:0))}function nbn(g){return[...g.inputs,...g.environmentInputs]}function tbn(g){return[...g.outputs,...g.environmentOutputs]}function dKn({data:g,selected:E}){const x=g.detailMode==="overview",M=new Set(g.requiredInputPortIds),N=new Set(g.candidatePortIds),$=new Set(g.previousTimeStepPortIds),k=new Set(g.cycleBreakInputPortIds),H=wKn(g);return _.jsxs("section",{className:`model-node application-node ${x?"overview-node":""} ${g.cyclic?"cyclic":""} ${E?"selected":""}`,"data-testid":`application-node-${g.applicationId}`,style:{width:ebn(g)},children:[x&&_.jsx(gKn,{inputs:nbn(g),outputs:tbn(g)}),_.jsxs("header",{className:"node-header",children:[_.jsxs("div",{children:[_.jsx("div",{className:"process",children:g.name||g.applicationId}),_.jsx("div",{className:"model-type",children:g.modelName})]}),_.jsx(Y0n,{size:18})]}),x?_.jsxs("div",{className:"overview-node-summary",children:[_.jsxs("span",{children:[g.targetCount," targets"]}),_.jsxs("span",{children:[g.inputs.length," in"]}),_.jsxs("span",{children:[g.outputs.length," out"]})]}):_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"node-meta",children:[_.jsxs("span",{className:"meta-chip",title:g.selector.julia,children:[_.jsx(xXn,{size:13})," ",H]}),_.jsxs("span",{className:"meta-chip",title:g.cadence.julia,children:[_.jsx(CXn,{size:13})," ",pKn(g)]})]}),_.jsxs("div",{className:"target-summary",children:[_.jsx("strong",{children:g.targetCount})," concrete target",g.targetCount===1?"":"s"]}),_.jsxs("div",{className:"ports-grid",children:[_.jsx(fue,{title:"Inputs",side:"input",ports:g.inputs,required:M,candidates:N,previous:$,cycleBreaks:k,cycleBreakMode:g.cycleBreakMode,application:g,onCandidateClick:g.onCandidateClick,onPortClick:g.onPortClick,onCycleBreak:g.onCycleBreak}),_.jsx(fue,{title:"Outputs",side:"output",ports:g.outputs,required:M,candidates:N,previous:$,cycleBreaks:k,cycleBreakMode:g.cycleBreakMode,application:g,onCandidateClick:g.onCandidateClick,onPortClick:g.onPortClick,onCycleBreak:g.onCycleBreak})]}),(g.environmentInputs.length>0||g.environmentOutputs.length>0)&&_.jsxs("div",{className:"ports-grid environment-ports",children:[_.jsx(fue,{title:"Environment inputs",side:"input",ports:g.environmentInputs,required:M,candidates:new Set,previous:new Set,cycleBreaks:new Set,cycleBreakMode:!1,application:g,onPortClick:g.onPortClick}),_.jsx(fue,{title:"Environment outputs",side:"output",ports:g.environmentOutputs,required:M,candidates:new Set,previous:new Set,cycleBreaks:new Set,cycleBreakMode:!1,application:g,onPortClick:g.onPortClick})]})]})]})}function bKn({data:g,selected:E}){return _.jsxs("section",{className:`entity-node ${g.nodeKind} ${E?"selected":""}`,"data-testid":`${g.nodeKind}-node`,children:[(g.inputPortIds?.length?g.inputPortIds:[void 0]).map((x,M)=>_.jsx(h5,{id:x,type:"target",position:ur.Left,style:{top:`${Tue(M,g.inputPortIds?.length??1)}%`}},x??"target")),_.jsxs("header",{children:[_.jsx("strong",{children:g.title}),_.jsx("span",{children:g.subtitle})]}),_.jsx("div",{className:"badges",children:g.badges.map(x=>_.jsx("span",{className:"meta-chip",children:x},x))}),(g.outputPortIds?.length?g.outputPortIds:[void 0]).map((x,M)=>_.jsx(h5,{id:x,type:"source",position:ur.Right,style:{top:`${Tue(M,g.outputPortIds?.length??1)}%`}},x??"source"))]})}function fue({title:g,side:E,ports:x,required:M,candidates:N,previous:$,cycleBreaks:k,cycleBreakMode:H,application:U,onCandidateClick:G,onPortClick:ie,onCycleBreak:W}){return _.jsxs("div",{className:`port-column ${E}`,children:[_.jsx("div",{className:"port-title",children:g}),x.map(Z=>_.jsxs("div",{className:`port ${M.has(Z.id)?"required-input":""} ${$.has(Z.id)?"previous":""}`,"data-testid":`port-${E}-${Z.name}`,title:`${Z.name}: ${Z.defaultJulia}`,onClick:se=>{se.stopPropagation(),ie?.(Z)},children:[E==="input"&&_.jsx(h5,{id:Z.id,type:"target",position:ur.Left}),_.jsx("span",{children:Z.name}),N.has(Z.id)&&_.jsx("button",{className:"port-candidate-button nodrag nopan",type:"button",title:E==="input"?"Models that compute this variable":"Models that consume this variable","aria-label":E==="input"?`Models that compute ${Z.name}`:`Models that consume ${Z.name}`,onClick:se=>{se.stopPropagation();const oe=se.currentTarget.getBoundingClientRect();G?.(Z,{x:oe.right,y:oe.top+oe.height/2})},children:_.jsx(SA,{size:11})}),E==="input"&&H&&k.has(Z.id)&&_.jsx("button",{className:"cycle-port-break nodrag nopan",type:"button",title:`Read ${Z.name} from the previous accepted timestep`,"aria-label":`Break cycle at ${U.applicationId}.${Z.name}`,"data-testid":`cycle-break-${U.applicationId}-${Z.name}`,onClick:se=>{se.stopPropagation(),W?.(U,Z)},children:_.jsx(Q0n,{size:12})}),$.has(Z.id)&&_.jsx("small",{className:"previous-label",children:"t-1"}),E==="output"&&_.jsx(h5,{id:Z.id,type:"source",position:ur.Right})]},Z.id))]})}function gKn({inputs:g,outputs:E}){return _.jsxs(_.Fragment,{children:[g.map((x,M)=>_.jsx(h5,{id:x.id,type:"target",position:ur.Left,style:{top:`${Tue(M,g.length)}%`}},x.id)),E.map((x,M)=>_.jsx(h5,{id:x.id,type:"source",position:ur.Right,style:{top:`${Tue(M,E.length)}%`}},x.id))]})}function Tue(g,E){return E<=1?52:28+g/(E-1)*48}function wKn(g){const E=[...g.targetInstances,...g.targetScales,...g.targetKinds];return E.length>0?E.slice(0,2).join(" / "):g.selector.type}function pKn(g){return g.cadence.mode==="default"?"default rate":g.cadence.mode==="period"?`${g.cadence.value} ${g.cadence.unit}`:g.cadence.julia}function mKn({id:g,sourceX:E,sourceY:x,targetX:M,targetY:N,sourcePosition:$=ur.Right,targetPosition:k=ur.Left,markerEnd:H,style:U,data:G}){const[ie,W,Z]=Aue({sourceX:E,sourceY:x,targetX:M,targetY:N,sourcePosition:$,targetPosition:k,borderRadius:14,offset:24}),se=vKn(G);return _.jsxs(_.Fragment,{children:[_.jsx(uq,{id:g,path:ie,markerEnd:H,style:U,interactionWidth:18}),se&&_.jsx(qUn,{children:_.jsx("div",{className:`edge-chip ${G?.kind??""} ${G?.cycle?"cycle":""}`,style:{transform:`translate(-50%, -50%) translate(${W}px, ${Z-12}px)`},children:se})})]})}function vKn(g){return g?g.kind==="manual_call"?g.call||"call":g.kind==="initializer"?g.call||"initializer":g.kind==="object_topology"||g.kind==="application_target"?"":g.sourceVariable&&g.targetVariable?g.sourceVariable===g.targetVariable?g.sourceVariable:`${g.sourceVariable} → ${g.targetVariable}`:g.kind.replaceAll("_"," "):""}const V7e=_ke("source","degree_days","ToyDegreeDaysCumulModel",[],["TT_cu"]),aue=_ke("lai","lai_dynamic","ToyLAIModel",["TT_cu"],["LAI"]),Y7e=_ke("light","light_interception","Beer",["LAI"],["aPPFD"]),ndn={schemaVersion:2,level:"applications",metadata:{title:"PlantSimEngine Model Graph",modelRevision:0,objectCount:1,instanceCount:0,applicationCount:3,executionCount:3,bindingCount:2,callCount:0,unresolvedInitializationCount:1,cyclic:!1,strictlyCompiled:!0,sceneEnvironmentId:null},objects:[{id:"object:plant",objectId:"plant",scale:"Plant",kind:"plant",species:null,name:"plant",instance:null,parent:null,children:[],hasGeometry:!1,hasStatus:!0}],templates:[],instances:[],applications:[V7e,aue,Y7e],executions:[V7e,aue,Y7e].map(g=>({id:`execution:${g.applicationId}:plant`,applicationId:g.applicationId,applicationNodeId:g.id,objectId:"plant",objectNodeId:"object:plant",modelType:g.modelType,modelParameters:{},overridden:!1})),edges:[idn(V7e,"TT_cu",aue,"TT_cu"),idn(aue,"LAI",Y7e,"LAI")],modelLibrary:[],environments:[],initialization:[{applicationId:"source",objectId:"plant",variable:"TT",role:"input",disposition:"unresolved",value:"-Inf",valueJulia:"-Inf",expectedType:"Float64",sourceApplicationIds:[],sourceObjectIds:[],sourceVariable:null,origin:"missing",previousTimeStep:!1}],diagnostics:[],cycles:[],availableActions:["inspect"]};function _ke(g,E,x,M,N){return{id:`application:${g}`,applicationId:g,owner:{scope:"global",applicationId:g,instance:null,templateId:null},name:g,process:E,modelType:x,modelName:x,module:"PlantSimEngine.Examples",package:"PlantSimEngine",modelParameters:{},selector:{type:"One",multiplicity:"one",criteria:{scale:"Plant"},julia:"One(scale=:Plant)"},targetIds:["plant"],targetCount:1,targetScales:["Plant"],targetKinds:["plant"],targetSpecies:[],targetInstances:[],cadence:{mode:"default",value:null,unit:null,julia:"nothing"},clock:null,inputs:M.map($=>tdn(g,"input",$)),outputs:N.map($=>tdn(g,"output",$)),environmentInputs:[],environmentOutputs:[],inputBindings:{},callBindings:{},environment:null,environmentBindings:{},environmentWindow:{mode:"default",value:null,unit:null,julia:"nothing"},outputRouting:{},updates:[],modelStorage:"shared_application",objectOverrides:[]}}function tdn(g,E,x){return{id:`application:${g}:${E}:${x}`,name:x,role:E,default:"-Inf",defaultJulia:"-Inf",expectedType:"Float64"}}function idn(g,E,x,M){return{id:`binding:${g.applicationId}:${E}:${x.applicationId}:${M}`,source:g.id,target:x.id,sourcePort:`application:${g.applicationId}:output:${E}`,targetPort:`application:${x.applicationId}:input:${M}`,sourceVariable:E,targetVariable:M,sourceApplicationId:g.applicationId,targetApplicationId:x.applicationId,kind:"inferred_same_object",cycle:!1,projection:"applications"}}const yKn={application:dKn,entity:bKn},kKn={modelEdge:mKn};function jKn(){const[g,E]=Be.useState(W7e),[x,M]=Be.useState(()=>W7e().level),[N,$]=Be.useState(()=>W7e().metadata.applicationCount>24?"overview":"detail"),[k,H]=Be.useState(""),[U,G]=Be.useState(null),[ie,W]=Be.useState(null),[Z,se]=Be.useState(null),[oe,ee]=Be.useState(null),[Me,pe]=Be.useState(!1),[Pe,ae]=Be.useState(!1),[Ne,Xe]=Be.useState(!1),[ln,on]=Be.useState(!1),[An,xn]=Be.useState(!1),[tt,vn]=Be.useState(""),[wn,Y]=Be.useState(null),[Je,pn]=Be.useState(null),[xe,qe]=Be.useState([]),[fn,$e]=Be.useState(null),[Mn,ye]=Be.useState(!1),[Re,Hn]=Be.useState(!1),[rt,Jt]=Be.useState(!1),[di,Gt]=Be.useState(null),[xt,si]=Be.useState(null),[Kr,Er]=Be.useState(null),[Mt,bi]=Be.useState(!1),[zi,cu]=Be.useState(null),[Fu,Rs]=Be.useState(!1),[ia,ef]=Be.useState(null),[Oa,Cc]=Be.useState(null),[o0,xb]=Be.useState(null),[Sl,cd]=Be.useState(null),[s0,uh]=Be.useState(null),[ud,b5]=Be.useState(!1),[l0,Cp]=Be.useState(null),[l6,Ab,ra]=UUn([]),[od,Sf,f6]=XUn([]),oh=Be.useMemo(JKn,[]),Tp=Be.useMemo(()=>new Map(g.applications.map(vt=>[vt.applicationId,vt])),[g.applications]),Gg=Be.useMemo(()=>new Set(g.initialization.filter(vt=>vt.role==="input"&&vt.disposition==="unresolved").map(vt=>Q7e(vt.applicationId,"input",vt.variable))),[g.initialization]),qg=Be.useMemo(()=>new Set(g.initialization.filter(vt=>vt.role==="input"&&vt.previousTimeStep).map(vt=>Q7e(vt.applicationId,"input",vt.variable))),[g.initialization]),Ug=Be.useMemo(()=>new Set(g.cycles.flatMap(vt=>vt.applicationIds)),[g.cycles]),sd=Be.useMemo(()=>new Set(g.cycles.flatMap(vt=>vt.breakCandidates.map(kc=>Q7e(kc.applicationId,"input",kc.input)))),[g.cycles]),Xg=Be.useMemo(()=>CKn(g),[g]),Mb=Be.useMemo(()=>oe?TKn(g.modelLibrary,oe.port):[],[oe,g.modelLibrary]),g5=Be.useMemo(()=>oe?NKn(g.applications,oe):[],[oe,g.applications]),Op=Be.useMemo(()=>{const vt=new Map;for(const kc of g.applications)for(const tc of[...kc.inputs,...kc.outputs])vt.set(tc.id,{application:kc,port:tc});return vt},[g.applications]),Np=Be.useMemo(()=>ie?new Set(ie.objectIds.map(u6)):null,[ie]);Be.useEffect(()=>{if(!oh?.websocketUrl)return;const vt=new WebSocket(oh.websocketUrl);return $e(vt),vt.addEventListener("open",()=>{ye(!0),Gt(null)}),vt.addEventListener("close",()=>{ye(!1),Gt("Editor connection closed.")}),vt.addEventListener("message",kc=>{const tc=JSON.parse(kc.data);tc.graph&&E(tc.graph),typeof tc.modelCode=="string"&&vn(tc.modelCode),Y(tc.autosavePath??null),pn(tc.savePath??null),qe(tc.recentPaths??[]),tc.selectorPreview&&uh(tc.selectorPreview),tc.targetPreview&&Er(tc.targetPreview),tc.instancePreview&&cu(tc.instancePreview),tc.ok===!1&&(uh(null),Er(null),cu(null)),Hn(!!tc.canUndo),Jt(!!tc.canRedo),Gt(tc.ok===!1?tc.diagnostics?.[0]||"The edit failed.":null)}),()=>vt.close()},[oh?.websocketUrl]),Be.useEffect(()=>{g.metadata.cyclic||(b5(!1),Cp(null))},[g.metadata.cyclic]);const uu=Be.useCallback(vt=>{if(!fn||fn.readyState!==WebSocket.OPEN){Gt("This action requires an interactive Julia editor session.");return}fn.send(JSON.stringify(vt))},[fn]),w5=Be.useCallback((vt,kc,tc)=>{G(vt),se(kc),ee({application:vt,port:kc,x:tc.x,y:tc.y})},[]);Be.useEffect(()=>{const vt=EKn({graph:g,view:x,detailMode:N,query:k,scopedObjectIds:Np,unresolvedPortIds:Gg,previousPortIds:qg,candidatePortIds:Xg,cyclicApplications:Ug,cycleBreakPortIds:sd,cycleBreakMode:ud,openCandidates:w5,onPortClick:se,onCycleBreak:(f0,Yg)=>Cp({application:f0,port:Yg})}),kc=new Set(vt.map(f0=>f0.id)),tc=SKn(g,x).filter(f0=>kc.has(f0.source)&&kc.has(f0.target));lKn(vt,tc,x==="topology"?"topology":N==="overview"?"overview":"data_flow").then(Ab),Sf(tc)},[Xg,ud,sd,Ug,N,g,w5,qg,k,Np,Sf,Ab,Gg,x]);const Kg=Be.useCallback((vt,kc)=>{if(kc.data.nodeKind==="application")G(Tp.get(kc.data.applicationId)??null);else if(G(kc.data.detail),kc.data.nodeKind==="object"){const tc=kc.data.detail;W({label:`subtree ${tc.name||String(tc.objectId)}`,objectIds:AKn(g.objects,tc.objectId)})}else if(kc.data.nodeKind==="instance"){const tc=kc.data.detail;W({label:`instance ${tc.name}`,objectIds:tc.objectIds})}else kc.data.nodeKind==="model"&&W(null);se(null)},[Tp,g.objects]),rv=Be.useCallback(vt=>{oe&&(Er(null),si({mode:"add",initialModelType:vt.type,suggestedSelector:FKn(oe.application)}),Mn||Gt(`${vt.name} matches ${oe.port.name}. Start an interactive Julia editor session to add it to the composite model.`),ee(null))},[oe,Mn]),p5=Be.useCallback(vt=>{if(!Mn){Gt("Adding or updating an application requires an interactive Julia editor session."),si(null);return}uu({action:"edit",kind:vt.applicationRef?"update_application":"add_application",...vt}),si(null)},[Mn,uu]),Vg=Be.useCallback(vt=>{if(!Mn){Gt("Adding a template instance requires an interactive Julia editor session.");return}uu({action:"edit",kind:"add_instance",...vt}),bi(!1),cu(null)},[Mn,uu]),cv=Be.useCallback(vt=>{if(!Mn){Gt("Creating a binding requires an interactive Julia editor session."),cd(null);return}uu({action:"edit",kind:"set_input_binding",...vt}),cd(null)},[Mn,uu]),m5=Be.useCallback(vt=>{if(!Mn){Gt("Adding or updating an object requires an interactive Julia editor session."),ef(null);return}uu({action:"edit",kind:ia?.mode==="update"?"update_object":"add_object",objectId:vt.objectId,configuration:vt.configuration}),ef(null)},[Mn,ia?.mode,uu]),v5=Be.useCallback(vt=>{if(!Mn){Gt("Creating an override requires an interactive Julia editor session."),Cc(null);return}uu({action:"edit",kind:vt.scope==="instance"?"set_instance_override":"set_object_override",...vt}),Cc(null)},[Mn,uu]),b1=Be.useCallback(vt=>{if(!Mn){Gt("Removing an override requires an interactive Julia editor session.");return}uu({action:"edit",kind:vt.scope==="instance"?"remove_instance_override":"remove_object_override",...vt}),Cc(null)},[Mn,uu]),Ws=Be.useCallback(vt=>{if(!vt.sourceHandle||!vt.targetHandle)return;const kc=Op.get(vt.sourceHandle),tc=Op.get(vt.targetHandle);if(!kc||!tc||kc.port.role!=="output"||tc.port.role!=="input"){Gt("Connect an application output to an application input.");return}cd({sourceApplication:kc.application,sourcePort:kc.port,targetApplication:tc.application,targetPort:tc.port}),uh(null)},[Op]),xf=Be.useMemo(()=>{if(!U)return g.initialization;if("applicationId"in U)return g.initialization.filter(vt=>vt.applicationId===U.applicationId);if("objectId"in U)return g.initialization.filter(vt=>String(vt.objectId)===String(U.objectId));if("objectIds"in U){const vt=new Set(U.objectIds.map(u6));return g.initialization.filter(kc=>vt.has(u6(kc.objectId)))}return g.initialization},[g.initialization,U]);return _.jsxs("main",{className:"model-editor-shell","data-testid":"model-graph-viewer",children:[_.jsxs("header",{className:"model-toolbar",children:[_.jsxs("div",{className:"model-brand",children:[_.jsx("span",{className:"brand-mark"}),_.jsxs("div",{children:[_.jsx("small",{children:"PLANTSIMENGINE"}),_.jsx("strong",{children:"Model Graph"})]})]}),_.jsxs("div",{className:"model-search",children:[_.jsx(PXn,{size:17}),_.jsx("input",{value:k,onChange:vt=>H(vt.target.value),placeholder:"Search application, object, or variable"}),k&&_.jsx("button",{"aria-label":"Clear search",onClick:()=>H(""),children:_.jsx(Jg,{size:15})})]}),_.jsxs("div",{className:"model-counts",children:[_.jsxs("span",{children:[g.metadata.applicationCount," applications"]}),_.jsxs("span",{children:[g.metadata.objectCount," objects"]}),g.metadata.unresolvedInitializationCount>0&&_.jsxs("button",{className:"count-warning",onClick:()=>ae(!0),children:[_.jsx(MXn,{size:14})," ",g.metadata.unresolvedInitializationCount," init"]}),g.diagnostics.length>0&&_.jsxs("button",{className:"count-error",onClick:()=>pe(!0),children:[_.jsx(dke,{size:14})," ",g.diagnostics.length]})]}),_.jsxs("nav",{className:"view-tabs","aria-label":"Graph projection",children:[_.jsxs("button",{className:x==="applications"?"active":"",onClick:()=>M("applications"),children:[_.jsx(Y0n,{size:15})," Applications"]}),_.jsxs("button",{className:x==="topology"?"active":"",onClick:()=>M("topology"),children:[_.jsx(NXn,{size:15})," Objects"]}),_.jsxs("button",{className:x==="resolved"?"active":"",onClick:()=>M("resolved"),children:[_.jsx(IXn,{size:15})," Executions"]})]}),_.jsxs("div",{className:"model-actions",children:[oh&&_.jsxs("button",{"data-testid":"open-model",onClick:()=>on(!0),children:[_.jsx(OXn,{size:15})," Open"]}),oh&&_.jsxs("button",{"data-testid":"save-model",onClick:()=>xn(!0),children:[_.jsx(LXn,{size:15})," ",Je?"Saved":"Save"]}),x!=="topology"&&_.jsx("button",{className:N==="overview"?"overview-cta":"",onClick:()=>$(vt=>vt==="overview"?"detail":"overview"),children:N==="overview"?"Overview Mode - Show Detailed View":"Show Overview"}),oh&&_.jsxs("button",{"data-testid":"add-application",onClick:()=>{Er(null),si({mode:"add"})},children:[_.jsx(SA,{size:15})," Add application"]}),oh&&_.jsxs("button",{"data-testid":"add-object",onClick:()=>ef({mode:"add"}),children:[_.jsx(SA,{size:15})," Add object"]}),oh&&g.templates.length>0&&_.jsxs("button",{"data-testid":"add-instance",onClick:()=>{cu(null),bi(!0)},children:[_.jsx(SA,{size:15})," Add instance"]}),oh&&_.jsx("button",{"data-testid":"configure-environment",onClick:()=>Rs(!0),children:"Environment"}),oh&&_.jsx("button",{disabled:!Re,onClick:()=>uu({action:"undo"}),"aria-label":"Undo",children:_.jsx($Xn,{size:15})}),oh&&_.jsx("button",{disabled:!rt,onClick:()=>uu({action:"redo"}),"aria-label":"Redo",children:_.jsx(DXn,{size:15})}),_.jsxs("button",{onClick:()=>Xe(!0),children:[_.jsx(TXn,{size:15})," Model code"]})]})]}),g.metadata.cyclic&&_.jsxs("section",{className:"cycle-callout","data-testid":"cycle-callout",children:[_.jsx(dke,{size:19}),_.jsxs("div",{children:[_.jsx("strong",{children:"Current-step dependency cycle"}),_.jsx("span",{children:"Select a cycle input to read its previous accepted timestep value."})]}),_.jsx("button",{className:ud?"active":"",onClick:()=>{M("applications"),$("detail"),b5(vt=>!vt)},"data-testid":"choose-cycle-break",children:ud?"Cancel break selection":"Choose a break point in graph"})]}),di&&_.jsxs("div",{className:"editor-feedback",children:[di,_.jsx("button",{onClick:()=>Gt(null),children:_.jsx(Jg,{size:14})})]}),ie&&_.jsxs("section",{className:"graph-scope-filter","data-testid":"graph-scope-filter",children:[_.jsxs("span",{children:["Showing ",x==="resolved"?"executions":x==="applications"?"applications":"topology"," for ",_.jsx("strong",{children:ie.label})," (",ie.objectIds.length," objects)"]}),x==="topology"&&_.jsx("button",{onClick:()=>M("applications"),children:"Show related applications"}),_.jsxs("button",{"aria-label":"Clear graph scope",onClick:()=>W(null),children:[_.jsx(Jg,{size:14})," Clear"]})]}),_.jsxs("section",{className:"model-workspace",children:[_.jsx("div",{className:"flow-wrap",children:_.jsxs(HUn,{nodes:l6,edges:od,nodeTypes:yKn,edgeTypes:kKn,onNodesChange:ra,onEdgesChange:f6,onConnect:Ws,onNodeClick:Kg,onEdgeClick:(vt,kc)=>G(kc.data??null),fitView:!0,minZoom:.05,maxZoom:2,children:[_.jsx(WUn,{color:"#d8cdbc",gap:22,size:1}),_.jsx(cXn,{}),_.jsx(mXn,{pannable:!0,zoomable:!0})]})}),_.jsx(DKn,{selection:U,port:Z,initialization:xf,interactive:Mn,onEditApplication:vt=>{Er(null),si({mode:"update",application:vt})},onRemoveApplication:vt=>uu({action:"edit",kind:"remove_application",applicationRef:vt.owner}),onConfigureApplication:vt=>xb(vt.applicationId),onOverrideApplication:Cc,onRemoveInstance:vt=>uu({action:"edit",kind:"remove_instance",name:vt.name}),onEditObject:vt=>ef({mode:"update",object:vt}),onRemoveObject:vt=>uu({action:"edit",kind:"remove_object",objectId:vt.objectId,recursive:!0})})]}),oe&&(Mb.length>0||g5.length>0)&&_.jsx(OKn,{candidate:oe,models:Mb,applications:g5,onSelectModel:rv,onSelectApplication:vt=>{cd(IKn(oe,vt)),uh(null),ee(null)},onClose:()=>ee(null)}),Me&&_.jsx(_Kn,{graph:g,onClose:()=>pe(!1),sendCommand:uu,interactive:Mn}),Pe&&_.jsx(LKn,{graph:g,onClose:()=>ae(!1),sendCommand:uu,interactive:Mn}),Ne&&_.jsx($Kn,{code:tt,onClose:()=>Xe(!1)}),ln&&_.jsx(odn,{mode:"open",recentPaths:xe,currentPath:Je,autosavePath:wn,onSubmit:vt=>{uu({action:"open_model_code",path:vt}),on(!1)},onClose:()=>on(!1)}),An&&_.jsx(odn,{mode:"save",recentPaths:xe,currentPath:Je,autosavePath:wn,onSubmit:vt=>{uu({action:"save_model_code",path:vt}),xn(!1)},onClose:()=>xn(!1)}),xt&&_.jsx(RXn,{mode:xt.mode,models:g.modelLibrary,objects:g.objects,application:xt.application,initialModelType:xt.initialModelType,suggestedSelector:xt.suggestedSelector,nameReadOnly:xt.application?.owner.scope==="template",preview:Kr,onPreview:vt=>{Er(null),uu({action:"preview_application_targets",selector:vt,applicationRef:xt.application?.owner})},onSubmit:p5,onClose:()=>{si(null),Er(null)}}),Sl&&_.jsx(XXn,{endpoints:Sl,objects:g.objects,preview:s0,onPreview:vt=>{uh(null),uu({action:"preview_input_binding",...vt})},onSubmit:cv,onClose:()=>{cd(null),uh(null)}}),ia&&_.jsx(tKn,{mode:ia.mode,objects:g.objects,object:ia.object,onSubmit:m5,onClose:()=>ef(null)}),Mt&&_.jsx(eKn,{templates:g.templates,instances:g.instances,objects:g.objects,preview:zi,onPreview:vt=>{cu(null),uu({action:"preview_instance",...vt})},onSubmit:Vg,onClose:()=>{bi(!1),cu(null)}}),Fu&&_.jsx(ZXn,{environments:g.environments,activeId:g.metadata.sceneEnvironmentId,onSubmit:vt=>{uu({action:"edit",kind:"set_model_environment",environmentId:vt}),Rs(!1)},onClose:()=>Rs(!1)}),Oa&&_.jsx(rKn,{application:Oa,models:g.modelLibrary,instances:g.instances,onSubmit:v5,onRemove:b1,onClose:()=>Cc(null)}),o0&&Tp.get(o0)&&_.jsx(HXn,{application:Tp.get(o0),applications:g.applications,environments:g.environments,models:g.modelLibrary,onCommand:uu,onClose:()=>xb(null)}),l0&&_.jsx(RKn,{selection:l0,initialization:g.initialization,onSubmit:(vt,kc)=>{uu({action:"edit",kind:"break_cycle",applicationRef:l0.application.owner,input:l0.port.name,initializeMissing:vt,initialValue:kc}),Cp(null)},onClose:()=>Cp(null)})]})}function EKn({graph:g,view:E,detailMode:x,query:M,scopedObjectIds:N,unresolvedPortIds:$,previousPortIds:k,candidatePortIds:H,cyclicApplications:U,cycleBreakPortIds:G,cycleBreakMode:ie,openCandidates:W,onPortClick:Z,onCycleBreak:se}){const oe=Me=>!M||JSON.stringify(Me).toLowerCase().includes(M.toLowerCase());if(E==="topology"){const Me={entity:"model",objectCount:g.metadata.objectCount,instanceCount:g.metadata.instanceCount,applicationCount:g.metadata.applicationCount},pe={id:"model:root",type:"entity",position:{x:0,y:0},data:{nodeKind:"model",title:g.metadata.title||"Composite model",subtitle:"model root",badges:[`${g.metadata.instanceCount} instances`,`${g.metadata.objectCount} objects`],detail:Me}},Pe=g.templates.filter(oe).map(Xe=>({id:`template:${Xe.id}`,type:"entity",position:{x:0,y:0},data:{nodeKind:"template",title:Xe.name,subtitle:Xe.source==="catalog"?"template preset":"model-local template",badges:[`${Xe.applications.length} applications`,`${Xe.mountedInstances.length} mounts`],detail:Xe}})),ae=g.instances.filter(oe).map(Xe=>({id:Xe.id,type:"entity",position:{x:0,y:0},data:{nodeKind:"instance",title:Xe.name,subtitle:[Xe.kind,Xe.species].filter(Boolean).join(" · ")||"object instance",badges:[`${Xe.objectIds.length} objects`,`${Xe.applicationIds.length} applications`,`${Xe.instanceOverrides.length+Xe.objectOverrides.length} overrides`],detail:Xe}})),Ne=g.objects.filter(oe).map(Xe=>({id:Xe.id,type:"entity",position:{x:0,y:0},data:{nodeKind:"object",title:Xe.name||String(Xe.objectId),subtitle:[Xe.kind,Xe.scale,Xe.instance].filter(Boolean).join(" · "),badges:[Xe.species,Xe.hasStatus?"status":null,Xe.hasGeometry?"geometry":null].filter(Boolean),detail:Xe}}));return[pe,...Pe,...ae,...Ne]}if(E==="resolved"){const Me=new Map(g.applications.map(Pe=>[Pe.applicationId,Pe]));return[...g.executions.filter(Pe=>!N||N.has(u6(Pe.objectId))).filter(oe).map(Pe=>{const ae=Me.get(Pe.applicationId);return{id:Pe.id,type:"entity",position:{x:0,y:0},data:{nodeKind:"execution",title:Pe.applicationId,subtitle:`object ${String(Pe.objectId)}`,badges:[zKn(Pe.modelType),Pe.overridden?"override":"shared"],inputPortIds:[...ae?.inputs??[],...ae?.environmentInputs??[]].map(Ne=>Ne.id),outputPortIds:[...ae?.outputs??[],...ae?.environmentOutputs??[]].map(Ne=>Ne.id),detail:Pe}}}),...rdn(g,"resolved")]}return[...g.applications.filter(Me=>!N||Me.targetIds.some(pe=>N.has(u6(pe)))).filter(oe).map(Me=>({id:Me.id,type:"application",position:{x:0,y:0},data:{...Me,nodeKind:"application",detailMode:x,cyclic:U.has(Me.applicationId),requiredInputPortIds:Me.inputs.filter(pe=>$.has(pe.id)).map(pe=>pe.id),candidatePortIds:[...Me.inputs,...Me.outputs].filter(pe=>H.has(pe.id)).map(pe=>pe.id),previousTimeStepPortIds:Me.inputs.filter(pe=>k.has(pe.id)).map(pe=>pe.id),cycleBreakInputPortIds:Me.inputs.filter(pe=>G.has(pe.id)).map(pe=>pe.id),cycleBreakMode:ie,onCandidateClick:(pe,Pe)=>W(Me,pe,Pe),onPortClick:Z,onCycleBreak:se}})),...rdn(g,"applications")]}function rdn(g,E){const x=g.edges.filter(N=>N.kind==="environment_binding"&&N.projection===E);return[...new Set(x.flatMap(N=>[N.source,N.target]).filter(N=>N.startsWith("environment:")))].map(N=>{const $=N.slice(12),k=g.environments.find(G=>G.id===N),H=cdn(x.filter(G=>G.target===N).map(G=>G.targetPort).filter(Boolean)),U=cdn(x.filter(G=>G.source===N).map(G=>G.sourcePort).filter(Boolean));return{id:N,type:"entity",position:{x:0,y:0},data:{nodeKind:"environment",title:k?.name||$,subtitle:k?.active?"active scene environment":"environment backend",badges:[`${U.length} inputs`,`${H.length} outputs`],inputPortIds:H,outputPortIds:U,detail:k||{provider:$}}}})}function cdn(g){return[...new Set(g)]}function SKn(g,E){return(E==="topology"?[...g.edges,...xKn(g)]:g.edges).filter(M=>MKn(M,E)).map(M=>({id:M.id,source:M.source,target:M.target,sourceHandle:M.sourcePort||void 0,targetHandle:M.targetPort||void 0,type:"modelEdge",data:M,markerEnd:{type:VG.ArrowClosed,color:udn(M),width:16,height:16},style:{stroke:udn(M),strokeWidth:M.cycle?4:["manual_call","initializer"].includes(M.kind)?2.5:1.8,strokeDasharray:M.kind==="previous_timestep"?"7 5":M.kind==="manual_call"?"3 4":M.kind==="initializer"?"8 3":void 0}}))}function xKn(g){const E=[],x=new Set(g.instances.flatMap(M=>M.objectIds.map(u6)));for(const M of g.templates)E.push({id:`topology:model:template:${M.id}`,source:"model:root",target:`template:${M.id}`,kind:"object_topology",projection:"topology",cycle:!1});for(const M of g.instances)E.push({id:`topology:${M.id}:object:${String(M.rootId)}`,source:M.id,target:`object:${String(M.rootId)}`,kind:"object_topology",projection:"topology",cycle:!1});for(const M of g.objects)M.parent===null&&!x.has(u6(M.objectId))&&E.push({id:`topology:model:${M.id}`,source:"model:root",target:M.id,kind:"object_topology",projection:"topology",cycle:!1});return E}function AKn(g,E){const x=new Map;for(const k of g){if(k.parent===null)continue;const H=u6(k.parent);x.set(H,[...x.get(H)??[],k.objectId])}const M=[],N=[E],$=new Set;for(;N.length>0;){const k=N.pop(),H=u6(k);$.has(H)||($.add(H),M.push(k),N.push(...x.get(H)??[]))}return M}function u6(g){const E=String(g);return E.startsWith("object:")?E.slice(7):E}function MKn(g,E){const x=g.projection;return E==="topology"?g.kind==="object_topology"||g.kind==="template_mount":E==="resolved"?x==="resolved":x==="applications"||!x&&!["object_topology","application_target"].includes(g.kind)}function udn(g){return g.cycle?"#cf4937":g.kind==="previous_timestep"?"#317b62":g.kind==="manual_call"?"#be6a54":g.kind==="initializer"?"#7768ae":g.kind==="object_topology"?"#7b7167":g.kind==="environment_binding"?"#367b8b":"#a59687"}function CKn(g){const E=new Set;for(const x of g.applications){for(const M of x.inputs)(g.applications.some($=>$.applicationId!==x.applicationId&&$.outputs.some(k=>k.name===M.name))||g.modelLibrary.some($=>Object.prototype.hasOwnProperty.call($.outputs,M.name)))&&E.add(M.id);for(const M of x.outputs)(g.applications.some($=>$.applicationId!==x.applicationId&&$.inputs.some(k=>k.name===M.name))||g.modelLibrary.some($=>Object.prototype.hasOwnProperty.call($.inputs,M.name)))&&E.add(M.id)}return E}function TKn(g,E){const x=E.role==="input"?"outputs":"inputs";return g.filter(M=>Object.prototype.hasOwnProperty.call(M[x],E.name)).sort((M,N)=>`${M.package}.${M.name}`.localeCompare(`${N.package}.${N.name}`))}function OKn({candidate:g,models:E,applications:x,onSelectModel:M,onSelectApplication:N,onClose:$}){const k=g.port.role==="input"?`Models that compute ${g.port.name}`:`Models that consume ${g.port.name}`;return _.jsxs("section",{className:"candidate-popover",style:{left:Math.min(g.x+8,window.innerWidth-390),top:Math.min(g.y-20,window.innerHeight-480)},children:[_.jsxs("header",{children:[_.jsxs("div",{children:[_.jsx("strong",{children:k}),_.jsx("span",{children:"Exact declared variable-name matches"})]}),_.jsx("button",{onClick:$,children:_.jsx(Jg,{size:15})})]}),_.jsxs("div",{className:"candidate-list",children:[x.length>0&&_.jsx("div",{className:"candidate-section-label",children:"Existing applications"}),x.map(H=>_.jsxs("button",{className:"candidate-card existing",onClick:()=>N(H),children:[_.jsx("strong",{children:H.name||H.applicationId}),_.jsx("span",{children:H.modelName}),_.jsxs("small",{children:[H.targetCount," target",H.targetCount===1?"":"s"]}),_.jsx("div",{children:"Connect without adding another application"})]},H.applicationId)),E.length>0&&_.jsx("div",{className:"candidate-section-label",children:"Available models"}),E.map(H=>_.jsxs("button",{className:"candidate-card",onClick:()=>M(H),children:[_.jsx("strong",{children:H.name}),_.jsx("span",{children:H.process}),_.jsx("small",{children:H.package||H.module}),_.jsxs("div",{children:[Object.keys(H.inputs).length," inputs · ",Object.keys(H.outputs).length," outputs"]})]},H.type))]})]})}function NKn(g,E){return g.filter(x=>x.applicationId!==E.application.applicationId).filter(x=>(E.port.role==="input"?x.outputs:x.inputs).some(N=>N.name===E.port.name)).sort((x,M)=>x.applicationId.localeCompare(M.applicationId))}function IKn(g,E){if(g.port.role==="input"){const M=E.outputs.find(N=>N.name===g.port.name);if(!M)throw new Error(`Application ${E.applicationId} does not output ${g.port.name}.`);return{sourceApplication:E,sourcePort:M,targetApplication:g.application,targetPort:g.port}}const x=E.inputs.find(M=>M.name===g.port.name);if(!x)throw new Error(`Application ${E.applicationId} does not input ${g.port.name}.`);return{sourceApplication:g.application,sourcePort:g.port,targetApplication:E,targetPort:x}}function DKn({selection:g,port:E,initialization:x,interactive:M,onEditApplication:N,onConfigureApplication:$,onRemoveApplication:k,onOverrideApplication:H,onRemoveInstance:U,onEditObject:G,onRemoveObject:ie}){const W=g&&"applicationId"in g&&"selector"in g?g:null,Z=g&&"objectId"in g&&!("applicationId"in g)?g:null,se=g&&"templateId"in g&&"objectIds"in g?g:null;return _.jsxs("aside",{className:"model-inspector",children:[_.jsxs("header",{children:[_.jsx("strong",{children:"Inspector"}),g&&_.jsx("span",{children:BKn(g)})]}),!g&&_.jsxs("div",{className:"empty-inspector",children:[_.jsx(AXn,{size:28}),_.jsx("p",{children:"Select an application, object, execution, or relationship."})]}),g&&_.jsx("pre",{children:JSON.stringify(g,null,2)}),W&&M&&_.jsxs("div",{className:"inspector-actions",children:[_.jsx("button",{onClick:()=>N(W),children:W.owner.scope==="template"?"Edit shared template":"Edit application"}),_.jsx("button",{"data-testid":"configure-application",onClick:()=>$(W),children:"Configure coupling"}),W.owner.scope==="template"&&_.jsx("button",{onClick:()=>H(W),children:"Create override"}),_.jsx("button",{className:"danger",onClick:()=>k(W),children:W.owner.scope==="template"?"Remove from shared template":"Remove application"})]}),se&&M&&_.jsxs("div",{className:"inspector-actions",children:[_.jsx("button",{className:"danger",onClick:()=>U(se),children:"Unmount instance"}),_.jsx("small",{children:"The object subtree is retained."})]}),Z&&M&&_.jsxs("div",{className:"inspector-actions",children:[_.jsx("button",{onClick:()=>G(Z),children:"Edit object"}),_.jsx("button",{className:"danger",onClick:()=>ie(Z),children:"Remove object and descendants"})]}),E&&_.jsxs("section",{children:[_.jsx("h4",{children:"Selected variable"}),_.jsx("code",{children:E.name}),_.jsx("p",{children:E.expectedType})]}),g&&x.length>0&&_.jsxs("section",{className:"inspector-initialization",children:[_.jsx("h4",{children:"Initialization"}),x.slice(0,8).map(oe=>_.jsxs("div",{children:[_.jsx("code",{children:oe.variable}),_.jsx("span",{className:oe.disposition==="unresolved"?"unresolved":"",children:oe.disposition})]},`${oe.applicationId}:${oe.objectId}:${oe.variable}`))]})]})}function _Kn({graph:g,onClose:E,sendCommand:x,interactive:M}){return _.jsxs(Fue,{title:"Diagnostics and cycles",onClose:E,children:[g.diagnostics.map(N=>_.jsxs("article",{className:"diagnostic-card",children:[_.jsx("strong",{children:N.code}),_.jsx("p",{children:N.message}),N.suggestions.map($=>_.jsx("small",{children:$},$))]},`${N.code}:${N.message}`)),g.cycles.map(N=>_.jsxs("article",{className:"cycle-card",children:[_.jsx("strong",{children:N.applicationIds.join(" → ")}),_.jsx("p",{children:"Choose an input to read from the previous timestep."}),N.breakCandidates.map($=>{const k=g.applications.find(H=>H.applicationId===$.applicationId)?.owner;return _.jsxs("button",{disabled:!M||!k,onClick:()=>k&&x({action:"edit",kind:"mark_previous_timestep",applicationRef:k,input:$.input}),children:[$.applicationId,".",$.input]},`${$.applicationId}:${$.objectId}:${$.input}`)})]},N.id)),g.diagnostics.length===0&&g.cycles.length===0&&_.jsx("p",{children:"No diagnostics."})]})}function LKn({graph:g,onClose:E,sendCommand:x,interactive:M}){const N=g.initialization.filter(k=>k.disposition==="unresolved"),$=new Map;for(const k of N){const H=`${k.applicationId}:${k.variable}`;$.set(H,[...$.get(H)||[],k])}return _.jsxs(Fue,{title:"Initialization",onClose:E,children:[[...$.entries()].map(([k,H])=>_.jsx(PKn,{rows:H,interactive:M,sendCommand:x},k)),N.length===0&&_.jsx("p",{children:"No unresolved initial values."})]})}function PKn({rows:g,interactive:E,sendCommand:x}){const[M,N]=Be.useState("float"),[$,k]=Be.useState(""),H=g[0],U={type:M,value:$};return _.jsxs("article",{className:"initialization-group",children:[_.jsxs("header",{children:[_.jsxs("div",{children:[_.jsx("strong",{children:H.variable}),_.jsx("span",{children:H.applicationId})]}),_.jsxs("small",{children:[g.length," object",g.length===1?"":"s"," · expected ",H.expectedType]})]}),_.jsx("p",{children:"Required because the input has no producer, environment source, status value, or usable temporal initialization."}),E&&_.jsxs("div",{className:"initialization-value",children:[_.jsxs("label",{children:["Type",_.jsxs("select",{value:M,onChange:G=>N(G.target.value),children:[_.jsx("option",{value:"float",children:"Float"}),_.jsx("option",{value:"integer",children:"Integer"}),_.jsx("option",{value:"boolean",children:"Boolean"}),_.jsx("option",{value:"symbol",children:"Symbol"}),_.jsx("option",{value:"string",children:"String"}),_.jsx("option",{value:"julia",children:"Julia expression"})]})]}),_.jsxs("label",{children:["Value",_.jsx("input",{value:$,onChange:G=>k(G.target.value)})]}),_.jsx("button",{disabled:!$.trim(),onClick:()=>x({action:"edit",kind:"set_object_statuses",objectIds:g.map(G=>G.objectId),variable:H.variable,value:U}),children:"Set all targets"})]}),_.jsx("div",{className:"initialization-object-list",children:g.map(G=>_.jsxs("div",{children:[_.jsxs("span",{children:["Object ",String(G.objectId)]}),_.jsx("code",{children:G.origin}),E&&_.jsx("button",{disabled:!$.trim(),onClick:()=>x({action:"edit",kind:"set_object_status",objectId:G.objectId,variable:G.variable,value:U}),children:"Set this object"})]},String(G.objectId)))})]})}function $Kn({code:g,onClose:E}){return _.jsx(Fue,{title:"Model code",onClose:E,children:_.jsx("pre",{className:"model-code",children:g||"Model code is available from an interactive editor session."})})}function odn({mode:g,recentPaths:E,currentPath:x,autosavePath:M,onSubmit:N,onClose:$}){const[k,H]=Be.useState(x||"");return _.jsx(Fue,{title:g==="open"?"Open Model":"Save Model",onClose:$,children:_.jsxs("div",{className:"model-file-dialog",children:[_.jsx("p",{children:g==="open"?"Open a Julia script whose final binding is `model = CompositeModel(...)`. Future edits will be saved back to that file.":"After the first save, every successful graph edit automatically rewrites this Julia script."}),_.jsxs("label",{children:["Julia file path",_.jsxs("div",{className:"model-path-input",children:[_.jsx("input",{value:k,onChange:U=>H(U.target.value),placeholder:"/absolute/path/to/model.jl",autoFocus:!0}),_.jsx("button",{className:"primary",disabled:!k.trim(),onClick:()=>N(k.trim()),children:g==="open"?"Open":"Save"})]})]}),g==="open"&&E.length>0&&_.jsxs("section",{children:[_.jsx("strong",{children:"Recent models"}),_.jsx("div",{className:"recent-model-list",children:E.map(U=>_.jsxs("button",{onClick:()=>N(U),children:[_.jsx("span",{children:U.split("/").at(-1)}),_.jsx("small",{children:U})]},U))})]}),g==="open"&&M&&_.jsxs("section",{children:[_.jsx("strong",{children:"Recovery autosave"}),_.jsx("button",{className:"recovery-path",onClick:()=>N(M),children:M})]}),_.jsx("small",{children:"Use Git to version saved composite-model scripts and review scientific configuration changes."})]})})}function RKn({selection:g,initialization:E,onSubmit:x,onClose:M}){const N=E.filter(G=>G.applicationId===g.application.applicationId&&G.variable===g.port.name&&G.disposition!=="supplied"),[$,k]=Be.useState("float"),[H,U]=Be.useState("");return _.jsx("div",{className:"overlay-backdrop",onMouseDown:M,children:_.jsxs("section",{className:"overlay-panel cycle-break-dialog",onMouseDown:G=>G.stopPropagation(),"data-testid":"cycle-break-dialog",children:[_.jsxs("header",{children:[_.jsxs("div",{children:[_.jsx("strong",{children:"Break the current-step cycle"}),_.jsxs("span",{children:[g.application.applicationId,".",g.port.name]})]}),_.jsx("button",{onClick:M,children:_.jsx(Jg,{size:17})})]}),_.jsxs("div",{className:"overlay-content",children:[_.jsx("p",{children:"This changes the application input to read its value from the previous accepted timestep. The model is disconnected from the current value during each run step."}),_.jsxs("div",{className:"cycle-impact",children:[_.jsx("strong",{children:"Application-wide change"}),_.jsxs("span",{children:["It affects all ",g.application.targetCount," targets selected by this application."]})]}),N.length>0&&_.jsxs("fieldset",{children:[_.jsx("legend",{children:"Required initial value"}),_.jsxs("p",{children:[N.length," target",N.length===1?"":"s"," need a value before the first timestep."]}),_.jsxs("div",{className:"form-grid",children:[_.jsxs("label",{children:["Value type",_.jsxs("select",{value:$,onChange:G=>k(G.target.value),children:[_.jsx("option",{value:"float",children:"Float"}),_.jsx("option",{value:"integer",children:"Integer"}),_.jsx("option",{value:"boolean",children:"Boolean"}),_.jsx("option",{value:"symbol",children:"Symbol"}),_.jsx("option",{value:"string",children:"String"}),_.jsx("option",{value:"julia",children:"Julia expression"})]})]}),_.jsxs("label",{children:["Initial value",_.jsx("input",{value:H,onChange:G=>U(G.target.value),autoFocus:!0})]})]})]})]}),_.jsxs("footer",{children:[_.jsx("button",{onClick:M,children:"Cancel"}),_.jsxs("button",{className:"primary",disabled:N.length>0&&!H.trim(),onClick:()=>x(N.length>0,N.length>0?{type:$,value:H}:null),"data-testid":"confirm-cycle-break",children:[_.jsx(Q0n,{size:15})," Use previous timestep"]})]})]})})}function Fue({title:g,onClose:E,children:x}){return _.jsx("div",{className:"overlay-backdrop",onMouseDown:E,children:_.jsxs("section",{className:"overlay-panel",onMouseDown:M=>M.stopPropagation(),children:[_.jsxs("header",{children:[_.jsx("strong",{children:g}),_.jsx("button",{onClick:E,children:_.jsx(Jg,{size:17})})]}),_.jsx("div",{className:"overlay-content",children:x})]})})}function BKn(g){return"applicationId"in g?g.applicationId:"objectId"in g?String(g.objectId):"objectIds"in g?g.name:"entity"in g?"Composite model":"provider"in g?g.provider:"name"in g?g.name:g.kind.replaceAll("_"," ")}function zKn(g){return g.split(".").at(-1)||g}function FKn(g){const E={selectors:[]};return g.targetInstances.length===0&&g.targetScales.length===1&&(E.scale=g.targetScales[0]),g.targetKinds.length===1&&(E.kind=g.targetKinds[0]),g.targetSpecies.length===1&&(E.species=g.targetSpecies[0]),{type:g.targetCount===1?"One":"Many",multiplicity:g.targetCount===1?"one":"many",criteria:E,julia:""}}function Q7e(g,E,x){return`application:${g}:${E}:${x}`}function W7e(){const g=document.getElementById("pse-model-graph-data");if(!g?.textContent)return ndn;try{return JSON.parse(g.textContent)}catch{return ndn}}function JKn(){const g=document.getElementById("pse-editor-config");if(!g?.textContent)return null;try{return JSON.parse(g.textContent)}catch{return null}}class HKn extends Be.Component{state={error:null};static getDerivedStateFromError(E){return{error:E}}componentDidCatch(E,x){console.error("PlantSimEngine model graph frontend failed",E,x)}render(){return this.state.error?_.jsxs("main",{className:"frontend-error","data-testid":"frontend-error",children:[_.jsx(dke,{size:28}),_.jsx("h1",{children:"The graph view could not be rendered"}),_.jsx("p",{children:this.state.error.message}),_.jsxs("button",{onClick:()=>window.location.reload(),children:[_.jsx(_Xn,{size:15})," Reload graph"]})]}):this.props.children}}hzn.createRoot(document.getElementById("root")).render(_.jsx(Be.StrictMode,{children:_.jsx(HKn,{children:_.jsx(jKn,{})})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index cd68b8a4a..eac7b989d 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -4,7 +4,7 @@ PlantSimEngine Dependency Graph - + diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 4f1c646e4..46ffbdbd3 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -736,8 +736,8 @@ function buildEdges(graph: ModelGraphView, view: GraphViewMode): FlowEdge[] { markerEnd: { type: MarkerType.ArrowClosed, color: edgeColor(edge), width: 16, height: 16 }, style: { stroke: edgeColor(edge), - strokeWidth: edge.cycle ? 4 : edge.kind === "manual_call" ? 2.5 : 1.8, - strokeDasharray: edge.kind === "previous_timestep" ? "7 5" : edge.kind === "manual_call" ? "3 4" : undefined, + strokeWidth: edge.cycle ? 4 : ["manual_call", "initializer"].includes(edge.kind) ? 2.5 : 1.8, + strokeDasharray: edge.kind === "previous_timestep" ? "7 5" : edge.kind === "manual_call" ? "3 4" : edge.kind === "initializer" ? "8 3" : undefined, }, })); } @@ -817,6 +817,7 @@ function edgeColor(edge: ModelGraphEdge) { if (edge.cycle) return "#cf4937"; if (edge.kind === "previous_timestep") return "#317b62"; if (edge.kind === "manual_call") return "#be6a54"; + if (edge.kind === "initializer") return "#7768ae"; if (edge.kind === "object_topology") return "#7b7167"; if (edge.kind === "environment_binding") return "#367b8b"; return "#a59687"; diff --git a/frontend/src/ApplicationConfigurationForm.tsx b/frontend/src/ApplicationConfigurationForm.tsx index d1e2f1897..f22f87b88 100644 --- a/frontend/src/ApplicationConfigurationForm.tsx +++ b/frontend/src/ApplicationConfigurationForm.tsx @@ -1,6 +1,6 @@ import { useMemo, useState } from "react"; import { Check, Plus, Trash2, X } from "lucide-react"; -import type { ApplicationGraphNode, EnvironmentDescriptor, ModelDescriptor, SelectorDescriptor } from "./types"; +import type { ApplicationGraphNode, ApplicationOwner, CallMode, EnvironmentDescriptor, ModelDescriptor, SelectorDescriptor } from "./types"; type UpdateRule = { variables: string[]; after: string[] }; export type ExtraEntry = { key: string; type: string; value: string }; @@ -30,6 +30,7 @@ export function ApplicationConfigurationForm({ ); const [callName, setCallName] = useState(""); const [calleeId, setCalleeId] = useState(otherApplications[0]?.applicationId || ""); + const [callMode, setCallMode] = useState("manual"); const [environmentMode, setEnvironmentMode] = useState( application.environment ? application.environment.backendId || "scene" : "default" ); @@ -50,8 +51,8 @@ export function ApplicationConfigurationForm({ selectedCallee?.owner.scope === "template" && selectedCallee.owner.templateId === application.owner.templateId; return { - type: selectedCallee?.targetCount === 1 ? "One" : "Many", - multiplicity: selectedCallee?.targetCount === 1 ? "one" : "many", + type: callMode === "initializer" || selectedCallee?.targetCount === 1 ? "One" : "Many", + multiplicity: callMode === "initializer" || selectedCallee?.targetCount === 1 ? "one" : "many", criteria: { selectors: [], ...(sameTemplate ? {} : { within: { type: "SceneScope" } }), @@ -59,17 +60,16 @@ export function ApplicationConfigurationForm({ }, julia: "", }; - }, [application.owner.scope, application.owner.templateId, calleeId, selectedCallee]); + }, [application.owner.scope, application.owner.templateId, callMode, calleeId, selectedCallee]); const addCall = () => { if (!callName.trim() || !calleeId) return; - onCommand({ - action: "edit", - kind: "set_call_binding", - applicationRef: application.owner, - call: callName.trim(), - selector: callSelector, - }); + onCommand(callBindingCommand( + application.owner, + callName.trim(), + callSelector, + callMode, + )); setCallName(""); }; @@ -100,9 +100,9 @@ export function ApplicationConfigurationForm({
{Object.entries(application.inputBindings).map(([input, selector]) =>
{input}{selector.julia || selector.type}
)}
-
Manual calls -
{Object.entries(application.callBindings).map(([call, selector]) =>
{call}{selector.julia || selector.type}
)}
-
+
Calls and newborn initializers +
{Object.entries(application.callBindings).map(([call, selector]) =>
{call}{selector.mode === "initializer" ? "Initializer" : "Manual call"} · {selector.julia || selector.type}
)}
+
Environment @@ -132,6 +132,22 @@ export function ApplicationConfigurationForm({ ; } +export function callBindingCommand( + applicationRef: ApplicationOwner, + call: string, + selector: SelectorDescriptor, + mode: CallMode, +) { + return { + action: "edit", + kind: "set_call_binding", + applicationRef, + call, + selector, + mode, + }; +} + function extraConfigurationEntries(extra: Record | undefined): ExtraEntry[] { return Object.entries(extra || {}).map(([key, value]) => ({ key, diff --git a/frontend/src/DependencyEdge.tsx b/frontend/src/DependencyEdge.tsx index 368a1b66c..0f4b36499 100644 --- a/frontend/src/DependencyEdge.tsx +++ b/frontend/src/DependencyEdge.tsx @@ -46,6 +46,7 @@ export function DependencyEdge({ function edgeLabel(data?: ModelGraphEdge) { if (!data) return ""; if (data.kind === "manual_call") return data.call || "call"; + if (data.kind === "initializer") return data.call || "initializer"; if (data.kind === "object_topology" || data.kind === "application_target") return ""; if (data.sourceVariable && data.targetVariable) { return data.sourceVariable === data.targetVariable ? data.sourceVariable : `${data.sourceVariable} → ${data.targetVariable}`; diff --git a/frontend/src/GraphEditorV2.test.ts b/frontend/src/GraphEditorV2.test.ts index 5fc71c582..de7559fb5 100644 --- a/frontend/src/GraphEditorV2.test.ts +++ b/frontend/src/GraphEditorV2.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import { applicationEnvironmentConfiguration } from "./ApplicationConfigurationForm"; +import { applicationEnvironmentConfiguration, callBindingCommand } from "./ApplicationConfigurationForm"; import { bindingWindowDescriptor } from "./BindingForm"; import { unclaimedInstanceRoots } from "./InstanceForm"; import type { InstanceDescriptor, ObjectGraphNode } from "./types"; @@ -32,6 +32,34 @@ describe("schema-v2 graph editor payloads", () => { }); }); + it("preserves initializer mode in call-binding commands", () => { + const applicationRef = { + scope: "global" as const, + applicationId: "creator", + instance: null, + templateId: null, + }; + const selector = { + type: "One", + multiplicity: "one" as const, + criteria: { selectors: [], application: "leaf_state" }, + julia: "", + }; + expect(callBindingCommand( + applicationRef, + "leaf", + selector, + "initializer", + )).toEqual({ + action: "edit", + kind: "set_call_binding", + applicationRef, + call: "leaf", + selector, + mode: "initializer", + }); + }); + it("offers only objects not already claimed by an instance", () => { const objects = [object("plant_a"), object("leaf_a"), object("plant_b")]; const instances = [{ objectIds: ["plant_a", "leaf_a"] }] as InstanceDescriptor[]; diff --git a/frontend/src/types.ts b/frontend/src/types.ts index d0f064cc7..1c3b28104 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -16,6 +16,12 @@ export type SelectorDescriptor = { julia: string; }; +export type CallMode = "manual" | "initializer"; + +export type CallBindingDescriptor = SelectorDescriptor & { + mode: CallMode; +}; + export type ModelParameter = { value: unknown; julia: string; @@ -73,7 +79,7 @@ export type ApplicationGraphNode = { environmentInputs: GraphPort[]; environmentOutputs: GraphPort[]; inputBindings: Record; - callBindings: Record; + callBindings: Record; environment: ApplicationEnvironment | null; environmentBindings: Record; environmentWindow: PeriodDescriptor; @@ -164,12 +170,13 @@ export type ModelGraphEdge = { targetApplicationId?: string; sourceObjectIds?: unknown[]; targetObjectIds?: unknown[]; - kind: "value_binding" | "inferred_same_object" | "previous_timestep" | "manual_call" | "object_topology" | "application_target" | "update_order" | "environment_binding" | string; + kind: "value_binding" | "inferred_same_object" | "previous_timestep" | "manual_call" | "initializer" | "object_topology" | "application_target" | "update_order" | "environment_binding" | string; origin?: string; multiplicity?: string; policy?: string; selector?: SelectorDescriptor; call?: string; + mode?: CallMode; variables?: string[]; provider?: string; projection?: "applications" | "topology" | "resolved" | "targets"; diff --git a/src/Abstract_model_structs.jl b/src/Abstract_model_structs.jl index 7af82df2c..583acf0e6 100644 --- a/src/Abstract_model_structs.jl +++ b/src/Abstract_model_structs.jl @@ -19,8 +19,9 @@ process_(x) = error("process() is not defined for $(x)") """ dep(model) -Return model-level default `Input(...)` and `Call(...)` declarations. Models -without explicit coupling requirements return an empty `NamedTuple`. +Return model-level default `Input(...)`, `Call(...)`, and `Initializer(...)` +declarations. Models without explicit coupling requirements return an empty +`NamedTuple`. """ dep(::AbstractModel) = NamedTuple() diff --git a/src/ModelSpec.jl b/src/ModelSpec.jl index a62f5bf7f..3b3063334 100644 --- a/src/ModelSpec.jl +++ b/src/ModelSpec.jl @@ -8,12 +8,13 @@ Configuration for one model application in a `CompositeModel`. `ModelSpec` is the single scenario-construction form. `on` selects the target -objects, `inputs` and `calls` declare coupling, `outputs_to` declares status -outputs owned by this application but stored on selected destination objects, -`every` selects application cadence, and `environment` accepts an -[`Environment`](@ref) configuration. Output routing and intentional -duplicate-writer ordering are declared directly with `output_routing` and -`updates`. +objects, `inputs` and `calls` declare coupling, and a `calls` entry may wrap its +selector in [`Initializer`](@ref) for targeted newborn initialization. +`outputs_to` declares status outputs owned by this application but stored on +selected destination objects, `every` selects application cadence, and +`environment` accepts an [`Environment`](@ref) configuration. Output routing +and intentional duplicate-writer ordering are declared directly with +`output_routing` and `updates`. # Example @@ -262,8 +263,8 @@ function _build_model_spec( default_calls = _model_default_model_calls(base_model) explicit_calls = _normalize_application_bindings(calls) normalized_calls = _merge_value_inputs(default_calls, explicit_calls) - for selector in values(normalized_calls) - _validate_selector_context(selector, :call) + for binding in values(normalized_calls) + _validate_selector_context(_call_binding_selector(binding), :call) end normalized_call_origins = isnothing(call_origins) ? _binding_origins(default_calls, explicit_calls) : @@ -302,8 +303,9 @@ function _validate_scenario_application_references!( origins::NamedTuple, field::Symbol, ) - for (name, selector) in pairs(bindings) + for (name, binding) in pairs(bindings) getproperty(origins, name) == :model_spec || continue + selector = field == :calls ? _call_binding_selector(binding) : binding selector isa Union{One,OptionalOne} || continue selector_criteria = criteria(selector) isnothing(_criteria_get(selector_criteria, :process, nothing)) && @@ -459,7 +461,7 @@ function dep(spec::ModelSpec) dependencies = dep(model_(spec)) kept = Pair{Symbol,Any}[] for (name, selector) in pairs(dependencies) - selector isa Union{Input,Call} && continue + selector isa Union{Input,Call,Initializer} && continue push!(kept, name => selector) end return (; kept...) diff --git a/src/PlantSimEngine.jl b/src/PlantSimEngine.jl index 5c567166e..56fca8404 100644 --- a/src/PlantSimEngine.jl +++ b/src/PlantSimEngine.jl @@ -323,11 +323,11 @@ export RunContext, CallTarget, CallTargets, Simulation, BoundMany, OutputTargets export runtime_model, current_step, final_state, outputs export SceneScope, Self, Subtree, SelfPlant, Ancestor, Scope, Relation export One, OptionalOne, Many -export Input, Call, Environment +export Input, Call, Initializer, Environment export application_name, applies_to, value_inputs, model_calls, outputs_to export environment_config export ModelSpec, OutputTo, Updates -export call_targets, call_model, run_call!, commit_environment! +export call_targets, call_model, run_call!, run_initializer!, commit_environment! export bound_input, output_targets, assign_outputs! export Status export Required, Default diff --git a/src/composite_model/compilation.jl b/src/composite_model/compilation.jl index 9fcec6809..3c79b5ac9 100644 --- a/src/composite_model/compilation.jl +++ b/src/composite_model/compilation.jl @@ -66,7 +66,7 @@ struct CompiledModelInputPlan{SEL,M,OA,PSA,W} end """Immutable authored hard-call declaration for one application.""" -struct CompiledModelCallPlan{NAME,SEL,M,PCA} +struct CompiledModelCallPlan{NAME,MODE,SEL,M,PCA} slot::Int application_slot::Int application_id::Symbol @@ -85,6 +85,7 @@ function CompiledModelCallPlan( application_slot, application_id, call::Symbol, + mode::Symbol, selector, matcher, origin, @@ -95,6 +96,7 @@ function CompiledModelCallPlan( ) return CompiledModelCallPlan{ call, + mode, typeof(selector), typeof(matcher), typeof(potential_callee_application_ids), @@ -114,6 +116,7 @@ function CompiledModelCallPlan( end _compiled_call_name(::CompiledModelCallPlan{NAME}) where {NAME} = NAME +@inline _compiled_call_mode(::CompiledModelCallPlan{NAME,MODE}) where {NAME,MODE} = MODE """Immutable authored cross-object output declaration for one application.""" struct CompiledModelOutputDestinationPlan{GROUP,SEL,M,D,C} @@ -525,6 +528,7 @@ end function _scenario_call_owners(applications, call_plans) owners = Dict{Symbol,Set{Symbol}}() for plan in call_plans + _compiled_call_mode(plan) === :manual || continue for callee_id in plan.potential_callee_application_ids push!(get!(owners, callee_id, Set{Symbol}()), plan.application_id) end @@ -541,6 +545,198 @@ function _scenario_call_owners(applications, call_plans) ) end +function _initializer_call_application_ids(call_plans) + ids = Set{Symbol}() + for plan in call_plans + _compiled_call_mode(plan) === :initializer || continue + union!(ids, plan.potential_callee_application_ids) + end + return ids +end + +function _potential_initializer_output_writers( + applications, + initializer_application, + variable::Symbol, + distributed_output_plans, +) + writers = Symbol[] + for application in applications + application.id == initializer_application.id && continue + local_writer = + variable in _model_canonical_output_names(application) && + _selector_labels_may_overlap( + initializer_application.applies_to, + application.applies_to, + ) + distributed_writer = _application_declares_distributed_output( + application, + variable, + initializer_application.applies_to, + distributed_output_plans, + ) + (local_writer || distributed_writer) && push!(writers, application.id) + end + return writers +end + +function _validate_initializer_call_plans!( + model::CompositeModel, + applications, + input_plans, + call_plans, + distributed_output_plans, +) + initializer_plans = [ + plan for plan in call_plans + if _compiled_call_mode(plan) === :initializer + ] + isempty(initializer_plans) && return nothing + + applications_by_id = _applications_by_id(applications) + manual_application_ids = Set{Symbol}() + for plan in call_plans + _compiled_call_mode(plan) === :manual || continue + union!(manual_application_ids, plan.potential_callee_application_ids) + end + initializer_owner = Dict{Symbol,Tuple{Symbol,Symbol}}() + + for plan in initializer_plans + isnothing(plan.application) && error( + "Initializer `$(plan.call)` on application `$(plan.application_id)` " * + "must name one scheduled target with `application=...`.", + ) + plan.selector isa One || error( + "Initializer `$(plan.call)` on application `$(plan.application_id)` " * + "must use `Initializer(One(...))`.", + ) + length(plan.potential_callee_application_ids) == 1 || error( + "Initializer `$(plan.call)` on application `$(plan.application_id)` " * + "must resolve exactly one scheduled application, got " * + "`$(plan.potential_callee_application_ids)`.", + ) + callee_id = only(plan.potential_callee_application_ids) + callee = applications_by_id[callee_id] + callee.applies_to isa Many || error( + "Initializer `$(plan.call)` targets application `$(callee_id)`, whose " * + "`on=...` selector must be `Many(...)` so newly registered objects can " * + "join its normal schedule.", + ) + callee_id in manual_application_ids && error( + "Application `$(callee_id)` cannot be both a manual-call-only target and " * + "an initializer target. Remove the ordinary `Call` binding and keep one " * + "`Initializer` binding.", + ) + plan.application_id in manual_application_ids && error( + "Initializer caller `$(plan.application_id)` is itself manual-call-only. " * + "Nested manual/initializer execution is not supported; keep the creator " * + "application root-scheduled.", + ) + any(candidate -> candidate.application_id == callee_id, call_plans) && error( + "Initializer target application `$(callee_id)` declares hard calls. " * + "Nested calls from targeted newborn initialization are not supported.", + ) + isempty(outputs_to(callee.spec)) || error( + "Initializer target application `$(callee_id)` declares `outputs_to`. " * + "Targeted newborn initialization supports canonical local outputs only.", + ) + stream_only = Symbol[ + Symbol(variable) for variable in keys(outputs_(callee.spec)) + if _publish_mode_for_output(callee.spec, Symbol(variable)) === :stream_only + ] + isempty(stream_only) || error( + "Initializer target application `$(callee_id)` has stream-only output(s) " * + "`$(Tuple(stream_only))`. Initializer outputs must be canonical so the " * + "new object enters the normal scheduled state.", + ) + for variable in _model_canonical_output_names(callee) + other_writers = _potential_initializer_output_writers( + applications, + callee, + variable, + distributed_output_plans, + ) + isempty(other_writers) || error( + "Initializer target application `$(callee_id)` must be the sole " * + "canonical writer of output `$(variable)` on its possible newborn " * + "targets. Potential overlapping writer application(s): " * + "`$(Tuple(other_writers))`. Remove the overlapping local or " * + "distributed writer instead of relying on `Updates` ordering after " * + "targeted initialization.", + ) + end + backend = _environment_backend_from_config( + model, + environment_config(callee.spec), + ) + (isnothing(backend) || backend isa GlobalConstant) || error( + "Initializer target application `$(callee_id)` uses a non-global " * + "environment backend `$(typeof(backend))`. Targeted newborn " * + "initialization currently supports only the global environment.", + ) + for input_plan in input_plans + input_plan.application_id == callee_id || continue + policy = _model_selector_policy( + input_plan.selector, + applications_by_id, + input_plan.potential_source_application_ids, + input_plan.source_var, + ) + carrier_hint = _carrier_hint( + input_plan.selector, + policy, + input_plan.window, + ) + carrier_hint === :temporal_stream && + !(policy isa PreviousTimeStep) && error( + "Initializer target application `$(callee_id)` input " * + "`$(input_plan.input)` requires temporal policy `$(typeof(policy))`. " * + "Only `PreviousTimeStep` is defined for a newborn target; use a " * + "non-temporal input or `PreviousTimeStep(:$(input_plan.input))`.", + ) + end + for consumer_plan in input_plans + consumer_plan.application_id == callee_id && continue + callee_id in consumer_plan.potential_source_application_ids || + continue + policy = _model_selector_policy( + consumer_plan.selector, + applications_by_id, + consumer_plan.potential_source_application_ids, + consumer_plan.source_var, + ) + carrier_hint = _carrier_hint( + consumer_plan.selector, + policy, + consumer_plan.window, + ) + carrier_hint === :temporal_stream || continue + error( + "Initializer target application `$(callee_id)` may provide newborn " * + "output `$(consumer_plan.source_var)` to temporal input " * + "`$(consumer_plan.input)` on downstream application " * + "`$(consumer_plan.application_id)`. Targeted initialization does " * + "not publish a mid-step temporal sample, so downstream temporal " * + "policies (including `PreviousTimeStep`) are unsupported. Use a " * + "direct non-temporal input, or publish the value from a distinct " * + "scheduled application so temporal consumers can use its history " * + "on a later timestep.", + ) + end + if haskey(initializer_owner, callee_id) + previous = initializer_owner[callee_id] + error( + "Scheduled application `$(callee_id)` has several initializer " * + "bindings: `$(previous[2])` on `$(previous[1])` and " * + "`$(plan.call)` on `$(plan.application_id)`. Declare one owner so " * + "each newborn target can be initialized exactly once.", + ) + end + initializer_owner[callee_id] = (plan.application_id, plan.call) + end + return nothing +end + function _scenario_root_call_owners( call_owners, application_id::Symbol, @@ -609,6 +805,57 @@ function _scenario_input_order_edges!(children, input_plans, call_owners) return children end +function _scenario_initializer_order_edges!( + children, + input_plans, + call_plans, + call_owners, +) + initializer_owners = Dict{Symbol,Symbol}( + only(plan.potential_callee_application_ids) => plan.application_id + for plan in call_plans + if _compiled_call_mode(plan) === :initializer + ) + for initializer in call_plans + _compiled_call_mode(initializer) === :initializer || continue + callee_id = only(initializer.potential_callee_application_ids) + caller_id = initializer.application_id + # Existing targets run in their normal application slot before the + # creator. The creator then initializes only its newborn target. + _add_model_application_edge!(children, callee_id, caller_id) + # A same-step consumer of the initialized application's output must + # also wait for object creation and targeted initialization. + for input_plan in input_plans + input_plan.breaks_same_step_cycle && continue + ordering_sources = ( + input_plan.potential_source_application_ids..., + input_plan.order_after_application_ids..., + ) + callee_id in ordering_sources || continue + execution_owners = if haskey( + initializer_owners, + input_plan.application_id, + ) + (initializer_owners[input_plan.application_id],) + else + _scenario_root_call_owners( + call_owners, + input_plan.application_id, + ) + end + for owner_id in execution_owners + owner_id == caller_id && continue + _add_model_application_edge!( + children, + caller_id, + owner_id, + ) + end + end + end + return children +end + function _scenario_update_order_edges!( children, applications, @@ -733,12 +980,19 @@ end function _compile_scenario_application_children( applications, input_plans, + call_plans, call_owners, manual_application_ids, distributed_output_plans, ) children = Dict{Symbol,Set{Symbol}}() _scenario_input_order_edges!(children, input_plans, call_owners) + _scenario_initializer_order_edges!( + children, + input_plans, + call_plans, + call_owners, + ) _scenario_update_order_edges!( children, applications, @@ -758,6 +1012,13 @@ function _compiled_scenario_plan( ) application_plans = Tuple(application.plan for application in applications) application_ids = Tuple(plan.id for plan in application_plans) + _validate_initializer_call_plans!( + model, + applications, + input_plans, + call_plans, + distributed_output_plans, + ) call_owners = _scenario_call_owners(applications, call_plans) manual_application_ids = Tuple( application.id for application in applications @@ -770,6 +1031,7 @@ function _compiled_scenario_plan( application_children = _compile_scenario_application_children( applications, input_plans, + call_plans, call_owners, manual_application_ids, distributed_output_plans, @@ -897,6 +1159,7 @@ end name === :application_slot && return getfield(plan, :application_slot) name === :application_id && return getfield(plan, :application_id) name === :call && return getfield(plan, :call) + name === :mode && return _compiled_call_mode(plan) name === :selector && return getfield(plan, :selector) name === :matcher && return getfield(plan, :matcher) name === :origin && return getfield(plan, :origin) @@ -913,12 +1176,16 @@ Base.propertynames(binding::CompiledModelCallBinding) = ( :consumer_id, :callee_object_ids, :callee_application_ids, + :mode, propertynames(binding.plan)..., ) @inline _compiled_call_name(binding::CompiledModelCallBinding) = _compiled_call_name(binding.plan) +@inline _compiled_call_mode(binding::CompiledModelCallBinding) = + _compiled_call_mode(binding.plan) + struct CompiledEnvironmentSamplingRule{T,S} end CompiledEnvironmentSamplingRule(target::Symbol, source::Symbol) = @@ -1049,8 +1316,26 @@ end _index_dynamic_input_bindings(model::CompositeModel, bindings) = _index_dynamic_bindings(model, bindings) -_index_dynamic_call_bindings(model::CompositeModel, bindings) = - _index_dynamic_bindings(model, bindings) + +function _index_dynamic_call_bindings(model::CompositeModel, bindings) + index = _selector_candidate_index() + for (binding_index, binding) in pairs(bindings) + _compiled_call_mode(binding) === :manual || continue + binding.origin == :inferred_same_object && continue + _index_selector_candidate!( + index, + model, + binding.matcher, + binding_index; + context=binding.consumer_id, + default_scope=_default_dependency_scope( + model, + binding.consumer_id, + ), + ) + end + return index +end function _index_model_bindings(bindings, application_field::Symbol, object_field::Symbol) grouped = Dict{Tuple{Symbol,ObjectId},Vector{Any}}() @@ -2235,6 +2520,7 @@ function _extend_compiled_scene( first_new_call_binding = length(call_bindings) - length(new_call_bindings) + 1 for binding_index in first_new_call_binding:length(call_bindings) binding = call_bindings[binding_index] + _compiled_call_mode(binding) === :manual || continue binding.origin == :inferred_same_object && continue _index_selector_candidate!( dynamic_call_binding_indices, @@ -2608,11 +2894,13 @@ function _validate_model_call_cadence!( callee, call, timeline, + mode::Symbol=:manual, ) # A call-only target with no model/scenario cadence declaration inherits # the cadence of its parent call. An explicit target cadence is a # scientific contract and must match the caller. - _runtime_clock_source_for_spec(callee.spec) == :environment_base_step && + mode === :manual && + _runtime_clock_source_for_spec(callee.spec) == :environment_base_step && return nothing same_dt = isapprox( float(caller.clock.dt), @@ -2634,7 +2922,10 @@ function _validate_model_call_cadence!( "application `$(callee.id)` has incompatible cadence: caller=", "$(caller_seconds) seconds (phase=$(caller.clock.phase)), target=", "$(callee_seconds) seconds (phase=$(callee.clock.phase)). ", - "Use matching `ModelSpec(...; every=...)` declarations or omit `every` on the ", + mode === :initializer ? + "Initializer callers and their normally scheduled targets require exactly " * + "matching cadence and phase." : + "Use matching `ModelSpec(...; every=...)` declarations or omit `every` on the " * "manual-call-only target so it inherits the parent call cadence." ) end @@ -2650,6 +2941,7 @@ function _validate_model_call_plan_cadences!(applications, call_plans, timeline) callee, _compiled_call_name(plan), timeline, + _compiled_call_mode(plan), ) end end @@ -2666,6 +2958,7 @@ function _validate_model_call_cadences!(applications, call_bindings, timeline) applications_by_id[callee_id], binding.call, timeline, + _compiled_call_mode(binding), ) end end @@ -3086,6 +3379,7 @@ end function _manual_call_application_ids(call_bindings) ids = Set{Symbol}() for binding in call_bindings + _compiled_call_mode(binding) === :manual || continue union!(ids, binding.callee_application_ids) isnothing(binding.application) || push!(ids, binding.application) end @@ -4567,11 +4861,17 @@ function _compile_model_call_plans(model::CompositeModel, applications) for application in applications calls = model_calls(application.spec) calls isa NamedTuple || continue - for (call_name, selector) in pairs(calls) + for (call_name, declaration) in pairs(calls) call = Symbol(call_name) - selector isa AbstractObjectMultiplicity || error( - "Call binding `$(call)` on application `$(application.id)` must use an object selector." - ) + selector = _call_binding_selector(declaration) + mode = _call_binding_mode(declaration) + potential_callee_application_ids = + _potential_call_application_ids( + applications, + selector, + _criteria_get(criteria(selector), :process, nothing), + _selector_application(selector), + ) push!( plans, CompiledModelCallPlan( @@ -4579,18 +4879,14 @@ function _compile_model_call_plans(model::CompositeModel, applications) application.plan.slot, application.id, call, + mode, selector, _compile_selector_matcher(model, selector), get(call_origins(application.spec), call, :model_spec), _criteria_get(criteria(selector), :process, nothing), _selector_application(selector), multiplicity(selector), - _potential_call_application_ids( - applications, - selector, - _criteria_get(criteria(selector), :process, nothing), - _selector_application(selector), - ), + potential_callee_application_ids, ), ) end @@ -5120,7 +5416,6 @@ function _compile_model_call_bindings( by_object=nothing, plans_by_application=nothing, ) - isnothing(by_object) && (by_object = _applications_by_object(lookup_applications)) if isnothing(plans_by_application) plans_by_application = _plans_by_application( applications, @@ -5136,30 +5431,51 @@ function _compile_model_call_bindings( ) call_sym = plan.call selector = plan.selector - callee_object_ids = _dependency_object_ids( - model, - selector, - plan.matcher, - consumer_id, - ) proc = plan.process app_name = plan.application - callee_application_ids = Symbol[] - for object_id in callee_object_ids - append!( - callee_application_ids, - _matching_callee_applications(by_object, object_id, proc, app_name), + mode = _compiled_call_mode(plan) + callee_object_ids, callee_application_ids = if mode === :initializer + # Initializers never cache or track pre-existing target objects. + # Their one scheduled application is statically validated, and + # run_initializer! resolves only its explicit newborn identity. + ( + ObjectId[], + Symbol[plan.potential_callee_application_ids...], + ) + else + isnothing(by_object) && + (by_object = _applications_by_object(lookup_applications)) + object_ids = _dependency_object_ids( + model, + selector, + plan.matcher, + consumer_id, ) + application_ids = Symbol[] + for object_id in object_ids + append!( + application_ids, + _matching_callee_applications( + by_object, + object_id, + proc, + app_name, + ), + ) + end + unique!(application_ids) + (object_ids, application_ids) end - unique!(callee_application_ids) - if isempty(callee_application_ids) && selector isa One + if mode === :manual && + isempty(callee_application_ids) && selector isa One error( "Call `$(call_sym)` on application `$(application.id)` matched objects ", "$([id.value for id in callee_object_ids]) but no model application", isnothing(proc) ? "." : " with process `$(proc)`.", ) end - if selector isa One && length(callee_application_ids) != 1 + if mode === :manual && selector isa One && + length(callee_application_ids) != 1 error( "Call `$(call_sym)` on application `$(application.id)` expected one callee application, ", "got `$(callee_application_ids)`. Add `application=:name` to disambiguate." @@ -5188,6 +5504,7 @@ end function _model_call_owners(call_bindings) owners = Dict{Symbol,Set{Symbol}}() for binding in call_bindings + _compiled_call_mode(binding) === :manual || continue for callee_id in binding.callee_application_ids push!(get!(owners, callee_id, Set{Symbol}()), binding.application_id) end @@ -5271,10 +5588,17 @@ end function _compile_model_application_children( applications, input_bindings, + call_bindings, call_owners, ) children = Dict{Symbol,Set{Symbol}}() _model_input_order_edges!(children, input_bindings, call_owners) + _scenario_initializer_order_edges!( + children, + input_bindings, + call_bindings, + call_owners, + ) _model_update_order_edges!(children, applications) return children end @@ -5283,6 +5607,7 @@ function _compile_model_application_order(applications, input_bindings, call_bin children = _compile_model_application_children( applications, input_bindings, + call_bindings, _model_call_owners(call_bindings), ) return _stable_topological_application_order(applications, children) @@ -5370,6 +5695,9 @@ end function explain_schedule(compiled::CompiledCompositeModel) timeline = compiled.scenario_plan.timeline manual_application_ids = _manual_call_application_ids(compiled) + initializer_application_ids = _initializer_call_application_ids( + compiled.scenario_plan.call_plans, + ) execution_positions = Dict(application_id => index for (index, application_id) in pairs(compiled.application_order)) schedule_entries = Dict( entry.application_id => entry @@ -5389,6 +5717,7 @@ function explain_schedule(compiled::CompiledCompositeModel) target_ids=[id.value for id in application.target_ids], root_scheduled=!(application.id in manual_application_ids), manual_call_only=application.id in manual_application_ids, + initializer_target=application.id in initializer_application_ids, schedule_entry_index=isnothing(entry) ? nothing : entry.slot, schedule_kind=isnothing(entry) ? :manual_call_only : entry.kind, period_steps=isnothing(entry) ? nothing : entry.period_steps, @@ -5464,6 +5793,7 @@ function explain_calls(compiled::CompiledCompositeModel) application_id=binding.application_id, consumer_id=binding.consumer_id.value, call=binding.call, + mode=_compiled_call_mode(binding), origin=binding.origin, callee_object_ids=[id.value for id in binding.callee_object_ids], callee_application_ids=binding.callee_application_ids, @@ -5472,9 +5802,10 @@ function explain_calls(compiled::CompiledCompositeModel) process=binding.process, application=binding.application, multiplicity=binding.multiplicity, - publication_policy=:explicit_accept, + publication_policy=_compiled_call_mode(binding) === :initializer ? + :canonical_status_only : :explicit_accept, default_publish=false, - accepted_publish=true, + accepted_publish=_compiled_call_mode(binding) === :manual, resolved=!isempty(binding.callee_application_ids), selector=binding.selector, ) diff --git a/src/composite_model/registry_topology.jl b/src/composite_model/registry_topology.jl index b8fcdb70d..af8c63ad0 100644 --- a/src/composite_model/registry_topology.jl +++ b/src/composite_model/registry_topology.jl @@ -314,6 +314,8 @@ end Append-only object lifecycle events pending the next runtime refresh barrier. The dirty-id sets are derived indices shared by every runtime consumer. """ +abstract type AbstractTargetedTopologyRuntime end + mutable struct LifecycleDelta added::Vector{LifecycleObjectSnapshot} removed::Vector{LifecycleObjectSnapshot} @@ -321,6 +323,8 @@ mutable struct LifecycleDelta moved::Vector{LifecycleMoveEvent} structural_dirty_ids::Set{ObjectId} environment_dirty_ids::Set{ObjectId} + initialized_targets::Set{Tuple{Symbol,ObjectId}} + targeted_topology_runtime::Union{Nothing,AbstractTargetedTopologyRuntime} structural_kind::Symbol full_environment::Bool structural_generation::Int @@ -341,6 +345,8 @@ function LifecycleDelta(; LifecycleMoveEvent[], Set{ObjectId}(), Set{ObjectId}(), + Set{Tuple{Symbol,ObjectId}}(), + nothing, structural_kind, full_environment, 0, @@ -802,6 +808,8 @@ function _mark_bindings_dirty!( :structural end end + delta.structural_kind === :addition || + (delta.targeted_topology_runtime = nothing) if !model.bindings_dirty model.revision += 1 end @@ -831,6 +839,8 @@ function _consume_structural_lifecycle_delta!(model::CompositeModel) copy(consumed.moved), Set{ObjectId}(), copy(consumed.environment_dirty_ids), + Set{Tuple{Symbol,ObjectId}}(), + nothing, :clean, consumed.full_environment, consumed.structural_generation, diff --git a/src/composite_model/runtime_outputs.jl b/src/composite_model/runtime_outputs.jl index 339b2ea9d..7425cfe92 100644 --- a/src/composite_model/runtime_outputs.jl +++ b/src/composite_model/runtime_outputs.jl @@ -238,7 +238,6 @@ mutable struct RunContext{CS,A,CT,BI,OT,TS,OR,C,E} constants::C publication_allowed::Bool environment::E - targeted_topology_runtime::Any end function RunContext( @@ -268,7 +267,6 @@ function RunContext( constants, publication_allowed, environment, - nothing, ) end @@ -300,40 +298,6 @@ function RunContext( constants, publication_allowed, environment, - nothing, - ) -end - -function RunContext( - compiled, - environment_bindings, - application, - object_id, - calls, - bound_inputs, - output_targets, - temporal_streams, - output_retention, - time, - constants, - publication_allowed, - environment, -) - return RunContext( - compiled, - environment_bindings, - application, - object_id, - calls, - bound_inputs, - output_targets, - temporal_streams, - output_retention, - time, - constants, - publication_allowed, - environment, - nothing, ) end @@ -500,7 +464,9 @@ function CallTargets( publication_allowed, environment, ) - execution_batches = _compiled_call_execution_batches( + execution_batches = _compiled_call_mode(binding) === :initializer ? + () : + _compiled_call_execution_batches( compiled, environment_bindings, binding, @@ -2073,7 +2039,6 @@ end context.temporal_streams = temporal_streams context.output_retention = output_retention context.constants = constants - context.targeted_topology_runtime = nothing end context.time = float(time) context.publication_allowed = publication_allowed @@ -4171,6 +4136,26 @@ end return _find_call_targets(Base.tail(calls), Val(name), context) end +@inline _find_manual_call_targets(::Tuple{}, ::Val, ::RunContext) = nothing + +@inline function _find_manual_call_targets( + calls::Tuple, + ::Val{name}, + context::RunContext, +) where {name} + targets = first(calls) + if _compiled_call_name(targets.binding) === name + _compiled_call_mode(targets.binding) === :manual || + _initializer_requires_dedicated_api(context, name) + targets.time == context.time && + targets.publication_allowed == context.publication_allowed && + targets.environment === context.environment && + return targets + return _synchronize_call_targets_slow!(targets, context) + end + return _find_manual_call_targets(Base.tail(calls), Val(name), context) +end + Base.@constprop :aggressive function _model_call_targets( context::RunContext, name::Symbol, @@ -4187,6 +4172,32 @@ Base.@constprop :aggressive function _model_call_targets( return found end +@noinline function _initializer_requires_dedicated_api(context, name) + throw( + ArgumentError( + "Call `$(name)` on application `$(context.application.id)` is an " * + "initializer binding. Use `run_initializer!(context, :$(name), object)` " * + "exactly once for the newly registered object.", + ), + ) +end + +@inline Base.@constprop :aggressive function _manual_call_targets( + context::RunContext, + name::Symbol, +) + found = _find_manual_call_targets(context.calls, Val(name), context) + if isnothing(found) + available = Symbol[targets.binding.call for targets in context.calls] + error( + "Application `$(context.application.id)` on object ", + "`$(context.object_id.value)` did not declare call `$(name)`. ", + "Declared calls: $(available).", + ) + end + return found +end + function _call_binding_target_matches(binding, application, object_id::ObjectId) return (binding.multiplicity != :many && length(binding.callee_application_ids) == 1) || @@ -4302,10 +4313,14 @@ for `Many`. When `objects` is provided, resolve the declared call against the current object topology and restrict the result to those objects. This explicit form is intended for models that create objects and immediately initialize selected -applications on them. Ordinary scheduled execution still observes structural -changes at the next timestep boundary. Each requested object may be an -[`ObjectId`](@ref), [`Object`](@ref), an MTG node, or the [`Status`](@ref) -returned by [`add_organ!`](@ref). +manual-call-only applications on them. Structural refresh still occurs at the +safe barrier after a pure-addition event. If the pending event also removes or +reparents objects, this accessor performs a full binding/environment refresh +before resolving the explicit targets. Use [`Initializer`](@ref) and +[`run_initializer!`](@ref) instead when the target application must remain in +the normal schedule. Each requested object may be an [`ObjectId`](@ref), +[`Object`](@ref), an MTG node, or the [`Status`](@ref) returned by +[`add_organ!`](@ref). Use this accessor with [`run_call!(::CallTarget)`](@ref) when targets need different sampled environments, selective execution, a controlled order, or separate @@ -4317,9 +4332,9 @@ Base.@constprop :aggressive function call_targets( ; objects=nothing, ) - isnothing(objects) || - return _current_topology_call_targets(context, name, objects) - return _model_call_targets(context, name) + return isnothing(objects) ? + _manual_call_targets(context, name) : + _current_topology_call_targets(context, name, objects) end @inline function _single_call_model(batches::Tuple{B}) where {B} @@ -4362,6 +4377,8 @@ end ) where {name} targets = _find_call_targets(context.calls, Val(name), context) isnothing(targets) && _call_model_missing_error(context, name) + _compiled_call_mode(targets.binding) === :manual || + _initializer_requires_dedicated_api(context, name) length(targets) == 1 || _call_model_target_count_error(name, targets) return _single_call_model(targets.execution_batches) end @@ -4384,19 +4401,7 @@ function call_model(context, name::Symbol) end function _call_target_object_id(model::CompositeModel, target) - target isa ObjectId && return target - target isa Object && return target.id - if target isa Status - hasproperty(target, :node) || error( - "A `Status` used as a hard-call object filter must contain its source `node`." - ) - return _call_target_object_id(model, target.node) - end - adapter = model.source_adapter - if adapter isa MTGObjectAdapter && target isa MultiScaleTreeGraph.Node - return _mtg_object_id(adapter, target) - end - return ObjectId(target) + return object_id(model, target) end function _call_target_object_ids(model::CompositeModel, objects) @@ -4428,10 +4433,18 @@ mutable struct _TargetedApplicationSet{A,B} outputs_prepared::Bool end -mutable struct _TargetedTopologyRuntime{CS,MA} +mutable struct _TargetedTopologyRuntime{CS,MA} <: + AbstractTargetedTopologyRuntime compiled::CS model_revision::Int - application_sets::Dict{Tuple{Vararg{ObjectId}},Any} + application_sets::Dict{ + Tuple{Vararg{ObjectId}}, + Union{Nothing,_TargetedApplicationSet}, + } + added_applications_by_object::Dict{ + ObjectId, + Vector{CompiledModelApplication}, + } manual_application_ids::MA application_positions::Dict{Symbol,Int} end @@ -4450,7 +4463,8 @@ function _targeted_topology_runtime!( context::RunContext, model::CompositeModel, ) - cached = context.targeted_topology_runtime + delta = lifecycle_delta(model) + cached = delta.targeted_topology_runtime if cached isa _TargetedTopologyRuntime && cached.compiled === context.compiled && cached.model_revision == model.revision @@ -4460,14 +4474,18 @@ function _targeted_topology_runtime!( runtime = _TargetedTopologyRuntime( compiled, model.revision, - Dict{Tuple{Vararg{ObjectId}},Any}(), + Dict{ + Tuple{Vararg{ObjectId}}, + Union{Nothing,_TargetedApplicationSet}, + }(), + Dict{ObjectId,Vector{CompiledModelApplication}}(), compiled.scenario_plan.manual_application_ids, Dict( application_id => index for (index, application_id) in pairs(compiled.application_order) ), ) - context.targeted_topology_runtime = runtime + delta.targeted_topology_runtime = runtime return runtime end @@ -4476,7 +4494,7 @@ function _new_object_applications( compiled::CompiledCompositeModel, requested_ids, ) - by_object = Dict{ObjectId,Vector{Any}}() + by_object = Dict{ObjectId,Vector{CompiledModelApplication}}() partial_applications = CompiledModelApplication[] new_targets = _new_application_targets( model, @@ -4494,25 +4512,19 @@ function _new_object_applications( push!(partial_applications, partial) for object_id in target_ids applications = get!(by_object, object_id) do - copy( - get( + CompiledModelApplication[ + application for application in get( compiled.applications_by_object, object_id, - Any[], - ), - ) + (), + ) + ] end any(candidate -> candidate.id == application.id, applications) || push!(applications, partial) end end - return ( - partial_applications, - _ApplicationsByObjectOverlay( - compiled.applications_by_object, - by_object, - ), - ) + return (partial_applications, by_object) end function _targeted_application_set!( @@ -4528,10 +4540,20 @@ function _targeted_application_set!( requested_ids, ) isnothing(applications) && return nothing - output_applications, applications_by_object = applications + output_applications, added_applications_by_object = applications + # Keep applications for every object targeted earlier in this same + # lifecycle delta. A later newborn can then bind an input to an earlier + # newborn without refreshing the whole scene at a mid-kernel barrier. + merge!( + runtime.added_applications_by_object, + added_applications_by_object, + ) return _TargetedApplicationSet( output_applications, - applications_by_object, + _ApplicationsByObjectOverlay( + runtime.compiled.applications_by_object, + runtime.added_applications_by_object, + ), false, ) end @@ -4616,16 +4638,61 @@ function _targeted_new_object_call_targets( context::RunContext, name::Symbol, requested_ids, + ; + initializer::Bool=false, ) model = runtime_model(context) - bindings_dirty(model) || return nothing + cached_targets = _model_call_targets(context, name) + binding = cached_targets.binding + expected_mode = initializer ? :initializer : :manual + _compiled_call_mode(binding) === expected_mode || error( + initializer ? + "Call `$(name)` is a manual hard call, not an `Initializer` binding." : + "Call `$(name)` is an initializer binding; use `run_initializer!`.", + ) + if initializer + length(requested_ids) == 1 || error( + "Initializer `$(name)` requires exactly one newly registered object; " * + "got $(length(requested_ids)).", + ) + end + if !bindings_dirty(model) + initializer && error( + "Initializer `$(name)` can run only during the lifecycle event that " * + "registered its target; the model has no pending structural addition.", + ) + return nothing + end delta = lifecycle_delta(model) - delta.structural_kind === :full && return nothing + if delta.structural_kind !== :addition + if initializer + error( + "Initializer `$(name)` requires a pure object-addition lifecycle event; " * + "the pending structural change is `$(delta.structural_kind)`.", + ) + end + return nothing + end dirty_ids = delta.structural_dirty_ids - all(object_id -> object_id in dirty_ids, requested_ids) || return nothing + if !all(object_id -> object_id in dirty_ids, requested_ids) + initializer && error( + "Initializer `$(name)` target is not part of the pending object addition.", + ) + return nothing + end + if initializer + object_id = only(requested_ids) + # For a pure `:addition` delta, `structural_dirty_ids` is exactly the + # set populated by `_record_added_objects!`. Other structural mutations + # change `structural_kind` and were rejected above, so the O(1) dirty-id + # membership check already performed is the canonical newborn proof. + initialization_key = (only(binding.potential_callee_application_ids), object_id) + initialization_key in delta.initialized_targets && error( + "Application `$(first(initialization_key))` already initialized newly " * + "registered object `$(object_id.value)` in this lifecycle event.", + ) + end - cached_targets = _model_call_targets(context, name) - binding = cached_targets.binding binding.multiplicity != :many && length(requested_ids) > 1 && error( "Hard call `$(name)` from application `$(context.application.id)` ", @@ -4655,7 +4722,13 @@ function _targeted_new_object_call_targets( model, requested_ids, ) - isnothing(application_set) && return nothing + if isnothing(application_set) + initializer && error( + "Initializer `$(name)` could not compile its newly registered target " * + "against the scheduled application selector.", + ) + return nothing + end output_applications = application_set.applications applications_by_object = application_set.applications_by_object callee_applications = _targeted_callee_applications( @@ -4663,7 +4736,13 @@ function _targeted_new_object_call_targets( requested_ids, output_applications, ) - isnothing(callee_applications) && return nothing + if isnothing(callee_applications) + initializer && error( + "Initializer `$(name)` target application declares nested hard calls, " * + "which targeted newborn execution does not support.", + ) + return nothing + end if !application_set.outputs_prepared _prepare_model_output_statuses!(model, output_applications) @@ -4684,6 +4763,7 @@ function _targeted_new_object_call_targets( targeted_runtime.manual_application_ids, applications_by_object, compiled.applications_by_id, + compiled.distributed_outputs, ) end end @@ -4694,10 +4774,19 @@ function _targeted_new_object_call_targets( callee_applications, input_bindings, ) - any( - binding -> binding.carrier_hint == :temporal_stream, - input_bindings, - ) && return nothing + unsupported_temporal_inputs = Symbol[ + input_binding.input for input_binding in input_bindings + if input_binding.carrier_hint == :temporal_stream && + !(input_binding.policy isa PreviousTimeStep) + ] + if !isempty(unsupported_temporal_inputs) + initializer && error( + "Initializer `$(name)` target requires unsupported temporal input(s) " * + "`$(Tuple(unsupported_temporal_inputs))`; only `PreviousTimeStep` has " * + "defined newborn initialization semantics.", + ) + return nothing + end targeted_input_bindings = _index_model_bindings( input_bindings, @@ -4712,7 +4801,13 @@ function _targeted_new_object_call_targets( callee_applications, compiled.applications_by_id, ) - isnothing(environment_bindings) && return nothing + if isnothing(environment_bindings) + initializer && error( + "Initializer `$(name)` target requires a non-global environment " * + "binding, which targeted newborn execution does not support.", + ) + return nothing + end targets = CallTarget[] for partial_application in callee_applications @@ -4726,6 +4821,7 @@ function _targeted_new_object_call_targets( get(targeted_input_bindings, key, ()), compiled.applications_by_id, targeted_runtime.application_positions, + compiled.distributed_outputs, ) push!( targets, @@ -4768,6 +4864,12 @@ function _targeted_new_object_call_targets( ) end end + if initializer + length(targets) == 1 || error( + "Initializer `$(name)` must resolve one scheduled application target " * + "for one newborn object; resolved $(length(targets)).", + ) + end return targets end @@ -5152,6 +5254,69 @@ function _run_call_targets!( return targets end +""" + run_initializer!(context::RunContext, name::Symbol, object) + +Run the application declared by `name=Initializer(...)` exactly once on one +object registered during the current lifecycle event. The target application +remains normally scheduled and retains canonical writer ownership. Its model +mutates the newborn's canonical local status, but the targeted initializer does +not publish an extra mid-step output sample or distributed/environment update. +Consequently, only direct non-temporal downstream consumers may observe its +newborn output in that step; downstream temporal consumers are rejected during +scenario compilation. + +The initializer target must use the caller's cadence and global environment, +must not declare nested calls, distributed outputs, or stream-only outputs, and +must be the sole potential canonical writer of each initialized output. It may +use `PreviousTimeStep` as its only temporal input policy. The initialized +object's canonical [`Status`](@ref) is returned. Calling the same initializer +again for that application/object pair, or passing an existing or reparented +object, is an error. The application/object pair is reserved before model code +runs, so a failed attempt remains marked and cannot be retried in the same +lifecycle event after an unknown partial mutation. +""" +function run_initializer!( + context::RunContext, + name::Symbol, + object, +) + context.publication_allowed || error( + "Initializer `$(name)` cannot run inside a non-publishing hard call. " * + "Keep its creator application root-scheduled.", + ) + model = runtime_model(context) + requested_ids = _call_target_object_ids(model, object) + targets = _targeted_new_object_call_targets( + context, + name, + requested_ids; + initializer=true, + ) + target = only(targets) + key = (target.application.id, target.object_id) + # Reserve the application/object pair before model code runs. If the + # initializer mutates and then throws, retrying it would duplicate an + # unknown partial side effect, so the lifecycle event remains poisoned. + push!(lifecycle_delta(model).initialized_targets, key) + _run_call_targets!( + targets, + false, + _UNSPECIFIED_SCENE_ENVIRONMENT, + context.environment, + ) + return model_status(model, target.object_id) +end + +function run_initializer!(context, name::Symbol, object) + throw( + ArgumentError( + "Initializer `$(name)` requires the compiled RunContext passed to " * + "a model kernel; got $(typeof(context)).", + ), + ) +end + """ run_call!(context::RunContext, name::Symbol; environment, sampled_environment, publish=false) @@ -5159,6 +5324,8 @@ end Execute every target of the hard call declared as `name` and return its [`CallTargets`](@ref) collection. The return shape is always vector-like: `One` produces one element, `OptionalOne` zero or one, and `Many` zero or more. +Initializer bindings are rejected here; execute those with +[`run_initializer!`](@ref). When `environment` is supplied, every target keeps its own opaque compiled backend handle and samples that transient backend-specific state. The state is diff --git a/src/composite_model/scenario_dsl.jl b/src/composite_model/scenario_dsl.jl index 056253a76..048c51eb2 100644 --- a/src/composite_model/scenario_dsl.jl +++ b/src/composite_model/scenario_dsl.jl @@ -67,11 +67,69 @@ struct Input{S} end Input(; kwargs...) = Input(One(; kwargs...)) -struct Call{S} +""" + Call(selector::AbstractObjectMultiplicity) + Call(; kwargs...) + +Declare the target selector for a manual hard call. Applications reached only +through `Call` are removed from the root schedule and execute when their owner +invokes [`run_call!`](@ref) or [`call_targets`](@ref). +""" +struct Call{S<:AbstractObjectMultiplicity} selector::S end Call(; kwargs...) = Call(One(; kwargs...)) +""" + Initializer(selector::One) + Initializer(; application, ...) + +Declare that a normally scheduled application may also initialize one newly +registered object during the lifecycle event that created it. Initializers are +executed with [`run_initializer!`](@ref); unlike [`Call`](@ref) targets, their +callee application remains in the root schedule and retains canonical writer +ownership. +""" +struct Initializer{S<:One} + selector::S +end + +Initializer(; kwargs...) = Initializer(One(; kwargs...)) + +function Initializer(selector::AbstractObjectMultiplicity) + error( + "`Initializer` requires `One(...)` because it initializes exactly " * + "one newly registered object per invocation; got `$(typeof(selector))`.", + ) +end + +function Call(selector::Initializer) + throw( + ArgumentError( + "`Call(Initializer(...))` is not a supported declaration. " * + "Use `Initializer(...)` directly so the lifecycle mode is explicit.", + ), + ) +end + +_call_binding_selector(selector::AbstractObjectMultiplicity) = selector +_call_binding_selector(binding::Initializer) = binding.selector + +function _call_binding_selector(binding) + error( + "Call bindings must use `One(...)`, `OptionalOne(...)`, `Many(...)`, " * + "or `Initializer(One(...))`; got `$(typeof(binding))`.", + ) +end + +_call_binding_mode(::AbstractObjectMultiplicity) = :manual +_call_binding_mode(::Initializer) = :initializer + +_call_binding_with_selector(::AbstractObjectMultiplicity, selector) = selector +_call_binding_with_selector(::Initializer, selector) = Initializer(selector) + +object_address(binding::Initializer) = ObjectAddress(binding.selector) + struct EnvironmentConfig{C} config::C end @@ -133,9 +191,12 @@ end function _model_default_model_calls(model) defaults = Pair{Symbol,Any}[] - for (dep_name, selector) in pairs(dep(model)) - selector isa Call || continue - push!(defaults, Symbol(dep_name) => selector.selector) + for (dep_name, declaration) in pairs(dep(model)) + if declaration isa Call + push!(defaults, Symbol(dep_name) => declaration.selector) + elseif declaration isa Initializer + push!(defaults, Symbol(dep_name) => declaration) + end end return (; defaults...) end diff --git a/src/composite_model/selectors.jl b/src/composite_model/selectors.jl index 5f3f4165b..e2b53f197 100644 --- a/src/composite_model/selectors.jl +++ b/src/composite_model/selectors.jl @@ -384,6 +384,18 @@ function _map_selector_bindings(bindings::NamedTuple, f) return (; mapped...) end +function _map_call_bindings(bindings::NamedTuple, f) + mapped = Pair{Symbol,Any}[] + for (name, binding) in pairs(bindings) + selector = _call_binding_selector(binding) + push!( + mapped, + Symbol(name) => _call_binding_with_selector(binding, f(selector)), + ) + end + return (; mapped...) +end + function _mount_updates(updates, instance_name::Symbol, base_names) return Tuple( Updates( @@ -417,7 +429,7 @@ function _mount_object_instance_applications(instance::ObjectInstance, instance_ base_names, ) mounted_inputs = _map_selector_bindings(value_inputs(spec), prefix_application) - mounted_calls = _map_selector_bindings(model_calls(spec), prefix_application) + mounted_calls = _map_call_bindings(model_calls(spec), prefix_application) mounted_updates = _mount_updates(updates(spec), instance.name, base_names) mounted_model = get(instance_overrides, index, model_(spec)) if haskey(object_overrides, index) diff --git a/src/processes/models_inputs_outputs.jl b/src/processes/models_inputs_outputs.jl index 2806bc714..283527dd0 100644 --- a/src/processes/models_inputs_outputs.jl +++ b/src/processes/models_inputs_outputs.jl @@ -103,8 +103,10 @@ input_origins(spec::ModelSpec) = spec.input_origins """ model_calls(spec::ModelSpec) -Unified composite-model/object manual call bindings declared with the -`ModelSpec(...; calls=...)` keyword. +Unified composite-model/object call bindings declared with the +`ModelSpec(...; calls=...)` keyword. Ordinary object selectors declare manual +calls; [`Initializer`](@ref) wraps a selector for targeted newborn +initialization while leaving the callee normally scheduled. """ model_calls(spec::ModelSpec) = spec.calls call_origins(spec::ModelSpec) = spec.call_origins diff --git a/src/visualization/model_graph_editor_api.jl b/src/visualization/model_graph_editor_api.jl index 418dc7f99..ac636e9f4 100644 --- a/src/visualization/model_graph_editor_api.jl +++ b/src/visualization/model_graph_editor_api.jl @@ -494,12 +494,20 @@ function _rewrite_model_selector_application(selector, old_id::Symbol, new_id::S return _rebuild_selector(selector, rewritten) end +function _rewrite_model_call_application(binding, old_id::Symbol, new_id::Symbol) + selector = _call_binding_selector(binding) + return _call_binding_with_selector( + binding, + _rewrite_model_selector_application(selector, old_id, new_id), + ) +end + function _model_edit_spec_references_application(spec, application_id::Symbol) normalized = as_model_spec(spec) selectors = ( applies_to(normalized), values(value_inputs(normalized))..., - values(model_calls(normalized))..., + (_call_binding_selector(binding) for binding in values(model_calls(normalized)))..., ) selector_reference = any(selectors) do selector selector isa AbstractObjectMultiplicity || return false @@ -519,8 +527,8 @@ function _rewrite_model_spec_application_references(spec, old_id::Symbol, new_id for (name, selector) in pairs(value_inputs(normalized)) )...) calls = (; ( - Symbol(name) => _rewrite_model_selector_application(selector, old_id, new_id) - for (name, selector) in pairs(model_calls(normalized)) + Symbol(name) => _rewrite_model_call_application(binding, old_id, new_id) + for (name, binding) in pairs(model_calls(normalized)) )...) target = _rewrite_model_selector_application(applies_to(normalized), old_id, new_id) updates_ = Tuple( @@ -637,7 +645,7 @@ function _apply_model_graph_edit!(model::CompositeModel, edit::RemoveModelInputB end function _apply_model_graph_edit!(model::CompositeModel, edit::SetModelCallBinding) - edit.selector isa AbstractObjectMultiplicity || error("A call binding requires an object selector.") + _call_binding_selector(edit.selector) spec = _model_edit_spec(model, edit.application) calls = _model_edit_namedtuple_set(spec.calls, edit.call, edit.selector) origins = _model_edit_origins_set(spec.call_origins, edit.call, :model_spec) diff --git a/src/visualization/model_graph_view.jl b/src/visualization/model_graph_view.jl index e44a408b7..bc843e7c1 100644 --- a/src/visualization/model_graph_view.jl +++ b/src/visualization/model_graph_view.jl @@ -105,6 +105,12 @@ function _model_graph_dependency_children( input_bindings, call_owners, ) + _scenario_initializer_order_edges!( + children, + input_bindings, + call_bindings, + call_owners, + ) _scenario_update_order_edges!( children, applications, @@ -408,6 +414,13 @@ function compile_model_report(model::CompositeModel; strict::Bool=false) if !isempty(scenario_call_owners[application.id]) ) _model_graph_phase!(diagnostics, :call_ownership, nothing) do + _validate_initializer_call_plans!( + model, + applications, + input_plans, + call_plans, + distributed_output_plans, + ) _validate_scenario_call_ownership!( scenario_call_owners, manual_application_ids, @@ -425,7 +438,7 @@ function compile_model_report(model::CompositeModel; strict::Bool=false) ) end _model_graph_phase!(diagnostics, :call_cadence, nothing) do - _validate_model_call_cadences!(applications, call_bindings, timeline) + _validate_model_call_plan_cadences!(applications, call_plans, timeline) end distributed_outputs = _model_graph_phase!( diagnostics, @@ -461,6 +474,12 @@ function compile_model_report(model::CompositeModel; strict::Bool=false) input_plans, scenario_call_owners, ) + _scenario_initializer_order_edges!( + children, + input_plans, + call_plans, + scenario_call_owners, + ) end _model_graph_phase!(diagnostics, :update_order, nothing) do _scenario_update_order_edges!( @@ -695,6 +714,12 @@ function _model_graph_selector_dict(selector::AbstractObjectMultiplicity) ) end +function _model_graph_call_binding_dict(binding) + descriptor = _model_graph_selector_dict(_call_binding_selector(binding)) + descriptor["mode"] = string(_call_binding_mode(binding)) + return descriptor +end + function _model_graph_model_parameters(model) parameters = Dict{String,Any}() for field in fieldnames(Base.unwrap_unionall(typeof(model))) @@ -828,8 +853,8 @@ function _model_graph_application_dict( for (name, selector) in pairs(value_inputs(spec)) ), "callBindings" => Dict( - string(name) => _model_graph_selector_dict(selector) - for (name, selector) in pairs(model_calls(spec)) + string(name) => _model_graph_call_binding_dict(binding) + for (name, binding) in pairs(model_calls(spec)) ), "environment" => _model_graph_application_environment( environment_payload, @@ -1151,7 +1176,12 @@ end function _model_graph_call_edges(report, level) edges = Dict{String,Dict{String,Any}}() for binding in report.call_bindings - for callee_application_id in binding.callee_application_ids + callee_application_ids = level == :resolved ? + binding.callee_application_ids : + binding.potential_callee_application_ids + call_kind = _compiled_call_mode(binding) === :initializer ? + "initializer" : "manual_call" + for callee_application_id in callee_application_ids if level == :resolved for callee_object_id in binding.callee_object_ids edge_id = string( @@ -1164,7 +1194,8 @@ function _model_graph_call_edges(report, level) "target" => _model_graph_execution_node_id(callee_application_id, callee_object_id), "sourcePort" => nothing, "targetPort" => nothing, - "kind" => "manual_call", + "kind" => call_kind, + "mode" => string(_compiled_call_mode(binding)), "projection" => "resolved", "call" => string(binding.call), "origin" => string(binding.origin), @@ -1181,7 +1212,8 @@ function _model_graph_call_edges(report, level) "target" => _model_graph_application_node_id(callee_application_id), "sourcePort" => nothing, "targetPort" => nothing, - "kind" => "manual_call", + "kind" => call_kind, + "mode" => string(_compiled_call_mode(binding)), "projection" => "applications", "call" => string(binding.call), "origin" => string(binding.origin), diff --git a/test/runtests.jl b/test/runtests.jl index 5a09649ad..28ef4de34 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -46,6 +46,10 @@ else include("test-model-hard-calls.jl") end + @testset "Scheduled newborn initializers" begin + include("test-model-initializers.jl") + end + @testset "Composite model numerical parity" begin include("test-model-numerical-parity.jl") end diff --git a/test/test-model-api-stabilization.jl b/test/test-model-api-stabilization.jl index 18a30cc41..be68751b9 100644 --- a/test/test-model-api-stabilization.jl +++ b/test/test-model-api-stabilization.jl @@ -202,6 +202,7 @@ end :Evaluation, :GraphEditor, :HoldLast, + :Initializer, :Input, :Integrate, :Interpolate, @@ -278,6 +279,7 @@ end :resolve_objects, :run!, :run_call!, + :run_initializer!, :runtime_model, :source_node, :step!, diff --git a/test/test-model-graph-editor-extension.jl b/test/test-model-graph-editor-extension.jl index 921489c92..9e7d9ea15 100644 --- a/test/test-model-graph-editor-extension.jl +++ b/test/test-model-graph-editor-extension.jl @@ -13,6 +13,34 @@ struct EditorConsumerModel <: AbstractEditorConsumerModel end PlantSimEngine.inputs_(::EditorConsumerModel) = (signal=Required(Float64),) PlantSimEngine.outputs_(::EditorConsumerModel) = (result=-Inf,) +module EditorInitializerFixtures +import PlantSimEngine + +export EditorInitializerTargetModel, EditorInitializerCreatorModel + +abstract type AbstractEditorInitializerTargetModel <: + PlantSimEngine.AbstractModel end +abstract type AbstractEditorInitializerCreatorModel <: + PlantSimEngine.AbstractModel end +PlantSimEngine.process_(::Type{AbstractEditorInitializerTargetModel}) = + :editor_initializer_target +PlantSimEngine.process_(::Type{AbstractEditorInitializerCreatorModel}) = + :editor_initializer_creator + +struct EditorInitializerTargetModel <: + AbstractEditorInitializerTargetModel end +PlantSimEngine.inputs_(::EditorInitializerTargetModel) = NamedTuple() +PlantSimEngine.outputs_(::EditorInitializerTargetModel) = (initialized=0,) + +struct EditorInitializerCreatorModel <: + AbstractEditorInitializerCreatorModel end +PlantSimEngine.inputs_(::EditorInitializerCreatorModel) = NamedTuple() +PlantSimEngine.outputs_(::EditorInitializerCreatorModel) = NamedTuple() +end + +using .EditorInitializerFixtures: + EditorInitializerTargetModel, EditorInitializerCreatorModel + struct EditorEnvironmentBackend <: PlantSimEngine.EnvironmentAPI.AbstractEnvironmentBackend name::Symbol end @@ -508,6 +536,106 @@ end end +@testset "initializer editor commands preserve mode through save and open" begin + editor_extension = Base.get_extension(PlantSimEngine, :PlantSimEngineGraphEditorExt) + model = CompositeModel(Object(:leaf; name=:leaf, scale=:Leaf)) + session = edit_graph(model; port=0, open_browser=false, autosave=false) + try + initializer_target_response = editor_extension._handle_command!(session, Dict( + "action" => "edit", + "kind" => "add_application", + "name" => "initializer_target", + "modelType" => string(EditorInitializerTargetModel), + "parameters" => Dict(), + "selector" => Dict( + "multiplicity" => "many", + "criteria" => Dict("selectors" => Any[], "scale" => "Leaf"), + ), + "cadence" => Dict("mode" => "default"), + )) + @test initializer_target_response["ok"] + initializer_creator_response = editor_extension._handle_command!(session, Dict( + "action" => "edit", + "kind" => "add_application", + "name" => "initializer_creator", + "modelType" => string(EditorInitializerCreatorModel), + "parameters" => Dict(), + "selector" => Dict( + "multiplicity" => "one", + "criteria" => Dict("selectors" => Any[], "name" => "leaf"), + ), + "cadence" => Dict("mode" => "default"), + )) + @test initializer_creator_response["ok"] + initializer_response = editor_extension._handle_command!(session, Dict( + "action" => "edit", + "kind" => "set_call_binding", + "applicationRef" => editor_global_ref(:initializer_creator), + "call" => "newborn", + "mode" => "initializer", + "selector" => Dict( + "multiplicity" => "one", + "criteria" => Dict( + "selectors" => Any[], + "within" => Dict("type" => "Self"), + "application" => "initializer_target", + ), + ), + )) + @test initializer_response["ok"] + initializer_creator = only( + PlantSimEngine.as_model_spec(spec) + for spec in current_model(session).applications + if application_name(PlantSimEngine.as_model_spec(spec)) == + :initializer_creator + ) + @test model_calls(initializer_creator).newborn isa Initializer + initializer_application = only( + application + for application in initializer_response["graph"]["applications"] + if application["applicationId"] == "initializer_creator" + ) + @test initializer_application["callBindings"]["newborn"]["mode"] == + "initializer" + initializer_edge = only( + edge for edge in initializer_response["graph"]["edges"] + if edge["kind"] == "initializer" + ) + @test initializer_edge["projection"] == "applications" + @test !any( + edge -> edge["kind"] == "initializer" && + edge["projection"] == "resolved", + model_graph_view(current_model(session); level=:resolved).edges, + ) + + saved_initializer_path = joinpath(mktempdir(), "initializer-editor-model.jl") + saved_initializer = editor_extension._handle_command!(session, Dict( + "action" => "save_model_code", + "path" => saved_initializer_path, + )) + @test saved_initializer["ok"] + @test occursin("Initializer", read(saved_initializer_path, String)) + reopened_initializer = editor_extension._handle_command!(session, Dict( + "action" => "open_model_code", + "path" => saved_initializer_path, + )) + reopened_initializer["ok"] || error( + join(reopened_initializer["diagnostics"], "\n"), + ) + @test reopened_initializer["ok"] + reopened_creator = only( + PlantSimEngine.as_model_spec(spec) + for spec in current_model(session).applications + if application_name(PlantSimEngine.as_model_spec(spec)) == + :initializer_creator + ) + @test model_calls(reopened_creator).newborn isa Initializer + finally + close(session) + end +end + + @testset "generated Julia code reconstructs templates and overrides" begin editor_extension = Base.get_extension(PlantSimEngine, :PlantSimEngineGraphEditorExt) template = CompositeModelTemplate( diff --git a/test/test-model-graph-view.jl b/test/test-model-graph-view.jl index 803ad4d56..118b03b8c 100644 --- a/test/test-model-graph-view.jl +++ b/test/test-model-graph-view.jl @@ -773,6 +773,90 @@ end @test ObjectId(:child) in object_ids(with_objects) end +@testset "CompositeModel graph editor preserves initializer bindings" begin + model = CompositeModel( + Object(:plant; name=:plant, scale=:Plant), + Object( + :leaf; + name=:leaf, + scale=:Leaf, + parent=:plant, + status=Status(driver=1.0), + ); + applications=( + ModelSpec( + ModelGraphSourceModel(); + name=:source, + on=Many(scale=:Leaf), + ), + ModelSpec( + ModelGraphDistributedWriterModel(); + name=:creator, + on=One(name=:plant), + ), + ), + ) + + configured = apply_model_graph_edit( + model, + SetModelCallBinding( + model_graph_global(:creator), + :source_initializer, + Initializer( + One( + scale=:Leaf, + within=Subtree(), + application=:source, + ), + ), + ), + ) + configured_creator = + PlantSimEngine._model_edit_spec(configured, model_graph_global(:creator)) + configured_binding = model_calls(configured_creator).source_initializer + @test configured_binding isa Initializer + @test PlantSimEngine._call_binding_mode(configured_binding) == :initializer + + renamed = apply_model_graph_edit( + configured, + RenameModelApplication(model_graph_global(:source), :renamed_source), + ) + renamed_creator = + PlantSimEngine._model_edit_spec(renamed, model_graph_global(:creator)) + renamed_binding = model_calls(renamed_creator).source_initializer + @test renamed_binding isa Initializer + @test PlantSimEngine._call_binding_mode(renamed_binding) == :initializer + @test PlantSimEngine.criteria(renamed_binding.selector).application == + :renamed_source + + report = compile_model_report(renamed; strict=true) + call = only(report.call_bindings) + @test PlantSimEngine._compiled_call_mode(call) == :initializer + @test isempty(call.callee_object_ids) + @test call.callee_application_ids == [:renamed_source] + + application_view = model_graph_view(renamed) + initializer_edge = only( + edge for edge in application_view.edges + if edge["kind"] == "initializer" + ) + @test initializer_edge["mode"] == "initializer" + @test initializer_edge["projection"] == "applications" + creator_view = only( + application for application in application_view.applications + if application["applicationId"] == "creator" + ) + @test creator_view["callBindings"]["source_initializer"]["mode"] == + "initializer" + + resolved_view = model_graph_view(renamed; level=:resolved) + @test !any( + edge -> edge["kind"] == "initializer" && + edge["projection"] == "resolved", + resolved_view.edges, + ) +end + function model_graph_override_fixture() template = CompositeModelTemplate( ( diff --git a/test/test-model-initializers.jl b/test/test-model-initializers.jl new file mode 100644 index 000000000..c0c440812 --- /dev/null +++ b/test/test-model-initializers.jl @@ -0,0 +1,1867 @@ +using Dates +using MultiScaleTreeGraph +using PlantSimEngine +using PlantSimEngine.Diagnostics +using Test + +const INITIALIZER_CAPTURED_CONTEXT = Ref{Any}() + +struct InitializerNonGlobalBackend <: + PlantSimEngine.EnvironmentAPI.AbstractEnvironmentBackend end + +PlantSimEngine.@process "initializer_leaf_state" verbose = false +PlantSimEngine.@process "initializer_creator" verbose = false +PlantSimEngine.@process "initializer_observer" verbose = false +PlantSimEngine.@process "initializer_observer_owner" verbose = false +PlantSimEngine.@process "initializer_mtg_creator" verbose = false +PlantSimEngine.@process "initializer_batch_creator" verbose = false +PlantSimEngine.@process "initializer_chain_source" verbose = false +PlantSimEngine.@process "initializer_chain_sink" verbose = false +PlantSimEngine.@process "initializer_chain_creator" verbose = false +PlantSimEngine.@process "initializer_split_creator" verbose = false +PlantSimEngine.@process "initializer_overlap_writer" verbose = false +PlantSimEngine.@process "initializer_cache_manual_target" verbose = false +PlantSimEngine.@process "initializer_cache_mutator" verbose = false + +struct InitializerLeafStateModel <: AbstractInitializer_Leaf_StateModel + throw_after_mutation::Bool +end + +InitializerLeafStateModel() = InitializerLeafStateModel(false) + +PlantSimEngine.inputs_(::InitializerLeafStateModel) = ( + previous_mass=Required(Float64), +) +PlantSimEngine.outputs_(::InitializerLeafStateModel) = ( + mass=0.0, + initializer_runs=0, +) + +function PlantSimEngine.run!( + model::InitializerLeafStateModel, + status, + environment, + constants, + context, +) + status.mass = status.previous_mass + 1.0 + status.initializer_runs += 1 + model.throw_after_mutation && error("initializer failed after mutation") + return nothing +end + +struct InitializerCreatorModel <: AbstractInitializer_CreatorModel + action::Symbol +end + +InitializerCreatorModel() = InitializerCreatorModel(:create) + +function PlantSimEngine.dep(model::InitializerCreatorModel) + model.action === :default_binding || return NamedTuple() + return ( + leaf=Initializer( + One(scale=:Leaf, application=:leaf_initializer), + ), + ) +end + +PlantSimEngine.inputs_(::InitializerCreatorModel) = NamedTuple() +PlantSimEngine.outputs_(::InitializerCreatorModel) = ( + created=false, + initialized_mass=-1.0, + duplicate_rejected=false, + manual_api_rejected=false, + failure_seen=false, + retry_rejected=false, + runs_after_failed_retry=-1, + cached_initializer_batches_empty=false, +) + +function PlantSimEngine.run!( + model::InitializerCreatorModel, + status, + environment, + constants, + context, +) + runtime = runtime_model(context) + if model.action === :create + status.created && return nothing + status.cached_initializer_batches_empty = isempty( + PlantSimEngine._model_call_targets( + context, + :leaf, + ).execution_batches, + ) + leaf = register_object!( + runtime, + Object( + :new_leaf; + scale=:Leaf, + parent=:plant, + status=Status( + mass=4.0, + previous_mass=4.0, + initializer_runs=0, + ), + ), + ) + initialized = run_initializer!(context, :leaf, leaf) + status.initialized_mass = initialized.mass + try + run_initializer!(context, :leaf, leaf) + catch err + status.duplicate_rejected = occursin( + "already initialized", + sprint(showerror, err), + ) + end + try + call_targets(context, :leaf) + catch err + status.manual_api_rejected = occursin( + "run_initializer!", + sprint(showerror, err), + ) + end + status.created = true + elseif model.action === :existing + run_initializer!(context, :leaf, ObjectId(:existing_leaf)) + elseif model.action === :reparented + reparent_object!(runtime, :existing_leaf, :plant_b) + run_initializer!(context, :leaf, ObjectId(:existing_leaf)) + elseif model.action === :removed + remove_object!(runtime, :existing_leaf) + run_initializer!(context, :leaf, ObjectId(:existing_leaf)) + elseif model.action === :foreign + registered = register_object!( + runtime, + Object( + :foreign_identity_leaf; + scale=:Leaf, + parent=:plant, + status=Status( + mass=4.0, + previous_mass=4.0, + initializer_runs=0, + ), + ), + ) + foreign = Object( + registered.id; + scale=:Leaf, + parent=:plant, + status=Status( + mass=4.0, + previous_mass=4.0, + initializer_runs=0, + ), + ) + run_initializer!(context, :leaf, foreign) + elseif model.action === :failing + leaf = register_object!( + runtime, + Object( + :failing_leaf; + scale=:Leaf, + parent=:plant, + status=Status( + mass=4.0, + previous_mass=4.0, + initializer_runs=0, + ), + ), + ) + try + run_initializer!(context, :leaf, leaf) + catch err + status.failure_seen = occursin( + "failed after mutation", + sprint(showerror, err), + ) + end + try + run_initializer!(context, :leaf, leaf) + catch err + status.retry_rejected = occursin( + "already initialized", + sprint(showerror, err), + ) + end + status.runs_after_failed_retry = model_status( + runtime, + leaf, + ).initializer_runs + elseif model.action === :manual_binding + leaf = register_object!( + runtime, + Object( + :wrong_mode_leaf; + scale=:Leaf, + parent=:plant, + status=Status( + mass=4.0, + previous_mass=4.0, + initializer_runs=0, + ), + ), + ) + run_initializer!(context, :leaf, leaf) + elseif model.action === :capture + INITIALIZER_CAPTURED_CONTEXT[] = context + status.created = true + else + error("Unsupported initializer test action `$(model.action)`.") + end + return nothing +end + +struct InitializerObserverModel <: AbstractInitializer_ObserverModel end + +PlantSimEngine.inputs_(::InitializerObserverModel) = ( + mass=Required(Float64), +) +PlantSimEngine.outputs_(::InitializerObserverModel) = (observed_mass=-1.0,) + +function PlantSimEngine.run!( + ::InitializerObserverModel, + status, + environment, + constants, + context, +) + status.observed_mass = status.mass + return nothing +end + +struct InitializerObserverOwnerModel <: + AbstractInitializer_Observer_OwnerModel end + +PlantSimEngine.inputs_(::InitializerObserverOwnerModel) = NamedTuple() +PlantSimEngine.outputs_(::InitializerObserverOwnerModel) = ( + owned_observed_mass=-1.0, +) + +function PlantSimEngine.run!( + ::InitializerObserverOwnerModel, + status, + environment, + constants, + context, +) + target = only(run_call!(context, :observer; publish=true)) + status.owned_observed_mass = target.status.observed_mass + return nothing +end + +struct InitializerMTGCreatorModel <: AbstractInitializer_Mtg_CreatorModel end + +PlantSimEngine.inputs_(::InitializerMTGCreatorModel) = NamedTuple() +PlantSimEngine.outputs_(::InitializerMTGCreatorModel) = ( + created=false, + initialized_mass=-1.0, + returned_status_is_registered=false, + source_identity_matches=false, + runtime_attribute_absent=false, +) + +function PlantSimEngine.run!( + ::InitializerMTGCreatorModel, + status, + environment, + constants, + context, +) + status.created && return nothing + runtime = runtime_model(context) + leaf_status = add_organ!( + source_node(context), + runtime, + :+, + :Leaf, + 2; + index=1, + initial_status=( + mass=4.0, + previous_mass=4.0, + initializer_runs=0, + ), + ) + status.returned_status_is_registered = + model_status(runtime, leaf_status) === leaf_status + status.source_identity_matches = + source_node(runtime, leaf_status) === leaf_status.node + status.runtime_attribute_absent = !haskey( + node_attributes(leaf_status.node), + :plantsimengine_status, + ) + status.initialized_mass = run_initializer!( + context, + :leaf, + leaf_status, + ).mass + status.created = true + return nothing +end + +struct InitializerBatchCreatorModel <: AbstractInitializer_Batch_CreatorModel + count::Int +end + +PlantSimEngine.inputs_(::InitializerBatchCreatorModel) = NamedTuple() +PlantSimEngine.outputs_(::InitializerBatchCreatorModel) = ( + initialized_count=0, + initialized_mass_total=0.0, +) + +function PlantSimEngine.run!( + model::InitializerBatchCreatorModel, + status, + environment, + constants, + context, +) + status.initialized_count > 0 && return nothing + for index in 1:model.count + leaf = register_object!( + runtime_model(context), + Object( + Symbol(:batch_leaf_, index); + scale=:Leaf, + parent=:plant, + status=Status( + mass=4.0, + previous_mass=4.0, + initializer_runs=0, + ), + ), + ) + initialized = run_initializer!(context, :leaf, leaf) + status.initialized_count += 1 + status.initialized_mass_total += initialized.mass + end + return nothing +end + +struct InitializerChainSourceModel <: + AbstractInitializer_Chain_SourceModel end + +PlantSimEngine.inputs_(::InitializerChainSourceModel) = NamedTuple() +PlantSimEngine.outputs_(::InitializerChainSourceModel) = (signal=0.0,) + +function PlantSimEngine.run!( + ::InitializerChainSourceModel, + status, + environment, + constants, + context, +) + status.signal = 7.0 + return nothing +end + +struct InitializerChainSinkModel <: AbstractInitializer_Chain_SinkModel end + +PlantSimEngine.inputs_(::InitializerChainSinkModel) = ( + source_signal=Required(Float64), +) +PlantSimEngine.outputs_(::InitializerChainSinkModel) = (seen=-1.0,) + +function PlantSimEngine.run!( + ::InitializerChainSinkModel, + status, + environment, + constants, + context, +) + status.seen = status.source_signal + return nothing +end + +struct InitializerChainCreatorModel <: + AbstractInitializer_Chain_CreatorModel end + +PlantSimEngine.inputs_(::InitializerChainCreatorModel) = NamedTuple() +PlantSimEngine.outputs_(::InitializerChainCreatorModel) = ( + created=false, + sink_seen=-1.0, +) + +function PlantSimEngine.run!( + ::InitializerChainCreatorModel, + status, + environment, + constants, + context, +) + status.created && return nothing + runtime = runtime_model(context) + source = register_object!( + runtime, + Object( + :chain_source_object; + scale=:Leaf, + kind=:ChainSource, + parent=:plant, + status=Status(signal=0.0), + ), + ) + run_initializer!(context, :source, source) + sink = register_object!( + runtime, + Object( + :chain_sink_object; + scale=:Leaf, + kind=:ChainSink, + parent=:plant, + status=Status(seen=-1.0), + ), + ) + status.sink_seen = run_initializer!(context, :sink, sink).seen + status.created = true + return nothing +end + +struct InitializerSplitCreatorModel <: + AbstractInitializer_Split_CreatorModel end + +PlantSimEngine.inputs_(::InitializerSplitCreatorModel) = NamedTuple() +PlantSimEngine.outputs_(::InitializerSplitCreatorModel) = ( + created=false, + sink_seen=-1.0, +) + +function PlantSimEngine.run!( + ::InitializerSplitCreatorModel, + status, + environment, + constants, + context, +) + status.created && return nothing + runtime = runtime_model(context) + if object_id(context) == ObjectId(:chain_creator_a) + source = register_object!( + runtime, + Object( + :split_chain_source; + scale=:Leaf, + kind=:ChainSource, + parent=:plant, + status=Status(signal=0.0), + ), + ) + run_initializer!(context, :source, source) + elseif object_id(context) == ObjectId(:chain_creator_b) + sink = register_object!( + runtime, + Object( + :split_chain_sink; + scale=:Leaf, + kind=:ChainSink, + parent=:plant, + status=Status(seen=-1.0), + ), + ) + status.sink_seen = run_initializer!(context, :sink, sink).seen + else + error("Unexpected split creator target `$(object_id(context).value)`.") + end + status.created = true + return nothing +end + +struct InitializerOverlapWriterModel <: + AbstractInitializer_Overlap_WriterModel end + +PlantSimEngine.inputs_(::InitializerOverlapWriterModel) = NamedTuple() +PlantSimEngine.outputs_(::InitializerOverlapWriterModel) = (mass=0.0,) + +function PlantSimEngine.run!( + ::InitializerOverlapWriterModel, + status, + environment, + constants, + context, +) + status.mass = 99.0 + return nothing +end + +const INITIALIZER_CACHE_BASE_COMPILED = Ref{Any}() + +struct InitializerCacheManualTargetModel <: + AbstractInitializer_Cache_Manual_TargetModel end + +PlantSimEngine.inputs_(::InitializerCacheManualTargetModel) = NamedTuple() +PlantSimEngine.outputs_(::InitializerCacheManualTargetModel) = ( + signal=0.0, + refreshed_plan=false, +) + +function PlantSimEngine.run!( + ::InitializerCacheManualTargetModel, + status, + environment, + constants, + context, +) + status.signal = 7.0 + status.refreshed_plan = context.compiled !== INITIALIZER_CACHE_BASE_COMPILED[] + return nothing +end + +struct InitializerCacheMutatorModel <: + AbstractInitializer_Cache_MutatorModel end + +PlantSimEngine.inputs_(::InitializerCacheMutatorModel) = NamedTuple() +PlantSimEngine.outputs_(::InitializerCacheMutatorModel) = ( + created=false, + targeted_value=-1.0, + refreshed_plan=false, + cache_invalidated=false, + bindings_remained_dirty=false, +) + +function PlantSimEngine.run!( + ::InitializerCacheMutatorModel, + status, + environment, + constants, + context, +) + status.created && return nothing + runtime = runtime_model(context) + if object_id(context) == ObjectId(:cache_creator_a) + leaf = register_object!( + runtime, + Object( + :cache_leaf_a; + scale=:Leaf, + kind=:CacheLeaf, + parent=:plant, + status=Status(signal=0.0, refreshed_plan=false), + ), + ) + run_call!(context, :manual_leaf; objects=leaf, publish=false) + elseif object_id(context) == ObjectId(:cache_creator_b) + leaf = register_object!( + runtime, + Object( + :cache_leaf_b; + scale=:Leaf, + kind=:CacheLeaf, + parent=:plant, + status=Status(signal=0.0, refreshed_plan=false), + ), + ) + reparent_object!(runtime, :cache_leaf_a, :plant_b) + status.cache_invalidated = isnothing( + PlantSimEngine.lifecycle_delta(runtime).targeted_topology_runtime, + ) + target = only( + run_call!( + context, + :manual_leaf; + objects=leaf, + publish=false, + ), + ) + status.targeted_value = target.status.signal + status.refreshed_plan = target.status.refreshed_plan + status.bindings_remained_dirty = + PlantSimEngine.bindings_dirty(runtime) + else + error("Unexpected cache mutator target `$(object_id(context).value)`.") + end + status.created = true + return nothing +end + +PlantSimEngine.@process "initializer_exact_biomass" verbose = false +PlantSimEngine.@process "initializer_exact_respiration" verbose = false +PlantSimEngine.@process "initializer_exact_creator" verbose = false +PlantSimEngine.@process "initializer_distributed_writer" verbose = false +PlantSimEngine.@process "initializer_distributed_direct" verbose = false +PlantSimEngine.@process "initializer_distributed_lagged" verbose = false +PlantSimEngine.@process "initializer_distributed_creator" verbose = false + +struct InitializerExactBiomassModel <: AbstractInitializer_Exact_BiomassModel end + +PlantSimEngine.inputs_(::InitializerExactBiomassModel) = NamedTuple() +PlantSimEngine.outputs_(::InitializerExactBiomassModel) = (biomass=0.0,) + +function PlantSimEngine.run!( + ::InitializerExactBiomassModel, + status, + environment, + constants, + context, +) + return nothing +end + +struct InitializerExactRespirationModel <: + AbstractInitializer_Exact_RespirationModel end + +PlantSimEngine.inputs_(::InitializerExactRespirationModel) = ( + biomass=Required(Float64), +) +PlantSimEngine.outputs_(::InitializerExactRespirationModel) = (Rm=-Inf,) + +function PlantSimEngine.run!( + ::InitializerExactRespirationModel, + status, + environment, + constants, + context, +) + status.Rm = 2.0 * status.biomass + return nothing +end + +struct InitializerExactCreatorModel <: AbstractInitializer_Exact_CreatorModel end + +PlantSimEngine.inputs_(::InitializerExactCreatorModel) = NamedTuple() +PlantSimEngine.outputs_(::InitializerExactCreatorModel) = (initialized_Rm=-Inf,) + +function PlantSimEngine.run!( + ::InitializerExactCreatorModel, + status, + environment, + constants, + context, +) + leaf = register_object!( + runtime_model(context), + Object( + :exact_new_leaf; + scale=:Leaf, + parent=:plant, + status=Status(biomass=4.0), + ), + ) + status.initialized_Rm = run_initializer!( + context, + :respiration, + leaf, + ).Rm + return nothing +end + +struct InitializerDistributedWriterModel{T} <: + AbstractInitializer_Distributed_WriterModel + multiplier::T +end + +PlantSimEngine.inputs_(::InitializerDistributedWriterModel) = NamedTuple() +PlantSimEngine.outputs_(::InitializerDistributedWriterModel) = NamedTuple() + +function PlantSimEngine.run!( + model::InitializerDistributedWriterModel, + status, + environment, + constants, + context, +) + targets = output_targets(context, :plants) + fill!(targets.columns.incident_par, model.multiplier * context.time) + return nothing +end + +struct InitializerDistributedDirectModel <: + AbstractInitializer_Distributed_DirectModel end + +PlantSimEngine.inputs_(::InitializerDistributedDirectModel) = ( + incident_par=Required(Float64), +) +PlantSimEngine.outputs_(::InitializerDistributedDirectModel) = ( + direct_seen=-Inf, +) + +function PlantSimEngine.run!( + ::InitializerDistributedDirectModel, + status, + environment, + constants, + context, +) + status.direct_seen = status.incident_par + return nothing +end + +struct InitializerDistributedLaggedModel <: + AbstractInitializer_Distributed_LaggedModel end + +PlantSimEngine.inputs_(::InitializerDistributedLaggedModel) = ( + previous_incident_par=Required(Vector{Float64}), +) +PlantSimEngine.outputs_(::InitializerDistributedLaggedModel) = ( + lagged_total=-Inf, +) + +function PlantSimEngine.run!( + ::InitializerDistributedLaggedModel, + status, + environment, + constants, + context, +) + status.lagged_total = sum(status.previous_incident_par) + return nothing +end + +struct InitializerDistributedCreatorModel <: + AbstractInitializer_Distributed_CreatorModel end + +PlantSimEngine.inputs_(::InitializerDistributedCreatorModel) = NamedTuple() +PlantSimEngine.outputs_(::InitializerDistributedCreatorModel) = ( + created=false, + direct_seen=-Inf, + lagged_total=-Inf, +) + +function PlantSimEngine.run!( + ::InitializerDistributedCreatorModel, + status, + environment, + constants, + context, +) + context.time == 2 || return nothing + status.created && return nothing + leaf = register_object!( + runtime_model(context), + Object( + :distributed_new_leaf; + scale=:Leaf, + parent=:plant_a, + status=Status(previous_incident_par=[-1.0, -1.0]), + ), + ) + status.direct_seen = run_initializer!( + context, + :direct, + leaf, + ).direct_seen + status.lagged_total = run_initializer!( + context, + :lagged, + leaf, + ).lagged_total + status.created = true + return nothing +end + +function initializer_leaf_application(; + every=nothing, + output_routing=NamedTuple(), + outputs_to=NamedTuple(), + calls=NamedTuple(), + environment=nothing, + policy=PreviousTimeStep(:previous_mass), + throw_after_mutation=false, +) + return ModelSpec( + InitializerLeafStateModel(throw_after_mutation); + name=:leaf_initializer, + on=Many(scale=:Leaf), + inputs=( + previous_mass=One( + within=Self(), + application=:leaf_initializer, + var=:mass, + policy=policy, + ), + ), + calls=calls, + every=every, + environment=environment, + outputs_to=outputs_to, + output_routing=output_routing, + ) +end + +function initializer_creator_application( + action=:create; + binding=Initializer( + One(scale=:Leaf, application=:leaf_initializer), + ), + every=nothing, +) + return ModelSpec( + InitializerCreatorModel(action); + name=:creator, + on=One(scale=:Scene), + calls=(leaf=binding,), + every=every, + ) +end + +function initializer_observer_application() + return ModelSpec( + InitializerObserverModel(); + name=:observer, + on=Many(scale=:Leaf), + inputs=( + mass=One( + within=Self(), + application=:leaf_initializer, + var=:mass, + ), + ), + ) +end + +@testset "PreviousTimeStep initializer uses newborn canonical state" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene); + applications=( + ModelSpec( + InitializerExactRespirationModel(); + name=:respiration, + on=Many(scale=:Leaf), + inputs=( + biomass=One( + within=Self(), + application=:biomass_source, + var=:biomass, + policy=PreviousTimeStep(:biomass), + ), + ), + ), + ModelSpec( + InitializerExactCreatorModel(); + name=:creator, + on=One(scale=:Scene), + calls=( + respiration=Initializer( + One(scale=:Leaf, application=:respiration), + ), + ), + ), + ModelSpec( + InitializerExactBiomassModel(); + name=:biomass_source, + on=Many(scale=:Leaf), + ), + ), + environment=(duration=Hour(1),), + ) + + compiled = Advanced.refresh_bindings!(model) + @test compiled.application_order == + (:respiration, :creator, :biomass_source) + simulation = run!(model; steps=1, outputs=:all) + leaf_status = model_status(model, :exact_new_leaf) + @test leaf_status.biomass == 4.0 + @test leaf_status.Rm == 8.0 + @test model_status(model, :scene).initialized_Rm == 8.0 + @test isempty( + outputs(simulation)[ + (:respiration, ObjectId(:exact_new_leaf), :Rm) + ], + ) + @test last.( + outputs(simulation)[ + (:biomass_source, ObjectId(:exact_new_leaf), :biomass) + ], + ) == [4.0] +end + +@testset "initializer resolves distributed current and prior sources" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant_a; name=:plant_a, scale=:Plant, parent=:scene), + Object(:plant_b; name=:plant_b, scale=:Plant, parent=:scene); + applications=( + ModelSpec( + InitializerDistributedWriterModel(10.0); + name=:writer_a, + on=One(scale=:Scene), + outputs_to=( + plants=OutputTo( + Many(name=:plant_a, within=SceneScope()); + vars=(incident_par=Default(0.0),), + ), + ), + ), + ModelSpec( + InitializerDistributedWriterModel(100.0); + name=:writer_b, + on=One(scale=:Scene), + outputs_to=( + plants=OutputTo( + Many(name=:plant_b, within=SceneScope()); + vars=(incident_par=Default(0.0),), + ), + ), + ), + ModelSpec( + InitializerDistributedDirectModel(); + name=:distributed_direct, + on=Many(scale=:Leaf), + inputs=( + incident_par=One( + Relation(:parent); + application=:writer_a, + var=:incident_par, + ), + ), + ), + ModelSpec( + InitializerDistributedLaggedModel(); + name=:distributed_lagged, + on=Many(scale=:Leaf), + inputs=( + previous_incident_par=Many( + scale=:Plant, + within=SceneScope(), + var=:incident_par, + policy=PreviousTimeStep(:previous_incident_par), + ), + ), + ), + ModelSpec( + InitializerDistributedCreatorModel(); + name=:distributed_creator, + on=One(scale=:Scene), + calls=( + direct=Initializer( + One(scale=:Leaf, application=:distributed_direct), + ), + lagged=Initializer( + One(scale=:Leaf, application=:distributed_lagged), + ), + ), + ), + ), + environment=(duration=Hour(1),), + ) + + compiled = Advanced.refresh_bindings!(model) + @test compiled.distributed_outputs isa + PlantSimEngine.CompiledDistributedOutputs + @test findfirst(==(:writer_a), compiled.application_order) < + findfirst(==(:distributed_creator), compiled.application_order) + @test findfirst(==(:writer_b), compiled.application_order) < + findfirst(==(:distributed_creator), compiled.application_order) + + run!(model; steps=2, outputs=:all) + creator = model_status(model, :scene) + leaf = model_status(model, :distributed_new_leaf) + @test creator.created + @test creator.direct_seen == 20.0 + @test creator.lagged_total == 110.0 + @test leaf.direct_seen == 20.0 + @test leaf.lagged_total == 110.0 + @test model_status(model, :plant_a).incident_par == 20.0 + @test model_status(model, :plant_b).incident_par == 200.0 +end + +@testset "initializer orders a distinct root hard-call owner" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene); + applications=( + ModelSpec( + InitializerObserverOwnerModel(); + name=:observer_owner, + on=One(scale=:Scene), + calls=( + observer=Many(scale=:Leaf, application=:observer), + ), + ), + initializer_observer_application(), + initializer_creator_application(), + initializer_leaf_application(), + ), + environment=(duration=Hour(1),), + ) + + compiled = Advanced.refresh_bindings!(model) + @test :observer_owner in + compiled.scenario_plan.application_children.creator + schedule = Dict(row.application_id => row for row in explain_schedule(compiled)) + @test schedule[:observer_owner].root_scheduled + @test !schedule[:observer].root_scheduled + @test findfirst(==(:creator), compiled.application_order) < + findfirst(==(:observer_owner), compiled.application_order) + + run!(model; steps=1, outputs=:all) + @test model_status(model, :scene).owned_observed_mass == 5.0 + @test model_status(model, :new_leaf).observed_mass == 5.0 +end + +@testset "MTG add_organ! status is the initializer target identity" begin + root = Node(MultiScaleTreeGraph.NodeMTG("/", :Scene, 1, 0)) + plant = Node( + root, + MultiScaleTreeGraph.NodeMTG("+", :Plant, 1, 1), + ) + model = CompositeModel( + root; + applications=( + ModelSpec( + InitializerMTGCreatorModel(); + name=:mtg_creator, + on=One(scale=:Plant), + calls=( + leaf=Initializer( + One( + scale=:Leaf, + within=Subtree(), + application=:leaf_initializer, + ), + ), + ), + ), + initializer_leaf_application(), + ), + environment=(duration=Hour(1),), + ) + + run!(model; steps=1, outputs=:all) + creator = model_status(model, plant) + @test creator.created + @test creator.initialized_mass == 5.0 + @test creator.returned_status_is_registered + @test creator.source_identity_matches + @test creator.runtime_attribute_absent + + leaf_object = only(model_objects(model; scale=:Leaf)) + leaf_status = model_status(model, leaf_object.id) + leaf_node = source_node(model, leaf_status) + @test leaf_status === leaf_object.status + @test source_node(model, leaf_object.id) === leaf_node + @test !haskey(node_attributes(leaf_node), :plantsimengine_status) + @test leaf_status.mass == 5.0 + @test leaf_status.initializer_runs == 1 +end + +@testset "mounted template preserves initializer mode and application identity" begin + template = CompositeModelTemplate(( + ModelSpec( + InitializerCreatorModel(:existing); + name=:creator, + on=One(scale=:Plant), + calls=( + leaf=Initializer( + One( + scale=:Leaf, + within=Subtree(), + application=:leaf_initializer, + ), + ), + ), + ), + initializer_leaf_application(), + )) + model = CompositeModel( + ObjectInstance( + :palm, + template; + root=Object(:palm; scale=:Plant), + objects=( + Object( + :leaf; + scale=:Leaf, + parent=:palm, + status=Status( + mass=4.0, + previous_mass=4.0, + initializer_runs=0, + ), + ), + ), + ); + environment=(duration=Hour(1),), + ) + + compiled = Advanced.refresh_bindings!(model) + mounted_creator = compiled.applications_by_id[:palm__creator] + mounted_binding = model_calls(mounted_creator.spec).leaf + @test mounted_binding isa Initializer + @test PlantSimEngine._call_binding_mode(mounted_binding) == :initializer + @test PlantSimEngine.criteria(mounted_binding.selector).application == + :palm__leaf_initializer + call = only(compiled.call_bindings) + @test PlantSimEngine._compiled_call_mode(call) == :initializer + @test call.potential_callee_application_ids == (:palm__leaf_initializer,) + @test call.callee_application_ids == [:palm__leaf_initializer] + @test isempty(call.callee_object_ids) +end + +@testset "many additions remain explicit one-shot initializer targets" begin + batch_size = 32 + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene); + applications=( + ModelSpec( + InitializerBatchCreatorModel(batch_size); + name=:batch_creator, + on=One(scale=:Scene), + calls=( + leaf=Initializer( + One(scale=:Leaf, application=:leaf_initializer), + ), + ), + ), + initializer_leaf_application(), + ), + environment=(duration=Hour(1),), + ) + + compiled = Advanced.refresh_bindings!(model) + call = only(compiled.call_bindings) + @test isempty(call.callee_object_ids) + run!(model; steps=1, outputs=:none) + + creator = model_status(model, :scene) + @test creator.initialized_count == batch_size + @test creator.initialized_mass_total == 5.0 * batch_size + leaves = model_objects(model; scale=:Leaf) + @test length(leaves) == batch_size + @test all(leaf -> leaf.status.mass == 5.0, leaves) + @test all(leaf -> leaf.status.initializer_runs == 1, leaves) +end + +@testset "later newborn resolves an earlier initialized newborn" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene); + applications=( + ModelSpec( + InitializerChainSourceModel(); + name=:chain_source, + on=Many(scale=:Leaf, kind=:ChainSource), + ), + ModelSpec( + InitializerChainSinkModel(); + name=:chain_sink, + on=Many(scale=:Leaf, kind=:ChainSink), + inputs=( + source_signal=One( + scale=:Leaf, + kind=:ChainSource, + within=SceneScope(), + application=:chain_source, + var=:signal, + ), + ), + ), + ModelSpec( + InitializerChainCreatorModel(); + name=:chain_creator, + on=One(scale=:Scene), + calls=( + source=Initializer( + One( + scale=:Leaf, + kind=:ChainSource, + within=SceneScope(), + application=:chain_source, + ), + ), + sink=Initializer( + One( + scale=:Leaf, + kind=:ChainSink, + within=SceneScope(), + application=:chain_sink, + ), + ), + ), + ), + ), + environment=(duration=Hour(1),), + ) + + compiled = Advanced.refresh_bindings!(model) + @test findfirst(==(:chain_source), compiled.application_order) < + findfirst(==(:chain_sink), compiled.application_order) < + findfirst(==(:chain_creator), compiled.application_order) + run!(model; steps=1, outputs=:none) + @test model_status(model, :chain_source_object).signal == 7.0 + @test model_status(model, :chain_sink_object).seen == 7.0 + @test model_status(model, :scene).sink_seen == 7.0 +end + +@testset "newborn overlay spans creator targets before the barrier" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene), + Object( + :chain_creator_a; + scale=:Creator, + kind=:ChainCreator, + parent=:scene, + ), + Object( + :chain_creator_b; + scale=:Creator, + kind=:ChainCreator, + parent=:scene, + ); + applications=( + ModelSpec( + InitializerChainSourceModel(); + name=:chain_source, + on=Many(scale=:Leaf, kind=:ChainSource), + ), + ModelSpec( + InitializerChainSinkModel(); + name=:chain_sink, + on=Many(scale=:Leaf, kind=:ChainSink), + inputs=( + source_signal=One( + scale=:Leaf, + kind=:ChainSource, + within=SceneScope(), + application=:chain_source, + var=:signal, + ), + ), + ), + ModelSpec( + InitializerSplitCreatorModel(); + name=:split_creator, + on=Many(scale=:Creator, kind=:ChainCreator), + calls=( + source=Initializer( + One( + scale=:Leaf, + kind=:ChainSource, + within=SceneScope(), + application=:chain_source, + ), + ), + sink=Initializer( + One( + scale=:Leaf, + kind=:ChainSink, + within=SceneScope(), + application=:chain_sink, + ), + ), + ), + ), + ), + environment=(duration=Hour(1),), + ) + + compiled = Advanced.refresh_bindings!(model) + @test compiled.applications_by_id[:split_creator].target_ids == + [ObjectId(:chain_creator_a), ObjectId(:chain_creator_b)] + run!(model; steps=1, outputs=:none) + @test model_status(model, :split_chain_source).signal == 7.0 + @test model_status(model, :split_chain_sink).seen == 7.0 + @test model_status(model, :chain_creator_b).sink_seen == 7.0 +end + +@testset "mixed structural events invalidate the targeted newborn cache" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene), + Object(:plant_b; scale=:Plant, parent=:scene), + Object( + :cache_creator_a; + scale=:Creator, + kind=:CacheCreator, + parent=:scene, + ), + Object( + :cache_creator_b; + scale=:Creator, + kind=:CacheCreator, + parent=:scene, + ); + applications=( + ModelSpec( + InitializerCacheManualTargetModel(); + name=:cache_manual_target, + on=Many( + scale=:Leaf, + kind=:CacheLeaf, + within=Scope(:plant), + ), + ), + ModelSpec( + InitializerCacheMutatorModel(); + name=:cache_mutator, + on=Many(scale=:Creator, kind=:CacheCreator), + calls=( + manual_leaf=Many( + scale=:Leaf, + kind=:CacheLeaf, + within=SceneScope(), + application=:cache_manual_target, + ), + ), + ), + ), + environment=(duration=Hour(1),), + ) + + compiled = Advanced.refresh_bindings!(model) + INITIALIZER_CACHE_BASE_COMPILED[] = compiled + @test compiled.applications_by_id[:cache_mutator].target_ids == + [ObjectId(:cache_creator_a), ObjectId(:cache_creator_b)] + simulation = run!(model; steps=1, outputs=:none) + + @test model_object(model, :cache_leaf_a).parent == ObjectId(:plant_b) + @test model_status(model, :cache_leaf_b).signal == 7.0 + @test model_status(model, :cache_leaf_b).refreshed_plan + @test model_status(model, :cache_creator_b).targeted_value == 7.0 + @test model_status(model, :cache_creator_b).refreshed_plan + @test model_status(model, :cache_creator_b).cache_invalidated + @test !model_status(model, :cache_creator_b).bindings_remained_dirty + @test simulation.compiled.applications_by_id[:cache_manual_target].target_ids == + [ObjectId(:cache_leaf_b)] +end + +@testset "scheduled newborn initializer lifecycle" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene), + Object( + :existing_leaf_a; + scale=:Leaf, + parent=:plant, + status=Status( + mass=10.0, + previous_mass=10.0, + initializer_runs=0, + ), + ), + Object( + :existing_leaf_b; + scale=:Leaf, + parent=:plant, + status=Status( + mass=20.0, + previous_mass=20.0, + initializer_runs=0, + ), + ); + # Intentionally authored in the opposite order. The initializer + # contract must establish leaf initializer -> creator -> observer. + applications=( + initializer_observer_application(), + initializer_creator_application(), + initializer_leaf_application(), + ), + environment=(duration=Hour(2),), + ) + + compiled = Advanced.refresh_bindings!(model) + scenario_plan = compiled.scenario_plan + @test scenario_plan.manual_application_ids == () + @test compiled.application_order == + (:leaf_initializer, :creator, :observer) + @test scenario_plan.application_children.leaf_initializer == + (:observer, :creator) + @test scenario_plan.application_children.creator == (:observer,) + + call = only(explain_calls(compiled)) + @test call.mode == :initializer + @test call.application == :leaf_initializer + @test call.potential_callee_application_ids == (:leaf_initializer,) + @test isempty(call.callee_object_ids) + @test call.callee_application_ids == [:leaf_initializer] + @test call.publication_policy == :canonical_status_only + @test !call.default_publish + @test !call.accepted_publish + + schedule = Dict(row.application_id => row for row in explain_schedule(compiled)) + @test schedule[:leaf_initializer].root_scheduled + @test !schedule[:leaf_initializer].manual_call_only + @test schedule[:leaf_initializer].initializer_target + @test !schedule[:creator].initializer_target + + simulation = run!(model; steps=1, outputs=:all, performance=true) + @test simulation.compiled.scenario_plan === scenario_plan + scene_status = model_status(model, :scene) + leaf_status = model_status(model, :new_leaf) + @test scene_status.created + @test scene_status.initialized_mass == 5.0 + @test scene_status.duplicate_rejected + @test scene_status.manual_api_rejected + @test scene_status.cached_initializer_batches_empty + @test leaf_status.mass == 5.0 + @test leaf_status.initializer_runs == 1 + @test leaf_status.observed_mass == 5.0 + + writer = only( + row for row in explain_writers(simulation.compiled) + if row.object_id == :new_leaf && row.variable == :mass + ) + @test writer.application_ids == [:leaf_initializer] + retained_key = (:leaf_initializer, ObjectId(:new_leaf), :mass) + @test isempty(get(outputs(simulation), retained_key, [])) + @test get( + Advanced.runtime_performance(simulation).counts, + :selector_call_binding_candidates, + 0, + ) == 0 + @test isempty(only(explain_calls(simulation.compiled)).callee_object_ids) + + continue!(simulation; steps=1) + @test simulation.compiled.scenario_plan === scenario_plan + @test model_status(model, :new_leaf).mass == 6.0 + @test model_status(model, :new_leaf).initializer_runs == 2 + @test model_status(model, :new_leaf).observed_mass == 6.0 + retained_mass = outputs(simulation)[retained_key] + @test last.(retained_mass) == [6.0] +end + +@testset "initializer reservation ends at the structural barrier" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene); + applications=( + initializer_creator_application(:capture), + initializer_leaf_application(), + ), + environment=(duration=Hour(1),), + ) + run!(model; steps=1, outputs=:none) + context = INITIALIZER_CAPTURED_CONTEXT[] + + first = register_object!( + model, + Object( + :reused_leaf; + scale=:Leaf, + parent=:plant, + status=Status( + mass=4.0, + previous_mass=4.0, + initializer_runs=0, + ), + ), + ) + @test run_initializer!(context, :leaf, first).initializer_runs == 1 + Advanced.refresh_bindings!(model) + @test Advanced.environment_bindings_dirty(model) + @test isempty(Advanced.lifecycle_delta(model).initialized_targets) + + remove_object!(model, first.id) + Advanced.refresh_bindings!(model) + @test Advanced.environment_bindings_dirty(model) + second = register_object!( + model, + Object( + :reused_leaf; + scale=:Leaf, + parent=:plant, + status=Status( + mass=4.0, + previous_mass=4.0, + initializer_runs=0, + ), + ), + ) + @test second !== first + reused_status = run_initializer!(context, :leaf, second) + @test reused_status.mass == 5.0 + @test reused_status.initializer_runs == 1 +end + +@testset "initializer declarations fail before ambiguous execution" begin + @test_throws "requires `One(...)`" Initializer(Many(scale=:Leaf)) + @test_throws "Use `Initializer(...)` directly" Call( + Initializer(One(scale=:Leaf, application=:leaf_initializer)), + ) + + default_binding = ModelSpec( + InitializerCreatorModel(:default_binding); + name=:creator, + on=One(scale=:Scene), + ) + @test model_calls(default_binding).leaf isa Initializer + @test isempty(keys(dep(default_binding))) + + missing_application = CompositeModel( + Object(:scene; scale=:Scene); + applications=( + initializer_creator_application( + binding=Initializer(One(scale=:Leaf)), + ), + initializer_leaf_application(), + ), + environment=(duration=Hour(1),), + ) + @test_throws "must name one scheduled target" Advanced.refresh_bindings!( + missing_application, + ) + + incompatible_cadence = CompositeModel( + Object(:scene; scale=:Scene); + applications=( + initializer_creator_application(every=Day(1)), + initializer_leaf_application(every=Hour(1)), + ), + environment=(duration=Hour(1),), + ) + @test_throws "incompatible cadence" Advanced.refresh_bindings!( + incompatible_cadence, + ) + + incompatible_phase = CompositeModel( + Object(:scene; scale=:Scene); + applications=( + initializer_creator_application(every=ClockSpec(1.0, 0.0)), + initializer_leaf_application(every=ClockSpec(1.0, 0.5)), + ), + environment=(duration=Hour(1),), + ) + @test_throws "incompatible cadence" Advanced.refresh_bindings!( + incompatible_phase, + ) + + mixed_manual = CompositeModel( + Object(:scene; scale=:Scene); + applications=( + ModelSpec( + InitializerCreatorModel(); + name=:creator, + on=One(scale=:Scene), + calls=( + leaf=Initializer( + One(scale=:Leaf, application=:leaf_initializer), + ), + manual_leaf=Many( + scale=:Leaf, + application=:leaf_initializer, + ), + ), + ), + initializer_leaf_application(), + ), + environment=(duration=Hour(1),), + ) + @test_throws "both a manual-call-only target and an initializer target" Advanced.refresh_bindings!( + mixed_manual, + ) + + duplicate_owner = CompositeModel( + Object(:scene; scale=:Scene); + applications=( + ModelSpec( + InitializerCreatorModel(); + name=:creator, + on=One(scale=:Scene), + calls=( + leaf=Initializer( + One(scale=:Leaf, application=:leaf_initializer), + ), + second_leaf=Initializer( + One(scale=:Leaf, application=:leaf_initializer), + ), + ), + ), + initializer_leaf_application(), + ), + environment=(duration=Hour(1),), + ) + @test_throws "several initializer bindings" Advanced.refresh_bindings!( + duplicate_owner, + ) + + overlapping_local_writer = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene); + applications=( + initializer_creator_application(), + initializer_leaf_application(), + ModelSpec( + InitializerOverlapWriterModel(); + name=:later_writer, + on=Many(scale=:Leaf), + updates=(Updates(:mass; after=:leaf_initializer),), + ), + ), + environment=(duration=Hour(1),), + ) + @test_throws "must be the sole canonical writer of output `mass`" Advanced.refresh_bindings!( + overlapping_local_writer, + ) + + overlapping_distributed_writer = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene); + applications=( + initializer_creator_application(), + initializer_leaf_application(), + ModelSpec( + InitializerOverlapWriterModel(); + name=:distributed_writer, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=(mass=Default(0.0),), + ), + ), + ), + ), + environment=(duration=Hour(1),), + ) + @test_throws "Potential overlapping writer application(s): `(:distributed_writer,)`" Advanced.refresh_bindings!( + overlapping_distributed_writer, + ) + + stream_only_target = CompositeModel( + Object(:scene; scale=:Scene); + applications=( + initializer_creator_application(), + initializer_leaf_application( + output_routing=(mass=:stream_only,), + ), + ), + environment=(duration=Hour(1),), + ) + @test_throws "stream-only output" Advanced.refresh_bindings!( + stream_only_target, + ) + + distributed_target = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene); + applications=( + initializer_creator_application(), + initializer_leaf_application( + outputs_to=( + plant=OutputTo( + One(scale=:Plant, within=SceneScope()); + vars=(mass=Default(0.0),), + ), + ), + ), + ), + environment=(duration=Hour(1),), + ) + @test_throws "declares `outputs_to`" Advanced.refresh_bindings!( + distributed_target, + ) + + nested_target = CompositeModel( + Object(:scene; scale=:Scene); + applications=( + initializer_creator_application(), + initializer_leaf_application( + calls=( + nested=Many( + scale=:Leaf, + application=:nested_child, + ), + ), + ), + ModelSpec( + InitializerCreatorModel(:existing); + name=:nested_child, + on=Many(scale=:Leaf), + ), + ), + environment=(duration=Hour(1),), + ) + @test_throws "declares hard calls" Advanced.refresh_bindings!( + nested_target, + ) + + non_global_target = CompositeModel( + Object(:scene; scale=:Scene); + applications=( + initializer_creator_application(), + initializer_leaf_application( + environment=Environment( + backend=InitializerNonGlobalBackend(), + ), + ), + ), + environment=(duration=Hour(1),), + ) + @test_throws "non-global environment backend" Advanced.refresh_bindings!( + non_global_target, + ) + + unsupported_temporal_target = CompositeModel( + Object(:scene; scale=:Scene); + applications=( + initializer_creator_application(), + initializer_leaf_application(policy=Interpolate()), + ), + environment=(duration=Hour(1),), + ) + @test_throws "Only `PreviousTimeStep` is defined" Advanced.refresh_bindings!( + unsupported_temporal_target, + ) + + downstream_temporal_consumer = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene); + applications=( + initializer_creator_application(), + initializer_leaf_application(), + ModelSpec( + InitializerObserverModel(); + name=:temporal_consumer, + on=One(scale=:Scene), + inputs=( + mass=Many( + scale=:Leaf, + within=SceneScope(), + application=:leaf_initializer, + var=:mass, + policy=Integrate(), + ), + ), + ), + ), + environment=(duration=Hour(1),), + ) + @test_throws "does not publish a mid-step temporal sample" Advanced.refresh_bindings!( + downstream_temporal_consumer, + ) + + downstream_previous_timestep_consumer = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene); + applications=( + initializer_creator_application(), + initializer_leaf_application(), + ModelSpec( + InitializerObserverModel(); + name=:previous_timestep_consumer, + on=One(scale=:Scene), + inputs=( + mass=One( + scale=:Leaf, + within=SceneScope(), + application=:leaf_initializer, + var=:mass, + policy=PreviousTimeStep(:mass), + ), + ), + ), + ), + environment=(duration=Hour(1),), + ) + @test_throws "downstream temporal policies (including `PreviousTimeStep`) are unsupported" Advanced.refresh_bindings!( + downstream_previous_timestep_consumer, + ) +end + +@testset "initializer runtime accepts additions only" begin + existing = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene), + Object( + :existing_leaf; + scale=:Leaf, + parent=:plant, + status=Status( + mass=4.0, + previous_mass=4.0, + initializer_runs=0, + ), + ); + applications=( + initializer_creator_application(:existing), + initializer_leaf_application(), + ), + environment=(duration=Hour(1),), + ) + @test_throws "no pending structural addition" run!(existing) + + reparented = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene), + Object(:plant_b; scale=:Plant, parent=:scene), + Object( + :existing_leaf; + scale=:Leaf, + parent=:plant, + status=Status( + mass=4.0, + previous_mass=4.0, + initializer_runs=0, + ), + ); + applications=( + initializer_creator_application(:reparented), + initializer_leaf_application(), + ), + environment=(duration=Hour(1),), + ) + @test_throws "pure object-addition lifecycle event" run!(reparented) + + removed = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene), + Object( + :existing_leaf; + scale=:Leaf, + parent=:plant, + status=Status( + mass=4.0, + previous_mass=4.0, + initializer_runs=0, + ), + ); + applications=( + initializer_creator_application(:removed), + initializer_leaf_application(), + ), + environment=(duration=Hour(1),), + ) + @test_throws "No model object with id `existing_leaf`" run!(removed) + + foreign = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene); + applications=( + initializer_creator_application(:foreign), + initializer_leaf_application(), + ), + environment=(duration=Hour(1),), + ) + @test_throws "not the Object instance registered by this model" run!(foreign) + + poisoned = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene); + applications=( + initializer_creator_application(:failing), + initializer_leaf_application(throw_after_mutation=true), + ), + environment=(duration=Hour(1),), + ) + run!(poisoned) + poisoned_creator = model_status(poisoned, :scene) + @test poisoned_creator.failure_seen + @test poisoned_creator.retry_rejected + @test poisoned_creator.runs_after_failed_retry == 1 + @test model_status(poisoned, :failing_leaf).initializer_runs == 1 + + manual_binding = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene); + applications=( + initializer_creator_application( + :manual_binding; + binding=Many( + scale=:Leaf, + application=:leaf_initializer, + ), + ), + initializer_leaf_application(), + ), + environment=(duration=Hour(1),), + ) + @test_throws "manual hard call, not an `Initializer`" run!(manual_binding) + @test_throws ArgumentError run_initializer!(nothing, :leaf, :new_leaf) +end From a0cd55863b09c7cd290d8252abe24629443c650a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Wed, 26 Aug 2026 18:08:50 +0200 Subject: [PATCH 24/45] fix: correct Beer extinction fitting --- docs/src/working_with_data/fitting.md | 36 +++++---- examples/Beer.jl | 105 +++++++++++++++++++++----- src/evaluation/fit.jl | 47 ++++++------ test/test-fitting.jl | 94 ++++++++++++++++++++--- 4 files changed, 216 insertions(+), 66 deletions(-) diff --git a/docs/src/working_with_data/fitting.md b/docs/src/working_with_data/fitting.md index 1473f1625..65f058af8 100644 --- a/docs/src/working_with_data/fitting.md +++ b/docs/src/working_with_data/fitting.md @@ -5,21 +5,27 @@ calibration. Model packages implement a method whose first argument is the model type and whose second argument is Tables.jl-compatible observations. +The mathematical core of the Beer fit is: + ```julia -function PlantSimEngine.Evaluation.fit( - ::Type{Beer}, - data; - J_to_umol=PlantMeteo.Constants().J_to_umol, -) - k = Statistics.mean( - log.(data.Ri_PAR_f ./ (data.aPPFD ./ J_to_umol)) ./ data.LAI, - ) - return (k=k,) -end +J_to_umol = PlantMeteo.Constants().J_to_umol +incident_ppfd = J_to_umol .* data.Ri_PAR_f +f_abs = data.aPPFD ./ incident_ppfd +k = Statistics.mean(-log1p.(-f_abs) ./ data.LAI) ``` +This snippet shows the inversion only. The implementation in +`examples/Beer.jl` validates every observation and returns `(k=k,)`; do not use +the snippet alone as an unchecked fitting method. + The result should be a `NamedTuple` of fitted parameters. +In this Beer example, `Ri_PAR_f` is an incident flux per unit ground area and +`aPPFD` is the flux absorbed by the whole canopy, also per unit ground area. +`LAI` is leaf area per unit ground area. Do not use a PPFD expressed per unit +leaf area in this inversion. The fit rejects empty data, non-finite or +non-positive `LAI` and incident PAR, and absorbed fractions outside `[0, 1)`. + ```@example fitting using PlantSimEngine, PlantMeteo, Dates, DataFrames using PlantSimEngine.Examples @@ -36,16 +42,16 @@ meteo = Atmosphere( model = CompositeModel( Beer(0.6); status=(LAI=2.0,), - id=:leaf, - scale=:Leaf, + id=:plant, + scale=:Plant, environment=meteo, ) simulation = run!(model) -leaf = final_state(simulation, One(scale=:Leaf)) +plant = final_state(simulation, One(scale=:Plant)) data = DataFrame( - aPPFD=[leaf.aPPFD], - LAI=[leaf.LAI], + aPPFD=[plant.aPPFD], + LAI=[plant.LAI], Ri_PAR_f=[meteo.Ri_PAR_f[1]], ) diff --git a/examples/Beer.jl b/examples/Beer.jl index bc6279359..2d52c23f1 100644 --- a/examples/Beer.jl +++ b/examples/Beer.jl @@ -11,11 +11,12 @@ PlantSimEngine.@process "light_interception" verbose = false Beer-Lambert law for light interception. -Required inputs: `LAI` in m² m⁻². +Required inputs: `LAI` in m[leaf]² m[ground]⁻². Required environment input: `Ri_PAR_f`, the incident flux of atmospheric radiation in the -PAR, in W m[soil]⁻² (== J m[soil]⁻² s⁻¹). +PAR, in W m[ground]⁻² (== J m[ground]⁻² s⁻¹). -Output: aPPFD, the absorbed Photosynthetic Photon Flux Density in μmol[PAR] m[leaf]⁻² s⁻¹. +Output: `aPPFD`, the canopy-absorbed Photosynthetic Photon Flux Density in +μmol[PAR] m[ground]⁻² s⁻¹. It is not a mean leaf-area-basis PPFD. """ struct Beer{T} <: AbstractLight_InterceptionModel k::T @@ -25,9 +26,9 @@ end """ run!(model::Beer, status, environment, constants, context) -Computes the photosynthetic photon flux density (`aPPFD`, µmol m⁻² s⁻¹) absorbed by an -object using the incoming PAR radiation flux (`Ri_PAR_f`, W m⁻²) and the Beer-Lambert law -of light extinction. +Computes the canopy-absorbed photosynthetic photon flux density (`aPPFD`, +µmol[PAR] m[ground]⁻² s⁻¹) from the incoming PAR radiation flux (`Ri_PAR_f`, +W m[ground]⁻²) and the Beer-Lambert law of light extinction. # Arguments @@ -43,8 +44,8 @@ of light extinction. model = CompositeModel( Beer(0.5); status=(LAI=2.0,), - id=:leaf, - scale=:Leaf, + id=:plant, + scale=:Plant, environment=Atmosphere( T=20.0, Wind=1.0, @@ -55,7 +56,7 @@ model = CompositeModel( ), ) run!(model) -only(model_objects(model; scale=:Leaf)).status.aPPFD +only(model_objects(model; scale=:Plant)).status.aPPFD ``` """ function PlantSimEngine.run!(model::Beer, status, environment, constants, context) @@ -85,32 +86,48 @@ Compute the `k` parameter of the Beer-Lambert law from measurements. - `::Type{Beer}`: the model type - `df`: a `DataFrame` with the following columns: - - `aPPFD`: the measured absorbed Photosynthetic Photon Flux Density in μmol[PAR] m[leaf]⁻² s⁻¹ - - `LAI`: the measured leaf area index in m² m⁻² - - `Ri_PAR_f`: the measured incident flux of atmospheric radiation in the PAR, in W m[soil]⁻² (== J m[soil]⁻² s⁻¹) + - `aPPFD`: canopy-absorbed Photosynthetic Photon Flux Density in μmol[PAR] m[ground]⁻² s⁻¹ + - `LAI`: leaf area index in m[leaf]² m[ground]⁻² + - `Ri_PAR_f`: incident PAR flux in W m[ground]⁻² (== J m[ground]⁻² s⁻¹) + +`aPPFD` and `Ri_PAR_f * J_to_umol` must use the same ground-area basis. +`LAI` and the converted incident flux must be finite and strictly positive, +and the implied absorbed fraction must satisfy `0 ≤ f_abs < 1`. # Examples Import the example models defined in the `Examples` sub-module: ```julia -using PlantSimEngine +using PlantSimEngine, PlantMeteo, DataFrames using PlantSimEngine.Examples ``` -Create a `CompositeModel` with one leaf object, then fit `Beer` to the data: +Create a `CompositeModel` with one canopy model on a plant object, then fit +`Beer` to the data: ```julia +meteo = Atmosphere( + T=20.0, + Wind=1.0, + P=101.3, + Rh=0.65, + Ri_PAR_f=300.0, +) model = CompositeModel( Beer(0.6); status=(LAI=2.0,), - id=:leaf, - scale=:Leaf, - environment=environment, + id=:plant, + scale=:Plant, + environment=meteo, ) simulation = run!(model) -leaf = final_state(simulation, One(scale=:Leaf)) -df = DataFrame(aPPFD=leaf.aPPFD, LAI=leaf.LAI, Ri_PAR_f=environment.Ri_PAR_f[1]) +plant = final_state(simulation, One(scale=:Plant)) +df = DataFrame( + aPPFD=[plant.aPPFD], + LAI=[plant.LAI], + Ri_PAR_f=[meteo.Ri_PAR_f[1]], +) Evaluation.fit(Beer, df) ``` """ @@ -119,6 +136,54 @@ function PlantSimEngine.Evaluation.fit( df; J_to_umol=PlantMeteo.Constants().J_to_umol, ) - k = Statistics.mean(-log.(1 .- df.aPPFD ./ (J_to_umol .* df.Ri_PAR_f)) ./ df.LAI) + (J_to_umol isa Real && isfinite(J_to_umol) && J_to_umol > 0) || throw( + DomainError( + J_to_umol, + "Beer fit requires a finite J_to_umol > 0; got $(repr(J_to_umol))", + ), + ) + + k_observations = map(eachindex(df.LAI, df.Ri_PAR_f, df.aPPFD)) do row + lai = df.LAI[row] + (lai isa Real && isfinite(lai) && lai > 0) || throw( + DomainError( + lai, + "Beer fit requires finite LAI > 0 at row $(row); got $(repr(lai))", + ), + ) + + incident_par = df.Ri_PAR_f[row] + (incident_par isa Real && isfinite(incident_par) && incident_par > 0) || throw( + DomainError( + incident_par, + "Beer fit requires finite Ri_PAR_f > 0 at row $(row); " * + "got $(repr(incident_par))", + ), + ) + + incident_ppfd = incident_par * J_to_umol + (incident_ppfd isa Real && isfinite(incident_ppfd) && incident_ppfd > 0) || throw( + DomainError( + incident_ppfd, + "Beer fit requires finite incident PAR > 0 at row $(row) to define " * + "an absorbed fraction; got $(repr(incident_ppfd))", + ), + ) + + f_abs = df.aPPFD[row] / incident_ppfd + (f_abs isa Real && isfinite(f_abs) && 0 <= f_abs < 1) || throw( + DomainError( + f_abs, + "Beer fit requires an absorbed fraction in [0, 1) at row $(row); " * + "got $(repr(f_abs))", + ), + ) + + -log1p(-f_abs) / lai + end + isempty(k_observations) && throw( + ArgumentError("Beer fit requires at least one observation"), + ) + k = Statistics.mean(k_observations) return (k=k,) end diff --git a/src/evaluation/fit.jl b/src/evaluation/fit.jl index 8b3bd4a0b..ba199ee5a 100644 --- a/src/evaluation/fit.jl +++ b/src/evaluation/fit.jl @@ -10,20 +10,26 @@ The call to the function should take the model type as the first argument (T::Ty the data as the second argument (as a `Table.jl` compatible type, such as `DataFrame`), and the parameters initializations as keyword arguments (with default values when necessary). -For example the method for fitting the `Beer` model from the example script (see `src/examples/Beer.jl`) looks like -this: +For example, the method for fitting the `Beer` model from the example script +(see `examples/Beer.jl`) uses this mathematical identity after validating each +observation: ```julia -function PlantSimEngine.Evaluation.fit( - ::Type{Beer}, - df; - J_to_umol=PlantMeteo.Constants().J_to_umol, -) - k = Statistics.mean(log.(df.Ri_PAR_f ./ (df.aPPFD ./ J_to_umol)) ./ df.LAI) - return (k=k,) -end +J_to_umol = PlantMeteo.Constants().J_to_umol +incident_ppfd = J_to_umol .* df.Ri_PAR_f +f_abs = df.aPPFD ./ incident_ppfd +k = Statistics.mean(-log1p.(-f_abs) ./ df.LAI) ``` +This is only the inversion, not a complete implementation to copy. The shipped +`Beer` method also rejects empty data and invalid `LAI`, incident flux, and +absorbed fractions with row-specific errors. + +Here, `Ri_PAR_f` is incident PAR in W m[ground]⁻², `aPPFD` is the PAR +absorbed by the canopy in μmol[PAR] m[ground]⁻² s⁻¹, and `LAI` is in +m[leaf]² m[ground]⁻². A mean leaf-area-basis PPFD is a different quantity and +must not be passed to this fit. + The function should return the optimized parameters as a `NamedTuple` of the form `(parameter_name=parameter_value,)`. Here is an example usage with the `Beer` model, where we fit the `k` parameter from "measurements" of `aPPFD`, `LAI` @@ -45,22 +51,21 @@ meteo = Atmosphere( model = CompositeModel( Beer(0.6); status=(LAI=2.0,), - id=:leaf, - scale=:Leaf, + id=:plant, + scale=:Plant, environment=meteo, ) simulation = run!(model) -leaf = final_state(simulation, One(scale=:Leaf)) -df = DataFrame( - aPPFD=leaf.aPPFD, - LAI=leaf.LAI, - Ri_PAR_f=meteo.Ri_PAR_f[1], +plant = final_state(simulation, One(scale=:Plant)) +data = DataFrame( + aPPFD=[plant.aPPFD], + LAI=[plant.LAI], + Ri_PAR_f=[meteo.Ri_PAR_f[1]], ) -Evaluation.fit(Beer, df) +Evaluation.fit(Beer, data) ``` -Note that this is a dummy example to show that the fitting method works, as we simulate the aPPFD -using the Beer-Lambert law with a value of `k=0.6`, and then use the simulated aPPFD to fit the `k` -parameter again, which gives the same value as the one used on the simulation. +This is a synthetic round trip: it simulates canopy-absorbed `aPPFD` with +`k=0.6`, then recovers the same value from the ground-area-basis fluxes. """ function fit end diff --git a/test/test-fitting.jl b/test/test-fitting.jl index 624e2baa9..6c650e687 100644 --- a/test/test-fitting.jl +++ b/test/test-fitting.jl @@ -1,8 +1,7 @@ using Dates -# Tests: -# Defining a list of models without status: @testset "Fitting Beer" begin + constants = PlantMeteo.Constants() k = 0.6 meteo = Atmosphere( T=20.0, @@ -13,20 +12,95 @@ using Dates duration=Dates.Hour(1), ) model = CompositeModel( - Object(:leaf; scale=:Leaf, status=Status(LAI=2.0)); + Object(:plant; scale=:Plant, status=Status(LAI=2.0)); applications=( - ModelSpec(Beer(k); on=One(scale=:Leaf)), + ModelSpec(Beer(k); name=:canopy_light, on=One(scale=:Plant)), ), environment=meteo, ) run!(model) - leaf = only(model_objects(model; scale=:Leaf)) - df = DataFrame( - aPPFD=[leaf.status.aPPFD], - LAI=[leaf.status.LAI], + plant = only(model_objects(model; scale=:Plant)) + simulated = DataFrame( + aPPFD=[plant.status.aPPFD], + LAI=[plant.status.LAI], Ri_PAR_f=[meteo.Ri_PAR_f[1]], ) + incident_ppfd = meteo.Ri_PAR_f[1] * constants.J_to_umol + simulated_f_abs = plant.status.aPPFD / incident_ppfd - k_fit = fit(PlantSimEngine.Examples.Beer, df).k - @test k_fit == k + @test 0.0 < plant.status.aPPFD < incident_ppfd + @test simulated_f_abs ≈ 1.0 - exp(-k * plant.status.LAI) + @test fit(PlantSimEngine.Examples.Beer, simulated).k ≈ k + + lai = [1.0, 2.0, 3.0] + incident_par = [200.0, 300.0, 400.0] + expected_k = -log1p(-0.6) / 2.0 + expected_f_abs = @. 1.0 - exp(-expected_k * lai) + observations = DataFrame( + LAI=lai, + Ri_PAR_f=incident_par, + aPPFD=incident_par .* constants.J_to_umol .* expected_f_abs, + ) + fitted = fit(PlantSimEngine.Examples.Beer, observations) + reconstructed_f_abs = @. 1.0 - exp(-fitted.k * lai) + + @test expected_f_abs[2] ≈ 0.6 + @test fitted.k ≈ expected_k + @test reconstructed_f_abs ≈ expected_f_abs + + observation(lai, f_abs; incident=300.0) = DataFrame( + LAI=[lai], + Ri_PAR_f=[incident], + aPPFD=[incident * constants.J_to_umol * f_abs], + ) + @test fit(PlantSimEngine.Examples.Beer, observation(2.0, 0.0)).k == 0.0 + + tiny = observation(2.0, eps(Float64) / 2.0) + tiny_f_abs = tiny.aPPFD[1] / (tiny.Ri_PAR_f[1] * constants.J_to_umol) + tiny_k = fit(PlantSimEngine.Examples.Beer, tiny).k + @test tiny_k > 0.0 + @test tiny_k ≈ -log1p(-tiny_f_abs) / tiny.LAI[1] + + @test_throws ArgumentError fit( + PlantSimEngine.Examples.Beer, + DataFrame(LAI=Float64[], Ri_PAR_f=Float64[], aPPFD=Float64[]), + ) + + for invalid_lai in (0.0, -1.0, Inf, NaN) + @test_throws DomainError fit( + PlantSimEngine.Examples.Beer, + observation(invalid_lai, 0.6), + ) + end + for invalid_f_abs in (-0.1, 1.0, 1.1, Inf, NaN) + @test_throws DomainError fit( + PlantSimEngine.Examples.Beer, + observation(2.0, invalid_f_abs), + ) + end + for invalid_incident in (0.0, -1.0, Inf, -Inf, NaN) + @test_throws DomainError fit( + PlantSimEngine.Examples.Beer, + observation(2.0, 0.6; incident=invalid_incident), + ) + end + + for invalid_J_to_umol in (0.0, -1.0, Inf, -Inf, NaN) + @test_throws DomainError fit( + PlantSimEngine.Examples.Beer, + observation(2.0, 0.6); + J_to_umol=invalid_J_to_umol, + ) + end + + double_negative = DataFrame( + LAI=[2.0], + Ri_PAR_f=[-300.0], + aPPFD=[300.0 * constants.J_to_umol * 0.6], + ) + @test_throws DomainError fit( + PlantSimEngine.Examples.Beer, + double_negative; + J_to_umol=-constants.J_to_umol, + ) end From 8efeffc0008ffa313b665a46a02e2f8a494b01f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Wed, 26 Aug 2026 19:47:27 +0200 Subject: [PATCH 25/45] Add compile-time status type conversion --- src/composite_model/compilation.jl | 72 +++-- src/composite_model/registry_topology.jl | 138 +++++++++- src/composite_model/status_conversion.jl | 314 ++++++++++++++++++++++ src/composite_model_api.jl | 1 + test/runtests.jl | 4 + test/test-model-status-type-conversion.jl | 237 ++++++++++++++++ 6 files changed, 739 insertions(+), 27 deletions(-) create mode 100644 src/composite_model/status_conversion.jl create mode 100644 test/test-model-status-type-conversion.jl diff --git a/src/composite_model/compilation.jl b/src/composite_model/compilation.jl index 3c79b5ac9..5c6c3af3a 100644 --- a/src/composite_model/compilation.jl +++ b/src/composite_model/compilation.jl @@ -3839,11 +3839,17 @@ function _stream_only_initial_reference( application = only(matching_applications) if _publish_mode_for_output(application.spec, source_var) == :stream_only - return Ref( - _private_initial_value( - getproperty(outputs_(application.spec), source_var), - ), + initial, _, _ = _materialize_status_value( + model, + source_var, + getproperty(outputs_(application.spec), source_var); + object_id=source_id, + application_id=application.id, + origin=:stream_only_source_default, + private_copy=true, + reuse=true, ) + return Ref(initial) end end return _status_ref_or_nothing( @@ -3904,9 +3910,26 @@ function _status_with_reference(status::Status, variable::Symbol, reference::Bas return Status(NamedTuple{extended_names}(references)) end -function _status_with_default(status::Status, variable::Symbol, value) +function _status_with_default( + model::CompositeModel, + status::Status, + object_id::ObjectId, + variable::Symbol, + value; + application_id=nothing, + origin=:model_default, +) variable in propertynames(status) && return status - return _status_with_reference(status, variable, Ref(value)) + initial, _, _ = _materialize_status_value( + model, + variable, + value; + object_id=object_id, + application_id=application_id, + origin=origin, + private_copy=true, + ) + return _status_with_reference(status, variable, Ref(initial)) end function _ensure_model_object_status!(model::CompositeModel, object_id::ObjectId) @@ -3928,9 +3951,13 @@ function _prepare_model_output_statuses!(model::CompositeModel, applications) _publish_mode_for_output(application.spec, variable) == :canonical || continue status = _status_with_default( + model, status, + object_id, variable, - _private_initial_value(value), + value; + application_id=application.id, + origin=:model_output_default, ) end _replace_model_object_status!(model, object_id, status) @@ -4009,9 +4036,13 @@ function _prepare_model_output_destination_statuses!( declaration isa Default || continue variable = Symbol(variable_) status = _status_with_default( + model, status, + destination_id, variable, - _private_initial_value(_input_default(declaration)), + _input_default(declaration); + application_id=resolved.plan.application_id, + origin=:distributed_output_default, ) end _replace_model_object_status!(model, destination_id, status) @@ -4187,9 +4218,13 @@ function _prepare_model_input_defaults!(model::CompositeModel, applications) variable = Symbol(variable) variable in propertynames(status) && continue status = _status_with_default( + model, status, + object_id, variable, - _private_initial_value(value), + value; + application_id=application.id, + origin=:model_input_default, ) push!( get!( @@ -4416,12 +4451,19 @@ function _compile_model_status_view( if _publish_mode_for_output(application.spec, variable) == :stream_only ) - private_outputs = NamedTuple{private_output_names}( - Tuple( - Ref(_private_initial_value(getproperty(output_defaults, name))) - for name in private_output_names - ), - ) + private_outputs = NamedTuple{private_output_names}(Tuple(begin + initial, _, _ = _materialize_status_value( + model, + name, + getproperty(output_defaults, name); + object_id=object_id, + application_id=application.id, + origin=:stream_only_private_default, + private_copy=true, + reuse=true, + ) + Ref(initial) + end for name in private_output_names)) canonical_names = propertynames(canonical_status) private_names = Tuple( name for name in private_output_names diff --git a/src/composite_model/registry_topology.jl b/src/composite_model/registry_topology.jl index af8c63ad0..68cb7b962 100644 --- a/src/composite_model/registry_topology.jl +++ b/src/composite_model/registry_topology.jl @@ -354,12 +354,16 @@ function LifecycleDelta(; ) end -mutable struct CompositeModel{R,A,E,I,SA} +mutable struct CompositeModel{R,A,E,I,SA,SC} registry::R applications::A environment::E instances::I source_adapter::SA + status_conversion::SC + status_conversion_records::Dict{Any,Any} + status_source_owners::IdDict{Base.RefValue{Nothing},ObjectId} + status_source_identities::Dict{ObjectId,Base.RefValue{Nothing}} binding_cache::Any environment_binding_cache::Any bindings_dirty::Bool @@ -458,7 +462,11 @@ function _prepare_object_instances!(objects, instances) return instance_ids end -function _register_objects!(model::CompositeModel, objects) +function _register_objects!( + model::CompositeModel, + objects; + status_values_materialized::Bool=false, +) pending = copy(objects) added = Object[] while !isempty(pending) @@ -466,7 +474,11 @@ function _register_objects!(model::CompositeModel, objects) for index in reverse(eachindex(pending)) object = pending[index] if isnothing(object.parent) || haskey(model.registry.objects, object.parent) - _register_object_without_lifecycle!(model, object) + _register_object_without_lifecycle!( + model, + object; + status_values_materialized=status_values_materialized, + ) push!(added, object) deleteat!(pending, index) registered = true @@ -480,11 +492,12 @@ function _register_objects!(model::CompositeModel, objects) return model end -_register_model_objects!(model::CompositeModel, objects) = - _register_objects!(model, objects) +_register_model_objects!(model::CompositeModel, objects; kwargs...) = + _register_objects!(model, objects; kwargs...) """ - CompositeModel(items...; applications=(), instances=(), environment=nothing) + CompositeModel(items...; applications=(), instances=(), environment=nothing, + type_promotion=nothing, status_transform=nothing) Create a model from `Object` and `ObjectInstance` values. Global applications and applications mounted from object instances are compiled through the same @@ -496,18 +509,40 @@ function CompositeModel( instances=(), environment=nothing, source_adapter=nothing, + type_promotion=nothing, + status_transform=nothing, + _status_conversion=nothing, + _status_values_materialized::Bool=false, + _status_conversion_records=nothing, ) objects, mounted_instances = _collect_model_items(items, instances) instance_ids = _prepare_object_instances!(objects, mounted_instances) mounted_applications = _mount_object_instance_applications(mounted_instances, instance_ids) normalized_applications = collect(Any, _as_tuple(applications)) append!(normalized_applications, mounted_applications) + if !isnothing(_status_conversion) && + (!isnothing(type_promotion) || !isnothing(status_transform)) + error( + "Internal materialized model reconstruction cannot combine a " * + "normalized status policy with public status-conversion keywords.", + ) + end + status_conversion = isnothing(_status_conversion) ? + _status_conversion_policy(type_promotion, status_transform) : + _status_conversion + conversion_records = isnothing(_status_conversion_records) ? + Dict{Any,Any}() : + copy(_status_conversion_records) model = CompositeModel( ObjectRegistry(), normalized_applications, environment, mounted_instances, source_adapter, + status_conversion, + conversion_records, + IdDict{Base.RefValue{Nothing},ObjectId}(), + Dict{ObjectId,Base.RefValue{Nothing}}(), nothing, nothing, true, @@ -521,13 +556,18 @@ function CompositeModel( 0, 0, ) - return _register_model_objects!(model, objects) + return _register_model_objects!( + model, + objects; + status_values_materialized=_status_values_materialized, + ) end """ CompositeModel(template::CompositeModelTemplate; root, objects=(), name=nothing, overrides=NamedTuple(), - object_overrides=(), applications=(), environment=nothing) + object_overrides=(), applications=(), environment=nothing, + type_promotion=nothing, status_transform=nothing) Build an executable composite model from a reusable template mounted on one concrete object subtree. `root` may be the owned root `Object`, or its id when @@ -549,6 +589,8 @@ function CompositeModel( applications=(), environment=nothing, source_adapter=nothing, + type_promotion=nothing, + status_transform=nothing, ) inferred_name = if !isnothing(name) Symbol(name) @@ -572,13 +614,16 @@ function CompositeModel( applications=applications, environment=environment, source_adapter=source_adapter, + type_promotion=type_promotion, + status_transform=status_transform, ) end """ CompositeModel(model::AbstractModel, models::AbstractModel...; status=NamedTuple(), id=:scene, scale=:Scene, kind=nothing, - name=id, environment=nothing, timestep=nothing) + name=id, environment=nothing, timestep=nothing, + type_promotion=nothing, status_transform=nothing) Construct a concise one-object simulation. This is syntax lowering only: it creates one ordinary [`Object`](@ref), one normal `ModelSpec` per model, and a @@ -600,6 +645,8 @@ function CompositeModel( name=id, environment=nothing, timestep=nothing, + type_promotion=nothing, + status_transform=nothing, ) object_name = isnothing(name) ? nothing : Symbol(string(name)) object_status = if status isa Status || isnothing(status) @@ -626,6 +673,8 @@ function CompositeModel( ); applications=applications, environment=environment, + type_promotion=type_promotion, + status_transform=status_transform, ) end @@ -717,7 +766,8 @@ end """ CompositeModel(root::MultiScaleTreeGraph.Node; applications=(), instances=(), - environment=nothing, id=node_id, scale=symbol, status=..., ...) + environment=nothing, type_promotion=nothing, status_transform=nothing, + id=node_id, scale=symbol, status=..., ...) Build a unified model directly from an MTG subtree. The MTG accessors are retained and reused by [`add_organ!`](@ref) when the topology grows. @@ -734,6 +784,8 @@ function CompositeModel( name=node -> _mtg_attribute(node, :name, nothing), geometry=node -> _mtg_attribute(node, :geometry, nothing), status=_no_mtg_status, + type_promotion=nothing, + status_transform=nothing, ) adapter = MTGObjectAdapter( root, @@ -755,6 +807,8 @@ function CompositeModel( instances=instances, environment=environment, source_adapter=adapter, + type_promotion=type_promotion, + status_transform=status_transform, ) end @@ -941,6 +995,57 @@ function _validate_status_identity_available!( return nothing end +function _validate_status_source_identity_available!( + model::CompositeModel, + status, + object_id::ObjectId, +) + status isa Status || return nothing + existing = get( + model.status_source_owners, + _status_identity(status), + nothing, + ) + if !isnothing(existing) && existing != object_id + throw( + ArgumentError( + "The same Status instance cannot be owned by model objects " * + "`$(existing.value)` and `$(object_id.value)`. Give each Object " * + "its own Status instance.", + ), + ) + end + return nothing +end + +function _set_status_source_identity!( + model::CompositeModel, + object_id::ObjectId, + status, +) + previous = get(model.status_source_identities, object_id, nothing) + if !isnothing(previous) && + get(model.status_source_owners, previous, nothing) == object_id + delete!(model.status_source_owners, previous) + end + if status isa Status + identity = _status_identity(status) + model.status_source_owners[identity] = object_id + model.status_source_identities[object_id] = identity + else + delete!(model.status_source_identities, object_id) + end + return nothing +end + +function _delete_status_source_identity!(model::CompositeModel, object_id::ObjectId) + identity = pop!(model.status_source_identities, object_id, nothing) + isnothing(identity) && return nothing + get(model.status_source_owners, identity, nothing) == object_id && + delete!(model.status_source_owners, identity) + return nothing +end + function _replace_model_object_status!( model::CompositeModel, object::Object, @@ -964,6 +1069,7 @@ function _replace_model_object_status!( setfield!(object, :status, status) status isa Status && (registry.object_ids_by_status[_status_identity(status)] = object.id) + _set_status_source_identity!(model, object.id, status) return status end @@ -1175,6 +1281,7 @@ function _register_object_without_lifecycle!( model::CompositeModel, object::Object; parent=object.parent, + status_values_materialized::Bool=false, ) registry = model.registry haskey(registry.objects, object.id) && error("CompositeModel already contains object id `$(object.id.value)`.") @@ -1188,12 +1295,18 @@ function _register_object_without_lifecycle!( "CompositeModel object name `$(object.name)` is already used by object `$(existing.value)`." ) end + source_status = object.status + _validate_status_source_identity_available!(model, source_status, object.id) + object.status = status_values_materialized ? + source_status : + _convert_registered_status(model, object.id, source_status) _validate_status_identity_available!(registry, object.status, object.id) instance = isnothing(parent_id) ? nothing : _instance_for_object(model, parent_id) _apply_instance_labels!(object, instance) object.parent = parent_id registry.objects[object.id] = object _index_object!(registry, object) + _set_status_source_identity!(model, object.id, source_status) parent_ancestors = isnothing(parent_id) ? ObjectId[] : _object_ancestor_ids(registry, parent_id) @@ -1348,8 +1461,8 @@ function add_organ!( geometry=adapter.geometry(node), status=status, ) - register_object!(model, object) - return status + registered = register_object!(model, object) + return registered.status catch _unregister_mtg_object_identity!(adapter, node) MultiScaleTreeGraph.delete_node!(node) @@ -1419,6 +1532,7 @@ function remove_object!(model::CompositeModel, id; recursive::Bool=true) adapter isa MTGObjectAdapter && _unregister_mtg_object_identity!(adapter, object_id) _deindex_object!(model.registry, removed) + _delete_status_source_identity!(model, object_id) delete!(model.registry.objects, object_id) delete!(model.registry.ancestor_ids_by_object, object_id) delete!(model.input_default_status_variables, object_id) diff --git a/src/composite_model/status_conversion.jl b/src/composite_model/status_conversion.jl new file mode 100644 index 000000000..384175ade --- /dev/null +++ b/src/composite_model/status_conversion.jl @@ -0,0 +1,314 @@ +struct StatusConversionPolicy{R,F} + rules::R + transform::F +end + +struct StatusConversionRecord + variable::Symbol + object_id + application_id + origin::Symbol + declared_type + original_type + transformed_type + effective_type + transform_applied::Bool + transform_changed::Bool + mapping_applied::Bool + mapping_changed::Bool + mapping_rule + storage_changed::Bool + original_value + effective_value +end + +_no_status_conversion(policy::StatusConversionPolicy) = + isempty(policy.rules) && isnothing(policy.transform) + +function _normalize_status_type_rules(type_promotion) + isnothing(type_promotion) && return () + type_promotion isa AbstractDict || error( + "`type_promotion` must be an `AbstractDict` mapping source types to " * + "target types, or `nothing`; got `$(typeof(type_promotion))`.", + ) + normalized = Pair{Any,Any}[] + sizehint!(normalized, length(type_promotion)) + for (source, target) in pairs(type_promotion) + source isa Type || error( + "`type_promotion` source keys must be types; got `$(repr(source))` " * + "with type `$(typeof(source))`.", + ) + target isa Type || error( + "`type_promotion` target values must be types; got `$(repr(target))` " * + "with type `$(typeof(target))` for source `$(source)`.", + ) + push!(normalized, source => target) + end + sort!(normalized; by=rule -> (string(first(rule)), string(last(rule)))) + return Tuple(normalized) +end + +function _status_conversion_policy(type_promotion, status_transform) + return StatusConversionPolicy( + _normalize_status_type_rules(type_promotion), + status_transform, + ) +end + +_status_conversion_rules(model) = model.status_conversion.rules +_status_transform(model) = model.status_conversion.transform + +function _status_conversion_context(; object_id=nothing, application_id=nothing, origin=:unknown) + parts = String["status variable"] + isnothing(object_id) || push!(parts, "on object `$(ObjectId(object_id).value)`") + isnothing(application_id) || push!(parts, "for application `$(application_id)`") + origin === :unknown || push!(parts, "from `$(origin)`") + return join(parts, " ") +end + +function _matching_status_type_rule_for_type(rules, value_type) + matches = Pair{Any,Any}[ + rule for rule in rules + if value_type <: first(rule) + ] + isempty(matches) && return nothing + + exact = Pair{Any,Any}[rule for rule in matches if first(rule) === value_type] + length(exact) == 1 && return only(exact) + length(exact) > 1 && error( + "Internal error: duplicate exact `type_promotion` rules for `$(value_type)`.", + ) + + most_specific = Pair{Any,Any}[] + for candidate in matches + candidate_source = first(candidate) + shadowed = any(matches) do other + other === candidate && return false + other_source = first(other) + return other_source <: candidate_source && + !(candidate_source <: other_source) + end + shadowed || push!(most_specific, candidate) + end + length(most_specific) == 1 && return only(most_specific) + sources = join(sort!(string.(first.(most_specific))), ", ") + error( + "Ambiguous `type_promotion` rules for value type `$(value_type)`: " * + "$(sources). Add an exact rule for `$(value_type)` or remove an " * + "overlapping source type.", + ) +end + + +_matching_status_type_rule(rules, value) = + _matching_status_type_rule_for_type(rules, typeof(value)) + +function _convert_numeric_array_elements(rules, value::Array{<:Number}; context) + if isempty(value) + rule = _matching_status_type_rule_for_type(rules, eltype(value)) + isnothing(rule) && return value, false, nothing + target = last(rule) + isconcretetype(target) || error( + "Failed to apply `type_promotion` to $(context): the element target " * + "type `$(target)` must be concrete for an empty numeric array.", + ) + return similar(value, target), target !== eltype(value), rule + end + + converted_values = Vector{Any}(undef, length(value)) + applied_rules = Pair{Any,Any}[] + changed = false + for (position, index) in enumerate(eachindex(value)) + converted, element_changed, rule = _convert_status_type_rules( + rules, + value[index]; + context="$(context) at numeric-array index `$(index)`", + ) + converted_values[position] = converted + changed |= element_changed + isnothing(rule) || push!(applied_rules, rule) + end + changed || return value, false, nothing + + effective_eltype = foldl( + typejoin, + (typeof(element) for element in converted_values), + ) + converted_array = similar(value, effective_eltype) + for (index, converted) in zip(eachindex(converted_array), converted_values) + converted_array[index] = converted + end + unique!(applied_rules) + applied_rule = length(applied_rules) == 1 ? + only(applied_rules) : + Tuple(applied_rules) + return converted_array, true, applied_rule +end + +function _convert_status_type_rules(rules, value; context) + rule = _matching_status_type_rule(rules, value) + if !isnothing(rule) + source, target = rule + converted = try + convert(target, value) + catch exception + error( + "Failed to apply `type_promotion` to $(context): cannot convert " * + "`$(typeof(value))` to `$(target)` using rule `$(source) => " * + "$(target)`: $(sprint(showerror, exception))", + ) + end + changed = converted !== value || typeof(converted) !== typeof(value) + return converted, changed, source => target + end + + value isa Array{<:Number} || return value, false, nothing + return _convert_numeric_array_elements(rules, value; context=context) +end + +function _transform_status_value(transform, variable::Symbol, value; context) + isnothing(transform) && return value, false + applicable(transform, variable, value) || error( + "`status_transform` is not callable as `(variable, value)` for $(context) " * + "`$(variable)` with value type `$(typeof(value))`.", + ) + transformed = try + transform(variable, value) + catch exception + error( + "Failed to apply `status_transform` to $(context) `$(variable)` with " * + "value type `$(typeof(value))`: $(sprint(showerror, exception))", + ) + end + return transformed, transformed !== value || typeof(transformed) !== typeof(value) +end + +function _convert_status_value( + policy::StatusConversionPolicy, + variable::Symbol, + value; + object_id=nothing, + application_id=nothing, + origin=:unknown, +) + context = _status_conversion_context( + ; object_id=object_id, application_id=application_id, origin=origin, + ) + transformed, transformed_changed = _transform_status_value( + policy.transform, + variable, + value; + context=context, + ) + converted, mapped_changed, rule = _convert_status_type_rules( + policy.rules, + transformed; + context="$(context) `$(variable)`", + ) + return converted, ( + transformed=transformed, + transform_applied=!isnothing(policy.transform), + transform_changed=transformed_changed, + mapping_applied=!isnothing(rule), + mapping_changed=mapped_changed, + mapping_rule=rule, + storage_changed=transformed_changed || mapped_changed, + ) +end + +function _status_conversion_record_key( + variable::Symbol; + object_id=nothing, + application_id=nothing, + origin=:unknown, +) + return (Symbol(origin), application_id, object_id, variable) +end + +function _cached_status_materialization(record, value, private_copy::Bool) + record isa StatusConversionRecord || return nothing + record.original_type === typeof(value) || return nothing + isequal(record.original_value, value) || return nothing + effective = private_copy ? + _private_initial_value(record.effective_value) : + record.effective_value + return effective, record.storage_changed, record.mapping_rule +end + +function _materialize_status_value( + model, + variable::Symbol, + value; + object_id=nothing, + application_id=nothing, + origin=:unknown, + private_copy::Bool=false, + reuse::Bool=false, + declared_type=typeof(value), +) + key = _status_conversion_record_key( + variable; + object_id=object_id, + application_id=application_id, + origin=origin, + ) + if reuse + cached = _cached_status_materialization( + get(model.status_conversion_records, key, nothing), + value, + private_copy, + ) + isnothing(cached) || return cached + end + + original_snapshot = reuse ? _private_initial_value(value) : nothing + initial = private_copy ? _private_initial_value(value) : value + effective, details = _convert_status_value( + model.status_conversion, + variable, + initial; + object_id=object_id, + application_id=application_id, + origin=origin, + ) + model.status_conversion_records[key] = StatusConversionRecord( + variable, + object_id, + application_id, + Symbol(origin), + declared_type, + typeof(value), + typeof(details.transformed), + typeof(effective), + details.transform_applied, + details.transform_changed, + details.mapping_applied, + details.mapping_changed, + details.mapping_rule, + details.storage_changed, + original_snapshot, + reuse ? _private_initial_value(effective) : nothing, + ) + return effective, details.storage_changed, details.mapping_rule +end + +function _convert_registered_status(model, object_id, status) + status isa Status || return status + _no_status_conversion(model.status_conversion) && return status + names = propertynames(status) + changed = false + references = ntuple(length(names)) do index + variable = names[index] + reference = refvalue(status, variable) + converted, variable_changed, _ = _materialize_status_value( + model, + variable, + reference[]; + object_id=object_id, + origin=:supplied_status, + ) + changed |= variable_changed + return variable_changed ? Ref(converted) : reference + end + return changed ? Status(NamedTuple{names}(references)) : status +end diff --git a/src/composite_model_api.jl b/src/composite_model_api.jl index c98f6c598..b70238cde 100644 --- a/src/composite_model_api.jl +++ b/src/composite_model_api.jl @@ -1,6 +1,7 @@ # The Composite Model/Object API is one public compiler and runtime. Internal ownership is # split by dependency direction; these files are not modules and add no public # abstraction boundary. +include("composite_model/status_conversion.jl") include("composite_model/registry_topology.jl") include("composite_model/selectors.jl") include("composite_model/compilation.jl") diff --git a/test/runtests.jl b/test/runtests.jl index 28ef4de34..a6985dafc 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -58,6 +58,10 @@ else include("test-model-status-initialization.jl") end + @testset "Composite model status type conversion" begin + include("test-model-status-type-conversion.jl") + end + @testset "Composite model output boundaries" begin include("test-model-output-boundaries.jl") end diff --git a/test/test-model-status-type-conversion.jl b/test/test-model-status-type-conversion.jl new file mode 100644 index 000000000..e86d55d78 --- /dev/null +++ b/test/test-model-status-type-conversion.jl @@ -0,0 +1,237 @@ +using Dates +using PlantSimEngine +using PlantSimEngine.Diagnostics +using Test + +PlantSimEngine.@process "status_type_conversion" verbose = false + +struct StatusTypeConversionModel <: AbstractStatus_Type_ConversionModel end + +PlantSimEngine.inputs_(::StatusTypeConversionModel) = ( + supplied=Required(Real), + offset=Default(0.5), + default_vector=Default([1.0, 2.0]), +) + +PlantSimEngine.outputs_(::StatusTypeConversionModel) = ( + result=0.0, + default_matrix=reshape([1.0, 2.0, 3.0, 4.0], 2, 2), + count=1, +) + +function PlantSimEngine.run!( + ::StatusTypeConversionModel, + status, + environment, + constants, + context, +) + status.result = status.supplied + status.offset + return nothing +end + +struct StatusTransformParticle{T} + value::T + spread::T +end + +struct StatusTransformCallable end + +struct StatusTransformContainer{T} + values::T +end + +function (::StatusTransformCallable)(variable, value) + variable === :uncertain || return value + return StatusTransformParticle(value, value / 10) +end + +@testset "source Status identity remains exclusive under conversion" begin + shared = Status(value=1.0) + @test_throws ArgumentError CompositeModel( + Object(:first; status=shared), + Object(:second; status=shared); + type_promotion=Dict(Float64 => Float32), + ) + + model = CompositeModel( + Object(:first; status=shared); + type_promotion=Dict(Float64 => Float32), + ) + @test_throws ArgumentError register_object!( + model, + Object(:second; status=shared), + ) +end + +@testset "no status conversion policy preserves current values and references" begin + original = Status(supplied=1.25, untouched=2) + supplied_reference = PlantSimEngine.refvalue(original, :supplied) + object = Object(:scene; scale=:Scene, status=original) + model = CompositeModel( + object; + applications=( + ModelSpec( + StatusTypeConversionModel(); + name=:conversion, + on=One(scale=:Scene), + ), + ), + ) + + @test object.status === original + @test PlantSimEngine.refvalue(object.status, :supplied) === supplied_reference + Advanced.refresh_bindings!(model) + @test object.status.supplied isa Float64 + @test object.status.offset isa Float64 + @test object.status.result isa Float64 + @test eltype(object.status.default_vector) === Float64 +end + +@testset "Float64 status values materialize as Float32" begin + model = CompositeModel( + StatusTypeConversionModel(); + status=( + supplied=1.25, + explicit_vector=[3.0, 4.0], + explicit_matrix=reshape([5.0, 6.0], 1, 2), + count_from_user=2, + flag=true, + label=:leaf, + date=Date(2026, 8, 26), + ), + type_promotion=Dict(Float64 => Float32), + ) + + compiled = Advanced.refresh_bindings!(model) + status = only(model_objects(model)).status + + @test status.supplied isa Float32 + @test status.offset isa Float32 + @test status.result isa Float32 + @test status.explicit_vector isa Vector{Float32} + @test status.explicit_matrix isa Matrix{Float32} + @test status.default_vector isa Vector{Float32} + @test status.default_matrix isa Matrix{Float32} + @test status.count === 1 + @test status.count_from_user === 2 + @test status.flag === true + @test status.label === :leaf + @test status.date === Date(2026, 8, 26) + @test only(Diagnostics.explain_execution_plan(model)).status_type == + typeof(status) + + simulation = run!(model; outputs=:all) + @test status.result === Float32(1.75) + @test all( + fieldtype(eltype(stream), 2) === Float32 + for ((_, _, variable), stream) in outputs(simulation) + if variable === :result + ) +end + +@testset "numeric arrays preserve shape and unrelated values" begin + model = CompositeModel( + Object( + :scene; + status=Status( + empty_vector=Float64[], + empty_matrix=reshape(Float64[], 0, 2), + mixed=Real[1.0, 2], + custom=StatusTransformContainer([3.0, 4.0]), + ), + ); + type_promotion=Dict(Float64 => Float32), + ) + status = only(model_objects(model)).status + + @test status.empty_vector isa Vector{Float32} + @test status.empty_matrix isa Matrix{Float32} + @test size(status.empty_matrix) == (0, 2) + @test status.mixed isa Vector{Real} + @test status.mixed[1] isa Float32 + @test status.mixed[2] isa Int + @test status.custom isa StatusTransformContainer{Vector{Float64}} +end + +@testset "precise transform runs before the general type mapping" begin + model = CompositeModel( + Object( + :scene; + scale=:Scene, + status=Status(uncertain=10.0, ordinary=20.0, count=3), + ); + type_promotion=Dict(Float64 => Float32), + status_transform=StatusTransformCallable(), + ) + status = only(model_objects(model)).status + + @test status.uncertain == StatusTransformParticle(10.0, 1.0) + @test status.uncertain isa StatusTransformParticle{Float64} + @test status.ordinary === Float32(20) + @test status.count === 3 +end + +@testset "type rule selection is deterministic" begin + exact = CompositeModel( + Object(:scene; status=Status(value=1.0)); + type_promotion=Dict( + AbstractFloat => Float16, + Float64 => Float32, + ), + ) + @test only(model_objects(exact)).status.value isa Float32 + + specific = CompositeModel( + Object(:scene; status=Status(value=1.0)); + type_promotion=Dict( + Real => Float16, + AbstractFloat => Float32, + ), + ) + @test only(model_objects(specific)).status.value isa Float32 + + ambiguous_rules = Dict{Any,Any}( + Union{Float64,Int} => Float32, + Union{Float64,String} => Float16, + ) + exception = try + CompositeModel( + Object(:scene; status=Status(value=1.0)); + type_promotion=ambiguous_rules, + ) + nothing + catch error + error + end + @test exception isa ErrorException + @test occursin("Ambiguous `type_promotion` rules", sprint(showerror, exception)) + @test occursin("Float64", sprint(showerror, exception)) +end + +@testset "invalid mappings and conversions fail with context" begin + @test_throws "source keys must be types" CompositeModel( + Object(:scene); + type_promotion=Dict(:Float64 => Float32), + ) + @test_throws "target values must be types" CompositeModel( + Object(:scene); + type_promotion=Dict(Float64 => :Float32), + ) + + exception = try + CompositeModel( + Object(:leaf; status=Status(biomass=1.0)); + type_promotion=Dict(Float64 => String), + ) + nothing + catch error + error + end + message = sprint(showerror, exception) + @test occursin("Failed to apply `type_promotion`", message) + @test occursin("`biomass`", message) + @test occursin("object `leaf`", message) + @test occursin("Float64", message) + @test occursin("String", message) +end From 9956913325c8f81a6f95cc08f3a15810108fc648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Wed, 26 Aug 2026 20:13:50 +0200 Subject: [PATCH 26/45] Add status conversion diagnostics and safe initialization --- frontend/src/types.ts | 11 +- src/composite_model/compilation.jl | 190 ++++++++++++++++++++-- src/composite_model/registry_topology.jl | 7 + src/composite_model/status_conversion.jl | 20 +++ src/visualization/model_graph_view.jl | 60 ++++++- test/test-model-graph-view.jl | 42 +++++ test/test-model-status-type-conversion.jl | 50 +++++- 7 files changed, 361 insertions(+), 19 deletions(-) diff --git a/frontend/src/types.ts b/frontend/src/types.ts index 1c3b28104..4d564ca5d 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -188,10 +188,19 @@ export type InitializationDescriptor = { objectId: unknown; variable: string; role: GraphPortRole; - disposition: "generated" | "producer_bound" | "supplied" | "environment_bound" | "unresolved"; + disposition: "generated" | "producer_bound" | "supplied" | "defaulted" | "required" | "environment_bound" | "unresolved"; value: unknown; valueJulia: string; expectedType: string; + declaredType: string | null; + originalType: string | null; + transformedType: string | null; + effectiveType: string | null; + statusTransformApplied: boolean; + statusTransformChanged: boolean; + typeMappingApplied: boolean; + typeMappingChanged: boolean; + typeMappingRule: unknown; sourceApplicationIds: string[]; sourceObjectIds: unknown[]; sourceVariable: string | null; diff --git a/src/composite_model/compilation.jl b/src/composite_model/compilation.jl index 5c6c3af3a..f36cf81a0 100644 --- a/src/composite_model/compilation.jl +++ b/src/composite_model/compilation.jl @@ -2965,6 +2965,110 @@ function _validate_model_call_cadences!(applications, call_bindings, timeline) return nothing end +function _initialization_effective_value( + model::CompositeModel, + compiled::CompiledCompositeModel, + application_id::Symbol, + object_id::ObjectId, + variable::Symbol, +) + view = get( + compiled.status_views_by_target, + (application_id, object_id), + nothing, + ) + if !isnothing(view) && variable in propertynames(view.status) + return true, view.status[variable] + end + status = _model_object(model, object_id).status + if status isa Status && variable in propertynames(status) + return true, status[variable] + end + return false, nothing +end + +function _initialization_conversion_record( + model::CompositeModel, + application_id, + object_id::ObjectId, + variable::Symbol, + origins, +) + for origin in origins + record = get( + model.status_conversion_records, + _status_conversion_record_key( + variable; + object_id=object_id, + application_id=application_id, + origin=origin, + ), + nothing, + ) + record isa StatusConversionRecord && return record + end + record = get( + model.status_conversion_records, + _status_conversion_record_key( + variable; + object_id=object_id, + origin=:supplied_status, + ), + nothing, + ) + return record isa StatusConversionRecord ? record : nothing +end + +function _initialization_conversion_fields( + model::CompositeModel, + compiled::CompiledCompositeModel, + application_id::Symbol, + object_id::ObjectId, + variable::Symbol; + declared_type=nothing, + origins=(), +) + record = _initialization_conversion_record( + model, + application_id, + object_id, + variable, + origins, + ) + has_effective, effective = _initialization_effective_value( + model, + compiled, + application_id, + object_id, + variable, + ) + effective_type = has_effective ? typeof(effective) : nothing + original_type = isnothing(record) ? effective_type : record.original_type + return ( + declared_type=declared_type, + original_type=original_type, + transformed_type=isnothing(record) ? original_type : record.transformed_type, + effective_type=effective_type, + status_transform_applied=!isnothing(record) && record.transform_applied, + status_transform_changed=!isnothing(record) && record.transform_changed, + type_mapping_applied=!isnothing(record) && record.mapping_applied, + type_mapping_changed=!isnothing(record) && record.mapping_changed, + type_mapping_rule=isnothing(record) ? nothing : record.mapping_rule, + ) +end + +_no_initialization_conversion_fields(; declared_type=nothing) = ( + declared_type=declared_type, + original_type=nothing, + transformed_type=nothing, + effective_type=nothing, + status_transform_applied=false, + status_transform_changed=false, + type_mapping_applied=false, + type_mapping_changed=false, + type_mapping_rule=nothing, +) + """ explain_initialization(model::CompositeModel) @@ -3025,6 +3129,18 @@ function explain_initialization(model::CompositeModel) for object_id in application.target_ids for variable in sort!(collect(generated); by=string) default_value = getproperty(model_outputs, variable) + conversion = _initialization_conversion_fields( + model, + compiled, + application.id, + object_id, + variable; + declared_type=typeof(default_value), + origins=( + :model_output_default, + :stream_only_private_default, + ), + ) push!(rows, ( application_id=application.id, object_id=object_id.value, @@ -3038,11 +3154,15 @@ function explain_initialization(model::CompositeModel) expected_type=typeof(default_value), default_value=default_value, provided_type=nothing, + conversion..., detail=nothing, )) end for variable in sort!(Symbol.(collect(keys(environment_model_outputs))); by=string) default_value = getproperty(environment_model_outputs, variable) + conversion = _no_initialization_conversion_fields( + ; declared_type=typeof(default_value), + ) push!(rows, ( application_id=application.id, object_id=object_id.value, @@ -3056,6 +3176,7 @@ function explain_initialization(model::CompositeModel) expected_type=typeof(default_value), default_value=default_value, provided_type=nothing, + conversion..., detail=nothing, )) end @@ -3091,6 +3212,17 @@ function explain_initialization(model::CompositeModel) else nothing end + conversion = _initialization_conversion_fields( + model, + compiled, + application.id, + object_id, + variable; + declared_type=declaration isa Default ? + typeof(default_value) : + _input_expected_type(declaration), + origins=(:model_input_default,), + ) push!(rows, ( application_id=application.id, object_id=object_id.value, @@ -3112,6 +3244,7 @@ function explain_initialization(model::CompositeModel) expected_type=_input_expected_type(declaration), default_value=default_value, provided_type=provided_type, + conversion..., detail=disposition == :required ? "Provide `$(variable)` on object `$(object_id.value)` Status or add `inputs=(:$(variable) => ..., )` to application `$(application.id)`." : nothing, @@ -3133,6 +3266,9 @@ function explain_initialization(model::CompositeModel) environment_variables(environment_binding.backend) bound = isnothing(available) || Symbol(source) in available default_value = getproperty(environment_inputs, variable) + conversion = _no_initialization_conversion_fields( + ; declared_type=typeof(default_value), + ) push!(rows, ( application_id=application.id, object_id=object_id.value, @@ -3146,6 +3282,7 @@ function explain_initialization(model::CompositeModel) expected_type=typeof(default_value), default_value=default_value, provided_type=nothing, + conversion..., detail=bound ? nothing : "Environment source `$(source)` is not available for this application/object.", )) @@ -4029,24 +4166,45 @@ function _prepare_model_output_destination_statuses!( model::CompositeModel, resolved_destinations, ) - for resolved in resolved_destinations - for destination_id in resolved.destination_ids - status = _ensure_model_object_status!(model, destination_id) - for (variable_, declaration) in pairs(resolved.plan.declarations) - declaration isa Default || continue - variable = Symbol(variable_) - status = _status_with_default( - model, - status, - destination_id, - variable, - _input_default(declaration); - application_id=resolved.plan.application_id, - origin=:distributed_output_default, - ) + staged = Dict{ObjectId,Status}() + staged_order = ObjectId[] + records_before = copy(model.status_conversion_records) + try + for resolved in resolved_destinations + for destination_id in resolved.destination_ids + status = get(staged, destination_id, nothing) + if isnothing(status) + current = _model_object(model, destination_id).status + status = isnothing(current) ? Status() : current + status isa Status || error( + "Output destination `$(destination_id.value)` status must be " * + "a `Status` or `nothing`, got `$(typeof(status))`.", + ) + push!(staged_order, destination_id) + end + for (variable_, declaration) in pairs(resolved.plan.declarations) + declaration isa Default || continue + variable = Symbol(variable_) + status = _status_with_default( + model, + status, + destination_id, + variable, + _input_default(declaration); + application_id=resolved.plan.application_id, + origin=:distributed_output_default, + ) + end + staged[destination_id] = status end - _replace_model_object_status!(model, destination_id, status) end + catch + empty!(model.status_conversion_records) + merge!(model.status_conversion_records, records_before) + rethrow() + end + for destination_id in staged_order + _replace_model_object_status!(model, destination_id, staged[destination_id]) end return model end diff --git a/src/composite_model/registry_topology.jl b/src/composite_model/registry_topology.jl index 68cb7b962..32a096e36 100644 --- a/src/composite_model/registry_topology.jl +++ b/src/composite_model/registry_topology.jl @@ -502,6 +502,13 @@ _register_model_objects!(model::CompositeModel, objects; kwargs...) = Create a model from `Object` and `ObjectInstance` values. Global applications and applications mounted from object instances are compiled through the same composite-model/object dependency graph. + +`type_promotion` maps source value types to target types for one-time status +materialization. `status_transform(variable, value)` optionally handles +variable-specific cases first; the mapping is applied to its returned value. +Numeric `Array` values are mapped element by element while arbitrary user +structs are left untouched. The policy applies to statuses registered later, +but not to model parameters or environment values. """ function CompositeModel( items::Union{Object,ObjectInstance}...; diff --git a/src/composite_model/status_conversion.jl b/src/composite_model/status_conversion.jl index 384175ade..6759f6f63 100644 --- a/src/composite_model/status_conversion.jl +++ b/src/composite_model/status_conversion.jl @@ -45,9 +45,29 @@ function _normalize_status_type_rules(type_promotion) push!(normalized, source => target) end sort!(normalized; by=rule -> (string(first(rule)), string(last(rule)))) + _validate_status_type_rule_overlaps(normalized) return Tuple(normalized) end +function _validate_status_type_rule_overlaps(rules) + for left_index in eachindex(rules) + left = first(rules[left_index]) + for right_index in (left_index + 1):lastindex(rules) + right = first(rules[right_index]) + (left <: right || right <: left) && continue + overlap = typeintersect(left, right) + overlap === Union{} && continue + any(rule -> first(rule) === overlap, rules) && continue + error( + "Ambiguous `type_promotion` rules: source types `$(left)` and " * + "`$(right)` overlap at `$(overlap)` but neither is more specific. " * + "Add an exact rule for the overlap or remove one source type.", + ) + end + end + return rules +end + function _status_conversion_policy(type_promotion, status_transform) return StatusConversionPolicy( _normalize_status_type_rules(type_promotion), diff --git a/src/visualization/model_graph_view.jl b/src/visualization/model_graph_view.jl index bc843e7c1..531bd7060 100644 --- a/src/visualization/model_graph_view.jl +++ b/src/visualization/model_graph_view.jl @@ -640,9 +640,13 @@ function _model_graph_json_value(value) value === nothing && return nothing value === missing && return nothing value isa Bool && return value - if value isa Real + if value isa Integer + return value isa BigInt ? string(value) : value + end + if value isa Union{Float16,Float32,Float64} return isfinite(value) ? value : string(value) end + value isa Real && return string(value) value isa AbstractString && return String(value) value isa Symbol && return string(value) value isa ObjectId && return _model_graph_json_value(value.value) @@ -1555,6 +1559,60 @@ function _model_graph_initialization(report) row["role"], row["variable"], )) + _model_graph_add_status_conversion!(rows, report) + return rows +end + +function _model_graph_add_status_conversion!(rows, report) + explanations = try + explain_initialization(report.model) + catch + NamedTuple[] + end + by_key = Dict( + ( + string(explanation.application_id), + _model_graph_json_value(explanation.object_id), + string(explanation.role), + string(explanation.variable), + ) => explanation + for explanation in explanations + ) + for row in rows + explanation = get( + by_key, + ( + row["applicationId"], + row["objectId"], + row["role"], + row["variable"], + ), + nothing, + ) + row["declaredType"] = isnothing(explanation) || + isnothing(explanation.declared_type) ? + nothing : string(explanation.declared_type) + row["originalType"] = isnothing(explanation) || + isnothing(explanation.original_type) ? + nothing : string(explanation.original_type) + row["transformedType"] = isnothing(explanation) || + isnothing(explanation.transformed_type) ? + nothing : string(explanation.transformed_type) + row["effectiveType"] = isnothing(explanation) || + isnothing(explanation.effective_type) ? + nothing : string(explanation.effective_type) + row["statusTransformApplied"] = + !isnothing(explanation) && explanation.status_transform_applied + row["statusTransformChanged"] = + !isnothing(explanation) && explanation.status_transform_changed + row["typeMappingApplied"] = + !isnothing(explanation) && explanation.type_mapping_applied + row["typeMappingChanged"] = + !isnothing(explanation) && explanation.type_mapping_changed + row["typeMappingRule"] = isnothing(explanation) ? + nothing : + _model_graph_json_value(explanation.type_mapping_rule) + end return rows end diff --git a/test/test-model-graph-view.jl b/test/test-model-graph-view.jl index 118b03b8c..068b2b272 100644 --- a/test/test-model-graph-view.jl +++ b/test/test-model-graph-view.jl @@ -8,6 +8,7 @@ abstract type AbstractModelGraphCycleAModel <: PlantSimEngine.AbstractModel end abstract type AbstractModelGraphCycleBModel <: PlantSimEngine.AbstractModel end abstract type AbstractModelGraphEnvironmentModel <: PlantSimEngine.AbstractModel end abstract type AbstractModelGraphDistributedWriterModel <: PlantSimEngine.AbstractModel end +abstract type AbstractModelGraphGenericTypeModel <: PlantSimEngine.AbstractModel end PlantSimEngine.process_(::Type{AbstractModelGraphSourceModel}) = :model_graph_source PlantSimEngine.process_(::Type{AbstractModelGraphConsumerModel}) = :model_graph_consumer @@ -16,6 +17,8 @@ PlantSimEngine.process_(::Type{AbstractModelGraphCycleBModel}) = :model_graph_cy PlantSimEngine.process_(::Type{AbstractModelGraphEnvironmentModel}) = :model_graph_environment PlantSimEngine.process_(::Type{AbstractModelGraphDistributedWriterModel}) = :model_graph_distributed_writer +PlantSimEngine.process_(::Type{AbstractModelGraphGenericTypeModel}) = + :model_graph_generic_type struct ModelGraphSourceModel{T} <: AbstractModelGraphSourceModel coefficient::T @@ -47,6 +50,10 @@ struct ModelGraphDistributedWriterModel <: AbstractModelGraphDistributedWriterMo PlantSimEngine.inputs_(::ModelGraphDistributedWriterModel) = NamedTuple() PlantSimEngine.outputs_(::ModelGraphDistributedWriterModel) = NamedTuple() +struct ModelGraphGenericTypeModel <: AbstractModelGraphGenericTypeModel end +PlantSimEngine.inputs_(::ModelGraphGenericTypeModel) = (driver=Required(Real),) +PlantSimEngine.outputs_(::ModelGraphGenericTypeModel) = (result=0.0,) + struct ModelGraphWeatherBackend <: PlantSimEngine.EnvironmentAPI.AbstractEnvironmentBackend end struct ModelGraphCanopyBackend <: PlantSimEngine.EnvironmentAPI.AbstractEnvironmentBackend end PlantSimEngine.EnvironmentAPI.environment_variables(::ModelGraphWeatherBackend) = (:T, :RH) @@ -510,6 +517,41 @@ end @test view.metadata["unresolvedInitializationCount"] == 1 end +@testset "CompositeModel graph initialization reports effective status types" begin + model = CompositeModel( + Object(:leaf; name=:leaf, scale=:Leaf, status=Status(driver=1.0)); + applications=( + ModelSpec( + ModelGraphGenericTypeModel(); + name=:generic, + on=One(name=:leaf), + ), + ), + type_promotion=Dict(Float64 => Float32), + ) + initialization = model_graph_view(model).initialization + driver = only( + row for row in initialization + if row["applicationId"] == "generic" && row["variable"] == "driver" + ) + result = only( + row for row in initialization + if row["applicationId"] == "generic" && row["variable"] == "result" + ) + + @test driver["declaredType"] == "Real" + @test driver["originalType"] == "Float64" + @test driver["effectiveType"] == "Float32" + @test driver["typeMappingApplied"] + @test driver["typeMappingRule"] == Dict( + "first" => "Float64", + "second" => "Float32", + ) + @test result["declaredType"] == "Float64" + @test result["originalType"] == "Float64" + @test result["effectiveType"] == "Float32" +end + @testset "CompositeModel graph edits are transactional" begin model = CompositeModel(Object(:leaf; name=:leaf, scale=:Leaf, status=Status(driver=1.0))) source_spec = ModelSpec(ModelGraphSourceModel(); name=:source, on=One(name=:leaf)) diff --git a/test/test-model-status-type-conversion.jl b/test/test-model-status-type-conversion.jl index e86d55d78..18010766e 100644 --- a/test/test-model-status-type-conversion.jl +++ b/test/test-model-status-type-conversion.jl @@ -128,6 +128,31 @@ end for ((_, _, variable), stream) in outputs(simulation) if variable === :result ) + + initialization = Diagnostics.explain_initialization(model) + supplied_row = only( + row for row in initialization + if row.role === :input && row.variable === :supplied + ) + offset_row = only( + row for row in initialization + if row.role === :input && row.variable === :offset + ) + result_row = only( + row for row in initialization + if row.role === :output && row.variable === :result + ) + @test supplied_row.declared_type === Real + @test supplied_row.original_type === Float64 + @test supplied_row.effective_type === Float32 + @test supplied_row.type_mapping_applied + @test supplied_row.type_mapping_rule == (Float64 => Float32) + @test offset_row.declared_type === Float64 + @test offset_row.original_type === Float64 + @test offset_row.effective_type === Float32 + @test result_row.declared_type === Float64 + @test result_row.original_type === Float64 + @test result_row.effective_type === Float32 end @testset "numeric arrays preserve shape and unrelated values" begin @@ -154,6 +179,29 @@ end @test status.custom isa StatusTransformContainer{Vector{Float64}} end +@testset "initialization diagnostics record precise transforms" begin + transform = (variable, value) -> + variable === :supplied ? BigFloat(value) : value + model = CompositeModel( + StatusTypeConversionModel(); + status=(supplied=1.25,), + type_promotion=Dict(Float64 => Float32), + status_transform=transform, + ) + initialization = Diagnostics.explain_initialization(model) + supplied_row = only( + row for row in initialization + if row.role === :input && row.variable === :supplied + ) + + @test supplied_row.original_type === Float64 + @test supplied_row.transformed_type === BigFloat + @test supplied_row.effective_type === BigFloat + @test supplied_row.status_transform_applied + @test supplied_row.status_transform_changed + @test !supplied_row.type_mapping_applied +end + @testset "precise transform runs before the general type mapping" begin model = CompositeModel( Object( @@ -197,7 +245,7 @@ end ) exception = try CompositeModel( - Object(:scene; status=Status(value=1.0)); + Object(:scene); type_promotion=ambiguous_rules, ) nothing From f673df1ca725705e06034fcc6a8a3369430f9d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Wed, 26 Aug 2026 20:24:18 +0200 Subject: [PATCH 27/45] Preserve converted types through runtime lifecycle --- src/composite_model/runtime_outputs.jl | 24 +- test/runtests.jl | 12 + test/test-model-status-type-lifecycle.jl | 238 +++++++++++++++ test/test-model-status-type-runtime.jl | 366 +++++++++++++++++++++++ test/test-model-status-type-temporal.jl | 165 ++++++++++ 5 files changed, 799 insertions(+), 6 deletions(-) create mode 100644 test/test-model-status-type-lifecycle.jl create mode 100644 test/test-model-status-type-runtime.jl create mode 100644 test/test-model-status-type-temporal.jl diff --git a/src/composite_model/runtime_outputs.jl b/src/composite_model/runtime_outputs.jl index 7425cfe92..1edbcdd03 100644 --- a/src/composite_model/runtime_outputs.jl +++ b/src/composite_model/runtime_outputs.jl @@ -6489,12 +6489,12 @@ function _model_request_clock(request, timeline) end function _model_requested_value(samples, time, t_start, policy, timeline) - if policy isa HoldLast + value = if policy isa HoldLast value = _model_latest_sample(samples, time) - return isnothing(value) ? missing : value + isnothing(value) ? missing : value elseif policy isa Interpolate value = _model_interpolated_sample(samples, time, policy) - return isnothing(value) ? missing : value + isnothing(value) ? missing : value elseif policy isa Union{Integrate,Aggregate} values, durations = _model_window_segments( samples, @@ -6502,10 +6502,22 @@ function _model_requested_value(samples, time, t_start, policy, timeline) time, timeline.base_step_seconds, ) - isempty(values) && return missing - return _model_window_reduce(values, durations, policy) + isempty(values) ? missing : _model_window_reduce(values, durations, policy) + else + error("Unsupported model output request policy `$(typeof(policy))`.") + end + value === missing && return missing + effective_type = fieldtype(eltype(samples), 2) + value isa effective_type && return value + return try + convert(effective_type, value) + catch exception + error( + "OutputRequest policy `$(typeof(policy))` produced value type " * + "`$(typeof(value))`, but the retained stream uses effective type " * + "`$(effective_type)`: $(sprint(showerror, exception))", + ) end - error("Unsupported model output request policy `$(typeof(policy))`.") end function _model_requested_output_rows( diff --git a/test/runtests.jl b/test/runtests.jl index a6985dafc..a56926003 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -62,6 +62,18 @@ else include("test-model-status-type-conversion.jl") end + @testset "Composite model status type conversion runtime" begin + include("test-model-status-type-runtime.jl") + end + + @testset "Composite model status type conversion lifecycle" begin + include("test-model-status-type-lifecycle.jl") + end + + @testset "Composite model status type conversion temporal policies" begin + include("test-model-status-type-temporal.jl") + end + @testset "Composite model output boundaries" begin include("test-model-output-boundaries.jl") end diff --git a/test/test-model-status-type-lifecycle.jl b/test/test-model-status-type-lifecycle.jl new file mode 100644 index 000000000..03c5d4783 --- /dev/null +++ b/test/test-model-status-type-lifecycle.jl @@ -0,0 +1,238 @@ +using Dates +using MultiScaleTreeGraph +using PlantSimEngine +using Test + +PlantSimEngine.@process "status_type_lifecycle_increment" verbose = false +PlantSimEngine.@process "status_type_lifecycle_stream_writer" verbose = false +PlantSimEngine.@process "status_type_lifecycle_stream_consumer" verbose = false + +struct StatusTypeLifecycleIncrementModel <: + AbstractStatus_Type_Lifecycle_IncrementModel end + +PlantSimEngine.outputs_(::StatusTypeLifecycleIncrementModel) = (value=0.0,) + +function PlantSimEngine.run!( + ::StatusTypeLifecycleIncrementModel, + status, + environment, + constants, + context, +) + status.value += one(status.value) + return nothing +end + +struct StatusTypeLifecycleStreamWriterModel <: + AbstractStatus_Type_Lifecycle_Stream_WriterModel end + +PlantSimEngine.outputs_(::StatusTypeLifecycleStreamWriterModel) = + (private_value=0.0,) + +function PlantSimEngine.run!( + ::StatusTypeLifecycleStreamWriterModel, + status, + environment, + constants, + context, +) + status.private_value += one(status.private_value) + return nothing +end + +struct StatusTypeLifecycleStreamConsumerModel <: + AbstractStatus_Type_Lifecycle_Stream_ConsumerModel end + +PlantSimEngine.inputs_(::StatusTypeLifecycleStreamConsumerModel) = + (private_value=Required(Real),) +PlantSimEngine.outputs_(::StatusTypeLifecycleStreamConsumerModel) = (seen=0.0,) + +function PlantSimEngine.run!( + ::StatusTypeLifecycleStreamConsumerModel, + status, + environment, + constants, + context, +) + status.seen = status.private_value + return nothing +end + +struct StatusTypeLifecycleTransformCounter + calls::Base.RefValue{Int} +end + +function (counter::StatusTypeLifecycleTransformCounter)(variable, value) + counter.calls[] += 1 + return value +end + +@testset "register_object! converts status after compilation" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant; scale=:Plant, parent=:scene); + applications=( + ModelSpec( + StatusTypeLifecycleIncrementModel(); + name=:lifecycle_increment, + on=Many(scale=:Leaf), + ), + ), + environment=(duration=Hour(1),), + type_promotion=Dict(Float64 => Float32), + ) + simulation = run!(model; outputs=:all) + + late_leaf = Object( + :late_leaf; + scale=:Leaf, + parent=:plant, + status=Status(initial_value=2.5), + ) + registered = register_object!(model, late_leaf) + + @test registered === late_leaf + @test registered.status === model_status(model, :late_leaf) + @test registered.status.initial_value === Float32(2.5) + @test !(:value in propertynames(registered.status)) + + continue!(simulation) + + @test registered.status === model_status(model, :late_leaf) + @test registered.status.initial_value isa Float32 + @test registered.status.value === Float32(1) + stream = outputs(simulation)[ + (:lifecycle_increment, ObjectId(:late_leaf), :value) + ] + @test fieldtype(eltype(stream), 2) === Float32 + @test stream == [(2.0, Float32(1))] +end + +@testset "MTG import and add_organ! use the stored conversion policy" begin + root = MultiScaleTreeGraph.Node( + MultiScaleTreeGraph.NodeMTG("/", :Scene, 1, 0), + ) + plant = MultiScaleTreeGraph.Node( + root, + MultiScaleTreeGraph.NodeMTG("+", :Plant, 1, 1), + ) + leaf = MultiScaleTreeGraph.Node( + plant, + MultiScaleTreeGraph.NodeMTG("+", :Leaf, 1, 2), + ) + imported_source = Status(node=leaf, biomass=2.5) + + model = CompositeModel( + root; + status=node -> node === leaf ? imported_source : nothing, + type_promotion=Dict(Float64 => Float32), + ) + imported = model_status(model, leaf) + + @test imported !== imported_source + @test imported.node === leaf + @test imported.biomass === Float32(2.5) + @test imported_source.biomass === 2.5 + + Advanced.refresh_bindings!(model) + added = add_organ!( + plant, + model, + :+, + :Leaf, + 2; + index=2, + initial_status=(biomass=3.5, area=2.0), + ) + registered = model_status(model, added.node) + + @test added === registered + @test model_object(model, added.node).status === added + @test added.biomass === Float32(3.5) + @test added.area === Float32(2) + @test added.node isa MultiScaleTreeGraph.Node +end + +@testset "refresh, reparent, steps, and removal do not repeat transforms" begin + calls = Ref(0) + transform = StatusTypeLifecycleTransformCounter(calls) + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:plant_a; scale=:Plant, parent=:scene), + Object(:plant_b; scale=:Plant, parent=:scene), + Object(:leaf; scale=:Leaf, parent=:plant_a); + applications=( + ModelSpec( + StatusTypeLifecycleStreamWriterModel(); + name=:lifecycle_stream_writer, + on=Many(scale=:Leaf), + output_routing=(private_value=:stream_only,), + ), + ModelSpec( + StatusTypeLifecycleStreamConsumerModel(); + name=:lifecycle_stream_consumer, + on=Many(scale=:Leaf), + inputs=( + private_value=One( + within=Self(), + application=:lifecycle_stream_writer, + var=:private_value, + policy=HoldLast(), + ), + ), + ), + ), + environment=(duration=Hour(1),), + type_promotion=Dict(Float64 => Float32), + status_transform=transform, + ) + + Advanced.refresh_bindings!(model) + materialization_calls = calls[] + @test materialization_calls > 0 + + Advanced.refresh_bindings!(model; force=true) + @test calls[] == materialization_calls + + simulation = run!(model; outputs=:all) + @test calls[] == materialization_calls + leaf_status = model_status(model, :leaf) + @test leaf_status.seen isa Float32 + @test !(:private_value in propertynames(leaf_status)) + + writer_key = ( + :lifecycle_stream_writer, + ObjectId(:leaf), + :private_value, + ) + consumer_key = ( + :lifecycle_stream_consumer, + ObjectId(:leaf), + :seen, + ) + retained_writer_stream = outputs(simulation)[writer_key] + retained_consumer_stream = outputs(simulation)[consumer_key] + @test fieldtype(eltype(retained_writer_stream), 2) === Float32 + @test fieldtype(eltype(retained_consumer_stream), 2) === Float32 + + step!(simulation) + @test calls[] == materialization_calls + + reparent_object!(model, :leaf, :plant_b) + @test calls[] == materialization_calls + continue!(simulation) + @test calls[] == materialization_calls + @test model_object(model, :leaf).parent == ObjectId(:plant_b) + @test outputs(simulation)[writer_key] === retained_writer_stream + @test outputs(simulation)[consumer_key] === retained_consumer_stream + + remove_object!(model, :leaf) + @test calls[] == materialization_calls + continue!(simulation) + @test calls[] == materialization_calls + @test outputs(simulation)[writer_key] === retained_writer_stream + @test outputs(simulation)[consumer_key] === retained_consumer_stream + @test last.(retained_writer_stream) == Float32[1, 2, 3] + @test all(value -> value isa Float32, last.(retained_consumer_stream)) + @test length(retained_consumer_stream) == 3 +end diff --git a/test/test-model-status-type-runtime.jl b/test/test-model-status-type-runtime.jl new file mode 100644 index 000000000..a7fe51b55 --- /dev/null +++ b/test/test-model-status-type-runtime.jl @@ -0,0 +1,366 @@ +using Dates +using PlantSimEngine +using PlantSimEngine.Diagnostics +using Test + +PlantSimEngine.@process "status_type_runtime_output_writer" verbose = false +PlantSimEngine.@process "status_type_runtime_input_consumer" verbose = false +PlantSimEngine.@process "status_type_runtime_callee" verbose = false +PlantSimEngine.@process "status_type_runtime_controller" verbose = false + +struct StatusTypeRuntimeOutputWriterModel <: + AbstractStatus_Type_Runtime_Output_WriterModel end + +struct StatusTypeRuntimeInputConsumerModel <: + AbstractStatus_Type_Runtime_Input_ConsumerModel end + +struct StatusTypeRuntimeCalleeModel <: + AbstractStatus_Type_Runtime_CalleeModel end + +struct StatusTypeRuntimeControllerModel <: + AbstractStatus_Type_Runtime_ControllerModel end + +PlantSimEngine.inputs_(::StatusTypeRuntimeOutputWriterModel) = NamedTuple() +PlantSimEngine.outputs_(::StatusTypeRuntimeOutputWriterModel) = ( + canonical_value=0.0, + private_value=0.0, +) + +function PlantSimEngine.run!( + ::StatusTypeRuntimeOutputWriterModel, + status, + environment, + constants, + context, +) + status.canonical_value += one(status.canonical_value) + status.private_value += one(status.private_value) + destinations = output_targets(context, :leaves) + for index in eachindex(destinations.columns.distributed_value) + destinations.columns.distributed_value[index] = + status.canonical_value + + convert(typeof(status.canonical_value), index) + end + return nothing +end + +PlantSimEngine.inputs_(::StatusTypeRuntimeInputConsumerModel) = ( + one_value=Required(Real), + optional_value=Default(0.0), + many_values=Required(AbstractVector), + mixed_values=Required(AbstractVector), +) +PlantSimEngine.outputs_(::StatusTypeRuntimeInputConsumerModel) = (total=0.0,) + +function PlantSimEngine.run!( + ::StatusTypeRuntimeInputConsumerModel, + status, + environment, + constants, + context, +) + status.total = + status.one_value + + status.optional_value + + sum(status.many_values) + + sum(status.mixed_values) + return nothing +end + +PlantSimEngine.inputs_(::StatusTypeRuntimeCalleeModel) = NamedTuple() +PlantSimEngine.outputs_(::StatusTypeRuntimeCalleeModel) = (value=0.0,) + +function PlantSimEngine.run!( + ::StatusTypeRuntimeCalleeModel, + status, + environment, + constants, + context, +) + status.value += one(status.value) + return nothing +end + +PlantSimEngine.inputs_(::StatusTypeRuntimeControllerModel) = NamedTuple() +PlantSimEngine.outputs_(::StatusTypeRuntimeControllerModel) = ( + trial_value=0.0, + accepted_value=0.0, +) + +function PlantSimEngine.run!( + ::StatusTypeRuntimeControllerModel, + status, + environment, + constants, + context, +) + trial = only(run_call!(context, :callee; publish=false)) + status.trial_value = trial.status.value + accepted = only(run_call!(context, :callee; publish=true)) + status.accepted_value = accepted.status.value + return nothing +end + +function _assert_status_type_runtime_stream(stream, expected_values) + @test eltype(stream) === Tuple{Float64,Float32} + @test all(sample -> sample[2] isa Float32, stream) + @test last.(stream) == collect(Float32, expected_values) + return nothing +end + +@testset "effective canonical, distributed, and stream-only output types" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object(:leaf_a; scale=:Leaf, parent=:scene), + Object(:leaf_b; scale=:Leaf, parent=:scene); + applications=( + ModelSpec( + StatusTypeRuntimeOutputWriterModel(); + name=:status_type_runtime_writer, + on=One(scale=:Scene), + outputs_to=( + leaves=OutputTo( + Many(scale=:Leaf, within=SceneScope()); + vars=(distributed_value=Default(0.0),), + ), + ), + output_routing=(private_value=:stream_only,), + ), + ), + environment=(duration=Hour(1),), + type_promotion=Dict(Float64 => Float32), + ) + + compiled = Advanced.refresh_bindings!(model) + scene_status = model_status(model, :scene) + @test scene_status.canonical_value isa Float32 + @test !(:private_value in propertynames(scene_status)) + private_status = compiled.status_views_by_target[ + (:status_type_runtime_writer, ObjectId(:scene)) + ].status + @test private_status.private_value isa Float32 + + for leaf_id in (:leaf_a, :leaf_b) + @test model_status(model, leaf_id).distributed_value isa Float32 + end + distributed_binding = only(compiled.distributed_outputs.bindings) + @test distributed_binding.columns.distributed_value isa + PlantSimEngine.RefVector{Float32} + + simulation = run!(model; steps=2, outputs=:all) + @test final_state(simulation, :scene).canonical_value === Float32(2) + @test !(:private_value in propertynames(final_state(simulation, :scene))) + @test final_state(simulation, :leaf_a).distributed_value === Float32(3) + @test final_state(simulation, :leaf_b).distributed_value === Float32(4) + + retained = outputs(simulation) + _assert_status_type_runtime_stream( + retained[ + ( + :status_type_runtime_writer, + ObjectId(:scene), + :canonical_value, + ) + ], + (1, 2), + ) + _assert_status_type_runtime_stream( + retained[ + ( + :status_type_runtime_writer, + ObjectId(:scene), + :private_value, + ) + ], + (1, 2), + ) + _assert_status_type_runtime_stream( + retained[ + ( + :status_type_runtime_writer, + ObjectId(:leaf_a), + :distributed_value, + ) + ], + (2, 3), + ) + _assert_status_type_runtime_stream( + retained[ + ( + :status_type_runtime_writer, + ObjectId(:leaf_b), + :distributed_value, + ) + ], + (3, 4), + ) + + rows = collect_outputs(simulation; sink=nothing) + runtime_rows = filter( + row -> row.application_id == :status_type_runtime_writer, + rows, + ) + @test length(runtime_rows) == 8 + @test all(row -> row.value isa Float32, runtime_rows) +end + +@testset "effective One, OptionalOne, and Many carrier types" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object( + :leaf_a; + scale=:Leaf, + name=:leaf_a, + parent=:scene, + status=Status(signal=1.0, token=2.0), + ), + Object( + :leaf_b; + scale=:Leaf, + name=:leaf_b, + parent=:scene, + status=Status(signal=3.0, token=4), + ); + applications=( + ModelSpec( + StatusTypeRuntimeInputConsumerModel(); + name=:status_type_runtime_consumer, + on=One(scale=:Scene), + inputs=( + one_value=One( + name=:leaf_a, + within=SceneScope(), + var=:signal, + from_status=true, + ), + optional_value=OptionalOne( + name=:leaf_b, + within=SceneScope(), + var=:signal, + from_status=true, + ), + many_values=Many( + scale=:Leaf, + within=SceneScope(), + var=:signal, + from_status=true, + ), + mixed_values=Many( + scale=:Leaf, + within=SceneScope(), + var=:token, + from_status=true, + ), + ), + ), + ), + environment=(duration=Hour(1),), + type_promotion=Dict(Float64 => Float32), + ) + + compiled = Advanced.refresh_bindings!(model) + bindings = Dict(binding.input => binding for binding in compiled.input_bindings) + @test input_carrier(bindings[:one_value]) isa Base.RefValue{Float32} + @test input_carrier(bindings[:optional_value]) isa Base.RefValue{Float32} + @test input_carrier(bindings[:many_values]) isa + PlantSimEngine.RefVector{Float32} + @test input_carrier(bindings[:mixed_values]) isa + PlantSimEngine.ObjectRefVector + @test typeof.(collect(input_value(bindings[:many_values]))) == + [Float32, Float32] + @test typeof.(collect(input_value(bindings[:mixed_values]))) == + [Float32, Int] + + rows = Dict(row.input => row for row in explain_bindings(compiled)) + @test rows[:one_value].multiplicity == :one + @test rows[:optional_value].multiplicity == :optional_one + @test rows[:many_values].multiplicity == :many + @test rows[:mixed_values].multiplicity == :many + @test rows[:many_values].carrier_kind == :ref_vector + @test rows[:mixed_values].carrier_kind == :object_ref_vector + + simulation = run!(model; outputs=:all) + consumer_status = final_state(simulation, :scene) + @test consumer_status.one_value isa Float32 + @test consumer_status.optional_value isa Float32 + @test consumer_status.many_values isa PlantSimEngine.RefVector{Float32} + @test consumer_status.mixed_values isa PlantSimEngine.ObjectRefVector + @test consumer_status.total === Float32(14) + total_stream = outputs(simulation)[ + (:status_type_runtime_consumer, ObjectId(:scene), :total) + ] + _assert_status_type_runtime_stream(total_stream, (14,)) +end + +@testset "hard-call trial stays unpublished and accepted value is typed" begin + model = CompositeModel( + Object(:scene; scale=:Scene), + Object( + :call_leaf; + scale=:Leaf, + name=:call_leaf, + parent=:scene, + ); + applications=( + ModelSpec( + StatusTypeRuntimeControllerModel(); + name=:status_type_runtime_controller, + on=One(scale=:Scene), + calls=( + callee=One( + name=:call_leaf, + application=:status_type_runtime_callee, + ), + ), + ), + ModelSpec( + StatusTypeRuntimeCalleeModel(); + name=:status_type_runtime_callee, + on=One(scale=:Leaf), + ), + ), + environment=(duration=Hour(1),), + type_promotion=Dict(Float64 => Float32), + ) + + simulation = run!(model; outputs=:all) + controller = final_state(simulation, :scene) + callee = final_state(simulation, :call_leaf) + @test controller.trial_value === Float32(1) + @test controller.accepted_value === Float32(2) + @test callee.value === Float32(2) + + callee_stream = outputs(simulation)[ + (:status_type_runtime_callee, ObjectId(:call_leaf), :value) + ] + @test length(callee_stream) == 1 + _assert_status_type_runtime_stream(callee_stream, (2,)) + _assert_status_type_runtime_stream( + outputs(simulation)[ + ( + :status_type_runtime_controller, + ObjectId(:scene), + :trial_value, + ) + ], + (1,), + ) + _assert_status_type_runtime_stream( + outputs(simulation)[ + ( + :status_type_runtime_controller, + ObjectId(:scene), + :accepted_value, + ) + ], + (2,), + ) + + rows = collect_outputs(simulation; sink=nothing) + callee_rows = filter( + row -> row.application_id == :status_type_runtime_callee, + rows, + ) + @test length(callee_rows) == 1 + @test only(callee_rows).value === Float32(2) +end diff --git a/test/test-model-status-type-temporal.jl b/test/test-model-status-type-temporal.jl new file mode 100644 index 000000000..93a93ecc1 --- /dev/null +++ b/test/test-model-status-type-temporal.jl @@ -0,0 +1,165 @@ +using Dates +using PlantSimEngine +using Test + +PlantSimEngine.@process "status_type_temporal_source" verbose = false +PlantSimEngine.@process "status_type_temporal_consumer" verbose = false + +struct StatusTypeTemporalSource <: AbstractStatus_Type_Temporal_SourceModel end +struct StatusTypeTemporalConsumer <: AbstractStatus_Type_Temporal_ConsumerModel end + +PlantSimEngine.inputs_(::StatusTypeTemporalSource) = NamedTuple() +PlantSimEngine.outputs_(::StatusTypeTemporalSource) = (signal=0.0,) + +function PlantSimEngine.run!( + ::StatusTypeTemporalSource, + status, + environment, + constants, + context, +) + status.signal += one(status.signal) + return nothing +end + +PlantSimEngine.inputs_(::StatusTypeTemporalConsumer) = (sample=Required(Real),) +PlantSimEngine.outputs_(::StatusTypeTemporalConsumer) = (observed=0.0,) + +function PlantSimEngine.run!( + ::StatusTypeTemporalConsumer, + status, + environment, + constants, + context, +) + status.observed = status.sample + return nothing +end + +function status_type_temporal_scene(policy; window=nothing, source_every=Hour(1)) + selector = One( + scale=:Leaf, + application=:source, + var=:signal, + policy=policy, + window=window, + ) + input = policy isa PreviousTimeStep ? + (PreviousTimeStep(:sample) => selector,) : + (:sample => selector,) + return CompositeModel( + Object(:leaf; scale=:Leaf, status=Status(sample=0.0)); + applications=( + ModelSpec( + StatusTypeTemporalSource(); + name=:source, + on=One(scale=:Leaf), + every=source_every, + ), + ModelSpec( + StatusTypeTemporalConsumer(); + name=:consumer, + on=One(scale=:Leaf), + inputs=input, + every=Hour(1), + ), + ), + environment=(duration=Hour(1),), + type_promotion=Dict(Float64 => Float32), + ) +end + +@testset "temporal input policies preserve converted storage types" begin + policies = ( + (:hold_last, HoldLast(), nothing, Hour(2)), + (:interpolate, Interpolate(), nothing, Hour(2)), + (:integrate, Integrate(), Hour(2), Hour(1)), + (:aggregate, Aggregate(), Hour(2), Hour(1)), + (:previous, PreviousTimeStep(:sample), nothing, Hour(1)), + ) + for (name, policy, window, source_every) in policies + scene = status_type_temporal_scene( + policy; + window=window, + source_every=source_every, + ) + simulation = run!(scene; steps=4, outputs=:none) + status = only(model_objects(scene)).status + view = simulation.compiled.status_views_by_target[ + (:consumer, ObjectId(:leaf)) + ] + + @testset "$(name)" begin + @test status.signal isa Float32 + @test status.observed isa Float32 + @test view.status.sample isa Float32 + if policy isa Union{Interpolate,Integrate,Aggregate,PreviousTimeStep} + temporal = only(view.temporal_inputs) + @test temporal.reference isa Base.RefValue{Float32} + stream = outputs(simulation)[ + (:source, ObjectId(:leaf), :signal) + ] + @test stream isa PlantSimEngine.TemporalDependencyBuffer{Float32} + @test all(sample -> last(sample) isa Float32, stream) + end + end + end +end + +@testset "resampled OutputRequest rows retain the effective stream type" begin + requests = OutputRequest[ + OutputRequest( + :Leaf, + :signal; + name=:held, + application=:source, + policy=HoldLast(), + clock=Hour(1), + ), + OutputRequest( + :Leaf, + :signal; + name=:interpolated, + application=:source, + policy=Interpolate(), + clock=Hour(1), + ), + OutputRequest( + :Leaf, + :signal; + name=:integrated, + application=:source, + policy=Integrate(), + clock=Hour(2), + ), + OutputRequest( + :Leaf, + :signal; + name=:aggregated, + application=:source, + policy=Aggregate(), + clock=Hour(2), + ), + ] + scene = CompositeModel( + Object(:leaf; scale=:Leaf); + applications=( + ModelSpec( + StatusTypeTemporalSource(); + name=:source, + on=One(scale=:Leaf), + every=Hour(2), + ), + ), + environment=(duration=Hour(1),), + type_promotion=Dict(Float64 => Float32), + ) + simulation = run!(scene; steps=6, outputs=requests) + collected = collect_outputs(simulation; sink=nothing) + + @test Set(keys(collected)) == Set((:held, :interpolated, :integrated, :aggregated)) + for rows in values(collected) + @test !isempty(rows) + @test all(row -> row.value isa Float32, rows) + end +end From d2a4de619ad731415a94060d768d26a91ddcd182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Wed, 26 Aug 2026 20:24:44 +0200 Subject: [PATCH 28/45] Validate particle status propagation --- test/Project.toml | 1 + test/runtests.jl | 4 ++ test/test-model-status-type-particles.jl | 79 ++++++++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 test/test-model-status-type-particles.jl diff --git a/test/Project.toml b/test/Project.toml index 52fe627ff..7fc926474 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -7,6 +7,7 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3" JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" MultiScaleTreeGraph = "dd4a991b-8a45-4075-bede-262ee62d5583" +MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" PlantMeteo = "4630fe09-e0fb-4da5-a846-781cb73437b6" PlantSimEngine = "9a576370-710b-4269-adf9-4f603a9c6423" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" diff --git a/test/runtests.jl b/test/runtests.jl index a56926003..9c8bfc76e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -74,6 +74,10 @@ else include("test-model-status-type-temporal.jl") end + @testset "Composite model status type conversion with particles" begin + include("test-model-status-type-particles.jl") + end + @testset "Composite model output boundaries" begin include("test-model-output-boundaries.jl") end diff --git a/test/test-model-status-type-particles.jl b/test/test-model-status-type-particles.jl new file mode 100644 index 000000000..b9893a48c --- /dev/null +++ b/test/test-model-status-type-particles.jl @@ -0,0 +1,79 @@ +using MonteCarloMeasurements +using PlantSimEngine +using PlantSimEngine.GraphEditor +using Test + +PlantSimEngine.@process "status_type_particle_propagation" verbose = false + +struct StatusTypeParticlePropagationModel <: + AbstractStatus_Type_Particle_PropagationModel end + +PlantSimEngine.inputs_(::StatusTypeParticlePropagationModel) = ( + uncertain=Required(Real), + ordinary=Default(1.0), +) + +PlantSimEngine.outputs_(::StatusTypeParticlePropagationModel) = ( + propagated=0.0, + ordinary_result=0.0, +) + +function PlantSimEngine.run!( + ::StatusTypeParticlePropagationModel, + status, + environment, + constants, + context, +) + status.propagated = status.uncertain^2 + status.ordinary_result = status.ordinary + one(status.ordinary) + return nothing +end + +function status_type_particle_transform(variable, value) + variable in (:uncertain, :propagated) || return value + value isa Float64 || return value + spread = variable === :uncertain ? 1.0 : 0.0 + return Particles([value - spread, value + spread]) +end + +@testset "real MonteCarloMeasurements particles propagate through status and streams" begin + model = CompositeModel( + StatusTypeParticlePropagationModel(); + status=(uncertain=10.0,), + type_promotion=Dict(Float64 => Float32), + status_transform=status_type_particle_transform, + ) + status = only(model_objects(model)).status + + @test status.uncertain isa Particles{Float64,2} + @test status.uncertain.particles == [9.0, 11.0] + + simulation = run!(model; outputs=:all) + status = only(model_objects(model)).status + @test status.propagated isa Particles{Float64,2} + @test status.propagated.particles == [81.0, 121.0] + @test status.ordinary === Float32(1) + @test status.ordinary_result === Float32(2) + + stream = outputs(simulation)[ + ( + :status_type_particle_propagation, + ObjectId(:scene), + :propagated, + ) + ] + @test fieldtype(eltype(stream), 2) === Particles{Float64,2} + @test only(last.(stream)).particles == [81.0, 121.0] + + rows = collect_outputs(simulation; sink=nothing) + propagated = only( + row for row in rows + if row.variable === :propagated + ) + @test propagated.value isa Particles{Float64,2} + @test propagated.value.particles == [81.0, 121.0] + + graph_json = model_graph_view_json(model) + @test occursin("Particles", graph_json) +end From 5d5d56b4e556904a9c59da97e5022082df151493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Wed, 26 Aug 2026 20:25:09 +0200 Subject: [PATCH 29/45] Cover status conversion in instances and hot paths --- test/runtests.jl | 8 + test/test-model-status-type-performance.jl | 151 +++++++++++ test/test-model-status-type-templates.jl | 299 +++++++++++++++++++++ 3 files changed, 458 insertions(+) create mode 100644 test/test-model-status-type-performance.jl create mode 100644 test/test-model-status-type-templates.jl diff --git a/test/runtests.jl b/test/runtests.jl index 9c8bfc76e..830cd879b 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -78,6 +78,14 @@ else include("test-model-status-type-particles.jl") end + @testset "Composite model status type conversion templates" begin + include("test-model-status-type-templates.jl") + end + + @testset "Composite model status type conversion performance" begin + include("test-model-status-type-performance.jl") + end + @testset "Composite model output boundaries" begin include("test-model-output-boundaries.jl") end diff --git a/test/test-model-status-type-performance.jl b/test/test-model-status-type-performance.jl new file mode 100644 index 000000000..e78d320d0 --- /dev/null +++ b/test/test-model-status-type-performance.jl @@ -0,0 +1,151 @@ +using Dates +using PlantSimEngine +using Test + +PlantSimEngine.@process "status_type_performance_kernel" verbose = false + +struct StatusTypePerformanceKernelModel <: + AbstractStatus_Type_Performance_KernelModel end + +PlantSimEngine.inputs_(::StatusTypePerformanceKernelModel) = ( + gain=Default(1.0), +) +PlantSimEngine.outputs_(::StatusTypePerformanceKernelModel) = (state=0.0,) + +function PlantSimEngine.run!( + ::StatusTypePerformanceKernelModel, + status, + environment, + constants, + context, +) + status.state += status.gain + return nothing +end + +struct StatusTypePerformanceTransform + calls::Base.RefValue{Int} +end + +function (transform::StatusTypePerformanceTransform)(variable, value) + transform.calls[] += 1 + return value +end + +function _status_type_performance_model( + object_count; + type_promotion=nothing, + status_transform=nothing, +) + objects = [ + Object( + Symbol(:leaf_, index); + scale=:Leaf, + status=Status(gain=1.0), + ) + for index in 1:object_count + ] + return CompositeModel( + objects...; + applications=( + ModelSpec( + StatusTypePerformanceKernelModel(); + name=:status_type_performance_kernel, + on=Many(scale=:Leaf), + ), + ), + environment=(duration=Hour(1),), + type_promotion=type_promotion, + status_transform=status_transform, + ) +end + +# Keep the complete measured path behind a specialization boundary. Both +# simulation types are warmed before `@allocated` is used, so compilation and +# test machinery are excluded from the measurement. +@noinline function _status_type_performance_advance!( + simulation::S, + steps::Int, +) where {S} + for _ in 1:steps + step!(simulation) + end + return nothing +end + +@noinline function _status_type_performance_allocations( + simulation::S, + steps::Int, +) where {S} + return @allocated _status_type_performance_advance!(simulation, steps) +end + +@testset "status conversion policy stays outside the hot step path" begin + object_count = 64 + measured_steps = 16 + repetitions = 5 + transform_calls = Ref(0) + transform = StatusTypePerformanceTransform(transform_calls) + + baseline_model = _status_type_performance_model(object_count) + converted_model = _status_type_performance_model( + object_count; + type_promotion=Dict(Float64 => Float32), + status_transform=transform, + ) + + # Compile first so policy work cannot be charged to the runtime sample. + Advanced.refresh_bindings!(baseline_model) + Advanced.refresh_bindings!(converted_model) + @test transform_calls[] == 2 * object_count + + baseline = run!(baseline_model; outputs=:none) + converted = run!(converted_model; outputs=:none) + @test isempty(outputs(baseline)) + @test isempty(outputs(converted)) + @test final_state(baseline, :leaf_1).state isa Float64 + @test final_state(converted, :leaf_1).state isa Float32 + + # Warm both concrete Simulation specializations and the allocation helper. + _status_type_performance_advance!(baseline, 3) + _status_type_performance_advance!(converted, 3) + _status_type_performance_allocations(baseline, 2) + _status_type_performance_allocations(converted, 2) + + calls_after_warmup = transform_calls[] + @test calls_after_warmup == 2 * object_count + + # Exercise the public one-step API directly before measuring it in a loop. + for _ in 1:8 + step!(baseline) + step!(converted) + end + @test transform_calls[] == calls_after_warmup + @test final_state(baseline, :leaf_1).state == + final_state(converted, :leaf_1).state + + baseline_allocations = ntuple( + _ -> _status_type_performance_allocations( + baseline, + measured_steps, + ), + repetitions, + ) + converted_allocations = ntuple( + _ -> _status_type_performance_allocations( + converted, + measured_steps, + ), + repetitions, + ) + + # A relative equality is deliberate: Julia may change the scheduler's + # absolute byte count, but an initialization-only policy must add no + # allocation to the otherwise identical warmed runtime path. + @test all(==(first(baseline_allocations)), baseline_allocations) + @test all(==(first(converted_allocations)), converted_allocations) + @test converted_allocations == baseline_allocations + @test transform_calls[] == calls_after_warmup + @test final_state(baseline, :leaf_1).state == + final_state(converted, :leaf_1).state +end diff --git a/test/test-model-status-type-templates.jl b/test/test-model-status-type-templates.jl new file mode 100644 index 000000000..2589e6b39 --- /dev/null +++ b/test/test-model-status-type-templates.jl @@ -0,0 +1,299 @@ +using Dates +using PlantSimEngine +using PlantSimEngine.Diagnostics +using Test + +PlantSimEngine.@process "status_type_template_source" verbose = false +PlantSimEngine.@process "status_type_template_sum" verbose = false + +struct StatusTypeTemplateSourceModel{T} <: AbstractStatus_Type_Template_SourceModel + increment::T +end + +struct StatusTypeTemplateAlternativeSourceModel{T} <: + AbstractStatus_Type_Template_SourceModel + increment::T +end + +PlantSimEngine.outputs_(model::StatusTypeTemplateSourceModel) = + (signal=zero(model.increment),) +PlantSimEngine.outputs_(model::StatusTypeTemplateAlternativeSourceModel) = + (signal=zero(model.increment),) + +function PlantSimEngine.run!( + model::Union{ + StatusTypeTemplateSourceModel, + StatusTypeTemplateAlternativeSourceModel, + }, + status, + environment, + constants, + context, +) + status.signal += model.increment + return nothing +end + +struct StatusTypeTemplateSumModel <: AbstractStatus_Type_Template_SumModel end + +PlantSimEngine.inputs_(::StatusTypeTemplateSumModel) = + (signals=Default([0.0]),) +PlantSimEngine.outputs_(::StatusTypeTemplateSumModel) = (total=0.0,) + +function PlantSimEngine.run!( + ::StatusTypeTemplateSumModel, + status, + environment, + constants, + context, +) + status.total = sum(status.signals) + return nothing +end + +struct StatusTypeTemplateTransformCounter + calls::Dict{Symbol,Int} +end + +function (counter::StatusTypeTemplateTransformCounter)(variable, value) + counter.calls[variable] = get(counter.calls, variable, 0) + 1 + return value +end + +function status_type_template_binding(compiled, application_id) + return only( + binding for binding in compiled.input_bindings + if binding.application_id == application_id && + binding.input == :signals + ) +end + +@testset "type promotion crosses templates, instances, and overrides" begin + shared_source = StatusTypeTemplateSourceModel(1.0) + instance_source_override = StatusTypeTemplateSourceModel(2.0) + object_source_override = StatusTypeTemplateAlternativeSourceModel(5.0) + template = CompositeModelTemplate( + ( + ModelSpec( + shared_source; + name=:source, + on=Many(scale=:Leaf), + ), + ModelSpec( + StatusTypeTemplateSumModel(); + name=:sum, + on=One(scale=:Plant), + inputs=( + signals=Many( + scale=:Leaf, + within=Subtree(), + application=:source, + var=:signal, + ), + ), + ), + ); + kind=:plant, + ) + + plant_a = ObjectInstance( + :plant_a, + template; + root=Object( + :plant_a_root; + scale=:Plant, + parent=:scene, + status=Status(baseline=10.0), + ), + objects=( + Object( + :plant_a_leaf_1; + scale=:Leaf, + parent=:plant_a_root, + status=Status(initial_value=0.25), + ), + Object( + :plant_a_leaf_2; + scale=:Leaf, + parent=:plant_a_root, + status=Status(initial_value=0.5), + ), + ), + overrides=(source=instance_source_override,), + ) + plant_b = ObjectInstance( + :plant_b, + template; + root=Object( + :plant_b_root; + scale=:Plant, + parent=:scene, + status=Status(baseline=20.0), + ), + objects=( + Object( + :plant_b_leaf_1; + scale=:Leaf, + parent=:plant_b_root, + status=Status(initial_value=0.75), + ), + Object( + :plant_b_leaf_2; + scale=:Leaf, + parent=:plant_b_root, + status=Status(initial_value=1.0), + ), + ), + object_overrides=( + Override( + object=:plant_b_leaf_2, + application=:source, + model=object_source_override, + ), + ), + ) + + transform_calls = Dict{Symbol,Int}() + model = CompositeModel( + Object(:scene; scale=:Scene, status=Status(scene_value=3.0)), + plant_a, + plant_b; + environment=(duration=Hour(1),), + type_promotion=Dict(Float64 => Float32), + status_transform=StatusTypeTemplateTransformCounter(transform_calls), + ) + compiled = Advanced.refresh_bindings!(model) + + @test transform_calls == Dict( + :scene_value => 1, + :baseline => 2, + :initial_value => 4, + :signal => 4, + :signals => 2, + :total => 2, + ) + materialization_calls = copy(transform_calls) + compiled = Advanced.refresh_bindings!(model; force=true) + @test transform_calls == materialization_calls + + @test Set(row.name for row in explain_instances(model)) == + Set((:plant_a, :plant_b)) + @test PlantSimEngine.model_( + compiled.applications_by_id[:plant_a__source].spec, + ) === instance_source_override + @test PlantSimEngine._application_model( + compiled.applications_by_id[:plant_b__source], + ObjectId(:plant_b_leaf_1), + ) === shared_source + @test PlantSimEngine._application_model( + compiled.applications_by_id[:plant_b__source], + ObjectId(:plant_b_leaf_2), + ) === object_source_override + + for object in model_objects(model) + status = object.status + @test status isa Status + for variable in propertynames(status) + value = getproperty(status, variable) + if value isa AbstractFloat + @test value isa Float32 + elseif value isa PlantSimEngine.RefVector + @test eltype(value) === Float32 + end + end + end + + binding_a = status_type_template_binding(compiled, :plant_a__sum) + binding_b = status_type_template_binding(compiled, :plant_b__sum) + carrier_a = input_carrier(binding_a) + carrier_b = input_carrier(binding_b) + @test carrier_a isa PlantSimEngine.RefVector{Float32} + @test carrier_b isa PlantSimEngine.RefVector{Float32} + @test carrier_a !== carrier_b + @test model_status(model, :plant_a_root).signals === carrier_a + @test model_status(model, :plant_b_root).signals === carrier_b + + for (binding, carrier) in ((binding_a, carrier_a), (binding_b, carrier_b)) + @test length(binding.source_ids) == length(parent(carrier)) == 2 + @test all( + reference === PlantSimEngine.refvalue( + model_status(model, source_id), + :signal, + ) + for (source_id, reference) in + zip(binding.source_ids, parent(carrier)) + ) + end + + simulation = run!(model; steps=2, outputs=:all) + @test transform_calls == materialization_calls + execution_rows = explain_execution_plan(simulation) + @test all( + row.inner_loop_dispatch == :concrete_homogeneous_batch && + isconcretetype(row.target_type) && + isconcretetype(row.status_type) + for row in execution_rows + ) + + plant_a_source_rows = filter( + row -> row.application_id == :plant_a__source, + execution_rows, + ) + @test length(plant_a_source_rows) == 1 + @test only(plant_a_source_rows).batch_size == 2 + @test only(plant_a_source_rows).object_ids == + [:plant_a_leaf_1, :plant_a_leaf_2] + @test only(plant_a_source_rows).model_type === + StatusTypeTemplateSourceModel{Float64} + + plant_b_source_rows = filter( + row -> row.application_id == :plant_b__source, + execution_rows, + ) + @test length(plant_b_source_rows) == 2 + @test all(row.batch_size == 1 for row in plant_b_source_rows) + @test Set(row.model_type for row in plant_b_source_rows) == Set(( + StatusTypeTemplateSourceModel{Float64}, + StatusTypeTemplateAlternativeSourceModel{Float64}, + )) + @test length(unique(row.status_type for row in plant_b_source_rows)) == 1 + + expected_leaf_signals = Dict( + (:plant_a__source, :plant_a_leaf_1) => Float32(4), + (:plant_a__source, :plant_a_leaf_2) => Float32(4), + (:plant_b__source, :plant_b_leaf_1) => Float32(2), + (:plant_b__source, :plant_b_leaf_2) => Float32(10), + ) + for ((application_id, object_id), expected) in expected_leaf_signals + status = model_status(model, object_id) + stream = outputs(simulation)[ + (application_id, ObjectId(object_id), :signal) + ] + @test status.signal === expected + @test fieldtype(eltype(stream), 2) === Float32 + @test length(stream) == 2 + @test last(stream)[2] === expected + end + + expected_plant_totals = Dict( + (:plant_a__sum, :plant_a_root) => Float32(8), + (:plant_b__sum, :plant_b_root) => Float32(12), + ) + for ((application_id, object_id), expected) in expected_plant_totals + status = model_status(model, object_id) + stream = outputs(simulation)[ + (application_id, ObjectId(object_id), :total) + ] + @test status.total === expected + @test status.signals isa PlantSimEngine.RefVector{Float32} + @test fieldtype(eltype(stream), 2) === Float32 + @test length(stream) == 2 + @test last(stream)[2] === expected + end + + @test all( + fieldtype(eltype(stream), 2) === Float32 + for stream in values(outputs(simulation)) + ) + @test transform_calls == materialization_calls +end From 521cee9e09cced78fd5db7e5bbb9a87d08167424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Wed, 26 Aug 2026 20:35:58 +0200 Subject: [PATCH 30/45] Preserve temporal reducer result types --- src/composite_model/runtime_outputs.jl | 41 +++++++++++------------- test/test-model-temporal-reducers.jl | 44 ++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 22 deletions(-) diff --git a/src/composite_model/runtime_outputs.jl b/src/composite_model/runtime_outputs.jl index 1edbcdd03..7395b44e7 100644 --- a/src/composite_model/runtime_outputs.jl +++ b/src/composite_model/runtime_outputs.jl @@ -1381,12 +1381,21 @@ end end function _model_linear_value(v_left, v_right, α) + interpolation_factor = if typeof(v_left) === typeof(v_right) && + v_left isa AbstractFloat + convert(typeof(v_left), α) + elseif typeof(v_left) === typeof(v_right) && + v_left isa Array{<:AbstractFloat} + convert(eltype(v_left), α) + else + α + end applicable(-, v_right, v_left) || return nothing delta = v_right - v_left - increment = if applicable(*, α, delta) - α * delta - elseif applicable(*, delta, α) - delta * α + increment = if applicable(*, interpolation_factor, delta) + interpolation_factor * delta + elseif applicable(*, delta, interpolation_factor) + delta * interpolation_factor else return nothing end @@ -6489,12 +6498,12 @@ function _model_request_clock(request, timeline) end function _model_requested_value(samples, time, t_start, policy, timeline) - value = if policy isa HoldLast + if policy isa HoldLast value = _model_latest_sample(samples, time) - isnothing(value) ? missing : value + return isnothing(value) ? missing : value elseif policy isa Interpolate value = _model_interpolated_sample(samples, time, policy) - isnothing(value) ? missing : value + return isnothing(value) ? missing : value elseif policy isa Union{Integrate,Aggregate} values, durations = _model_window_segments( samples, @@ -6502,22 +6511,10 @@ function _model_requested_value(samples, time, t_start, policy, timeline) time, timeline.base_step_seconds, ) - isempty(values) ? missing : _model_window_reduce(values, durations, policy) - else - error("Unsupported model output request policy `$(typeof(policy))`.") - end - value === missing && return missing - effective_type = fieldtype(eltype(samples), 2) - value isa effective_type && return value - return try - convert(effective_type, value) - catch exception - error( - "OutputRequest policy `$(typeof(policy))` produced value type " * - "`$(typeof(value))`, but the retained stream uses effective type " * - "`$(effective_type)`: $(sprint(showerror, exception))", - ) + isempty(values) && return missing + return _model_window_reduce(values, durations, policy) end + error("Unsupported model output request policy `$(typeof(policy))`.") end function _model_requested_output_rows( diff --git a/test/test-model-temporal-reducers.jl b/test/test-model-temporal-reducers.jl index 3e6b7c455..580bbc738 100644 --- a/test/test-model-temporal-reducers.jl +++ b/test/test-model-temporal-reducers.jl @@ -5,10 +5,13 @@ using Test PlantSimEngine.@process "temporal_reducer_source" verbose = false PlantSimEngine.@process "temporal_reducer_one_arg" verbose = false PlantSimEngine.@process "temporal_reducer_two_arg" verbose = false +PlantSimEngine.@process "temporal_reducer_integer_output" verbose = false struct TemporalReducerSourceModel <: AbstractTemporal_Reducer_SourceModel end struct TemporalReducerOneArgModel <: AbstractTemporal_Reducer_One_ArgModel end struct TemporalReducerTwoArgModel <: AbstractTemporal_Reducer_Two_ArgModel end +struct TemporalReducerIntegerOutputModel <: + AbstractTemporal_Reducer_Integer_OutputModel end PlantSimEngine.inputs_(::TemporalReducerSourceModel) = NamedTuple() PlantSimEngine.outputs_(::TemporalReducerSourceModel) = (signal=0.0,) function PlantSimEngine.run!(::TemporalReducerSourceModel, status, environment, constants, context) @@ -21,6 +24,18 @@ PlantSimEngine.run!(::TemporalReducerOneArgModel, status, environment, constants (status.one_arg = status.reduced) PlantSimEngine.run!(::TemporalReducerTwoArgModel, status, environment, constants, context) = (status.two_arg = status.reduced) +PlantSimEngine.inputs_(::TemporalReducerIntegerOutputModel) = NamedTuple() +PlantSimEngine.outputs_(::TemporalReducerIntegerOutputModel) = (count=0,) +function PlantSimEngine.run!( + ::TemporalReducerIntegerOutputModel, + status, + environment, + constants, + context, +) + status.count += 1 + return nothing +end @testset "duration-aware and callable reducers" begin @test RadiationEnergy()([100.0, 200.0], [1800.0, 3600.0]) ≈ 0.9 @@ -70,6 +85,35 @@ PlantSimEngine.run!(::TemporalReducerTwoArgModel, status, environment, constants @test_throws "must accept values or values and durations" Advanced.refresh_bindings!(invalid_scene) end +@testset "OutputRequest reducers keep their public return type" begin + model = CompositeModel( + Object(:leaf; scale=:Leaf); + applications=( + ModelSpec( + TemporalReducerIntegerOutputModel(); + name=:integer_source, + on=One(scale=:Leaf), + every=Hour(1), + ), + ), + environment=(duration=Hour(1),), + ) + request = OutputRequest( + :Leaf, + :count; + name=:mean_count, + application=:integer_source, + policy=Aggregate(), + clock=Hour(2), + ) + + simulation = run!(model; steps=5, outputs=request) + rows = collect_outputs(simulation; sink=nothing)[:mean_count] + + @test [row.value for row in rows] == [0.5, 2.5, 4.5] + @test all(row -> row.value isa Float64, rows) +end + @testset "coarse producer samples are weighted by held overlap" begin observed_segments = Ref{Any}(nothing) integral = function (values, durations) From 8338bd835d8e87f7f572a9d32000d29d182530ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Wed, 26 Aug 2026 20:36:48 +0200 Subject: [PATCH 31/45] Preserve status policy in graph editor rebuilds --- ext/PlantSimEngineGraphEditorExt.jl | 221 +++++++++++++++++++- src/visualization/model_graph_editor_api.jl | 17 +- test/test-model-graph-editor-extension.jl | 138 ++++++++++++ test/test-model-graph-view.jl | 46 +++- 4 files changed, 417 insertions(+), 5 deletions(-) diff --git a/ext/PlantSimEngineGraphEditorExt.jl b/ext/PlantSimEngineGraphEditorExt.jl index d0f6109c8..6cc8b9db9 100644 --- a/ext/PlantSimEngineGraphEditorExt.jl +++ b/ext/PlantSimEngineGraphEditorExt.jl @@ -1040,10 +1040,218 @@ function _editor_html(session) return replace(html, "" => "$(script)") end +function _status_conversion_module_code(module_::Module) + label = string(module_) + all(Base.isidentifier, split(label, '.')) || return nothing + return label +end + +function _status_conversion_type_code(type_) + type_ isa DataType || return nothing + name = String(nameof(type_)) + Base.isidentifier(name) || return nothing + occursin('#', name) && return nothing + module_ = parentmodule(type_) + module_code = _status_conversion_module_code(module_) + isnothing(module_code) && return nothing + isdefined(module_, Symbol(name)) || return nothing + getfield(module_, Symbol(name)) === type_.name.wrapper || return nothing + base = module_ in (Base, Core) ? name : "$(module_code).$(name)" + isempty(type_.parameters) && return base + parameter_codes = String[] + for parameter in type_.parameters + code = parameter isa Type ? + _status_conversion_type_code(parameter) : + _status_conversion_literal_code(parameter) + isnothing(code) && return nothing + push!(parameter_codes, code) + end + return "$(base){$(join(parameter_codes, ", "))}" +end + +function _status_conversion_tuple_code(codes::Vector{String}) + isempty(codes) && return "()" + length(codes) == 1 && return "($(only(codes)),)" + return "($(join(codes, ", ")))" +end + +function _status_conversion_array_code(value::Array) + element_type = _status_conversion_type_code(eltype(value)) + isnothing(element_type) && return nothing + elements = String[] + for item in value + code = _status_conversion_literal_code(item) + isnothing(code) && return nothing + push!(elements, code) + end + vector = "$(element_type)[$(join(elements, ", "))]" + ndims(value) == 1 && return vector + ndims(value) == 0 && return "reshape($(vector), ())" + return "reshape($(vector), $(join(size(value), ", ")))" +end + +function _status_conversion_literal_code(value) + value === nothing && return "nothing" + value === missing && return "missing" + value isa Type && return _status_conversion_type_code(value) + if value isa PlantSimEngine.ObjectId + identifier = _status_conversion_literal_code(value.value) + isnothing(identifier) && return nothing + return "PlantSimEngine.ObjectId($(identifier))" + end + value isa Union{Bool,Integer,Float16,Float32,Float64,Char,AbstractString,Symbol} && + return repr(value) + if value isa Pair + first_code = _status_conversion_literal_code(first(value)) + last_code = _status_conversion_literal_code(last(value)) + (isnothing(first_code) || isnothing(last_code)) && return nothing + return "$(first_code) => $(last_code)" + end + if value isa NamedTuple + names_code = _status_conversion_literal_code(Tuple(keys(value))) + values_code = _status_conversion_literal_code(Tuple(values(value))) + (isnothing(names_code) || isnothing(values_code)) && return nothing + return "NamedTuple{$(names_code)}($(values_code))" + end + if value isa Tuple + codes = String[] + for item in value + code = _status_conversion_literal_code(item) + isnothing(code) && return nothing + push!(codes, code) + end + return _status_conversion_tuple_code(codes) + end + value isa Array && return _status_conversion_array_code(value) + return nothing +end + +function _status_transform_code(transform) + isnothing(transform) && return "nothing" + try + Meta.parse(repr(transform)) + catch + return nothing + end + + transform_type = typeof(transform) + type_name = String(nameof(transform_type)) + (Base.isidentifier(type_name) && !occursin('#', type_name)) || return nothing + if transform isa Function + name = nameof(transform) + module_ = parentmodule(transform_type) + module_code = _status_conversion_module_code(module_) + isnothing(module_code) && return nothing + isdefined(module_, name) || return nothing + getfield(module_, name) === transform || return nothing + return "$(module_code).$(name)" + end + + type_code = _status_conversion_type_code(transform_type) + isnothing(type_code) && return nothing + fields = Any[getfield(transform, index) for index in 1:fieldcount(transform_type)] + field_codes = String[] + for field in fields + code = _status_conversion_literal_code(field) + isnothing(code) && return nothing + push!(field_codes, code) + end + applicable(transform_type, fields...) || return nothing + reconstructed = try + transform_type(fields...) + catch + return nothing + end + typeof(reconstructed) === transform_type || return nothing + all( + isequal(getfield(reconstructed, index), getfield(transform, index)) + for index in 1:fieldcount(transform_type) + ) || return nothing + return "$(type_code)($(join(field_codes, ", ")))" +end + +function _status_conversion_policy_code(model, diagnostics) + policy = model.status_conversion + isempty(policy.rules) && isnothing(policy.transform) && return nothing + + rule_codes = String[] + mapping_safe = true + for rule in policy.rules + source = _status_conversion_type_code(first(rule)) + target = _status_conversion_type_code(last(rule)) + if isnothing(source) || isnothing(target) + mapping_safe = false + break + end + push!(rule_codes, "$(source) => $(target)") + end + if !mapping_safe + empty!(rule_codes) + push!( + diagnostics, + "The Composite model type_promotion rules are not reconstructed because at least one mapped type has no safe Julia representation. Existing effective Status values are preserved, but future status materialization will not apply the mapping.", + ) + end + sort!(rule_codes) + + transform_code = _status_transform_code(policy.transform) + if isnothing(transform_code) + transform_repr = replace(repr(policy.transform), '\n' => ' ') + push!( + diagnostics, + "The Composite model status_transform `$(transform_repr)` is not reconstructed because its repr is not a safely reconstructible named function or functor. Existing effective Status values are preserved, but future defaults and registered objects use only reconstructible type_promotion rules.", + ) + transform_code = "nothing" + elseif !isnothing(policy.transform) && + Base.moduleroot(parentmodule(typeof(policy.transform))) === Main + push!( + diagnostics, + "The Composite model status_transform type $(typeof(policy.transform)) is defined in Main. Define or include it before evaluating this generated Composite model script.", + ) + end + + rules = _status_conversion_tuple_code(rule_codes) + return "PlantSimEngine.StatusConversionPolicy($(rules), $(transform_code))" +end + +function _status_conversion_record_code(record) + record isa PlantSimEngine.StatusConversionRecord || return nothing + arguments = String[] + for field in fieldnames(typeof(record)) + code = _status_conversion_literal_code(getfield(record, field)) + isnothing(code) && return nothing + push!(arguments, code) + end + return "PlantSimEngine.StatusConversionRecord($(join(arguments, ", ")))" +end + +function _status_conversion_records_code(model, diagnostics) + isempty(model.status_conversion_records) && return nothing + entries = String[] + for (key, record) in model.status_conversion_records + key_code = _status_conversion_literal_code(key) + record_code = _status_conversion_record_code(record) + if isnothing(key_code) || isnothing(record_code) + push!( + diagnostics, + "The Composite model status-conversion records contain a value with no safe Julia representation. Generated code omits those diagnostic records while preserving effective Status values and the reconstructible policy.", + ) + return nothing + end + push!(entries, "$(key_code) => $(record_code)") + end + sort!(entries) + return "Dict{Any,Any}($(join(entries, ", ")))" +end + function _model_to_julia(session::GraphEditorSession) model = session.model io = IOBuffer() diagnostics = String[] + status_conversion = _status_conversion_policy_code(model, diagnostics) + status_conversion_records = isnothing(status_conversion) ? + nothing : + _status_conversion_records_code(model, diagnostics) modules = _model_code_modules(model) for module_name in sort!(collect(modules)) println(io, "using $(module_name)") @@ -1111,7 +1319,18 @@ function _model_to_julia(session::GraphEditorSession) end println(io, ")") environment = _environment_value_code(session, model.environment) - print(io, "model = CompositeModel(objects...; applications=applications, instances=instances, environment=$(environment))") + options = String[ + "applications=applications", + "instances=instances", + "environment=$(environment)", + ] + if !isnothing(status_conversion) + push!(options, "_status_conversion=$(status_conversion)") + push!(options, "_status_values_materialized=true") + isnothing(status_conversion_records) || + push!(options, "_status_conversion_records=$(status_conversion_records)") + end + print(io, "model = CompositeModel(objects...; $(join(options, ", ")))") return String(take!(io)) end diff --git a/src/visualization/model_graph_editor_api.jl b/src/visualization/model_graph_editor_api.jl index ac636e9f4..6a00faae5 100644 --- a/src/visualization/model_graph_editor_api.jl +++ b/src/visualization/model_graph_editor_api.jl @@ -870,12 +870,19 @@ end function _set_model_object_status!(model, object_id, variable, value) object = _model_object(model, object_id) + effective, _, _ = _materialize_status_value( + model, + Symbol(variable), + value; + object_id=object.id, + origin=:graph_edit_status, + ) values = _model_edit_status_values(object.status) index = findfirst(pair -> first(pair) == variable, values) if isnothing(index) - push!(values, variable => value) + push!(values, variable => effective) else - values[index] = variable => value + values[index] = variable => effective end _replace_model_object_status!(model, object, Status((; values...))) delete!( @@ -1040,6 +1047,9 @@ function _model_edit_rebuild_instances( instances=instances, environment=model.environment, source_adapter=model.source_adapter, + _status_conversion=model.status_conversion, + _status_values_materialized=true, + _status_conversion_records=model.status_conversion_records, ) for (index, application) in pairs(rebuilt.applications) application_id = _model_edit_application_id(application) @@ -1146,6 +1156,9 @@ function _apply_model_graph_edit!(model::CompositeModel, edit::SetCompositeModel instances=Tuple(_model_edit_normalize_instance(instance) for instance in model.instances), environment=edit.environment, source_adapter=model.source_adapter, + _status_conversion=model.status_conversion, + _status_values_materialized=true, + _status_conversion_records=model.status_conversion_records, ) end diff --git a/test/test-model-graph-editor-extension.jl b/test/test-model-graph-editor-extension.jl index 9e7d9ea15..02b6d56ea 100644 --- a/test/test-model-graph-editor-extension.jl +++ b/test/test-model-graph-editor-extension.jl @@ -13,6 +13,13 @@ struct EditorConsumerModel <: AbstractEditorConsumerModel end PlantSimEngine.inputs_(::EditorConsumerModel) = (signal=Required(Float64),) PlantSimEngine.outputs_(::EditorConsumerModel) = (result=-Inf,) +struct EditorNamedStatusTransform end + +function (::EditorNamedStatusTransform)(variable, value) + variable === :special && return value + one(value) + return value +end + module EditorInitializerFixtures import PlantSimEngine @@ -712,3 +719,134 @@ end PlantSimEngine.as_model_spec(restored_local_application), ) == :local_source end + +@testset "generated Julia code preserves status conversion" begin + editor_extension = Base.get_extension(PlantSimEngine, :PlantSimEngineGraphEditorExt) + type_promotion = Dict(Float64 => Float32, Float32 => Float16) + original = CompositeModel( + Object( + :typed_leaf; + status=Status(ordinary=1.0, special=2.0), + ); + type_promotion=type_promotion, + status_transform=EditorNamedStatusTransform(), + ) + original_status = only(model_objects(original)).status + @test original_status.ordinary isa Float32 + @test original_status.special === Float32(3) + + session = edit_graph(original; port=0, open_browser=false, autosave=false) + apply_edit!( + session, + SetModelObjectStatus(:typed_leaf, :special, 10.0), + ) + edited_model = current_model(session) + edited_status = only(model_objects(edited_model)).status + @test edited_status.special === Float32(11) + @test edited_model.status_conversion.rules == + (Float32 => Float16, Float64 => Float32) + @test edited_model.status_conversion.transform isa EditorNamedStatusTransform + code = try + editor_extension._model_to_julia(session) + finally + close(session) + end + @test occursin( + "PlantSimEngine.StatusConversionPolicy((Float32 => Float16, Float64 => Float32), Main.EditorNamedStatusTransform())", + code, + ) + @test occursin("_status_values_materialized=true", code) + @test occursin("_status_conversion_records=Dict{Any,Any}", code) + + restored = Base.include_string( + Main, + code, + "generated_status_conversion_editor_test.jl", + ) + restored_status = only(model_objects(restored)).status + @test restored_status.ordinary isa Float32 + @test restored_status.ordinary === original_status.ordinary + @test restored_status.special === Float32(11) + @test restored.status_conversion.rules == + (Float32 => Float16, Float64 => Float32) + @test restored.status_conversion.transform isa EditorNamedStatusTransform + + ordinary_key = ( + :supplied_status, + nothing, + ObjectId(:typed_leaf), + :ordinary, + ) + @test length(restored.status_conversion_records) == + length(edited_model.status_conversion_records) + @test restored.status_conversion_records[ordinary_key].effective_type === Float32 + @test restored.status_conversion_records[ordinary_key].mapping_rule == + (Float64 => Float32) + edited_key = ( + :graph_edit_status, + nothing, + ObjectId(:typed_leaf), + :special, + ) + @test restored.status_conversion_records[edited_key].effective_type === Float32 + @test restored.status_conversion_records[edited_key].transform_changed + + registered = register_object!( + restored, + Object( + :late_typed_leaf; + status=Status(ordinary=3.0, special=4.0), + ), + ) + @test registered.status.ordinary isa Float32 + @test registered.status.special === Float32(5) + + anonymous_transform = (variable, value) -> + variable === :special ? Float16(value) : value + closure_model = CompositeModel( + Object( + :closure_leaf; + status=Status(ordinary=5.0, special=6.0), + ); + type_promotion=type_promotion, + status_transform=anonymous_transform, + ) + closure_session = edit_graph( + closure_model; + port=0, + open_browser=false, + autosave=false, + ) + closure_code = try + editor_extension._model_to_julia(closure_session) + finally + close(closure_session) + end + @test occursin("# WARNING: The Composite model status_transform", closure_code) + @test occursin("is not reconstructed", closure_code) + @test occursin("Existing effective Status values are preserved", closure_code) + @test occursin( + "PlantSimEngine.StatusConversionPolicy((Float32 => Float16, Float64 => Float32), nothing)", + closure_code, + ) + + restored_closure = Base.include_string( + Main, + closure_code, + "generated_status_conversion_closure_editor_test.jl", + ) + restored_closure_status = only(model_objects(restored_closure)).status + @test restored_closure_status.ordinary isa Float32 + @test restored_closure_status.special isa Float16 + @test isnothing(restored_closure.status_conversion.transform) + + registered_closure = register_object!( + restored_closure, + Object( + :late_closure_leaf; + status=Status(ordinary=7.0, special=8.0), + ), + ) + @test registered_closure.status.ordinary isa Float32 + @test registered_closure.status.special isa Float32 +end diff --git a/test/test-model-graph-view.jl b/test/test-model-graph-view.jl index 068b2b272..3bda7c366 100644 --- a/test/test-model-graph-view.jl +++ b/test/test-model-graph-view.jl @@ -54,6 +54,15 @@ struct ModelGraphGenericTypeModel <: AbstractModelGraphGenericTypeModel end PlantSimEngine.inputs_(::ModelGraphGenericTypeModel) = (driver=Required(Real),) PlantSimEngine.outputs_(::ModelGraphGenericTypeModel) = (result=0.0,) +struct ModelGraphStatusTransformCounter + calls::Base.RefValue{Int} +end + +function (counter::ModelGraphStatusTransformCounter)(variable, value) + counter.calls[] += 1 + return value +end + struct ModelGraphWeatherBackend <: PlantSimEngine.EnvironmentAPI.AbstractEnvironmentBackend end struct ModelGraphCanopyBackend <: PlantSimEngine.EnvironmentAPI.AbstractEnvironmentBackend end PlantSimEngine.EnvironmentAPI.environment_variables(::ModelGraphWeatherBackend) = (:T, :RH) @@ -899,7 +908,10 @@ end ) end -function model_graph_override_fixture() +function model_graph_override_fixture(; + type_promotion=nothing, + status_transform=nothing, +) template = CompositeModelTemplate( ( ModelSpec(ModelGraphSourceModel(1.0); name=:source, on=Many(scale=:Leaf)), @@ -919,7 +931,9 @@ function model_graph_override_fixture() template; root=Object(:plant_b; scale=:Plant), objects=(Object(:leaf_b; scale=:Leaf, parent=:plant_b, status=Status(driver=1.0)),), - ), + ); + type_promotion=type_promotion, + status_transform=status_transform, ) end @@ -999,6 +1013,34 @@ end ) end +@testset "CompositeModel graph rebuilds preserve materialized status policy" begin + transform = ModelGraphStatusTransformCounter(Ref(0)) + model = model_graph_override_fixture( + ; type_promotion=Dict(Float64 => Float32), status_transform=transform, + ) + materialization_calls = transform.calls[] + @test materialization_calls > 0 + + overridden = apply_model_graph_edit( + model, + SetModelInstanceOverride(:plant_b, :source, ModelGraphSourceModel(2.0)), + ) + overridden_transform = overridden.status_conversion.transform + @test overridden_transform isa ModelGraphStatusTransformCounter + @test overridden_transform.calls[] == materialization_calls + @test model_status(overridden, :leaf_a).driver isa Float32 + @test model_status(overridden, :leaf_b).driver isa Float32 + + changed_environment = apply_model_graph_edit( + overridden, + SetCompositeModelEnvironment(ModelGraphCanopyBackend()), + ) + changed_transform = changed_environment.status_conversion.transform + @test changed_transform isa ModelGraphStatusTransformCounter + @test changed_transform.calls[] == materialization_calls + @test changed_environment.environment isa ModelGraphCanopyBackend +end + @testset "CompositeModel graph object override edit" begin model = model_graph_override_fixture() @test length(model.instances) == 2 From c1bfaccde97a38dfaff165fbd54aa566bb8b9ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Wed, 26 Aug 2026 20:46:17 +0200 Subject: [PATCH 32/45] Complete status conversion test matrix --- test/test-model-status-type-conversion.jl | 4 ++ test/test-model-status-type-runtime.jl | 54 +++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/test/test-model-status-type-conversion.jl b/test/test-model-status-type-conversion.jl index 18010766e..39a745db5 100644 --- a/test/test-model-status-type-conversion.jl +++ b/test/test-model-status-type-conversion.jl @@ -98,7 +98,9 @@ end count_from_user=2, flag=true, label=:leaf, + label_text="leaf", date=Date(2026, 8, 26), + cadence=Hour(1), ), type_promotion=Dict(Float64 => Float32), ) @@ -117,7 +119,9 @@ end @test status.count_from_user === 2 @test status.flag === true @test status.label === :leaf + @test status.label_text == "leaf" @test status.date === Date(2026, 8, 26) + @test status.cadence === Hour(1) @test only(Diagnostics.explain_execution_plan(model)).status_type == typeof(status) diff --git a/test/test-model-status-type-runtime.jl b/test/test-model-status-type-runtime.jl index a7fe51b55..8420e056d 100644 --- a/test/test-model-status-type-runtime.jl +++ b/test/test-model-status-type-runtime.jl @@ -7,6 +7,7 @@ PlantSimEngine.@process "status_type_runtime_output_writer" verbose = false PlantSimEngine.@process "status_type_runtime_input_consumer" verbose = false PlantSimEngine.@process "status_type_runtime_callee" verbose = false PlantSimEngine.@process "status_type_runtime_controller" verbose = false +PlantSimEngine.@process "status_type_runtime_ordered_writer" verbose = false struct StatusTypeRuntimeOutputWriterModel <: AbstractStatus_Type_Runtime_Output_WriterModel end @@ -20,6 +21,11 @@ struct StatusTypeRuntimeCalleeModel <: struct StatusTypeRuntimeControllerModel <: AbstractStatus_Type_Runtime_ControllerModel end +struct StatusTypeRuntimeOrderedWriterModel{T} <: + AbstractStatus_Type_Runtime_Ordered_WriterModel + increment::T +end + PlantSimEngine.inputs_(::StatusTypeRuntimeOutputWriterModel) = NamedTuple() PlantSimEngine.outputs_(::StatusTypeRuntimeOutputWriterModel) = ( canonical_value=0.0, @@ -44,6 +50,20 @@ function PlantSimEngine.run!( return nothing end +PlantSimEngine.inputs_(::StatusTypeRuntimeOrderedWriterModel) = NamedTuple() +PlantSimEngine.outputs_(::StatusTypeRuntimeOrderedWriterModel) = (ordered_value=0.0,) + +function PlantSimEngine.run!( + model::StatusTypeRuntimeOrderedWriterModel, + status, + environment, + constants, + context, +) + status.ordered_value += model.increment + return nothing +end + PlantSimEngine.inputs_(::StatusTypeRuntimeInputConsumerModel) = ( one_value=Required(Real), optional_value=Default(0.0), @@ -364,3 +384,37 @@ end @test length(callee_rows) == 1 @test only(callee_rows).value === Float32(2) end + +@testset "ordered duplicate writers share one converted reference" begin + model = CompositeModel( + Object(:scene; scale=:Scene); + applications=( + ModelSpec( + StatusTypeRuntimeOrderedWriterModel(Float32(1)); + name=:first_writer, + on=One(scale=:Scene), + ), + ModelSpec( + StatusTypeRuntimeOrderedWriterModel(Float32(2)); + name=:second_writer, + on=One(scale=:Scene), + updates=Updates(:ordered_value; after=:first_writer), + ), + ), + environment=(duration=Hour(1),), + type_promotion=Dict(Float64 => Float32), + ) + + simulation = run!(model; outputs=:all) + @test final_state(simulation, :scene).ordered_value === Float32(3) + @test last( + outputs(simulation)[ + (:first_writer, ObjectId(:scene), :ordered_value) + ], + )[2] === Float32(1) + @test last( + outputs(simulation)[ + (:second_writer, ObjectId(:scene), :ordered_value) + ], + )[2] === Float32(3) +end From ec63a978418007da80bb6aa441c2a76fc6fab814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Wed, 26 Aug 2026 20:47:03 +0200 Subject: [PATCH 33/45] Document scenario status type conversion --- docs/src/API/API_public.md | 31 +++- docs/src/guides/data/numerical_reliability.md | 146 ++++++++++++++++++ docs/src/journeys/users/one_object.md | 19 ++- docs/src/migration_composite_model.md | 35 +++++ docs/src/step_by_step/implement_a_model.md | 17 +- .../implement_a_model_additional.md | 22 ++- 6 files changed, 258 insertions(+), 12 deletions(-) diff --git a/docs/src/API/API_public.md b/docs/src/API/API_public.md index c4477662e..ad7df6758 100644 --- a/docs/src/API/API_public.md +++ b/docs/src/API/API_public.md @@ -5,8 +5,9 @@ ### Scenario and model applications - `CompositeModel` stores objects, model applications, instances, and environment. -- `CompositeModel(model, models...; status=..., timestep=...)` is the concise one-object - form and lowers to the same object/application representation. +- `CompositeModel(model, models...; status=..., timestep=..., + type_promotion=..., status_transform=...)` is the concise one-object form and + lowers to the same object/application representation. - `Object` represents one runtime entity with stable identity and status. - `object_id(model, source)` resolves an `ObjectId`, registered `Object` or `Status`, MTG node, or raw identifier against the live registry. MTG nodes @@ -87,6 +88,32 @@ have not been mutated. Replace the ID-column object when either changes. producer-consumer binding must have identical contracts once either side declares one. +### Status representation + +- `CompositeModel(...; type_promotion=Dict(Float64 => Float32))` converts every + matching status value with `convert` when its storage is materialized. +- `CompositeModel(...; status_transform=(variable, value) -> ...)` applies a + precise transformation based on the status variable name and value. The + returned value becomes the candidate for the general `type_promotion` + mapping, so the transform always runs first. +- Ordinary numeric arrays are converted element by element when their elements + match a mapping rule. Their shape is preserved. +- The policy covers supplied object statuses, model input and output defaults, + and statuses of objects registered later through the lifecycle API. +- The policy is limited to status values. Model parameters, environment values, + constants, object labels, and topology are not converted. +- Conversion occurs during status materialization or object registration, not + on every call to a model kernel. +- `Diagnostics.explain_initialization(model)` reports `declared_type`, + `original_type`, `transformed_type`, and `effective_type`, plus flags and the + selected mapping rule for each initialized value. + +The effective status type must be supported by the model kernel. Generic +`Required` declarations and generic computations allow the same model to use +`Float32`, uncertainty-carrying numbers, or another compatible numeric type. +See [Numerical Reliability](../guides/data/numerical_reliability.md) for +complete examples. + ### Selectors - Multiplicity: `One(...)`, `OptionalOne(...)`, and `Many(...)`. diff --git a/docs/src/guides/data/numerical_reliability.md b/docs/src/guides/data/numerical_reliability.md index 6d5a6aec6..3874feb49 100644 --- a/docs/src/guides/data/numerical_reliability.md +++ b/docs/src/guides/data/numerical_reliability.md @@ -9,3 +9,149 @@ carriers, meteorology, and streams. Avoid forced `Float64` conversion. For long or ill-conditioned sums, use pairwise or compensated accumulation inside the scientific model and test its error tolerance explicitly. +## Choose the status representation + +A scenario may give its status values a different numeric representation when +it constructs a [`CompositeModel`](@ref). A type mapping is the shortest way to +convert every matching status value: + +```@example status_numeric_types +using PlantSimEngine + +model = CompositeModel( + Object( + :leaf; + scale=:Leaf, + status=Status( + biomass=1.0, + cohort_masses=[0.25, 0.75], + cohort_count=2, + ), + ); + type_promotion=Dict(Float64 => Float32), +) + +status = only(model_objects(model)).status +( + biomass_type=typeof(status.biomass), + cohort_type=eltype(status.cohort_masses), + count_type=typeof(status.cohort_count), +) +``` + +Here the scalar `Float64` and the elements of the ordinary numeric array become +`Float32`. The integer is unchanged. Array conversion is element by element and +preserves the array shape. PlantSimEngine does not recursively inspect arbitrary +user structs or custom containers; map the complete container type or handle it +explicitly in `status_transform` when that is required. + +Use `AbstractFloat => Float32` when all floating-point status values should be +converted, including types other than `Float64`. Avoid a broad +`Real => Float32` rule unless integer counts should also become floating-point +values. An exact source-type rule takes priority over an abstract rule. Rules +whose source types overlap without one being more specific are rejected during +model construction, so the result never depends on `Dict` iteration order. + +Use `status_transform` when the choice also depends on the variable name: + +```julia +transform_status = (variable, value) -> + variable === :biomass ? MyNumericType(value) : value + +model = CompositeModel( + objects...; + applications=applications, + status_transform=transform_status, + type_promotion=Dict(Float64 => Float32), +) +``` + +The transform receives `(variable, value)` and returns the value to store. It +runs before the general type mapping, so a value changed to another type by the +transform no longer matches the `Float64` rule above. It must be callable for +every status value that is materialized. If it throws, or if a mapped value +cannot be converted with `convert(Target, value)`, model construction stops +with the variable, original type, object when known, and initialization origin +in the error message. + +This policy applies only to values stored in object statuses: supplied values, +model input and output defaults, and status values of objects registered later +in the simulation. It does not convert model parameters or environment values. +The conversion happens when status storage is materialized or an object is +registered, not inside every model invocation. + +For a supplied `Status`, PlantSimEngine creates a new status reference only for +values that actually change. The supplied `Status` itself is not mutated, and +unchanged references are preserved where possible. Each `Object` must still own +its own `Status`; sharing one `Status` between objects is rejected. The stored +policy is also applied once to values introduced later by `register_object!` or +`add_organ!`. + +`Diagnostics.explain_initialization(model)` reports the declared, original, +transformed, and effective types, together with whether the precise transform +or the type mapping changed each materialized value. + +!!! note + Model kernels still need to support the effective types. Keep status + computations generic and avoid constructing intermediate values as + `Float64` unless that precision is part of the scientific contract. + +## Propagate uncertainty with particles + +[MonteCarloMeasurements.jl](https://github.com/baggepinnen/MonteCarloMeasurements.jl) +is an optional package and is not a PlantSimEngine dependency. A precise +`status_transform` can initialize selected inputs and outputs as particles, +while the general mapping converts the remaining floating-point status values. +For example: + +```julia +using PlantSimEngine +using MonteCarloMeasurements: Particles, pmean, pstd + +@process "uncertain_square" verbose = false + +struct UncertainSquare <: AbstractUncertain_SquareModel end + +PlantSimEngine.inputs_(::UncertainSquare) = (x=Required(Real),) +PlantSimEngine.outputs_(::UncertainSquare) = (y=0.0, ordinary=1.0) + +function PlantSimEngine.run!( + ::UncertainSquare, + status, + environment, + constants, + context, +) + status.y = status.x^2 + return nothing +end + +function particle_status(variable, value) + variable === :x && return Particles([value - 0.1, value + 0.1]) + variable === :y && return Particles(fill(value, 2)) + return value +end + +model = CompositeModel( + UncertainSquare(); + status=(x=1.0,), + status_transform=particle_status, + type_promotion=Dict(Float64 => Float32), +) + +simulation = run!(model; outputs=:all) +uncertain_result = final_state(simulation).y +(mean=pmean(uncertain_result), standard_deviation=pstd(uncertain_result)) +``` + +Both `x` and the initial storage for `y` are particles, so assigning the +particle result preserves its uncertainty. The unrelated `ordinary` status is +still converted to `Float32`. Model parameters would need their own generic +types if they also have to carry uncertainty. + +## Test the expected tolerance + +Changing the floating-point representation can change rounding and reduction +order. Compare scientific results with an explicit tolerance appropriate for +the chosen representation. Test exact values only when exactness is an intended +part of the model contract. diff --git a/docs/src/journeys/users/one_object.md b/docs/src/journeys/users/one_object.md index 25091a6fe..350cee5e5 100644 --- a/docs/src/journeys/users/one_object.md +++ b/docs/src/journeys/users/one_object.md @@ -29,8 +29,21 @@ model = CompositeModel( ``` No `ModelSpec` or selector is needed when all models run on the one object made -by the concise constructor. Run thirty daily steps and retain the model -outputs: +by the concise constructor. + +!!! tip "Choose a status type for the whole scenario" + Add `type_promotion=Dict(Float64 => Float32)` to the constructor to + materialize every matching status scalar, model input default, and model + output default as `Float32`. Ordinary numeric arrays are converted element + by element. Model parameters such as `Beer(0.6)` and values supplied by + `weather` keep their own types. + + Use `status_transform=(variable, value) -> ...` when only selected + variables need another representation. The precise transform runs before + the general type mapping. See [Numerical Reliability](@ref) for complete + `Float32` and uncertainty-propagation examples. + +Run thirty daily steps and retain the model outputs: ```@example journey_one_object simulation = run!(model; steps=30, outputs=:all) @@ -94,3 +107,5 @@ state_at_day_31 = final_state(simulation) - **New API names:** `CompositeModel`, `run!`, `Simulation`, `final_state`, `collect_outputs`, `outputs`, `current_step`, `step!`, and `Diagnostics.explain_bindings`. +- **Optional status policies:** `type_promotion` for a general type mapping and + `status_transform` for a variable-specific conversion. diff --git a/docs/src/migration_composite_model.md b/docs/src/migration_composite_model.md index 6a4c03b4f..395952952 100644 --- a/docs/src/migration_composite_model.md +++ b/docs/src/migration_composite_model.md @@ -117,6 +117,40 @@ model = CompositeModel( topology. A plant may use any hierarchy of plants, axes, internodes, segments, leaves, roots, fruits, or application-specific objects. +### Status type conversion + +Some historical `ModelMapping` configurations changed the representation of +all matching status values, for example from `Float64` to `Float32`. Keep that +scenario policy on the modern `CompositeModel`; do not recreate or wrap +`ModelMapping`: + +```julia +model = CompositeModel( + objects...; + applications=applications, + environment=environment, + type_promotion=Dict(Float64 => Float32), +) +``` + +Use `status_transform` when the conversion depends on the variable rather than +only its current type: + +```julia +model = CompositeModel( + objects...; + applications=applications, + type_promotion=Dict(Float64 => Float32), + status_transform=(variable, value) -> + variable === :uncertain_input ? uncertain(value) : value, +) +``` + +The variable-specific transform runs before the general type mapping. Ordinary +numeric arrays are mapped element by element. The policy applies to supplied +statuses, model input and output defaults, and objects registered later; it +does not change model parameters or environment values. + ### Existing MTG Topologies An existing MTG can be adapted without rebuilding its topology manually: @@ -487,6 +521,7 @@ targets. They are intended for both users and coding agents. | Legacy configuration | CompositeModel/object replacement | | --- | --- | | `ModelMapping` scale assembly | `CompositeModel` objects plus model applications | +| `ModelMapping` status type remapping | `CompositeModel(...; type_promotion=..., status_transform=...)` | | `MultiScaleModel(...)` | consumer `ModelSpec(...; inputs=...)` | | `TimeStepModel(...)` | `ModelSpec(...; every=...)` | | `InputBindings(...)` | source, policy, and window on `ModelSpec(...; inputs=...)` | diff --git a/docs/src/step_by_step/implement_a_model.md b/docs/src/step_by_step/implement_a_model.md index a3f3b6613..f786b6511 100644 --- a/docs/src/step_by_step/implement_a_model.md +++ b/docs/src/step_by_step/implement_a_model.md @@ -137,7 +137,14 @@ struct CustomModel{T,S} <: AbstractLight_InterceptionModel end ``` -Parameterized types are practical because they let the user choose the type of the parameters, and potentially change them at runtime. For example a user could use the `Particles` type from [MonteCarloMeasurements.jl](https://github.com/baggepinnen/MonteCarloMeasurements.jl) for automatic uncertainty propagation throughout the simulation. We refer you to the [Parametric types](@ref) subsection of the [Model implementation additional notes](@ref) page for more information on parametric types. +Parameterized types are practical because they let the user choose the type of +the parameters. For example, a user could use the `Particles` type from +[MonteCarloMeasurements.jl](https://github.com/baggepinnen/MonteCarloMeasurements.jl) +for automatic uncertainty propagation. Model parameters are not status values: +a scenario-level `status_transform` does not change them, so parameters that +must carry uncertainty need generic model fields like `k::T`. See the +[Parametric types](@ref) subsection of the +[Model implementation additional notes](@ref) page for more information. ### Inputs and outputs @@ -174,8 +181,12 @@ model instead had an optional efficiency of `0.8`, it would declare "required": they are ordinary values and hide the model contract. `Required(Float64)` is an expected type, not an initialization value. A model -that supports a broader or parameterized type can declare that type instead. -PlantSimEngine does not convert status values to `Float64`. +that supports a broader or parameterized status type should declare that type +instead, for example `Required(Real)`. PlantSimEngine performs no implicit +conversion to `Float64`. A simulation user may explicitly choose another status +representation with `CompositeModel(...; type_promotion=..., +status_transform=...)`; the model kernel must support the resulting effective +type. See [Numerical Reliability](@ref) for examples and scope details. These extension functions end with an "\_". Simulation users instead use [`inputs`](@ref), [`outputs`](@ref), [`init_variables`](@ref), and diff --git a/docs/src/step_by_step/implement_a_model_additional.md b/docs/src/step_by_step/implement_a_model_additional.md index b3f943669..80822b10f 100644 --- a/docs/src/step_by_step/implement_a_model_additional.md +++ b/docs/src/step_by_step/implement_a_model_additional.md @@ -28,11 +28,19 @@ end Doing so would lose some flexibility in the way users can make use of your models. For example a user could use the `Particles` type from [MonteCarloMeasurements.jl](https://github.com/baggepinnen/MonteCarloMeasurements.jl) for automatic uncertainty propagation, and this is only possible if the model type is parameterizable. Forcing a `Float64` type would render the model incompatible with `Particles`. -## Type promotion +## Promoting model constructor arguments When implementing a new model, you can do a little optional extra work to help future users. -You can add a method for type promotion. It wouldn't make any sense for the previous `Beer` example because we have only one parameter. But we can make another example with a new model that would be called `Beer2` that would take two parameters: +You can add a constructor that uses Julia's `promote` function. This is +promotion of model parameters while constructing the model; it is distinct +from the `CompositeModel(...; type_promotion=...)` policy that converts status +values for a scenario. See [Numerical Reliability](@ref) for that status +policy. + +Constructor promotion would not make any difference for the previous `Beer` +example because it has only one parameter. Consider instead a `Beer2` model +with two parameters: ```julia struct Beer2{T} <: AbstractLight_InterceptionModel @@ -50,7 +58,9 @@ end ``` !!! note - `promote` returns a NamedTuple, which needs to be splatted for the constructor, see the [Julia docs](https://docs.julialang.org/en/v1/manual/conversion-and-promotion/#Promotion) for a more in-depth explanation, or our [Getting started with Julia](@ref) page for some links to other references discussing Julia concepts used in PlantSimEngine. + `promote` returns a tuple, which is splatted into the constructor above. + See the [Julia documentation](https://docs.julialang.org/en/v1/manual/conversion-and-promotion/#Promotion) + for a more in-depth explanation. This would allow users to instantiate the model parameters using different types of inputs. For example users may write the following: @@ -60,7 +70,9 @@ Beer2(0.6,2) `Beer2` is a parametric type, with all fields sharing the same type `T`. This is the `T` in `Beer2{T}` and then in `k::T` and `x::T`. And this forces the user to give all parameters with the same type. -And in the example above, providin `0.6` for `k`, which is a `Float64`, and `2` for `x`, which is an `Int`. If you don't have type promotion, Julia will return an error because both should be either `Float64` or `Int`. That's were type promotion comes in handy, as it will convert all your inputs to a common type (when possible). In our case it will convert `2` to `2.0`. +In the example above, `0.6` for `k` is a `Float64`, while `2` for `x` is an +`Int`. Constructor promotion converts both arguments to a common type when +possible. In this case it converts `2` to `2.0`. ## Other helper functions and constructors @@ -98,4 +110,4 @@ The last optional utility function to implement is a method for the `eltype` fun Base.eltype(x::Beer{T}) where {T} = T ``` -This one helps Julia know the type of the elements in the structure, and make it faster. \ No newline at end of file +This one helps Julia know the type of the elements in the structure, and make it faster. From cd8dfbb67249a3520623f4afd8ff1144b999056c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Wed, 26 Aug 2026 21:12:55 +0200 Subject: [PATCH 34/45] Prevent stale MTG runtime status columns --- src/composite_model/registry_topology.jl | 30 +++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/src/composite_model/registry_topology.jl b/src/composite_model/registry_topology.jl index 32a096e36..9922b0fc2 100644 --- a/src/composite_model/registry_topology.jl +++ b/src/composite_model/registry_topology.jl @@ -1352,14 +1352,34 @@ function _status_data!(data::Dict{Symbol,Any}, values) "`Base.Pairs`, or `nothing`, got `$(typeof(values))`." ) for (key, value) in pairs(source) - Symbol(key) == :plantsimengine_status && error( + if Symbol(key) == :plantsimengine_status + # ColumnarAttrs retains an empty column after a rejected node is + # removed. Treat that schema placeholder as absent without deleting + # the shared column; a real runtime status value remains forbidden. + isnothing(value) && continue + error( + "`plantsimengine_status` is runtime state, not an organ attribute. " * + "Pass scientific initial values through `initial_status` and resolve " * + "runtime status with `model_status`.", + ) + end + data[Symbol(key)] = value + end + return data +end + +function _validate_organ_attributes(attributes) + source = attributes isa Status ? NamedTuple(attributes) : attributes + source isa Union{NamedTuple,AbstractDict,Base.Pairs} || return attributes + for (key, _) in pairs(source) + Symbol(key) == :plantsimengine_status || continue + error( "`plantsimengine_status` is runtime state, not an organ attribute. " * "Pass scientific initial values through `initial_status` and resolve " * "runtime status with `model_status`.", ) - data[Symbol(key)] = value end - return data + return attributes end function _organ_status( @@ -1421,6 +1441,10 @@ function add_organ!( "`add_organ!` requires a model constructed from an MTG. Use ", "`register_object!` for composite models built directly from `Object` values." ) + # Reject the reserved runtime field before constructing the MTG node. A + # rejected ColumnarAttrs insertion would otherwise leave an empty schema + # column visible on later nodes of the same organ symbol. + _validate_organ_attributes(attributes) # Resolve the exact registered node before advancing ids or mutating either # the source MTG or the runtime registry. parent_id = object_id(model, parent_node) From bfcd4fa80dcd151e4db2e64c88b6a0d708918e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Thu, 27 Aug 2026 01:46:45 +0200 Subject: [PATCH 35/45] Preserve configuration exceptions --- src/time/multirate.jl | 5 ++--- src/time/runtime/environment_sampling.jl | 6 +----- test/test-model-configuration-errors.jl | 13 +++++++++++++ test/test-model-environment-sampling.jl | 11 +++++++++++ 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/src/time/multirate.jl b/src/time/multirate.jl index b6e5b6d75..a4b932b08 100644 --- a/src/time/multirate.jl +++ b/src/time/multirate.jl @@ -20,11 +20,10 @@ function _as_schedule_policy(policy; context::AbstractString="schedule policy") policy <: SchedulePolicy || error( "Unsupported $(context) type `$(policy)`. Expected a SchedulePolicy type or instance." ) - return try - policy() - catch + if !applicable(policy) error("Schedule policy type `$(policy)` requires constructor arguments.") end + return policy() elseif policy isa SchedulePolicy return policy end diff --git a/src/time/runtime/environment_sampling.jl b/src/time/runtime/environment_sampling.jl index 5d9a1d795..fdad4abf2 100644 --- a/src/time/runtime/environment_sampling.jl +++ b/src/time/runtime/environment_sampling.jl @@ -70,11 +70,7 @@ end function _first_environment_row(environment) isnothing(environment) && return nothing - is_table = try - DataFormat(environment) == TableAlike() - catch - false - end + is_table = DataFormat(environment) == TableAlike() if is_table rows = Tables.rows(environment) state = iterate(rows) diff --git a/test/test-model-configuration-errors.jl b/test/test-model-configuration-errors.jl index 8a9f3f7a2..6b6d8264a 100644 --- a/test/test-model-configuration-errors.jl +++ b/test/test-model-configuration-errors.jl @@ -9,6 +9,13 @@ struct InvalidEnvironmentHintProbeModel <: AbstractInvalid_Hint_ProbeModel end struct InvalidTimestepHintProbeModel <: AbstractInvalid_Hint_ProbeModel end struct ConfigurationProbeModel <: AbstractConfiguration_ProbeModel end struct ConfigurationConsumerModel <: AbstractConfiguration_ConsumerModel end +struct SchedulePolicyConstructorSentinel <: Exception end +struct ThrowingSchedulePolicy <: SchedulePolicy + ThrowingSchedulePolicy() = throw(SchedulePolicyConstructorSentinel()) +end +struct ArgumentSchedulePolicy <: SchedulePolicy + value::Int +end PlantSimEngine.inputs_(::Union{InvalidEnvironmentHintProbeModel,InvalidTimestepHintProbeModel}) = NamedTuple() PlantSimEngine.outputs_(::Union{InvalidEnvironmentHintProbeModel,InvalidTimestepHintProbeModel}) = (value=0.0,) PlantSimEngine.environment_hint(::Type{<:InvalidEnvironmentHintProbeModel}) = 42 @@ -31,6 +38,12 @@ end @testset "current configuration errors" begin @test_throws "Unsupported reducer value" Aggregate(42) + @test_throws "requires constructor arguments" PlantSimEngine._as_schedule_policy( + ArgumentSchedulePolicy, + ) + @test_throws SchedulePolicyConstructorSentinel PlantSimEngine._as_schedule_policy( + ThrowingSchedulePolicy, + ) monthly_scene = CompositeModel( Object(:leaf; scale=:Leaf); applications=( diff --git a/test/test-model-environment-sampling.jl b/test/test-model-environment-sampling.jl index fb7bbac38..0fe001ca4 100644 --- a/test/test-model-environment-sampling.jl +++ b/test/test-model-environment-sampling.jl @@ -42,6 +42,17 @@ function PlantSimEngine.run!(::EnvironmentSamplingProbeModel, status, environmen status.radiation_energy = environment.Ri_SW_q end +struct EnvironmentDataFormatSentinel <: Exception end +struct BrokenEnvironmentDataFormat end +PlantSimEngine.DataFormat(::Type{BrokenEnvironmentDataFormat}) = + throw(EnvironmentDataFormatSentinel()) + +@testset "environment format errors remain visible" begin + @test_throws EnvironmentDataFormatSentinel PlantSimEngine._first_environment_row( + BrokenEnvironmentDataFormat(), + ) +end + @testset "environment aggregation and model hint" begin if PlantSimEngine._has_environment_sampler_api() base_date = DateTime(2025, 1, 1) From f6e5b6df014c4e2c91728d0bc60ab2c5e0024cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Thu, 27 Aug 2026 01:47:02 +0200 Subject: [PATCH 36/45] Qualify Beer fitting test API --- test/test-fitting.jl | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/test/test-fitting.jl b/test/test-fitting.jl index 6c650e687..85a5037a3 100644 --- a/test/test-fitting.jl +++ b/test/test-fitting.jl @@ -30,7 +30,7 @@ using Dates @test 0.0 < plant.status.aPPFD < incident_ppfd @test simulated_f_abs ≈ 1.0 - exp(-k * plant.status.LAI) - @test fit(PlantSimEngine.Examples.Beer, simulated).k ≈ k + @test PlantSimEngine.Evaluation.fit(PlantSimEngine.Examples.Beer, simulated).k ≈ k lai = [1.0, 2.0, 3.0] incident_par = [200.0, 300.0, 400.0] @@ -41,7 +41,7 @@ using Dates Ri_PAR_f=incident_par, aPPFD=incident_par .* constants.J_to_umol .* expected_f_abs, ) - fitted = fit(PlantSimEngine.Examples.Beer, observations) + fitted = PlantSimEngine.Evaluation.fit(PlantSimEngine.Examples.Beer, observations) reconstructed_f_abs = @. 1.0 - exp(-fitted.k * lai) @test expected_f_abs[2] ≈ 0.6 @@ -53,40 +53,43 @@ using Dates Ri_PAR_f=[incident], aPPFD=[incident * constants.J_to_umol * f_abs], ) - @test fit(PlantSimEngine.Examples.Beer, observation(2.0, 0.0)).k == 0.0 + @test PlantSimEngine.Evaluation.fit( + PlantSimEngine.Examples.Beer, + observation(2.0, 0.0), + ).k == 0.0 tiny = observation(2.0, eps(Float64) / 2.0) tiny_f_abs = tiny.aPPFD[1] / (tiny.Ri_PAR_f[1] * constants.J_to_umol) - tiny_k = fit(PlantSimEngine.Examples.Beer, tiny).k + tiny_k = PlantSimEngine.Evaluation.fit(PlantSimEngine.Examples.Beer, tiny).k @test tiny_k > 0.0 @test tiny_k ≈ -log1p(-tiny_f_abs) / tiny.LAI[1] - @test_throws ArgumentError fit( + @test_throws ArgumentError PlantSimEngine.Evaluation.fit( PlantSimEngine.Examples.Beer, DataFrame(LAI=Float64[], Ri_PAR_f=Float64[], aPPFD=Float64[]), ) for invalid_lai in (0.0, -1.0, Inf, NaN) - @test_throws DomainError fit( + @test_throws DomainError PlantSimEngine.Evaluation.fit( PlantSimEngine.Examples.Beer, observation(invalid_lai, 0.6), ) end for invalid_f_abs in (-0.1, 1.0, 1.1, Inf, NaN) - @test_throws DomainError fit( + @test_throws DomainError PlantSimEngine.Evaluation.fit( PlantSimEngine.Examples.Beer, observation(2.0, invalid_f_abs), ) end for invalid_incident in (0.0, -1.0, Inf, -Inf, NaN) - @test_throws DomainError fit( + @test_throws DomainError PlantSimEngine.Evaluation.fit( PlantSimEngine.Examples.Beer, observation(2.0, 0.6; incident=invalid_incident), ) end for invalid_J_to_umol in (0.0, -1.0, Inf, -Inf, NaN) - @test_throws DomainError fit( + @test_throws DomainError PlantSimEngine.Evaluation.fit( PlantSimEngine.Examples.Beer, observation(2.0, 0.6); J_to_umol=invalid_J_to_umol, @@ -98,7 +101,7 @@ using Dates Ri_PAR_f=[-300.0], aPPFD=[300.0 * constants.J_to_umol * 0.6], ) - @test_throws DomainError fit( + @test_throws DomainError PlantSimEngine.Evaluation.fit( PlantSimEngine.Examples.Beer, double_negative; J_to_umol=-constants.J_to_umol, From 8b47f11285d55a919a3efc8583f2f1a16fefe2f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Thu, 27 Aug 2026 02:09:03 +0200 Subject: [PATCH 37/45] Benchmark status registry lookup --- benchmark/benchmarks.jl | 14 +++++ benchmark/test-status-registry-benchmark.jl | 39 +++++++++++++ benchmark/test/runtests.jl | 61 +++++++++++++++++++++ 3 files changed, 114 insertions(+) create mode 100644 benchmark/test-status-registry-benchmark.jl diff --git a/benchmark/benchmarks.jl b/benchmark/benchmarks.jl index bf9731c3c..6a5f5c270 100644 --- a/benchmark/benchmarks.jl +++ b/benchmark/benchmarks.jl @@ -42,6 +42,20 @@ end setup = (status = PlantSimEngine.Status(value=0.0)) if SUPPORTS_COMPOSITE_OBJECT_BENCHMARKS # Composite-model benchmarks cannot be constructed while AirspeedVelocity # evaluates this script against a pre-CompositeModel baseline revision. + include(joinpath(@__DIR__, "test-status-registry-benchmark.jl")) + for nobjects in (32, 256, 1_024) + SUITE[suite_name]["PSE_status_registry_lookup_$(nobjects)"] = + @benchmarkable benchmark_status_registry_lookup( + data.model, + data.lookup_status, + ) setup = (data = setup_status_registry_benchmark($nobjects)) + SUITE[suite_name]["PSE_status_registry_sweep_$(nobjects)"] = + @benchmarkable benchmark_status_registry_sweep_checksum( + data.model, + data.statuses, + ) setup = (data = setup_status_registry_benchmark($nobjects)) + end + include(joinpath(@__DIR__, "test-PSE-benchmark.jl")) SUITE[suite_name]["PSE"] = @benchmarkable benchmark_heavier_scene( model, diff --git a/benchmark/test-status-registry-benchmark.jl b/benchmark/test-status-registry-benchmark.jl new file mode 100644 index 000000000..b6b9c6a4b --- /dev/null +++ b/benchmark/test-status-registry-benchmark.jl @@ -0,0 +1,39 @@ +using PlantSimEngine + +function setup_status_registry_benchmark(nobjects::Int) + nobjects > 0 || throw(ArgumentError("`nobjects` must be positive.")) + statuses = [PlantSimEngine.Status(rank=index) for index in 1:nobjects] + objects = [ + PlantSimEngine.Object( + index; + scale=:Leaf, + status=statuses[index], + ) for index in 1:nobjects + ] + model = PlantSimEngine.CompositeModel(objects...) + lookup_index = cld(nobjects, 2) + return ( + model=model, + statuses=statuses, + lookup_status=statuses[lookup_index], + lookup_id=PlantSimEngine.ObjectId(lookup_index), + expected_checksum=nobjects, + ) +end + +Base.@noinline function benchmark_status_registry_lookup(model, status) + return PlantSimEngine.object_id(model, status) +end + +Base.@noinline function benchmark_status_registry_sweep_checksum(model, statuses) + checksum = 0 + @inbounds for index in eachindex(statuses) + checksum += PlantSimEngine.object_id(model, statuses[index]) == + PlantSimEngine.ObjectId(index) + end + return checksum +end + +function benchmark_status_registry_lookup_allocations(model, status) + return @allocated benchmark_status_registry_lookup(model, status) +end diff --git a/benchmark/test/runtests.jl b/benchmark/test/runtests.jl index df71259c2..706a89561 100644 --- a/benchmark/test/runtests.jl +++ b/benchmark/test/runtests.jl @@ -90,6 +90,63 @@ if benchmark_test_enabled("PlantSimEngine benchmark API smoke") end end +if benchmark_test_enabled("status registry benchmark API smoke") + @testset "status registry benchmark API smoke" begin + include( + joinpath( + @__DIR__, + "..", + "test-status-registry-benchmark.jl", + ), + ) + for nobjects in (32, 256, 1_024) + data = setup_status_registry_benchmark(nobjects) + @test length(data.statuses) == nobjects + @test all( + data.statuses[left] !== data.statuses[right] + for left in 2:nobjects + for right in 1:(left - 1) + ) + # This benchmark uses standalone Objects, so there is no MTG node + # on which runtime status could be materialized as an attribute. + @test all(:node ∉ propertynames(status) for status in data.statuses) + @test benchmark_status_registry_lookup( + data.model, + data.lookup_status, + ) == data.lookup_id + @test all( + benchmark_status_registry_lookup( + data.model, + data.statuses[index], + ) == PlantSimEngine.ObjectId(index) for index in 1:nobjects + ) + @test all( + PlantSimEngine.model_object(data.model, index).status === + data.statuses[index] for index in 1:nobjects + ) + @test benchmark_status_registry_sweep_checksum( + data.model, + data.statuses, + ) == data.expected_checksum + + benchmark_status_registry_lookup( + data.model, + data.lookup_status, + ) + @test benchmark_status_registry_lookup_allocations( + data.model, + data.lookup_status, + ) == 0 + @test @allocated( + benchmark_status_registry_sweep_checksum( + data.model, + data.statuses, + ) + ) == 0 + end + end +end + if benchmark_test_enabled("multirate benchmark API smoke") @testset "multirate benchmark API smoke" begin include(joinpath(@__DIR__, "..", "test-multirate-buffer-benchmark.jl")) @@ -725,6 +782,8 @@ if benchmark_test_enabled("internal-only benchmark suite assembly smoke") :SUITE, )[getfield(benchmark_module, :suite_name)] @test haskey(suite, "PSE_status_read_write") + @test haskey(suite, "PSE_status_registry_lookup_32") + @test haskey(suite, "PSE_status_registry_sweep_1024") @test haskey(suite, "PSE") @test haskey(suite, "PSE_hard_calls_zero") @test haskey(suite, "PSE_lifecycle_large") @@ -795,6 +854,8 @@ if benchmark_test_enabled("legacy benchmark suite assembly smoke") :SUITE, )[getfield(benchmark_module, :suite_name)] @test haskey(suite, "PSE_status_read_write") + @test !haskey(suite, "PSE_status_registry_lookup_32") + @test !haskey(suite, "PSE_status_registry_sweep_1024") @test !haskey(suite, "PSE") @test !haskey(suite, "PSE_multirate_no_output_run") @test !haskey(suite, "PSE_hard_calls_zero") From 696d8e62a6e315a376785cddbd8645046de7b036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Thu, 27 Aug 2026 02:28:29 +0200 Subject: [PATCH 38/45] Fix empty-plan structural refresh --- src/composite_model/compilation.jl | 2 +- test/test-model-object-id.jl | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/composite_model/compilation.jl b/src/composite_model/compilation.jl index f36cf81a0..e3a09e804 100644 --- a/src/composite_model/compilation.jl +++ b/src/composite_model/compilation.jl @@ -1527,7 +1527,7 @@ function _compile_scene( call_owners, application_children, status_views_by_target, - Set(application.id for application in applications), + Set{Symbol}(application.id for application in applications), Set(keys(status_views_by_target)), false, application_order, diff --git a/test/test-model-object-id.jl b/test/test-model-object-id.jl index 81838c3cd..dcb8e5170 100644 --- a/test/test-model-object-id.jl +++ b/test/test-model-object-id.jl @@ -263,6 +263,33 @@ end @test_throws ArgumentError object_id(model, old_leaf) end +@testset "empty application plan survives structural refresh" begin + root = Node(MultiScaleTreeGraph.NodeMTG("/", :Scene, 1, 0)) + plant = Node(root, MultiScaleTreeGraph.NodeMTG("+", :Plant, 1, 1)) + Node(plant, MultiScaleTreeGraph.NodeMTG("+", :Leaf, 1, 2)) + model = CompositeModel( + root; + status=node -> Status(node=node, signal=0.0), + ) + simulation = run!(model; steps=1, outputs=:none) + initial_step = current_step(simulation) + + added = add_organ!( + plant, + model, + :+, + :Leaf, + 2; + index=2, + initial_status=(signal=1.0,), + ) + @test Advanced.bindings_dirty(model) + @test continue!(simulation) === simulation + @test current_step(simulation) == initial_step + 1 + @test !Advanced.bindings_dirty(model) + @test object_id(model, added) == ObjectId(4) +end + @testset "registered Status identity resolution" begin status = Status(signal=1.0) object = Object(:leaf; scale=:Leaf, status=status) From c1d6de623d1e524689c5806e1646322595a71a89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Thu, 27 Aug 2026 02:58:46 +0200 Subject: [PATCH 39/45] Benchmark organ lifecycle costs --- benchmark/benchmarks.jl | 35 ++++++ benchmark/test-organ-lifecycle-benchmark.jl | 116 ++++++++++++++++++++ benchmark/test/runtests.jl | 84 ++++++++++++++ 3 files changed, 235 insertions(+) create mode 100644 benchmark/test-organ-lifecycle-benchmark.jl diff --git a/benchmark/benchmarks.jl b/benchmark/benchmarks.jl index 6a5f5c270..6858e890e 100644 --- a/benchmark/benchmarks.jl +++ b/benchmark/benchmarks.jl @@ -56,6 +56,41 @@ if SUPPORTS_COMPOSITE_OBJECT_BENCHMARKS ) setup = (data = setup_status_registry_benchmark($nobjects)) end + include(joinpath(@__DIR__, "test-organ-lifecycle-benchmark.jl")) + for nobjects in (32, 256, 1_024) + SUITE[suite_name]["PSE_organ_adaptation_$(nobjects)"] = + @benchmarkable benchmark_adapt_organ_model( + topology, + ) setup = (topology = setup_organ_topology_benchmark( + $nobjects, + )) evals = 1 + SUITE[suite_name]["PSE_organ_add_$(nobjects)"] = + @benchmarkable benchmark_add_organ!( + data, + ) setup = (data = setup_organ_lifecycle_benchmark( + $nobjects, + )) evals = 1 + SUITE[suite_name]["PSE_organ_refresh_$(nobjects)"] = + @benchmarkable benchmark_refresh_after_add!( + data, + ) setup = (data = setup_organ_refresh_benchmark( + $nobjects, + )) evals = 1 + SUITE[suite_name]["PSE_organ_add_refresh_$(nobjects)"] = + @benchmarkable benchmark_add_and_refresh!( + data, + ) setup = (data = setup_organ_lifecycle_benchmark( + $nobjects, + )) evals = 1 + SUITE[suite_name]["PSE_organ_add_continue_$(nobjects)"] = + @benchmarkable benchmark_add_and_continue!( + data, + ) setup = (data = setup_organ_lifecycle_benchmark( + $nobjects; + start_simulation=true, + )) evals = 1 + end + include(joinpath(@__DIR__, "test-PSE-benchmark.jl")) SUITE[suite_name]["PSE"] = @benchmarkable benchmark_heavier_scene( model, diff --git a/benchmark/test-organ-lifecycle-benchmark.jl b/benchmark/test-organ-lifecycle-benchmark.jl new file mode 100644 index 000000000..f0312907e --- /dev/null +++ b/benchmark/test-organ-lifecycle-benchmark.jl @@ -0,0 +1,116 @@ +using MultiScaleTreeGraph +using PlantSimEngine + +PlantSimEngine.@process "organ_lifecycle_leaf" verbose = false + +struct OrganLifecycleLeafModel <: AbstractOrgan_Lifecycle_LeafModel end + +PlantSimEngine.inputs_(::OrganLifecycleLeafModel) = NamedTuple() +PlantSimEngine.outputs_(::OrganLifecycleLeafModel) = (signal=0.0,) + +function PlantSimEngine.run!( + ::OrganLifecycleLeafModel, + status, + environment, + constants=nothing, + context=nothing, +) + status.signal += 1.0 + return nothing +end + +_organ_lifecycle_status(node) = + PlantSimEngine.Status(node=node, signal=0.0) + +function setup_organ_topology_benchmark(nobjects::Int) + nobjects > 0 || throw(ArgumentError("`nobjects` must be positive.")) + root = MultiScaleTreeGraph.Node( + MultiScaleTreeGraph.NodeMTG("/", :Scene, 1, 0), + ) + plant = MultiScaleTreeGraph.Node( + 2, + root, + MultiScaleTreeGraph.NodeMTG("/", :Plant, 1, 1), + ) + for index in 1:nobjects + MultiScaleTreeGraph.Node( + index + 2, + plant, + MultiScaleTreeGraph.NodeMTG("+", :Leaf, index, 2), + ) + end + return ( + root=root, + plant=plant, + nobjects=nobjects, + next_node_id=nobjects + 3, + ) +end + +Base.@noinline function benchmark_adapt_organ_model(topology) + return PlantSimEngine.CompositeModel( + topology.root; + applications=( + PlantSimEngine.ModelSpec( + OrganLifecycleLeafModel(); + name=:organ_lifecycle_leaf, + on=PlantSimEngine.Many(scale=:Leaf), + ), + ), + status=_organ_lifecycle_status, + ) +end + +function setup_organ_lifecycle_benchmark( + nobjects::Int; + start_simulation::Bool=false, +) + topology = setup_organ_topology_benchmark(nobjects) + model = benchmark_adapt_organ_model(topology) + simulation = if start_simulation + PlantSimEngine.run!(model; steps=1, outputs=:none) + else + compiled = PlantSimEngine.Advanced.refresh_bindings!(model) + PlantSimEngine.Advanced.refresh_environment_bindings!( + model, + compiled, + ) + nothing + end + return merge(topology, (; model, simulation)) +end + +function setup_organ_refresh_benchmark(nobjects::Int) + data = setup_organ_lifecycle_benchmark(nobjects) + status = benchmark_add_organ!(data) + return merge(data, (; status)) +end + +Base.@noinline function benchmark_add_organ!(data) + return PlantSimEngine.add_organ!( + data.plant, + data.model, + "+", + :Leaf, + 2; + index=data.nobjects + 1, + initial_status=(signal=1.0,), + ) +end + +Base.@noinline function benchmark_refresh_after_add!(data) + PlantSimEngine.Advanced.refresh_bindings!(data.model) + return data.model +end + +Base.@noinline function benchmark_add_and_refresh!(data) + status = benchmark_add_organ!(data) + PlantSimEngine.Advanced.refresh_bindings!(data.model) + return status +end + +Base.@noinline function benchmark_add_and_continue!(data) + status = benchmark_add_organ!(data) + PlantSimEngine.continue!(data.simulation) + return status +end diff --git a/benchmark/test/runtests.jl b/benchmark/test/runtests.jl index 706a89561..ee97d5e7b 100644 --- a/benchmark/test/runtests.jl +++ b/benchmark/test/runtests.jl @@ -147,6 +147,80 @@ if benchmark_test_enabled("status registry benchmark API smoke") end end +if benchmark_test_enabled("organ lifecycle benchmark API smoke") + @testset "organ lifecycle benchmark API smoke" begin + include( + joinpath( + @__DIR__, + "..", + "test-organ-lifecycle-benchmark.jl", + ), + ) + data = setup_organ_lifecycle_benchmark(32) + @test length(PlantSimEngine.model_objects(data.model)) == 34 + @test !data.model.bindings_dirty + @test !data.model.environment_bindings_dirty + @test !data.model.lifecycle_delta.full_environment + @test data.model.lifecycle_delta.structural_kind == :clean + status = benchmark_add_organ!(data) + added_id = PlantSimEngine.ObjectId(data.next_node_id) + @test PlantSimEngine.object_id(data.model, status) == added_id + @test PlantSimEngine.model_status(data.model, added_id) === status + @test PlantSimEngine.source_node(data.model, status) === status.node + @test status.signal == 1.0 + @test data.model.bindings_dirty + nodes = Any[] + MultiScaleTreeGraph.traverse!(data.root) do node + push!(nodes, node) + end + @test all( + !haskey( + MultiScaleTreeGraph.node_attributes(node), + :plantsimengine_status, + ) for node in nodes + ) + benchmark_refresh_after_add!(data) + @test !data.model.bindings_dirty + @test added_id in data.model.binding_cache.applications_by_id[ + :organ_lifecycle_leaf + ].target_ids + + combined = setup_organ_lifecycle_benchmark(32) + combined_status = benchmark_add_and_refresh!(combined) + @test PlantSimEngine.object_id(combined.model, combined_status) == + PlantSimEngine.ObjectId(combined.next_node_id) + @test !combined.model.bindings_dirty + + continued = setup_organ_lifecycle_benchmark( + 32; + start_simulation=true, + ) + initial_step = PlantSimEngine.current_step(continued.simulation) + continued_status = benchmark_add_and_continue!(continued) + @test PlantSimEngine.current_step(continued.simulation) == + initial_step + 1 + @test continued_status.signal == 2.0 + @test PlantSimEngine.object_id( + continued.model, + continued_status, + ) == PlantSimEngine.ObjectId(continued.next_node_id) + @test !continued.model.bindings_dirty + @test !continued.model.environment_bindings_dirty + @test isempty(continued.model.lifecycle_delta.added) + @test isempty(continued.model.lifecycle_delta.removed) + @test isempty(continued.model.lifecycle_delta.reparented) + @test isempty(continued.model.lifecycle_delta.moved) + @test isempty(continued.model.lifecycle_delta.structural_dirty_ids) + @test isempty(continued.model.lifecycle_delta.environment_dirty_ids) + @test isempty(continued.model.lifecycle_delta.initialized_targets) + @test isnothing( + continued.model.lifecycle_delta.targeted_topology_runtime, + ) + @test continued.model.lifecycle_delta.structural_kind == :clean + @test !continued.model.lifecycle_delta.full_environment + end +end + if benchmark_test_enabled("multirate benchmark API smoke") @testset "multirate benchmark API smoke" begin include(joinpath(@__DIR__, "..", "test-multirate-buffer-benchmark.jl")) @@ -784,6 +858,11 @@ if benchmark_test_enabled("internal-only benchmark suite assembly smoke") @test haskey(suite, "PSE_status_read_write") @test haskey(suite, "PSE_status_registry_lookup_32") @test haskey(suite, "PSE_status_registry_sweep_1024") + @test haskey(suite, "PSE_organ_adaptation_32") + @test haskey(suite, "PSE_organ_add_1024") + @test haskey(suite, "PSE_organ_refresh_1024") + @test haskey(suite, "PSE_organ_add_refresh_1024") + @test haskey(suite, "PSE_organ_add_continue_1024") @test haskey(suite, "PSE") @test haskey(suite, "PSE_hard_calls_zero") @test haskey(suite, "PSE_lifecycle_large") @@ -856,6 +935,11 @@ if benchmark_test_enabled("legacy benchmark suite assembly smoke") @test haskey(suite, "PSE_status_read_write") @test !haskey(suite, "PSE_status_registry_lookup_32") @test !haskey(suite, "PSE_status_registry_sweep_1024") + @test !haskey(suite, "PSE_organ_adaptation_32") + @test !haskey(suite, "PSE_organ_add_1024") + @test !haskey(suite, "PSE_organ_refresh_1024") + @test !haskey(suite, "PSE_organ_add_refresh_1024") + @test !haskey(suite, "PSE_organ_add_continue_1024") @test !haskey(suite, "PSE") @test !haskey(suite, "PSE_multirate_no_output_run") @test !haskey(suite, "PSE_hard_calls_zero") From 90d151a46eeddf36a3602a621a477cf8fd93bec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Thu, 27 Aug 2026 07:02:22 +0200 Subject: [PATCH 40/45] fix: reserve detached MTG node ids --- src/composite_model/registry_topology.jl | 9 ++++---- test/test-model-object-id.jl | 29 ++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/src/composite_model/registry_topology.jl b/src/composite_model/registry_topology.jl index 9922b0fc2..69c2268a5 100644 --- a/src/composite_model/registry_topology.jl +++ b/src/composite_model/registry_topology.jl @@ -803,7 +803,7 @@ function CompositeModel( name, geometry, status, - Ref(MultiScaleTreeGraph.max_id(root)), + Ref(MultiScaleTreeGraph.new_id(root) - 1), IdDict{Any,ObjectId}(), Dict{ObjectId,Any}(), ) @@ -1450,9 +1450,10 @@ function add_organ!( parent_id = object_id(model, parent_node) root = MultiScaleTreeGraph.get_root(parent_node) node_id = if isnothing(id) - # `max_node_id` is initialized from the complete source MTG and is - # updated for every explicit insertion, so the next automatic id is - # unique without an O(n) tree lookup. + # `max_node_id` is initialized from every active id in the source + # attribute store (store-wide for a columnar MTG) and is updated for + # every explicit insertion, so the next automatic id is unique without + # an O(n) tree lookup. adapter.max_node_id[] += 1 else explicit_id = Int(id) diff --git a/test/test-model-object-id.jl b/test/test-model-object-id.jl index dcb8e5170..4a4620b09 100644 --- a/test/test-model-object-id.jl +++ b/test/test-model-object-id.jl @@ -189,6 +189,35 @@ end @test_throws ArgumentError object_id(model, leaf) end +@testset "MTG adapter reserves ids from detached shared-store components" begin + root = Node(MultiScaleTreeGraph.NodeMTG("/", :Scene, 1, 0)) + plant = Node(root, MultiScaleTreeGraph.NodeMTG("+", :Plant, 1, 1)) + detached = Node(plant, MultiScaleTreeGraph.NodeMTG("+", :Leaf, 1, 2)) + MultiScaleTreeGraph.reparent!(detached, nothing) + + @test MultiScaleTreeGraph.max_id(root) == 2 + @test MultiScaleTreeGraph.new_id(root) == 4 + + model = CompositeModel(root) + @test_throws ArgumentError object_id(model, detached) + + added = add_organ!( + plant, + model, + :+, + :Leaf, + 2; + index=1, + initial_status=(signal=1.0,), + ) + + @test MultiScaleTreeGraph.node_id(added.node) == 4 + @test MultiScaleTreeGraph.parent(added.node) === plant + @test source_node(model, ObjectId(4)) === added.node + @test MultiScaleTreeGraph.new_id(root) == 5 + @test MultiScaleTreeGraph.node_id(detached) == 3 +end + @testset "MTG identities remain stable after source mutation" begin root = Node(MultiScaleTreeGraph.NodeMTG("/", :Scene, 1, 0)) plant = Node(root, MultiScaleTreeGraph.NodeMTG("+", :Plant, 1, 1)) From 2e3b471488b30b61668c6433aa3fc8ef0d366e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Fri, 28 Aug 2026 10:48:00 +0200 Subject: [PATCH 41/45] Fix Julia 1.10 allocation test --- test/test-model-bound-many.jl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/test-model-bound-many.jl b/test/test-model-bound-many.jl index 4b0a886ad..de1a5cb44 100644 --- a/test/test-model-bound-many.jl +++ b/test/test-model-bound-many.jl @@ -122,6 +122,11 @@ function sum_bound_many_input(context) return total end +function sum_bound_many_input_allocations(context) + sum_bound_many_input(context) + return @allocated sum_bound_many_input(context) +end + refvector_dispatch(::PlantSimEngine.RefVector) = :ref_vector struct BoundManyShiftedVector{T} <: AbstractVector{T} @@ -252,8 +257,7 @@ end Val(:signals), )) === initial_values @test @inferred(sum_bound_many_input(initial_target.context)) == 6.0 - sum_bound_many_input(initial_target.context) - @test @allocated(sum_bound_many_input(initial_target.context)) == 0 + @test sum_bound_many_input_allocations(initial_target.context) == 0 @test_throws ArgumentError bound_input(initial_target.context, "signals") register_object!( From 123549925e30f3663308e52ca1be87de363a9436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Fri, 28 Aug 2026 17:44:40 +0200 Subject: [PATCH 42/45] Delete TEMP_IMMUTABLE_SCENARIO_PERFORMANCE_GOAL.md --- TEMP_IMMUTABLE_SCENARIO_PERFORMANCE_GOAL.md | 1101 ------------------- 1 file changed, 1101 deletions(-) delete mode 100644 TEMP_IMMUTABLE_SCENARIO_PERFORMANCE_GOAL.md diff --git a/TEMP_IMMUTABLE_SCENARIO_PERFORMANCE_GOAL.md b/TEMP_IMMUTABLE_SCENARIO_PERFORMANCE_GOAL.md deleted file mode 100644 index b1e78bd4f..000000000 --- a/TEMP_IMMUTABLE_SCENARIO_PERFORMANCE_GOAL.md +++ /dev/null @@ -1,1101 +0,0 @@ -# Temporary Goal: Separate Immutable Scenario Plans From Mutable Object State - -## Goal - -Improve PlantSimEngine performance by compiling scenario-level information once -and updating only object-dependent runtime state when objects are created, -removed, reparented, or moved. - -The goal is complete only when ordinary timesteps execute from a stable, -precompiled scenario plan, lifecycle work is proportional to the structural -delta, and the changes preserve the unified `CompositeModel`/`Object` API, -scientific results, scheduling semantics, output history, and environment -behavior. - -The predecessor hard-call performance goal is complete and was removed in -commit `355e143c`. Its final implementation and acceptance record remain in the -repository history and in -[`benchmark/release_baselines/README.md`](benchmark/release_baselines/README.md). -This goal starts from that accepted hard-call runtime. It owns the broader -compiler/runtime separation and must absorb the existing hard-call target -maintenance into one shared lifecycle and invalidation architecture rather -than introducing a second hard-call-specific path. - -## Working Rules - -- Use Kaimon for all Julia work and keep benchmark environments isolated and - reproducible. -- Reinspect the current branch, worktree, open goal files, and relevant recent - commits before implementation. Another task may have changed the hard-call - runtime since this file was written. -- Preserve unrelated working-tree changes. Inspect the worktree before staging - each commit and stage only files belonging to this goal. -- Commit regularly in small, coherent, validated slices. Do not leave the full - redesign in one commit. -- Run `git diff --check` before every commit. -- Do not push, force-push, merge, tag, or publish a release unless explicitly - requested. -- Do not update numerical fixtures merely to make failures pass. Explain and - validate every intentional numerical change. -- Keep model parameters, status values, carriers, streams, and environment - values generic. Do not introduce `Float64` specialization into scientific - contracts. -- Preserve reference-backed same-rate coupling and typed temporal streams. -- Keep dynamic dispatch at compiled batch boundaries, never inside the - per-object kernel loop. -- Benchmark construction, warmed steady-state execution, explicit output - requests, lifecycle refresh, environment refresh, and output collection as - separate workloads. -- Use one setup followed by many timesteps as the primary throughput workload. - Keep repeated fresh `run!` timing as a separately named construction/cold-run - metric. -- Keep this file updated as implementation progresses. Remove it only after the - completion criteria are met and the final result has been handed off. - -## Architectural Contract - -The scenario definition is fixed after compilation: - -- the set of model applications and their identifiers; -- model contracts and default/override implementation families; -- declared input, call, update, environment, and output rules; -- application-level dependency edges and topological order; -- clock/cadence definitions and phases; -- selector definitions and their matching programs; -- writer/update ordering rules; -- environment provider and sampling rules; -- output-retention requirements by application and variable; -- hard-call declarations, selectors, multiplicities, publication rules, and - typed execution rules. - -Runtime objects remain mutable: - -- object registry membership and parent topology; -- application target membership; -- object statuses and per-application status views; -- resolved input carriers and temporal input state; -- retained stream instances and output-request membership intervals; -- environment handles and geometry-source associations; -- homogeneous execution-batch membership; -- lifecycle-maintained hard-call object bindings and cached typed execution - batches. - -The implementation should make this separation explicit, for example through -an immutable `CompiledScenarioPlan` and a mutable `RuntimeTopologyState` or -equivalent internal types. Exact internal names may differ, but the ownership -boundary must remain clear. - -Lifecycle changes may instantiate, remove, or reconnect object-level state. -They must not reinterpret model declarations, rebuild the application graph, -or rediscover application-level schedule rules. - -## Existing Strengths To Preserve - -- Lifecycle refresh already reuses unaffected status views and execution - groups. -- Incremental execution-target tests already require work counts to remain - proportional to the structural delta. -- Same-rate inputs already use reference carriers when possible. -- Runtime temporal inputs already retain direct typed stream references. -- Root execution already groups homogeneous targets so dispatch occurs at the - batch boundary. -- Hard calls now reuse cached homogeneous `CompiledExecutionBatch` values and - keep dynamic dispatch at the batch boundary. Literal-name `call_model` and - bulk `run_call!(...; sampled_environment=...)` provide allocation-free - warmed fast paths for the supported singular and bulk use cases. -- `PreviousTimeStep` materialization now reads `TemporalDependencyBuffer` - storage directly, updates scalar references and preallocated `Many` storage - in place, and falls back to the compiled initial value when a newly created - object has no previous source sample yet. -- Spatial environment bindings can already be invalidated for selected - objects. -- Removed objects retain their historical output samples. -- New objects can run applications that remain later in the current timestep, - but applications already completed are not rerun. - -Do not replace these mechanisms wholesale without evidence. Refactor them into -the immutable-plan/mutable-state boundary and remove only duplicated or -obsolete paths. - -## Completed Performance Prerequisites (2026-08-11) - -The task "Compare XPalm full-cycle speed" completed the prerequisite hard-call -and temporal-input work. Treat the following as the starting point for this -goal, not as work to repeat: - -- `695bc2c9` replaced repeated public `CallTarget` reconstruction in the hot - path with cached, typed `CompiledExecutionBatch` values and added focused - correctness, allocation, and benchmark coverage. -- `f3d2974b` added allocation-free warmed bulk - `run_call!(...; sampled_environment=...)` and singular `call_model` paths. -- PlantBiophysics commit `dbd04e0` adapted Monteith, FvCB, FvCBIter, and - ConstantAGs to those paths without changing the retained 113,880-row - trajectory. -- `e2604582` specialized `PreviousTimeStep` materialization; `d5480c50` added - the missing-stream fallback needed by lifecycle-created objects and external - initial state. -- `b5518fbf`, `1635a3d1`, and `a072803b` added pinned downstream runners, - benchmark CI support, sample-count control, documentation, and the final - acceptance record. `355e143c` then removed the completed temporary hard-call - goal. - -The final follow-up in that task clarified an important lifecycle invariant: -"preallocated" temporal storage is stable only between structural changes, not -permanently fixed-size. At a lifecycle refresh barrier, a newly created organ -must be added to affected execution targets, hard-call buffers, temporal status -views, and `Many` storage. Applications still remaining in the current -timestep may then run on it; applications already completed are not rerun. If -the new organ has no previous source sample, `PreviousTimeStep` must use its -compiled initial value for that first read and use the normal temporal buffer -on subsequent timesteps. - -The accepted local comparison used PlantSimEngine `d5480c50`, -PlantBiophysics `dbd04e0`, and XPalm `192e43f7`: - -| Workload | Accepted current result | Pinned-release ratio | -| --- | ---: | ---: | -| PlantBiophysics, 8,760 steps, `outputs=:none` | 18.414 ms | 0.216x | -| PlantBiophysics, 8,760 steps, `outputs=:all` | 32.216 ms | 0.378x | -| XPalm full cycle, 4,160 lifecycle steps and output collection | 8.035 s | 1.483x | - -The XPalm result exactly matched the pinned `v0.6.1` final reference at step -4,160: 344 phytomers, LAI `5.0587602356164405`, and FTSW -`0.7991179101191216`. The prerequisite validation recorded 2,005 -PlantSimEngine tests, 268 PlantBiophysics tests, 307 XPalm tests, and 68 XPalm -numerical-regression tests passing. These are pre-change baselines; every -compiler/runtime slice implemented under this goal must still rerun its -relevant tests, and final acceptance requires fresh complete validation. - -One architectural limitation deliberately remains in scope here: the current -`CompiledModelApplication`, `CompiledModelInputBinding`, and -`CompiledModelCallBinding` values still contain mutable object-id vectors. -`CallTargets.execution_batches` is a lifecycle-refreshed runtime cache, not the -future immutable scenario plan itself. This goal must separate those fixed -declarations from mutable membership while preserving the accepted typed -hard-call execution path. - -## Phase 0: Reconcile With The Completed Hard-Call Performance Work - -- [x] Inspect the archived final hard-call goal, its implementation commits, - and the retained benchmark acceptance record. -- [x] Identify the current ownership boundary: fixed call rules remain mixed - with mutable `callee_object_ids`/`callee_application_ids` in - `CompiledModelCallBinding`, while `CallTargets.execution_batches` caches the - lifecycle-refreshed typed execution targets. -- [x] Record the accepted PlantBiophysics and XPalm performance, allocation, - numerical, and test baselines that must not regress. -- [x] Define the shared boundary between the scenario plan, lifecycle delta, - root execution batches, and hard-call buffers. -- [x] Move fixed call definitions into the immutable scenario plan and mutable - resolved call membership into runtime topology state without replacing the - accepted typed `CompiledExecutionBatch` fast path. -- [x] Ensure this goal does not create separate object-change journals, - revision systems, selector compilers, or target-buffer update protocols for - root execution and hard calls. -- [x] Preserve the hard-call goal's correctness, publication, nested-call, - selective-execution, and performance requirements. -- [x] Record prerequisite ordering: hard-call optimization and downstream - acceptance are complete; immutable-scenario work begins from commit - `355e143c` or later and owns subsequent shared compiler/runtime refactoring. - -## Phase 1: Establish Baselines And Work Counters - -- [x] Preserve the pinned PlantBiophysics/XPalm release runners, accepted raw - performance record, typed hard-call microbenchmarks, and benchmark API smoke - tests added by the completed prerequisite work. -- [x] Record the exact branch, commit, Julia version, thread count, CPU context, - dependency versions, benchmark parameters, output policy, warm-up policy, - sample count, and relevant package SHAs for this goal's pre-change baseline. -- [x] Add or preserve one-setup/many-timestep steady-state benchmarks for: - - `outputs=:none` with no temporal dependency; - - temporal inputs with bounded dependency streams; - - one and several explicit `OutputRequest`s; - - `outputs=:all`; - - many applications with mixed cadences; - - homogeneous targets and targets split by overrides or environment type. -- [x] Keep construction and initial compilation outside warmed step timings. -- [x] Add lifecycle benchmarks for one and several objects covering: - - registration/growth; - - removal of one object and a subtree; - - reparenting of one object and a subtree; - - geometry movement and inherited-geometry invalidation. -- [x] Measure selector resolution separately for `SceneScope`, `Scope`, - `Subtree`, `SelfPlant`, `Ancestor`, and every `Relation` variant used by - lifecycle refresh. -- [x] Record total time, time per timestep/event, allocations, allocated bytes, - and runtime work counters. -- [x] Add counters that distinguish immutable-plan compilation from mutable - target instantiation and target-buffer updates. -- [x] Record the current branch-head baseline before changing behavior. Reuse - the pinned runners and accepted comparison as historical controls, but do - not substitute the `d5480c50` measurements for a fresh starting-point run. -- [x] Commit the benchmark harness and focused regression tests as the first - coherent slice. - -### Fresh immutable-scenario baseline (2026-08-11) - -This pre-change baseline was recorded on branch `multi-plants` at -`eb87938235472484b54956c8c86db1b7e5a9f104` plus the counter-only benchmark -instrumentation in the first implementation slice. The machine was an Apple -M3 Max MacBook Pro with 36 GiB RAM, Darwin 25.5.0 on arm64. Julia 1.12.1 used -10 threads while scientific execution remained sequential. The benchmark -environment used PlantSimEngine 0.15.0, BenchmarkTools 1.8.0, and -`benchmark/Manifest.toml` SHA-256 -`658c36d6259dd4ff287a19db97c80335af2e0ad242419a690f144fee97362936`. - -The workload contains 256 homogeneous hourly leaf producers and one daily -plant consumer reading all leaf values through `PreviousTimeStep`. Each timing -uses one already constructed simulation after one untimed setup step, then -times 48 continuous `continue!` steps. BenchmarkTools performed its normal -warm-up; results are medians of 10 samples with one evaluation per sample. -Construction is reported separately. The explicit-request case retains one -hourly `HoldLast` request over all leaves; output collection is excluded. - -| Output policy/workload | Median total | Median per step | Allocations | Allocated bytes | -| --- | ---: | ---: | ---: | ---: | -| construction and initial one-step run, `outputs=:none` | 4.306 ms | not applicable | 54,276 | 3,073,520 | -| 48 warmed steps, `outputs=:none` | 1.704 ms | 35.502 us | 1,888 | 117,760 | -| 48 warmed steps, one explicit request | 9.481 ms | 197.516 us | 179,183 | 8,340,640 | -| 48 warmed steps, `outputs=:all` | 2.830 ms | 58.961 us | 89,086 | 4,909,056 | - -The opt-in work counters cover 49 total steps including setup. Every policy -visited 98 application groups, 98 batches, and 12,593 nominal batch targets. -This proves two current steady-state costs that later phases must remove: - -- `_refresh_output_request_targets!` was called 51 times for every policy even - though topology never changed; -- the explicit request performed 51 full selector resolutions, consuming - 6.402 ms in one representative instrumented run; -- the daily application's group, batch, and nominal targets were counted on - every hourly step even when the application was not due. - -The benchmark API smoke passed 16/16 and the focused runtime/instrumentation -suite passed 322/322. The rest of the matrix was completed at the relevant -implementation milestones rather than duplicated in the initial harness: -PlantBiophysics covers no-temporal one-setup execution, the immutable-scenario -harness covers bounded temporal inputs and none/requested/all retention, XPalm -covers several explicit requests and lifecycle growth, the event-driven -benchmark covers mixed cadences, and the prerequisite hard-call matrix covers -homogeneous and heterogeneous execution/environment batches. Phase 5 records -isolated add, remove, reparent, and move events at two scene sizes. Phase 6 -records allocation-free compiled matcher checks; the final public-resolution -microbenchmark records time and allocation for every supported scope and -relation family. - -## Phase 2: Remove Unnecessary Steady-State Work - -### Output-request targets - -- [x] Stop calling `_refresh_output_request_targets!` on an unchanged topology. -- [x] Give output-request target state an observed topology generation or - lifecycle-event cursor. -- [x] Refresh request membership only when a relevant lifecycle delta exists. -- [x] Preserve the history of removed objects and define explicit start/end - membership semantics for objects that enter or leave a selector after - reparenting. -- [x] Test that a long unchanged simulation performs zero output-selector - resolutions after initialization. -- [x] Test additions, removals, reparenting, continuation, and collection of - historical intervals. - -### Scheduler traversal - -- [x] Evaluate cadence once per application execution group, not once per - heterogeneous batch. -- [x] Replace the four-condition dirty check after each application with one - safe mutation-generation comparison or an equivalent single cheap signal. -- [x] Preserve immediate refresh after an application mutates structure. -- [x] Preserve the rule that newly activated applications may run only if they - remain later in the current timestep. -- [x] Add allocation and visit-count gates for an unchanged timestep. -- [x] Commit these steady-state removals as one validated slice. - -### First steady-state cleanup result (2026-08-11) - -An observed model revision now gates output-request target refresh, and the -root scheduler evaluates cadence before entering an application's batches. -Using the identical baseline workload and 10-sample method: - -| Output policy | Median total | Median per step | Allocations | Allocated bytes | Baseline speedup | -| --- | ---: | ---: | ---: | ---: | ---: | -| `outputs=:none` | 1.692 ms | 35.247 us | 1,712 | 90,080 | 1.01x | -| one explicit request | 2.820 ms | 58.746 us | 88,752 | 4,878,304 | 3.36x | -| `outputs=:all` | 2.604 ms | 54.247 us | 88,766 | 4,879,072 | 1.09x | - -Across 49 total steps, the scheduler still considered 98 application groups, -but entered only 52 due groups/batches and 12,547 due targets instead of -counting all 12,593 nominal targets. Unchanged output-request target refreshes -and selector resolutions both fell from 51 to zero. Registering one new leaf -then caused exactly one incremental object check, and its requested output -began at the lifecycle entry step. - -Output-request targets now retain explicit membership intervals. A topology -barrier closes an interval at the current step when the requested producer has -already run, or at the previous completed step when it has not. Re-entry opens -a new interval at the corresponding next eligible step and records the -object's current value as that interval's initial sample. Collection consumes -these intervals directly, so removed objects retain history and reparented -objects cannot leak samples from periods when they were outside the selector. - -## Phase 3: Compile A Truly Immutable Scenario Plan - -- [x] Introduce a scenario-level plan that owns immutable application metadata. -- [x] Split fixed declaration fields from the mutable `target_ids`, - `source_ids`, `source_application_ids`, `callee_object_ids`, and - `callee_application_ids` currently stored in `CompiledModelApplication`, - `CompiledModelInputBinding`, and `CompiledModelCallBinding`. -- [x] Compile application identifiers to stable internal indices while keeping - public symbolic identifiers unchanged. -- [x] Compile input-binding templates independently of current consumer objects. -- [x] Represent potential producer applications even when source or consumer - selectors currently match zero objects. -- [x] Preserve explicit `PreviousTimeStep` semantics: it must not add a - same-step or reverse scheduler edge. -- [x] Compile same-object inference as an application-level template plus - object-instantiation validation. New objects must not create new graph - definitions. -- [x] Establish cached homogeneous hard-call execution batches and the warmed - allocation-free bulk/singular public paths. Preserve these as runtime - consumers of the new plan. -- [x] Resolve hard-call ownership, manual-call-only application membership, - selectors, multiplicity, and publication rules once through immutable - application/call templates. Lifecycle refresh may change only the resolved - object membership and cached batches. -- [x] Compile writer/update ordering independently of current target objects - where selector overlap can be established from fixed application rules. -- [x] Define a conservative and documented policy for potential selector - overlap that cannot be proven without an object instance. -- [x] Compile and store the application DAG and stable topological order once. -- [x] Store ordered application plans directly rather than rebuilding an - ordered vector through symbolic dictionary lookups. -- [x] Ensure lifecycle refresh cannot rebuild or mutate the application DAG. -- [x] Add diagnostics that separately expose immutable application plans and - current object target counts. -- [x] Test applications that start with zero targets and acquire objects later. -- [x] Test ambiguity and cycle errors at the earliest sound validation point. -- [x] Commit the immutable scenario-plan implementation as a coherent slice. - -`CompiledScenarioPlan` now owns a stable tuple of `CompiledApplicationPlan` -values and the immutable timeline definition. Each application plan has a -dense, compilation-order slot while preserving its public symbolic id. -`CompiledModelApplication` contains only that fixed plan and its mutable -object-target vector, and lifecycle additions/removals reuse the exact same -scenario/application plan objects. Focused coverage starts an application at -zero leaf targets, adds a matching object, removes it again, and checks that -only the target vector and diagnostic target count change. - -Authored inputs, potential same-object inference, and hard calls are now -compiled into consumer-independent `CompiledModelInputPlan` and -`CompiledModelCallPlan` values. Runtime input/call bindings retain only their -plan, consumer id, resolved object/application membership, carrier/policy -state, and call-target membership. New objects instantiate those existing -plans rather than rereading `ModelSpec`; potential same-object producers are -present even when both applications initially have zero targets. The runtime -application id index is an immutable `NamedTuple` of mutable application-state -references, which also preserves the existing warmed temporal allocation -gate after the plan split. - -### Static scenario DAG completion (2026-08-12) - -The scenario plan now derives potential input producers and hard-call callees -from fixed application declarations even when no object currently matches a -selector. It freezes direct hard-call ownership, manual-call-only membership, -application dependency children, and stable topological order as tuples and -`NamedTuple`s. Nested call targets are ordered through their root scheduled -owner. `PreviousTimeStep` plans retain their source metadata but contribute no -same-step edge. Writer/update edges are compiled from authored output/update -rules and fixed selector-label overlap; scale, kind, species, and name can -prove disjointness, while cases depending on topology, scope, relations, or -current membership conservatively remain potential overlaps. - -`CompiledScenarioPlan.ordered_application_plans` contains only immutable -`CompiledApplicationPlan` values. The corresponding ordered tuple of mutable -`CompiledModelApplication` target state lives on `CompiledCompositeModel` and -is reused directly by root execution and lifecycle refresh. Additions, -removals, and reparenting reuse the exact scenario DAG/order objects and no -longer rebuild call ownership, application children, or topological order. -Initial performance diagnostics now report immutable application/input/call -plan counts and time `scenario_plan_compile` separately from runtime target, -binding, status-view, and execution-target construction. - -Pre-commit validation passed 1,603 focused assertions: application/API -stabilization 402, hard calls 85, `PreviousTimeStep` views 60, unified -model/object behavior 677, graph view 181, binding inference 16, -configuration errors 6, multirate integration 13, output boundaries 20, -environment backends 9, numerical parity 23, status initialization 28, time -validation 13, runtime matrix 10, environment sampling 15, temporal reducers -10, and immutable-scenario benchmark API smoke 35. These are slice-level -gates, not a substitute for the complete package and downstream acceptance -runs required later in the goal. - -## Phase 4: Compile An Event-Driven Multirate Schedule - -- [x] Compile immutable clock/cadence definitions into a schedule that selects - only applications due at the current base step. -- [x] Use a schedule wheel, next-due-step table, or another allocation-free - design appropriate for the supported clock representation. -- [x] Preserve stable topological order among applications due on the same - timestep. -- [x] Preserve phase semantics and Dates-based duration conversion. -- [x] Ensure a lifecycle refresh changes current target buffers without - rebuilding cadence definitions. -- [x] Ensure a newly activated application runs in the current timestep only - when it is due and remains after the mutation barrier. -- [x] Add visit-count tests proving that non-due application groups and their - batches are not traversed. -- [x] Benchmark many small applications at several cadences. -- [x] Commit the event-driven scheduler as a coherent slice. - -### Event-driven scheduler implementation (2026-08-12) - -`CompiledScenarioPlan.application_schedule` now stores immutable root cadence -entries in stable topological order. Applications with `dt <= 1` use an -always-due list, exact integer clocks use a reusable next-due-step table and -binary min-heap, and general real-valued clocks retain the prior modulo and -phase semantics through a generic fallback. The due-index buffer, periodic -heap, and topological-order restoration are allocation-free after schedule -initialization. Manual-call-only applications remain outside the root -schedule. - -`CompiledExecutionPlan` holds only the mutable schedule cursor and a dense -application-slot-to-current-group table. Lifecycle refresh reuses the exact -schedule cursor while replacing or updating current target groups. The root -loop traverses only due application slots; a due slot with no current targets -costs one slot lookup and does not traverse an execution group or batch. -Within-step growth can activate a due application later in topological order, -while an application whose mutation barrier has already passed waits for its -next due timestep. Output-request membership boundaries use that same static -barrier prefix. - -Diagnostics now report `schedule_entry_index`, `schedule_kind`, integer period -and phase when applicable, and whether dispatch is event-driven. Performance -counters distinguish initial schedule-entry compilation, schedule dispatches, -due entries, generic-clock checks, and visited execution groups. On the -existing 49-step immutable-scenario smoke, considered groups fell from 98 to -52 while due groups, batches, 199 target visits, and final results remained -unchanged. - -A 5-sample warmed, uninstrumented benchmark with setup excluded and one -evaluation per sample used 64 one-target applications cycling through 1, 2, 3, -4, 6, 8, 12, and 24-hour cadences over 240 steps. The complete continuation -had an 89.100 ms median, 33,228 allocations, and 134,139,968 allocated bytes. -The scheduler selected 4,800 due application visits rather than scanning -15,360 execution groups. A direct warmed measurement of the due-index selector -itself reported zero allocations on every tested step. - -Pre-commit validation passed 1,422 focused assertions: application/API -stabilization 408, hard calls 88, multirate integration 42, time validation 13, -output boundaries 20, `PreviousTimeStep` views 60, environment sampling 15, -temporal reducers 10, runtime matrix 10, numerical parity 23, unified -model/object behavior 679, and immutable-scenario benchmark API smoke 54. The -unified lifecycle expectation was deliberately updated so an application -before the mutation barrier runs on the next timestep rather than rewinding -the current step. Exact-integer heap dispatch was additionally checked against -the prior clock predicate for periods 2 through 12 and phases -24 through 24. - -## Phase 5: Introduce A Shared Lifecycle Delta - -- [x] Replace coarse dirty sets with a structured append-only delta or event - journal containing, as applicable: - - added object ids and labels; - - removed object ids and previous topology information; - - reparented roots, descendants, old parents, and new parents; - - moved objects and old/new geometry sources; - - one structural generation and one environment generation per committed - barrier. -- [x] Make application targets, input carriers, temporal input state, - environment handles, output-request targets, root execution batches, and - hard-call target buffers consume the same lifecycle delta. -- [x] Preserve the current incremental append path for monotonic `Many` - hard-call additions, or replace it only with a measured delta-based path that - retains its ordering and allocation advantages. -- [x] Stage updates while kernels execute and apply them only at the existing - refresh barrier. -- [x] Never mutate a target buffer while it is being iterated. -- [x] Add bulk internal operations for registering several objects, deleting a - subtree, and marking a reparented subtree once. -- [x] Validate a subtree once before removal rather than recursively validating - every child. -- [x] Avoid incrementing model/environment revisions once per descendant. -- [x] Preserve object-id ordering, multiplicity checks, removed-object history, - template/instance rules, and MTG identifier bookkeeping. -- [x] Test organ creation after temporal buffers already exist: resize or - replace affected `Many` storage at the lifecycle barrier, use the compiled - initial value when the new organ has no previous sample, and read its normal - temporal buffer from the following timestep onward. -- [x] Prove that lifecycle refresh work is proportional to the affected delta - and selector dependencies, not total objects or applications. -- [x] Commit lifecycle journaling and bulk refresh as a coherent slice. - -### Shared lifecycle delta completion (2026-08-12) - -`CompositeModel` now owns one `LifecycleDelta` journal instead of separate -structural and environment dirty-object sets. Added and removed objects carry -label, topology, ancestry, and geometry snapshots; reparent events retain the -old and new parent plus the affected subtree; move events retain old/new -geometry and every object inheriting that geometry. One pending structural -generation and one pending environment generation are recorded per refresh -barrier, including when a subtree contains many descendants. - -The same delta now drives application targets, value carriers, temporal state, -output-request membership, direct output-stream initialization, environment -handles, root execution groups, and cached hard-call targets. Structural and -environment consumers can consume their parts at different times without -losing append-only event data. Bulk object registration records one addition -barrier, while subtree removal and reparenting compute and validate descendants -once before applying one refresh notification. Mutations remain staged until -the existing post-application barrier, so no iterated target buffer is mutated -in place. - -The temporal lifecycle regression starts with populated `PreviousTimeStep` -buffers, creates a new MTG-backed leaf, observes its compiled initial value on -the first eligible read, and observes its normal temporal sample on the next -timestep. Removed-object streams remain retained. Partial-consumption tests -also prove that a binding-only refresh followed by another addition neither -duplicates nor drops targets. - -Isolated lifecycle-barrier allocations stayed effectively constant between -scenes with 8 and 2,048 leaves per plant: - -| Operation | 8 leaves | 2,048 leaves | -| --- | ---: | ---: | -| monotonic addition | 37,136 bytes | 37,776 bytes | -| removal | 42,144 bytes | 43,248 bytes | -| reparenting | 59,200 bytes | 60,608 bytes | -| movement | 19,328 bytes | 19,712 bytes | - -The addition case deliberately uses an object id that appends in stable object -order. A non-monotonic insertion correctly rebuilds the affected `Many` -selector/carrier and therefore scales with that selector dependency rather -than taking the append fast path. - -Focused validation passed 1,431 assertions: application/API stabilization -490, hard calls 88, lifecycle benchmark API smoke 25, immutable-scenario -benchmark API smoke 54, `PreviousTimeStep` views 60, environment backends 9, -output boundaries 20, and unified model/object behavior 685. `git diff ---check` also passed before the checkpoint commit. - -## Phase 6: Compile Selectors And Reverse Dependency Indices - -- [x] Normalize immutable selector criteria into compiled matcher objects or - typed predicates. -- [x] Resolve named `Scope` roots once and use ancestor membership instead of - materializing a descendant `Set` for single-object membership tests. -- [x] Add allocation-free relation membership predicates for `self`, `parent`, - `children`, `ancestors`, `descendants`, and `siblings`. -- [x] Compile reverse candidate indices for application target selectors using - `scale`, `kind`, `species`, `name`, scope anchors, and wildcard classes. -- [x] Extend dynamic input/call binding indices beyond the current scale-only - coarse filter when measurements justify it. -- [x] Track which scoped bindings may be affected by a reparented subtree. -- [x] Preserve exact `One`, `OptionalOne`, `Many`, scope, topology, application, - process, and stable-order semantics. -- [x] Add allocation tests for matching one added object against a large scene. -- [x] Commit selector compilation and reverse indices as a coherent slice. - -### Compiled-selector and reverse-index result (2026-08-12) - -`CompiledSelectorMatcher` now stores normalized label criteria, topology scope, -typed relation dispatch, and default-context behavior once per immutable -application, input, call, or output-request declaration. Named `Scope` values -become `CompiledNamedScope` values with a stable root `ObjectId`. Single-object -membership therefore uses cached ancestor paths directly instead of rebuilding -descendant sets, and all six relation predicates execute without allocation in -the focused matcher tests. - -`SelectorCandidateIndex` partitions application plans and lifecycle-maintained -input/call bindings by `scale`, `kind`, `species`, `name`, scope anchor, or a -conservative wildcard. A lifecycle addition now tests only the union of the -new object's label and ancestor buckets. Reparenting combines the new ancestry -with bindings forced by the object's old source/call membership, so entering -and leaving scoped selectors both remain exact without a scene-wide scan. -Output requests also retain their compiled matchers for later lifecycle -refreshes. - -On a scene with 64 independent plants, adding one leaf examined one of two -application plans and one of 64 plant input bindings. Reparenting a leaf from -plant 1 to plant 2 examined one application plan and exactly the two affected -input bindings; the old carrier became empty and the new carrier contained -both leaves in stable order. The equivalent hard-call reparent test examined -one reverse call-binding candidate on entry, while exit used its recorded old -membership without another reverse candidate. - -Every compiled matcher check across `Self`, `Subtree`, `SelfPlant`, generic and -scaled `Ancestor`, named `Scope`, and every supported `Relation` allocated zero -bytes. The warmed incremental refresh allocated 39,152 bytes for an 8-plant -scene and 56,208 bytes for a 2,048-plant scene, a 17,056-byte increase rather -than growth proportional to total objects or bindings. - -Focused validation passed 1,014 assertions: API stabilization 598, hard calls -92, graph views 181, `PreviousTimeStep` views 60, environment backends 9, -output boundaries 20, and immutable-scenario benchmark smoke 54. The broader -unified model/object integration file also passed 685/685, and `git diff ---check` passed before the checkpoint commit. - -## Phase 7: Compile Output And Environment Runtime Sinks - -### Outputs - -- [x] Extend direct typed runtime output bindings to requested and - `outputs=:all` historical streams, not only dependency-only streams. -- [x] Publish through precompiled stream/reference tuples without per-target - stream-key dictionary lookup. -- [x] Compile per-application retention variables and publication capability - into application/batch plans. -- [x] Preserve bounded temporal dependency buffers, unbounded requested - history, stream-only routing, type-stability errors, and removed-object - history. -- [x] Ensure lifecycle-created targets receive correctly initialized output - sinks and membership intervals. - -#### Direct output-sink result (2026-08-12) - -Every retained target output now owns a typed `RuntimeOutputStream` that points -directly to both its status reference and its initialized stream. This applies -uniformly to bounded dependency buffers, explicit requests, `outputs=:all`, -root-scheduled applications, bulk hard calls, and selectively materialized -`CallTarget`s. The execution loop publishes the precompiled tuple recursively; -the obsolete per-target dictionary publisher and its duplicate retention maps -were removed. - -Each `CompiledExecutionBatch` now carries one `CompiledOutputPublication` -value with the application's stable retained-variable tuple and an enabled -flag. `outputs=:none` therefore skips publication at the batch boundary, while -retaining output no longer performs application or stream-key dictionary -lookups inside the target loop. Immediate hard-call targets created after a -lifecycle mutation initialize any missing retained stream before materializing -their direct binding; the normal lifecycle barrier continues to initialize -membership intervals and preserves removed-object history. - -Using the same warmed 256-leaf, 48-step, 10-sample benchmark on the output-sink -parent commit: - -| Output policy | Before | After | Speedup | Allocations before/after | Bytes before/after | -| --- | ---: | ---: | ---: | ---: | ---: | -| `outputs=:none` | 1.794 ms | 1.820 ms | 0.99x | 1,374 / 1,374 | 118,784 / 121,152 | -| one explicit request | 3.543 ms | 1.846 ms | 1.92x | 76,174 / 2,398 | 3,728,128 / 977,216 | -| `outputs=:all` | 3.206 ms | 1.813 ms | 1.77x | 76,186 / 2,398 | 3,728,608 / 977,248 | - -Requested and all-output allocations fell by 96.85% and allocated bytes by -73.79%. The no-retention allocation count was unchanged; its small timing and -byte differences are within the noise/capacity variation of these short -samples. Direct publication itself allocates zero bytes in the focused test. - -The fresh output-focused matrix passed 794 assertions across API -stabilization, requested/all/none outputs, lifecycle membership, bounded -`PreviousTimeStep` storage, hard-call publication, and type-stability errors. -The immutable-scenario benchmark smoke also passed 54/54, and `git diff ---check` passed before the output-sink checkpoint commit. - -### Environment - -- [x] Split immutable per-application environment information from mutable - per-object handles. -- [x] Store backend selection, required/source/produced variables, sampling - rules, prepared sources, and sampler objects once per application plan. -- [x] Keep only handle, context, geometry source, and other genuinely - object-dependent state in target bindings. -- [x] Add reverse indices from object to existing environment bindings so - targeted refresh does not scan every application for each dirty object. -- [x] Benchmark the hash-based per-step global sample cache. Bypass it at the - root application-batch boundary, where direct typed sampling removes the - measurable cost; retain it only as a fallback for individual target/call - lookups, where application slots are not yet justified. -- [x] Preserve transient hard-call environment overrides and accepted - environment commits. -- [x] Commit output and environment sink optimization in separate validated - slices unless they require one shared internal representation. - -#### Immutable environment-plan result (2026-08-12) - -Environment compilation now produces one `CompiledEnvironmentApplicationPlan` -per immutable application. It owns backend/config selection, immutable tuples -of required, source, and produced variables, the declared sampling-rule tuple, -typed `CompiledEnvironmentSamplingRule` accessors, the temporal sampler, and -the prepared global source. Each `CompiledEnvironmentBinding` delegates that -shared metadata to its plan and retains only its object id, backend handle, -execution context, and geometry-source provenance. - -`CompiledEnvironmentBindings` now maintains `targets_by_object`. A targeted -geometry or lifecycle refresh gets stale bindings and relevant spatial -backends from the dirty object's current and prior targets; it no longer scans -the complete immutable application graph. Added targets reuse the same -application-plan objects, removed targets are deleted from the reverse index, -and metadata-only recompilation can replace a plan while preserving valid -object handles. - -Global batch sampling now reads the prepared source and applies typed compiled -accessors directly. It therefore returns a concrete model-facing environment -before entering the target loop and bypasses the hash cache used by fallback -individual target/hard-call sampling. Transient `GlobalConstant` trial states -use the same compiled mapping; custom spatial backends continue to dispatch -through their backend-specific sampling methods, and accepted commits still -use the target's compiled backend and handle. - -On the warmed 256-object, 48-step global-environment benchmark (10-sample -baseline and 20-sample final confirmation): - -| Environment path | Before | After | Allocations before/after | Bytes before/after | -| --- | ---: | ---: | ---: | ---: | -| direct raw source | 0.313 ms | 0.316 ms | 336 / 336 | 52,224 / 52,224 | -| remapped source | 0.608 ms | 0.349 ms | 26,304 / 336 | 1,900,032 / 72,192 | - -The remapped path is 1.74x faster, removes 98.72% of its allocations and -96.20% of allocated bytes, and now has the same allocation count as the raw -path. Its overhead relative to raw sampling fell from 94% to 10%, so adding a -dense application-slot cache at this stage would not target a remaining -measurable root-loop bottleneck. - -Fresh validation passed 2,126 assertions across environment backends and -sampling, API/lifecycle stabilization, hard calls, unified model/object -behavior, graph views and editor transactions, toy spatial/global providers, -the MAESPA model example, and the immutable-scenario benchmark smoke. `git -diff --check` also passed. - -## Phase 8: Evaluate Dense Internal Slots - -Perform this phase only if profiles show tuple-key dictionaries or repeated -static metadata remain important after the preceding work. - -- [x] Reuse each immutable application's existing dense compilation-order - `slot`; the runtime schedule already indexes execution groups by this slot. -- [x] Evaluate a stable monotonic runtime object slot. Do not introduce one - while current profiles show no hot `ObjectId` dictionary lookup and current - memory growth is linear. -- [x] Confirm vector/slot-indexed lookup is already used where it outperforms - dictionaries in the hot root schedule; keep dictionaries at cold/lifecycle - and public-id boundaries. -- [x] Preserve removed-object output ownership through stable public - `ObjectId` stream keys; no tombstone slot layer is needed without an object - slot migration. -- [x] Avoid duplicating selectors, policies, model contracts, environment - metadata, or output schemas in every object-level binding instance through - the application/input/call/output/environment plans compiled above. -- [x] Preserve heterogeneous object/status/model support and split typed - execution batches only when runtime types genuinely differ. -- [x] Measure memory as well as time for large object counts. -- [x] Do not create a speculative dense-slot change or commit: the profiling - gate did not justify one. - -### Dense-slot decision (2026-08-12) - -Application slots are already part of `CompiledApplicationPlan`, schedule -entries store `application_slot`, and `CompiledExecutionPlan` holds a dense -`groups_by_application_slot` vector. A warmed 100,000-step CPU profile of the -256-object `outputs=:none`, `performance=false` workload found no tuple-key or -`ObjectId` dictionary lookup among the 40 hottest PlantSimEngine frames. -Samples were concentrated in typed batch execution, reusable `RunContext` -preparation, and bounded temporal-buffer access. - -A full-allocation profile of another 48 warmed steps recorded 1,683 -allocations and 133,577 bytes across Julia and PlantSimEngine. PlantSimEngine -frames resolved to the compiled batch boundary, `PreviousTimeStep` `Many` -value assignment, and no-op performance-counter call sites; none resolved to a -dictionary lookup or repeated static-plan construction. Dense object slots -would therefore not address the observed steady-state allocation sources. - -Combined reachable runtime memory for `(model, compiled environment, -execution plan, temporal streams)` was 44,256 bytes for 9 objects, 1,019,424 -bytes for 257 objects, and 6,945,624 bytes for 2,049 objects. The immutable -scenario plan remained exactly 1,968 bytes at all three sizes. Incremental -memory was approximately 3.9 KiB per added object from 9 to 257 objects and -3.2 KiB per object from 257 to 2,049 objects, with no super-linear growth. - -Consequently, a second object identity and tombstone layer would add lifecycle -coordination and retained-history complexity without a profile-backed hot -lookup or memory-scaling problem. Phase 8 is complete as a measured no-change -decision; dense object slots should be reconsidered only if a later profile -identifies public-id dictionaries as a material cost. - -The final XPalm acceptance profile did identify one different dense-index -opportunity: lifecycle refresh was retrieving immutable input/call plan tuples -from a `NamedTuple` through runtime symbolic property dispatch. Reusing the -already compiled application slot for that lookup removed the dispatch without -introducing an object slot, changing public ids, or duplicating plan metadata. -This is the application-slot reuse required by the first Phase 8 item, not the -deferred object-slot migration. - -## Phase 9: Full Validation And Documentation - -- [x] Preserve the prerequisite acceptance record: PlantSimEngine 2,005/2,005, - PlantBiophysics 268/268, XPalm 307/307, XPalm numerical regression 68/68, - exact PlantBiophysics retained trajectory, and exact XPalm final reference. - These counts establish the pre-change boundary and do not satisfy the fresh - final runs below. -- [x] Run focused tests after each compiler/runtime slice covering: - - one object and many objects; - - same-object and cross-object inputs; - - `One`, `OptionalOne`, and `Many`; - - temporal policies and `PreviousTimeStep`; - - hard calls, nested calls, selective execution, and publication; - - duplicate writers and `Updates`; - - global and spatial environments; - - addition, removal, reparenting, movement, and subtree operations; - - templates, instances, and overrides; - - output requests, `outputs=:all`, `outputs=:none`, and removed-object history; - - generic numeric and status value types. -- [x] Run the complete PlantSimEngine test suite. -- [x] Run the complete PlantBiophysics test suite against the local checkout. -- [x] Run the complete XPalm test suite and established 4,160-step numerical - regression against the local checkout. -- [x] Compare representative full trajectories, not only final scalar values, - for changes touching time, outputs, environment sampling, or lifecycle. -- [x] Run fair warmed multi-timestep PlantBiophysics and XPalm benchmarks after - the major implementation milestones. -- [x] Update diagnostics to distinguish immutable plan compilation, object - target instantiation, lifecycle buffer updates, and steady-state execution. -- [x] Update developer documentation for the immutable-plan/mutable-state - architecture and lifecycle barrier. -- [x] Evaluate benchmark CI and retain artifact-only reporting until runner - baselines are stable enough to support non-brittle thresholds. -- [x] Update the installed PlantSimEngine skill if the resulting public or - advanced compiler contract changes. -- [x] Remove temporary diagnostics and benchmark-only implementation hooks. -- [x] Record final commands, SHAs, benchmark methodology, raw results, ratios, - allocation counts, and validation boundaries. - -### Final acceptance record (2026-08-12) - -The final source benchmark and validation commit is -`b0617ba1a538d8b1e547d471e971ae998a2ff318` on `multi-plants`, with -PlantBiophysics `dbd04e0e9c4de4e061272aaa3885b5be0b9b51d3` and XPalm -`192e43f766150072376bea8910936f85511121ed`. Measurements used Julia 1.12.1 -on the same Apple M3 Max MacBook Pro with 36 GiB RAM and arm64 Darwin 25.5.0 -used for the baseline. The PlantBiophysics runner forced one Julia thread; -XPalm used 10 threads while its scientific application execution remained -sequential. - -All Julia processes and child test/benchmark processes were launched through -Kaimon. The final correctness boundary is: - -| Validation | Result | Wall time | -| --- | ---: | ---: | -| focused immutable-plan/lifecycle/API stabilization | 611/611 | 69.4 s | -| warmed hard-call allocation/API smoke | 38/38 | 27.5 s | -| complete PlantSimEngine suite | 2,414/2,414 | 12 min 31.1 s | -| complete PlantBiophysics suite | 268/268 | 1 min 43.0 s | -| complete XPalm suite | 307/307 | individual testset timings retained in the test log | -| XPalm 4,160-step numerical regression | 68/68 | 3 min 22.2 s | - -The full Documenter build, including doctests, cross-references, and HTML -rendering, passed after the diagnostics/documentation slice; the final source -changes affect only internal representation and access paths. `git diff ---check` passed after every final source slice. - -#### Final PlantBiophysics benchmark and trajectory - -The final one-thread run used one constructed scene for 8,760 continuous -timesteps, 10 BenchmarkTools samples, one evaluation per sample, and excluded -construction from the two steady-state timings. The 100-scene fan-out remains -a separate construction/execution diagnostic. - -| Stage | Median | Minimum | Median per model step | Allocated bytes | Allocations | -| --- | ---: | ---: | ---: | ---: | ---: | -| `outputs=:none`, 8,760 steps | 14.399 ms | 13.511 ms | 1.644 us | 13,968,656 | 176,498 | -| `outputs=:all`, 8,760 steps | 14.821 ms | 13.704 ms | 1.692 us | 20,285,040 | 194,166 | -| construction only | 16.099 ms | 15.389 ms | not applicable | 20,256,464 | 462,611 | -| 100 constructed scenes, one step each | 29.246 ms | 27.442 ms | 292.458 us | 27,030,400 | 274,700 | - -Relative to the accepted prerequisite current-stack result, the final -no-retention workload is 1.279x faster and the retain-all workload is 2.174x -faster. The independently materialized retained trajectory contains 113,880 -rows and has SHA-256 -`c7c2cfc17c25b4eed9829280287e3a5ac8c7ccb571bf20dad5b1edd6bd970115`, -exactly matching both the pre-optimization trajectory and the prerequisite -acceptance artifact. - -#### Final XPalm full-cycle benchmark - -The final XPalm comparison used the exact pinned release methodology: one -unmeasured complete lifecycle warm-up, then five BenchmarkTools samples with -one evaluation each and a forced 120-second budget. Each sample times the same -high-level `XPalm.xpalm` scope, including scene construction, 4,160 growth and -execution steps, requested outputs, and DataFrame materialization. Julia -startup, package loading, and the warm-up are excluded. - -| Stack | Median | Per step | Allocated bytes | Allocations | Release ratio | -| --- | ---: | ---: | ---: | ---: | ---: | -| pinned XPalm 0.6.1 / PlantSimEngine 0.14.1 | 5.416 s | 1.302 ms | 6,898,039,968 | 80,317,174 | 1.000x | -| accepted prerequisite current stack | 8.035 s | 1.931 ms | 3,378,642,888 | 39,259,563 | 1.483x | -| final immutable-scenario stack | **7.756 s** | **1.864 ms** | 4,394,830,168 | 54,021,601 | **1.432x** | - -Final raw sample times, in execution order, were `7.755657666`, -`7.742372875`, `7.836337291`, `7.679069208`, and `7.771110958` seconds. The -median is 3.47% faster than the accepted prerequisite current stack and stays -inside the approximately 1.5x release boundary. The final result remains -exactly step 4,160, 344 phytomers, LAI `5.0587602356164405`, and FTSW -`0.7991179101191216`. - -Final profiling caught two representation costs before acceptance. Making the -complete immutable scenario tuple part of an immutable -`CompiledCompositeModel` caused Julia to box and copy that large wrapper at -dynamic typed-batch boundaries: the fully warmed median was 18.980 s with -6,412,926,232 bytes. Commit `962afc29` retained immutable scenario/application -plans but gave their mutable runtime shell stable heap identity, reducing the -median to 9.113 s. A second allocation profile found runtime-symbol forwarding -through immutable application/input/call/environment plans. Commit `b0617ba1` -uses the existing dense application slot for plan-tuple lookup and explicit -field access for the wrapper delegates, without changing plan immutability or -duplicating metadata; this produced the final 7.756-second result. - -#### Selector-family microbenchmark - -Public `resolve_object_ids` resolution was warmed and measured separately on a -seven-object, two-plant topology with 1,000 samples and one evaluation per -sample. These figures include result-vector construction; the lower-level -compiled single-object matcher checks for the same families remain zero-byte -operations as recorded in Phase 6. - -| Selector family | Median | Allocated bytes | Allocations | -| --- | ---: | ---: | ---: | -| `SceneScope` | 1.709 us | 1,888 | 50 | -| named `Scope` | 2.709 us | 2,960 | 87 | -| `Subtree` | 2.542 us | 2,944 | 86 | -| `SelfPlant` | 2.708 us | 2,992 | 89 | -| `Ancestor` | 2.250 us | 2,576 | 73 | -| `Relation(:self)` | 1.750 us | 1,552 | 34 | -| `Relation(:parent)` | 1.791 us | 1,536 | 33 | -| `Relation(:children)` | 1.875 us | 1,616 | 36 | -| `Relation(:ancestors)` | 2.042 us | 1,680 | 39 | -| `Relation(:descendants)` | 2.500 us | 2,064 | 52 | -| `Relation(:siblings)` | 2.250 us | 1,632 | 36 | - -#### Diagnostics, documentation, CI, and reproducibility boundary - -`Diagnostics.explain_runtime_performance(simulation)` now groups opt-in -metrics into immutable-plan compilation, object-target instantiation, initial -compilation total, lifecycle-buffer updates, output collection, and -steady-state execution. Developer documentation records the immutable-plan / -mutable-object-state split, lifecycle barrier, and diagnostic workflow in -`docs/src/dev/composite_model_design.md`, `docs/src/developers.md`, and -`docs/src/model_execution.md`. The installed PlantSimEngine skill was updated -with the diagnostic categories, environment-plan ownership rule, and -validation checklist. - -The benchmark CI review deliberately leaves `.github/workflows/Benchmarks.yml` -and `.github/workflows/FullPerformance.yml` artifact-only: they already run the -appropriate warmed/staged profiles and preserve CSVs and manifests, but the -available runner baseline is not stable enough for a non-brittle wall-time -threshold. Local acceptance therefore uses the pinned release projects and -raw methods recorded above. - -Representative commands, executed through their Kaimon-owned sessions or -Kaimon-owned child processes, were: - -```text -julia --project=test -e 'empty!(ARGS); include("test/runtests.jl")' -julia --project=/path/to/PlantBiophysics/test -e 'empty!(ARGS); include("test/runtests.jl")' -julia --project=/path/to/XPalm/test -e 'empty!(ARGS); include("test/runtests.jl")' -julia --project=/path/to/XPalm/test -e 'ARGS=["reference-regression"]; include("test/runtests.jl")' -run_plantbiophysics_performance_profile(nsteps=8760, fanout_scenes=100, samples=10) -@benchmark xpalm_reference_end_to_end(nsteps=4160) samples=5 evals=1 seconds=120 -``` - -Construction, warmed none/all retention, explicit requests, output -collection, lifecycle refresh, environment refresh, selector resolution, and -end-to-end full-cycle time are intentionally reported in separate benchmark -stages across the Phase 1, 5, 7, and final tables; no fresh-process JIT time is -used as a runtime acceptance result. - -## Commit Checkpoints - -Commit regularly, normally after each validated slice below: - -1. Benchmark harness, work counters, and current baselines. -2. Output-request refresh gating and steady-state scheduler cleanup. -3. Immutable scenario plan and application-level binding templates. -4. Event-driven multirate schedule. -5. Shared lifecycle delta and bulk subtree operations. -6. Compiled selector predicates and reverse indices. -7. Direct output sinks. -8. Application-level environment plans and targeted handle refresh. -9. Dense internal slots, only if justified by profiling. -10. Downstream validation, diagnostics, documentation, and cleanup. - -Before every commit: - -- inspect `git status` and the staged diff; -- preserve and exclude unrelated changes; -- run the smallest relevant correctness and allocation tests; -- run `git diff --check`; -- use a commit message describing one coherent optimization or validation - change. - -## Benchmark Milestones - -Run expensive downstream benchmarks only at these milestones: - -0. **Accepted prerequisite (complete):** retained hard-call/temporal fast-path - results and pinned release comparisons recorded in - `benchmark/release_baselines/README.md`. -1. **Fresh baseline:** at the current branch head, before immutable-scenario - implementation changes. -2. **Steady-state cleanup:** after output-request and scheduler traversal fixes. -3. **Immutable-plan milestone:** after application DAG, schedule definitions, - and binding templates are no longer rebuilt by lifecycle events. -4. **Lifecycle milestone:** after the shared delta updates all runtime buffers. -5. **Output/environment milestone:** after direct sinks and application-level - environment plans are active. -6. **Final acceptance:** after complete PlantSimEngine and downstream tests. - -Additional expensive runs are justified only when profiling identifies a new -bottleneck or a milestone result remains outside the target range. - -## Completion Criteria - -This goal is complete only when all of the following are true: - -- [x] Scenario/application definitions, application dependency edges, - topological order, cadence rules, selector programs, environment sampling - rules, and output-retention requirements are compiled once. -- [x] Lifecycle operations update only affected object-level targets, carriers, - streams, environment handles, and execution buffers at a safe barrier. -- [x] Ordinary unchanged timesteps perform no selector resolution, application - graph reconstruction, topological sorting, output-request target refresh, or - environment-handle reconstruction. -- [x] Non-due multirate applications and their batches are not traversed. -- [x] The ordinary post-lifecycle timestep returns immediately to the same - precompiled steady-state schedule. -- [x] New objects can activate existing application relationships without - constructing new application-level dependency definitions. -- [x] Temporal scalar references and `Many` storage remain allocation-stable - between lifecycle events while still admitting newly created organs at the - refresh barrier with correct first-sample fallback semantics. -- [x] The root runtime and hard-call runtime consume the same lifecycle delta - and immutable scenario ownership model. -- [x] Homogeneous execution loops retain concrete model, status, carrier, - stream, environment, and context types. -- [x] Warmed focused hard-call fast paths remain allocation-free where recorded - by the prerequisite gates, PlantBiophysics retains its exact accepted - trajectory, and XPalm remains no more than approximately 1.5x the pinned - release full-cycle runtime. -- [x] Explicit output requests preserve correct dynamic membership intervals - and removed-object history without steady-state rescans. -- [x] Lifecycle work and allocations scale with the affected structural delta, - not total scene size, except where selector semantics genuinely require a - broader affected set. -- [x] Construction, warmed steady-state execution, explicit output requests, - output collection, lifecycle refresh, environment refresh, and full-cycle - runtime are reported separately. -- [x] All PlantSimEngine tests pass. -- [x] All relevant PlantBiophysics tests pass and representative numerical - trajectories are unchanged. -- [x] All relevant XPalm tests and the established numerical regression pass. -- [x] Benchmark methods, raw results, package SHAs, allocation counts, and - validation commands are recorded reproducibly. -- [x] All relevant changes are committed in coherent increments, with unrelated - worktree changes preserved. - -## Deferred Ideas - -Do not begin these without new profiling evidence and an explicit design -decision: - -- fusing adjacent same-object application kernels; -- struct-of-arrays status storage; -- parallel or distributed execution; -- changing public object ordering semantics; -- compatibility layers for superseded internal compiler types. - -These may eventually benefit from the immutable scenario plan, but they are not -required to complete this goal. From 775144f3b01eb757276cc03b67907acc992aef86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Fri, 28 Aug 2026 17:45:11 +0200 Subject: [PATCH 43/45] Update Project.toml up MTG and PlantMeteo to latest releases (needed for this version, we previously had to use them as dev versions) --- Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 59f321b62..53ae159b0 100644 --- a/Project.toml +++ b/Project.toml @@ -31,8 +31,8 @@ HTTP = "1, 2.0" InteractiveUtils = "1.10" JSON = "1.6.1" Markdown = "1.10" -MultiScaleTreeGraph = "0.15.1" -PlantMeteo = "0.8.2" +MultiScaleTreeGraph = "0.16.0" +PlantMeteo = "0.9.0" Random = "1.10" Statistics = "1.10" Tables = "1" From f2b669d36908d889ee2655a216fae5d775d806f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Sun, 30 Aug 2026 08:47:31 +0200 Subject: [PATCH 44/45] Restore incremental lifecycle performance --- src/composite_model/compilation.jl | 272 +++++++++++++++++- src/composite_model/registry_topology.jl | 4 +- src/composite_model/runtime_outputs.jl | 112 +++++++- src/composite_model/status_conversion.jl | 4 + test/test-model-hard-calls.jl | 7 +- ...t-model-output-destination-declarations.jl | 10 +- 6 files changed, 395 insertions(+), 14 deletions(-) diff --git a/src/composite_model/compilation.jl b/src/composite_model/compilation.jl index e3a09e804..454c96291 100644 --- a/src/composite_model/compilation.jl +++ b/src/composite_model/compilation.jl @@ -1811,6 +1811,8 @@ function _append_added_many_sources!( binding::CompiledModelInputBinding, added_ids, applications_by_object, + applications_by_id, + distributed_outputs, ) binding.multiplicity == :many || return false default_scope = _default_dependency_scope(model, binding.consumer_id) @@ -1852,7 +1854,9 @@ function _append_added_many_sources!( new_source_ids, binding.source_var, binding.process, - binding.application; + binding.application, + distributed_outputs; + applications_by_id=applications_by_id, allow_empty=binding.selector isa OptionalOne, ) end @@ -2060,6 +2064,7 @@ function _extend_model_status_views( rewired_consumer_ids, affected_temporal_keys, previous_temporal_sources, + distributed_outputs, previous_views=compiled.status_views_by_target, ) views = compiled.status_views_by_target @@ -2100,6 +2105,7 @@ function _extend_model_status_views( get(input_bindings_by_target, key, ()), applications_by_id, positions, + distributed_outputs, ) views[key] = isnothing(previous_view) ? current_view : @@ -2376,6 +2382,24 @@ function _extend_compiled_scene( push!(get!(applications_by_object, object_id, Any[]), application) end end + manual_application_ids = compiled.scenario_plan.manual_application_ids + distributed_outputs, changed_distributed_output_target_ids = + _refresh_model_distributed_outputs( + model, + compiled.distributed_outputs, + applications, + applications_by_id, + manual_application_ids, + compiled.scenario_plan.distributed_output_plans, + added_ids, + new_targets, + pure_addition, + ) + union!(changed_target_ids_seed, changed_distributed_output_target_ids) + union!( + changed_application_ids_seed, + (first(key) for key in changed_distributed_output_target_ids), + ) _runtime_performance_finish!( performance, :application_target_refresh, @@ -2548,7 +2572,6 @@ function _extend_compiled_scene( ) started_at = _runtime_performance_start(performance) - manual_application_ids = compiled.scenario_plan.manual_application_ids added_input_binding_capacity = sum( length(_model_input_names(application)) * length(application.target_ids) @@ -2650,6 +2673,8 @@ function _extend_compiled_scene( binding, added_ids, applications_by_object, + applications_by_id, + distributed_outputs, ) end if appended_sources @@ -2675,6 +2700,8 @@ function _extend_compiled_scene( binding.plan, applications_by_object, applications_by_id, + nothing, + distributed_outputs, ) old_cache_key = _many_binding_share_key(model, binding) if !isnothing(old_cache_key) && @@ -2719,6 +2746,7 @@ function _extend_compiled_scene( manual_application_ids, applications_by_object, applications_by_id, + distributed_outputs, ) last_new_binding = length(input_bindings) if first_new_binding <= last_new_binding @@ -2828,6 +2856,7 @@ function _extend_compiled_scene( rewired_consumer_ids, affected_temporal_keys, previous_temporal_sources, + distributed_outputs, previous_views, ) _runtime_performance_finish!( @@ -2877,7 +2906,7 @@ function _extend_compiled_scene( dynamic_input_binding_indices, dynamic_call_binding_indices, many_binding_cache, - compiled.distributed_outputs, + distributed_outputs, call_owners, application_children, status_views_by_target, @@ -4366,6 +4395,243 @@ function _compile_model_distributed_outputs( ) end +_distributed_output_binding_key(binding) = ( + binding.application_id, + binding.execution_object_id, + binding.group, +) + +function _changed_distributed_output_target_ids(previous, current) + previous_membership = Dict( + _distributed_output_binding_key(binding) => binding.destination_ids + for binding in previous.bindings + ) + current_membership = Dict( + _distributed_output_binding_key(binding) => binding.destination_ids + for binding in current.bindings + ) + changed = Set{Tuple{Symbol,ObjectId}}() + for key in union(keys(previous_membership), keys(current_membership)) + get(previous_membership, key, nothing) == + get(current_membership, key, nothing) && continue + push!(changed, (key[1], key[2])) + end + return changed +end + +function _refresh_model_distributed_outputs( + model::CompositeModel, + previous::NoCompiledDistributedOutputs, + applications, + applications_by_id, + manual_application_ids, + plans, + added_ids, + new_targets, + pure_addition, +) + return previous, Set{Tuple{Symbol,ObjectId}}() +end + +function _stage_distributed_writer_owner!( + staged, + previous, + object_id::ObjectId, + variable::Symbol, + owner::CompiledWriterOwner, +) + key = (object_id, variable) + owners = get!(staged, key) do + copy(get(previous.writer_ownership, key, CompiledWriterOwner[])) + end + push!(owners, owner) + return staged +end + +function _incremental_distributed_output_addition!( + model::CompositeModel, + previous::CompiledDistributedOutputs, + applications, + applications_by_id, + manual_application_ids, + plans::CompiledDistributedOutputPlans, + added_ids, + new_targets, +) + for (application_id, object_ids) in new_targets + isempty(object_ids) && continue + application = applications_by_id[application_id] + isempty(_application_plans(plans.by_application, application.slot)) || + return nothing + end + + resolved_additions = ResolvedModelOutputDestination[] + for binding in previous.bindings + default_scope = _default_dependency_scope( + model, + binding.execution_object_id, + ) + destination_ids = ObjectId[ + object_id for object_id in added_ids + if _selector_matches_object_id( + model, + binding.matcher, + object_id; + context=binding.execution_object_id, + default_to_context=true, + default_scope=default_scope, + ) && !(object_id in binding.destination_ids) + ] + isempty(destination_ids) && continue + _sort_object_ids!(destination_ids) + if !isempty(binding.destination_ids) && + !_object_id_isless(last(binding.destination_ids), first(destination_ids)) + return nothing + end + push!( + resolved_additions, + ResolvedModelOutputDestination( + binding.plan, + binding.execution_object_id, + destination_ids, + ), + ) + end + + _validate_model_output_destination_statuses!(model, resolved_additions) + _validate_required_model_output_destinations!(model, resolved_additions) + staged_ownership = Dict{ + Tuple{ObjectId,Symbol}, + Vector{CompiledWriterOwner}, + }() + for (application_id, object_ids) in new_targets + application = applications_by_id[application_id] + application.id in manual_application_ids && continue + for object_id in object_ids + for variable in _model_canonical_output_names(application) + _stage_distributed_writer_owner!( + staged_ownership, + previous, + object_id, + variable, + CompiledWriterOwner( + application.plan.slot, + application.id, + object_id, + nothing, + :application_target, + ), + ) + end + end + end + for resolved in resolved_additions + plan = resolved.plan + for destination_id in resolved.destination_ids + for variable_ in keys(plan.declarations) + variable = Symbol(variable_) + _stage_distributed_writer_owner!( + staged_ownership, + previous, + destination_id, + variable, + CompiledWriterOwner( + plan.application_slot, + plan.application_id, + resolved.execution_object_id, + plan.group, + :output_destination, + ), + ) + end + end + end + _validate_compiled_writer_ownership!(staged_ownership, applications) + _prepare_model_output_destination_statuses!(model, resolved_additions) + + column_additions = Any[] + for resolved in resolved_additions + key = (resolved.plan.application_id, resolved.execution_object_id) + groups = previous.by_execution_target[key] + binding = getproperty(groups, resolved.plan.group) + columns = _model_output_destination_columns(model, resolved) + for variable in keys(binding.declarations) + existing_references = parent(getproperty(binding.columns, variable)) + added_references = parent(getproperty(columns, variable)) + eltype(added_references) <: eltype(existing_references) || + return nothing + end + push!(column_additions, (binding=binding, resolved=resolved, columns=columns)) + end + + for (key, owners) in staged_ownership + previous.writer_ownership[key] = owners + end + for addition in column_additions + binding = addition.binding + resolved = addition.resolved + for variable_ in keys(binding.declarations) + variable = Symbol(variable_) + append!( + parent(getproperty(binding.columns, variable)), + parent(getproperty(addition.columns, variable)), + ) + indexed_ids = previous.destination_ids_by_application_variable[ + (binding.application_id, variable) + ] + indexed_ids === binding.destination_ids || + _insert_sorted_object_ids!(indexed_ids, resolved.destination_ids) + end + first_position = length(binding.destination_ids) + 1 + append!(binding.destination_ids, resolved.destination_ids) + for (offset, object_id) in enumerate(resolved.destination_ids) + binding.destination_index[object_id] = first_position + offset - 1 + end + binding.membership_generation = UInt64(model.revision) + end + changed_targets = Set{Tuple{Symbol,ObjectId}}( + ( + resolved.plan.application_id, + resolved.execution_object_id, + ) + for resolved in resolved_additions + ) + return previous, changed_targets +end + +function _refresh_model_distributed_outputs( + model::CompositeModel, + previous::CompiledDistributedOutputs, + applications, + applications_by_id, + manual_application_ids, + plans::CompiledDistributedOutputPlans, + added_ids, + new_targets, + pure_addition, +) + if pure_addition + incremental = _incremental_distributed_output_addition!( + model, + previous, + applications, + applications_by_id, + manual_application_ids, + plans, + added_ids, + new_targets, + ) + isnothing(incremental) || return incremental + end + current = _compile_model_distributed_outputs( + model, + applications, + manual_application_ids, + plans, + ) + return current, _changed_distributed_output_target_ids(previous, current) +end + function _prepare_model_input_defaults!(model::CompositeModel, applications) for application in applications schema = _input_schema(application.spec) diff --git a/src/composite_model/registry_topology.jl b/src/composite_model/registry_topology.jl index 69c2268a5..146bc38a4 100644 --- a/src/composite_model/registry_topology.jl +++ b/src/composite_model/registry_topology.jl @@ -1714,9 +1714,7 @@ function refresh_bindings!( dirty_object_ids = delta.structural_dirty_ids can_extend = !force && !isnothing(model.binding_cache) && - !isempty(dirty_object_ids) && - model.binding_cache.distributed_outputs isa - NoCompiledDistributedOutputs + !isempty(dirty_object_ids) if can_extend && delta.structural_kind == :addition model.binding_cache = _extend_compiled_scene( model, diff --git a/src/composite_model/runtime_outputs.jl b/src/composite_model/runtime_outputs.jl index 7395b44e7..6fd6a058b 100644 --- a/src/composite_model/runtime_outputs.jl +++ b/src/composite_model/runtime_outputs.jl @@ -3489,6 +3489,91 @@ function _model_execution_batch_accepts_target( return isequal(provider, batch.environment_provider) end +function _extend_execution_target_call_batches!( + target::CompiledExecutionTarget, + compiled::CompiledCompositeModel, + env_bindings::CompiledEnvironmentBindings, + temporal_streams, + output_retention, + constants, +) + context = target.context + context isa RunContext || return false + current_call_bindings = get( + compiled.call_bindings_by_target, + (context.application.id, target.object_id), + (), + ) + length(context.calls) == length(current_call_bindings) || return false + staged = Tuple{Any,Any}[] + staged_bindings = Tuple{Any,Any}[] + for (call_targets, binding) in zip(context.calls, current_call_bindings) + _compiled_call_name(call_targets.binding) == + _compiled_call_name(binding) || return false + push!(staged_bindings, (call_targets, binding)) + _compiled_call_mode(binding) === :initializer && continue + current_application_ids = Set(binding.callee_application_ids) + all( + batch -> batch.application.id in current_application_ids, + call_targets.execution_batches, + ) || return false + for application_id in binding.callee_application_ids + application = _compiled_application_by_id(compiled, application_id) + batches = AbstractExecutionBatch[ + batch for batch in call_targets.execution_batches + if batch.application.id == application_id + ] + isempty(batches) && return false + existing_ids = Set( + execution_target.object_id + for batch in batches + for execution_target in batch.targets + ) + current_ids = ObjectId[ + object_id for object_id in binding.callee_object_ids + if _call_binding_target_matches(binding, application, object_id) + ] + all(object_id -> object_id in current_ids, existing_ids) || + return false + added_ids = ObjectId[ + object_id for object_id in current_ids + if !(object_id in existing_ids) + ] + isempty(added_ids) && continue + _sort_object_ids!(added_ids) + destination_batch = last(batches) + for object_id in added_ids + execution_target = _compiled_model_execution_target( + compiled, + env_bindings, + application, + object_id, + temporal_streams, + output_retention, + constants, + ) + _model_execution_batch_accepts_target( + destination_batch, + execution_target, + env_bindings, + application, + ) || return false + push!(staged, (destination_batch.targets, execution_target)) + end + end + end + for (targets, execution_target) in staged + push!(targets, execution_target) + end + for (call_targets, binding) in staged_bindings + call_targets.binding = binding + end + target.call_bindings = current_call_bindings + target.call_bindings_signature = + _call_bindings_signature(current_call_bindings) + return true +end + function _refresh_model_execution_group_delta!( previous_group::CompiledApplicationExecutionGroup, compiled::CompiledCompositeModel, @@ -3535,16 +3620,33 @@ function _refresh_model_execution_group_delta!( batch_index, target_index = location previous_group.batches[batch_index].targets[target_index] end - change_reason = isnothing(previous_target) ? - :new_target : - _model_execution_target_change_reason( + change_reason = if isnothing(previous_target) + :new_target + else + _model_execution_target_change_reason( + previous_target, + compiled, + env_bindings, + application, + output_retention, + ) + end + isnothing(change_reason) && continue + if change_reason === :call_bindings && + _extend_execution_target_call_batches!( previous_target, compiled, env_bindings, - application, + temporal_streams, output_retention, + constants, ) - isnothing(change_reason) && continue + _runtime_performance_count!( + performance, + :execution_target_call_batches_extended, + ) + continue + end target = _compiled_model_execution_target( compiled, env_bindings, diff --git a/src/composite_model/status_conversion.jl b/src/composite_model/status_conversion.jl index 6759f6f63..2a2bd4e0c 100644 --- a/src/composite_model/status_conversion.jl +++ b/src/composite_model/status_conversion.jl @@ -266,6 +266,10 @@ function _materialize_status_value( reuse::Bool=false, declared_type=typeof(value), ) + if _no_status_conversion(model.status_conversion) + initial = private_copy ? _private_initial_value(value) : value + return initial, false, nothing + end key = _status_conversion_record_key( variable; object_id=object_id, diff --git a/test/test-model-hard-calls.jl b/test/test-model-hard-calls.jl index b7c6d4c8d..521e7ff29 100644 --- a/test/test-model-hard-calls.jl +++ b/test/test-model-hard-calls.jl @@ -308,7 +308,8 @@ end ) continue!(simulation) refreshed_call_view = call_targets(CALL_RETURN_CONTEXT[], :one) - @test only(only(refreshed_call_view.execution_batches).targets) !== + # Adding an unrelated Many callee must not rebuild this unchanged One target. + @test only(only(refreshed_call_view.execution_batches).targets) === cached_execution_target @test_throws ArgumentError run_call!(nothing, :one) @@ -378,7 +379,7 @@ end @test call.callee_object_ids == [:leaf_a, :leaf_b] @test call.callee_application_ids == [:leaf_calls] - simulation = run!(model; outputs=:all) + simulation = run!(model; outputs=:all, performance=true) controller = only(model_objects(model; scale=:Scene)).status @test controller.ncalls == 2 @test controller.total == 2.0 @@ -394,6 +395,8 @@ end Object(:leaf_c; scale=:Leaf, parent=:scene), ) continue!(simulation; steps=1) + performance = Advanced.runtime_performance(simulation) + @test performance.counts[:execution_target_call_batches_extended] == 1 @test controller.ncalls == 3 @test controller.total == 5.0 diff --git a/test/test-model-output-destination-declarations.jl b/test/test-model-output-destination-declarations.jl index 423218c15..38b87e84d 100644 --- a/test/test-model-output-destination-declarations.jl +++ b/test/test-model-output-destination-declarations.jl @@ -282,11 +282,19 @@ end Object(:scene; scale=:Scene); applications=scene.applications, ) - simulation = run!(dynamic_scene; outputs=:none) + simulation = run!(dynamic_scene; outputs=:none, performance=true) initial_compiled_type = typeof(simulation.compiled) + initial_scenario_plan = simulation.compiled.scenario_plan + initial_status_view = only(values(simulation.compiled.status_views_by_target)) register_object!(dynamic_scene, Object(:dynamic_leaf; scale=:Leaf); parent=:scene) continue!(simulation) @test typeof(simulation.compiled) === initial_compiled_type + @test simulation.compiled.scenario_plan === initial_scenario_plan + @test only(values(simulation.compiled.status_views_by_target)) === + initial_status_view + performance = Advanced.runtime_performance(simulation) + @test get(performance.counts, :status_views_constructed, 0) == 0 + @test performance.counts[:execution_targets_constructed] == 1 @test only(model_objects(dynamic_scene; scale=:Leaf)).status.incident_par == 0.0 end From d8d2c555ff8a108c86d6782fd54949a8def03e1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vezy?= Date: Sun, 30 Aug 2026 09:56:25 +0200 Subject: [PATCH 45/45] Fix graph editor sample initialization metadata --- frontend/dist/.vite/manifest.json | 2 +- .../{index-DV0bWa8M.js => index-BauQ5hZn.js} | 2 +- frontend/dist/index.html | 2 +- frontend/src/sampleModelGraph.ts | 25 ++++++++++++++++++- 4 files changed, 27 insertions(+), 4 deletions(-) rename frontend/dist/assets/{index-DV0bWa8M.js => index-BauQ5hZn.js} (98%) diff --git a/frontend/dist/.vite/manifest.json b/frontend/dist/.vite/manifest.json index 5781be699..69c880145 100644 --- a/frontend/dist/.vite/manifest.json +++ b/frontend/dist/.vite/manifest.json @@ -1,6 +1,6 @@ { "index.html": { - "file": "assets/index-DV0bWa8M.js", + "file": "assets/index-BauQ5hZn.js", "name": "index", "src": "index.html", "isEntry": true, diff --git a/frontend/dist/assets/index-DV0bWa8M.js b/frontend/dist/assets/index-BauQ5hZn.js similarity index 98% rename from frontend/dist/assets/index-DV0bWa8M.js rename to frontend/dist/assets/index-BauQ5hZn.js index ad6a85707..83972ca96 100644 --- a/frontend/dist/assets/index-DV0bWa8M.js +++ b/frontend/dist/assets/index-BauQ5hZn.js @@ -35,4 +35,4 @@ Error generating stack: `+j.message+` `),c.length!=2)throw R(new Un("Exactly two numbers are expected, "+c.length+" were found."));try{this.a=K2(V2(c[0])),this.b=K2(V2(c[1]))}catch(o){throw o=sr(o),X(o,131)?(i=o,R(new Un(dQe+i))):R(o)}},s.Ib=function(){return"("+this.a+","+this.b+")"},s.a=0,s.b=0;var Lr=v(NN,"KVector",8);m(78,66,{3:1,4:1,20:1,31:1,56:1,18:1,66:1,16:1,78:1,414:1},xs,XP,IOe),s.Nc=function(){return Okn(this)},s.ag=function(n){var t,i,r,c,o,l;r=nm(n,`,|;|\\(|\\)|\\[|\\]|\\{|\\}| | | `),qs(this);try{for(i=0,o=0,c=0,l=0;i0&&(o%2==0?c=K2(r[i]):l=K2(r[i]),o>0&&o%2!=0&&Vt(this,new Ee(c,l)),++o),++i}catch(f){throw f=sr(f),X(f,131)?(t=f,R(new Un("The given string does not match the expected format for vectors."+t))):R(f)}},s.Ib=function(){var n,t,i;for(n=new tl("("),t=St(this,0);t.b!=t.d.c;)i=u(jt(t),8),Kt(n,i.a+","+i.b),t.b!=t.d.c&&(n.a+="; ");return(n.a+=")",n).a};var l9e=v(NN,"KVectorChain",78);m(256,23,{3:1,35:1,23:1,256:1},Bj);var lce,nG,tG,NI,II,iG,f9e=yt(Oo,"Alignment",256,Tt,N9n,svn),bfn;m(975,1,Ua,NC),s.tf=function(n){cKe(n)};var a9e,fce,gfn,h9e,d9e,wfn,b9e,pfn,mfn,g9e,w9e,vfn;v(Oo,"BoxLayouterOptions",975),m(976,1,{},UM),s.uf=function(){var n;return n=new bL,n},s.vf=function(n){},v(Oo,"BoxLayouterOptions/BoxFactory",976),m(299,23,{3:1,35:1,23:1,299:1},zj);var qx,ace,Ux,Xx,Kx,hce,dce=yt(Oo,"ContentAlignment",299,Tt,I9n,lvn),yfn;m(689,1,Ua,OC),s.tf=function(n){nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,mWe),""),"Layout Algorithm"),"Select a specific layout algorithm."),(lg(),Gy)),He),rn((vh(),Tn))))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,vWe),""),"Resolved Layout Algorithm"),"Meta data associated with the selected algorithm."),Za),YBn),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,ppe),""),"Alignment"),"Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm."),p9e),Bi),f9e),rn(fr)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,U8),""),"Aspect Ratio"),"The desired aspect ratio of the drawing, that is the quotient of width by height."),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,N2e),""),"Bend Points"),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),Za),l9e),rn(xa)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,OF),""),"Content Alignment"),"Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option."),v9e),Hy),dce),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,PN),""),"Debug Mode"),"Whether additional debug information shall be generated."),($n(),!1)),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Jee),""),"Direction"),"Overall direction of edges: horizontal (right / left) or vertical (down / up)."),y9e),Bi),Yx),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,LN),""),"Edge Routing"),"What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline."),E9e),Bi),Mce),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,T2e),""),"Expand Nodes"),"If active, nodes are expanded to fill the area of their parent."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,TF),""),"Hierarchy Handling"),"Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."),x9e),Bi),b8e),Ci(Tn,F(z(Wa,1),je,160,0,[fr]))))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,sm),""),"Padding"),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),P9e),Za),jve),Ci(Tn,F(z(Wa,1),je,160,0,[fr]))))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,ES),""),"Interactive"),"Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,IF),""),"interactive Layout"),"Whether the graph should be changeable interactively and by setting constraints"),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,SS),""),"Omit Node Micro Layout"),"Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,ZZ),""),"Port Constraints"),"Defines constraints of the position of the ports of a node."),F9e),Bi),p8e),rn(fr)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,NF),""),"Position"),"The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."),Za),Lr),Ci(fr,F(z(Wa,1),je,160,0,[Yd,Q1]))))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,xN),""),"Priority"),"Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used."),dc),jr),Ci(fr,F(z(Wa,1),je,160,0,[xa]))))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,fF),""),"Randomization Seed"),"Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time)."),dc),jr),rn(Tn)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,jS),""),"Separate Connected Components"),"Whether each connected component should be processed separately."),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Cpe),""),"Junction Points"),"This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order."),C9e),Za),l9e),rn(xa)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Ipe),""),"Comment Box"),"Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related."),!1),xr),Qi),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Dpe),""),"Hypernode"),"Whether the node should be handled as a hypernode."),!1),xr),Qi),rn(fr)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,EBn),""),"Label Manager"),"Label managers can shorten labels upon a layout algorithm's request."),Za),tzn),Ci(Tn,F(z(Wa,1),je,160,0,[Q1]))))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,yWe),""),"Softwrapping Fuzziness"),"Determines the amount of fuzziness to be used when performing softwrapping on labels. The value expresses the percent of overhang that is permitted for each line. If the next line would take up less space than this threshold, it is appended to the current line instead of being placed in a new line."),0),ec),gr),rn(Q1)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Lpe),""),"Margins"),"Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."),T9e),Za),kve),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,gpe),""),"No Layout"),"No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."),!1),xr),Qi),Ci(fr,F(z(Wa,1),je,160,0,[xa,Yd,Q1]))))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,kWe),""),"Scale Factor"),"The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."),1),ec),gr),rn(fr)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,jWe),""),"Child Area Width"),"The width of the area occupied by the laid out children of a node."),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,EWe),""),"Child Area Height"),"The height of the area occupied by the laid out children of a node."),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,AN),""),dWe),"Turns topdown layout on and off. If this option is enabled, hierarchical layout will be computed first for the root node and then for its children recursively. Layouts are then scaled down to fit the area provided by their parents. Graphs must follow a certain structure for topdown layout to work properly. {@link TopdownNodeTypes.PARALLEL_NODE} nodes must have children of type {@link TopdownNodeTypes.HIERARCHICAL_NODE} and must define {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} for their children. Furthermore they need to be laid out using an algorithm that is a {@link TopdownLayoutProvider}. Hierarchical nodes can also be parents of other hierarchical nodes and can optionally use a {@link TopdownSizeApproximator} to dynamically set sizes during topdown layout. In this case {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} should be set on the node itself rather than the parent. The values are then used by the size approximator as base values. Hierarchical nodes require the layout option {@link nodeSize.fixedGraphSize} to be true to prevent the algorithm used there from resizing the hierarchical node. This option is not supported if 'Hierarchy Handling' is set to 'INCLUDE_CHILDREN'"),!1),xr),Qi),rn(Tn)))),qi(n,AN,np,null),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,SWe),""),"Animate"),"Whether the shift from the old layout to the new computed layout shall be animated."),!0),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,xWe),""),"Animation Time Factor"),"Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."),ve(100)),dc),jr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,AWe),""),"Layout Ancestors"),"Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,MWe),""),"Maximal Animation Time"),"The maximal time for animations, in milliseconds."),ve(4e3)),dc),jr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,CWe),""),"Minimal Animation Time"),"The minimal time for animations, in milliseconds."),ve(400)),dc),jr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,TWe),""),"Progress Bar"),"Whether a progress bar shall be displayed during layout computations."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,OWe),""),"Validate Graph"),"Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,NWe),""),"Validate Options"),"Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!0),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,IWe),""),"Zoom to Fit"),"Whether the zoom level shall be set to view the whole diagram after layout."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,O2e),"box"),"Box Layout Mode"),"Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better."),m9e),Bi),O8e),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,DWe),"json"),"Shape Coords"),"For layouts transferred into JSON graphs, specify the coordinate system to be used for nodes, ports, and labels of nodes and ports."),M9e),Bi),y8e),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,_We),"json"),"Edge Coords"),"For layouts transferred into JSON graphs, specify the coordinate system to be used for edge route points and edge labels."),A9e),Bi),n8e),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,ipe),Ka),"Comment Comment Spacing"),"Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing."),10),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,rpe),Ka),"Comment Node Spacing"),"Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing."),10),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,cpe),Ka),"Components Spacing"),"Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."),20),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,upe),Ka),"Edge Spacing"),"Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines."),10),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,WZ),Ka),"Edge Label Spacing"),"The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."),2),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Fee),Ka),"Edge Node Spacing"),"Spacing to be preserved between nodes and edges."),10),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,ope),Ka),"Label Spacing"),"Determines the amount of space to be left between two labels of the same graph element."),0),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,fpe),Ka),"Label Node Spacing"),"Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."),5),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,spe),Ka),"Horizontal spacing between Label and Port"),"Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,lpe),Ka),"Vertical spacing between Label and Port"),"Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,om),Ka),"Node Spacing"),"The minimal distance to be preserved between each two nodes."),20),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,ape),Ka),"Node Self Loop Spacing"),"Spacing to be preserved between a node and its self loops."),10),ec),gr),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,hpe),Ka),"Port Spacing"),"Spacing between pairs of ports of the same node."),10),ec),gr),Ci(Tn,F(z(Wa,1),je,160,0,[fr]))))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,dpe),Ka),"Individual Spacing"),"Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent."),Za),wan),Ci(fr,F(z(Wa,1),je,160,0,[xa,Yd,Q1]))))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Ppe),Ka),"Additional Port Space"),"Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border."),Q9e),Za),kve),rn(Tn)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,Gee),$We),"Layout Partition"),"Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction)."),dc),jr),Ci(Tn,F(z(Wa,1),je,160,0,[fr]))))),qi(n,Gee,Hee,Ifn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Hee),$We),"Layout Partitioning"),"Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle."),$9e),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,ype),RWe),"Node Label Padding"),"Define padding for node labels that are placed inside of a node."),N9e),Za),jve),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,K8),RWe),"Node Label Placement"),"Hints for where node labels are to be placed; if empty, the node label's position is not modified."),I9e),Hy),$c),Ci(fr,F(z(Wa,1),je,160,0,[Q1]))))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Epe),zF),"Port Alignment"),"Defines the default port distribution for a node. May be overridden for each side individually."),B9e),Bi),eA),rn(fr)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,Spe),zF),"Port Alignment (North)"),"Defines how ports on the northern side are placed, overriding the node's general port alignment."),Bi),eA),rn(fr)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,xpe),zF),"Port Alignment (South)"),"Defines how ports on the southern side are placed, overriding the node's general port alignment."),Bi),eA),rn(fr)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,Ape),zF),"Port Alignment (West)"),"Defines how ports on the western side are placed, overriding the node's general port alignment."),Bi),eA),rn(fr)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,Mpe),zF),"Port Alignment (East)"),"Defines how ports on the eastern side are placed, overriding the node's general port alignment."),Bi),eA),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,k3),gne),"Node Size Constraints"),"What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed."),D9e),Hy),iA),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,py),gne),"Node Size Options"),"Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications."),L9e),Hy),k8e),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,my),gne),"Node Size Minimum"),"The minimal size to which a node can be reduced."),_9e),Za),Lr),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,X8),gne),"Fixed Graph Size"),"By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so."),!1),xr),Qi),rn(Tn)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Ope),zee),"Edge Label Placement"),"Gives a hint on where to put edge labels."),k9e),Bi),t8e),rn(Q1)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,aF),zee),"Inline Edge Labels"),"If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."),!1),xr),Qi),rn(Q1)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,SBn),"font"),"Font Name"),"Font name used for a label."),Gy),He),rn(Q1)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,LWe),"font"),"Font Size"),"Font size used for a label."),dc),jr),rn(Q1)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,_pe),wne),"Port Anchor Offset"),"The offset to the port position where connections shall be attached."),Za),Lr),rn(Yd)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,Npe),wne),"Port Index"),"The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."),dc),jr),rn(Yd)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,wpe),wne),"Port Side"),"The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."),G9e),Bi),xc),rn(Yd)))),nn(n,new Ue(Ze(We(en(Ke(Qe(Ve(Ye(new Ge,bpe),wne),"Port Border Offset"),"The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."),ec),gr),rn(Yd)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,V8),_2e),"Port Label Placement"),"Decides on a placement method for port labels; if empty, the node label's position is not modified."),J9e),Hy),fG),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,kpe),_2e),"Port Labels Next to Port"),"Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE."),!1),xr),Qi),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,jpe),_2e),"Treat Port Labels as Group"),"If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port."),!0),xr),Qi),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,dne),r7),"Number of size categories"),"Defines the number of categories to use for the FIXED_INTEGER_RATIO_BOXES size approximator."),ve(3)),dc),jr),rn(Tn)))),qi(n,dne,bne,Gfn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,I2e),r7),"Weight of a node containing children for determining the graph size"),"When determining the graph size for the size categorisation, this value determines how many times a node containing children is weighted more than a simple node. For example setting this value to four would result in a graph containing a simple node and a hierarchical node to be counted as having a size of five."),ve(4)),dc),jr),rn(Tn)))),qi(n,I2e,dne,null),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,MN),r7),"Topdown Scale Factor"),"The scaling factor to be applied to the nodes laid out within the node in recursive topdown layout. The difference to 'Scale Factor' is that the node itself is not scaled. This value has to be set on hierarchical nodes."),1),ec),gr),rn(Tn)))),qi(n,MN,np,Ffn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,bne),r7),"Topdown Size Approximator"),"The size approximator to be used to set sizes of hierarchical nodes during topdown layout. The default value is null, which results in nodes keeping whatever size is defined for them e.g. through parent parallel node or by manually setting the size."),null),Za),QBn),rn(fr)))),qi(n,bne,np,Jfn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,CN),r7),"Topdown Hierarchical Node Width"),"The fixed size of a hierarchical node when using topdown layout. If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself."),150),ec),gr),Ci(Tn,F(z(Wa,1),je,160,0,[fr]))))),qi(n,CN,np,null),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,TN),r7),"Topdown Hierarchical Node Aspect Ratio"),"The fixed aspect ratio of a hierarchical node when using topdown layout. Default is 1/sqrt(2). If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself."),1.414),ec),gr),Ci(Tn,F(z(Wa,1),je,160,0,[fr]))))),qi(n,TN,np,null),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,np),r7),"Topdown Node Type"),"The different node types used for topdown layout. If the node type is set to {@link TopdownNodeTypes.PARALLEL_NODE} the algorithm must be set to a {@link TopdownLayoutProvider} such as {@link TopdownPacking}. The {@link nodeSize.fixedGraphSize} option is technically only required for hierarchical nodes."),null),Bi),E8e),rn(fr)))),qi(n,np,X8,null),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,D2e),r7),"Topdown Scale Cap"),"Determines the upper limit for the topdown scale factor. The default value is 1.0 which ensures that nested children never end up appearing larger than their parents in terms of unit sizes such as the font size. If the limit is larger, nodes will fully utilize the available space, but it is counteriniuitive for inner nodes to have a larger scale than outer nodes."),1),ec),gr),rn(Tn)))),qi(n,D2e,np,zfn),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,mpe),BWe),"Activate Inside Self Loops"),"Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."),!1),xr),Qi),rn(fr)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,vpe),BWe),"Inside Self Loop"),"Whether a self loop should be routed inside a node instead of around that node."),!1),xr),Qi),rn(xa)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,Tpe),"edge"),"Edge Thickness"),"The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it."),1),ec),gr),rn(xa)))),nn(n,new Ue(Ze(We(en(hn(Ke(Qe(Ve(Ye(new Ge,PWe),"edge"),"Edge Type"),"The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations."),S9e),Bi),s8e),rn(xa)))),Oj(n,new P4(Sj(b9(d9(new d0,Rn),"Layered"),'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.'))),Oj(n,new P4(Sj(b9(d9(new d0,"org.eclipse.elk.orthogonal"),"Orthogonal"),`Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia '86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.`))),Oj(n,new P4(Sj(b9(d9(new d0,$o),"Force"),"Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984."))),Oj(n,new P4(Sj(b9(d9(new d0,"org.eclipse.elk.circle"),"Circle"),"Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph."))),Oj(n,new P4(Sj(b9(d9(new d0,QQe),"Tree"),"Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type."))),Oj(n,new P4(Sj(b9(d9(new d0,"org.eclipse.elk.planar"),"Planar"),"Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable."))),Oj(n,new P4(Sj(b9(d9(new d0,Gl),"Radial"),"Radial layout algorithms usually position the nodes of the graph on concentric circles."))),HXe((new BU,n)),cKe((new NC,n)),gXe((new zU,n))};var qy,kfn,p9e,B7,jfn,Efn,m9e,Lm,Pm,Sfn,DI,v9e,_I,Ng,y9e,bce,gce,k9e,j9e,E9e,xfn,S9e,Afn,W3,x9e,Mfn,LI,wce,PI,pce,Cfn,A9e,Tfn,M9e,Z3,C9e,z7,T9e,O9e,N9e,e5,I9e,Ig,D9e,$m,n5,_9e,bb,L9e,rG,$I,s1,P9e,Ofn,$9e,Nfn,Ifn,R9e,B9e,mce,vce,yce,kce,z9e,Ps,Vx,F9e,jce,Ece,Rm,J9e,H9e,t5,G9e,Uy,RI,Sce,Bm,Dfn,xce,_fn,Lfn,Pfn,$fn,q9e,U9e,Xy,X9e,cG,K9e,V9e,Qd,Rfn,Y9e,Q9e,W9e,F7,zm,J7,Ky,Bfn,zfn,uG,Ffn,oG,Jfn,Hfn,Gfn,qfn;v(Oo,"CoreOptions",689),m(86,23,{3:1,35:1,23:1,86:1},wT);var eh,Zc,ru,nh,Vl,Yx=yt(Oo,"Direction",86,Tt,q6n,cvn),Ufn;m(278,23,{3:1,35:1,23:1,278:1},j$);var sG,BI,Z9e,e8e,n8e=yt(Oo,"EdgeCoords",278,Tt,b6n,uvn),Xfn;m(279,23,{3:1,35:1,23:1,279:1},pK);var H7,Fm,G7,t8e=yt(Oo,"EdgeLabelPlacement",279,Tt,ayn,ovn),Kfn;m(222,23,{3:1,35:1,23:1,222:1},E$);var q7,zI,Vy,Ace,Mce=yt(Oo,"EdgeRouting",222,Tt,g6n,rvn),Vfn;m(327,23,{3:1,35:1,23:1,327:1},Fj);var i8e,r8e,c8e,u8e,Cce,o8e,s8e=yt(Oo,"EdgeType",327,Tt,L9n,gvn),Yfn;m(973,1,Ua,BU),s.tf=function(n){HXe(n)};var l8e,f8e,a8e,h8e,Qfn,d8e,Qx;v(Oo,"FixedLayouterOptions",973),m(974,1,{},XM),s.uf=function(){var n;return n=new ow,n},s.vf=function(n){},v(Oo,"FixedLayouterOptions/FixedFactory",974),m(347,23,{3:1,35:1,23:1,347:1},mK);var Wd,lG,Wx,b8e=yt(Oo,"HierarchyHandling",347,Tt,hyn,wvn),Wfn,QBn=Gi(Oo,"ITopdownSizeApproximator");m(292,23,{3:1,35:1,23:1,292:1},S$);var l1,gb,FI,JI,Zfn=yt(Oo,"LabelSide",292,Tt,w6n,bvn),ean;m(96,23,{3:1,35:1,23:1,96:1},Dv);var W1,Yf,wf,Qf,pl,Wf,pf,f1,Zf,$c=yt(Oo,"NodeLabelPlacement",96,Tt,P8n,fvn),nan;m(257,23,{3:1,35:1,23:1,257:1},pT);var g8e,Zx,wb,w8e,HI,eA=yt(Oo,"PortAlignment",257,Tt,i9n,avn),tan;m(102,23,{3:1,35:1,23:1,102:1},Jj);var Dg,to,a1,U7,th,pb,p8e=yt(Oo,"PortConstraints",102,Tt,_9n,hvn),ian;m(280,23,{3:1,35:1,23:1,280:1},Hj);var nA,tA,Z1,GI,mb,Yy,fG=yt(Oo,"PortLabelPlacement",280,Tt,D9n,dvn),ran;m(64,23,{3:1,35:1,23:1,64:1},mT);var nt,Vn,Yl,Ql,Wo,zo,ih,ea,ks,hs,mo,js,Zo,es,na,ml,vl,mf,bt,ju,Yn,xc=yt(Oo,"PortSide",64,Tt,U6n,yvn),can;m(977,1,Ua,zU),s.tf=function(n){gXe(n)};var uan,oan,m8e,san,lan;v(Oo,"RandomLayouterOptions",977),m(978,1,{},KM),s.uf=function(){var n;return n=new WM,n},s.vf=function(n){},v(Oo,"RandomLayouterOptions/RandomFactory",978),m(300,23,{3:1,35:1,23:1,300:1},vK);var qI,Tce,v8e,y8e=yt(Oo,"ShapeCoords",300,Tt,dyn,kvn),fan;m(380,23,{3:1,35:1,23:1,380:1},x$);var Jm,UI,XI,_g,iA=yt(Oo,"SizeConstraint",380,Tt,m6n,jvn),aan;m(266,23,{3:1,35:1,23:1,266:1},_v);var KI,aG,X7,Oce,VI,rA,hG,dG,bG,k8e=yt(Oo,"SizeOptions",266,Tt,H8n,mvn),han;m(281,23,{3:1,35:1,23:1,281:1},yK);var Hm,j8e,gG,E8e=yt(Oo,"TopdownNodeTypes",281,Tt,byn,vvn),dan;m(288,23,JF);var S8e,Nce,x8e,A8e,YI=yt(Oo,"TopdownSizeApproximator",288,Tt,p6n,pvn);m(969,288,JF,wIe),s.Sg=function(n){return ZJe(n)},yt(Oo,"TopdownSizeApproximator/1",969,YI,null,null),m(970,288,JF,WIe),s.Sg=function(n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,De,un,cn,On;for(t=u(ke(n,(Xt(),Bm)),144),De=(j0(),A=new mj,A),QO(De,n),un=new wt,o=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));o.e!=o.i.gc();)r=u(ft(o),26),V=(S=new mj,S),Lz(V,De),QO(V,r),On=ZJe(r),vw(V,k.Math.max(r.g,On.a),k.Math.max(r.f,On.b)),Ko(un.f,r,V);for(c=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));c.e!=c.i.gc();)for(r=u(ft(c),26),p=new st((!r.e&&(r.e=new In(pr,r,7,4)),r.e));p.e!=p.i.gc();)b=u(ft(p),85),be=u(bu(Xc(un.f,r)),26),fe=u(zn(un,K((!b.c&&(b.c=new In(mt,b,5,8)),b.c),0)),26),te=(y=new kv,y),Et((!te.b&&(te.b=new In(mt,te,4,7)),te.b),be),Et((!te.c&&(te.c=new In(mt,te,5,8)),te.c),fe),_z(te,Fi(be)),QO(te,b);D=u(GT(t.f),214);try{D.kf(De,new b0),Wfe(t.f,D)}catch(Dn){throw Dn=sr(Dn),X(Dn,101)?(O=Dn,R(O)):R(Dn)}return ba(De,Pm)||ba(De,Lm)||sZ(De),h=ne(re(ke(De,Pm))),f=ne(re(ke(De,Lm))),l=h/f,i=ne(re(ke(De,zm)))*k.Math.sqrt((!De.a&&(De.a=new we(Ft,De,10,11)),De.a).i),cn=u(ke(De,s1),104),q=cn.b+cn.c+1,B=cn.d+cn.a+1,new Ee(k.Math.max(q,i),k.Math.max(B,i/l))},yt(Oo,"TopdownSizeApproximator/2",970,YI,null,null),m(971,288,JF,S_e),s.Sg=function(n){var t,i,r,c,o,l;return i=ne(re(ke(n,(Xt(),zm)))),t=i/ne(re(ke(n,F7))),r=H_n(n),o=u(ke(n,s1),104),c=ne(re(_e(Qd))),Fi(n)&&(c=ne(re(ke(Fi(n),Qd)))),l=A1(new Ee(i,t),r),pi(l,new Ee(-(o.b+o.c)-c,-(o.d+o.a)-c))},yt(Oo,"TopdownSizeApproximator/3",971,YI,null,null),m(972,288,JF,ZIe),s.Sg=function(n){var t,i,r,c,o,l,f,h,b,p;for(l=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));l.e!=l.i.gc();)o=u(ft(l),26),ke(o,(Xt(),oG))!=null&&(!o.a&&(o.a=new we(Ft,o,10,11)),!!o.a)&&(!o.a&&(o.a=new we(Ft,o,10,11)),o.a).i>0?(i=u(ke(o,oG),521),p=i.Sg(o),b=u(ke(o,s1),104),vw(o,k.Math.max(o.g,p.a+b.b+b.c),k.Math.max(o.f,p.b+b.d+b.a))):(!o.a&&(o.a=new we(Ft,o,10,11)),o.a).i!=0&&vw(o,ne(re(ke(o,zm))),ne(re(ke(o,zm)))/ne(re(ke(o,F7))));t=u(ke(n,(Xt(),Bm)),144),h=u(GT(t.f),214);try{h.kf(n,new b0),Wfe(t.f,h)}catch(y){throw y=sr(y),X(y,101)?(f=y,R(f)):R(y)}return Ei(n,qy,c7),bPe(n),sZ(n),c=ne(re(ke(n,Pm))),r=ne(re(ke(n,Lm))),new Ee(c,r)},yt(Oo,"TopdownSizeApproximator/4",972,YI,null,null);var ban;m(345,1,{852:1},s4),s.Tg=function(n,t){return hGe(this,n,t)},s.Ug=function(){RGe(this)},s.Vg=function(){return this.q},s.Wg=function(){return this.f?IR(this.f):null},s.Xg=function(){return IR(this.a)},s.Yg=function(){return this.p},s.Zg=function(){return!1},s.$g=function(){return this.n},s._g=function(){return this.p!=null&&!this.b},s.ah=function(n){var t;this.n&&(t=n,Ce(this.f,t))},s.bh=function(n,t){var i,r;this.n&&n&&Iyn(this,(i=new dDe,r=FW(i,n),C$n(i),r),(RB(),Dce))},s.dh=function(n){var t;return this.b?null:(t=v8n(this,this.g),Vt(this.a,t),t.i=this,this.d=n,t)},s.eh=function(n){n>0&&!this.b&&Vhe(this,n)},s.b=!1,s.c=0,s.d=-1,s.e=null,s.f=null,s.g=-1,s.j=!1,s.k=!1,s.n=!1,s.o=0,s.q=0,s.r=0,v($u,"BasicProgressMonitor",345),m(706,214,ep,bL),s.kf=function(n,t){jKe(n,t)},v($u,"BoxLayoutProvider",706),m(965,1,Yt,eSe),s.Le=function(n,t){return CNn(this,u(n,26),u(t,26))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},s.a=!1,v($u,"BoxLayoutProvider/1",965),m(167,1,{167:1},gB,NOe),s.Ib=function(){return this.c?Jbe(this.c):Ja(this.b)},v($u,"BoxLayoutProvider/Group",167),m(326,23,{3:1,35:1,23:1,326:1},A$);var M8e,C8e,T8e,Ice,O8e=yt($u,"BoxLayoutProvider/PackingMode",326,Tt,v6n,Evn),gan;m(966,1,Yt,VM),s.Le=function(n,t){return R5n(u(n,167),u(t,167))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v($u,"BoxLayoutProvider/lambda$0$Type",966),m(967,1,Yt,zk),s.Le=function(n,t){return C5n(u(n,167),u(t,167))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v($u,"BoxLayoutProvider/lambda$1$Type",967),m(968,1,Yt,YM),s.Le=function(n,t){return T5n(u(n,167),u(t,167))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v($u,"BoxLayoutProvider/lambda$2$Type",968),m(1338,1,{829:1},gL),s.Lg=function(n,t){return e$(),!X(t,174)||DAe((X4(),u(n,174)),t)},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type",1338),m(1339,1,ut,nSe),s.Ad=function(n){Nkn(this.a,u(n,147))},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type",1339),m(1340,1,ut,QM),s.Ad=function(n){u(n,105),e$()},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type",1340),m(1344,1,ut,tSe),s.Ad=function(n){i7n(this.a,u(n,105))},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type",1344),m(1342,1,zt,CCe),s.Mb=function(n){return dkn(this.a,this.b,u(n,147))},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type",1342),m(1341,1,zt,TCe),s.Mb=function(n){return Mpn(this.a,this.b,u(n,829))},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type",1341),m(1343,1,ut,OCe),s.Ad=function(n){A3n(this.a,this.b,u(n,147))},v($u,"ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type",1343),m(930,1,{},wL),s.Kb=function(n){return xTe(n)},s.Fb=function(n){return this===n},v($u,"ElkUtil/lambda$0$Type",930),m(931,1,ut,NCe),s.Ad=function(n){ITn(this.a,this.b,u(n,85))},s.a=0,s.b=0,v($u,"ElkUtil/lambda$1$Type",931),m(932,1,ut,ICe),s.Ad=function(n){Cbn(this.a,this.b,u(n,170))},s.a=0,s.b=0,v($u,"ElkUtil/lambda$2$Type",932),m(933,1,ut,DCe),s.Ad=function(n){jwn(this.a,this.b,u(n,157))},s.a=0,s.b=0,v($u,"ElkUtil/lambda$3$Type",933),m(934,1,ut,iSe),s.Ad=function(n){Vvn(this.a,u(n,372))},v($u,"ElkUtil/lambda$4$Type",934),m(331,1,{35:1,331:1},ibn),s.Dd=function(n){return Xwn(this,u(n,242))},s.Fb=function(n){var t;return X(n,331)?(t=u(n,331),this.a==t.a):!1},s.Hb=function(){return lc(this.a)},s.Ib=function(){return this.a+" (exclusive)"},s.a=0,v($u,"ExclusiveBounds/ExclusiveLowerBound",331),m(1088,214,ep,ow),s.kf=function(n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q,V,te,be,fe,De,un,cn;for(t.Tg("Fixed Layout",1),o=u(ke(n,(Xt(),j9e)),222),y=0,S=0,V=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));V.e!=V.i.gc();){for(B=u(ft(V),26),cn=u(ke(B,(BB(),Qx)),8),cn&&(Il(B,cn.a,cn.b),u(ke(B,f8e),182).Gc((Vs(),Jm))&&(A=u(ke(B,h8e),8),A.a>0&&A.b>0&&Yw(B,A.a,A.b,!0,!0))),y=k.Math.max(y,B.i+B.g),S=k.Math.max(S,B.j+B.f),b=new st((!B.n&&(B.n=new we(Eu,B,1,7)),B.n));b.e!=b.i.gc();)f=u(ft(b),157),cn=u(ke(f,Qx),8),cn&&Il(f,cn.a,cn.b),y=k.Math.max(y,B.i+f.i+f.g),S=k.Math.max(S,B.j+f.j+f.f);for(fe=new st((!B.c&&(B.c=new we($s,B,9,9)),B.c));fe.e!=fe.i.gc();)for(be=u(ft(fe),125),cn=u(ke(be,Qx),8),cn&&Il(be,cn.a,cn.b),De=B.i+be.i,un=B.j+be.j,y=k.Math.max(y,De+be.g),S=k.Math.max(S,un+be.f),h=new st((!be.n&&(be.n=new we(Eu,be,1,7)),be.n));h.e!=h.i.gc();)f=u(ft(h),157),cn=u(ke(f,Qx),8),cn&&Il(f,cn.a,cn.b),y=k.Math.max(y,De+f.i+f.g),S=k.Math.max(S,un+f.j+f.f);for(c=new Xn(Qn(U0(B).a.Jc(),new ee));ht(c);)i=u(ct(c),85),p=_Ve(i),y=k.Math.max(y,p.a),S=k.Math.max(S,p.b);for(r=new Xn(Qn(MW(B).a.Jc(),new ee));ht(r);)i=u(ct(r),85),Fi(dW(i))!=n&&(p=_Ve(i),y=k.Math.max(y,p.a),S=k.Math.max(S,p.b))}if(o==(z1(),q7))for(q=new st((!n.a&&(n.a=new we(Ft,n,10,11)),n.a));q.e!=q.i.gc();)for(B=u(ft(q),26),r=new Xn(Qn(U0(B).a.Jc(),new ee));ht(r);)i=u(ct(r),85),l=C_n(i),l.b==0?Ei(i,Z3,null):Ei(i,Z3,l);Fe(ze(ke(n,(BB(),a8e))))||(te=u(ke(n,Qfn),104),D=y+te.b+te.c,O=S+te.d+te.a,Yw(n,D,O,!0,!0)),t.Ug()},v($u,"FixedLayoutProvider",1088),m(379,150,{3:1,414:1,379:1,105:1,150:1},z6,jRe),s.ag=function(n){var t,i,r,c,o,l,f,h,b;if(n)try{for(h=nm(n,";,;"),o=h,l=0,f=o.length;l>16&yr|t^r<<16},s.Jc=function(){return new rSe(this)},s.Ib=function(){return this.a==null&&this.b==null?"pair(null,null)":this.a==null?"pair(null,"+fu(this.b)+")":this.b==null?"pair("+fu(this.a)+",null)":"pair("+fu(this.a)+","+fu(this.b)+")"},v($u,"Pair",49),m(979,1,Fr,rSe),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return!this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)},s.Pb=function(){if(!this.c&&!this.b&&this.a.a!=null)return this.b=!0,this.a.a;if(!this.c&&this.a.b!=null)return this.c=!0,this.a.b;throw R(new hu)},s.Qb=function(){throw this.c&&this.a.b!=null?this.a.b=null:this.b&&this.a.a!=null&&(this.a.a=null),R(new is)},s.b=!1,s.c=!1,v($u,"Pair/1",979),m(1078,214,ep,WM),s.kf=function(n,t){var i,r,c,o,l;if(t.Tg("Random Layout",1),(!n.a&&(n.a=new we(Ft,n,10,11)),n.a).i==0){t.Ug();return}o=u(ke(n,(bde(),san)),15),o&&o.a!=0?c=new VR(o.a):c=new yQ,i=QC(re(ke(n,uan))),l=QC(re(ke(n,lan))),r=u(ke(n,oan),104),V$n(n,c,i,l,r),t.Ug()},v($u,"RandomLayoutProvider",1078),m(240,1,{240:1},eV),s.Fb=function(n){return Ku(this.a,u(n,240).a)&&Ku(this.b,u(n,240).b)&&Ku(this.c,u(n,240).c)},s.Hb=function(){return zB(F(z(Mr,1),Nn,1,5,[this.a,this.b,this.c]))},s.Ib=function(){return"("+this.a+To+this.b+To+this.c+")"},v($u,"Triple",240);var van;m(550,1,{}),s.Jf=function(){return new Ee(this.f.i,this.f.j)},s.mf=function(n){return k_e(n,(Xt(),Ps))?ke(this.f,yan):ke(this.f,n)},s.Kf=function(){return new Ee(this.f.g,this.f.f)},s.Lf=function(){return this.g},s.nf=function(n){return ba(this.f,n)},s.Mf=function(n){Os(this.f,n.a),Ns(this.f,n.b)},s.Nf=function(n){Pw(this.f,n.a),Lw(this.f,n.b)},s.Of=function(n){this.g=n},s.g=0;var yan;v(_S,"ElkGraphAdapters/AbstractElkGraphElementAdapter",550),m(552,1,{837:1},NP),s.Pf=function(){var n,t;if(!this.b)for(this.b=JR(NV(this.a).i),t=new st(NV(this.a));t.e!=t.i.gc();)n=u(ft(t),157),Ce(this.b,new MX(n));return this.b},s.b=null,v(_S,"ElkGraphAdapters/ElkEdgeAdapter",552),m(260,550,{},v0),s.Qf=function(){return vHe(this)},s.a=null,v(_S,"ElkGraphAdapters/ElkGraphAdapter",260),m(630,550,{187:1},MX),v(_S,"ElkGraphAdapters/ElkLabelAdapter",630),m(551,550,{685:1},q$),s.Pf=function(){return txn(this)},s.Tf=function(){var n;return n=u(ke(this.f,(Xt(),z7)),140),!n&&(n=new pj),n},s.Vf=function(){return ixn(this)},s.Xf=function(n){var t;t=new QK(n),Ei(this.f,(Xt(),z7),t)},s.Yf=function(n){Ei(this.f,(Xt(),s1),new Yle(n))},s.Rf=function(){return this.d},s.Sf=function(){var n,t;if(!this.a)for(this.a=new Te,t=new Xn(Qn(MW(u(this.f,26)).a.Jc(),new ee));ht(t);)n=u(ct(t),85),Ce(this.a,new NP(n));return this.a},s.Uf=function(){var n,t;if(!this.c)for(this.c=new Te,t=new Xn(Qn(U0(u(this.f,26)).a.Jc(),new ee));ht(t);)n=u(ct(t),85),Ce(this.c,new NP(n));return this.c},s.Wf=function(){return OR(u(this.f,26)).i!=0||Fe(ze(u(this.f,26).mf((Xt(),LI))))},s.Zf=function(){e8n(this,(Rb(),van))},s.a=null,s.b=null,s.c=null,s.d=null,s.e=null,v(_S,"ElkGraphAdapters/ElkNodeAdapter",551),m(1249,550,{836:1},cSe),s.Pf=function(){return fxn(this)},s.Sf=function(){var n,t;if(!this.a)for(this.a=Jh(u(this.f,125).gh().i),t=new st(u(this.f,125).gh());t.e!=t.i.gc();)n=u(ft(t),85),Ce(this.a,new NP(n));return this.a},s.Uf=function(){var n,t;if(!this.c)for(this.c=Jh(u(this.f,125).hh().i),t=new st(u(this.f,125).hh());t.e!=t.i.gc();)n=u(ft(t),85),Ce(this.c,new NP(n));return this.c},s.$f=function(){return u(u(this.f,125).mf((Xt(),t5)),64)},s._f=function(){var n,t,i,r,c,o,l,f;for(r=_a(u(this.f,125)),i=new st(u(this.f,125).hh());i.e!=i.i.gc();)for(n=u(ft(i),85),f=new st((!n.c&&(n.c=new In(mt,n,5,8)),n.c));f.e!=f.i.gc();){if(l=u(ft(f),84),P2(iu(l),r))return!0;if(iu(l)==r&&Fe(ze(ke(n,(Xt(),wce)))))return!0}for(t=new st(u(this.f,125).gh());t.e!=t.i.gc();)for(n=u(ft(t),85),o=new st((!n.b&&(n.b=new In(mt,n,4,7)),n.b));o.e!=o.i.gc();)if(c=u(ft(o),84),P2(iu(c),r))return!0;return!1},s.a=null,s.b=null,s.c=null,v(_S,"ElkGraphAdapters/ElkPortAdapter",1249),m(1250,1,Yt,mL),s.Le=function(n,t){return yDn(u(n,125),u(t,125))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(_S,"ElkGraphAdapters/PortComparator",1250);var vb=Gi(ql,"EObject"),K7=Gi(x3,JWe),yl=Gi(x3,HWe),QI=Gi(x3,GWe),WI=Gi(x3,"ElkShape"),mt=Gi(x3,qWe),pr=Gi(x3,P2e),$i=Gi(x3,UWe),ZI=Gi(ql,XWe),cA=Gi(ql,"EFactory"),kan,_ce=Gi(ql,KWe),Aa=Gi(ql,"EPackage"),Pr,jan,Ean,_8e,wG,San,L8e,P8e,$8e,h1,xan,Aan,Eu=Gi(x3,$2e),Ft=Gi(x3,R2e),$s=Gi(x3,B2e);m(93,1,VWe),s.qh=function(){return this.rh(),null},s.rh=function(){return null},s.sh=function(){return this.rh(),!1},s.th=function(){return!1},s.uh=function(n){hi(this,n)},v(ky,"BasicNotifierImpl",93),m(100,93,ZWe),s.Vh=function(){return Fs(this)},s.vh=function(n,t){return n},s.wh=function(){throw R(new _t)},s.xh=function(n){var t;return t=Oc(u(Cn(this.Ah(),this.Ch()),19)),this.Mh().Qh(this,t.n,t.f,n)},s.yh=function(n,t){throw R(new _t)},s.zh=function(n,t,i){return hl(this,n,t,i)},s.Ah=function(){var n;return this.wh()&&(n=this.wh().Lk(),n)?n:this.fi()},s.Bh=function(){return xW(this)},s.Ch=function(){throw R(new _t)},s.Dh=function(){var n,t;return t=this.Xh().Mk(),!t&&this.wh().Rk(t=(Ij(),n=dae(kh(this.Ah())),n==null?Jce:new ST(this,n))),t},s.Eh=function(n,t){return n},s.Fh=function(n){var t;return t=n.nk(),t?n.Jj():Ji(this.Ah(),n)},s.Gh=function(){var n;return n=this.wh(),n?n.Ok():null},s.Hh=function(){return this.wh()?this.wh().Lk():null},s.Ih=function(n,t,i){return sz(this,n,t,i)},s.Jh=function(n){return H9(this,n)},s.Kh=function(n,t){return aY(this,n,t)},s.Lh=function(){var n;return n=this.wh(),!!n&&n.Pk()},s.Mh=function(){throw R(new _t)},s.Nh=function(){return iz(this)},s.Oh=function(n,t,i,r){return Z4(this,n,t,r)},s.Ph=function(n,t,i){var r;return r=u(Cn(this.Ah(),t),69),r.uk().xk(this,this.ei(),t-this.gi(),n,i)},s.Qh=function(n,t,i,r){return LR(this,n,t,r)},s.Rh=function(n,t,i){var r;return r=u(Cn(this.Ah(),t),69),r.uk().yk(this,this.ei(),t-this.gi(),n,i)},s.Sh=function(){return!!this.wh()&&!!this.wh().Nk()},s.Th=function(n){return LQ(this,n)},s.Uh=function(n){return P_e(this,n)},s.Wh=function(n){return pVe(this,n)},s.Xh=function(){throw R(new _t)},s.Yh=function(){return this.wh()?this.wh().Nk():null},s.Zh=function(){return iz(this)},s.$h=function(n,t){yW(this,n,t)},s._h=function(n){this.Xh().Qk(n)},s.ai=function(n){this.Xh().Tk(n)},s.bi=function(n){this.Xh().Sk(n)},s.ci=function(n,t){var i,r,c,o;return o=this.Gh(),o&&n&&(t=vc(o.Cl(),this,t),o.Gl(this)),r=this.Mh(),r&&((RW(this,this.Mh(),this.Ch()).Bb&Ec)!=0?(c=r.Nh(),c&&(n?!o&&c.Gl(this):c.Fl(this))):(t=(i=this.Ch(),i>=0?this.xh(t):this.Mh().Qh(this,-1-i,null,t)),t=this.zh(null,-1,t))),this.ai(n),t},s.di=function(n){var t,i,r,c,o,l,f,h;if(i=this.Ah(),o=Ji(i,n),t=this.gi(),o>=t)return u(n,69).uk().Bk(this,this.ei(),o-t);if(o<=-1)if(l=w3((ls(),nc),i,n),l){if(Tc(),u(l,69).vk()||(l=$4(Vc(nc,l))),c=(r=this.Fh(l),u(r>=0?this.Ih(r,!0,!0):Xw(this,l,!0),163)),h=l.Gk(),h>1||h==-1)return u(u(c,219).Ql(n,!1),77)}else throw R(new Un(nb+n.ve()+pne));else if(n.Hk())return r=this.Fh(n),u(r>=0?this.Ih(r,!1,!0):Xw(this,n,!1),77);return f=new VCe(this,n),f},s.ei=function(){return khe(this)},s.fi=function(){return(C0(),Bn).S},s.gi=function(){return dt(this.fi())},s.hi=function(n){pW(this,n)},s.Ib=function(){return Ff(this)},v(Jn,"BasicEObjectImpl",100);var Man;m(117,100,{109:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1}),s.ii=function(n){var t;return t=jhe(this),t[n]},s.ji=function(n,t){var i;i=jhe(this),ir(i,n,t)},s.ki=function(n){var t;t=jhe(this),ir(t,n,null)},s.qh=function(){return u(Kn(this,4),129)},s.rh=function(){throw R(new _t)},s.sh=function(){return(this.Db&4)!=0},s.wh=function(){throw R(new _t)},s.li=function(n){Q4(this,2,n)},s.yh=function(n,t){this.Db=t<<16|this.Db&255,this.li(n)},s.Ah=function(){return Go(this)},s.Ch=function(){return this.Db>>16},s.Dh=function(){var n,t;return Ij(),t=dae(kh((n=u(Kn(this,16),29),n||this.fi()))),t==null?Jce:new ST(this,t)},s.th=function(){return(this.Db&1)==0},s.Gh=function(){return u(Kn(this,128),1996)},s.Hh=function(){return u(Kn(this,16),29)},s.Lh=function(){return(this.Db&32)!=0},s.Mh=function(){return u(Kn(this,2),52)},s.Sh=function(){return(this.Db&64)!=0},s.Xh=function(){throw R(new _t)},s.Yh=function(){return u(Kn(this,64),290)},s._h=function(n){Q4(this,16,n)},s.ai=function(n){Q4(this,128,n)},s.bi=function(n){Q4(this,64,n)},s.ei=function(){return Lo(this)},s.Db=0,v(Jn,"MinimalEObjectImpl",117),m(118,117,{109:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),s.li=function(n){this.Cb=n},s.Mh=function(){return this.Cb},v(Jn,"MinimalEObjectImpl/Container",118),m(2045,118,{109:1,343:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),s.Ih=function(n,t,i){return $de(this,n,t,i)},s.Rh=function(n,t,i){return A0e(this,n,t,i)},s.Th=function(n){return Oae(this,n)},s.$h=function(n,t){E1e(this,n,t)},s.fi=function(){return Gu(),Aan},s.hi=function(n){f1e(this,n)},s.lf=function(){return BJe(this)},s.fh=function(){return!this.o&&(this.o=new os((Gu(),h1),Zd,this,0)),this.o},s.mf=function(n){return ke(this,n)},s.nf=function(n){return ba(this,n)},s.of=function(n,t){return Ei(this,n,t)},v(wg,"EMapPropertyHolderImpl",2045),m(559,118,{109:1,372:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},Jk),s.Ih=function(n,t,i){switch(n){case 0:return this.a;case 1:return this.b}return sz(this,n,t,i)},s.Th=function(n){switch(n){case 0:return this.a!=0;case 1:return this.b!=0}return LQ(this,n)},s.$h=function(n,t){switch(n){case 0:wB(this,ne(re(t)));return;case 1:pB(this,ne(re(t)));return}yW(this,n,t)},s.fi=function(){return Gu(),jan},s.hi=function(n){switch(n){case 0:wB(this,0);return;case 1:pB(this,0);return}pW(this,n)},s.Ib=function(){var n;return(this.Db&64)!=0?Ff(this):(n=new cf(Ff(this)),n.a+=" (x: ",Tv(n,this.a),n.a+=", y: ",Tv(n,this.b),n.a+=")",n.a)},s.a=0,s.b=0,v(wg,"ElkBendPointImpl",559),m(727,2045,{109:1,343:1,174:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),s.Ih=function(n,t,i){return J1e(this,n,t,i)},s.Ph=function(n,t,i){return lW(this,n,t,i)},s.Rh=function(n,t,i){return KY(this,n,t,i)},s.Th=function(n){return r1e(this,n)},s.$h=function(n,t){t0e(this,n,t)},s.fi=function(){return Gu(),San},s.hi=function(n){R1e(this,n)},s.ih=function(){return this.k},s.jh=function(){return NV(this)},s.Ib=function(){return vQ(this)},s.k=null,v(wg,"ElkGraphElementImpl",727),m(728,727,{109:1,343:1,174:1,276:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),s.Ih=function(n,t,i){return nde(this,n,t,i)},s.Th=function(n){return sde(this,n)},s.$h=function(n,t){i0e(this,n,t)},s.fi=function(){return Gu(),xan},s.hi=function(n){dde(this,n)},s.kh=function(){return this.f},s.lh=function(){return this.g},s.mh=function(){return this.i},s.nh=function(){return this.j},s.oh=function(n,t){vw(this,n,t)},s.ph=function(n,t){Il(this,n,t)},s.Ib=function(){return gW(this)},s.f=0,s.g=0,s.i=0,s.j=0,v(wg,"ElkShapeImpl",728),m(729,728,{109:1,343:1,84:1,174:1,276:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),s.Ih=function(n,t,i){return Nde(this,n,t,i)},s.Ph=function(n,t,i){return Yde(this,n,t,i)},s.Rh=function(n,t,i){return Qde(this,n,t,i)},s.Th=function(n){return v1e(this,n)},s.$h=function(n,t){fbe(this,n,t)},s.fi=function(){return Gu(),Ean},s.hi=function(n){Ade(this,n)},s.gh=function(){return!this.d&&(this.d=new In(pr,this,8,5)),this.d},s.hh=function(){return!this.e&&(this.e=new In(pr,this,7,4)),this.e},v(wg,"ElkConnectableShapeImpl",729),m(271,727,{109:1,343:1,85:1,174:1,271:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},kv),s.xh=function(n){return Ude(this,n)},s.Ih=function(n,t,i){switch(n){case 3:return T2(this);case 4:return!this.b&&(this.b=new In(mt,this,4,7)),this.b;case 5:return!this.c&&(this.c=new In(mt,this,5,8)),this.c;case 6:return!this.a&&(this.a=new we($i,this,6,6)),this.a;case 7:return $n(),!this.b&&(this.b=new In(mt,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new In(mt,this,5,8)),this.c.i<=1));case 8:return $n(),!!eS(this);case 9:return $n(),!!Uw(this);case 10:return $n(),!this.b&&(this.b=new In(mt,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new In(mt,this,5,8)),this.c.i!=0)}return J1e(this,n,t,i)},s.Ph=function(n,t,i){var r;switch(t){case 3:return this.Cb&&(i=(r=this.Db>>16,r>=0?Ude(this,i):this.Cb.Qh(this,-1-r,null,i))),Cle(this,u(n,26),i);case 4:return!this.b&&(this.b=new In(mt,this,4,7)),Co(this.b,n,i);case 5:return!this.c&&(this.c=new In(mt,this,5,8)),Co(this.c,n,i);case 6:return!this.a&&(this.a=new we($i,this,6,6)),Co(this.a,n,i)}return lW(this,n,t,i)},s.Rh=function(n,t,i){switch(t){case 3:return Cle(this,null,i);case 4:return!this.b&&(this.b=new In(mt,this,4,7)),vc(this.b,n,i);case 5:return!this.c&&(this.c=new In(mt,this,5,8)),vc(this.c,n,i);case 6:return!this.a&&(this.a=new we($i,this,6,6)),vc(this.a,n,i)}return KY(this,n,t,i)},s.Th=function(n){switch(n){case 3:return!!T2(this);case 4:return!!this.b&&this.b.i!=0;case 5:return!!this.c&&this.c.i!=0;case 6:return!!this.a&&this.a.i!=0;case 7:return!this.b&&(this.b=new In(mt,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new In(mt,this,5,8)),this.c.i<=1));case 8:return eS(this);case 9:return Uw(this);case 10:return!this.b&&(this.b=new In(mt,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new In(mt,this,5,8)),this.c.i!=0)}return r1e(this,n)},s.$h=function(n,t){switch(n){case 3:_z(this,u(t,26));return;case 4:!this.b&&(this.b=new In(mt,this,4,7)),kt(this.b),!this.b&&(this.b=new In(mt,this,4,7)),nr(this.b,u(t,18));return;case 5:!this.c&&(this.c=new In(mt,this,5,8)),kt(this.c),!this.c&&(this.c=new In(mt,this,5,8)),nr(this.c,u(t,18));return;case 6:!this.a&&(this.a=new we($i,this,6,6)),kt(this.a),!this.a&&(this.a=new we($i,this,6,6)),nr(this.a,u(t,18));return}t0e(this,n,t)},s.fi=function(){return Gu(),_8e},s.hi=function(n){switch(n){case 3:_z(this,null);return;case 4:!this.b&&(this.b=new In(mt,this,4,7)),kt(this.b);return;case 5:!this.c&&(this.c=new In(mt,this,5,8)),kt(this.c);return;case 6:!this.a&&(this.a=new we($i,this,6,6)),kt(this.a);return}R1e(this,n)},s.Ib=function(){return RKe(this)},v(wg,"ElkEdgeImpl",271),m(443,2045,{109:1,343:1,170:1,443:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},yo),s.xh=function(n){return Jde(this,n)},s.Ih=function(n,t,i){switch(n){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return!this.a&&(this.a=new mr(yl,this,5)),this.a;case 6:return L_e(this);case 7:return t?zQ(this):this.i;case 8:return t?BQ(this):this.f;case 9:return!this.g&&(this.g=new In($i,this,9,10)),this.g;case 10:return!this.e&&(this.e=new In($i,this,10,9)),this.e;case 11:return this.d}return $de(this,n,t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?Jde(this,i):this.Cb.Qh(this,-1-c,null,i))),Tle(this,u(n,85),i);case 9:return!this.g&&(this.g=new In($i,this,9,10)),Co(this.g,n,i);case 10:return!this.e&&(this.e=new In($i,this,10,9)),Co(this.e,n,i)}return o=u(Cn((r=u(Kn(this,16),29),r||(Gu(),wG)),t),69),o.uk().xk(this,Lo(this),t-dt((Gu(),wG)),n,i)},s.Rh=function(n,t,i){switch(t){case 5:return!this.a&&(this.a=new mr(yl,this,5)),vc(this.a,n,i);case 6:return Tle(this,null,i);case 9:return!this.g&&(this.g=new In($i,this,9,10)),vc(this.g,n,i);case 10:return!this.e&&(this.e=new In($i,this,10,9)),vc(this.e,n,i)}return A0e(this,n,t,i)},s.Th=function(n){switch(n){case 1:return this.j!=0;case 2:return this.k!=0;case 3:return this.b!=0;case 4:return this.c!=0;case 5:return!!this.a&&this.a.i!=0;case 6:return!!L_e(this);case 7:return!!this.i;case 8:return!!this.f;case 9:return!!this.g&&this.g.i!=0;case 10:return!!this.e&&this.e.i!=0;case 11:return this.d!=null}return Oae(this,n)},s.$h=function(n,t){switch(n){case 1:e3(this,ne(re(t)));return;case 2:n3(this,ne(re(t)));return;case 3:Wv(this,ne(re(t)));return;case 4:Zv(this,ne(re(t)));return;case 5:!this.a&&(this.a=new mr(yl,this,5)),kt(this.a),!this.a&&(this.a=new mr(yl,this,5)),nr(this.a,u(t,18));return;case 6:$Ue(this,u(t,85));return;case 7:SB(this,u(t,84));return;case 8:EB(this,u(t,84));return;case 9:!this.g&&(this.g=new In($i,this,9,10)),kt(this.g),!this.g&&(this.g=new In($i,this,9,10)),nr(this.g,u(t,18));return;case 10:!this.e&&(this.e=new In($i,this,10,9)),kt(this.e),!this.e&&(this.e=new In($i,this,10,9)),nr(this.e,u(t,18));return;case 11:Xhe(this,Pt(t));return}E1e(this,n,t)},s.fi=function(){return Gu(),wG},s.hi=function(n){switch(n){case 1:e3(this,0);return;case 2:n3(this,0);return;case 3:Wv(this,0);return;case 4:Zv(this,0);return;case 5:!this.a&&(this.a=new mr(yl,this,5)),kt(this.a);return;case 6:$Ue(this,null);return;case 7:SB(this,null);return;case 8:EB(this,null);return;case 9:!this.g&&(this.g=new In($i,this,9,10)),kt(this.g);return;case 10:!this.e&&(this.e=new In($i,this,10,9)),kt(this.e);return;case 11:Xhe(this,null);return}f1e(this,n)},s.Ib=function(){return Kqe(this)},s.b=0,s.c=0,s.d=null,s.j=0,s.k=0,v(wg,"ElkEdgeSectionImpl",443),m(161,118,{109:1,94:1,93:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1}),s.Ih=function(n,t,i){var r;return n==0?(!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab):Pl(this,n-dt(this.fi()),Cn((r=u(Kn(this,16),29),r||this.fi()),n),t,i)},s.Ph=function(n,t,i){var r,c;return t==0?(!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i)):(c=u(Cn((r=u(Kn(this,16),29),r||this.fi()),t),69),c.uk().xk(this,Lo(this),t-dt(this.fi()),n,i))},s.Rh=function(n,t,i){var r,c;return t==0?(!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i)):(c=u(Cn((r=u(Kn(this,16),29),r||this.fi()),t),69),c.uk().yk(this,Lo(this),t-dt(this.fi()),n,i))},s.Th=function(n){var t;return n==0?!!this.Ab&&this.Ab.i!=0:Ll(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.Wh=function(n){return Cge(this,n)},s.$h=function(n,t){var i;if(n===0){!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return}Jl(this,n-dt(this.fi()),Cn((i=u(Kn(this,16),29),i||this.fi()),n),t)},s.ai=function(n){Q4(this,128,n)},s.fi=function(){return jn(),qan},s.hi=function(n){var t;if(n===0){!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return}Fl(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.mi=function(){this.Bb|=1},s.ni=function(n){return oS(this,n)},s.Bb=0,v(Jn,"EModelElementImpl",161),m(710,161,{109:1,94:1,93:1,469:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1},IC),s.oi=function(n,t){return fVe(this,n,t)},s.pi=function(n){var t,i,r,c,o;if(this.a!=ol(n)||(n.Bb&256)!=0)throw R(new Un(vne+n.zb+up));for(r=tu(n);Vu(r.a).i!=0;){if(i=u(oN(r,0,(t=u(K(Vu(r.a),0),87),o=t.c,X(o,88)?u(o,29):(jn(),jf))),29),Gw(i))return c=ol(i).ti().pi(i),u(c,52)._h(n),c;r=tu(i)}return(n.D!=null?n.D:n.B)=="java.util.Map$Entry"?new gIe(n):new bfe(n)},s.qi=function(n,t){return Qw(this,n,t)},s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.a}return Pl(this,n-dt((jn(),jb)),Cn((r=u(Kn(this,16),29),r||jb),n),t,i)},s.Ph=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 1:return this.a&&(i=u(this.a,52).Qh(this,4,Aa,i)),P1e(this,u(n,241),i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),jb)),t),69),c.uk().xk(this,Lo(this),t-dt((jn(),jb)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 1:return P1e(this,null,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),jb)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),jb)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return!!this.a}return Ll(this,n-dt((jn(),jb)),Cn((t=u(Kn(this,16),29),t||jb),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:SGe(this,u(t,241));return}Jl(this,n-dt((jn(),jb)),Cn((i=u(Kn(this,16),29),i||jb),n),t)},s.fi=function(){return jn(),jb},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:SGe(this,null);return}Fl(this,n-dt((jn(),jb)),Cn((t=u(Kn(this,16),29),t||jb),n))};var uA,R8e,Can;v(Jn,"EFactoryImpl",710),m(1018,710,{109:1,2075:1,94:1,93:1,469:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1},hU),s.oi=function(n,t){switch(n.fk()){case 12:return u(t,147).Og();case 13:return fu(t);default:throw R(new Un(u7+n.ve()+up))}},s.pi=function(n){var t,i,r,c,o,l,f,h;switch(n.G==-1&&(n.G=(t=ol(n),t?$d(t.si(),n):-1)),n.G){case 4:return o=new ZM,o;case 6:return l=new mj,l;case 7:return f=new voe,f;case 8:return r=new kv,r;case 9:return i=new Jk,i;case 10:return c=new yo,c;case 11:return h=new F6,h;default:throw R(new Un(vne+n.zb+up))}},s.qi=function(n,t){switch(n.fk()){case 13:case 12:return null;default:throw R(new Un(u7+n.ve()+up))}},v(wg,"ElkGraphFactoryImpl",1018),m(439,161,{109:1,94:1,93:1,158:1,197:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1}),s.Dh=function(){var n,t;return t=(n=u(Kn(this,16),29),dae(kh(n||this.fi()))),t==null?(Ij(),Ij(),Jce):new POe(this,t)},s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.ve()}return Pl(this,n-dt(this.fi()),Cn((r=u(Kn(this,16),29),r||this.fi()),n),t,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null}return Ll(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:this.ri(Pt(t));return}Jl(this,n-dt(this.fi()),Cn((i=u(Kn(this,16),29),i||this.fi()),n),t)},s.fi=function(){return jn(),Uan},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:this.ri(null);return}Fl(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.ve=function(){return this.zb},s.ri=function(n){Mo(this,n)},s.Ib=function(){return LE(this)},s.zb=null,v(Jn,"ENamedElementImpl",439),m(184,439,{109:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,52:1,100:1,161:1,184:1,117:1,118:1,680:1},u_e),s.xh=function(n){return LHe(this,n)},s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return!this.rb&&(this.rb=new x2(this,Ma,this)),this.rb;case 6:return!this.vb&&(this.vb=new x4(Aa,this,6,7)),this.vb;case 7:return t?this.Db>>16==7?u(this.Cb,241):null:J_e(this)}return Pl(this,n-dt((jn(),i0)),Cn((r=u(Kn(this,16),29),r||i0),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 4:return this.sb&&(i=u(this.sb,52).Qh(this,1,cA,i)),B1e(this,u(n,469),i);case 5:return!this.rb&&(this.rb=new x2(this,Ma,this)),Co(this.rb,n,i);case 6:return!this.vb&&(this.vb=new x4(Aa,this,6,7)),Co(this.vb,n,i);case 7:return this.Cb&&(i=(c=this.Db>>16,c>=0?LHe(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,7,i)}return o=u(Cn((r=u(Kn(this,16),29),r||(jn(),i0)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),i0)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 4:return B1e(this,null,i);case 5:return!this.rb&&(this.rb=new x2(this,Ma,this)),vc(this.rb,n,i);case 6:return!this.vb&&(this.vb=new x4(Aa,this,6,7)),vc(this.vb,n,i);case 7:return hl(this,null,7,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),i0)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),i0)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.yb!=null;case 3:return this.xb!=null;case 4:return!!this.sb;case 5:return!!this.rb&&this.rb.i!=0;case 6:return!!this.vb&&this.vb.i!=0;case 7:return!!J_e(this)}return Ll(this,n-dt((jn(),i0)),Cn((t=u(Kn(this,16),29),t||i0),n))},s.Wh=function(n){var t;return t=RNn(this,n),t||Cge(this,n)},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:Mo(this,Pt(t));return;case 2:OB(this,Pt(t));return;case 3:TB(this,Pt(t));return;case 4:bW(this,u(t,469));return;case 5:!this.rb&&(this.rb=new x2(this,Ma,this)),kt(this.rb),!this.rb&&(this.rb=new x2(this,Ma,this)),nr(this.rb,u(t,18));return;case 6:!this.vb&&(this.vb=new x4(Aa,this,6,7)),kt(this.vb),!this.vb&&(this.vb=new x4(Aa,this,6,7)),nr(this.vb,u(t,18));return}Jl(this,n-dt((jn(),i0)),Cn((i=u(Kn(this,16),29),i||i0),n),t)},s.bi=function(n){var t,i;if(n&&this.rb)for(i=new st(this.rb);i.e!=i.i.gc();)t=ft(i),X(t,360)&&(u(t,360).w=null);Q4(this,64,n)},s.fi=function(){return jn(),i0},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:Mo(this,null);return;case 2:OB(this,null);return;case 3:TB(this,null);return;case 4:bW(this,null);return;case 5:!this.rb&&(this.rb=new x2(this,Ma,this)),kt(this.rb);return;case 6:!this.vb&&(this.vb=new x4(Aa,this,6,7)),kt(this.vb);return}Fl(this,n-dt((jn(),i0)),Cn((t=u(Kn(this,16),29),t||i0),n))},s.mi=function(){ZQ(this)},s.si=function(){return!this.rb&&(this.rb=new x2(this,Ma,this)),this.rb},s.ti=function(){return this.sb},s.ui=function(){return this.ub},s.vi=function(){return this.xb},s.wi=function(){return this.yb},s.xi=function(n){this.ub=n},s.Ib=function(){var n;return(this.Db&64)!=0?LE(this):(n=new cf(LE(this)),n.a+=" (nsURI: ",Bc(n,this.yb),n.a+=", nsPrefix: ",Bc(n,this.xb),n.a+=")",n.a)},s.xb=null,s.yb=null,v(Jn,"EPackageImpl",184),m(556,184,{109:1,2077:1,556:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,52:1,100:1,161:1,184:1,117:1,118:1,680:1},tUe),s.q=!1,s.r=!1;var Tan=!1;v(wg,"ElkGraphPackageImpl",556),m(362,728,{109:1,343:1,174:1,157:1,276:1,362:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},ZM),s.xh=function(n){return Hde(this,n)},s.Ih=function(n,t,i){switch(n){case 7:return vae(this);case 8:return this.a}return nde(this,n,t,i)},s.Ph=function(n,t,i){var r;return t===7?(this.Cb&&(i=(r=this.Db>>16,r>=0?Hde(this,i):this.Cb.Qh(this,-1-r,null,i))),Mfe(this,u(n,174),i)):lW(this,n,t,i)},s.Rh=function(n,t,i){return t==7?Mfe(this,null,i):KY(this,n,t,i)},s.Th=function(n){switch(n){case 7:return!!vae(this);case 8:return!bn("",this.a)}return sde(this,n)},s.$h=function(n,t){switch(n){case 7:Abe(this,u(t,174));return;case 8:Ghe(this,Pt(t));return}i0e(this,n,t)},s.fi=function(){return Gu(),L8e},s.hi=function(n){switch(n){case 7:Abe(this,null);return;case 8:Ghe(this,"");return}dde(this,n)},s.Ib=function(){return HGe(this)},s.a="",v(wg,"ElkLabelImpl",362),m(206,729,{109:1,343:1,84:1,174:1,26:1,276:1,206:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},mj),s.xh=function(n){return Xde(this,n)},s.Ih=function(n,t,i){switch(n){case 9:return!this.c&&(this.c=new we($s,this,9,9)),this.c;case 10:return!this.a&&(this.a=new we(Ft,this,10,11)),this.a;case 11:return Fi(this);case 12:return!this.b&&(this.b=new we(pr,this,12,3)),this.b;case 13:return $n(),!this.a&&(this.a=new we(Ft,this,10,11)),this.a.i>0}return Nde(this,n,t,i)},s.Ph=function(n,t,i){var r;switch(t){case 9:return!this.c&&(this.c=new we($s,this,9,9)),Co(this.c,n,i);case 10:return!this.a&&(this.a=new we(Ft,this,10,11)),Co(this.a,n,i);case 11:return this.Cb&&(i=(r=this.Db>>16,r>=0?Xde(this,i):this.Cb.Qh(this,-1-r,null,i))),Gle(this,u(n,26),i);case 12:return!this.b&&(this.b=new we(pr,this,12,3)),Co(this.b,n,i)}return Yde(this,n,t,i)},s.Rh=function(n,t,i){switch(t){case 9:return!this.c&&(this.c=new we($s,this,9,9)),vc(this.c,n,i);case 10:return!this.a&&(this.a=new we(Ft,this,10,11)),vc(this.a,n,i);case 11:return Gle(this,null,i);case 12:return!this.b&&(this.b=new we(pr,this,12,3)),vc(this.b,n,i)}return Qde(this,n,t,i)},s.Th=function(n){switch(n){case 9:return!!this.c&&this.c.i!=0;case 10:return!!this.a&&this.a.i!=0;case 11:return!!Fi(this);case 12:return!!this.b&&this.b.i!=0;case 13:return!this.a&&(this.a=new we(Ft,this,10,11)),this.a.i>0}return v1e(this,n)},s.$h=function(n,t){switch(n){case 9:!this.c&&(this.c=new we($s,this,9,9)),kt(this.c),!this.c&&(this.c=new we($s,this,9,9)),nr(this.c,u(t,18));return;case 10:!this.a&&(this.a=new we(Ft,this,10,11)),kt(this.a),!this.a&&(this.a=new we(Ft,this,10,11)),nr(this.a,u(t,18));return;case 11:Lz(this,u(t,26));return;case 12:!this.b&&(this.b=new we(pr,this,12,3)),kt(this.b),!this.b&&(this.b=new we(pr,this,12,3)),nr(this.b,u(t,18));return}fbe(this,n,t)},s.fi=function(){return Gu(),P8e},s.hi=function(n){switch(n){case 9:!this.c&&(this.c=new we($s,this,9,9)),kt(this.c);return;case 10:!this.a&&(this.a=new we(Ft,this,10,11)),kt(this.a);return;case 11:Lz(this,null);return;case 12:!this.b&&(this.b=new we(pr,this,12,3)),kt(this.b);return}Ade(this,n)},s.Ib=function(){return Jbe(this)},v(wg,"ElkNodeImpl",206),m(193,729,{109:1,343:1,84:1,174:1,125:1,276:1,193:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},voe),s.xh=function(n){return Gde(this,n)},s.Ih=function(n,t,i){return n==9?_a(this):Nde(this,n,t,i)},s.Ph=function(n,t,i){var r;return t===9?(this.Cb&&(i=(r=this.Db>>16,r>=0?Gde(this,i):this.Cb.Qh(this,-1-r,null,i))),Ole(this,u(n,26),i)):Yde(this,n,t,i)},s.Rh=function(n,t,i){return t==9?Ole(this,null,i):Qde(this,n,t,i)},s.Th=function(n){return n==9?!!_a(this):v1e(this,n)},s.$h=function(n,t){if(n===9){kbe(this,u(t,26));return}fbe(this,n,t)},s.fi=function(){return Gu(),$8e},s.hi=function(n){if(n===9){kbe(this,null);return}Ade(this,n)},s.Ib=function(){return LXe(this)},v(wg,"ElkPortImpl",193);var Oan=Gi(yc,"BasicEMap/Entry");m(1091,118,{109:1,45:1,94:1,93:1,136:1,57:1,114:1,52:1,100:1,117:1,118:1},F6),s.Fb=function(n){return this===n},s.jd=function(){return this.b},s.Hb=function(){return jw(this)},s.Ai=function(n){zhe(this,u(n,147))},s.Ih=function(n,t,i){switch(n){case 0:return this.b;case 1:return this.c}return sz(this,n,t,i)},s.Th=function(n){switch(n){case 0:return!!this.b;case 1:return this.c!=null}return LQ(this,n)},s.$h=function(n,t){switch(n){case 0:zhe(this,u(t,147));return;case 1:Fhe(this,t);return}yW(this,n,t)},s.fi=function(){return Gu(),h1},s.hi=function(n){switch(n){case 0:zhe(this,null);return;case 1:Fhe(this,null);return}pW(this,n)},s.yi=function(){var n;return this.a==-1&&(n=this.b,this.a=n?Ni(n):0),this.a},s.kd=function(){return this.c},s.zi=function(n){this.a=n},s.ld=function(n){var t;return t=this.c,Fhe(this,n),t},s.Ib=function(){var n;return(this.Db&64)!=0?Ff(this):(n=new y0,Kt(Kt(Kt(n,this.b?this.b.Og():Vo),nee),Wj(this.c)),n.a)},s.a=-1,s.c=null;var Zd=v(wg,"ElkPropertyToValueMapEntryImpl",1091);m(980,1,{},Yp),v(Wr,"JsonAdapter",980),m(215,63,H1,lh),v(Wr,"JsonImportException",215),m(850,1,{},Qqe),v(Wr,"JsonImporter",850),m(884,1,{},_Ce),s.Bi=function(n){qHe(this.a,this.b,u(n,139))},v(Wr,"JsonImporter/lambda$0$Type",884),m(885,1,{},LCe),s.Bi=function(n){Cqe(this.a,this.b,u(n,139))},v(Wr,"JsonImporter/lambda$1$Type",885),m(893,1,{},uSe),s.Bi=function(n){zDe(this.a,u(n,149))},v(Wr,"JsonImporter/lambda$10$Type",893),m(895,1,{},PCe),s.Bi=function(n){gqe(this.a,this.b,u(n,139))},v(Wr,"JsonImporter/lambda$11$Type",895),m(896,1,{},$Ce),s.Bi=function(n){wqe(this.a,this.b,u(n,139))},v(Wr,"JsonImporter/lambda$12$Type",896),m(902,1,{},YDe),s.Bi=function(n){BGe(this.a,this.b,this.c,this.d,u(n,139))},v(Wr,"JsonImporter/lambda$13$Type",902),m(901,1,{},QDe),s.Bi=function(n){tKe(this.a,this.b,this.c,this.d,u(n,149))},v(Wr,"JsonImporter/lambda$14$Type",901),m(897,1,{},RCe),s.Bi=function(n){hNe(this.a,this.b,Pt(n))},v(Wr,"JsonImporter/lambda$15$Type",897),m(898,1,{},BCe),s.Bi=function(n){dNe(this.a,this.b,Pt(n))},v(Wr,"JsonImporter/lambda$16$Type",898),m(899,1,{},zCe),s.Bi=function(n){AHe(this.b,this.a,u(n,139))},v(Wr,"JsonImporter/lambda$17$Type",899),m(900,1,{},FCe),s.Bi=function(n){MHe(this.b,this.a,u(n,139))},v(Wr,"JsonImporter/lambda$18$Type",900),m(905,1,{},oSe),s.Bi=function(n){OGe(this.a,u(n,149))},v(Wr,"JsonImporter/lambda$19$Type",905),m(886,1,{},sSe),s.Bi=function(n){RHe(this.a,u(n,139))},v(Wr,"JsonImporter/lambda$2$Type",886),m(903,1,{},lSe),s.Bi=function(n){e3(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$20$Type",903),m(904,1,{},fSe),s.Bi=function(n){n3(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$21$Type",904),m(908,1,{},aSe),s.Bi=function(n){TGe(this.a,u(n,149))},v(Wr,"JsonImporter/lambda$22$Type",908),m(906,1,{},hSe),s.Bi=function(n){Wv(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$23$Type",906),m(907,1,{},dSe),s.Bi=function(n){Zv(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$24$Type",907),m(910,1,{},bSe),s.Bi=function(n){tGe(this.a,u(n,139))},v(Wr,"JsonImporter/lambda$25$Type",910),m(909,1,{},gSe),s.Bi=function(n){FDe(this.a,u(n,149))},v(Wr,"JsonImporter/lambda$26$Type",909),m(911,1,ut,JCe),s.Ad=function(n){R9n(this.b,this.a,Pt(n))},v(Wr,"JsonImporter/lambda$27$Type",911),m(912,1,ut,HCe),s.Ad=function(n){B9n(this.b,this.a,Pt(n))},v(Wr,"JsonImporter/lambda$28$Type",912),m(913,1,{},GCe),s.Bi=function(n){aUe(this.a,this.b,u(n,139))},v(Wr,"JsonImporter/lambda$29$Type",913),m(889,1,{},wSe),s.Bi=function(n){YFe(this.a,u(n,149))},v(Wr,"JsonImporter/lambda$3$Type",889),m(914,1,{},qCe),s.Bi=function(n){DUe(this.a,this.b,u(n,139))},v(Wr,"JsonImporter/lambda$30$Type",914),m(915,1,{},pSe),s.Bi=function(n){mRe(this.a,re(n))},v(Wr,"JsonImporter/lambda$31$Type",915),m(916,1,{},mSe),s.Bi=function(n){vRe(this.a,re(n))},v(Wr,"JsonImporter/lambda$32$Type",916),m(917,1,{},vSe),s.Bi=function(n){yRe(this.a,re(n))},v(Wr,"JsonImporter/lambda$33$Type",917),m(918,1,{},ySe),s.Bi=function(n){kRe(this.a,re(n))},v(Wr,"JsonImporter/lambda$34$Type",918),m(919,1,{},kSe),s.Bi=function(n){LMn(this.a,u(n,57))},v(Wr,"JsonImporter/lambda$35$Type",919),m(920,1,{},jSe),s.Bi=function(n){PMn(this.a,u(n,57))},v(Wr,"JsonImporter/lambda$36$Type",920),m(924,1,{},VDe),v(Wr,"JsonImporter/lambda$37$Type",924),m(921,1,ut,qNe),s.Ad=function(n){a7n(this.a,this.c,this.b,u(n,372))},v(Wr,"JsonImporter/lambda$38$Type",921),m(922,1,ut,UCe),s.Ad=function(n){Ygn(this.a,this.b,u(n,170))},v(Wr,"JsonImporter/lambda$39$Type",922),m(887,1,{},ESe),s.Bi=function(n){e3(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$4$Type",887),m(923,1,ut,XCe),s.Ad=function(n){Qgn(this.a,this.b,u(n,170))},v(Wr,"JsonImporter/lambda$40$Type",923),m(925,1,ut,UNe),s.Ad=function(n){h7n(this.a,this.b,this.c,u(n,8))},v(Wr,"JsonImporter/lambda$41$Type",925),m(888,1,{},SSe),s.Bi=function(n){n3(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$5$Type",888),m(892,1,{},xSe),s.Bi=function(n){QFe(this.a,u(n,149))},v(Wr,"JsonImporter/lambda$6$Type",892),m(890,1,{},ASe),s.Bi=function(n){Wv(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$7$Type",890),m(891,1,{},MSe),s.Bi=function(n){Zv(this.a,ne(re(n)))},v(Wr,"JsonImporter/lambda$8$Type",891),m(894,1,{},CSe),s.Bi=function(n){iGe(this.a,u(n,139))},v(Wr,"JsonImporter/lambda$9$Type",894),m(944,1,ut,TSe),s.Ad=function(n){D4(this.a,new M2(Pt(n)))},v(Wr,"JsonMetaDataConverter/lambda$0$Type",944),m(945,1,ut,OSe),s.Ad=function(n){H3n(this.a,u(n,244))},v(Wr,"JsonMetaDataConverter/lambda$1$Type",945),m(946,1,ut,NSe),s.Ad=function(n){_4n(this.a,u(n,144))},v(Wr,"JsonMetaDataConverter/lambda$2$Type",946),m(947,1,ut,ISe),s.Ad=function(n){G3n(this.a,u(n,160))},v(Wr,"JsonMetaDataConverter/lambda$3$Type",947),m(244,23,{3:1,35:1,23:1,244:1},m4);var pG,mG,Lce,vG,yG,kG,Pce,$ce,jG=yt(EN,"GraphFeature",244,Tt,p8n,xvn),Nan;m(11,1,{35:1,147:1},ki,Pi,an,Yr),s.Dd=function(n){return Kwn(this,u(n,147))},s.Fb=function(n){return k_e(this,n)},s.Rg=function(){return _e(this)},s.Og=function(){return this.b},s.Hb=function(){return Id(this.b)},s.Ib=function(){return this.b},v(EN,"Property",11),m(657,1,Yt,hX),s.Le=function(n,t){return Tjn(this,u(n,105),u(t,105))},s.Fb=function(n){return this===n},s.Me=function(){return new At(this)},v(EN,"PropertyHolderComparator",657),m(698,1,Fr,roe),s.Nb=function(n){Zr(this,n)},s.Pb=function(){return H9n(this)},s.Qb=function(){AAe()},s.Ob=function(){return!!this.a},v(qF,"ElkGraphUtil/AncestorIterator",698);var B8e=Gi(yc,"EList");m(71,56,{20:1,31:1,56:1,18:1,16:1,71:1,61:1}),s._c=function(n,t){RE(this,n,t)},s.Ec=function(n){return Et(this,n)},s.ad=function(n,t){return h1e(this,n,t)},s.Fc=function(n){return nr(this,n)},s.Gi=function(){return new E4(this)},s.Hi=function(){return new ET(this)},s.Ii=function(n){return bO(this,n)},s.Ji=function(){return!0},s.Ki=function(n,t){},s.Li=function(){},s.Mi=function(n,t){gY(this,n,t)},s.Ni=function(n,t,i){},s.Oi=function(n,t){},s.Pi=function(n,t,i){},s.Fb=function(n){return mXe(this,n)},s.Hb=function(){return s1e(this)},s.Qi=function(){return!1},s.Jc=function(){return new st(this)},s.cd=function(){return new j4(this)},s.dd=function(n){var t;if(t=this.gc(),n<0||n>t)throw R(new k2(n,t));return new yV(this,n)},s.Si=function(n,t){this.Ri(n,this.bd(t))},s.Kc=function(n){return fB(this,n)},s.Ui=function(n,t){return t},s.fd=function(n,t){return o3(this,n,t)},s.Ib=function(){return rde(this)},s.Wi=function(){return!0},s.Xi=function(n,t){return r8(this,t)},v(yc,"AbstractEList",71),m(67,71,Th,J6,_w,t1e),s.Ci=function(n,t){return fW(this,n,t)},s.Di=function(n){return oHe(this,n)},s.Ei=function(n,t){MO(this,n,t)},s.Fi=function(n){WT(this,n)},s.Yi=function(n){return phe(this,n)},s.$b=function(){yE(this)},s.Gc=function(n){return y8(this,n)},s.Xb=function(n){return K(this,n)},s.Zi=function(n){var t,i,r;++this.j,i=this.g==null?0:this.g.length,n>i&&(r=this.g,t=i+(i/2|0)+4,t=0?(this.ed(t),!0):!1},s.Vi=function(n,t){return this.Bj(n,this.Xi(n,t))},s.gc=function(){return this.Cj()},s.Nc=function(){return this.Dj()},s.Oc=function(n){return this.Ej(n)},s.Ib=function(){return this.Fj()},v(yc,"DelegatingEList",2055),m(2056,2055,RZe),s.Ci=function(n,t){return tge(this,n,t)},s.Di=function(n){return this.Ci(this.Cj(),n)},s.Ei=function(n,t){iUe(this,n,t)},s.Fi=function(n){Uqe(this,n)},s.Ji=function(){return!this.Kj()},s.$b=function(){dS(this)},s.Gj=function(n,t,i,r,c){return new v_e(this,n,t,i,r,c)},s.Hj=function(n){hi(this.hj(),n)},s.Ij=function(){return null},s.Jj=function(){return-1},s.hj=function(){return null},s.Kj=function(){return!1},s.Lj=function(n,t){return t},s.Mj=function(n,t){return t},s.Nj=function(){return!1},s.Oj=function(){return!this.yj()},s.Ri=function(n,t){var i,r;return this.Nj()?(r=this.Oj(),i=E0e(this,n,t),this.Hj(this.Gj(7,ve(t),i,n,r)),i):E0e(this,n,t)},s.ed=function(n){var t,i,r,c;return this.Nj()?(i=null,r=this.Oj(),t=this.Gj(4,c=cR(this,n),null,n,r),this.Kj()&&c?(i=this.Mj(c,i),i?(i.lj(t),i.mj()):this.Hj(t)):i?(i.lj(t),i.mj()):this.Hj(t),c):(c=cR(this,n),this.Kj()&&c&&(i=this.Mj(c,null),i&&i.mj()),c)},s.Vi=function(n,t){return bKe(this,n,t)},v(ky,"DelegatingNotifyingListImpl",2056),m(151,1,zN),s.lj=function(n){return s0e(this,n)},s.mj=function(){EY(this)},s.ej=function(){return this.d},s.Ij=function(){return null},s.Pj=function(){return null},s.fj=function(n){return-1},s.gj=function(){return ZUe(this)},s.hj=function(){return null},s.ij=function(){return Nbe(this)},s.jj=function(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o},s.Qj=function(){return!1},s.kj=function(n){var t,i,r,c,o,l,f,h,b,p,y;switch(this.d){case 1:case 2:switch(c=n.ej(),c){case 1:case 2:if(o=n.hj(),ue(o)===ue(this.hj())&&this.fj(null)==n.fj(null))return this.g=n.gj(),n.ej()==1&&(this.d=1),!0}case 4:{switch(c=n.ej(),c){case 4:{if(o=n.hj(),ue(o)===ue(this.hj())&&this.fj(null)==n.fj(null))return b=yge(this),h=this.o<0?this.o<-2?-2-this.o-1:-1:this.o,l=n.jj(),this.d=6,y=new _w(2),h<=l?(Et(y,this.n),Et(y,n.ij()),this.g=F(z($t,1),ni,30,15,[this.o=h,l+1])):(Et(y,n.ij()),Et(y,this.n),this.g=F(z($t,1),ni,30,15,[this.o=l,h])),this.n=y,b||(this.o=-2-this.o-1),!0;break}}break}case 6:{switch(c=n.ej(),c){case 4:{if(o=n.hj(),ue(o)===ue(this.hj())&&this.fj(null)==n.fj(null)){for(b=yge(this),l=n.jj(),p=u(this.g,54),r=le($t,ni,30,p.length+1,15,1),t=0;t>>0,t.toString(16))),r.a+=" (eventType: ",this.d){case 1:{r.a+="SET";break}case 2:{r.a+="UNSET";break}case 3:{r.a+="ADD";break}case 5:{r.a+="ADD_MANY";break}case 4:{r.a+="REMOVE";break}case 6:{r.a+="REMOVE_MANY";break}case 7:{r.a+="MOVE";break}case 8:{r.a+="REMOVING_ADAPTER";break}case 9:{r.a+="RESOLVE";break}default:{_X(r,this.d);break}}if(FXe(this)&&(r.a+=", touch: true"),r.a+=", position: ",_X(r,this.o<0?this.o<-2?-2-this.o-1:-1:this.o),r.a+=", notifier: ",Uj(r,this.hj()),r.a+=", feature: ",Uj(r,this.Ij()),r.a+=", oldValue: ",Uj(r,Nbe(this)),r.a+=", newValue: ",this.d==6&&X(this.g,54)){for(i=u(this.g,54),r.a+="[",n=0;n10?((!this.b||this.c.j!=this.a)&&(this.b=new E2(this),this.a=this.j),rf(this.b,n)):y8(this,n)},s.Wi=function(){return!0},s.a=0,v(yc,"AbstractEList/1",949),m(305,99,cF,k2),v(yc,"AbstractEList/BasicIndexOutOfBoundsException",305),m(42,1,Fr,st),s.Nb=function(n){Zr(this,n)},s.Vj=function(){if(this.i.j!=this.f)throw R(new Nl)},s.Wj=function(){return ft(this)},s.Ob=function(){return this.e!=this.i.gc()},s.Pb=function(){return this.Wj()},s.Qb=function(){VE(this)},s.e=0,s.f=0,s.g=-1,v(yc,"AbstractEList/EIterator",42),m(286,42,Wh,j4,yV),s.Qb=function(){VE(this)},s.Rb=function(n){sJe(this,n)},s.Xj=function(){var n;try{return n=this.d.Xb(--this.e),this.Vj(),this.g=this.e,n}catch(t){throw t=sr(t),X(t,99)?(this.Vj(),R(new hu)):R(t)}},s.Yj=function(n){sHe(this,n)},s.Sb=function(){return this.e!=0},s.Tb=function(){return this.e},s.Ub=function(){return this.Xj()},s.Vb=function(){return this.e-1},s.Wb=function(n){this.Yj(n)},v(yc,"AbstractEList/EListIterator",286),m(355,42,Fr,E4),s.Wj=function(){return PQ(this)},s.Qb=function(){throw R(new _t)},v(yc,"AbstractEList/NonResolvingEIterator",355),m(391,286,Wh,ET,Xle),s.Rb=function(n){throw R(new _t)},s.Wj=function(){var n;try{return n=this.c.Ti(this.e),this.Vj(),this.g=this.e++,n}catch(t){throw t=sr(t),X(t,99)?(this.Vj(),R(new hu)):R(t)}},s.Xj=function(){var n;try{return n=this.c.Ti(--this.e),this.Vj(),this.g=this.e,n}catch(t){throw t=sr(t),X(t,99)?(this.Vj(),R(new hu)):R(t)}},s.Qb=function(){throw R(new _t)},s.Wb=function(n){throw R(new _t)},v(yc,"AbstractEList/NonResolvingEListIterator",391),m(2042,71,BZe),s.Ci=function(n,t){var i,r,c,o,l,f,h,b,p,y,S;if(c=t.gc(),c!=0){for(b=u(Kn(this.a,4),129),p=b==null?0:b.length,S=p+c,r=oQ(this,S),y=p-n,y>0&&Wu(b,n,r,n+c,y),h=t.Jc(),l=0;li)throw R(new k2(n,i));return new _De(this,n)},s.$b=function(){var n,t;++this.j,n=u(Kn(this.a,4),129),t=n==null?0:n.length,p8(this,null),gY(this,t,n)},s.Gc=function(n){var t,i,r,c,o;if(t=u(Kn(this.a,4),129),t!=null){if(n!=null){for(r=t,c=0,o=r.length;c=i)throw R(new k2(n,i));return t[n]},s.bd=function(n){var t,i,r;if(t=u(Kn(this.a,4),129),t!=null){if(n!=null){for(i=0,r=t.length;ii)throw R(new k2(n,i));return new DDe(this,n)},s.Ri=function(n,t){var i,r,c;if(i=pJe(this),c=i==null?0:i.length,n>=c)throw R(new jo(Cne+n+pg+c));if(t>=c)throw R(new jo(Tne+t+pg+c));return r=i[t],n!=t&&(n0&&Wu(n,0,t,0,i),t},s.Oc=function(n){var t,i,r;return t=u(Kn(this.a,4),129),r=t==null?0:t.length,r>0&&(n.lengthr&&ir(n,r,null),n};var Ian;v(yc,"ArrayDelegatingEList",2042),m(1032,42,Fr,FPe),s.Vj=function(){if(this.b.j!=this.f||ue(u(Kn(this.b.a,4),129))!==ue(this.a))throw R(new Nl)},s.Qb=function(){VE(this),this.a=u(Kn(this.b.a,4),129)},v(yc,"ArrayDelegatingEList/EIterator",1032),m(712,286,Wh,eDe,DDe),s.Vj=function(){if(this.b.j!=this.f||ue(u(Kn(this.b.a,4),129))!==ue(this.a))throw R(new Nl)},s.Yj=function(n){sHe(this,n),this.a=u(Kn(this.b.a,4),129)},s.Qb=function(){VE(this),this.a=u(Kn(this.b.a,4),129)},v(yc,"ArrayDelegatingEList/EListIterator",712),m(1033,355,Fr,JPe),s.Vj=function(){if(this.b.j!=this.f||ue(u(Kn(this.b.a,4),129))!==ue(this.a))throw R(new Nl)},v(yc,"ArrayDelegatingEList/NonResolvingEIterator",1033),m(713,391,Wh,nDe,_De),s.Vj=function(){if(this.b.j!=this.f||ue(u(Kn(this.b.a,4),129))!==ue(this.a))throw R(new Nl)},v(yc,"ArrayDelegatingEList/NonResolvingEListIterator",713),m(605,305,cF,EK),v(yc,"BasicEList/BasicIndexOutOfBoundsException",605),m(699,67,Th,Nse),s._c=function(n,t){throw R(new _t)},s.Ec=function(n){throw R(new _t)},s.ad=function(n,t){throw R(new _t)},s.Fc=function(n){throw R(new _t)},s.$b=function(){throw R(new _t)},s.Zi=function(n){throw R(new _t)},s.Jc=function(){return this.Gi()},s.cd=function(){return this.Hi()},s.dd=function(n){return this.Ii(n)},s.Ri=function(n,t){throw R(new _t)},s.Si=function(n,t){throw R(new _t)},s.ed=function(n){throw R(new _t)},s.Kc=function(n){throw R(new _t)},s.fd=function(n,t){throw R(new _t)},v(yc,"BasicEList/UnmodifiableEList",699),m(711,1,{3:1,20:1,18:1,16:1,61:1,586:1}),s._c=function(n,t){$wn(this,n,u(t,45))},s.Ec=function(n){return Npn(this,u(n,45))},s.Ic=function(n){cc(this,n)},s.Xb=function(n){return u(K(this.c,n),136)},s.Ri=function(n,t){return u(this.c.Ri(n,t),45)},s.Si=function(n,t){Rwn(this,n,u(t,45))},s.ed=function(n){return u(this.c.ed(n),45)},s.fd=function(n,t){return U3n(this,n,u(t,45))},s.gd=function(n){Zb(this,n)},s.Lc=function(){return new yn(this,16)},s.Mc=function(){return new mn(null,new yn(this,16))},s.ad=function(n,t){return this.c.ad(n,t)},s.Fc=function(n){return this.c.Fc(n)},s.$b=function(){this.c.$b()},s.Gc=function(n){return this.c.Gc(n)},s.Hc=function(n){return jO(this.c,n)},s.Zj=function(){var n,t,i;if(this.d==null){for(this.d=le(z8e,nme,67,2*this.f+1,0,1),i=this.e,this.f=0,t=this.c.Jc();t.e!=t.i.gc();)n=u(t.Wj(),136),az(this,n);this.e=i}},s.Fb=function(n){return xNe(this,n)},s.Hb=function(){return s1e(this.c)},s.bd=function(n){return this.c.bd(n)},s.$j=function(){this.c=new DSe(this)},s.dc=function(){return this.f==0},s.Jc=function(){return this.c.Jc()},s.cd=function(){return this.c.cd()},s.dd=function(n){return this.c.dd(n)},s._j=function(){return nO(this)},s.ak=function(n,t,i){return new XNe(n,t,i)},s.bk=function(){return new yL},s.Kc=function(n){return pBe(this,n)},s.gc=function(){return this.f},s.hd=function(n,t){return new N0(this.c,n,t)},s.Nc=function(){return this.c.Nc()},s.Oc=function(n){return this.c.Oc(n)},s.Ib=function(){return rde(this.c)},s.e=0,s.f=0,v(yc,"BasicEMap",711),m(1027,67,Th,DSe),s.Ki=function(n,t){vbn(this,u(t,136))},s.Ni=function(n,t,i){var r;++(r=this,u(t,136),r).a.e},s.Oi=function(n,t){ybn(this,u(t,136))},s.Pi=function(n,t,i){ppn(this,u(t,136),u(i,136))},s.Mi=function(n,t){aze(this.a)},v(yc,"BasicEMap/1",1027),m(1028,67,Th,yL),s.$i=function(n){return le(ZBn,zZe,611,n,0,1)},v(yc,"BasicEMap/2",1028),m(1029,Ga,fs,_Se),s.$b=function(){this.a.c.$b()},s.Gc=function(n){return xQ(this.a,n)},s.Jc=function(){return this.a.f==0?(A9(),tD.a):new mAe(this.a)},s.Kc=function(n){var t;return t=this.a.f,nz(this.a,n),this.a.f!=t},s.gc=function(){return this.a.f},v(yc,"BasicEMap/3",1029),m(1030,31,im,LSe),s.$b=function(){this.a.c.$b()},s.Gc=function(n){return vXe(this.a,n)},s.Jc=function(){return this.a.f==0?(A9(),tD.a):new vAe(this.a)},s.gc=function(){return this.a.f},v(yc,"BasicEMap/4",1030),m(1031,Ga,fs,PSe),s.$b=function(){this.a.c.$b()},s.Gc=function(n){var t,i,r,c,o,l,f,h,b;if(this.a.f>0&&X(n,45)&&(this.a.Zj(),h=u(n,45),f=h.jd(),c=f==null?0:Ni(f),o=Nle(this.a,c),t=this.a.d[o],t)){for(i=u(t.g,374),b=t.i,l=0;l"+this.c},s.a=0;var ZBn=v(yc,"BasicEMap/EntryImpl",611);m(534,1,{},G6),v(yc,"BasicEMap/View",534);var tD;m(769,1,{}),s.Fb=function(n){return abe((En(),Sc),n)},s.Hb=function(){return y1e((En(),Sc))},s.Ib=function(){return Ja((En(),Sc))},v(yc,"ECollections/BasicEmptyUnmodifiableEList",769),m(1302,1,Wh,eC),s.Nb=function(n){Zr(this,n)},s.Rb=function(n){throw R(new _t)},s.Ob=function(){return!1},s.Sb=function(){return!1},s.Pb=function(){throw R(new hu)},s.Tb=function(){return 0},s.Ub=function(){throw R(new hu)},s.Vb=function(){return-1},s.Qb=function(){throw R(new _t)},s.Wb=function(n){throw R(new _t)},v(yc,"ECollections/BasicEmptyUnmodifiableEList/1",1302),m(1300,769,{20:1,18:1,16:1,61:1},xxe),s._c=function(n,t){FAe()},s.Ec=function(n){return zAe()},s.ad=function(n,t){return JAe()},s.Fc=function(n){return HAe()},s.$b=function(){GAe()},s.Gc=function(n){return!1},s.Hc=function(n){return!1},s.Ic=function(n){cc(this,n)},s.Xb=function(n){return Pse((En(),n)),null},s.bd=function(n){return-1},s.dc=function(){return!0},s.Jc=function(){return this.a},s.cd=function(){return this.a},s.dd=function(n){return this.a},s.Ri=function(n,t){return qAe()},s.Si=function(n,t){UAe()},s.ed=function(n){return XAe()},s.Kc=function(n){return KAe()},s.fd=function(n,t){return VAe()},s.gc=function(){return 0},s.gd=function(n){Zb(this,n)},s.Lc=function(){return new yn(this,16)},s.Mc=function(){return new mn(null,new yn(this,16))},s.hd=function(n,t){return En(),new N0(Sc,n,t)},s.Nc=function(){return Ofe((En(),Sc))},s.Oc=function(n){return En(),qE(Sc,n)},v(yc,"ECollections/EmptyUnmodifiableEList",1300),m(1301,769,{20:1,18:1,16:1,61:1,586:1},Axe),s._c=function(n,t){FAe()},s.Ec=function(n){return zAe()},s.ad=function(n,t){return JAe()},s.Fc=function(n){return HAe()},s.$b=function(){GAe()},s.Gc=function(n){return!1},s.Hc=function(n){return!1},s.Ic=function(n){cc(this,n)},s.Xb=function(n){return Pse((En(),n)),null},s.bd=function(n){return-1},s.dc=function(){return!0},s.Jc=function(){return this.a},s.cd=function(){return this.a},s.dd=function(n){return this.a},s.Ri=function(n,t){return qAe()},s.Si=function(n,t){UAe()},s.ed=function(n){return XAe()},s.Kc=function(n){return KAe()},s.fd=function(n,t){return VAe()},s.gc=function(){return 0},s.gd=function(n){Zb(this,n)},s.Lc=function(){return new yn(this,16)},s.Mc=function(){return new mn(null,new yn(this,16))},s.hd=function(n,t){return En(),new N0(Sc,n,t)},s.Nc=function(){return Ofe((En(),Sc))},s.Oc=function(n){return En(),qE(Sc,n)},s._j=function(){return En(),En(),r1},v(yc,"ECollections/EmptyUnmodifiableEMap",1301);var J8e=Gi(yc,"Enumerator"),EG;m(290,1,{290:1},DW),s.Fb=function(n){var t;return this===n?!0:X(n,290)?(t=u(n,290),this.f==t.f&&l3n(this.i,t.i)&&uV(this.a,(this.f&256)!=0?(t.f&256)!=0?t.a:null:(t.f&256)!=0?null:t.a)&&uV(this.d,t.d)&&uV(this.g,t.g)&&uV(this.e,t.e)&&hSn(this,t)):!1},s.Hb=function(){return this.f},s.Ib=function(){return ZXe(this)},s.f=0;var Dan=0,_an=0,Lan=0,Pan=0,H8e=0,G8e=0,q8e=0,U8e=0,X8e=0,$an,oA=0,sA=0,Ran=0,Ban=0,SG,K8e;v(yc,"URI",290),m(1090,44,v3,Mxe),s.yc=function(n,t){return u(Kc(this,Pt(n),u(t,290)),290)},v(yc,"URI/URICache",1090),m(492,67,Th,nC,aR),s.Qi=function(){return!0},v(yc,"UniqueEList",492),m(578,63,H1,sB),v(yc,"WrappedException",578);var Zt=Gi(ql,HZe),Gm=Gi(ql,GZe),ns=Gi(ql,qZe),qm=Gi(ql,UZe),Ma=Gi(ql,XZe),vf=Gi(ql,"EClass"),zce=Gi(ql,"EDataType"),zan;m(1198,44,v3,Cxe),s.xc=function(n){return $r(n)?lo(this,n):bu(Xc(this.f,n))},v(ql,"EDataType/Internal/ConversionDelegate/Factory/Registry/Impl",1198);var xG=Gi(ql,"EEnum"),ed=Gi(ql,KZe),Rc=Gi(ql,VZe),yf=Gi(ql,YZe),kf,jp=Gi(ql,QZe),Um=Gi(ql,WZe);m(1023,1,{},tC),s.Ib=function(){return"NIL"},v(ql,"EStructuralFeature/Internal/DynamicValueHolder/1",1023);var Fan;m(1022,44,v3,Txe),s.xc=function(n){return $r(n)?lo(this,n):bu(Xc(this.f,n))},v(ql,"EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl",1022);var Fo=Gi(ql,ZZe),Qy=Gi(ql,"EValidator/PatternMatcher"),V8e,Y8e,Bn,e0,Xm,yb,Jan,Han,Gan,kb,n0,jb,Ep,rh,qan,Uan,jf,t0,Xan,i0,Km,i5,Ac,Kan,Van,Sp,AG=Gi(Ri,"FeatureMap/Entry");m(533,1,{75:1},C$),s.Jk=function(){return this.a},s.kd=function(){return this.b},v(Jn,"BasicEObjectImpl/1",533),m(1021,1,Lne,VCe),s.Dk=function(n){return aY(this.a,this.b,n)},s.Oj=function(){return P_e(this.a,this.b)},s.Wb=function(n){pae(this.a,this.b,n)},s.Ek=function(){h5n(this.a,this.b)},v(Jn,"BasicEObjectImpl/4",1021),m(2043,1,{114:1}),s.Kk=function(n){this.e=n==0?Yan:le(Mr,Nn,1,n,5,1)},s.ii=function(n){return this.e[n]},s.ji=function(n,t){this.e[n]=t},s.ki=function(n){this.e[n]=null},s.Lk=function(){return this.c},s.Mk=function(){throw R(new _t)},s.Nk=function(){throw R(new _t)},s.Ok=function(){return this.d},s.Pk=function(){return this.e!=null},s.Qk=function(n){this.c=n},s.Rk=function(n){throw R(new _t)},s.Sk=function(n){throw R(new _t)},s.Tk=function(n){this.d=n};var Yan;v(Jn,"BasicEObjectImpl/EPropertiesHolderBaseImpl",2043),m(192,2043,{114:1},nl),s.Mk=function(){return this.a},s.Nk=function(){return this.b},s.Rk=function(n){this.a=n},s.Sk=function(n){this.b=n},v(Jn,"BasicEObjectImpl/EPropertiesHolderImpl",192),m(501,100,ZWe,jv),s.rh=function(){return this.f},s.wh=function(){return this.k},s.yh=function(n,t){this.g=n,this.i=t},s.Ah=function(){return(this.j&2)==0?this.fi():this.Xh().Lk()},s.Ch=function(){return this.i},s.th=function(){return(this.j&1)!=0},s.Mh=function(){return this.g},s.Sh=function(){return(this.j&4)!=0},s.Xh=function(){return!this.k&&(this.k=new nl),this.k},s._h=function(n){this.Xh().Qk(n),n?this.j|=2:this.j&=-3},s.bi=function(n){this.Xh().Sk(n),n?this.j|=4:this.j&=-5},s.fi=function(){return(C0(),Bn).S},s.i=0,s.j=1,v(Jn,"EObjectImpl",501),m(785,501,{109:1,94:1,93:1,57:1,114:1,52:1,100:1},bfe),s.ii=function(n){return this.e[n]},s.ji=function(n,t){this.e[n]=t},s.ki=function(n){this.e[n]=null},s.Ah=function(){return this.d},s.Fh=function(n){return Ji(this.d,n)},s.Hh=function(){return this.d},s.Lh=function(){return this.e!=null},s.Xh=function(){return!this.k&&(this.k=new kL),this.k},s._h=function(n){this.d=n},s.ei=function(){var n;return this.e==null&&(n=dt(this.d),this.e=n==0?Qan:le(Mr,Nn,1,n,5,1)),this},s.gi=function(){return 0};var Qan;v(Jn,"DynamicEObjectImpl",785),m(1483,785,{109:1,45:1,94:1,93:1,136:1,57:1,114:1,52:1,100:1},gIe),s.Fb=function(n){return this===n},s.Hb=function(){return jw(this)},s._h=function(n){this.d=n,this.b=ZO(n,"key"),this.c=ZO(n,$S)},s.yi=function(){var n;return this.a==-1&&(n=SY(this,this.b),this.a=n==null?0:Ni(n)),this.a},s.jd=function(){return SY(this,this.b)},s.kd=function(){return SY(this,this.c)},s.zi=function(n){this.a=n},s.Ai=function(n){pae(this,this.b,n)},s.ld=function(n){var t;return t=SY(this,this.c),pae(this,this.c,n),t},s.a=0,v(Jn,"DynamicEObjectImpl/BasicEMapEntry",1483),m(1484,1,{114:1},kL),s.Kk=function(n){throw R(new _t)},s.ii=function(n){throw R(new _t)},s.ji=function(n,t){throw R(new _t)},s.ki=function(n){throw R(new _t)},s.Lk=function(){throw R(new _t)},s.Mk=function(){return this.a},s.Nk=function(){return this.b},s.Ok=function(){return this.c},s.Pk=function(){throw R(new _t)},s.Qk=function(n){throw R(new _t)},s.Rk=function(n){this.a=n},s.Sk=function(n){this.b=n},s.Tk=function(n){this.c=n},v(Jn,"DynamicEObjectImpl/DynamicEPropertiesHolderImpl",1484),m(504,161,{109:1,94:1,93:1,587:1,158:1,57:1,114:1,52:1,100:1,504:1,161:1,117:1,118:1},Nb),s.xh=function(n){return qde(this,n)},s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.d;case 2:return i?(!this.b&&(this.b=new Hs((jn(),Ac),Du,this)),this.b):(!this.b&&(this.b=new Hs((jn(),Ac),Du,this)),nO(this.b));case 3:return H_e(this);case 4:return!this.a&&(this.a=new mr(vb,this,4)),this.a;case 5:return!this.c&&(this.c=new Jv(vb,this,5)),this.c}return Pl(this,n-dt((jn(),e0)),Cn((r=u(Kn(this,16),29),r||e0),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 3:return this.Cb&&(i=(c=this.Db>>16,c>=0?qde(this,i):this.Cb.Qh(this,-1-c,null,i))),Cfe(this,u(n,158),i)}return o=u(Cn((r=u(Kn(this,16),29),r||(jn(),e0)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),e0)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 2:return!this.b&&(this.b=new Hs((jn(),Ac),Du,this)),K$(this.b,n,i);case 3:return Cfe(this,null,i);case 4:return!this.a&&(this.a=new mr(vb,this,4)),vc(this.a,n,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),e0)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),e0)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.d!=null;case 2:return!!this.b&&this.b.f!=0;case 3:return!!H_e(this);case 4:return!!this.a&&this.a.i!=0;case 5:return!!this.c&&this.c.i!=0}return Ll(this,n-dt((jn(),e0)),Cn((t=u(Kn(this,16),29),t||e0),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:Yvn(this,Pt(t));return;case 2:!this.b&&(this.b=new Hs((jn(),Ac),Du,this)),NB(this.b,t);return;case 3:FUe(this,u(t,158));return;case 4:!this.a&&(this.a=new mr(vb,this,4)),kt(this.a),!this.a&&(this.a=new mr(vb,this,4)),nr(this.a,u(t,18));return;case 5:!this.c&&(this.c=new Jv(vb,this,5)),kt(this.c),!this.c&&(this.c=new Jv(vb,this,5)),nr(this.c,u(t,18));return}Jl(this,n-dt((jn(),e0)),Cn((i=u(Kn(this,16),29),i||e0),n),t)},s.fi=function(){return jn(),e0},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:Hhe(this,null);return;case 2:!this.b&&(this.b=new Hs((jn(),Ac),Du,this)),this.b.c.$b();return;case 3:FUe(this,null);return;case 4:!this.a&&(this.a=new mr(vb,this,4)),kt(this.a);return;case 5:!this.c&&(this.c=new Jv(vb,this,5)),kt(this.c);return}Fl(this,n-dt((jn(),e0)),Cn((t=u(Kn(this,16),29),t||e0),n))},s.Ib=function(){return IFe(this)},s.d=null,v(Jn,"EAnnotationImpl",504),m(142,711,tme,os),s.Ei=function(n,t){kwn(this,n,u(t,45))},s.Uk=function(n,t){return k2n(this,u(n,45),t)},s.Yi=function(n){return u(u(this.c,72).Yi(n),136)},s.Gi=function(){return u(this.c,72).Gi()},s.Hi=function(){return u(this.c,72).Hi()},s.Ii=function(n){return u(this.c,72).Ii(n)},s.Vk=function(n,t){return K$(this,n,t)},s.Dk=function(n){return u(this.c,77).Dk(n)},s.$j=function(){},s.Oj=function(){return u(this.c,77).Oj()},s.ak=function(n,t,i){var r;return r=u(ol(this.b).ti().pi(this.b),136),r.zi(n),r.Ai(t),r.ld(i),r},s.bk=function(){return new uoe(this)},s.Wb=function(n){NB(this,n)},s.Ek=function(){u(this.c,77).Ek()},v(Ri,"EcoreEMap",142),m(169,142,tme,Hs),s.Zj=function(){var n,t,i,r,c,o;if(this.d==null){for(o=le(z8e,nme,67,2*this.f+1,0,1),i=this.c.Jc();i.e!=i.i.gc();)t=u(i.Wj(),136),r=t.yi(),c=(r&oi)%o.length,n=o[c],!n&&(n=o[c]=new uoe(this)),n.Ec(t);this.d=o}},v(Jn,"EAnnotationImpl/1",169),m(293,439,{109:1,94:1,93:1,158:1,197:1,57:1,114:1,470:1,52:1,100:1,161:1,293:1,117:1,118:1}),s.Ih=function(n,t,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $n(),(this.Bb&256)!=0;case 3:return $n(),(this.Bb&512)!=0;case 4:return ve(this.s);case 5:return ve(this.t);case 6:return $n(),!!this.Hk();case 7:return $n(),c=this.s,c>=1;case 8:return t?ff(this):this.r;case 9:return this.q}return Pl(this,n-dt(this.fi()),Cn((r=u(Kn(this,16),29),r||this.fi()),n),t,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 9:return SV(this,i)}return c=u(Cn((r=u(Kn(this,16),29),r||this.fi()),t),69),c.uk().yk(this,Lo(this),t-dt(this.fi()),n,i)},s.Th=function(n){var t,i;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.Hk();case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&Mw(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&Mw(this.q).i==0)}return Ll(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.$h=function(n,t){var i,r;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:this.ri(Pt(t));return;case 2:Ld(this,Fe(ze(t)));return;case 3:Pd(this,Fe(ze(t)));return;case 4:Nd(this,u(t,15).a);return;case 5:this.Xk(u(t,15).a);return;case 8:cg(this,u(t,143));return;case 9:r=Fa(this,u(t,87),null),r&&r.mj();return}Jl(this,n-dt(this.fi()),Cn((i=u(Kn(this,16),29),i||this.fi()),n),t)},s.fi=function(){return jn(),Van},s.hi=function(n){var t,i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:this.ri(null);return;case 2:Ld(this,!0);return;case 3:Pd(this,!0);return;case 4:Nd(this,0);return;case 5:this.Xk(1);return;case 8:cg(this,null);return;case 9:i=Fa(this,null,null),i&&i.mj();return}Fl(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.mi=function(){ff(this),this.Bb|=1},s.Fk=function(){return ff(this)},s.Gk=function(){return this.t},s.Hk=function(){var n;return n=this.t,n>1||n==-1},s.Qi=function(){return(this.Bb&512)!=0},s.Wk=function(n,t){return z1e(this,n,t)},s.Xk=function(n){$2(this,n)},s.Ib=function(){return tbe(this)},s.s=0,s.t=1,v(Jn,"ETypedElementImpl",293),m(451,293,{109:1,94:1,93:1,158:1,197:1,57:1,179:1,69:1,114:1,470:1,52:1,100:1,161:1,451:1,293:1,117:1,118:1,682:1}),s.xh=function(n){return EHe(this,n)},s.Ih=function(n,t,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $n(),(this.Bb&256)!=0;case 3:return $n(),(this.Bb&512)!=0;case 4:return ve(this.s);case 5:return ve(this.t);case 6:return $n(),!!this.Hk();case 7:return $n(),c=this.s,c>=1;case 8:return t?ff(this):this.r;case 9:return this.q;case 10:return $n(),(this.Bb&Gf)!=0;case 11:return $n(),(this.Bb&V0)!=0;case 12:return $n(),(this.Bb&cm)!=0;case 13:return this.j;case 14:return A8(this);case 15:return $n(),(this.Bb&as)!=0;case 16:return $n(),(this.Bb&jh)!=0;case 17:return O2(this)}return Pl(this,n-dt(this.fi()),Cn((r=u(Kn(this,16),29),r||this.fi()),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 17:return this.Cb&&(i=(c=this.Db>>16,c>=0?EHe(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,17,i)}return o=u(Cn((r=u(Kn(this,16),29),r||this.fi()),t),69),o.uk().xk(this,Lo(this),t-dt(this.fi()),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 9:return SV(this,i);case 17:return hl(this,null,17,i)}return c=u(Cn((r=u(Kn(this,16),29),r||this.fi()),t),69),c.uk().yk(this,Lo(this),t-dt(this.fi()),n,i)},s.Th=function(n){var t,i;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.Hk();case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&Mw(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&Mw(this.q).i==0);case 10:return(this.Bb&Gf)==0;case 11:return(this.Bb&V0)!=0;case 12:return(this.Bb&cm)!=0;case 13:return this.j!=null;case 14:return A8(this)!=null;case 15:return(this.Bb&as)!=0;case 16:return(this.Bb&jh)!=0;case 17:return!!O2(this)}return Ll(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.$h=function(n,t){var i,r;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:XV(this,Pt(t));return;case 2:Ld(this,Fe(ze(t)));return;case 3:Pd(this,Fe(ze(t)));return;case 4:Nd(this,u(t,15).a);return;case 5:this.Xk(u(t,15).a);return;case 8:cg(this,u(t,143));return;case 9:r=Fa(this,u(t,87),null),r&&r.mj();return;case 10:l8(this,Fe(ze(t)));return;case 11:h8(this,Fe(ze(t)));return;case 12:a8(this,Fe(ze(t)));return;case 13:Dse(this,Pt(t));return;case 15:f8(this,Fe(ze(t)));return;case 16:d8(this,Fe(ze(t)));return}Jl(this,n-dt(this.fi()),Cn((i=u(Kn(this,16),29),i||this.fi()),n),t)},s.fi=function(){return jn(),Kan},s.hi=function(n){var t,i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:X(this.Cb,88)&&Y2(Ms(u(this.Cb,88)),4),Mo(this,null);return;case 2:Ld(this,!0);return;case 3:Pd(this,!0);return;case 4:Nd(this,0);return;case 5:this.Xk(1);return;case 8:cg(this,null);return;case 9:i=Fa(this,null,null),i&&i.mj();return;case 10:l8(this,!0);return;case 11:h8(this,!1);return;case 12:a8(this,!1);return;case 13:this.i=null,xB(this,null);return;case 15:f8(this,!1);return;case 16:d8(this,!1);return}Fl(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.mi=function(){$9(Vc((ls(),nc),this)),ff(this),this.Bb|=1},s.nk=function(){return this.f},s.gk=function(){return A8(this)},s.ok=function(){return O2(this)},s.sk=function(){return null},s.Yk=function(){return this.k},s.Jj=function(){return this.n},s.tk=function(){return mz(this)},s.uk=function(){var n,t,i,r,c,o,l,f,h;return this.p||(i=O2(this),(i.i==null&&kh(i),i.i).length,r=this.sk(),r&&dt(O2(r)),c=ff(this),l=c.ik(),n=l?(l.i&1)!=0?l==ts?Qi:l==$t?jr:l==Ym?b7:l==Jr?gr:l==Ap?sp:l==o5?lp:l==ds?jy:KS:l:null,t=A8(this),f=c.gk(),Ljn(this),(this.Bb&jh)!=0&&((o=Wde((ls(),nc),i))&&o!=this||(o=$4(Vc(nc,this))))?this.p=new QCe(this,o):this.Hk()?this.$k()?r?(this.Bb&as)!=0?n?this._k()?this.p=new Ub(47,n,this,r):this.p=new Ub(5,n,this,r):this._k()?this.p=new Wb(46,this,r):this.p=new Wb(4,this,r):n?this._k()?this.p=new Ub(49,n,this,r):this.p=new Ub(7,n,this,r):this._k()?this.p=new Wb(48,this,r):this.p=new Wb(6,this,r):(this.Bb&as)!=0?n?n==yg?this.p=new xd(50,Oan,this):this._k()?this.p=new xd(43,n,this):this.p=new xd(1,n,this):this._k()?this.p=new Md(42,this):this.p=new Md(0,this):n?n==yg?this.p=new xd(41,Oan,this):this._k()?this.p=new xd(45,n,this):this.p=new xd(3,n,this):this._k()?this.p=new Md(44,this):this.p=new Md(2,this):X(c,159)?n==AG?this.p=new Md(40,this):(this.Bb&512)!=0?(this.Bb&as)!=0?n?this.p=new xd(9,n,this):this.p=new Md(8,this):n?this.p=new xd(11,n,this):this.p=new Md(10,this):(this.Bb&as)!=0?n?this.p=new xd(13,n,this):this.p=new Md(12,this):n?this.p=new xd(15,n,this):this.p=new Md(14,this):r?(h=r.t,h>1||h==-1?this._k()?(this.Bb&as)!=0?n?this.p=new Ub(25,n,this,r):this.p=new Wb(24,this,r):n?this.p=new Ub(27,n,this,r):this.p=new Wb(26,this,r):(this.Bb&as)!=0?n?this.p=new Ub(29,n,this,r):this.p=new Wb(28,this,r):n?this.p=new Ub(31,n,this,r):this.p=new Wb(30,this,r):this._k()?(this.Bb&as)!=0?n?this.p=new Ub(33,n,this,r):this.p=new Wb(32,this,r):n?this.p=new Ub(35,n,this,r):this.p=new Wb(34,this,r):(this.Bb&as)!=0?n?this.p=new Ub(37,n,this,r):this.p=new Wb(36,this,r):n?this.p=new Ub(39,n,this,r):this.p=new Wb(38,this,r)):this._k()?(this.Bb&as)!=0?n?this.p=new xd(17,n,this):this.p=new Md(16,this):n?this.p=new xd(19,n,this):this.p=new Md(18,this):(this.Bb&as)!=0?n?this.p=new xd(21,n,this):this.p=new Md(20,this):n?this.p=new xd(23,n,this):this.p=new Md(22,this):this.Zk()?this._k()?this.p=new zNe(u(c,29),this,r):this.p=new bae(u(c,29),this,r):X(c,159)?n==AG?this.p=new Md(40,this):(this.Bb&as)!=0?n?this.p=new $Ie(t,f,this,(MQ(),l==$t?i7e:l==ts?W8e:l==Ap?r7e:l==Ym?t7e:l==Jr?n7e:l==o5?c7e:l==ds?Z8e:l==Wl?e7e:Hce)):this.p=new ZDe(u(c,159),t,f,this):n?this.p=new PIe(t,f,this,(MQ(),l==$t?i7e:l==ts?W8e:l==Ap?r7e:l==Ym?t7e:l==Jr?n7e:l==o5?c7e:l==ds?Z8e:l==Wl?e7e:Hce)):this.p=new WDe(u(c,159),t,f,this):this.$k()?r?(this.Bb&as)!=0?this._k()?this.p=new JNe(u(c,29),this,r):this.p=new Zle(u(c,29),this,r):this._k()?this.p=new FNe(u(c,29),this,r):this.p=new ZK(u(c,29),this,r):(this.Bb&as)!=0?this._k()?this.p=new ROe(u(c,29),this):this.p=new mle(u(c,29),this):this._k()?this.p=new $Oe(u(c,29),this):this.p=new BK(u(c,29),this):this._k()?r?(this.Bb&as)!=0?this.p=new HNe(u(c,29),this,r):this.p=new efe(u(c,29),this,r):(this.Bb&as)!=0?this.p=new BOe(u(c,29),this):this.p=new vle(u(c,29),this):r?(this.Bb&as)!=0?this.p=new GNe(u(c,29),this,r):this.p=new nfe(u(c,29),this,r):(this.Bb&as)!=0?this.p=new zOe(u(c,29),this):this.p=new fR(u(c,29),this)),this.p},s.pk=function(){return(this.Bb&Gf)!=0},s.Zk=function(){return!1},s.$k=function(){return!1},s.qk=function(){return(this.Bb&jh)!=0},s.vk=function(){return AY(this)},s._k=function(){return!1},s.rk=function(){return(this.Bb&as)!=0},s.al=function(n){this.k=n},s.ri=function(n){XV(this,n)},s.Ib=function(){return Jz(this)},s.e=!1,s.n=0,v(Jn,"EStructuralFeatureImpl",451),m(335,451,{109:1,94:1,93:1,38:1,158:1,197:1,57:1,179:1,69:1,114:1,470:1,52:1,100:1,335:1,161:1,451:1,293:1,117:1,118:1,682:1},vX),s.Ih=function(n,t,i){var r,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $n(),(this.Bb&256)!=0;case 3:return $n(),(this.Bb&512)!=0;case 4:return ve(this.s);case 5:return ve(this.t);case 6:return $n(),!!Y0e(this);case 7:return $n(),c=this.s,c>=1;case 8:return t?ff(this):this.r;case 9:return this.q;case 10:return $n(),(this.Bb&Gf)!=0;case 11:return $n(),(this.Bb&V0)!=0;case 12:return $n(),(this.Bb&cm)!=0;case 13:return this.j;case 14:return A8(this);case 15:return $n(),(this.Bb&as)!=0;case 16:return $n(),(this.Bb&jh)!=0;case 17:return O2(this);case 18:return $n(),(this.Bb&Ru)!=0;case 19:return t?XY(this):n$e(this)}return Pl(this,n-dt((jn(),Xm)),Cn((r=u(Kn(this,16),29),r||Xm),n),t,i)},s.Th=function(n){var t,i;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return Y0e(this);case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&Mw(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&Mw(this.q).i==0);case 10:return(this.Bb&Gf)==0;case 11:return(this.Bb&V0)!=0;case 12:return(this.Bb&cm)!=0;case 13:return this.j!=null;case 14:return A8(this)!=null;case 15:return(this.Bb&as)!=0;case 16:return(this.Bb&jh)!=0;case 17:return!!O2(this);case 18:return(this.Bb&Ru)!=0;case 19:return!!n$e(this)}return Ll(this,n-dt((jn(),Xm)),Cn((t=u(Kn(this,16),29),t||Xm),n))},s.$h=function(n,t){var i,r;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:XV(this,Pt(t));return;case 2:Ld(this,Fe(ze(t)));return;case 3:Pd(this,Fe(ze(t)));return;case 4:Nd(this,u(t,15).a);return;case 5:xAe(this,u(t,15).a);return;case 8:cg(this,u(t,143));return;case 9:r=Fa(this,u(t,87),null),r&&r.mj();return;case 10:l8(this,Fe(ze(t)));return;case 11:h8(this,Fe(ze(t)));return;case 12:a8(this,Fe(ze(t)));return;case 13:Dse(this,Pt(t));return;case 15:f8(this,Fe(ze(t)));return;case 16:d8(this,Fe(ze(t)));return;case 18:mQ(this,Fe(ze(t)));return}Jl(this,n-dt((jn(),Xm)),Cn((i=u(Kn(this,16),29),i||Xm),n),t)},s.fi=function(){return jn(),Xm},s.hi=function(n){var t,i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:X(this.Cb,88)&&Y2(Ms(u(this.Cb,88)),4),Mo(this,null);return;case 2:Ld(this,!0);return;case 3:Pd(this,!0);return;case 4:Nd(this,0);return;case 5:this.b=0,$2(this,1);return;case 8:cg(this,null);return;case 9:i=Fa(this,null,null),i&&i.mj();return;case 10:l8(this,!0);return;case 11:h8(this,!1);return;case 12:a8(this,!1);return;case 13:this.i=null,xB(this,null);return;case 15:f8(this,!1);return;case 16:d8(this,!1);return;case 18:mQ(this,!1);return}Fl(this,n-dt((jn(),Xm)),Cn((t=u(Kn(this,16),29),t||Xm),n))},s.mi=function(){XY(this),$9(Vc((ls(),nc),this)),ff(this),this.Bb|=1},s.Hk=function(){return Y0e(this)},s.Wk=function(n,t){return this.b=0,this.a=null,z1e(this,n,t)},s.Xk=function(n){xAe(this,n)},s.Ib=function(){var n;return(this.Db&64)!=0?Jz(this):(n=new cf(Jz(this)),n.a+=" (iD: ",yd(n,(this.Bb&Ru)!=0),n.a+=")",n.a)},s.b=0,v(Jn,"EAttributeImpl",335),m(360,439,{109:1,94:1,93:1,143:1,158:1,197:1,57:1,114:1,52:1,100:1,360:1,161:1,117:1,118:1,681:1}),s.bl=function(n){return n.Ah()==this},s.xh=function(n){return WQ(this,n)},s.yh=function(n,t){this.w=null,this.Db=t<<16|this.Db&255,this.Cb=n},s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return Gw(this);case 4:return this.gk();case 5:return this.F;case 6:return t?ol(this):z9(this);case 7:return!this.A&&(this.A=new rs(Fo,this,7)),this.A}return Pl(this,n-dt(this.fi()),Cn((r=u(Kn(this,16),29),r||this.fi()),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?WQ(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,6,i)}return o=u(Cn((r=u(Kn(this,16),29),r||this.fi()),t),69),o.uk().xk(this,Lo(this),t-dt(this.fi()),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 6:return hl(this,null,6,i);case 7:return!this.A&&(this.A=new rs(Fo,this,7)),vc(this.A,n,i)}return c=u(Cn((r=u(Kn(this,16),29),r||this.fi()),t),69),c.uk().yk(this,Lo(this),t-dt(this.fi()),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Gw(this);case 4:return this.gk()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!z9(this);case 7:return!!this.A&&this.A.i!=0}return Ll(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:zR(this,Pt(t));return;case 2:AK(this,Pt(t));return;case 5:D8(this,Pt(t));return;case 7:!this.A&&(this.A=new rs(Fo,this,7)),kt(this.A),!this.A&&(this.A=new rs(Fo,this,7)),nr(this.A,u(t,18));return}Jl(this,n-dt(this.fi()),Cn((i=u(Kn(this,16),29),i||this.fi()),n),t)},s.fi=function(){return jn(),Jan},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:X(this.Cb,184)&&(u(this.Cb,184).tb=null),Mo(this,null);return;case 2:c8(this,null),K9(this,this.D);return;case 5:D8(this,null);return;case 7:!this.A&&(this.A=new rs(Fo,this,7)),kt(this.A);return}Fl(this,n-dt(this.fi()),Cn((t=u(Kn(this,16),29),t||this.fi()),n))},s.fk=function(){var n;return this.G==-1&&(this.G=(n=ol(this),n?$d(n.si(),this):-1)),this.G},s.gk=function(){return null},s.hk=function(){return ol(this)},s.cl=function(){return this.v},s.ik=function(){return Gw(this)},s.jk=function(){return this.D!=null?this.D:this.B},s.kk=function(){return this.F},s.dk=function(n){return JW(this,n)},s.dl=function(n){this.v=n},s.el=function(n){GBe(this,n)},s.fl=function(n){this.C=n},s.ri=function(n){zR(this,n)},s.Ib=function(){return QB(this)},s.C=null,s.D=null,s.G=-1,v(Jn,"EClassifierImpl",360),m(88,360,{109:1,94:1,93:1,29:1,143:1,158:1,197:1,57:1,114:1,52:1,100:1,88:1,360:1,161:1,471:1,117:1,118:1,681:1},rj),s.bl=function(n){return o2n(this,n.Ah())},s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return Gw(this);case 4:return null;case 5:return this.F;case 6:return t?ol(this):z9(this);case 7:return!this.A&&(this.A=new rs(Fo,this,7)),this.A;case 8:return $n(),(this.Bb&256)!=0;case 9:return $n(),(this.Bb&512)!=0;case 10:return tu(this);case 11:return!this.q&&(this.q=new we(yf,this,11,10)),this.q;case 12:return g3(this);case 13:return fS(this);case 14:return fS(this),this.r;case 15:return g3(this),this.k;case 16:return B0e(this);case 17:return UW(this);case 18:return kh(this);case 19:return Dz(this);case 20:return g3(this),this.o;case 21:return!this.s&&(this.s=new we(ns,this,21,17)),this.s;case 22:return Vu(this);case 23:return IW(this)}return Pl(this,n-dt((jn(),yb)),Cn((r=u(Kn(this,16),29),r||yb),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?WQ(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,6,i);case 11:return!this.q&&(this.q=new we(yf,this,11,10)),Co(this.q,n,i);case 21:return!this.s&&(this.s=new we(ns,this,21,17)),Co(this.s,n,i)}return o=u(Cn((r=u(Kn(this,16),29),r||(jn(),yb)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),yb)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 6:return hl(this,null,6,i);case 7:return!this.A&&(this.A=new rs(Fo,this,7)),vc(this.A,n,i);case 11:return!this.q&&(this.q=new we(yf,this,11,10)),vc(this.q,n,i);case 21:return!this.s&&(this.s=new we(ns,this,21,17)),vc(this.s,n,i);case 22:return vc(Vu(this),n,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),yb)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),yb)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Gw(this);case 4:return!1;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!z9(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)!=0;case 9:return(this.Bb&512)!=0;case 10:return!!this.u&&Vu(this.u.a).i!=0&&!(this.n&&FQ(this.n));case 11:return!!this.q&&this.q.i!=0;case 12:return g3(this).i!=0;case 13:return fS(this).i!=0;case 14:return fS(this),this.r.i!=0;case 15:return g3(this),this.k.i!=0;case 16:return B0e(this).i!=0;case 17:return UW(this).i!=0;case 18:return kh(this).i!=0;case 19:return Dz(this).i!=0;case 20:return g3(this),!!this.o;case 21:return!!this.s&&this.s.i!=0;case 22:return!!this.n&&FQ(this.n);case 23:return IW(this).i!=0}return Ll(this,n-dt((jn(),yb)),Cn((t=u(Kn(this,16),29),t||yb),n))},s.Wh=function(n){var t;return t=this.i==null||this.q&&this.q.i!=0?null:ZO(this,n),t||Cge(this,n)},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:zR(this,Pt(t));return;case 2:AK(this,Pt(t));return;case 5:D8(this,Pt(t));return;case 7:!this.A&&(this.A=new rs(Fo,this,7)),kt(this.A),!this.A&&(this.A=new rs(Fo,this,7)),nr(this.A,u(t,18));return;case 8:H1e(this,Fe(ze(t)));return;case 9:G1e(this,Fe(ze(t)));return;case 10:dS(tu(this)),nr(tu(this),u(t,18));return;case 11:!this.q&&(this.q=new we(yf,this,11,10)),kt(this.q),!this.q&&(this.q=new we(yf,this,11,10)),nr(this.q,u(t,18));return;case 21:!this.s&&(this.s=new we(ns,this,21,17)),kt(this.s),!this.s&&(this.s=new we(ns,this,21,17)),nr(this.s,u(t,18));return;case 22:kt(Vu(this)),nr(Vu(this),u(t,18));return}Jl(this,n-dt((jn(),yb)),Cn((i=u(Kn(this,16),29),i||yb),n),t)},s.fi=function(){return jn(),yb},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:X(this.Cb,184)&&(u(this.Cb,184).tb=null),Mo(this,null);return;case 2:c8(this,null),K9(this,this.D);return;case 5:D8(this,null);return;case 7:!this.A&&(this.A=new rs(Fo,this,7)),kt(this.A);return;case 8:H1e(this,!1);return;case 9:G1e(this,!1);return;case 10:this.u&&dS(this.u);return;case 11:!this.q&&(this.q=new we(yf,this,11,10)),kt(this.q);return;case 21:!this.s&&(this.s=new we(ns,this,21,17)),kt(this.s);return;case 22:this.n&&kt(this.n);return}Fl(this,n-dt((jn(),yb)),Cn((t=u(Kn(this,16),29),t||yb),n))},s.mi=function(){var n,t;if(g3(this),fS(this),B0e(this),UW(this),kh(this),Dz(this),IW(this),yE(Tvn(Ms(this))),this.s)for(n=0,t=this.s.i;n=0;--t)K(this,t);return hde(this,n)},s.Ek=function(){kt(this)},s.Xi=function(n,t){return wBe(this,n,t)},v(Ri,"EcoreEList",623),m(491,623,au,PT),s.Ji=function(){return!1},s.Jj=function(){return this.c},s.Kj=function(){return!1},s.ml=function(){return!0},s.Qi=function(){return!0},s.Ui=function(n,t){return t},s.Wi=function(){return!1},s.c=0,v(Ri,"EObjectEList",491),m(81,491,au,mr),s.Kj=function(){return!0},s.kl=function(){return!1},s.$k=function(){return!0},v(Ri,"EObjectContainmentEList",81),m(543,81,au,B$),s.Li=function(){this.b=!0},s.Oj=function(){return this.b},s.Ek=function(){var n;kt(this),Fs(this.e)?(n=this.b,this.b=!1,hi(this.e,new Lf(this.e,2,this.c,n,!1))):this.b=!1},s.b=!1,v(Ri,"EObjectContainmentEList/Unsettable",543),m(1130,543,au,RIe),s.Ri=function(n,t){var i,r;return i=u(BE(this,n,t),87),Fs(this.e)&&f9(this,new rO(this.a,7,(jn(),Han),ve(t),(r=i.c,X(r,88)?u(r,29):jf),n)),i},s.Sj=function(n,t){return dEn(this,u(n,87),t)},s.Tj=function(n,t){return bEn(this,u(n,87),t)},s.Uj=function(n,t,i){return gAn(this,u(n,87),u(t,87),i)},s.Gj=function(n,t,i,r,c){switch(n){case 3:return bE(this,n,t,i,r,this.i>1);case 5:return bE(this,n,t,i,r,this.i-u(i,16).gc()>0);default:return new L1(this.e,n,this.c,t,i,r,!0)}},s.Rj=function(){return!0},s.Oj=function(){return FQ(this)},s.Ek=function(){kt(this)},v(Jn,"EClassImpl/1",1130),m(1144,1143,eme),s.bj=function(n){var t,i,r,c,o,l,f;if(i=n.ej(),i!=8){if(r=QEn(n),r==0)switch(i){case 1:case 9:{f=n.ij(),f!=null&&(t=Ms(u(f,471)),!t.c&&(t.c=new Ol),fB(t.c,n.hj())),l=n.gj(),l!=null&&(c=u(l,471),(c.Bb&1)==0&&(t=Ms(c),!t.c&&(t.c=new Ol),Et(t.c,u(n.hj(),29))));break}case 3:{l=n.gj(),l!=null&&(c=u(l,471),(c.Bb&1)==0&&(t=Ms(c),!t.c&&(t.c=new Ol),Et(t.c,u(n.hj(),29))));break}case 5:{if(l=n.gj(),l!=null)for(o=u(l,18).Jc();o.Ob();)c=u(o.Pb(),471),(c.Bb&1)==0&&(t=Ms(c),!t.c&&(t.c=new Ol),Et(t.c,u(n.hj(),29)));break}case 4:{f=n.ij(),f!=null&&(c=u(f,471),(c.Bb&1)==0&&(t=Ms(c),!t.c&&(t.c=new Ol),fB(t.c,n.hj())));break}case 6:{if(f=n.ij(),f!=null)for(o=u(f,18).Jc();o.Ob();)c=u(o.Pb(),471),(c.Bb&1)==0&&(t=Ms(c),!t.c&&(t.c=new Ol),fB(t.c,n.hj()));break}}this.ol(r)}},s.ol=function(n){MXe(this,n)},s.b=63,v(Jn,"ESuperAdapter",1144),m(1145,1144,eme,RSe),s.ol=function(n){Y2(this,n)},v(Jn,"EClassImpl/10",1145),m(1134,699,au),s.Ci=function(n,t){return fW(this,n,t)},s.Di=function(n){return oHe(this,n)},s.Ei=function(n,t){MO(this,n,t)},s.Fi=function(n){WT(this,n)},s.Yi=function(n){return phe(this,n)},s.Vi=function(n,t){return xY(this,n,t)},s.Uk=function(n,t){throw R(new _t)},s.Gi=function(){return new E4(this)},s.Hi=function(){return new ET(this)},s.Ii=function(n){return bO(this,n)},s.Vk=function(n,t){throw R(new _t)},s.Dk=function(n){return this},s.Oj=function(){return this.i!=0},s.Wb=function(n){throw R(new _t)},s.Ek=function(){throw R(new _t)},v(Ri,"EcoreEList/UnmodifiableEList",1134),m(333,1134,au,Pv),s.Wi=function(){return!1},v(Ri,"EcoreEList/UnmodifiableEList/FastCompare",333),m(1137,333,au,Pze),s.bd=function(n){var t,i,r;if(X(n,179)&&(t=u(n,179),i=t.Jj(),i!=-1)){for(r=this.i;i4)if(this.dk(n)){if(this.$k()){if(r=u(n,52),i=r.Bh(),f=i==this.b&&(this.kl()?r.vh(r.Ch(),u(Cn(Go(this.b),this.Jj()).Fk(),29).ik())==Oc(u(Cn(Go(this.b),this.Jj()),19)).n:-1-r.Ch()==this.Jj()),this.ll()&&!f&&!i&&r.Gh()){for(c=0;c1||r==-1)):!1},s.kl=function(){var n,t,i;return t=Cn(Go(this.b),this.Jj()),X(t,103)?(n=u(t,19),i=Oc(n),!!i):!1},s.ll=function(){var n,t;return t=Cn(Go(this.b),this.Jj()),X(t,103)?(n=u(t,19),(n.Bb&Ec)!=0):!1},s.bd=function(n){var t,i,r,c;if(r=this.xj(n),r>=0)return r;if(this.ml()){for(i=0,c=this.Cj();i=0;--n)oN(this,n,this.vj(n));return this.Dj()},s.Oc=function(n){var t;if(this.ll())for(t=this.Cj()-1;t>=0;--t)oN(this,t,this.vj(t));return this.Ej(n)},s.Ek=function(){dS(this)},s.Xi=function(n,t){return z$e(this,n,t)},v(Ri,"DelegatingEcoreEList",744),m(1140,744,rme,YOe),s.oj=function(n,t){Ppn(this,n,u(t,29))},s.pj=function(n){Ewn(this,u(n,29))},s.vj=function(n){var t,i;return t=u(K(Vu(this.a),n),87),i=t.c,X(i,88)?u(i,29):(jn(),jf)},s.Aj=function(n){var t,i;return t=u(Z2(Vu(this.a),n),87),i=t.c,X(i,88)?u(i,29):(jn(),jf)},s.Bj=function(n,t){return HSn(this,n,u(t,29))},s.Ji=function(){return!1},s.Gj=function(n,t,i,r,c){return null},s.qj=function(){return new FSe(this)},s.rj=function(){kt(Vu(this.a))},s.sj=function(n){return DFe(this,n)},s.tj=function(n){var t,i;for(i=n.Jc();i.Ob();)if(t=i.Pb(),!DFe(this,t))return!1;return!0},s.uj=function(n){var t,i,r;if(X(n,16)&&(r=u(n,16),r.gc()==Vu(this.a).i)){for(t=r.Jc(),i=new st(this);t.Ob();)if(ue(t.Pb())!==ue(ft(i)))return!1;return!0}return!1},s.wj=function(){var n,t,i,r,c;for(i=1,t=new st(Vu(this.a));t.e!=t.i.gc();)n=u(ft(t),87),r=(c=n.c,X(c,88)?u(c,29):(jn(),jf)),i=31*i+(r?jw(r):0);return i},s.xj=function(n){var t,i,r,c;for(r=0,i=new st(Vu(this.a));i.e!=i.i.gc();){if(t=u(ft(i),87),ue(n)===ue((c=t.c,X(c,88)?u(c,29):(jn(),jf))))return r;++r}return-1},s.yj=function(){return Vu(this.a).i==0},s.zj=function(){return null},s.Cj=function(){return Vu(this.a).i},s.Dj=function(){var n,t,i,r,c,o;for(o=Vu(this.a).i,c=le(Mr,Nn,1,o,5,1),i=0,t=new st(Vu(this.a));t.e!=t.i.gc();)n=u(ft(t),87),c[i++]=(r=n.c,X(r,88)?u(r,29):(jn(),jf));return c},s.Ej=function(n){var t,i,r,c,o,l,f;for(f=Vu(this.a).i,n.lengthf&&ir(n,f,null),r=0,i=new st(Vu(this.a));i.e!=i.i.gc();)t=u(ft(i),87),o=(l=t.c,X(l,88)?u(l,29):(jn(),jf)),ir(n,r++,o);return n},s.Fj=function(){var n,t,i,r,c;for(c=new vd,c.a+="[",n=Vu(this.a),t=0,r=Vu(this.a).i;t>16,c>=0?WQ(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,6,i);case 9:return!this.a&&(this.a=new we(ed,this,9,5)),Co(this.a,n,i)}return o=u(Cn((r=u(Kn(this,16),29),r||(jn(),kb)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),kb)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 6:return hl(this,null,6,i);case 7:return!this.A&&(this.A=new rs(Fo,this,7)),vc(this.A,n,i);case 9:return!this.a&&(this.a=new we(ed,this,9,5)),vc(this.a,n,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),kb)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),kb)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!Gw(this);case 4:return!!O1e(this);case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!z9(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)==0;case 9:return!!this.a&&this.a.i!=0}return Ll(this,n-dt((jn(),kb)),Cn((t=u(Kn(this,16),29),t||kb),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:zR(this,Pt(t));return;case 2:AK(this,Pt(t));return;case 5:D8(this,Pt(t));return;case 7:!this.A&&(this.A=new rs(Fo,this,7)),kt(this.A),!this.A&&(this.A=new rs(Fo,this,7)),nr(this.A,u(t,18));return;case 8:HB(this,Fe(ze(t)));return;case 9:!this.a&&(this.a=new we(ed,this,9,5)),kt(this.a),!this.a&&(this.a=new we(ed,this,9,5)),nr(this.a,u(t,18));return}Jl(this,n-dt((jn(),kb)),Cn((i=u(Kn(this,16),29),i||kb),n),t)},s.fi=function(){return jn(),kb},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:X(this.Cb,184)&&(u(this.Cb,184).tb=null),Mo(this,null);return;case 2:c8(this,null),K9(this,this.D);return;case 5:D8(this,null);return;case 7:!this.A&&(this.A=new rs(Fo,this,7)),kt(this.A);return;case 8:HB(this,!0);return;case 9:!this.a&&(this.a=new we(ed,this,9,5)),kt(this.a);return}Fl(this,n-dt((jn(),kb)),Cn((t=u(Kn(this,16),29),t||kb),n))},s.mi=function(){var n,t;if(this.a)for(n=0,t=this.a.i;n>16==5?u(this.Cb,675):null}return Pl(this,n-dt((jn(),n0)),Cn((r=u(Kn(this,16),29),r||n0),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 5:return this.Cb&&(i=(c=this.Db>>16,c>=0?_He(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,5,i)}return o=u(Cn((r=u(Kn(this,16),29),r||(jn(),n0)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),n0)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 5:return hl(this,null,5,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),n0)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),n0)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.d!=0;case 3:return!!this.b;case 4:return this.c!=null;case 5:return!!(this.Db>>16==5&&u(this.Cb,675))}return Ll(this,n-dt((jn(),n0)),Cn((t=u(Kn(this,16),29),t||n0),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:Mo(this,Pt(t));return;case 2:IY(this,u(t,15).a);return;case 3:$qe(this,u(t,2001));return;case 4:_Y(this,Pt(t));return}Jl(this,n-dt((jn(),n0)),Cn((i=u(Kn(this,16),29),i||n0),n),t)},s.fi=function(){return jn(),n0},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:Mo(this,null);return;case 2:IY(this,0);return;case 3:$qe(this,null);return;case 4:_Y(this,null);return}Fl(this,n-dt((jn(),n0)),Cn((t=u(Kn(this,16),29),t||n0),n))},s.Ib=function(){var n;return n=this.c,n??this.zb},s.b=null,s.c=null,s.d=0,v(Jn,"EEnumLiteralImpl",568);var ezn=Gi(Jn,"EFactoryImpl/InternalEDateTimeFormat");m(485,1,{2076:1},KC),v(Jn,"EFactoryImpl/1ClientInternalEDateTimeFormat",485),m(248,118,{109:1,94:1,93:1,87:1,57:1,114:1,52:1,100:1,248:1,117:1,118:1},gw),s.zh=function(n,t,i){var r;return i=hl(this,n,t,i),this.e&&X(n,179)&&(r=Iz(this,this.e),r!=this.c&&(i=_8(this,r,i))),i},s.Ih=function(n,t,i){var r;switch(n){case 0:return this.f;case 1:return!this.d&&(this.d=new mr(Rc,this,1)),this.d;case 2:return t?Gz(this):this.c;case 3:return this.b;case 4:return this.e;case 5:return t?GQ(this):this.a}return Pl(this,n-dt((jn(),Ep)),Cn((r=u(Kn(this,16),29),r||Ep),n),t,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return vFe(this,null,i);case 1:return!this.d&&(this.d=new mr(Rc,this,1)),vc(this.d,n,i);case 3:return mFe(this,null,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),Ep)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),Ep)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.f;case 1:return!!this.d&&this.d.i!=0;case 2:return!!this.c;case 3:return!!this.b;case 4:return!!this.e;case 5:return!!this.a}return Ll(this,n-dt((jn(),Ep)),Cn((t=u(Kn(this,16),29),t||Ep),n))},s.$h=function(n,t){var i;switch(n){case 0:ZHe(this,u(t,87));return;case 1:!this.d&&(this.d=new mr(Rc,this,1)),kt(this.d),!this.d&&(this.d=new mr(Rc,this,1)),nr(this.d,u(t,18));return;case 3:u0e(this,u(t,87));return;case 4:x0e(this,u(t,834));return;case 5:X9(this,u(t,143));return}Jl(this,n-dt((jn(),Ep)),Cn((i=u(Kn(this,16),29),i||Ep),n),t)},s.fi=function(){return jn(),Ep},s.hi=function(n){var t;switch(n){case 0:ZHe(this,null);return;case 1:!this.d&&(this.d=new mr(Rc,this,1)),kt(this.d);return;case 3:u0e(this,null);return;case 4:x0e(this,null);return;case 5:X9(this,null);return}Fl(this,n-dt((jn(),Ep)),Cn((t=u(Kn(this,16),29),t||Ep),n))},s.Ib=function(){var n;return n=new tl(Ff(this)),n.a+=" (expression: ",QW(this,n),n.a+=")",n.a};var Q8e;v(Jn,"EGenericTypeImpl",248),m(2029,2024,YF),s.Ei=function(n,t){WOe(this,n,t)},s.Uk=function(n,t){return WOe(this,this.gc(),n),t},s.Yi=function(n){return Yu(this.nj(),n)},s.Gi=function(){return this.Hi()},s.nj=function(){return new qSe(this)},s.Hi=function(){return this.Ii(0)},s.Ii=function(n){return this.nj().dd(n)},s.Vk=function(n,t){return H2(this,n,!0),t},s.Ri=function(n,t){var i,r;return r=nW(this,t),i=this.dd(n),i.Rb(r),r},s.Si=function(n,t){var i;H2(this,t,!0),i=this.dd(n),i.Rb(t)},v(Ri,"AbstractSequentialInternalEList",2029),m(482,2029,YF,ST),s.Yi=function(n){return Yu(this.nj(),n)},s.Gi=function(){return this.b==null?(Ed(),Ed(),iD):this.ql()},s.nj=function(){return new pTe(this.a,this.b)},s.Hi=function(){return this.b==null?(Ed(),Ed(),iD):this.ql()},s.Ii=function(n){var t,i;if(this.b==null){if(n<0||n>1)throw R(new jo(RS+n+", size=0"));return Ed(),Ed(),iD}for(i=this.ql(),t=0;t0;)if(t=this.c[--this.d],(!this.e||t.nk()!=K7||t.Jj()!=0)&&(!this.tl()||this.b.Uh(t))){if(o=this.b.Kh(t,this.sl()),this.f=(Tc(),u(t,69).vk()),this.f||t.Hk()){if(this.sl()?(r=u(o,16),this.k=r):(r=u(o,72),this.k=this.j=r),X(this.k,59)?(this.o=this.k.gc(),this.n=this.o):this.p=this.j?this.j.Ii(this.k.gc()):this.k.dd(this.k.gc()),this.p?QGe(this,this.p):oqe(this))return c=this.p?this.p.Ub():this.j?this.j.Yi(--this.n):this.k.Xb(--this.n),this.f?(n=u(c,75),n.Jk(),i=n.kd(),this.i=i):(i=c,this.i=i),this.g=-3,!0}else if(o!=null)return this.k=null,this.p=null,i=o,this.i=i,this.g=-2,!0}return this.k=null,this.p=null,this.g=-1,!1}else return c=this.p?this.p.Ub():this.j?this.j.Yi(--this.n):this.k.Xb(--this.n),this.f?(n=u(c,75),n.Jk(),i=n.kd(),this.i=i):(i=c,this.i=i),this.g=-3,!0}},s.Pb=function(){return IB(this)},s.Tb=function(){return this.a},s.Ub=function(){var n;if(this.g<-1||this.Sb())return--this.a,this.g=0,n=this.i,this.Sb(),n;throw R(new hu)},s.Vb=function(){return this.a-1},s.Qb=function(){throw R(new _t)},s.sl=function(){return!1},s.Wb=function(n){throw R(new _t)},s.tl=function(){return!0},s.a=0,s.d=0,s.f=!1,s.g=0,s.n=0,s.o=0;var iD;v(Ri,"EContentsEList/FeatureIteratorImpl",287),m(700,287,QF,ple),s.sl=function(){return!0},v(Ri,"EContentsEList/ResolvingFeatureIteratorImpl",700),m(1147,700,QF,_Oe),s.tl=function(){return!1},v(Jn,"ENamedElementImpl/1/1",1147),m(1148,287,QF,LOe),s.tl=function(){return!1},v(Jn,"ENamedElementImpl/1/2",1148),m(39,151,zN,_2,rY,Dr,mY,L1,Lf,The,yLe,Ohe,kLe,Gae,jLe,Dhe,ELe,qae,SLe,Nhe,xLe,oE,rO,RV,Ihe,ALe,Uae,MLe),s.Ij=function(){return ahe(this)},s.Pj=function(){var n;return n=ahe(this),n?n.gk():null},s.fj=function(n){return this.b==-1&&this.a&&(this.b=this.c.Eh(this.a.Jj(),this.a.nk())),this.c.vh(this.b,n)},s.hj=function(){return this.c},s.Qj=function(){var n;return n=ahe(this),n?n.rk():!1},s.b=-1,v(Jn,"ENotificationImpl",39),m(403,293,{109:1,94:1,93:1,158:1,197:1,57:1,62:1,114:1,470:1,52:1,100:1,161:1,403:1,293:1,117:1,118:1},yX),s.xh=function(n){return PHe(this,n)},s.Ih=function(n,t,i){var r,c,o;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $n(),(this.Bb&256)!=0;case 3:return $n(),(this.Bb&512)!=0;case 4:return ve(this.s);case 5:return ve(this.t);case 6:return $n(),o=this.t,o>1||o==-1;case 7:return $n(),c=this.s,c>=1;case 8:return t?ff(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?u(this.Cb,29):null;case 11:return!this.d&&(this.d=new rs(Fo,this,11)),this.d;case 12:return!this.c&&(this.c=new we(jp,this,12,10)),this.c;case 13:return!this.a&&(this.a=new CT(this,this)),this.a;case 14:return Ts(this)}return Pl(this,n-dt((jn(),t0)),Cn((r=u(Kn(this,16),29),r||t0),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 10:return this.Cb&&(i=(c=this.Db>>16,c>=0?PHe(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,10,i);case 12:return!this.c&&(this.c=new we(jp,this,12,10)),Co(this.c,n,i)}return o=u(Cn((r=u(Kn(this,16),29),r||(jn(),t0)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),t0)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 9:return SV(this,i);case 10:return hl(this,null,10,i);case 11:return!this.d&&(this.d=new rs(Fo,this,11)),vc(this.d,n,i);case 12:return!this.c&&(this.c=new we(jp,this,12,10)),vc(this.c,n,i);case 14:return vc(Ts(this),n,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),t0)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),t0)),n,i)},s.Th=function(n){var t,i,r;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&Mw(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&Mw(this.q).i==0);case 10:return!!(this.Db>>16==10&&u(this.Cb,29));case 11:return!!this.d&&this.d.i!=0;case 12:return!!this.c&&this.c.i!=0;case 13:return!!this.a&&Ts(this.a.a).i!=0&&!(this.b&&JQ(this.b));case 14:return!!this.b&&JQ(this.b)}return Ll(this,n-dt((jn(),t0)),Cn((t=u(Kn(this,16),29),t||t0),n))},s.$h=function(n,t){var i,r;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:Mo(this,Pt(t));return;case 2:Ld(this,Fe(ze(t)));return;case 3:Pd(this,Fe(ze(t)));return;case 4:Nd(this,u(t,15).a);return;case 5:$2(this,u(t,15).a);return;case 8:cg(this,u(t,143));return;case 9:r=Fa(this,u(t,87),null),r&&r.mj();return;case 11:!this.d&&(this.d=new rs(Fo,this,11)),kt(this.d),!this.d&&(this.d=new rs(Fo,this,11)),nr(this.d,u(t,18));return;case 12:!this.c&&(this.c=new we(jp,this,12,10)),kt(this.c),!this.c&&(this.c=new we(jp,this,12,10)),nr(this.c,u(t,18));return;case 13:!this.a&&(this.a=new CT(this,this)),dS(this.a),!this.a&&(this.a=new CT(this,this)),nr(this.a,u(t,18));return;case 14:kt(Ts(this)),nr(Ts(this),u(t,18));return}Jl(this,n-dt((jn(),t0)),Cn((i=u(Kn(this,16),29),i||t0),n),t)},s.fi=function(){return jn(),t0},s.hi=function(n){var t,i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:Mo(this,null);return;case 2:Ld(this,!0);return;case 3:Pd(this,!0);return;case 4:Nd(this,0);return;case 5:$2(this,1);return;case 8:cg(this,null);return;case 9:i=Fa(this,null,null),i&&i.mj();return;case 11:!this.d&&(this.d=new rs(Fo,this,11)),kt(this.d);return;case 12:!this.c&&(this.c=new we(jp,this,12,10)),kt(this.c);return;case 13:this.a&&dS(this.a);return;case 14:this.b&&kt(this.b);return}Fl(this,n-dt((jn(),t0)),Cn((t=u(Kn(this,16),29),t||t0),n))},s.mi=function(){var n,t;if(this.c)for(n=0,t=this.c.i;nf&&ir(n,f,null),r=0,i=new st(Ts(this.a));i.e!=i.i.gc();)t=u(ft(i),87),o=(l=t.c,l||(jn(),rh)),ir(n,r++,o);return n},s.Fj=function(){var n,t,i,r,c;for(c=new vd,c.a+="[",n=Ts(this.a),t=0,r=Ts(this.a).i;t1);case 5:return bE(this,n,t,i,r,this.i-u(i,16).gc()>0);default:return new L1(this.e,n,this.c,t,i,r,!0)}},s.Rj=function(){return!0},s.Oj=function(){return JQ(this)},s.Ek=function(){kt(this)},v(Jn,"EOperationImpl/2",1331),m(493,1,{1999:1,493:1},YCe),v(Jn,"EPackageImpl/1",493),m(14,81,au,we),s.gl=function(){return this.d},s.hl=function(){return this.b},s.kl=function(){return!0},s.b=0,v(Ri,"EObjectContainmentWithInverseEList",14),m(361,14,au,x4),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectContainmentWithInverseEList/Resolving",361),m(312,361,au,x2),s.Li=function(){this.a.tb=null},v(Jn,"EPackageImpl/2",312),m(1243,1,{},Ss),v(Jn,"EPackageImpl/3",1243),m(721,44,v3,yoe),s._b=function(n){return $r(n)?BV(this,n):!!Xc(this.f,n)},v(Jn,"EPackageRegistryImpl",721),m(503,293,{109:1,94:1,93:1,158:1,197:1,57:1,2078:1,114:1,470:1,52:1,100:1,161:1,503:1,293:1,117:1,118:1},kX),s.xh=function(n){return $He(this,n)},s.Ih=function(n,t,i){var r,c,o;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $n(),(this.Bb&256)!=0;case 3:return $n(),(this.Bb&512)!=0;case 4:return ve(this.s);case 5:return ve(this.t);case 6:return $n(),o=this.t,o>1||o==-1;case 7:return $n(),c=this.s,c>=1;case 8:return t?ff(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?u(this.Cb,62):null}return Pl(this,n-dt((jn(),Km)),Cn((r=u(Kn(this,16),29),r||Km),n),t,i)},s.Ph=function(n,t,i){var r,c,o;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),Co(this.Ab,n,i);case 10:return this.Cb&&(i=(c=this.Db>>16,c>=0?$He(this,i):this.Cb.Qh(this,-1-c,null,i))),hl(this,n,10,i)}return o=u(Cn((r=u(Kn(this,16),29),r||(jn(),Km)),t),69),o.uk().xk(this,Lo(this),t-dt((jn(),Km)),n,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 9:return SV(this,i);case 10:return hl(this,null,10,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),Km)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),Km)),n,i)},s.Th=function(n){var t,i,r;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&Mw(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&Mw(this.q).i==0);case 10:return!!(this.Db>>16==10&&u(this.Cb,62))}return Ll(this,n-dt((jn(),Km)),Cn((t=u(Kn(this,16),29),t||Km),n))},s.fi=function(){return jn(),Km},v(Jn,"EParameterImpl",503),m(103,451,{109:1,94:1,93:1,158:1,197:1,57:1,19:1,179:1,69:1,114:1,470:1,52:1,100:1,161:1,103:1,451:1,293:1,117:1,118:1,682:1},kle),s.Ih=function(n,t,i){var r,c,o,l;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return $n(),(this.Bb&256)!=0;case 3:return $n(),(this.Bb&512)!=0;case 4:return ve(this.s);case 5:return ve(this.t);case 6:return $n(),l=this.t,l>1||l==-1;case 7:return $n(),c=this.s,c>=1;case 8:return t?ff(this):this.r;case 9:return this.q;case 10:return $n(),(this.Bb&Gf)!=0;case 11:return $n(),(this.Bb&V0)!=0;case 12:return $n(),(this.Bb&cm)!=0;case 13:return this.j;case 14:return A8(this);case 15:return $n(),(this.Bb&as)!=0;case 16:return $n(),(this.Bb&jh)!=0;case 17:return O2(this);case 18:return $n(),(this.Bb&Ru)!=0;case 19:return $n(),o=Oc(this),!!(o&&(o.Bb&Ru)!=0);case 20:return $n(),(this.Bb&Ec)!=0;case 21:return t?Oc(this):this.b;case 22:return t?d1e(this):GPe(this);case 23:return!this.a&&(this.a=new Jv(qm,this,23)),this.a}return Pl(this,n-dt((jn(),i5)),Cn((r=u(Kn(this,16),29),r||i5),n),t,i)},s.Th=function(n){var t,i,r,c;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return c=this.t,c>1||c==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&Mw(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&Mw(this.q).i==0);case 10:return(this.Bb&Gf)==0;case 11:return(this.Bb&V0)!=0;case 12:return(this.Bb&cm)!=0;case 13:return this.j!=null;case 14:return A8(this)!=null;case 15:return(this.Bb&as)!=0;case 16:return(this.Bb&jh)!=0;case 17:return!!O2(this);case 18:return(this.Bb&Ru)!=0;case 19:return r=Oc(this),!!r&&(r.Bb&Ru)!=0;case 20:return(this.Bb&Ec)==0;case 21:return!!this.b;case 22:return!!GPe(this);case 23:return!!this.a&&this.a.i!=0}return Ll(this,n-dt((jn(),i5)),Cn((t=u(Kn(this,16),29),t||i5),n))},s.$h=function(n,t){var i,r;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:XV(this,Pt(t));return;case 2:Ld(this,Fe(ze(t)));return;case 3:Pd(this,Fe(ze(t)));return;case 4:Nd(this,u(t,15).a);return;case 5:$2(this,u(t,15).a);return;case 8:cg(this,u(t,143));return;case 9:r=Fa(this,u(t,87),null),r&&r.mj();return;case 10:l8(this,Fe(ze(t)));return;case 11:h8(this,Fe(ze(t)));return;case 12:a8(this,Fe(ze(t)));return;case 13:Dse(this,Pt(t));return;case 15:f8(this,Fe(ze(t)));return;case 16:d8(this,Fe(ze(t)));return;case 18:L4n(this,Fe(ze(t)));return;case 20:Y1e(this,Fe(ze(t)));return;case 21:Khe(this,u(t,19));return;case 23:!this.a&&(this.a=new Jv(qm,this,23)),kt(this.a),!this.a&&(this.a=new Jv(qm,this,23)),nr(this.a,u(t,18));return}Jl(this,n-dt((jn(),i5)),Cn((i=u(Kn(this,16),29),i||i5),n),t)},s.fi=function(){return jn(),i5},s.hi=function(n){var t,i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:X(this.Cb,88)&&Y2(Ms(u(this.Cb,88)),4),Mo(this,null);return;case 2:Ld(this,!0);return;case 3:Pd(this,!0);return;case 4:Nd(this,0);return;case 5:$2(this,1);return;case 8:cg(this,null);return;case 9:i=Fa(this,null,null),i&&i.mj();return;case 10:l8(this,!0);return;case 11:h8(this,!1);return;case 12:a8(this,!1);return;case 13:this.i=null,xB(this,null);return;case 15:f8(this,!1);return;case 16:d8(this,!1);return;case 18:Q1e(this,!1),X(this.Cb,88)&&Y2(Ms(u(this.Cb,88)),2);return;case 20:Y1e(this,!0);return;case 21:Khe(this,null);return;case 23:!this.a&&(this.a=new Jv(qm,this,23)),kt(this.a);return}Fl(this,n-dt((jn(),i5)),Cn((t=u(Kn(this,16),29),t||i5),n))},s.mi=function(){d1e(this),$9(Vc((ls(),nc),this)),ff(this),this.Bb|=1},s.sk=function(){return Oc(this)},s.Zk=function(){var n;return n=Oc(this),!!n&&(n.Bb&Ru)!=0},s.$k=function(){return(this.Bb&Ru)!=0},s._k=function(){return(this.Bb&Ec)!=0},s.Wk=function(n,t){return this.c=null,z1e(this,n,t)},s.Ib=function(){var n;return(this.Db&64)!=0?Jz(this):(n=new cf(Jz(this)),n.a+=" (containment: ",yd(n,(this.Bb&Ru)!=0),n.a+=", resolveProxies: ",yd(n,(this.Bb&Ec)!=0),n.a+=")",n.a)},v(Jn,"EReferenceImpl",103),m(549,118,{109:1,45:1,94:1,93:1,136:1,57:1,114:1,52:1,100:1,549:1,117:1,118:1},$h),s.Fb=function(n){return this===n},s.jd=function(){return this.b},s.kd=function(){return this.c},s.Hb=function(){return jw(this)},s.Ai=function(n){Qvn(this,Pt(n))},s.ld=function(n){return zvn(this,Pt(n))},s.Ih=function(n,t,i){var r;switch(n){case 0:return this.b;case 1:return this.c}return Pl(this,n-dt((jn(),Ac)),Cn((r=u(Kn(this,16),29),r||Ac),n),t,i)},s.Th=function(n){var t;switch(n){case 0:return this.b!=null;case 1:return this.c!=null}return Ll(this,n-dt((jn(),Ac)),Cn((t=u(Kn(this,16),29),t||Ac),n))},s.$h=function(n,t){var i;switch(n){case 0:Wvn(this,Pt(t));return;case 1:Jhe(this,Pt(t));return}Jl(this,n-dt((jn(),Ac)),Cn((i=u(Kn(this,16),29),i||Ac),n),t)},s.fi=function(){return jn(),Ac},s.hi=function(n){var t;switch(n){case 0:qhe(this,null);return;case 1:Jhe(this,null);return}Fl(this,n-dt((jn(),Ac)),Cn((t=u(Kn(this,16),29),t||Ac),n))},s.yi=function(){var n;return this.a==-1&&(n=this.b,this.a=n==null?0:Id(n)),this.a},s.zi=function(n){this.a=n},s.Ib=function(){var n;return(this.Db&64)!=0?Ff(this):(n=new cf(Ff(this)),n.a+=" (key: ",Bc(n,this.b),n.a+=", value: ",Bc(n,this.c),n.a+=")",n.a)},s.a=-1,s.b=null,s.c=null;var Du=v(Jn,"EStringToStringMapEntryImpl",549),Zan=Gi(Ri,"FeatureMap/Entry/Internal");m(562,1,WF),s.vl=function(n){return this.wl(u(n,52))},s.wl=function(n){return this.vl(n)},s.Fb=function(n){var t,i;return this===n?!0:X(n,75)?(t=u(n,75),t.Jk()==this.c?(i=this.kd(),i==null?t.kd()==null:gi(i,t.kd())):!1):!1},s.Jk=function(){return this.c},s.Hb=function(){var n;return n=this.kd(),Ni(this.c)^(n==null?0:Ni(n))},s.Ib=function(){var n,t;return n=this.c,t=ol(n.ok()).vi(),n.ve(),(t!=null&&t.length!=0?t+":"+n.ve():n.ve())+"="+this.kd()},v(Jn,"EStructuralFeatureImpl/BasicFeatureMapEntry",562),m(777,562,WF,Mle),s.wl=function(n){return new Mle(this.c,n)},s.kd=function(){return this.a},s.xl=function(n,t,i){return E7n(this,n,this.a,t,i)},s.yl=function(n,t,i){return S7n(this,n,this.a,t,i)},v(Jn,"EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry",777),m(1304,1,{},QCe),s.wk=function(n,t,i,r,c){var o;return o=u(H9(n,this.b),219),o.Wl(this.a).Dk(r)},s.xk=function(n,t,i,r,c){var o;return o=u(H9(n,this.b),219),o.Nl(this.a,r,c)},s.yk=function(n,t,i,r,c){var o;return o=u(H9(n,this.b),219),o.Ol(this.a,r,c)},s.zk=function(n,t,i){var r;return r=u(H9(n,this.b),219),r.Wl(this.a).Oj()},s.Ak=function(n,t,i,r){var c;c=u(H9(n,this.b),219),c.Wl(this.a).Wb(r)},s.Bk=function(n,t,i){return u(H9(n,this.b),219).Wl(this.a)},s.Ck=function(n,t,i){var r;r=u(H9(n,this.b),219),r.Wl(this.a).Ek()},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator",1304),m(89,1,{},xd,Ub,Md,Wb),s.wk=function(n,t,i,r,c){var o;if(o=t.ii(i),o==null&&t.ji(i,o=eF(this,n)),!c)switch(this.e){case 50:case 41:return u(o,586)._j();case 40:return u(o,219).Tl()}return o},s.xk=function(n,t,i,r,c){var o,l;return l=t.ii(i),l==null&&t.ji(i,l=eF(this,n)),o=u(l,72).Uk(r,c),o},s.yk=function(n,t,i,r,c){var o;return o=t.ii(i),o!=null&&(c=u(o,72).Vk(r,c)),c},s.zk=function(n,t,i){var r;return r=t.ii(i),r!=null&&u(r,77).Oj()},s.Ak=function(n,t,i,r){var c;c=u(t.ii(i),77),!c&&t.ji(i,c=eF(this,n)),c.Wb(r)},s.Bk=function(n,t,i){var r,c;return c=t.ii(i),c==null&&t.ji(i,c=eF(this,n)),X(c,77)?u(c,77):(r=u(t.ii(i),16),new HSe(r))},s.Ck=function(n,t,i){var r;r=u(t.ii(i),77),!r&&t.ji(i,r=eF(this,n)),r.Ek()},s.b=0,s.e=0,v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateMany",89),m(498,1,{}),s.xk=function(n,t,i,r,c){throw R(new _t)},s.yk=function(n,t,i,r,c){throw R(new _t)},s.Bk=function(n,t,i){return new KDe(this,n,t,i)};var d1;v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingle",498),m(1321,1,Lne,KDe),s.Dk=function(n){return this.a.wk(this.c,this.d,this.b,n,!0)},s.Oj=function(){return this.a.zk(this.c,this.d,this.b)},s.Wb=function(n){this.a.Ak(this.c,this.d,this.b,n)},s.Ek=function(){this.a.Ck(this.c,this.d,this.b)},s.b=0,v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingle/1",1321),m(770,498,{},bae),s.wk=function(n,t,i,r,c){return RW(n,n.Mh(),n.Ch())==this.b?this._k()&&r?xW(n):n.Mh():null},s.xk=function(n,t,i,r,c){var o,l;return n.Mh()&&(c=(o=n.Ch(),o>=0?n.xh(c):n.Mh().Qh(n,-1-o,null,c))),l=Ji(n.Ah(),this.e),n.zh(r,l,c)},s.yk=function(n,t,i,r,c){var o;return o=Ji(n.Ah(),this.e),n.zh(null,o,c)},s.zk=function(n,t,i){var r;return r=Ji(n.Ah(),this.e),!!n.Mh()&&n.Ch()==r},s.Ak=function(n,t,i,r){var c,o,l,f,h;if(r!=null&&!JW(this.a,r))throw R(new a9(ZF+(X(r,57)?c0e(u(r,57).Ah()):xhe(Us(r)))+eJ+this.a+"'"));if(c=n.Mh(),l=Ji(n.Ah(),this.e),ue(r)!==ue(c)||n.Ch()!=l&&r!=null){if(m8(n,u(r,57)))throw R(new Un(PS+n.Ib()));h=null,c&&(h=(o=n.Ch(),o>=0?n.xh(h):n.Mh().Qh(n,-1-o,null,h))),f=u(r,52),f&&(h=f.Oh(n,Ji(f.Ah(),this.b),null,h)),h=n.zh(f,l,h),h&&h.mj()}else n.sh()&&n.th()&&hi(n,new Dr(n,1,l,r,r))},s.Ck=function(n,t,i){var r,c,o,l;r=n.Mh(),r?(l=(c=n.Ch(),c>=0?n.xh(null):n.Mh().Qh(n,-1-c,null,null)),o=Ji(n.Ah(),this.e),l=n.zh(null,o,l),l&&l.mj()):n.sh()&&n.th()&&hi(n,new oE(n,1,this.e,null,null))},s._k=function(){return!1},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainer",770),m(1305,770,{},zNe),s._k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving",1305),m(560,498,{}),s.wk=function(n,t,i,r,c){var o;return o=t.ii(i),o==null?this.b:ue(o)===ue(d1)?null:o},s.zk=function(n,t,i){var r;return r=t.ii(i),r!=null&&(ue(r)===ue(d1)||!gi(r,this.b))},s.Ak=function(n,t,i,r){var c,o;n.sh()&&n.th()?(c=(o=t.ii(i),o==null?this.b:ue(o)===ue(d1)?null:o),r==null?this.c!=null?(t.ji(i,null),r=this.b):this.b!=null?t.ji(i,d1):t.ji(i,null):(this.zl(r),t.ji(i,r)),hi(n,this.d.Al(n,1,this.e,c,r))):r==null?this.c!=null?t.ji(i,null):this.b!=null?t.ji(i,d1):t.ji(i,null):(this.zl(r),t.ji(i,r))},s.Ck=function(n,t,i){var r,c;n.sh()&&n.th()?(r=(c=t.ii(i),c==null?this.b:ue(c)===ue(d1)?null:c),t.ki(i),hi(n,this.d.Al(n,1,this.e,r,this.b))):t.ki(i)},s.zl=function(n){throw R(new ZSe)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData",560),m(C3,1,{},sw),s.Al=function(n,t,i,r,c){return new oE(n,t,i,r,c)},s.Bl=function(n,t,i,r,c,o){return new RV(n,t,i,r,c,o)};var W8e,Z8e,e7e,n7e,t7e,i7e,r7e,Hce,c7e;v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator",C3),m(1322,C3,{},SL),s.Al=function(n,t,i,r,c){return new Uae(n,t,i,Fe(ze(r)),Fe(ze(c)))},s.Bl=function(n,t,i,r,c,o){return new MLe(n,t,i,Fe(ze(r)),Fe(ze(c)),o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1",1322),m(1323,C3,{},xL),s.Al=function(n,t,i,r,c){return new The(n,t,i,u(r,221).a,u(c,221).a)},s.Bl=function(n,t,i,r,c,o){return new yLe(n,t,i,u(r,221).a,u(c,221).a,o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2",1323),m(1324,C3,{},AL),s.Al=function(n,t,i,r,c){return new Ohe(n,t,i,u(r,180).a,u(c,180).a)},s.Bl=function(n,t,i,r,c,o){return new kLe(n,t,i,u(r,180).a,u(c,180).a,o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3",1324),m(1325,C3,{},bU),s.Al=function(n,t,i,r,c){return new Gae(n,t,i,ne(re(r)),ne(re(c)))},s.Bl=function(n,t,i,r,c,o){return new jLe(n,t,i,ne(re(r)),ne(re(c)),o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4",1325),m(1326,C3,{},Hk),s.Al=function(n,t,i,r,c){return new Dhe(n,t,i,u(r,164).a,u(c,164).a)},s.Bl=function(n,t,i,r,c,o){return new ELe(n,t,i,u(r,164).a,u(c,164).a,o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5",1326),m(1327,C3,{},Rh),s.Al=function(n,t,i,r,c){return new qae(n,t,i,u(r,15).a,u(c,15).a)},s.Bl=function(n,t,i,r,c,o){return new SLe(n,t,i,u(r,15).a,u(c,15).a,o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6",1327),m(1328,C3,{},g0),s.Al=function(n,t,i,r,c){return new Nhe(n,t,i,u(r,190).a,u(c,190).a)},s.Bl=function(n,t,i,r,c,o){return new xLe(n,t,i,u(r,190).a,u(c,190).a,o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7",1328),m(1329,C3,{},ML),s.Al=function(n,t,i,r,c){return new Ihe(n,t,i,u(r,191).a,u(c,191).a)},s.Bl=function(n,t,i,r,c,o){return new ALe(n,t,i,u(r,191).a,u(c,191).a,o)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8",1329),m(1307,560,{},WDe),s.zl=function(n){if(!this.a.dk(n))throw R(new a9(ZF+Us(n)+eJ+this.a+"'"))},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic",1307),m(1308,560,{},PIe),s.zl=function(n){},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic",1308),m(771,560,{}),s.zk=function(n,t,i){var r;return r=t.ii(i),r!=null},s.Ak=function(n,t,i,r){var c,o;n.sh()&&n.th()?(c=!0,o=t.ii(i),o==null?(c=!1,o=this.b):ue(o)===ue(d1)&&(o=null),r==null?this.c!=null?(t.ji(i,null),r=this.b):t.ji(i,d1):(this.zl(r),t.ji(i,r)),hi(n,this.d.Bl(n,1,this.e,o,r,!c))):r==null?this.c!=null?t.ji(i,null):t.ji(i,d1):(this.zl(r),t.ji(i,r))},s.Ck=function(n,t,i){var r,c;n.sh()&&n.th()?(r=!0,c=t.ii(i),c==null?(r=!1,c=this.b):ue(c)===ue(d1)&&(c=null),t.ki(i),hi(n,this.d.Bl(n,2,this.e,c,this.b,r))):t.ki(i)},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable",771),m(1309,771,{},ZDe),s.zl=function(n){if(!this.a.dk(n))throw R(new a9(ZF+Us(n)+eJ+this.a+"'"))},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic",1309),m(1310,771,{},$Ie),s.zl=function(n){},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic",1310),m(402,498,{},fR),s.wk=function(n,t,i,r,c){var o,l,f,h,b;if(b=t.ii(i),this.rk()&&ue(b)===ue(d1))return null;if(this._k()&&r&&b!=null){if(f=u(b,52),f.Sh()&&(h=z0(n,f),f!=h)){if(!JW(this.a,h))throw R(new a9(ZF+Us(h)+eJ+this.a+"'"));t.ji(i,b=h),this.$k()&&(o=u(h,52),l=f.Qh(n,this.b?Ji(f.Ah(),this.b):-1-Ji(n.Ah(),this.e),null,null),!o.Mh()&&(l=o.Oh(n,this.b?Ji(o.Ah(),this.b):-1-Ji(n.Ah(),this.e),null,l)),l&&l.mj()),n.sh()&&n.th()&&hi(n,new oE(n,9,this.e,f,h))}return b}else return b},s.xk=function(n,t,i,r,c){var o,l;return l=t.ii(i),ue(l)===ue(d1)&&(l=null),t.ji(i,r),this.Kj()?ue(l)!==ue(r)&&l!=null&&(o=u(l,52),c=o.Qh(n,Ji(o.Ah(),this.b),null,c)):this.$k()&&l!=null&&(c=u(l,52).Qh(n,-1-Ji(n.Ah(),this.e),null,c)),n.sh()&&n.th()&&(!c&&(c=new k0(4)),c.lj(new oE(n,1,this.e,l,r))),c},s.yk=function(n,t,i,r,c){var o;return o=t.ii(i),ue(o)===ue(d1)&&(o=null),t.ki(i),n.sh()&&n.th()&&(!c&&(c=new k0(4)),this.rk()?c.lj(new oE(n,2,this.e,o,null)):c.lj(new oE(n,1,this.e,o,null))),c},s.zk=function(n,t,i){var r;return r=t.ii(i),r!=null},s.Ak=function(n,t,i,r){var c,o,l,f,h;if(r!=null&&!JW(this.a,r))throw R(new a9(ZF+(X(r,57)?c0e(u(r,57).Ah()):xhe(Us(r)))+eJ+this.a+"'"));h=t.ii(i),f=h!=null,this.rk()&&ue(h)===ue(d1)&&(h=null),l=null,this.Kj()?ue(h)!==ue(r)&&(h!=null&&(c=u(h,52),l=c.Qh(n,Ji(c.Ah(),this.b),null,l)),r!=null&&(c=u(r,52),l=c.Oh(n,Ji(c.Ah(),this.b),null,l))):this.$k()&&ue(h)!==ue(r)&&(h!=null&&(l=u(h,52).Qh(n,-1-Ji(n.Ah(),this.e),null,l)),r!=null&&(l=u(r,52).Oh(n,-1-Ji(n.Ah(),this.e),null,l))),r==null&&this.rk()?t.ji(i,d1):t.ji(i,r),n.sh()&&n.th()?(o=new RV(n,1,this.e,h,r,this.rk()&&!f),l?(l.lj(o),l.mj()):hi(n,o)):l&&l.mj()},s.Ck=function(n,t,i){var r,c,o,l,f;f=t.ii(i),l=f!=null,this.rk()&&ue(f)===ue(d1)&&(f=null),o=null,f!=null&&(this.Kj()?(r=u(f,52),o=r.Qh(n,Ji(r.Ah(),this.b),null,o)):this.$k()&&(o=u(f,52).Qh(n,-1-Ji(n.Ah(),this.e),null,o))),t.ki(i),n.sh()&&n.th()?(c=new RV(n,this.rk()?2:1,this.e,f,null,l),o?(o.lj(c),o.mj()):hi(n,c)):o&&o.mj()},s.Kj=function(){return!1},s.$k=function(){return!1},s._k=function(){return!1},s.rk=function(){return!1},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObject",402),m(561,402,{},BK),s.$k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment",561),m(1313,561,{},$Oe),s._k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving",1313),m(773,561,{},mle),s.rk=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable",773),m(1315,773,{},ROe),s._k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving",1315),m(638,561,{},ZK),s.Kj=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse",638),m(1314,638,{},FNe),s._k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving",1314),m(774,638,{},Zle),s.rk=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable",774),m(1316,774,{},JNe),s._k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving",1316),m(639,402,{},vle),s._k=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving",639),m(1317,639,{},BOe),s.rk=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable",1317),m(775,639,{},efe),s.Kj=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse",775),m(1318,775,{},HNe),s.rk=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable",1318),m(1311,402,{},zOe),s.rk=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable",1311),m(772,402,{},nfe),s.Kj=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse",772),m(1312,772,{},GNe),s.rk=function(){return!0},v(Jn,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable",1312),m(776,562,WF,Qfe),s.wl=function(n){return new Qfe(this.a,this.c,n)},s.kd=function(){return this.b},s.xl=function(n,t,i){return y9n(this,n,this.b,i)},s.yl=function(n,t,i){return k9n(this,n,this.b,i)},v(Jn,"EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry",776),m(1319,1,Lne,HSe),s.Dk=function(n){return this.a},s.Oj=function(){return X(this.a,98)?u(this.a,98).Oj():!this.a.dc()},s.Wb=function(n){this.a.$b(),this.a.Fc(u(n,16))},s.Ek=function(){X(this.a,98)?u(this.a,98).Ek():this.a.$b()},v(Jn,"EStructuralFeatureImpl/SettingMany",1319),m(1320,562,WF,wPe),s.vl=function(n){return new JK((Si(),hA),this.b.oi(this.a,n))},s.kd=function(){return null},s.xl=function(n,t,i){return i},s.yl=function(n,t,i){return i},v(Jn,"EStructuralFeatureImpl/SimpleContentFeatureMapEntry",1320),m(640,562,WF,JK),s.vl=function(n){return new JK(this.c,n)},s.kd=function(){return this.a},s.xl=function(n,t,i){return i},s.yl=function(n,t,i){return i},v(Jn,"EStructuralFeatureImpl/SimpleFeatureMapEntry",640),m(396,492,Th,Ol),s.$i=function(n){return le(vf,Nn,29,n,0,1)},s.Wi=function(){return!1},v(Jn,"ESuperAdapter/1",396),m(446,439,{109:1,94:1,93:1,158:1,197:1,57:1,114:1,834:1,52:1,100:1,161:1,446:1,117:1,118:1},Gk),s.Ih=function(n,t,i){var r;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return!this.a&&(this.a=new iE(this,Rc,this)),this.a}return Pl(this,n-dt((jn(),Sp)),Cn((r=u(Kn(this,16),29),r||Sp),n),t,i)},s.Rh=function(n,t,i){var r,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Zt,this,0,3)),vc(this.Ab,n,i);case 2:return!this.a&&(this.a=new iE(this,Rc,this)),vc(this.a,n,i)}return c=u(Cn((r=u(Kn(this,16),29),r||(jn(),Sp)),t),69),c.uk().yk(this,Lo(this),t-dt((jn(),Sp)),n,i)},s.Th=function(n){var t;switch(n){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!!this.a&&this.a.i!=0}return Ll(this,n-dt((jn(),Sp)),Cn((t=u(Kn(this,16),29),t||Sp),n))},s.$h=function(n,t){var i;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab),!this.Ab&&(this.Ab=new we(Zt,this,0,3)),nr(this.Ab,u(t,18));return;case 1:Mo(this,Pt(t));return;case 2:!this.a&&(this.a=new iE(this,Rc,this)),kt(this.a),!this.a&&(this.a=new iE(this,Rc,this)),nr(this.a,u(t,18));return}Jl(this,n-dt((jn(),Sp)),Cn((i=u(Kn(this,16),29),i||Sp),n),t)},s.fi=function(){return jn(),Sp},s.hi=function(n){var t;switch(n){case 0:!this.Ab&&(this.Ab=new we(Zt,this,0,3)),kt(this.Ab);return;case 1:Mo(this,null);return;case 2:!this.a&&(this.a=new iE(this,Rc,this)),kt(this.a);return}Fl(this,n-dt((jn(),Sp)),Cn((t=u(Kn(this,16),29),t||Sp),n))},v(Jn,"ETypeParameterImpl",446),m(447,81,au,iE),s.Lj=function(n,t){return hMn(this,u(n,87),t)},s.Mj=function(n,t){return dMn(this,u(n,87),t)},v(Jn,"ETypeParameterImpl/1",447),m(637,44,v3,jX),s.ec=function(){return new IP(this)},v(Jn,"ETypeParameterImpl/2",637),m(557,Ga,fs,IP),s.Ec=function(n){return vNe(this,u(n,87))},s.Fc=function(n){var t,i,r;for(r=!1,i=n.Jc();i.Ob();)t=u(i.Pb(),87),ei(this.a,t,"")==null&&(r=!0);return r},s.$b=function(){Hu(this.a)},s.Gc=function(n){return so(this.a,n)},s.Jc=function(){var n;return n=new B2(new sn(this.a).a),new DP(n)},s.Kc=function(n){return t$e(this,n)},s.gc=function(){return Aj(this.a)},v(Jn,"ETypeParameterImpl/2/1",557),m(558,1,Fr,DP),s.Nb=function(n){Zr(this,n)},s.Pb=function(){return u(t3(this.a).jd(),87)},s.Ob=function(){return this.a.b},s.Qb=function(){wRe(this.a)},v(Jn,"ETypeParameterImpl/2/1/1",558),m(1281,44,v3,Ixe),s._b=function(n){return $r(n)?BV(this,n):!!Xc(this.f,n)},s.xc=function(n){var t,i;return t=$r(n)?lo(this,n):bu(Xc(this.f,n)),X(t,835)?(i=u(t,835),t=i.Ik(),ei(this,u(n,241),t),t):t??(n==null?(zX(),nhn):null)},v(Jn,"EValidatorRegistryImpl",1281),m(1303,710,{109:1,94:1,93:1,469:1,158:1,57:1,114:1,2002:1,52:1,100:1,161:1,117:1,118:1},lw),s.oi=function(n,t){switch(n.fk()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return t==null?null:fu(t);case 25:return I8n(t);case 27:return X9n(t);case 28:return K9n(t);case 29:return t==null?null:JTe(uA[0],u(t,205));case 41:return t==null?"":Pb(u(t,298));case 42:return fu(t);case 50:return Pt(t);default:throw R(new Un(u7+n.ve()+up))}},s.pi=function(n){var t,i,r,c,o,l,f,h,b,p,y,S,A,O,D,B;switch(n.G==-1&&(n.G=(S=ol(n),S?$d(S.si(),n):-1)),n.G){case 0:return i=new vX,i;case 1:return t=new Nb,t;case 2:return r=new rj,r;case 4:return c=new PP,c;case 5:return o=new Nxe,o;case 6:return l=new KSe,l;case 7:return f=new IC,f;case 10:return b=new jv,b;case 11:return p=new yX,p;case 12:return y=new u_e,y;case 13:return A=new kX,A;case 14:return O=new kle,O;case 17:return D=new $h,D;case 18:return h=new gw,h;case 19:return B=new Gk,B;default:throw R(new Un(vne+n.zb+up))}},s.qi=function(n,t){switch(n.fk()){case 20:return t==null?null:new Joe(t);case 21:return t==null?null:new A0(t);case 23:case 22:return t==null?null:OEn(t);case 26:case 24:return t==null?null:fO(al(t,-128,127)<<24>>24);case 25:return AOn(t);case 27:return hxn(t);case 28:return dxn(t);case 29:return IMn(t);case 32:case 31:return t==null?null:K2(t);case 38:case 37:return t==null?null:new aoe(t);case 40:case 39:return t==null?null:ve(al(t,Xr,oi));case 41:return null;case 42:return t==null,null;case 44:case 43:return t==null?null:q2(Zz(t));case 49:case 48:return t==null?null:o8(al(t,nJ,32767)<<16>>16);case 50:return t;default:throw R(new Un(u7+n.ve()+up))}},v(Jn,"EcoreFactoryImpl",1303),m(548,184,{109:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,2e3:1,52:1,100:1,161:1,184:1,548:1,117:1,118:1,680:1},NDe),s.gb=!1,s.hb=!1;var u7e,ehn=!1;v(Jn,"EcorePackageImpl",548),m(1199,1,{835:1},Ev),s.Ik=function(){return aOe(),thn},v(Jn,"EcorePackageImpl/1",1199),m(1208,1,ii,fw),s.dk=function(n){return X(n,158)},s.ek=function(n){return le(ZI,Nn,158,n,0,1)},v(Jn,"EcorePackageImpl/10",1208),m(1209,1,ii,rC),s.dk=function(n){return X(n,197)},s.ek=function(n){return le(_ce,Nn,197,n,0,1)},v(Jn,"EcorePackageImpl/11",1209),m(1210,1,ii,cC),s.dk=function(n){return X(n,57)},s.ek=function(n){return le(vb,Nn,57,n,0,1)},v(Jn,"EcorePackageImpl/12",1210),m(1211,1,ii,w0),s.dk=function(n){return X(n,403)},s.ek=function(n){return le(yf,ime,62,n,0,1)},v(Jn,"EcorePackageImpl/13",1211),m(1212,1,ii,CL),s.dk=function(n){return X(n,241)},s.ek=function(n){return le(Aa,Nn,241,n,0,1)},v(Jn,"EcorePackageImpl/14",1212),m(1213,1,ii,G5),s.dk=function(n){return X(n,503)},s.ek=function(n){return le(jp,Nn,2078,n,0,1)},v(Jn,"EcorePackageImpl/15",1213),m(1214,1,ii,U6),s.dk=function(n){return X(n,103)},s.ek=function(n){return le(Um,M3,19,n,0,1)},v(Jn,"EcorePackageImpl/16",1214),m(1215,1,ii,X6),s.dk=function(n){return X(n,179)},s.ek=function(n){return le(ns,M3,179,n,0,1)},v(Jn,"EcorePackageImpl/17",1215),m(1216,1,ii,q5),s.dk=function(n){return X(n,470)},s.ek=function(n){return le(Gm,Nn,470,n,0,1)},v(Jn,"EcorePackageImpl/18",1216),m(1217,1,ii,TL),s.dk=function(n){return X(n,549)},s.ek=function(n){return le(Du,zZe,549,n,0,1)},v(Jn,"EcorePackageImpl/19",1217),m(1200,1,ii,OL),s.dk=function(n){return X(n,335)},s.ek=function(n){return le(qm,M3,38,n,0,1)},v(Jn,"EcorePackageImpl/2",1200),m(1218,1,ii,K6),s.dk=function(n){return X(n,248)},s.ek=function(n){return le(Rc,ien,87,n,0,1)},v(Jn,"EcorePackageImpl/20",1218),m(1219,1,ii,NL),s.dk=function(n){return X(n,446)},s.ek=function(n){return le(Fo,Nn,834,n,0,1)},v(Jn,"EcorePackageImpl/21",1219),m(1220,1,ii,qk),s.dk=function(n){return b2(n)},s.ek=function(n){return le(Qi,Ae,473,n,8,1)},v(Jn,"EcorePackageImpl/22",1220),m(1221,1,ii,IL),s.dk=function(n){return X(n,195)},s.ek=function(n){return le(ds,Ae,195,n,0,2)},v(Jn,"EcorePackageImpl/23",1221),m(1222,1,ii,gU),s.dk=function(n){return X(n,221)},s.ek=function(n){return le(jy,Ae,221,n,0,1)},v(Jn,"EcorePackageImpl/24",1222),m(1223,1,ii,wU),s.dk=function(n){return X(n,180)},s.ek=function(n){return le(KS,Ae,180,n,0,1)},v(Jn,"EcorePackageImpl/25",1223),m(1224,1,ii,Ju),s.dk=function(n){return X(n,205)},s.ek=function(n){return le(aJ,Ae,205,n,0,1)},v(Jn,"EcorePackageImpl/26",1224),m(1225,1,ii,Do),s.dk=function(n){return!1},s.ek=function(n){return le(S7e,Nn,2174,n,0,1)},v(Jn,"EcorePackageImpl/27",1225),m(1226,1,ii,Hc),s.dk=function(n){return g2(n)},s.ek=function(n){return le(gr,Ae,346,n,7,1)},v(Jn,"EcorePackageImpl/28",1226),m(1227,1,ii,nu),s.dk=function(n){return X(n,61)},s.ek=function(n){return le(B8e,um,61,n,0,1)},v(Jn,"EcorePackageImpl/29",1227),m(1201,1,ii,io),s.dk=function(n){return X(n,504)},s.ek=function(n){return le(Zt,{3:1,4:1,5:1,1995:1},587,n,0,1)},v(Jn,"EcorePackageImpl/3",1201),m(1228,1,ii,v1),s.dk=function(n){return X(n,568)},s.ek=function(n){return le(J8e,Nn,2001,n,0,1)},v(Jn,"EcorePackageImpl/30",1228),m(1229,1,ii,Qp),s.dk=function(n){return X(n,163)},s.ek=function(n){return le(a7e,um,163,n,0,1)},v(Jn,"EcorePackageImpl/31",1229),m(1230,1,ii,U5),s.dk=function(n){return X(n,75)},s.ek=function(n){return le(AG,hen,75,n,0,1)},v(Jn,"EcorePackageImpl/32",1230),m(1231,1,ii,uC),s.dk=function(n){return X(n,164)},s.ek=function(n){return le(b7,Ae,164,n,0,1)},v(Jn,"EcorePackageImpl/33",1231),m(1232,1,ii,aw),s.dk=function(n){return X(n,15)},s.ek=function(n){return le(jr,Ae,15,n,0,1)},v(Jn,"EcorePackageImpl/34",1232),m(1233,1,ii,zs),s.dk=function(n){return X(n,298)},s.ek=function(n){return le(wme,Nn,298,n,0,1)},v(Jn,"EcorePackageImpl/35",1233),m(1234,1,ii,Wp),s.dk=function(n){return X(n,190)},s.ek=function(n){return le(sp,Ae,190,n,0,1)},v(Jn,"EcorePackageImpl/36",1234),m(1235,1,ii,Sv),s.dk=function(n){return X(n,92)},s.ek=function(n){return le(pme,Nn,92,n,0,1)},v(Jn,"EcorePackageImpl/37",1235),m(1236,1,ii,oC),s.dk=function(n){return X(n,588)},s.ek=function(n){return le(o7e,Nn,588,n,0,1)},v(Jn,"EcorePackageImpl/38",1236),m(1237,1,ii,y1),s.dk=function(n){return!1},s.ek=function(n){return le(x7e,Nn,2175,n,0,1)},v(Jn,"EcorePackageImpl/39",1237),m(1202,1,ii,X5),s.dk=function(n){return X(n,88)},s.ek=function(n){return le(vf,Nn,29,n,0,1)},v(Jn,"EcorePackageImpl/4",1202),m(1238,1,ii,V6),s.dk=function(n){return X(n,191)},s.ek=function(n){return le(lp,Ae,191,n,0,1)},v(Jn,"EcorePackageImpl/40",1238),m(1239,1,ii,Bh),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(Jn,"EcorePackageImpl/41",1239),m(1240,1,ii,sC),s.dk=function(n){return X(n,585)},s.ek=function(n){return le(F8e,Nn,585,n,0,1)},v(Jn,"EcorePackageImpl/42",1240),m(1241,1,ii,Uk),s.dk=function(n){return!1},s.ek=function(n){return le(A7e,Ae,2176,n,0,1)},v(Jn,"EcorePackageImpl/43",1241),m(1242,1,ii,DL),s.dk=function(n){return X(n,45)},s.ek=function(n){return le(yg,tF,45,n,0,1)},v(Jn,"EcorePackageImpl/44",1242),m(1203,1,ii,Xk),s.dk=function(n){return X(n,143)},s.ek=function(n){return le(Ma,Nn,143,n,0,1)},v(Jn,"EcorePackageImpl/5",1203),m(1204,1,ii,Kk),s.dk=function(n){return X(n,159)},s.ek=function(n){return le(zce,Nn,159,n,0,1)},v(Jn,"EcorePackageImpl/6",1204),m(1205,1,ii,Zp),s.dk=function(n){return X(n,459)},s.ek=function(n){return le(xG,Nn,675,n,0,1)},v(Jn,"EcorePackageImpl/7",1205),m(1206,1,ii,nf),s.dk=function(n){return X(n,568)},s.ek=function(n){return le(ed,Nn,684,n,0,1)},v(Jn,"EcorePackageImpl/8",1206),m(1207,1,ii,e2),s.dk=function(n){return X(n,469)},s.ek=function(n){return le(cA,Nn,469,n,0,1)},v(Jn,"EcorePackageImpl/9",1207),m(1019,2042,BZe,tAe),s.Ki=function(n,t){ljn(this,u(t,415))},s.Oi=function(n,t){cqe(this,n,u(t,415))},v(Jn,"MinimalEObjectImpl/1ArrayDelegatingAdapterList",1019),m(1020,151,zN,kDe),s.hj=function(){return this.a.a},v(Jn,"MinimalEObjectImpl/1ArrayDelegatingAdapterList/1",1020),m(1047,1046,{},ITe),v("org.eclipse.emf.ecore.plugin","EcorePlugin",1047);var o7e=Gi(den,"Resource");m(786,1485,ben),s.Fl=function(n){},s.Gl=function(n){},s.Cl=function(){return!this.a&&(this.a=new dX(this)),this.a},s.Dl=function(n){var t,i,r,c,o;if(r=n.length,r>0)if(Wn(0,n.length),n.charCodeAt(0)==47){for(o=new xo(4),c=1,t=1;t0&&(n=(Qr(0,i,n.length),n.substr(0,i))));return vTn(this,n)},s.El=function(){return this.c},s.Ib=function(){var n;return Pb(this.Pm)+"@"+(n=Ni(this)>>>0,n.toString(16))+" uri='"+this.d+"'"},s.b=!1,v(Pne,"ResourceImpl",786),m(1486,786,ben,GSe),v(Pne,"BinaryResourceImpl",1486),m(1159,697,One),s._i=function(n){return X(n,57)?Y5n(this,u(n,57)):X(n,588)?new st(u(n,588).Cl()):ue(n)===ue(this.f)?u(n,18).Jc():(A9(),tD.a)},s.Ob=function(){return Z0e(this)},s.a=!1,v(Ri,"EcoreUtil/ContentTreeIterator",1159),m(1487,1159,One,QIe),s._i=function(n){return ue(n)===ue(this.f)?u(n,16).Jc():new WLe(u(n,57))},v(Pne,"ResourceImpl/5",1487),m(647,2054,ten,dX),s.Gc=function(n){return this.i<=4?y8(this,n):X(n,52)&&u(n,52).Gh()==this.a},s.Ki=function(n,t){n==this.i-1&&(this.a.b||(this.a.b=!0))},s.Mi=function(n,t){n==0?this.a.b||(this.a.b=!0):gY(this,n,t)},s.Oi=function(n,t){},s.Pi=function(n,t,i){},s.Jj=function(){return 2},s.hj=function(){return this.a},s.Kj=function(){return!0},s.Lj=function(n,t){var i;return i=u(n,52),t=i.ci(this.a,t),t},s.Mj=function(n,t){var i;return i=u(n,52),i.ci(null,t)},s.Nj=function(){return!1},s.Qi=function(){return!0},s.$i=function(n){return le(vb,Nn,57,n,0,1)},s.Wi=function(){return!1},v(Pne,"ResourceImpl/ContentsEList",647),m(953,2024,B8,qSe),s.dd=function(n){return this.a.Ii(n)},s.gc=function(){return this.a.gc()},v(Ri,"AbstractSequentialInternalEList/1",953);var s7e,l7e,nc,f7e;m(625,1,{},eIe);var MG,CG;v(Ri,"BasicExtendedMetaData",625),m(1150,1,{},WCe),s.Hl=function(){return null},s.Il=function(){return this.a==-2&&qC(this,xMn(this.d,this.b)),this.a},s.Jl=function(){return null},s.Kl=function(){return En(),En(),Sc},s.ve=function(){return this.c==f7&&oX(this,MJe(this.d,this.b)),this.c},s.Ll=function(){return 0},s.a=-2,s.c=f7,v(Ri,"BasicExtendedMetaData/EClassExtendedMetaDataImpl",1150),m(1151,1,{},TLe),s.Hl=function(){return this.a==(J9(),MG)&&TP(this,lDn(this.f,this.b)),this.a},s.Il=function(){return 0},s.Jl=function(){return this.c==(J9(),MG)&&u9(this,fDn(this.f,this.b)),this.c},s.Kl=function(){return!this.d&&lX(this,X_n(this.f,this.b)),this.d},s.ve=function(){return this.e==f7&&XC(this,MJe(this.f,this.b)),this.e},s.Ll=function(){return this.g==-2&&d(this,UAn(this.f,this.b)),this.g},s.e=f7,s.g=-2,v(Ri,"BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl",1151),m(1149,1,{},ZCe),s.b=!1,s.c=!1,v(Ri,"BasicExtendedMetaData/EPackageExtendedMetaDataImpl",1149),m(1152,1,{},OLe),s.c=-2,s.e=f7,s.f=f7,v(Ri,"BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl",1152),m(581,623,au,nR),s.Jj=function(){return this.c},s.ml=function(){return!1},s.Ui=function(n,t){return t},s.c=0,v(Ri,"EDataTypeEList",581);var a7e=Gi(Ri,"FeatureMap");m(76,581,{3:1,4:1,20:1,31:1,56:1,18:1,16:1,59:1,71:1,67:1,61:1,77:1,163:1,219:1,1998:1,72:1,98:1},tr),s._c=function(n,t){ONn(this,n,u(t,75))},s.Ec=function(n){return XOn(this,u(n,75))},s.Fi=function(n){q3n(this,u(n,75))},s.Lj=function(n,t){return j2n(this,u(n,75),t)},s.Mj=function(n,t){return qle(this,u(n,75),t)},s.Ri=function(n,t){return e_n(this,n,t)},s.Ui=function(n,t){return JPn(this,n,u(t,75))},s.fd=function(n,t){return gIn(this,n,u(t,75))},s.Sj=function(n,t){return E2n(this,u(n,75),t)},s.Tj=function(n,t){return MNe(this,u(n,75),t)},s.Uj=function(n,t,i){return LAn(this,u(n,75),u(t,75),i)},s.Xi=function(n,t){return oW(this,n,u(t,75))},s.Ml=function(n,t){return Xbe(this,n,t)},s.ad=function(n,t){var i,r,c,o,l,f,h,b,p;for(b=new _w(t.gc()),c=t.Jc();c.Ob();)if(r=u(c.Pb(),75),o=r.Jk(),J1(this.e,o))(!o.Qi()||!qR(this,o,r.kd())&&!y8(b,r))&&Et(b,r);else{for(p=Po(this.e.Ah(),o),i=u(this.g,122),l=!0,f=0;f=0;)if(t=n[this.c],this.k.$l(t.Jk()))return this.j=this.f?t:t.kd(),this.i=-2,!0;return this.i=-1,this.g=-1,!1},v(Ri,"BasicFeatureMap/FeatureEIterator",412),m(666,412,Wh,SK),s.sl=function(){return!0},v(Ri,"BasicFeatureMap/ResolvingFeatureEIterator",666),m(951,482,YF,UTe),s.nj=function(){return this},v(Ri,"EContentsEList/1",951),m(952,482,YF,pTe),s.sl=function(){return!1},v(Ri,"EContentsEList/2",952),m(950,287,QF,XTe),s.ul=function(n){},s.Ob=function(){return!1},s.Sb=function(){return!1},v(Ri,"EContentsEList/FeatureIteratorImpl/1",950),m(824,581,au,Zse),s.Li=function(){this.a=!0},s.Oj=function(){return this.a},s.Ek=function(){var n;kt(this),Fs(this.e)?(n=this.a,this.a=!1,hi(this.e,new Lf(this.e,2,this.c,n,!1))):this.a=!1},s.a=!1,v(Ri,"EDataTypeEList/Unsettable",824),m(1920,581,au,ZTe),s.Qi=function(){return!0},v(Ri,"EDataTypeUniqueEList",1920),m(1921,824,au,eOe),s.Qi=function(){return!0},v(Ri,"EDataTypeUniqueEList/Unsettable",1921),m(145,81,au,rs),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectContainmentEList/Resolving",145),m(1153,543,au,WTe),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectContainmentEList/Unsettable/Resolving",1153),m(753,14,au,Rle),s.Li=function(){this.a=!0},s.Oj=function(){return this.a},s.Ek=function(){var n;kt(this),Fs(this.e)?(n=this.a,this.a=!1,hi(this.e,new Lf(this.e,2,this.c,n,!1))):this.a=!1},s.a=!1,v(Ri,"EObjectContainmentWithInverseEList/Unsettable",753),m(1187,753,au,bNe),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectContainmentWithInverseEList/Unsettable/Resolving",1187),m(745,491,au,Wse),s.Li=function(){this.a=!0},s.Oj=function(){return this.a},s.Ek=function(){var n;kt(this),Fs(this.e)?(n=this.a,this.a=!1,hi(this.e,new Lf(this.e,2,this.c,n,!1))):this.a=!1},s.a=!1,v(Ri,"EObjectEList/Unsettable",745),m(339,491,au,Jv),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectResolvingEList",339),m(1825,745,au,nOe),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectResolvingEList/Unsettable",1825),m(1488,1,{},K5);var nhn;v(Ri,"EObjectValidator",1488),m(547,491,au,yR),s.gl=function(){return this.d},s.hl=function(){return this.b},s.Kj=function(){return!0},s.kl=function(){return!0},s.b=0,v(Ri,"EObjectWithInverseEList",547),m(1190,547,au,gNe),s.jl=function(){return!0},v(Ri,"EObjectWithInverseEList/ManyInverse",1190),m(626,547,au,qK),s.Li=function(){this.a=!0},s.Oj=function(){return this.a},s.Ek=function(){var n;kt(this),Fs(this.e)?(n=this.a,this.a=!1,hi(this.e,new Lf(this.e,2,this.c,n,!1))):this.a=!1},s.a=!1,v(Ri,"EObjectWithInverseEList/Unsettable",626),m(1189,626,au,wNe),s.jl=function(){return!0},v(Ri,"EObjectWithInverseEList/Unsettable/ManyInverse",1189),m(754,547,au,Ble),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectWithInverseResolvingEList",754),m(33,754,au,In),s.jl=function(){return!0},v(Ri,"EObjectWithInverseResolvingEList/ManyInverse",33),m(755,626,au,zle),s.ll=function(){return!0},s.Ui=function(n,t){return oy(this,n,u(t,57))},v(Ri,"EObjectWithInverseResolvingEList/Unsettable",755),m(1188,755,au,pNe),s.jl=function(){return!0},v(Ri,"EObjectWithInverseResolvingEList/Unsettable/ManyInverse",1188),m(1154,623,au),s.Ji=function(){return(this.b&1792)==0},s.Li=function(){this.b|=1},s.il=function(){return(this.b&4)!=0},s.Kj=function(){return(this.b&40)!=0},s.jl=function(){return(this.b&16)!=0},s.kl=function(){return(this.b&8)!=0},s.ll=function(){return(this.b&V0)!=0},s.$k=function(){return(this.b&32)!=0},s.ml=function(){return(this.b&Gf)!=0},s.dk=function(n){return this.d?cPe(this.d,n):this.Jk().Fk().dk(n)},s.Oj=function(){return(this.b&2)!=0?(this.b&1)!=0:this.i!=0},s.Qi=function(){return(this.b&128)!=0},s.Ek=function(){var n;kt(this),(this.b&2)!=0&&(Fs(this.e)?(n=(this.b&1)!=0,this.b&=-2,f9(this,new Lf(this.e,2,Ji(this.e.Ah(),this.Jk()),n,!1))):this.b&=-2)},s.Wi=function(){return(this.b&1536)==0},s.b=0,v(Ri,"EcoreEList/Generic",1154),m(1155,1154,au,f_e),s.Jk=function(){return this.a},v(Ri,"EcoreEList/Dynamic",1155),m(752,67,Th,uoe),s.$i=function(n){return dO(this.a.a,n)},v(Ri,"EcoreEMap/1",752),m(751,81,au,Lfe),s.Ki=function(n,t){az(this.b,u(t,136))},s.Mi=function(n,t){aze(this.b)},s.Ni=function(n,t,i){var r;++(r=this.b,u(t,136),r).e},s.Oi=function(n,t){wQ(this.b,u(t,136))},s.Pi=function(n,t,i){wQ(this.b,u(i,136)),ue(i)===ue(t)&&u(i,136).zi(ywn(u(t,136).jd())),az(this.b,u(t,136))},v(Ri,"EcoreEMap/DelegateEObjectContainmentEList",751),m(1185,142,tme,jBe),v(Ri,"EcoreEMap/Unsettable",1185),m(1186,751,au,mNe),s.Li=function(){this.a=!0},s.Oj=function(){return this.a},s.Ek=function(){var n;kt(this),Fs(this.e)?(n=this.a,this.a=!1,hi(this.e,new Lf(this.e,2,this.c,n,!1))):this.a=!1},s.a=!1,v(Ri,"EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList",1186),m(1158,223,v3,dDe),s.a=!1,s.b=!1,v(Ri,"EcoreUtil/Copier",1158),m(747,1,Fr,WLe),s.Nb=function(n){Zr(this,n)},s.Ob=function(){return hJe(this)},s.Pb=function(){var n;return hJe(this),n=this.b,this.b=null,n},s.Qb=function(){this.a.Qb()},v(Ri,"EcoreUtil/ProperContentIterator",747),m(1489,1488,{},FU);var thn;v(Ri,"EcoreValidator",1489);var ihn;Gi(Ri,"FeatureMapUtil/Validator"),m(1258,1,{2003:1},hw),s.$l=function(n){return!0},v(Ri,"FeatureMapUtil/1",1258),m(760,1,{2003:1},Age),s.$l=function(n){var t;return this.c==n?!0:(t=ze(zn(this.a,n)),t==null?gDn(this,n)?(XPe(this.a,n,($n(),d7)),!0):(XPe(this.a,n,($n(),ib)),!1):t==($n(),d7))},s.e=!1;var Gce;v(Ri,"FeatureMapUtil/BasicValidator",760),m(761,44,v3,Vse),v(Ri,"FeatureMapUtil/BasicValidator/Cache",761),m(495,56,{20:1,31:1,56:1,18:1,16:1,61:1,77:1,72:1,98:1},vT),s._c=function(n,t){eXe(this.c,this.b,n,t)},s.Ec=function(n){return Xbe(this.c,this.b,n)},s.ad=function(n,t){return _Ln(this.c,this.b,n,t)},s.Fc=function(n){return Yj(this,n)},s.Ei=function(n,t){y8n(this.c,this.b,n,t)},s.Uk=function(n,t){return Bbe(this.c,this.b,n,t)},s.Yi=function(n){return Kz(this.c,this.b,n,!1)},s.Gi=function(){return ATe(this.c,this.b)},s.Hi=function(){return hwn(this.c,this.b)},s.Ii=function(n){return j9n(this.c,this.b,n)},s.Vk=function(n,t){return QOe(this,n,t)},s.$b=function(){u4(this)},s.Gc=function(n){return qR(this.c,this.b,n)},s.Hc=function(n){return k7n(this.c,this.b,n)},s.Xb=function(n){return Kz(this.c,this.b,n,!0)},s.Dk=function(n){return this},s.bd=function(n){return I6n(this.c,this.b,n)},s.dc=function(){return T$(this)},s.Oj=function(){return!IO(this.c,this.b)},s.Jc=function(){return r8n(this.c,this.b)},s.cd=function(){return c8n(this.c,this.b)},s.dd=function(n){return Ajn(this.c,this.b,n)},s.Ri=function(n,t){return pKe(this.c,this.b,n,t)},s.Si=function(n,t){A9n(this.c,this.b,n,t)},s.ed=function(n){return GGe(this.c,this.b,n)},s.Kc=function(n){return BDn(this.c,this.b,n)},s.fd=function(n,t){return AKe(this.c,this.b,n,t)},s.Wb=function(n){Tz(this.c,this.b),Yj(this,u(n,16))},s.gc=function(){return Mjn(this.c,this.b)},s.Nc=function(){return Dyn(this.c,this.b)},s.Oc=function(n){return D6n(this.c,this.b,n)},s.Ib=function(){var n,t;for(t=new vd,t.a+="[",n=ATe(this.c,this.b);uQ(n);)Bc(t,Wj(lz(n))),uQ(n)&&(t.a+=To);return t.a+="]",t.a},s.Ek=function(){Tz(this.c,this.b)},v(Ri,"FeatureMapUtil/FeatureEList",495),m(634,39,zN,cY),s.fj=function(n){return $E(this,n)},s.kj=function(n){var t,i,r,c,o,l,f;switch(this.d){case 1:case 2:{if(o=n.hj(),ue(o)===ue(this.c)&&$E(this,null)==n.fj(null))return this.g=n.gj(),n.ej()==1&&(this.d=1),!0;break}case 3:{switch(c=n.ej(),c){case 3:{if(o=n.hj(),ue(o)===ue(this.c)&&$E(this,null)==n.fj(null))return this.d=5,t=new _w(2),Et(t,this.g),Et(t,n.gj()),this.g=t,!0;break}}break}case 5:{switch(c=n.ej(),c){case 3:{if(o=n.hj(),ue(o)===ue(this.c)&&$E(this,null)==n.fj(null))return i=u(this.g,18),i.Ec(n.gj()),!0;break}}break}case 4:{switch(c=n.ej(),c){case 3:{if(o=n.hj(),ue(o)===ue(this.c)&&$E(this,null)==n.fj(null))return this.d=1,this.g=n.gj(),!0;break}case 4:{if(o=n.hj(),ue(o)===ue(this.c)&&$E(this,null)==n.fj(null))return this.d=6,f=new _w(2),Et(f,this.n),Et(f,n.ij()),this.n=f,l=F(z($t,1),ni,30,15,[this.o,n.jj()]),this.g=l,!0;break}}break}case 6:{switch(c=n.ej(),c){case 4:{if(o=n.hj(),ue(o)===ue(this.c)&&$E(this,null)==n.fj(null))return i=u(this.n,18),i.Ec(n.ij()),l=u(this.g,54),r=le($t,ni,30,l.length+1,15,1),Wu(l,0,r,0,l.length),r[l.length]=n.jj(),this.g=r,!0;break}}break}}return!1},v(Ri,"FeatureMapUtil/FeatureENotificationImpl",634),m(553,495,{20:1,31:1,56:1,18:1,16:1,61:1,77:1,163:1,219:1,1998:1,72:1,98:1},uR),s.Ml=function(n,t){return Xbe(this.c,n,t)},s.Nl=function(n,t,i){return Bbe(this.c,n,t,i)},s.Ol=function(n,t,i){return bge(this.c,n,t,i)},s.Pl=function(){return this},s.Ql=function(n,t){return cN(this.c,n,t)},s.Rl=function(n){return u(Kz(this.c,this.b,n,!1),75).Jk()},s.Sl=function(n){return u(Kz(this.c,this.b,n,!1),75).kd()},s.Tl=function(){return this.a},s.Ul=function(n){return!IO(this.c,n)},s.Vl=function(n,t){Vz(this.c,n,t)},s.Wl=function(n){return OBe(this.c,n)},s.Xl=function(n){aHe(this.c,n)},v(Ri,"FeatureMapUtil/FeatureFeatureMap",553),m(1257,1,Lne,tTe),s.Dk=function(n){return Kz(this.b,this.a,-1,n)},s.Oj=function(){return!IO(this.b,this.a)},s.Wb=function(n){Vz(this.b,this.a,n)},s.Ek=function(){Tz(this.b,this.a)},v(Ri,"FeatureMapUtil/FeatureValue",1257);var Wy,qce,Uce,Zy,rhn,rD=Gi(cJ,"AnyType");m(670,63,H1,TX),v(cJ,"InvalidDatatypeValueException",670);var TG=Gi(cJ,wen),cD=Gi(cJ,pen),h7e=Gi(cJ,men),chn,Bu,d7e,Pg,uhn,ohn,shn,lhn,fhn,ahn,hhn,dhn,bhn,ghn,whn,r5,phn,c5,fA,mhn,xp,uD,oD,vhn,aA,hA;m(828,501,{109:1,94:1,93:1,57:1,52:1,100:1,841:1},koe),s.Ih=function(n,t,i){switch(n){case 0:return i?(!this.c&&(this.c=new tr(this,0)),this.c):(!this.c&&(this.c=new tr(this,0)),this.c.b);case 1:return i?(!this.c&&(this.c=new tr(this,0)),u(fo(this.c,(Si(),Pg)),163)):(!this.c&&(this.c=new tr(this,0)),u(u(fo(this.c,(Si(),Pg)),163),219)).Tl();case 2:return i?(!this.b&&(this.b=new tr(this,2)),this.b):(!this.b&&(this.b=new tr(this,2)),this.b.b)}return Pl(this,n-dt(this.fi()),Cn((this.j&2)==0?this.fi():(!this.k&&(this.k=new nl),this.k).Lk(),n),t,i)},s.Rh=function(n,t,i){var r;switch(t){case 0:return!this.c&&(this.c=new tr(this,0)),tN(this.c,n,i);case 1:return(!this.c&&(this.c=new tr(this,0)),u(u(fo(this.c,(Si(),Pg)),163),72)).Vk(n,i);case 2:return!this.b&&(this.b=new tr(this,2)),tN(this.b,n,i)}return r=u(Cn((this.j&2)==0?this.fi():(!this.k&&(this.k=new nl),this.k).Lk(),t),69),r.uk().yk(this,khe(this),t-dt(this.fi()),n,i)},s.Th=function(n){switch(n){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new tr(this,0)),u(fo(this.c,(Si(),Pg)),163)).dc();case 2:return!!this.b&&this.b.i!=0}return Ll(this,n-dt(this.fi()),Cn((this.j&2)==0?this.fi():(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.$h=function(n,t){switch(n){case 0:!this.c&&(this.c=new tr(this,0)),BT(this.c,t);return;case 1:(!this.c&&(this.c=new tr(this,0)),u(u(fo(this.c,(Si(),Pg)),163),219)).Wb(t);return;case 2:!this.b&&(this.b=new tr(this,2)),BT(this.b,t);return}Jl(this,n-dt(this.fi()),Cn((this.j&2)==0?this.fi():(!this.k&&(this.k=new nl),this.k).Lk(),n),t)},s.fi=function(){return Si(),d7e},s.hi=function(n){switch(n){case 0:!this.c&&(this.c=new tr(this,0)),kt(this.c);return;case 1:(!this.c&&(this.c=new tr(this,0)),u(fo(this.c,(Si(),Pg)),163)).$b();return;case 2:!this.b&&(this.b=new tr(this,2)),kt(this.b);return}Fl(this,n-dt(this.fi()),Cn((this.j&2)==0?this.fi():(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.Ib=function(){var n;return(this.j&4)!=0?Ff(this):(n=new cf(Ff(this)),n.a+=" (mixed: ",Uj(n,this.c),n.a+=", anyAttribute: ",Uj(n,this.b),n.a+=")",n.a)},v(kr,"AnyTypeImpl",828),m(671,501,{109:1,94:1,93:1,57:1,52:1,100:1,2081:1,671:1},pU),s.Ih=function(n,t,i){switch(n){case 0:return this.a;case 1:return this.b}return Pl(this,n-dt((Si(),r5)),Cn((this.j&2)==0?r5:(!this.k&&(this.k=new nl),this.k).Lk(),n),t,i)},s.Th=function(n){switch(n){case 0:return this.a!=null;case 1:return this.b!=null}return Ll(this,n-dt((Si(),r5)),Cn((this.j&2)==0?r5:(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.$h=function(n,t){switch(n){case 0:T(this,Pt(t));return;case 1:Q(this,Pt(t));return}Jl(this,n-dt((Si(),r5)),Cn((this.j&2)==0?r5:(!this.k&&(this.k=new nl),this.k).Lk(),n),t)},s.fi=function(){return Si(),r5},s.hi=function(n){switch(n){case 0:this.a=null;return;case 1:this.b=null;return}Fl(this,n-dt((Si(),r5)),Cn((this.j&2)==0?r5:(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.Ib=function(){var n;return(this.j&4)!=0?Ff(this):(n=new cf(Ff(this)),n.a+=" (data: ",Bc(n,this.a),n.a+=", target: ",Bc(n,this.b),n.a+=")",n.a)},s.a=null,s.b=null,v(kr,"ProcessingInstructionImpl",671),m(672,828,{109:1,94:1,93:1,57:1,52:1,100:1,841:1,2082:1,672:1},Dxe),s.Ih=function(n,t,i){switch(n){case 0:return i?(!this.c&&(this.c=new tr(this,0)),this.c):(!this.c&&(this.c=new tr(this,0)),this.c.b);case 1:return i?(!this.c&&(this.c=new tr(this,0)),u(fo(this.c,(Si(),Pg)),163)):(!this.c&&(this.c=new tr(this,0)),u(u(fo(this.c,(Si(),Pg)),163),219)).Tl();case 2:return i?(!this.b&&(this.b=new tr(this,2)),this.b):(!this.b&&(this.b=new tr(this,2)),this.b.b);case 3:return!this.c&&(this.c=new tr(this,0)),Pt(cN(this.c,(Si(),fA),!0));case 4:return Jle(this.a,(!this.c&&(this.c=new tr(this,0)),Pt(cN(this.c,(Si(),fA),!0))));case 5:return this.a}return Pl(this,n-dt((Si(),c5)),Cn((this.j&2)==0?c5:(!this.k&&(this.k=new nl),this.k).Lk(),n),t,i)},s.Th=function(n){switch(n){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new tr(this,0)),u(fo(this.c,(Si(),Pg)),163)).dc();case 2:return!!this.b&&this.b.i!=0;case 3:return!this.c&&(this.c=new tr(this,0)),Pt(cN(this.c,(Si(),fA),!0))!=null;case 4:return Jle(this.a,(!this.c&&(this.c=new tr(this,0)),Pt(cN(this.c,(Si(),fA),!0))))!=null;case 5:return!!this.a}return Ll(this,n-dt((Si(),c5)),Cn((this.j&2)==0?c5:(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.$h=function(n,t){switch(n){case 0:!this.c&&(this.c=new tr(this,0)),BT(this.c,t);return;case 1:(!this.c&&(this.c=new tr(this,0)),u(u(fo(this.c,(Si(),Pg)),163),219)).Wb(t);return;case 2:!this.b&&(this.b=new tr(this,2)),BT(this.b,t);return;case 3:Tae(this,Pt(t));return;case 4:Tae(this,Fle(this.a,t));return;case 5:I(this,u(t,159));return}Jl(this,n-dt((Si(),c5)),Cn((this.j&2)==0?c5:(!this.k&&(this.k=new nl),this.k).Lk(),n),t)},s.fi=function(){return Si(),c5},s.hi=function(n){switch(n){case 0:!this.c&&(this.c=new tr(this,0)),kt(this.c);return;case 1:(!this.c&&(this.c=new tr(this,0)),u(fo(this.c,(Si(),Pg)),163)).$b();return;case 2:!this.b&&(this.b=new tr(this,2)),kt(this.b);return;case 3:!this.c&&(this.c=new tr(this,0)),Vz(this.c,(Si(),fA),null);return;case 4:Tae(this,Fle(this.a,null));return;case 5:this.a=null;return}Fl(this,n-dt((Si(),c5)),Cn((this.j&2)==0?c5:(!this.k&&(this.k=new nl),this.k).Lk(),n))},v(kr,"SimpleAnyTypeImpl",672),m(673,501,{109:1,94:1,93:1,57:1,52:1,100:1,2083:1,673:1},_xe),s.Ih=function(n,t,i){switch(n){case 0:return i?(!this.a&&(this.a=new tr(this,0)),this.a):(!this.a&&(this.a=new tr(this,0)),this.a.b);case 1:return i?(!this.b&&(this.b=new os((jn(),Ac),Du,this,1)),this.b):(!this.b&&(this.b=new os((jn(),Ac),Du,this,1)),nO(this.b));case 2:return i?(!this.c&&(this.c=new os((jn(),Ac),Du,this,2)),this.c):(!this.c&&(this.c=new os((jn(),Ac),Du,this,2)),nO(this.c));case 3:return!this.a&&(this.a=new tr(this,0)),fo(this.a,(Si(),uD));case 4:return!this.a&&(this.a=new tr(this,0)),fo(this.a,(Si(),oD));case 5:return!this.a&&(this.a=new tr(this,0)),fo(this.a,(Si(),aA));case 6:return!this.a&&(this.a=new tr(this,0)),fo(this.a,(Si(),hA))}return Pl(this,n-dt((Si(),xp)),Cn((this.j&2)==0?xp:(!this.k&&(this.k=new nl),this.k).Lk(),n),t,i)},s.Rh=function(n,t,i){var r;switch(t){case 0:return!this.a&&(this.a=new tr(this,0)),tN(this.a,n,i);case 1:return!this.b&&(this.b=new os((jn(),Ac),Du,this,1)),K$(this.b,n,i);case 2:return!this.c&&(this.c=new os((jn(),Ac),Du,this,2)),K$(this.c,n,i);case 5:return!this.a&&(this.a=new tr(this,0)),QOe(fo(this.a,(Si(),aA)),n,i)}return r=u(Cn((this.j&2)==0?(Si(),xp):(!this.k&&(this.k=new nl),this.k).Lk(),t),69),r.uk().yk(this,khe(this),t-dt((Si(),xp)),n,i)},s.Th=function(n){switch(n){case 0:return!!this.a&&this.a.i!=0;case 1:return!!this.b&&this.b.f!=0;case 2:return!!this.c&&this.c.f!=0;case 3:return!this.a&&(this.a=new tr(this,0)),!T$(fo(this.a,(Si(),uD)));case 4:return!this.a&&(this.a=new tr(this,0)),!T$(fo(this.a,(Si(),oD)));case 5:return!this.a&&(this.a=new tr(this,0)),!T$(fo(this.a,(Si(),aA)));case 6:return!this.a&&(this.a=new tr(this,0)),!T$(fo(this.a,(Si(),hA)))}return Ll(this,n-dt((Si(),xp)),Cn((this.j&2)==0?xp:(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.$h=function(n,t){switch(n){case 0:!this.a&&(this.a=new tr(this,0)),BT(this.a,t);return;case 1:!this.b&&(this.b=new os((jn(),Ac),Du,this,1)),NB(this.b,t);return;case 2:!this.c&&(this.c=new os((jn(),Ac),Du,this,2)),NB(this.c,t);return;case 3:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),uD))),!this.a&&(this.a=new tr(this,0)),Yj(fo(this.a,uD),u(t,18));return;case 4:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),oD))),!this.a&&(this.a=new tr(this,0)),Yj(fo(this.a,oD),u(t,18));return;case 5:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),aA))),!this.a&&(this.a=new tr(this,0)),Yj(fo(this.a,aA),u(t,18));return;case 6:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),hA))),!this.a&&(this.a=new tr(this,0)),Yj(fo(this.a,hA),u(t,18));return}Jl(this,n-dt((Si(),xp)),Cn((this.j&2)==0?xp:(!this.k&&(this.k=new nl),this.k).Lk(),n),t)},s.fi=function(){return Si(),xp},s.hi=function(n){switch(n){case 0:!this.a&&(this.a=new tr(this,0)),kt(this.a);return;case 1:!this.b&&(this.b=new os((jn(),Ac),Du,this,1)),this.b.c.$b();return;case 2:!this.c&&(this.c=new os((jn(),Ac),Du,this,2)),this.c.c.$b();return;case 3:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),uD)));return;case 4:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),oD)));return;case 5:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),aA)));return;case 6:!this.a&&(this.a=new tr(this,0)),u4(fo(this.a,(Si(),hA)));return}Fl(this,n-dt((Si(),xp)),Cn((this.j&2)==0?xp:(!this.k&&(this.k=new nl),this.k).Lk(),n))},s.Ib=function(){var n;return(this.j&4)!=0?Ff(this):(n=new cf(Ff(this)),n.a+=" (mixed: ",Uj(n,this.a),n.a+=")",n.a)},v(kr,"XMLTypeDocumentRootImpl",673),m(1990,710,{109:1,94:1,93:1,469:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1,2084:1},lC),s.oi=function(n,t){switch(n.fk()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return t==null?null:fu(t);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return Pt(t);case 6:return Fpn(u(t,195));case 12:case 47:case 49:case 11:return fVe(this,n,t);case 13:return t==null?null:zLn(u(t,247));case 15:case 14:return t==null?null:L3n(ne(re(t)));case 17:return eGe((Si(),t));case 18:return eGe(t);case 21:case 20:return t==null?null:P3n(u(t,164).a);case 27:return zpn(u(t,195));case 30:return hHe((Si(),u(t,16)));case 31:return hHe(u(t,16));case 40:return Bpn((Si(),t));case 42:return nGe((Si(),t));case 43:return nGe(t);case 59:case 48:return Rpn((Si(),t));default:throw R(new Un(u7+n.ve()+up))}},s.pi=function(n){var t,i,r,c,o;switch(n.G==-1&&(n.G=(i=ol(n),i?$d(i.si(),n):-1)),n.G){case 0:return t=new koe,t;case 1:return r=new pU,r;case 2:return c=new Dxe,c;case 3:return o=new _xe,o;default:throw R(new Un(vne+n.zb+up))}},s.qi=function(n,t){var i,r,c,o,l,f,h,b,p,y,S,A,O,D,B,q;switch(n.fk()){case 5:case 52:case 4:return t;case 6:return rSn(t);case 8:case 7:return t==null?null:JAn(t);case 9:return t==null?null:fO(al((r=bo(t,!0),r.length>0&&(Wn(0,r.length),r.charCodeAt(0)==43)?(Wn(1,r.length+1),r.substr(1)):r),-128,127)<<24>>24);case 10:return t==null?null:fO(al((c=bo(t,!0),c.length>0&&(Wn(0,c.length),c.charCodeAt(0)==43)?(Wn(1,c.length+1),c.substr(1)):c),-128,127)<<24>>24);case 11:return Pt(Qw(this,(Si(),shn),t));case 12:return Pt(Qw(this,(Si(),lhn),t));case 13:return t==null?null:new Joe(bo(t,!0));case 15:case 14:return YOn(t);case 16:return Pt(Qw(this,(Si(),fhn),t));case 17:return bJe((Si(),t));case 18:return bJe(t);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return bo(t,!0);case 21:case 20:return uNn(t);case 22:return Pt(Qw(this,(Si(),ahn),t));case 23:return Pt(Qw(this,(Si(),hhn),t));case 24:return Pt(Qw(this,(Si(),dhn),t));case 25:return Pt(Qw(this,(Si(),bhn),t));case 26:return Pt(Qw(this,(Si(),ghn),t));case 27:return VEn(t);case 30:return gJe((Si(),t));case 31:return gJe(t);case 32:return t==null?null:ve(al((p=bo(t,!0),p.length>0&&(Wn(0,p.length),p.charCodeAt(0)==43)?(Wn(1,p.length+1),p.substr(1)):p),Xr,oi));case 33:return t==null?null:new A0((y=bo(t,!0),y.length>0&&(Wn(0,y.length),y.charCodeAt(0)==43)?(Wn(1,y.length+1),y.substr(1)):y));case 34:return t==null?null:ve(al((S=bo(t,!0),S.length>0&&(Wn(0,S.length),S.charCodeAt(0)==43)?(Wn(1,S.length+1),S.substr(1)):S),Xr,oi));case 36:return t==null?null:q2(Zz((A=bo(t,!0),A.length>0&&(Wn(0,A.length),A.charCodeAt(0)==43)?(Wn(1,A.length+1),A.substr(1)):A)));case 37:return t==null?null:q2(Zz((O=bo(t,!0),O.length>0&&(Wn(0,O.length),O.charCodeAt(0)==43)?(Wn(1,O.length+1),O.substr(1)):O)));case 40:return qSn((Si(),t));case 42:return wJe((Si(),t));case 43:return wJe(t);case 44:return t==null?null:new A0((D=bo(t,!0),D.length>0&&(Wn(0,D.length),D.charCodeAt(0)==43)?(Wn(1,D.length+1),D.substr(1)):D));case 45:return t==null?null:new A0((B=bo(t,!0),B.length>0&&(Wn(0,B.length),B.charCodeAt(0)==43)?(Wn(1,B.length+1),B.substr(1)):B));case 46:return bo(t,!1);case 47:return Pt(Qw(this,(Si(),whn),t));case 59:case 48:return GSn((Si(),t));case 49:return Pt(Qw(this,(Si(),phn),t));case 50:return t==null?null:o8(al((q=bo(t,!0),q.length>0&&(Wn(0,q.length),q.charCodeAt(0)==43)?(Wn(1,q.length+1),q.substr(1)):q),nJ,32767)<<16>>16);case 51:return t==null?null:o8(al((o=bo(t,!0),o.length>0&&(Wn(0,o.length),o.charCodeAt(0)==43)?(Wn(1,o.length+1),o.substr(1)):o),nJ,32767)<<16>>16);case 53:return Pt(Qw(this,(Si(),mhn),t));case 55:return t==null?null:o8(al((l=bo(t,!0),l.length>0&&(Wn(0,l.length),l.charCodeAt(0)==43)?(Wn(1,l.length+1),l.substr(1)):l),nJ,32767)<<16>>16);case 56:return t==null?null:o8(al((f=bo(t,!0),f.length>0&&(Wn(0,f.length),f.charCodeAt(0)==43)?(Wn(1,f.length+1),f.substr(1)):f),nJ,32767)<<16>>16);case 57:return t==null?null:q2(Zz((h=bo(t,!0),h.length>0&&(Wn(0,h.length),h.charCodeAt(0)==43)?(Wn(1,h.length+1),h.substr(1)):h)));case 58:return t==null?null:q2(Zz((b=bo(t,!0),b.length>0&&(Wn(0,b.length),b.charCodeAt(0)==43)?(Wn(1,b.length+1),b.substr(1)):b)));case 60:return t==null?null:ve(al((i=bo(t,!0),i.length>0&&(Wn(0,i.length),i.charCodeAt(0)==43)?(Wn(1,i.length+1),i.substr(1)):i),Xr,oi));case 61:return t==null?null:ve(al(bo(t,!0),Xr,oi));default:throw R(new Un(u7+n.ve()+up))}};var yhn,b7e,khn,g7e;v(kr,"XMLTypeFactoryImpl",1990),m(582,184,{109:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,52:1,100:1,161:1,184:1,117:1,118:1,680:1,2006:1,582:1},ODe),s.N=!1,s.O=!1;var jhn=!1;v(kr,"XMLTypePackageImpl",582),m(1923,1,{835:1},fC),s.Ik=function(){return rge(),Nhn},v(kr,"XMLTypePackageImpl/1",1923),m(1932,1,ii,_L),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/10",1932),m(1933,1,ii,Y6),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/11",1933),m(1934,1,ii,aC),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/12",1934),m(1935,1,ii,k1),s.dk=function(n){return g2(n)},s.ek=function(n){return le(gr,Ae,346,n,7,1)},v(kr,"XMLTypePackageImpl/13",1935),m(1936,1,ii,LL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/14",1936),m(1937,1,ii,zh),s.dk=function(n){return X(n,16)},s.ek=function(n){return le(gl,um,16,n,0,1)},v(kr,"XMLTypePackageImpl/15",1937),m(1938,1,ii,PL),s.dk=function(n){return X(n,16)},s.ek=function(n){return le(gl,um,16,n,0,1)},v(kr,"XMLTypePackageImpl/16",1938),m(1939,1,ii,$L),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/17",1939),m(1940,1,ii,n2),s.dk=function(n){return X(n,164)},s.ek=function(n){return le(b7,Ae,164,n,0,1)},v(kr,"XMLTypePackageImpl/18",1940),m(1941,1,ii,Vk),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/19",1941),m(1924,1,ii,hC),s.dk=function(n){return X(n,841)},s.ek=function(n){return le(rD,Nn,841,n,0,1)},v(kr,"XMLTypePackageImpl/2",1924),m(1942,1,ii,V5),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/20",1942),m(1943,1,ii,RL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/21",1943),m(1944,1,ii,BL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/22",1944),m(1945,1,ii,zL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/23",1945),m(1946,1,ii,FL),s.dk=function(n){return X(n,195)},s.ek=function(n){return le(ds,Ae,195,n,0,2)},v(kr,"XMLTypePackageImpl/24",1946),m(1947,1,ii,Yk),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/25",1947),m(1948,1,ii,dC),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/26",1948),m(1949,1,ii,mU),s.dk=function(n){return X(n,16)},s.ek=function(n){return le(gl,um,16,n,0,1)},v(kr,"XMLTypePackageImpl/27",1949),m(1950,1,ii,vU),s.dk=function(n){return X(n,16)},s.ek=function(n){return le(gl,um,16,n,0,1)},v(kr,"XMLTypePackageImpl/28",1950),m(1951,1,ii,yU),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/29",1951),m(1925,1,ii,JL),s.dk=function(n){return X(n,671)},s.ek=function(n){return le(TG,Nn,2081,n,0,1)},v(kr,"XMLTypePackageImpl/3",1925),m(1952,1,ii,HL),s.dk=function(n){return X(n,15)},s.ek=function(n){return le(jr,Ae,15,n,0,1)},v(kr,"XMLTypePackageImpl/30",1952),m(1953,1,ii,Y5),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/31",1953),m(1954,1,ii,Qk),s.dk=function(n){return X(n,190)},s.ek=function(n){return le(sp,Ae,190,n,0,1)},v(kr,"XMLTypePackageImpl/32",1954),m(1955,1,ii,GL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/33",1955),m(1956,1,ii,qL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/34",1956),m(1957,1,ii,UL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/35",1957),m(1958,1,ii,XL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/36",1958),m(1959,1,ii,KL),s.dk=function(n){return X(n,16)},s.ek=function(n){return le(gl,um,16,n,0,1)},v(kr,"XMLTypePackageImpl/37",1959),m(1960,1,ii,VL),s.dk=function(n){return X(n,16)},s.ek=function(n){return le(gl,um,16,n,0,1)},v(kr,"XMLTypePackageImpl/38",1960),m(1961,1,ii,Wk),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/39",1961),m(1926,1,ii,YL),s.dk=function(n){return X(n,672)},s.ek=function(n){return le(cD,Nn,2082,n,0,1)},v(kr,"XMLTypePackageImpl/4",1926),m(1962,1,ii,QL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/40",1962),m(1963,1,ii,ro),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/41",1963),m(1964,1,ii,bC),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/42",1964),m(1965,1,ii,kU),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/43",1965),m(1966,1,ii,WL),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/44",1966),m(1967,1,ii,jU),s.dk=function(n){return X(n,191)},s.ek=function(n){return le(lp,Ae,191,n,0,1)},v(kr,"XMLTypePackageImpl/45",1967),m(1968,1,ii,EU),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/46",1968),m(1969,1,ii,SU),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/47",1969),m(1970,1,ii,Zk),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/48",1970),m(1971,1,ii,Q5),s.dk=function(n){return X(n,191)},s.ek=function(n){return le(lp,Ae,191,n,0,1)},v(kr,"XMLTypePackageImpl/49",1971),m(1927,1,ii,gC),s.dk=function(n){return X(n,673)},s.ek=function(n){return le(h7e,Nn,2083,n,0,1)},v(kr,"XMLTypePackageImpl/5",1927),m(1972,1,ii,ej),s.dk=function(n){return X(n,190)},s.ek=function(n){return le(sp,Ae,190,n,0,1)},v(kr,"XMLTypePackageImpl/50",1972),m(1973,1,ii,wC),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/51",1973),m(1974,1,ii,t2),s.dk=function(n){return X(n,15)},s.ek=function(n){return le(jr,Ae,15,n,0,1)},v(kr,"XMLTypePackageImpl/52",1974),m(1928,1,ii,Ib),s.dk=function(n){return $r(n)},s.ek=function(n){return le(He,Ae,2,n,6,1)},v(kr,"XMLTypePackageImpl/6",1928),m(1929,1,ii,Q6),s.dk=function(n){return X(n,195)},s.ek=function(n){return le(ds,Ae,195,n,0,2)},v(kr,"XMLTypePackageImpl/7",1929),m(1930,1,ii,xU),s.dk=function(n){return b2(n)},s.ek=function(n){return le(Qi,Ae,473,n,8,1)},v(kr,"XMLTypePackageImpl/8",1930),m(1931,1,ii,ZL),s.dk=function(n){return X(n,221)},s.ek=function(n){return le(jy,Ae,221,n,0,1)},v(kr,"XMLTypePackageImpl/9",1931);var ch,r0,dA,OG,J;m(53,63,H1,Bt),v(Gd,"RegEx/ParseException",53),m(820,1,{},pC),s._l=function(n){return ni*16)throw R(new Bt(Ht((Lt(),TZe))));i=i*16+c}while(!0);if(this.a!=125)throw R(new Bt(Ht((Lt(),OZe))));if(i>a7)throw R(new Bt(Ht((Lt(),NZe))));n=i}else{if(c=0,this.c!=0||(c=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(i=c,fi(this),this.c!=0||(c=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));i=i*16+c,n=i}break;case 117:if(r=0,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));t=t*16+r,n=t;break;case 118:if(fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,fi(this),this.c!=0||(r=og(this.a))<0)throw R(new Bt(Ht((Lt(),Hd))));if(t=t*16+r,t>a7)throw R(new Bt(Ht((Lt(),"parser.descappe.4"))));n=t;break;case 65:case 90:case 122:throw R(new Bt(Ht((Lt(),IZe))))}return n},s.bm=function(n){var t,i;switch(n){case 100:i=(this.e&32)==32?K0("Nd",!0):(ai(),NG);break;case 68:i=(this.e&32)==32?K0("Nd",!1):(ai(),k7e);break;case 119:i=(this.e&32)==32?K0("IsWord",!0):(ai(),Q7);break;case 87:i=(this.e&32)==32?K0("IsWord",!1):(ai(),E7e);break;case 115:i=(this.e&32)==32?K0("IsSpace",!0):(ai(),e6);break;case 83:i=(this.e&32)==32?K0("IsSpace",!1):(ai(),j7e);break;default:throw R(new du((t=n,Ien+t.toString(16))))}return i},s.cm=function(n){var t,i,r,c,o,l,f,h,b,p,y,S;for(this.b=1,fi(this),t=null,this.c==0&&this.a==94?(fi(this),n?p=(ai(),ai(),new cl(5)):(t=(ai(),ai(),new cl(4)),ho(t,0,a7),p=new cl(4))):p=(ai(),ai(),new cl(4)),c=!0;(S=this.c)!=1&&!(S==0&&this.a==93&&!c);){if(c=!1,i=this.a,r=!1,S==10)switch(i){case 100:case 68:case 119:case 87:case 115:case 83:tm(p,this.bm(i)),r=!0;break;case 105:case 73:case 99:case 67:i=this.sm(p,i),i<0&&(r=!0);break;case 112:case 80:if(y=Q0e(this,i),!y)throw R(new Bt(Ht((Lt(),Ine))));tm(p,y),r=!0;break;default:i=this.am()}else if(S==20){if(l=E9(this.i,58,this.d),l<0)throw R(new Bt(Ht((Lt(),Y2e))));if(f=!0,rc(this.i,this.d)==94&&(++this.d,f=!1),o=of(this.i,this.d,l),h=$$e(o,f,(this.e&512)==512),!h)throw R(new Bt(Ht((Lt(),SZe))));if(tm(p,h),r=!0,l+1>=this.j||rc(this.i,l+1)!=93)throw R(new Bt(Ht((Lt(),Y2e))));this.d=l+2}if(fi(this),!r)if(this.c!=0||this.a!=45)ho(p,i,i);else{if(fi(this),(S=this.c)==1)throw R(new Bt(Ht((Lt(),KF))));S==0&&this.a==93?(ho(p,i,i),ho(p,45,45)):(b=this.a,S==10&&(b=this.am()),fi(this),ho(p,i,b))}(this.e&Gf)==Gf&&this.c==0&&this.a==44&&fi(this)}if(this.c==1)throw R(new Bt(Ht((Lt(),KF))));return t&&(bS(t,p),p=t),h3(p),hS(p),this.b=0,fi(this),p},s.dm=function(){var n,t,i,r;for(i=this.cm(!1);(r=this.c)!=7;)if(n=this.a,r==0&&(n==45||n==38)||r==4){if(fi(this),this.c!=9)throw R(new Bt(Ht((Lt(),AZe))));if(t=this.cm(!1),r==4)tm(i,t);else if(n==45)bS(i,t);else if(n==38)uVe(i,t);else throw R(new du("ASSERT"))}else throw R(new Bt(Ht((Lt(),MZe))));return fi(this),i},s.em=function(){var n,t;return n=this.a-48,t=(ai(),ai(),new JV(12,null,n)),!this.g&&(this.g=new RP),$P(this.g,new ooe(n)),fi(this),t},s.fm=function(){return fi(this),ai(),xhn},s.gm=function(){return fi(this),ai(),Shn},s.hm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.im=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.jm=function(){return fi(this),vkn()},s.km=function(){return fi(this),ai(),Mhn},s.lm=function(){return fi(this),ai(),Thn},s.mm=function(){var n;if(this.d>=this.j||((n=rc(this.i,this.d++))&65504)!=64)throw R(new Bt(Ht((Lt(),kZe))));return fi(this),ai(),ai(),new Gh(0,n-64)},s.nm=function(){return fi(this),J_n()},s.om=function(){return fi(this),ai(),Ohn},s.pm=function(){var n;return n=(ai(),ai(),new Gh(0,105)),fi(this),n},s.qm=function(){return fi(this),ai(),Chn},s.rm=function(){return fi(this),ai(),Ahn},s.sm=function(n,t){return this.am()},s.tm=function(){return fi(this),ai(),v7e},s.um=function(){var n,t,i,r,c;if(this.d+1>=this.j)throw R(new Bt(Ht((Lt(),mZe))));if(r=-1,t=null,n=rc(this.i,this.d),49<=n&&n<=57){if(r=n-48,!this.g&&(this.g=new RP),$P(this.g,new ooe(r)),++this.d,rc(this.i,this.d)!=41)throw R(new Bt(Ht((Lt(),mg))));++this.d}else switch(n==63&&--this.d,fi(this),t=Oge(this),t.e){case 20:case 21:case 22:case 23:break;case 8:if(this.c!=7)throw R(new Bt(Ht((Lt(),mg))));break;default:throw R(new Bt(Ht((Lt(),vZe))))}if(fi(this),c=Jw(this),i=null,c.e==2){if(c.Nm()!=2)throw R(new Bt(Ht((Lt(),yZe))));i=c.Jm(1),c=c.Jm(0)}if(this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),ai(),ai(),new CRe(r,t,c,i)},s.vm=function(){return fi(this),ai(),y7e},s.wm=function(){var n;if(fi(this),n=kR(24,Jw(this)),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.xm=function(){var n;if(fi(this),n=kR(20,Jw(this)),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.ym=function(){var n;if(fi(this),n=kR(22,Jw(this)),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.zm=function(){var n,t,i,r,c;for(n=0,i=0,t=-1;this.d=this.j)throw R(new Bt(Ht((Lt(),K2e))));if(t==45){for(++this.d;this.d=this.j)throw R(new Bt(Ht((Lt(),K2e))))}if(t==58){if(++this.d,fi(this),r=gDe(Jw(this),n,i),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));fi(this)}else if(t==41)++this.d,fi(this),r=gDe(Jw(this),n,i);else throw R(new Bt(Ht((Lt(),pZe))));return r},s.Am=function(){var n;if(fi(this),n=kR(21,Jw(this)),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.Bm=function(){var n;if(fi(this),n=kR(23,Jw(this)),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.Cm=function(){var n,t;if(fi(this),n=this.f++,t=pV(Jw(this),n),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),t},s.Dm=function(){var n;if(fi(this),n=pV(Jw(this),0),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.Em=function(n){return fi(this),this.c==5?(fi(this),dR(n,(ai(),ai(),new D2(9,n)))):dR(n,(ai(),ai(),new D2(3,n)))},s.Fm=function(n){var t;return fi(this),t=(ai(),ai(),new Vj(2)),this.c==5?(fi(this),fg(t,gA),fg(t,n)):(fg(t,n),fg(t,gA)),t},s.Gm=function(n){return fi(this),this.c==5?(fi(this),ai(),ai(),new D2(9,n)):(ai(),ai(),new D2(3,n))},s.a=0,s.b=0,s.c=0,s.d=0,s.e=0,s.f=1,s.g=null,s.j=0,v(Gd,"RegEx/RegexParser",820),m(1910,820,{},Lxe),s._l=function(n){return!1},s.am=function(){return Lbe(this)},s.bm=function(n){return O8(n)},s.cm=function(n){return ZVe(this)},s.dm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.em=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.fm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.gm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.hm=function(){return fi(this),O8(67)},s.im=function(){return fi(this),O8(73)},s.jm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.km=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.lm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.mm=function(){return fi(this),O8(99)},s.nm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.om=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.pm=function(){return fi(this),O8(105)},s.qm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.rm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.sm=function(n,t){return tm(n,O8(t)),-1},s.tm=function(){return fi(this),ai(),ai(),new Gh(0,94)},s.um=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.vm=function(){return fi(this),ai(),ai(),new Gh(0,36)},s.wm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.xm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.ym=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.zm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.Am=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.Bm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.Cm=function(){var n;if(fi(this),n=pV(Jw(this),0),this.c!=7)throw R(new Bt(Ht((Lt(),mg))));return fi(this),n},s.Dm=function(){throw R(new Bt(Ht((Lt(),Ul))))},s.Em=function(n){return fi(this),dR(n,(ai(),ai(),new D2(3,n)))},s.Fm=function(n){var t;return fi(this),t=(ai(),ai(),new Vj(2)),fg(t,n),fg(t,gA),t},s.Gm=function(n){return fi(this),ai(),ai(),new D2(3,n)};var u5=null,V7=null;v(Gd,"RegEx/ParserForXMLSchema",1910),m(121,1,h7,bw),s.Hm=function(n){throw R(new du("Not supported."))},s.Im=function(){return-1},s.Jm=function(n){return null},s.Km=function(){return null},s.Lm=function(n){},s.Mm=function(n){},s.Nm=function(){return 0},s.Ib=function(){return this.Om(0)},s.Om=function(n){return this.e==11?".":""},s.e=0;var w7e,Y7,bA,Ehn,p7e,Vm=null,NG,Xce=null,m7e,gA,Kce=null,v7e,y7e,k7e,j7e,E7e,Shn,e6,xhn,Ahn,Mhn,Chn,Q7,Thn,Ohn,nzn=v(Gd,"RegEx/Token",121);m(137,121,{3:1,137:1,121:1},cl),s.Om=function(n){var t,i,r;if(this.e==4)if(this==m7e)i=".";else if(this==NG)i="\\d";else if(this==Q7)i="\\w";else if(this==e6)i="\\s";else{for(r=new vd,r.a+="[",t=0;t0&&(r.a+=","),this.b[t]===this.b[t+1]?Bc(r,rN(this.b[t])):(Bc(r,rN(this.b[t])),r.a+="-",Bc(r,rN(this.b[t+1])));r.a+="]",i=r.a}else if(this==k7e)i="\\D";else if(this==E7e)i="\\W";else if(this==j7e)i="\\S";else{for(r=new vd,r.a+="[^",t=0;t0&&(r.a+=","),this.b[t]===this.b[t+1]?Bc(r,rN(this.b[t])):(Bc(r,rN(this.b[t])),r.a+="-",Bc(r,rN(this.b[t+1])));r.a+="]",i=r.a}return i},s.a=!1,s.c=!1,v(Gd,"RegEx/RangeToken",137),m(580,1,{580:1},ooe),s.a=0,v(Gd,"RegEx/RegexParser/ReferencePosition",580),m(579,1,{3:1,579:1},pMe),s.Fb=function(n){var t;return n==null||!X(n,579)?!1:(t=u(n,579),bn(this.b,t.b)&&this.a==t.a)},s.Hb=function(){return Id(this.b+"/"+Cbe(this.a))},s.Ib=function(){return this.c.Om(this.a)},s.a=0,v(Gd,"RegEx/RegularExpression",579),m(228,121,h7,Gh),s.Im=function(){return this.a},s.Om=function(n){var t,i,r;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:r="\\"+HK(this.a&yr);break;case 12:r="\\f";break;case 10:r="\\n";break;case 13:r="\\r";break;case 9:r="\\t";break;case 27:r="\\e";break;default:this.a>=Ec?(i=(t=this.a>>>0,"0"+t.toString(16)),r="\\v"+of(i,i.length-6,i.length)):r=""+HK(this.a&yr)}break;case 8:this==v7e||this==y7e?r=""+HK(this.a&yr):r="\\"+HK(this.a&yr);break;default:r=null}return r},s.a=0,v(Gd,"RegEx/Token/CharToken",228),m(322,121,h7,D2),s.Jm=function(n){return this.a},s.Lm=function(n){this.b=n},s.Mm=function(n){this.c=n},s.Nm=function(){return 1},s.Om=function(n){var t;if(this.e==3)if(this.c<0&&this.b<0)t=this.a.Om(n)+"*";else if(this.c==this.b)t=this.a.Om(n)+"{"+this.c+"}";else if(this.c>=0&&this.b>=0)t=this.a.Om(n)+"{"+this.c+","+this.b+"}";else if(this.c>=0&&this.b<0)t=this.a.Om(n)+"{"+this.c+",}";else throw R(new du("Token#toString(): CLOSURE "+this.c+To+this.b));else if(this.c<0&&this.b<0)t=this.a.Om(n)+"*?";else if(this.c==this.b)t=this.a.Om(n)+"{"+this.c+"}?";else if(this.c>=0&&this.b>=0)t=this.a.Om(n)+"{"+this.c+","+this.b+"}?";else if(this.c>=0&&this.b<0)t=this.a.Om(n)+"{"+this.c+",}?";else throw R(new du("Token#toString(): NONGREEDYCLOSURE "+this.c+To+this.b));return t},s.b=0,s.c=0,v(Gd,"RegEx/Token/ClosureToken",322),m(821,121,h7,zfe),s.Jm=function(n){return n==0?this.a:this.b},s.Nm=function(){return 2},s.Om=function(n){var t;return this.b.e==3&&this.b.Jm(0)==this.a?t=this.a.Om(n)+"+":this.b.e==9&&this.b.Jm(0)==this.a?t=this.a.Om(n)+"+?":t=this.a.Om(n)+(""+this.b.Om(n)),t},v(Gd,"RegEx/Token/ConcatToken",821),m(1908,121,h7,CRe),s.Jm=function(n){if(n==0)return this.d;if(n==1)return this.b;throw R(new du("Internal Error: "+n))},s.Nm=function(){return this.b?2:1},s.Om=function(n){var t;return this.c>0?t="(?("+this.c+")":this.a.e==8?t="(?("+this.a+")":t="(?"+this.a,this.b?t+=this.d+"|"+this.b+")":t+=this.d+")",t},s.c=0,v(Gd,"RegEx/Token/ConditionToken",1908),m(1909,121,h7,hLe),s.Jm=function(n){return this.b},s.Nm=function(){return 1},s.Om=function(n){return"(?"+(this.a==0?"":Cbe(this.a))+(this.c==0?"":Cbe(this.c))+":"+this.b.Om(n)+")"},s.a=0,s.c=0,v(Gd,"RegEx/Token/ModifierToken",1909),m(822,121,h7,Yfe),s.Jm=function(n){return this.a},s.Nm=function(){return 1},s.Om=function(n){var t;switch(t=null,this.e){case 6:this.b==0?t="(?:"+this.a.Om(n)+")":t="("+this.a.Om(n)+")";break;case 20:t="(?="+this.a.Om(n)+")";break;case 21:t="(?!"+this.a.Om(n)+")";break;case 22:t="(?<="+this.a.Om(n)+")";break;case 23:t="(?"+this.a.Om(n)+")"}return t},s.b=0,v(Gd,"RegEx/Token/ParenToken",822),m(517,121,{3:1,121:1,517:1},JV),s.Km=function(){return this.b},s.Om=function(n){return this.e==12?"\\"+this.a:POn(this.b)},s.a=0,v(Gd,"RegEx/Token/StringToken",517),m(466,121,h7,Vj),s.Hm=function(n){fg(this,n)},s.Jm=function(n){return u(Aw(this.a,n),121)},s.Nm=function(){return this.a?this.a.a.c.length:0},s.Om=function(n){var t,i,r,c,o;if(this.e==1){if(this.a.a.c.length==2)t=u(Aw(this.a,0),121),i=u(Aw(this.a,1),121),i.e==3&&i.Jm(0)==t?c=t.Om(n)+"+":i.e==9&&i.Jm(0)==t?c=t.Om(n)+"+?":c=t.Om(n)+(""+i.Om(n));else{for(o=new vd,r=0;r=this.c.b:this.a<=this.c.b},s.Sb=function(){return this.b>0},s.Tb=function(){return this.b},s.Vb=function(){return this.b-1},s.Qb=function(){throw R(new pd(Ben))},s.a=0,s.b=0,v(gme,"ExclusiveRange/RangeIterator",259);var Wl=L9(VF,"C"),$t=L9(JS,"I"),ts=L9(ly,"Z"),Ap=L9(HS,"J"),ds=L9(BS,"B"),Jr=L9(zS,"D"),Ym=L9(FS,"F"),o5=L9(GS,"S"),tzn=Gi("org.eclipse.elk.core.labels","ILabelManager"),S7e=Gi(yc,"DiagnosticChain"),x7e=Gi(den,"ResourceSet"),A7e=v(yc,"InvocationTargetException",null),Ihn=(GP(),X6n),Dhn=Dhn=AAn;G8n(wbn),u7n("permProps",[[["locale","default"],[zen,"gecko1_8"]],[["locale","default"],[zen,"safari"]]]),Dhn(null,"elk",null)}).call(this)}).call(this,typeof Lhn<"u"?Lhn:typeof self<"u"?self:typeof window<"u"?window:{})},{}],3:[function(x,M,N){function $(pe){"@babel/helpers - typeof";return $=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Pe){return typeof Pe}:function(Pe){return Pe&&typeof Symbol=="function"&&Pe.constructor===Symbol&&Pe!==Symbol.prototype?"symbol":typeof Pe},$(pe)}function k(pe,Pe,ae){return Object.defineProperty(pe,"prototype",{writable:!1}),pe}function H(pe,Pe){if(!(pe instanceof Pe))throw new TypeError("Cannot call a class as a function")}function U(pe,Pe,ae){return Pe=Z(Pe),G(pe,W()?Reflect.construct(Pe,ae||[],Z(pe).constructor):Pe.apply(pe,ae))}function G(pe,Pe){if(Pe&&($(Pe)=="object"||typeof Pe=="function"))return Pe;if(Pe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ie(pe)}function ie(pe){if(pe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return pe}function W(){try{var pe=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(W=function(){return!!pe})()}function Z(pe){return Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Pe){return Pe.__proto__||Object.getPrototypeOf(Pe)},Z(pe)}function se(pe,Pe){if(typeof Pe!="function"&&Pe!==null)throw new TypeError("Super expression must either be null or a function");pe.prototype=Object.create(Pe&&Pe.prototype,{constructor:{value:pe,writable:!0,configurable:!0}}),Object.defineProperty(pe,"prototype",{writable:!1}),Pe&&oe(pe,Pe)}function oe(pe,Pe){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ae,Ne){return ae.__proto__=Ne,ae},oe(pe,Pe)}var ee=x("./elk-api.js").default,Me=(function(pe){function Pe(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};H(this,Pe);var Ne=Object.assign({},ae),Xe=!1;try{x.resolve("web-worker"),Xe=!0}catch{}if(ae.workerUrl)if(Xe){var ln=x("web-worker");Ne.workerFactory=function(xn){return new ln(xn)}}else console.warn(`Web worker requested but 'web-worker' package not installed. Consider installing the package or pass your own 'workerFactory' to ELK's constructor. -... Falling back to non-web worker version.`);if(!Ne.workerFactory){var on=x("./elk-worker.min.js"),An=on.Worker;Ne.workerFactory=function(xn){return new An(xn)}}return U(this,Pe,[Ne])}return se(Pe,pe),k(Pe)})(ee);Object.defineProperty(M.exports,"__esModule",{value:!0}),M.exports=Me,Me.default=Me},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(x,M,N){var $=typeof Worker<"u"?Worker:void 0;M.exports=$},{}]},{},[3])(3)})})(K7e)),K7e.exports}var uKn=cKn();const oKn=bke(uKn);function ebn(g){if(g.detailMode==="overview")return 190;const E=Math.max(g.applicationId.length,g.modelName.length,...g.inputs.map(x=>x.name.length),...g.outputs.map(x=>x.name.length));return Math.max(310,Math.min(540,235+E*7))}const sKn=new oKn;async function lKn(g,E,x){const M={id:"root",layoutOptions:fKn(x),children:g.map(k=>({id:k.id,width:aKn(k.data),height:hKn(k.data),ports:k.data.nodeKind==="application"?[...nbn(k.data).map((H,U)=>lue(H.id,"WEST",U)),...tbn(k.data).map((H,U)=>lue(H.id,"EAST",U))]:[...(k.data.inputPortIds??[]).map((H,U)=>lue(H,"WEST",U)),...(k.data.outputPortIds??[]).map((H,U)=>lue(H,"EAST",U))],layoutOptions:{"org.eclipse.elk.portConstraints":"FIXED_ORDER"}})),edges:E.map(k=>({id:k.id,sources:[k.sourceHandle??k.source],targets:[k.targetHandle??k.target]}))},N=await sKn.layout(M),$=new Map((N.children??[]).map(k=>[k.id,{x:k.x??0,y:k.y??0}]));return g.map(k=>({...k,position:$.get(k.id)??k.position}))}function fKn(g){return{"elk.algorithm":g==="topology"?"mrtree":"layered","elk.direction":g==="topology"?"DOWN":"RIGHT","elk.spacing.nodeNode":g==="overview"?"24":g==="compact"?"32":"56","elk.layered.spacing.nodeNodeBetweenLayers":g==="overview"?"48":g==="compact"?"60":"110","elk.layered.nodePlacement.strategy":"BRANDES_KOEPF","elk.layered.crossingMinimization.semiInteractive":"true","elk.edgeRouting":"ORTHOGONAL"}}function lue(g,E,x){return{id:g,width:9,height:9,layoutOptions:{"org.eclipse.elk.port.side":E,"org.eclipse.elk.port.index":String(x)}}}function aKn(g){return g.nodeKind==="application"?ebn(g):240}function hKn(g){if(g.nodeKind!=="application")return 112;if(g.detailMode==="overview")return 108;const E=Math.max(g.inputs.length,g.outputs.length),x=Math.max(g.environmentInputs.length,g.environmentOutputs.length);return Math.max(178,142+E*27+(x>0?32+x*27:0))}function nbn(g){return[...g.inputs,...g.environmentInputs]}function tbn(g){return[...g.outputs,...g.environmentOutputs]}function dKn({data:g,selected:E}){const x=g.detailMode==="overview",M=new Set(g.requiredInputPortIds),N=new Set(g.candidatePortIds),$=new Set(g.previousTimeStepPortIds),k=new Set(g.cycleBreakInputPortIds),H=wKn(g);return _.jsxs("section",{className:`model-node application-node ${x?"overview-node":""} ${g.cyclic?"cyclic":""} ${E?"selected":""}`,"data-testid":`application-node-${g.applicationId}`,style:{width:ebn(g)},children:[x&&_.jsx(gKn,{inputs:nbn(g),outputs:tbn(g)}),_.jsxs("header",{className:"node-header",children:[_.jsxs("div",{children:[_.jsx("div",{className:"process",children:g.name||g.applicationId}),_.jsx("div",{className:"model-type",children:g.modelName})]}),_.jsx(Y0n,{size:18})]}),x?_.jsxs("div",{className:"overview-node-summary",children:[_.jsxs("span",{children:[g.targetCount," targets"]}),_.jsxs("span",{children:[g.inputs.length," in"]}),_.jsxs("span",{children:[g.outputs.length," out"]})]}):_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"node-meta",children:[_.jsxs("span",{className:"meta-chip",title:g.selector.julia,children:[_.jsx(xXn,{size:13})," ",H]}),_.jsxs("span",{className:"meta-chip",title:g.cadence.julia,children:[_.jsx(CXn,{size:13})," ",pKn(g)]})]}),_.jsxs("div",{className:"target-summary",children:[_.jsx("strong",{children:g.targetCount})," concrete target",g.targetCount===1?"":"s"]}),_.jsxs("div",{className:"ports-grid",children:[_.jsx(fue,{title:"Inputs",side:"input",ports:g.inputs,required:M,candidates:N,previous:$,cycleBreaks:k,cycleBreakMode:g.cycleBreakMode,application:g,onCandidateClick:g.onCandidateClick,onPortClick:g.onPortClick,onCycleBreak:g.onCycleBreak}),_.jsx(fue,{title:"Outputs",side:"output",ports:g.outputs,required:M,candidates:N,previous:$,cycleBreaks:k,cycleBreakMode:g.cycleBreakMode,application:g,onCandidateClick:g.onCandidateClick,onPortClick:g.onPortClick,onCycleBreak:g.onCycleBreak})]}),(g.environmentInputs.length>0||g.environmentOutputs.length>0)&&_.jsxs("div",{className:"ports-grid environment-ports",children:[_.jsx(fue,{title:"Environment inputs",side:"input",ports:g.environmentInputs,required:M,candidates:new Set,previous:new Set,cycleBreaks:new Set,cycleBreakMode:!1,application:g,onPortClick:g.onPortClick}),_.jsx(fue,{title:"Environment outputs",side:"output",ports:g.environmentOutputs,required:M,candidates:new Set,previous:new Set,cycleBreaks:new Set,cycleBreakMode:!1,application:g,onPortClick:g.onPortClick})]})]})]})}function bKn({data:g,selected:E}){return _.jsxs("section",{className:`entity-node ${g.nodeKind} ${E?"selected":""}`,"data-testid":`${g.nodeKind}-node`,children:[(g.inputPortIds?.length?g.inputPortIds:[void 0]).map((x,M)=>_.jsx(h5,{id:x,type:"target",position:ur.Left,style:{top:`${Tue(M,g.inputPortIds?.length??1)}%`}},x??"target")),_.jsxs("header",{children:[_.jsx("strong",{children:g.title}),_.jsx("span",{children:g.subtitle})]}),_.jsx("div",{className:"badges",children:g.badges.map(x=>_.jsx("span",{className:"meta-chip",children:x},x))}),(g.outputPortIds?.length?g.outputPortIds:[void 0]).map((x,M)=>_.jsx(h5,{id:x,type:"source",position:ur.Right,style:{top:`${Tue(M,g.outputPortIds?.length??1)}%`}},x??"source"))]})}function fue({title:g,side:E,ports:x,required:M,candidates:N,previous:$,cycleBreaks:k,cycleBreakMode:H,application:U,onCandidateClick:G,onPortClick:ie,onCycleBreak:W}){return _.jsxs("div",{className:`port-column ${E}`,children:[_.jsx("div",{className:"port-title",children:g}),x.map(Z=>_.jsxs("div",{className:`port ${M.has(Z.id)?"required-input":""} ${$.has(Z.id)?"previous":""}`,"data-testid":`port-${E}-${Z.name}`,title:`${Z.name}: ${Z.defaultJulia}`,onClick:se=>{se.stopPropagation(),ie?.(Z)},children:[E==="input"&&_.jsx(h5,{id:Z.id,type:"target",position:ur.Left}),_.jsx("span",{children:Z.name}),N.has(Z.id)&&_.jsx("button",{className:"port-candidate-button nodrag nopan",type:"button",title:E==="input"?"Models that compute this variable":"Models that consume this variable","aria-label":E==="input"?`Models that compute ${Z.name}`:`Models that consume ${Z.name}`,onClick:se=>{se.stopPropagation();const oe=se.currentTarget.getBoundingClientRect();G?.(Z,{x:oe.right,y:oe.top+oe.height/2})},children:_.jsx(SA,{size:11})}),E==="input"&&H&&k.has(Z.id)&&_.jsx("button",{className:"cycle-port-break nodrag nopan",type:"button",title:`Read ${Z.name} from the previous accepted timestep`,"aria-label":`Break cycle at ${U.applicationId}.${Z.name}`,"data-testid":`cycle-break-${U.applicationId}-${Z.name}`,onClick:se=>{se.stopPropagation(),W?.(U,Z)},children:_.jsx(Q0n,{size:12})}),$.has(Z.id)&&_.jsx("small",{className:"previous-label",children:"t-1"}),E==="output"&&_.jsx(h5,{id:Z.id,type:"source",position:ur.Right})]},Z.id))]})}function gKn({inputs:g,outputs:E}){return _.jsxs(_.Fragment,{children:[g.map((x,M)=>_.jsx(h5,{id:x.id,type:"target",position:ur.Left,style:{top:`${Tue(M,g.length)}%`}},x.id)),E.map((x,M)=>_.jsx(h5,{id:x.id,type:"source",position:ur.Right,style:{top:`${Tue(M,E.length)}%`}},x.id))]})}function Tue(g,E){return E<=1?52:28+g/(E-1)*48}function wKn(g){const E=[...g.targetInstances,...g.targetScales,...g.targetKinds];return E.length>0?E.slice(0,2).join(" / "):g.selector.type}function pKn(g){return g.cadence.mode==="default"?"default rate":g.cadence.mode==="period"?`${g.cadence.value} ${g.cadence.unit}`:g.cadence.julia}function mKn({id:g,sourceX:E,sourceY:x,targetX:M,targetY:N,sourcePosition:$=ur.Right,targetPosition:k=ur.Left,markerEnd:H,style:U,data:G}){const[ie,W,Z]=Aue({sourceX:E,sourceY:x,targetX:M,targetY:N,sourcePosition:$,targetPosition:k,borderRadius:14,offset:24}),se=vKn(G);return _.jsxs(_.Fragment,{children:[_.jsx(uq,{id:g,path:ie,markerEnd:H,style:U,interactionWidth:18}),se&&_.jsx(qUn,{children:_.jsx("div",{className:`edge-chip ${G?.kind??""} ${G?.cycle?"cycle":""}`,style:{transform:`translate(-50%, -50%) translate(${W}px, ${Z-12}px)`},children:se})})]})}function vKn(g){return g?g.kind==="manual_call"?g.call||"call":g.kind==="initializer"?g.call||"initializer":g.kind==="object_topology"||g.kind==="application_target"?"":g.sourceVariable&&g.targetVariable?g.sourceVariable===g.targetVariable?g.sourceVariable:`${g.sourceVariable} → ${g.targetVariable}`:g.kind.replaceAll("_"," "):""}const V7e=_ke("source","degree_days","ToyDegreeDaysCumulModel",[],["TT_cu"]),aue=_ke("lai","lai_dynamic","ToyLAIModel",["TT_cu"],["LAI"]),Y7e=_ke("light","light_interception","Beer",["LAI"],["aPPFD"]),ndn={schemaVersion:2,level:"applications",metadata:{title:"PlantSimEngine Model Graph",modelRevision:0,objectCount:1,instanceCount:0,applicationCount:3,executionCount:3,bindingCount:2,callCount:0,unresolvedInitializationCount:1,cyclic:!1,strictlyCompiled:!0,sceneEnvironmentId:null},objects:[{id:"object:plant",objectId:"plant",scale:"Plant",kind:"plant",species:null,name:"plant",instance:null,parent:null,children:[],hasGeometry:!1,hasStatus:!0}],templates:[],instances:[],applications:[V7e,aue,Y7e],executions:[V7e,aue,Y7e].map(g=>({id:`execution:${g.applicationId}:plant`,applicationId:g.applicationId,applicationNodeId:g.id,objectId:"plant",objectNodeId:"object:plant",modelType:g.modelType,modelParameters:{},overridden:!1})),edges:[idn(V7e,"TT_cu",aue,"TT_cu"),idn(aue,"LAI",Y7e,"LAI")],modelLibrary:[],environments:[],initialization:[{applicationId:"source",objectId:"plant",variable:"TT",role:"input",disposition:"unresolved",value:"-Inf",valueJulia:"-Inf",expectedType:"Float64",sourceApplicationIds:[],sourceObjectIds:[],sourceVariable:null,origin:"missing",previousTimeStep:!1}],diagnostics:[],cycles:[],availableActions:["inspect"]};function _ke(g,E,x,M,N){return{id:`application:${g}`,applicationId:g,owner:{scope:"global",applicationId:g,instance:null,templateId:null},name:g,process:E,modelType:x,modelName:x,module:"PlantSimEngine.Examples",package:"PlantSimEngine",modelParameters:{},selector:{type:"One",multiplicity:"one",criteria:{scale:"Plant"},julia:"One(scale=:Plant)"},targetIds:["plant"],targetCount:1,targetScales:["Plant"],targetKinds:["plant"],targetSpecies:[],targetInstances:[],cadence:{mode:"default",value:null,unit:null,julia:"nothing"},clock:null,inputs:M.map($=>tdn(g,"input",$)),outputs:N.map($=>tdn(g,"output",$)),environmentInputs:[],environmentOutputs:[],inputBindings:{},callBindings:{},environment:null,environmentBindings:{},environmentWindow:{mode:"default",value:null,unit:null,julia:"nothing"},outputRouting:{},updates:[],modelStorage:"shared_application",objectOverrides:[]}}function tdn(g,E,x){return{id:`application:${g}:${E}:${x}`,name:x,role:E,default:"-Inf",defaultJulia:"-Inf",expectedType:"Float64"}}function idn(g,E,x,M){return{id:`binding:${g.applicationId}:${E}:${x.applicationId}:${M}`,source:g.id,target:x.id,sourcePort:`application:${g.applicationId}:output:${E}`,targetPort:`application:${x.applicationId}:input:${M}`,sourceVariable:E,targetVariable:M,sourceApplicationId:g.applicationId,targetApplicationId:x.applicationId,kind:"inferred_same_object",cycle:!1,projection:"applications"}}const yKn={application:dKn,entity:bKn},kKn={modelEdge:mKn};function jKn(){const[g,E]=Be.useState(W7e),[x,M]=Be.useState(()=>W7e().level),[N,$]=Be.useState(()=>W7e().metadata.applicationCount>24?"overview":"detail"),[k,H]=Be.useState(""),[U,G]=Be.useState(null),[ie,W]=Be.useState(null),[Z,se]=Be.useState(null),[oe,ee]=Be.useState(null),[Me,pe]=Be.useState(!1),[Pe,ae]=Be.useState(!1),[Ne,Xe]=Be.useState(!1),[ln,on]=Be.useState(!1),[An,xn]=Be.useState(!1),[tt,vn]=Be.useState(""),[wn,Y]=Be.useState(null),[Je,pn]=Be.useState(null),[xe,qe]=Be.useState([]),[fn,$e]=Be.useState(null),[Mn,ye]=Be.useState(!1),[Re,Hn]=Be.useState(!1),[rt,Jt]=Be.useState(!1),[di,Gt]=Be.useState(null),[xt,si]=Be.useState(null),[Kr,Er]=Be.useState(null),[Mt,bi]=Be.useState(!1),[zi,cu]=Be.useState(null),[Fu,Rs]=Be.useState(!1),[ia,ef]=Be.useState(null),[Oa,Cc]=Be.useState(null),[o0,xb]=Be.useState(null),[Sl,cd]=Be.useState(null),[s0,uh]=Be.useState(null),[ud,b5]=Be.useState(!1),[l0,Cp]=Be.useState(null),[l6,Ab,ra]=UUn([]),[od,Sf,f6]=XUn([]),oh=Be.useMemo(JKn,[]),Tp=Be.useMemo(()=>new Map(g.applications.map(vt=>[vt.applicationId,vt])),[g.applications]),Gg=Be.useMemo(()=>new Set(g.initialization.filter(vt=>vt.role==="input"&&vt.disposition==="unresolved").map(vt=>Q7e(vt.applicationId,"input",vt.variable))),[g.initialization]),qg=Be.useMemo(()=>new Set(g.initialization.filter(vt=>vt.role==="input"&&vt.previousTimeStep).map(vt=>Q7e(vt.applicationId,"input",vt.variable))),[g.initialization]),Ug=Be.useMemo(()=>new Set(g.cycles.flatMap(vt=>vt.applicationIds)),[g.cycles]),sd=Be.useMemo(()=>new Set(g.cycles.flatMap(vt=>vt.breakCandidates.map(kc=>Q7e(kc.applicationId,"input",kc.input)))),[g.cycles]),Xg=Be.useMemo(()=>CKn(g),[g]),Mb=Be.useMemo(()=>oe?TKn(g.modelLibrary,oe.port):[],[oe,g.modelLibrary]),g5=Be.useMemo(()=>oe?NKn(g.applications,oe):[],[oe,g.applications]),Op=Be.useMemo(()=>{const vt=new Map;for(const kc of g.applications)for(const tc of[...kc.inputs,...kc.outputs])vt.set(tc.id,{application:kc,port:tc});return vt},[g.applications]),Np=Be.useMemo(()=>ie?new Set(ie.objectIds.map(u6)):null,[ie]);Be.useEffect(()=>{if(!oh?.websocketUrl)return;const vt=new WebSocket(oh.websocketUrl);return $e(vt),vt.addEventListener("open",()=>{ye(!0),Gt(null)}),vt.addEventListener("close",()=>{ye(!1),Gt("Editor connection closed.")}),vt.addEventListener("message",kc=>{const tc=JSON.parse(kc.data);tc.graph&&E(tc.graph),typeof tc.modelCode=="string"&&vn(tc.modelCode),Y(tc.autosavePath??null),pn(tc.savePath??null),qe(tc.recentPaths??[]),tc.selectorPreview&&uh(tc.selectorPreview),tc.targetPreview&&Er(tc.targetPreview),tc.instancePreview&&cu(tc.instancePreview),tc.ok===!1&&(uh(null),Er(null),cu(null)),Hn(!!tc.canUndo),Jt(!!tc.canRedo),Gt(tc.ok===!1?tc.diagnostics?.[0]||"The edit failed.":null)}),()=>vt.close()},[oh?.websocketUrl]),Be.useEffect(()=>{g.metadata.cyclic||(b5(!1),Cp(null))},[g.metadata.cyclic]);const uu=Be.useCallback(vt=>{if(!fn||fn.readyState!==WebSocket.OPEN){Gt("This action requires an interactive Julia editor session.");return}fn.send(JSON.stringify(vt))},[fn]),w5=Be.useCallback((vt,kc,tc)=>{G(vt),se(kc),ee({application:vt,port:kc,x:tc.x,y:tc.y})},[]);Be.useEffect(()=>{const vt=EKn({graph:g,view:x,detailMode:N,query:k,scopedObjectIds:Np,unresolvedPortIds:Gg,previousPortIds:qg,candidatePortIds:Xg,cyclicApplications:Ug,cycleBreakPortIds:sd,cycleBreakMode:ud,openCandidates:w5,onPortClick:se,onCycleBreak:(f0,Yg)=>Cp({application:f0,port:Yg})}),kc=new Set(vt.map(f0=>f0.id)),tc=SKn(g,x).filter(f0=>kc.has(f0.source)&&kc.has(f0.target));lKn(vt,tc,x==="topology"?"topology":N==="overview"?"overview":"data_flow").then(Ab),Sf(tc)},[Xg,ud,sd,Ug,N,g,w5,qg,k,Np,Sf,Ab,Gg,x]);const Kg=Be.useCallback((vt,kc)=>{if(kc.data.nodeKind==="application")G(Tp.get(kc.data.applicationId)??null);else if(G(kc.data.detail),kc.data.nodeKind==="object"){const tc=kc.data.detail;W({label:`subtree ${tc.name||String(tc.objectId)}`,objectIds:AKn(g.objects,tc.objectId)})}else if(kc.data.nodeKind==="instance"){const tc=kc.data.detail;W({label:`instance ${tc.name}`,objectIds:tc.objectIds})}else kc.data.nodeKind==="model"&&W(null);se(null)},[Tp,g.objects]),rv=Be.useCallback(vt=>{oe&&(Er(null),si({mode:"add",initialModelType:vt.type,suggestedSelector:FKn(oe.application)}),Mn||Gt(`${vt.name} matches ${oe.port.name}. Start an interactive Julia editor session to add it to the composite model.`),ee(null))},[oe,Mn]),p5=Be.useCallback(vt=>{if(!Mn){Gt("Adding or updating an application requires an interactive Julia editor session."),si(null);return}uu({action:"edit",kind:vt.applicationRef?"update_application":"add_application",...vt}),si(null)},[Mn,uu]),Vg=Be.useCallback(vt=>{if(!Mn){Gt("Adding a template instance requires an interactive Julia editor session.");return}uu({action:"edit",kind:"add_instance",...vt}),bi(!1),cu(null)},[Mn,uu]),cv=Be.useCallback(vt=>{if(!Mn){Gt("Creating a binding requires an interactive Julia editor session."),cd(null);return}uu({action:"edit",kind:"set_input_binding",...vt}),cd(null)},[Mn,uu]),m5=Be.useCallback(vt=>{if(!Mn){Gt("Adding or updating an object requires an interactive Julia editor session."),ef(null);return}uu({action:"edit",kind:ia?.mode==="update"?"update_object":"add_object",objectId:vt.objectId,configuration:vt.configuration}),ef(null)},[Mn,ia?.mode,uu]),v5=Be.useCallback(vt=>{if(!Mn){Gt("Creating an override requires an interactive Julia editor session."),Cc(null);return}uu({action:"edit",kind:vt.scope==="instance"?"set_instance_override":"set_object_override",...vt}),Cc(null)},[Mn,uu]),b1=Be.useCallback(vt=>{if(!Mn){Gt("Removing an override requires an interactive Julia editor session.");return}uu({action:"edit",kind:vt.scope==="instance"?"remove_instance_override":"remove_object_override",...vt}),Cc(null)},[Mn,uu]),Ws=Be.useCallback(vt=>{if(!vt.sourceHandle||!vt.targetHandle)return;const kc=Op.get(vt.sourceHandle),tc=Op.get(vt.targetHandle);if(!kc||!tc||kc.port.role!=="output"||tc.port.role!=="input"){Gt("Connect an application output to an application input.");return}cd({sourceApplication:kc.application,sourcePort:kc.port,targetApplication:tc.application,targetPort:tc.port}),uh(null)},[Op]),xf=Be.useMemo(()=>{if(!U)return g.initialization;if("applicationId"in U)return g.initialization.filter(vt=>vt.applicationId===U.applicationId);if("objectId"in U)return g.initialization.filter(vt=>String(vt.objectId)===String(U.objectId));if("objectIds"in U){const vt=new Set(U.objectIds.map(u6));return g.initialization.filter(kc=>vt.has(u6(kc.objectId)))}return g.initialization},[g.initialization,U]);return _.jsxs("main",{className:"model-editor-shell","data-testid":"model-graph-viewer",children:[_.jsxs("header",{className:"model-toolbar",children:[_.jsxs("div",{className:"model-brand",children:[_.jsx("span",{className:"brand-mark"}),_.jsxs("div",{children:[_.jsx("small",{children:"PLANTSIMENGINE"}),_.jsx("strong",{children:"Model Graph"})]})]}),_.jsxs("div",{className:"model-search",children:[_.jsx(PXn,{size:17}),_.jsx("input",{value:k,onChange:vt=>H(vt.target.value),placeholder:"Search application, object, or variable"}),k&&_.jsx("button",{"aria-label":"Clear search",onClick:()=>H(""),children:_.jsx(Jg,{size:15})})]}),_.jsxs("div",{className:"model-counts",children:[_.jsxs("span",{children:[g.metadata.applicationCount," applications"]}),_.jsxs("span",{children:[g.metadata.objectCount," objects"]}),g.metadata.unresolvedInitializationCount>0&&_.jsxs("button",{className:"count-warning",onClick:()=>ae(!0),children:[_.jsx(MXn,{size:14})," ",g.metadata.unresolvedInitializationCount," init"]}),g.diagnostics.length>0&&_.jsxs("button",{className:"count-error",onClick:()=>pe(!0),children:[_.jsx(dke,{size:14})," ",g.diagnostics.length]})]}),_.jsxs("nav",{className:"view-tabs","aria-label":"Graph projection",children:[_.jsxs("button",{className:x==="applications"?"active":"",onClick:()=>M("applications"),children:[_.jsx(Y0n,{size:15})," Applications"]}),_.jsxs("button",{className:x==="topology"?"active":"",onClick:()=>M("topology"),children:[_.jsx(NXn,{size:15})," Objects"]}),_.jsxs("button",{className:x==="resolved"?"active":"",onClick:()=>M("resolved"),children:[_.jsx(IXn,{size:15})," Executions"]})]}),_.jsxs("div",{className:"model-actions",children:[oh&&_.jsxs("button",{"data-testid":"open-model",onClick:()=>on(!0),children:[_.jsx(OXn,{size:15})," Open"]}),oh&&_.jsxs("button",{"data-testid":"save-model",onClick:()=>xn(!0),children:[_.jsx(LXn,{size:15})," ",Je?"Saved":"Save"]}),x!=="topology"&&_.jsx("button",{className:N==="overview"?"overview-cta":"",onClick:()=>$(vt=>vt==="overview"?"detail":"overview"),children:N==="overview"?"Overview Mode - Show Detailed View":"Show Overview"}),oh&&_.jsxs("button",{"data-testid":"add-application",onClick:()=>{Er(null),si({mode:"add"})},children:[_.jsx(SA,{size:15})," Add application"]}),oh&&_.jsxs("button",{"data-testid":"add-object",onClick:()=>ef({mode:"add"}),children:[_.jsx(SA,{size:15})," Add object"]}),oh&&g.templates.length>0&&_.jsxs("button",{"data-testid":"add-instance",onClick:()=>{cu(null),bi(!0)},children:[_.jsx(SA,{size:15})," Add instance"]}),oh&&_.jsx("button",{"data-testid":"configure-environment",onClick:()=>Rs(!0),children:"Environment"}),oh&&_.jsx("button",{disabled:!Re,onClick:()=>uu({action:"undo"}),"aria-label":"Undo",children:_.jsx($Xn,{size:15})}),oh&&_.jsx("button",{disabled:!rt,onClick:()=>uu({action:"redo"}),"aria-label":"Redo",children:_.jsx(DXn,{size:15})}),_.jsxs("button",{onClick:()=>Xe(!0),children:[_.jsx(TXn,{size:15})," Model code"]})]})]}),g.metadata.cyclic&&_.jsxs("section",{className:"cycle-callout","data-testid":"cycle-callout",children:[_.jsx(dke,{size:19}),_.jsxs("div",{children:[_.jsx("strong",{children:"Current-step dependency cycle"}),_.jsx("span",{children:"Select a cycle input to read its previous accepted timestep value."})]}),_.jsx("button",{className:ud?"active":"",onClick:()=>{M("applications"),$("detail"),b5(vt=>!vt)},"data-testid":"choose-cycle-break",children:ud?"Cancel break selection":"Choose a break point in graph"})]}),di&&_.jsxs("div",{className:"editor-feedback",children:[di,_.jsx("button",{onClick:()=>Gt(null),children:_.jsx(Jg,{size:14})})]}),ie&&_.jsxs("section",{className:"graph-scope-filter","data-testid":"graph-scope-filter",children:[_.jsxs("span",{children:["Showing ",x==="resolved"?"executions":x==="applications"?"applications":"topology"," for ",_.jsx("strong",{children:ie.label})," (",ie.objectIds.length," objects)"]}),x==="topology"&&_.jsx("button",{onClick:()=>M("applications"),children:"Show related applications"}),_.jsxs("button",{"aria-label":"Clear graph scope",onClick:()=>W(null),children:[_.jsx(Jg,{size:14})," Clear"]})]}),_.jsxs("section",{className:"model-workspace",children:[_.jsx("div",{className:"flow-wrap",children:_.jsxs(HUn,{nodes:l6,edges:od,nodeTypes:yKn,edgeTypes:kKn,onNodesChange:ra,onEdgesChange:f6,onConnect:Ws,onNodeClick:Kg,onEdgeClick:(vt,kc)=>G(kc.data??null),fitView:!0,minZoom:.05,maxZoom:2,children:[_.jsx(WUn,{color:"#d8cdbc",gap:22,size:1}),_.jsx(cXn,{}),_.jsx(mXn,{pannable:!0,zoomable:!0})]})}),_.jsx(DKn,{selection:U,port:Z,initialization:xf,interactive:Mn,onEditApplication:vt=>{Er(null),si({mode:"update",application:vt})},onRemoveApplication:vt=>uu({action:"edit",kind:"remove_application",applicationRef:vt.owner}),onConfigureApplication:vt=>xb(vt.applicationId),onOverrideApplication:Cc,onRemoveInstance:vt=>uu({action:"edit",kind:"remove_instance",name:vt.name}),onEditObject:vt=>ef({mode:"update",object:vt}),onRemoveObject:vt=>uu({action:"edit",kind:"remove_object",objectId:vt.objectId,recursive:!0})})]}),oe&&(Mb.length>0||g5.length>0)&&_.jsx(OKn,{candidate:oe,models:Mb,applications:g5,onSelectModel:rv,onSelectApplication:vt=>{cd(IKn(oe,vt)),uh(null),ee(null)},onClose:()=>ee(null)}),Me&&_.jsx(_Kn,{graph:g,onClose:()=>pe(!1),sendCommand:uu,interactive:Mn}),Pe&&_.jsx(LKn,{graph:g,onClose:()=>ae(!1),sendCommand:uu,interactive:Mn}),Ne&&_.jsx($Kn,{code:tt,onClose:()=>Xe(!1)}),ln&&_.jsx(odn,{mode:"open",recentPaths:xe,currentPath:Je,autosavePath:wn,onSubmit:vt=>{uu({action:"open_model_code",path:vt}),on(!1)},onClose:()=>on(!1)}),An&&_.jsx(odn,{mode:"save",recentPaths:xe,currentPath:Je,autosavePath:wn,onSubmit:vt=>{uu({action:"save_model_code",path:vt}),xn(!1)},onClose:()=>xn(!1)}),xt&&_.jsx(RXn,{mode:xt.mode,models:g.modelLibrary,objects:g.objects,application:xt.application,initialModelType:xt.initialModelType,suggestedSelector:xt.suggestedSelector,nameReadOnly:xt.application?.owner.scope==="template",preview:Kr,onPreview:vt=>{Er(null),uu({action:"preview_application_targets",selector:vt,applicationRef:xt.application?.owner})},onSubmit:p5,onClose:()=>{si(null),Er(null)}}),Sl&&_.jsx(XXn,{endpoints:Sl,objects:g.objects,preview:s0,onPreview:vt=>{uh(null),uu({action:"preview_input_binding",...vt})},onSubmit:cv,onClose:()=>{cd(null),uh(null)}}),ia&&_.jsx(tKn,{mode:ia.mode,objects:g.objects,object:ia.object,onSubmit:m5,onClose:()=>ef(null)}),Mt&&_.jsx(eKn,{templates:g.templates,instances:g.instances,objects:g.objects,preview:zi,onPreview:vt=>{cu(null),uu({action:"preview_instance",...vt})},onSubmit:Vg,onClose:()=>{bi(!1),cu(null)}}),Fu&&_.jsx(ZXn,{environments:g.environments,activeId:g.metadata.sceneEnvironmentId,onSubmit:vt=>{uu({action:"edit",kind:"set_model_environment",environmentId:vt}),Rs(!1)},onClose:()=>Rs(!1)}),Oa&&_.jsx(rKn,{application:Oa,models:g.modelLibrary,instances:g.instances,onSubmit:v5,onRemove:b1,onClose:()=>Cc(null)}),o0&&Tp.get(o0)&&_.jsx(HXn,{application:Tp.get(o0),applications:g.applications,environments:g.environments,models:g.modelLibrary,onCommand:uu,onClose:()=>xb(null)}),l0&&_.jsx(RKn,{selection:l0,initialization:g.initialization,onSubmit:(vt,kc)=>{uu({action:"edit",kind:"break_cycle",applicationRef:l0.application.owner,input:l0.port.name,initializeMissing:vt,initialValue:kc}),Cp(null)},onClose:()=>Cp(null)})]})}function EKn({graph:g,view:E,detailMode:x,query:M,scopedObjectIds:N,unresolvedPortIds:$,previousPortIds:k,candidatePortIds:H,cyclicApplications:U,cycleBreakPortIds:G,cycleBreakMode:ie,openCandidates:W,onPortClick:Z,onCycleBreak:se}){const oe=Me=>!M||JSON.stringify(Me).toLowerCase().includes(M.toLowerCase());if(E==="topology"){const Me={entity:"model",objectCount:g.metadata.objectCount,instanceCount:g.metadata.instanceCount,applicationCount:g.metadata.applicationCount},pe={id:"model:root",type:"entity",position:{x:0,y:0},data:{nodeKind:"model",title:g.metadata.title||"Composite model",subtitle:"model root",badges:[`${g.metadata.instanceCount} instances`,`${g.metadata.objectCount} objects`],detail:Me}},Pe=g.templates.filter(oe).map(Xe=>({id:`template:${Xe.id}`,type:"entity",position:{x:0,y:0},data:{nodeKind:"template",title:Xe.name,subtitle:Xe.source==="catalog"?"template preset":"model-local template",badges:[`${Xe.applications.length} applications`,`${Xe.mountedInstances.length} mounts`],detail:Xe}})),ae=g.instances.filter(oe).map(Xe=>({id:Xe.id,type:"entity",position:{x:0,y:0},data:{nodeKind:"instance",title:Xe.name,subtitle:[Xe.kind,Xe.species].filter(Boolean).join(" · ")||"object instance",badges:[`${Xe.objectIds.length} objects`,`${Xe.applicationIds.length} applications`,`${Xe.instanceOverrides.length+Xe.objectOverrides.length} overrides`],detail:Xe}})),Ne=g.objects.filter(oe).map(Xe=>({id:Xe.id,type:"entity",position:{x:0,y:0},data:{nodeKind:"object",title:Xe.name||String(Xe.objectId),subtitle:[Xe.kind,Xe.scale,Xe.instance].filter(Boolean).join(" · "),badges:[Xe.species,Xe.hasStatus?"status":null,Xe.hasGeometry?"geometry":null].filter(Boolean),detail:Xe}}));return[pe,...Pe,...ae,...Ne]}if(E==="resolved"){const Me=new Map(g.applications.map(Pe=>[Pe.applicationId,Pe]));return[...g.executions.filter(Pe=>!N||N.has(u6(Pe.objectId))).filter(oe).map(Pe=>{const ae=Me.get(Pe.applicationId);return{id:Pe.id,type:"entity",position:{x:0,y:0},data:{nodeKind:"execution",title:Pe.applicationId,subtitle:`object ${String(Pe.objectId)}`,badges:[zKn(Pe.modelType),Pe.overridden?"override":"shared"],inputPortIds:[...ae?.inputs??[],...ae?.environmentInputs??[]].map(Ne=>Ne.id),outputPortIds:[...ae?.outputs??[],...ae?.environmentOutputs??[]].map(Ne=>Ne.id),detail:Pe}}}),...rdn(g,"resolved")]}return[...g.applications.filter(Me=>!N||Me.targetIds.some(pe=>N.has(u6(pe)))).filter(oe).map(Me=>({id:Me.id,type:"application",position:{x:0,y:0},data:{...Me,nodeKind:"application",detailMode:x,cyclic:U.has(Me.applicationId),requiredInputPortIds:Me.inputs.filter(pe=>$.has(pe.id)).map(pe=>pe.id),candidatePortIds:[...Me.inputs,...Me.outputs].filter(pe=>H.has(pe.id)).map(pe=>pe.id),previousTimeStepPortIds:Me.inputs.filter(pe=>k.has(pe.id)).map(pe=>pe.id),cycleBreakInputPortIds:Me.inputs.filter(pe=>G.has(pe.id)).map(pe=>pe.id),cycleBreakMode:ie,onCandidateClick:(pe,Pe)=>W(Me,pe,Pe),onPortClick:Z,onCycleBreak:se}})),...rdn(g,"applications")]}function rdn(g,E){const x=g.edges.filter(N=>N.kind==="environment_binding"&&N.projection===E);return[...new Set(x.flatMap(N=>[N.source,N.target]).filter(N=>N.startsWith("environment:")))].map(N=>{const $=N.slice(12),k=g.environments.find(G=>G.id===N),H=cdn(x.filter(G=>G.target===N).map(G=>G.targetPort).filter(Boolean)),U=cdn(x.filter(G=>G.source===N).map(G=>G.sourcePort).filter(Boolean));return{id:N,type:"entity",position:{x:0,y:0},data:{nodeKind:"environment",title:k?.name||$,subtitle:k?.active?"active scene environment":"environment backend",badges:[`${U.length} inputs`,`${H.length} outputs`],inputPortIds:H,outputPortIds:U,detail:k||{provider:$}}}})}function cdn(g){return[...new Set(g)]}function SKn(g,E){return(E==="topology"?[...g.edges,...xKn(g)]:g.edges).filter(M=>MKn(M,E)).map(M=>({id:M.id,source:M.source,target:M.target,sourceHandle:M.sourcePort||void 0,targetHandle:M.targetPort||void 0,type:"modelEdge",data:M,markerEnd:{type:VG.ArrowClosed,color:udn(M),width:16,height:16},style:{stroke:udn(M),strokeWidth:M.cycle?4:["manual_call","initializer"].includes(M.kind)?2.5:1.8,strokeDasharray:M.kind==="previous_timestep"?"7 5":M.kind==="manual_call"?"3 4":M.kind==="initializer"?"8 3":void 0}}))}function xKn(g){const E=[],x=new Set(g.instances.flatMap(M=>M.objectIds.map(u6)));for(const M of g.templates)E.push({id:`topology:model:template:${M.id}`,source:"model:root",target:`template:${M.id}`,kind:"object_topology",projection:"topology",cycle:!1});for(const M of g.instances)E.push({id:`topology:${M.id}:object:${String(M.rootId)}`,source:M.id,target:`object:${String(M.rootId)}`,kind:"object_topology",projection:"topology",cycle:!1});for(const M of g.objects)M.parent===null&&!x.has(u6(M.objectId))&&E.push({id:`topology:model:${M.id}`,source:"model:root",target:M.id,kind:"object_topology",projection:"topology",cycle:!1});return E}function AKn(g,E){const x=new Map;for(const k of g){if(k.parent===null)continue;const H=u6(k.parent);x.set(H,[...x.get(H)??[],k.objectId])}const M=[],N=[E],$=new Set;for(;N.length>0;){const k=N.pop(),H=u6(k);$.has(H)||($.add(H),M.push(k),N.push(...x.get(H)??[]))}return M}function u6(g){const E=String(g);return E.startsWith("object:")?E.slice(7):E}function MKn(g,E){const x=g.projection;return E==="topology"?g.kind==="object_topology"||g.kind==="template_mount":E==="resolved"?x==="resolved":x==="applications"||!x&&!["object_topology","application_target"].includes(g.kind)}function udn(g){return g.cycle?"#cf4937":g.kind==="previous_timestep"?"#317b62":g.kind==="manual_call"?"#be6a54":g.kind==="initializer"?"#7768ae":g.kind==="object_topology"?"#7b7167":g.kind==="environment_binding"?"#367b8b":"#a59687"}function CKn(g){const E=new Set;for(const x of g.applications){for(const M of x.inputs)(g.applications.some($=>$.applicationId!==x.applicationId&&$.outputs.some(k=>k.name===M.name))||g.modelLibrary.some($=>Object.prototype.hasOwnProperty.call($.outputs,M.name)))&&E.add(M.id);for(const M of x.outputs)(g.applications.some($=>$.applicationId!==x.applicationId&&$.inputs.some(k=>k.name===M.name))||g.modelLibrary.some($=>Object.prototype.hasOwnProperty.call($.inputs,M.name)))&&E.add(M.id)}return E}function TKn(g,E){const x=E.role==="input"?"outputs":"inputs";return g.filter(M=>Object.prototype.hasOwnProperty.call(M[x],E.name)).sort((M,N)=>`${M.package}.${M.name}`.localeCompare(`${N.package}.${N.name}`))}function OKn({candidate:g,models:E,applications:x,onSelectModel:M,onSelectApplication:N,onClose:$}){const k=g.port.role==="input"?`Models that compute ${g.port.name}`:`Models that consume ${g.port.name}`;return _.jsxs("section",{className:"candidate-popover",style:{left:Math.min(g.x+8,window.innerWidth-390),top:Math.min(g.y-20,window.innerHeight-480)},children:[_.jsxs("header",{children:[_.jsxs("div",{children:[_.jsx("strong",{children:k}),_.jsx("span",{children:"Exact declared variable-name matches"})]}),_.jsx("button",{onClick:$,children:_.jsx(Jg,{size:15})})]}),_.jsxs("div",{className:"candidate-list",children:[x.length>0&&_.jsx("div",{className:"candidate-section-label",children:"Existing applications"}),x.map(H=>_.jsxs("button",{className:"candidate-card existing",onClick:()=>N(H),children:[_.jsx("strong",{children:H.name||H.applicationId}),_.jsx("span",{children:H.modelName}),_.jsxs("small",{children:[H.targetCount," target",H.targetCount===1?"":"s"]}),_.jsx("div",{children:"Connect without adding another application"})]},H.applicationId)),E.length>0&&_.jsx("div",{className:"candidate-section-label",children:"Available models"}),E.map(H=>_.jsxs("button",{className:"candidate-card",onClick:()=>M(H),children:[_.jsx("strong",{children:H.name}),_.jsx("span",{children:H.process}),_.jsx("small",{children:H.package||H.module}),_.jsxs("div",{children:[Object.keys(H.inputs).length," inputs · ",Object.keys(H.outputs).length," outputs"]})]},H.type))]})]})}function NKn(g,E){return g.filter(x=>x.applicationId!==E.application.applicationId).filter(x=>(E.port.role==="input"?x.outputs:x.inputs).some(N=>N.name===E.port.name)).sort((x,M)=>x.applicationId.localeCompare(M.applicationId))}function IKn(g,E){if(g.port.role==="input"){const M=E.outputs.find(N=>N.name===g.port.name);if(!M)throw new Error(`Application ${E.applicationId} does not output ${g.port.name}.`);return{sourceApplication:E,sourcePort:M,targetApplication:g.application,targetPort:g.port}}const x=E.inputs.find(M=>M.name===g.port.name);if(!x)throw new Error(`Application ${E.applicationId} does not input ${g.port.name}.`);return{sourceApplication:g.application,sourcePort:g.port,targetApplication:E,targetPort:x}}function DKn({selection:g,port:E,initialization:x,interactive:M,onEditApplication:N,onConfigureApplication:$,onRemoveApplication:k,onOverrideApplication:H,onRemoveInstance:U,onEditObject:G,onRemoveObject:ie}){const W=g&&"applicationId"in g&&"selector"in g?g:null,Z=g&&"objectId"in g&&!("applicationId"in g)?g:null,se=g&&"templateId"in g&&"objectIds"in g?g:null;return _.jsxs("aside",{className:"model-inspector",children:[_.jsxs("header",{children:[_.jsx("strong",{children:"Inspector"}),g&&_.jsx("span",{children:BKn(g)})]}),!g&&_.jsxs("div",{className:"empty-inspector",children:[_.jsx(AXn,{size:28}),_.jsx("p",{children:"Select an application, object, execution, or relationship."})]}),g&&_.jsx("pre",{children:JSON.stringify(g,null,2)}),W&&M&&_.jsxs("div",{className:"inspector-actions",children:[_.jsx("button",{onClick:()=>N(W),children:W.owner.scope==="template"?"Edit shared template":"Edit application"}),_.jsx("button",{"data-testid":"configure-application",onClick:()=>$(W),children:"Configure coupling"}),W.owner.scope==="template"&&_.jsx("button",{onClick:()=>H(W),children:"Create override"}),_.jsx("button",{className:"danger",onClick:()=>k(W),children:W.owner.scope==="template"?"Remove from shared template":"Remove application"})]}),se&&M&&_.jsxs("div",{className:"inspector-actions",children:[_.jsx("button",{className:"danger",onClick:()=>U(se),children:"Unmount instance"}),_.jsx("small",{children:"The object subtree is retained."})]}),Z&&M&&_.jsxs("div",{className:"inspector-actions",children:[_.jsx("button",{onClick:()=>G(Z),children:"Edit object"}),_.jsx("button",{className:"danger",onClick:()=>ie(Z),children:"Remove object and descendants"})]}),E&&_.jsxs("section",{children:[_.jsx("h4",{children:"Selected variable"}),_.jsx("code",{children:E.name}),_.jsx("p",{children:E.expectedType})]}),g&&x.length>0&&_.jsxs("section",{className:"inspector-initialization",children:[_.jsx("h4",{children:"Initialization"}),x.slice(0,8).map(oe=>_.jsxs("div",{children:[_.jsx("code",{children:oe.variable}),_.jsx("span",{className:oe.disposition==="unresolved"?"unresolved":"",children:oe.disposition})]},`${oe.applicationId}:${oe.objectId}:${oe.variable}`))]})]})}function _Kn({graph:g,onClose:E,sendCommand:x,interactive:M}){return _.jsxs(Fue,{title:"Diagnostics and cycles",onClose:E,children:[g.diagnostics.map(N=>_.jsxs("article",{className:"diagnostic-card",children:[_.jsx("strong",{children:N.code}),_.jsx("p",{children:N.message}),N.suggestions.map($=>_.jsx("small",{children:$},$))]},`${N.code}:${N.message}`)),g.cycles.map(N=>_.jsxs("article",{className:"cycle-card",children:[_.jsx("strong",{children:N.applicationIds.join(" → ")}),_.jsx("p",{children:"Choose an input to read from the previous timestep."}),N.breakCandidates.map($=>{const k=g.applications.find(H=>H.applicationId===$.applicationId)?.owner;return _.jsxs("button",{disabled:!M||!k,onClick:()=>k&&x({action:"edit",kind:"mark_previous_timestep",applicationRef:k,input:$.input}),children:[$.applicationId,".",$.input]},`${$.applicationId}:${$.objectId}:${$.input}`)})]},N.id)),g.diagnostics.length===0&&g.cycles.length===0&&_.jsx("p",{children:"No diagnostics."})]})}function LKn({graph:g,onClose:E,sendCommand:x,interactive:M}){const N=g.initialization.filter(k=>k.disposition==="unresolved"),$=new Map;for(const k of N){const H=`${k.applicationId}:${k.variable}`;$.set(H,[...$.get(H)||[],k])}return _.jsxs(Fue,{title:"Initialization",onClose:E,children:[[...$.entries()].map(([k,H])=>_.jsx(PKn,{rows:H,interactive:M,sendCommand:x},k)),N.length===0&&_.jsx("p",{children:"No unresolved initial values."})]})}function PKn({rows:g,interactive:E,sendCommand:x}){const[M,N]=Be.useState("float"),[$,k]=Be.useState(""),H=g[0],U={type:M,value:$};return _.jsxs("article",{className:"initialization-group",children:[_.jsxs("header",{children:[_.jsxs("div",{children:[_.jsx("strong",{children:H.variable}),_.jsx("span",{children:H.applicationId})]}),_.jsxs("small",{children:[g.length," object",g.length===1?"":"s"," · expected ",H.expectedType]})]}),_.jsx("p",{children:"Required because the input has no producer, environment source, status value, or usable temporal initialization."}),E&&_.jsxs("div",{className:"initialization-value",children:[_.jsxs("label",{children:["Type",_.jsxs("select",{value:M,onChange:G=>N(G.target.value),children:[_.jsx("option",{value:"float",children:"Float"}),_.jsx("option",{value:"integer",children:"Integer"}),_.jsx("option",{value:"boolean",children:"Boolean"}),_.jsx("option",{value:"symbol",children:"Symbol"}),_.jsx("option",{value:"string",children:"String"}),_.jsx("option",{value:"julia",children:"Julia expression"})]})]}),_.jsxs("label",{children:["Value",_.jsx("input",{value:$,onChange:G=>k(G.target.value)})]}),_.jsx("button",{disabled:!$.trim(),onClick:()=>x({action:"edit",kind:"set_object_statuses",objectIds:g.map(G=>G.objectId),variable:H.variable,value:U}),children:"Set all targets"})]}),_.jsx("div",{className:"initialization-object-list",children:g.map(G=>_.jsxs("div",{children:[_.jsxs("span",{children:["Object ",String(G.objectId)]}),_.jsx("code",{children:G.origin}),E&&_.jsx("button",{disabled:!$.trim(),onClick:()=>x({action:"edit",kind:"set_object_status",objectId:G.objectId,variable:G.variable,value:U}),children:"Set this object"})]},String(G.objectId)))})]})}function $Kn({code:g,onClose:E}){return _.jsx(Fue,{title:"Model code",onClose:E,children:_.jsx("pre",{className:"model-code",children:g||"Model code is available from an interactive editor session."})})}function odn({mode:g,recentPaths:E,currentPath:x,autosavePath:M,onSubmit:N,onClose:$}){const[k,H]=Be.useState(x||"");return _.jsx(Fue,{title:g==="open"?"Open Model":"Save Model",onClose:$,children:_.jsxs("div",{className:"model-file-dialog",children:[_.jsx("p",{children:g==="open"?"Open a Julia script whose final binding is `model = CompositeModel(...)`. Future edits will be saved back to that file.":"After the first save, every successful graph edit automatically rewrites this Julia script."}),_.jsxs("label",{children:["Julia file path",_.jsxs("div",{className:"model-path-input",children:[_.jsx("input",{value:k,onChange:U=>H(U.target.value),placeholder:"/absolute/path/to/model.jl",autoFocus:!0}),_.jsx("button",{className:"primary",disabled:!k.trim(),onClick:()=>N(k.trim()),children:g==="open"?"Open":"Save"})]})]}),g==="open"&&E.length>0&&_.jsxs("section",{children:[_.jsx("strong",{children:"Recent models"}),_.jsx("div",{className:"recent-model-list",children:E.map(U=>_.jsxs("button",{onClick:()=>N(U),children:[_.jsx("span",{children:U.split("/").at(-1)}),_.jsx("small",{children:U})]},U))})]}),g==="open"&&M&&_.jsxs("section",{children:[_.jsx("strong",{children:"Recovery autosave"}),_.jsx("button",{className:"recovery-path",onClick:()=>N(M),children:M})]}),_.jsx("small",{children:"Use Git to version saved composite-model scripts and review scientific configuration changes."})]})})}function RKn({selection:g,initialization:E,onSubmit:x,onClose:M}){const N=E.filter(G=>G.applicationId===g.application.applicationId&&G.variable===g.port.name&&G.disposition!=="supplied"),[$,k]=Be.useState("float"),[H,U]=Be.useState("");return _.jsx("div",{className:"overlay-backdrop",onMouseDown:M,children:_.jsxs("section",{className:"overlay-panel cycle-break-dialog",onMouseDown:G=>G.stopPropagation(),"data-testid":"cycle-break-dialog",children:[_.jsxs("header",{children:[_.jsxs("div",{children:[_.jsx("strong",{children:"Break the current-step cycle"}),_.jsxs("span",{children:[g.application.applicationId,".",g.port.name]})]}),_.jsx("button",{onClick:M,children:_.jsx(Jg,{size:17})})]}),_.jsxs("div",{className:"overlay-content",children:[_.jsx("p",{children:"This changes the application input to read its value from the previous accepted timestep. The model is disconnected from the current value during each run step."}),_.jsxs("div",{className:"cycle-impact",children:[_.jsx("strong",{children:"Application-wide change"}),_.jsxs("span",{children:["It affects all ",g.application.targetCount," targets selected by this application."]})]}),N.length>0&&_.jsxs("fieldset",{children:[_.jsx("legend",{children:"Required initial value"}),_.jsxs("p",{children:[N.length," target",N.length===1?"":"s"," need a value before the first timestep."]}),_.jsxs("div",{className:"form-grid",children:[_.jsxs("label",{children:["Value type",_.jsxs("select",{value:$,onChange:G=>k(G.target.value),children:[_.jsx("option",{value:"float",children:"Float"}),_.jsx("option",{value:"integer",children:"Integer"}),_.jsx("option",{value:"boolean",children:"Boolean"}),_.jsx("option",{value:"symbol",children:"Symbol"}),_.jsx("option",{value:"string",children:"String"}),_.jsx("option",{value:"julia",children:"Julia expression"})]})]}),_.jsxs("label",{children:["Initial value",_.jsx("input",{value:H,onChange:G=>U(G.target.value),autoFocus:!0})]})]})]})]}),_.jsxs("footer",{children:[_.jsx("button",{onClick:M,children:"Cancel"}),_.jsxs("button",{className:"primary",disabled:N.length>0&&!H.trim(),onClick:()=>x(N.length>0,N.length>0?{type:$,value:H}:null),"data-testid":"confirm-cycle-break",children:[_.jsx(Q0n,{size:15})," Use previous timestep"]})]})]})})}function Fue({title:g,onClose:E,children:x}){return _.jsx("div",{className:"overlay-backdrop",onMouseDown:E,children:_.jsxs("section",{className:"overlay-panel",onMouseDown:M=>M.stopPropagation(),children:[_.jsxs("header",{children:[_.jsx("strong",{children:g}),_.jsx("button",{onClick:E,children:_.jsx(Jg,{size:17})})]}),_.jsx("div",{className:"overlay-content",children:x})]})})}function BKn(g){return"applicationId"in g?g.applicationId:"objectId"in g?String(g.objectId):"objectIds"in g?g.name:"entity"in g?"Composite model":"provider"in g?g.provider:"name"in g?g.name:g.kind.replaceAll("_"," ")}function zKn(g){return g.split(".").at(-1)||g}function FKn(g){const E={selectors:[]};return g.targetInstances.length===0&&g.targetScales.length===1&&(E.scale=g.targetScales[0]),g.targetKinds.length===1&&(E.kind=g.targetKinds[0]),g.targetSpecies.length===1&&(E.species=g.targetSpecies[0]),{type:g.targetCount===1?"One":"Many",multiplicity:g.targetCount===1?"one":"many",criteria:E,julia:""}}function Q7e(g,E,x){return`application:${g}:${E}:${x}`}function W7e(){const g=document.getElementById("pse-model-graph-data");if(!g?.textContent)return ndn;try{return JSON.parse(g.textContent)}catch{return ndn}}function JKn(){const g=document.getElementById("pse-editor-config");if(!g?.textContent)return null;try{return JSON.parse(g.textContent)}catch{return null}}class HKn extends Be.Component{state={error:null};static getDerivedStateFromError(E){return{error:E}}componentDidCatch(E,x){console.error("PlantSimEngine model graph frontend failed",E,x)}render(){return this.state.error?_.jsxs("main",{className:"frontend-error","data-testid":"frontend-error",children:[_.jsx(dke,{size:28}),_.jsx("h1",{children:"The graph view could not be rendered"}),_.jsx("p",{children:this.state.error.message}),_.jsxs("button",{onClick:()=>window.location.reload(),children:[_.jsx(_Xn,{size:15})," Reload graph"]})]}):this.props.children}}hzn.createRoot(document.getElementById("root")).render(_.jsx(Be.StrictMode,{children:_.jsx(HKn,{children:_.jsx(jKn,{})})})); +... Falling back to non-web worker version.`);if(!Ne.workerFactory){var on=x("./elk-worker.min.js"),An=on.Worker;Ne.workerFactory=function(xn){return new An(xn)}}return U(this,Pe,[Ne])}return se(Pe,pe),k(Pe)})(ee);Object.defineProperty(M.exports,"__esModule",{value:!0}),M.exports=Me,Me.default=Me},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(x,M,N){var $=typeof Worker<"u"?Worker:void 0;M.exports=$},{}]},{},[3])(3)})})(K7e)),K7e.exports}var uKn=cKn();const oKn=bke(uKn);function ebn(g){if(g.detailMode==="overview")return 190;const E=Math.max(g.applicationId.length,g.modelName.length,...g.inputs.map(x=>x.name.length),...g.outputs.map(x=>x.name.length));return Math.max(310,Math.min(540,235+E*7))}const sKn=new oKn;async function lKn(g,E,x){const M={id:"root",layoutOptions:fKn(x),children:g.map(k=>({id:k.id,width:aKn(k.data),height:hKn(k.data),ports:k.data.nodeKind==="application"?[...nbn(k.data).map((H,U)=>lue(H.id,"WEST",U)),...tbn(k.data).map((H,U)=>lue(H.id,"EAST",U))]:[...(k.data.inputPortIds??[]).map((H,U)=>lue(H,"WEST",U)),...(k.data.outputPortIds??[]).map((H,U)=>lue(H,"EAST",U))],layoutOptions:{"org.eclipse.elk.portConstraints":"FIXED_ORDER"}})),edges:E.map(k=>({id:k.id,sources:[k.sourceHandle??k.source],targets:[k.targetHandle??k.target]}))},N=await sKn.layout(M),$=new Map((N.children??[]).map(k=>[k.id,{x:k.x??0,y:k.y??0}]));return g.map(k=>({...k,position:$.get(k.id)??k.position}))}function fKn(g){return{"elk.algorithm":g==="topology"?"mrtree":"layered","elk.direction":g==="topology"?"DOWN":"RIGHT","elk.spacing.nodeNode":g==="overview"?"24":g==="compact"?"32":"56","elk.layered.spacing.nodeNodeBetweenLayers":g==="overview"?"48":g==="compact"?"60":"110","elk.layered.nodePlacement.strategy":"BRANDES_KOEPF","elk.layered.crossingMinimization.semiInteractive":"true","elk.edgeRouting":"ORTHOGONAL"}}function lue(g,E,x){return{id:g,width:9,height:9,layoutOptions:{"org.eclipse.elk.port.side":E,"org.eclipse.elk.port.index":String(x)}}}function aKn(g){return g.nodeKind==="application"?ebn(g):240}function hKn(g){if(g.nodeKind!=="application")return 112;if(g.detailMode==="overview")return 108;const E=Math.max(g.inputs.length,g.outputs.length),x=Math.max(g.environmentInputs.length,g.environmentOutputs.length);return Math.max(178,142+E*27+(x>0?32+x*27:0))}function nbn(g){return[...g.inputs,...g.environmentInputs]}function tbn(g){return[...g.outputs,...g.environmentOutputs]}function dKn({data:g,selected:E}){const x=g.detailMode==="overview",M=new Set(g.requiredInputPortIds),N=new Set(g.candidatePortIds),$=new Set(g.previousTimeStepPortIds),k=new Set(g.cycleBreakInputPortIds),H=wKn(g);return _.jsxs("section",{className:`model-node application-node ${x?"overview-node":""} ${g.cyclic?"cyclic":""} ${E?"selected":""}`,"data-testid":`application-node-${g.applicationId}`,style:{width:ebn(g)},children:[x&&_.jsx(gKn,{inputs:nbn(g),outputs:tbn(g)}),_.jsxs("header",{className:"node-header",children:[_.jsxs("div",{children:[_.jsx("div",{className:"process",children:g.name||g.applicationId}),_.jsx("div",{className:"model-type",children:g.modelName})]}),_.jsx(Y0n,{size:18})]}),x?_.jsxs("div",{className:"overview-node-summary",children:[_.jsxs("span",{children:[g.targetCount," targets"]}),_.jsxs("span",{children:[g.inputs.length," in"]}),_.jsxs("span",{children:[g.outputs.length," out"]})]}):_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"node-meta",children:[_.jsxs("span",{className:"meta-chip",title:g.selector.julia,children:[_.jsx(xXn,{size:13})," ",H]}),_.jsxs("span",{className:"meta-chip",title:g.cadence.julia,children:[_.jsx(CXn,{size:13})," ",pKn(g)]})]}),_.jsxs("div",{className:"target-summary",children:[_.jsx("strong",{children:g.targetCount})," concrete target",g.targetCount===1?"":"s"]}),_.jsxs("div",{className:"ports-grid",children:[_.jsx(fue,{title:"Inputs",side:"input",ports:g.inputs,required:M,candidates:N,previous:$,cycleBreaks:k,cycleBreakMode:g.cycleBreakMode,application:g,onCandidateClick:g.onCandidateClick,onPortClick:g.onPortClick,onCycleBreak:g.onCycleBreak}),_.jsx(fue,{title:"Outputs",side:"output",ports:g.outputs,required:M,candidates:N,previous:$,cycleBreaks:k,cycleBreakMode:g.cycleBreakMode,application:g,onCandidateClick:g.onCandidateClick,onPortClick:g.onPortClick,onCycleBreak:g.onCycleBreak})]}),(g.environmentInputs.length>0||g.environmentOutputs.length>0)&&_.jsxs("div",{className:"ports-grid environment-ports",children:[_.jsx(fue,{title:"Environment inputs",side:"input",ports:g.environmentInputs,required:M,candidates:new Set,previous:new Set,cycleBreaks:new Set,cycleBreakMode:!1,application:g,onPortClick:g.onPortClick}),_.jsx(fue,{title:"Environment outputs",side:"output",ports:g.environmentOutputs,required:M,candidates:new Set,previous:new Set,cycleBreaks:new Set,cycleBreakMode:!1,application:g,onPortClick:g.onPortClick})]})]})]})}function bKn({data:g,selected:E}){return _.jsxs("section",{className:`entity-node ${g.nodeKind} ${E?"selected":""}`,"data-testid":`${g.nodeKind}-node`,children:[(g.inputPortIds?.length?g.inputPortIds:[void 0]).map((x,M)=>_.jsx(h5,{id:x,type:"target",position:ur.Left,style:{top:`${Tue(M,g.inputPortIds?.length??1)}%`}},x??"target")),_.jsxs("header",{children:[_.jsx("strong",{children:g.title}),_.jsx("span",{children:g.subtitle})]}),_.jsx("div",{className:"badges",children:g.badges.map(x=>_.jsx("span",{className:"meta-chip",children:x},x))}),(g.outputPortIds?.length?g.outputPortIds:[void 0]).map((x,M)=>_.jsx(h5,{id:x,type:"source",position:ur.Right,style:{top:`${Tue(M,g.outputPortIds?.length??1)}%`}},x??"source"))]})}function fue({title:g,side:E,ports:x,required:M,candidates:N,previous:$,cycleBreaks:k,cycleBreakMode:H,application:U,onCandidateClick:G,onPortClick:ie,onCycleBreak:W}){return _.jsxs("div",{className:`port-column ${E}`,children:[_.jsx("div",{className:"port-title",children:g}),x.map(Z=>_.jsxs("div",{className:`port ${M.has(Z.id)?"required-input":""} ${$.has(Z.id)?"previous":""}`,"data-testid":`port-${E}-${Z.name}`,title:`${Z.name}: ${Z.defaultJulia}`,onClick:se=>{se.stopPropagation(),ie?.(Z)},children:[E==="input"&&_.jsx(h5,{id:Z.id,type:"target",position:ur.Left}),_.jsx("span",{children:Z.name}),N.has(Z.id)&&_.jsx("button",{className:"port-candidate-button nodrag nopan",type:"button",title:E==="input"?"Models that compute this variable":"Models that consume this variable","aria-label":E==="input"?`Models that compute ${Z.name}`:`Models that consume ${Z.name}`,onClick:se=>{se.stopPropagation();const oe=se.currentTarget.getBoundingClientRect();G?.(Z,{x:oe.right,y:oe.top+oe.height/2})},children:_.jsx(SA,{size:11})}),E==="input"&&H&&k.has(Z.id)&&_.jsx("button",{className:"cycle-port-break nodrag nopan",type:"button",title:`Read ${Z.name} from the previous accepted timestep`,"aria-label":`Break cycle at ${U.applicationId}.${Z.name}`,"data-testid":`cycle-break-${U.applicationId}-${Z.name}`,onClick:se=>{se.stopPropagation(),W?.(U,Z)},children:_.jsx(Q0n,{size:12})}),$.has(Z.id)&&_.jsx("small",{className:"previous-label",children:"t-1"}),E==="output"&&_.jsx(h5,{id:Z.id,type:"source",position:ur.Right})]},Z.id))]})}function gKn({inputs:g,outputs:E}){return _.jsxs(_.Fragment,{children:[g.map((x,M)=>_.jsx(h5,{id:x.id,type:"target",position:ur.Left,style:{top:`${Tue(M,g.length)}%`}},x.id)),E.map((x,M)=>_.jsx(h5,{id:x.id,type:"source",position:ur.Right,style:{top:`${Tue(M,E.length)}%`}},x.id))]})}function Tue(g,E){return E<=1?52:28+g/(E-1)*48}function wKn(g){const E=[...g.targetInstances,...g.targetScales,...g.targetKinds];return E.length>0?E.slice(0,2).join(" / "):g.selector.type}function pKn(g){return g.cadence.mode==="default"?"default rate":g.cadence.mode==="period"?`${g.cadence.value} ${g.cadence.unit}`:g.cadence.julia}function mKn({id:g,sourceX:E,sourceY:x,targetX:M,targetY:N,sourcePosition:$=ur.Right,targetPosition:k=ur.Left,markerEnd:H,style:U,data:G}){const[ie,W,Z]=Aue({sourceX:E,sourceY:x,targetX:M,targetY:N,sourcePosition:$,targetPosition:k,borderRadius:14,offset:24}),se=vKn(G);return _.jsxs(_.Fragment,{children:[_.jsx(uq,{id:g,path:ie,markerEnd:H,style:U,interactionWidth:18}),se&&_.jsx(qUn,{children:_.jsx("div",{className:`edge-chip ${G?.kind??""} ${G?.cycle?"cycle":""}`,style:{transform:`translate(-50%, -50%) translate(${W}px, ${Z-12}px)`},children:se})})]})}function vKn(g){return g?g.kind==="manual_call"?g.call||"call":g.kind==="initializer"?g.call||"initializer":g.kind==="object_topology"||g.kind==="application_target"?"":g.sourceVariable&&g.targetVariable?g.sourceVariable===g.targetVariable?g.sourceVariable:`${g.sourceVariable} → ${g.targetVariable}`:g.kind.replaceAll("_"," "):""}const V7e=_ke("source","degree_days","ToyDegreeDaysCumulModel",[],["TT_cu"]),aue=_ke("lai","lai_dynamic","ToyLAIModel",["TT_cu"],["LAI"]),Y7e=_ke("light","light_interception","Beer",["LAI"],["aPPFD"]),ndn={schemaVersion:2,level:"applications",metadata:{title:"PlantSimEngine Model Graph",modelRevision:0,objectCount:1,instanceCount:0,applicationCount:3,executionCount:3,bindingCount:2,callCount:0,unresolvedInitializationCount:1,cyclic:!1,strictlyCompiled:!0,sceneEnvironmentId:null},objects:[{id:"object:plant",objectId:"plant",scale:"Plant",kind:"plant",species:null,name:"plant",instance:null,parent:null,children:[],hasGeometry:!1,hasStatus:!0}],templates:[],instances:[],applications:[V7e,aue,Y7e],executions:[V7e,aue,Y7e].map(g=>({id:`execution:${g.applicationId}:plant`,applicationId:g.applicationId,applicationNodeId:g.id,objectId:"plant",objectNodeId:"object:plant",modelType:g.modelType,modelParameters:{},overridden:!1})),edges:[idn(V7e,"TT_cu",aue,"TT_cu"),idn(aue,"LAI",Y7e,"LAI")],modelLibrary:[],environments:[],initialization:[{applicationId:"source",objectId:"plant",variable:"TT",role:"input",disposition:"unresolved",value:"-Inf",valueJulia:"-Inf",expectedType:"Float64",declaredType:"Float64",originalType:null,transformedType:null,effectiveType:null,statusTransformApplied:!1,statusTransformChanged:!1,typeMappingApplied:!1,typeMappingChanged:!1,typeMappingRule:null,sourceApplicationIds:[],sourceObjectIds:[],sourceVariable:null,origin:"missing",previousTimeStep:!1}],diagnostics:[],cycles:[],availableActions:["inspect"]};function _ke(g,E,x,M,N){return{id:`application:${g}`,applicationId:g,owner:{scope:"global",applicationId:g,instance:null,templateId:null},name:g,process:E,modelType:x,modelName:x,module:"PlantSimEngine.Examples",package:"PlantSimEngine",modelParameters:{},selector:{type:"One",multiplicity:"one",criteria:{scale:"Plant"},julia:"One(scale=:Plant)"},targetIds:["plant"],targetCount:1,targetScales:["Plant"],targetKinds:["plant"],targetSpecies:[],targetInstances:[],cadence:{mode:"default",value:null,unit:null,julia:"nothing"},clock:null,inputs:M.map($=>tdn(g,"input",$)),outputs:N.map($=>tdn(g,"output",$)),environmentInputs:[],environmentOutputs:[],inputBindings:{},callBindings:{},environment:null,environmentBindings:{},environmentWindow:{mode:"default",value:null,unit:null,julia:"nothing"},outputRouting:{},updates:[],modelStorage:"shared_application",objectOverrides:[]}}function tdn(g,E,x){return{id:`application:${g}:${E}:${x}`,name:x,role:E,default:"-Inf",defaultJulia:"-Inf",expectedType:"Float64"}}function idn(g,E,x,M){return{id:`binding:${g.applicationId}:${E}:${x.applicationId}:${M}`,source:g.id,target:x.id,sourcePort:`application:${g.applicationId}:output:${E}`,targetPort:`application:${x.applicationId}:input:${M}`,sourceVariable:E,targetVariable:M,sourceApplicationId:g.applicationId,targetApplicationId:x.applicationId,kind:"inferred_same_object",cycle:!1,projection:"applications"}}const yKn={application:dKn,entity:bKn},kKn={modelEdge:mKn};function jKn(){const[g,E]=Be.useState(W7e),[x,M]=Be.useState(()=>W7e().level),[N,$]=Be.useState(()=>W7e().metadata.applicationCount>24?"overview":"detail"),[k,H]=Be.useState(""),[U,G]=Be.useState(null),[ie,W]=Be.useState(null),[Z,se]=Be.useState(null),[oe,ee]=Be.useState(null),[Me,pe]=Be.useState(!1),[Pe,ae]=Be.useState(!1),[Ne,Xe]=Be.useState(!1),[ln,on]=Be.useState(!1),[An,xn]=Be.useState(!1),[tt,vn]=Be.useState(""),[wn,Y]=Be.useState(null),[Je,pn]=Be.useState(null),[xe,qe]=Be.useState([]),[fn,$e]=Be.useState(null),[Mn,ye]=Be.useState(!1),[Re,Hn]=Be.useState(!1),[rt,Jt]=Be.useState(!1),[di,Gt]=Be.useState(null),[xt,si]=Be.useState(null),[Kr,Er]=Be.useState(null),[Mt,bi]=Be.useState(!1),[zi,cu]=Be.useState(null),[Fu,Rs]=Be.useState(!1),[ia,ef]=Be.useState(null),[Oa,Cc]=Be.useState(null),[o0,xb]=Be.useState(null),[Sl,cd]=Be.useState(null),[s0,uh]=Be.useState(null),[ud,b5]=Be.useState(!1),[l0,Cp]=Be.useState(null),[l6,Ab,ra]=UUn([]),[od,Sf,f6]=XUn([]),oh=Be.useMemo(JKn,[]),Tp=Be.useMemo(()=>new Map(g.applications.map(vt=>[vt.applicationId,vt])),[g.applications]),Gg=Be.useMemo(()=>new Set(g.initialization.filter(vt=>vt.role==="input"&&vt.disposition==="unresolved").map(vt=>Q7e(vt.applicationId,"input",vt.variable))),[g.initialization]),qg=Be.useMemo(()=>new Set(g.initialization.filter(vt=>vt.role==="input"&&vt.previousTimeStep).map(vt=>Q7e(vt.applicationId,"input",vt.variable))),[g.initialization]),Ug=Be.useMemo(()=>new Set(g.cycles.flatMap(vt=>vt.applicationIds)),[g.cycles]),sd=Be.useMemo(()=>new Set(g.cycles.flatMap(vt=>vt.breakCandidates.map(kc=>Q7e(kc.applicationId,"input",kc.input)))),[g.cycles]),Xg=Be.useMemo(()=>CKn(g),[g]),Mb=Be.useMemo(()=>oe?TKn(g.modelLibrary,oe.port):[],[oe,g.modelLibrary]),g5=Be.useMemo(()=>oe?NKn(g.applications,oe):[],[oe,g.applications]),Op=Be.useMemo(()=>{const vt=new Map;for(const kc of g.applications)for(const tc of[...kc.inputs,...kc.outputs])vt.set(tc.id,{application:kc,port:tc});return vt},[g.applications]),Np=Be.useMemo(()=>ie?new Set(ie.objectIds.map(u6)):null,[ie]);Be.useEffect(()=>{if(!oh?.websocketUrl)return;const vt=new WebSocket(oh.websocketUrl);return $e(vt),vt.addEventListener("open",()=>{ye(!0),Gt(null)}),vt.addEventListener("close",()=>{ye(!1),Gt("Editor connection closed.")}),vt.addEventListener("message",kc=>{const tc=JSON.parse(kc.data);tc.graph&&E(tc.graph),typeof tc.modelCode=="string"&&vn(tc.modelCode),Y(tc.autosavePath??null),pn(tc.savePath??null),qe(tc.recentPaths??[]),tc.selectorPreview&&uh(tc.selectorPreview),tc.targetPreview&&Er(tc.targetPreview),tc.instancePreview&&cu(tc.instancePreview),tc.ok===!1&&(uh(null),Er(null),cu(null)),Hn(!!tc.canUndo),Jt(!!tc.canRedo),Gt(tc.ok===!1?tc.diagnostics?.[0]||"The edit failed.":null)}),()=>vt.close()},[oh?.websocketUrl]),Be.useEffect(()=>{g.metadata.cyclic||(b5(!1),Cp(null))},[g.metadata.cyclic]);const uu=Be.useCallback(vt=>{if(!fn||fn.readyState!==WebSocket.OPEN){Gt("This action requires an interactive Julia editor session.");return}fn.send(JSON.stringify(vt))},[fn]),w5=Be.useCallback((vt,kc,tc)=>{G(vt),se(kc),ee({application:vt,port:kc,x:tc.x,y:tc.y})},[]);Be.useEffect(()=>{const vt=EKn({graph:g,view:x,detailMode:N,query:k,scopedObjectIds:Np,unresolvedPortIds:Gg,previousPortIds:qg,candidatePortIds:Xg,cyclicApplications:Ug,cycleBreakPortIds:sd,cycleBreakMode:ud,openCandidates:w5,onPortClick:se,onCycleBreak:(f0,Yg)=>Cp({application:f0,port:Yg})}),kc=new Set(vt.map(f0=>f0.id)),tc=SKn(g,x).filter(f0=>kc.has(f0.source)&&kc.has(f0.target));lKn(vt,tc,x==="topology"?"topology":N==="overview"?"overview":"data_flow").then(Ab),Sf(tc)},[Xg,ud,sd,Ug,N,g,w5,qg,k,Np,Sf,Ab,Gg,x]);const Kg=Be.useCallback((vt,kc)=>{if(kc.data.nodeKind==="application")G(Tp.get(kc.data.applicationId)??null);else if(G(kc.data.detail),kc.data.nodeKind==="object"){const tc=kc.data.detail;W({label:`subtree ${tc.name||String(tc.objectId)}`,objectIds:AKn(g.objects,tc.objectId)})}else if(kc.data.nodeKind==="instance"){const tc=kc.data.detail;W({label:`instance ${tc.name}`,objectIds:tc.objectIds})}else kc.data.nodeKind==="model"&&W(null);se(null)},[Tp,g.objects]),rv=Be.useCallback(vt=>{oe&&(Er(null),si({mode:"add",initialModelType:vt.type,suggestedSelector:FKn(oe.application)}),Mn||Gt(`${vt.name} matches ${oe.port.name}. Start an interactive Julia editor session to add it to the composite model.`),ee(null))},[oe,Mn]),p5=Be.useCallback(vt=>{if(!Mn){Gt("Adding or updating an application requires an interactive Julia editor session."),si(null);return}uu({action:"edit",kind:vt.applicationRef?"update_application":"add_application",...vt}),si(null)},[Mn,uu]),Vg=Be.useCallback(vt=>{if(!Mn){Gt("Adding a template instance requires an interactive Julia editor session.");return}uu({action:"edit",kind:"add_instance",...vt}),bi(!1),cu(null)},[Mn,uu]),cv=Be.useCallback(vt=>{if(!Mn){Gt("Creating a binding requires an interactive Julia editor session."),cd(null);return}uu({action:"edit",kind:"set_input_binding",...vt}),cd(null)},[Mn,uu]),m5=Be.useCallback(vt=>{if(!Mn){Gt("Adding or updating an object requires an interactive Julia editor session."),ef(null);return}uu({action:"edit",kind:ia?.mode==="update"?"update_object":"add_object",objectId:vt.objectId,configuration:vt.configuration}),ef(null)},[Mn,ia?.mode,uu]),v5=Be.useCallback(vt=>{if(!Mn){Gt("Creating an override requires an interactive Julia editor session."),Cc(null);return}uu({action:"edit",kind:vt.scope==="instance"?"set_instance_override":"set_object_override",...vt}),Cc(null)},[Mn,uu]),b1=Be.useCallback(vt=>{if(!Mn){Gt("Removing an override requires an interactive Julia editor session.");return}uu({action:"edit",kind:vt.scope==="instance"?"remove_instance_override":"remove_object_override",...vt}),Cc(null)},[Mn,uu]),Ws=Be.useCallback(vt=>{if(!vt.sourceHandle||!vt.targetHandle)return;const kc=Op.get(vt.sourceHandle),tc=Op.get(vt.targetHandle);if(!kc||!tc||kc.port.role!=="output"||tc.port.role!=="input"){Gt("Connect an application output to an application input.");return}cd({sourceApplication:kc.application,sourcePort:kc.port,targetApplication:tc.application,targetPort:tc.port}),uh(null)},[Op]),xf=Be.useMemo(()=>{if(!U)return g.initialization;if("applicationId"in U)return g.initialization.filter(vt=>vt.applicationId===U.applicationId);if("objectId"in U)return g.initialization.filter(vt=>String(vt.objectId)===String(U.objectId));if("objectIds"in U){const vt=new Set(U.objectIds.map(u6));return g.initialization.filter(kc=>vt.has(u6(kc.objectId)))}return g.initialization},[g.initialization,U]);return _.jsxs("main",{className:"model-editor-shell","data-testid":"model-graph-viewer",children:[_.jsxs("header",{className:"model-toolbar",children:[_.jsxs("div",{className:"model-brand",children:[_.jsx("span",{className:"brand-mark"}),_.jsxs("div",{children:[_.jsx("small",{children:"PLANTSIMENGINE"}),_.jsx("strong",{children:"Model Graph"})]})]}),_.jsxs("div",{className:"model-search",children:[_.jsx(PXn,{size:17}),_.jsx("input",{value:k,onChange:vt=>H(vt.target.value),placeholder:"Search application, object, or variable"}),k&&_.jsx("button",{"aria-label":"Clear search",onClick:()=>H(""),children:_.jsx(Jg,{size:15})})]}),_.jsxs("div",{className:"model-counts",children:[_.jsxs("span",{children:[g.metadata.applicationCount," applications"]}),_.jsxs("span",{children:[g.metadata.objectCount," objects"]}),g.metadata.unresolvedInitializationCount>0&&_.jsxs("button",{className:"count-warning",onClick:()=>ae(!0),children:[_.jsx(MXn,{size:14})," ",g.metadata.unresolvedInitializationCount," init"]}),g.diagnostics.length>0&&_.jsxs("button",{className:"count-error",onClick:()=>pe(!0),children:[_.jsx(dke,{size:14})," ",g.diagnostics.length]})]}),_.jsxs("nav",{className:"view-tabs","aria-label":"Graph projection",children:[_.jsxs("button",{className:x==="applications"?"active":"",onClick:()=>M("applications"),children:[_.jsx(Y0n,{size:15})," Applications"]}),_.jsxs("button",{className:x==="topology"?"active":"",onClick:()=>M("topology"),children:[_.jsx(NXn,{size:15})," Objects"]}),_.jsxs("button",{className:x==="resolved"?"active":"",onClick:()=>M("resolved"),children:[_.jsx(IXn,{size:15})," Executions"]})]}),_.jsxs("div",{className:"model-actions",children:[oh&&_.jsxs("button",{"data-testid":"open-model",onClick:()=>on(!0),children:[_.jsx(OXn,{size:15})," Open"]}),oh&&_.jsxs("button",{"data-testid":"save-model",onClick:()=>xn(!0),children:[_.jsx(LXn,{size:15})," ",Je?"Saved":"Save"]}),x!=="topology"&&_.jsx("button",{className:N==="overview"?"overview-cta":"",onClick:()=>$(vt=>vt==="overview"?"detail":"overview"),children:N==="overview"?"Overview Mode - Show Detailed View":"Show Overview"}),oh&&_.jsxs("button",{"data-testid":"add-application",onClick:()=>{Er(null),si({mode:"add"})},children:[_.jsx(SA,{size:15})," Add application"]}),oh&&_.jsxs("button",{"data-testid":"add-object",onClick:()=>ef({mode:"add"}),children:[_.jsx(SA,{size:15})," Add object"]}),oh&&g.templates.length>0&&_.jsxs("button",{"data-testid":"add-instance",onClick:()=>{cu(null),bi(!0)},children:[_.jsx(SA,{size:15})," Add instance"]}),oh&&_.jsx("button",{"data-testid":"configure-environment",onClick:()=>Rs(!0),children:"Environment"}),oh&&_.jsx("button",{disabled:!Re,onClick:()=>uu({action:"undo"}),"aria-label":"Undo",children:_.jsx($Xn,{size:15})}),oh&&_.jsx("button",{disabled:!rt,onClick:()=>uu({action:"redo"}),"aria-label":"Redo",children:_.jsx(DXn,{size:15})}),_.jsxs("button",{onClick:()=>Xe(!0),children:[_.jsx(TXn,{size:15})," Model code"]})]})]}),g.metadata.cyclic&&_.jsxs("section",{className:"cycle-callout","data-testid":"cycle-callout",children:[_.jsx(dke,{size:19}),_.jsxs("div",{children:[_.jsx("strong",{children:"Current-step dependency cycle"}),_.jsx("span",{children:"Select a cycle input to read its previous accepted timestep value."})]}),_.jsx("button",{className:ud?"active":"",onClick:()=>{M("applications"),$("detail"),b5(vt=>!vt)},"data-testid":"choose-cycle-break",children:ud?"Cancel break selection":"Choose a break point in graph"})]}),di&&_.jsxs("div",{className:"editor-feedback",children:[di,_.jsx("button",{onClick:()=>Gt(null),children:_.jsx(Jg,{size:14})})]}),ie&&_.jsxs("section",{className:"graph-scope-filter","data-testid":"graph-scope-filter",children:[_.jsxs("span",{children:["Showing ",x==="resolved"?"executions":x==="applications"?"applications":"topology"," for ",_.jsx("strong",{children:ie.label})," (",ie.objectIds.length," objects)"]}),x==="topology"&&_.jsx("button",{onClick:()=>M("applications"),children:"Show related applications"}),_.jsxs("button",{"aria-label":"Clear graph scope",onClick:()=>W(null),children:[_.jsx(Jg,{size:14})," Clear"]})]}),_.jsxs("section",{className:"model-workspace",children:[_.jsx("div",{className:"flow-wrap",children:_.jsxs(HUn,{nodes:l6,edges:od,nodeTypes:yKn,edgeTypes:kKn,onNodesChange:ra,onEdgesChange:f6,onConnect:Ws,onNodeClick:Kg,onEdgeClick:(vt,kc)=>G(kc.data??null),fitView:!0,minZoom:.05,maxZoom:2,children:[_.jsx(WUn,{color:"#d8cdbc",gap:22,size:1}),_.jsx(cXn,{}),_.jsx(mXn,{pannable:!0,zoomable:!0})]})}),_.jsx(DKn,{selection:U,port:Z,initialization:xf,interactive:Mn,onEditApplication:vt=>{Er(null),si({mode:"update",application:vt})},onRemoveApplication:vt=>uu({action:"edit",kind:"remove_application",applicationRef:vt.owner}),onConfigureApplication:vt=>xb(vt.applicationId),onOverrideApplication:Cc,onRemoveInstance:vt=>uu({action:"edit",kind:"remove_instance",name:vt.name}),onEditObject:vt=>ef({mode:"update",object:vt}),onRemoveObject:vt=>uu({action:"edit",kind:"remove_object",objectId:vt.objectId,recursive:!0})})]}),oe&&(Mb.length>0||g5.length>0)&&_.jsx(OKn,{candidate:oe,models:Mb,applications:g5,onSelectModel:rv,onSelectApplication:vt=>{cd(IKn(oe,vt)),uh(null),ee(null)},onClose:()=>ee(null)}),Me&&_.jsx(_Kn,{graph:g,onClose:()=>pe(!1),sendCommand:uu,interactive:Mn}),Pe&&_.jsx(LKn,{graph:g,onClose:()=>ae(!1),sendCommand:uu,interactive:Mn}),Ne&&_.jsx($Kn,{code:tt,onClose:()=>Xe(!1)}),ln&&_.jsx(odn,{mode:"open",recentPaths:xe,currentPath:Je,autosavePath:wn,onSubmit:vt=>{uu({action:"open_model_code",path:vt}),on(!1)},onClose:()=>on(!1)}),An&&_.jsx(odn,{mode:"save",recentPaths:xe,currentPath:Je,autosavePath:wn,onSubmit:vt=>{uu({action:"save_model_code",path:vt}),xn(!1)},onClose:()=>xn(!1)}),xt&&_.jsx(RXn,{mode:xt.mode,models:g.modelLibrary,objects:g.objects,application:xt.application,initialModelType:xt.initialModelType,suggestedSelector:xt.suggestedSelector,nameReadOnly:xt.application?.owner.scope==="template",preview:Kr,onPreview:vt=>{Er(null),uu({action:"preview_application_targets",selector:vt,applicationRef:xt.application?.owner})},onSubmit:p5,onClose:()=>{si(null),Er(null)}}),Sl&&_.jsx(XXn,{endpoints:Sl,objects:g.objects,preview:s0,onPreview:vt=>{uh(null),uu({action:"preview_input_binding",...vt})},onSubmit:cv,onClose:()=>{cd(null),uh(null)}}),ia&&_.jsx(tKn,{mode:ia.mode,objects:g.objects,object:ia.object,onSubmit:m5,onClose:()=>ef(null)}),Mt&&_.jsx(eKn,{templates:g.templates,instances:g.instances,objects:g.objects,preview:zi,onPreview:vt=>{cu(null),uu({action:"preview_instance",...vt})},onSubmit:Vg,onClose:()=>{bi(!1),cu(null)}}),Fu&&_.jsx(ZXn,{environments:g.environments,activeId:g.metadata.sceneEnvironmentId,onSubmit:vt=>{uu({action:"edit",kind:"set_model_environment",environmentId:vt}),Rs(!1)},onClose:()=>Rs(!1)}),Oa&&_.jsx(rKn,{application:Oa,models:g.modelLibrary,instances:g.instances,onSubmit:v5,onRemove:b1,onClose:()=>Cc(null)}),o0&&Tp.get(o0)&&_.jsx(HXn,{application:Tp.get(o0),applications:g.applications,environments:g.environments,models:g.modelLibrary,onCommand:uu,onClose:()=>xb(null)}),l0&&_.jsx(RKn,{selection:l0,initialization:g.initialization,onSubmit:(vt,kc)=>{uu({action:"edit",kind:"break_cycle",applicationRef:l0.application.owner,input:l0.port.name,initializeMissing:vt,initialValue:kc}),Cp(null)},onClose:()=>Cp(null)})]})}function EKn({graph:g,view:E,detailMode:x,query:M,scopedObjectIds:N,unresolvedPortIds:$,previousPortIds:k,candidatePortIds:H,cyclicApplications:U,cycleBreakPortIds:G,cycleBreakMode:ie,openCandidates:W,onPortClick:Z,onCycleBreak:se}){const oe=Me=>!M||JSON.stringify(Me).toLowerCase().includes(M.toLowerCase());if(E==="topology"){const Me={entity:"model",objectCount:g.metadata.objectCount,instanceCount:g.metadata.instanceCount,applicationCount:g.metadata.applicationCount},pe={id:"model:root",type:"entity",position:{x:0,y:0},data:{nodeKind:"model",title:g.metadata.title||"Composite model",subtitle:"model root",badges:[`${g.metadata.instanceCount} instances`,`${g.metadata.objectCount} objects`],detail:Me}},Pe=g.templates.filter(oe).map(Xe=>({id:`template:${Xe.id}`,type:"entity",position:{x:0,y:0},data:{nodeKind:"template",title:Xe.name,subtitle:Xe.source==="catalog"?"template preset":"model-local template",badges:[`${Xe.applications.length} applications`,`${Xe.mountedInstances.length} mounts`],detail:Xe}})),ae=g.instances.filter(oe).map(Xe=>({id:Xe.id,type:"entity",position:{x:0,y:0},data:{nodeKind:"instance",title:Xe.name,subtitle:[Xe.kind,Xe.species].filter(Boolean).join(" · ")||"object instance",badges:[`${Xe.objectIds.length} objects`,`${Xe.applicationIds.length} applications`,`${Xe.instanceOverrides.length+Xe.objectOverrides.length} overrides`],detail:Xe}})),Ne=g.objects.filter(oe).map(Xe=>({id:Xe.id,type:"entity",position:{x:0,y:0},data:{nodeKind:"object",title:Xe.name||String(Xe.objectId),subtitle:[Xe.kind,Xe.scale,Xe.instance].filter(Boolean).join(" · "),badges:[Xe.species,Xe.hasStatus?"status":null,Xe.hasGeometry?"geometry":null].filter(Boolean),detail:Xe}}));return[pe,...Pe,...ae,...Ne]}if(E==="resolved"){const Me=new Map(g.applications.map(Pe=>[Pe.applicationId,Pe]));return[...g.executions.filter(Pe=>!N||N.has(u6(Pe.objectId))).filter(oe).map(Pe=>{const ae=Me.get(Pe.applicationId);return{id:Pe.id,type:"entity",position:{x:0,y:0},data:{nodeKind:"execution",title:Pe.applicationId,subtitle:`object ${String(Pe.objectId)}`,badges:[zKn(Pe.modelType),Pe.overridden?"override":"shared"],inputPortIds:[...ae?.inputs??[],...ae?.environmentInputs??[]].map(Ne=>Ne.id),outputPortIds:[...ae?.outputs??[],...ae?.environmentOutputs??[]].map(Ne=>Ne.id),detail:Pe}}}),...rdn(g,"resolved")]}return[...g.applications.filter(Me=>!N||Me.targetIds.some(pe=>N.has(u6(pe)))).filter(oe).map(Me=>({id:Me.id,type:"application",position:{x:0,y:0},data:{...Me,nodeKind:"application",detailMode:x,cyclic:U.has(Me.applicationId),requiredInputPortIds:Me.inputs.filter(pe=>$.has(pe.id)).map(pe=>pe.id),candidatePortIds:[...Me.inputs,...Me.outputs].filter(pe=>H.has(pe.id)).map(pe=>pe.id),previousTimeStepPortIds:Me.inputs.filter(pe=>k.has(pe.id)).map(pe=>pe.id),cycleBreakInputPortIds:Me.inputs.filter(pe=>G.has(pe.id)).map(pe=>pe.id),cycleBreakMode:ie,onCandidateClick:(pe,Pe)=>W(Me,pe,Pe),onPortClick:Z,onCycleBreak:se}})),...rdn(g,"applications")]}function rdn(g,E){const x=g.edges.filter(N=>N.kind==="environment_binding"&&N.projection===E);return[...new Set(x.flatMap(N=>[N.source,N.target]).filter(N=>N.startsWith("environment:")))].map(N=>{const $=N.slice(12),k=g.environments.find(G=>G.id===N),H=cdn(x.filter(G=>G.target===N).map(G=>G.targetPort).filter(Boolean)),U=cdn(x.filter(G=>G.source===N).map(G=>G.sourcePort).filter(Boolean));return{id:N,type:"entity",position:{x:0,y:0},data:{nodeKind:"environment",title:k?.name||$,subtitle:k?.active?"active scene environment":"environment backend",badges:[`${U.length} inputs`,`${H.length} outputs`],inputPortIds:H,outputPortIds:U,detail:k||{provider:$}}}})}function cdn(g){return[...new Set(g)]}function SKn(g,E){return(E==="topology"?[...g.edges,...xKn(g)]:g.edges).filter(M=>MKn(M,E)).map(M=>({id:M.id,source:M.source,target:M.target,sourceHandle:M.sourcePort||void 0,targetHandle:M.targetPort||void 0,type:"modelEdge",data:M,markerEnd:{type:VG.ArrowClosed,color:udn(M),width:16,height:16},style:{stroke:udn(M),strokeWidth:M.cycle?4:["manual_call","initializer"].includes(M.kind)?2.5:1.8,strokeDasharray:M.kind==="previous_timestep"?"7 5":M.kind==="manual_call"?"3 4":M.kind==="initializer"?"8 3":void 0}}))}function xKn(g){const E=[],x=new Set(g.instances.flatMap(M=>M.objectIds.map(u6)));for(const M of g.templates)E.push({id:`topology:model:template:${M.id}`,source:"model:root",target:`template:${M.id}`,kind:"object_topology",projection:"topology",cycle:!1});for(const M of g.instances)E.push({id:`topology:${M.id}:object:${String(M.rootId)}`,source:M.id,target:`object:${String(M.rootId)}`,kind:"object_topology",projection:"topology",cycle:!1});for(const M of g.objects)M.parent===null&&!x.has(u6(M.objectId))&&E.push({id:`topology:model:${M.id}`,source:"model:root",target:M.id,kind:"object_topology",projection:"topology",cycle:!1});return E}function AKn(g,E){const x=new Map;for(const k of g){if(k.parent===null)continue;const H=u6(k.parent);x.set(H,[...x.get(H)??[],k.objectId])}const M=[],N=[E],$=new Set;for(;N.length>0;){const k=N.pop(),H=u6(k);$.has(H)||($.add(H),M.push(k),N.push(...x.get(H)??[]))}return M}function u6(g){const E=String(g);return E.startsWith("object:")?E.slice(7):E}function MKn(g,E){const x=g.projection;return E==="topology"?g.kind==="object_topology"||g.kind==="template_mount":E==="resolved"?x==="resolved":x==="applications"||!x&&!["object_topology","application_target"].includes(g.kind)}function udn(g){return g.cycle?"#cf4937":g.kind==="previous_timestep"?"#317b62":g.kind==="manual_call"?"#be6a54":g.kind==="initializer"?"#7768ae":g.kind==="object_topology"?"#7b7167":g.kind==="environment_binding"?"#367b8b":"#a59687"}function CKn(g){const E=new Set;for(const x of g.applications){for(const M of x.inputs)(g.applications.some($=>$.applicationId!==x.applicationId&&$.outputs.some(k=>k.name===M.name))||g.modelLibrary.some($=>Object.prototype.hasOwnProperty.call($.outputs,M.name)))&&E.add(M.id);for(const M of x.outputs)(g.applications.some($=>$.applicationId!==x.applicationId&&$.inputs.some(k=>k.name===M.name))||g.modelLibrary.some($=>Object.prototype.hasOwnProperty.call($.inputs,M.name)))&&E.add(M.id)}return E}function TKn(g,E){const x=E.role==="input"?"outputs":"inputs";return g.filter(M=>Object.prototype.hasOwnProperty.call(M[x],E.name)).sort((M,N)=>`${M.package}.${M.name}`.localeCompare(`${N.package}.${N.name}`))}function OKn({candidate:g,models:E,applications:x,onSelectModel:M,onSelectApplication:N,onClose:$}){const k=g.port.role==="input"?`Models that compute ${g.port.name}`:`Models that consume ${g.port.name}`;return _.jsxs("section",{className:"candidate-popover",style:{left:Math.min(g.x+8,window.innerWidth-390),top:Math.min(g.y-20,window.innerHeight-480)},children:[_.jsxs("header",{children:[_.jsxs("div",{children:[_.jsx("strong",{children:k}),_.jsx("span",{children:"Exact declared variable-name matches"})]}),_.jsx("button",{onClick:$,children:_.jsx(Jg,{size:15})})]}),_.jsxs("div",{className:"candidate-list",children:[x.length>0&&_.jsx("div",{className:"candidate-section-label",children:"Existing applications"}),x.map(H=>_.jsxs("button",{className:"candidate-card existing",onClick:()=>N(H),children:[_.jsx("strong",{children:H.name||H.applicationId}),_.jsx("span",{children:H.modelName}),_.jsxs("small",{children:[H.targetCount," target",H.targetCount===1?"":"s"]}),_.jsx("div",{children:"Connect without adding another application"})]},H.applicationId)),E.length>0&&_.jsx("div",{className:"candidate-section-label",children:"Available models"}),E.map(H=>_.jsxs("button",{className:"candidate-card",onClick:()=>M(H),children:[_.jsx("strong",{children:H.name}),_.jsx("span",{children:H.process}),_.jsx("small",{children:H.package||H.module}),_.jsxs("div",{children:[Object.keys(H.inputs).length," inputs · ",Object.keys(H.outputs).length," outputs"]})]},H.type))]})]})}function NKn(g,E){return g.filter(x=>x.applicationId!==E.application.applicationId).filter(x=>(E.port.role==="input"?x.outputs:x.inputs).some(N=>N.name===E.port.name)).sort((x,M)=>x.applicationId.localeCompare(M.applicationId))}function IKn(g,E){if(g.port.role==="input"){const M=E.outputs.find(N=>N.name===g.port.name);if(!M)throw new Error(`Application ${E.applicationId} does not output ${g.port.name}.`);return{sourceApplication:E,sourcePort:M,targetApplication:g.application,targetPort:g.port}}const x=E.inputs.find(M=>M.name===g.port.name);if(!x)throw new Error(`Application ${E.applicationId} does not input ${g.port.name}.`);return{sourceApplication:g.application,sourcePort:g.port,targetApplication:E,targetPort:x}}function DKn({selection:g,port:E,initialization:x,interactive:M,onEditApplication:N,onConfigureApplication:$,onRemoveApplication:k,onOverrideApplication:H,onRemoveInstance:U,onEditObject:G,onRemoveObject:ie}){const W=g&&"applicationId"in g&&"selector"in g?g:null,Z=g&&"objectId"in g&&!("applicationId"in g)?g:null,se=g&&"templateId"in g&&"objectIds"in g?g:null;return _.jsxs("aside",{className:"model-inspector",children:[_.jsxs("header",{children:[_.jsx("strong",{children:"Inspector"}),g&&_.jsx("span",{children:BKn(g)})]}),!g&&_.jsxs("div",{className:"empty-inspector",children:[_.jsx(AXn,{size:28}),_.jsx("p",{children:"Select an application, object, execution, or relationship."})]}),g&&_.jsx("pre",{children:JSON.stringify(g,null,2)}),W&&M&&_.jsxs("div",{className:"inspector-actions",children:[_.jsx("button",{onClick:()=>N(W),children:W.owner.scope==="template"?"Edit shared template":"Edit application"}),_.jsx("button",{"data-testid":"configure-application",onClick:()=>$(W),children:"Configure coupling"}),W.owner.scope==="template"&&_.jsx("button",{onClick:()=>H(W),children:"Create override"}),_.jsx("button",{className:"danger",onClick:()=>k(W),children:W.owner.scope==="template"?"Remove from shared template":"Remove application"})]}),se&&M&&_.jsxs("div",{className:"inspector-actions",children:[_.jsx("button",{className:"danger",onClick:()=>U(se),children:"Unmount instance"}),_.jsx("small",{children:"The object subtree is retained."})]}),Z&&M&&_.jsxs("div",{className:"inspector-actions",children:[_.jsx("button",{onClick:()=>G(Z),children:"Edit object"}),_.jsx("button",{className:"danger",onClick:()=>ie(Z),children:"Remove object and descendants"})]}),E&&_.jsxs("section",{children:[_.jsx("h4",{children:"Selected variable"}),_.jsx("code",{children:E.name}),_.jsx("p",{children:E.expectedType})]}),g&&x.length>0&&_.jsxs("section",{className:"inspector-initialization",children:[_.jsx("h4",{children:"Initialization"}),x.slice(0,8).map(oe=>_.jsxs("div",{children:[_.jsx("code",{children:oe.variable}),_.jsx("span",{className:oe.disposition==="unresolved"?"unresolved":"",children:oe.disposition})]},`${oe.applicationId}:${oe.objectId}:${oe.variable}`))]})]})}function _Kn({graph:g,onClose:E,sendCommand:x,interactive:M}){return _.jsxs(Fue,{title:"Diagnostics and cycles",onClose:E,children:[g.diagnostics.map(N=>_.jsxs("article",{className:"diagnostic-card",children:[_.jsx("strong",{children:N.code}),_.jsx("p",{children:N.message}),N.suggestions.map($=>_.jsx("small",{children:$},$))]},`${N.code}:${N.message}`)),g.cycles.map(N=>_.jsxs("article",{className:"cycle-card",children:[_.jsx("strong",{children:N.applicationIds.join(" → ")}),_.jsx("p",{children:"Choose an input to read from the previous timestep."}),N.breakCandidates.map($=>{const k=g.applications.find(H=>H.applicationId===$.applicationId)?.owner;return _.jsxs("button",{disabled:!M||!k,onClick:()=>k&&x({action:"edit",kind:"mark_previous_timestep",applicationRef:k,input:$.input}),children:[$.applicationId,".",$.input]},`${$.applicationId}:${$.objectId}:${$.input}`)})]},N.id)),g.diagnostics.length===0&&g.cycles.length===0&&_.jsx("p",{children:"No diagnostics."})]})}function LKn({graph:g,onClose:E,sendCommand:x,interactive:M}){const N=g.initialization.filter(k=>k.disposition==="unresolved"),$=new Map;for(const k of N){const H=`${k.applicationId}:${k.variable}`;$.set(H,[...$.get(H)||[],k])}return _.jsxs(Fue,{title:"Initialization",onClose:E,children:[[...$.entries()].map(([k,H])=>_.jsx(PKn,{rows:H,interactive:M,sendCommand:x},k)),N.length===0&&_.jsx("p",{children:"No unresolved initial values."})]})}function PKn({rows:g,interactive:E,sendCommand:x}){const[M,N]=Be.useState("float"),[$,k]=Be.useState(""),H=g[0],U={type:M,value:$};return _.jsxs("article",{className:"initialization-group",children:[_.jsxs("header",{children:[_.jsxs("div",{children:[_.jsx("strong",{children:H.variable}),_.jsx("span",{children:H.applicationId})]}),_.jsxs("small",{children:[g.length," object",g.length===1?"":"s"," · expected ",H.expectedType]})]}),_.jsx("p",{children:"Required because the input has no producer, environment source, status value, or usable temporal initialization."}),E&&_.jsxs("div",{className:"initialization-value",children:[_.jsxs("label",{children:["Type",_.jsxs("select",{value:M,onChange:G=>N(G.target.value),children:[_.jsx("option",{value:"float",children:"Float"}),_.jsx("option",{value:"integer",children:"Integer"}),_.jsx("option",{value:"boolean",children:"Boolean"}),_.jsx("option",{value:"symbol",children:"Symbol"}),_.jsx("option",{value:"string",children:"String"}),_.jsx("option",{value:"julia",children:"Julia expression"})]})]}),_.jsxs("label",{children:["Value",_.jsx("input",{value:$,onChange:G=>k(G.target.value)})]}),_.jsx("button",{disabled:!$.trim(),onClick:()=>x({action:"edit",kind:"set_object_statuses",objectIds:g.map(G=>G.objectId),variable:H.variable,value:U}),children:"Set all targets"})]}),_.jsx("div",{className:"initialization-object-list",children:g.map(G=>_.jsxs("div",{children:[_.jsxs("span",{children:["Object ",String(G.objectId)]}),_.jsx("code",{children:G.origin}),E&&_.jsx("button",{disabled:!$.trim(),onClick:()=>x({action:"edit",kind:"set_object_status",objectId:G.objectId,variable:G.variable,value:U}),children:"Set this object"})]},String(G.objectId)))})]})}function $Kn({code:g,onClose:E}){return _.jsx(Fue,{title:"Model code",onClose:E,children:_.jsx("pre",{className:"model-code",children:g||"Model code is available from an interactive editor session."})})}function odn({mode:g,recentPaths:E,currentPath:x,autosavePath:M,onSubmit:N,onClose:$}){const[k,H]=Be.useState(x||"");return _.jsx(Fue,{title:g==="open"?"Open Model":"Save Model",onClose:$,children:_.jsxs("div",{className:"model-file-dialog",children:[_.jsx("p",{children:g==="open"?"Open a Julia script whose final binding is `model = CompositeModel(...)`. Future edits will be saved back to that file.":"After the first save, every successful graph edit automatically rewrites this Julia script."}),_.jsxs("label",{children:["Julia file path",_.jsxs("div",{className:"model-path-input",children:[_.jsx("input",{value:k,onChange:U=>H(U.target.value),placeholder:"/absolute/path/to/model.jl",autoFocus:!0}),_.jsx("button",{className:"primary",disabled:!k.trim(),onClick:()=>N(k.trim()),children:g==="open"?"Open":"Save"})]})]}),g==="open"&&E.length>0&&_.jsxs("section",{children:[_.jsx("strong",{children:"Recent models"}),_.jsx("div",{className:"recent-model-list",children:E.map(U=>_.jsxs("button",{onClick:()=>N(U),children:[_.jsx("span",{children:U.split("/").at(-1)}),_.jsx("small",{children:U})]},U))})]}),g==="open"&&M&&_.jsxs("section",{children:[_.jsx("strong",{children:"Recovery autosave"}),_.jsx("button",{className:"recovery-path",onClick:()=>N(M),children:M})]}),_.jsx("small",{children:"Use Git to version saved composite-model scripts and review scientific configuration changes."})]})})}function RKn({selection:g,initialization:E,onSubmit:x,onClose:M}){const N=E.filter(G=>G.applicationId===g.application.applicationId&&G.variable===g.port.name&&G.disposition!=="supplied"),[$,k]=Be.useState("float"),[H,U]=Be.useState("");return _.jsx("div",{className:"overlay-backdrop",onMouseDown:M,children:_.jsxs("section",{className:"overlay-panel cycle-break-dialog",onMouseDown:G=>G.stopPropagation(),"data-testid":"cycle-break-dialog",children:[_.jsxs("header",{children:[_.jsxs("div",{children:[_.jsx("strong",{children:"Break the current-step cycle"}),_.jsxs("span",{children:[g.application.applicationId,".",g.port.name]})]}),_.jsx("button",{onClick:M,children:_.jsx(Jg,{size:17})})]}),_.jsxs("div",{className:"overlay-content",children:[_.jsx("p",{children:"This changes the application input to read its value from the previous accepted timestep. The model is disconnected from the current value during each run step."}),_.jsxs("div",{className:"cycle-impact",children:[_.jsx("strong",{children:"Application-wide change"}),_.jsxs("span",{children:["It affects all ",g.application.targetCount," targets selected by this application."]})]}),N.length>0&&_.jsxs("fieldset",{children:[_.jsx("legend",{children:"Required initial value"}),_.jsxs("p",{children:[N.length," target",N.length===1?"":"s"," need a value before the first timestep."]}),_.jsxs("div",{className:"form-grid",children:[_.jsxs("label",{children:["Value type",_.jsxs("select",{value:$,onChange:G=>k(G.target.value),children:[_.jsx("option",{value:"float",children:"Float"}),_.jsx("option",{value:"integer",children:"Integer"}),_.jsx("option",{value:"boolean",children:"Boolean"}),_.jsx("option",{value:"symbol",children:"Symbol"}),_.jsx("option",{value:"string",children:"String"}),_.jsx("option",{value:"julia",children:"Julia expression"})]})]}),_.jsxs("label",{children:["Initial value",_.jsx("input",{value:H,onChange:G=>U(G.target.value),autoFocus:!0})]})]})]})]}),_.jsxs("footer",{children:[_.jsx("button",{onClick:M,children:"Cancel"}),_.jsxs("button",{className:"primary",disabled:N.length>0&&!H.trim(),onClick:()=>x(N.length>0,N.length>0?{type:$,value:H}:null),"data-testid":"confirm-cycle-break",children:[_.jsx(Q0n,{size:15})," Use previous timestep"]})]})]})})}function Fue({title:g,onClose:E,children:x}){return _.jsx("div",{className:"overlay-backdrop",onMouseDown:E,children:_.jsxs("section",{className:"overlay-panel",onMouseDown:M=>M.stopPropagation(),children:[_.jsxs("header",{children:[_.jsx("strong",{children:g}),_.jsx("button",{onClick:E,children:_.jsx(Jg,{size:17})})]}),_.jsx("div",{className:"overlay-content",children:x})]})})}function BKn(g){return"applicationId"in g?g.applicationId:"objectId"in g?String(g.objectId):"objectIds"in g?g.name:"entity"in g?"Composite model":"provider"in g?g.provider:"name"in g?g.name:g.kind.replaceAll("_"," ")}function zKn(g){return g.split(".").at(-1)||g}function FKn(g){const E={selectors:[]};return g.targetInstances.length===0&&g.targetScales.length===1&&(E.scale=g.targetScales[0]),g.targetKinds.length===1&&(E.kind=g.targetKinds[0]),g.targetSpecies.length===1&&(E.species=g.targetSpecies[0]),{type:g.targetCount===1?"One":"Many",multiplicity:g.targetCount===1?"one":"many",criteria:E,julia:""}}function Q7e(g,E,x){return`application:${g}:${E}:${x}`}function W7e(){const g=document.getElementById("pse-model-graph-data");if(!g?.textContent)return ndn;try{return JSON.parse(g.textContent)}catch{return ndn}}function JKn(){const g=document.getElementById("pse-editor-config");if(!g?.textContent)return null;try{return JSON.parse(g.textContent)}catch{return null}}class HKn extends Be.Component{state={error:null};static getDerivedStateFromError(E){return{error:E}}componentDidCatch(E,x){console.error("PlantSimEngine model graph frontend failed",E,x)}render(){return this.state.error?_.jsxs("main",{className:"frontend-error","data-testid":"frontend-error",children:[_.jsx(dke,{size:28}),_.jsx("h1",{children:"The graph view could not be rendered"}),_.jsx("p",{children:this.state.error.message}),_.jsxs("button",{onClick:()=>window.location.reload(),children:[_.jsx(_Xn,{size:15})," Reload graph"]})]}):this.props.children}}hzn.createRoot(document.getElementById("root")).render(_.jsx(Be.StrictMode,{children:_.jsx(HKn,{children:_.jsx(jKn,{})})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index eac7b989d..2ae0fa640 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -4,7 +4,7 @@ PlantSimEngine Dependency Graph - + diff --git a/frontend/src/sampleModelGraph.ts b/frontend/src/sampleModelGraph.ts index ba89ecddc..0f2260fba 100644 --- a/frontend/src/sampleModelGraph.ts +++ b/frontend/src/sampleModelGraph.ts @@ -29,7 +29,30 @@ export const sampleModelGraph: ModelGraphView = { edges: [edge(source, "TT_cu", lai, "TT_cu"), edge(lai, "LAI", light, "LAI")], modelLibrary: [], environments: [], - initialization: [{ applicationId: "source", objectId: "plant", variable: "TT", role: "input", disposition: "unresolved", value: "-Inf", valueJulia: "-Inf", expectedType: "Float64", sourceApplicationIds: [], sourceObjectIds: [], sourceVariable: null, origin: "missing", previousTimeStep: false }], + initialization: [{ + applicationId: "source", + objectId: "plant", + variable: "TT", + role: "input", + disposition: "unresolved", + value: "-Inf", + valueJulia: "-Inf", + expectedType: "Float64", + declaredType: "Float64", + originalType: null, + transformedType: null, + effectiveType: null, + statusTransformApplied: false, + statusTransformChanged: false, + typeMappingApplied: false, + typeMappingChanged: false, + typeMappingRule: null, + sourceApplicationIds: [], + sourceObjectIds: [], + sourceVariable: null, + origin: "missing", + previousTimeStep: false, + }], diagnostics: [], cycles: [], availableActions: ["inspect"],