[NET-5688] APIGateway UI Topology Fixes (#19657) Backport (#19763)

* [NET-5688] APIGateway UI Topology Fixes (#19657)

* Update catalog and ui endpoints to show APIGateway in gateway service
topology view

* Added initial implementation for service view

* updated ui

* Fix topology view for gateways

* Adding tests for gw controller

* remove unused args

* Undo formatting changes

* Fix call sites for upstream/downstream gw changes

* Add config entry tests

* Fix function calls again

* Move from ServiceKey to ServiceName, cleanup from PR review

* Add additional check for length of services in bound apigateway for
IsSame comparison

* fix formatting for proto

* gofmt

* Add DeepCopy for retrieved BoundAPIGateway

* gofmt

* gofmt

* Rename function to be more consistent

* Remove busl license
This commit is contained in:
John Maguire 2023-11-29 11:22:56 -05:00 committed by GitHub
parent 86cf809a62
commit 0cd190f8d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
57 changed files with 13981 additions and 11696 deletions

View File

@ -576,6 +576,7 @@ func getAllGatewayMeta(store *state.Store) ([]*gatewayMeta, error) {
meta := make([]*gatewayMeta, 0, len(boundGateways))
for _, b := range boundGateways {
bound := b.(*structs.BoundAPIGatewayConfigEntry)
bound = bound.DeepCopy()
for _, g := range gateways {
gateway := g.(*structs.APIGatewayConfigEntry)
if bound.IsInitializedForGateway(gateway) {
@ -618,6 +619,10 @@ func (g *gatewayMeta) updateRouteBinding(route structs.BoundRoute) (bool, []stru
return nil
})
if g.BoundGateway.Services == nil {
g.BoundGateway.Services = make(structs.ServiceRouteReferences)
}
// now try and bind all of the route's current refs
for _, ref := range route.GetParents() {
if !g.shouldBindRoute(ref) {
@ -648,6 +653,9 @@ func (g *gatewayMeta) updateRouteBinding(route structs.BoundRoute) (bool, []stru
errors[ref] = fmt.Errorf("failed to bind route %s to gateway %s with listener '%s'", route.GetName(), g.Gateway.Name, ref.SectionName)
}
if refDidBind {
for _, serviceName := range route.GetServiceNames() {
g.BoundGateway.Services.AddService(structs.NewServiceName(serviceName.Name, &serviceName.EnterpriseMeta), routeRef)
}
boundRefs = append(boundRefs, ref)
}
}
@ -1052,6 +1060,7 @@ func removeRoute(route structs.ResourceReference, entries ...*gatewayMeta) []*ga
for _, entry := range entries {
if entry.unbindRoute(route) {
modified = append(modified, entry)
entry.BoundGateway.Services.RemoveRouteRef(route)
}
}

View File

@ -217,6 +217,7 @@ func TestBoundAPIGatewayBindRoute(t *testing.T) {
Kind: structs.TerminatingGateway,
Name: "Gateway",
Listeners: []structs.BoundAPIGatewayListener{},
Services: make(structs.ServiceRouteReferences),
},
expectedDidBind: false,
},
@ -484,6 +485,7 @@ func TestBindRoutesToGateways(t *testing.T) {
},
},
},
Services: make(structs.ServiceRouteReferences),
},
},
expectedReferenceErrors: map[structs.ResourceReference]error{},
@ -533,6 +535,7 @@ func TestBindRoutesToGateways(t *testing.T) {
Routes: []structs.ResourceReference{},
},
},
Services: make(structs.ServiceRouteReferences),
},
},
expectedReferenceErrors: map[structs.ResourceReference]error{},
@ -628,6 +631,7 @@ func TestBindRoutesToGateways(t *testing.T) {
},
},
},
Services: make(structs.ServiceRouteReferences),
},
{
Name: "Gateway 2",
@ -643,6 +647,7 @@ func TestBindRoutesToGateways(t *testing.T) {
},
},
},
Services: make(structs.ServiceRouteReferences),
},
},
expectedReferenceErrors: map[structs.ResourceReference]error{},
@ -720,6 +725,7 @@ func TestBindRoutesToGateways(t *testing.T) {
},
},
},
Services: make(structs.ServiceRouteReferences),
},
},
expectedReferenceErrors: map[structs.ResourceReference]error{},
@ -803,6 +809,7 @@ func TestBindRoutesToGateways(t *testing.T) {
},
},
},
Services: make(structs.ServiceRouteReferences),
},
},
expectedReferenceErrors: map[structs.ResourceReference]error{},
@ -892,6 +899,7 @@ func TestBindRoutesToGateways(t *testing.T) {
},
},
},
Services: make(structs.ServiceRouteReferences),
},
},
expectedReferenceErrors: map[structs.ResourceReference]error{},
@ -1007,6 +1015,7 @@ func TestBindRoutesToGateways(t *testing.T) {
},
},
},
Services: make(structs.ServiceRouteReferences),
},
{
Name: "Gateway 2",
@ -1026,6 +1035,7 @@ func TestBindRoutesToGateways(t *testing.T) {
},
},
},
Services: make(structs.ServiceRouteReferences),
},
},
expectedReferenceErrors: map[structs.ResourceReference]error{},
@ -1109,6 +1119,7 @@ func TestBindRoutesToGateways(t *testing.T) {
},
},
},
Services: make(structs.ServiceRouteReferences),
},
},
expectedReferenceErrors: map[structs.ResourceReference]error{},
@ -1215,6 +1226,7 @@ func TestBindRoutesToGateways(t *testing.T) {
},
},
},
Services: make(structs.ServiceRouteReferences),
},
{
Name: "Gateway 2",
@ -1230,6 +1242,7 @@ func TestBindRoutesToGateways(t *testing.T) {
},
},
},
Services: make(structs.ServiceRouteReferences),
},
},
expectedReferenceErrors: map[structs.ResourceReference]error{},
@ -1362,6 +1375,7 @@ func TestBindRoutesToGateways(t *testing.T) {
},
},
},
Services: make(structs.ServiceRouteReferences),
},
},
expectedReferenceErrors: map[structs.ResourceReference]error{},
@ -1999,6 +2013,11 @@ func TestAPIGatewayController(t *testing.T) {
EnterpriseMeta: *defaultMeta,
}},
}},
Services: structs.ServiceRouteReferences{structs.NewServiceName("tcp-upstream", nil): []structs.ResourceReference{{
Kind: "tcp-route",
Name: "tcp-route",
}}},
},
&structs.APIGatewayConfigEntry{
Kind: structs.APIGateway,
@ -2226,6 +2245,16 @@ func TestAPIGatewayController(t *testing.T) {
EnterpriseMeta: *defaultMeta,
}},
}},
Services: structs.ServiceRouteReferences{structs.NewServiceName("tcp-upstream", nil): []structs.ResourceReference{
{
Kind: "tcp-route",
Name: "tcp-route-one",
},
{
Kind: "tcp-route",
Name: "tcp-route-two",
},
}},
},
&structs.APIGatewayConfigEntry{
Kind: structs.APIGateway,
@ -2375,6 +2404,16 @@ func TestAPIGatewayController(t *testing.T) {
EnterpriseMeta: *defaultMeta,
}},
}},
Services: structs.ServiceRouteReferences{structs.NewServiceName("http-upstream", nil): []structs.ResourceReference{
{
Kind: "http-route",
Name: "http-route-one",
},
{
Kind: "http-route",
Name: "http-route-two",
},
}},
},
&structs.APIGatewayConfigEntry{
Kind: structs.APIGateway,
@ -2522,6 +2561,10 @@ func TestAPIGatewayController(t *testing.T) {
EnterpriseMeta: *defaultMeta,
}},
}},
Services: structs.ServiceRouteReferences{structs.NewServiceName("http-upstream", nil): []structs.ResourceReference{{
Kind: "http-route",
Name: "http-route",
}}},
},
&structs.APIGatewayConfigEntry{
Kind: structs.APIGateway,
@ -2682,6 +2725,20 @@ func TestAPIGatewayController(t *testing.T) {
EnterpriseMeta: *defaultMeta,
}},
}},
Services: structs.ServiceRouteReferences{
structs.NewServiceName("http-upstream", nil): []structs.ResourceReference{
{
Kind: "http-route",
Name: "http-route",
},
},
structs.NewServiceName("tcp-upstream", nil): []structs.ResourceReference{
{
Kind: "tcp-route",
Name: "tcp-route",
},
},
},
},
&structs.APIGatewayConfigEntry{
Kind: structs.APIGateway,
@ -2809,6 +2866,7 @@ func TestAPIGatewayController(t *testing.T) {
Name: "tcp-listener",
Routes: []structs.ResourceReference{},
}},
Services: make(structs.ServiceRouteReferences),
},
&structs.APIGatewayConfigEntry{
Kind: structs.APIGateway,
@ -2898,6 +2956,7 @@ func TestAPIGatewayController(t *testing.T) {
Name: "tcp-listener",
Routes: []structs.ResourceReference{},
}},
Services: make(structs.ServiceRouteReferences),
},
&structs.APIGatewayConfigEntry{
Kind: structs.APIGateway,
@ -3041,6 +3100,14 @@ func TestAPIGatewayController(t *testing.T) {
EnterpriseMeta: *defaultMeta,
}},
}},
Services: structs.ServiceRouteReferences{
structs.NewServiceName("http-upstream", nil): []structs.ResourceReference{
{
Kind: "http-route",
Name: "http-route",
},
},
},
},
&structs.APIGatewayConfigEntry{
Kind: structs.APIGateway,
@ -3214,6 +3281,7 @@ func TestAPIGatewayController(t *testing.T) {
Name: "tcp-listener",
Routes: []structs.ResourceReference{},
}},
Services: make(structs.ServiceRouteReferences),
},
&structs.APIGatewayConfigEntry{
Kind: structs.APIGateway,
@ -3353,6 +3421,7 @@ func TestAPIGatewayController(t *testing.T) {
Listeners: []structs.BoundAPIGatewayListener{{
Name: "http-listener",
}},
Services: make(structs.ServiceRouteReferences),
},
},
},
@ -3427,6 +3496,7 @@ func TestAPIGatewayController(t *testing.T) {
EnterpriseMeta: *defaultMeta,
}},
}},
Services: make(structs.ServiceRouteReferences),
},
},
},
@ -3552,6 +3622,7 @@ func TestAPIGatewayController(t *testing.T) {
},
},
},
Services: make(structs.ServiceRouteReferences),
},
},
},
@ -3651,6 +3722,7 @@ func TestAPIGatewayController(t *testing.T) {
{Name: "listener-1"},
{Name: "listener-2"},
},
Services: make(structs.ServiceRouteReferences),
},
},
},
@ -3766,6 +3838,7 @@ func TestAPIGatewayController(t *testing.T) {
Name: "invalid-listener",
},
},
Services: make(structs.ServiceRouteReferences),
},
},
},
@ -3854,6 +3927,7 @@ func TestAPIGatewayController(t *testing.T) {
EnterpriseMeta: *defaultMeta,
}},
}},
Services: make(structs.ServiceRouteReferences),
},
},
},

View File

@ -3831,6 +3831,9 @@ func updateGatewayNamespace(tx WriteTxn, idx uint64, service *structs.GatewaySer
if service.GatewayKind == structs.ServiceKindTerminatingGateway && !hasNonConnectInstance {
continue
}
if service.GatewayKind == structs.ServiceKindAPIGateway && !hasConnectInstance {
continue
}
existing, err := tx.First(tableGatewayServices, indexID, service.Gateway, sn.CompoundServiceName().ServiceName, service.Port)
if err != nil {
@ -4231,6 +4234,36 @@ func serviceGatewayNodes(tx ReadTxn, ws memdb.WatchSet, service string, kind str
return maxIdx, ret, nil
}
// metricsProtocolForAPIGateway determines the protocol that should be used when fetching metrics for an api gateway
// Since api gateways may have listeners with different protocols, favor capturing all traffic by only returning HTTP
// when all listeners are HTTP-like.
func metricsProtocolForAPIGateway(tx ReadTxn, ws memdb.WatchSet, sn structs.ServiceName) (uint64, string, error) {
idx, conf, err := configEntryTxn(tx, ws, structs.APIGateway, sn.Name, &sn.EnterpriseMeta)
if err != nil {
return 0, "", fmt.Errorf("failed to get api-gateway config entry for %q: %v", sn.String(), err)
}
if conf == nil {
return 0, "", nil
}
entry, ok := conf.(*structs.APIGatewayConfigEntry)
if !ok {
return 0, "", fmt.Errorf("unexpected config entry type: %T", conf)
}
counts := make(map[string]int)
for _, l := range entry.Listeners {
if structs.IsProtocolHTTPLike(string(l.Protocol)) {
counts["http"] += 1
} else {
counts["tcp"] += 1
}
}
protocol := "tcp"
if counts["tcp"] == 0 && counts["http"] > 0 {
protocol = "http"
}
return idx, protocol, nil
}
// metricsProtocolForIngressGateway determines the protocol that should be used when fetching metrics for an ingress gateway
// Since ingress gateways may have listeners with different protocols, favor capturing all traffic by only returning HTTP
// when all listeners are HTTP-like.
@ -4304,7 +4337,11 @@ func (s *Store) ServiceTopology(
if err != nil {
return 0, nil, fmt.Errorf("failed to fetch protocol for service %s: %v", sn.String(), err)
}
case structs.ServiceKindAPIGateway:
maxIdx, protocol, err = metricsProtocolForAPIGateway(tx, ws, sn)
if err != nil {
return 0, nil, fmt.Errorf("failed to fetch protocol for service %s: %v", sn.String(), err)
}
case structs.ServiceKindTypical:
maxIdx, protocol, err = protocolForService(tx, ws, sn)
if err != nil {
@ -4362,11 +4399,23 @@ func (s *Store) ServiceTopology(
maxIdx = idx
}
var upstreamSources = make(map[string]string)
upstreamSources := make(map[string]string)
for _, un := range upstreamNames {
upstreamSources[un.String()] = structs.TopologySourceRegistration
}
if kind == structs.ServiceKind(structs.APIGateway) {
upstreamFromGW, err := upstreamServicesForGatewayTxn(tx, sn)
if err != nil {
return 0, nil, err
}
for _, dn := range upstreamFromGW {
upstreamNames = append(upstreamNames, dn)
upstreamSources[dn.String()] = structs.TopologySourceRegistration
}
}
upstreamDecisions := make(map[string]structs.IntentionDecisionSummary)
// Only transparent proxies / connect native services have upstreams from intentions
@ -4483,11 +4532,24 @@ func (s *Store) ServiceTopology(
maxIdx = idx
}
var downstreamSources = make(map[string]string)
downstreamSources := make(map[string]string)
for _, dn := range downstreamNames {
downstreamSources[dn.String()] = structs.TopologySourceRegistration
}
idx, downstreamGWs, err := s.downstreamGatewaysForServiceTxn(tx, sn)
if err != nil {
return 0, nil, err
}
if idx > maxIdx {
maxIdx = idx
}
for _, dn := range downstreamGWs {
downstreamNames = append(downstreamNames, dn)
downstreamSources[dn.String()] = structs.TopologySourceRegistration
}
idx, intentionDownstreams, err := s.intentionTopologyTxn(tx, ws, sn, true, defaultAllow, structs.IntentionTargetService)
if err != nil {
return 0, nil, err
@ -4628,6 +4690,61 @@ func (s *Store) combinedServiceNodesTxn(tx ReadTxn, ws memdb.WatchSet, names []s
return maxIdx, resp, nil
}
func upstreamServicesForGatewayTxn(tx ReadTxn, service structs.ServiceName) ([]structs.ServiceName, error) {
val, err := tx.First(tableConfigEntries, indexID, configentry.KindName{Kind: structs.BoundAPIGateway, Name: service.Name})
if err != nil {
return nil, err
}
if gw, ok := val.(*structs.BoundAPIGatewayConfigEntry); ok {
serviceIDs := gw.ListRelatedServices()
names := make([]structs.ServiceName, 0, len(serviceIDs))
for _, id := range serviceIDs {
names = append(names, structs.NewServiceName(id.ID, &id.EnterpriseMeta))
}
return names, nil
}
return nil, errors.New("not an APIGateway")
}
// downstreamsForServiceTxn will find all downstream services that could route traffic to the input service.
// There are two factors at play. Upstreams defined in a proxy registration, and the discovery chain for those upstreams.
func (s *Store) downstreamGatewaysForServiceTxn(tx ReadTxn, service structs.ServiceName) (uint64, []structs.ServiceName, error) {
iter, err := tx.Get(tableConfigEntries, indexLink, service.ToServiceID())
if err != nil {
return 0, nil, err
}
var (
idx uint64
resp []structs.ServiceName
seen = make(map[structs.ServiceName]struct{})
)
for raw := iter.Next(); raw != nil; raw = iter.Next() {
entry, ok := raw.(*structs.BoundAPIGatewayConfigEntry)
if !ok {
continue
}
if entry.ModifyIndex > idx {
idx = entry.ModifyIndex
}
gwServiceName := structs.NewServiceName(entry.Name, &entry.EnterpriseMeta)
if _, ok := seen[gwServiceName]; ok {
continue
}
seen[gwServiceName] = struct{}{}
resp = append(resp, gwServiceName)
}
return idx, resp, nil
}
// downstreamsForServiceTxn will find all downstream services that could route traffic to the input service.
// There are two factors at play. Upstreams defined in a proxy registration, and the discovery chain for those upstreams.
func (s *Store) downstreamsForServiceTxn(tx ReadTxn, ws memdb.WatchSet, dc string, service structs.ServiceName) (uint64, []structs.ServiceName, error) {

View File

@ -4,12 +4,14 @@
package structs
import (
"encoding/json"
"fmt"
"regexp"
"sort"
"strings"
"github.com/miekg/dns"
"golang.org/x/exp/slices"
"github.com/hashicorp/consul/acl"
"github.com/hashicorp/consul/lib/stringslice"
@ -917,6 +919,45 @@ func (a *APIGatewayTLSConfiguration) IsEmpty() bool {
return len(a.Certificates) == 0 && len(a.MaxVersion) == 0 && len(a.MinVersion) == 0 && len(a.CipherSuites) == 0
}
// ServiceRouteReferences is a map with a key of ServiceName type for a routed to service from a
// bound gateway listener with a value being a slice of resource references of the routes that reference the service
type ServiceRouteReferences map[ServiceName][]ResourceReference
func (s ServiceRouteReferences) AddService(key ServiceName, routeRef ResourceReference) {
if s[key] == nil {
s[key] = make([]ResourceReference, 0)
}
if slices.Contains(s[key], routeRef) {
return
}
s[key] = append(s[key], routeRef)
}
func (s ServiceRouteReferences) RemoveRouteRef(routeRef ResourceReference) {
for key := range s {
for idx, ref := range s[key] {
if ref.IsSame(&routeRef) {
s[key] = append(s[key][0:idx], s[key][idx+1:]...)
if len(s[key]) == 0 {
delete(s, key)
}
}
}
}
}
// this is to make the map value serializable for tests that compare the json output of the
// boundAPIGateway
func (s ServiceRouteReferences) MarshalJSON() ([]byte, error) {
m := make(map[string][]ResourceReference, len(s))
for key, val := range s {
m[key.String()] = val
}
return json.Marshal(m)
}
// BoundAPIGatewayConfigEntry manages the configuration for a bound API
// gateway with the given name. This type is never written from the client.
// It is only written by the controller in order to represent an API gateway
@ -934,6 +975,9 @@ type BoundAPIGatewayConfigEntry struct {
// what certificates and routes have successfully bound to it.
Listeners []BoundAPIGatewayListener
// Services are all the services that are routed to from an APIGateway
Services ServiceRouteReferences
Meta map[string]string `json:",omitempty"`
acl.EnterpriseMeta `hcl:",squash" mapstructure:",squash"`
RaftIndex
@ -964,6 +1008,26 @@ func (e *BoundAPIGatewayConfigEntry) IsSame(other *BoundAPIGatewayConfigEntry) b
}
}
if len(e.Services) != len(other.Services) {
return false
}
for key, refs := range e.Services {
if _, ok := other.Services[key]; !ok {
return false
}
if len(refs) != len(other.Services[key]) {
return false
}
for idx, ref := range refs {
if !ref.IsSame(&other.Services[key][idx]) {
return false
}
}
}
return true
}
@ -1068,6 +1132,18 @@ func (e *BoundAPIGatewayConfigEntry) GetEnterpriseMeta() *acl.EnterpriseMeta {
return &e.EnterpriseMeta
}
func (e *BoundAPIGatewayConfigEntry) ListRelatedServices() []ServiceID {
if len(e.Services) == 0 {
return nil
}
ids := make([]ServiceID, 0, len(e.Services))
for key := range e.Services {
ids = append(ids, key.ToServiceID())
}
return ids
}
// BoundAPIGatewayListener is an API gateway listener with information
// about the routes and certificates that have successfully bound to it.
type BoundAPIGatewayListener struct {

View File

@ -7,6 +7,8 @@ import (
"testing"
"github.com/stretchr/testify/require"
"github.com/hashicorp/consul/acl"
)
func TestIngressGatewayConfigEntry(t *testing.T) {
@ -1566,3 +1568,223 @@ func TestListenerUnbindRoute(t *testing.T) {
})
}
}
func Test_ServiceRouteReferences_AddService(t *testing.T) {
t.Parallel()
key := ServiceName{Name: "service", EnterpriseMeta: acl.EnterpriseMeta{}}
testCases := map[string]struct {
routeRef ResourceReference
subject ServiceRouteReferences
expectedRefs ServiceRouteReferences
}{
"key does not exist yet": {
routeRef: ResourceReference{
Kind: "http-route",
Name: "http-route",
},
subject: make(ServiceRouteReferences),
expectedRefs: ServiceRouteReferences{
key: []ResourceReference{
{
Kind: "http-route",
Name: "http-route",
},
},
},
},
"key exists adding new route": {
routeRef: ResourceReference{
Kind: "http-route",
Name: "http-route",
},
subject: ServiceRouteReferences{
key: []ResourceReference{
{
Kind: "http-route",
Name: "http-route-other",
},
},
},
expectedRefs: ServiceRouteReferences{
key: []ResourceReference{
{
Kind: "http-route",
Name: "http-route-other",
},
{
Kind: "http-route",
Name: "http-route",
},
},
},
},
"key exists adding existing route": {
routeRef: ResourceReference{
Kind: "http-route",
Name: "http-route",
},
subject: ServiceRouteReferences{
key: []ResourceReference{
{
Kind: "http-route",
Name: "http-route",
},
},
},
expectedRefs: ServiceRouteReferences{
key: []ResourceReference{
{
Kind: "http-route",
Name: "http-route",
},
},
},
},
}
for name, tc := range testCases {
t.Run(name, func(t *testing.T) {
tc.subject.AddService(key, tc.routeRef)
require.Equal(t, tc.subject, tc.expectedRefs)
})
}
}
func Test_ServiceRouteReferences_RemoveRouteRef(t *testing.T) {
t.Parallel()
keySvcOne := ServiceName{Name: "service-one", EnterpriseMeta: acl.EnterpriseMeta{}}
keySvcTwo := ServiceName{Name: "service-two", EnterpriseMeta: acl.EnterpriseMeta{}}
testCases := map[string]struct {
routeRef ResourceReference
subject ServiceRouteReferences
expectedRefs ServiceRouteReferences
}{
"route ref exists for one service": {
routeRef: ResourceReference{
Kind: "http-route",
Name: "http-route",
},
subject: ServiceRouteReferences{
keySvcOne: []ResourceReference{
{
Kind: "http-route",
Name: "http-route",
},
{
Kind: "http-route",
Name: "http-route-other",
},
},
keySvcTwo: []ResourceReference{
{
Kind: "http-route",
Name: "http-route-other",
},
},
},
expectedRefs: ServiceRouteReferences{
keySvcOne: []ResourceReference{
{
Kind: "http-route",
Name: "http-route-other",
},
},
keySvcTwo: []ResourceReference{
{
Kind: "http-route",
Name: "http-route-other",
},
},
},
},
"route ref exists for multiple services": {
routeRef: ResourceReference{
Kind: "http-route",
Name: "http-route",
},
subject: ServiceRouteReferences{
keySvcOne: []ResourceReference{
{
Kind: "http-route",
Name: "http-route",
},
{
Kind: "http-route",
Name: "http-route-other",
},
},
keySvcTwo: []ResourceReference{
{
Kind: "http-route",
Name: "http-route",
},
{
Kind: "http-route",
Name: "http-route-other",
},
},
},
expectedRefs: ServiceRouteReferences{
keySvcOne: []ResourceReference{
{
Kind: "http-route",
Name: "http-route-other",
},
},
keySvcTwo: []ResourceReference{
{
Kind: "http-route",
Name: "http-route-other",
},
},
},
},
"route exists and is only ref for service--service is removed from refs": {
routeRef: ResourceReference{
Kind: "http-route",
Name: "http-route",
},
subject: ServiceRouteReferences{
keySvcOne: []ResourceReference{
{
Kind: "http-route",
Name: "http-route",
},
},
keySvcTwo: []ResourceReference{
{
Kind: "http-route",
Name: "http-route",
},
{
Kind: "http-route",
Name: "http-route-other",
},
},
},
expectedRefs: ServiceRouteReferences{
keySvcTwo: []ResourceReference{
{
Kind: "http-route",
Name: "http-route-other",
},
},
},
},
}
for name, tc := range testCases {
t.Run(name, func(t *testing.T) {
tc.subject.RemoveRouteRef(tc.routeRef)
require.Equal(t, tc.subject, tc.expectedRefs)
})
}
}

View File

@ -1234,6 +1234,17 @@ func (o *BoundAPIGatewayConfigEntry) DeepCopy() *BoundAPIGatewayConfigEntry {
}
}
}
if o.Services != nil {
cp.Services = make(map[ServiceName][]ResourceReference, len(o.Services))
for k2, v2 := range o.Services {
var cp_Services_v2 []ResourceReference
if v2 != nil {
cp_Services_v2 = make([]ResourceReference, len(v2))
copy(cp_Services_v2, v2)
}
cp.Services[k2] = cp_Services_v2
}
}
if o.Meta != nil {
cp.Meta = make(map[string]string, len(o.Meta))
for k2, v2 := range o.Meta {

View File

@ -439,7 +439,7 @@ func (s *HTTPHandlers) UIServiceTopology(resp http.ResponseWriter, req *http.Req
args.ServiceKind = structs.ServiceKind(kind[0])
switch args.ServiceKind {
case structs.ServiceKindTypical, structs.ServiceKindIngressGateway:
case structs.ServiceKindTypical, structs.ServiceKindIngressGateway, structs.ServiceKindAPIGateway:
// allowed
default:
return nil, HTTPError{StatusCode: http.StatusBadRequest, Reason: fmt.Sprintf("Unsupported service kind %q", args.ServiceKind)}
@ -670,7 +670,7 @@ func prepSummaryOutput(summaries map[structs.PeeredServiceName]*ServiceSummary,
sum.ChecksCritical++
}
}
if excludeSidecars && sum.Kind != structs.ServiceKindTypical && sum.Kind != structs.ServiceKindIngressGateway {
if excludeSidecars && sum.Kind != structs.ServiceKindTypical && sum.Kind != structs.ServiceKindIngressGateway && sum.Kind != structs.ServiceKindAPIGateway {
continue
}
resp = append(resp, sum)

View File

@ -1,4 +1,4 @@
"use strict";(globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]).push([[83],{7083:(e,t,o)=>{o.r(t),o.d(t,{default:()=>_})
"use strict";(globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]).push([[121],{4121:(e,t,o)=>{o.r(t),o.d(t,{default:()=>_})
var i=window.CustomEvent
function n(e,t){var o="on"+t.type.toLowerCase()
return"function"==typeof e[o]&&e[o](t),e.dispatchEvent(t)}function a(e){for(;e;){if("dialog"===e.localName)return e

View File

@ -0,0 +1,3 @@
.tippy-box[data-placement^=top]>.tippy-svg-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-svg-arrow:after,.tippy-box[data-placement^=top]>.tippy-svg-arrow>svg{top:16px;transform:rotate(180deg)}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow>svg{bottom:16px}.tippy-box[data-placement^=left]>.tippy-svg-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-svg-arrow:after,.tippy-box[data-placement^=left]>.tippy-svg-arrow>svg{transform:rotate(90deg);top:calc(50% - 3px);left:11px}.tippy-box[data-placement^=right]>.tippy-svg-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-svg-arrow:after,.tippy-box[data-placement^=right]>.tippy-svg-arrow>svg{transform:rotate(-90deg);top:calc(50% - 3px);right:11px}.tippy-svg-arrow{width:16px;height:16px;fill:#333;text-align:initial}.tippy-svg-arrow,.tippy-svg-arrow>svg{position:absolute}
/*# sourceMappingURL=chunk.143.db9b393ab5086aec385b.css-481e257b97fcf81c5a59ed89bec95f69.map*/

View File

@ -0,0 +1,52 @@
var __ember_auto_import__;(()=>{var e,r,t,n={1292:e=>{"use strict"
e.exports=require("@ember/application")},6354:e=>{"use strict"
e.exports=require("@ember/component/helper")},3353:e=>{"use strict"
e.exports=require("@ember/debug")},9341:e=>{"use strict"
e.exports=require("@ember/destroyable")},4927:e=>{"use strict"
e.exports=require("@ember/modifier")},7219:e=>{"use strict"
e.exports=require("@ember/object")},8773:e=>{"use strict"
e.exports=require("@ember/runloop")},8574:e=>{"use strict"
e.exports=require("@ember/service")},1866:e=>{"use strict"
e.exports=require("@ember/utils")},657:(e,r,t)=>{var n,o
e.exports=(n=_eai_d,o=_eai_r,window.emberAutoImportDynamic=function(e){return 1===arguments.length?o("_eai_dyn_"+e):o("_eai_dynt_"+e)(Array.prototype.slice.call(arguments,1))},window.emberAutoImportSync=function(e){return o("_eai_sync_"+e)(Array.prototype.slice.call(arguments,1))},n("@hashicorp/flight-icons/svg",[],(function(){return t(6604)})),n("@hashicorp/flight-icons/svg-sprite/svg-sprite-module",[],(function(){return t(2654)})),n("@lit/reactive-element",[],(function(){return t(8531)})),n("@xstate/fsm",[],(function(){return t(7440)})),n("a11y-dialog",[],(function(){return t(1413)})),n("base64-js",[],(function(){return t(8294)})),n("clipboard",[],(function(){return t(9079)})),n("d3-array",[],(function(){return t(5447)})),n("d3-scale",[],(function(){return t(5134)})),n("d3-scale-chromatic",[],(function(){return t(2331)})),n("d3-selection",[],(function(){return t(8740)})),n("d3-shape",[],(function(){return t(5043)})),n("dayjs",[],(function(){return t(2350)})),n("dayjs/plugin/calendar",[],(function(){return t(8888)})),n("dayjs/plugin/relativeTime",[],(function(){return t(2543)})),n("deepmerge",[],(function(){return t(3924)})),n("ember-focus-trap/modifiers/focus-trap.js",["@ember/modifier"],(function(){return t(3109)})),n("ember-keyboard/helpers/if-key.js",["@ember/component/helper","@ember/debug","@ember/utils"],(function(){return t(3481)})),n("ember-keyboard/helpers/on-key.js",["@ember/component/helper","@ember/debug","@ember/service"],(function(){return t(6415)})),n("ember-keyboard/modifiers/on-key.js",["@ember/application","@ember/modifier","@ember/destroyable","@ember/service","@ember/object","@ember/debug","@ember/utils"],(function(){return t(4146)})),n("ember-keyboard/services/keyboard.js",["@ember/service","@ember/application","@ember/object","@ember/runloop","@ember/debug","@ember/utils"],(function(){return t(9690)})),n("ember-modifier",["@ember/application","@ember/modifier","@ember/destroyable"],(function(){return t(2509)})),n("fast-memoize",[],(function(){return t(3276)})),n("flat",[],(function(){return t(2349)})),n("intl-messageformat",[],(function(){return t(5861)})),n("intl-messageformat-parser",[],(function(){return t(5011)})),n("mnemonist/multi-map",[],(function(){return t(5709)})),n("mnemonist/set",[],(function(){return t(2519)})),n("ngraph.graph",[],(function(){return t(6001)})),n("parse-duration",[],(function(){return t(89)})),n("pretty-ms",[],(function(){return t(9837)})),n("tippy.js",[],(function(){return t(9640)})),n("tippy.js/dist/svg-arrow.css",[],(function(){return t(2959)})),n("validated-changeset",[],(function(){return t(6885)})),n("wayfarer",[],(function(){return t(7116)})),n("_eai_dyn_dialog-polyfill",[],(function(){return t.e(121).then(t.bind(t,4121))})),void n("_eai_dyn_dialog-polyfill-css",[],(function(){return t.e(744).then(t.bind(t,7744))})))},1760:function(e,r){window._eai_r=require,window._eai_d=define}},o={}
function i(e){var r=o[e]
if(void 0!==r)return r.exports
var t=o[e]={exports:{}}
return n[e].call(t.exports,t,t.exports,i),t.exports}i.m=n,e=[],i.O=(r,t,n,o)=>{if(!t){var u=1/0
for(l=0;l<e.length;l++){for(var[t,n,o]=e[l],a=!0,s=0;s<t.length;s++)(!1&o||u>=o)&&Object.keys(i.O).every((e=>i.O[e](t[s])))?t.splice(s--,1):(a=!1,o<u&&(u=o))
if(a){e.splice(l--,1)
var c=n()
void 0!==c&&(r=c)}}return r}o=o||0
for(var l=e.length;l>0&&e[l-1][2]>o;l--)e[l]=e[l-1]
e[l]=[t,n,o]},i.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e
return i.d(r,{a:r}),r},i.d=(e,r)=>{for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((r,t)=>(i.f[t](e,r),r)),[])),i.u=e=>"chunk."+e+"."+{121:"ea70a154d4cf1227b100",744:"60c31f269c98ac39ce46"}[e]+".js",i.miniCssF=e=>"chunk."+e+".60c31f269c98ac39ce46.css",i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},t="__ember_auto_import__:",i.l=(e,n,o,u)=>{if(r[e])r[e].push(n)
else{var a,s
if(void 0!==o)for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var d=c[l]
if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==t+o){a=d
break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.setAttribute("data-webpack",t+o),a.src=e),r[e]=[n]
var m=(t,n)=>{a.onerror=a.onload=null,clearTimeout(f)
var o=r[e]
if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((e=>e(n))),t)return t(n)},f=setTimeout(m.bind(null,void 0,{type:"timeout",target:a}),12e4)
a.onerror=m.bind(null,a.onerror),a.onload=m.bind(null,a.onload),s&&document.head.appendChild(a)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.p="{{.ContentPath}}assets/",(()=>{if("undefined"!=typeof document){var e={143:0}
i.f.miniCss=(r,t)=>{e[r]?t.push(e[r]):0!==e[r]&&{744:1}[r]&&t.push(e[r]=(e=>new Promise(((r,t)=>{var n=i.miniCssF(e),o=i.p+n
if(((e,r)=>{for(var t=document.getElementsByTagName("link"),n=0;n<t.length;n++){var o=(u=t[n]).getAttribute("data-href")||u.getAttribute("href")
if("stylesheet"===u.rel&&(o===e||o===r))return u}var i=document.getElementsByTagName("style")
for(n=0;n<i.length;n++){var u
if((o=(u=i[n]).getAttribute("data-href"))===e||o===r)return u}})(n,o))return r();((e,r,t,n,o)=>{var i=document.createElement("link")
i.rel="stylesheet",i.type="text/css",i.onerror=i.onload=t=>{if(i.onerror=i.onload=null,"load"===t.type)n()
else{var u=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.href||r,s=new Error("Loading CSS chunk "+e+" failed.\n("+a+")")
s.code="CSS_CHUNK_LOAD_FAILED",s.type=u,s.request=a,i.parentNode&&i.parentNode.removeChild(i),o(s)}},i.href=r,document.head.appendChild(i)})(e,o,0,r,t)})))(r).then((()=>{e[r]=0}),(t=>{throw delete e[r],t})))}}})(),(()=>{var e={143:0}
i.f.j=(r,t)=>{var n=i.o(e,r)?e[r]:void 0
if(0!==n)if(n)t.push(n[2])
else{var o=new Promise(((t,o)=>n=e[r]=[t,o]))
t.push(n[2]=o)
var u=i.p+i.u(r),a=new Error
i.l(u,(t=>{if(i.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src
a.message="Loading chunk "+r+" failed.\n("+o+": "+u+")",a.name="ChunkLoadError",a.type=o,a.request=u,n[1](a)}}),"chunk-"+r,r)}},i.O.j=r=>0===e[r]
var r=(r,t)=>{var n,o,[u,a,s]=t,c=0
if(u.some((r=>0!==e[r]))){for(n in a)i.o(a,n)&&(i.m[n]=a[n])
if(s)var l=s(i)}for(r&&r(t);c<u.length;c++)o=u[c],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0
return i.O(l)},t=globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]
t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),i.O(void 0,[924],(()=>i(1760)))
var u=i.O(void 0,[924],(()=>i(657)))
u=i.O(u),__ember_auto_import__=u})()

View File

@ -1,52 +0,0 @@
var __ember_auto_import__;(()=>{var e,r,t,n,o,i={6466:(e,r,t)=>{var n,o
e.exports=(n=_eai_d,o=_eai_r,window.emberAutoImportDynamic=function(e){return 1===arguments.length?o("_eai_dyn_"+e):o("_eai_dynt_"+e)(Array.prototype.slice.call(arguments,1))},window.emberAutoImportSync=function(e){return o("_eai_sync_"+e)(Array.prototype.slice.call(arguments,1))},n("@hashicorp/flight-icons/svg",[],(function(){return t(218)})),n("@lit/reactive-element",[],(function(){return t(3493)})),n("@xstate/fsm",[],(function(){return t(9454)})),n("a11y-dialog",[],(function(){return t(6313)})),n("base64-js",[],(function(){return t(3305)})),n("clipboard",[],(function(){return t(2309)})),n("d3-array",[],(function(){return t(1286)})),n("d3-scale",[],(function(){return t(113)})),n("d3-scale-chromatic",[],(function(){return t(9677)})),n("d3-selection",[],(function(){return t(1058)})),n("d3-shape",[],(function(){return t(6736)})),n("dayjs",[],(function(){return t(4434)})),n("dayjs/plugin/calendar",[],(function(){return t(9379)})),n("dayjs/plugin/relativeTime",[],(function(){return t(8275)})),n("deepmerge",[],(function(){return t(2999)})),n("ember-focus-trap/modifiers/focus-trap.js",[],(function(){return t(6673)})),n("ember-keyboard/helpers/if-key.js",[],(function(){return t(6866)})),n("ember-keyboard/helpers/on-key.js",[],(function(){return t(9930)})),n("ember-keyboard/modifiers/on-key.js",[],(function(){return t(6222)})),n("ember-keyboard/services/keyboard.js",[],(function(){return t(6918)})),n("fast-deep-equal",[],(function(){return t(7889)})),n("fast-memoize",[],(function(){return t(4564)})),n("flat",[],(function(){return t(8581)})),n("intersection-observer-admin",[],(function(){return t(2914)})),n("intl-messageformat",[],(function(){return t(4143)})),n("intl-messageformat-parser",[],(function(){return t(4857)})),n("mnemonist/multi-map",[],(function(){return t(6196)})),n("mnemonist/set",[],(function(){return t(3333)})),n("ngraph.graph",[],(function(){return t(1832)})),n("parse-duration",[],(function(){return t(1813)})),n("pretty-ms",[],(function(){return t(3385)})),n("raf-pool",[],(function(){return t(7114)})),n("tippy.js",[],(function(){return t(1499)})),n("validated-changeset",[],(function(){return t(6530)})),n("wayfarer",[],(function(){return t(6841)})),n("_eai_dyn_dialog-polyfill",[],(function(){return t.e(83).then(t.bind(t,7083))})),void n("_eai_dyn_dialog-polyfill-css",[],(function(){return t.e(744).then(t.bind(t,7744))})))},6760:function(e,r){window._eai_r=require,window._eai_d=define},1292:e=>{"use strict"
e.exports=require("@ember/application")},8797:e=>{"use strict"
e.exports=require("@ember/component/helper")},3353:e=>{"use strict"
e.exports=require("@ember/debug")},9341:e=>{"use strict"
e.exports=require("@ember/destroyable")},4927:e=>{"use strict"
e.exports=require("@ember/modifier")},7219:e=>{"use strict"
e.exports=require("@ember/object")},8773:e=>{"use strict"
e.exports=require("@ember/runloop")},8574:e=>{"use strict"
e.exports=require("@ember/service")},1866:e=>{"use strict"
e.exports=require("@ember/utils")},5831:e=>{"use strict"
e.exports=require("ember-modifier")}},u={}
function a(e){var r=u[e]
if(void 0!==r)return r.exports
var t=u[e]={exports:{}}
return i[e].call(t.exports,t,t.exports,a),t.exports}a.m=i,e=[],a.O=(r,t,n,o)=>{if(!t){var i=1/0
for(l=0;l<e.length;l++){for(var[t,n,o]=e[l],u=!0,s=0;s<t.length;s++)(!1&o||i>=o)&&Object.keys(a.O).every((e=>a.O[e](t[s])))?t.splice(s--,1):(u=!1,o<i&&(i=o))
if(u){e.splice(l--,1)
var c=n()
void 0!==c&&(r=c)}}return r}o=o||0
for(var l=e.length;l>0&&e[l-1][2]>o;l--)e[l]=e[l-1]
e[l]=[t,n,o]},a.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e
return a.d(r,{a:r}),r},a.d=(e,r)=>{for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((r,t)=>(a.f[t](e,r),r)),[])),a.u=e=>"chunk."+e+"."+{83:"85cc25a28afe28f711a3",744:"c0eb6726020fc4af8d3f"}[e]+".js",a.miniCssF=e=>"chunk."+e+".c0eb6726020fc4af8d3f.css",a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},t="__ember_auto_import__:",a.l=(e,n,o,i)=>{if(r[e])r[e].push(n)
else{var u,s
if(void 0!==o)for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var f=c[l]
if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==t+o){u=f
break}}u||(s=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,a.nc&&u.setAttribute("nonce",a.nc),u.setAttribute("data-webpack",t+o),u.src=e),r[e]=[n]
var d=(t,n)=>{u.onerror=u.onload=null,clearTimeout(p)
var o=r[e]
if(delete r[e],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach((e=>e(n))),t)return t(n)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:u}),12e4)
u.onerror=d.bind(null,u.onerror),u.onload=d.bind(null,u.onload),s&&document.head.appendChild(u)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.p="{{.ContentPath}}assets/",n=e=>new Promise(((r,t)=>{var n=a.miniCssF(e),o=a.p+n
if(((e,r)=>{for(var t=document.getElementsByTagName("link"),n=0;n<t.length;n++){var o=(u=t[n]).getAttribute("data-href")||u.getAttribute("href")
if("stylesheet"===u.rel&&(o===e||o===r))return u}var i=document.getElementsByTagName("style")
for(n=0;n<i.length;n++){var u
if((o=(u=i[n]).getAttribute("data-href"))===e||o===r)return u}})(n,o))return r();((e,r,t,n)=>{var o=document.createElement("link")
o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=i=>{if(o.onerror=o.onload=null,"load"===i.type)t()
else{var u=i&&("load"===i.type?"missing":i.type),a=i&&i.target&&i.target.href||r,s=new Error("Loading CSS chunk "+e+" failed.\n("+a+")")
s.code="CSS_CHUNK_LOAD_FAILED",s.type=u,s.request=a,o.parentNode.removeChild(o),n(s)}},o.href=r,document.head.appendChild(o)})(e,o,r,t)})),o={143:0},a.f.miniCss=(e,r)=>{o[e]?r.push(o[e]):0!==o[e]&&{744:1}[e]&&r.push(o[e]=n(e).then((()=>{o[e]=0}),(r=>{throw delete o[e],r})))},(()=>{var e={143:0}
a.f.j=(r,t)=>{var n=a.o(e,r)?e[r]:void 0
if(0!==n)if(n)t.push(n[2])
else{var o=new Promise(((t,o)=>n=e[r]=[t,o]))
t.push(n[2]=o)
var i=a.p+a.u(r),u=new Error
a.l(i,(t=>{if(a.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src
u.message="Loading chunk "+r+" failed.\n("+o+": "+i+")",u.name="ChunkLoadError",u.type=o,u.request=i,n[1](u)}}),"chunk-"+r,r)}},a.O.j=r=>0===e[r]
var r=(r,t)=>{var n,o,[i,u,s]=t,c=0
if(i.some((r=>0!==e[r]))){for(n in u)a.o(u,n)&&(a.m[n]=u[n])
if(s)var l=s(a)}for(r&&r(t);c<i.length;c++)o=i[c],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0
return a.O(l)},t=globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]
t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),a.O(void 0,[412],(()=>a(6760)))
var s=a.O(void 0,[412],(()=>a(6466)))
s=a.O(s),__ember_auto_import__=s})()

View File

@ -1,5 +1,5 @@
var __ember_auto_import__;(()=>{var r,e={6760:function(r,e){window._eai_r=require,window._eai_d=define},4593:(r,e,t)=>{var o,n
r.exports=(o=_eai_d,n=_eai_r,window.emberAutoImportDynamic=function(r){return 1===arguments.length?n("_eai_dyn_"+r):n("_eai_dynt_"+r)(Array.prototype.slice.call(arguments,1))},window.emberAutoImportSync=function(r){return n("_eai_sync_"+r)(Array.prototype.slice.call(arguments,1))},o("lodash.castarray",[],(function(){return t(5665)})),o("lodash.last",[],(function(){return t(66)})),o("lodash.omit",[],(function(){return t(9254)})),o("qunit",[],(function(){return t(3409)})),void o("yadda",[],(function(){return t(409)})))},9265:()=>{},3642:()=>{}},t={}
var __ember_auto_import__;(()=>{var r,e={9265:()=>{},3642:()=>{},1760:function(r,e){window._eai_r=require,window._eai_d=define},1471:(r,e,t)=>{var o,n
r.exports=(o=_eai_d,n=_eai_r,window.emberAutoImportDynamic=function(r){return 1===arguments.length?n("_eai_dyn_"+r):n("_eai_dynt_"+r)(Array.prototype.slice.call(arguments,1))},window.emberAutoImportSync=function(r){return n("_eai_sync_"+r)(Array.prototype.slice.call(arguments,1))},o("lodash.castarray",[],(function(){return t(9542)})),o("lodash.last",[],(function(){return t(9644)})),o("lodash.omit",[],(function(){return t(1609)})),o("qunit",[],(function(){return t(2053)})),void o("yadda",[],(function(){return t(2216)})))}},t={}
function o(r){var n=t[r]
if(void 0!==n)return n.exports
var i=t[r]={id:r,loaded:!1,exports:{}}
@ -16,6 +16,6 @@ var e=(e,t)=>{var n,i,[a,u,l]=t,_=0
if(a.some((e=>0!==r[e]))){for(n in u)o.o(u,n)&&(o.m[n]=u[n])
if(l)var c=l(o)}for(e&&e(t);_<a.length;_++)i=a[_],o.o(r,i)&&r[i]&&r[i][0](),r[i]=0
return o.O(c)},t=globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]
t.forEach(e.bind(null,0)),t.push=e.bind(null,t.push.bind(t))})(),o.O(void 0,[336],(()=>o(6760)))
var n=o.O(void 0,[336],(()=>o(4593)))
t.forEach(e.bind(null,0)),t.push=e.bind(null,t.push.bind(t))})(),o.O(void 0,[778],(()=>o(1760)))
var n=o.O(void 0,[778],(()=>o(1471)))
n=o.O(n),__ember_auto_import__=n})()

File diff suppressed because one or more lines are too long

View File

@ -36,4 +36,4 @@ dialog.fixed {
transform: translate(0, -50%);
}
/*# sourceMappingURL=chunk.744.c0eb6726020fc4af8d3f.css-e0c9c028789323db3f70d794b7d8bdc8.map*/
/*# sourceMappingURL=chunk.744.60c31f269c98ac39ce46.css-a42bd71a0a3384cc22270ac338164b86.map*/

View File

@ -1,5 +1,5 @@
/*!
* QUnit 2.19.1
* QUnit 2.19.4
* https://qunitjs.com/
*
* Copyright OpenJS Foundation and other contributors

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*!
* clipboard.js v2.0.8
* clipboard.js v2.0.11
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha

View File

@ -93,44 +93,45 @@ if(f.test(i)){e.eatWhile(f)
var a=e.current(),s=h.propertyIsEnumerable(a)&&h[a]
return s&&"."!=r.lastType?y(s.type,s.style,a):y("variable","variable",a)}}function v(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=m
break}n="*"==r}return y("comment","comment")}function g(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=m
break}n=!n&&"\\"==r}return y("quasi","string-2",e.current())}function x(e,t){t.fatArrowAt&&(t.fatArrowAt=null)
break}n=!n&&"\\"==r}return y("quasi","string-2",e.current())}var x="([{}])"
function b(e,t){t.fatArrowAt&&(t.fatArrowAt=null)
var r=e.string.indexOf("=>",e.start)
if(!(r<0)){for(var n=0,i=!1,a=r-1;a>=0;--a){var s=e.string.charAt(a),o="([{}])".indexOf(s)
if(!(r<0)){for(var n=0,i=!1,a=r-1;a>=0;--a){var s=e.string.charAt(a),o=x.indexOf(s)
if(o>=0&&o<3){if(!n){++a
break}if(0==--n)break}else if(o>=3&&o<6)++n
else if(f.test(s))i=!0
else{if(/["'\/]/.test(s))return
if(i&&!n){++a
break}}}i&&!n&&(t.fatArrowAt=a)}}var b={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0}
function k(e,t,r,n,i,a){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=a,null!=n&&(this.align=n)}function w(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0
for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}var _={state:null,column:null,marked:null,cc:null}
function E(){for(var e=arguments.length-1;e>=0;e--)_.cc.push(arguments[e])}function j(){return E.apply(null,arguments),!0}function S(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0
return!1}var r=_.state
if(_.marked="def",r.context){if(t(r.localVars))return
break}}}i&&!n&&(t.fatArrowAt=a)}}var k={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0}
function w(e,t,r,n,i,a){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=a,null!=n&&(this.align=n)}function _(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0
for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}var E={state:null,column:null,marked:null,cc:null}
function j(){for(var e=arguments.length-1;e>=0;e--)E.cc.push(arguments[e])}function S(){return j.apply(null,arguments),!0}function I(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0
return!1}var r=E.state
if(E.marked="def",r.context){if(t(r.localVars))return
r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return
n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}var I={name:"this",next:{name:"arguments"}}
function $(){_.state.context={prev:_.state.context,vars:_.state.localVars},_.state.localVars=I}function A(){_.state.localVars=_.state.context.vars,_.state.context=_.state.context.prev}function M(e,t){var r=function(){var r=_.state,n=r.indented
n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}var $={name:"this",next:{name:"arguments"}}
function A(){E.state.context={prev:E.state.context,vars:E.state.localVars},E.state.localVars=$}function M(){E.state.localVars=E.state.context.vars,E.state.context=E.state.context.prev}function N(e,t){var r=function(){var r=E.state,n=r.indented
if("stat"==r.lexical.type)n=r.lexical.indented
else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented
r.lexical=new k(n,_.stream.column(),e,null,r.lexical,t)}
return r.lex=!0,r}function N(){var e=_.state
e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function O(e){return function t(r){return r==e?j():";"==e?E():j(t)}}function V(e,t){return"var"==e?j(M("vardef",t.length),ae,O(";"),N):"keyword a"==e?j(M("form"),T,V,N):"keyword b"==e?j(M("form"),V,N):"{"==e?j(M("}"),ee,N):";"==e?j():"if"==e?("else"==_.state.lexical.info&&_.state.cc[_.state.cc.length-1]==N&&_.state.cc.pop()(),j(M("form"),T,V,N,ue)):"function"==e?j(me):"for"==e?j(M("form"),fe,V,N):"variable"==e?j(M("stat"),D):"switch"==e?j(M("form"),T,M("}","switch"),O("{"),ee,N,N):"case"==e?j(T,O(":")):"default"==e?j(O(":")):"catch"==e?j(M("form"),$,O("("),ve,O(")"),V,N,A):"class"==e?j(M("form"),ge,N):"export"==e?j(M("stat"),we,N):"import"==e?j(M("stat"),_e,N):"module"==e?j(M("form"),se,M("}"),O("{"),ee,N,N):"async"==e?j(V):E(M("stat"),T,O(";"),N)}function T(e){return L(e,!1)}function z(e){return L(e,!0)}function L(e,t){if(_.state.fatArrowAt==_.stream.start){var r=t?W:C
if("("==e)return j($,M(")"),Y(se,")"),N,O("=>"),r,A)
if("variable"==e)return E($,se,O("=>"),r,A)}var n=t?F:J
return b.hasOwnProperty(e)?j(n):"function"==e?j(me,n):"keyword c"==e?j(t?P:q):"("==e?j(M(")"),q,Ae,O(")"),N,n):"operator"==e||"spread"==e?j(t?z:T):"["==e?j(M("]"),Ie,N,n):"{"==e?Z(K,"}",null,n):"quasi"==e?E(U,n):"new"==e?j(function(e){return function(t){return"."==t?j(e?G:B):E(e?z:T)}}(t)):j()}function q(e){return e.match(/[;\}\)\],]/)?E():E(T)}function P(e){return e.match(/[;\}\)\],]/)?E():E(z)}function J(e,t){return","==e?j(T):F(e,t,!1)}function F(e,t,r){var n=0==r?J:F,i=0==r?T:z
return"=>"==e?j($,r?W:C,A):"operator"==e?/\+\+|--/.test(t)?j(n):"?"==t?j(T,O(":"),i):j(i):"quasi"==e?E(U,n):";"!=e?"("==e?Z(z,")","call",n):"."==e?j(H,n):"["==e?j(M("]"),q,O("]"),N,n):void 0:void 0}function U(e,t){return"quasi"!=e?E():"${"!=t.slice(t.length-2)?j(U):j(T,R)}function R(e){if("}"==e)return _.marked="string-2",_.state.tokenize=g,j(U)}function C(e){return x(_.stream,_.state),E("{"==e?V:T)}function W(e){return x(_.stream,_.state),E("{"==e?V:z)}function B(e,t){if("target"==t)return _.marked="keyword",j(J)}function G(e,t){if("target"==t)return _.marked="keyword",j(F)}function D(e){return":"==e?j(N,V):E(J,O(";"),N)}function H(e){if("variable"==e)return _.marked="property",j()}function K(e,t){return"variable"==e||"keyword"==_.style?(_.marked="property",j("get"==t||"set"==t?Q:X)):"number"==e||"string"==e?(_.marked=l?"property":_.style+" property",j(X)):"jsonld-keyword"==e?j(X):"modifier"==e?j(K):"["==e?j(T,O("]"),X):"spread"==e?j(T):void 0}function Q(e){return"variable"!=e?E(X):(_.marked="property",j(me))}function X(e){return":"==e?j(z):"("==e?E(me):void 0}function Y(e,t){function r(n,i){if(","==n){var a=_.state.lexical
return"call"==a.info&&(a.pos=(a.pos||0)+1),j(e,r)}return n==t||i==t?j():j(O(t))}return function(n,i){return n==t||i==t?j():E(e,r)}}function Z(e,t,r){for(var n=3;n<arguments.length;n++)_.cc.push(arguments[n])
return j(M(t,r),Y(e,t),N)}function ee(e){return"}"==e?j():E(V,ee)}function te(e){if(u&&":"==e)return j(ne)}function re(e,t){if("="==t)return j(z)}function ne(e){if("variable"==e)return _.marked="variable-3",j(ie)}function ie(e,t){return"<"==t?j(Y(ne,">"),ie):"["==e?j(O("]"),ie):void 0}function ae(){return E(se,te,le,ce)}function se(e,t){return"modifier"==e?j(se):"variable"==e?(S(t),j()):"spread"==e?j(se):"["==e?Z(se,"]"):"{"==e?Z(oe,"}"):void 0}function oe(e,t){return"variable"!=e||_.stream.match(/^\s*:/,!1)?("variable"==e&&(_.marked="property"),"spread"==e?j(se):"}"==e?E():j(O(":"),se,le)):(S(t),j(le))}function le(e,t){if("="==t)return j(z)}function ce(e){if(","==e)return j(ae)}function ue(e,t){if("keyword b"==e&&"else"==t)return j(M("form","else"),V,N)}function fe(e){if("("==e)return j(M(")"),he,O(")"),N)}function he(e){return"var"==e?j(ae,O(";"),de):";"==e?j(de):"variable"==e?j(pe):E(T,O(";"),de)}function pe(e,t){return"in"==t||"of"==t?(_.marked="keyword",j(T)):j(J,de)}function de(e,t){return";"==e?j(ye):"in"==t||"of"==t?(_.marked="keyword",j(T)):E(T,O(";"),ye)}function ye(e){")"!=e&&j(T)}function me(e,t){return"*"==t?(_.marked="keyword",j(me)):"variable"==e?(S(t),j(me)):"("==e?j($,M(")"),Y(ve,")"),N,te,V,A):void 0}function ve(e){return"spread"==e?j(ve):E(se,te,re)}function ge(e,t){if("variable"==e)return S(t),j(xe)}function xe(e,t){return"extends"==t?j(T,xe):"{"==e?j(M("}"),be,N):void 0}function be(e,t){return"variable"==e||"keyword"==_.style?"static"==t?(_.marked="keyword",j(be)):(_.marked="property","get"==t||"set"==t?j(ke,me,be):j(me,be)):"*"==t?(_.marked="keyword",j(be)):";"==e?j(be):"}"==e?j():void 0}function ke(e){return"variable"!=e?E():(_.marked="property",j())}function we(e,t){return"*"==t?(_.marked="keyword",j(Se,O(";"))):"default"==t?(_.marked="keyword",j(T,O(";"))):E(V)}function _e(e){return"string"==e?j():E(Ee,Se)}function Ee(e,t){return"{"==e?Z(Ee,"}"):("variable"==e&&S(t),"*"==t&&(_.marked="keyword"),j(je))}function je(e,t){if("as"==t)return _.marked="keyword",j(Ee)}function Se(e,t){if("from"==t)return _.marked="keyword",j(T)}function Ie(e){return"]"==e?j():E(z,$e)}function $e(e){return"for"==e?E(Ae,O("]")):","==e?j(Y(P,"]")):E(Y(z,"]"))}function Ae(e){return"for"==e?j(fe,Ae):"if"==e?j(T,Ae):void 0}return N.lex=!0,{startState:function(e){var t={tokenize:m,lastType:"sof",cc:[],lexical:new k((e||0)-s,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:e||0}
return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),x(e,t)),t.tokenize!=v&&e.eatSpace())return null
r.lexical=new w(n,E.stream.column(),e,null,r.lexical,t)}
return r.lex=!0,r}function O(){var e=E.state
e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function V(e){return function t(r){return r==e?S():";"==e?j():S(t)}}function T(e,t){return"var"==e?S(N("vardef",t.length),se,V(";"),O):"keyword a"==e?S(N("form"),z,T,O):"keyword b"==e?S(N("form"),T,O):"{"==e?S(N("}"),te,O):";"==e?S():"if"==e?("else"==E.state.lexical.info&&E.state.cc[E.state.cc.length-1]==O&&E.state.cc.pop()(),S(N("form"),z,T,O,fe)):"function"==e?S(ve):"for"==e?S(N("form"),he,T,O):"variable"==e?S(N("stat"),H):"switch"==e?S(N("form"),z,N("}","switch"),V("{"),te,O,O):"case"==e?S(z,V(":")):"default"==e?S(V(":")):"catch"==e?S(N("form"),A,V("("),ge,V(")"),T,O,M):"class"==e?S(N("form"),xe,O):"export"==e?S(N("stat"),_e,O):"import"==e?S(N("stat"),Ee,O):"module"==e?S(N("form"),oe,N("}"),V("{"),te,O,O):"async"==e?S(T):j(N("stat"),z,V(";"),O)}function z(e){return q(e,!1)}function L(e){return q(e,!0)}function q(e,t){if(E.state.fatArrowAt==E.stream.start){var r=t?B:W
if("("==e)return S(A,N(")"),Z(oe,")"),O,V("=>"),r,M)
if("variable"==e)return j(A,oe,V("=>"),r,M)}var n=t?U:F
return k.hasOwnProperty(e)?S(n):"function"==e?S(ve,n):"keyword c"==e?S(t?J:P):"("==e?S(N(")"),P,Me,V(")"),O,n):"operator"==e||"spread"==e?S(t?L:z):"["==e?S(N("]"),$e,O,n):"{"==e?ee(Q,"}",null,n):"quasi"==e?j(R,n):"new"==e?S(function(e){return function(t){return"."==t?S(e?D:G):j(e?L:z)}}(t)):S()}function P(e){return e.match(/[;\}\)\],]/)?j():j(z)}function J(e){return e.match(/[;\}\)\],]/)?j():j(L)}function F(e,t){return","==e?S(z):U(e,t,!1)}function U(e,t,r){var n=0==r?F:U,i=0==r?z:L
return"=>"==e?S(A,r?B:W,M):"operator"==e?/\+\+|--/.test(t)?S(n):"?"==t?S(z,V(":"),i):S(i):"quasi"==e?j(R,n):";"!=e?"("==e?ee(L,")","call",n):"."==e?S(K,n):"["==e?S(N("]"),P,V("]"),O,n):void 0:void 0}function R(e,t){return"quasi"!=e?j():"${"!=t.slice(t.length-2)?S(R):S(z,C)}function C(e){if("}"==e)return E.marked="string-2",E.state.tokenize=g,S(R)}function W(e){return b(E.stream,E.state),j("{"==e?T:z)}function B(e){return b(E.stream,E.state),j("{"==e?T:L)}function G(e,t){if("target"==t)return E.marked="keyword",S(F)}function D(e,t){if("target"==t)return E.marked="keyword",S(U)}function H(e){return":"==e?S(O,T):j(F,V(";"),O)}function K(e){if("variable"==e)return E.marked="property",S()}function Q(e,t){return"variable"==e||"keyword"==E.style?(E.marked="property",S("get"==t||"set"==t?X:Y)):"number"==e||"string"==e?(E.marked=l?"property":E.style+" property",S(Y)):"jsonld-keyword"==e?S(Y):"modifier"==e?S(Q):"["==e?S(z,V("]"),Y):"spread"==e?S(z):void 0}function X(e){return"variable"!=e?j(Y):(E.marked="property",S(ve))}function Y(e){return":"==e?S(L):"("==e?j(ve):void 0}function Z(e,t){function r(n,i){if(","==n){var a=E.state.lexical
return"call"==a.info&&(a.pos=(a.pos||0)+1),S(e,r)}return n==t||i==t?S():S(V(t))}return function(n,i){return n==t||i==t?S():j(e,r)}}function ee(e,t,r){for(var n=3;n<arguments.length;n++)E.cc.push(arguments[n])
return S(N(t,r),Z(e,t),O)}function te(e){return"}"==e?S():j(T,te)}function re(e){if(u&&":"==e)return S(ie)}function ne(e,t){if("="==t)return S(L)}function ie(e){if("variable"==e)return E.marked="variable-3",S(ae)}function ae(e,t){return"<"==t?S(Z(ie,">"),ae):"["==e?S(V("]"),ae):void 0}function se(){return j(oe,re,ce,ue)}function oe(e,t){return"modifier"==e?S(oe):"variable"==e?(I(t),S()):"spread"==e?S(oe):"["==e?ee(oe,"]"):"{"==e?ee(le,"}"):void 0}function le(e,t){return"variable"!=e||E.stream.match(/^\s*:/,!1)?("variable"==e&&(E.marked="property"),"spread"==e?S(oe):"}"==e?j():S(V(":"),oe,ce)):(I(t),S(ce))}function ce(e,t){if("="==t)return S(L)}function ue(e){if(","==e)return S(se)}function fe(e,t){if("keyword b"==e&&"else"==t)return S(N("form","else"),T,O)}function he(e){if("("==e)return S(N(")"),pe,V(")"),O)}function pe(e){return"var"==e?S(se,V(";"),ye):";"==e?S(ye):"variable"==e?S(de):j(z,V(";"),ye)}function de(e,t){return"in"==t||"of"==t?(E.marked="keyword",S(z)):S(F,ye)}function ye(e,t){return";"==e?S(me):"in"==t||"of"==t?(E.marked="keyword",S(z)):j(z,V(";"),me)}function me(e){")"!=e&&S(z)}function ve(e,t){return"*"==t?(E.marked="keyword",S(ve)):"variable"==e?(I(t),S(ve)):"("==e?S(A,N(")"),Z(ge,")"),O,re,T,M):void 0}function ge(e){return"spread"==e?S(ge):j(oe,re,ne)}function xe(e,t){if("variable"==e)return I(t),S(be)}function be(e,t){return"extends"==t?S(z,be):"{"==e?S(N("}"),ke,O):void 0}function ke(e,t){return"variable"==e||"keyword"==E.style?"static"==t?(E.marked="keyword",S(ke)):(E.marked="property","get"==t||"set"==t?S(we,ve,ke):S(ve,ke)):"*"==t?(E.marked="keyword",S(ke)):";"==e?S(ke):"}"==e?S():void 0}function we(e){return"variable"!=e?j():(E.marked="property",S())}function _e(e,t){return"*"==t?(E.marked="keyword",S(Ie,V(";"))):"default"==t?(E.marked="keyword",S(z,V(";"))):j(T)}function Ee(e){return"string"==e?S():j(je,Ie)}function je(e,t){return"{"==e?ee(je,"}"):("variable"==e&&I(t),"*"==t&&(E.marked="keyword"),S(Se))}function Se(e,t){if("as"==t)return E.marked="keyword",S(je)}function Ie(e,t){if("from"==t)return E.marked="keyword",S(z)}function $e(e){return"]"==e?S():j(L,Ae)}function Ae(e){return"for"==e?j(Me,V("]")):","==e?S(Z(J,"]")):j(Z(L,"]"))}function Me(e){return"for"==e?S(he,Me):"if"==e?S(z,Me):void 0}return O.lex=!0,{startState:function(e){var t={tokenize:m,lastType:"sof",cc:[],lexical:new w((e||0)-s,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:e||0}
return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),b(e,t)),t.tokenize!=v&&e.eatSpace())return null
var r=t.tokenize(e,t)
return"comment"==i?r:(t.lastType="operator"!=i||"++"!=a&&"--"!=a?i:"incdec",function(e,t,r,n,i){var a=e.cc
for(_.state=e,_.stream=i,_.marked=null,_.cc=a,_.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((a.length?a.pop():c?T:V)(r,n)){for(;a.length&&a[a.length-1].lex;)a.pop()()
return _.marked?_.marked:"variable"==r&&w(e,n)?"variable-2":t}}(t,r,i,a,e))},indent:function(t,r){if(t.tokenize==v)return e.Pass
for(E.state=e,E.stream=i,E.marked=null,E.cc=a,E.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((a.length?a.pop():c?z:T)(r,n)){for(;a.length&&a[a.length-1].lex;)a.pop()()
return E.marked?E.marked:"variable"==r&&_(e,n)?"variable-2":t}}(t,r,i,a,e))},indent:function(t,r){if(t.tokenize==v)return e.Pass
if(t.tokenize!=m)return 0
var i=r&&r.charAt(0),a=t.lexical
if(!/^\s*else\b/.test(r))for(var l=t.cc.length-1;l>=0;--l){var c=t.cc[l]
if(c==N)a=a.prev
else if(c!=ue)break}"stat"==a.type&&"}"==i&&(a=a.prev),o&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev)
if(c==O)a=a.prev
else if(c!=fe)break}"stat"==a.type&&"}"==i&&(a=a.prev),o&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev)
var u=a.type,f=i==u
return"vardef"==u?a.indented+("operator"==t.lastType||","==t.lastType?a.info+1:0):"form"==u&&"{"==i?a.indented:"form"==u?a.indented+s:"stat"==u?a.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||p.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,r)?o||s:0):"switch"!=a.info||f||0==n.doubleIndentSwitch?a.align?a.column+(f?0:1):a.indented+(f?0:s):a.indented+(/^(?:case|default)\b/.test(r)?s:2*s)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:c?null:"/*",blockCommentEnd:c?null:"*/",lineComment:c?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:c?"json":"javascript",jsonldMode:l,jsonMode:c,expressionAllowed:t,skipExpression:function(e){var t=e.cc[e.cc.length-1]
t!=T&&t!=z||e.cc.pop()}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}))
t!=z&&t!=L||e.cc.pop()}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}))

View File

@ -1,276 +0,0 @@
/*! js-yaml 4.0.0 https://github.com/nodeca/js-yaml @license MIT */
(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).jsyaml={})})(this,(function(e){"use strict"
function t(e){return null==e}var n={isNothing:t,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:t(e)?[]:[e]},repeat:function(e,t){var n,i=""
for(n=0;n<t;n+=1)i+=e
return i},isNegativeZero:function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},extend:function(e,t){var n,i,r,o
if(t)for(n=0,i=(o=Object.keys(t)).length;n<i;n+=1)e[r=o[n]]=t[r]
return e}}
function i(e,t){var n="",i=e.reason||"(unknown reason)"
return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+="\n\n"+e.mark.snippet),i+" "+n):i}function r(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=i(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(e){return this.name+": "+i(this,e)}
var o=r
function a(e,t,n,i,r){var o="",a="",l=Math.floor(r/2)-1
return i-t>l&&(t=i-l+(o=" ... ").length),n-i>l&&(n=i+l-(a=" ...").length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:i-t+o.length}}function l(e,t){return n.repeat(" ",t-e.length)+e}var c=function(e,t){if(t=Object.create(t||null),!e.buffer)return null
t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2)
for(var i,r=/\r?\n|\r|\0/g,o=[0],c=[],s=-1;i=r.exec(e.buffer);)c.push(i.index),o.push(i.index+i[0].length),e.position<=i.index&&s<0&&(s=o.length-2)
s<0&&(s=o.length-1)
var u,p,f="",d=Math.min(e.line+t.linesAfter,c.length).toString().length,h=t.maxLength-(t.indent+d+3)
for(u=1;u<=t.linesBefore&&!(s-u<0);u++)p=a(e.buffer,o[s-u],c[s-u],e.position-(o[s]-o[s-u]),h),f=n.repeat(" ",t.indent)+l((e.line-u+1).toString(),d)+" | "+p.str+"\n"+f
for(p=a(e.buffer,o[s],c[s],e.position,h),f+=n.repeat(" ",t.indent)+l((e.line+1).toString(),d)+" | "+p.str+"\n",f+=n.repeat("-",t.indent+d+3+p.pos)+"^\n",u=1;u<=t.linesAfter&&!(s+u>=c.length);u++)p=a(e.buffer,o[s+u],c[s+u],e.position-(o[s]-o[s+u]),h),f+=n.repeat(" ",t.indent)+l((e.line+u+1).toString(),d)+" | "+p.str+"\n"
return f.replace(/\n$/,"")},s=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],u=["scalar","sequence","mapping"]
var p=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===s.indexOf(t))throw new o('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={}
return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===u.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}
function f(e,t,n){var i=[]
return e[t].forEach((function(e){n.forEach((function(t,n){t.tag===e.tag&&t.kind===e.kind&&t.multi===e.multi&&i.push(n)})),n.push(e)})),n.filter((function(e,t){return-1===i.indexOf(t)}))}function d(e){return this.extend(e)}d.prototype.extend=function(e){var t=[],n=[]
if(e instanceof p)n.push(e)
else if(Array.isArray(e))n=n.concat(e)
else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new o("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })")
e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof p))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.")
if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")
if(e.multi)throw new o("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof p))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.")}))
var i=Object.create(d.prototype)
return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=f(i,"implicit",[]),i.compiledExplicit=f(i,"explicit",[]),i.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}}
function i(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i)
return n}(i.compiledImplicit,i.compiledExplicit),i}
var h=d,m=new h({explicit:[new p("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}}),new p("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}}),new p("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})]})
var g=new p("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0
var t=e.length
return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})
var y=new p("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1
var t=e.length
return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})
function b(e){return 48<=e&&e<=55}function A(e){return 48<=e&&e<=57}var v=new p("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1
var t,n,i=e.length,r=0,o=!1
if(!i)return!1
if("-"!==(t=e[r])&&"+"!==t||(t=e[++r]),"0"===t){if(r+1===i)return!0
if("b"===(t=e[++r])){for(r++;r<i;r++)if("_"!==(t=e[r])){if("0"!==t&&"1"!==t)return!1
o=!0}return o&&"_"!==t}if("x"===t){for(r++;r<i;r++)if("_"!==(t=e[r])){if(!(48<=(n=e.charCodeAt(r))&&n<=57||65<=n&&n<=70||97<=n&&n<=102))return!1
o=!0}return o&&"_"!==t}if("o"===t){for(r++;r<i;r++)if("_"!==(t=e[r])){if(!b(e.charCodeAt(r)))return!1
o=!0}return o&&"_"!==t}}if("_"===t)return!1
for(;r<i;r++)if("_"!==(t=e[r])){if(!A(e.charCodeAt(r)))return!1
o=!0}return!(!o||"_"===t)},construct:function(e){var t,n=e,i=1
if(-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(t=n[0])&&"+"!==t||("-"===t&&(i=-1),t=(n=n.slice(1))[0]),"0"===n)return 0
if("0"===t){if("b"===n[1])return i*parseInt(n.slice(2),2)
if("x"===n[1])return i*parseInt(n.slice(2),16)
if("o"===n[1])return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!n.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),k=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$")
var w=/^[-+]?[0-9]+e/
var C=new p("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!k.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n
return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||n.isNegativeZero(e))},represent:function(e,t){var i
if(isNaN(e))switch(t){case"lowercase":return".nan"
case"uppercase":return".NAN"
case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf"
case"uppercase":return".INF"
case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf"
case"uppercase":return"-.INF"
case"camelcase":return"-.Inf"}else if(n.isNegativeZero(e))return"-0.0"
return i=e.toString(10),w.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),x=m.extend({implicit:[g,y,v,C]}),I=x,S=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),O=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$")
var j=new p("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==S.exec(e)||null!==O.exec(e))},construct:function(e){var t,n,i,r,o,a,l,c,s=0,u=null
if(null===(t=S.exec(e))&&(t=O.exec(e)),null===t)throw new Error("Date resolve error")
if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r))
if(o=+t[4],a=+t[5],l=+t[6],t[7]){for(s=t[7].slice(0,3);s.length<3;)s+="0"
s=+s}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),c=new Date(Date.UTC(n,i,r,o,a,l,s)),u&&c.setTime(c.getTime()-u),c},instanceOf:Date,represent:function(e){return e.toISOString()}})
var T=new p("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"
var M=new p("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1
var t,n,i=0,r=e.length,o=E
for(n=0;n<r;n++)if(!((t=o.indexOf(e.charAt(n)))>64)){if(t<0)return!1
i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=E,a=0,l=[]
for(t=0;t<r;t++)t%4==0&&t&&(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|o.indexOf(i.charAt(t))
return 0===(n=r%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,i="",r=0,o=e.length,a=E
for(t=0;t<o;t++)t%3==0&&t&&(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t]
return 0===(n=o%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}}),L=Object.prototype.hasOwnProperty,N=Object.prototype.toString
var F=new p("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0
var t,n,i,r,o,a=[],l=e
for(t=0,n=l.length;t<n;t+=1){if(i=l[t],o=!1,"[object Object]"!==N.call(i))return!1
for(r in i)if(L.call(i,r)){if(o)return!1
o=!0}if(!o)return!1
if(-1!==a.indexOf(r))return!1
a.push(r)}return!0},construct:function(e){return null!==e?e:[]}}),_=Object.prototype.toString
var D=new p("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0
var t,n,i,r,o,a=e
for(o=new Array(a.length),t=0,n=a.length;t<n;t+=1){if(i=a[t],"[object Object]"!==_.call(i))return!1
if(1!==(r=Object.keys(i)).length)return!1
o[t]=[r[0],i[r[0]]]}return!0},construct:function(e){if(null===e)return[]
var t,n,i,r,o,a=e
for(o=new Array(a.length),t=0,n=a.length;t<n;t+=1)i=a[t],r=Object.keys(i),o[t]=[r[0],i[r[0]]]
return o}}),U=Object.prototype.hasOwnProperty
var q=new p("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0
var t,n=e
for(t in n)if(U.call(n,t)&&null!==n[t])return!1
return!0},construct:function(e){return null!==e?e:{}}}),Y=I.extend({implicit:[j,T],explicit:[M,F,D,q]}),P=Object.prototype.hasOwnProperty,R=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,$=/[\x85\u2028\u2029]/,B=/[,\[\]\{\}]/,K=/^(?:!|!!|![a-z\-]+!)$/i,W=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i
function H(e){return Object.prototype.toString.call(e)}function G(e){return 10===e||13===e}function V(e){return 9===e||32===e}function Z(e){return 9===e||32===e||10===e||13===e}function z(e){return 44===e||91===e||93===e||123===e||125===e}function J(e){var t
return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function Q(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function X(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var ee=new Array(256),te=new Array(256),ne=0;ne<256;ne++)ee[ne]=Q(ne)?1:0,te[ne]=Q(ne)
function ie(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Y,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function re(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart}
return n.snippet=c(n),new o(t,n)}function oe(e,t){throw re(e,t)}function ae(e,t){e.onWarning&&e.onWarning.call(null,re(e,t))}var le={YAML:function(e,t,n){var i,r,o
null!==e.version&&oe(e,"duplication of %YAML directive"),1!==n.length&&oe(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&oe(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&oe(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&ae(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r
2!==n.length&&oe(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],K.test(i)||oe(e,"ill-formed tag handle (first argument) of the TAG directive"),P.call(e.tagMap,i)&&oe(e,'there is a previously declared suffix for "'+i+'" tag handle'),W.test(r)||oe(e,"ill-formed tag prefix (second argument) of the TAG directive")
try{r=decodeURIComponent(r)}catch(o){oe(e,"tag prefix is malformed: "+r)}e.tagMap[i]=r}}
function ce(e,t,n,i){var r,o,a,l
if(t<n){if(l=e.input.slice(t,n),i)for(r=0,o=l.length;r<o;r+=1)9===(a=l.charCodeAt(r))||32<=a&&a<=1114111||oe(e,"expected valid JSON character")
else R.test(l)&&oe(e,"the stream contains non-printable characters")
e.result+=l}}function se(e,t,i,r){var o,a,l,c
for(n.isObject(i)||oe(e,"cannot merge mappings; the provided source object is unacceptable"),l=0,c=(o=Object.keys(i)).length;l<c;l+=1)a=o[l],P.call(t,a)||(t[a]=i[a],r[a]=!0)}function ue(e,t,n,i,r,o,a,l,c){var s,u
if(Array.isArray(r))for(s=0,u=(r=Array.prototype.slice.call(r)).length;s<u;s+=1)Array.isArray(r[s])&&oe(e,"nested arrays are not supported inside keys"),"object"==typeof r&&"[object Object]"===H(r[s])&&(r[s]="[object Object]")
if("object"==typeof r&&"[object Object]"===H(r)&&(r="[object Object]"),r=String(r),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(o))for(s=0,u=o.length;s<u;s+=1)se(e,t,o[s],n)
else se(e,t,o,n)
else e.json||P.call(n,r)||!P.call(t,r)||(e.line=a||e.line,e.lineStart=l||e.lineStart,e.position=c||e.position,oe(e,"duplicated mapping key")),"__proto__"===r?Object.defineProperty(t,r,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[r]=o,delete n[r]
return t}function pe(e){var t
10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):oe(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function fe(e,t,n){for(var i=0,r=e.input.charCodeAt(e.position);0!==r;){for(;V(r);)9===r&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position)
if(t&&35===r)do{r=e.input.charCodeAt(++e.position)}while(10!==r&&13!==r&&0!==r)
if(!G(r))break
for(pe(e),r=e.input.charCodeAt(e.position),i++,e.lineIndent=0;32===r;)e.lineIndent++,r=e.input.charCodeAt(++e.position)}return-1!==n&&0!==i&&e.lineIndent<n&&ae(e,"deficient indentation"),i}function de(e){var t,n=e.position
return!(45!==(t=e.input.charCodeAt(n))&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,0!==(t=e.input.charCodeAt(n))&&!Z(t)))}function he(e,t){1===t?e.result+=" ":t>1&&(e.result+=n.repeat("\n",t-1))}function me(e,t){var n,i,r=e.tag,o=e.anchor,a=[],l=!1
if(-1!==e.firstTabInLine)return!1
for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,oe(e,"tab characters must not be used in indentation")),45===i)&&Z(e.input.charCodeAt(e.position+1));)if(l=!0,e.position++,fe(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position)
else if(n=e.line,be(e,t,3,!1,!0),a.push(e.result),fe(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)oe(e,"bad indentation of a sequence entry")
else if(e.lineIndent<t)break
return!!l&&(e.tag=r,e.anchor=o,e.kind="sequence",e.result=a,!0)}function ge(e){var t,n,i,r,o=!1,a=!1
if(33!==(r=e.input.charCodeAt(e.position)))return!1
if(null!==e.tag&&oe(e,"duplication of a tag property"),60===(r=e.input.charCodeAt(++e.position))?(o=!0,r=e.input.charCodeAt(++e.position)):33===r?(a=!0,n="!!",r=e.input.charCodeAt(++e.position)):n="!",t=e.position,o){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&62!==r)
e.position<e.length?(i=e.input.slice(t,e.position),r=e.input.charCodeAt(++e.position)):oe(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==r&&!Z(r);)33===r&&(a?oe(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),K.test(n)||oe(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),r=e.input.charCodeAt(++e.position)
i=e.input.slice(t,e.position),B.test(i)&&oe(e,"tag suffix cannot contain flow indicator characters")}i&&!W.test(i)&&oe(e,"tag name cannot contain such characters: "+i)
try{i=decodeURIComponent(i)}catch(l){oe(e,"tag name is malformed: "+i)}return o?e.tag=i:P.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:"!"===n?e.tag="!"+i:"!!"===n?e.tag="tag:yaml.org,2002:"+i:oe(e,'undeclared tag handle "'+n+'"'),!0}function ye(e){var t,n
if(38!==(n=e.input.charCodeAt(e.position)))return!1
for(null!==e.anchor&&oe(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!Z(n)&&!z(n);)n=e.input.charCodeAt(++e.position)
return e.position===t&&oe(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function be(e,t,i,r,o){var a,l,c,s,u,p,f,d,h,m=1,g=!1,y=!1
if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=l=c=4===i||3===i,r&&fe(e,!0,-1)&&(g=!0,e.lineIndent>t?m=1:e.lineIndent===t?m=0:e.lineIndent<t&&(m=-1)),1===m)for(;ge(e)||ye(e);)fe(e,!0,-1)?(g=!0,c=a,e.lineIndent>t?m=1:e.lineIndent===t?m=0:e.lineIndent<t&&(m=-1)):c=!1
if(c&&(c=g||o),1!==m&&4!==i||(d=1===i||2===i?t:t+1,h=e.position-e.lineStart,1===m?c&&(me(e,h)||function(e,t,n){var i,r,o,a,l,c,s,u=e.tag,p=e.anchor,f={},d=Object.create(null),h=null,m=null,g=null,y=!1,b=!1
if(-1!==e.firstTabInLine)return!1
for(null!==e.anchor&&(e.anchorMap[e.anchor]=f),s=e.input.charCodeAt(e.position);0!==s;){if(y||-1===e.firstTabInLine||(e.position=e.firstTabInLine,oe(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),o=e.line,63!==s&&58!==s||!Z(i)){if(a=e.line,l=e.lineStart,c=e.position,!be(e,n,2,!1,!0))break
if(e.line===o){for(s=e.input.charCodeAt(e.position);V(s);)s=e.input.charCodeAt(++e.position)
if(58===s)Z(s=e.input.charCodeAt(++e.position))||oe(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(ue(e,f,d,h,m,null,a,l,c),h=m=g=null),b=!0,y=!1,r=!1,h=e.tag,m=e.result
else{if(!b)return e.tag=u,e.anchor=p,!0
oe(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return e.tag=u,e.anchor=p,!0
oe(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===s?(y&&(ue(e,f,d,h,m,null,a,l,c),h=m=g=null),b=!0,y=!0,r=!0):y?(y=!1,r=!0):oe(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,s=i
if((e.line===o||e.lineIndent>t)&&(y&&(a=e.line,l=e.lineStart,c=e.position),be(e,t,4,!0,r)&&(y?m=e.result:g=e.result),y||(ue(e,f,d,h,m,g,a,l,c),h=m=g=null),fe(e,!0,-1),s=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==s)oe(e,"bad indentation of a mapping entry")
else if(e.lineIndent<t)break}return y&&ue(e,f,d,h,m,null,a,l,c),b&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=f),b}(e,h,d))||function(e,t){var n,i,r,o,a,l,c,s,u,p,f,d,h=!0,m=e.tag,g=e.anchor,y=Object.create(null)
if(91===(d=e.input.charCodeAt(e.position)))a=93,s=!1,o=[]
else{if(123!==d)return!1
a=125,s=!0,o={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),d=e.input.charCodeAt(++e.position);0!==d;){if(fe(e,!0,t),(d=e.input.charCodeAt(e.position))===a)return e.position++,e.tag=m,e.anchor=g,e.kind=s?"mapping":"sequence",e.result=o,!0
h?44===d&&oe(e,"expected the node content, but found ','"):oe(e,"missed comma between flow collection entries"),f=null,l=c=!1,63===d&&Z(e.input.charCodeAt(e.position+1))&&(l=c=!0,e.position++,fe(e,!0,t)),n=e.line,i=e.lineStart,r=e.position,be(e,t,1,!1,!0),p=e.tag,u=e.result,fe(e,!0,t),d=e.input.charCodeAt(e.position),!c&&e.line!==n||58!==d||(l=!0,d=e.input.charCodeAt(++e.position),fe(e,!0,t),be(e,t,1,!1,!0),f=e.result),s?ue(e,o,y,p,u,f,n,i,r):l?o.push(ue(e,null,y,p,u,f,n,i,r)):o.push(u),fe(e,!0,t),44===(d=e.input.charCodeAt(e.position))?(h=!0,d=e.input.charCodeAt(++e.position)):h=!1}oe(e,"unexpected end of the stream within a flow collection")}(e,d)?y=!0:(l&&function(e,t){var i,r,o,a,l,c=1,s=!1,u=!1,p=t,f=0,d=!1
if(124===(a=e.input.charCodeAt(e.position)))r=!1
else{if(62!==a)return!1
r=!0}for(e.kind="scalar",e.result="";0!==a;)if(43===(a=e.input.charCodeAt(++e.position))||45===a)1===c?c=43===a?3:2:oe(e,"repeat of a chomping mode identifier")
else{if(!((o=48<=(l=a)&&l<=57?l-48:-1)>=0))break
0===o?oe(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?oe(e,"repeat of an indentation width identifier"):(p=t+o-1,u=!0)}if(V(a)){do{a=e.input.charCodeAt(++e.position)}while(V(a))
if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!G(a)&&0!==a)}for(;0!==a;){for(pe(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!u||e.lineIndent<p)&&32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position)
if(!u&&e.lineIndent>p&&(p=e.lineIndent),G(a))f++
else{if(e.lineIndent<p){3===c?e.result+=n.repeat("\n",s?1+f:f):1===c&&s&&(e.result+="\n")
break}for(r?V(a)?(d=!0,e.result+=n.repeat("\n",s?1+f:f)):d?(d=!1,e.result+=n.repeat("\n",f+1)):0===f?s&&(e.result+=" "):e.result+=n.repeat("\n",f):e.result+=n.repeat("\n",s?1+f:f),s=!0,u=!0,f=0,i=e.position;!G(a)&&0!==a;)a=e.input.charCodeAt(++e.position)
ce(e,i,e.position,!1)}}return!0}(e,d)||function(e,t){var n,i,r
if(39!==(n=e.input.charCodeAt(e.position)))return!1
for(e.kind="scalar",e.result="",e.position++,i=r=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(ce(e,i,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0
i=e.position,e.position++,r=e.position}else G(n)?(ce(e,i,r,!0),he(e,fe(e,!1,t)),i=r=e.position):e.position===e.lineStart&&de(e)?oe(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position)
oe(e,"unexpected end of the stream within a single quoted scalar")}(e,d)||function(e,t){var n,i,r,o,a,l,c
if(34!==(l=e.input.charCodeAt(e.position)))return!1
for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return ce(e,n,e.position,!0),e.position++,!0
if(92===l){if(ce(e,n,e.position,!0),G(l=e.input.charCodeAt(++e.position)))fe(e,!1,t)
else if(l<256&&ee[l])e.result+=te[l],e.position++
else if((a=120===(c=l)?2:117===c?4:85===c?8:0)>0){for(r=a,o=0;r>0;r--)(a=J(l=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:oe(e,"expected hexadecimal character")
e.result+=X(o),e.position++}else oe(e,"unknown escape sequence")
n=i=e.position}else G(l)?(ce(e,n,i,!0),he(e,fe(e,!1,t)),n=i=e.position):e.position===e.lineStart&&de(e)?oe(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}oe(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?y=!0:!function(e){var t,n,i
if(42!==(i=e.input.charCodeAt(e.position)))return!1
for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!Z(i)&&!z(i);)i=e.input.charCodeAt(++e.position)
return e.position===t&&oe(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),P.call(e.anchorMap,n)||oe(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],fe(e,!0,-1),!0}(e)?function(e,t,n){var i,r,o,a,l,c,s,u,p=e.kind,f=e.result
if(Z(u=e.input.charCodeAt(e.position))||z(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1
if((63===u||45===u)&&(Z(i=e.input.charCodeAt(e.position+1))||n&&z(i)))return!1
for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==u;){if(58===u){if(Z(i=e.input.charCodeAt(e.position+1))||n&&z(i))break}else if(35===u){if(Z(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&de(e)||n&&z(u))break
if(G(u)){if(l=e.line,c=e.lineStart,s=e.lineIndent,fe(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position)
continue}e.position=o,e.line=l,e.lineStart=c,e.lineIndent=s
break}}a&&(ce(e,r,o,!1),he(e,e.line-l),r=o=e.position,a=!1),V(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return ce(e,r,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,d,1===i)&&(y=!0,null===e.tag&&(e.tag="?")):(y=!0,null===e.tag&&null===e.anchor||oe(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===m&&(y=c&&me(e,h))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)
else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&oe(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),s=0,u=e.implicitTypes.length;s<u;s+=1)if((f=e.implicitTypes[s]).resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)
break}}else if("!"!==e.tag){if(P.call(e.typeMap[e.kind||"fallback"],e.tag))f=e.typeMap[e.kind||"fallback"][e.tag]
else for(f=null,s=0,u=(p=e.typeMap.multi[e.kind||"fallback"]).length;s<u;s+=1)if(e.tag.slice(0,p[s].tag.length)===p[s].tag){f=p[s]
break}f||oe(e,"unknown tag !<"+e.tag+">"),null!==e.result&&f.kind!==e.kind&&oe(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):oe(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function Ae(e){var t,n,i,r,o=e.position,a=!1
for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(r=e.input.charCodeAt(e.position))&&(fe(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!Z(r);)r=e.input.charCodeAt(++e.position)
for(i=[],(n=e.input.slice(t,e.position)).length<1&&oe(e,"directive name must not be less than one character in length");0!==r;){for(;V(r);)r=e.input.charCodeAt(++e.position)
if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!G(r))
break}if(G(r))break
for(t=e.position;0!==r&&!Z(r);)r=e.input.charCodeAt(++e.position)
i.push(e.input.slice(t,e.position))}0!==r&&pe(e),P.call(le,n)?le[n](e,n,i):ae(e,'unknown document directive "'+n+'"')}fe(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,fe(e,!0,-1)):a&&oe(e,"directives end mark is expected"),be(e,e.lineIndent-1,4,!1,!0),fe(e,!0,-1),e.checkLineBreaks&&$.test(e.input.slice(o,e.position))&&ae(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&de(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,fe(e,!0,-1)):e.position<e.length-1&&oe(e,"end of the stream or a document separator is expected")}function ve(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)))
var n=new ie(e,t),i=e.indexOf("\0")
for(-1!==i&&(n.position=i,oe(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1
for(;n.position<n.length-1;)Ae(n)
return n.documents}var ke={loadAll:function(e,t,n){null!==t&&"object"==typeof t&&void 0===n&&(n=t,t=null)
var i=ve(e,n)
if("function"!=typeof t)return i
for(var r=0,o=i.length;r<o;r+=1)t(i[r])},load:function(e,t){var n=ve(e,t)
if(0!==n.length){if(1===n.length)return n[0]
throw new o("expected a single document in the stream, but found more")}}},we=Object.prototype.toString,Ce=Object.prototype.hasOwnProperty,xe=65279,Ie={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Se=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Oe=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/
function je(e){var t,i,r
if(t=e.toString(16).toUpperCase(),e<=255)i="x",r=2
else if(e<=65535)i="u",r=4
else{if(!(e<=4294967295))throw new o("code point within a string may not be greater than 0xFFFFFFFF")
i="U",r=8}return"\\"+i+n.repeat("0",r-t.length)+t}function Te(e){this.schema=e.schema||Y,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=n.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,i,r,o,a,l,c
if(null===t)return{}
for(n={},r=0,o=(i=Object.keys(t)).length;r<o;r+=1)a=i[r],l=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(c=e.compiledTypeMap.fallback[a])&&Ce.call(c.styleAliases,l)&&(l=c.styleAliases[l]),n[a]=l
return n}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ee(e,t){for(var i,r=n.repeat(" ",t),o=0,a=-1,l="",c=e.length;o<c;)-1===(a=e.indexOf("\n",o))?(i=e.slice(o),o=c):(i=e.slice(o,a+1),o=a+1),i.length&&"\n"!==i&&(l+=r),l+=i
return l}function Me(e,t){return"\n"+n.repeat(" ",e.indent*t)}function Le(e){return 32===e||9===e}function Ne(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==xe||65536<=e&&e<=1114111}function Fe(e){return Ne(e)&&e!==xe&&13!==e&&10!==e}function _e(e,t,n){var i=Fe(e),r=i&&!Le(e)
return(n?i:i&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!r)||Fe(t)&&!Le(t)&&35===e||58===t&&r}function De(e,t){var n,i=e.charCodeAt(t)
return i>=55296&&i<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1))>=56320&&n<=57343?1024*(i-55296)+n-56320+65536:i}function Ue(e){return/^\n* /.test(e)}function qe(e,t,n,i,r,o,a,l){var c,s,u=0,p=null,f=!1,d=!1,h=-1!==i,m=-1,g=Ne(s=De(e,0))&&s!==xe&&!Le(s)&&45!==s&&63!==s&&58!==s&&44!==s&&91!==s&&93!==s&&123!==s&&125!==s&&35!==s&&38!==s&&42!==s&&33!==s&&124!==s&&61!==s&&62!==s&&39!==s&&34!==s&&37!==s&&64!==s&&96!==s&&function(e){return!Le(e)&&58!==e}(De(e,e.length-1))
if(t||a)for(c=0;c<e.length;u>=65536?c+=2:c++){if(!Ne(u=De(e,c)))return 5
g=g&&_e(u,p,l),p=u}else{for(c=0;c<e.length;u>=65536?c+=2:c++){if(10===(u=De(e,c)))f=!0,h&&(d=d||c-m-1>i&&" "!==e[m+1],m=c)
else if(!Ne(u))return 5
g=g&&_e(u,p,l),p=u}d=d||h&&c-m-1>i&&" "!==e[m+1]}return f||d?n>9&&Ue(e)?5:a?2===o?5:2:d?4:3:!g||a||r(e)?2===o?5:2:1}function Ye(e,t,n,i,r){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''"
if(!e.noCompatMode&&(-1!==Se.indexOf(t)||Oe.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'"
var a=e.indent*Math.max(1,n),l=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),c=i||e.flowLevel>-1&&n>=e.flowLevel
switch(qe(t,c,e.indent,l,(function(t){return function(e,t){var n,i
for(n=0,i=e.implicitTypes.length;n<i;n+=1)if(e.implicitTypes[n].resolve(t))return!0
return!1}(e,t)}),e.quotingType,e.forceQuotes&&!i,r)){case 1:return t
case 2:return"'"+t.replace(/'/g,"''")+"'"
case 3:return"|"+Pe(t,e.indent)+Re(Ee(t,a))
case 4:return">"+Pe(t,e.indent)+Re(Ee(function(e,t){var n,i,r=/(\n+)([^\n]*)/g,o=(l=e.indexOf("\n"),l=-1!==l?l:e.length,r.lastIndex=l,$e(e.slice(0,l),t)),a="\n"===e[0]||" "===e[0]
var l
for(;i=r.exec(e);){var c=i[1],s=i[2]
n=" "===s[0],o+=c+(a||n||""===s?"":"\n")+$e(s,t),a=n}return o}(t,l),a))
case 5:return'"'+function(e){for(var t,n="",i=0,r=0;r<e.length;i>=65536?r+=2:r++)i=De(e,r),!(t=Ie[i])&&Ne(i)?(n+=e[r],i>=65536&&(n+=e[r+1])):n+=t||je(i)
return n}(t)+'"'
default:throw new o("impossible error: invalid scalar style")}}()}function Pe(e,t){var n=Ue(e)?String(t):"",i="\n"===e[e.length-1]
return n+(i&&("\n"===e[e.length-2]||"\n"===e)?"+":i?"":"-")+"\n"}function Re(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function $e(e,t){if(""===e||" "===e[0])return e
for(var n,i,r=/ [^ ]/g,o=0,a=0,l=0,c="";n=r.exec(e);)(l=n.index)-o>t&&(i=a>o?a:l,c+="\n"+e.slice(o,i),o=i+1),a=l
return c+="\n",e.length-o>t&&a>o?c+=e.slice(o,a)+"\n"+e.slice(a+1):c+=e.slice(o),c.slice(1)}function Be(e,t,n,i){var r,o,a,l="",c=e.tag
for(r=0,o=n.length;r<o;r+=1)a=n[r],e.replacer&&(a=e.replacer.call(n,String(r),a)),(We(e,t+1,a,!0,!0,!1,!0)||void 0===a&&We(e,t+1,null,!0,!0,!1,!0))&&(i&&""===l||(l+=Me(e,t)),e.dump&&10===e.dump.charCodeAt(0)?l+="-":l+="- ",l+=e.dump)
e.tag=c,e.dump=l||"[]"}function Ke(e,t,n){var i,r,a,l,c,s
for(a=0,l=(r=n?e.explicitTypes:e.implicitTypes).length;a<l;a+=1)if(((c=r[a]).instanceOf||c.predicate)&&(!c.instanceOf||"object"==typeof t&&t instanceof c.instanceOf)&&(!c.predicate||c.predicate(t))){if(n?c.multi&&c.representName?e.tag=c.representName(t):e.tag=c.tag:e.tag="?",c.represent){if(s=e.styleMap[c.tag]||c.defaultStyle,"[object Function]"===we.call(c.represent))i=c.represent(t,s)
else{if(!Ce.call(c.represent,s))throw new o("!<"+c.tag+'> tag resolver accepts not "'+s+'" style')
i=c.represent[s](t,s)}e.dump=i}return!0}return!1}function We(e,t,n,i,r,a,l){e.tag=null,e.dump=n,Ke(e,n,!1)||Ke(e,n,!0)
var c,s=we.call(e.dump),u=i
i&&(i=e.flowLevel<0||e.flowLevel>t)
var p,f,d="[object Object]"===s||"[object Array]"===s
if(d&&(f=-1!==(p=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(r=!1),f&&e.usedDuplicates[p])e.dump="*ref_"+p
else{if(d&&f&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===s)i&&0!==Object.keys(e.dump).length?(function(e,t,n,i){var r,a,l,c,s,u,p="",f=e.tag,d=Object.keys(n)
if(!0===e.sortKeys)d.sort()
else if("function"==typeof e.sortKeys)d.sort(e.sortKeys)
else if(e.sortKeys)throw new o("sortKeys must be a boolean or a function")
for(r=0,a=d.length;r<a;r+=1)u="",i&&""===p||(u+=Me(e,t)),c=n[l=d[r]],e.replacer&&(c=e.replacer.call(n,l,c)),We(e,t+1,l,!0,!0,!0)&&((s=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,s&&(u+=Me(e,t)),We(e,t+1,c,!0,s)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",p+=u+=e.dump))
e.tag=f,e.dump=p||"{}"}(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(function(e,t,n){var i,r,o,a,l,c="",s=e.tag,u=Object.keys(n)
for(i=0,r=u.length;i<r;i+=1)l="",""!==c&&(l+=", "),e.condenseFlow&&(l+='"'),a=n[o=u[i]],e.replacer&&(a=e.replacer.call(n,o,a)),We(e,t,o,!1,!1)&&(e.dump.length>1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),We(e,t,a,!1,!1)&&(c+=l+=e.dump))
e.tag=s,e.dump="{"+c+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump))
else if("[object Array]"===s)i&&0!==e.dump.length?(e.noArrayIndent&&!l&&t>0?Be(e,t-1,e.dump,r):Be(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(function(e,t,n){var i,r,o,a="",l=e.tag
for(i=0,r=n.length;i<r;i+=1)o=n[i],e.replacer&&(o=e.replacer.call(n,String(i),o)),(We(e,t,o,!1,!1)||void 0===o&&We(e,t,null,!1,!1))&&(""!==a&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump)
e.tag=l,e.dump="["+a+"]"}(e,t,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump))
else{if("[object String]"!==s){if("[object Undefined]"===s)return!1
if(e.skipInvalid)return!1
throw new o("unacceptable kind of an object to dump "+s)}"?"!==e.tag&&Ye(e,e.dump,t,a,u)}null!==e.tag&&"?"!==e.tag&&(c=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),c="!"===e.tag[0]?"!"+c:"tag:yaml.org,2002:"===c.slice(0,18)?"!!"+c.slice(18):"!<"+c+">",e.dump=c+" "+e.dump)}return!0}function He(e,t){var n,i,r=[],o=[]
for(Ge(e,r,o),n=0,i=o.length;n<i;n+=1)t.duplicates.push(r[o[n]])
t.usedDuplicates=new Array(i)}function Ge(e,t,n){var i,r,o
if(null!==e&&"object"==typeof e)if(-1!==(r=t.indexOf(e)))-1===n.indexOf(r)&&n.push(r)
else if(t.push(e),Array.isArray(e))for(r=0,o=e.length;r<o;r+=1)Ge(e[r],t,n)
else for(r=0,o=(i=Object.keys(e)).length;r<o;r+=1)Ge(e[i[r]],t,n)}function Ve(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var Ze=p,ze=h,Je=m,Qe=x,Xe=I,et=Y,tt=ke.load,nt=ke.loadAll,it={dump:function(e,t){var n=new Te(t=t||{})
n.noRefs||He(e,n)
var i=e
return n.replacer&&(i=n.replacer.call({"":i},"",i)),We(n,0,i,!0,!0)?n.dump+"\n":""}}.dump,rt=o,ot=Ve("safeLoad","load"),at=Ve("safeLoadAll","loadAll"),lt=Ve("safeDump","dump"),ct={Type:Ze,Schema:ze,FAILSAFE_SCHEMA:Je,JSON_SCHEMA:Qe,CORE_SCHEMA:Xe,DEFAULT_SCHEMA:et,load:tt,loadAll:nt,dump:it,YAMLException:rt,safeLoad:ot,safeLoadAll:at,safeDump:lt}
e.CORE_SCHEMA=Xe,e.DEFAULT_SCHEMA=et,e.FAILSAFE_SCHEMA=Je,e.JSON_SCHEMA=Qe,e.Schema=ze,e.Type=Ze,e.YAMLException=rt,e.default=ct,e.dump=it,e.load=tt,e.loadAll=nt,e.safeDump=lt,e.safeLoad=ot,e.safeLoadAll=at,Object.defineProperty(e,"__esModule",{value:!0})})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict"
e.defineMode("yaml",(function(){var e=new RegExp("\\b(("+["true","false","on","off","yes","no"].join(")|(")+"))$","i")
return{token:function(t,n){var i=t.peek(),r=n.escaped
if(n.escaped=!1,"#"==i&&(0==t.pos||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),"comment"
if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string"
if(n.literal&&t.indentation()>n.keyCol)return t.skipToEnd(),"string"
if(n.literal&&(n.literal=!1),t.sol()){if(n.keyCol=0,n.pair=!1,n.pairStart=!1,t.match(/---/))return"def"
if(t.match(/\.\.\./))return"def"
if(t.match(/\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==i?n.inlinePairs++:"}"==i?n.inlinePairs--:"["==i?n.inlineList++:n.inlineList--,"meta"
if(n.inlineList>0&&!r&&","==i)return t.next(),"meta"
if(n.inlinePairs>0&&!r&&","==i)return n.keyCol=0,n.pair=!1,n.pairStart=!1,t.next(),"meta"
if(n.pairStart){if(t.match(/^\s*(\||\>)\s*/))return n.literal=!0,"meta"
if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2"
if(0==n.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/))return"number"
if(n.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number"
if(t.match(e))return"keyword"}return!n.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(n.pair=!0,n.keyCol=t.indentation(),"atom"):n.pair&&t.match(/^:\s*/)?(n.pairStart=!0,"meta"):(n.pairStart=!1,n.escaped="\\"==i,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}}}})),e.defineMIME("text/x-yaml","yaml")}))

View File

@ -0,0 +1,279 @@
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).jsyaml={})})(this,(function(e){"use strict"
function t(e){return null==e}var n={isNothing:t,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:t(e)?[]:[e]},repeat:function(e,t){var n,i=""
for(n=0;n<t;n+=1)i+=e
return i},isNegativeZero:function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},extend:function(e,t){var n,i,r,o
if(t)for(n=0,i=(o=Object.keys(t)).length;n<i;n+=1)e[r=o[n]]=t[r]
return e}}
function i(e,t){var n="",i=e.reason||"(unknown reason)"
return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+="\n\n"+e.mark.snippet),i+" "+n):i}function r(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=i(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(e){return this.name+": "+i(this,e)}
var o=r
function a(e,t,n,i,r){var o="",a="",l=Math.floor(r/2)-1
return i-t>l&&(t=i-l+(o=" ... ").length),n-i>l&&(n=i+l-(a=" ...").length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:i-t+o.length}}function l(e,t){return n.repeat(" ",t-e.length)+e}var s=function(e,t){if(t=Object.create(t||null),!e.buffer)return null
t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2)
for(var i,r=/\r?\n|\r|\0/g,o=[0],s=[],c=-1;i=r.exec(e.buffer);)s.push(i.index),o.push(i.index+i[0].length),e.position<=i.index&&c<0&&(c=o.length-2)
c<0&&(c=o.length-1)
var u,p,f="",d=Math.min(e.line+t.linesAfter,s.length).toString().length,h=t.maxLength-(t.indent+d+3)
for(u=1;u<=t.linesBefore&&!(c-u<0);u++)p=a(e.buffer,o[c-u],s[c-u],e.position-(o[c]-o[c-u]),h),f=n.repeat(" ",t.indent)+l((e.line-u+1).toString(),d)+" | "+p.str+"\n"+f
for(p=a(e.buffer,o[c],s[c],e.position,h),f+=n.repeat(" ",t.indent)+l((e.line+1).toString(),d)+" | "+p.str+"\n",f+=n.repeat("-",t.indent+d+3+p.pos)+"^\n",u=1;u<=t.linesAfter&&!(c+u>=s.length);u++)p=a(e.buffer,o[c+u],s[c+u],e.position-(o[c]-o[c+u]),h),f+=n.repeat(" ",t.indent)+l((e.line+u+1).toString(),d)+" | "+p.str+"\n"
return f.replace(/\n$/,"")},c=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],u=["scalar","sequence","mapping"]
var p=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===c.indexOf(t))throw new o('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={}
return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===u.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}
function f(e,t){var n=[]
return e[t].forEach((function(e){var t=n.length
n.forEach((function(n,i){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=i)})),n[t]=e})),n}function d(e){return this.extend(e)}d.prototype.extend=function(e){var t=[],n=[]
if(e instanceof p)n.push(e)
else if(Array.isArray(e))n=n.concat(e)
else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new o("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })")
e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof p))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.")
if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")
if(e.multi)throw new o("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof p))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.")}))
var i=Object.create(d.prototype)
return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=f(i,"implicit"),i.compiledExplicit=f(i,"explicit"),i.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}}
function i(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i)
return n}(i.compiledImplicit,i.compiledExplicit),i}
var h=d,m=new p("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}}),g=new p("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}}),y=new p("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}}),b=new h({explicit:[m,g,y]})
var A=new p("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0
var t=e.length
return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})
var v=new p("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1
var t=e.length
return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})
function k(e){return 48<=e&&e<=55}function w(e){return 48<=e&&e<=57}var C=new p("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1
var t,n,i=e.length,r=0,o=!1
if(!i)return!1
if("-"!==(t=e[r])&&"+"!==t||(t=e[++r]),"0"===t){if(r+1===i)return!0
if("b"===(t=e[++r])){for(r++;r<i;r++)if("_"!==(t=e[r])){if("0"!==t&&"1"!==t)return!1
o=!0}return o&&"_"!==t}if("x"===t){for(r++;r<i;r++)if("_"!==(t=e[r])){if(!(48<=(n=e.charCodeAt(r))&&n<=57||65<=n&&n<=70||97<=n&&n<=102))return!1
o=!0}return o&&"_"!==t}if("o"===t){for(r++;r<i;r++)if("_"!==(t=e[r])){if(!k(e.charCodeAt(r)))return!1
o=!0}return o&&"_"!==t}}if("_"===t)return!1
for(;r<i;r++)if("_"!==(t=e[r])){if(!w(e.charCodeAt(r)))return!1
o=!0}return!(!o||"_"===t)},construct:function(e){var t,n=e,i=1
if(-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(t=n[0])&&"+"!==t||("-"===t&&(i=-1),t=(n=n.slice(1))[0]),"0"===n)return 0
if("0"===t){if("b"===n[1])return i*parseInt(n.slice(2),2)
if("x"===n[1])return i*parseInt(n.slice(2),16)
if("o"===n[1])return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!n.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),x=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$")
var I=/^[-+]?[0-9]+e/
var S=new p("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!x.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n
return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||n.isNegativeZero(e))},represent:function(e,t){var i
if(isNaN(e))switch(t){case"lowercase":return".nan"
case"uppercase":return".NAN"
case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf"
case"uppercase":return".INF"
case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf"
case"uppercase":return"-.INF"
case"camelcase":return"-.Inf"}else if(n.isNegativeZero(e))return"-0.0"
return i=e.toString(10),I.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),j=b.extend({implicit:[A,v,C,S]}),O=j,T=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),E=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$")
var M=new p("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==T.exec(e)||null!==E.exec(e))},construct:function(e){var t,n,i,r,o,a,l,s,c=0,u=null
if(null===(t=T.exec(e))&&(t=E.exec(e)),null===t)throw new Error("Date resolve error")
if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r))
if(o=+t[4],a=+t[5],l=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0"
c=+c}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),s=new Date(Date.UTC(n,i,r,o,a,l,c)),u&&s.setTime(s.getTime()-u),s},instanceOf:Date,represent:function(e){return e.toISOString()}})
var L=new p("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"
var F=new p("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1
var t,n,i=0,r=e.length,o=N
for(n=0;n<r;n++)if(!((t=o.indexOf(e.charAt(n)))>64)){if(t<0)return!1
i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=N,a=0,l=[]
for(t=0;t<r;t++)t%4==0&&t&&(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|o.indexOf(i.charAt(t))
return 0===(n=r%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,i="",r=0,o=e.length,a=N
for(t=0;t<o;t++)t%3==0&&t&&(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t]
return 0===(n=o%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}}),_=Object.prototype.hasOwnProperty,D=Object.prototype.toString
var q=new p("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0
var t,n,i,r,o,a=[],l=e
for(t=0,n=l.length;t<n;t+=1){if(i=l[t],o=!1,"[object Object]"!==D.call(i))return!1
for(r in i)if(_.call(i,r)){if(o)return!1
o=!0}if(!o)return!1
if(-1!==a.indexOf(r))return!1
a.push(r)}return!0},construct:function(e){return null!==e?e:[]}}),U=Object.prototype.toString
var Y=new p("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0
var t,n,i,r,o,a=e
for(o=new Array(a.length),t=0,n=a.length;t<n;t+=1){if(i=a[t],"[object Object]"!==U.call(i))return!1
if(1!==(r=Object.keys(i)).length)return!1
o[t]=[r[0],i[r[0]]]}return!0},construct:function(e){if(null===e)return[]
var t,n,i,r,o,a=e
for(o=new Array(a.length),t=0,n=a.length;t<n;t+=1)i=a[t],r=Object.keys(i),o[t]=[r[0],i[r[0]]]
return o}}),P=Object.prototype.hasOwnProperty
var R=new p("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0
var t,n=e
for(t in n)if(P.call(n,t)&&null!==n[t])return!1
return!0},construct:function(e){return null!==e?e:{}}}),$=O.extend({implicit:[M,L],explicit:[F,q,Y,R]}),B=Object.prototype.hasOwnProperty,K=1,W=2,H=3,G=4,V=1,Z=2,z=3,J=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Q=/[\x85\u2028\u2029]/,X=/[,\[\]\{\}]/,ee=/^(?:!|!!|![a-z\-]+!)$/i,te=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i
function ne(e){return Object.prototype.toString.call(e)}function ie(e){return 10===e||13===e}function re(e){return 9===e||32===e}function oe(e){return 9===e||32===e||10===e||13===e}function ae(e){return 44===e||91===e||93===e||123===e||125===e}function le(e){var t
return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function se(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function ce(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var ue=new Array(256),pe=new Array(256),fe=0;fe<256;fe++)ue[fe]=se(fe)?1:0,pe[fe]=se(fe)
function de(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||$,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function he(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart}
return n.snippet=s(n),new o(t,n)}function me(e,t){throw he(e,t)}function ge(e,t){e.onWarning&&e.onWarning.call(null,he(e,t))}var ye={YAML:function(e,t,n){var i,r,o
null!==e.version&&me(e,"duplication of %YAML directive"),1!==n.length&&me(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&me(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&me(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&ge(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r
2!==n.length&&me(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],ee.test(i)||me(e,"ill-formed tag handle (first argument) of the TAG directive"),B.call(e.tagMap,i)&&me(e,'there is a previously declared suffix for "'+i+'" tag handle'),te.test(r)||me(e,"ill-formed tag prefix (second argument) of the TAG directive")
try{r=decodeURIComponent(r)}catch(o){me(e,"tag prefix is malformed: "+r)}e.tagMap[i]=r}}
function be(e,t,n,i){var r,o,a,l
if(t<n){if(l=e.input.slice(t,n),i)for(r=0,o=l.length;r<o;r+=1)9===(a=l.charCodeAt(r))||32<=a&&a<=1114111||me(e,"expected valid JSON character")
else J.test(l)&&me(e,"the stream contains non-printable characters")
e.result+=l}}function Ae(e,t,i,r){var o,a,l,s
for(n.isObject(i)||me(e,"cannot merge mappings; the provided source object is unacceptable"),l=0,s=(o=Object.keys(i)).length;l<s;l+=1)a=o[l],B.call(t,a)||(t[a]=i[a],r[a]=!0)}function ve(e,t,n,i,r,o,a,l,s){var c,u
if(Array.isArray(r))for(c=0,u=(r=Array.prototype.slice.call(r)).length;c<u;c+=1)Array.isArray(r[c])&&me(e,"nested arrays are not supported inside keys"),"object"==typeof r&&"[object Object]"===ne(r[c])&&(r[c]="[object Object]")
if("object"==typeof r&&"[object Object]"===ne(r)&&(r="[object Object]"),r=String(r),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(o))for(c=0,u=o.length;c<u;c+=1)Ae(e,t,o[c],n)
else Ae(e,t,o,n)
else e.json||B.call(n,r)||!B.call(t,r)||(e.line=a||e.line,e.lineStart=l||e.lineStart,e.position=s||e.position,me(e,"duplicated mapping key")),"__proto__"===r?Object.defineProperty(t,r,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[r]=o,delete n[r]
return t}function ke(e){var t
10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):me(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function we(e,t,n){for(var i=0,r=e.input.charCodeAt(e.position);0!==r;){for(;re(r);)9===r&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position)
if(t&&35===r)do{r=e.input.charCodeAt(++e.position)}while(10!==r&&13!==r&&0!==r)
if(!ie(r))break
for(ke(e),r=e.input.charCodeAt(e.position),i++,e.lineIndent=0;32===r;)e.lineIndent++,r=e.input.charCodeAt(++e.position)}return-1!==n&&0!==i&&e.lineIndent<n&&ge(e,"deficient indentation"),i}function Ce(e){var t,n=e.position
return!(45!==(t=e.input.charCodeAt(n))&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,0!==(t=e.input.charCodeAt(n))&&!oe(t)))}function xe(e,t){1===t?e.result+=" ":t>1&&(e.result+=n.repeat("\n",t-1))}function Ie(e,t){var n,i,r=e.tag,o=e.anchor,a=[],l=!1
if(-1!==e.firstTabInLine)return!1
for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,me(e,"tab characters must not be used in indentation")),45===i)&&oe(e.input.charCodeAt(e.position+1));)if(l=!0,e.position++,we(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position)
else if(n=e.line,Oe(e,t,H,!1,!0),a.push(e.result),we(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)me(e,"bad indentation of a sequence entry")
else if(e.lineIndent<t)break
return!!l&&(e.tag=r,e.anchor=o,e.kind="sequence",e.result=a,!0)}function Se(e){var t,n,i,r,o=!1,a=!1
if(33!==(r=e.input.charCodeAt(e.position)))return!1
if(null!==e.tag&&me(e,"duplication of a tag property"),60===(r=e.input.charCodeAt(++e.position))?(o=!0,r=e.input.charCodeAt(++e.position)):33===r?(a=!0,n="!!",r=e.input.charCodeAt(++e.position)):n="!",t=e.position,o){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&62!==r)
e.position<e.length?(i=e.input.slice(t,e.position),r=e.input.charCodeAt(++e.position)):me(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==r&&!oe(r);)33===r&&(a?me(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),ee.test(n)||me(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),r=e.input.charCodeAt(++e.position)
i=e.input.slice(t,e.position),X.test(i)&&me(e,"tag suffix cannot contain flow indicator characters")}i&&!te.test(i)&&me(e,"tag name cannot contain such characters: "+i)
try{i=decodeURIComponent(i)}catch(l){me(e,"tag name is malformed: "+i)}return o?e.tag=i:B.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:"!"===n?e.tag="!"+i:"!!"===n?e.tag="tag:yaml.org,2002:"+i:me(e,'undeclared tag handle "'+n+'"'),!0}function je(e){var t,n
if(38!==(n=e.input.charCodeAt(e.position)))return!1
for(null!==e.anchor&&me(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!oe(n)&&!ae(n);)n=e.input.charCodeAt(++e.position)
return e.position===t&&me(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Oe(e,t,i,r,o){var a,l,s,c,u,p,f,d,h,m=1,g=!1,y=!1
if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=l=s=G===i||H===i,r&&we(e,!0,-1)&&(g=!0,e.lineIndent>t?m=1:e.lineIndent===t?m=0:e.lineIndent<t&&(m=-1)),1===m)for(;Se(e)||je(e);)we(e,!0,-1)?(g=!0,s=a,e.lineIndent>t?m=1:e.lineIndent===t?m=0:e.lineIndent<t&&(m=-1)):s=!1
if(s&&(s=g||o),1!==m&&G!==i||(d=K===i||W===i?t:t+1,h=e.position-e.lineStart,1===m?s&&(Ie(e,h)||function(e,t,n){var i,r,o,a,l,s,c,u=e.tag,p=e.anchor,f={},d=Object.create(null),h=null,m=null,g=null,y=!1,b=!1
if(-1!==e.firstTabInLine)return!1
for(null!==e.anchor&&(e.anchorMap[e.anchor]=f),c=e.input.charCodeAt(e.position);0!==c;){if(y||-1===e.firstTabInLine||(e.position=e.firstTabInLine,me(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),o=e.line,63!==c&&58!==c||!oe(i)){if(a=e.line,l=e.lineStart,s=e.position,!Oe(e,n,W,!1,!0))break
if(e.line===o){for(c=e.input.charCodeAt(e.position);re(c);)c=e.input.charCodeAt(++e.position)
if(58===c)oe(c=e.input.charCodeAt(++e.position))||me(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(ve(e,f,d,h,m,null,a,l,s),h=m=g=null),b=!0,y=!1,r=!1,h=e.tag,m=e.result
else{if(!b)return e.tag=u,e.anchor=p,!0
me(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return e.tag=u,e.anchor=p,!0
me(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(ve(e,f,d,h,m,null,a,l,s),h=m=g=null),b=!0,y=!0,r=!0):y?(y=!1,r=!0):me(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=i
if((e.line===o||e.lineIndent>t)&&(y&&(a=e.line,l=e.lineStart,s=e.position),Oe(e,t,G,!0,r)&&(y?m=e.result:g=e.result),y||(ve(e,f,d,h,m,g,a,l,s),h=m=g=null),we(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==c)me(e,"bad indentation of a mapping entry")
else if(e.lineIndent<t)break}return y&&ve(e,f,d,h,m,null,a,l,s),b&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=f),b}(e,h,d))||function(e,t){var n,i,r,o,a,l,s,c,u,p,f,d,h=!0,m=e.tag,g=e.anchor,y=Object.create(null)
if(91===(d=e.input.charCodeAt(e.position)))a=93,c=!1,o=[]
else{if(123!==d)return!1
a=125,c=!0,o={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),d=e.input.charCodeAt(++e.position);0!==d;){if(we(e,!0,t),(d=e.input.charCodeAt(e.position))===a)return e.position++,e.tag=m,e.anchor=g,e.kind=c?"mapping":"sequence",e.result=o,!0
h?44===d&&me(e,"expected the node content, but found ','"):me(e,"missed comma between flow collection entries"),f=null,l=s=!1,63===d&&oe(e.input.charCodeAt(e.position+1))&&(l=s=!0,e.position++,we(e,!0,t)),n=e.line,i=e.lineStart,r=e.position,Oe(e,t,K,!1,!0),p=e.tag,u=e.result,we(e,!0,t),d=e.input.charCodeAt(e.position),!s&&e.line!==n||58!==d||(l=!0,d=e.input.charCodeAt(++e.position),we(e,!0,t),Oe(e,t,K,!1,!0),f=e.result),c?ve(e,o,y,p,u,f,n,i,r):l?o.push(ve(e,null,y,p,u,f,n,i,r)):o.push(u),we(e,!0,t),44===(d=e.input.charCodeAt(e.position))?(h=!0,d=e.input.charCodeAt(++e.position)):h=!1}me(e,"unexpected end of the stream within a flow collection")}(e,d)?y=!0:(l&&function(e,t){var i,r,o,a,l,s=V,c=!1,u=!1,p=t,f=0,d=!1
if(124===(a=e.input.charCodeAt(e.position)))r=!1
else{if(62!==a)return!1
r=!0}for(e.kind="scalar",e.result="";0!==a;)if(43===(a=e.input.charCodeAt(++e.position))||45===a)V===s?s=43===a?z:Z:me(e,"repeat of a chomping mode identifier")
else{if(!((o=48<=(l=a)&&l<=57?l-48:-1)>=0))break
0===o?me(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?me(e,"repeat of an indentation width identifier"):(p=t+o-1,u=!0)}if(re(a)){do{a=e.input.charCodeAt(++e.position)}while(re(a))
if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!ie(a)&&0!==a)}for(;0!==a;){for(ke(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!u||e.lineIndent<p)&&32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position)
if(!u&&e.lineIndent>p&&(p=e.lineIndent),ie(a))f++
else{if(e.lineIndent<p){s===z?e.result+=n.repeat("\n",c?1+f:f):s===V&&c&&(e.result+="\n")
break}for(r?re(a)?(d=!0,e.result+=n.repeat("\n",c?1+f:f)):d?(d=!1,e.result+=n.repeat("\n",f+1)):0===f?c&&(e.result+=" "):e.result+=n.repeat("\n",f):e.result+=n.repeat("\n",c?1+f:f),c=!0,u=!0,f=0,i=e.position;!ie(a)&&0!==a;)a=e.input.charCodeAt(++e.position)
be(e,i,e.position,!1)}}return!0}(e,d)||function(e,t){var n,i,r
if(39!==(n=e.input.charCodeAt(e.position)))return!1
for(e.kind="scalar",e.result="",e.position++,i=r=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(be(e,i,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0
i=e.position,e.position++,r=e.position}else ie(n)?(be(e,i,r,!0),xe(e,we(e,!1,t)),i=r=e.position):e.position===e.lineStart&&Ce(e)?me(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position)
me(e,"unexpected end of the stream within a single quoted scalar")}(e,d)||function(e,t){var n,i,r,o,a,l,s
if(34!==(l=e.input.charCodeAt(e.position)))return!1
for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return be(e,n,e.position,!0),e.position++,!0
if(92===l){if(be(e,n,e.position,!0),ie(l=e.input.charCodeAt(++e.position)))we(e,!1,t)
else if(l<256&&ue[l])e.result+=pe[l],e.position++
else if((a=120===(s=l)?2:117===s?4:85===s?8:0)>0){for(r=a,o=0;r>0;r--)(a=le(l=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:me(e,"expected hexadecimal character")
e.result+=ce(o),e.position++}else me(e,"unknown escape sequence")
n=i=e.position}else ie(l)?(be(e,n,i,!0),xe(e,we(e,!1,t)),n=i=e.position):e.position===e.lineStart&&Ce(e)?me(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}me(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?y=!0:!function(e){var t,n,i
if(42!==(i=e.input.charCodeAt(e.position)))return!1
for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!oe(i)&&!ae(i);)i=e.input.charCodeAt(++e.position)
return e.position===t&&me(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),B.call(e.anchorMap,n)||me(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],we(e,!0,-1),!0}(e)?function(e,t,n){var i,r,o,a,l,s,c,u,p=e.kind,f=e.result
if(oe(u=e.input.charCodeAt(e.position))||ae(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1
if((63===u||45===u)&&(oe(i=e.input.charCodeAt(e.position+1))||n&&ae(i)))return!1
for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==u;){if(58===u){if(oe(i=e.input.charCodeAt(e.position+1))||n&&ae(i))break}else if(35===u){if(oe(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&Ce(e)||n&&ae(u))break
if(ie(u)){if(l=e.line,s=e.lineStart,c=e.lineIndent,we(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position)
continue}e.position=o,e.line=l,e.lineStart=s,e.lineIndent=c
break}}a&&(be(e,r,o,!1),xe(e,e.line-l),r=o=e.position,a=!1),re(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return be(e,r,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,d,K===i)&&(y=!0,null===e.tag&&(e.tag="?")):(y=!0,null===e.tag&&null===e.anchor||me(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===m&&(y=s&&Ie(e,h))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)
else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&me(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),c=0,u=e.implicitTypes.length;c<u;c+=1)if((f=e.implicitTypes[c]).resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)
break}}else if("!"!==e.tag){if(B.call(e.typeMap[e.kind||"fallback"],e.tag))f=e.typeMap[e.kind||"fallback"][e.tag]
else for(f=null,c=0,u=(p=e.typeMap.multi[e.kind||"fallback"]).length;c<u;c+=1)if(e.tag.slice(0,p[c].tag.length)===p[c].tag){f=p[c]
break}f||me(e,"unknown tag !<"+e.tag+">"),null!==e.result&&f.kind!==e.kind&&me(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):me(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function Te(e){var t,n,i,r,o=e.position,a=!1
for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(r=e.input.charCodeAt(e.position))&&(we(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!oe(r);)r=e.input.charCodeAt(++e.position)
for(i=[],(n=e.input.slice(t,e.position)).length<1&&me(e,"directive name must not be less than one character in length");0!==r;){for(;re(r);)r=e.input.charCodeAt(++e.position)
if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!ie(r))
break}if(ie(r))break
for(t=e.position;0!==r&&!oe(r);)r=e.input.charCodeAt(++e.position)
i.push(e.input.slice(t,e.position))}0!==r&&ke(e),B.call(ye,n)?ye[n](e,n,i):ge(e,'unknown document directive "'+n+'"')}we(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,we(e,!0,-1)):a&&me(e,"directives end mark is expected"),Oe(e,e.lineIndent-1,G,!1,!0),we(e,!0,-1),e.checkLineBreaks&&Q.test(e.input.slice(o,e.position))&&ge(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ce(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,we(e,!0,-1)):e.position<e.length-1&&me(e,"end of the stream or a document separator is expected")}function Ee(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)))
var n=new de(e,t),i=e.indexOf("\0")
for(-1!==i&&(n.position=i,me(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1
for(;n.position<n.length-1;)Te(n)
return n.documents}var Me={loadAll:function(e,t,n){null!==t&&"object"==typeof t&&void 0===n&&(n=t,t=null)
var i=Ee(e,n)
if("function"!=typeof t)return i
for(var r=0,o=i.length;r<o;r+=1)t(i[r])},load:function(e,t){var n=Ee(e,t)
if(0!==n.length){if(1===n.length)return n[0]
throw new o("expected a single document in the stream, but found more")}}},Le=Object.prototype.toString,Ne=Object.prototype.hasOwnProperty,Fe=65279,_e=9,De=10,qe=13,Ue=32,Ye=33,Pe=34,Re=35,$e=37,Be=38,Ke=39,We=42,He=44,Ge=45,Ve=58,Ze=61,ze=62,Je=63,Qe=64,Xe=91,et=93,tt=96,nt=123,it=124,rt=125,ot={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},at=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],lt=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/
function st(e){var t,i,r
if(t=e.toString(16).toUpperCase(),e<=255)i="x",r=2
else if(e<=65535)i="u",r=4
else{if(!(e<=4294967295))throw new o("code point within a string may not be greater than 0xFFFFFFFF")
i="U",r=8}return"\\"+i+n.repeat("0",r-t.length)+t}var ct=1,ut=2
function pt(e){this.schema=e.schema||$,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=n.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,i,r,o,a,l,s
if(null===t)return{}
for(n={},r=0,o=(i=Object.keys(t)).length;r<o;r+=1)a=i[r],l=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(s=e.compiledTypeMap.fallback[a])&&Ne.call(s.styleAliases,l)&&(l=s.styleAliases[l]),n[a]=l
return n}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?ut:ct,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function ft(e,t){for(var i,r=n.repeat(" ",t),o=0,a=-1,l="",s=e.length;o<s;)-1===(a=e.indexOf("\n",o))?(i=e.slice(o),o=s):(i=e.slice(o,a+1),o=a+1),i.length&&"\n"!==i&&(l+=r),l+=i
return l}function dt(e,t){return"\n"+n.repeat(" ",e.indent*t)}function ht(e){return e===Ue||e===_e}function mt(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==Fe||65536<=e&&e<=1114111}function gt(e){return mt(e)&&e!==Fe&&e!==qe&&e!==De}function yt(e,t,n){var i=gt(e),r=i&&!ht(e)
return(n?i:i&&e!==He&&e!==Xe&&e!==et&&e!==nt&&e!==rt)&&e!==Re&&!(t===Ve&&!r)||gt(t)&&!ht(t)&&e===Re||t===Ve&&r}function bt(e,t){var n,i=e.charCodeAt(t)
return i>=55296&&i<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1))>=56320&&n<=57343?1024*(i-55296)+n-56320+65536:i}function At(e){return/^\n* /.test(e)}var vt=1,kt=2,wt=3,Ct=4,xt=5
function It(e,t,n,i,r,o,a,l){var s,c,u=0,p=null,f=!1,d=!1,h=-1!==i,m=-1,g=mt(c=bt(e,0))&&c!==Fe&&!ht(c)&&c!==Ge&&c!==Je&&c!==Ve&&c!==He&&c!==Xe&&c!==et&&c!==nt&&c!==rt&&c!==Re&&c!==Be&&c!==We&&c!==Ye&&c!==it&&c!==Ze&&c!==ze&&c!==Ke&&c!==Pe&&c!==$e&&c!==Qe&&c!==tt&&function(e){return!ht(e)&&e!==Ve}(bt(e,e.length-1))
if(t||a)for(s=0;s<e.length;u>=65536?s+=2:s++){if(!mt(u=bt(e,s)))return xt
g=g&&yt(u,p,l),p=u}else{for(s=0;s<e.length;u>=65536?s+=2:s++){if((u=bt(e,s))===De)f=!0,h&&(d=d||s-m-1>i&&" "!==e[m+1],m=s)
else if(!mt(u))return xt
g=g&&yt(u,p,l),p=u}d=d||h&&s-m-1>i&&" "!==e[m+1]}return f||d?n>9&&At(e)?xt:a?o===ut?xt:kt:d?Ct:wt:!g||a||r(e)?o===ut?xt:kt:vt}function St(e,t,n,i,r){e.dump=function(){if(0===t.length)return e.quotingType===ut?'""':"''"
if(!e.noCompatMode&&(-1!==at.indexOf(t)||lt.test(t)))return e.quotingType===ut?'"'+t+'"':"'"+t+"'"
var a=e.indent*Math.max(1,n),l=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=i||e.flowLevel>-1&&n>=e.flowLevel
switch(It(t,s,e.indent,l,(function(t){return function(e,t){var n,i
for(n=0,i=e.implicitTypes.length;n<i;n+=1)if(e.implicitTypes[n].resolve(t))return!0
return!1}(e,t)}),e.quotingType,e.forceQuotes&&!i,r)){case vt:return t
case kt:return"'"+t.replace(/'/g,"''")+"'"
case wt:return"|"+jt(t,e.indent)+Ot(ft(t,a))
case Ct:return">"+jt(t,e.indent)+Ot(ft(function(e,t){var n,i,r=/(\n+)([^\n]*)/g,o=(l=e.indexOf("\n"),l=-1!==l?l:e.length,r.lastIndex=l,Tt(e.slice(0,l),t)),a="\n"===e[0]||" "===e[0]
var l
for(;i=r.exec(e);){var s=i[1],c=i[2]
n=" "===c[0],o+=s+(a||n||""===c?"":"\n")+Tt(c,t),a=n}return o}(t,l),a))
case xt:return'"'+function(e){for(var t,n="",i=0,r=0;r<e.length;i>=65536?r+=2:r++)i=bt(e,r),!(t=ot[i])&&mt(i)?(n+=e[r],i>=65536&&(n+=e[r+1])):n+=t||st(i)
return n}(t)+'"'
default:throw new o("impossible error: invalid scalar style")}}()}function jt(e,t){var n=At(e)?String(t):"",i="\n"===e[e.length-1]
return n+(i&&("\n"===e[e.length-2]||"\n"===e)?"+":i?"":"-")+"\n"}function Ot(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function Tt(e,t){if(""===e||" "===e[0])return e
for(var n,i,r=/ [^ ]/g,o=0,a=0,l=0,s="";n=r.exec(e);)(l=n.index)-o>t&&(i=a>o?a:l,s+="\n"+e.slice(o,i),o=i+1),a=l
return s+="\n",e.length-o>t&&a>o?s+=e.slice(o,a)+"\n"+e.slice(a+1):s+=e.slice(o),s.slice(1)}function Et(e,t,n,i){var r,o,a,l="",s=e.tag
for(r=0,o=n.length;r<o;r+=1)a=n[r],e.replacer&&(a=e.replacer.call(n,String(r),a)),(Lt(e,t+1,a,!0,!0,!1,!0)||void 0===a&&Lt(e,t+1,null,!0,!0,!1,!0))&&(i&&""===l||(l+=dt(e,t)),e.dump&&De===e.dump.charCodeAt(0)?l+="-":l+="- ",l+=e.dump)
e.tag=s,e.dump=l||"[]"}function Mt(e,t,n){var i,r,a,l,s,c
for(a=0,l=(r=n?e.explicitTypes:e.implicitTypes).length;a<l;a+=1)if(((s=r[a]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(n?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,"[object Function]"===Le.call(s.represent))i=s.represent(t,c)
else{if(!Ne.call(s.represent,c))throw new o("!<"+s.tag+'> tag resolver accepts not "'+c+'" style')
i=s.represent[c](t,c)}e.dump=i}return!0}return!1}function Lt(e,t,n,i,r,a,l){e.tag=null,e.dump=n,Mt(e,n,!1)||Mt(e,n,!0)
var s,c=Le.call(e.dump),u=i
i&&(i=e.flowLevel<0||e.flowLevel>t)
var p,f,d="[object Object]"===c||"[object Array]"===c
if(d&&(f=-1!==(p=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(r=!1),f&&e.usedDuplicates[p])e.dump="*ref_"+p
else{if(d&&f&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===c)i&&0!==Object.keys(e.dump).length?(function(e,t,n,i){var r,a,l,s,c,u,p="",f=e.tag,d=Object.keys(n)
if(!0===e.sortKeys)d.sort()
else if("function"==typeof e.sortKeys)d.sort(e.sortKeys)
else if(e.sortKeys)throw new o("sortKeys must be a boolean or a function")
for(r=0,a=d.length;r<a;r+=1)u="",i&&""===p||(u+=dt(e,t)),s=n[l=d[r]],e.replacer&&(s=e.replacer.call(n,l,s)),Lt(e,t+1,l,!0,!0,!0)&&((c=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&De===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,c&&(u+=dt(e,t)),Lt(e,t+1,s,!0,c)&&(e.dump&&De===e.dump.charCodeAt(0)?u+=":":u+=": ",p+=u+=e.dump))
e.tag=f,e.dump=p||"{}"}(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(function(e,t,n){var i,r,o,a,l,s="",c=e.tag,u=Object.keys(n)
for(i=0,r=u.length;i<r;i+=1)l="",""!==s&&(l+=", "),e.condenseFlow&&(l+='"'),a=n[o=u[i]],e.replacer&&(a=e.replacer.call(n,o,a)),Lt(e,t,o,!1,!1)&&(e.dump.length>1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Lt(e,t,a,!1,!1)&&(s+=l+=e.dump))
e.tag=c,e.dump="{"+s+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump))
else if("[object Array]"===c)i&&0!==e.dump.length?(e.noArrayIndent&&!l&&t>0?Et(e,t-1,e.dump,r):Et(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(function(e,t,n){var i,r,o,a="",l=e.tag
for(i=0,r=n.length;i<r;i+=1)o=n[i],e.replacer&&(o=e.replacer.call(n,String(i),o)),(Lt(e,t,o,!1,!1)||void 0===o&&Lt(e,t,null,!1,!1))&&(""!==a&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump)
e.tag=l,e.dump="["+a+"]"}(e,t,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump))
else{if("[object String]"!==c){if("[object Undefined]"===c)return!1
if(e.skipInvalid)return!1
throw new o("unacceptable kind of an object to dump "+c)}"?"!==e.tag&&St(e,e.dump,t,a,u)}null!==e.tag&&"?"!==e.tag&&(s=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),s="!"===e.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",e.dump=s+" "+e.dump)}return!0}function Nt(e,t){var n,i,r=[],o=[]
for(Ft(e,r,o),n=0,i=o.length;n<i;n+=1)t.duplicates.push(r[o[n]])
t.usedDuplicates=new Array(i)}function Ft(e,t,n){var i,r,o
if(null!==e&&"object"==typeof e)if(-1!==(r=t.indexOf(e)))-1===n.indexOf(r)&&n.push(r)
else if(t.push(e),Array.isArray(e))for(r=0,o=e.length;r<o;r+=1)Ft(e[r],t,n)
else for(r=0,o=(i=Object.keys(e)).length;r<o;r+=1)Ft(e[i[r]],t,n)}function _t(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var Dt=p,qt=h,Ut=b,Yt=j,Pt=O,Rt=$,$t=Me.load,Bt=Me.loadAll,Kt={dump:function(e,t){var n=new pt(t=t||{})
n.noRefs||Nt(e,n)
var i=e
return n.replacer&&(i=n.replacer.call({"":i},"",i)),Lt(n,0,i,!0,!0)?n.dump+"\n":""}}.dump,Wt=o,Ht={binary:F,float:S,map:y,null:A,pairs:Y,set:R,timestamp:M,bool:v,int:C,merge:L,omap:q,seq:g,str:m},Gt=_t("safeLoad","load"),Vt=_t("safeLoadAll","loadAll"),Zt=_t("safeDump","dump"),zt={Type:Dt,Schema:qt,FAILSAFE_SCHEMA:Ut,JSON_SCHEMA:Yt,CORE_SCHEMA:Pt,DEFAULT_SCHEMA:Rt,load:$t,loadAll:Bt,dump:Kt,YAMLException:Wt,types:Ht,safeLoad:Gt,safeLoadAll:Vt,safeDump:Zt}
e.CORE_SCHEMA=Pt,e.DEFAULT_SCHEMA=Rt,e.FAILSAFE_SCHEMA=Ut,e.JSON_SCHEMA=Yt,e.Schema=qt,e.Type=Dt,e.YAMLException=Wt,e.default=zt,e.dump=Kt,e.load=$t,e.loadAll=Bt,e.safeDump=Zt,e.safeLoad=Gt,e.safeLoadAll=Vt,e.types=Ht,Object.defineProperty(e,"__esModule",{value:!0})})),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict"
e.defineMode("yaml",(function(){var e=new RegExp("\\b(("+["true","false","on","off","yes","no"].join(")|(")+"))$","i")
return{token:function(t,n){var i=t.peek(),r=n.escaped
if(n.escaped=!1,"#"==i&&(0==t.pos||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),"comment"
if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string"
if(n.literal&&t.indentation()>n.keyCol)return t.skipToEnd(),"string"
if(n.literal&&(n.literal=!1),t.sol()){if(n.keyCol=0,n.pair=!1,n.pairStart=!1,t.match(/---/))return"def"
if(t.match(/\.\.\./))return"def"
if(t.match(/\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==i?n.inlinePairs++:"}"==i?n.inlinePairs--:"["==i?n.inlineList++:n.inlineList--,"meta"
if(n.inlineList>0&&!r&&","==i)return t.next(),"meta"
if(n.inlinePairs>0&&!r&&","==i)return n.keyCol=0,n.pair=!1,n.pairStart=!1,t.next(),"meta"
if(n.pairStart){if(t.match(/^\s*(\||\>)\s*/))return n.literal=!0,"meta"
if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2"
if(0==n.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/))return"number"
if(n.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number"
if(t.match(e))return"keyword"}return!n.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(n.pair=!0,n.keyCol=t.indentation(),"atom"):n.pair&&t.match(/^:\s*/)?(n.pairStart=!0,"meta"):(n.pairStart=!1,n.escaped="\\"==i,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}}}})),e.defineMIME("text/x-yaml","yaml")}))

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,5 @@
(function(e,t){const n=new Map(Object.entries(JSON.parse(e.querySelector(`[data-${t}-fs]`).textContent))),o=function(t){var n=e.createElement("script")
n.src=t,e.body.appendChild(n)}
"TextDecoder"in window||(o(n.get(`${["text-encoding","encoding-indexes"].join("/")}.js`)),o(n.get(`${["text-encoding","encoding"].join("/")}.js`))),window.CSS&&window.CSS.escape||o(n.get(`${["css.escape","css.escape"].join("/")}.js`))
try{const n=e.querySelector(`[name="${t}/config/environment"]`),o=JSON.parse(e.querySelector(`[data-${t}-config]`).textContent),c=JSON.parse(decodeURIComponent(n.getAttribute("content"))),s="string"!=typeof o.ContentPath?"":o.ContentPath
s.length>0&&(c.rootURL=s),n.setAttribute("content",encodeURIComponent(JSON.stringify(c)))}catch(c){throw new Error(`Unable to parse ${t} settings: ${c.message}`)}})(document,"consul-ui")

View File

@ -1,5 +0,0 @@
(function(e,t){const n=new Map(Object.entries(JSON.parse(e.querySelector("[data-consul-ui-fs]").textContent))),o=function(t){var n=e.createElement("script")
n.src=t,e.body.appendChild(n)}
"TextDecoder"in window||(o(n.get(`${["text-encoding","encoding-indexes"].join("/")}.js`)),o(n.get(`${["text-encoding","encoding"].join("/")}.js`))),window.CSS&&window.CSS.escape||o(n.get(`${["css.escape","css.escape"].join("/")}.js`))
try{const t=e.querySelector('[name="consul-ui/config/environment"]'),n=JSON.parse(e.querySelector("[data-consul-ui-config]").textContent),o=JSON.parse(decodeURIComponent(t.getAttribute("content"))),c="string"!=typeof n.ContentPath?"":n.ContentPath
c.length>0&&(o.rootURL=c),t.setAttribute("content",encodeURIComponent(JSON.stringify(o)))}catch(c){throw new Error(`Unable to parse consul-ui settings: ${c.message}`)}})(document)

File diff suppressed because one or more lines are too long

View File

@ -114,6 +114,7 @@ func BoundAPIGatewayToStructs(s *BoundAPIGateway, t *structs.BoundAPIGatewayConf
}
}
}
t.Services = serviceRefsToStructs(s.Services)
t.Meta = s.Meta
}
func BoundAPIGatewayFromStructs(t *structs.BoundAPIGatewayConfigEntry, s *BoundAPIGateway) {
@ -130,6 +131,7 @@ func BoundAPIGatewayFromStructs(t *structs.BoundAPIGatewayConfigEntry, s *BoundA
}
}
}
s.Services = serviceRefFromStructs(t.Services)
s.Meta = t.Meta
}
func BoundAPIGatewayListenerToStructs(s *BoundAPIGatewayListener, t *structs.BoundAPIGatewayListener) {

View File

@ -572,3 +572,34 @@ func httpQueryMatchToStructs(a HTTPQueryMatchType) structs.HTTPQueryMatchType {
return structs.HTTPQueryMatchExact
}
}
// mog: func-to=serviceRefsToStructs func-from=serviceRefFromStructs
func serviceRefsToStructs(a map[string]*ListOfResourceReference) structs.ServiceRouteReferences {
m := make(structs.ServiceRouteReferences, len(a))
for key, refs := range a {
serviceName := structs.ServiceNameFromString(key)
m[serviceName] = make([]structs.ResourceReference, 0, len(refs.Ref))
for _, ref := range refs.Ref {
structsRef := structs.ResourceReference{}
ResourceReferenceToStructs(ref, &structsRef)
m[serviceName] = append(m[serviceName], structsRef)
}
}
return m
}
func serviceRefFromStructs(a structs.ServiceRouteReferences) map[string]*ListOfResourceReference {
m := make(map[string]*ListOfResourceReference, len(a))
for serviceName, refs := range a {
name := serviceName.String()
m[name] = &ListOfResourceReference{Ref: make([]*ResourceReference, len(refs))}
for _, ref := range refs {
resourceRef := &ResourceReference{}
ResourceReferenceFromStructs(&ref, resourceRef)
m[name].Ref = append(m[name].Ref, resourceRef)
}
}
return m
}

View File

@ -527,6 +527,16 @@ func (msg *BoundAPIGateway) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *ListOfResourceReference) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)
}
// UnmarshalBinary implements encoding.BinaryUnmarshaler
func (msg *ListOfResourceReference) UnmarshalBinary(b []byte) error {
return proto.Unmarshal(b, msg)
}
// MarshalBinary implements encoding.BinaryMarshaler
func (msg *BoundAPIGatewayListener) MarshalBinary() ([]byte, error) {
return proto.Marshal(msg)

File diff suppressed because it is too large Load Diff

View File

@ -745,6 +745,12 @@ message ResourceReference {
message BoundAPIGateway {
map<string, string> Meta = 1;
repeated BoundAPIGatewayListener Listeners = 2;
// mog: func-to=serviceRefsToStructs func-from=serviceRefFromStructs
map<string, ListOfResourceReference> Services = 3;
}
message ListOfResourceReference {
repeated ResourceReference Ref = 1;
}
// mog annotation:

View File

@ -32,7 +32,7 @@
@hasMetricsProvider={{@hasMetricsProvider}}
@noMetricsReason={{this.noMetricsReason}}
>
{{#if (and @hasMetricsProvider this.mainNotIngressService (not-eq item.Kind 'ingress-gateway'))}}
{{#if (and @hasMetricsProvider this.mainNotIngressService (not-eq item.Kind 'ingress-gateway') this.mainNotAPIGatewayService (not-eq item.Kind 'api-gateway'))}}
{{!-- One of the only places in the app where it's acceptable to default to 'default' namespace --}}
<TopologyMetrics::Stats
data-test-topology-metrics-downstream-stats
@ -53,7 +53,7 @@
<div class="metrics-header">
{{@service.Service.Service}}
</div>
{{#if (not-eq @service.Service.Meta.external-source 'consul-api-gateway')}}
{{#if (not (and (eq @service.Service.Meta.external-source 'consul-api-gateway') (eq @service.Service.Kind 'ingress-gateway'))) }}
{{#if @hasMetricsProvider}}
<TopologyMetrics::Series
@nspace={{or @service.Service.Namespace 'default'}}
@ -63,7 +63,7 @@
@protocol={{@topology.Protocol}}
@noMetricsReason={{this.noMetricsReason}}
/>
{{#if this.mainNotIngressService}}
{{#if (or (this.mainNotIngressService) (this.mainNotAPIGatewayService))}}
<TopologyMetrics::Stats
@nspace={{or @service.Service.Namespace 'default'}}
@partition={{or service.Service.Partition 'default'}}

View File

@ -148,6 +148,11 @@ export default class TopologyMetrics extends Component {
return kind !== 'ingress-gateway';
}
get mainNotAPIGatewayService() {
const kind = get(this.args.service.Service, 'Kind') || '';
return kind !== 'api-gateway';
}
// =actions
@action
setHeight(el, item) {

View File

@ -98,7 +98,7 @@ as |items item dc|}}
{{/if}}
{{#let
(hash
topology=(and dc.MeshEnabled item.IsMeshOrigin (or (gt proxies.length 0) (eq item.Service.Kind 'ingress-gateway')) (not item.Service.PeerName))
topology=(and dc.MeshEnabled item.IsMeshOrigin (or (gt proxies.length 0) (eq item.Service.Kind 'ingress-gateway') (eq item.Service.Kind 'api-gateway')) (not item.Service.PeerName))
services=(and (eq item.Service.Kind 'terminating-gateway') (not item.Service.PeerName))
upstreams=(and (eq item.Service.Kind 'ingress-gateway') (not item.Service.PeerName))
instances=true