From 61f9af5ec58d85344b09acef375a330cbc914e31 Mon Sep 17 00:00:00 2001 From: "Nilushiya.K" Date: Mon, 16 Mar 2026 09:25:34 +0530 Subject: [PATCH 1/5] metadata support in the kubernetes_sync Signed-off-by: Nilushiya.K --- core/pkg/sync/kubernetes/kubernetes_sync.go | 79 ++++++++++--------- .../sync/kubernetes/kubernetes_sync_test.go | 70 ++++++++++------ 2 files changed, 90 insertions(+), 59 deletions(-) diff --git a/core/pkg/sync/kubernetes/kubernetes_sync.go b/core/pkg/sync/kubernetes/kubernetes_sync.go index 21f08420a..8eda198af 100644 --- a/core/pkg/sync/kubernetes/kubernetes_sync.go +++ b/core/pkg/sync/kubernetes/kubernetes_sync.go @@ -10,15 +10,15 @@ import ( "github.com/open-feature/flagd/core/pkg/logger" "github.com/open-feature/flagd/core/pkg/sync" - "github.com/open-feature/open-feature-operator/apis/core/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/dynamic" "k8s.io/client-go/dynamic/dynamicinformer" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/tools/cache" + + "github.com/open-feature/open-feature-operator/apis/core/v1beta1" ) var ( @@ -99,22 +99,24 @@ func (k *Sync) Sync(ctx context.Context, dataSync chan<- sync.DataSync) error { dataSync <- sync.DataSync{FlagData: fetch, Source: k.URI} - notifies := make(chan INotify) + // Buffer ensures notifier can publish the initial Ready event even if the watcher + // goroutine has not started reading yet. + notifies := make(chan INotify, 1) var wg msync.WaitGroup - // Start K8s resource notifier + // Start notifier watcher wg.Add(1) go func() { defer wg.Done() - k.notify(ctx, notifies) + k.watcher(ctx, notifies, dataSync) }() - // Start notifier watcher + // Start K8s resource notifier wg.Add(1) go func() { defer wg.Done() - k.watcher(ctx, notifies, dataSync) + k.notify(ctx, notifies) }() wg.Wait() @@ -165,13 +167,13 @@ func (k *Sync) fetch(ctx context.Context) (string, error) { } if exist { - configuration, err := toFFCfg(item) + configuration, err := asUnstructured(item) if err != nil { return "", err } k.logger.Debug(fmt.Sprintf("resource %s served from the informer cache", k.URI)) - return marshallFeatureFlagSpec(configuration) + return marshalFlagSpec(configuration) } // fallback to API access - this is an informer cache miss. Could happen at the startup where cache is not filled @@ -186,11 +188,11 @@ func (k *Sync) fetch(ctx context.Context) (string, error) { k.logger.Debug(fmt.Sprintf("resource %s served from API server", k.URI)) - ff, err := toFFCfg(ffObj) + ff, err := asUnstructured(ffObj) if err != nil { return "", fmt.Errorf("unable to convert object %s/%s to FeatureFlag: %w", k.namespace, k.crdName, err) } - return marshallFeatureFlagSpec(ff) + return marshalFlagSpec(ff) } func (k *Sync) notify(ctx context.Context, c chan<- INotify) { @@ -233,16 +235,16 @@ func (k *Sync) notify(ctx context.Context, c chan<- INotify) { // commonHandler emits the desired event if and only if handler receive an object matching apiVersion and resource name func commonHandler(obj interface{}, object types.NamespacedName, emitEvent DefaultEventType, c chan<- INotify) error { - ffObj, err := toFFCfg(obj) + u, err := asUnstructured(obj) if err != nil { return err } - if ffObj.APIVersion != apiVersion { - return fmt.Errorf("invalid api version %s, expected %s", ffObj.APIVersion, apiVersion) + if u.GetAPIVersion() != apiVersion { + return fmt.Errorf("invalid api version %s, expected %s", u.GetAPIVersion(), apiVersion) } - if ffObj.Name == object.Name { + if u.GetName() == object.Name { c <- &Notifier{ Event: Event[DefaultEventType]{ EventType: emitEvent, @@ -255,26 +257,25 @@ func commonHandler(obj interface{}, object types.NamespacedName, emitEvent Defau // updateFuncHandler handles updates. Event is emitted if and only if resource name, apiVersion of old & new are equal func updateFuncHandler(oldObj interface{}, newObj interface{}, object types.NamespacedName, c chan<- INotify) error { - ffOldObj, err := toFFCfg(oldObj) + ffOldObj, err := asUnstructured(oldObj) if err != nil { return err } - if ffOldObj.APIVersion != apiVersion { - return fmt.Errorf("invalid api version %s, expected %s", ffOldObj.APIVersion, apiVersion) + if ffOldObj.GetAPIVersion() != apiVersion { + return fmt.Errorf("invalid api version %s, expected %s", ffOldObj.GetAPIVersion(), apiVersion) } - ffNewObj, err := toFFCfg(newObj) + ffNewObj, err := asUnstructured(newObj) if err != nil { return err } - if ffNewObj.APIVersion != apiVersion { - return fmt.Errorf("invalid api version %s, expected %s", ffNewObj.APIVersion, apiVersion) + if ffNewObj.GetAPIVersion() != apiVersion { + return fmt.Errorf("invalid api version %s, expected %s", ffNewObj.GetAPIVersion(), apiVersion) } - if object.Name == ffNewObj.Name && ffOldObj.ResourceVersion != ffNewObj.ResourceVersion { - // Only update if there is an actual featureFlagSpec change + if object.Name == ffNewObj.GetName() && ffOldObj.GetResourceVersion() != ffNewObj.GetResourceVersion() { c <- &Notifier{ Event: Event[DefaultEventType]{ EventType: DefaultEventTypeModify, @@ -284,20 +285,18 @@ func updateFuncHandler(oldObj interface{}, newObj interface{}, object types.Name return nil } -// toFFCfg attempts to covert unstructured payload to configurations -func toFFCfg(object interface{}) (*v1beta1.FeatureFlag, error) { - u, ok := object.(*unstructured.Unstructured) - if !ok { - return nil, fmt.Errorf("provided value is not of type *unstructured.Unstructured") +func asUnstructured(object interface{}) (*unstructured.Unstructured, error) { + if u, ok := object.(*unstructured.Unstructured); ok { + return u, nil } - var ffObj v1beta1.FeatureFlag - err := runtime.DefaultUnstructuredConverter.FromUnstructured(u.Object, &ffObj) - if err != nil { - return nil, fmt.Errorf("unable to convert unstructured to v1beta1.FeatureFlag: %w", err) + if tombstone, ok := object.(cache.DeletedFinalStateUnknown); ok { + if u, ok := tombstone.Obj.(*unstructured.Unstructured); ok { + return u, nil + } } - return &ffObj, nil + return nil, fmt.Errorf("provided value is not of type *unstructured.Unstructured") } // parseURI parse provided uri in the format of / to namespace, crdName. Results in an error @@ -310,10 +309,18 @@ func parseURI(uri string) (string, string, error) { return s[0], s[1], nil } -func marshallFeatureFlagSpec(ff *v1beta1.FeatureFlag) (string, error) { - b, err := json.Marshal(ff.Spec.FlagSpec) +func marshalFlagSpec(ff *unstructured.Unstructured) (string, error) { + flagSpec, found, err := unstructured.NestedMap(ff.Object, "spec", "flagSpec") + if err != nil { + return "", fmt.Errorf("failed to parse spec.flagSpec: %w", err) + } + if !found { + return "", fmt.Errorf("missing spec.flagSpec") + } + + b, err := json.Marshal(flagSpec) if err != nil { - return "", fmt.Errorf("failed to marshall FlagSpec: %s", err.Error()) + return "", fmt.Errorf("failed to marshal spec.flagSpec: %w", err) } return string(b), nil } diff --git a/core/pkg/sync/kubernetes/kubernetes_sync_test.go b/core/pkg/sync/kubernetes/kubernetes_sync_test.go index 51a553264..6ef624dbb 100644 --- a/core/pkg/sync/kubernetes/kubernetes_sync_test.go +++ b/core/pkg/sync/kubernetes/kubernetes_sync_test.go @@ -7,6 +7,7 @@ import ( "fmt" "reflect" "strings" + stdsync "sync" "testing" "time" @@ -73,7 +74,7 @@ func Test_parseURI(t *testing.T) { } } -func Test_toFFCfg(t *testing.T) { +func Test_asUnstructured(t *testing.T) { validFFCfg := v1beta1.FeatureFlag{ TypeMeta: Metadata, } @@ -81,13 +82,21 @@ func Test_toFFCfg(t *testing.T) { tests := []struct { name string input interface{} - want *v1beta1.FeatureFlag + want *unstructured.Unstructured wantErr bool }{ { name: "Simple success", input: toUnstructured(t, validFFCfg), - want: &validFFCfg, + want: toUnstructured(t, validFFCfg), + wantErr: false, + }, + { + name: "Tombstone unwraps", + input: cache.DeletedFinalStateUnknown{ + Obj: toUnstructured(t, validFFCfg), + }, + want: toUnstructured(t, validFFCfg), wantErr: false, }, { @@ -102,15 +111,15 @@ func Test_toFFCfg(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := toFFCfg(tt.input) + got, err := asUnstructured(tt.input) if (err != nil) != tt.wantErr { - t.Errorf("toFFCfg() error = %v, wantErr %v", err, tt.wantErr) + t.Errorf("asUnstructured() error = %v, wantErr %v", err, tt.wantErr) return } if !reflect.DeepEqual(got, tt.want) { - t.Errorf("toFFCfg() got = %v, want %v", got, tt.want) + t.Errorf("asUnstructured() got = %v, want %v", got, tt.want) } }) } @@ -657,23 +666,34 @@ func TestSync_ReSync(t *testing.T) { t.Errorf("The Sync should not be ready") } dataChannel := make(chan sync.DataSync, tt.countMsg) + ctx, cancel := context.WithCancel(context.Background()) if tt.async { + var wg stdsync.WaitGroup + wg.Add(1) go func() { - if err := tt.k.Sync(context.TODO(), dataChannel); err != nil { - t.Errorf("Unexpected error: %v", e) - } - if err := tt.k.ReSync(context.TODO(), dataChannel); err != nil { - t.Errorf("Unexpected error: %v", e) + defer wg.Done() + if err := tt.k.Sync(ctx, dataChannel); err != nil { + t.Errorf("Unexpected error: %v", err) } }() - i := tt.countMsg - for i > 0 { - d := <-dataChannel - if d.FlagData != payload { - t.Errorf("Expected %v, got %v", payload, d.FlagData) + + if err := tt.k.ReSync(context.Background(), dataChannel); err != nil { + t.Errorf("Unexpected error: %v", err) + } + + for i := tt.countMsg; i > 0; i-- { + select { + case d := <-dataChannel: + if d.FlagData != payload { + t.Errorf("Expected %v, got %v", payload, d.FlagData) + } + case <-time.After(time.Second): + t.Fatalf("timeout waiting for data") } - i-- } + + cancel() + wg.Wait() } else { if err := tt.k.Sync(context.TODO(), dataChannel); !strings.Contains(err.Error(), "not found") { t.Errorf("Unexpected error: %v", err) @@ -817,12 +837,16 @@ func getCFG(name, namespace string) map[string]interface{} { "name": name, "namespace": namespace, }, - "spec": map[string]interface{}{}, + "spec": map[string]interface{}{ + "flagSpec": map[string]interface{}{ + "flags": nil, + }, + }, } } // toUnstructured helper to convert an interface to unstructured.Unstructured -func toUnstructured(t *testing.T, obj interface{}) interface{} { +func toUnstructured(t *testing.T, obj interface{}) *unstructured.Unstructured { bytes, err := json.Marshal(obj) if err != nil { t.Errorf("test setup faulure: %s", err.Error()) @@ -852,7 +876,7 @@ func (m *MockInformer) GetStore() cache.Store { } func TestMeasure(t *testing.T) { - res, err := marshallFeatureFlagSpec(&v1beta1.FeatureFlag{ + res, err := marshalFlagSpec(toUnstructured(t, v1beta1.FeatureFlag{ Spec: v1beta1.FeatureFlagSpec{ FlagSpec: v1beta1.FlagSpec{ Flags: v1beta1.Flags{ @@ -864,8 +888,8 @@ func TestMeasure(t *testing.T) { }, }, }, - }) + })) - require.Nil(t, err) - require.Equal(t, "{\"flags\":{\"flag\":{\"state\":\"\",\"variants\":null,\"defaultVariant\":\"kubernetes\"}}}", res) + require.NoError(t, err) + require.JSONEq(t, `{"flags":{"flag":{"state":"","variants":null,"defaultVariant":"kubernetes"}}}`, res) } From d0561e5b68bc8f49118fd361d80ee22830eceb8d Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Thu, 12 Mar 2026 10:22:05 -0400 Subject: [PATCH 2/5] docs: update docs for graceful defaulting (#1902) Add docs about graceful defaulting. --------- Signed-off-by: Todd Baert Signed-off-by: Nilushiya.K --- docs/assets/cheat-sheet-flags.json | 15 + docs/playground/playground.js | 107 +- docs/quick-start.md | 22 +- docs/reference/cheat-sheet.md | 24 +- docs/reference/flag-definitions.md | 88 +- docs/troubleshooting.md | 41 +- playground-app/package-lock.json | 1116 ++++++++++------- playground-app/package.json | 2 +- playground-app/src/App.tsx | 65 +- playground-app/src/scenarios/basic-boolean.ts | 1 + playground-app/src/scenarios/basic-number.ts | 1 + playground-app/src/scenarios/basic-object.ts | 1 + playground-app/src/scenarios/basic-string.ts | 1 + .../src/scenarios/boolean-shorthand.ts | 1 + .../src/scenarios/chainable-conditions.ts | 1 + playground-app/src/scenarios/code-default.ts | 28 + .../src/scenarios/enable-by-domain.ts | 11 +- .../src/scenarios/enable-by-locale.ts | 11 +- .../src/scenarios/enable-by-time.ts | 13 +- .../src/scenarios/enable-by-version.ts | 11 +- playground-app/src/scenarios/flag-metadata.ts | 1 + .../src/scenarios/fraction-string.ts | 1 + playground-app/src/scenarios/index.ts | 2 + .../src/scenarios/progressive-rollout.ts | 1 + .../src/scenarios/share-evaluators.ts | 1 + playground-app/src/scenarios/targeting-key.ts | 1 + playground-app/src/types.ts | 15 +- 27 files changed, 986 insertions(+), 596 deletions(-) create mode 100644 playground-app/src/scenarios/code-default.ts diff --git a/docs/assets/cheat-sheet-flags.json b/docs/assets/cheat-sheet-flags.json index bf303798d..86576219d 100644 --- a/docs/assets/cheat-sheet-flags.json +++ b/docs/assets/cheat-sheet-flags.json @@ -40,6 +40,21 @@ }, "defaultVariant": "config-a" }, + "code-default-flag": { + "state": "ENABLED", + "variants": { + "on": true, + "off": false + }, + "defaultVariant": null + }, + "code-default-flag-omitted": { + "state": "ENABLED", + "variants": { + "on": true, + "off": false + } + }, "user-tier-flag": { "state": "ENABLED", "variants": { diff --git a/docs/playground/playground.js b/docs/playground/playground.js index 3a28b0d21..408a03fec 100644 --- a/docs/playground/playground.js +++ b/docs/playground/playground.js @@ -1,4 +1,4 @@ -(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))l(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&l(c)}).observe(document,{childList:!0,subtree:!0});function u(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function l(s){if(s.ep)return;s.ep=!0;const o=u(s);fetch(s.href,o)}})();function ws(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Vf={exports:{}},Ha={};/** +(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))f(c);new MutationObserver(c=>{for(const u of c)if(u.type==="childList")for(const l of u.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&f(l)}).observe(document,{childList:!0,subtree:!0});function s(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function f(c){if(c.ep)return;c.ep=!0;const u=s(c);fetch(c.href,u)}})();function bc(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var to={exports:{}},Qi={};/** * @license React * react-jsx-runtime.production.js * @@ -6,7 +6,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var yg;function WE(){if(yg)return Ha;yg=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function u(l,s,o){var c=null;if(o!==void 0&&(c=""+o),s.key!==void 0&&(c=""+s.key),"key"in s){o={};for(var d in s)d!=="key"&&(o[d]=s[d])}else o=s;return s=o.ref,{$$typeof:n,type:l,key:c,ref:s!==void 0?s:null,props:o}}return Ha.Fragment=i,Ha.jsx=u,Ha.jsxs=u,Ha}var vg;function e_(){return vg||(vg=1,Vf.exports=WE()),Vf.exports}var we=e_(),kf={exports:{}},Oe={};/** + */var Om;function Z1(){if(Om)return Qi;Om=1;var r=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function s(f,c,u){var l=null;if(u!==void 0&&(l=""+u),c.key!==void 0&&(l=""+c.key),"key"in c){u={};for(var d in c)d!=="key"&&(u[d]=c[d])}else u=c;return c=u.ref,{$$typeof:r,type:f,key:l,ref:c!==void 0?c:null,props:u}}return Qi.Fragment=a,Qi.jsx=s,Qi.jsxs=s,Qi}var Sm;function Q1(){return Sm||(Sm=1,to.exports=Z1()),to.exports}var ve=Q1(),ro={exports:{}},Se={};/** * @license React * react.production.js * @@ -14,7 +14,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var bg;function t_(){if(bg)return Oe;bg=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),S=Symbol.iterator;function L(U){return U===null||typeof U!="object"?null:(U=S&&U[S]||U["@@iterator"],typeof U=="function"?U:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},q=Object.assign,j={};function y(U,z,F){this.props=U,this.context=z,this.refs=j,this.updater=F||C}y.prototype.isReactComponent={},y.prototype.setState=function(U,z){if(typeof U!="object"&&typeof U!="function"&&U!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,U,z,"setState")},y.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function A(){}A.prototype=y.prototype;function g(U,z,F){this.props=U,this.context=z,this.refs=j,this.updater=F||C}var E=g.prototype=new A;E.constructor=g,q(E,y.prototype),E.isPureReactComponent=!0;var _=Array.isArray,T={H:null,A:null,T:null,S:null},b=Object.prototype.hasOwnProperty;function R(U,z,F,H,O,V){return F=V.ref,{$$typeof:n,type:U,key:z,ref:F!==void 0?F:null,props:V}}function $(U,z){return R(U.type,z,void 0,void 0,void 0,U.props)}function D(U){return typeof U=="object"&&U!==null&&U.$$typeof===n}function N(U){var z={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(F){return z[F]})}var Y=/\/+/g;function X(U,z){return typeof U=="object"&&U!==null&&U.key!=null?N(""+U.key):z.toString(36)}function J(){}function ee(U){switch(U.status){case"fulfilled":return U.value;case"rejected":throw U.reason;default:switch(typeof U.status=="string"?U.then(J,J):(U.status="pending",U.then(function(z){U.status==="pending"&&(U.status="fulfilled",U.value=z)},function(z){U.status==="pending"&&(U.status="rejected",U.reason=z)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function ne(U,z,F,H,O){var V=typeof U;(V==="undefined"||V==="boolean")&&(U=null);var W=!1;if(U===null)W=!0;else switch(V){case"bigint":case"string":case"number":W=!0;break;case"object":switch(U.$$typeof){case n:case i:W=!0;break;case v:return W=U._init,ne(W(U._payload),z,F,H,O)}}if(W)return O=O(U),W=H===""?"."+X(U,0):H,_(O)?(F="",W!=null&&(F=W.replace(Y,"$&/")+"/"),ne(O,z,F,"",function(M){return M})):O!=null&&(D(O)&&(O=$(O,F+(O.key==null||U&&U.key===O.key?"":(""+O.key).replace(Y,"$&/")+"/")+W)),z.push(O)),1;W=0;var me=H===""?".":H+":";if(_(U))for(var re=0;re>>1,U=P[de];if(0>>1;des(H,le))Os(V,H)?(P[de]=V,P[O]=le,de=O):(P[de]=H,P[F]=le,de=F);else if(Os(V,le))P[de]=V,P[O]=le,de=O;else break e}}return se}function s(P,se){var le=P.sortIndex-se.sortIndex;return le!==0?le:P.id-se.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;n.unstable_now=function(){return o.now()}}else{var c=Date,d=c.now();n.unstable_now=function(){return c.now()-d}}var p=[],m=[],v=1,S=null,L=3,C=!1,q=!1,j=!1,y=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;function E(P){for(var se=u(m);se!==null;){if(se.callback===null)l(m);else if(se.startTime<=P)l(m),se.sortIndex=se.expirationTime,i(p,se);else break;se=u(m)}}function _(P){if(j=!1,E(P),!q)if(u(p)!==null)q=!0,ee();else{var se=u(m);se!==null&&ne(_,se.startTime-P)}}var T=!1,b=-1,R=5,$=-1;function D(){return!(n.unstable_now()-$P&&D());){var de=S.callback;if(typeof de=="function"){S.callback=null,L=S.priorityLevel;var U=de(S.expirationTime<=P);if(P=n.unstable_now(),typeof U=="function"){S.callback=U,E(P),se=!0;break t}S===u(p)&&l(p),E(P)}else l(p);S=u(p)}if(S!==null)se=!0;else{var z=u(m);z!==null&&ne(_,z.startTime-P),se=!1}}break e}finally{S=null,L=le,C=!1}se=void 0}}finally{se?Y():T=!1}}}var Y;if(typeof g=="function")Y=function(){g(N)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,J=X.port2;X.port1.onmessage=N,Y=function(){J.postMessage(null)}}else Y=function(){y(N,0)};function ee(){T||(T=!0,Y())}function ne(P,se){b=y(function(){P(n.unstable_now())},se)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(P){P.callback=null},n.unstable_continueExecution=function(){q||C||(q=!0,ee())},n.unstable_forceFrameRate=function(P){0>P||125de?(P.sortIndex=le,i(m,P),u(p)===null&&P===u(m)&&(j?(A(b),b=-1):j=!0,ne(_,le-de))):(P.sortIndex=U,i(p,P),q||C||(q=!0,ee())),P},n.unstable_shouldYield=D,n.unstable_wrapCallback=function(P){var se=L;return function(){var le=L;L=se;try{return P.apply(this,arguments)}finally{L=le}}}}(Pf)),Pf}var Sg;function r_(){return Sg||(Sg=1,Yf.exports=n_()),Yf.exports}var Kf={exports:{}},wt={};/** + */var xm;function F1(){return xm||(xm=1,(function(r){function a(x,Z){var P=x.length;x.push(Z);e:for(;0>>1,O=x[J];if(0>>1;J<$;){var ee=2*(J+1)-1,se=x[ee],ie=ee+1,he=x[ie];if(0>c(se,P))iec(he,se)?(x[J]=he,x[ie]=P,J=ie):(x[J]=se,x[ee]=P,J=ee);else if(iec(he,P))x[J]=he,x[ie]=P,J=ie;else break e}}return Z}function c(x,Z){var P=x.sortIndex-Z.sortIndex;return P!==0?P:x.id-Z.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;r.unstable_now=function(){return u.now()}}else{var l=Date,d=l.now();r.unstable_now=function(){return l.now()-d}}var m=[],p=[],g=1,v=null,T=3,j=!1,C=!1,N=!1,D=typeof setTimeout=="function"?setTimeout:null,X=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function I(x){for(var Z=s(p);Z!==null;){if(Z.callback===null)f(p);else if(Z.startTime<=x)f(p),Z.sortIndex=Z.expirationTime,a(m,Z);else break;Z=s(p)}}function W(x){if(N=!1,I(x),!C)if(s(m)!==null)C=!0,K();else{var Z=s(p);Z!==null&&z(W,Z.startTime-x)}}var te=!1,R=-1,U=5,_=-1;function w(){return!(r.unstable_now()-_x&&w());){var J=v.callback;if(typeof J=="function"){v.callback=null,T=v.priorityLevel;var O=J(v.expirationTime<=x);if(x=r.unstable_now(),typeof O=="function"){v.callback=O,I(x),Z=!0;break t}v===s(m)&&f(m),I(x)}else f(m);v=s(m)}if(v!==null)Z=!0;else{var $=s(p);$!==null&&z(W,$.startTime-x),Z=!1}}break e}finally{v=null,T=P,j=!1}Z=void 0}}finally{Z?q():te=!1}}}var q;if(typeof k=="function")q=function(){k(E)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,ce=G.port2;G.port1.onmessage=E,q=function(){ce.postMessage(null)}}else q=function(){D(E,0)};function K(){te||(te=!0,q())}function z(x,Z){R=D(function(){x(r.unstable_now())},Z)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(x){x.callback=null},r.unstable_continueExecution=function(){C||j||(C=!0,K())},r.unstable_forceFrameRate=function(x){0>x||125J?(x.sortIndex=P,a(p,x),s(m)===null&&x===s(p)&&(N?(X(R),R=-1):N=!0,z(W,P-J))):(x.sortIndex=O,a(m,x),C||j||(C=!0,K())),x},r.unstable_shouldYield=w,r.unstable_wrapCallback=function(x){var Z=T;return function(){var P=T;T=Z;try{return x.apply(this,arguments)}finally{T=P}}}})(io)),io}var Dm;function P1(){return Dm||(Dm=1,ao.exports=F1()),ao.exports}var lo={exports:{}},At={};/** * @license React * react-dom.production.js * @@ -30,7 +30,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var wg;function i_(){if(wg)return wt;wg=1;var n=md();function i(p){var m="https://react.dev/errors/"+p;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Kf.exports=i_(),Kf.exports}/** + */var Nm;function J1(){if(Nm)return At;Nm=1;var r=Ec();function a(m){var p="https://react.dev/errors/"+m;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(a){console.error(a)}}return r(),lo.exports=J1(),lo.exports}/** * @license React * react-dom-client.production.js * @@ -38,27 +38,20 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var $g;function l_(){if($g)return Va;$g=1;var n=r_(),i=md(),u=a_();function l(e){var t="https://react.dev/errors/"+e;if(1)":-1f||G[a]!==Z[f]){var fe=` -`+G[a].replace(" at new "," at ");return e.displayName&&fe.includes("")&&(fe=fe.replace("",e.displayName)),fe}while(1<=a&&0<=f);break}}}finally{ee=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?J(r):""}function P(e){switch(e.tag){case 26:case 27:case 5:return J(e.type);case 16:return J("Lazy");case 13:return J("Suspense");case 19:return J("SuspenseList");case 0:case 15:return e=ne(e.type,!1),e;case 11:return e=ne(e.type.render,!1),e;case 1:return e=ne(e.type,!0),e;default:return""}}function se(e){try{var t="";do t+=P(e),e=e.return;while(e);return t}catch(r){return` -Error generating stack: `+r.message+` -`+r.stack}}function le(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function de(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function U(e){if(le(e)!==e)throw Error(l(188))}function z(e){var t=e.alternate;if(!t){if(t=le(e),t===null)throw Error(l(188));return t!==e?null:e}for(var r=e,a=t;;){var f=r.return;if(f===null)break;var h=f.alternate;if(h===null){if(a=f.return,a!==null){r=a;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===r)return U(f),e;if(h===a)return U(f),t;h=h.sibling}throw Error(l(188))}if(r.return!==a.return)r=f,a=h;else{for(var w=!1,I=f.child;I;){if(I===r){w=!0,r=f,a=h;break}if(I===a){w=!0,a=f,r=h;break}I=I.sibling}if(!w){for(I=h.child;I;){if(I===r){w=!0,r=h,a=f;break}if(I===a){w=!0,a=h,r=f;break}I=I.sibling}if(!w)throw Error(l(189))}}if(r.alternate!==a)throw Error(l(190))}if(r.tag!==3)throw Error(l(188));return r.stateNode.current===r?e:t}function F(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=F(e),t!==null)return t;e=e.sibling}return null}var H=Array.isArray,O=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},W=[],me=-1;function re(e){return{current:e}}function M(e){0>me||(e.current=W[me],W[me]=null,me--)}function B(e,t){me++,W[me]=e.current,e.current=t}var x=re(null),k=re(null),K=re(null),ae=re(null);function pe(e,t){switch(B(K,t),B(k,e),B(x,null),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?Pm(t):0;break;default:if(e=e===8?t.parentNode:t,t=e.tagName,e=e.namespaceURI)e=Pm(e),t=Km(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}M(x),B(x,t)}function ge(){M(x),M(k),M(K)}function Te(e){e.memoizedState!==null&&B(ae,e);var t=x.current,r=Km(t,e.type);t!==r&&(B(k,e),B(x,r))}function Ge(e){k.current===e&&(M(x),M(k)),ae.current===e&&(M(ae),qa._currentValue=V)}var Ue=Object.prototype.hasOwnProperty,ze=n.unstable_scheduleCallback,Re=n.unstable_cancelCallback,Ve=n.unstable_shouldYield,nt=n.unstable_requestPaint,mt=n.unstable_now,Gi=n.unstable_getCurrentPriorityLevel,Yn=n.unstable_ImmediatePriority,Zr=n.unstable_UserBlockingPriority,Sr=n.unstable_NormalPriority,ll=n.unstable_LowPriority,ul=n.unstable_IdlePriority,L1=n.log,q1=n.unstable_setDisableYieldValue,Yi=null,qt=null;function U1(e){if(qt&&typeof qt.onCommitFiberRoot=="function")try{qt.onCommitFiberRoot(Yi,e,void 0,(e.current.flags&128)===128)}catch{}}function Pn(e){if(typeof L1=="function"&&q1(e),qt&&typeof qt.setStrictMode=="function")try{qt.setStrictMode(Yi,e)}catch{}}var Ut=Math.clz32?Math.clz32:B1,z1=Math.log,I1=Math.LN2;function B1(e){return e>>>=0,e===0?32:31-(z1(e)/I1|0)|0}var sl=128,ol=4194304;function wr(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function fl(e,t){var r=e.pendingLanes;if(r===0)return 0;var a=0,f=e.suspendedLanes,h=e.pingedLanes,w=e.warmLanes;e=e.finishedLanes!==0;var I=r&134217727;return I!==0?(r=I&~f,r!==0?a=wr(r):(h&=I,h!==0?a=wr(h):e||(w=I&~w,w!==0&&(a=wr(w))))):(I=r&~f,I!==0?a=wr(I):h!==0?a=wr(h):e||(w=r&~w,w!==0&&(a=wr(w)))),a===0?0:t!==0&&t!==a&&!(t&f)&&(f=a&-a,w=t&-t,f>=w||f===32&&(w&4194176)!==0)?t:a}function Pi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function H1(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function zd(){var e=sl;return sl<<=1,!(sl&4194176)&&(sl=128),e}function Id(){var e=ol;return ol<<=1,!(ol&62914560)&&(ol=4194304),e}function Ls(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Ki(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function V1(e,t,r,a,f,h){var w=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var I=e.entanglements,G=e.expirationTimes,Z=e.hiddenUpdates;for(r=w&~r;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),P1=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Kd={},Fd={};function K1(e){return Ue.call(Fd,e)?!0:Ue.call(Kd,e)?!1:P1.test(e)?Fd[e]=!0:(Kd[e]=!0,!1)}function cl(e,t,r){if(K1(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function dl(e,t,r){if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function wn(e,t,r,a){if(a===null)e.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+a)}}function Yt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Xd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function F1(e){var t=Xd(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var f=r.get,h=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return f.call(this)},set:function(w){a=""+w,h.call(this,w)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return a},setValue:function(w){a=""+w},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function hl(e){e._valueTracker||(e._valueTracker=F1(e))}function Qd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),a="";return e&&(a=Xd(e)?e.checked?"true":"false":e.value),e=a,e!==r?(t.setValue(e),!0):!1}function pl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var X1=/[\n"\\]/g;function Pt(e){return e.replace(X1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function zs(e,t,r,a,f,h,w,I){e.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.type=w:e.removeAttribute("type"),t!=null?w==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Yt(t)):e.value!==""+Yt(t)&&(e.value=""+Yt(t)):w!=="submit"&&w!=="reset"||e.removeAttribute("value"),t!=null?Is(e,w,Yt(t)):r!=null?Is(e,w,Yt(r)):a!=null&&e.removeAttribute("value"),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?e.name=""+Yt(I):e.removeAttribute("name")}function Zd(e,t,r,a,f,h,w,I){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),t!=null||r!=null){if(!(h!=="submit"&&h!=="reset"||t!=null))return;r=r!=null?""+Yt(r):"",t=t!=null?""+Yt(t):r,I||t===e.value||(e.value=t),e.defaultValue=t}a=a??f,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=I?e.checked:!!a,e.defaultChecked=!!a,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(e.name=w)}function Is(e,t,r){t==="number"&&pl(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function ni(e,t,r,a){if(e=e.options,t){t={};for(var f=0;f=ea),fh=" ",ch=!1;function dh(e,t){switch(e){case"keyup":return wb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var li=!1;function $b(e,t){switch(e){case"compositionend":return hh(t);case"keypress":return t.which!==32?null:(ch=!0,fh);case"textInput":return e=t.data,e===fh&&ch?null:e;default:return null}}function Ob(e,t){if(li)return e==="compositionend"||!Qs&&dh(e,t)?(e=ih(),gl=Ys=Fn=null,li=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=a}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=_h(r)}}function wh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ah(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=pl(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=pl(e.document)}return t}function Ws(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function xb(e,t){var r=Ah(t);t=e.focusedElem;var a=e.selectionRange;if(r!==t&&t&&t.ownerDocument&&wh(t.ownerDocument.documentElement,t)){if(a!==null&&Ws(t)){if(e=a.start,r=a.end,r===void 0&&(r=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(r,t.value.length);else if(r=(e=t.ownerDocument||document)&&e.defaultView||window,r.getSelection){r=r.getSelection();var f=t.textContent.length,h=Math.min(a.start,f);a=a.end===void 0?h:Math.min(a.end,f),!r.extend&&h>a&&(f=a,a=h,h=f),f=Sh(t,h);var w=Sh(t,a);f&&w&&(r.rangeCount!==1||r.anchorNode!==f.node||r.anchorOffset!==f.offset||r.focusNode!==w.node||r.focusOffset!==w.offset)&&(e=e.createRange(),e.setStart(f.node,f.offset),r.removeAllRanges(),h>a?(r.addRange(e),r.extend(w.node,w.offset)):(e.setEnd(w.node,w.offset),r.addRange(e)))}}for(e=[],r=t;r=r.parentNode;)r.nodeType===1&&e.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,ui=null,eo=null,ia=null,to=!1;function $h(e,t,r){var a=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;to||ui==null||ui!==pl(a)||(a=ui,"selectionStart"in a&&Ws(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),ia&&ra(ia,a)||(ia=a,a=ru(eo,"onSelect"),0>=w,f-=w,An=1<<32-Ut(t)+f|r<Se?(pt=Ee,Ee=null):pt=Ee.sibling;var Be=ue(te,Ee,ie[Se],ce);if(Be===null){Ee===null&&(Ee=pt);break}e&&Ee&&Be.alternate===null&&t(te,Ee),Q=h(Be,Q,Se),De===null?ye=Be:De.sibling=Be,De=Be,Ee=pt}if(Se===ie.length)return r(te,Ee),Ie&&jr(te,Se),ye;if(Ee===null){for(;SeSe?(pt=Ee,Ee=null):pt=Ee.sibling;var pr=ue(te,Ee,Be.value,ce);if(pr===null){Ee===null&&(Ee=pt);break}e&&Ee&&pr.alternate===null&&t(te,Ee),Q=h(pr,Q,Se),De===null?ye=pr:De.sibling=pr,De=pr,Ee=pt}if(Be.done)return r(te,Ee),Ie&&jr(te,Se),ye;if(Ee===null){for(;!Be.done;Se++,Be=ie.next())Be=he(te,Be.value,ce),Be!==null&&(Q=h(Be,Q,Se),De===null?ye=Be:De.sibling=Be,De=Be);return Ie&&jr(te,Se),ye}for(Ee=a(Ee);!Be.done;Se++,Be=ie.next())Be=oe(Ee,te,Se,Be.value,ce),Be!==null&&(e&&Be.alternate!==null&&Ee.delete(Be.key===null?Se:Be.key),Q=h(Be,Q,Se),De===null?ye=Be:De.sibling=Be,De=Be);return e&&Ee.forEach(function(JE){return t(te,JE)}),Ie&&jr(te,Se),ye}function et(te,Q,ie,ce){if(typeof ie=="object"&&ie!==null&&ie.type===p&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case c:e:{for(var ye=ie.key;Q!==null;){if(Q.key===ye){if(ye=ie.type,ye===p){if(Q.tag===7){r(te,Q.sibling),ce=f(Q,ie.props.children),ce.return=te,te=ce;break e}}else if(Q.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===g&&Vh(ye)===Q.type){r(te,Q.sibling),ce=f(Q,ie.props),ca(ce,ie),ce.return=te,te=ce;break e}r(te,Q);break}else t(te,Q);Q=Q.sibling}ie.type===p?(ce=Hr(ie.props.children,te.mode,ce,ie.key),ce.return=te,te=ce):(ce=Kl(ie.type,ie.key,ie.props,null,te.mode,ce),ca(ce,ie),ce.return=te,te=ce)}return w(te);case d:e:{for(ye=ie.key;Q!==null;){if(Q.key===ye)if(Q.tag===4&&Q.stateNode.containerInfo===ie.containerInfo&&Q.stateNode.implementation===ie.implementation){r(te,Q.sibling),ce=f(Q,ie.children||[]),ce.return=te,te=ce;break e}else{r(te,Q);break}else t(te,Q);Q=Q.sibling}ce=af(ie,te.mode,ce),ce.return=te,te=ce}return w(te);case g:return ye=ie._init,ie=ye(ie._payload),et(te,Q,ie,ce)}if(H(ie))return be(te,Q,ie,ce);if(b(ie)){if(ye=b(ie),typeof ye!="function")throw Error(l(150));return ie=ye.call(ie),$e(te,Q,ie,ce)}if(typeof ie.then=="function")return et(te,Q,Rl(ie),ce);if(ie.$$typeof===C)return et(te,Q,Gl(te,ie),ce);Nl(te,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint"?(ie=""+ie,Q!==null&&Q.tag===6?(r(te,Q.sibling),ce=f(Q,ie),ce.return=te,te=ce):(r(te,Q),ce=rf(ie,te.mode,ce),ce.return=te,te=ce),w(te)):r(te,Q)}return function(te,Q,ie,ce){try{fa=0;var ye=et(te,Q,ie,ce);return hi=null,ye}catch(Ee){if(Ee===sa)throw Ee;var De=en(29,Ee,null,te.mode);return De.lanes=ce,De.return=te,De}finally{}}}var Mr=kh(!0),Gh=kh(!1),pi=re(null),jl=re(0);function Yh(e,t){e=qn,B(jl,e),B(pi,t),qn=e|t.baseLanes}function oo(){B(jl,qn),B(pi,pi.current)}function fo(){qn=jl.current,M(pi),M(jl)}var Zt=re(null),gn=null;function Qn(e){var t=e.alternate;B(st,st.current&1),B(Zt,e),gn===null&&(t===null||pi.current!==null||t.memoizedState!==null)&&(gn=e)}function Ph(e){if(e.tag===22){if(B(st,st.current),B(Zt,e),gn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(gn=e)}}else Zn()}function Zn(){B(st,st.current),B(Zt,Zt.current)}function On(e){M(Zt),gn===e&&(gn=null),M(st)}var st=re(0);function Dl(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ib=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},Bb=n.unstable_scheduleCallback,Hb=n.unstable_NormalPriority,ot={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function co(){return{controller:new Ib,data:new Map,refCount:0}}function da(e){e.refCount--,e.refCount===0&&Bb(Hb,function(){e.controller.abort()})}var ha=null,ho=0,mi=0,gi=null;function Vb(e,t){if(ha===null){var r=ha=[];ho=0,mi=Ef(),gi={status:"pending",value:void 0,then:function(a){r.push(a)}}}return ho++,t.then(Kh,Kh),t}function Kh(){if(--ho===0&&ha!==null){gi!==null&&(gi.status="fulfilled");var e=ha;ha=null,mi=0,gi=null;for(var t=0;th?h:8;var w=D.T,I={};D.T=I,jo(e,!1,t,r);try{var G=f(),Z=D.S;if(Z!==null&&Z(I,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var fe=kb(G,a);ga(e,t,fe,Vt(e))}else ga(e,t,a,Vt(e))}catch(he){ga(e,t,{then:function(){},status:"rejected",reason:he},Vt())}finally{O.p=h,D.T=w}}function Fb(){}function Ro(e,t,r,a){if(e.tag!==5)throw Error(l(476));var f=Ap(e).queue;wp(e,f,t,V,r===null?Fb:function(){return $p(e),r(a)})}function Ap(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tn,lastRenderedState:V},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tn,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $p(e){var t=Ap(e).next.queue;ga(e,t,{},Vt())}function No(){return St(qa)}function Op(){return at().memoizedState}function Tp(){return at().memoizedState}function Xb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=Vt();e=nr(r);var a=rr(t,e,r);a!==null&&(Ot(a,t,r),ba(a,t,r)),t={cache:co()},e.payload=t;return}t=t.return}}function Qb(e,t,r){var a=Vt();r={lane:a,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null},Bl(e)?Np(t,r):(r=io(e,t,r,a),r!==null&&(Ot(r,e,a),jp(r,t,a)))}function Rp(e,t,r){var a=Vt();ga(e,t,r,a)}function ga(e,t,r,a){var f={lane:a,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null};if(Bl(e))Np(t,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var w=t.lastRenderedState,I=h(w,r);if(f.hasEagerState=!0,f.eagerState=I,zt(I,w))return wl(e,t,f,0),Fe===null&&Sl(),!1}catch{}finally{}if(r=io(e,t,f,a),r!==null)return Ot(r,e,a),jp(r,t,a),!0}return!1}function jo(e,t,r,a){if(a={lane:2,revertLane:Ef(),action:a,hasEagerState:!1,eagerState:null,next:null},Bl(e)){if(t)throw Error(l(479))}else t=io(e,r,a,2),t!==null&&Ot(t,e,2)}function Bl(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function Np(e,t){yi=Cl=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function jp(e,t,r){if(r&4194176){var a=t.lanes;a&=e.pendingLanes,r|=a,t.lanes=r,Hd(e,r)}}var yn={readContext:St,use:ql,useCallback:rt,useContext:rt,useEffect:rt,useImperativeHandle:rt,useLayoutEffect:rt,useInsertionEffect:rt,useMemo:rt,useReducer:rt,useRef:rt,useState:rt,useDebugValue:rt,useDeferredValue:rt,useTransition:rt,useSyncExternalStore:rt,useId:rt};yn.useCacheRefresh=rt,yn.useMemoCache=rt,yn.useHostTransitionStatus=rt,yn.useFormState=rt,yn.useActionState=rt,yn.useOptimistic=rt;var Lr={readContext:St,use:ql,useCallback:function(e,t){return xt().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:mp,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,zl(4194308,4,vp.bind(null,t,e),r)},useLayoutEffect:function(e,t){return zl(4194308,4,e,t)},useInsertionEffect:function(e,t){zl(4,2,e,t)},useMemo:function(e,t){var r=xt();t=t===void 0?null:t;var a=e();if(xr){Pn(!0);try{e()}finally{Pn(!1)}}return r.memoizedState=[a,t],a},useReducer:function(e,t,r){var a=xt();if(r!==void 0){var f=r(t);if(xr){Pn(!0);try{r(t)}finally{Pn(!1)}}}else f=t;return a.memoizedState=a.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},a.queue=e,e=e.dispatch=Qb.bind(null,Ne,e),[a.memoizedState,e]},useRef:function(e){var t=xt();return e={current:e},t.memoizedState=e},useState:function(e){e=wo(e);var t=e.queue,r=Rp.bind(null,Ne,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:Oo,useDeferredValue:function(e,t){var r=xt();return To(r,e,t)},useTransition:function(){var e=wo(!1);return e=wp.bind(null,Ne,e.queue,!0,!1),xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var a=Ne,f=xt();if(Ie){if(r===void 0)throw Error(l(407));r=r()}else{if(r=t(),Fe===null)throw Error(l(349));Le&60||Wh(a,t,r)}f.memoizedState=r;var h={value:r,getSnapshot:t};return f.queue=h,mp(tp.bind(null,a,h,e),[e]),a.flags|=2048,bi(9,ep.bind(null,a,h,r,t),{destroy:void 0},null),r},useId:function(){var e=xt(),t=Fe.identifierPrefix;if(Ie){var r=$n,a=An;r=(a&~(1<<32-Ut(a)-1)).toString(32)+r,t=":"+t+"R"+r,r=xl++,0 title"))),vt(h,a,r),h[_t]=e,ct(h),a=h;break e;case"link":var w=rg("link","href",f).get(a+(r.href||""));if(w){for(var I=0;I<\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof a.is=="string"?f.createElement("select",{is:a.is}):f.createElement("select"),a.multiple?e.multiple=!0:a.size&&(e.size=a.size);break;default:e=typeof a.is=="string"?f.createElement(r,{is:a.is}):f.createElement(r)}}e[_t]=t,e[Mt]=a;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)e.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=e;e:switch(vt(e,r,a),r){case"button":case"input":case"select":case"textarea":e=!!a.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&xn(t)}}return Qe(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&xn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(l(166));if(e=K.current,aa(t)){if(e=t.stateNode,r=t.memoizedProps,a=null,f=$t,f!==null)switch(f.tag){case 27:case 5:a=f.memoizedProps}e[_t]=t,e=!!(e.nodeValue===r||a!==null&&a.suppressHydrationWarning===!0||Ym(e.nodeValue,r)),e||Dr(t)}else e=au(e).createTextNode(a),e[_t]=t,t.stateNode=e}return Qe(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=aa(t),a!==null&&a.dehydrated!==null){if(e===null){if(!f)throw Error(l(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(l(317));f[_t]=t}else la(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Qe(t),f=!1}else ln!==null&&(hf(ln),ln=null),f=!0;if(!f)return t.flags&256?(On(t),t):(On(t),null)}if(On(t),t.flags&128)return t.lanes=r,t;if(r=a!==null,e=e!==null&&e.memoizedState!==null,r){a=t.child,f=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(f=a.alternate.memoizedState.cachePool.pool);var h=null;a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(h=a.memoizedState.cachePool.pool),h!==f&&(a.flags|=2048)}return r!==e&&r&&(t.child.flags|=8192),Fl(t,t.updateQueue),Qe(t),null;case 4:return ge(),e===null&&Af(t.stateNode.containerInfo),Qe(t),null;case 10:return jn(t.type),Qe(t),null;case 19:if(M(st),f=t.memoizedState,f===null)return Qe(t),null;if(a=(t.flags&128)!==0,h=f.rendering,h===null)if(a)Oa(f,!1);else{if(We!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(h=Dl(e),h!==null){for(t.flags|=128,Oa(f,!1),e=h.updateQueue,t.updateQueue=e,Fl(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)bm(r,e),r=r.sibling;return B(st,st.current&1|2),t.child}e=e.sibling}f.tail!==null&&mt()>Xl&&(t.flags|=128,a=!0,Oa(f,!1),t.lanes=4194304)}else{if(!a)if(e=Dl(h),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Fl(t,e),Oa(f,!0),f.tail===null&&f.tailMode==="hidden"&&!h.alternate&&!Ie)return Qe(t),null}else 2*mt()-f.renderingStartTime>Xl&&r!==536870912&&(t.flags|=128,a=!0,Oa(f,!1),t.lanes=4194304);f.isBackwards?(h.sibling=t.child,t.child=h):(e=f.last,e!==null?e.sibling=h:t.child=h,f.last=h)}return f.tail!==null?(t=f.tail,f.rendering=t,f.tail=t.sibling,f.renderingStartTime=mt(),t.sibling=null,e=st.current,B(st,a?e&1|2:e&1),t):(Qe(t),null);case 22:case 23:return On(t),fo(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?r&536870912&&!(t.flags&128)&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),r=t.updateQueue,r!==null&&Fl(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==r&&(t.flags|=2048),e!==null&&M(Cr),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),jn(ot),Qe(t),null;case 25:return null}throw Error(l(156,t.tag))}function rE(e,t){switch(lo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jn(ot),ge(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ge(t),null;case 13:if(On(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));la()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return M(st),null;case 4:return ge(),null;case 10:return jn(t.type),null;case 22:case 23:return On(t),fo(),e!==null&&M(Cr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return jn(ot),null;case 25:return null;default:return null}}function Sm(e,t){switch(lo(t),t.tag){case 3:jn(ot),ge();break;case 26:case 27:case 5:Ge(t);break;case 4:ge();break;case 13:On(t);break;case 19:M(st);break;case 10:jn(t.type);break;case 22:case 23:On(t),fo(),e!==null&&M(Cr);break;case 24:jn(ot)}}var iE={getCacheForType:function(e){var t=St(ot),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r}},aE=typeof WeakMap=="function"?WeakMap:Map,Ze=0,Fe=null,Me=null,Le=0,Xe=0,Ht=null,Ln=!1,wi=!1,lf=!1,qn=0,We=0,sr=0,Vr=0,uf=0,tn=0,Ai=0,Ta=null,vn=null,sf=!1,of=0,Xl=1/0,Ql=null,or=null,Zl=!1,kr=null,Ra=0,ff=0,cf=null,Na=0,df=null;function Vt(){if(Ze&2&&Le!==0)return Le&-Le;if(D.T!==null){var e=mi;return e!==0?e:Ef()}return kd()}function wm(){tn===0&&(tn=!(Le&536870912)||Ie?zd():536870912);var e=Zt.current;return e!==null&&(e.flags|=32),tn}function Ot(e,t,r){(e===Fe&&Xe===2||e.cancelPendingCommit!==null)&&($i(e,0),Un(e,Le,tn,!1)),Ki(e,r),(!(Ze&2)||e!==Fe)&&(e===Fe&&(!(Ze&2)&&(Vr|=r),We===4&&Un(e,Le,tn,!1)),bn(e))}function Am(e,t,r){if(Ze&6)throw Error(l(327));var a=!r&&(t&60)===0&&(t&e.expiredLanes)===0||Pi(e,t),f=a?sE(e,t):gf(e,t,!0),h=a;do{if(f===0){wi&&!a&&Un(e,t,0,!1);break}else if(f===6)Un(e,t,0,!Ln);else{if(r=e.current.alternate,h&&!lE(r)){f=gf(e,t,!1),h=!1;continue}if(f===2){if(h=t,e.errorRecoveryDisabledLanes&h)var w=0;else w=e.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){t=w;e:{var I=e;f=Ta;var G=I.current.memoizedState.isDehydrated;if(G&&($i(I,w).flags|=256),w=gf(I,w,!1),w!==2){if(lf&&!G){I.errorRecoveryDisabledLanes|=h,Vr|=h,f=4;break e}h=vn,vn=f,h!==null&&hf(h)}f=w}if(h=!1,f!==2)continue}}if(f===1){$i(e,0),Un(e,t,0,!0);break}e:{switch(a=e,f){case 0:case 1:throw Error(l(345));case 4:if((t&4194176)===t){Un(a,t,tn,!Ln);break e}break;case 2:vn=null;break;case 3:case 5:break;default:throw Error(l(329))}if(a.finishedWork=r,a.finishedLanes=t,(t&62914560)===t&&(h=of+300-mt(),10r?32:r,D.T=null,kr===null)var h=!1;else{r=cf,cf=null;var w=kr,I=Ra;if(kr=null,Ra=0,Ze&6)throw Error(l(331));var G=Ze;if(Ze|=4,ym(w.current),pm(w,w.current,I,r),Ze=G,ja(0,!1),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot(Yi,w)}catch{}h=!0}return h}finally{O.p=f,D.T=a,Cm(e,t)}}return!1}function xm(e,t,r){t=Ft(r,t),t=Co(e.stateNode,t,2),e=rr(e,t,2),e!==null&&(Ki(e,2),bn(e))}function Ke(e,t,r){if(e.tag===3)xm(e,e,r);else for(;t!==null;){if(t.tag===3){xm(t,e,r);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(or===null||!or.has(a))){e=Ft(r,e),r=Up(2),a=rr(t,r,2),a!==null&&(zp(r,a,t,e),Ki(a,2),bn(a));break}}t=t.return}}function yf(e,t,r){var a=e.pingCache;if(a===null){a=e.pingCache=new aE;var f=new Set;a.set(t,f)}else f=a.get(t),f===void 0&&(f=new Set,a.set(t,f));f.has(r)||(lf=!0,f.add(r),e=cE.bind(null,e,t,r),t.then(e,e))}function cE(e,t,r){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,Fe===e&&(Le&r)===r&&(We===4||We===3&&(Le&62914560)===Le&&300>mt()-of?!(Ze&2)&&$i(e,0):uf|=r,Ai===Le&&(Ai=0)),bn(e)}function Lm(e,t){t===0&&(t=Id()),e=Xn(e,t),e!==null&&(Ki(e,t),bn(e))}function dE(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Lm(e,r)}function hE(e,t){var r=0;switch(e.tag){case 13:var a=e.stateNode,f=e.memoizedState;f!==null&&(r=f.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(l(314))}a!==null&&a.delete(t),Lm(e,r)}function pE(e,t){return ze(e,t)}var eu=null,Ri=null,vf=!1,tu=!1,bf=!1,Gr=0;function bn(e){e!==Ri&&e.next===null&&(Ri===null?eu=Ri=e:Ri=Ri.next=e),tu=!0,vf||(vf=!0,gE(mE))}function ja(e,t){if(!bf&&tu){bf=!0;do for(var r=!1,a=eu;a!==null;){if(e!==0){var f=a.pendingLanes;if(f===0)var h=0;else{var w=a.suspendedLanes,I=a.pingedLanes;h=(1<<31-Ut(42|e)+1)-1,h&=f&~(w&~I),h=h&201326677?h&201326677|1:h?h|2:0}h!==0&&(r=!0,zm(a,h))}else h=Le,h=fl(a,a===Fe?h:0),!(h&3)||Pi(a,h)||(r=!0,zm(a,h));a=a.next}while(r);bf=!1}}function mE(){tu=vf=!1;var e=0;Gr!==0&&(AE()&&(e=Gr),Gr=0);for(var t=mt(),r=null,a=eu;a!==null;){var f=a.next,h=qm(a,t);h===0?(a.next=null,r===null?eu=f:r.next=f,f===null&&(Ri=r)):(r=a,(e!==0||h&3)&&(tu=!0)),a=f}ja(e)}function qm(e,t){for(var r=e.suspendedLanes,a=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0"u"?null:document;function Wm(e,t,r){var a=ji;if(a&&typeof t=="string"&&t){var f=Pt(t);f='link[rel="'+e+'"][href="'+f+'"]',typeof r=="string"&&(f+='[crossorigin="'+r+'"]'),Jm.has(f)||(Jm.add(f),e={rel:e,crossOrigin:r,href:t},a.querySelector(f)===null&&(t=a.createElement("link"),vt(t,"link",e),ct(t),a.head.appendChild(t)))}}function ME(e){zn.D(e),Wm("dns-prefetch",e,null)}function CE(e,t){zn.C(e,t),Wm("preconnect",e,t)}function xE(e,t,r){zn.L(e,t,r);var a=ji;if(a&&e&&t){var f='link[rel="preload"][as="'+Pt(t)+'"]';t==="image"&&r&&r.imageSrcSet?(f+='[imagesrcset="'+Pt(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(f+='[imagesizes="'+Pt(r.imageSizes)+'"]')):f+='[href="'+Pt(e)+'"]';var h=f;switch(t){case"style":h=Di(e);break;case"script":h=Mi(e)}nn.has(h)||(e=N({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),nn.set(h,e),a.querySelector(f)!==null||t==="style"&&a.querySelector(Ca(h))||t==="script"&&a.querySelector(xa(h))||(t=a.createElement("link"),vt(t,"link",e),ct(t),a.head.appendChild(t)))}}function LE(e,t){zn.m(e,t);var r=ji;if(r&&e){var a=t&&typeof t.as=="string"?t.as:"script",f='link[rel="modulepreload"][as="'+Pt(a)+'"][href="'+Pt(e)+'"]',h=f;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Mi(e)}if(!nn.has(h)&&(e=N({rel:"modulepreload",href:e},t),nn.set(h,e),r.querySelector(f)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(xa(h)))return}a=r.createElement("link"),vt(a,"link",e),ct(a),r.head.appendChild(a)}}}function qE(e,t,r){zn.S(e,t,r);var a=ji;if(a&&e){var f=ei(a).hoistableStyles,h=Di(e);t=t||"default";var w=f.get(h);if(!w){var I={loading:0,preload:null};if(w=a.querySelector(Ca(h)))I.loading=5;else{e=N({rel:"stylesheet",href:e,"data-precedence":t},r),(r=nn.get(h))&&Cf(e,r);var G=w=a.createElement("link");ct(G),vt(G,"link",e),G._p=new Promise(function(Z,fe){G.onload=Z,G.onerror=fe}),G.addEventListener("load",function(){I.loading|=1}),G.addEventListener("error",function(){I.loading|=2}),I.loading|=4,uu(w,t,a)}w={type:"stylesheet",instance:w,count:1,state:I},f.set(h,w)}}}function UE(e,t){zn.X(e,t);var r=ji;if(r&&e){var a=ei(r).hoistableScripts,f=Mi(e),h=a.get(f);h||(h=r.querySelector(xa(f)),h||(e=N({src:e,async:!0},t),(t=nn.get(f))&&xf(e,t),h=r.createElement("script"),ct(h),vt(h,"link",e),r.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},a.set(f,h))}}function zE(e,t){zn.M(e,t);var r=ji;if(r&&e){var a=ei(r).hoistableScripts,f=Mi(e),h=a.get(f);h||(h=r.querySelector(xa(f)),h||(e=N({src:e,async:!0,type:"module"},t),(t=nn.get(f))&&xf(e,t),h=r.createElement("script"),ct(h),vt(h,"link",e),r.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},a.set(f,h))}}function eg(e,t,r,a){var f=(f=K.current)?lu(f):null;if(!f)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=Di(r.href),r=ei(f).hoistableStyles,a=r.get(t),a||(a={type:"style",instance:null,count:0,state:null},r.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=Di(r.href);var h=ei(f).hoistableStyles,w=h.get(e);if(w||(f=f.ownerDocument||f,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,w),(h=f.querySelector(Ca(e)))&&!h._p&&(w.instance=h,w.state.loading=5),nn.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},nn.set(e,r),h||IE(f,e,r,w.state))),t&&a===null)throw Error(l(528,""));return w}if(t&&a!==null)throw Error(l(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Mi(r),r=ei(f).hoistableScripts,a=r.get(t),a||(a={type:"script",instance:null,count:0,state:null},r.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function Di(e){return'href="'+Pt(e)+'"'}function Ca(e){return'link[rel="stylesheet"]['+e+"]"}function tg(e){return N({},e,{"data-precedence":e.precedence,precedence:null})}function IE(e,t,r,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),vt(t,"link",r),ct(t),e.head.appendChild(t))}function Mi(e){return'[src="'+Pt(e)+'"]'}function xa(e){return"script[async]"+e}function ng(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Pt(r.href)+'"]');if(a)return t.instance=a,ct(a),a;var f=N({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ct(a),vt(a,"style",f),uu(a,r.precedence,e),t.instance=a;case"stylesheet":f=Di(r.href);var h=e.querySelector(Ca(f));if(h)return t.state.loading|=4,t.instance=h,ct(h),h;a=tg(r),(f=nn.get(f))&&Cf(a,f),h=(e.ownerDocument||e).createElement("link"),ct(h);var w=h;return w._p=new Promise(function(I,G){w.onload=I,w.onerror=G}),vt(h,"link",a),t.state.loading|=4,uu(h,r.precedence,e),t.instance=h;case"script":return h=Mi(r.src),(f=e.querySelector(xa(h)))?(t.instance=f,ct(f),f):(a=r,(f=nn.get(h))&&(a=N({},r),xf(a,f)),e=e.ownerDocument||e,f=e.createElement("script"),ct(f),vt(f,"link",a),e.head.appendChild(f),t.instance=f);case"void":return null;default:throw Error(l(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(a=t.instance,t.state.loading|=4,uu(a,r.precedence,e));return t.instance}function uu(e,t,r){for(var a=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=a.length?a[a.length-1]:null,h=f,w=0;w title"):null)}function BE(e,t,r){if(r===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ag(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var La=null;function HE(){}function VE(e,t,r){if(La===null)throw Error(l(475));var a=La;if(t.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var f=Di(r.href),h=e.querySelector(Ca(f));if(h){e=h._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(a.count++,a=ou.bind(a),e.then(a,a)),t.state.loading|=4,t.instance=h,ct(h);return}h=e.ownerDocument||e,r=tg(r),(f=nn.get(f))&&Cf(r,f),h=h.createElement("link"),ct(h);var w=h;w._p=new Promise(function(I,G){w.onload=I,w.onerror=G}),vt(h,"link",r),t.instance=h}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(t,e),(e=t.state.preload)&&!(t.state.loading&3)&&(a.count++,t=ou.bind(a),e.addEventListener("load",t),e.addEventListener("error",t))}}function kE(){if(La===null)throw Error(l(475));var e=La;return e.stylesheets&&e.count===0&&Lf(e,e.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Gf.exports=l_(),Gf.exports}var s_=u_();const o_=ws(s_);var f_=typeof window<"u",c_=function(n,i){return f_?window.matchMedia(n).matches:!1},d_=function(n,i){var u=ve.useState(c_(n)),l=u[0],s=u[1];return ve.useEffect(function(){var o=!0,c=window.matchMedia(n),d=function(){o&&s(!!c.matches)};return c.addEventListener("change",d),s(c.matches),function(){o=!1,c.removeEventListener("change",d)}},[n]),l},Vn={STATIC:"STATIC",DEFAULT:"DEFAULT",TARGETING_MATCH:"TARGETING_MATCH",SPLIT:"SPLIT",CACHED:"CACHED",DISABLED:"DISABLED",UNKNOWN:"UNKNOWN",STALE:"STALE",ERROR:"ERROR"},Xr=(n=>(n.PROVIDER_NOT_READY="PROVIDER_NOT_READY",n.PROVIDER_FATAL="PROVIDER_FATAL",n.FLAG_NOT_FOUND="FLAG_NOT_FOUND",n.PARSE_ERROR="PARSE_ERROR",n.TYPE_MISMATCH="TYPE_MISMATCH",n.TARGETING_KEY_MISSING="TARGETING_KEY_MISSING",n.INVALID_CONTEXT="INVALID_CONTEXT",n.GENERAL="GENERAL",n))(Xr||{}),h_=class pv extends Error{constructor(i,u){super(i),Object.setPrototypeOf(this,pv.prototype),this.name="OpenFeatureError",this.cause=u==null?void 0:u.cause}},Hi=class mv extends h_{constructor(i,u){super(i,u),Object.setPrototypeOf(this,mv.prototype),this.name="ParseError",this.code="PARSE_ERROR"}},gv=class{error(...n){console.error(...n)}warn(...n){console.warn(...n)}info(){}debug(){}},p_=["error","warn","info","debug"],m_=class{constructor(n){this.fallbackLogger=new gv;try{for(const i of p_)if(!n[i]||typeof n[i]!="function")throw new Error(`The provided logger is missing the ${i} method.`);this.logger=n}catch(i){console.error(i),console.error("Falling back to the default logger."),this.logger=this.fallbackLogger}}error(...n){this.log("error",...n)}warn(...n){this.log("warn",...n)}info(...n){this.log("info",...n)}debug(...n){this.log("debug",...n)}log(n,...i){try{this.logger[n](...i)}catch{this.fallbackLogger[n](...i)}}},vu={exports:{}},Ff={},In={},Yr={},Xf={},Qf={},Zf={},Tg;function fs(){return Tg||(Tg=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.regexpCode=n.getEsmExportName=n.getProperty=n.safeStringify=n.stringify=n.strConcat=n.addCodeArg=n.str=n._=n.nil=n._Code=n.Name=n.IDENTIFIER=n._CodeOrName=void 0;class i{}n._CodeOrName=i,n.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class u extends i{constructor(g){if(super(),!n.IDENTIFIER.test(g))throw new Error("CodeGen: name must be a valid identifier");this.str=g}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}n.Name=u;class l extends i{constructor(g){super(),this._items=typeof g=="string"?[g]:g}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const g=this._items[0];return g===""||g==='""'}get str(){var g;return(g=this._str)!==null&&g!==void 0?g:this._str=this._items.reduce((E,_)=>`${E}${_}`,"")}get names(){var g;return(g=this._names)!==null&&g!==void 0?g:this._names=this._items.reduce((E,_)=>(_ instanceof u&&(E[_.str]=(E[_.str]||0)+1),E),{})}}n._Code=l,n.nil=new l("");function s(A,...g){const E=[A[0]];let _=0;for(;_{if(S.scopePath===void 0)throw new Error(`CodeGen: name "${S}" has no value`);return(0,i._)`${m}${S.scopePath}`})}scopeCode(m=this._values,v,S){return this._reduceValues(m,L=>{if(L.value===void 0)throw new Error(`CodeGen: name "${L}" has no value`);return L.value.code},v,S)}_reduceValues(m,v,S={},L){let C=i.nil;for(const q in m){const j=m[q];if(!j)continue;const y=S[q]=S[q]||new Map;j.forEach(A=>{if(y.has(A))return;y.set(A,l.Started);let g=v(A);if(g){const E=this.opts.es5?n.varKinds.var:n.varKinds.const;C=(0,i._)`${C}${E} ${A} = ${g};${this.opts._n}`}else if(g=L==null?void 0:L(A))C=(0,i._)`${C}${g}${this.opts._n}`;else throw new u(A);y.set(A,l.Completed)})}return C}}n.ValueScope=d}(Jf)),Jf}var jg;function Ce(){return jg||(jg=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.or=n.and=n.not=n.CodeGen=n.operators=n.varKinds=n.ValueScopeName=n.ValueScope=n.Scope=n.Name=n.regexpCode=n.stringify=n.getProperty=n.nil=n.strConcat=n.str=n._=void 0;const i=fs(),u=Ng();var l=fs();Object.defineProperty(n,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(n,"strConcat",{enumerable:!0,get:function(){return l.strConcat}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(n,"getProperty",{enumerable:!0,get:function(){return l.getProperty}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(n,"regexpCode",{enumerable:!0,get:function(){return l.regexpCode}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return l.Name}});var s=Ng();Object.defineProperty(n,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(n,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(n,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(n,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),n.operators={GT:new i._Code(">"),GTE:new i._Code(">="),LT:new i._Code("<"),LTE:new i._Code("<="),EQ:new i._Code("==="),NEQ:new i._Code("!=="),NOT:new i._Code("!"),OR:new i._Code("||"),AND:new i._Code("&&"),ADD:new i._Code("+")};class o{optimizeNodes(){return this}optimizeNames(O,V){return this}}class c extends o{constructor(O,V,W){super(),this.varKind=O,this.name=V,this.rhs=W}render({es5:O,_n:V}){const W=O?u.varKinds.var:this.varKind,me=this.rhs===void 0?"":` = ${this.rhs}`;return`${W} ${this.name}${me};`+V}optimizeNames(O,V){if(O[this.name.str])return this.rhs&&(this.rhs=ee(this.rhs,O,V)),this}get names(){return this.rhs instanceof i._CodeOrName?this.rhs.names:{}}}class d extends o{constructor(O,V,W){super(),this.lhs=O,this.rhs=V,this.sideEffects=W}render({_n:O}){return`${this.lhs} = ${this.rhs};`+O}optimizeNames(O,V){if(!(this.lhs instanceof i.Name&&!O[this.lhs.str]&&!this.sideEffects))return this.rhs=ee(this.rhs,O,V),this}get names(){const O=this.lhs instanceof i.Name?{}:{...this.lhs.names};return J(O,this.rhs)}}class p extends d{constructor(O,V,W,me){super(O,W,me),this.op=V}render({_n:O}){return`${this.lhs} ${this.op}= ${this.rhs};`+O}}class m extends o{constructor(O){super(),this.label=O,this.names={}}render({_n:O}){return`${this.label}:`+O}}class v extends o{constructor(O){super(),this.label=O,this.names={}}render({_n:O}){return`break${this.label?` ${this.label}`:""};`+O}}class S extends o{constructor(O){super(),this.error=O}render({_n:O}){return`throw ${this.error};`+O}get names(){return this.error.names}}class L extends o{constructor(O){super(),this.code=O}render({_n:O}){return`${this.code};`+O}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(O,V){return this.code=ee(this.code,O,V),this}get names(){return this.code instanceof i._CodeOrName?this.code.names:{}}}class C extends o{constructor(O=[]){super(),this.nodes=O}render(O){return this.nodes.reduce((V,W)=>V+W.render(O),"")}optimizeNodes(){const{nodes:O}=this;let V=O.length;for(;V--;){const W=O[V].optimizeNodes();Array.isArray(W)?O.splice(V,1,...W):W?O[V]=W:O.splice(V,1)}return O.length>0?this:void 0}optimizeNames(O,V){const{nodes:W}=this;let me=W.length;for(;me--;){const re=W[me];re.optimizeNames(O,V)||(ne(O,re.names),W.splice(me,1))}return W.length>0?this:void 0}get names(){return this.nodes.reduce((O,V)=>X(O,V.names),{})}}class q extends C{render(O){return"{"+O._n+super.render(O)+"}"+O._n}}class j extends C{}class y extends q{}y.kind="else";class A extends q{constructor(O,V){super(V),this.condition=O}render(O){let V=`if(${this.condition})`+super.render(O);return this.else&&(V+="else "+this.else.render(O)),V}optimizeNodes(){super.optimizeNodes();const O=this.condition;if(O===!0)return this.nodes;let V=this.else;if(V){const W=V.optimizeNodes();V=this.else=Array.isArray(W)?new y(W):W}if(V)return O===!1?V instanceof A?V:V.nodes:this.nodes.length?this:new A(P(O),V instanceof A?[V]:V.nodes);if(!(O===!1||!this.nodes.length))return this}optimizeNames(O,V){var W;if(this.else=(W=this.else)===null||W===void 0?void 0:W.optimizeNames(O,V),!!(super.optimizeNames(O,V)||this.else))return this.condition=ee(this.condition,O,V),this}get names(){const O=super.names;return J(O,this.condition),this.else&&X(O,this.else.names),O}}A.kind="if";class g extends q{}g.kind="for";class E extends g{constructor(O){super(),this.iteration=O}render(O){return`for(${this.iteration})`+super.render(O)}optimizeNames(O,V){if(super.optimizeNames(O,V))return this.iteration=ee(this.iteration,O,V),this}get names(){return X(super.names,this.iteration.names)}}class _ extends g{constructor(O,V,W,me){super(),this.varKind=O,this.name=V,this.from=W,this.to=me}render(O){const V=O.es5?u.varKinds.var:this.varKind,{name:W,from:me,to:re}=this;return`for(${V} ${W}=${me}; ${W}<${re}; ${W}++)`+super.render(O)}get names(){const O=J(super.names,this.from);return J(O,this.to)}}class T extends g{constructor(O,V,W,me){super(),this.loop=O,this.varKind=V,this.name=W,this.iterable=me}render(O){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(O)}optimizeNames(O,V){if(super.optimizeNames(O,V))return this.iterable=ee(this.iterable,O,V),this}get names(){return X(super.names,this.iterable.names)}}class b extends q{constructor(O,V,W){super(),this.name=O,this.args=V,this.async=W}render(O){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(O)}}b.kind="func";class R extends C{render(O){return"return "+super.render(O)}}R.kind="return";class $ extends q{render(O){let V="try"+super.render(O);return this.catch&&(V+=this.catch.render(O)),this.finally&&(V+=this.finally.render(O)),V}optimizeNodes(){var O,V;return super.optimizeNodes(),(O=this.catch)===null||O===void 0||O.optimizeNodes(),(V=this.finally)===null||V===void 0||V.optimizeNodes(),this}optimizeNames(O,V){var W,me;return super.optimizeNames(O,V),(W=this.catch)===null||W===void 0||W.optimizeNames(O,V),(me=this.finally)===null||me===void 0||me.optimizeNames(O,V),this}get names(){const O=super.names;return this.catch&&X(O,this.catch.names),this.finally&&X(O,this.finally.names),O}}class D extends q{constructor(O){super(),this.error=O}render(O){return`catch(${this.error})`+super.render(O)}}D.kind="catch";class N extends q{render(O){return"finally"+super.render(O)}}N.kind="finally";class Y{constructor(O,V={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...V,_n:V.lines?` -`:""},this._extScope=O,this._scope=new u.Scope({parent:O}),this._nodes=[new j]}toString(){return this._root.render(this.opts)}name(O){return this._scope.name(O)}scopeName(O){return this._extScope.name(O)}scopeValue(O,V){const W=this._extScope.value(O,V);return(this._values[W.prefix]||(this._values[W.prefix]=new Set)).add(W),W}getScopeValue(O,V){return this._extScope.getValue(O,V)}scopeRefs(O){return this._extScope.scopeRefs(O,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(O,V,W,me){const re=this._scope.toName(V);return W!==void 0&&me&&(this._constants[re.str]=W),this._leafNode(new c(O,re,W)),re}const(O,V,W){return this._def(u.varKinds.const,O,V,W)}let(O,V,W){return this._def(u.varKinds.let,O,V,W)}var(O,V,W){return this._def(u.varKinds.var,O,V,W)}assign(O,V,W){return this._leafNode(new d(O,V,W))}add(O,V){return this._leafNode(new p(O,n.operators.ADD,V))}code(O){return typeof O=="function"?O():O!==i.nil&&this._leafNode(new L(O)),this}object(...O){const V=["{"];for(const[W,me]of O)V.length>1&&V.push(","),V.push(W),(W!==me||this.opts.es5)&&(V.push(":"),(0,i.addCodeArg)(V,me));return V.push("}"),new i._Code(V)}if(O,V,W){if(this._blockNode(new A(O)),V&&W)this.code(V).else().code(W).endIf();else if(V)this.code(V).endIf();else if(W)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(O){return this._elseNode(new A(O))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(A,y)}_for(O,V){return this._blockNode(O),V&&this.code(V).endFor(),this}for(O,V){return this._for(new E(O),V)}forRange(O,V,W,me,re=this.opts.es5?u.varKinds.var:u.varKinds.let){const M=this._scope.toName(O);return this._for(new _(re,M,V,W),()=>me(M))}forOf(O,V,W,me=u.varKinds.const){const re=this._scope.toName(O);if(this.opts.es5){const M=V instanceof i.Name?V:this.var("_arr",V);return this.forRange("_i",0,(0,i._)`${M}.length`,B=>{this.var(re,(0,i._)`${M}[${B}]`),W(re)})}return this._for(new T("of",me,re,V),()=>W(re))}forIn(O,V,W,me=this.opts.es5?u.varKinds.var:u.varKinds.const){if(this.opts.ownProperties)return this.forOf(O,(0,i._)`Object.keys(${V})`,W);const re=this._scope.toName(O);return this._for(new T("in",me,re,V),()=>W(re))}endFor(){return this._endBlockNode(g)}label(O){return this._leafNode(new m(O))}break(O){return this._leafNode(new v(O))}return(O){const V=new R;if(this._blockNode(V),this.code(O),V.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(R)}try(O,V,W){if(!V&&!W)throw new Error('CodeGen: "try" without "catch" and "finally"');const me=new $;if(this._blockNode(me),this.code(O),V){const re=this.name("e");this._currNode=me.catch=new D(re),V(re)}return W&&(this._currNode=me.finally=new N,this.code(W)),this._endBlockNode(D,N)}throw(O){return this._leafNode(new S(O))}block(O,V){return this._blockStarts.push(this._nodes.length),O&&this.code(O).endBlock(V),this}endBlock(O){const V=this._blockStarts.pop();if(V===void 0)throw new Error("CodeGen: not in self-balancing block");const W=this._nodes.length-V;if(W<0||O!==void 0&&W!==O)throw new Error(`CodeGen: wrong number of nodes: ${W} vs ${O} expected`);return this._nodes.length=V,this}func(O,V=i.nil,W,me){return this._blockNode(new b(O,V,W)),me&&this.code(me).endFunc(),this}endFunc(){return this._endBlockNode(b)}optimize(O=1){for(;O-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(O){return this._currNode.nodes.push(O),this}_blockNode(O){this._currNode.nodes.push(O),this._nodes.push(O)}_endBlockNode(O,V){const W=this._currNode;if(W instanceof O||V&&W instanceof V)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${V?`${O.kind}/${V.kind}`:O.kind}"`)}_elseNode(O){const V=this._currNode;if(!(V instanceof A))throw new Error('CodeGen: "else" without "if"');return this._currNode=V.else=O,this}get _root(){return this._nodes[0]}get _currNode(){const O=this._nodes;return O[O.length-1]}set _currNode(O){const V=this._nodes;V[V.length-1]=O}}n.CodeGen=Y;function X(H,O){for(const V in O)H[V]=(H[V]||0)+(O[V]||0);return H}function J(H,O){return O instanceof i._CodeOrName?X(H,O.names):H}function ee(H,O,V){if(H instanceof i.Name)return W(H);if(!me(H))return H;return new i._Code(H._items.reduce((re,M)=>(M instanceof i.Name&&(M=W(M)),M instanceof i._Code?re.push(...M._items):re.push(M),re),[]));function W(re){const M=V[re.str];return M===void 0||O[re.str]!==1?re:(delete O[re.str],M)}function me(re){return re instanceof i._Code&&re._items.some(M=>M instanceof i.Name&&O[M.str]===1&&V[M.str]!==void 0)}}function ne(H,O){for(const V in O)H[V]=(H[V]||0)-(O[V]||0)}function P(H){return typeof H=="boolean"||typeof H=="number"||H===null?!H:(0,i._)`!${F(H)}`}n.not=P;const se=z(n.operators.AND);function le(...H){return H.reduce(se)}n.and=le;const de=z(n.operators.OR);function U(...H){return H.reduce(de)}n.or=U;function z(H){return(O,V)=>O===i.nil?V:V===i.nil?O:(0,i._)`${F(O)} ${H} ${F(V)}`}function F(H){return H instanceof i.Name?H:(0,i._)`(${H})`}}(Qf)),Qf}var je={},Dg;function He(){if(Dg)return je;Dg=1,Object.defineProperty(je,"__esModule",{value:!0}),je.checkStrictMode=je.getErrorPath=je.Type=je.useFunc=je.setEvaluated=je.evaluatedPropsToName=je.mergeEvaluated=je.eachItem=je.unescapeJsonPointer=je.escapeJsonPointer=je.escapeFragment=je.unescapeFragment=je.schemaRefOrVal=je.schemaHasRulesButRef=je.schemaHasRules=je.checkUnknownRules=je.alwaysValidSchema=je.toHash=void 0;const n=Ce(),i=fs();function u(T){const b={};for(const R of T)b[R]=!0;return b}je.toHash=u;function l(T,b){return typeof b=="boolean"?b:Object.keys(b).length===0?!0:(s(T,b),!o(b,T.self.RULES.all))}je.alwaysValidSchema=l;function s(T,b=T.schema){const{opts:R,self:$}=T;if(!R.strictSchema||typeof b=="boolean")return;const D=$.RULES.keywords;for(const N in b)D[N]||_(T,`unknown keyword: "${N}"`)}je.checkUnknownRules=s;function o(T,b){if(typeof T=="boolean")return!T;for(const R in T)if(b[R])return!0;return!1}je.schemaHasRules=o;function c(T,b){if(typeof T=="boolean")return!T;for(const R in T)if(R!=="$ref"&&b.all[R])return!0;return!1}je.schemaHasRulesButRef=c;function d({topSchemaRef:T,schemaPath:b},R,$,D){if(!D){if(typeof R=="number"||typeof R=="boolean")return R;if(typeof R=="string")return(0,n._)`${R}`}return(0,n._)`${T}${b}${(0,n.getProperty)($)}`}je.schemaRefOrVal=d;function p(T){return S(decodeURIComponent(T))}je.unescapeFragment=p;function m(T){return encodeURIComponent(v(T))}je.escapeFragment=m;function v(T){return typeof T=="number"?`${T}`:T.replace(/~/g,"~0").replace(/\//g,"~1")}je.escapeJsonPointer=v;function S(T){return T.replace(/~1/g,"/").replace(/~0/g,"~")}je.unescapeJsonPointer=S;function L(T,b){if(Array.isArray(T))for(const R of T)b(R);else b(T)}je.eachItem=L;function C({mergeNames:T,mergeToName:b,mergeValues:R,resultToName:$}){return(D,N,Y,X)=>{const J=Y===void 0?N:Y instanceof n.Name?(N instanceof n.Name?T(D,N,Y):b(D,N,Y),Y):N instanceof n.Name?(b(D,Y,N),N):R(N,Y);return X===n.Name&&!(J instanceof n.Name)?$(D,J):J}}je.mergeEvaluated={props:C({mergeNames:(T,b,R)=>T.if((0,n._)`${R} !== true && ${b} !== undefined`,()=>{T.if((0,n._)`${b} === true`,()=>T.assign(R,!0),()=>T.assign(R,(0,n._)`${R} || {}`).code((0,n._)`Object.assign(${R}, ${b})`))}),mergeToName:(T,b,R)=>T.if((0,n._)`${R} !== true`,()=>{b===!0?T.assign(R,!0):(T.assign(R,(0,n._)`${R} || {}`),j(T,R,b))}),mergeValues:(T,b)=>T===!0?!0:{...T,...b},resultToName:q}),items:C({mergeNames:(T,b,R)=>T.if((0,n._)`${R} !== true && ${b} !== undefined`,()=>T.assign(R,(0,n._)`${b} === true ? true : ${R} > ${b} ? ${R} : ${b}`)),mergeToName:(T,b,R)=>T.if((0,n._)`${R} !== true`,()=>T.assign(R,b===!0?!0:(0,n._)`${R} > ${b} ? ${R} : ${b}`)),mergeValues:(T,b)=>T===!0?!0:Math.max(T,b),resultToName:(T,b)=>T.var("items",b)})};function q(T,b){if(b===!0)return T.var("props",!0);const R=T.var("props",(0,n._)`{}`);return b!==void 0&&j(T,R,b),R}je.evaluatedPropsToName=q;function j(T,b,R){Object.keys(R).forEach($=>T.assign((0,n._)`${b}${(0,n.getProperty)($)}`,!0))}je.setEvaluated=j;const y={};function A(T,b){return T.scopeValue("func",{ref:b,code:y[b.code]||(y[b.code]=new i._Code(b.code))})}je.useFunc=A;var g;(function(T){T[T.Num=0]="Num",T[T.Str=1]="Str"})(g||(je.Type=g={}));function E(T,b,R){if(T instanceof n.Name){const $=b===g.Num;return R?$?(0,n._)`"[" + ${T} + "]"`:(0,n._)`"['" + ${T} + "']"`:$?(0,n._)`"/" + ${T}`:(0,n._)`"/" + ${T}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return R?(0,n.getProperty)(T).toString():"/"+v(T)}je.getErrorPath=E;function _(T,b,R=T.opts.strictSchema){if(R){if(b=`strict mode: ${b}`,R===!0)throw new Error(b);T.self.logger.warn(b)}}return je.checkStrictMode=_,je}var bu={},Mg;function _r(){if(Mg)return bu;Mg=1,Object.defineProperty(bu,"__esModule",{value:!0});const n=Ce(),i={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};return bu.default=i,bu}var Cg;function As(){return Cg||(Cg=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.extendErrors=n.resetErrorsCount=n.reportExtraError=n.reportError=n.keyword$DataError=n.keywordError=void 0;const i=Ce(),u=He(),l=_r();n.keywordError={message:({keyword:y})=>(0,i.str)`must pass "${y}" keyword validation`},n.keyword$DataError={message:({keyword:y,schemaType:A})=>A?(0,i.str)`"${y}" keyword must be ${A} ($data)`:(0,i.str)`"${y}" keyword is invalid ($data)`};function s(y,A=n.keywordError,g,E){const{it:_}=y,{gen:T,compositeRule:b,allErrors:R}=_,$=S(y,A,g);E??(b||R)?p(T,$):m(_,(0,i._)`[${$}]`)}n.reportError=s;function o(y,A=n.keywordError,g){const{it:E}=y,{gen:_,compositeRule:T,allErrors:b}=E,R=S(y,A,g);p(_,R),T||b||m(E,l.default.vErrors)}n.reportExtraError=o;function c(y,A){y.assign(l.default.errors,A),y.if((0,i._)`${l.default.vErrors} !== null`,()=>y.if(A,()=>y.assign((0,i._)`${l.default.vErrors}.length`,A),()=>y.assign(l.default.vErrors,null)))}n.resetErrorsCount=c;function d({gen:y,keyword:A,schemaValue:g,data:E,errsCount:_,it:T}){if(_===void 0)throw new Error("ajv implementation error");const b=y.name("err");y.forRange("i",_,l.default.errors,R=>{y.const(b,(0,i._)`${l.default.vErrors}[${R}]`),y.if((0,i._)`${b}.instancePath === undefined`,()=>y.assign((0,i._)`${b}.instancePath`,(0,i.strConcat)(l.default.instancePath,T.errorPath))),y.assign((0,i._)`${b}.schemaPath`,(0,i.str)`${T.errSchemaPath}/${A}`),T.opts.verbose&&(y.assign((0,i._)`${b}.schema`,g),y.assign((0,i._)`${b}.data`,E))})}n.extendErrors=d;function p(y,A){const g=y.const("err",A);y.if((0,i._)`${l.default.vErrors} === null`,()=>y.assign(l.default.vErrors,(0,i._)`[${g}]`),(0,i._)`${l.default.vErrors}.push(${g})`),y.code((0,i._)`${l.default.errors}++`)}function m(y,A){const{gen:g,validateName:E,schemaEnv:_}=y;_.$async?g.throw((0,i._)`new ${y.ValidationError}(${A})`):(g.assign((0,i._)`${E}.errors`,A),g.return(!1))}const v={keyword:new i.Name("keyword"),schemaPath:new i.Name("schemaPath"),params:new i.Name("params"),propertyName:new i.Name("propertyName"),message:new i.Name("message"),schema:new i.Name("schema"),parentSchema:new i.Name("parentSchema")};function S(y,A,g){const{createErrors:E}=y.it;return E===!1?(0,i._)`{}`:L(y,A,g)}function L(y,A,g={}){const{gen:E,it:_}=y,T=[C(_,g),q(y,g)];return j(y,A,T),E.object(...T)}function C({errorPath:y},{instancePath:A}){const g=A?(0,i.str)`${y}${(0,u.getErrorPath)(A,u.Type.Str)}`:y;return[l.default.instancePath,(0,i.strConcat)(l.default.instancePath,g)]}function q({keyword:y,it:{errSchemaPath:A}},{schemaPath:g,parentSchema:E}){let _=E?A:(0,i.str)`${A}/${y}`;return g&&(_=(0,i.str)`${_}${(0,u.getErrorPath)(g,u.Type.Str)}`),[v.schemaPath,_]}function j(y,{params:A,message:g},E){const{keyword:_,data:T,schemaValue:b,it:R}=y,{opts:$,propertyName:D,topSchemaRef:N,schemaPath:Y}=R;E.push([v.keyword,_],[v.params,typeof A=="function"?A(y):A||(0,i._)`{}`]),$.messages&&E.push([v.message,typeof g=="function"?g(y):g]),$.verbose&&E.push([v.schema,b],[v.parentSchema,(0,i._)`${N}${Y}`],[l.default.data,T]),D&&E.push([v.propertyName,D])}}(Xf)),Xf}var xg;function g_(){if(xg)return Yr;xg=1,Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.boolOrEmptySchema=Yr.topBoolOrEmptySchema=void 0;const n=As(),i=Ce(),u=_r(),l={message:"boolean schema is false"};function s(d){const{gen:p,schema:m,validateName:v}=d;m===!1?c(d,!1):typeof m=="object"&&m.$async===!0?p.return(u.default.data):(p.assign((0,i._)`${v}.errors`,null),p.return(!0))}Yr.topBoolOrEmptySchema=s;function o(d,p){const{gen:m,schema:v}=d;v===!1?(m.var(p,!1),c(d)):m.var(p,!0)}Yr.boolOrEmptySchema=o;function c(d,p){const{gen:m,data:v}=d,S={gen:m,keyword:"false schema",data:v,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:d};(0,n.reportError)(S,l,void 0,p)}return Yr}var bt={},Pr={},Lg;function yv(){if(Lg)return Pr;Lg=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.getRules=Pr.isJSONType=void 0;const n=["string","number","integer","boolean","null","object","array"],i=new Set(n);function u(s){return typeof s=="string"&&i.has(s)}Pr.isJSONType=u;function l(){const s={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...s,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},s.number,s.string,s.array,s.object],post:{rules:[]},all:{},keywords:{}}}return Pr.getRules=l,Pr}var Bn={},qg;function vv(){if(qg)return Bn;qg=1,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.shouldUseRule=Bn.shouldUseGroup=Bn.schemaHasRulesForType=void 0;function n({schema:l,self:s},o){const c=s.RULES.types[o];return c&&c!==!0&&i(l,c)}Bn.schemaHasRulesForType=n;function i(l,s){return s.rules.some(o=>u(l,o))}Bn.shouldUseGroup=i;function u(l,s){var o;return l[s.keyword]!==void 0||((o=s.definition.implements)===null||o===void 0?void 0:o.some(c=>l[c]!==void 0))}return Bn.shouldUseRule=u,Bn}var Ug;function cs(){if(Ug)return bt;Ug=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.reportTypeError=bt.checkDataTypes=bt.checkDataType=bt.coerceAndCheckDataType=bt.getJSONTypes=bt.getSchemaTypes=bt.DataType=void 0;const n=yv(),i=vv(),u=As(),l=Ce(),s=He();var o;(function(g){g[g.Correct=0]="Correct",g[g.Wrong=1]="Wrong"})(o||(bt.DataType=o={}));function c(g){const E=d(g.type);if(E.includes("null")){if(g.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!E.length&&g.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');g.nullable===!0&&E.push("null")}return E}bt.getSchemaTypes=c;function d(g){const E=Array.isArray(g)?g:g?[g]:[];if(E.every(n.isJSONType))return E;throw new Error("type must be JSONType or JSONType[]: "+E.join(","))}bt.getJSONTypes=d;function p(g,E){const{gen:_,data:T,opts:b}=g,R=v(E,b.coerceTypes),$=E.length>0&&!(R.length===0&&E.length===1&&(0,i.schemaHasRulesForType)(g,E[0]));if($){const D=q(E,T,b.strictNumbers,o.Wrong);_.if(D,()=>{R.length?S(g,E,R):y(g)})}return $}bt.coerceAndCheckDataType=p;const m=new Set(["string","number","integer","boolean","null"]);function v(g,E){return E?g.filter(_=>m.has(_)||E==="array"&&_==="array"):[]}function S(g,E,_){const{gen:T,data:b,opts:R}=g,$=T.let("dataType",(0,l._)`typeof ${b}`),D=T.let("coerced",(0,l._)`undefined`);R.coerceTypes==="array"&&T.if((0,l._)`${$} == 'object' && Array.isArray(${b}) && ${b}.length == 1`,()=>T.assign(b,(0,l._)`${b}[0]`).assign($,(0,l._)`typeof ${b}`).if(q(E,b,R.strictNumbers),()=>T.assign(D,b))),T.if((0,l._)`${D} !== undefined`);for(const Y of _)(m.has(Y)||Y==="array"&&R.coerceTypes==="array")&&N(Y);T.else(),y(g),T.endIf(),T.if((0,l._)`${D} !== undefined`,()=>{T.assign(b,D),L(g,D)});function N(Y){switch(Y){case"string":T.elseIf((0,l._)`${$} == "number" || ${$} == "boolean"`).assign(D,(0,l._)`"" + ${b}`).elseIf((0,l._)`${b} === null`).assign(D,(0,l._)`""`);return;case"number":T.elseIf((0,l._)`${$} == "boolean" || ${b} === null - || (${$} == "string" && ${b} && ${b} == +${b})`).assign(D,(0,l._)`+${b}`);return;case"integer":T.elseIf((0,l._)`${$} === "boolean" || ${b} === null - || (${$} === "string" && ${b} && ${b} == +${b} && !(${b} % 1))`).assign(D,(0,l._)`+${b}`);return;case"boolean":T.elseIf((0,l._)`${b} === "false" || ${b} === 0 || ${b} === null`).assign(D,!1).elseIf((0,l._)`${b} === "true" || ${b} === 1`).assign(D,!0);return;case"null":T.elseIf((0,l._)`${b} === "" || ${b} === 0 || ${b} === false`),T.assign(D,null);return;case"array":T.elseIf((0,l._)`${$} === "string" || ${$} === "number" - || ${$} === "boolean" || ${b} === null`).assign(D,(0,l._)`[${b}]`)}}}function L({gen:g,parentData:E,parentDataProperty:_},T){g.if((0,l._)`${E} !== undefined`,()=>g.assign((0,l._)`${E}[${_}]`,T))}function C(g,E,_,T=o.Correct){const b=T===o.Correct?l.operators.EQ:l.operators.NEQ;let R;switch(g){case"null":return(0,l._)`${E} ${b} null`;case"array":R=(0,l._)`Array.isArray(${E})`;break;case"object":R=(0,l._)`${E} && typeof ${E} == "object" && !Array.isArray(${E})`;break;case"integer":R=$((0,l._)`!(${E} % 1) && !isNaN(${E})`);break;case"number":R=$();break;default:return(0,l._)`typeof ${E} ${b} ${g}`}return T===o.Correct?R:(0,l.not)(R);function $(D=l.nil){return(0,l.and)((0,l._)`typeof ${E} == "number"`,D,_?(0,l._)`isFinite(${E})`:l.nil)}}bt.checkDataType=C;function q(g,E,_,T){if(g.length===1)return C(g[0],E,_,T);let b;const R=(0,s.toHash)(g);if(R.array&&R.object){const $=(0,l._)`typeof ${E} != "object"`;b=R.null?$:(0,l._)`!${E} || ${$}`,delete R.null,delete R.array,delete R.object}else b=l.nil;R.number&&delete R.integer;for(const $ in R)b=(0,l.and)(b,C($,E,_,T));return b}bt.checkDataTypes=q;const j={message:({schema:g})=>`must be ${g}`,params:({schema:g,schemaValue:E})=>typeof g=="string"?(0,l._)`{type: ${g}}`:(0,l._)`{type: ${E}}`};function y(g){const E=A(g);(0,u.reportError)(E,j)}bt.reportTypeError=y;function A(g){const{gen:E,data:_,schema:T}=g,b=(0,s.schemaRefOrVal)(g,T,"type");return{gen:E,keyword:"type",data:_,schema:T.type,schemaCode:b,schemaValue:b,parentSchema:T,params:{},it:g}}return bt}var ka={},zg;function y_(){if(zg)return ka;zg=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.assignDefaults=void 0;const n=Ce(),i=He();function u(s,o){const{properties:c,items:d}=s.schema;if(o==="object"&&c)for(const p in c)l(s,p,c[p].default);else o==="array"&&Array.isArray(d)&&d.forEach((p,m)=>l(s,m,p.default))}ka.assignDefaults=u;function l(s,o,c){const{gen:d,compositeRule:p,data:m,opts:v}=s;if(c===void 0)return;const S=(0,n._)`${m}${(0,n.getProperty)(o)}`;if(p){(0,i.checkStrictMode)(s,`default is ignored for: ${S}`);return}let L=(0,n._)`${S} === undefined`;v.useDefaults==="empty"&&(L=(0,n._)`${L} || ${S} === null || ${S} === ""`),d.if(L,(0,n._)`${S} = ${(0,n.stringify)(c)}`)}return ka}var on={},ke={},Ig;function dn(){if(Ig)return ke;Ig=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.validateUnion=ke.validateArray=ke.usePattern=ke.callValidateCode=ke.schemaProperties=ke.allSchemaProperties=ke.noPropertyInData=ke.propertyInData=ke.isOwnProperty=ke.hasPropFunc=ke.reportMissingProp=ke.checkMissingProp=ke.checkReportMissingProp=void 0;const n=Ce(),i=He(),u=_r(),l=He();function s(g,E){const{gen:_,data:T,it:b}=g;_.if(v(_,T,E,b.opts.ownProperties),()=>{g.setParams({missingProperty:(0,n._)`${E}`},!0),g.error()})}ke.checkReportMissingProp=s;function o({gen:g,data:E,it:{opts:_}},T,b){return(0,n.or)(...T.map(R=>(0,n.and)(v(g,E,R,_.ownProperties),(0,n._)`${b} = ${R}`)))}ke.checkMissingProp=o;function c(g,E){g.setParams({missingProperty:E},!0),g.error()}ke.reportMissingProp=c;function d(g){return g.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,n._)`Object.prototype.hasOwnProperty`})}ke.hasPropFunc=d;function p(g,E,_){return(0,n._)`${d(g)}.call(${E}, ${_})`}ke.isOwnProperty=p;function m(g,E,_,T){const b=(0,n._)`${E}${(0,n.getProperty)(_)} !== undefined`;return T?(0,n._)`${b} && ${p(g,E,_)}`:b}ke.propertyInData=m;function v(g,E,_,T){const b=(0,n._)`${E}${(0,n.getProperty)(_)} === undefined`;return T?(0,n.or)(b,(0,n.not)(p(g,E,_))):b}ke.noPropertyInData=v;function S(g){return g?Object.keys(g).filter(E=>E!=="__proto__"):[]}ke.allSchemaProperties=S;function L(g,E){return S(E).filter(_=>!(0,i.alwaysValidSchema)(g,E[_]))}ke.schemaProperties=L;function C({schemaCode:g,data:E,it:{gen:_,topSchemaRef:T,schemaPath:b,errorPath:R},it:$},D,N,Y){const X=Y?(0,n._)`${g}, ${E}, ${T}${b}`:E,J=[[u.default.instancePath,(0,n.strConcat)(u.default.instancePath,R)],[u.default.parentData,$.parentData],[u.default.parentDataProperty,$.parentDataProperty],[u.default.rootData,u.default.rootData]];$.opts.dynamicRef&&J.push([u.default.dynamicAnchors,u.default.dynamicAnchors]);const ee=(0,n._)`${X}, ${_.object(...J)}`;return N!==n.nil?(0,n._)`${D}.call(${N}, ${ee})`:(0,n._)`${D}(${ee})`}ke.callValidateCode=C;const q=(0,n._)`new RegExp`;function j({gen:g,it:{opts:E}},_){const T=E.unicodeRegExp?"u":"",{regExp:b}=E.code,R=b(_,T);return g.scopeValue("pattern",{key:R.toString(),ref:R,code:(0,n._)`${b.code==="new RegExp"?q:(0,l.useFunc)(g,b)}(${_}, ${T})`})}ke.usePattern=j;function y(g){const{gen:E,data:_,keyword:T,it:b}=g,R=E.name("valid");if(b.allErrors){const D=E.let("valid",!0);return $(()=>E.assign(D,!1)),D}return E.var(R,!0),$(()=>E.break()),R;function $(D){const N=E.const("len",(0,n._)`${_}.length`);E.forRange("i",0,N,Y=>{g.subschema({keyword:T,dataProp:Y,dataPropType:i.Type.Num},R),E.if((0,n.not)(R),D)})}}ke.validateArray=y;function A(g){const{gen:E,schema:_,keyword:T,it:b}=g;if(!Array.isArray(_))throw new Error("ajv implementation error");if(_.some(N=>(0,i.alwaysValidSchema)(b,N))&&!b.opts.unevaluated)return;const $=E.let("valid",!1),D=E.name("_valid");E.block(()=>_.forEach((N,Y)=>{const X=g.subschema({keyword:T,schemaProp:Y,compositeRule:!0},D);E.assign($,(0,n._)`${$} || ${D}`),g.mergeValidEvaluated(X,D)||E.if((0,n.not)($))})),g.result($,()=>g.reset(),()=>g.error(!0))}return ke.validateUnion=A,ke}var Bg;function v_(){if(Bg)return on;Bg=1,Object.defineProperty(on,"__esModule",{value:!0}),on.validateKeywordUsage=on.validSchemaType=on.funcKeywordCode=on.macroKeywordCode=void 0;const n=Ce(),i=_r(),u=dn(),l=As();function s(L,C){const{gen:q,keyword:j,schema:y,parentSchema:A,it:g}=L,E=C.macro.call(g.self,y,A,g),_=m(q,j,E);g.opts.validateSchema!==!1&&g.self.validateSchema(E,!0);const T=q.name("valid");L.subschema({schema:E,schemaPath:n.nil,errSchemaPath:`${g.errSchemaPath}/${j}`,topSchemaRef:_,compositeRule:!0},T),L.pass(T,()=>L.error(!0))}on.macroKeywordCode=s;function o(L,C){var q;const{gen:j,keyword:y,schema:A,parentSchema:g,$data:E,it:_}=L;p(_,C);const T=!E&&C.compile?C.compile.call(_.self,A,g,_):C.validate,b=m(j,y,T),R=j.let("valid");L.block$data(R,$),L.ok((q=C.valid)!==null&&q!==void 0?q:R);function $(){if(C.errors===!1)Y(),C.modifying&&c(L),X(()=>L.error());else{const J=C.async?D():N();C.modifying&&c(L),X(()=>d(L,J))}}function D(){const J=j.let("ruleErrs",null);return j.try(()=>Y((0,n._)`await `),ee=>j.assign(R,!1).if((0,n._)`${ee} instanceof ${_.ValidationError}`,()=>j.assign(J,(0,n._)`${ee}.errors`),()=>j.throw(ee))),J}function N(){const J=(0,n._)`${b}.errors`;return j.assign(J,null),Y(n.nil),J}function Y(J=C.async?(0,n._)`await `:n.nil){const ee=_.opts.passContext?i.default.this:i.default.self,ne=!("compile"in C&&!E||C.schema===!1);j.assign(R,(0,n._)`${J}${(0,u.callValidateCode)(L,b,ee,ne)}`,C.modifying)}function X(J){var ee;j.if((0,n.not)((ee=C.valid)!==null&&ee!==void 0?ee:R),J)}}on.funcKeywordCode=o;function c(L){const{gen:C,data:q,it:j}=L;C.if(j.parentData,()=>C.assign(q,(0,n._)`${j.parentData}[${j.parentDataProperty}]`))}function d(L,C){const{gen:q}=L;q.if((0,n._)`Array.isArray(${C})`,()=>{q.assign(i.default.vErrors,(0,n._)`${i.default.vErrors} === null ? ${C} : ${i.default.vErrors}.concat(${C})`).assign(i.default.errors,(0,n._)`${i.default.vErrors}.length`),(0,l.extendErrors)(L)},()=>L.error())}function p({schemaEnv:L},C){if(C.async&&!L.$async)throw new Error("async keyword in sync schema")}function m(L,C,q){if(q===void 0)throw new Error(`keyword "${C}" failed to compile`);return L.scopeValue("keyword",typeof q=="function"?{ref:q}:{ref:q,code:(0,n.stringify)(q)})}function v(L,C,q=!1){return!C.length||C.some(j=>j==="array"?Array.isArray(L):j==="object"?L&&typeof L=="object"&&!Array.isArray(L):typeof L==j||q&&typeof L>"u")}on.validSchemaType=v;function S({schema:L,opts:C,self:q,errSchemaPath:j},y,A){if(Array.isArray(y.keyword)?!y.keyword.includes(A):y.keyword!==A)throw new Error("ajv implementation error");const g=y.dependencies;if(g!=null&&g.some(E=>!Object.prototype.hasOwnProperty.call(L,E)))throw new Error(`parent schema must have dependencies of ${A}: ${g.join(",")}`);if(y.validateSchema&&!y.validateSchema(L[A])){const _=`keyword "${A}" value is invalid at path "${j}": `+q.errorsText(y.validateSchema.errors);if(C.validateSchema==="log")q.logger.error(_);else throw new Error(_)}}return on.validateKeywordUsage=S,on}var Hn={},Hg;function b_(){if(Hg)return Hn;Hg=1,Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.extendSubschemaMode=Hn.extendSubschemaData=Hn.getSubschema=void 0;const n=Ce(),i=He();function u(o,{keyword:c,schemaProp:d,schema:p,schemaPath:m,errSchemaPath:v,topSchemaRef:S}){if(c!==void 0&&p!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(c!==void 0){const L=o.schema[c];return d===void 0?{schema:L,schemaPath:(0,n._)`${o.schemaPath}${(0,n.getProperty)(c)}`,errSchemaPath:`${o.errSchemaPath}/${c}`}:{schema:L[d],schemaPath:(0,n._)`${o.schemaPath}${(0,n.getProperty)(c)}${(0,n.getProperty)(d)}`,errSchemaPath:`${o.errSchemaPath}/${c}/${(0,i.escapeFragment)(d)}`}}if(p!==void 0){if(m===void 0||v===void 0||S===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:p,schemaPath:m,topSchemaRef:S,errSchemaPath:v}}throw new Error('either "keyword" or "schema" must be passed')}Hn.getSubschema=u;function l(o,c,{dataProp:d,dataPropType:p,data:m,dataTypes:v,propertyName:S}){if(m!==void 0&&d!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:L}=c;if(d!==void 0){const{errorPath:q,dataPathArr:j,opts:y}=c,A=L.let("data",(0,n._)`${c.data}${(0,n.getProperty)(d)}`,!0);C(A),o.errorPath=(0,n.str)`${q}${(0,i.getErrorPath)(d,p,y.jsPropertySyntax)}`,o.parentDataProperty=(0,n._)`${d}`,o.dataPathArr=[...j,o.parentDataProperty]}if(m!==void 0){const q=m instanceof n.Name?m:L.let("data",m,!0);C(q),S!==void 0&&(o.propertyName=S)}v&&(o.dataTypes=v);function C(q){o.data=q,o.dataLevel=c.dataLevel+1,o.dataTypes=[],c.definedProperties=new Set,o.parentData=c.data,o.dataNames=[...c.dataNames,q]}}Hn.extendSubschemaData=l;function s(o,{jtdDiscriminator:c,jtdMetadata:d,compositeRule:p,createErrors:m,allErrors:v}){p!==void 0&&(o.compositeRule=p),m!==void 0&&(o.createErrors=m),v!==void 0&&(o.allErrors=v),o.jtdDiscriminator=c,o.jtdMetadata=d}return Hn.extendSubschemaMode=s,Hn}var Tt={},Wf,Vg;function bv(){return Vg||(Vg=1,Wf=function n(i,u){if(i===u)return!0;if(i&&u&&typeof i=="object"&&typeof u=="object"){if(i.constructor!==u.constructor)return!1;var l,s,o;if(Array.isArray(i)){if(l=i.length,l!=u.length)return!1;for(s=l;s--!==0;)if(!n(i[s],u[s]))return!1;return!0}if(i.constructor===RegExp)return i.source===u.source&&i.flags===u.flags;if(i.valueOf!==Object.prototype.valueOf)return i.valueOf()===u.valueOf();if(i.toString!==Object.prototype.toString)return i.toString()===u.toString();if(o=Object.keys(i),l=o.length,l!==Object.keys(u).length)return!1;for(s=l;s--!==0;)if(!Object.prototype.hasOwnProperty.call(u,o[s]))return!1;for(s=l;s--!==0;){var c=o[s];if(!n(i[c],u[c]))return!1}return!0}return i!==i&&u!==u}),Wf}var ec={exports:{}},kg;function E_(){if(kg)return ec.exports;kg=1;var n=ec.exports=function(l,s,o){typeof s=="function"&&(o=s,s={}),o=s.cb||o;var c=typeof o=="function"?o:o.pre||function(){},d=o.post||function(){};i(s,c,d,l,"",l)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function i(l,s,o,c,d,p,m,v,S,L){if(c&&typeof c=="object"&&!Array.isArray(c)){s(c,d,p,m,v,S,L);for(var C in c){var q=c[C];if(Array.isArray(q)){if(C in n.arrayKeywords)for(var j=0;jy+=d(g)),y===1/0))return 1/0}return y}function p(j,y="",A){A!==!1&&(y=S(y));const g=j.parse(y);return m(j,g)}Tt.getFullPath=p;function m(j,y){return j.serialize(y).split("#")[0]+"#"}Tt._getFullPath=m;const v=/#\/?$/;function S(j){return j?j.replace(v,""):""}Tt.normalizeId=S;function L(j,y,A){return A=S(A),j.resolve(y,A)}Tt.resolveUrl=L;const C=/^[a-z_][-a-z0-9._]*$/i;function q(j,y){if(typeof j=="boolean")return{};const{schemaId:A,uriResolver:g}=this.opts,E=S(j[A]||y),_={"":E},T=p(g,E,!1),b={},R=new Set;return u(j,{allKeys:!0},(N,Y,X,J)=>{if(J===void 0)return;const ee=T+Y;let ne=_[J];typeof N[A]=="string"&&(ne=P.call(this,N[A])),se.call(this,N.$anchor),se.call(this,N.$dynamicAnchor),_[Y]=ne;function P(le){const de=this.opts.uriResolver.resolve;if(le=S(ne?de(ne,le):le),R.has(le))throw D(le);R.add(le);let U=this.refs[le];return typeof U=="string"&&(U=this.refs[U]),typeof U=="object"?$(N,U.schema,le):le!==S(ee)&&(le[0]==="#"?($(N,b[le],le),b[le]=N):this.refs[le]=ee),le}function se(le){if(typeof le=="string"){if(!C.test(le))throw new Error(`invalid anchor "${le}"`);P.call(this,`#${le}`)}}}),b;function $(N,Y,X){if(Y!==void 0&&!i(N,Y))throw D(X)}function D(N){return new Error(`reference "${N}" resolves to more than one schema`)}}return Tt.getSchemaRefs=q,Tt}var Yg;function Os(){if(Yg)return In;Yg=1,Object.defineProperty(In,"__esModule",{value:!0}),In.getData=In.KeywordCxt=In.validateFunctionCode=void 0;const n=g_(),i=cs(),u=vv(),l=cs(),s=y_(),o=v_(),c=b_(),d=Ce(),p=_r(),m=$s(),v=He(),S=As();function L(x){if(T(x)&&(R(x),_(x))){y(x);return}C(x,()=>(0,n.topBoolOrEmptySchema)(x))}In.validateFunctionCode=L;function C({gen:x,validateName:k,schema:K,schemaEnv:ae,opts:pe},ge){pe.code.es5?x.func(k,(0,d._)`${p.default.data}, ${p.default.valCxt}`,ae.$async,()=>{x.code((0,d._)`"use strict"; ${g(K,pe)}`),j(x,pe),x.code(ge)}):x.func(k,(0,d._)`${p.default.data}, ${q(pe)}`,ae.$async,()=>x.code(g(K,pe)).code(ge))}function q(x){return(0,d._)`{${p.default.instancePath}="", ${p.default.parentData}, ${p.default.parentDataProperty}, ${p.default.rootData}=${p.default.data}${x.dynamicRef?(0,d._)`, ${p.default.dynamicAnchors}={}`:d.nil}}={}`}function j(x,k){x.if(p.default.valCxt,()=>{x.var(p.default.instancePath,(0,d._)`${p.default.valCxt}.${p.default.instancePath}`),x.var(p.default.parentData,(0,d._)`${p.default.valCxt}.${p.default.parentData}`),x.var(p.default.parentDataProperty,(0,d._)`${p.default.valCxt}.${p.default.parentDataProperty}`),x.var(p.default.rootData,(0,d._)`${p.default.valCxt}.${p.default.rootData}`),k.dynamicRef&&x.var(p.default.dynamicAnchors,(0,d._)`${p.default.valCxt}.${p.default.dynamicAnchors}`)},()=>{x.var(p.default.instancePath,(0,d._)`""`),x.var(p.default.parentData,(0,d._)`undefined`),x.var(p.default.parentDataProperty,(0,d._)`undefined`),x.var(p.default.rootData,p.default.data),k.dynamicRef&&x.var(p.default.dynamicAnchors,(0,d._)`{}`)})}function y(x){const{schema:k,opts:K,gen:ae}=x;C(x,()=>{K.$comment&&k.$comment&&J(x),N(x),ae.let(p.default.vErrors,null),ae.let(p.default.errors,0),K.unevaluated&&A(x),$(x),ee(x)})}function A(x){const{gen:k,validateName:K}=x;x.evaluated=k.const("evaluated",(0,d._)`${K}.evaluated`),k.if((0,d._)`${x.evaluated}.dynamicProps`,()=>k.assign((0,d._)`${x.evaluated}.props`,(0,d._)`undefined`)),k.if((0,d._)`${x.evaluated}.dynamicItems`,()=>k.assign((0,d._)`${x.evaluated}.items`,(0,d._)`undefined`))}function g(x,k){const K=typeof x=="object"&&x[k.schemaId];return K&&(k.code.source||k.code.process)?(0,d._)`/*# sourceURL=${K} */`:d.nil}function E(x,k){if(T(x)&&(R(x),_(x))){b(x,k);return}(0,n.boolOrEmptySchema)(x,k)}function _({schema:x,self:k}){if(typeof x=="boolean")return!x;for(const K in x)if(k.RULES.all[K])return!0;return!1}function T(x){return typeof x.schema!="boolean"}function b(x,k){const{schema:K,gen:ae,opts:pe}=x;pe.$comment&&K.$comment&&J(x),Y(x),X(x);const ge=ae.const("_errs",p.default.errors);$(x,ge),ae.var(k,(0,d._)`${ge} === ${p.default.errors}`)}function R(x){(0,v.checkUnknownRules)(x),D(x)}function $(x,k){if(x.opts.jtd)return P(x,[],!1,k);const K=(0,i.getSchemaTypes)(x.schema),ae=(0,i.coerceAndCheckDataType)(x,K);P(x,K,!ae,k)}function D(x){const{schema:k,errSchemaPath:K,opts:ae,self:pe}=x;k.$ref&&ae.ignoreKeywordsWithRef&&(0,v.schemaHasRulesButRef)(k,pe.RULES)&&pe.logger.warn(`$ref: keywords ignored in schema at path "${K}"`)}function N(x){const{schema:k,opts:K}=x;k.default!==void 0&&K.useDefaults&&K.strictSchema&&(0,v.checkStrictMode)(x,"default is ignored in the schema root")}function Y(x){const k=x.schema[x.opts.schemaId];k&&(x.baseId=(0,m.resolveUrl)(x.opts.uriResolver,x.baseId,k))}function X(x){if(x.schema.$async&&!x.schemaEnv.$async)throw new Error("async schema in sync schema")}function J({gen:x,schemaEnv:k,schema:K,errSchemaPath:ae,opts:pe}){const ge=K.$comment;if(pe.$comment===!0)x.code((0,d._)`${p.default.self}.logger.log(${ge})`);else if(typeof pe.$comment=="function"){const Te=(0,d.str)`${ae}/$comment`,Ge=x.scopeValue("root",{ref:k.root});x.code((0,d._)`${p.default.self}.opts.$comment(${ge}, ${Te}, ${Ge}.schema)`)}}function ee(x){const{gen:k,schemaEnv:K,validateName:ae,ValidationError:pe,opts:ge}=x;K.$async?k.if((0,d._)`${p.default.errors} === 0`,()=>k.return(p.default.data),()=>k.throw((0,d._)`new ${pe}(${p.default.vErrors})`)):(k.assign((0,d._)`${ae}.errors`,p.default.vErrors),ge.unevaluated&&ne(x),k.return((0,d._)`${p.default.errors} === 0`))}function ne({gen:x,evaluated:k,props:K,items:ae}){K instanceof d.Name&&x.assign((0,d._)`${k}.props`,K),ae instanceof d.Name&&x.assign((0,d._)`${k}.items`,ae)}function P(x,k,K,ae){const{gen:pe,schema:ge,data:Te,allErrors:Ge,opts:Ue,self:ze}=x,{RULES:Re}=ze;if(ge.$ref&&(Ue.ignoreKeywordsWithRef||!(0,v.schemaHasRulesButRef)(ge,Re))){pe.block(()=>me(x,"$ref",Re.all.$ref.definition));return}Ue.jtd||le(x,k),pe.block(()=>{for(const nt of Re.rules)Ve(nt);Ve(Re.post)});function Ve(nt){(0,u.shouldUseGroup)(ge,nt)&&(nt.type?(pe.if((0,l.checkDataType)(nt.type,Te,Ue.strictNumbers)),se(x,nt),k.length===1&&k[0]===nt.type&&K&&(pe.else(),(0,l.reportTypeError)(x)),pe.endIf()):se(x,nt),Ge||pe.if((0,d._)`${p.default.errors} === ${ae||0}`))}}function se(x,k){const{gen:K,schema:ae,opts:{useDefaults:pe}}=x;pe&&(0,s.assignDefaults)(x,k.type),K.block(()=>{for(const ge of k.rules)(0,u.shouldUseRule)(ae,ge)&&me(x,ge.keyword,ge.definition,k.type)})}function le(x,k){x.schemaEnv.meta||!x.opts.strictTypes||(de(x,k),x.opts.allowUnionTypes||U(x,k),z(x,x.dataTypes))}function de(x,k){if(k.length){if(!x.dataTypes.length){x.dataTypes=k;return}k.forEach(K=>{H(x.dataTypes,K)||V(x,`type "${K}" not allowed by context "${x.dataTypes.join(",")}"`)}),O(x,k)}}function U(x,k){k.length>1&&!(k.length===2&&k.includes("null"))&&V(x,"use allowUnionTypes to allow union type keyword")}function z(x,k){const K=x.self.RULES.all;for(const ae in K){const pe=K[ae];if(typeof pe=="object"&&(0,u.shouldUseRule)(x.schema,pe)){const{type:ge}=pe.definition;ge.length&&!ge.some(Te=>F(k,Te))&&V(x,`missing type "${ge.join(",")}" for keyword "${ae}"`)}}}function F(x,k){return x.includes(k)||k==="number"&&x.includes("integer")}function H(x,k){return x.includes(k)||k==="integer"&&x.includes("number")}function O(x,k){const K=[];for(const ae of x.dataTypes)H(k,ae)?K.push(ae):k.includes("integer")&&ae==="number"&&K.push("integer");x.dataTypes=K}function V(x,k){const K=x.schemaEnv.baseId+x.errSchemaPath;k+=` at "${K}" (strictTypes)`,(0,v.checkStrictMode)(x,k,x.opts.strictTypes)}class W{constructor(k,K,ae){if((0,o.validateKeywordUsage)(k,K,ae),this.gen=k.gen,this.allErrors=k.allErrors,this.keyword=ae,this.data=k.data,this.schema=k.schema[ae],this.$data=K.$data&&k.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,v.schemaRefOrVal)(k,this.schema,ae,this.$data),this.schemaType=K.schemaType,this.parentSchema=k.schema,this.params={},this.it=k,this.def=K,this.$data)this.schemaCode=k.gen.const("vSchema",B(this.$data,k));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,K.schemaType,K.allowUndefined))throw new Error(`${ae} value must be ${JSON.stringify(K.schemaType)}`);("code"in K?K.trackErrors:K.errors!==!1)&&(this.errsCount=k.gen.const("_errs",p.default.errors))}result(k,K,ae){this.failResult((0,d.not)(k),K,ae)}failResult(k,K,ae){this.gen.if(k),ae?ae():this.error(),K?(this.gen.else(),K(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(k,K){this.failResult((0,d.not)(k),void 0,K)}fail(k){if(k===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(k),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(k){if(!this.$data)return this.fail(k);const{schemaCode:K}=this;this.fail((0,d._)`${K} !== undefined && (${(0,d.or)(this.invalid$data(),k)})`)}error(k,K,ae){if(K){this.setParams(K),this._error(k,ae),this.setParams({});return}this._error(k,ae)}_error(k,K){(k?S.reportExtraError:S.reportError)(this,this.def.error,K)}$dataError(){(0,S.reportError)(this,this.def.$dataError||S.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,S.resetErrorsCount)(this.gen,this.errsCount)}ok(k){this.allErrors||this.gen.if(k)}setParams(k,K){K?Object.assign(this.params,k):this.params=k}block$data(k,K,ae=d.nil){this.gen.block(()=>{this.check$data(k,ae),K()})}check$data(k=d.nil,K=d.nil){if(!this.$data)return;const{gen:ae,schemaCode:pe,schemaType:ge,def:Te}=this;ae.if((0,d.or)((0,d._)`${pe} === undefined`,K)),k!==d.nil&&ae.assign(k,!0),(ge.length||Te.validateSchema)&&(ae.elseIf(this.invalid$data()),this.$dataError(),k!==d.nil&&ae.assign(k,!1)),ae.else()}invalid$data(){const{gen:k,schemaCode:K,schemaType:ae,def:pe,it:ge}=this;return(0,d.or)(Te(),Ge());function Te(){if(ae.length){if(!(K instanceof d.Name))throw new Error("ajv implementation error");const Ue=Array.isArray(ae)?ae:[ae];return(0,d._)`${(0,l.checkDataTypes)(Ue,K,ge.opts.strictNumbers,l.DataType.Wrong)}`}return d.nil}function Ge(){if(pe.validateSchema){const Ue=k.scopeValue("validate$data",{ref:pe.validateSchema});return(0,d._)`!${Ue}(${K})`}return d.nil}}subschema(k,K){const ae=(0,c.getSubschema)(this.it,k);(0,c.extendSubschemaData)(ae,this.it,k),(0,c.extendSubschemaMode)(ae,k);const pe={...this.it,...ae,items:void 0,props:void 0};return E(pe,K),pe}mergeEvaluated(k,K){const{it:ae,gen:pe}=this;ae.opts.unevaluated&&(ae.props!==!0&&k.props!==void 0&&(ae.props=v.mergeEvaluated.props(pe,k.props,ae.props,K)),ae.items!==!0&&k.items!==void 0&&(ae.items=v.mergeEvaluated.items(pe,k.items,ae.items,K)))}mergeValidEvaluated(k,K){const{it:ae,gen:pe}=this;if(ae.opts.unevaluated&&(ae.props!==!0||ae.items!==!0))return pe.if(K,()=>this.mergeEvaluated(k,d.Name)),!0}}In.KeywordCxt=W;function me(x,k,K,ae){const pe=new W(x,K,k);"code"in K?K.code(pe,ae):pe.$data&&K.validate?(0,o.funcKeywordCode)(pe,K):"macro"in K?(0,o.macroKeywordCode)(pe,K):(K.compile||K.validate)&&(0,o.funcKeywordCode)(pe,K)}const re=/^\/(?:[^~]|~0|~1)*$/,M=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function B(x,{dataLevel:k,dataNames:K,dataPathArr:ae}){let pe,ge;if(x==="")return p.default.rootData;if(x[0]==="/"){if(!re.test(x))throw new Error(`Invalid JSON-pointer: ${x}`);pe=x,ge=p.default.rootData}else{const ze=M.exec(x);if(!ze)throw new Error(`Invalid JSON-pointer: ${x}`);const Re=+ze[1];if(pe=ze[2],pe==="#"){if(Re>=k)throw new Error(Ue("property/index",Re));return ae[k-Re]}if(Re>k)throw new Error(Ue("data",Re));if(ge=K[k-Re],!pe)return ge}let Te=ge;const Ge=pe.split("/");for(const ze of Ge)ze&&(ge=(0,d._)`${ge}${(0,d.getProperty)((0,v.unescapeJsonPointer)(ze))}`,Te=(0,d._)`${Te} && ${ge}`);return Te;function Ue(ze,Re){return`Cannot access ${ze} ${Re} levels up, current level is ${k}`}}return In.getData=B,In}var Eu={},Pg;function gd(){if(Pg)return Eu;Pg=1,Object.defineProperty(Eu,"__esModule",{value:!0});class n extends Error{constructor(u){super("validation failed"),this.errors=u,this.ajv=this.validation=!0}}return Eu.default=n,Eu}var _u={},Kg;function Ts(){if(Kg)return _u;Kg=1,Object.defineProperty(_u,"__esModule",{value:!0});const n=$s();class i extends Error{constructor(l,s,o,c){super(c||`can't resolve reference ${o} from id ${s}`),this.missingRef=(0,n.resolveUrl)(l,s,o),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(l,this.missingRef))}}return _u.default=i,_u}var kt={},Fg;function yd(){if(Fg)return kt;Fg=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.resolveSchema=kt.getCompilingSchema=kt.resolveRef=kt.compileSchema=kt.SchemaEnv=void 0;const n=Ce(),i=gd(),u=_r(),l=$s(),s=He(),o=Os();class c{constructor(A){var g;this.refs={},this.dynamicAnchors={};let E;typeof A.schema=="object"&&(E=A.schema),this.schema=A.schema,this.schemaId=A.schemaId,this.root=A.root||this,this.baseId=(g=A.baseId)!==null&&g!==void 0?g:(0,l.normalizeId)(E==null?void 0:E[A.schemaId||"$id"]),this.schemaPath=A.schemaPath,this.localRefs=A.localRefs,this.meta=A.meta,this.$async=E==null?void 0:E.$async,this.refs={}}}kt.SchemaEnv=c;function d(y){const A=v.call(this,y);if(A)return A;const g=(0,l.getFullPath)(this.opts.uriResolver,y.root.baseId),{es5:E,lines:_}=this.opts.code,{ownProperties:T}=this.opts,b=new n.CodeGen(this.scope,{es5:E,lines:_,ownProperties:T});let R;y.$async&&(R=b.scopeValue("Error",{ref:i.default,code:(0,n._)`require("ajv/dist/runtime/validation_error").default`}));const $=b.scopeName("validate");y.validateName=$;const D={gen:b,allErrors:this.opts.allErrors,data:u.default.data,parentData:u.default.parentData,parentDataProperty:u.default.parentDataProperty,dataNames:[u.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:b.scopeValue("schema",this.opts.code.source===!0?{ref:y.schema,code:(0,n.stringify)(y.schema)}:{ref:y.schema}),validateName:$,ValidationError:R,schema:y.schema,schemaEnv:y,rootId:g,baseId:y.baseId||g,schemaPath:n.nil,errSchemaPath:y.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,n._)`""`,opts:this.opts,self:this};let N;try{this._compilations.add(y),(0,o.validateFunctionCode)(D),b.optimize(this.opts.code.optimize);const Y=b.toString();N=`${b.scopeRefs(u.default.scope)}return ${Y}`,this.opts.code.process&&(N=this.opts.code.process(N,y));const J=new Function(`${u.default.self}`,`${u.default.scope}`,N)(this,this.scope.get());if(this.scope.value($,{ref:J}),J.errors=null,J.schema=y.schema,J.schemaEnv=y,y.$async&&(J.$async=!0),this.opts.code.source===!0&&(J.source={validateName:$,validateCode:Y,scopeValues:b._values}),this.opts.unevaluated){const{props:ee,items:ne}=D;J.evaluated={props:ee instanceof n.Name?void 0:ee,items:ne instanceof n.Name?void 0:ne,dynamicProps:ee instanceof n.Name,dynamicItems:ne instanceof n.Name},J.source&&(J.source.evaluated=(0,n.stringify)(J.evaluated))}return y.validate=J,y}catch(Y){throw delete y.validate,delete y.validateName,N&&this.logger.error("Error compiling schema, function code:",N),Y}finally{this._compilations.delete(y)}}kt.compileSchema=d;function p(y,A,g){var E;g=(0,l.resolveUrl)(this.opts.uriResolver,A,g);const _=y.refs[g];if(_)return _;let T=L.call(this,y,g);if(T===void 0){const b=(E=y.localRefs)===null||E===void 0?void 0:E[g],{schemaId:R}=this.opts;b&&(T=new c({schema:b,schemaId:R,root:y,baseId:A}))}if(T!==void 0)return y.refs[g]=m.call(this,T)}kt.resolveRef=p;function m(y){return(0,l.inlineRef)(y.schema,this.opts.inlineRefs)?y.schema:y.validate?y:d.call(this,y)}function v(y){for(const A of this._compilations)if(S(A,y))return A}kt.getCompilingSchema=v;function S(y,A){return y.schema===A.schema&&y.root===A.root&&y.baseId===A.baseId}function L(y,A){let g;for(;typeof(g=this.refs[A])=="string";)A=g;return g||this.schemas[A]||C.call(this,y,A)}function C(y,A){const g=this.opts.uriResolver.parse(A),E=(0,l._getFullPath)(this.opts.uriResolver,g);let _=(0,l.getFullPath)(this.opts.uriResolver,y.baseId,void 0);if(Object.keys(y.schema).length>0&&E===_)return j.call(this,g,y);const T=(0,l.normalizeId)(E),b=this.refs[T]||this.schemas[T];if(typeof b=="string"){const R=C.call(this,y,b);return typeof(R==null?void 0:R.schema)!="object"?void 0:j.call(this,g,R)}if(typeof(b==null?void 0:b.schema)=="object"){if(b.validate||d.call(this,b),T===(0,l.normalizeId)(A)){const{schema:R}=b,{schemaId:$}=this.opts,D=R[$];return D&&(_=(0,l.resolveUrl)(this.opts.uriResolver,_,D)),new c({schema:R,schemaId:$,root:y,baseId:_})}return j.call(this,g,b)}}kt.resolveSchema=C;const q=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function j(y,{baseId:A,schema:g,root:E}){var _;if(((_=y.fragment)===null||_===void 0?void 0:_[0])!=="/")return;for(const R of y.fragment.slice(1).split("/")){if(typeof g=="boolean")return;const $=g[(0,s.unescapeFragment)(R)];if($===void 0)return;g=$;const D=typeof g=="object"&&g[this.opts.schemaId];!q.has(R)&&D&&(A=(0,l.resolveUrl)(this.opts.uriResolver,A,D))}let T;if(typeof g!="boolean"&&g.$ref&&!(0,s.schemaHasRulesButRef)(g,this.RULES)){const R=(0,l.resolveUrl)(this.opts.uriResolver,A,g.$ref);T=C.call(this,E,R)}const{schemaId:b}=this.opts;if(T=T||new c({schema:g,schemaId:b,root:E,baseId:A}),T.schema!==T.root.schema)return T}return kt}const __="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",S_="Meta-schema for $data reference (JSON AnySchema extension proposal)",w_="object",A_=["$data"],$_={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},O_=!1,T_={$id:__,description:S_,type:w_,required:A_,properties:$_,additionalProperties:O_};var Su={},Ga={exports:{}},tc,Xg;function R_(){return Xg||(Xg=1,tc={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}),tc}var nc,Qg;function N_(){if(Qg)return nc;Qg=1;const{HEX:n}=R_(),i=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function u(j){if(d(j,".")<3)return{host:j,isIPV4:!1};const y=j.match(i)||[],[A]=y;return A?{host:c(A,"."),isIPV4:!0}:{host:j,isIPV4:!1}}function l(j,y=!1){let A="",g=!0;for(const E of j){if(n[E]===void 0)return;E!=="0"&&g===!0&&(g=!1),g||(A+=E)}return y&&A.length===0&&(A="0"),A}function s(j){let y=0;const A={error:!1,address:"",zone:""},g=[],E=[];let _=!1,T=!1,b=!1;function R(){if(E.length){if(_===!1){const $=l(E);if($!==void 0)g.push($);else return A.error=!0,!1}E.length=0}return!0}for(let $=0;$7){A.error=!0;break}$-1>=0&&j[$-1]===":"&&(T=!0);continue}else if(D==="%"){if(!R())break;_=!0}else{E.push(D);continue}}return E.length&&(_?A.zone=E.join(""):b?g.push(E.join("")):g.push(l(E))),A.address=g.join(""),A}function o(j){if(d(j,":")<2)return{host:j,isIPV6:!1};const y=s(j);if(y.error)return{host:j,isIPV6:!1};{let A=y.address,g=y.address;return y.zone&&(A+="%"+y.zone,g+="%25"+y.zone),{host:A,escapedHost:g,isIPV6:!0}}}function c(j,y){let A="",g=!0;const E=j.length;for(let _=0;_/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(A)));function L(y){let A=0;for(let g=0,E=y.length;g126||S[A])return!0;return!1}const C=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function q(y,A){const g=Object.assign({},A),E={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},_=y.indexOf("%")!==-1;let T=!1;g.reference==="suffix"&&(y=(g.scheme?g.scheme+":":"")+"//"+y);const b=y.match(C);if(b){if(E.scheme=b[1],E.userinfo=b[3],E.host=b[4],E.port=parseInt(b[5],10),E.path=b[6]||"",E.query=b[7],E.fragment=b[8],isNaN(E.port)&&(E.port=b[5]),E.host){const $=i(E.host);if($.isIPV4===!1){const D=n($.host);E.host=D.host.toLowerCase(),T=D.isIPV6}else E.host=$.host,T=!0}E.scheme===void 0&&E.userinfo===void 0&&E.host===void 0&&E.port===void 0&&!E.path&&E.query===void 0?E.reference="same-document":E.scheme===void 0?E.reference="relative":E.fragment===void 0?E.reference="absolute":E.reference="uri",g.reference&&g.reference!=="suffix"&&g.reference!==E.reference&&(E.error=E.error||"URI is not a "+g.reference+" reference.");const R=o[(g.scheme||E.scheme||"").toLowerCase()];if(!g.unicodeSupport&&(!R||!R.unicodeSupport)&&E.host&&(g.domainHost||R&&R.domainHost)&&T===!1&&L(E.host))try{E.host=URL.domainToASCII(E.host.toLowerCase())}catch($){E.error=E.error||"Host's domain name can not be converted to ASCII: "+$}(!R||R&&!R.skipNormalize)&&(_&&E.scheme!==void 0&&(E.scheme=unescape(E.scheme)),_&&E.host!==void 0&&(E.host=unescape(E.host)),E.path&&E.path.length&&(E.path=escape(unescape(E.path))),E.fragment&&E.fragment.length&&(E.fragment=encodeURI(decodeURIComponent(E.fragment)))),R&&R.parse&&R.parse(E,g)}else E.error=E.error||"URI can not be parsed.";return E}const j={SCHEMES:o,normalize:c,resolve:d,resolveComponents:p,equal:m,serialize:v,parse:q};return Ga.exports=j,Ga.exports.default=j,Ga.exports.fastUri=j,Ga.exports}var Wg;function M_(){if(Wg)return Su;Wg=1,Object.defineProperty(Su,"__esModule",{value:!0});const n=D_();return n.code='require("ajv/dist/runtime/uri").default',Su.default=n,Su}var ey;function C_(){return ey||(ey=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.CodeGen=n.Name=n.nil=n.stringify=n.str=n._=n.KeywordCxt=void 0;var i=Os();Object.defineProperty(n,"KeywordCxt",{enumerable:!0,get:function(){return i.KeywordCxt}});var u=Ce();Object.defineProperty(n,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(n,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});const l=gd(),s=Ts(),o=yv(),c=yd(),d=Ce(),p=$s(),m=cs(),v=He(),S=T_,L=M_(),C=(U,z)=>new RegExp(U,z);C.code="new RegExp";const q=["removeAdditional","useDefaults","coerceTypes"],j=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},A={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},g=200;function E(U){var z,F,H,O,V,W,me,re,M,B,x,k,K,ae,pe,ge,Te,Ge,Ue,ze,Re,Ve,nt,mt,Gi;const Yn=U.strict,Zr=(z=U.code)===null||z===void 0?void 0:z.optimize,Sr=Zr===!0||Zr===void 0?1:Zr||0,ll=(H=(F=U.code)===null||F===void 0?void 0:F.regExp)!==null&&H!==void 0?H:C,ul=(O=U.uriResolver)!==null&&O!==void 0?O:L.default;return{strictSchema:(W=(V=U.strictSchema)!==null&&V!==void 0?V:Yn)!==null&&W!==void 0?W:!0,strictNumbers:(re=(me=U.strictNumbers)!==null&&me!==void 0?me:Yn)!==null&&re!==void 0?re:!0,strictTypes:(B=(M=U.strictTypes)!==null&&M!==void 0?M:Yn)!==null&&B!==void 0?B:"log",strictTuples:(k=(x=U.strictTuples)!==null&&x!==void 0?x:Yn)!==null&&k!==void 0?k:"log",strictRequired:(ae=(K=U.strictRequired)!==null&&K!==void 0?K:Yn)!==null&&ae!==void 0?ae:!1,code:U.code?{...U.code,optimize:Sr,regExp:ll}:{optimize:Sr,regExp:ll},loopRequired:(pe=U.loopRequired)!==null&&pe!==void 0?pe:g,loopEnum:(ge=U.loopEnum)!==null&&ge!==void 0?ge:g,meta:(Te=U.meta)!==null&&Te!==void 0?Te:!0,messages:(Ge=U.messages)!==null&&Ge!==void 0?Ge:!0,inlineRefs:(Ue=U.inlineRefs)!==null&&Ue!==void 0?Ue:!0,schemaId:(ze=U.schemaId)!==null&&ze!==void 0?ze:"$id",addUsedSchema:(Re=U.addUsedSchema)!==null&&Re!==void 0?Re:!0,validateSchema:(Ve=U.validateSchema)!==null&&Ve!==void 0?Ve:!0,validateFormats:(nt=U.validateFormats)!==null&&nt!==void 0?nt:!0,unicodeRegExp:(mt=U.unicodeRegExp)!==null&&mt!==void 0?mt:!0,int32range:(Gi=U.int32range)!==null&&Gi!==void 0?Gi:!0,uriResolver:ul}}class _{constructor(z={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,z=this.opts={...z,...E(z)};const{es5:F,lines:H}=this.opts.code;this.scope=new d.ValueScope({scope:{},prefixes:j,es5:F,lines:H}),this.logger=X(z.logger);const O=z.validateFormats;z.validateFormats=!1,this.RULES=(0,o.getRules)(),T.call(this,y,z,"NOT SUPPORTED"),T.call(this,A,z,"DEPRECATED","warn"),this._metaOpts=N.call(this),z.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),z.keywords&&D.call(this,z.keywords),typeof z.meta=="object"&&this.addMetaSchema(z.meta),R.call(this),z.validateFormats=O}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:z,meta:F,schemaId:H}=this.opts;let O=S;H==="id"&&(O={...S},O.id=O.$id,delete O.$id),F&&z&&this.addMetaSchema(O,O[H],!1)}defaultMeta(){const{meta:z,schemaId:F}=this.opts;return this.opts.defaultMeta=typeof z=="object"?z[F]||z:void 0}validate(z,F){let H;if(typeof z=="string"){if(H=this.getSchema(z),!H)throw new Error(`no schema with key or ref "${z}"`)}else H=this.compile(z);const O=H(F);return"$async"in H||(this.errors=H.errors),O}compile(z,F){const H=this._addSchema(z,F);return H.validate||this._compileSchemaEnv(H)}compileAsync(z,F){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:H}=this.opts;return O.call(this,z,F);async function O(B,x){await V.call(this,B.$schema);const k=this._addSchema(B,x);return k.validate||W.call(this,k)}async function V(B){B&&!this.getSchema(B)&&await O.call(this,{$ref:B},!0)}async function W(B){try{return this._compileSchemaEnv(B)}catch(x){if(!(x instanceof s.default))throw x;return me.call(this,x),await re.call(this,x.missingSchema),W.call(this,B)}}function me({missingSchema:B,missingRef:x}){if(this.refs[B])throw new Error(`AnySchema ${B} is loaded but ${x} cannot be resolved`)}async function re(B){const x=await M.call(this,B);this.refs[B]||await V.call(this,x.$schema),this.refs[B]||this.addSchema(x,B,F)}async function M(B){const x=this._loading[B];if(x)return x;try{return await(this._loading[B]=H(B))}finally{delete this._loading[B]}}}addSchema(z,F,H,O=this.opts.validateSchema){if(Array.isArray(z)){for(const W of z)this.addSchema(W,void 0,H,O);return this}let V;if(typeof z=="object"){const{schemaId:W}=this.opts;if(V=z[W],V!==void 0&&typeof V!="string")throw new Error(`schema ${W} must be string`)}return F=(0,p.normalizeId)(F||V),this._checkUnique(F),this.schemas[F]=this._addSchema(z,H,F,O,!0),this}addMetaSchema(z,F,H=this.opts.validateSchema){return this.addSchema(z,F,!0,H),this}validateSchema(z,F){if(typeof z=="boolean")return!0;let H;if(H=z.$schema,H!==void 0&&typeof H!="string")throw new Error("$schema must be a string");if(H=H||this.opts.defaultMeta||this.defaultMeta(),!H)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const O=this.validate(H,z);if(!O&&F){const V="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(V);else throw new Error(V)}return O}getSchema(z){let F;for(;typeof(F=b.call(this,z))=="string";)z=F;if(F===void 0){const{schemaId:H}=this.opts,O=new c.SchemaEnv({schema:{},schemaId:H});if(F=c.resolveSchema.call(this,O,z),!F)return;this.refs[z]=F}return F.validate||this._compileSchemaEnv(F)}removeSchema(z){if(z instanceof RegExp)return this._removeAllSchemas(this.schemas,z),this._removeAllSchemas(this.refs,z),this;switch(typeof z){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const F=b.call(this,z);return typeof F=="object"&&this._cache.delete(F.schema),delete this.schemas[z],delete this.refs[z],this}case"object":{const F=z;this._cache.delete(F);let H=z[this.opts.schemaId];return H&&(H=(0,p.normalizeId)(H),delete this.schemas[H],delete this.refs[H]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(z){for(const F of z)this.addKeyword(F);return this}addKeyword(z,F){let H;if(typeof z=="string")H=z,typeof F=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),F.keyword=H);else if(typeof z=="object"&&F===void 0){if(F=z,H=F.keyword,Array.isArray(H)&&!H.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(ee.call(this,H,F),!F)return(0,v.eachItem)(H,V=>ne.call(this,V)),this;se.call(this,F);const O={...F,type:(0,m.getJSONTypes)(F.type),schemaType:(0,m.getJSONTypes)(F.schemaType)};return(0,v.eachItem)(H,O.type.length===0?V=>ne.call(this,V,O):V=>O.type.forEach(W=>ne.call(this,V,O,W))),this}getKeyword(z){const F=this.RULES.all[z];return typeof F=="object"?F.definition:!!F}removeKeyword(z){const{RULES:F}=this;delete F.keywords[z],delete F.all[z];for(const H of F.rules){const O=H.rules.findIndex(V=>V.keyword===z);O>=0&&H.rules.splice(O,1)}return this}addFormat(z,F){return typeof F=="string"&&(F=new RegExp(F)),this.formats[z]=F,this}errorsText(z=this.errors,{separator:F=", ",dataVar:H="data"}={}){return!z||z.length===0?"No errors":z.map(O=>`${H}${O.instancePath} ${O.message}`).reduce((O,V)=>O+F+V)}$dataMetaSchema(z,F){const H=this.RULES.all;z=JSON.parse(JSON.stringify(z));for(const O of F){const V=O.split("/").slice(1);let W=z;for(const me of V)W=W[me];for(const me in H){const re=H[me];if(typeof re!="object")continue;const{$data:M}=re.definition,B=W[me];M&&B&&(W[me]=de(B))}}return z}_removeAllSchemas(z,F){for(const H in z){const O=z[H];(!F||F.test(H))&&(typeof O=="string"?delete z[H]:O&&!O.meta&&(this._cache.delete(O.schema),delete z[H]))}}_addSchema(z,F,H,O=this.opts.validateSchema,V=this.opts.addUsedSchema){let W;const{schemaId:me}=this.opts;if(typeof z=="object")W=z[me];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof z!="boolean")throw new Error("schema must be object or boolean")}let re=this._cache.get(z);if(re!==void 0)return re;H=(0,p.normalizeId)(W||H);const M=p.getSchemaRefs.call(this,z,H);return re=new c.SchemaEnv({schema:z,schemaId:me,meta:F,baseId:H,localRefs:M}),this._cache.set(re.schema,re),V&&!H.startsWith("#")&&(H&&this._checkUnique(H),this.refs[H]=re),O&&this.validateSchema(z,!0),re}_checkUnique(z){if(this.schemas[z]||this.refs[z])throw new Error(`schema with key or id "${z}" already exists`)}_compileSchemaEnv(z){if(z.meta?this._compileMetaSchema(z):c.compileSchema.call(this,z),!z.validate)throw new Error("ajv implementation error");return z.validate}_compileMetaSchema(z){const F=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,z)}finally{this.opts=F}}}_.ValidationError=l.default,_.MissingRefError=s.default,n.default=_;function T(U,z,F,H="error"){for(const O in U){const V=O;V in z&&this.logger[H](`${F}: option ${O}. ${U[V]}`)}}function b(U){return U=(0,p.normalizeId)(U),this.schemas[U]||this.refs[U]}function R(){const U=this.opts.schemas;if(U)if(Array.isArray(U))this.addSchema(U);else for(const z in U)this.addSchema(U[z],z)}function $(){for(const U in this.opts.formats){const z=this.opts.formats[U];z&&this.addFormat(U,z)}}function D(U){if(Array.isArray(U)){this.addVocabulary(U);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const z in U){const F=U[z];F.keyword||(F.keyword=z),this.addKeyword(F)}}function N(){const U={...this.opts};for(const z of q)delete U[z];return U}const Y={log(){},warn(){},error(){}};function X(U){if(U===!1)return Y;if(U===void 0)return console;if(U.log&&U.warn&&U.error)return U;throw new Error("logger must implement log, warn and error methods")}const J=/^[a-z_$][a-z0-9_$:-]*$/i;function ee(U,z){const{RULES:F}=this;if((0,v.eachItem)(U,H=>{if(F.keywords[H])throw new Error(`Keyword ${H} is already defined`);if(!J.test(H))throw new Error(`Keyword ${H} has invalid name`)}),!!z&&z.$data&&!("code"in z||"validate"in z))throw new Error('$data keyword must have "code" or "validate" function')}function ne(U,z,F){var H;const O=z==null?void 0:z.post;if(F&&O)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:V}=this;let W=O?V.post:V.rules.find(({type:re})=>re===F);if(W||(W={type:F,rules:[]},V.rules.push(W)),V.keywords[U]=!0,!z)return;const me={keyword:U,definition:{...z,type:(0,m.getJSONTypes)(z.type),schemaType:(0,m.getJSONTypes)(z.schemaType)}};z.before?P.call(this,W,me,z.before):W.rules.push(me),V.all[U]=me,(H=z.implements)===null||H===void 0||H.forEach(re=>this.addKeyword(re))}function P(U,z,F){const H=U.rules.findIndex(O=>O.keyword===F);H>=0?U.rules.splice(H,0,z):(U.rules.push(z),this.logger.warn(`rule ${F} is not defined`))}function se(U){let{metaSchema:z}=U;z!==void 0&&(U.$data&&this.opts.$data&&(z=de(z)),U.validateSchema=this.compile(z,!0))}const le={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function de(U){return{anyOf:[U,le]}}}(Ff)),Ff}var wu={},Au={},$u={},ty;function x_(){if(ty)return $u;ty=1,Object.defineProperty($u,"__esModule",{value:!0});const n={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return $u.default=n,$u}var mr={},ny;function L_(){if(ny)return mr;ny=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.callRef=mr.getValidate=void 0;const n=Ts(),i=dn(),u=Ce(),l=_r(),s=yd(),o=He(),c={keyword:"$ref",schemaType:"string",code(m){const{gen:v,schema:S,it:L}=m,{baseId:C,schemaEnv:q,validateName:j,opts:y,self:A}=L,{root:g}=q;if((S==="#"||S==="#/")&&C===g.baseId)return _();const E=s.resolveRef.call(A,g,C,S);if(E===void 0)throw new n.default(L.opts.uriResolver,C,S);if(E instanceof s.SchemaEnv)return T(E);return b(E);function _(){if(q===g)return p(m,j,q,q.$async);const R=v.scopeValue("root",{ref:g});return p(m,(0,u._)`${R}.validate`,g,g.$async)}function T(R){const $=d(m,R);p(m,$,R,R.$async)}function b(R){const $=v.scopeValue("schema",y.code.source===!0?{ref:R,code:(0,u.stringify)(R)}:{ref:R}),D=v.name("valid"),N=m.subschema({schema:R,dataTypes:[],schemaPath:u.nil,topSchemaRef:$,errSchemaPath:S},D);m.mergeEvaluated(N),m.ok(D)}}};function d(m,v){const{gen:S}=m;return v.validate?S.scopeValue("validate",{ref:v.validate}):(0,u._)`${S.scopeValue("wrapper",{ref:v})}.validate`}mr.getValidate=d;function p(m,v,S,L){const{gen:C,it:q}=m,{allErrors:j,schemaEnv:y,opts:A}=q,g=A.passContext?l.default.this:u.nil;L?E():_();function E(){if(!y.$async)throw new Error("async schema referenced by sync schema");const R=C.let("valid");C.try(()=>{C.code((0,u._)`await ${(0,i.callValidateCode)(m,v,g)}`),b(v),j||C.assign(R,!0)},$=>{C.if((0,u._)`!(${$} instanceof ${q.ValidationError})`,()=>C.throw($)),T($),j||C.assign(R,!1)}),m.ok(R)}function _(){m.result((0,i.callValidateCode)(m,v,g),()=>b(v),()=>T(v))}function T(R){const $=(0,u._)`${R}.errors`;C.assign(l.default.vErrors,(0,u._)`${l.default.vErrors} === null ? ${$} : ${l.default.vErrors}.concat(${$})`),C.assign(l.default.errors,(0,u._)`${l.default.vErrors}.length`)}function b(R){var $;if(!q.opts.unevaluated)return;const D=($=S==null?void 0:S.validate)===null||$===void 0?void 0:$.evaluated;if(q.props!==!0)if(D&&!D.dynamicProps)D.props!==void 0&&(q.props=o.mergeEvaluated.props(C,D.props,q.props));else{const N=C.var("props",(0,u._)`${R}.evaluated.props`);q.props=o.mergeEvaluated.props(C,N,q.props,u.Name)}if(q.items!==!0)if(D&&!D.dynamicItems)D.items!==void 0&&(q.items=o.mergeEvaluated.items(C,D.items,q.items));else{const N=C.var("items",(0,u._)`${R}.evaluated.items`);q.items=o.mergeEvaluated.items(C,N,q.items,u.Name)}}}return mr.callRef=p,mr.default=c,mr}var ry;function q_(){if(ry)return Au;ry=1,Object.defineProperty(Au,"__esModule",{value:!0});const n=x_(),i=L_(),u=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,i.default];return Au.default=u,Au}var Ou={},Tu={},iy;function U_(){if(iy)return Tu;iy=1,Object.defineProperty(Tu,"__esModule",{value:!0});const n=Ce(),i=n.operators,u={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},l={message:({keyword:o,schemaCode:c})=>(0,n.str)`must be ${u[o].okStr} ${c}`,params:({keyword:o,schemaCode:c})=>(0,n._)`{comparison: ${u[o].okStr}, limit: ${c}}`},s={keyword:Object.keys(u),type:"number",schemaType:"number",$data:!0,error:l,code(o){const{keyword:c,data:d,schemaCode:p}=o;o.fail$data((0,n._)`${d} ${u[c].fail} ${p} || isNaN(${d})`)}};return Tu.default=s,Tu}var Ru={},ay;function z_(){if(ay)return Ru;ay=1,Object.defineProperty(Ru,"__esModule",{value:!0});const n=Ce(),u={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:l})=>(0,n.str)`must be multiple of ${l}`,params:({schemaCode:l})=>(0,n._)`{multipleOf: ${l}}`},code(l){const{gen:s,data:o,schemaCode:c,it:d}=l,p=d.opts.multipleOfPrecision,m=s.let("res"),v=p?(0,n._)`Math.abs(Math.round(${m}) - ${m}) > 1e-${p}`:(0,n._)`${m} !== parseInt(${m})`;l.fail$data((0,n._)`(${c} === 0 || (${m} = ${o}/${c}, ${v}))`)}};return Ru.default=u,Ru}var Nu={},ju={},ly;function I_(){if(ly)return ju;ly=1,Object.defineProperty(ju,"__esModule",{value:!0});function n(i){const u=i.length;let l=0,s=0,o;for(;s=55296&&o<=56319&&s(0,n._)`{limit: ${o}}`},code(o){const{keyword:c,data:d,schemaCode:p,it:m}=o,v=c==="maxLength"?n.operators.GT:n.operators.LT,S=m.opts.unicode===!1?(0,n._)`${d}.length`:(0,n._)`${(0,i.useFunc)(o.gen,u.default)}(${d})`;o.fail$data((0,n._)`${S} ${v} ${p}`)}};return Nu.default=s,Nu}var Du={},sy;function H_(){if(sy)return Du;sy=1,Object.defineProperty(Du,"__esModule",{value:!0});const n=dn(),i=Ce(),l={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>(0,i.str)`must match pattern "${s}"`,params:({schemaCode:s})=>(0,i._)`{pattern: ${s}}`},code(s){const{data:o,$data:c,schema:d,schemaCode:p,it:m}=s,v=m.opts.unicodeRegExp?"u":"",S=c?(0,i._)`(new RegExp(${p}, ${v}))`:(0,n.usePattern)(s,d);s.fail$data((0,i._)`!${S}.test(${o})`)}};return Du.default=l,Du}var Mu={},oy;function V_(){if(oy)return Mu;oy=1,Object.defineProperty(Mu,"__esModule",{value:!0});const n=Ce(),u={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:l,schemaCode:s}){const o=l==="maxProperties"?"more":"fewer";return(0,n.str)`must NOT have ${o} than ${s} properties`},params:({schemaCode:l})=>(0,n._)`{limit: ${l}}`},code(l){const{keyword:s,data:o,schemaCode:c}=l,d=s==="maxProperties"?n.operators.GT:n.operators.LT;l.fail$data((0,n._)`Object.keys(${o}).length ${d} ${c}`)}};return Mu.default=u,Mu}var Cu={},fy;function k_(){if(fy)return Cu;fy=1,Object.defineProperty(Cu,"__esModule",{value:!0});const n=dn(),i=Ce(),u=He(),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,i.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,i._)`{missingProperty: ${o}}`},code(o){const{gen:c,schema:d,schemaCode:p,data:m,$data:v,it:S}=o,{opts:L}=S;if(!v&&d.length===0)return;const C=d.length>=L.loopRequired;if(S.allErrors?q():j(),L.strictRequired){const g=o.parentSchema.properties,{definedProperties:E}=o.it;for(const _ of d)if((g==null?void 0:g[_])===void 0&&!E.has(_)){const T=S.schemaEnv.baseId+S.errSchemaPath,b=`required property "${_}" is not defined at "${T}" (strictRequired)`;(0,u.checkStrictMode)(S,b,S.opts.strictRequired)}}function q(){if(C||v)o.block$data(i.nil,y);else for(const g of d)(0,n.checkReportMissingProp)(o,g)}function j(){const g=c.let("missing");if(C||v){const E=c.let("valid",!0);o.block$data(E,()=>A(g,E)),o.ok(E)}else c.if((0,n.checkMissingProp)(o,d,g)),(0,n.reportMissingProp)(o,g),c.else()}function y(){c.forOf("prop",p,g=>{o.setParams({missingProperty:g}),c.if((0,n.noPropertyInData)(c,m,g,L.ownProperties),()=>o.error())})}function A(g,E){o.setParams({missingProperty:g}),c.forOf(g,p,()=>{c.assign(E,(0,n.propertyInData)(c,m,g,L.ownProperties)),c.if((0,i.not)(E),()=>{o.error(),c.break()})},i.nil)}}};return Cu.default=s,Cu}var xu={},cy;function G_(){if(cy)return xu;cy=1,Object.defineProperty(xu,"__esModule",{value:!0});const n=Ce(),u={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:l,schemaCode:s}){const o=l==="maxItems"?"more":"fewer";return(0,n.str)`must NOT have ${o} than ${s} items`},params:({schemaCode:l})=>(0,n._)`{limit: ${l}}`},code(l){const{keyword:s,data:o,schemaCode:c}=l,d=s==="maxItems"?n.operators.GT:n.operators.LT;l.fail$data((0,n._)`${o}.length ${d} ${c}`)}};return xu.default=u,xu}var Lu={},qu={},dy;function vd(){if(dy)return qu;dy=1,Object.defineProperty(qu,"__esModule",{value:!0});const n=bv();return n.code='require("ajv/dist/runtime/equal").default',qu.default=n,qu}var hy;function Y_(){if(hy)return Lu;hy=1,Object.defineProperty(Lu,"__esModule",{value:!0});const n=cs(),i=Ce(),u=He(),l=vd(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:c,j:d}})=>(0,i.str)`must NOT have duplicate items (items ## ${d} and ${c} are identical)`,params:({params:{i:c,j:d}})=>(0,i._)`{i: ${c}, j: ${d}}`},code(c){const{gen:d,data:p,$data:m,schema:v,parentSchema:S,schemaCode:L,it:C}=c;if(!m&&!v)return;const q=d.let("valid"),j=S.items?(0,n.getSchemaTypes)(S.items):[];c.block$data(q,y,(0,i._)`${L} === false`),c.ok(q);function y(){const _=d.let("i",(0,i._)`${p}.length`),T=d.let("j");c.setParams({i:_,j:T}),d.assign(q,!0),d.if((0,i._)`${_} > 1`,()=>(A()?g:E)(_,T))}function A(){return j.length>0&&!j.some(_=>_==="object"||_==="array")}function g(_,T){const b=d.name("item"),R=(0,n.checkDataTypes)(j,b,C.opts.strictNumbers,n.DataType.Wrong),$=d.const("indices",(0,i._)`{}`);d.for((0,i._)`;${_}--;`,()=>{d.let(b,(0,i._)`${p}[${_}]`),d.if(R,(0,i._)`continue`),j.length>1&&d.if((0,i._)`typeof ${b} == "string"`,(0,i._)`${b} += "_"`),d.if((0,i._)`typeof ${$}[${b}] == "number"`,()=>{d.assign(T,(0,i._)`${$}[${b}]`),c.error(),d.assign(q,!1).break()}).code((0,i._)`${$}[${b}] = ${_}`)})}function E(_,T){const b=(0,u.useFunc)(d,l.default),R=d.name("outer");d.label(R).for((0,i._)`;${_}--;`,()=>d.for((0,i._)`${T} = ${_}; ${T}--;`,()=>d.if((0,i._)`${b}(${p}[${_}], ${p}[${T}])`,()=>{c.error(),d.assign(q,!1).break(R)})))}}};return Lu.default=o,Lu}var Uu={},py;function P_(){if(py)return Uu;py=1,Object.defineProperty(Uu,"__esModule",{value:!0});const n=Ce(),i=He(),u=vd(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,n._)`{allowedValue: ${o}}`},code(o){const{gen:c,data:d,$data:p,schemaCode:m,schema:v}=o;p||v&&typeof v=="object"?o.fail$data((0,n._)`!${(0,i.useFunc)(c,u.default)}(${d}, ${m})`):o.fail((0,n._)`${v} !== ${d}`)}};return Uu.default=s,Uu}var zu={},my;function K_(){if(my)return zu;my=1,Object.defineProperty(zu,"__esModule",{value:!0});const n=Ce(),i=He(),u=vd(),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,n._)`{allowedValues: ${o}}`},code(o){const{gen:c,data:d,$data:p,schema:m,schemaCode:v,it:S}=o;if(!p&&m.length===0)throw new Error("enum must have non-empty array");const L=m.length>=S.opts.loopEnum;let C;const q=()=>C??(C=(0,i.useFunc)(c,u.default));let j;if(L||p)j=c.let("valid"),o.block$data(j,y);else{if(!Array.isArray(m))throw new Error("ajv implementation error");const g=c.const("vSchema",v);j=(0,n.or)(...m.map((E,_)=>A(g,_)))}o.pass(j);function y(){c.assign(j,!1),c.forOf("v",v,g=>c.if((0,n._)`${q()}(${d}, ${g})`,()=>c.assign(j,!0).break()))}function A(g,E){const _=m[E];return typeof _=="object"&&_!==null?(0,n._)`${q()}(${d}, ${g}[${E}])`:(0,n._)`${d} === ${_}`}}};return zu.default=s,zu}var gy;function F_(){if(gy)return Ou;gy=1,Object.defineProperty(Ou,"__esModule",{value:!0});const n=U_(),i=z_(),u=B_(),l=H_(),s=V_(),o=k_(),c=G_(),d=Y_(),p=P_(),m=K_(),v=[n.default,i.default,u.default,l.default,s.default,o.default,c.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},p.default,m.default];return Ou.default=v,Ou}var Iu={},Ci={},yy;function Ev(){if(yy)return Ci;yy=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.validateAdditionalItems=void 0;const n=Ce(),i=He(),l={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,n.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,n._)`{limit: ${o}}`},code(o){const{parentSchema:c,it:d}=o,{items:p}=c;if(!Array.isArray(p)){(0,i.checkStrictMode)(d,'"additionalItems" is ignored when "items" is not an array of schemas');return}s(o,p)}};function s(o,c){const{gen:d,schema:p,data:m,keyword:v,it:S}=o;S.items=!0;const L=d.const("len",(0,n._)`${m}.length`);if(p===!1)o.setParams({len:c.length}),o.pass((0,n._)`${L} <= ${c.length}`);else if(typeof p=="object"&&!(0,i.alwaysValidSchema)(S,p)){const q=d.var("valid",(0,n._)`${L} <= ${c.length}`);d.if((0,n.not)(q),()=>C(q)),o.ok(q)}function C(q){d.forRange("i",c.length,L,j=>{o.subschema({keyword:v,dataProp:j,dataPropType:i.Type.Num},q),S.allErrors||d.if((0,n.not)(q),()=>d.break())})}}return Ci.validateAdditionalItems=s,Ci.default=l,Ci}var Bu={},xi={},vy;function _v(){if(vy)return xi;vy=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.validateTuple=void 0;const n=Ce(),i=He(),u=dn(),l={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:c,it:d}=o;if(Array.isArray(c))return s(o,"additionalItems",c);d.items=!0,!(0,i.alwaysValidSchema)(d,c)&&o.ok((0,u.validateArray)(o))}};function s(o,c,d=o.schema){const{gen:p,parentSchema:m,data:v,keyword:S,it:L}=o;j(m),L.opts.unevaluated&&d.length&&L.items!==!0&&(L.items=i.mergeEvaluated.items(p,d.length,L.items));const C=p.name("valid"),q=p.const("len",(0,n._)`${v}.length`);d.forEach((y,A)=>{(0,i.alwaysValidSchema)(L,y)||(p.if((0,n._)`${q} > ${A}`,()=>o.subschema({keyword:S,schemaProp:A,dataProp:A},C)),o.ok(C))});function j(y){const{opts:A,errSchemaPath:g}=L,E=d.length,_=E===y.minItems&&(E===y.maxItems||y[c]===!1);if(A.strictTuples&&!_){const T=`"${S}" is ${E}-tuple, but minItems or maxItems/${c} are not specified or different at path "${g}"`;(0,i.checkStrictMode)(L,T,A.strictTuples)}}}return xi.validateTuple=s,xi.default=l,xi}var by;function X_(){if(by)return Bu;by=1,Object.defineProperty(Bu,"__esModule",{value:!0});const n=_v(),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:u=>(0,n.validateTuple)(u,"items")};return Bu.default=i,Bu}var Hu={},Ey;function Q_(){if(Ey)return Hu;Ey=1,Object.defineProperty(Hu,"__esModule",{value:!0});const n=Ce(),i=He(),u=dn(),l=Ev(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:c}})=>(0,n.str)`must NOT have more than ${c} items`,params:({params:{len:c}})=>(0,n._)`{limit: ${c}}`},code(c){const{schema:d,parentSchema:p,it:m}=c,{prefixItems:v}=p;m.items=!0,!(0,i.alwaysValidSchema)(m,d)&&(v?(0,l.validateAdditionalItems)(c,v):c.ok((0,u.validateArray)(c)))}};return Hu.default=o,Hu}var Vu={},_y;function Z_(){if(_y)return Vu;_y=1,Object.defineProperty(Vu,"__esModule",{value:!0});const n=Ce(),i=He(),l={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:s,max:o}})=>o===void 0?(0,n.str)`must contain at least ${s} valid item(s)`:(0,n.str)`must contain at least ${s} and no more than ${o} valid item(s)`,params:({params:{min:s,max:o}})=>o===void 0?(0,n._)`{minContains: ${s}}`:(0,n._)`{minContains: ${s}, maxContains: ${o}}`},code(s){const{gen:o,schema:c,parentSchema:d,data:p,it:m}=s;let v,S;const{minContains:L,maxContains:C}=d;m.opts.next?(v=L===void 0?1:L,S=C):v=1;const q=o.const("len",(0,n._)`${p}.length`);if(s.setParams({min:v,max:S}),S===void 0&&v===0){(0,i.checkStrictMode)(m,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(S!==void 0&&v>S){(0,i.checkStrictMode)(m,'"minContains" > "maxContains" is always invalid'),s.fail();return}if((0,i.alwaysValidSchema)(m,c)){let E=(0,n._)`${q} >= ${v}`;S!==void 0&&(E=(0,n._)`${E} && ${q} <= ${S}`),s.pass(E);return}m.items=!0;const j=o.name("valid");S===void 0&&v===1?A(j,()=>o.if(j,()=>o.break())):v===0?(o.let(j,!0),S!==void 0&&o.if((0,n._)`${p}.length > 0`,y)):(o.let(j,!1),y()),s.result(j,()=>s.reset());function y(){const E=o.name("_valid"),_=o.let("count",0);A(E,()=>o.if(E,()=>g(_)))}function A(E,_){o.forRange("i",0,q,T=>{s.subschema({keyword:"contains",dataProp:T,dataPropType:i.Type.Num,compositeRule:!0},E),_()})}function g(E){o.code((0,n._)`${E}++`),S===void 0?o.if((0,n._)`${E} >= ${v}`,()=>o.assign(j,!0).break()):(o.if((0,n._)`${E} > ${S}`,()=>o.assign(j,!1).break()),v===1?o.assign(j,!0):o.if((0,n._)`${E} >= ${v}`,()=>o.assign(j,!0)))}}};return Vu.default=l,Vu}var ic={},Sy;function J_(){return Sy||(Sy=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.validateSchemaDeps=n.validatePropertyDeps=n.error=void 0;const i=Ce(),u=He(),l=dn();n.error={message:({params:{property:p,depsCount:m,deps:v}})=>{const S=m===1?"property":"properties";return(0,i.str)`must have ${S} ${v} when property ${p} is present`},params:({params:{property:p,depsCount:m,deps:v,missingProperty:S}})=>(0,i._)`{property: ${p}, - missingProperty: ${S}, - depsCount: ${m}, - deps: ${v}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:n.error,code(p){const[m,v]=o(p);c(p,m),d(p,v)}};function o({schema:p}){const m={},v={};for(const S in p){if(S==="__proto__")continue;const L=Array.isArray(p[S])?m:v;L[S]=p[S]}return[m,v]}function c(p,m=p.schema){const{gen:v,data:S,it:L}=p;if(Object.keys(m).length===0)return;const C=v.let("missing");for(const q in m){const j=m[q];if(j.length===0)continue;const y=(0,l.propertyInData)(v,S,q,L.opts.ownProperties);p.setParams({property:q,depsCount:j.length,deps:j.join(", ")}),L.allErrors?v.if(y,()=>{for(const A of j)(0,l.checkReportMissingProp)(p,A)}):(v.if((0,i._)`${y} && (${(0,l.checkMissingProp)(p,j,C)})`),(0,l.reportMissingProp)(p,C),v.else())}}n.validatePropertyDeps=c;function d(p,m=p.schema){const{gen:v,data:S,keyword:L,it:C}=p,q=v.name("valid");for(const j in m)(0,u.alwaysValidSchema)(C,m[j])||(v.if((0,l.propertyInData)(v,S,j,C.opts.ownProperties),()=>{const y=p.subschema({keyword:L,schemaProp:j},q);p.mergeValidEvaluated(y,q)},()=>v.var(q,!0)),p.ok(q))}n.validateSchemaDeps=d,n.default=s}(ic)),ic}var ku={},wy;function W_(){if(wy)return ku;wy=1,Object.defineProperty(ku,"__esModule",{value:!0});const n=Ce(),i=He(),l={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:s})=>(0,n._)`{propertyName: ${s.propertyName}}`},code(s){const{gen:o,schema:c,data:d,it:p}=s;if((0,i.alwaysValidSchema)(p,c))return;const m=o.name("valid");o.forIn("key",d,v=>{s.setParams({propertyName:v}),s.subschema({keyword:"propertyNames",data:v,dataTypes:["string"],propertyName:v,compositeRule:!0},m),o.if((0,n.not)(m),()=>{s.error(!0),p.allErrors||o.break()})}),s.ok(m)}};return ku.default=l,ku}var Gu={},Ay;function Sv(){if(Ay)return Gu;Ay=1,Object.defineProperty(Gu,"__esModule",{value:!0});const n=dn(),i=Ce(),u=_r(),l=He(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:c})=>(0,i._)`{additionalProperty: ${c.additionalProperty}}`},code(c){const{gen:d,schema:p,parentSchema:m,data:v,errsCount:S,it:L}=c;if(!S)throw new Error("ajv implementation error");const{allErrors:C,opts:q}=L;if(L.props=!0,q.removeAdditional!=="all"&&(0,l.alwaysValidSchema)(L,p))return;const j=(0,n.allSchemaProperties)(m.properties),y=(0,n.allSchemaProperties)(m.patternProperties);A(),c.ok((0,i._)`${S} === ${u.default.errors}`);function A(){d.forIn("key",v,b=>{!j.length&&!y.length?_(b):d.if(g(b),()=>_(b))})}function g(b){let R;if(j.length>8){const $=(0,l.schemaRefOrVal)(L,m.properties,"properties");R=(0,n.isOwnProperty)(d,$,b)}else j.length?R=(0,i.or)(...j.map($=>(0,i._)`${b} === ${$}`)):R=i.nil;return y.length&&(R=(0,i.or)(R,...y.map($=>(0,i._)`${(0,n.usePattern)(c,$)}.test(${b})`))),(0,i.not)(R)}function E(b){d.code((0,i._)`delete ${v}[${b}]`)}function _(b){if(q.removeAdditional==="all"||q.removeAdditional&&p===!1){E(b);return}if(p===!1){c.setParams({additionalProperty:b}),c.error(),C||d.break();return}if(typeof p=="object"&&!(0,l.alwaysValidSchema)(L,p)){const R=d.name("valid");q.removeAdditional==="failing"?(T(b,R,!1),d.if((0,i.not)(R),()=>{c.reset(),E(b)})):(T(b,R),C||d.if((0,i.not)(R),()=>d.break()))}}function T(b,R,$){const D={keyword:"additionalProperties",dataProp:b,dataPropType:l.Type.Str};$===!1&&Object.assign(D,{compositeRule:!0,createErrors:!1,allErrors:!1}),c.subschema(D,R)}}};return Gu.default=o,Gu}var Yu={},$y;function eS(){if($y)return Yu;$y=1,Object.defineProperty(Yu,"__esModule",{value:!0});const n=Os(),i=dn(),u=He(),l=Sv(),s={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:c,schema:d,parentSchema:p,data:m,it:v}=o;v.opts.removeAdditional==="all"&&p.additionalProperties===void 0&&l.default.code(new n.KeywordCxt(v,l.default,"additionalProperties"));const S=(0,i.allSchemaProperties)(d);for(const y of S)v.definedProperties.add(y);v.opts.unevaluated&&S.length&&v.props!==!0&&(v.props=u.mergeEvaluated.props(c,(0,u.toHash)(S),v.props));const L=S.filter(y=>!(0,u.alwaysValidSchema)(v,d[y]));if(L.length===0)return;const C=c.name("valid");for(const y of L)q(y)?j(y):(c.if((0,i.propertyInData)(c,m,y,v.opts.ownProperties)),j(y),v.allErrors||c.else().var(C,!0),c.endIf()),o.it.definedProperties.add(y),o.ok(C);function q(y){return v.opts.useDefaults&&!v.compositeRule&&d[y].default!==void 0}function j(y){o.subschema({keyword:"properties",schemaProp:y,dataProp:y},C)}}};return Yu.default=s,Yu}var Pu={},Oy;function tS(){if(Oy)return Pu;Oy=1,Object.defineProperty(Pu,"__esModule",{value:!0});const n=dn(),i=Ce(),u=He(),l=He(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:c,schema:d,data:p,parentSchema:m,it:v}=o,{opts:S}=v,L=(0,n.allSchemaProperties)(d),C=L.filter(_=>(0,u.alwaysValidSchema)(v,d[_]));if(L.length===0||C.length===L.length&&(!v.opts.unevaluated||v.props===!0))return;const q=S.strictSchema&&!S.allowMatchingProperties&&m.properties,j=c.name("valid");v.props!==!0&&!(v.props instanceof i.Name)&&(v.props=(0,l.evaluatedPropsToName)(c,v.props));const{props:y}=v;A();function A(){for(const _ of L)q&&g(_),v.allErrors?E(_):(c.var(j,!0),E(_),c.if(j))}function g(_){for(const T in q)new RegExp(_).test(T)&&(0,u.checkStrictMode)(v,`property ${T} matches pattern ${_} (use allowMatchingProperties)`)}function E(_){c.forIn("key",p,T=>{c.if((0,i._)`${(0,n.usePattern)(o,_)}.test(${T})`,()=>{const b=C.includes(_);b||o.subschema({keyword:"patternProperties",schemaProp:_,dataProp:T,dataPropType:l.Type.Str},j),v.opts.unevaluated&&y!==!0?c.assign((0,i._)`${y}[${T}]`,!0):!b&&!v.allErrors&&c.if((0,i.not)(j),()=>c.break())})})}}};return Pu.default=s,Pu}var Ku={},Ty;function nS(){if(Ty)return Ku;Ty=1,Object.defineProperty(Ku,"__esModule",{value:!0});const n=He(),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(u){const{gen:l,schema:s,it:o}=u;if((0,n.alwaysValidSchema)(o,s)){u.fail();return}const c=l.name("valid");u.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},c),u.failResult(c,()=>u.reset(),()=>u.error())},error:{message:"must NOT be valid"}};return Ku.default=i,Ku}var Fu={},Ry;function rS(){if(Ry)return Fu;Ry=1,Object.defineProperty(Fu,"__esModule",{value:!0});const i={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:dn().validateUnion,error:{message:"must match a schema in anyOf"}};return Fu.default=i,Fu}var Xu={},Ny;function iS(){if(Ny)return Xu;Ny=1,Object.defineProperty(Xu,"__esModule",{value:!0});const n=Ce(),i=He(),l={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:s})=>(0,n._)`{passingSchemas: ${s.passing}}`},code(s){const{gen:o,schema:c,parentSchema:d,it:p}=s;if(!Array.isArray(c))throw new Error("ajv implementation error");if(p.opts.discriminator&&d.discriminator)return;const m=c,v=o.let("valid",!1),S=o.let("passing",null),L=o.name("_valid");s.setParams({passing:S}),o.block(C),s.result(v,()=>s.reset(),()=>s.error(!0));function C(){m.forEach((q,j)=>{let y;(0,i.alwaysValidSchema)(p,q)?o.var(L,!0):y=s.subschema({keyword:"oneOf",schemaProp:j,compositeRule:!0},L),j>0&&o.if((0,n._)`${L} && ${v}`).assign(v,!1).assign(S,(0,n._)`[${S}, ${j}]`).else(),o.if(L,()=>{o.assign(v,!0),o.assign(S,j),y&&s.mergeEvaluated(y,n.Name)})})}}};return Xu.default=l,Xu}var Qu={},jy;function aS(){if(jy)return Qu;jy=1,Object.defineProperty(Qu,"__esModule",{value:!0});const n=He(),i={keyword:"allOf",schemaType:"array",code(u){const{gen:l,schema:s,it:o}=u;if(!Array.isArray(s))throw new Error("ajv implementation error");const c=l.name("valid");s.forEach((d,p)=>{if((0,n.alwaysValidSchema)(o,d))return;const m=u.subschema({keyword:"allOf",schemaProp:p},c);u.ok(c),u.mergeEvaluated(m)})}};return Qu.default=i,Qu}var Zu={},Dy;function lS(){if(Dy)return Zu;Dy=1,Object.defineProperty(Zu,"__esModule",{value:!0});const n=Ce(),i=He(),l={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,n.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,n._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:c,parentSchema:d,it:p}=o;d.then===void 0&&d.else===void 0&&(0,i.checkStrictMode)(p,'"if" without "then" and "else" is ignored');const m=s(p,"then"),v=s(p,"else");if(!m&&!v)return;const S=c.let("valid",!0),L=c.name("_valid");if(C(),o.reset(),m&&v){const j=c.let("ifClause");o.setParams({ifClause:j}),c.if(L,q("then",j),q("else",j))}else m?c.if(L,q("then")):c.if((0,n.not)(L),q("else"));o.pass(S,()=>o.error(!0));function C(){const j=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},L);o.mergeEvaluated(j)}function q(j,y){return()=>{const A=o.subschema({keyword:j},L);c.assign(S,L),o.mergeValidEvaluated(A,S),y?c.assign(y,(0,n._)`${j}`):o.setParams({ifClause:j})}}}};function s(o,c){const d=o.schema[c];return d!==void 0&&!(0,i.alwaysValidSchema)(o,d)}return Zu.default=l,Zu}var Ju={},My;function uS(){if(My)return Ju;My=1,Object.defineProperty(Ju,"__esModule",{value:!0});const n=He(),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:u,parentSchema:l,it:s}){l.if===void 0&&(0,n.checkStrictMode)(s,`"${u}" without "if" is ignored`)}};return Ju.default=i,Ju}var Cy;function sS(){if(Cy)return Iu;Cy=1,Object.defineProperty(Iu,"__esModule",{value:!0});const n=Ev(),i=X_(),u=_v(),l=Q_(),s=Z_(),o=J_(),c=W_(),d=Sv(),p=eS(),m=tS(),v=nS(),S=rS(),L=iS(),C=aS(),q=lS(),j=uS();function y(A=!1){const g=[v.default,S.default,L.default,C.default,q.default,j.default,c.default,d.default,o.default,p.default,m.default];return A?g.push(i.default,l.default):g.push(n.default,u.default),g.push(s.default),g}return Iu.default=y,Iu}var Wu={},es={},xy;function oS(){if(xy)return es;xy=1,Object.defineProperty(es,"__esModule",{value:!0});const n=Ce(),u={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:l})=>(0,n.str)`must match format "${l}"`,params:({schemaCode:l})=>(0,n._)`{format: ${l}}`},code(l,s){const{gen:o,data:c,$data:d,schema:p,schemaCode:m,it:v}=l,{opts:S,errSchemaPath:L,schemaEnv:C,self:q}=v;if(!S.validateFormats)return;d?j():y();function j(){const A=o.scopeValue("formats",{ref:q.formats,code:S.code.formats}),g=o.const("fDef",(0,n._)`${A}[${m}]`),E=o.let("fType"),_=o.let("format");o.if((0,n._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>o.assign(E,(0,n._)`${g}.type || "string"`).assign(_,(0,n._)`${g}.validate`),()=>o.assign(E,(0,n._)`"string"`).assign(_,g)),l.fail$data((0,n.or)(T(),b()));function T(){return S.strictSchema===!1?n.nil:(0,n._)`${m} && !${_}`}function b(){const R=C.$async?(0,n._)`(${g}.async ? await ${_}(${c}) : ${_}(${c}))`:(0,n._)`${_}(${c})`,$=(0,n._)`(typeof ${_} == "function" ? ${R} : ${_}.test(${c}))`;return(0,n._)`${_} && ${_} !== true && ${E} === ${s} && !${$}`}}function y(){const A=q.formats[p];if(!A){T();return}if(A===!0)return;const[g,E,_]=b(A);g===s&&l.pass(R());function T(){if(S.strictSchema===!1){q.logger.warn($());return}throw new Error($());function $(){return`unknown format "${p}" ignored in schema at path "${L}"`}}function b($){const D=$ instanceof RegExp?(0,n.regexpCode)($):S.code.formats?(0,n._)`${S.code.formats}${(0,n.getProperty)(p)}`:void 0,N=o.scopeValue("formats",{key:p,ref:$,code:D});return typeof $=="object"&&!($ instanceof RegExp)?[$.type||"string",$.validate,(0,n._)`${N}.validate`]:["string",$,N]}function R(){if(typeof A=="object"&&!(A instanceof RegExp)&&A.async){if(!C.$async)throw new Error("async format in sync schema");return(0,n._)`await ${_}(${c})`}return typeof E=="function"?(0,n._)`${_}(${c})`:(0,n._)`${_}.test(${c})`}}}};return es.default=u,es}var Ly;function fS(){if(Ly)return Wu;Ly=1,Object.defineProperty(Wu,"__esModule",{value:!0});const i=[oS().default];return Wu.default=i,Wu}var Kr={},qy;function cS(){return qy||(qy=1,Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.contentVocabulary=Kr.metadataVocabulary=void 0,Kr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Kr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Kr}var Uy;function dS(){if(Uy)return wu;Uy=1,Object.defineProperty(wu,"__esModule",{value:!0});const n=q_(),i=F_(),u=sS(),l=fS(),s=cS(),o=[n.default,i.default,(0,u.default)(),l.default,s.metadataVocabulary,s.contentVocabulary];return wu.default=o,wu}var ts={},Ya={},zy;function hS(){if(zy)return Ya;zy=1,Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.DiscrError=void 0;var n;return function(i){i.Tag="tag",i.Mapping="mapping"}(n||(Ya.DiscrError=n={})),Ya}var Iy;function pS(){if(Iy)return ts;Iy=1,Object.defineProperty(ts,"__esModule",{value:!0});const n=Ce(),i=hS(),u=yd(),l=Ts(),s=He(),c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:d,tagName:p}})=>d===i.DiscrError.Tag?`tag "${p}" must be string`:`value of tag "${p}" must be in oneOf`,params:({params:{discrError:d,tag:p,tagName:m}})=>(0,n._)`{error: ${d}, tag: ${m}, tagValue: ${p}}`},code(d){const{gen:p,data:m,schema:v,parentSchema:S,it:L}=d,{oneOf:C}=S;if(!L.opts.discriminator)throw new Error("discriminator: requires discriminator option");const q=v.propertyName;if(typeof q!="string")throw new Error("discriminator: requires propertyName");if(v.mapping)throw new Error("discriminator: mapping is not supported");if(!C)throw new Error("discriminator: requires oneOf keyword");const j=p.let("valid",!1),y=p.const("tag",(0,n._)`${m}${(0,n.getProperty)(q)}`);p.if((0,n._)`typeof ${y} == "string"`,()=>A(),()=>d.error(!1,{discrError:i.DiscrError.Tag,tag:y,tagName:q})),d.ok(j);function A(){const _=E();p.if(!1);for(const T in _)p.elseIf((0,n._)`${y} === ${T}`),p.assign(j,g(_[T]));p.else(),d.error(!1,{discrError:i.DiscrError.Mapping,tag:y,tagName:q}),p.endIf()}function g(_){const T=p.name("valid"),b=d.subschema({keyword:"oneOf",schemaProp:_},T);return d.mergeEvaluated(b,n.Name),T}function E(){var _;const T={},b=$(S);let R=!0;for(let Y=0;Ythis.addVocabulary(q)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const q=this.opts.$data?this.$dataMetaSchema(o,c):o;this.addMetaSchema(q,d,!1),this.refs["http://json-schema.org/schema"]=d}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(d)?d:void 0)}}i.Ajv=p,n.exports=i=p,n.exports.Ajv=p,Object.defineProperty(i,"__esModule",{value:!0}),i.default=p;var m=Os();Object.defineProperty(i,"KeywordCxt",{enumerable:!0,get:function(){return m.KeywordCxt}});var v=Ce();Object.defineProperty(i,"_",{enumerable:!0,get:function(){return v._}}),Object.defineProperty(i,"str",{enumerable:!0,get:function(){return v.str}}),Object.defineProperty(i,"stringify",{enumerable:!0,get:function(){return v.stringify}}),Object.defineProperty(i,"nil",{enumerable:!0,get:function(){return v.nil}}),Object.defineProperty(i,"Name",{enumerable:!0,get:function(){return v.Name}}),Object.defineProperty(i,"CodeGen",{enumerable:!0,get:function(){return v.CodeGen}});var S=gd();Object.defineProperty(i,"ValidationError",{enumerable:!0,get:function(){return S.default}});var L=Ts();Object.defineProperty(i,"MissingRefError",{enumerable:!0,get:function(){return L.default}})}(vu,vu.exports)),vu.exports}var wS=SS();const AS=ws(wS);function ns(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ac={exports:{}},Hy;function $S(){return Hy||(Hy=1,function(n,i){(function(u){n.exports=u()})(function(){return function u(l,s,o){function c(m,v){if(!s[m]){if(!l[m]){var S=typeof ns=="function"&&ns;if(!v&&S)return S(m,!0);if(d)return d(m,!0);throw new Error("Cannot find module '"+m+"'")}v=s[m]={exports:{}},l[m][0].call(v.exports,function(L){var C=l[m][1][L];return c(C||L)},v,v.exports,u,l,s,o)}return s[m].exports}for(var d=typeof ns=="function"&&ns,p=0;p)":-1o||M[i]!==Y[o]){var ne=` +`+M[i].replace(" at new "," at ");return e.displayName&&ne.includes("")&&(ne=ne.replace("",e.displayName)),ne}while(1<=i&&0<=o);break}}}finally{K=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ce(n):""}function x(e){switch(e.tag){case 26:case 27:case 5:return ce(e.type);case 16:return ce("Lazy");case 13:return ce("Suspense");case 19:return ce("SuspenseList");case 0:case 15:return e=z(e.type,!1),e;case 11:return e=z(e.type.render,!1),e;case 1:return e=z(e.type,!0),e;default:return""}}function Z(e){try{var t="";do t+=x(e),e=e.return;while(e);return t}catch(n){return` +Error generating stack: `+n.message+` +`+n.stack}}function P(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function J(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function O(e){if(P(e)!==e)throw Error(f(188))}function $(e){var t=e.alternate;if(!t){if(t=P(e),t===null)throw Error(f(188));return t!==e?null:e}for(var n=e,i=t;;){var o=n.return;if(o===null)break;var h=o.alternate;if(h===null){if(i=o.return,i!==null){n=i;continue}break}if(o.child===h.child){for(h=o.child;h;){if(h===n)return O(o),e;if(h===i)return O(o),t;h=h.sibling}throw Error(f(188))}if(n.return!==i.return)n=o,i=h;else{for(var y=!1,A=o.child;A;){if(A===n){y=!0,n=o,i=h;break}if(A===i){y=!0,i=o,n=h;break}A=A.sibling}if(!y){for(A=h.child;A;){if(A===n){y=!0,n=h,i=o;break}if(A===i){y=!0,i=h,n=o;break}A=A.sibling}if(!y)throw Error(f(189))}}if(n.alternate!==i)throw Error(f(190))}if(n.tag!==3)throw Error(f(188));return n.stateNode.current===n?e:t}function ee(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=ee(e),t!==null)return t;e=e.sibling}return null}var se=Array.isArray,ie=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},de=[],Re=-1;function B(e){return{current:e}}function b(e){0>Re||(e.current=de[Re],de[Re]=null,Re--)}function S(e,t){Re++,de[Re]=e.current,e.current=t}var L=B(null),ae=B(null),ue=B(null),oe=B(null);function Ee(e,t){switch(S(ue,t),S(ae,e),S(L,null),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?Wp(t):0;break;default:if(e=e===8?t.parentNode:t,t=e.tagName,e=e.namespaceURI)e=Wp(e),t=em(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}b(L),S(L,t)}function Te(){b(L),b(ae),b(ue)}function Ue(e){e.memoizedState!==null&&S(oe,e);var t=L.current,n=em(t,e.type);t!==n&&(S(ae,e),S(L,n))}function Ve(e){ae.current===e&&(b(L),b(ae)),oe.current===e&&(b(oe),Gi._currentValue=he)}var Ie=Object.prototype.hasOwnProperty,tt=r.unstable_scheduleCallback,Ge=r.unstable_cancelCallback,Fe=r.unstable_shouldYield,Ir=r.unstable_requestPaint,Ct=r.unstable_now,R0=r.unstable_getCurrentPriorityLevel,Yc=r.unstable_ImmediatePriority,Gc=r.unstable_UserBlockingPriority,hl=r.unstable_NormalPriority,x0=r.unstable_LowPriority,Vc=r.unstable_IdlePriority,D0=r.log,N0=r.unstable_setDisableYieldValue,Ja=null,Lt=null;function M0(e){if(Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(Ja,e,void 0,(e.current.flags&128)===128)}catch{}}function Xr(e){if(typeof D0=="function"&&N0(e),Lt&&typeof Lt.setStrictMode=="function")try{Lt.setStrictMode(Ja,e)}catch{}}var zt=Math.clz32?Math.clz32:L0,j0=Math.log,C0=Math.LN2;function L0(e){return e>>>=0,e===0?32:31-(j0(e)/C0|0)|0}var dl=128,pl=4194304;function Tn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ml(e,t){var n=e.pendingLanes;if(n===0)return 0;var i=0,o=e.suspendedLanes,h=e.pingedLanes,y=e.warmLanes;e=e.finishedLanes!==0;var A=n&134217727;return A!==0?(n=A&~o,n!==0?i=Tn(n):(h&=A,h!==0?i=Tn(h):e||(y=A&~y,y!==0&&(i=Tn(y))))):(A=n&~o,A!==0?i=Tn(A):h!==0?i=Tn(h):e||(y=n&~y,y!==0&&(i=Tn(y)))),i===0?0:t!==0&&t!==i&&(t&o)===0&&(o=i&-i,y=t&-t,o>=y||o===32&&(y&4194176)!==0)?t:i}function Wa(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function z0(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ic(){var e=dl;return dl<<=1,(dl&4194176)===0&&(dl=128),e}function Xc(){var e=pl;return pl<<=1,(pl&62914560)===0&&(pl=4194304),e}function Ku(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ei(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function U0(e,t,n,i,o,h){var y=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var A=e.entanglements,M=e.expirationTimes,Y=e.hiddenUpdates;for(n=y&~n;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$0=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),eh={},th={};function k0(e){return Ie.call(th,e)?!0:Ie.call(eh,e)?!1:$0.test(e)?th[e]=!0:(eh[e]=!0,!1)}function yl(e,t,n){if(k0(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function gl(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Or(e,t,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+i)}}function Vt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function rh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Y0(e){var t=rh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,h=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(y){i=""+y,h.call(this,y)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(y){i=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function vl(e){e._valueTracker||(e._valueTracker=Y0(e))}function nh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=rh(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function bl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var G0=/[\n"\\]/g;function It(e){return e.replace(G0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ju(e,t,n,i,o,h,y,A){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Vt(t)):e.value!==""+Vt(t)&&(e.value=""+Vt(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?Wu(e,y,Vt(t)):n!=null?Wu(e,y,Vt(n)):i!=null&&e.removeAttribute("value"),o==null&&h!=null&&(e.defaultChecked=!!h),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?e.name=""+Vt(A):e.removeAttribute("name")}function ah(e,t,n,i,o,h,y,A){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),t!=null||n!=null){if(!(h!=="submit"&&h!=="reset"||t!=null))return;n=n!=null?""+Vt(n):"",t=t!=null?""+Vt(t):n,A||t===e.value||(e.value=t),e.defaultValue=t}i=i??o,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=A?e.checked:!!i,e.defaultChecked=!!i,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y)}function Wu(e,t,n){t==="number"&&bl(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function ra(e,t,n,i){if(e=e.options,t){t={};for(var o=0;o=ui),gh=" ",vh=!1;function bh(e,t){switch(e){case"keyup":return gv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Eh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var la=!1;function bv(e,t){switch(e){case"compositionend":return Eh(t);case"keypress":return t.which!==32?null:(vh=!0,gh);case"textInput":return e=t.data,e===gh&&vh?null:e;default:return null}}function Ev(e,t){if(la)return e==="compositionend"||!os&&bh(e,t)?(e=ch(),Al=is=Qr=null,la=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=xh(n)}}function Nh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Nh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=bl(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=bl(e.document)}return t}function ds(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function xv(e,t){var n=Mh(t);t=e.focusedElem;var i=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Nh(t.ownerDocument.documentElement,t)){if(i!==null&&ds(t)){if(e=i.start,n=i.end,n===void 0&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if(n=(e=t.ownerDocument||document)&&e.defaultView||window,n.getSelection){n=n.getSelection();var o=t.textContent.length,h=Math.min(i.start,o);i=i.end===void 0?h:Math.min(i.end,o),!n.extend&&h>i&&(o=i,i=h,h=o),o=Dh(t,h);var y=Dh(t,i);o&&y&&(n.rangeCount!==1||n.anchorNode!==o.node||n.anchorOffset!==o.offset||n.focusNode!==y.node||n.focusOffset!==y.offset)&&(e=e.createRange(),e.setStart(o.node,o.offset),n.removeAllRanges(),h>i?(n.addRange(e),n.extend(y.node,y.offset)):(e.setEnd(y.node,y.offset),n.addRange(e)))}}for(e=[],n=t;n=n.parentNode;)n.nodeType===1&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,ua=null,ps=null,ci=null,ms=!1;function jh(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ms||ua==null||ua!==bl(i)||(i=ua,"selectionStart"in i&&ds(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),ci&&oi(ci,i)||(ci=i,i=su(ps,"onSelect"),0>=y,o-=y,Sr=1<<32-zt(t)+o|n<Ae?(pt=ge,ge=null):pt=ge.sibling;var ze=F(V,ge,Q[Ae],le);if(ze===null){ge===null&&(ge=pt);break}e&&ge&&ze.alternate===null&&t(V,ge),H=h(ze,H,Ae),De===null?me=ze:De.sibling=ze,De=ze,ge=pt}if(Ae===Q.length)return n(V,ge),Le&&Cn(V,Ae),me;if(ge===null){for(;AeAe?(pt=ge,ge=null):pt=ge.sibling;var mn=F(V,ge,ze.value,le);if(mn===null){ge===null&&(ge=pt);break}e&&ge&&mn.alternate===null&&t(V,ge),H=h(mn,H,Ae),De===null?me=mn:De.sibling=mn,De=mn,ge=pt}if(ze.done)return n(V,ge),Le&&Cn(V,Ae),me;if(ge===null){for(;!ze.done;Ae++,ze=Q.next())ze=fe(V,ze.value,le),ze!==null&&(H=h(ze,H,Ae),De===null?me=ze:De.sibling=ze,De=ze);return Le&&Cn(V,Ae),me}for(ge=i(ge);!ze.done;Ae++,ze=Q.next())ze=re(ge,V,Ae,ze.value,le),ze!==null&&(e&&ze.alternate!==null&&ge.delete(ze.key===null?Ae:ze.key),H=h(ze,H,Ae),De===null?me=ze:De.sibling=ze,De=ze);return e&&ge.forEach(function(X1){return t(V,X1)}),Le&&Cn(V,Ae),me}function We(V,H,Q,le){if(typeof Q=="object"&&Q!==null&&Q.type===m&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case l:e:{for(var me=Q.key;H!==null;){if(H.key===me){if(me=Q.type,me===m){if(H.tag===7){n(V,H.sibling),le=o(H,Q.props.children),le.return=V,V=le;break e}}else if(H.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===k&&Kh(me)===H.type){n(V,H.sibling),le=o(H,Q.props),vi(le,Q),le.return=V,V=le;break e}n(V,H);break}else t(V,H);H=H.sibling}Q.type===m?(le=Vn(Q.props.children,V.mode,le,Q.key),le.return=V,V=le):(le=Jl(Q.type,Q.key,Q.props,null,V.mode,le),vi(le,Q),le.return=V,V=le)}return y(V);case d:e:{for(me=Q.key;H!==null;){if(H.key===me)if(H.tag===4&&H.stateNode.containerInfo===Q.containerInfo&&H.stateNode.implementation===Q.implementation){n(V,H.sibling),le=o(H,Q.children||[]),le.return=V,V=le;break e}else{n(V,H);break}else t(V,H);H=H.sibling}le=vf(Q,V.mode,le),le.return=V,V=le}return y(V);case k:return me=Q._init,Q=me(Q._payload),We(V,H,Q,le)}if(se(Q))return ye(V,H,Q,le);if(R(Q)){if(me=R(Q),typeof me!="function")throw Error(f(150));return Q=me.call(Q),Oe(V,H,Q,le)}if(typeof Q.then=="function")return We(V,H,Cl(Q),le);if(Q.$$typeof===j)return We(V,H,Kl(V,Q),le);Ll(V,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,H!==null&&H.tag===6?(n(V,H.sibling),le=o(H,Q),le.return=V,V=le):(n(V,H),le=gf(Q,V.mode,le),le.return=V,V=le),y(V)):n(V,H)}return function(V,H,Q,le){try{gi=0;var me=We(V,H,Q,le);return da=null,me}catch(ge){if(ge===mi)throw ge;var De=Wt(29,ge,null,V.mode);return De.lanes=le,De.return=V,De}finally{}}}var zn=Fh(!0),Ph=Fh(!1),pa=B(null),zl=B(0);function Jh(e,t){e=Br,S(zl,e),S(pa,t),Br=e|t.baseLanes}function ws(){S(zl,Br),S(pa,pa.current)}function Os(){Br=zl.current,b(pa),b(zl)}var Ft=B(null),mr=null;function Fr(e){var t=e.alternate;S(st,st.current&1),S(Ft,e),mr===null&&(t===null||pa.current!==null||t.memoizedState!==null)&&(mr=e)}function Wh(e){if(e.tag===22){if(S(st,st.current),S(Ft,e),mr===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(mr=e)}}else Pr()}function Pr(){S(st,st.current),S(Ft,Ft.current)}function Rr(e){b(Ft),mr===e&&(mr=null),b(st)}var st=B(0);function Ul(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Cv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Lv=r.unstable_scheduleCallback,zv=r.unstable_NormalPriority,ft={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ss(){return{controller:new Cv,data:new Map,refCount:0}}function bi(e){e.refCount--,e.refCount===0&&Lv(zv,function(){e.controller.abort()})}var Ei=null,Ts=0,ma=0,ya=null;function Uv(e,t){if(Ei===null){var n=Ei=[];Ts=0,ma=Cf(),ya={status:"pending",value:void 0,then:function(i){n.push(i)}}}return Ts++,t.then(ed,ed),t}function ed(){if(--Ts===0&&Ei!==null){ya!==null&&(ya.status="fulfilled");var e=Ei;Ei=null,ma=0,ya=null;for(var t=0;th?h:8;var y=w.T,A={};w.T=A,Gs(e,!1,t,n);try{var M=o(),Y=w.S;if(Y!==null&&Y(A,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var ne=Bv(M,i);wi(e,t,ne,$t(e))}else wi(e,t,i,$t(e))}catch(fe){wi(e,t,{then:function(){},status:"rejected",reason:fe},$t())}finally{ie.p=h,w.T=y}}function Yv(){}function ks(e,t,n,i){if(e.tag!==5)throw Error(f(476));var o=Md(e).queue;Nd(e,o,t,he,n===null?Yv:function(){return jd(e),n(i)})}function Md(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xr,lastRenderedState:he},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xr,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function jd(e){var t=Md(e).next.queue;wi(e,t,{},$t())}function Ys(){return Et(Gi)}function Cd(){return it().memoizedState}function Ld(){return it().memoizedState}function Gv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=$t();e=rn(n);var i=nn(t,e,n);i!==null&&(Tt(i,t,n),Ti(i,t,n)),t={cache:Ss()},e.payload=t;return}t=t.return}}function Vv(e,t,n){var i=$t();n={lane:i,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},Il(e)?Ud(t,n):(n=vs(e,t,n,i),n!==null&&(Tt(n,e,i),Bd(n,t,i)))}function zd(e,t,n){var i=$t();wi(e,t,n,i)}function wi(e,t,n,i){var o={lane:i,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(Il(e))Ud(t,o);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var y=t.lastRenderedState,A=h(y,n);if(o.hasEagerState=!0,o.eagerState=A,Ut(A,y))return xl(e,t,o,0),ke===null&&Rl(),!1}catch{}finally{}if(n=vs(e,t,o,i),n!==null)return Tt(n,e,i),Bd(n,t,i),!0}return!1}function Gs(e,t,n,i){if(i={lane:2,revertLane:Cf(),action:i,hasEagerState:!1,eagerState:null,next:null},Il(e)){if(t)throw Error(f(479))}else t=vs(e,n,i,2),t!==null&&Tt(t,e,2)}function Il(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function Ud(e,t){ga=ql=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Bd(e,t,n){if((n&4194176)!==0){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Qc(e,n)}}var yr={readContext:Et,use:kl,useCallback:rt,useContext:rt,useEffect:rt,useImperativeHandle:rt,useLayoutEffect:rt,useInsertionEffect:rt,useMemo:rt,useReducer:rt,useRef:rt,useState:rt,useDebugValue:rt,useDeferredValue:rt,useTransition:rt,useSyncExternalStore:rt,useId:rt};yr.useCacheRefresh=rt,yr.useMemoCache=rt,yr.useHostTransitionStatus=rt,yr.useFormState=rt,yr.useActionState=rt,yr.useOptimistic=rt;var qn={readContext:Et,use:kl,useCallback:function(e,t){return Mt().memoizedState=[e,t===void 0?null:t],e},useContext:Et,useEffect:_d,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Gl(4194308,4,Sd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gl(4194308,4,e,t)},useInsertionEffect:function(e,t){Gl(4,2,e,t)},useMemo:function(e,t){var n=Mt();t=t===void 0?null:t;var i=e();if(Bn){Xr(!0);try{e()}finally{Xr(!1)}}return n.memoizedState=[i,t],i},useReducer:function(e,t,n){var i=Mt();if(n!==void 0){var o=n(t);if(Bn){Xr(!0);try{n(t)}finally{Xr(!1)}}}else o=t;return i.memoizedState=i.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},i.queue=e,e=e.dispatch=Vv.bind(null,xe,e),[i.memoizedState,e]},useRef:function(e){var t=Mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Us(e);var t=e.queue,n=zd.bind(null,xe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Hs,useDeferredValue:function(e,t){var n=Mt();return $s(n,e,t)},useTransition:function(){var e=Us(!1);return e=Nd.bind(null,xe,e.queue,!0,!1),Mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=xe,o=Mt();if(Le){if(n===void 0)throw Error(f(407));n=n()}else{if(n=t(),ke===null)throw Error(f(349));(je&60)!==0||ld(i,t,n)}o.memoizedState=n;var h={value:n,getSnapshot:t};return o.queue=h,_d(sd.bind(null,i,h,e),[e]),i.flags|=2048,ba(9,ud.bind(null,i,h,n,t),{destroy:void 0},null),n},useId:function(){var e=Mt(),t=ke.identifierPrefix;if(Le){var n=Tr,i=Sr;n=(i&~(1<<32-zt(i)-1)).toString(32)+n,t=":"+t+"R"+n,n=Hl++,0 title"))),gt(h,i,n),h[bt]=e,ct(h),i=h;break e;case"link":var y=om("link","href",o).get(i+(n.href||""));if(y){for(var A=0;A<\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof i.is=="string"?o.createElement("select",{is:i.is}):o.createElement("select"),i.multiple?e.multiple=!0:i.size&&(e.size=i.size);break;default:e=typeof i.is=="string"?o.createElement(n,{is:i.is}):o.createElement(n)}}e[bt]=t,e[Dt]=i;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=e;e:switch(gt(e,n,i),n){case"button":case"input":case"select":case"textarea":e=!!i.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&zr(t)}}return Xe(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&zr(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(f(166));if(e=ue.current,hi(t)){if(e=t.stateNode,n=t.memoizedProps,i=null,o=St,o!==null)switch(o.tag){case 27:case 5:i=o.memoizedProps}e[bt]=t,e=!!(e.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||Jp(e.nodeValue,n)),e||Ln(t)}else e=ou(e).createTextNode(i),e[bt]=t,t.stateNode=e}return Xe(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=hi(t),i!==null&&i.dehydrated!==null){if(e===null){if(!o)throw Error(f(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(f(317));o[bt]=t}else di(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),o=!1}else lr!==null&&(Tf(lr),lr=null),o=!0;if(!o)return t.flags&256?(Rr(t),t):(Rr(t),null)}if(Rr(t),(t.flags&128)!==0)return t.lanes=n,t;if(n=i!==null,e=e!==null&&e.memoizedState!==null,n){i=t.child,o=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(o=i.alternate.memoizedState.cachePool.pool);var h=null;i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(h=i.memoizedState.cachePool.pool),h!==o&&(i.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Wl(t,t.updateQueue),Xe(t),null;case 4:return Te(),e===null&&Bf(t.stateNode.containerInfo),Xe(t),null;case 10:return Mr(t.type),Xe(t),null;case 19:if(b(st),o=t.memoizedState,o===null)return Xe(t),null;if(i=(t.flags&128)!==0,h=o.rendering,h===null)if(i)Ci(o,!1);else{if(Je!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(h=Ul(e),h!==null){for(t.flags|=128,Ci(o,!1),e=h.updateQueue,t.updateQueue=e,Wl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Tp(n,e),n=n.sibling;return S(st,st.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ct()>eu&&(t.flags|=128,i=!0,Ci(o,!1),t.lanes=4194304)}else{if(!i)if(e=Ul(h),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Wl(t,e),Ci(o,!0),o.tail===null&&o.tailMode==="hidden"&&!h.alternate&&!Le)return Xe(t),null}else 2*Ct()-o.renderingStartTime>eu&&n!==536870912&&(t.flags|=128,i=!0,Ci(o,!1),t.lanes=4194304);o.isBackwards?(h.sibling=t.child,t.child=h):(e=o.last,e!==null?e.sibling=h:t.child=h,o.last=h)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ct(),t.sibling=null,e=st.current,S(st,i?e&1|2:e&1),t):(Xe(t),null);case 22:case 23:return Rr(t),Os(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(n&536870912)!==0&&(t.flags&128)===0&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),n=t.updateQueue,n!==null&&Wl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),e!==null&&b(Un),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Mr(ft),Xe(t),null;case 25:return null}throw Error(f(156,t.tag))}function Pv(e,t){switch(Es(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Mr(ft),Te(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ve(t),null;case 13:if(Rr(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(f(340));di()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return b(st),null;case 4:return Te(),null;case 10:return Mr(t.type),null;case 22:case 23:return Rr(t),Os(),e!==null&&b(Un),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Mr(ft),null;case 25:return null;default:return null}}function Dp(e,t){switch(Es(t),t.tag){case 3:Mr(ft),Te();break;case 26:case 27:case 5:Ve(t);break;case 4:Te();break;case 13:Rr(t);break;case 19:b(st);break;case 10:Mr(t.type);break;case 22:case 23:Rr(t),Os(),e!==null&&b(Un);break;case 24:Mr(ft)}}var Jv={getCacheForType:function(e){var t=Et(ft),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},Wv=typeof WeakMap=="function"?WeakMap:Map,Ze=0,ke=null,Ne=null,je=0,Ye=0,Ht=null,Ur=!1,wa=!1,bf=!1,Br=0,Je=0,fn=0,In=0,Ef=0,er=0,Oa=0,Li=null,gr=null,Af=!1,_f=0,eu=1/0,tu=null,on=null,ru=!1,Xn=null,zi=0,wf=0,Of=null,Ui=0,Sf=null;function $t(){if((Ze&2)!==0&&je!==0)return je&-je;if(w.T!==null){var e=ma;return e!==0?e:Cf()}return Fc()}function Np(){er===0&&(er=(je&536870912)===0||Le?Ic():536870912);var e=Ft.current;return e!==null&&(e.flags|=32),er}function Tt(e,t,n){(e===ke&&Ye===2||e.cancelPendingCommit!==null)&&(Sa(e,0),qr(e,je,er,!1)),ei(e,n),((Ze&2)===0||e!==ke)&&(e===ke&&((Ze&2)===0&&(In|=n),Je===4&&qr(e,je,er,!1)),vr(e))}function Mp(e,t,n){if((Ze&6)!==0)throw Error(f(327));var i=!n&&(t&60)===0&&(t&e.expiredLanes)===0||Wa(e,t),o=i?r1(e,t):Df(e,t,!0),h=i;do{if(o===0){wa&&!i&&qr(e,t,0,!1);break}else if(o===6)qr(e,t,0,!Ur);else{if(n=e.current.alternate,h&&!e1(n)){o=Df(e,t,!1),h=!1;continue}if(o===2){if(h=t,e.errorRecoveryDisabledLanes&h)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var A=e;o=Li;var M=A.current.memoizedState.isDehydrated;if(M&&(Sa(A,y).flags|=256),y=Df(A,y,!1),y!==2){if(bf&&!M){A.errorRecoveryDisabledLanes|=h,In|=h,o=4;break e}h=gr,gr=o,h!==null&&Tf(h)}o=y}if(h=!1,o!==2)continue}}if(o===1){Sa(e,0),qr(e,t,0,!0);break}e:{switch(i=e,o){case 0:case 1:throw Error(f(345));case 4:if((t&4194176)===t){qr(i,t,er,!Ur);break e}break;case 2:gr=null;break;case 3:case 5:break;default:throw Error(f(329))}if(i.finishedWork=n,i.finishedLanes=t,(t&62914560)===t&&(h=_f+300-Ct(),10n?32:n,w.T=null,Xn===null)var h=!1;else{n=Of,Of=null;var y=Xn,A=zi;if(Xn=null,zi=0,(Ze&6)!==0)throw Error(f(331));var M=Ze;if(Ze|=4,Op(y.current),Ap(y,y.current,A,n),Ze=M,Bi(0,!1),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(Ja,y)}catch{}h=!0}return h}finally{ie.p=o,w.T=i,$p(e,t)}}return!1}function kp(e,t,n){t=Zt(n,t),t=Xs(e.stateNode,t,2),e=nn(e,t,2),e!==null&&(ei(e,2),vr(e))}function $e(e,t,n){if(e.tag===3)kp(e,e,n);else for(;t!==null;){if(t.tag===3){kp(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(on===null||!on.has(i))){e=Zt(n,e),n=Vd(2),i=nn(t,n,2),i!==null&&(Id(n,i,t,e),ei(i,2),vr(i));break}}t=t.return}}function Nf(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new Wv;var o=new Set;i.set(t,o)}else o=i.get(t),o===void 0&&(o=new Set,i.set(t,o));o.has(n)||(bf=!0,o.add(n),e=i1.bind(null,e,t,n),t.then(e,e))}function i1(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ke===e&&(je&n)===n&&(Je===4||Je===3&&(je&62914560)===je&&300>Ct()-_f?(Ze&2)===0&&Sa(e,0):Ef|=n,Oa===je&&(Oa=0)),vr(e)}function Yp(e,t){t===0&&(t=Xc()),e=Kr(e,t),e!==null&&(ei(e,t),vr(e))}function l1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yp(e,n)}function u1(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(f(314))}i!==null&&i.delete(t),Yp(e,n)}function s1(e,t){return tt(e,t)}var iu=null,xa=null,Mf=!1,lu=!1,jf=!1,Zn=0;function vr(e){e!==xa&&e.next===null&&(xa===null?iu=xa=e:xa=xa.next=e),lu=!0,Mf||(Mf=!0,o1(f1))}function Bi(e,t){if(!jf&&lu){jf=!0;do for(var n=!1,i=iu;i!==null;){if(e!==0){var o=i.pendingLanes;if(o===0)var h=0;else{var y=i.suspendedLanes,A=i.pingedLanes;h=(1<<31-zt(42|e)+1)-1,h&=o&~(y&~A),h=h&201326677?h&201326677|1:h?h|2:0}h!==0&&(n=!0,Ip(i,h))}else h=je,h=ml(i,i===ke?h:0),(h&3)===0||Wa(i,h)||(n=!0,Ip(i,h));i=i.next}while(n);jf=!1}}function f1(){lu=Mf=!1;var e=0;Zn!==0&&(v1()&&(e=Zn),Zn=0);for(var t=Ct(),n=null,i=iu;i!==null;){var o=i.next,h=Gp(i,t);h===0?(i.next=null,n===null?iu=o:n.next=o,o===null&&(xa=n)):(n=i,(e!==0||(h&3)!==0)&&(lu=!0)),i=o}Bi(e)}function Gp(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,h=e.pendingLanes&-62914561;0"u"?null:document;function lm(e,t,n){var i=Na;if(i&&typeof t=="string"&&t){var o=It(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),im.has(o)||(im.add(o),e={rel:e,crossOrigin:n,href:t},i.querySelector(o)===null&&(t=i.createElement("link"),gt(t,"link",e),ct(t),i.head.appendChild(t)))}}function T1(e){Hr.D(e),lm("dns-prefetch",e,null)}function R1(e,t){Hr.C(e,t),lm("preconnect",e,t)}function x1(e,t,n){Hr.L(e,t,n);var i=Na;if(i&&e&&t){var o='link[rel="preload"][as="'+It(t)+'"]';t==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+It(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+It(n.imageSizes)+'"]')):o+='[href="'+It(e)+'"]';var h=o;switch(t){case"style":h=Ma(e);break;case"script":h=ja(e)}tr.has(h)||(e=E({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),tr.set(h,e),i.querySelector(o)!==null||t==="style"&&i.querySelector($i(h))||t==="script"&&i.querySelector(ki(h))||(t=i.createElement("link"),gt(t,"link",e),ct(t),i.head.appendChild(t)))}}function D1(e,t){Hr.m(e,t);var n=Na;if(n&&e){var i=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+It(i)+'"][href="'+It(e)+'"]',h=o;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=ja(e)}if(!tr.has(h)&&(e=E({rel:"modulepreload",href:e},t),tr.set(h,e),n.querySelector(o)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ki(h)))return}i=n.createElement("link"),gt(i,"link",e),ct(i),n.head.appendChild(i)}}}function N1(e,t,n){Hr.S(e,t,n);var i=Na;if(i&&e){var o=ea(i).hoistableStyles,h=Ma(e);t=t||"default";var y=o.get(h);if(!y){var A={loading:0,preload:null};if(y=i.querySelector($i(h)))A.loading=5;else{e=E({rel:"stylesheet",href:e,"data-precedence":t},n),(n=tr.get(h))&&Xf(e,n);var M=y=i.createElement("link");ct(M),gt(M,"link",e),M._p=new Promise(function(Y,ne){M.onload=Y,M.onerror=ne}),M.addEventListener("load",function(){A.loading|=1}),M.addEventListener("error",function(){A.loading|=2}),A.loading|=4,hu(y,t,i)}y={type:"stylesheet",instance:y,count:1,state:A},o.set(h,y)}}}function M1(e,t){Hr.X(e,t);var n=Na;if(n&&e){var i=ea(n).hoistableScripts,o=ja(e),h=i.get(o);h||(h=n.querySelector(ki(o)),h||(e=E({src:e,async:!0},t),(t=tr.get(o))&&Zf(e,t),h=n.createElement("script"),ct(h),gt(h,"link",e),n.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},i.set(o,h))}}function j1(e,t){Hr.M(e,t);var n=Na;if(n&&e){var i=ea(n).hoistableScripts,o=ja(e),h=i.get(o);h||(h=n.querySelector(ki(o)),h||(e=E({src:e,async:!0,type:"module"},t),(t=tr.get(o))&&Zf(e,t),h=n.createElement("script"),ct(h),gt(h,"link",e),n.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},i.set(o,h))}}function um(e,t,n,i){var o=(o=ue.current)?cu(o):null;if(!o)throw Error(f(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ma(n.href),n=ea(o).hoistableStyles,i=n.get(t),i||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ma(n.href);var h=ea(o).hoistableStyles,y=h.get(e);if(y||(o=o.ownerDocument||o,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,y),(h=o.querySelector($i(e)))&&!h._p&&(y.instance=h,y.state.loading=5),tr.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},tr.set(e,n),h||C1(o,e,n,y.state))),t&&i===null)throw Error(f(528,""));return y}if(t&&i!==null)throw Error(f(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ja(n),n=ea(o).hoistableScripts,i=n.get(t),i||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(f(444,e))}}function Ma(e){return'href="'+It(e)+'"'}function $i(e){return'link[rel="stylesheet"]['+e+"]"}function sm(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function C1(e,t,n,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),gt(t,"link",n),ct(t),e.head.appendChild(t))}function ja(e){return'[src="'+It(e)+'"]'}function ki(e){return"script[async]"+e}function fm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+It(n.href)+'"]');if(i)return t.instance=i,ct(i),i;var o=E({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),ct(i),gt(i,"style",o),hu(i,n.precedence,e),t.instance=i;case"stylesheet":o=Ma(n.href);var h=e.querySelector($i(o));if(h)return t.state.loading|=4,t.instance=h,ct(h),h;i=sm(n),(o=tr.get(o))&&Xf(i,o),h=(e.ownerDocument||e).createElement("link"),ct(h);var y=h;return y._p=new Promise(function(A,M){y.onload=A,y.onerror=M}),gt(h,"link",i),t.state.loading|=4,hu(h,n.precedence,e),t.instance=h;case"script":return h=ja(n.src),(o=e.querySelector(ki(h)))?(t.instance=o,ct(o),o):(i=n,(o=tr.get(h))&&(i=E({},n),Zf(i,o)),e=e.ownerDocument||e,o=e.createElement("script"),ct(o),gt(o,"link",i),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(f(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,hu(i,n.precedence,e));return t.instance}function hu(e,t,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=i.length?i[i.length-1]:null,h=o,y=0;y title"):null)}function L1(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function hm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Yi=null;function z1(){}function U1(e,t,n){if(Yi===null)throw Error(f(475));var i=Yi;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var o=Ma(n.href),h=e.querySelector($i(o));if(h){e=h._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(i.count++,i=pu.bind(i),e.then(i,i)),t.state.loading|=4,t.instance=h,ct(h);return}h=e.ownerDocument||e,n=sm(n),(o=tr.get(o))&&Xf(n,o),h=h.createElement("link"),ct(h);var y=h;y._p=new Promise(function(A,M){y.onload=A,y.onerror=M}),gt(h,"link",n),t.instance=h}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(i.count++,t=pu.bind(i),e.addEventListener("load",t),e.addEventListener("error",t))}}function B1(){if(Yi===null)throw Error(f(475));var e=Yi;return e.stylesheets&&e.count===0&&Qf(e,e.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(a){console.error(a)}}return r(),no.exports=eb(),no.exports}var rb=tb();const nb=bc(rb);var ab=typeof window<"u",ib=function(r,a){return ab?window.matchMedia(r).matches:!1},lb=function(r,a){var s=pe.useState(ib(r)),f=s[0],c=s[1];return pe.useEffect(function(){var u=!0,l=window.matchMedia(r),d=function(){u&&c(!!l.matches)};return l.addEventListener("change",d),c(l.matches),function(){u=!1,l.removeEventListener("change",d)}},[r]),f},br={STATIC:"STATIC",DEFAULT:"DEFAULT",TARGETING_MATCH:"TARGETING_MATCH",ERROR:"ERROR"},Fn=(r=>(r.PROVIDER_NOT_READY="PROVIDER_NOT_READY",r.PROVIDER_FATAL="PROVIDER_FATAL",r.FLAG_NOT_FOUND="FLAG_NOT_FOUND",r.PARSE_ERROR="PARSE_ERROR",r.TYPE_MISMATCH="TYPE_MISMATCH",r.TARGETING_KEY_MISSING="TARGETING_KEY_MISSING",r.INVALID_CONTEXT="INVALID_CONTEXT",r.GENERAL="GENERAL",r))(Fn||{}),fg=class og extends Error{constructor(a,s){super(a),Object.setPrototypeOf(this,og.prototype),this.name="OpenFeatureError",this.cause=s==null?void 0:s.cause}},Lm=class cg extends fg{constructor(a,s){super(a,s),Object.setPrototypeOf(this,cg.prototype),this.name="GeneralError",this.code="GENERAL"}},uo=class hg extends fg{constructor(a,s){super(a,s),Object.setPrototypeOf(this,hg.prototype),this.name="ParseError",this.code="PARSE_ERROR"}},dg=class{error(...r){console.error(...r)}warn(...r){console.warn(...r)}info(){}debug(){}},ub=["error","warn","info","debug"],sb=class{constructor(r){this.fallbackLogger=new dg;try{for(const a of ub)if(!r[a]||typeof r[a]!="function")throw new Error(`The provided logger is missing the ${a} method.`);this.logger=r}catch(a){console.error(a),console.error("Falling back to the default logger."),this.logger=this.fallbackLogger}}error(...r){this.log("error",...r)}warn(...r){this.log("warn",...r)}info(...r){this.log("info",...r)}debug(...r){this.log("debug",...r)}log(r,...a){try{this.logger[r](...a)}catch{this.fallbackLogger[r](...a)}}};function wu(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var so={exports:{}},zm;function fb(){return zm||(zm=1,(function(r,a){(function(s){r.exports=s()})(function(){return(function s(f,c,u){function l(p,g){if(!c[p]){if(!f[p]){var v=typeof wu=="function"&&wu;if(!g&&v)return v(p,!0);if(d)return d(p,!0);throw new Error("Cannot find module '"+p+"'")}g=c[p]={exports:{}},f[p][0].call(g.exports,function(T){var j=f[p][1][T];return l(j||T)},g,g.exports,s,f,c,u)}return c[p].exports}for(var d=typeof wu=="function"&&wu,m=0;m>16),ne((65280&N)>>8),ne(255&N);return Y==2?ne(255&(N=R($.charAt(D))<<2|R($.charAt(D+1))>>4)):Y==1&&(ne((N=R($.charAt(D))<<10|R($.charAt(D+1))<<4|R($.charAt(D+2))>>2)>>8&255),ne(255&N)),X},q.fromByteArray=function($){var D,N,Y,X,J=$.length%3,ee="";function ne(P){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P)}for(D=0,Y=$.length-J;D>18&63)+ne(X>>12&63)+ne(X>>6&63)+ne(63&X);switch(J){case 1:ee=(ee+=ne((N=$[$.length-1])>>2))+ne(N<<4&63)+"==";break;case 2:ee=(ee=(ee+=ne((N=($[$.length-2]<<8)+$[$.length-1])>>10))+ne(N>>4&63))+ne(N<<2&63)+"="}return ee}})(s===void 0?this.base64js={}:s)}).call(this,u("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},u("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(u,l,s){(function(o,c,y,p,m,v,S,L,C){var q=u("base64-js"),j=u("ieee754");function y(M,B,x){if(!(this instanceof y))return new y(M,B,x);var k,K,ae,pe,ge=typeof M;if(B==="base64"&&ge=="string")for(M=(pe=M).trim?pe.trim():pe.replace(/^\s+|\s+$/g,"");M.length%4!=0;)M+="=";if(ge=="number")k=le(M);else if(ge=="string")k=y.byteLength(M,B);else{if(ge!="object")throw new Error("First argument needs to be a number, array or string.");k=le(M.length)}if(y._useTypedArrays?K=y._augment(new Uint8Array(k)):((K=this).length=k,K._isBuffer=!0),y._useTypedArrays&&typeof M.byteLength=="number")K._set(M);else if(de(pe=M)||y.isBuffer(pe)||pe&&typeof pe=="object"&&typeof pe.length=="number")for(ae=0;ae>8,pe=pe%256,ge.push(pe),ge.push(ae);return ge}(B),M,x,k)}function E(M,B,x){var k="";x=Math.min(M.length,x);for(var K=B;K>>0)):(B+1>>0),K}function b(M,B,x,k){if(k||(re(typeof x=="boolean","missing or invalid endian"),re(B!=null,"missing offset"),re(B+1>>8*(k?ae:1-ae)}function Y(M,B,x,k,K){if(K||(re(B!=null,"missing value"),re(typeof k=="boolean","missing or invalid endian"),re(x!=null,"missing offset"),re(x+3>>8*(k?ae:3-ae)&255}function X(M,B,x,k,K){K||(re(B!=null,"missing value"),re(typeof k=="boolean","missing or invalid endian"),re(x!=null,"missing offset"),re(x+1this.length&&(k=this.length);var K=(k=M.length-B=this.length))return this[M]},y.prototype.readUInt16LE=function(M,B){return _(this,M,!0,B)},y.prototype.readUInt16BE=function(M,B){return _(this,M,!1,B)},y.prototype.readUInt32LE=function(M,B){return T(this,M,!0,B)},y.prototype.readUInt32BE=function(M,B){return T(this,M,!1,B)},y.prototype.readInt8=function(M,B){if(B||(re(M!=null,"missing offset"),re(M=this.length))return 128&this[M]?-1*(255-this[M]+1):this[M]},y.prototype.readInt16LE=function(M,B){return b(this,M,!0,B)},y.prototype.readInt16BE=function(M,B){return b(this,M,!1,B)},y.prototype.readInt32LE=function(M,B){return R(this,M,!0,B)},y.prototype.readInt32BE=function(M,B){return R(this,M,!1,B)},y.prototype.readFloatLE=function(M,B){return $(this,M,!0,B)},y.prototype.readFloatBE=function(M,B){return $(this,M,!1,B)},y.prototype.readDoubleLE=function(M,B){return D(this,M,!0,B)},y.prototype.readDoubleBE=function(M,B){return D(this,M,!1,B)},y.prototype.writeUInt8=function(M,B,x){x||(re(M!=null,"missing value"),re(B!=null,"missing offset"),re(B=this.length||(this[B]=M)},y.prototype.writeUInt16LE=function(M,B,x){N(this,M,B,!0,x)},y.prototype.writeUInt16BE=function(M,B,x){N(this,M,B,!1,x)},y.prototype.writeUInt32LE=function(M,B,x){Y(this,M,B,!0,x)},y.prototype.writeUInt32BE=function(M,B,x){Y(this,M,B,!1,x)},y.prototype.writeInt8=function(M,B,x){x||(re(M!=null,"missing value"),re(B!=null,"missing offset"),re(B=this.length||(0<=M?this.writeUInt8(M,B,x):this.writeUInt8(255+M+1,B,x))},y.prototype.writeInt16LE=function(M,B,x){X(this,M,B,!0,x)},y.prototype.writeInt16BE=function(M,B,x){X(this,M,B,!1,x)},y.prototype.writeInt32LE=function(M,B,x){J(this,M,B,!0,x)},y.prototype.writeInt32BE=function(M,B,x){J(this,M,B,!1,x)},y.prototype.writeFloatLE=function(M,B,x){ee(this,M,B,!0,x)},y.prototype.writeFloatBE=function(M,B,x){ee(this,M,B,!1,x)},y.prototype.writeDoubleLE=function(M,B,x){ne(this,M,B,!0,x)},y.prototype.writeDoubleBE=function(M,B,x){ne(this,M,B,!1,x)},y.prototype.fill=function(M,B,x){if(B=B||0,x=x||this.length,re(typeof(M=typeof(M=M||0)=="string"?M.charCodeAt(0):M)=="number"&&!isNaN(M),"value is not a number"),re(B<=x,"end < start"),x!==B&&this.length!==0){re(0<=B&&B"},y.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(y._useTypedArrays)return new y(this).buffer;for(var M=new Uint8Array(this.length),B=0,x=M.length;B=B.length||K>=M.length);K++)B[K+x]=M[K];return K}function O(M){try{return decodeURIComponent(M)}catch{return"�"}}function V(M,B){re(typeof M=="number","cannot write a non-number as a number"),re(0<=M,"specified a negative value for writing an unsigned value"),re(M<=B,"value is larger than maximum value for type"),re(Math.floor(M)===M,"value has a fractional component")}function W(M,B,x){re(typeof M=="number","cannot write a non-number as a number"),re(M<=B,"value larger than maximum allowed value"),re(x<=M,"value smaller than minimum allowed value"),re(Math.floor(M)===M,"value has a fractional component")}function me(M,B,x){re(typeof M=="number","cannot write a non-number as a number"),re(M<=B,"value larger than maximum allowed value"),re(x<=M,"value smaller than minimum allowed value")}function re(M,B){if(!M)throw new Error(B||"Failed assertion")}y._augment=function(M){return M._isBuffer=!0,M._get=M.get,M._set=M.set,M.get=P.get,M.set=P.set,M.write=P.write,M.toString=P.toString,M.toLocaleString=P.toString,M.toJSON=P.toJSON,M.copy=P.copy,M.slice=P.slice,M.readUInt8=P.readUInt8,M.readUInt16LE=P.readUInt16LE,M.readUInt16BE=P.readUInt16BE,M.readUInt32LE=P.readUInt32LE,M.readUInt32BE=P.readUInt32BE,M.readInt8=P.readInt8,M.readInt16LE=P.readInt16LE,M.readInt16BE=P.readInt16BE,M.readInt32LE=P.readInt32LE,M.readInt32BE=P.readInt32BE,M.readFloatLE=P.readFloatLE,M.readFloatBE=P.readFloatBE,M.readDoubleLE=P.readDoubleLE,M.readDoubleBE=P.readDoubleBE,M.writeUInt8=P.writeUInt8,M.writeUInt16LE=P.writeUInt16LE,M.writeUInt16BE=P.writeUInt16BE,M.writeUInt32LE=P.writeUInt32LE,M.writeUInt32BE=P.writeUInt32BE,M.writeInt8=P.writeInt8,M.writeInt16LE=P.writeInt16LE,M.writeInt16BE=P.writeInt16BE,M.writeInt32LE=P.writeInt32LE,M.writeInt32BE=P.writeInt32BE,M.writeFloatLE=P.writeFloatLE,M.writeFloatBE=P.writeFloatBE,M.writeDoubleLE=P.writeDoubleLE,M.writeDoubleBE=P.writeDoubleBE,M.fill=P.fill,M.inspect=P.inspect,M.toArrayBuffer=P.toArrayBuffer,M}}).call(this,u("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},u("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(u,l,s){(function(o,c,q,p,m,v,S,L,C){var q=u("buffer").Buffer,j=4,y=new q(j);y.fill(0),l.exports={hash:function(A,g,E,_){for(var T=g(function(N,Y){N.length%j!=0&&(X=N.length+(j-N.length%j),N=q.concat([N,y],X));for(var X,J=[],ee=Y?N.readInt32BE:N.readInt32LE,ne=0;neE?se=P(se):se.length>5]|=128<>>9<<4)]=R;for(var $=1732584193,D=-271733879,N=-1732584194,Y=271733878,X=0;X>>32-N,$)}function A(b,R,$,D,N,Y,X){return y(R&$|~R&D,b,R,N,Y,X)}function g(b,R,$,D,N,Y,X){return y(R&D|$&~D,b,R,N,Y,X)}function E(b,R,$,D,N,Y,X){return y(R^$^D,b,R,N,Y,X)}function _(b,R,$,D,N,Y,X){return y($^(R|~D),b,R,N,Y,X)}function T(b,R){var $=(65535&b)+(65535&R);return(b>>16)+(R>>16)+($>>16)<<16|65535&$}l.exports=function(b){return q.hash(b,j,16)}}).call(this,u("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},u("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(u,l,s){(function(o,c,d,p,m,v,S,L,C){l.exports=function(q){for(var j,y=new Array(q),A=0;A>>((3&A)<<3)&255;return y}}).call(this,u("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},u("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(u,l,s){(function(o,c,d,p,m,v,S,L,C){var q=u("./helpers");function j(g,E){g[E>>5]|=128<<24-E%32,g[15+(E+64>>9<<4)]=E;for(var _,T,b,R=Array(80),$=1732584193,D=-271733879,N=-1732584194,Y=271733878,X=-1009589776,J=0;J>16)+(E>>16)+(_>>16)<<16|65535&_}function A(g,E){return g<>>32-E}l.exports=function(g){return q.hash(g,j,20,!0)}}).call(this,u("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},u("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(u,l,s){(function(o,c,d,p,m,v,S,L,C){function q(E,_){var T=(65535&E)+(65535&_);return(E>>16)+(_>>16)+(T>>16)<<16|65535&T}function j(E,_){var T,b=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),R=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),$=new Array(64);E[_>>5]|=128<<24-_%32,E[15+(_+64>>9<<4)]=_;for(var D,N,Y=0;Y>>_|E<<32-_},g=function(E,_){return E>>>_};l.exports=function(E){return y.hash(E,j,32,!0)}}).call(this,u("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},u("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(u,l,s){(function(o,c,d,p,m,v,S,L,C){s.read=function(q,j,y,A,Y){var E,_,T=8*Y-A-1,b=(1<>1,$=-7,D=y?Y-1:0,N=y?-1:1,Y=q[j+D];for(D+=N,E=Y&(1<<-$)-1,Y>>=-$,$+=T;0<$;E=256*E+q[j+D],D+=N,$-=8);for(_=E&(1<<-$)-1,E>>=-$,$+=A;0<$;_=256*_+q[j+D],D+=N,$-=8);if(E===0)E=1-R;else{if(E===b)return _?NaN:1/0*(Y?-1:1);_+=Math.pow(2,A),E-=R}return(Y?-1:1)*_*Math.pow(2,E-A)},s.write=function(q,j,y,A,g,X){var _,T,b=8*X-g-1,R=(1<>1,D=g===23?Math.pow(2,-24)-Math.pow(2,-77):0,N=A?0:X-1,Y=A?1:-1,X=j<0||j===0&&1/j<0?1:0;for(j=Math.abs(j),isNaN(j)||j===1/0?(T=isNaN(j)?1:0,_=R):(_=Math.floor(Math.log(j)/Math.LN2),j*(A=Math.pow(2,-_))<1&&(_--,A*=2),2<=(j+=1<=_+$?D/A:D*Math.pow(2,1-$))*A&&(_++,A/=2),R<=_+$?(T=0,_=R):1<=_+$?(T=(j*A-1)*Math.pow(2,g),_+=$):(T=j*Math.pow(2,$-1)*Math.pow(2,g),_=0));8<=g;q[y+N]=255&T,N+=Y,T/=256,g-=8);for(_=_<"u"?1:0;let s=l?n[0]:u;for(let o=l;o/g,""),/\.{3}|=/.test(i))?0:n.length}function wv(n,...i){let u="";const l=this;for(let s=0;sJa(l,i,u));if(n&&typeof n=="object"){const l=Object.keys(n)[0],s=n[l];if(i.isData(n,l)||s===void 0)return!0;if(!i.methods[l])throw new Error(`Method '${l}' was not found in the Logic Engine.`);return i.methods[l].traverse===!1?typeof i.methods[l].deterministic=="function"?i.methods[l].deterministic(s,u):i.methods[l].deterministic:typeof i.methods[l].deterministic=="function"?i.methods[l].deterministic(s,u):i.methods[l].deterministic&&Ja(s,i,u)}return!0}function sd(n,i){if(!i.async)return!0;if(Array.isArray(n))return n.every(u=>sd(u,i));if(typeof n=="object"){const u=Object.keys(n)[0],l=n[u];return cn(i.methods[u])?i.methods[u].traverse===!1?!!(typeof i.methods[u][tt]=="function"&&i.methods[u][tt](n,{engine:i})):sd(l,i):!1}return!0}function qe(n,i={}){const{notTraversed:u=[],async:l,processing:s=[],values:o=[],engine:c}=i;function d(S,L=!1){return MS(S,L)?JSON.stringify(S):(o.push(S),`values[${o.length-1}]`)}if(Array.isArray(n)){let S="";for(let L=0;L0&&(S+=","),S+=qe(n[L],i);return"["+S+"]"}let p=!1;function m(S){return i.asyncDetected=i.asyncDetected||p,l&&p?`await ${S}`:S}const v=n&&Object.keys(n)[0];if(n&&typeof n=="object"){if(!v)return d(n);if(!c.methods[v]){if(c.isData(n,v))return d(n,!0);throw new Error(`Method '${v}' was not found in the Logic Engine.`)}if(!i.engine.disableInline&&c.methods[v]&&Ja(n,c,i))return sd(n,c)?d((c.fallback||c).run(n),!0):i.avoidInlineAsync?(i.asyncDetected=!0,`(await ${d(c.run(n))})`):(s.push(c.run(n).then(q=>d(q))),`__%%%${s.length-1}%%%__`);let S=n[v];if((!S||typeof S!="object")&&(S=[S]),c.methods[v]&&c.methods[v].compile){let q=c.methods[v].compile(S,i);if(q[Qa]&&(q=q[Qa]),(q||"").startsWith("await")&&(i.asyncDetected=!0),q!==!1)return q}let L=c.methods[v].optimizeUnary?"":"coerceArray";!L&&Array.isArray(S)&&S.length===1?S=S[0]:L&&Array.isArray(S)&&(L="");const C=[", context",", context, above",", context, above, engine"];if(typeof c.methods[v]=="function"){p=!cn(c.methods[v]);const q=C[Vy(c.methods[v])-1]||C[2];return m(`engine.methods["${v}"](${L}(`+qe(S,i)+")"+q+")")}else{p=!!(l&&c.methods[v]&&c.methods[v].asyncMethod);const q=Vy(p?c.methods[v].asyncMethod:c.methods[v].method),j=C[q-1]||C[2];return c.methods[v]&&(typeof c.methods[v].traverse>"u"||c.methods[v].traverse)?m(`engine.methods["${v}"]${p?".asyncMethod":".method"}(${L}(`+qe(S,i)+")"+j+")"):(u.push(S),m(`engine.methods["${v}"]${p?".asyncMethod":".method"}(notTraversed[${u.length-1}]`+j+")"))}}return d(n)}function hs(n,i={}){Object.assign(i,Object.assign({notTraversed:[],methods:[],state:{},processing:[],async:i.engine.async,asyncDetected:!1,values:[],compile:wv},i));const u=qe(n,i);return Av(n,u,i)}async function CS(n,i={}){Object.assign(i,Object.assign({notTraversed:[],methods:[],state:{},processing:[],async:i.engine.async,asyncDetected:!1,values:[],compile:wv},i));const u=qe(n,i);return i.processing=await Promise.all(i.processing||[]),Av(n,u,i)}function Av(n,i,u){const{engine:l,methods:s,notTraversed:o,processing:c=[],values:d}=u,p=[];c.forEach((v,S)=>{i=i.replace(`__%%%${S}%%%__`,v)});const m=`(values, methods, notTraversed, asyncIterators, engine, above, coerceArray) => ${u.asyncDetected?"async":""} (context ${u.extraArguments?","+u.extraArguments:""}) => { const result = ${i}; return result }`;return Object.assign((typeof globalThis<"u"?globalThis:global).eval(m)(d,s,o,ds,l,p,br),{[tt]:!u.asyncDetected,aboveDetected:typeof i=="string"&&i.includes(", above")})}const xS=()=>{try{const n={};return(typeof globalThis<"u"?globalThis:global).eval("(test) => test?.foo?.bar")(n)===void 0}catch{return!1}},$v=xS();class En extends Error{constructor(i){super(),this.message="Built-in control structures are not allowed to receive dynamic inputs, this could allow a lesser version of remote-code execution.",this.input=i}}const Pa=new Map;function ps(n){if(Pa.has(n))return Pa.get(n);Pa.size>2048&&Pa.clear();const i=LS(n);return Pa.set(n,i),i}function LS(n,i=".",u="\\",l="/"){const s=[];let o="";for(let c=0;crn(l,i,u));if(n&&typeof n=="object"){const l=Object.keys(n)[0],s=n[l];if(i.isData(n,l))return!0;if(!i.methods[l])throw new Error(`Method '${l}' was not found in the Logic Engine.`);return i.methods[l].traverse===!1?typeof i.methods[l].deterministic=="function"?i.methods[l].deterministic(s,u):i.methods[l].deterministic:typeof i.methods[l].deterministic=="function"?i.methods[l].deterministic(s,u):i.methods[l].deterministic&&rn(s,i,u)}return!0}function gr(n,i,u){if(Array.isArray(n))return n.every(l=>gr(l,i,u));if(n&&typeof n=="object"){const l=Object.keys(n)[0],s=n[l];if(i.isData(n,l))return!0;if(!i.methods[l])throw new Error(`Method '${l}' was not found in the Logic Engine.`);return i.methods[l].traverse===!1?typeof i.methods[l][tt]=="function"?i.methods[l][tt](s,u):i.methods[l][tt]:typeof i.methods[l][tt]=="function"?i.methods[l][tt](s,u):i.methods[l][tt]&&gr(s,i,u)}return!0}const Ae={"+":n=>{if(typeof n=="string"||typeof n=="number")return+n;let i=0;for(let u=0;u{let i=1;for(let u=0;u{let i=n[0];for(let u=1;u{if(typeof n=="string"||typeof n=="number")return-n;if(n.length===1)return-n[0];let i=n[0];for(let u=1;u{let i=n[0];for(let u=1;uMath.max(...n),min:n=>Math.min(...n),in:([n,i])=>(i||[]).includes(n),">":([n,i])=>n>i,"<":([n,i,u])=>u===void 0?nn,!0),[tt]:()=>!0},if:{method:(n,i,u,l)=>{if(!Array.isArray(n))throw new En(n);if(n.length===1)return l.run(n[0],i,{above:u});if(n.length<2)return null;n=[...n],n.length%2!==1&&n.push(null);const s=n.pop();for(;n.length;){const o=n.shift(),c=n.shift(),d=l.run(o,i,{above:u});if(l.truthy(d))return l.run(c,i,{above:u})}return l.run(s,i,{above:u})},[tt]:(n,i)=>gr(n,i.engine,i),deterministic:(n,i)=>rn(n,i.engine,i),asyncMethod:async(n,i,u,l)=>{if(!Array.isArray(n))throw new En(n);if(n.length===1)return l.run(n[0],i,{above:u});if(n.length<2)return null;n=[...n],n.length%2!==1&&n.push(null);const s=n.pop();for(;n.length;){const o=n.shift(),c=n.shift(),d=await l.run(o,i,{above:u});if(l.truthy(d))return l.run(c,i,{above:u})}return l.run(s,i,{above:u})},traverse:!1},"<=":([n,i,u])=>u===void 0?n<=i:n<=i&&i<=u,">=":([n,i])=>n>=i,"==":([n,i])=>n==i,"===":([n,i])=>n===i,"!=":([n,i])=>n!=i,"!==":([n,i])=>n!==i,xor:([n,i])=>n^i,or:{method:(n,i,u,l)=>{const s=Array.isArray(n);s||(n=l.run(n,i,{above:u}));let o;for(let c=0;c{const s=Array.isArray(n);s||(n=await l.run(n,i,{above:u}));let o;for(let c=0;crn(n,i.engine,i),compile:(n,i)=>i.engine.truthy.IDENTITY?Array.isArray(n)?`(${n.map(u=>qe(u,i)).join(" || ")})`:`(${qe(n,i)}).reduce((a,b) => a||b, false)`:!1,traverse:!1},and:{method:(n,i,u,l)=>{const s=Array.isArray(n);s||(n=l.run(n,i,{above:u}));let o;for(let c=0;c{const s=Array.isArray(n);s||(n=await l.run(n,i,{above:u}));let o;for(let c=0;crn(n,i.engine,i),compile:(n,i)=>i.engine.truthy.IDENTITY?Array.isArray(n)?`(${n.map(u=>qe(u,i)).join(" && ")})`:`(${qe(n,i)}).reduce((a,b) => a&&b, true)`:!1},substr:([n,i,u])=>{if(u<0){const l=n.substr(i);return l.substr(0,l.length+u)}return n.substr(i,u)},length:([n])=>typeof n=="string"||Array.isArray(n)?n.length:n&&typeof n=="object"?Object.keys(n).length:0,get:{method:([n,i,u],l,s,o)=>{const c=u===void 0?null:u,d=ps(String(i));for(let p=0;p{let s;Array.isArray(n)&&(s=n[1],n=n[0]);let o=0;for(;typeof n=="string"&&n.startsWith("../")&&o"u"||n===""||n===null)return l.allowFunctions||typeof i!="function"?i:null;const d=ps(String(n));for(let p=0;p(Array.isArray(n)?n:[n]).filter(s=>Ae.var(s,i,u,l)===null),missing_some:([n,i],u,l,s)=>{const o=Ae.missing(i,u,l,s);return i.length-o.length>=n?[]:o},map:Ka("map"),some:Ka("some",!0),all:Ka("every",!0),none:{traverse:!1,method:(n,i,u,l)=>!Ae.some.method(n,i,u,l),asyncMethod:async(n,i,u,l)=>!await Ae.some.asyncMethod(n,i,u,l),compile:(n,i)=>{const u=Ae.some.compile(n,i);return u?i.compile`!(${u})`:!1}},merge:n=>Array.isArray(n)?[].concat(...n):[n],every:Ka("every"),filter:Ka("filter"),reduce:{deterministic:(n,i)=>rn(n[0],i.engine,i)&&rn(n[1],i.engine,{...i,insideIterator:!0}),compile:(n,i)=>{if(!Array.isArray(n))throw new En(n);const{async:u}=i;let[l,s,o]=n;l=qe(l,i),typeof o<"u"&&(o=qe(o,i));const c={...i,extraArguments:"above",avoidInlineAsync:!0};s=hs(s,c);const d=s.aboveDetected?"[null, context, above]":"null";return i.methods.push(s),u&&(!cn(s)||l.includes("await"))?(i.detectAsync=!0,typeof o<"u"?`await asyncIterators.reduce(${l} || [], (a,b) => methods[${i.methods.length-1}]({ accumulator: a, current: b }, ${d}), ${o})`:`await asyncIterators.reduce(${l} || [], (a,b) => methods[${i.methods.length-1}]({ accumulator: a, current: b }, ${d}))`):typeof o<"u"?`(${l} || []).reduce((a,b) => methods[${i.methods.length-1}]({ accumulator: a, current: b }, ${d}), ${o})`:`(${l} || []).reduce((a,b) => methods[${i.methods.length-1}]({ accumulator: a, current: b }, ${d}))`},method:(n,i,u,l)=>{if(!Array.isArray(n))throw new En(n);let[s,o,c]=n;c=l.run(c,i,{above:u}),s=l.run(s,i,{above:u})||[];const d=(p,m)=>l.run(o,{accumulator:p,current:m},{above:[s,i,u]});return typeof c>"u"?s.reduce(d):s.reduce(d,c)},[tt]:(n,i)=>gr(n,i.engine,i),asyncMethod:async(n,i,u,l)=>{if(!Array.isArray(n))throw new En(n);let[s,o,c]=n;return c=await l.run(c,i,{above:u}),s=await l.run(s,i,{above:u})||[],ds.reduce(s,(d,p)=>l.run(o,{accumulator:d,current:p},{above:[s,i,u]}),c)},traverse:!1},"!":(n,i,u,l)=>Array.isArray(n)?!l.truthy(n[0]):!l.truthy(n),"!!":(n,i,u,l)=>!!(Array.isArray(n)?l.truthy(n[0]):l.truthy(n)),cat:n=>{if(typeof n=="string")return n;let i="";for(let u=0;utypeof n=="object"?Object.keys(n):[],pipe:{traverse:!1,[tt]:(n,i)=>gr(n,i.engine,i),method:(n,i,u,l)=>{if(!Array.isArray(n))throw new Error("Data for pipe must be an array");let s=l.run(n[0],i,{above:[n,i,u]});for(let o=1;o{if(!Array.isArray(n))throw new Error("Data for pipe must be an array");let s=await l.run(n[0],i,{above:[n,i,u]});for(let o=1;o{let u=i.compile`${n[0]}`;for(let l=1;l{if(!Array.isArray(n))return!1;n=[...n];const u=n.shift();return rn(u,i.engine,i)&&rn(n,i.engine,{...i,insideIterator:!0})}},eachKey:{traverse:!1,[tt]:(n,i)=>gr(Object.values(n[Object.keys(n)[0]]),i.engine,i),method:(n,i,u,l)=>Object.keys(n).reduce((o,c)=>{const d=n[c];return Object.defineProperty(o,c,{enumerable:!0,value:l.run(d,i,{above:u})}),o},{}),deterministic:(n,i)=>{if(n&&typeof n=="object")return Object.values(n).every(u=>rn(u,i.engine,i));throw new En(n)},compile:(n,i)=>{if(n&&typeof n=="object")return`({ ${Object.keys(n).reduce((l,s)=>(l.push(`${JSON.stringify(s)}: ${qe(n[s],i)}`),l),[]).join(",")} })`;throw new En(n)},asyncMethod:async(n,i,u,l)=>await ds.reduce(Object.keys(n),async(o,c)=>{const d=n[c];return Object.defineProperty(o,c,{enumerable:!0,value:await l.run(d,i,{above:u})}),o},{})}};function Ka(n,i=!1){return{deterministic:(u,l)=>rn(u[0],l.engine,l)&&rn(u[1],l.engine,{...l,insideIterator:!0}),[tt]:(u,l)=>gr(u,l.engine,l),method:(u,l,s,o)=>{if(!Array.isArray(u))throw new En(u);let[c,d]=u;return c=o.run(c,l,{above:s})||[],c[n]((p,m)=>{const v=o.run(d,p,{above:[{iterator:c,index:m},l,s]});return i?o.truthy(v):v})},asyncMethod:async(u,l,s,o)=>{if(!Array.isArray(u))throw new En(u);let[c,d]=u;return c=await o.run(c,l,{above:s})||[],ds[n](c,(p,m)=>{const v=o.run(d,p,{above:[{iterator:c,index:m},l,s]});return i?o.truthy(v):v})},compile:(u,l)=>{if(!Array.isArray(u))throw new En(u);const{async:s}=l,[o,c]=u,d={...l,avoidInlineAsync:!0,iteratorCompile:!0,extraArguments:"index, above"},p=hs(c,d),m=p.aboveDetected?l.compile`[{ iterator: z, index: x }, context, above]`:l.compile`null`;return s&&!gr(c,l.engine,l)?(l.detectAsync=!0,l.compile`await asyncIterators[${n}](${o} || [], async (i, x, z) => ${p}(i, x, ${m}))`):l.compile`(${o} || [])[${n}]((i, x, z) => ${p}(i, x, ${m}))`},traverse:!1}}Ae["?:"]=Ae.if;Object.keys(Ae).forEach(n=>{typeof Ae[n]=="function"&&(Ae[n][tt]=!0),Ae[n].deterministic=typeof Ae[n].deterministic>"u"?!0:Ae[n].deterministic});Ae.var.deterministic=(n,i)=>i.insideIterator&&!String(n).includes("../../");Object.assign(Ae.missing,{deterministic:!1});Object.assign(Ae.missing_some,{deterministic:!1});Ae["<"].compile=function(n,i){return Array.isArray(n)?n.length===2?i.compile`(${n[0]} < ${n[1]})`:n.length===3?i.compile`(${n[0]} < ${n[1]} && ${n[1]} < ${n[2]})`:!1:!1};Ae["<="].compile=function(n,i){return Array.isArray(n)?n.length===2?i.compile`(${n[0]} <= ${n[1]})`:n.length===3?i.compile`(${n[0]} <= ${n[1]} && ${n[1]} <= ${n[2]})`:!1:!1};Ae.min.compile=function(n,i){return Array.isArray(n)?`Math.min(${n.map(u=>qe(u,i)).join(", ")})`:!1};Ae.max.compile=function(n,i){return Array.isArray(n)?`Math.max(${n.map(u=>qe(u,i)).join(", ")})`:!1};Ae[">"].compile=function(n,i){return!Array.isArray(n)||n.length!==2?!1:i.compile`(${n[0]} > ${n[1]})`};Ae[">="].compile=function(n,i){return!Array.isArray(n)||n.length!==2?!1:i.compile`(${n[0]} >= ${n[1]})`};Ae["=="].compile=function(n,i){return!Array.isArray(n)||n.length!==2?!1:i.compile`(${n[0]} == ${n[1]})`};Ae["!="].compile=function(n,i){return!Array.isArray(n)||n.length!==2?!1:i.compile`(${n[0]} != ${n[1]})`};Ae.if.compile=function(n,i){if(!Array.isArray(n)||n.length<3)return!1;n=[...n],n.length%2!==1&&n.push(null);const u=n.pop();let l=i.compile``;for(;n.length;){const s=n.shift(),o=n.shift();l=i.compile`${l} engine.truthy(${s}) ? ${o} : `}return i.compile`(${l} ${u})`};Ae["==="].compile=function(n,i){return!Array.isArray(n)||n.length!==2?!1:i.compile`(${n[0]} === ${n[1]})`};Ae["+"].compile=function(n,i){return Array.isArray(n)?`(${n.map(u=>`(+${qe(u,i)})`).join(" + ")})`:typeof n=="string"||typeof n=="number"?`(+${qe(n,i)})`:`([].concat(${qe(n,i)})).reduce((a,b) => (+a)+(+b), 0)`};Ae["%"].compile=function(n,i){return Array.isArray(n)?`(${n.map(u=>`(+${qe(u,i)})`).join(" % ")})`:`(${qe(n,i)}).reduce((a,b) => (+a)%(+b))`};Ae.in.compile=function(n,i){return Array.isArray(n)?i.compile`(${n[1]} || []).includes(${n[0]})`:!1};Ae["-"].compile=function(n,i){return Array.isArray(n)?`${n.length===1?"-":""}(${n.map(u=>`(+${qe(u,i)})`).join(" - ")})`:typeof n=="string"||typeof n=="number"?`(-${qe(n,i)})`:`((a=>(a.length===1?a[0]=-a[0]:a)&0||a)([].concat(${qe(n,i)}))).reduce((a,b) => (+a)-(+b))`};Ae["/"].compile=function(n,i){return Array.isArray(n)?`(${n.map(u=>`(+${qe(u,i)})`).join(" / ")})`:`(${qe(n,i)}).reduce((a,b) => (+a)/(+b))`};Ae["*"].compile=function(n,i){return Array.isArray(n)?`(${n.map(u=>`(+${qe(u,i)})`).join(" * ")})`:`(${qe(n,i)}).reduce((a,b) => (+a)*(+b))`};Ae.cat.compile=function(n,i){if(typeof n=="string")return JSON.stringify(n);if(!Array.isArray(n))return!1;let u=i.compile`''`;for(let l=0;l"u"?null:n[2],l&&typeof l=="object")return!1;l=l.toString();const o=ps(l);return $v?`((${qe(s,i)})${o.map(c=>`?.[${qe(c,i)}]`).join("")} ?? ${qe(u,i)})`:`(((a,b) => (typeof a === 'undefined' || a === null) ? b : a)(${o.reduce((c,d)=>`(${c}||0)[${JSON.stringify(d)}]`,`(${qe(s,i)}||0)`)}, ${qe(u,i)}))`}return!1};Ae.var.compile=function(n,i){let u=n,l=null;if(i.varTop=i.varTop||new Set,!u||typeof n=="string"||typeof n=="number"||Array.isArray(n)&&n.length<=2){if(Array.isArray(n)&&(u=n[0],l=typeof n[1]>"u"?null:n[1]),u==="../index"&&i.iteratorCompile)return"index";if(typeof u>"u"||u===null||u==="")return"context";if(typeof u!="string"&&typeof u!="number"||(u=u.toString(),u.includes("../")))return!1;const s=ps(u),[o]=s;return i.varTop.add(o),i.engine.allowFunctions?i.methods.preventFunctions=c=>c:i.methods.preventFunctions=c=>typeof c=="function"?null:c,$v?`(methods.preventFunctions(context${s.map(c=>`?.[${JSON.stringify(c)}]`).join("")} ?? ${qe(l,i)}))`:`(methods.preventFunctions(((a,b) => (typeof a === 'undefined' || a === null) ? b : a)(${s.reduce((c,d)=>`(${c}||0)[${JSON.stringify(d)}]`,"(context||0)")}, ${qe(l,i)})))`}return!1};Ae["+"].optimizeUnary=Ae["-"].optimizeUnary=Ae.var.optimizeUnary=Ae["!"].optimizeUnary=Ae["!!"].optimizeUnary=Ae.cat.optimizeUnary=!0;const Ed={...Ae},Ov=function(i){return Object.keys(i).forEach(u=>{i[u]===void 0&&delete i[u]}),i};function qS(n,i,u,l){const s=i.methods[u],o=s.method?s.method:s;if(s.traverse===!1){const d=n[u];return(p,m)=>o(d,p,m||l,i)}let c=n[u];if((!c||typeof c!="object")&&(c=[c]),Array.isArray(c)){const d=c.map(p=>ms(p,i,l));return(p,m)=>{const v=d.map(S=>typeof S=="function"?S(p,m):S);return o(v,p,m||l,i)}}else{const d=ms(c,i,l);return(p,m)=>o(br(typeof d=="function"?d(p,m):d,s.optimizeUnary),p,m||l,i)}}function ms(n,i,u=[]){if(Array.isArray(n)){const l=n.map(s=>ms(s,i,u));return(s,o)=>l.map(c=>typeof c=="function"?c(s,o):c)}if(n&&typeof n=="object"){const s=Object.keys(n)[0];if(i.isData(n,s))return()=>n;const c=!i.disableInline&&Ja(n,i,{engine:i});if(s in i.methods){const d=qS(n,i,s,u);return c?d():d}}return n}const rs=Ed.all,US={method:(n,i,u,l)=>{if(Array.isArray(n)){const s=l.run(n[0],i,u);if(Array.isArray(s)&&s.length===0)return!1}return rs.method(n,i,u,l)},asyncMethod:async(n,i,u,l)=>{if(Array.isArray(n)){const s=await l.run(n[0],i,u);if(Array.isArray(s)&&s.length===0)return!1}return rs.asyncMethod(n,i,u,l)},deterministic:rs.deterministic,traverse:rs.traverse};function zS(n){return Array.isArray(n)&&n.length===0?!1:n}function Tv(n){n.methods.all=US,n.truthy=zS}class _d{constructor(i=Ed,u={disableInline:!1,disableInterpretedOptimization:!1,permissive:!1}){this.disableInline=u.disableInline,this.disableInterpretedOptimization=u.disableInterpretedOptimization,this.methods={...i},this.optimizedMap=new WeakMap,this.missesSinceSeen=0,u.compatible&&Tv(this),this.options={disableInline:u.disableInline,disableInterpretedOptimization:u.disableInterpretedOptimization},this.isData||(u.permissive?this.isData=(l,s)=>!(s in this.methods):this.isData=()=>!1)}truthy(i){return i}_parse(i,u,l){const[s]=Object.keys(i),o=i[s];if(this.isData(i,s))return i;if(!this.methods[s])throw new Error(`Method '${s}' was not found in the Logic Engine.`);if(typeof this.methods[s]=="function"){const c=!o||typeof o!="object"?[o]:br(this.run(o,u,{above:l}));return this.methods[s](c,u,l,this)}if(typeof this.methods[s]=="object"){const{method:c,traverse:d}=this.methods[s],m=(typeof d>"u"?!0:d)?!o||typeof o!="object"?[o]:br(this.run(o,u,{above:l})):o;return c(m,u,l,this)}throw new Error(`Method '${s}' is not set up properly.`)}addMethod(i,u,{deterministic:l,optimizeUnary:s}={}){typeof u=="function"?u={method:u,traverse:!0}:u={...u},Object.assign(u,Ov({deterministic:l,optimizeUnary:s})),this.methods[i]=kn(u)}addModule(i,u,l){Object.getOwnPropertyNames(u).forEach(s=>{(typeof u[s]=="function"||typeof u[s]=="object")&&this.addMethod(`${i}${i?".":""}${s}`,u[s],l)})}run(i,u={},l={}){const{above:s=[]}=l;if(this.missesSinceSeen>500&&(this.disableInterpretedOptimization=!0,this.missesSinceSeen=0),!this.disableInterpretedOptimization&&typeof i=="object"&&i&&!this.optimizedMap.has(i))return this.optimizedMap.set(i,ms(i,this,s)),this.missesSinceSeen++,typeof this.optimizedMap.get(i)=="function"?this.optimizedMap.get(i)(u,s):this.optimizedMap.get(i);if(!this.disableInterpretedOptimization&&i&&typeof i=="object"&&this.optimizedMap.get(i))return this.missesSinceSeen=0,typeof this.optimizedMap.get(i)=="function"?this.optimizedMap.get(i)(u,s):this.optimizedMap.get(i);if(Array.isArray(i)){const o=[];for(let c=0;c0?this._parse(i,u,s):i}build(i,u={}){const{above:l=[],top:s=!0}=u;if(s){const o=hs(i,{state:{},engine:this,above:l});return typeof o=="function"||s===!0?(...c)=>typeof o=="function"?o(...c):o:o}return i}}Object.assign(_d.prototype.truthy,{IDENTITY:!0});function IS(n,i,u,l){const s=i.methods[u],o=s.asyncMethod?s.asyncMethod:s.method?s.method:s;if(s.traverse===!1){if(typeof s[tt]=="function"&&s[tt](n,{engine:i})){const p=s.method?s.method:s;return kn((m,v)=>p(n[u],m,v||l,i.fallback),!0)}const d=n[u];return(p,m)=>o(d,p,m||l,i)}let c=n[u];if((!c||typeof c!="object")&&(c=[c]),Array.isArray(c)){const d=c.map(p=>gs(p,i,l));if(cn(d)&&(s.method||s[tt])){const p=s.method?s.method:s;return kn((m,v)=>{const S=d.map(L=>typeof L=="function"?L(m,v):L);return p(S,m,v||l,i.fallback)},!0)}return async(p,m)=>{const v=await bd(d,S=>typeof S=="function"?S(p,m):S);return o(v,p,m||l,i)}}else{const d=gs(c,i,l);if(cn(d)&&(s.method||s[tt])){const p=s.method?s.method:s;return kn((m,v)=>p(br(typeof d=="function"?d(m,v):d,s.optimizeUnary),m,v||l,i),!0)}return async(p,m)=>o(br(typeof d=="function"?await d(p,m):d,s.optimizeUnary),p,m||l,i)}}function gs(n,i,u=[]){if(i.fallback.allowFunctions=i.allowFunctions,Array.isArray(n)){const l=n.map(s=>gs(s,i,u));return cn(l)?kn((s,o)=>l.map(c=>typeof c=="function"?c(s,o):c),!0):async(s,o)=>bd(l,c=>typeof c=="function"?c(s,o):c)}if(n&&typeof n=="object"){const s=Object.keys(n)[0];if(i.isData(n,s))return()=>n;const c=!i.disableInline&&Ja(n,i,{engine:i});if(s in i.methods){const d=IS(n,i,s,u);if(c){let p;return cn(d)?kn(()=>(p||(p=d()),p),!0):async()=>(p||(p=await d()),p)}return d}}return n}class BS{constructor(i=Ed,u={disableInline:!1,disableInterpretedOptimization:!1,permissive:!1}){this.methods={...i},this.options={disableInline:u.disableInline,disableInterpretedOptimization:u.disableInterpretedOptimization},this.disableInline=u.disableInline,this.disableInterpretedOptimization=u.disableInterpretedOptimization,this.async=!0,this.fallback=new _d(i,u),u.compatible&&Tv(this),this.optimizedMap=new WeakMap,this.missesSinceSeen=0,this.isData||(u.permissive?this.isData=(l,s)=>!(s in this.methods):this.isData=()=>!1),this.fallback.isData=this.isData}truthy(i){return i}async _parse(i,u,l){const[s]=Object.keys(i),o=i[s];if(this.isData(i,s))return i;if(!this.methods[s])throw new Error(`Method '${s}' was not found in the Logic Engine.`);if(typeof this.methods[s]=="function"){const c=!o||typeof o!="object"?[o]:await this.run(o,u,{above:l}),d=await this.methods[s](br(c),u,l,this);return Array.isArray(d)?Promise.all(d):d}if(typeof this.methods[s]=="object"){const{asyncMethod:c,method:d,traverse:p}=this.methods[s],v=(typeof p>"u"?!0:p)?!o||typeof o!="object"?[o]:br(await this.run(o,u,{above:l})):o,S=await(c||d)(v,u,l,this);return Array.isArray(S)?Promise.all(S):S}throw new Error(`Method '${s}' is not set up properly.`)}addMethod(i,u,{deterministic:l,async:s,sync:o,optimizeUnary:c}={}){typeof s>"u"&&typeof o>"u"&&(o=!1),typeof o<"u"&&(s=!o),typeof s<"u"&&(o=!s),typeof u=="function"?s?u={asyncMethod:u,traverse:!0}:u={method:u,traverse:!0}:u={...u},Object.assign(u,Ov({deterministic:l,optimizeUnary:c})),this.fallback.addMethod(i,u,{deterministic:l}),this.methods[i]=kn(u,o)}addModule(i,u,l={}){Object.getOwnPropertyNames(u).forEach(s=>{(typeof u[s]=="function"||typeof u[s]=="object")&&this.addMethod(`${i}${i?".":""}${s}`,u[s],l)})}async run(i,u={},l={}){const{above:s=[]}=l;if(this.missesSinceSeen>500&&(this.disableInterpretedOptimization=!0,this.missesSinceSeen=0),!this.disableInterpretedOptimization&&typeof i=="object"&&i&&!this.optimizedMap.has(i))return this.optimizedMap.set(i,gs(i,this,s)),this.missesSinceSeen++,typeof this.optimizedMap.get(i)=="function"?this.optimizedMap.get(i)(u,s):this.optimizedMap.get(i);if(!this.disableInterpretedOptimization&&i&&typeof i=="object"&&this.optimizedMap.get(i))return this.missesSinceSeen=0,typeof this.optimizedMap.get(i)=="function"?this.optimizedMap.get(i)(u,s):this.optimizedMap.get(i);if(Array.isArray(i)){const o=[];for(let c=0;c0?this._parse(i,u,s):i}async build(i,u={}){const{above:l=[],top:s=!0}=u;if(this.fallback.truthy=this.truthy,this.fallback.allowFunctions=this.allowFunctions,s){const o=await CS(i,{engine:this,above:l,async:!0,state:{}}),c=kn((...d)=>{if(s===!0)try{const p=typeof o=="function"?o(...d):o;return Promise.resolve(p)}catch(p){return Promise.reject(p)}return typeof o=="function"?o(...d):o},s!==!0&&cn(o));return typeof o=="function"||s===!0?c:o}return i}}Object.assign(BS.prototype.truthy,{IDENTITY:!0});var is={exports:{}},uc,ky;function Rs(){if(ky)return uc;ky=1;const n="2.0.0",i=256,u=Number.MAX_SAFE_INTEGER||9007199254740991,l=16,s=i-6;return uc={MAX_LENGTH:i,MAX_SAFE_COMPONENT_LENGTH:l,MAX_SAFE_BUILD_LENGTH:s,MAX_SAFE_INTEGER:u,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:n,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},uc}var sc,Gy;function Ns(){if(Gy)return sc;Gy=1;var n={};return sc=typeof process=="object"&&n&&n.NODE_DEBUG&&/\bsemver\b/i.test(n.NODE_DEBUG)?(...u)=>console.error("SEMVER",...u):()=>{},sc}var Yy;function il(){return Yy||(Yy=1,function(n,i){const{MAX_SAFE_COMPONENT_LENGTH:u,MAX_SAFE_BUILD_LENGTH:l}=Rs(),s=Ns();i=n.exports={};const o=i.re=[],c=i.safeRe=[],d=i.src=[],p=i.t={};let m=0;const v="[a-zA-Z0-9-]",S=[["\\s",1],["\\d",u],[v,l]],L=q=>{for(const[j,y]of S)q=q.split(`${j}*`).join(`${j}{0,${y}}`).split(`${j}+`).join(`${j}{1,${y}}`);return q},C=(q,j,y)=>{const A=L(j),g=m++;s(q,g,j),p[q]=g,d[g]=j,o[g]=new RegExp(j,y?"g":void 0),c[g]=new RegExp(A,y?"g":void 0)};C("NUMERICIDENTIFIER","0|[1-9]\\d*"),C("NUMERICIDENTIFIERLOOSE","\\d+"),C("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${v}*`),C("MAINVERSION",`(${d[p.NUMERICIDENTIFIER]})\\.(${d[p.NUMERICIDENTIFIER]})\\.(${d[p.NUMERICIDENTIFIER]})`),C("MAINVERSIONLOOSE",`(${d[p.NUMERICIDENTIFIERLOOSE]})\\.(${d[p.NUMERICIDENTIFIERLOOSE]})\\.(${d[p.NUMERICIDENTIFIERLOOSE]})`),C("PRERELEASEIDENTIFIER",`(?:${d[p.NUMERICIDENTIFIER]}|${d[p.NONNUMERICIDENTIFIER]})`),C("PRERELEASEIDENTIFIERLOOSE",`(?:${d[p.NUMERICIDENTIFIERLOOSE]}|${d[p.NONNUMERICIDENTIFIER]})`),C("PRERELEASE",`(?:-(${d[p.PRERELEASEIDENTIFIER]}(?:\\.${d[p.PRERELEASEIDENTIFIER]})*))`),C("PRERELEASELOOSE",`(?:-?(${d[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${d[p.PRERELEASEIDENTIFIERLOOSE]})*))`),C("BUILDIDENTIFIER",`${v}+`),C("BUILD",`(?:\\+(${d[p.BUILDIDENTIFIER]}(?:\\.${d[p.BUILDIDENTIFIER]})*))`),C("FULLPLAIN",`v?${d[p.MAINVERSION]}${d[p.PRERELEASE]}?${d[p.BUILD]}?`),C("FULL",`^${d[p.FULLPLAIN]}$`),C("LOOSEPLAIN",`[v=\\s]*${d[p.MAINVERSIONLOOSE]}${d[p.PRERELEASELOOSE]}?${d[p.BUILD]}?`),C("LOOSE",`^${d[p.LOOSEPLAIN]}$`),C("GTLT","((?:<|>)?=?)"),C("XRANGEIDENTIFIERLOOSE",`${d[p.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),C("XRANGEIDENTIFIER",`${d[p.NUMERICIDENTIFIER]}|x|X|\\*`),C("XRANGEPLAIN",`[v=\\s]*(${d[p.XRANGEIDENTIFIER]})(?:\\.(${d[p.XRANGEIDENTIFIER]})(?:\\.(${d[p.XRANGEIDENTIFIER]})(?:${d[p.PRERELEASE]})?${d[p.BUILD]}?)?)?`),C("XRANGEPLAINLOOSE",`[v=\\s]*(${d[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[p.XRANGEIDENTIFIERLOOSE]})(?:${d[p.PRERELEASELOOSE]})?${d[p.BUILD]}?)?)?`),C("XRANGE",`^${d[p.GTLT]}\\s*${d[p.XRANGEPLAIN]}$`),C("XRANGELOOSE",`^${d[p.GTLT]}\\s*${d[p.XRANGEPLAINLOOSE]}$`),C("COERCE",`(^|[^\\d])(\\d{1,${u}})(?:\\.(\\d{1,${u}}))?(?:\\.(\\d{1,${u}}))?(?:$|[^\\d])`),C("COERCERTL",d[p.COERCE],!0),C("LONETILDE","(?:~>?)"),C("TILDETRIM",`(\\s*)${d[p.LONETILDE]}\\s+`,!0),i.tildeTrimReplace="$1~",C("TILDE",`^${d[p.LONETILDE]}${d[p.XRANGEPLAIN]}$`),C("TILDELOOSE",`^${d[p.LONETILDE]}${d[p.XRANGEPLAINLOOSE]}$`),C("LONECARET","(?:\\^)"),C("CARETTRIM",`(\\s*)${d[p.LONECARET]}\\s+`,!0),i.caretTrimReplace="$1^",C("CARET",`^${d[p.LONECARET]}${d[p.XRANGEPLAIN]}$`),C("CARETLOOSE",`^${d[p.LONECARET]}${d[p.XRANGEPLAINLOOSE]}$`),C("COMPARATORLOOSE",`^${d[p.GTLT]}\\s*(${d[p.LOOSEPLAIN]})$|^$`),C("COMPARATOR",`^${d[p.GTLT]}\\s*(${d[p.FULLPLAIN]})$|^$`),C("COMPARATORTRIM",`(\\s*)${d[p.GTLT]}\\s*(${d[p.LOOSEPLAIN]}|${d[p.XRANGEPLAIN]})`,!0),i.comparatorTrimReplace="$1$2$3",C("HYPHENRANGE",`^\\s*(${d[p.XRANGEPLAIN]})\\s+-\\s+(${d[p.XRANGEPLAIN]})\\s*$`),C("HYPHENRANGELOOSE",`^\\s*(${d[p.XRANGEPLAINLOOSE]})\\s+-\\s+(${d[p.XRANGEPLAINLOOSE]})\\s*$`),C("STAR","(<|>)?=?\\s*\\*"),C("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),C("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(is,is.exports)),is.exports}var oc,Py;function Sd(){if(Py)return oc;Py=1;const n=Object.freeze({loose:!0}),i=Object.freeze({});return oc=l=>l?typeof l!="object"?n:l:i,oc}var fc,Ky;function Rv(){if(Ky)return fc;Ky=1;const n=/^[0-9]+$/,i=(l,s)=>{const o=n.test(l),c=n.test(s);return o&&c&&(l=+l,s=+s),l===s?0:o&&!c?-1:c&&!o?1:li(s,l)},fc}var cc,Fy;function Nt(){if(Fy)return cc;Fy=1;const n=Ns(),{MAX_LENGTH:i,MAX_SAFE_INTEGER:u}=Rs(),{safeRe:l,t:s}=il(),o=Sd(),{compareIdentifiers:c}=Rv();class d{constructor(m,v){if(v=o(v),m instanceof d){if(m.loose===!!v.loose&&m.includePrerelease===!!v.includePrerelease)return m;m=m.version}else if(typeof m!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof m}".`);if(m.length>i)throw new TypeError(`version is longer than ${i} characters`);n("SemVer",m,v),this.options=v,this.loose=!!v.loose,this.includePrerelease=!!v.includePrerelease;const S=m.trim().match(v.loose?l[s.LOOSE]:l[s.FULL]);if(!S)throw new TypeError(`Invalid Version: ${m}`);if(this.raw=m,this.major=+S[1],this.minor=+S[2],this.patch=+S[3],this.major>u||this.major<0)throw new TypeError("Invalid major version");if(this.minor>u||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>u||this.patch<0)throw new TypeError("Invalid patch version");S[4]?this.prerelease=S[4].split(".").map(L=>{if(/^[0-9]+$/.test(L)){const C=+L;if(C>=0&&C=0;)typeof this.prerelease[C]=="number"&&(this.prerelease[C]++,C=-2);if(C===-1){if(v===this.prerelease.join(".")&&S===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(L)}}if(v){let C=[v,L];S===!1&&(C=[v]),c(this.prerelease[0],v)===0?isNaN(this.prerelease[1])&&(this.prerelease=C):this.prerelease=C}break}default:throw new Error(`invalid increment argument: ${m}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return cc=d,cc}var dc,Xy;function ki(){if(Xy)return dc;Xy=1;const n=Nt();return dc=(u,l,s=!1)=>{if(u instanceof n)return u;try{return new n(u,l)}catch(o){if(!s)return null;throw o}},dc}var hc,Qy;function HS(){if(Qy)return hc;Qy=1;const n=ki();return hc=(u,l)=>{const s=n(u,l);return s?s.version:null},hc}var pc,Zy;function VS(){if(Zy)return pc;Zy=1;const n=ki();return pc=(u,l)=>{const s=n(u.trim().replace(/^[=v]+/,""),l);return s?s.version:null},pc}var mc,Jy;function kS(){if(Jy)return mc;Jy=1;const n=Nt();return mc=(u,l,s,o,c)=>{typeof s=="string"&&(c=o,o=s,s=void 0);try{return new n(u instanceof n?u.version:u,s).inc(l,o,c).version}catch{return null}},mc}var gc,Wy;function GS(){if(Wy)return gc;Wy=1;const n=ki();return gc=(u,l)=>{const s=n(u,null,!0),o=n(l,null,!0),c=s.compare(o);if(c===0)return null;const d=c>0,p=d?s:o,m=d?o:s,v=!!p.prerelease.length;if(!!m.prerelease.length&&!v)return!m.patch&&!m.minor?"major":p.patch?"patch":p.minor?"minor":"major";const L=v?"pre":"";return s.major!==o.major?L+"major":s.minor!==o.minor?L+"minor":s.patch!==o.patch?L+"patch":"prerelease"},gc}var yc,e0;function YS(){if(e0)return yc;e0=1;const n=Nt();return yc=(u,l)=>new n(u,l).major,yc}var vc,t0;function PS(){if(t0)return vc;t0=1;const n=Nt();return vc=(u,l)=>new n(u,l).minor,vc}var bc,n0;function KS(){if(n0)return bc;n0=1;const n=Nt();return bc=(u,l)=>new n(u,l).patch,bc}var Ec,r0;function FS(){if(r0)return Ec;r0=1;const n=ki();return Ec=(u,l)=>{const s=n(u,l);return s&&s.prerelease.length?s.prerelease:null},Ec}var _c,i0;function hn(){if(i0)return _c;i0=1;const n=Nt();return _c=(u,l,s)=>new n(u,s).compare(new n(l,s)),_c}var Sc,a0;function XS(){if(a0)return Sc;a0=1;const n=hn();return Sc=(u,l,s)=>n(l,u,s),Sc}var wc,l0;function QS(){if(l0)return wc;l0=1;const n=hn();return wc=(u,l)=>n(u,l,!0),wc}var Ac,u0;function wd(){if(u0)return Ac;u0=1;const n=Nt();return Ac=(u,l,s)=>{const o=new n(u,s),c=new n(l,s);return o.compare(c)||o.compareBuild(c)},Ac}var $c,s0;function ZS(){if(s0)return $c;s0=1;const n=wd();return $c=(u,l)=>u.sort((s,o)=>n(s,o,l)),$c}var Oc,o0;function JS(){if(o0)return Oc;o0=1;const n=wd();return Oc=(u,l)=>u.sort((s,o)=>n(o,s,l)),Oc}var Tc,f0;function js(){if(f0)return Tc;f0=1;const n=hn();return Tc=(u,l,s)=>n(u,l,s)>0,Tc}var Rc,c0;function Ad(){if(c0)return Rc;c0=1;const n=hn();return Rc=(u,l,s)=>n(u,l,s)<0,Rc}var Nc,d0;function Nv(){if(d0)return Nc;d0=1;const n=hn();return Nc=(u,l,s)=>n(u,l,s)===0,Nc}var jc,h0;function jv(){if(h0)return jc;h0=1;const n=hn();return jc=(u,l,s)=>n(u,l,s)!==0,jc}var Dc,p0;function $d(){if(p0)return Dc;p0=1;const n=hn();return Dc=(u,l,s)=>n(u,l,s)>=0,Dc}var Mc,m0;function Od(){if(m0)return Mc;m0=1;const n=hn();return Mc=(u,l,s)=>n(u,l,s)<=0,Mc}var Cc,g0;function Dv(){if(g0)return Cc;g0=1;const n=Nv(),i=jv(),u=js(),l=$d(),s=Ad(),o=Od();return Cc=(d,p,m,v)=>{switch(p){case"===":return typeof d=="object"&&(d=d.version),typeof m=="object"&&(m=m.version),d===m;case"!==":return typeof d=="object"&&(d=d.version),typeof m=="object"&&(m=m.version),d!==m;case"":case"=":case"==":return n(d,m,v);case"!=":return i(d,m,v);case">":return u(d,m,v);case">=":return l(d,m,v);case"<":return s(d,m,v);case"<=":return o(d,m,v);default:throw new TypeError(`Invalid operator: ${p}`)}},Cc}var xc,y0;function WS(){if(y0)return xc;y0=1;const n=Nt(),i=ki(),{safeRe:u,t:l}=il();return xc=(o,c)=>{if(o instanceof n)return o;if(typeof o=="number"&&(o=String(o)),typeof o!="string")return null;c=c||{};let d=null;if(!c.rtl)d=o.match(u[l.COERCE]);else{let p;for(;(p=u[l.COERCERTL].exec(o))&&(!d||d.index+d[0].length!==o.length);)(!d||p.index+p[0].length!==d.index+d[0].length)&&(d=p),u[l.COERCERTL].lastIndex=p.index+p[1].length+p[2].length;u[l.COERCERTL].lastIndex=-1}return d===null?null:i(`${d[2]}.${d[3]||"0"}.${d[4]||"0"}`,c)},xc}var Lc,v0;function ew(){return v0||(v0=1,Lc=function(n){n.prototype[Symbol.iterator]=function*(){for(let i=this.head;i;i=i.next)yield i.value}}),Lc}var qc,b0;function tw(){if(b0)return qc;b0=1,qc=n,n.Node=s,n.create=n;function n(o){var c=this;if(c instanceof n||(c=new n),c.tail=null,c.head=null,c.length=0,o&&typeof o.forEach=="function")o.forEach(function(m){c.push(m)});else if(arguments.length>0)for(var d=0,p=arguments.length;d1)d=c;else if(this.head)p=this.head.next,d=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var m=0;p!==null;m++)d=o(d,p.value,m),p=p.next;return d},n.prototype.reduceReverse=function(o,c){var d,p=this.tail;if(arguments.length>1)d=c;else if(this.tail)p=this.tail.prev,d=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var m=this.length-1;p!==null;m--)d=o(d,p.value,m),p=p.prev;return d},n.prototype.toArray=function(){for(var o=new Array(this.length),c=0,d=this.head;d!==null;c++)o[c]=d.value,d=d.next;return o},n.prototype.toArrayReverse=function(){for(var o=new Array(this.length),c=0,d=this.tail;d!==null;c++)o[c]=d.value,d=d.prev;return o},n.prototype.slice=function(o,c){c=c||this.length,c<0&&(c+=this.length),o=o||0,o<0&&(o+=this.length);var d=new n;if(cthis.length&&(c=this.length);for(var p=0,m=this.head;m!==null&&pthis.length&&(c=this.length);for(var p=this.length,m=this.tail;m!==null&&p>c;p--)m=m.prev;for(;m!==null&&p>o;p--,m=m.prev)d.push(m.value);return d},n.prototype.splice=function(o,c,...d){o>this.length&&(o=this.length-1),o<0&&(o=this.length+o);for(var p=0,m=this.head;m!==null&&p1;class L{constructor(_){if(typeof _=="number"&&(_={max:_}),_||(_={}),_.max&&(typeof _.max!="number"||_.max<0))throw new TypeError("max must be a non-negative number");this[i]=_.max||1/0;const T=_.length||S;if(this[l]=typeof T!="function"?S:T,this[s]=_.stale||!1,_.maxAge&&typeof _.maxAge!="number")throw new TypeError("maxAge must be a number");this[o]=_.maxAge||0,this[c]=_.dispose,this[d]=_.noDisposeOnSet||!1,this[v]=_.updateAgeOnGet||!1,this.reset()}set max(_){if(typeof _!="number"||_<0)throw new TypeError("max must be a non-negative number");this[i]=_||1/0,j(this)}get max(){return this[i]}set allowStale(_){this[s]=!!_}get allowStale(){return this[s]}set maxAge(_){if(typeof _!="number")throw new TypeError("maxAge must be a non-negative number");this[o]=_,j(this)}get maxAge(){return this[o]}set lengthCalculator(_){typeof _!="function"&&(_=S),_!==this[l]&&(this[l]=_,this[u]=0,this[p].forEach(T=>{T.length=this[l](T.value,T.key),this[u]+=T.length})),j(this)}get lengthCalculator(){return this[l]}get length(){return this[u]}get itemCount(){return this[p].length}rforEach(_,T){T=T||this;for(let b=this[p].tail;b!==null;){const R=b.prev;g(this,_,b,T),b=R}}forEach(_,T){T=T||this;for(let b=this[p].head;b!==null;){const R=b.next;g(this,_,b,T),b=R}}keys(){return this[p].toArray().map(_=>_.key)}values(){return this[p].toArray().map(_=>_.value)}reset(){this[c]&&this[p]&&this[p].length&&this[p].forEach(_=>this[c](_.key,_.value)),this[m]=new Map,this[p]=new n,this[u]=0}dump(){return this[p].map(_=>q(this,_)?!1:{k:_.key,v:_.value,e:_.now+(_.maxAge||0)}).toArray().filter(_=>_)}dumpLru(){return this[p]}set(_,T,b){if(b=b||this[o],b&&typeof b!="number")throw new TypeError("maxAge must be a number");const R=b?Date.now():0,$=this[l](T,_);if(this[m].has(_)){if($>this[i])return y(this,this[m].get(_)),!1;const Y=this[m].get(_).value;return this[c]&&(this[d]||this[c](_,Y.value)),Y.now=R,Y.maxAge=b,Y.value=T,this[u]+=$-Y.length,Y.length=$,this.get(_),j(this),!0}const D=new A(_,T,$,R,b);return D.length>this[i]?(this[c]&&this[c](_,T),!1):(this[u]+=D.length,this[p].unshift(D),this[m].set(_,this[p].head),j(this),!0)}has(_){if(!this[m].has(_))return!1;const T=this[m].get(_).value;return!q(this,T)}get(_){return C(this,_,!0)}peek(_){return C(this,_,!1)}pop(){const _=this[p].tail;return _?(y(this,_),_.value):null}del(_){y(this,this[m].get(_))}load(_){this.reset();const T=Date.now();for(let b=_.length-1;b>=0;b--){const R=_[b],$=R.e||0;if($===0)this.set(R.k,R.v);else{const D=$-T;D>0&&this.set(R.k,R.v,D)}}}prune(){this[m].forEach((_,T)=>C(this,T,!1))}}const C=(E,_,T)=>{const b=E[m].get(_);if(b){const R=b.value;if(q(E,R)){if(y(E,b),!E[s])return}else T&&(E[v]&&(b.value.now=Date.now()),E[p].unshiftNode(b));return R.value}},q=(E,_)=>{if(!_||!_.maxAge&&!E[o])return!1;const T=Date.now()-_.now;return _.maxAge?T>_.maxAge:E[o]&&T>E[o]},j=E=>{if(E[u]>E[i])for(let _=E[p].tail;E[u]>E[i]&&_!==null;){const T=_.prev;y(E,_),_=T}},y=(E,_)=>{if(_){const T=_.value;E[c]&&E[c](T.key,T.value),E[u]-=T.length,E[m].delete(T.key),E[p].removeNode(_)}};class A{constructor(_,T,b,R,$){this.key=_,this.value=T,this.length=b,this.now=R,this.maxAge=$||0}}const g=(E,_,T,b)=>{let R=T.value;q(E,R)&&(y(E,T),E[s]||(R=void 0)),R&&_.call(b,R.value,R.key,E)};return Uc=L,Uc}var zc,_0;function pn(){if(_0)return zc;_0=1;class n{constructor(ee,ne){if(ne=l(ne),ee instanceof n)return ee.loose===!!ne.loose&&ee.includePrerelease===!!ne.includePrerelease?ee:new n(ee.raw,ne);if(ee instanceof s)return this.raw=ee.value,this.set=[[ee]],this.format(),this;if(this.options=ne,this.loose=!!ne.loose,this.includePrerelease=!!ne.includePrerelease,this.raw=ee.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(P=>this.parseRange(P)).filter(P=>P.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const P=this.set[0];if(this.set=this.set.filter(se=>!q(se[0])),this.set.length===0)this.set=[P];else if(this.set.length>1){for(const se of this.set)if(se.length===1&&j(se[0])){this.set=[se];break}}}this.format()}format(){return this.range=this.set.map(ee=>ee.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(ee){const P=((this.options.includePrerelease&&L)|(this.options.loose&&C))+":"+ee,se=u.get(P);if(se)return se;const le=this.options.loose,de=le?d[p.HYPHENRANGELOOSE]:d[p.HYPHENRANGE];ee=ee.replace(de,Y(this.options.includePrerelease)),o("hyphen replace",ee),ee=ee.replace(d[p.COMPARATORTRIM],m),o("comparator trim",ee),ee=ee.replace(d[p.TILDETRIM],v),o("tilde trim",ee),ee=ee.replace(d[p.CARETTRIM],S),o("caret trim",ee);let U=ee.split(" ").map(O=>A(O,this.options)).join(" ").split(/\s+/).map(O=>N(O,this.options));le&&(U=U.filter(O=>(o("loose invalid filter",O,this.options),!!O.match(d[p.COMPARATORLOOSE])))),o("range list",U);const z=new Map,F=U.map(O=>new s(O,this.options));for(const O of F){if(q(O))return[O];z.set(O.value,O)}z.size>1&&z.has("")&&z.delete("");const H=[...z.values()];return u.set(P,H),H}intersects(ee,ne){if(!(ee instanceof n))throw new TypeError("a Range is required");return this.set.some(P=>y(P,ne)&&ee.set.some(se=>y(se,ne)&&P.every(le=>se.every(de=>le.intersects(de,ne)))))}test(ee){if(!ee)return!1;if(typeof ee=="string")try{ee=new c(ee,this.options)}catch{return!1}for(let ne=0;neJ.value==="<0.0.0-0",j=J=>J.value==="",y=(J,ee)=>{let ne=!0;const P=J.slice();let se=P.pop();for(;ne&&P.length;)ne=P.every(le=>se.intersects(le,ee)),se=P.pop();return ne},A=(J,ee)=>(o("comp",J,ee),J=T(J,ee),o("caret",J),J=E(J,ee),o("tildes",J),J=R(J,ee),o("xrange",J),J=D(J,ee),o("stars",J),J),g=J=>!J||J.toLowerCase()==="x"||J==="*",E=(J,ee)=>J.trim().split(/\s+/).map(ne=>_(ne,ee)).join(" "),_=(J,ee)=>{const ne=ee.loose?d[p.TILDELOOSE]:d[p.TILDE];return J.replace(ne,(P,se,le,de,U)=>{o("tilde",J,P,se,le,de,U);let z;return g(se)?z="":g(le)?z=`>=${se}.0.0 <${+se+1}.0.0-0`:g(de)?z=`>=${se}.${le}.0 <${se}.${+le+1}.0-0`:U?(o("replaceTilde pr",U),z=`>=${se}.${le}.${de}-${U} <${se}.${+le+1}.0-0`):z=`>=${se}.${le}.${de} <${se}.${+le+1}.0-0`,o("tilde return",z),z})},T=(J,ee)=>J.trim().split(/\s+/).map(ne=>b(ne,ee)).join(" "),b=(J,ee)=>{o("caret",J,ee);const ne=ee.loose?d[p.CARETLOOSE]:d[p.CARET],P=ee.includePrerelease?"-0":"";return J.replace(ne,(se,le,de,U,z)=>{o("caret",J,se,le,de,U,z);let F;return g(le)?F="":g(de)?F=`>=${le}.0.0${P} <${+le+1}.0.0-0`:g(U)?le==="0"?F=`>=${le}.${de}.0${P} <${le}.${+de+1}.0-0`:F=`>=${le}.${de}.0${P} <${+le+1}.0.0-0`:z?(o("replaceCaret pr",z),le==="0"?de==="0"?F=`>=${le}.${de}.${U}-${z} <${le}.${de}.${+U+1}-0`:F=`>=${le}.${de}.${U}-${z} <${le}.${+de+1}.0-0`:F=`>=${le}.${de}.${U}-${z} <${+le+1}.0.0-0`):(o("no pr"),le==="0"?de==="0"?F=`>=${le}.${de}.${U}${P} <${le}.${de}.${+U+1}-0`:F=`>=${le}.${de}.${U}${P} <${le}.${+de+1}.0-0`:F=`>=${le}.${de}.${U} <${+le+1}.0.0-0`),o("caret return",F),F})},R=(J,ee)=>(o("replaceXRanges",J,ee),J.split(/\s+/).map(ne=>$(ne,ee)).join(" ")),$=(J,ee)=>{J=J.trim();const ne=ee.loose?d[p.XRANGELOOSE]:d[p.XRANGE];return J.replace(ne,(P,se,le,de,U,z)=>{o("xRange",J,P,se,le,de,U,z);const F=g(le),H=F||g(de),O=H||g(U),V=O;return se==="="&&V&&(se=""),z=ee.includePrerelease?"-0":"",F?se===">"||se==="<"?P="<0.0.0-0":P="*":se&&V?(H&&(de=0),U=0,se===">"?(se=">=",H?(le=+le+1,de=0,U=0):(de=+de+1,U=0)):se==="<="&&(se="<",H?le=+le+1:de=+de+1),se==="<"&&(z="-0"),P=`${se+le}.${de}.${U}${z}`):H?P=`>=${le}.0.0${z} <${+le+1}.0.0-0`:O&&(P=`>=${le}.${de}.0${z} <${le}.${+de+1}.0-0`),o("xRange return",P),P})},D=(J,ee)=>(o("replaceStars",J,ee),J.trim().replace(d[p.STAR],"")),N=(J,ee)=>(o("replaceGTE0",J,ee),J.trim().replace(d[ee.includePrerelease?p.GTE0PRE:p.GTE0],"")),Y=J=>(ee,ne,P,se,le,de,U,z,F,H,O,V,W)=>(g(P)?ne="":g(se)?ne=`>=${P}.0.0${J?"-0":""}`:g(le)?ne=`>=${P}.${se}.0${J?"-0":""}`:de?ne=`>=${ne}`:ne=`>=${ne}${J?"-0":""}`,g(F)?z="":g(H)?z=`<${+F+1}.0.0-0`:g(O)?z=`<${F}.${+H+1}.0-0`:V?z=`<=${F}.${H}.${O}-${V}`:J?z=`<${F}.${H}.${+O+1}-0`:z=`<=${z}`,`${ne} ${z}`.trim()),X=(J,ee,ne)=>{for(let P=0;P0){const se=J[P].semver;if(se.major===ee.major&&se.minor===ee.minor&&se.patch===ee.patch)return!0}return!1}return!0};return zc}var Ic,S0;function Ds(){if(S0)return Ic;S0=1;const n=Symbol("SemVer ANY");class i{static get ANY(){return n}constructor(v,S){if(S=u(S),v instanceof i){if(v.loose===!!S.loose)return v;v=v.value}v=v.trim().split(/\s+/).join(" "),c("comparator",v,S),this.options=S,this.loose=!!S.loose,this.parse(v),this.semver===n?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(v){const S=this.options.loose?l[s.COMPARATORLOOSE]:l[s.COMPARATOR],L=v.match(S);if(!L)throw new TypeError(`Invalid comparator: ${v}`);this.operator=L[1]!==void 0?L[1]:"",this.operator==="="&&(this.operator=""),L[2]?this.semver=new d(L[2],this.options.loose):this.semver=n}toString(){return this.value}test(v){if(c("Comparator.test",v,this.options.loose),this.semver===n||v===n)return!0;if(typeof v=="string")try{v=new d(v,this.options)}catch{return!1}return o(v,this.operator,this.semver,this.options)}intersects(v,S){if(!(v instanceof i))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new p(v.value,S).test(this.value):v.operator===""?v.value===""?!0:new p(this.value,S).test(v.semver):(S=u(S),S.includePrerelease&&(this.value==="<0.0.0-0"||v.value==="<0.0.0-0")||!S.includePrerelease&&(this.value.startsWith("<0.0.0")||v.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&v.operator.startsWith(">")||this.operator.startsWith("<")&&v.operator.startsWith("<")||this.semver.version===v.semver.version&&this.operator.includes("=")&&v.operator.includes("=")||o(this.semver,"<",v.semver,S)&&this.operator.startsWith(">")&&v.operator.startsWith("<")||o(this.semver,">",v.semver,S)&&this.operator.startsWith("<")&&v.operator.startsWith(">")))}}Ic=i;const u=Sd(),{safeRe:l,t:s}=il(),o=Dv(),c=Ns(),d=Nt(),p=pn();return Ic}var Bc,w0;function Ms(){if(w0)return Bc;w0=1;const n=pn();return Bc=(u,l,s)=>{try{l=new n(l,s)}catch{return!1}return l.test(u)},Bc}var Hc,A0;function rw(){if(A0)return Hc;A0=1;const n=pn();return Hc=(u,l)=>new n(u,l).set.map(s=>s.map(o=>o.value).join(" ").trim().split(" ")),Hc}var Vc,$0;function iw(){if($0)return Vc;$0=1;const n=Nt(),i=pn();return Vc=(l,s,o)=>{let c=null,d=null,p=null;try{p=new i(s,o)}catch{return null}return l.forEach(m=>{p.test(m)&&(!c||d.compare(m)===-1)&&(c=m,d=new n(c,o))}),c},Vc}var kc,O0;function aw(){if(O0)return kc;O0=1;const n=Nt(),i=pn();return kc=(l,s,o)=>{let c=null,d=null,p=null;try{p=new i(s,o)}catch{return null}return l.forEach(m=>{p.test(m)&&(!c||d.compare(m)===1)&&(c=m,d=new n(c,o))}),c},kc}var Gc,T0;function lw(){if(T0)return Gc;T0=1;const n=Nt(),i=pn(),u=js();return Gc=(s,o)=>{s=new i(s,o);let c=new n("0.0.0");if(s.test(c)||(c=new n("0.0.0-0"),s.test(c)))return c;c=null;for(let d=0;d{const S=new n(v.semver.version);switch(v.operator){case">":S.prerelease.length===0?S.patch++:S.prerelease.push(0),S.raw=S.format();case"":case">=":(!m||u(S,m))&&(m=S);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${v.operator}`)}}),m&&(!c||u(c,m))&&(c=m)}return c&&s.test(c)?c:null},Gc}var Yc,R0;function uw(){if(R0)return Yc;R0=1;const n=pn();return Yc=(u,l)=>{try{return new n(u,l).range||"*"}catch{return null}},Yc}var Pc,N0;function Td(){if(N0)return Pc;N0=1;const n=Nt(),i=Ds(),{ANY:u}=i,l=pn(),s=Ms(),o=js(),c=Ad(),d=Od(),p=$d();return Pc=(v,S,L,C)=>{v=new n(v,C),S=new l(S,C);let q,j,y,A,g;switch(L){case">":q=o,j=d,y=c,A=">",g=">=";break;case"<":q=c,j=p,y=o,A="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(v,S,C))return!1;for(let E=0;E{R.semver===u&&(R=new i(">=0.0.0")),T=T||R,b=b||R,q(R.semver,T.semver,C)?T=R:y(R.semver,b.semver,C)&&(b=R)}),T.operator===A||T.operator===g||(!b.operator||b.operator===A)&&j(v,b.semver))return!1;if(b.operator===g&&y(v,b.semver))return!1}return!0},Pc}var Kc,j0;function sw(){if(j0)return Kc;j0=1;const n=Td();return Kc=(u,l,s)=>n(u,l,">",s),Kc}var Fc,D0;function ow(){if(D0)return Fc;D0=1;const n=Td();return Fc=(u,l,s)=>n(u,l,"<",s),Fc}var Xc,M0;function fw(){if(M0)return Xc;M0=1;const n=pn();return Xc=(u,l,s)=>(u=new n(u,s),l=new n(l,s),u.intersects(l,s)),Xc}var Qc,C0;function cw(){if(C0)return Qc;C0=1;const n=Ms(),i=hn();return Qc=(u,l,s)=>{const o=[];let c=null,d=null;const p=u.sort((L,C)=>i(L,C,s));for(const L of p)n(L,l,s)?(d=L,c||(c=L)):(d&&o.push([c,d]),d=null,c=null);c&&o.push([c,null]);const m=[];for(const[L,C]of o)L===C?m.push(L):!C&&L===p[0]?m.push("*"):C?L===p[0]?m.push(`<=${C}`):m.push(`${L} - ${C}`):m.push(`>=${L}`);const v=m.join(" || "),S=typeof l.raw=="string"?l.raw:String(l);return v.length{if(S===L)return!0;S=new n(S,C),L=new n(L,C);let q=!1;e:for(const j of S.set){for(const y of L.set){const A=p(j,y,C);if(q=q||A!==null,A)continue e}if(q)return!1}return!0},c=[new i(">=0.0.0-0")],d=[new i(">=0.0.0")],p=(S,L,C)=>{if(S===L)return!0;if(S.length===1&&S[0].semver===u){if(L.length===1&&L[0].semver===u)return!0;C.includePrerelease?S=c:S=d}if(L.length===1&&L[0].semver===u){if(C.includePrerelease)return!0;L=d}const q=new Set;let j,y;for(const $ of S)$.operator===">"||$.operator===">="?j=m(j,$,C):$.operator==="<"||$.operator==="<="?y=v(y,$,C):q.add($.semver);if(q.size>1)return null;let A;if(j&&y){if(A=s(j.semver,y.semver,C),A>0)return null;if(A===0&&(j.operator!==">="||y.operator!=="<="))return null}for(const $ of q){if(j&&!l($,String(j),C)||y&&!l($,String(y),C))return null;for(const D of L)if(!l($,String(D),C))return!1;return!0}let g,E,_,T,b=y&&!C.includePrerelease&&y.semver.prerelease.length?y.semver:!1,R=j&&!C.includePrerelease&&j.semver.prerelease.length?j.semver:!1;b&&b.prerelease.length===1&&y.operator==="<"&&b.prerelease[0]===0&&(b=!1);for(const $ of L){if(T=T||$.operator===">"||$.operator===">=",_=_||$.operator==="<"||$.operator==="<=",j){if(R&&$.semver.prerelease&&$.semver.prerelease.length&&$.semver.major===R.major&&$.semver.minor===R.minor&&$.semver.patch===R.patch&&(R=!1),$.operator===">"||$.operator===">="){if(g=m(j,$,C),g===$&&g!==j)return!1}else if(j.operator===">="&&!l(j.semver,String($),C))return!1}if(y){if(b&&$.semver.prerelease&&$.semver.prerelease.length&&$.semver.major===b.major&&$.semver.minor===b.minor&&$.semver.patch===b.patch&&(b=!1),$.operator==="<"||$.operator==="<="){if(E=v(y,$,C),E===$&&E!==y)return!1}else if(y.operator==="<="&&!l(y.semver,String($),C))return!1}if(!$.operator&&(y||j)&&A!==0)return!1}return!(j&&_&&!y&&A!==0||y&&T&&!j&&A!==0||R||b)},m=(S,L,C)=>{if(!S)return L;const q=s(S.semver,L.semver,C);return q>0?S:q<0||L.operator===">"&&S.operator===">="?L:S},v=(S,L,C)=>{if(!S)return L;const q=s(S.semver,L.semver,C);return q<0?S:q>0||L.operator==="<"&&S.operator==="<="?L:S};return Zc=o,Zc}var Jc,L0;function hw(){if(L0)return Jc;L0=1;const n=il(),i=Rs(),u=Nt(),l=Rv(),s=ki(),o=HS(),c=VS(),d=kS(),p=GS(),m=YS(),v=PS(),S=KS(),L=FS(),C=hn(),q=XS(),j=QS(),y=wd(),A=ZS(),g=JS(),E=js(),_=Ad(),T=Nv(),b=jv(),R=$d(),$=Od(),D=Dv(),N=WS(),Y=Ds(),X=pn(),J=Ms(),ee=rw(),ne=iw(),P=aw(),se=lw(),le=uw(),de=Td(),U=sw(),z=ow(),F=fw(),H=cw(),O=dw();return Jc={parse:s,valid:o,clean:c,inc:d,diff:p,major:m,minor:v,patch:S,prerelease:L,compare:C,rcompare:q,compareLoose:j,compareBuild:y,sort:A,rsort:g,gt:E,lt:_,eq:T,neq:b,gte:R,lte:$,cmp:D,coerce:N,Comparator:Y,Range:X,satisfies:J,toComparators:ee,maxSatisfying:ne,minSatisfying:P,minVersion:se,validRange:le,outside:de,gtr:U,ltr:z,intersects:F,simplifyRange:H,subset:O,SemVer:u,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:l.compareIdentifiers,rcompareIdentifiers:l.rcompareIdentifiers},Jc}var Wc=hw(),ed={exports:{}};/** +`)},_domwindow:function(){return w("domwindow")},_bigint:function(E){return w("bigint:"+E.toString())},_process:function(){return w("process")},_timer:function(){return w("timer")},_pipe:function(){return w("pipe")},_tcp:function(){return w("tcp")},_udp:function(){return w("udp")},_tty:function(){return w("tty")},_statwatcher:function(){return w("statwatcher")},_securecontext:function(){return w("securecontext")},_connection:function(){return w("connection")},_zlib:function(){return w("zlib")},_context:function(){return w("context")},_nodescript:function(){return w("nodescript")},_httpparser:function(){return w("httpparser")},_dataview:function(){return w("dataview")},_signal:function(){return w("signal")},_fsevent:function(){return w("fsevent")},_tlswrap:function(){return w("tlswrap")}}}function te(){return{buf:"",write:function(R){this.buf+=R},end:function(R){this.buf+=R},read:function(){return this.buf}}}c.writeToStream=function(R,U,_){return _===void 0&&(_=U,U={}),W(U=k(R,U),_).dispatch(R)}}).call(this,s("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},s("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(s,f,c){(function(u,l,d,m,p,g,v,T,j){(function(C){var N=typeof Uint8Array<"u"?Uint8Array:Array,D=43,X=47,k=48,I=97,W=65,te=45,R=95;function U(_){return _=_.charCodeAt(0),_===D||_===te?62:_===X||_===R?63:_>16),z((65280&E)>>8),z(255&E);return q==2?z(255&(E=U(_.charAt(w))<<2|U(_.charAt(w+1))>>4)):q==1&&(z((E=U(_.charAt(w))<<10|U(_.charAt(w+1))<<4|U(_.charAt(w+2))>>2)>>8&255),z(255&E)),G},C.fromByteArray=function(_){var w,E,q,G,ce=_.length%3,K="";function z(x){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(x)}for(w=0,q=_.length-ce;w>18&63)+z(G>>12&63)+z(G>>6&63)+z(63&G);switch(ce){case 1:K=(K+=z((E=_[_.length-1])>>2))+z(E<<4&63)+"==";break;case 2:K=(K=(K+=z((E=(_[_.length-2]<<8)+_[_.length-1])>>10))+z(E>>4&63))+z(E<<2&63)+"="}return K}})(c===void 0?this.base64js={}:c)}).call(this,s("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},s("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(s,f,c){(function(u,l,D,m,p,g,v,T,j){var C=s("base64-js"),N=s("ieee754");function D(b,S,L){if(!(this instanceof D))return new D(b,S,L);var ae,ue,oe,Ee,Te=typeof b;if(S==="base64"&&Te=="string")for(b=(Ee=b).trim?Ee.trim():Ee.replace(/^\s+|\s+$/g,"");b.length%4!=0;)b+="=";if(Te=="number")ae=P(b);else if(Te=="string")ae=D.byteLength(b,S);else{if(Te!="object")throw new Error("First argument needs to be a number, array or string.");ae=P(b.length)}if(D._useTypedArrays?ue=D._augment(new Uint8Array(ae)):((ue=this).length=ae,ue._isBuffer=!0),D._useTypedArrays&&typeof b.byteLength=="number")ue._set(b);else if(J(Ee=b)||D.isBuffer(Ee)||Ee&&typeof Ee=="object"&&typeof Ee.length=="number")for(oe=0;oe>8,Ee=Ee%256,Te.push(Ee),Te.push(oe);return Te})(S),b,L,ae)}function I(b,S,L){var ae="";L=Math.min(b.length,L);for(var ue=S;ue>>0)):(S+1>>0),ue}function R(b,S,L,ae){if(ae||(B(typeof L=="boolean","missing or invalid endian"),B(S!=null,"missing offset"),B(S+1>>8*(ae?oe:1-oe)}function q(b,S,L,ae,ue){if(ue||(B(S!=null,"missing value"),B(typeof ae=="boolean","missing or invalid endian"),B(L!=null,"missing offset"),B(L+3>>8*(ae?oe:3-oe)&255}function G(b,S,L,ae,ue){ue||(B(S!=null,"missing value"),B(typeof ae=="boolean","missing or invalid endian"),B(L!=null,"missing offset"),B(L+1this.length&&(ae=this.length);var ue=(ae=b.length-S=this.length))return this[b]},D.prototype.readUInt16LE=function(b,S){return W(this,b,!0,S)},D.prototype.readUInt16BE=function(b,S){return W(this,b,!1,S)},D.prototype.readUInt32LE=function(b,S){return te(this,b,!0,S)},D.prototype.readUInt32BE=function(b,S){return te(this,b,!1,S)},D.prototype.readInt8=function(b,S){if(S||(B(b!=null,"missing offset"),B(b=this.length))return 128&this[b]?-1*(255-this[b]+1):this[b]},D.prototype.readInt16LE=function(b,S){return R(this,b,!0,S)},D.prototype.readInt16BE=function(b,S){return R(this,b,!1,S)},D.prototype.readInt32LE=function(b,S){return U(this,b,!0,S)},D.prototype.readInt32BE=function(b,S){return U(this,b,!1,S)},D.prototype.readFloatLE=function(b,S){return _(this,b,!0,S)},D.prototype.readFloatBE=function(b,S){return _(this,b,!1,S)},D.prototype.readDoubleLE=function(b,S){return w(this,b,!0,S)},D.prototype.readDoubleBE=function(b,S){return w(this,b,!1,S)},D.prototype.writeUInt8=function(b,S,L){L||(B(b!=null,"missing value"),B(S!=null,"missing offset"),B(S=this.length||(this[S]=b)},D.prototype.writeUInt16LE=function(b,S,L){E(this,b,S,!0,L)},D.prototype.writeUInt16BE=function(b,S,L){E(this,b,S,!1,L)},D.prototype.writeUInt32LE=function(b,S,L){q(this,b,S,!0,L)},D.prototype.writeUInt32BE=function(b,S,L){q(this,b,S,!1,L)},D.prototype.writeInt8=function(b,S,L){L||(B(b!=null,"missing value"),B(S!=null,"missing offset"),B(S=this.length||(0<=b?this.writeUInt8(b,S,L):this.writeUInt8(255+b+1,S,L))},D.prototype.writeInt16LE=function(b,S,L){G(this,b,S,!0,L)},D.prototype.writeInt16BE=function(b,S,L){G(this,b,S,!1,L)},D.prototype.writeInt32LE=function(b,S,L){ce(this,b,S,!0,L)},D.prototype.writeInt32BE=function(b,S,L){ce(this,b,S,!1,L)},D.prototype.writeFloatLE=function(b,S,L){K(this,b,S,!0,L)},D.prototype.writeFloatBE=function(b,S,L){K(this,b,S,!1,L)},D.prototype.writeDoubleLE=function(b,S,L){z(this,b,S,!0,L)},D.prototype.writeDoubleBE=function(b,S,L){z(this,b,S,!1,L)},D.prototype.fill=function(b,S,L){if(S=S||0,L=L||this.length,B(typeof(b=typeof(b=b||0)=="string"?b.charCodeAt(0):b)=="number"&&!isNaN(b),"value is not a number"),B(S<=L,"end < start"),L!==S&&this.length!==0){B(0<=S&&S"},D.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(D._useTypedArrays)return new D(this).buffer;for(var b=new Uint8Array(this.length),S=0,L=b.length;S=S.length||ue>=b.length);ue++)S[ue+L]=b[ue];return ue}function ie(b){try{return decodeURIComponent(b)}catch{return"�"}}function he(b,S){B(typeof b=="number","cannot write a non-number as a number"),B(0<=b,"specified a negative value for writing an unsigned value"),B(b<=S,"value is larger than maximum value for type"),B(Math.floor(b)===b,"value has a fractional component")}function de(b,S,L){B(typeof b=="number","cannot write a non-number as a number"),B(b<=S,"value larger than maximum allowed value"),B(L<=b,"value smaller than minimum allowed value"),B(Math.floor(b)===b,"value has a fractional component")}function Re(b,S,L){B(typeof b=="number","cannot write a non-number as a number"),B(b<=S,"value larger than maximum allowed value"),B(L<=b,"value smaller than minimum allowed value")}function B(b,S){if(!b)throw new Error(S||"Failed assertion")}D._augment=function(b){return b._isBuffer=!0,b._get=b.get,b._set=b.set,b.get=x.get,b.set=x.set,b.write=x.write,b.toString=x.toString,b.toLocaleString=x.toString,b.toJSON=x.toJSON,b.copy=x.copy,b.slice=x.slice,b.readUInt8=x.readUInt8,b.readUInt16LE=x.readUInt16LE,b.readUInt16BE=x.readUInt16BE,b.readUInt32LE=x.readUInt32LE,b.readUInt32BE=x.readUInt32BE,b.readInt8=x.readInt8,b.readInt16LE=x.readInt16LE,b.readInt16BE=x.readInt16BE,b.readInt32LE=x.readInt32LE,b.readInt32BE=x.readInt32BE,b.readFloatLE=x.readFloatLE,b.readFloatBE=x.readFloatBE,b.readDoubleLE=x.readDoubleLE,b.readDoubleBE=x.readDoubleBE,b.writeUInt8=x.writeUInt8,b.writeUInt16LE=x.writeUInt16LE,b.writeUInt16BE=x.writeUInt16BE,b.writeUInt32LE=x.writeUInt32LE,b.writeUInt32BE=x.writeUInt32BE,b.writeInt8=x.writeInt8,b.writeInt16LE=x.writeInt16LE,b.writeInt16BE=x.writeInt16BE,b.writeInt32LE=x.writeInt32LE,b.writeInt32BE=x.writeInt32BE,b.writeFloatLE=x.writeFloatLE,b.writeFloatBE=x.writeFloatBE,b.writeDoubleLE=x.writeDoubleLE,b.writeDoubleBE=x.writeDoubleBE,b.fill=x.fill,b.inspect=x.inspect,b.toArrayBuffer=x.toArrayBuffer,b}}).call(this,s("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},s("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(s,f,c){(function(u,l,C,m,p,g,v,T,j){var C=s("buffer").Buffer,N=4,D=new C(N);D.fill(0),f.exports={hash:function(X,k,I,W){for(var te=k((function(E,q){E.length%N!=0&&(G=E.length+(N-E.length%N),E=C.concat([E,D],G));for(var G,ce=[],K=q?E.readInt32BE:E.readInt32LE,z=0;zI?Z=x(Z):Z.length>5]|=128<>>9<<4)]=U;for(var _=1732584193,w=-271733879,E=-1732584194,q=271733878,G=0;G>>32-E,_)}function X(R,U,_,w,E,q,G){return D(U&_|~U&w,R,U,E,q,G)}function k(R,U,_,w,E,q,G){return D(U&w|_&~w,R,U,E,q,G)}function I(R,U,_,w,E,q,G){return D(U^_^w,R,U,E,q,G)}function W(R,U,_,w,E,q,G){return D(_^(U|~w),R,U,E,q,G)}function te(R,U){var _=(65535&R)+(65535&U);return(R>>16)+(U>>16)+(_>>16)<<16|65535&_}f.exports=function(R){return C.hash(R,N,16)}}).call(this,s("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},s("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(s,f,c){(function(u,l,d,m,p,g,v,T,j){f.exports=function(C){for(var N,D=new Array(C),X=0;X>>((3&X)<<3)&255;return D}}).call(this,s("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},s("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(s,f,c){(function(u,l,d,m,p,g,v,T,j){var C=s("./helpers");function N(k,I){k[I>>5]|=128<<24-I%32,k[15+(I+64>>9<<4)]=I;for(var W,te,R,U=Array(80),_=1732584193,w=-271733879,E=-1732584194,q=271733878,G=-1009589776,ce=0;ce>16)+(I>>16)+(W>>16)<<16|65535&W}function X(k,I){return k<>>32-I}f.exports=function(k){return C.hash(k,N,20,!0)}}).call(this,s("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},s("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(s,f,c){(function(u,l,d,m,p,g,v,T,j){function C(I,W){var te=(65535&I)+(65535&W);return(I>>16)+(W>>16)+(te>>16)<<16|65535&te}function N(I,W){var te,R=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),U=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),_=new Array(64);I[W>>5]|=128<<24-W%32,I[15+(W+64>>9<<4)]=W;for(var w,E,q=0;q>>W|I<<32-W},k=function(I,W){return I>>>W};f.exports=function(I){return D.hash(I,N,32,!0)}}).call(this,s("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},s("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(s,f,c){(function(u,l,d,m,p,g,v,T,j){c.read=function(C,N,D,X,q){var I,W,te=8*q-X-1,R=(1<>1,_=-7,w=D?q-1:0,E=D?-1:1,q=C[N+w];for(w+=E,I=q&(1<<-_)-1,q>>=-_,_+=te;0<_;I=256*I+C[N+w],w+=E,_-=8);for(W=I&(1<<-_)-1,I>>=-_,_+=X;0<_;W=256*W+C[N+w],w+=E,_-=8);if(I===0)I=1-U;else{if(I===R)return W?NaN:1/0*(q?-1:1);W+=Math.pow(2,X),I-=U}return(q?-1:1)*W*Math.pow(2,I-X)},c.write=function(C,N,D,X,k,G){var W,te,R=8*G-k-1,U=(1<>1,w=k===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=X?0:G-1,q=X?1:-1,G=N<0||N===0&&1/N<0?1:0;for(N=Math.abs(N),isNaN(N)||N===1/0?(te=isNaN(N)?1:0,W=U):(W=Math.floor(Math.log(N)/Math.LN2),N*(X=Math.pow(2,-W))<1&&(W--,X*=2),2<=(N+=1<=W+_?w/X:w*Math.pow(2,1-_))*X&&(W++,X/=2),U<=W+_?(te=0,W=U):1<=W+_?(te=(N*X-1)*Math.pow(2,k),W+=_):(te=N*Math.pow(2,_-1)*Math.pow(2,k),W=0));8<=k;C[D+E]=255&te,E+=q,te/=256,k-=8);for(W=W<"u"?1:0;let c=f?r[0]:s;for(let u=f;u/g,""),/\.{3}|=/.test(a))?0:r.length}function pg(r,...a){let s="";const f=this;for(let c=0;cal(f,a,s));if(r&&typeof r=="object"){const f=Object.keys(r)[0],c=r[f];if(a.isData(r,f)||c===void 0)return!0;if(!a.methods[f])throw new Error(`Method '${f}' was not found in the Logic Engine.`);return a.methods[f].traverse===!1?typeof a.methods[f].deterministic=="function"?a.methods[f].deterministic(c,s):a.methods[f].deterministic:typeof a.methods[f].deterministic=="function"?a.methods[f].deterministic(c,s):a.methods[f].deterministic&&al(c,a,s)}return!0}function oc(r,a){if(!a.async)return!0;if(Array.isArray(r))return r.every(s=>oc(s,a));if(typeof r=="object"){const s=Object.keys(r)[0],f=r[s];return cr(a.methods[s])?a.methods[s].traverse===!1?!!(typeof a.methods[s][et]=="function"&&a.methods[s][et](r,{engine:a})):oc(f,a):!1}return!0}function Ce(r,a={}){const{notTraversed:s=[],async:f,processing:c=[],values:u=[],engine:l}=a;function d(v,T=!1){return yb(v,T)?JSON.stringify(v):(u.push(v),`values[${u.length-1}]`)}if(Array.isArray(r)){let v="";for(let T=0;T0&&(v+=","),v+=Ce(r[T],a);return"["+v+"]"}let m=!1;function p(v){return a.asyncDetected=a.asyncDetected||m,f&&m?`await ${v}`:v}const g=r&&Object.keys(r)[0];if(r&&typeof r=="object"){if(!g)return d(r);if(!l.methods[g]){if(l.isData(r,g))return d(r,!0);throw new Error(`Method '${g}' was not found in the Logic Engine.`)}if(!a.engine.disableInline&&l.methods[g]&&al(r,l,a))return oc(r,l)?d((l.fallback||l).run(r),!0):a.avoidInlineAsync?(a.asyncDetected=!0,`(await ${d(l.run(r))})`):(c.push(l.run(r).then(C=>d(C))),`__%%%${c.length-1}%%%__`);let v=r[g];if((!v||typeof v!="object")&&(v=[v]),l.methods[g]&&l.methods[g].compile){let C=l.methods[g].compile(v,a);if(C[el]&&(C=C[el]),(C||"").startsWith("await")&&(a.asyncDetected=!0),C!==!1)return C}let T=l.methods[g].optimizeUnary?"":"coerceArray";!T&&Array.isArray(v)&&v.length===1?v=v[0]:T&&Array.isArray(v)&&(T="");const j=[", context",", context, above",", context, above, engine"];if(typeof l.methods[g]=="function"){m=!cr(l.methods[g]);const C=j[Um(l.methods[g])-1]||j[2];return p(`engine.methods["${g}"](${T}(`+Ce(v,a)+")"+C+")")}else{m=!!(f&&l.methods[g]&&l.methods[g].asyncMethod);const C=Um(m?l.methods[g].asyncMethod:l.methods[g].method),N=j[C-1]||j[2];return l.methods[g]&&(typeof l.methods[g].traverse>"u"||l.methods[g].traverse)?p(`engine.methods["${g}"]${m?".asyncMethod":".method"}(${T}(`+Ce(v,a)+")"+N+")"):(s.push(v),p(`engine.methods["${g}"]${m?".asyncMethod":".method"}(notTraversed[${s.length-1}]`+N+")"))}}return d(r)}function ju(r,a={}){Object.assign(a,Object.assign({notTraversed:[],methods:[],state:{},processing:[],async:a.engine.async,asyncDetected:!1,values:[],compile:pg},a));const s=Ce(r,a);return mg(r,s,a)}async function gb(r,a={}){Object.assign(a,Object.assign({notTraversed:[],methods:[],state:{},processing:[],async:a.engine.async,asyncDetected:!1,values:[],compile:pg},a));const s=Ce(r,a);return a.processing=await Promise.all(a.processing||[]),mg(r,s,a)}function mg(r,a,s){const{engine:f,methods:c,notTraversed:u,processing:l=[],values:d}=s,m=[];l.forEach((g,v)=>{a=a.replace(`__%%%${v}%%%__`,g)});const p=`(values, methods, notTraversed, asyncIterators, engine, above, coerceArray) => ${s.asyncDetected?"async":""} (context ${s.extraArguments?","+s.extraArguments:""}) => { const result = ${a}; return result }`;return Object.assign((typeof globalThis<"u"?globalThis:global).eval(p)(d,c,u,Mu,f,m,On),{[et]:!s.asyncDetected,aboveDetected:typeof a=="string"&&a.includes(", above")})}const vb=()=>{try{const r={};return(typeof globalThis<"u"?globalThis:global).eval("(test) => test?.foo?.bar")(r)===void 0}catch{return!1}},yg=vb();class Er extends Error{constructor(a){super(),this.message="Built-in control structures are not allowed to receive dynamic inputs, this could allow a lesser version of remote-code execution.",this.input=a}}const Fi=new Map;function Cu(r){if(Fi.has(r))return Fi.get(r);Fi.size>2048&&Fi.clear();const a=bb(r);return Fi.set(r,a),a}function bb(r,a=".",s="\\",f="/"){const c=[];let u="";for(let l=0;lar(f,a,s));if(r&&typeof r=="object"){const f=Object.keys(r)[0],c=r[f];if(a.isData(r,f))return!0;if(!a.methods[f])throw new Error(`Method '${f}' was not found in the Logic Engine.`);return a.methods[f].traverse===!1?typeof a.methods[f].deterministic=="function"?a.methods[f].deterministic(c,s):a.methods[f].deterministic:typeof a.methods[f].deterministic=="function"?a.methods[f].deterministic(c,s):a.methods[f].deterministic&&ar(c,a,s)}return!0}function An(r,a,s){if(Array.isArray(r))return r.every(f=>An(f,a,s));if(r&&typeof r=="object"){const f=Object.keys(r)[0],c=r[f];if(a.isData(r,f))return!0;if(!a.methods[f])throw new Error(`Method '${f}' was not found in the Logic Engine.`);return a.methods[f].traverse===!1?typeof a.methods[f][et]=="function"?a.methods[f][et](c,s):a.methods[f][et]:typeof a.methods[f][et]=="function"?a.methods[f][et](c,s):a.methods[f][et]&&An(c,a,s)}return!0}const _e={"+":r=>{if(typeof r=="string"||typeof r=="number")return+r;let a=0;for(let s=0;s{let a=1;for(let s=0;s{let a=r[0];for(let s=1;s{if(typeof r=="string"||typeof r=="number")return-r;if(r.length===1)return-r[0];let a=r[0];for(let s=1;s{let a=r[0];for(let s=1;sMath.max(...r),min:r=>Math.min(...r),in:([r,a])=>(a||[]).includes(r),">":([r,a])=>r>a,"<":([r,a,s])=>s===void 0?rr,!0),[et]:()=>!0},if:{method:(r,a,s,f)=>{if(!Array.isArray(r))throw new Er(r);if(r.length===1)return f.run(r[0],a,{above:s});if(r.length<2)return null;r=[...r],r.length%2!==1&&r.push(null);const c=r.pop();for(;r.length;){const u=r.shift(),l=r.shift(),d=f.run(u,a,{above:s});if(f.truthy(d))return f.run(l,a,{above:s})}return f.run(c,a,{above:s})},[et]:(r,a)=>An(r,a.engine,a),deterministic:(r,a)=>ar(r,a.engine,a),asyncMethod:async(r,a,s,f)=>{if(!Array.isArray(r))throw new Er(r);if(r.length===1)return f.run(r[0],a,{above:s});if(r.length<2)return null;r=[...r],r.length%2!==1&&r.push(null);const c=r.pop();for(;r.length;){const u=r.shift(),l=r.shift(),d=await f.run(u,a,{above:s});if(f.truthy(d))return f.run(l,a,{above:s})}return f.run(c,a,{above:s})},traverse:!1},"<=":([r,a,s])=>s===void 0?r<=a:r<=a&&a<=s,">=":([r,a])=>r>=a,"==":([r,a])=>r==a,"===":([r,a])=>r===a,"!=":([r,a])=>r!=a,"!==":([r,a])=>r!==a,xor:([r,a])=>r^a,or:{method:(r,a,s,f)=>{const c=Array.isArray(r);c||(r=f.run(r,a,{above:s}));let u;for(let l=0;l{const c=Array.isArray(r);c||(r=await f.run(r,a,{above:s}));let u;for(let l=0;lar(r,a.engine,a),compile:(r,a)=>a.engine.truthy.IDENTITY?Array.isArray(r)?`(${r.map(s=>Ce(s,a)).join(" || ")})`:`(${Ce(r,a)}).reduce((a,b) => a||b, false)`:!1,traverse:!1},and:{method:(r,a,s,f)=>{const c=Array.isArray(r);c||(r=f.run(r,a,{above:s}));let u;for(let l=0;l{const c=Array.isArray(r);c||(r=await f.run(r,a,{above:s}));let u;for(let l=0;lar(r,a.engine,a),compile:(r,a)=>a.engine.truthy.IDENTITY?Array.isArray(r)?`(${r.map(s=>Ce(s,a)).join(" && ")})`:`(${Ce(r,a)}).reduce((a,b) => a&&b, true)`:!1},substr:([r,a,s])=>{if(s<0){const f=r.substr(a);return f.substr(0,f.length+s)}return r.substr(a,s)},length:([r])=>typeof r=="string"||Array.isArray(r)?r.length:r&&typeof r=="object"?Object.keys(r).length:0,get:{method:([r,a,s],f,c,u)=>{const l=s===void 0?null:s,d=Cu(String(a));for(let m=0;m{let c;Array.isArray(r)&&(c=r[1],r=r[0]);let u=0;for(;typeof r=="string"&&r.startsWith("../")&&u"u"||r===""||r===null)return f.allowFunctions||typeof a!="function"?a:null;const d=Cu(String(r));for(let m=0;m(Array.isArray(r)?r:[r]).filter(c=>_e.var(c,a,s,f)===null),missing_some:([r,a],s,f,c)=>{const u=_e.missing(a,s,f,c);return a.length-u.length>=r?[]:u},map:Pi("map"),some:Pi("some",!0),all:Pi("every",!0),none:{traverse:!1,method:(r,a,s,f)=>!_e.some.method(r,a,s,f),asyncMethod:async(r,a,s,f)=>!await _e.some.asyncMethod(r,a,s,f),compile:(r,a)=>{const s=_e.some.compile(r,a);return s?a.compile`!(${s})`:!1}},merge:r=>Array.isArray(r)?[].concat(...r):[r],every:Pi("every"),filter:Pi("filter"),reduce:{deterministic:(r,a)=>ar(r[0],a.engine,a)&&ar(r[1],a.engine,{...a,insideIterator:!0}),compile:(r,a)=>{if(!Array.isArray(r))throw new Er(r);const{async:s}=a;let[f,c,u]=r;f=Ce(f,a),typeof u<"u"&&(u=Ce(u,a));const l={...a,extraArguments:"above",avoidInlineAsync:!0};c=ju(c,l);const d=c.aboveDetected?"[null, context, above]":"null";return a.methods.push(c),s&&(!cr(c)||f.includes("await"))?(a.detectAsync=!0,typeof u<"u"?`await asyncIterators.reduce(${f} || [], (a,b) => methods[${a.methods.length-1}]({ accumulator: a, current: b }, ${d}), ${u})`:`await asyncIterators.reduce(${f} || [], (a,b) => methods[${a.methods.length-1}]({ accumulator: a, current: b }, ${d}))`):typeof u<"u"?`(${f} || []).reduce((a,b) => methods[${a.methods.length-1}]({ accumulator: a, current: b }, ${d}), ${u})`:`(${f} || []).reduce((a,b) => methods[${a.methods.length-1}]({ accumulator: a, current: b }, ${d}))`},method:(r,a,s,f)=>{if(!Array.isArray(r))throw new Er(r);let[c,u,l]=r;l=f.run(l,a,{above:s}),c=f.run(c,a,{above:s})||[];const d=(m,p)=>f.run(u,{accumulator:m,current:p},{above:[c,a,s]});return typeof l>"u"?c.reduce(d):c.reduce(d,l)},[et]:(r,a)=>An(r,a.engine,a),asyncMethod:async(r,a,s,f)=>{if(!Array.isArray(r))throw new Er(r);let[c,u,l]=r;return l=await f.run(l,a,{above:s}),c=await f.run(c,a,{above:s})||[],Mu.reduce(c,(d,m)=>f.run(u,{accumulator:d,current:m},{above:[c,a,s]}),l)},traverse:!1},"!":(r,a,s,f)=>Array.isArray(r)?!f.truthy(r[0]):!f.truthy(r),"!!":(r,a,s,f)=>!!(Array.isArray(r)?f.truthy(r[0]):f.truthy(r)),cat:r=>{if(typeof r=="string")return r;let a="";for(let s=0;stypeof r=="object"?Object.keys(r):[],pipe:{traverse:!1,[et]:(r,a)=>An(r,a.engine,a),method:(r,a,s,f)=>{if(!Array.isArray(r))throw new Error("Data for pipe must be an array");let c=f.run(r[0],a,{above:[r,a,s]});for(let u=1;u{if(!Array.isArray(r))throw new Error("Data for pipe must be an array");let c=await f.run(r[0],a,{above:[r,a,s]});for(let u=1;u{let s=a.compile`${r[0]}`;for(let f=1;f{if(!Array.isArray(r))return!1;r=[...r];const s=r.shift();return ar(s,a.engine,a)&&ar(r,a.engine,{...a,insideIterator:!0})}},eachKey:{traverse:!1,[et]:(r,a)=>An(Object.values(r[Object.keys(r)[0]]),a.engine,a),method:(r,a,s,f)=>Object.keys(r).reduce((u,l)=>{const d=r[l];return Object.defineProperty(u,l,{enumerable:!0,value:f.run(d,a,{above:s})}),u},{}),deterministic:(r,a)=>{if(r&&typeof r=="object")return Object.values(r).every(s=>ar(s,a.engine,a));throw new Er(r)},compile:(r,a)=>{if(r&&typeof r=="object")return`({ ${Object.keys(r).reduce((f,c)=>(f.push(`${JSON.stringify(c)}: ${Ce(r[c],a)}`),f),[]).join(",")} })`;throw new Er(r)},asyncMethod:async(r,a,s,f)=>await Mu.reduce(Object.keys(r),async(u,l)=>{const d=r[l];return Object.defineProperty(u,l,{enumerable:!0,value:await f.run(d,a,{above:s})}),u},{})}};function Pi(r,a=!1){return{deterministic:(s,f)=>ar(s[0],f.engine,f)&&ar(s[1],f.engine,{...f,insideIterator:!0}),[et]:(s,f)=>An(s,f.engine,f),method:(s,f,c,u)=>{if(!Array.isArray(s))throw new Er(s);let[l,d]=s;return l=u.run(l,f,{above:c})||[],l[r]((m,p)=>{const g=u.run(d,m,{above:[{iterator:l,index:p},f,c]});return a?u.truthy(g):g})},asyncMethod:async(s,f,c,u)=>{if(!Array.isArray(s))throw new Er(s);let[l,d]=s;return l=await u.run(l,f,{above:c})||[],Mu[r](l,(m,p)=>{const g=u.run(d,m,{above:[{iterator:l,index:p},f,c]});return a?u.truthy(g):g})},compile:(s,f)=>{if(!Array.isArray(s))throw new Er(s);const{async:c}=f,[u,l]=s,d={...f,avoidInlineAsync:!0,iteratorCompile:!0,extraArguments:"index, above"},m=ju(l,d),p=m.aboveDetected?f.compile`[{ iterator: z, index: x }, context, above]`:f.compile`null`;return c&&!An(l,f.engine,f)?(f.detectAsync=!0,f.compile`await asyncIterators[${r}](${u} || [], async (i, x, z) => ${m}(i, x, ${p}))`):f.compile`(${u} || [])[${r}]((i, x, z) => ${m}(i, x, ${p}))`},traverse:!1}}_e["?:"]=_e.if;Object.keys(_e).forEach(r=>{typeof _e[r]=="function"&&(_e[r][et]=!0),_e[r].deterministic=typeof _e[r].deterministic>"u"?!0:_e[r].deterministic});_e.var.deterministic=(r,a)=>a.insideIterator&&!String(r).includes("../../");Object.assign(_e.missing,{deterministic:!1});Object.assign(_e.missing_some,{deterministic:!1});_e["<"].compile=function(r,a){return Array.isArray(r)?r.length===2?a.compile`(${r[0]} < ${r[1]})`:r.length===3?a.compile`(${r[0]} < ${r[1]} && ${r[1]} < ${r[2]})`:!1:!1};_e["<="].compile=function(r,a){return Array.isArray(r)?r.length===2?a.compile`(${r[0]} <= ${r[1]})`:r.length===3?a.compile`(${r[0]} <= ${r[1]} && ${r[1]} <= ${r[2]})`:!1:!1};_e.min.compile=function(r,a){return Array.isArray(r)?`Math.min(${r.map(s=>Ce(s,a)).join(", ")})`:!1};_e.max.compile=function(r,a){return Array.isArray(r)?`Math.max(${r.map(s=>Ce(s,a)).join(", ")})`:!1};_e[">"].compile=function(r,a){return!Array.isArray(r)||r.length!==2?!1:a.compile`(${r[0]} > ${r[1]})`};_e[">="].compile=function(r,a){return!Array.isArray(r)||r.length!==2?!1:a.compile`(${r[0]} >= ${r[1]})`};_e["=="].compile=function(r,a){return!Array.isArray(r)||r.length!==2?!1:a.compile`(${r[0]} == ${r[1]})`};_e["!="].compile=function(r,a){return!Array.isArray(r)||r.length!==2?!1:a.compile`(${r[0]} != ${r[1]})`};_e.if.compile=function(r,a){if(!Array.isArray(r)||r.length<3)return!1;r=[...r],r.length%2!==1&&r.push(null);const s=r.pop();let f=a.compile``;for(;r.length;){const c=r.shift(),u=r.shift();f=a.compile`${f} engine.truthy(${c}) ? ${u} : `}return a.compile`(${f} ${s})`};_e["==="].compile=function(r,a){return!Array.isArray(r)||r.length!==2?!1:a.compile`(${r[0]} === ${r[1]})`};_e["+"].compile=function(r,a){return Array.isArray(r)?`(${r.map(s=>`(+${Ce(s,a)})`).join(" + ")})`:typeof r=="string"||typeof r=="number"?`(+${Ce(r,a)})`:`([].concat(${Ce(r,a)})).reduce((a,b) => (+a)+(+b), 0)`};_e["%"].compile=function(r,a){return Array.isArray(r)?`(${r.map(s=>`(+${Ce(s,a)})`).join(" % ")})`:`(${Ce(r,a)}).reduce((a,b) => (+a)%(+b))`};_e.in.compile=function(r,a){return Array.isArray(r)?a.compile`(${r[1]} || []).includes(${r[0]})`:!1};_e["-"].compile=function(r,a){return Array.isArray(r)?`${r.length===1?"-":""}(${r.map(s=>`(+${Ce(s,a)})`).join(" - ")})`:typeof r=="string"||typeof r=="number"?`(-${Ce(r,a)})`:`((a=>(a.length===1?a[0]=-a[0]:a)&0||a)([].concat(${Ce(r,a)}))).reduce((a,b) => (+a)-(+b))`};_e["/"].compile=function(r,a){return Array.isArray(r)?`(${r.map(s=>`(+${Ce(s,a)})`).join(" / ")})`:`(${Ce(r,a)}).reduce((a,b) => (+a)/(+b))`};_e["*"].compile=function(r,a){return Array.isArray(r)?`(${r.map(s=>`(+${Ce(s,a)})`).join(" * ")})`:`(${Ce(r,a)}).reduce((a,b) => (+a)*(+b))`};_e.cat.compile=function(r,a){if(typeof r=="string")return JSON.stringify(r);if(!Array.isArray(r))return!1;let s=a.compile`''`;for(let f=0;f"u"?null:r[2],f&&typeof f=="object")return!1;f=f.toString();const u=Cu(f);return yg?`((${Ce(c,a)})${u.map(l=>`?.[${Ce(l,a)}]`).join("")} ?? ${Ce(s,a)})`:`(((a,b) => (typeof a === 'undefined' || a === null) ? b : a)(${u.reduce((l,d)=>`(${l}||0)[${JSON.stringify(d)}]`,`(${Ce(c,a)}||0)`)}, ${Ce(s,a)}))`}return!1};_e.var.compile=function(r,a){let s=r,f=null;if(a.varTop=a.varTop||new Set,!s||typeof r=="string"||typeof r=="number"||Array.isArray(r)&&r.length<=2){if(Array.isArray(r)&&(s=r[0],f=typeof r[1]>"u"?null:r[1]),s==="../index"&&a.iteratorCompile)return"index";if(typeof s>"u"||s===null||s==="")return"context";if(typeof s!="string"&&typeof s!="number"||(s=s.toString(),s.includes("../")))return!1;const c=Cu(s),[u]=c;return a.varTop.add(u),a.engine.allowFunctions?a.methods.preventFunctions=l=>l:a.methods.preventFunctions=l=>typeof l=="function"?null:l,yg?`(methods.preventFunctions(context${c.map(l=>`?.[${JSON.stringify(l)}]`).join("")} ?? ${Ce(f,a)}))`:`(methods.preventFunctions(((a,b) => (typeof a === 'undefined' || a === null) ? b : a)(${c.reduce((l,d)=>`(${l}||0)[${JSON.stringify(d)}]`,"(context||0)")}, ${Ce(f,a)})))`}return!1};_e["+"].optimizeUnary=_e["-"].optimizeUnary=_e.var.optimizeUnary=_e["!"].optimizeUnary=_e["!!"].optimizeUnary=_e.cat.optimizeUnary=!0;const _c={..._e},gg=function(a){return Object.keys(a).forEach(s=>{a[s]===void 0&&delete a[s]}),a};function Eb(r,a,s,f){const c=a.methods[s],u=c.method?c.method:c;if(c.traverse===!1){const d=r[s];return(m,p)=>u(d,m,p||f,a)}let l=r[s];if((!l||typeof l!="object")&&(l=[l]),Array.isArray(l)){const d=l.map(m=>Lu(m,a,f));return(m,p)=>{const g=d.map(v=>typeof v=="function"?v(m,p):v);return u(g,m,p||f,a)}}else{const d=Lu(l,a,f);return(m,p)=>u(On(typeof d=="function"?d(m,p):d,c.optimizeUnary),m,p||f,a)}}function Lu(r,a,s=[]){if(Array.isArray(r)){const f=r.map(c=>Lu(c,a,s));return(c,u)=>f.map(l=>typeof l=="function"?l(c,u):l)}if(r&&typeof r=="object"){const c=Object.keys(r)[0];if(a.isData(r,c))return()=>r;const l=!a.disableInline&&al(r,a,{engine:a});if(c in a.methods){const d=Eb(r,a,c,s);return l?d():d}}return r}const Ou=_c.all,Ab={method:(r,a,s,f)=>{if(Array.isArray(r)){const c=f.run(r[0],a,s);if(Array.isArray(c)&&c.length===0)return!1}return Ou.method(r,a,s,f)},asyncMethod:async(r,a,s,f)=>{if(Array.isArray(r)){const c=await f.run(r[0],a,s);if(Array.isArray(c)&&c.length===0)return!1}return Ou.asyncMethod(r,a,s,f)},deterministic:Ou.deterministic,traverse:Ou.traverse};function _b(r){return Array.isArray(r)&&r.length===0?!1:r}function vg(r){r.methods.all=Ab,r.truthy=_b}class wc{constructor(a=_c,s={disableInline:!1,disableInterpretedOptimization:!1,permissive:!1}){this.disableInline=s.disableInline,this.disableInterpretedOptimization=s.disableInterpretedOptimization,this.methods={...a},this.optimizedMap=new WeakMap,this.missesSinceSeen=0,s.compatible&&vg(this),this.options={disableInline:s.disableInline,disableInterpretedOptimization:s.disableInterpretedOptimization},this.isData||(s.permissive?this.isData=(f,c)=>!(c in this.methods):this.isData=()=>!1)}truthy(a){return a}_parse(a,s,f){const[c]=Object.keys(a),u=a[c];if(this.isData(a,c))return a;if(!this.methods[c])throw new Error(`Method '${c}' was not found in the Logic Engine.`);if(typeof this.methods[c]=="function"){const l=!u||typeof u!="object"?[u]:On(this.run(u,s,{above:f}));return this.methods[c](l,s,f,this)}if(typeof this.methods[c]=="object"){const{method:l,traverse:d}=this.methods[c],p=(typeof d>"u"?!0:d)?!u||typeof u!="object"?[u]:On(this.run(u,s,{above:f})):u;return l(p,s,f,this)}throw new Error(`Method '${c}' is not set up properly.`)}addMethod(a,s,{deterministic:f,optimizeUnary:c}={}){typeof s=="function"?s={method:s,traverse:!0}:s={...s},Object.assign(s,gg({deterministic:f,optimizeUnary:c})),this.methods[a]=kr(s)}addModule(a,s,f){Object.getOwnPropertyNames(s).forEach(c=>{(typeof s[c]=="function"||typeof s[c]=="object")&&this.addMethod(`${a}${a?".":""}${c}`,s[c],f)})}run(a,s={},f={}){const{above:c=[]}=f;if(this.missesSinceSeen>500&&(this.disableInterpretedOptimization=!0,this.missesSinceSeen=0),!this.disableInterpretedOptimization&&typeof a=="object"&&a&&!this.optimizedMap.has(a))return this.optimizedMap.set(a,Lu(a,this,c)),this.missesSinceSeen++,typeof this.optimizedMap.get(a)=="function"?this.optimizedMap.get(a)(s,c):this.optimizedMap.get(a);if(!this.disableInterpretedOptimization&&a&&typeof a=="object"&&this.optimizedMap.get(a))return this.missesSinceSeen=0,typeof this.optimizedMap.get(a)=="function"?this.optimizedMap.get(a)(s,c):this.optimizedMap.get(a);if(Array.isArray(a)){const u=[];for(let l=0;l0?this._parse(a,s,c):a}build(a,s={}){const{above:f=[],top:c=!0}=s;if(c){const u=ju(a,{state:{},engine:this,above:f});return typeof u=="function"||c===!0?(...l)=>typeof u=="function"?u(...l):u:u}return a}}Object.assign(wc.prototype.truthy,{IDENTITY:!0});function wb(r,a,s,f){const c=a.methods[s],u=c.asyncMethod?c.asyncMethod:c.method?c.method:c;if(c.traverse===!1){if(typeof c[et]=="function"&&c[et](r,{engine:a})){const m=c.method?c.method:c;return kr((p,g)=>m(r[s],p,g||f,a.fallback),!0)}const d=r[s];return(m,p)=>u(d,m,p||f,a)}let l=r[s];if((!l||typeof l!="object")&&(l=[l]),Array.isArray(l)){const d=l.map(m=>zu(m,a,f));if(cr(d)&&(c.method||c[et])){const m=c.method?c.method:c;return kr((p,g)=>{const v=d.map(T=>typeof T=="function"?T(p,g):T);return m(v,p,g||f,a.fallback)},!0)}return async(m,p)=>{const g=await Ac(d,v=>typeof v=="function"?v(m,p):v);return u(g,m,p||f,a)}}else{const d=zu(l,a,f);if(cr(d)&&(c.method||c[et])){const m=c.method?c.method:c;return kr((p,g)=>m(On(typeof d=="function"?d(p,g):d,c.optimizeUnary),p,g||f,a),!0)}return async(m,p)=>u(On(typeof d=="function"?await d(m,p):d,c.optimizeUnary),m,p||f,a)}}function zu(r,a,s=[]){if(a.fallback.allowFunctions=a.allowFunctions,Array.isArray(r)){const f=r.map(c=>zu(c,a,s));return cr(f)?kr((c,u)=>f.map(l=>typeof l=="function"?l(c,u):l),!0):async(c,u)=>Ac(f,l=>typeof l=="function"?l(c,u):l)}if(r&&typeof r=="object"){const c=Object.keys(r)[0];if(a.isData(r,c))return()=>r;const l=!a.disableInline&&al(r,a,{engine:a});if(c in a.methods){const d=wb(r,a,c,s);if(l){let m;return cr(d)?kr(()=>(m||(m=d()),m),!0):async()=>(m||(m=await d()),m)}return d}}return r}class Ob{constructor(a=_c,s={disableInline:!1,disableInterpretedOptimization:!1,permissive:!1}){this.methods={...a},this.options={disableInline:s.disableInline,disableInterpretedOptimization:s.disableInterpretedOptimization},this.disableInline=s.disableInline,this.disableInterpretedOptimization=s.disableInterpretedOptimization,this.async=!0,this.fallback=new wc(a,s),s.compatible&&vg(this),this.optimizedMap=new WeakMap,this.missesSinceSeen=0,this.isData||(s.permissive?this.isData=(f,c)=>!(c in this.methods):this.isData=()=>!1),this.fallback.isData=this.isData}truthy(a){return a}async _parse(a,s,f){const[c]=Object.keys(a),u=a[c];if(this.isData(a,c))return a;if(!this.methods[c])throw new Error(`Method '${c}' was not found in the Logic Engine.`);if(typeof this.methods[c]=="function"){const l=!u||typeof u!="object"?[u]:await this.run(u,s,{above:f}),d=await this.methods[c](On(l),s,f,this);return Array.isArray(d)?Promise.all(d):d}if(typeof this.methods[c]=="object"){const{asyncMethod:l,method:d,traverse:m}=this.methods[c],g=(typeof m>"u"?!0:m)?!u||typeof u!="object"?[u]:On(await this.run(u,s,{above:f})):u,v=await(l||d)(g,s,f,this);return Array.isArray(v)?Promise.all(v):v}throw new Error(`Method '${c}' is not set up properly.`)}addMethod(a,s,{deterministic:f,async:c,sync:u,optimizeUnary:l}={}){typeof c>"u"&&typeof u>"u"&&(u=!1),typeof u<"u"&&(c=!u),typeof c<"u"&&(u=!c),typeof s=="function"?c?s={asyncMethod:s,traverse:!0}:s={method:s,traverse:!0}:s={...s},Object.assign(s,gg({deterministic:f,optimizeUnary:l})),this.fallback.addMethod(a,s,{deterministic:f}),this.methods[a]=kr(s,u)}addModule(a,s,f={}){Object.getOwnPropertyNames(s).forEach(c=>{(typeof s[c]=="function"||typeof s[c]=="object")&&this.addMethod(`${a}${a?".":""}${c}`,s[c],f)})}async run(a,s={},f={}){const{above:c=[]}=f;if(this.missesSinceSeen>500&&(this.disableInterpretedOptimization=!0,this.missesSinceSeen=0),!this.disableInterpretedOptimization&&typeof a=="object"&&a&&!this.optimizedMap.has(a))return this.optimizedMap.set(a,zu(a,this,c)),this.missesSinceSeen++,typeof this.optimizedMap.get(a)=="function"?this.optimizedMap.get(a)(s,c):this.optimizedMap.get(a);if(!this.disableInterpretedOptimization&&a&&typeof a=="object"&&this.optimizedMap.get(a))return this.missesSinceSeen=0,typeof this.optimizedMap.get(a)=="function"?this.optimizedMap.get(a)(s,c):this.optimizedMap.get(a);if(Array.isArray(a)){const u=[];for(let l=0;l0?this._parse(a,s,c):a}async build(a,s={}){const{above:f=[],top:c=!0}=s;if(this.fallback.truthy=this.truthy,this.fallback.allowFunctions=this.allowFunctions,c){const u=await gb(a,{engine:this,above:f,async:!0,state:{}}),l=kr((...d)=>{if(c===!0)try{const m=typeof u=="function"?u(...d):u;return Promise.resolve(m)}catch(m){return Promise.reject(m)}return typeof u=="function"?u(...d):u},c!==!0&&cr(u));return typeof u=="function"||c===!0?l:u}return a}}Object.assign(Ob.prototype.truthy,{IDENTITY:!0});var Su={exports:{}},oo,Bm;function Yu(){if(Bm)return oo;Bm=1;const r="2.0.0",a=256,s=Number.MAX_SAFE_INTEGER||9007199254740991,f=16,c=a-6;return oo={MAX_LENGTH:a,MAX_SAFE_COMPONENT_LENGTH:f,MAX_SAFE_BUILD_LENGTH:c,MAX_SAFE_INTEGER:s,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:r,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},oo}var co,qm;function Gu(){if(qm)return co;qm=1;var r={};return co=typeof process=="object"&&r&&r.NODE_DEBUG&&/\bsemver\b/i.test(r.NODE_DEBUG)?(...s)=>console.error("SEMVER",...s):()=>{},co}var Hm;function ol(){return Hm||(Hm=1,(function(r,a){const{MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:f,MAX_LENGTH:c}=Yu(),u=Gu();a=r.exports={};const l=a.re=[],d=a.safeRe=[],m=a.src=[],p=a.safeSrc=[],g=a.t={};let v=0;const T="[a-zA-Z0-9-]",j=[["\\s",1],["\\d",c],[T,f]],C=D=>{for(const[X,k]of j)D=D.split(`${X}*`).join(`${X}{0,${k}}`).split(`${X}+`).join(`${X}{1,${k}}`);return D},N=(D,X,k)=>{const I=C(X),W=v++;u(D,W,X),g[D]=W,m[W]=X,p[W]=I,l[W]=new RegExp(X,k?"g":void 0),d[W]=new RegExp(I,k?"g":void 0)};N("NUMERICIDENTIFIER","0|[1-9]\\d*"),N("NUMERICIDENTIFIERLOOSE","\\d+"),N("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${T}*`),N("MAINVERSION",`(${m[g.NUMERICIDENTIFIER]})\\.(${m[g.NUMERICIDENTIFIER]})\\.(${m[g.NUMERICIDENTIFIER]})`),N("MAINVERSIONLOOSE",`(${m[g.NUMERICIDENTIFIERLOOSE]})\\.(${m[g.NUMERICIDENTIFIERLOOSE]})\\.(${m[g.NUMERICIDENTIFIERLOOSE]})`),N("PRERELEASEIDENTIFIER",`(?:${m[g.NONNUMERICIDENTIFIER]}|${m[g.NUMERICIDENTIFIER]})`),N("PRERELEASEIDENTIFIERLOOSE",`(?:${m[g.NONNUMERICIDENTIFIER]}|${m[g.NUMERICIDENTIFIERLOOSE]})`),N("PRERELEASE",`(?:-(${m[g.PRERELEASEIDENTIFIER]}(?:\\.${m[g.PRERELEASEIDENTIFIER]})*))`),N("PRERELEASELOOSE",`(?:-?(${m[g.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${m[g.PRERELEASEIDENTIFIERLOOSE]})*))`),N("BUILDIDENTIFIER",`${T}+`),N("BUILD",`(?:\\+(${m[g.BUILDIDENTIFIER]}(?:\\.${m[g.BUILDIDENTIFIER]})*))`),N("FULLPLAIN",`v?${m[g.MAINVERSION]}${m[g.PRERELEASE]}?${m[g.BUILD]}?`),N("FULL",`^${m[g.FULLPLAIN]}$`),N("LOOSEPLAIN",`[v=\\s]*${m[g.MAINVERSIONLOOSE]}${m[g.PRERELEASELOOSE]}?${m[g.BUILD]}?`),N("LOOSE",`^${m[g.LOOSEPLAIN]}$`),N("GTLT","((?:<|>)?=?)"),N("XRANGEIDENTIFIERLOOSE",`${m[g.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),N("XRANGEIDENTIFIER",`${m[g.NUMERICIDENTIFIER]}|x|X|\\*`),N("XRANGEPLAIN",`[v=\\s]*(${m[g.XRANGEIDENTIFIER]})(?:\\.(${m[g.XRANGEIDENTIFIER]})(?:\\.(${m[g.XRANGEIDENTIFIER]})(?:${m[g.PRERELEASE]})?${m[g.BUILD]}?)?)?`),N("XRANGEPLAINLOOSE",`[v=\\s]*(${m[g.XRANGEIDENTIFIERLOOSE]})(?:\\.(${m[g.XRANGEIDENTIFIERLOOSE]})(?:\\.(${m[g.XRANGEIDENTIFIERLOOSE]})(?:${m[g.PRERELEASELOOSE]})?${m[g.BUILD]}?)?)?`),N("XRANGE",`^${m[g.GTLT]}\\s*${m[g.XRANGEPLAIN]}$`),N("XRANGELOOSE",`^${m[g.GTLT]}\\s*${m[g.XRANGEPLAINLOOSE]}$`),N("COERCEPLAIN",`(^|[^\\d])(\\d{1,${s}})(?:\\.(\\d{1,${s}}))?(?:\\.(\\d{1,${s}}))?`),N("COERCE",`${m[g.COERCEPLAIN]}(?:$|[^\\d])`),N("COERCEFULL",m[g.COERCEPLAIN]+`(?:${m[g.PRERELEASE]})?(?:${m[g.BUILD]})?(?:$|[^\\d])`),N("COERCERTL",m[g.COERCE],!0),N("COERCERTLFULL",m[g.COERCEFULL],!0),N("LONETILDE","(?:~>?)"),N("TILDETRIM",`(\\s*)${m[g.LONETILDE]}\\s+`,!0),a.tildeTrimReplace="$1~",N("TILDE",`^${m[g.LONETILDE]}${m[g.XRANGEPLAIN]}$`),N("TILDELOOSE",`^${m[g.LONETILDE]}${m[g.XRANGEPLAINLOOSE]}$`),N("LONECARET","(?:\\^)"),N("CARETTRIM",`(\\s*)${m[g.LONECARET]}\\s+`,!0),a.caretTrimReplace="$1^",N("CARET",`^${m[g.LONECARET]}${m[g.XRANGEPLAIN]}$`),N("CARETLOOSE",`^${m[g.LONECARET]}${m[g.XRANGEPLAINLOOSE]}$`),N("COMPARATORLOOSE",`^${m[g.GTLT]}\\s*(${m[g.LOOSEPLAIN]})$|^$`),N("COMPARATOR",`^${m[g.GTLT]}\\s*(${m[g.FULLPLAIN]})$|^$`),N("COMPARATORTRIM",`(\\s*)${m[g.GTLT]}\\s*(${m[g.LOOSEPLAIN]}|${m[g.XRANGEPLAIN]})`,!0),a.comparatorTrimReplace="$1$2$3",N("HYPHENRANGE",`^\\s*(${m[g.XRANGEPLAIN]})\\s+-\\s+(${m[g.XRANGEPLAIN]})\\s*$`),N("HYPHENRANGELOOSE",`^\\s*(${m[g.XRANGEPLAINLOOSE]})\\s+-\\s+(${m[g.XRANGEPLAINLOOSE]})\\s*$`),N("STAR","(<|>)?=?\\s*\\*"),N("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),N("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Su,Su.exports)),Su.exports}var ho,$m;function Oc(){if($m)return ho;$m=1;const r=Object.freeze({loose:!0}),a=Object.freeze({});return ho=f=>f?typeof f!="object"?r:f:a,ho}var po,km;function bg(){if(km)return po;km=1;const r=/^[0-9]+$/,a=(f,c)=>{if(typeof f=="number"&&typeof c=="number")return f===c?0:fa(c,f)},po}var mo,Ym;function xt(){if(Ym)return mo;Ym=1;const r=Gu(),{MAX_LENGTH:a,MAX_SAFE_INTEGER:s}=Yu(),{safeRe:f,t:c}=ol(),u=Oc(),{compareIdentifiers:l}=bg();class d{constructor(p,g){if(g=u(g),p instanceof d){if(p.loose===!!g.loose&&p.includePrerelease===!!g.includePrerelease)return p;p=p.version}else if(typeof p!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof p}".`);if(p.length>a)throw new TypeError(`version is longer than ${a} characters`);r("SemVer",p,g),this.options=g,this.loose=!!g.loose,this.includePrerelease=!!g.includePrerelease;const v=p.trim().match(g.loose?f[c.LOOSE]:f[c.FULL]);if(!v)throw new TypeError(`Invalid Version: ${p}`);if(this.raw=p,this.major=+v[1],this.minor=+v[2],this.patch=+v[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");v[4]?this.prerelease=v[4].split(".").map(T=>{if(/^[0-9]+$/.test(T)){const j=+T;if(j>=0&&jp.major?1:this.minorp.minor?1:this.patchp.patch?1:0}comparePre(p){if(p instanceof d||(p=new d(p,this.options)),this.prerelease.length&&!p.prerelease.length)return-1;if(!this.prerelease.length&&p.prerelease.length)return 1;if(!this.prerelease.length&&!p.prerelease.length)return 0;let g=0;do{const v=this.prerelease[g],T=p.prerelease[g];if(r("prerelease compare",g,v,T),v===void 0&&T===void 0)return 0;if(T===void 0)return 1;if(v===void 0)return-1;if(v===T)continue;return l(v,T)}while(++g)}compareBuild(p){p instanceof d||(p=new d(p,this.options));let g=0;do{const v=this.build[g],T=p.build[g];if(r("build compare",g,v,T),v===void 0&&T===void 0)return 0;if(T===void 0)return 1;if(v===void 0)return-1;if(v===T)continue;return l(v,T)}while(++g)}inc(p,g,v){if(p.startsWith("pre")){if(!g&&v===!1)throw new Error("invalid increment argument: identifier is empty");if(g){const T=`-${g}`.match(this.options.loose?f[c.PRERELEASELOOSE]:f[c.PRERELEASE]);if(!T||T[1]!==g)throw new Error(`invalid identifier: ${g}`)}}switch(p){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",g,v);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",g,v);break;case"prepatch":this.prerelease.length=0,this.inc("patch",g,v),this.inc("pre",g,v);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",g,v),this.inc("pre",g,v);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const T=Number(v)?1:0;if(this.prerelease.length===0)this.prerelease=[T];else{let j=this.prerelease.length;for(;--j>=0;)typeof this.prerelease[j]=="number"&&(this.prerelease[j]++,j=-2);if(j===-1){if(g===this.prerelease.join(".")&&v===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(T)}}if(g){let j=[g,T];v===!1&&(j=[g]),l(this.prerelease[0],g)===0?isNaN(this.prerelease[1])&&(this.prerelease=j):this.prerelease=j}break}default:throw new Error(`invalid increment argument: ${p}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return mo=d,mo}var yo,Gm;function Pa(){if(Gm)return yo;Gm=1;const r=xt();return yo=(s,f,c=!1)=>{if(s instanceof r)return s;try{return new r(s,f)}catch(u){if(!c)return null;throw u}},yo}var go,Vm;function Sb(){if(Vm)return go;Vm=1;const r=Pa();return go=(s,f)=>{const c=r(s,f);return c?c.version:null},go}var vo,Im;function Tb(){if(Im)return vo;Im=1;const r=Pa();return vo=(s,f)=>{const c=r(s.trim().replace(/^[=v]+/,""),f);return c?c.version:null},vo}var bo,Xm;function Rb(){if(Xm)return bo;Xm=1;const r=xt();return bo=(s,f,c,u,l)=>{typeof c=="string"&&(l=u,u=c,c=void 0);try{return new r(s instanceof r?s.version:s,c).inc(f,u,l).version}catch{return null}},bo}var Eo,Zm;function xb(){if(Zm)return Eo;Zm=1;const r=Pa();return Eo=(s,f)=>{const c=r(s,null,!0),u=r(f,null,!0),l=c.compare(u);if(l===0)return null;const d=l>0,m=d?c:u,p=d?u:c,g=!!m.prerelease.length;if(!!p.prerelease.length&&!g){if(!p.patch&&!p.minor)return"major";if(p.compareMain(m)===0)return p.minor&&!p.patch?"minor":"patch"}const T=g?"pre":"";return c.major!==u.major?T+"major":c.minor!==u.minor?T+"minor":c.patch!==u.patch?T+"patch":"prerelease"},Eo}var Ao,Qm;function Db(){if(Qm)return Ao;Qm=1;const r=xt();return Ao=(s,f)=>new r(s,f).major,Ao}var _o,Km;function Nb(){if(Km)return _o;Km=1;const r=xt();return _o=(s,f)=>new r(s,f).minor,_o}var wo,Fm;function Mb(){if(Fm)return wo;Fm=1;const r=xt();return wo=(s,f)=>new r(s,f).patch,wo}var Oo,Pm;function jb(){if(Pm)return Oo;Pm=1;const r=Pa();return Oo=(s,f)=>{const c=r(s,f);return c&&c.prerelease.length?c.prerelease:null},Oo}var So,Jm;function hr(){if(Jm)return So;Jm=1;const r=xt();return So=(s,f,c)=>new r(s,c).compare(new r(f,c)),So}var To,Wm;function Cb(){if(Wm)return To;Wm=1;const r=hr();return To=(s,f,c)=>r(f,s,c),To}var Ro,ey;function Lb(){if(ey)return Ro;ey=1;const r=hr();return Ro=(s,f)=>r(s,f,!0),Ro}var xo,ty;function Sc(){if(ty)return xo;ty=1;const r=xt();return xo=(s,f,c)=>{const u=new r(s,c),l=new r(f,c);return u.compare(l)||u.compareBuild(l)},xo}var Do,ry;function zb(){if(ry)return Do;ry=1;const r=Sc();return Do=(s,f)=>s.sort((c,u)=>r(c,u,f)),Do}var No,ny;function Ub(){if(ny)return No;ny=1;const r=Sc();return No=(s,f)=>s.sort((c,u)=>r(u,c,f)),No}var Mo,ay;function Vu(){if(ay)return Mo;ay=1;const r=hr();return Mo=(s,f,c)=>r(s,f,c)>0,Mo}var jo,iy;function Tc(){if(iy)return jo;iy=1;const r=hr();return jo=(s,f,c)=>r(s,f,c)<0,jo}var Co,ly;function Eg(){if(ly)return Co;ly=1;const r=hr();return Co=(s,f,c)=>r(s,f,c)===0,Co}var Lo,uy;function Ag(){if(uy)return Lo;uy=1;const r=hr();return Lo=(s,f,c)=>r(s,f,c)!==0,Lo}var zo,sy;function Rc(){if(sy)return zo;sy=1;const r=hr();return zo=(s,f,c)=>r(s,f,c)>=0,zo}var Uo,fy;function xc(){if(fy)return Uo;fy=1;const r=hr();return Uo=(s,f,c)=>r(s,f,c)<=0,Uo}var Bo,oy;function _g(){if(oy)return Bo;oy=1;const r=Eg(),a=Ag(),s=Vu(),f=Rc(),c=Tc(),u=xc();return Bo=(d,m,p,g)=>{switch(m){case"===":return typeof d=="object"&&(d=d.version),typeof p=="object"&&(p=p.version),d===p;case"!==":return typeof d=="object"&&(d=d.version),typeof p=="object"&&(p=p.version),d!==p;case"":case"=":case"==":return r(d,p,g);case"!=":return a(d,p,g);case">":return s(d,p,g);case">=":return f(d,p,g);case"<":return c(d,p,g);case"<=":return u(d,p,g);default:throw new TypeError(`Invalid operator: ${m}`)}},Bo}var qo,cy;function Bb(){if(cy)return qo;cy=1;const r=xt(),a=Pa(),{safeRe:s,t:f}=ol();return qo=(u,l)=>{if(u instanceof r)return u;if(typeof u=="number"&&(u=String(u)),typeof u!="string")return null;l=l||{};let d=null;if(!l.rtl)d=u.match(l.includePrerelease?s[f.COERCEFULL]:s[f.COERCE]);else{const j=l.includePrerelease?s[f.COERCERTLFULL]:s[f.COERCERTL];let C;for(;(C=j.exec(u))&&(!d||d.index+d[0].length!==u.length);)(!d||C.index+C[0].length!==d.index+d[0].length)&&(d=C),j.lastIndex=C.index+C[1].length+C[2].length;j.lastIndex=-1}if(d===null)return null;const m=d[2],p=d[3]||"0",g=d[4]||"0",v=l.includePrerelease&&d[5]?`-${d[5]}`:"",T=l.includePrerelease&&d[6]?`+${d[6]}`:"";return a(`${m}.${p}.${g}${v}${T}`,l)},qo}var Ho,hy;function qb(){if(hy)return Ho;hy=1;class r{constructor(){this.max=1e3,this.map=new Map}get(s){const f=this.map.get(s);if(f!==void 0)return this.map.delete(s),this.map.set(s,f),f}delete(s){return this.map.delete(s)}set(s,f){if(!this.delete(s)&&f!==void 0){if(this.map.size>=this.max){const u=this.map.keys().next().value;this.delete(u)}this.map.set(s,f)}return this}}return Ho=r,Ho}var $o,dy;function dr(){if(dy)return $o;dy=1;const r=/\s+/g;class a{constructor(z,x){if(x=c(x),z instanceof a)return z.loose===!!x.loose&&z.includePrerelease===!!x.includePrerelease?z:new a(z.raw,x);if(z instanceof u)return this.raw=z.value,this.set=[[z]],this.formatted=void 0,this;if(this.options=x,this.loose=!!x.loose,this.includePrerelease=!!x.includePrerelease,this.raw=z.trim().replace(r," "),this.set=this.raw.split("||").map(Z=>this.parseRange(Z.trim())).filter(Z=>Z.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const Z=this.set[0];if(this.set=this.set.filter(P=>!N(P[0])),this.set.length===0)this.set=[Z];else if(this.set.length>1){for(const P of this.set)if(P.length===1&&D(P[0])){this.set=[P];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let z=0;z0&&(this.formatted+="||");const x=this.set[z];for(let Z=0;Z0&&(this.formatted+=" "),this.formatted+=x[Z].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(z){const Z=((this.options.includePrerelease&&j)|(this.options.loose&&C))+":"+z,P=f.get(Z);if(P)return P;const J=this.options.loose,O=J?m[p.HYPHENRANGELOOSE]:m[p.HYPHENRANGE];z=z.replace(O,G(this.options.includePrerelease)),l("hyphen replace",z),z=z.replace(m[p.COMPARATORTRIM],g),l("comparator trim",z),z=z.replace(m[p.TILDETRIM],v),l("tilde trim",z),z=z.replace(m[p.CARETTRIM],T),l("caret trim",z);let $=z.split(" ").map(he=>k(he,this.options)).join(" ").split(/\s+/).map(he=>q(he,this.options));J&&($=$.filter(he=>(l("loose invalid filter",he,this.options),!!he.match(m[p.COMPARATORLOOSE])))),l("range list",$);const ee=new Map,se=$.map(he=>new u(he,this.options));for(const he of se){if(N(he))return[he];ee.set(he.value,he)}ee.size>1&&ee.has("")&&ee.delete("");const ie=[...ee.values()];return f.set(Z,ie),ie}intersects(z,x){if(!(z instanceof a))throw new TypeError("a Range is required");return this.set.some(Z=>X(Z,x)&&z.set.some(P=>X(P,x)&&Z.every(J=>P.every(O=>J.intersects(O,x)))))}test(z){if(!z)return!1;if(typeof z=="string")try{z=new d(z,this.options)}catch{return!1}for(let x=0;xK.value==="<0.0.0-0",D=K=>K.value==="",X=(K,z)=>{let x=!0;const Z=K.slice();let P=Z.pop();for(;x&&Z.length;)x=Z.every(J=>P.intersects(J,z)),P=Z.pop();return x},k=(K,z)=>(K=K.replace(m[p.BUILD],""),l("comp",K,z),K=R(K,z),l("caret",K),K=W(K,z),l("tildes",K),K=_(K,z),l("xrange",K),K=E(K,z),l("stars",K),K),I=K=>!K||K.toLowerCase()==="x"||K==="*",W=(K,z)=>K.trim().split(/\s+/).map(x=>te(x,z)).join(" "),te=(K,z)=>{const x=z.loose?m[p.TILDELOOSE]:m[p.TILDE];return K.replace(x,(Z,P,J,O,$)=>{l("tilde",K,Z,P,J,O,$);let ee;return I(P)?ee="":I(J)?ee=`>=${P}.0.0 <${+P+1}.0.0-0`:I(O)?ee=`>=${P}.${J}.0 <${P}.${+J+1}.0-0`:$?(l("replaceTilde pr",$),ee=`>=${P}.${J}.${O}-${$} <${P}.${+J+1}.0-0`):ee=`>=${P}.${J}.${O} <${P}.${+J+1}.0-0`,l("tilde return",ee),ee})},R=(K,z)=>K.trim().split(/\s+/).map(x=>U(x,z)).join(" "),U=(K,z)=>{l("caret",K,z);const x=z.loose?m[p.CARETLOOSE]:m[p.CARET],Z=z.includePrerelease?"-0":"";return K.replace(x,(P,J,O,$,ee)=>{l("caret",K,P,J,O,$,ee);let se;return I(J)?se="":I(O)?se=`>=${J}.0.0${Z} <${+J+1}.0.0-0`:I($)?J==="0"?se=`>=${J}.${O}.0${Z} <${J}.${+O+1}.0-0`:se=`>=${J}.${O}.0${Z} <${+J+1}.0.0-0`:ee?(l("replaceCaret pr",ee),J==="0"?O==="0"?se=`>=${J}.${O}.${$}-${ee} <${J}.${O}.${+$+1}-0`:se=`>=${J}.${O}.${$}-${ee} <${J}.${+O+1}.0-0`:se=`>=${J}.${O}.${$}-${ee} <${+J+1}.0.0-0`):(l("no pr"),J==="0"?O==="0"?se=`>=${J}.${O}.${$}${Z} <${J}.${O}.${+$+1}-0`:se=`>=${J}.${O}.${$}${Z} <${J}.${+O+1}.0-0`:se=`>=${J}.${O}.${$} <${+J+1}.0.0-0`),l("caret return",se),se})},_=(K,z)=>(l("replaceXRanges",K,z),K.split(/\s+/).map(x=>w(x,z)).join(" ")),w=(K,z)=>{K=K.trim();const x=z.loose?m[p.XRANGELOOSE]:m[p.XRANGE];return K.replace(x,(Z,P,J,O,$,ee)=>{l("xRange",K,Z,P,J,O,$,ee);const se=I(J),ie=se||I(O),he=ie||I($),de=he;return P==="="&&de&&(P=""),ee=z.includePrerelease?"-0":"",se?P===">"||P==="<"?Z="<0.0.0-0":Z="*":P&&de?(ie&&(O=0),$=0,P===">"?(P=">=",ie?(J=+J+1,O=0,$=0):(O=+O+1,$=0)):P==="<="&&(P="<",ie?J=+J+1:O=+O+1),P==="<"&&(ee="-0"),Z=`${P+J}.${O}.${$}${ee}`):ie?Z=`>=${J}.0.0${ee} <${+J+1}.0.0-0`:he&&(Z=`>=${J}.${O}.0${ee} <${J}.${+O+1}.0-0`),l("xRange return",Z),Z})},E=(K,z)=>(l("replaceStars",K,z),K.trim().replace(m[p.STAR],"")),q=(K,z)=>(l("replaceGTE0",K,z),K.trim().replace(m[z.includePrerelease?p.GTE0PRE:p.GTE0],"")),G=K=>(z,x,Z,P,J,O,$,ee,se,ie,he,de)=>(I(Z)?x="":I(P)?x=`>=${Z}.0.0${K?"-0":""}`:I(J)?x=`>=${Z}.${P}.0${K?"-0":""}`:O?x=`>=${x}`:x=`>=${x}${K?"-0":""}`,I(se)?ee="":I(ie)?ee=`<${+se+1}.0.0-0`:I(he)?ee=`<${se}.${+ie+1}.0-0`:de?ee=`<=${se}.${ie}.${he}-${de}`:K?ee=`<${se}.${ie}.${+he+1}-0`:ee=`<=${ee}`,`${x} ${ee}`.trim()),ce=(K,z,x)=>{for(let Z=0;Z0){const P=K[Z].semver;if(P.major===z.major&&P.minor===z.minor&&P.patch===z.patch)return!0}return!1}return!0};return $o}var ko,py;function Iu(){if(py)return ko;py=1;const r=Symbol("SemVer ANY");class a{static get ANY(){return r}constructor(g,v){if(v=s(v),g instanceof a){if(g.loose===!!v.loose)return g;g=g.value}g=g.trim().split(/\s+/).join(" "),l("comparator",g,v),this.options=v,this.loose=!!v.loose,this.parse(g),this.semver===r?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(g){const v=this.options.loose?f[c.COMPARATORLOOSE]:f[c.COMPARATOR],T=g.match(v);if(!T)throw new TypeError(`Invalid comparator: ${g}`);this.operator=T[1]!==void 0?T[1]:"",this.operator==="="&&(this.operator=""),T[2]?this.semver=new d(T[2],this.options.loose):this.semver=r}toString(){return this.value}test(g){if(l("Comparator.test",g,this.options.loose),this.semver===r||g===r)return!0;if(typeof g=="string")try{g=new d(g,this.options)}catch{return!1}return u(g,this.operator,this.semver,this.options)}intersects(g,v){if(!(g instanceof a))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new m(g.value,v).test(this.value):g.operator===""?g.value===""?!0:new m(this.value,v).test(g.semver):(v=s(v),v.includePrerelease&&(this.value==="<0.0.0-0"||g.value==="<0.0.0-0")||!v.includePrerelease&&(this.value.startsWith("<0.0.0")||g.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&g.operator.startsWith(">")||this.operator.startsWith("<")&&g.operator.startsWith("<")||this.semver.version===g.semver.version&&this.operator.includes("=")&&g.operator.includes("=")||u(this.semver,"<",g.semver,v)&&this.operator.startsWith(">")&&g.operator.startsWith("<")||u(this.semver,">",g.semver,v)&&this.operator.startsWith("<")&&g.operator.startsWith(">")))}}ko=a;const s=Oc(),{safeRe:f,t:c}=ol(),u=_g(),l=Gu(),d=xt(),m=dr();return ko}var Yo,my;function Xu(){if(my)return Yo;my=1;const r=dr();return Yo=(s,f,c)=>{try{f=new r(f,c)}catch{return!1}return f.test(s)},Yo}var Go,yy;function Hb(){if(yy)return Go;yy=1;const r=dr();return Go=(s,f)=>new r(s,f).set.map(c=>c.map(u=>u.value).join(" ").trim().split(" ")),Go}var Vo,gy;function $b(){if(gy)return Vo;gy=1;const r=xt(),a=dr();return Vo=(f,c,u)=>{let l=null,d=null,m=null;try{m=new a(c,u)}catch{return null}return f.forEach(p=>{m.test(p)&&(!l||d.compare(p)===-1)&&(l=p,d=new r(l,u))}),l},Vo}var Io,vy;function kb(){if(vy)return Io;vy=1;const r=xt(),a=dr();return Io=(f,c,u)=>{let l=null,d=null,m=null;try{m=new a(c,u)}catch{return null}return f.forEach(p=>{m.test(p)&&(!l||d.compare(p)===1)&&(l=p,d=new r(l,u))}),l},Io}var Xo,by;function Yb(){if(by)return Xo;by=1;const r=xt(),a=dr(),s=Vu();return Xo=(c,u)=>{c=new a(c,u);let l=new r("0.0.0");if(c.test(l)||(l=new r("0.0.0-0"),c.test(l)))return l;l=null;for(let d=0;d{const v=new r(g.semver.version);switch(g.operator){case">":v.prerelease.length===0?v.patch++:v.prerelease.push(0),v.raw=v.format();case"":case">=":(!p||s(v,p))&&(p=v);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${g.operator}`)}}),p&&(!l||s(l,p))&&(l=p)}return l&&c.test(l)?l:null},Xo}var Zo,Ey;function Gb(){if(Ey)return Zo;Ey=1;const r=dr();return Zo=(s,f)=>{try{return new r(s,f).range||"*"}catch{return null}},Zo}var Qo,Ay;function Dc(){if(Ay)return Qo;Ay=1;const r=xt(),a=Iu(),{ANY:s}=a,f=dr(),c=Xu(),u=Vu(),l=Tc(),d=xc(),m=Rc();return Qo=(g,v,T,j)=>{g=new r(g,j),v=new f(v,j);let C,N,D,X,k;switch(T){case">":C=u,N=d,D=l,X=">",k=">=";break;case"<":C=l,N=m,D=u,X="<",k="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(c(g,v,j))return!1;for(let I=0;I{U.semver===s&&(U=new a(">=0.0.0")),te=te||U,R=R||U,C(U.semver,te.semver,j)?te=U:D(U.semver,R.semver,j)&&(R=U)}),te.operator===X||te.operator===k||(!R.operator||R.operator===X)&&N(g,R.semver))return!1;if(R.operator===k&&D(g,R.semver))return!1}return!0},Qo}var Ko,_y;function Vb(){if(_y)return Ko;_y=1;const r=Dc();return Ko=(s,f,c)=>r(s,f,">",c),Ko}var Fo,wy;function Ib(){if(wy)return Fo;wy=1;const r=Dc();return Fo=(s,f,c)=>r(s,f,"<",c),Fo}var Po,Oy;function Xb(){if(Oy)return Po;Oy=1;const r=dr();return Po=(s,f,c)=>(s=new r(s,c),f=new r(f,c),s.intersects(f,c)),Po}var Jo,Sy;function Zb(){if(Sy)return Jo;Sy=1;const r=Xu(),a=hr();return Jo=(s,f,c)=>{const u=[];let l=null,d=null;const m=s.sort((T,j)=>a(T,j,c));for(const T of m)r(T,f,c)?(d=T,l||(l=T)):(d&&u.push([l,d]),d=null,l=null);l&&u.push([l,null]);const p=[];for(const[T,j]of u)T===j?p.push(T):!j&&T===m[0]?p.push("*"):j?T===m[0]?p.push(`<=${j}`):p.push(`${T} - ${j}`):p.push(`>=${T}`);const g=p.join(" || "),v=typeof f.raw=="string"?f.raw:String(f);return g.length{if(v===T)return!0;v=new r(v,j),T=new r(T,j);let C=!1;e:for(const N of v.set){for(const D of T.set){const X=m(N,D,j);if(C=C||X!==null,X)continue e}if(C)return!1}return!0},l=[new a(">=0.0.0-0")],d=[new a(">=0.0.0")],m=(v,T,j)=>{if(v===T)return!0;if(v.length===1&&v[0].semver===s){if(T.length===1&&T[0].semver===s)return!0;j.includePrerelease?v=l:v=d}if(T.length===1&&T[0].semver===s){if(j.includePrerelease)return!0;T=d}const C=new Set;let N,D;for(const _ of v)_.operator===">"||_.operator===">="?N=p(N,_,j):_.operator==="<"||_.operator==="<="?D=g(D,_,j):C.add(_.semver);if(C.size>1)return null;let X;if(N&&D){if(X=c(N.semver,D.semver,j),X>0)return null;if(X===0&&(N.operator!==">="||D.operator!=="<="))return null}for(const _ of C){if(N&&!f(_,String(N),j)||D&&!f(_,String(D),j))return null;for(const w of T)if(!f(_,String(w),j))return!1;return!0}let k,I,W,te,R=D&&!j.includePrerelease&&D.semver.prerelease.length?D.semver:!1,U=N&&!j.includePrerelease&&N.semver.prerelease.length?N.semver:!1;R&&R.prerelease.length===1&&D.operator==="<"&&R.prerelease[0]===0&&(R=!1);for(const _ of T){if(te=te||_.operator===">"||_.operator===">=",W=W||_.operator==="<"||_.operator==="<=",N){if(U&&_.semver.prerelease&&_.semver.prerelease.length&&_.semver.major===U.major&&_.semver.minor===U.minor&&_.semver.patch===U.patch&&(U=!1),_.operator===">"||_.operator===">="){if(k=p(N,_,j),k===_&&k!==N)return!1}else if(N.operator===">="&&!f(N.semver,String(_),j))return!1}if(D){if(R&&_.semver.prerelease&&_.semver.prerelease.length&&_.semver.major===R.major&&_.semver.minor===R.minor&&_.semver.patch===R.patch&&(R=!1),_.operator==="<"||_.operator==="<="){if(I=g(D,_,j),I===_&&I!==D)return!1}else if(D.operator==="<="&&!f(D.semver,String(_),j))return!1}if(!_.operator&&(D||N)&&X!==0)return!1}return!(N&&W&&!D&&X!==0||D&&te&&!N&&X!==0||U||R)},p=(v,T,j)=>{if(!v)return T;const C=c(v.semver,T.semver,j);return C>0?v:C<0||T.operator===">"&&v.operator===">="?T:v},g=(v,T,j)=>{if(!v)return T;const C=c(v.semver,T.semver,j);return C<0?v:C>0||T.operator==="<"&&v.operator==="<="?T:v};return Wo=u,Wo}var ec,Ry;function Kb(){if(Ry)return ec;Ry=1;const r=ol(),a=Yu(),s=xt(),f=bg(),c=Pa(),u=Sb(),l=Tb(),d=Rb(),m=xb(),p=Db(),g=Nb(),v=Mb(),T=jb(),j=hr(),C=Cb(),N=Lb(),D=Sc(),X=zb(),k=Ub(),I=Vu(),W=Tc(),te=Eg(),R=Ag(),U=Rc(),_=xc(),w=_g(),E=Bb(),q=Iu(),G=dr(),ce=Xu(),K=Hb(),z=$b(),x=kb(),Z=Yb(),P=Gb(),J=Dc(),O=Vb(),$=Ib(),ee=Xb(),se=Zb(),ie=Qb();return ec={parse:c,valid:u,clean:l,inc:d,diff:m,major:p,minor:g,patch:v,prerelease:T,compare:j,rcompare:C,compareLoose:N,compareBuild:D,sort:X,rsort:k,gt:I,lt:W,eq:te,neq:R,gte:U,lte:_,cmp:w,coerce:E,Comparator:q,Range:G,satisfies:ce,toComparators:K,maxSatisfying:z,minSatisfying:x,minVersion:Z,validRange:P,outside:J,gtr:O,ltr:$,intersects:ee,simplifyRange:se,subset:ie,SemVer:s,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:a.SEMVER_SPEC_VERSION,RELEASE_TYPES:a.RELEASE_TYPES,compareIdentifiers:f.compareIdentifiers,rcompareIdentifiers:f.rcompareIdentifiers},ec}var tc=Kb(),rc={exports:{}};/** * @preserve * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) * @@ -68,39 +61,39 @@ list should be an Array.`),M.length===0)return new y(0);if(M.length===1)return M * @see http://github.com/garycourt/murmurhash-js * @author Austin Appleby * @see http://sites.google.com/site/murmurhash/ - */var q0;function pw(){return q0||(q0=1,function(n){(function(){var i;function u(l,s){var o=this instanceof u?this:i;if(o.reset(s),typeof l=="string"&&l.length>0&&o.hash(l),o!==this)return o}u.prototype.hash=function(l){var s,o,c,d,p;switch(p=l.length,this.len+=p,o=this.k1,c=0,this.rem){case 0:o^=p>c?l.charCodeAt(c++)&65535:0;case 1:o^=p>c?(l.charCodeAt(c++)&65535)<<8:0;case 2:o^=p>c?(l.charCodeAt(c++)&65535)<<16:0;case 3:o^=p>c?(l.charCodeAt(c)&255)<<24:0,o^=p>c?(l.charCodeAt(c++)&65280)>>8:0}if(this.rem=p+this.rem&3,p-=this.rem,p>0){for(s=this.h1;o=o*11601+(o&65535)*3432906752&4294967295,o=o<<15|o>>>17,o=o*13715+(o&65535)*461832192&4294967295,s^=o,s=s<<13|s>>>19,s=s*5+3864292196&4294967295,!(c>=p);)o=l.charCodeAt(c++)&65535^(l.charCodeAt(c++)&65535)<<8^(l.charCodeAt(c++)&65535)<<16,d=l.charCodeAt(c++),o^=(d&255)<<24^(d&65280)>>8;switch(o=0,this.rem){case 3:o^=(l.charCodeAt(c+2)&65535)<<16;case 2:o^=(l.charCodeAt(c+1)&65535)<<8;case 1:o^=l.charCodeAt(c)&65535}this.h1=s}return this.k1=o,this},u.prototype.result=function(){var l,s;return l=this.k1,s=this.h1,l>0&&(l=l*11601+(l&65535)*3432906752&4294967295,l=l<<15|l>>>17,l=l*13715+(l&65535)*461832192&4294967295,s^=l),s^=this.len,s^=s>>>16,s=s*51819+(s&65535)*2246770688&4294967295,s^=s>>>13,s=s*44597+(s&65535)*3266445312&4294967295,s^=s>>>16,s>>>0},u.prototype.reset=function(l){return this.h1=typeof l=="number"?l:0,this.rem=this.k1=this.len=0,this},i=new u,n.exports=u})()}(ed)),ed.exports}var mw=pw();const gw=ws(mw);var yw="https://flagd.dev/schema/v0/flags.json",vw="http://json-schema.org/draft-07/schema#",bw="flagd Flag Configuration",Ew="Defines flags for use in flagd, including typed variants and rules.",_w="object",Sw={flags:{title:"Flags",description:"Top-level flags object. All flags are defined here.",type:"object",$comment:"flag objects are one of the 4 flag types defined in definitions",additionalProperties:!1,patternProperties:{"^.{1,}$":{oneOf:[{title:"Boolean flag",description:"A flag having boolean values.",$ref:"#/definitions/booleanFlag"},{title:"String flag",description:"A flag having string values.",$ref:"#/definitions/stringFlag"},{title:"Numeric flag",description:"A flag having numeric values.",$ref:"#/definitions/numberFlag"},{title:"Object flag",description:"A flag having arbitrary object values.",$ref:"#/definitions/objectFlag"}]}}},$evaluators:{title:"Evaluators",description:'Reusable targeting rules that can be referenced with "$ref": "myRule" in multiple flags.',type:"object",additionalProperties:!1,patternProperties:{"^.{1,}$":{$comment:"this relative ref means that targeting.json MUST be in the same dir, or available on the same HTTP path",$ref:"./targeting.json"}}},metadata:{title:"Flag Set Metadata",description:"Metadata about the flag set, with keys of type string, and values of type boolean, string, or number.",properties:{flagSetId:{description:"The unique identifier for the flag set.",type:"string"},version:{description:"The version of the flag set.",type:"string"}},$ref:"#/definitions/metadata"}},ww={flag:{$comment:"base flag object; no title/description here, allows for better UX, keep it in the overrides",type:"object",properties:{state:{title:"Flag State",description:"Indicates whether the flag is functional. Disabled flags are treated as if they don't exist.",type:"string",enum:["ENABLED","DISABLED"]},defaultVariant:{title:"Default Variant",description:"The variant to serve if no dynamic targeting applies (including if the targeting returns null).",type:"string"},targeting:{$ref:"./targeting.json"},metadata:{title:"Flag Metadata",description:"Metadata about an individual feature flag, with keys of type string, and values of type boolean, string, or number.",$ref:"#/definitions/metadata"}},required:["state","defaultVariant"]},booleanVariants:{type:"object",properties:{variants:{type:"object",additionalProperties:!1,patternProperties:{"^.{1,}$":{type:"boolean"}},default:{true:!0,false:!1}}}},stringVariants:{type:"object",properties:{variants:{type:"object",additionalProperties:!1,patternProperties:{"^.{1,}$":{type:"string"}}}}},numberVariants:{type:"object",properties:{variants:{type:"object",additionalProperties:!1,patternProperties:{"^.{1,}$":{type:"number"}}}}},objectVariants:{type:"object",properties:{variants:{type:"object",additionalProperties:!1,patternProperties:{"^.{1,}$":{type:"object"}}}}},booleanFlag:{$comment:"merge the variants with the base flag to build our typed flags",allOf:[{$ref:"#/definitions/flag"},{$ref:"#/definitions/booleanVariants"}]},stringFlag:{allOf:[{$ref:"#/definitions/flag"},{$ref:"#/definitions/stringVariants"}]},numberFlag:{allOf:[{$ref:"#/definitions/flag"},{$ref:"#/definitions/numberVariants"}]},objectFlag:{allOf:[{$ref:"#/definitions/flag"},{$ref:"#/definitions/objectVariants"}]},metadata:{type:"object",additionalProperties:{description:"Any additional key/value pair with value of type boolean, string, or number.",type:["string","number","boolean"]},required:[]}},Aw={$id:yw,$schema:vw,title:bw,description:Ew,type:_w,properties:Sw,definitions:ww},$w="https://flagd.dev/schema/v0/targeting.json",Ow="http://json-schema.org/draft-07/schema#",Tw="flagd Targeting",Rw='Defines targeting logic for flagd; a extension of JSONLogic, including purpose-built feature-flagging operations. Note that this schema applies to top-level objects; no additional properties are supported, including "$schema", which means built-in JSON-schema support is not possible in editors. Please use flags.json (which imports this schema) for a rich editor experience.',Nw="object",jw=[{$comment:"we need this to support empty targeting",type:"object",additionalProperties:!1,properties:{}},{$ref:"#/definitions/anyRule"}],Dw={primitive:{oneOf:[{description:'When returned from rules, a null value "exits", the targeting, and the "defaultValue" is returned, with the reason indicating the targeting did not match.',type:"null"},{description:'When returned from rules, booleans are converted to strings ("true"/"false"), and used to as keys to retrieve the associated value from the "variants" object. Be sure that the returned string is present as a key in the variants!',type:"boolean"},{description:"When returned from rules, the behavior of numbers is not defined.",type:"number"},{description:'When returned from rules, strings are used to as keys to retrieve the associated value from the "variants" object. Be sure that the returned string is present as a key in the variants!.',type:"string"},{description:'When returned from rules, strings are used to as keys to retrieve the associated value from the "variants" object. Be sure that the returned string is present as a key in the variants!.',type:"array"}]},varRule:{title:"Var Operation",description:"Retrieve data from the provided data object.",type:"object",additionalProperties:!1,properties:{var:{anyOf:[{type:"string",description:'flagd automatically injects "$flagd.timestamp" (unix epoch) and "$flagd.flagKey" (the key of the flag in evaluation) into the context.',pattern:"^\\$flagd\\.((timestamp)|(flagKey))$"},{not:{$comment:'this is a negated (not) match of "$flagd.{some-key}", which is faster and more compatible that a negative lookahead regex',type:"string",description:'flagd automatically injects "$flagd.timestamp" (unix epoch) and "$flagd.flagKey" (the key of the flag in evaluation) into the context.',pattern:"^\\$flagd\\..*$"}},{type:"array",$comment:"this is to support the form of var with a default... there seems to be a bug here, where ajv gives a warning (not an error) because maxItems doesn't equal the number of entries in items, though this is valid in this case",minItems:1,items:[{type:"string"}],additionalItems:{anyOf:[{type:"null"},{type:"boolean"},{type:"string"},{type:"number"}]}}]}}},missingRule:{title:"Missing Operation",description:"Takes an array of data keys to search for (same format as var). Returns an array of any keys that are missing from the data object, or an empty array.",type:"object",additionalProperties:!1,properties:{missing:{type:"array",items:{type:"string"}}}},missingSomeRule:{title:"Missing-Some Operation",description:"Takes a minimum number of data keys that are required, and an array of keys to search for (same format as var or missing). Returns an empty array if the minimum is met, or an array of the missing keys otherwise.",type:"object",additionalProperties:!1,properties:{missing_some:{minItems:2,maxItems:2,type:"array",items:[{type:"number"},{type:"array",items:{type:"string"}}]}}},binaryOrTernaryOp:{type:"array",minItems:2,maxItems:3,items:{$ref:"#/definitions/args"}},binaryOrTernaryRule:{type:"object",additionalProperties:!1,properties:{substr:{title:"Substring Operation",description:"Get a portion of a string. Give a positive start position to return everything beginning at that index. Give a negative start position to work backwards from the end of the string, then return everything. Give a positive length to express how many characters to return.",$ref:"#/definitions/binaryOrTernaryOp"},"<":{title:"Less-Than/Between Operation. Can be used to test that one value is between two others.",$ref:"#/definitions/binaryOrTernaryOp"},"<=":{title:"Less-Than-Or-Equal-To/Between Operation. Can be used to test that one value is between two others.",$ref:"#/definitions/binaryOrTernaryOp"}}},binaryOp:{type:"array",minItems:2,maxItems:2,items:{$ref:"#/definitions/args"}},binaryRule:{title:"Binary Operation",description:"Any primitive JSONLogic operation with 2 operands.",type:"object",additionalProperties:!1,properties:{if:{title:"If Operator",description:'The if statement takes 1 or more arguments: a condition ("if"), what to do if its true ("then", optional, defaults to returning true), and what to do if its false ("else", optional, defaults to returning false). Note that the else condition can be used as an else-if statement by adding additional arguments.',$ref:"#/definitions/variadicOp"},"==":{title:"Lose Equality Operation",description:"Tests equality, with type coercion. Requires two arguments.",$ref:"#/definitions/binaryOp"},"===":{title:"Strict Equality Operation",description:"Tests strict equality. Requires two arguments.",$ref:"#/definitions/binaryOp"},"!=":{title:"Lose Inequality Operation",description:"Tests not-equal, with type coercion.",$ref:"#/definitions/binaryOp"},"!==":{title:"Strict Inequality Operation",description:"Tests strict not-equal.",$ref:"#/definitions/binaryOp"},">":{title:"Greater-Than Operation",$ref:"#/definitions/binaryOp"},">=":{title:"Greater-Than-Or-Equal-To Operation",$ref:"#/definitions/binaryOp"},"%":{title:"Modulo Operation",description:"Finds the remainder after the first argument is divided by the second argument.",$ref:"#/definitions/binaryOp"},"/":{title:"Division Operation",$ref:"#/definitions/binaryOp"},map:{title:"Map Operation",description:"Perform an action on every member of an array. Note, that inside the logic being used to map, var operations are relative to the array element being worked on.",$ref:"#/definitions/binaryOp"},filter:{title:"Filter Operation",description:"Keep only elements of the array that pass a test. Note, that inside the logic being used to filter, var operations are relative to the array element being worked on.",$ref:"#/definitions/binaryOp"},all:{title:"All Operation",description:"Perform a test on each member of that array, returning true if all pass. Inside the test code, var operations are relative to the array element being tested.",$ref:"#/definitions/binaryOp"},none:{title:"None Operation",description:"Perform a test on each member of that array, returning true if none pass. Inside the test code, var operations are relative to the array element being tested.",$ref:"#/definitions/binaryOp"},some:{title:"Some Operation",description:"Perform a test on each member of that array, returning true if some pass. Inside the test code, var operations are relative to the array element being tested.",$ref:"#/definitions/binaryOp"},in:{title:"In Operation",description:"If the second argument is an array, tests that the first argument is a member of the array.",$ref:"#/definitions/binaryOp"}}},reduceRule:{type:"object",additionalProperties:!1,properties:{reduce:{title:"Reduce Operation",description:'Combine all the elements in an array into a single value, like adding up a list of numbers. Note, that inside the logic being used to reduce, var operations only have access to an object with a "current" and a "accumulator".',type:"array",minItems:3,maxItems:3,items:{$ref:"#/definitions/args"}}}},associativeOp:{type:"array",minItems:2,items:{$ref:"#/definitions/args"}},associativeRule:{title:"Mathematically Associative Operation",description:"Operation applicable to 2 or more parameters.",type:"object",additionalProperties:!1,properties:{"*":{title:"Multiplication Operation",description:"Multiplication; associative, will accept and unlimited amount of arguments.",$ref:"#/definitions/associativeOp"}}},unaryOp:{anyOf:[{type:"array",minItems:1,maxItems:1,items:{$ref:"#/definitions/args"}},{$ref:"#/definitions/args"}]},unaryRule:{title:"Unary Operation",description:"Any primitive JSONLogic operation with 1 operands.",type:"object",additionalProperties:!1,properties:{"!":{title:"Negation Operation",description:"Logical negation (“not”). Takes just one argument.",$ref:"#/definitions/unaryOp"},"!!":{title:"Double Negation Operation",description:"Double negation, or 'cast to a boolean'. Takes a single argument.",$ref:"#/definitions/unaryOp"}}},variadicOp:{type:"array",minItems:1,items:{$ref:"#/definitions/args"}},variadicRule:{$comment:"note < and <= can be used with up to 3 ops (between)",type:"object",additionalProperties:!1,properties:{or:{title:"Or Operation",description:'Simple boolean test, with 1 or more arguments. At a more sophisticated level, "or" returns the first truthy argument, or the last argument.',$ref:"#/definitions/variadicOp"},and:{title:"",description:'Simple boolean test, with 1 or more arguments. At a more sophisticated level, "and" returns the first falsy argument, or the last argument.',$ref:"#/definitions/variadicOp"},"+":{title:"Addition Operation",description:"Addition; associative, will accept and unlimited amount of arguments.",$ref:"#/definitions/variadicOp"},"-":{title:"Subtraction Operation",$ref:"#/definitions/variadicOp"},max:{title:"Maximum Operation",description:"Return the maximum from a list of values.",$ref:"#/definitions/variadicOp"},min:{title:"Minimum Operation",description:"Return the minimum from a list of values.",$ref:"#/definitions/variadicOp"},merge:{title:"Merge Operation",description:"Takes one or more arrays, and merges them into one array. If arguments aren't arrays, they get cast to arrays.",$ref:"#/definitions/variadicOp"},cat:{title:"Concatenate Operation",description:"Concatenate all the supplied arguments. Note that this is not a join or implode operation, there is no “glue” string.",$ref:"#/definitions/variadicOp"}}},stringCompareArg:{oneOf:[{type:"string"},{$ref:"#/definitions/anyRule"}]},stringCompareArgs:{type:"array",minItems:2,maxItems:2,items:{$ref:"#/definitions/stringCompareArg"}},stringCompareRule:{type:"object",additionalProperties:!1,properties:{starts_with:{title:"Starts-With Operation",description:"The string attribute starts with the specified string value.",$ref:"#/definitions/stringCompareArgs"},ends_with:{title:"Ends-With Operation",description:"The string attribute ends with the specified string value.",$ref:"#/definitions/stringCompareArgs"}}},semVerString:{title:"Semantic Version String",description:"A string representing a valid semantic version expression as per https://semver.org/.",type:"string",pattern:"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"},ruleSemVer:{type:"object",additionalProperties:!1,properties:{sem_ver:{title:"Semantic Version Operation",description:'Attribute matches a semantic version condition. Accepts "npm-style" range specifiers: "=", "!=", ">", "<", ">=", "<=", "~" (match minor version), "^" (match major version).',type:"array",minItems:3,maxItems:3,items:[{oneOf:[{$ref:"#/definitions/semVerString"},{$ref:"#/definitions/varRule"}]},{description:'Range specifiers: "=", "!=", ">", "<", ">=", "<=", "~" (match minor version), "^" (match major version).',enum:["=","!=",">","<",">=","<=","~","^"]},{oneOf:[{$ref:"#/definitions/semVerString"},{$ref:"#/definitions/varRule"}]}]}}},fractionalWeightArg:{description:"Distribution for all possible variants, with their associated weighting.",type:"array",minItems:1,maxItems:2,items:[{description:'If this bucket is randomly selected, this string is used to as a key to retrieve the associated value from the "variants" object.',type:"string"},{description:"Weighted distribution for this variant key.",type:"number"}]},fractionalOp:{type:"array",minItems:3,$comment:"there seems to be a bug here, where ajv gives a warning (not an error) because maxItems doesn't equal the number of entries in items, though this is valid in this case",items:[{description:"Bucketing value used in pseudorandom assignment; should be unique and stable for each subject of flag evaluation. Defaults to a concatenation of the flagKey and targetingKey.",$ref:"#/definitions/anyRule"},{$ref:"#/definitions/fractionalWeightArg"},{$ref:"#/definitions/fractionalWeightArg"}],additionalItems:{$ref:"#/definitions/fractionalWeightArg"}},fractionalShorthandOp:{type:"array",minItems:2,items:{$ref:"#/definitions/fractionalWeightArg"}},fractionalRule:{type:"object",additionalProperties:!1,properties:{fractional:{title:"Fractional Operation",description:"Deterministic, pseudorandom fractional distribution.",oneOf:[{$ref:"#/definitions/fractionalOp"},{$ref:"#/definitions/fractionalShorthandOp"}]}}},reference:{additionalProperties:!1,type:"object",$comment:"patternProperties here is a bit of a hack to prevent this definition from being dereferenced early.",patternProperties:{"^\\$ref$":{title:"Reference",description:"A reference to another entity, used for $evaluators (shared rules).",type:"string"}}},args:{oneOf:[{$ref:"#/definitions/reference"},{$ref:"#/definitions/anyRule"},{$ref:"#/definitions/primitive"}]},anyRule:{anyOf:[{$ref:"#/definitions/varRule"},{$ref:"#/definitions/missingRule"},{$ref:"#/definitions/missingSomeRule"},{$ref:"#/definitions/binaryRule"},{$ref:"#/definitions/binaryOrTernaryRule"},{$ref:"#/definitions/associativeRule"},{$ref:"#/definitions/unaryRule"},{$ref:"#/definitions/variadicRule"},{$ref:"#/definitions/reduceRule"},{$ref:"#/definitions/stringCompareRule"},{$ref:"#/definitions/ruleSemVer"},{$ref:"#/definitions/fractionalRule"}]}},Mw={$id:$w,$schema:Ow,title:Tw,description:Rw,type:Nw,anyOf:jw,definitions:Dw};const ss="$flagd",Mv="flagKey",Cw="timestamp",xw="targetingKey",Cv=Symbol.for("flagd.logger");function Rd(n){const i=n[Cv];if(!i)throw new Error("Logger not found in context");return i}const Nd="starts_with",jd="ends_with";function Lw(n,i){return xv(Nd,n,i)}function qw(n,i){return xv(jd,n,i)}function xv(n,i,u){const l=Rd(u);if(!Array.isArray(i))return l.debug("Invalid comparison configuration: input is not an array"),!1;if(i.length!=2)return l.debug(`Invalid comparison configuration: invalid array length ${i.length}`),!1;if(typeof i[0]!="string"||typeof i[1]!="string")return l.debug("Invalid comparison configuration: array values are not strings"),!1;switch(n){case Nd:return i[0].startsWith(i[1]);case jd:return i[0].endsWith(i[1]);default:return l.debug(`Invalid comparison configuration: Invalid method '${n}'`),!1}}const os="sem_ver";function Uw(n,i){const u=Rd(i);if(!Array.isArray(n))return u.debug(`Invalid ${os} configuration: Expected an array`),!1;const l=Array.from(n);if(l.length!=3)return u.debug(`Invalid ${os} configuration: Expected 3 arguments, got ${l.length}`),!1;const s=Wc.parse(l[0]),o=Wc.parse(l[2]);if(!s||!o)return u.debug(`Invalid ${os} configuration: Unable to parse semver`),!1;const c=String(l[1]),d=Wc.compare(s,o);switch(c){case"=":return d==0;case"!=":return d!=0;case"<":return d<0;case"<=":return d<=0;case">=":return d>=0;case">":return d>0;case"^":return s.major==o.major;case"~":return s.major==o.major&&s.minor==o.minor}return!1}const od="fractional";function zw(n,i){const u=Rd(i);if(!Array.isArray(n))return null;const l=Array.from(n);if(l.length<2)return u.debug(`Invalid ${od} configuration: Expected at least 2 buckets, got ${l.length}`),null;const s=i[ss];if(!s)return u.debug("Missing flagd properties, cannot perform fractional targeting"),null;let o,c;if(typeof l[0]=="string")o=l[0],c=l.slice(1,l.length);else{const S=i[xw];if(!S)return u.debug("Missing targetingKey property, cannot perform fractional targeting"),null;o=`${s[Mv]}${S}`,c=l}let d;try{d=Bw(c)}catch(S){return u.debug(`Invalid ${od} configuration: `,S.message),null}const p=new gw(o).result()|0,m=Math.abs(p)/2147483648*100;let v=0;for(let S=0;S=m)return L.variant}return null}function Iw(n,i){return i==0?0:i*100/n}function Bw(n){const i=[];let u=0;for(let l=0;l2)throw new Error("Invalid bucketing entry. Requires at least a variant");if(typeof s[0]!="string")throw new Error("Bucketing require variant to be present in string format");let o=1;if(s.length>=2){if(typeof s[1]!="number")throw new Error("Bucketing require bucketing percentage to be present");o=s[1]}i.push({fraction:o,variant:s[0]}),u+=o}return{fractions:i,totalWeight:u}}class Hw{constructor(i,u){this.logger=u;const l=new _d;l.addMethod(Nd,Lw),l.addMethod(jd,qw),l.addMethod(os,Uw),l.addMethod(od,zw),this._logicEngine=l.build(i)}evaluate(i,u,l=this.logger){return Object.hasOwn(u,ss)&&this.logger.debug(`overwriting ${ss} property in the context`),this._logicEngine(Object.assign(Object.assign({},u),{[ss]:{[Mv]:i,[Cw]:Math.floor(Date.now()/1e3)},[Cv]:l}))}}class Vw{constructor(i,u,l){var s;if(this.logger=l,this._key=i,this._state=u.state,this._defaultVariant=u.defaultVariant,this._variants=new Map(Object.entries(u.variants)),this._metadata=(s=u.metadata)!==null&&s!==void 0?s:{},u.targeting&&Object.keys(u.targeting).length>0)try{this._targeting=new Hw(u.targeting,l)}catch{const c=`Invalid targeting configuration for flag '${i}'`;this.logger.warn(c),this._targetingParseErrorMessage=c}this._hash=OS.sha1(u),this.validateStructure()}get key(){return this._key}get hash(){return this._hash}get state(){return this._state}get defaultVariant(){return this._defaultVariant}get variants(){return this._variants}get metadata(){return this._metadata}evaluate(i,u=this.logger){let l,s;if(this._targetingParseErrorMessage)return{reason:Vn.ERROR,errorCode:Xr.PARSE_ERROR,errorMessage:this._targetingParseErrorMessage,flagMetadata:this.metadata};if(!this._targeting)l=this._defaultVariant,s=Vn.STATIC;else{let c;try{c=this._targeting.evaluate(this._key,i,u)}catch(d){return u.debug(`Error evaluating targeting rule for flag '${this._key}': ${d.message}`),{reason:Vn.ERROR,errorCode:Xr.GENERAL,errorMessage:`Error evaluating targeting rule for flag '${this._key}'`,flagMetadata:this.metadata}}c==null?(l=this._defaultVariant,s=Vn.DEFAULT):(l=c.toString(),s=Vn.TARGETING_MATCH)}const o=this._variants.get(l);return o===void 0?{reason:Vn.ERROR,errorCode:Xr.GENERAL,errorMessage:`Variant '${l}' not found in flag with key '${this._key}'`,flagMetadata:this.metadata}:{value:o,reason:s,variant:l,flagMetadata:this.metadata}}validateStructure(){if(this._state!=="ENABLED"&&this._state!=="DISABLED")throw new Hi(`Invalid flag state: ${JSON.stringify(this._state,void 0,2)}`);if(this._defaultVariant===void 0)throw new Hi(`Invalid flag defaultVariant: ${JSON.stringify(this._defaultVariant,void 0,2)}`);if(!this._variants.has(this._defaultVariant))throw new Hi(`Default variant ${this._defaultVariant} missing from variants ${JSON.stringify(this._variants,void 0,2)}`)}}const kw=new AS({strict:!1}),U0=kw.addSchema(Mw).compile(Aw),Gw="$evaluators",Yw=new RegExp("^[^{]*\\{|}[^}]*$","g"),z0="invalid flagd flag configuration";function Pw(n,i,u){var l;try{const s=Kw(n),o=JSON.parse(s);if(!U0(o)){const m=`${z0}: ${JSON.stringify(U0.errors,void 0,2)}`;if(i)throw new Hi(m);u.debug(m)}const d=new Map,p=(l=o.metadata)!==null&&l!==void 0?l:{};for(const m in o.flags){const v=o.flags[m];d.set(m,new Vw(m,Object.assign(Object.assign({},v),{metadata:Object.assign(Object.assign({},o.metadata),v.metadata)}),u))}return{flags:d,metadata:p}}catch(s){throw s instanceof Hi?s:new Hi(z0,{cause:s})}}function Kw(n){const i=JSON.parse(n)[Gw];if(!i)return n;let u=n;for(const l in i){const s=JSON.stringify(i[l]).replaceAll(Yw,""),o=new RegExp('"\\$ref":(\\s)*"'+l+'"',"g");u=u.replaceAll(o,s)}return u}class Lv{constructor(i){this.logger=i,this._flagSetMetadata={},this._flags=new Map}getFlag(i){return this._flags.get(i)}getFlags(){return this._flags}getFlagSetMetadata(){return this._flagSetMetadata}setConfigurations(i,u=!1){const{flags:l,metadata:s}=Pw(i,u,this.logger),o=this._flags,c=[],d=[],p=[];return l.forEach((m,v)=>{var S;o.has(v)?((S=o.get(v))===null||S===void 0?void 0:S.hash)!==m.hash&&p.push(v):c.push(v)}),o.forEach((m,v)=>{l.has(v)||d.push(v)}),this._flags=l,this._flagSetMetadata=s,[...c,...d,...p]}}class Fw{constructor(i,u){this._logger=u?new m_(u):new gv,this._storage=i||new Lv(this._logger)}setConfigurations(i){return this._storage.setConfigurations(i)}getFlag(i){return this._storage.getFlag(i)}getFlags(){return this._storage.getFlags()}getFlagSetMetadata(){return this._storage.getFlagSetMetadata()}resolveBooleanEvaluation(i,u,l,s=this._logger){return this.resolve("boolean",i,u,l,s)}resolveStringEvaluation(i,u,l,s=this._logger){return this.resolve("string",i,u,l,s)}resolveNumberEvaluation(i,u,l,s=this._logger){return this.resolve("number",i,u,l,s)}resolveObjectEvaluation(i,u,l,s=this._logger){return this.resolve("object",i,u,l,s)}resolveAll(i={},u=this._logger){const l=[];for(const[s,o]of this.getFlags())try{if(o.state==="DISABLED")continue;const c=o.evaluate(i,u);c.value!==void 0?l.push(Object.assign(Object.assign({},c),{flagKey:s})):u.debug(`Flag ${s} omitted because ${c.errorCode}: ${c.errorMessage}`)}catch(c){u.debug(`Error resolving flag ${s}: ${c.message}`)}return l}resolve(i,u,l,s={},o=this._logger){const c=this._storage.getFlag(u);if(!c)return{value:l,reason:Vn.ERROR,errorCode:Xr.FLAG_NOT_FOUND,errorMessage:`flag '${u}' not found`,flagMetadata:this._storage.getFlagSetMetadata()};if(c.state==="DISABLED")return{value:l,reason:Vn.ERROR,errorCode:Xr.FLAG_NOT_FOUND,errorMessage:`flag '${u}' is disabled`,flagMetadata:c.metadata};const d=c.evaluate(s,o);return d.value===void 0?Object.assign(Object.assign({},d),{value:l}):typeof d.value!==i?{value:l,reason:Vn.ERROR,errorCode:Xr.TYPE_MISMATCH,errorMessage:`Evaluated type of the flag ${u} does not match. Expected ${i}, got ${typeof d.value}`,flagMetadata:c.metadata}:Object.assign(Object.assign({},d),{value:d.value})}}/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */function qv(n){return typeof n>"u"||n===null}function Xw(n){return typeof n=="object"&&n!==null}function Qw(n){return Array.isArray(n)?n:qv(n)?[]:[n]}function Zw(n,i){var u,l,s,o;if(i)for(o=Object.keys(i),u=0,l=o.length;u0&&u.hash(f),u!==this)return u}s.prototype.hash=function(f){var c,u,l,d,m;switch(m=f.length,this.len+=m,u=this.k1,l=0,this.rem){case 0:u^=m>l?f.charCodeAt(l++)&65535:0;case 1:u^=m>l?(f.charCodeAt(l++)&65535)<<8:0;case 2:u^=m>l?(f.charCodeAt(l++)&65535)<<16:0;case 3:u^=m>l?(f.charCodeAt(l)&255)<<24:0,u^=m>l?(f.charCodeAt(l++)&65280)>>8:0}if(this.rem=m+this.rem&3,m-=this.rem,m>0){for(c=this.h1;u=u*11601+(u&65535)*3432906752&4294967295,u=u<<15|u>>>17,u=u*13715+(u&65535)*461832192&4294967295,c^=u,c=c<<13|c>>>19,c=c*5+3864292196&4294967295,!(l>=m);)u=f.charCodeAt(l++)&65535^(f.charCodeAt(l++)&65535)<<8^(f.charCodeAt(l++)&65535)<<16,d=f.charCodeAt(l++),u^=(d&255)<<24^(d&65280)>>8;switch(u=0,this.rem){case 3:u^=(f.charCodeAt(l+2)&65535)<<16;case 2:u^=(f.charCodeAt(l+1)&65535)<<8;case 1:u^=f.charCodeAt(l)&65535}this.h1=c}return this.k1=u,this},s.prototype.result=function(){var f,c;return f=this.k1,c=this.h1,f>0&&(f=f*11601+(f&65535)*3432906752&4294967295,f=f<<15|f>>>17,f=f*13715+(f&65535)*461832192&4294967295,c^=f),c^=this.len,c^=c>>>16,c=c*51819+(c&65535)*2246770688&4294967295,c^=c>>>13,c=c*44597+(c&65535)*3266445312&4294967295,c^=c>>>16,c>>>0},s.prototype.reset=function(f){return this.h1=typeof f=="number"?f:0,this.rem=this.k1=this.len=0,this},a=new s,r.exports=s})()})(rc)),rc.exports}var Pb=Fb();const Jb=bc(Pb),Du="$flagd",wg="flagKey",Wb="timestamp",e2="targetingKey",Og=Symbol.for("flagd.logger");function Nc(r){const a=r[Og];if(!a)throw new Error("Logger not found in context");return a}const Mc="starts_with",jc="ends_with";function t2(r,a){return Sg(Mc,r,a)}function r2(r,a){return Sg(jc,r,a)}function Sg(r,a,s){const f=Nc(s);if(!Array.isArray(a))return f.debug("Invalid comparison configuration: input is not an array"),!1;if(a.length!=2)return f.debug(`Invalid comparison configuration: invalid array length ${a.length}`),!1;if(typeof a[0]!="string"||typeof a[1]!="string")return f.debug("Invalid comparison configuration: array values are not strings"),!1;switch(r){case Mc:return a[0].startsWith(a[1]);case jc:return a[0].endsWith(a[1]);default:return f.debug(`Invalid comparison configuration: Invalid method '${r}'`),!1}}const Nu="sem_ver";function n2(r,a){const s=Nc(a);if(!Array.isArray(r))return s.debug(`Invalid ${Nu} configuration: Expected an array`),!1;const f=Array.from(r);if(f.length!=3)return s.debug(`Invalid ${Nu} configuration: Expected 3 arguments, got ${f.length}`),!1;const c=tc.parse(f[0]),u=tc.parse(f[2]);if(!c||!u)return s.debug(`Invalid ${Nu} configuration: Unable to parse semver`),!1;const l=String(f[1]),d=tc.compare(c,u);switch(l){case"=":return d==0;case"!=":return d!=0;case"<":return d<0;case"<=":return d<=0;case">=":return d>=0;case">":return d>0;case"^":return c.major==u.major;case"~":return c.major==u.major&&c.minor==u.minor}return!1}const cc="fractional";function a2(r,a){const s=Nc(a);if(!Array.isArray(r))return null;const f=Array.from(r);if(f.length<2)return s.debug(`Invalid ${cc} configuration: Expected at least 2 buckets, got ${f.length}`),null;const c=a[Du];if(!c)return s.debug("Missing flagd properties, cannot perform fractional targeting"),null;let u,l;if(typeof f[0]=="string")u=f[0],l=f.slice(1,f.length);else{const v=a[e2];if(!v)return s.debug("Missing targetingKey property, cannot perform fractional targeting"),null;u=`${c[wg]}${v}`,l=f}let d;try{d=l2(l)}catch(v){return s.debug(`Invalid ${cc} configuration: `,v.message),null}const m=new Jb(u).result()|0,p=Math.abs(m)/2147483648*100;let g=0;for(let v=0;v=p)return T.variant}return null}function i2(r,a){return a==0?0:a*100/r}function l2(r){const a=[];let s=0;for(let f=0;f2)throw new Error("Invalid bucketing entry. Requires at least a variant");if(typeof c[0]!="string")throw new Error("Bucketing require variant to be present in string format");let u=1;if(c.length>=2){if(typeof c[1]!="number")throw new Error("Bucketing require bucketing percentage to be present");u=c[1]}a.push({fraction:u,variant:c[0]}),s+=u}return{fractions:a,totalWeight:s}}class Ua{constructor(a,s,f={}){var c;this.logger=s,this._useInterpreter=(c=f.disableDynamicCodeGeneration)!==null&&c!==void 0?c:!1;const u=new wc;u.addMethod(Mc,t2),u.addMethod(jc,r2),u.addMethod(Nu,n2),u.addMethod(cc,a2),this._useInterpreter?(Ua.validateMethods(a,u),this._engine=u,this._logic=a):this._compiledLogic=u.build(a)}static validateMethods(a,s){if(a===null||typeof a!="object")return;if(Array.isArray(a)){for(const l of a)Ua.validateMethods(l,s);return}const f=Object.keys(a);if(f.length===0)return;const c=f[0];if(!(c in s.methods)&&!s.isData(a,c))throw new Error(`Method '${c}' was not found in the Logic Engine.`);const u=a[c];if(Array.isArray(u))for(const l of u)Ua.validateMethods(l,s);else Ua.validateMethods(u,s)}evaluate(a,s,f=this.logger){Object.hasOwn(s,Du)&&f.debug(`overwriting ${Du} property in the context`);const c=Object.assign(Object.assign({},s),{[Du]:{[wg]:a,[Wb]:Math.floor(Date.now()/1e3)},[Og]:f});return this._useInterpreter?this._engine.run(this._logic,c):this._compiledLogic(c)}}class u2{constructor(a,s,f,c={}){var u;if(this.logger=f,this._key=a,this._state=s.state,this._defaultVariant=s.defaultVariant||void 0,this._variants=new Map(Object.entries(s.variants)),this._metadata=(u=s.metadata)!==null&&u!==void 0?u:{},s.targeting&&Object.keys(s.targeting).length>0)try{this._targeting=new Ua(s.targeting,f,c)}catch{const d=`Invalid targeting configuration for flag '${a}'`;this.logger.warn(d),this._targetingParseErrorMessage=d}this._hash=ob.sha1(s),this.validateStructure()}get key(){return this._key}get hash(){return this._hash}get state(){return this._state}get defaultVariant(){return this._defaultVariant}get variants(){return this._variants}get metadata(){return this._metadata}evaluate(a,s=this.logger){let f,c;if(this._targetingParseErrorMessage)return{reason:br.ERROR,errorCode:Fn.PARSE_ERROR,errorMessage:this._targetingParseErrorMessage,flagMetadata:this.metadata};if(!this._targeting)f=this._defaultVariant,c=br.STATIC;else{let d;try{d=this._targeting.evaluate(this._key,a,s)}catch(m){return s.debug(`Error evaluating targeting rule for flag '${this._key}': ${m.message}`),{reason:br.ERROR,errorCode:Fn.GENERAL,errorMessage:`Error evaluating targeting rule for flag '${this._key}'`,flagMetadata:this.metadata}}d==null?(f=this._defaultVariant,c=br.DEFAULT):(f=d.toString(),c=br.TARGETING_MATCH)}if(f==null&&(this.defaultVariant===null||this.defaultVariant===void 0))return{reason:br.DEFAULT,flagMetadata:this.metadata};const u=f,l=this._variants.get(u);return l===void 0?{reason:br.ERROR,errorCode:Fn.GENERAL,errorMessage:`Variant '${f}' not found in flag with key '${this._key}'`,flagMetadata:this.metadata}:{value:l,reason:c,variant:u,flagMetadata:this.metadata}}validateStructure(){if(this._state!=="ENABLED"&&this._state!=="DISABLED")throw new Lm(`Invalid flag state: ${JSON.stringify(this._state,void 0,2)}`);if(this._defaultVariant&&!this._variants.has(this._defaultVariant))throw new Lm(`Default variant ${this._defaultVariant} missing from variants ${JSON.stringify(this._variants,void 0,2)}`)}}function s2(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Cc={exports:{}};Cc.exports=Lc;Cc.exports.default=Lc;const Tg={additionalProperties:{type:["string","number","boolean"]}},Gt=new RegExp("^.{1,}$","u"),hc=new RegExp("^\\$flagd\\.((timestamp)|(flagKey))$","u"),dc=new RegExp("^\\$flagd\\..*$","u"),f2={properties:{if:{title:"If Operator",description:'The if statement takes 1 or more arguments: a condition ("if"), what to do if its true ("then", optional, defaults to returning true), and what to do if its false ("else", optional, defaults to returning false). Note that the else condition can be used as an else-if statement by adding additional arguments.',$ref:"#/definitions/variadicOp"},"==":{title:"Lose Equality Operation",description:"Tests equality, with type coercion. Requires two arguments.",$ref:"#/definitions/binaryOp"},"===":{title:"Strict Equality Operation",description:"Tests strict equality. Requires two arguments.",$ref:"#/definitions/binaryOp"},"!=":{title:"Lose Inequality Operation",description:"Tests not-equal, with type coercion.",$ref:"#/definitions/binaryOp"},"!==":{title:"Strict Inequality Operation",description:"Tests strict not-equal.",$ref:"#/definitions/binaryOp"},">":{title:"Greater-Than Operation",$ref:"#/definitions/binaryOp"},">=":{title:"Greater-Than-Or-Equal-To Operation",$ref:"#/definitions/binaryOp"},"%":{title:"Modulo Operation",description:"Finds the remainder after the first argument is divided by the second argument.",$ref:"#/definitions/binaryOp"},"/":{title:"Division Operation",$ref:"#/definitions/binaryOp"},map:{title:"Map Operation",description:"Perform an action on every member of an array. Note, that inside the logic being used to map, var operations are relative to the array element being worked on.",$ref:"#/definitions/binaryOp"},filter:{title:"Filter Operation",description:"Keep only elements of the array that pass a test. Note, that inside the logic being used to filter, var operations are relative to the array element being worked on.",$ref:"#/definitions/binaryOp"},all:{title:"All Operation",description:"Perform a test on each member of that array, returning true if all pass. Inside the test code, var operations are relative to the array element being tested.",$ref:"#/definitions/binaryOp"},none:{title:"None Operation",description:"Perform a test on each member of that array, returning true if none pass. Inside the test code, var operations are relative to the array element being tested.",$ref:"#/definitions/binaryOp"},some:{title:"Some Operation",description:"Perform a test on each member of that array, returning true if some pass. Inside the test code, var operations are relative to the array element being tested.",$ref:"#/definitions/binaryOp"},in:{title:"In Operation",description:"If the second argument is an array, tests that the first argument is a member of the array.",$ref:"#/definitions/binaryOp"}}},o2=Object.prototype.hasOwnProperty,Dy=new RegExp("^\\$ref$","u"),Yr={validate:Za};function Ke(r,{instancePath:a="",parentData:s,parentDataProperty:f,rootData:c=r}={}){let u=null,l=0;const d=l;let m=!1,p=null;const g=l;if(l===l)if(r&&typeof r=="object"&&!Array.isArray(r)){const D=l;for(const X in r)if(!Dy.test(X)){const k={instancePath:a,schemaPath:"#/definitions/reference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:X},message:"must NOT have additional properties"};u===null?u=[k]:u.push(k),l++;break}if(D===l){var T=!0;for(const X in r)if(Dy.test(X)){const k=l;if(typeof r[X]!="string"){const W={instancePath:a+"/"+X.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/reference/patternProperties/%5E%5C%24ref%24/type",keyword:"type",params:{type:"string"},message:"must be string"};u===null?u=[W]:u.push(W),l++}var T=k===l;if(!T)break}}}else{const D={instancePath:a,schemaPath:"#/definitions/reference/type",keyword:"type",params:{type:"object"},message:"must be object"};u===null?u=[D]:u.push(D),l++}var C=g===l;C&&(m=!0,p=0);const j=l;Yr.validate(r,{instancePath:a,parentData:s,parentDataProperty:f,rootData:c})||(u=u===null?Yr.validate.errors:u.concat(Yr.validate.errors),l=u.length);var C=j===l;if(C&&m)m=!1,p=[p,1];else{C&&(m=!0,p=1);const D=l,X=l;let k=!1,I=null;const W=l;if(r!==null){const U={instancePath:a,schemaPath:"#/definitions/primitive/oneOf/0/type",keyword:"type",params:{type:"null"},message:"must be null"};u===null?u=[U]:u.push(U),l++}var N=W===l;N&&(k=!0,I=0);const te=l;if(typeof r!="boolean"){const U={instancePath:a,schemaPath:"#/definitions/primitive/oneOf/1/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};u===null?u=[U]:u.push(U),l++}var N=te===l;if(N&&k)k=!1,I=[I,1];else{N&&(k=!0,I=1);const U=l;if(typeof r!="number"){const w={instancePath:a,schemaPath:"#/definitions/primitive/oneOf/2/type",keyword:"type",params:{type:"number"},message:"must be number"};u===null?u=[w]:u.push(w),l++}var N=U===l;if(N&&k)k=!1,I=[I,2];else{N&&(k=!0,I=2);const w=l;if(typeof r!="string"){const q={instancePath:a,schemaPath:"#/definitions/primitive/oneOf/3/type",keyword:"type",params:{type:"string"},message:"must be string"};u===null?u=[q]:u.push(q),l++}var N=w===l;if(N&&k)k=!1,I=[I,3];else{N&&(k=!0,I=3);const q=l;if(!Array.isArray(r)){const ce={instancePath:a,schemaPath:"#/definitions/primitive/oneOf/4/type",keyword:"type",params:{type:"array"},message:"must be array"};u===null?u=[ce]:u.push(ce),l++}var N=q===l;N&&k?(k=!1,I=[I,4]):N&&(k=!0,I=4)}}}if(k)l=X,u!==null&&(X?u.length=X:u=null);else{const U={instancePath:a,schemaPath:"#/definitions/primitive/oneOf",keyword:"oneOf",params:{passingSchemas:I},message:"must match exactly one schema in oneOf"};u===null?u=[U]:u.push(U),l++}var C=D===l;C&&m?(m=!1,p=[p,2]):C&&(m=!0,p=2)}if(m)l=d,u!==null&&(d?u.length=d:u=null);else{const D={instancePath:a,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:p},message:"must match exactly one schema in oneOf"};return u===null?u=[D]:u.push(D),l++,Ke.errors=u,!1}return Ke.errors=u,l===0}function Be(r,{instancePath:a="",parentData:s,parentDataProperty:f,rootData:c=r}={}){let u=null,l=0;if(l===0)if(Array.isArray(r)){if(r.length<1)return Be.errors=[{instancePath:a,schemaPath:"#/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"}],!1;{var d=!0;const m=r.length;for(let p=0;p2)return we.errors=[{instancePath:a,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit:2},message:"must NOT have more than 2 items"}],!1;if(r.length<2)return we.errors=[{instancePath:a,schemaPath:"#/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"}],!1;{var d=!0;const m=r.length;for(let p=0;p"]!==void 0){const p=l;we(r[">"],{instancePath:a+"/>",parentData:r,parentDataProperty:">",rootData:c})||(u=u===null?we.errors:u.concat(we.errors),l=u.length);var d=p===l}else var d=!0;if(d){if(r[">="]!==void 0){const p=l;we(r[">="],{instancePath:a+"/>=",parentData:r,parentDataProperty:">=",rootData:c})||(u=u===null?we.errors:u.concat(we.errors),l=u.length);var d=p===l}else var d=!0;if(d){if(r["%"]!==void 0){const p=l;we(r["%"],{instancePath:a+"/%",parentData:r,parentDataProperty:"%",rootData:c})||(u=u===null?we.errors:u.concat(we.errors),l=u.length);var d=p===l}else var d=!0;if(d){if(r["/"]!==void 0){const p=l;we(r["/"],{instancePath:a+"/~1",parentData:r,parentDataProperty:"/",rootData:c})||(u=u===null?we.errors:u.concat(we.errors),l=u.length);var d=p===l}else var d=!0;if(d){if(r.map!==void 0){const p=l;we(r.map,{instancePath:a+"/map",parentData:r,parentDataProperty:"map",rootData:c})||(u=u===null?we.errors:u.concat(we.errors),l=u.length);var d=p===l}else var d=!0;if(d){if(r.filter!==void 0){const p=l;we(r.filter,{instancePath:a+"/filter",parentData:r,parentDataProperty:"filter",rootData:c})||(u=u===null?we.errors:u.concat(we.errors),l=u.length);var d=p===l}else var d=!0;if(d){if(r.all!==void 0){const p=l;we(r.all,{instancePath:a+"/all",parentData:r,parentDataProperty:"all",rootData:c})||(u=u===null?we.errors:u.concat(we.errors),l=u.length);var d=p===l}else var d=!0;if(d){if(r.none!==void 0){const p=l;we(r.none,{instancePath:a+"/none",parentData:r,parentDataProperty:"none",rootData:c})||(u=u===null?we.errors:u.concat(we.errors),l=u.length);var d=p===l}else var d=!0;if(d){if(r.some!==void 0){const p=l;we(r.some,{instancePath:a+"/some",parentData:r,parentDataProperty:"some",rootData:c})||(u=u===null?we.errors:u.concat(we.errors),l=u.length);var d=p===l}else var d=!0;if(d)if(r.in!==void 0){const p=l;we(r.in,{instancePath:a+"/in",parentData:r,parentDataProperty:"in",rootData:c})||(u=u===null?we.errors:u.concat(we.errors),l=u.length);var d=p===l}else var d=!0}}}}}}}}}}}}}}}else return $a.errors=[{instancePath:a,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return $a.errors=u,l===0}function kt(r,{instancePath:a="",parentData:s,parentDataProperty:f,rootData:c=r}={}){let u=null,l=0;if(l===0)if(Array.isArray(r)){if(r.length>3)return kt.errors=[{instancePath:a,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit:3},message:"must NOT have more than 3 items"}],!1;if(r.length<2)return kt.errors=[{instancePath:a,schemaPath:"#/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"}],!1;{var d=!0;const m=r.length;for(let p=0;p1){const T={instancePath:a,schemaPath:"#/anyOf/0/maxItems",keyword:"maxItems",params:{limit:1},message:"must NOT have more than 1 items"};u===null?u=[T]:u.push(T),l++}else if(r.length<1){const T={instancePath:a,schemaPath:"#/anyOf/0/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};u===null?u=[T]:u.push(T),l++}else{var g=!0;const T=r.length;for(let j=0;j3)return $r.errors=[{instancePath:a+"/reduce",schemaPath:"#/properties/reduce/maxItems",keyword:"maxItems",params:{limit:3},message:"must NOT have more than 3 items"}],!1;if(p.length<3)return $r.errors=[{instancePath:a+"/reduce",schemaPath:"#/properties/reduce/minItems",keyword:"minItems",params:{limit:3},message:"must NOT have fewer than 3 items"}],!1;{var d=!0;const v=p.length;for(let T=0;T2)return Ar.errors=[{instancePath:a,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit:2},message:"must NOT have more than 2 items"}],!1;if(r.length<2)return Ar.errors=[{instancePath:a,schemaPath:"#/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"}],!1;{var d=!0;const m=r.length;for(let p=0;p", "<", ">=", "<=", "~" (match minor version), "^" (match major version).',enum:["=","!=",">","<",">=","<=","~","^"]},{oneOf:[{$ref:"#/definitions/semVerString"},{$ref:"#/definitions/varRule"}]}]}}},Ny=new RegExp("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$","u");function nr(r,{instancePath:a="",parentData:s,parentDataProperty:f,rootData:c=r}={}){let u=null,l=0;if(l===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const k=l;for(const I in r)if(I!=="sem_ver")return nr.errors=[{instancePath:a,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:I},message:"must NOT have additional properties"}],!1;if(k===l&&r.sem_ver!==void 0){let I=r.sem_ver;if(l===l)if(Array.isArray(I)){if(I.length>3)return nr.errors=[{instancePath:a+"/sem_ver",schemaPath:"#/properties/sem_ver/maxItems",keyword:"maxItems",params:{limit:3},message:"must NOT have more than 3 items"}],!1;if(I.length<3)return nr.errors=[{instancePath:a+"/sem_ver",schemaPath:"#/properties/sem_ver/minItems",keyword:"minItems",params:{limit:3},message:"must NOT have fewer than 3 items"}],!1;{const te=I.length;if(te>0){let R=I[0];const U=l,_=l;let w=!1,E=null;const q=l;if(l===l)if(typeof R=="string"){if(!Ny.test(R)){const z={instancePath:a+"/sem_ver/0",schemaPath:"#/definitions/semVerString/pattern",keyword:"pattern",params:{pattern:"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"},message:'must match pattern "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"'};u===null?u=[z]:u.push(z),l++}}else{const z={instancePath:a+"/sem_ver/0",schemaPath:"#/definitions/semVerString/type",keyword:"type",params:{type:"string"},message:"must be string"};u===null?u=[z]:u.push(z),l++}var v=q===l;v&&(w=!0,E=0);const ce=l;if(l===l)if(R&&typeof R=="object"&&!Array.isArray(R)){const z=l;for(const x in R)if(x!=="var"){const Z={instancePath:a+"/sem_ver/0",schemaPath:"#/definitions/varRule/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:x},message:"must NOT have additional properties"};u===null?u=[Z]:u.push(Z),l++;break}if(z===l&&R.var!==void 0){let x=R.var;const Z=l;let P=!1;const J=l;if(l===J)if(typeof x=="string"){if(!hc.test(x)){const O={instancePath:a+"/sem_ver/0/var",schemaPath:"#/definitions/varRule/properties/var/anyOf/0/pattern",keyword:"pattern",params:{pattern:"^\\$flagd\\.((timestamp)|(flagKey))$"},message:'must match pattern "^\\$flagd\\.((timestamp)|(flagKey))$"'};u===null?u=[O]:u.push(O),l++}}else{const O={instancePath:a+"/sem_ver/0/var",schemaPath:"#/definitions/varRule/properties/var/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};u===null?u=[O]:u.push(O),l++}var d=J===l;if(P=P||d,!P){const O=l,$=l,ee=l;if(l===ee)if(typeof x=="string"){if(!dc.test(x)){const ie={};u===null?u=[ie]:u.push(ie),l++}}else{const ie={};u===null?u=[ie]:u.push(ie),l++}var m=ee===l;if(m){const ie={instancePath:a+"/sem_ver/0/var",schemaPath:"#/definitions/varRule/properties/var/anyOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};u===null?u=[ie]:u.push(ie),l++}else l=$,u!==null&&($?u.length=$:u=null);var d=O===l;if(P=P||d,!P){const ie=l;if(l===ie)if(Array.isArray(x))if(x.length<1){const de={instancePath:a+"/sem_ver/0/var",schemaPath:"#/definitions/varRule/properties/var/anyOf/2/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};u===null?u=[de]:u.push(de),l++}else{const de=x.length;var p=de<=1;if(!p)for(let Re=1;Re0&&typeof x[0]!="string"){const B={instancePath:a+"/sem_ver/0/var/0",schemaPath:"#/definitions/varRule/properties/var/anyOf/2/items/0/type",keyword:"type",params:{type:"string"},message:"must be string"};u===null?u=[B]:u.push(B),l++}}else{const de={instancePath:a+"/sem_ver/0/var",schemaPath:"#/definitions/varRule/properties/var/anyOf/2/type",keyword:"type",params:{type:"array"},message:"must be array"};u===null?u=[de]:u.push(de),l++}var d=ie===l;P=P||d}}if(P)l=Z,u!==null&&(Z?u.length=Z:u=null);else{const O={instancePath:a+"/sem_ver/0/var",schemaPath:"#/definitions/varRule/properties/var/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};u===null?u=[O]:u.push(O),l++}}}else{const z={instancePath:a+"/sem_ver/0",schemaPath:"#/definitions/varRule/type",keyword:"type",params:{type:"object"},message:"must be object"};u===null?u=[z]:u.push(z),l++}var v=ce===l;if(v&&w?(w=!1,E=[E,1]):v&&(w=!0,E=1),w)l=_,u!==null&&(_?u.length=_:u=null);else{const z={instancePath:a+"/sem_ver/0",schemaPath:"#/properties/sem_ver/items/0/oneOf",keyword:"oneOf",params:{passingSchemas:E},message:"must match exactly one schema in oneOf"};return u===null?u=[z]:u.push(z),l++,nr.errors=u,!1}var T=U===l}if(T){if(te>1){let R=I[1];const U=l;if(!(R==="="||R==="!="||R===">"||R==="<"||R===">="||R==="<="||R==="~"||R==="^"))return nr.errors=[{instancePath:a+"/sem_ver/1",schemaPath:"#/properties/sem_ver/items/1/enum",keyword:"enum",params:{allowedValues:c2.properties.sem_ver.items[1].enum},message:"must be equal to one of the allowed values"}],!1;var T=U===l}if(T&&te>2){let R=I[2];const U=l,_=l;let w=!1,E=null;const q=l;if(l===l)if(typeof R=="string"){if(!Ny.test(R)){const x={instancePath:a+"/sem_ver/2",schemaPath:"#/definitions/semVerString/pattern",keyword:"pattern",params:{pattern:"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"},message:'must match pattern "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"'};u===null?u=[x]:u.push(x),l++}}else{const x={instancePath:a+"/sem_ver/2",schemaPath:"#/definitions/semVerString/type",keyword:"type",params:{type:"string"},message:"must be string"};u===null?u=[x]:u.push(x),l++}var X=q===l;X&&(w=!0,E=0);const ce=l;if(l===l)if(R&&typeof R=="object"&&!Array.isArray(R)){const x=l;for(const Z in R)if(Z!=="var"){const P={instancePath:a+"/sem_ver/2",schemaPath:"#/definitions/varRule/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:Z},message:"must NOT have additional properties"};u===null?u=[P]:u.push(P),l++;break}if(x===l&&R.var!==void 0){let Z=R.var;const P=l;let J=!1;const O=l;if(l===O)if(typeof Z=="string"){if(!hc.test(Z)){const $={instancePath:a+"/sem_ver/2/var",schemaPath:"#/definitions/varRule/properties/var/anyOf/0/pattern",keyword:"pattern",params:{pattern:"^\\$flagd\\.((timestamp)|(flagKey))$"},message:'must match pattern "^\\$flagd\\.((timestamp)|(flagKey))$"'};u===null?u=[$]:u.push($),l++}}else{const $={instancePath:a+"/sem_ver/2/var",schemaPath:"#/definitions/varRule/properties/var/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};u===null?u=[$]:u.push($),l++}var j=O===l;if(J=J||j,!J){const $=l,ee=l,se=l;if(l===se)if(typeof Z=="string"){if(!dc.test(Z)){const he={};u===null?u=[he]:u.push(he),l++}}else{const he={};u===null?u=[he]:u.push(he),l++}var C=se===l;if(C){const he={instancePath:a+"/sem_ver/2/var",schemaPath:"#/definitions/varRule/properties/var/anyOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};u===null?u=[he]:u.push(he),l++}else l=ee,u!==null&&(ee?u.length=ee:u=null);var j=$===l;if(J=J||j,!J){const he=l;if(l===he)if(Array.isArray(Z))if(Z.length<1){const Re={instancePath:a+"/sem_ver/2/var",schemaPath:"#/definitions/varRule/properties/var/anyOf/2/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};u===null?u=[Re]:u.push(Re),l++}else{const Re=Z.length;var N=Re<=1;if(!N)for(let B=1;B0&&typeof Z[0]!="string"){const b={instancePath:a+"/sem_ver/2/var/0",schemaPath:"#/definitions/varRule/properties/var/anyOf/2/items/0/type",keyword:"type",params:{type:"string"},message:"must be string"};u===null?u=[b]:u.push(b),l++}}else{const Re={instancePath:a+"/sem_ver/2/var",schemaPath:"#/definitions/varRule/properties/var/anyOf/2/type",keyword:"type",params:{type:"array"},message:"must be array"};u===null?u=[Re]:u.push(Re),l++}var j=he===l;J=J||j}}if(J)l=P,u!==null&&(P?u.length=P:u=null);else{const $={instancePath:a+"/sem_ver/2/var",schemaPath:"#/definitions/varRule/properties/var/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};u===null?u=[$]:u.push($),l++}}}else{const x={instancePath:a+"/sem_ver/2",schemaPath:"#/definitions/varRule/type",keyword:"type",params:{type:"object"},message:"must be object"};u===null?u=[x]:u.push(x),l++}var X=ce===l;if(X&&w?(w=!1,E=[E,1]):X&&(w=!0,E=1),w)l=_,u!==null&&(_?u.length=_:u=null);else{const x={instancePath:a+"/sem_ver/2",schemaPath:"#/properties/sem_ver/items/2/oneOf",keyword:"oneOf",params:{passingSchemas:E},message:"must match exactly one schema in oneOf"};return u===null?u=[x]:u.push(x),l++,nr.errors=u,!1}var T=U===l}}}}else return nr.errors=[{instancePath:a+"/sem_ver",schemaPath:"#/properties/sem_ver/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1}}else return nr.errors=[{instancePath:a,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return nr.errors=u,l===0}function nt(r,{instancePath:a="",parentData:s,parentDataProperty:f,rootData:c=r}={}){let u=null,l=0;if(l===0)if(Array.isArray(r)){if(r.length<3)return nt.errors=[{instancePath:a,schemaPath:"#/minItems",keyword:"minItems",params:{limit:3},message:"must NOT have fewer than 3 items"}],!1;{const T=r.length;var d=T<=3;if(!d)for(let j=3;j2)return nt.errors=[{instancePath:a+"/"+j,schemaPath:"#/definitions/fractionalWeightArg/maxItems",keyword:"maxItems",params:{limit:2},message:"must NOT have more than 2 items"}],!1;if(C.length<1)return nt.errors=[{instancePath:a+"/"+j,schemaPath:"#/definitions/fractionalWeightArg/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"}],!1;{const k=C.length;if(k>0){const I=l;if(typeof C[0]!="string")return nt.errors=[{instancePath:a+"/"+j+"/0",schemaPath:"#/definitions/fractionalWeightArg/items/0/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var m=I===l}if(m&&k>1){const I=l;if(typeof C[1]!="number")return nt.errors=[{instancePath:a+"/"+j+"/1",schemaPath:"#/definitions/fractionalWeightArg/items/1/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var m=I===l}}}else return nt.errors=[{instancePath:a+"/"+j,schemaPath:"#/definitions/fractionalWeightArg/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var d=N===l;if(!d)break}if(d){const j=r.length;if(j>0){const C=l;Yr.validate(r[0],{instancePath:a+"/0",parentData:r,parentDataProperty:0,rootData:c})||(u=u===null?Yr.validate.errors:u.concat(Yr.validate.errors),l=u.length);var p=C===l}if(p){if(j>1){let C=r[1];const N=l;if(l===l)if(Array.isArray(C)){if(C.length>2)return nt.errors=[{instancePath:a+"/1",schemaPath:"#/definitions/fractionalWeightArg/maxItems",keyword:"maxItems",params:{limit:2},message:"must NOT have more than 2 items"}],!1;if(C.length<1)return nt.errors=[{instancePath:a+"/1",schemaPath:"#/definitions/fractionalWeightArg/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"}],!1;{const k=C.length;if(k>0){const I=l;if(typeof C[0]!="string")return nt.errors=[{instancePath:a+"/1/0",schemaPath:"#/definitions/fractionalWeightArg/items/0/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var g=I===l}if(g&&k>1){const I=l;if(typeof C[1]!="number")return nt.errors=[{instancePath:a+"/1/1",schemaPath:"#/definitions/fractionalWeightArg/items/1/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var g=I===l}}}else return nt.errors=[{instancePath:a+"/1",schemaPath:"#/definitions/fractionalWeightArg/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=N===l}if(p&&j>2){let C=r[2];const N=l;if(l===l)if(Array.isArray(C)){if(C.length>2)return nt.errors=[{instancePath:a+"/2",schemaPath:"#/definitions/fractionalWeightArg/maxItems",keyword:"maxItems",params:{limit:2},message:"must NOT have more than 2 items"}],!1;if(C.length<1)return nt.errors=[{instancePath:a+"/2",schemaPath:"#/definitions/fractionalWeightArg/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"}],!1;{const k=C.length;if(k>0){const I=l;if(typeof C[0]!="string")return nt.errors=[{instancePath:a+"/2/0",schemaPath:"#/definitions/fractionalWeightArg/items/0/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var v=I===l}if(v&&k>1){const I=l;if(typeof C[1]!="number")return nt.errors=[{instancePath:a+"/2/1",schemaPath:"#/definitions/fractionalWeightArg/items/1/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var v=I===l}}}else return nt.errors=[{instancePath:a+"/2",schemaPath:"#/definitions/fractionalWeightArg/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var p=N===l}}}}}else return nt.errors=[{instancePath:a,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;return nt.errors=u,l===0}function fr(r,{instancePath:a="",parentData:s,parentDataProperty:f,rootData:c=r}={}){let u=null,l=0;if(Array.isArray(r)){if(r.length<2)return fr.errors=[{instancePath:a,schemaPath:"#/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"}],!1;{var d=!0;const p=r.length;for(let g=0;g2)return fr.errors=[{instancePath:a+"/"+g,schemaPath:"#/definitions/fractionalWeightArg/maxItems",keyword:"maxItems",params:{limit:2},message:"must NOT have more than 2 items"}],!1;if(v.length<1)return fr.errors=[{instancePath:a+"/"+g,schemaPath:"#/definitions/fractionalWeightArg/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"}],!1;{const C=v.length;if(C>0){const N=l;if(typeof v[0]!="string")return fr.errors=[{instancePath:a+"/"+g+"/0",schemaPath:"#/definitions/fractionalWeightArg/items/0/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var m=N===l}if(m&&C>1){const N=l;if(typeof v[1]!="number")return fr.errors=[{instancePath:a+"/"+g+"/1",schemaPath:"#/definitions/fractionalWeightArg/items/1/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var m=N===l}}}else return fr.errors=[{instancePath:a+"/"+g,schemaPath:"#/definitions/fractionalWeightArg/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var d=T===l;if(!d)break}}}else return fr.errors=[{instancePath:a,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;return fr.errors=u,l===0}function Qn(r,{instancePath:a="",parentData:s,parentDataProperty:f,rootData:c=r}={}){let u=null,l=0;if(l===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const m=l;for(const p in r)if(p!=="fractional")return Qn.errors=[{instancePath:a,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:p},message:"must NOT have additional properties"}],!1;if(m===l&&r.fractional!==void 0){let p=r.fractional;const g=l;let v=!1,T=null;const j=l;nt(p,{instancePath:a+"/fractional",parentData:r,parentDataProperty:"fractional",rootData:c})||(u=u===null?nt.errors:u.concat(nt.errors),l=u.length);var d=j===l;d&&(v=!0,T=0);const C=l;fr(p,{instancePath:a+"/fractional",parentData:r,parentDataProperty:"fractional",rootData:c})||(u=u===null?fr.errors:u.concat(fr.errors),l=u.length);var d=C===l;if(d&&v?(v=!1,T=[T,1]):d&&(v=!0,T=1),v)l=g,u!==null&&(g?u.length=g:u=null);else{const N={instancePath:a+"/fractional",schemaPath:"#/properties/fractional/oneOf",keyword:"oneOf",params:{passingSchemas:T},message:"must match exactly one schema in oneOf"};return u===null?u=[N]:u.push(N),l++,Qn.errors=u,!1}}}else return Qn.errors=[{instancePath:a,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return Qn.errors=u,l===0}function Za(r,{instancePath:a="",parentData:s,parentDataProperty:f,rootData:c=r}={}){let u=null,l=0;const d=l;let m=!1;const p=l;if(l===l)if(r&&typeof r=="object"&&!Array.isArray(r)){const I=l;for(const W in r)if(W!=="var"){const te={instancePath:a,schemaPath:"#/definitions/varRule/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:W},message:"must NOT have additional properties"};u===null?u=[te]:u.push(te),l++;break}if(I===l&&r.var!==void 0){let W=r.var;const te=l;let R=!1;const U=l;if(l===U)if(typeof W=="string"){if(!hc.test(W)){const _={instancePath:a+"/var",schemaPath:"#/definitions/varRule/properties/var/anyOf/0/pattern",keyword:"pattern",params:{pattern:"^\\$flagd\\.((timestamp)|(flagKey))$"},message:'must match pattern "^\\$flagd\\.((timestamp)|(flagKey))$"'};u===null?u=[_]:u.push(_),l++}}else{const _={instancePath:a+"/var",schemaPath:"#/definitions/varRule/properties/var/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};u===null?u=[_]:u.push(_),l++}var v=U===l;if(R=R||v,!R){const _=l,w=l,E=l;if(l===E)if(typeof W=="string"){if(!dc.test(W)){const G={};u===null?u=[G]:u.push(G),l++}}else{const G={};u===null?u=[G]:u.push(G),l++}var T=E===l;if(T){const G={instancePath:a+"/var",schemaPath:"#/definitions/varRule/properties/var/anyOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};u===null?u=[G]:u.push(G),l++}else l=w,u!==null&&(w?u.length=w:u=null);var v=_===l;if(R=R||v,!R){const G=l;if(l===G)if(Array.isArray(W))if(W.length<1){const K={instancePath:a+"/var",schemaPath:"#/definitions/varRule/properties/var/anyOf/2/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};u===null?u=[K]:u.push(K),l++}else{const K=W.length;var j=K<=1;if(!j)for(let z=1;z0&&typeof W[0]!="string"){const x={instancePath:a+"/var/0",schemaPath:"#/definitions/varRule/properties/var/anyOf/2/items/0/type",keyword:"type",params:{type:"string"},message:"must be string"};u===null?u=[x]:u.push(x),l++}}else{const K={instancePath:a+"/var",schemaPath:"#/definitions/varRule/properties/var/anyOf/2/type",keyword:"type",params:{type:"array"},message:"must be array"};u===null?u=[K]:u.push(K),l++}var v=G===l;R=R||v}}if(R)l=te,u!==null&&(te?u.length=te:u=null);else{const _={instancePath:a+"/var",schemaPath:"#/definitions/varRule/properties/var/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};u===null?u=[_]:u.push(_),l++}}}else{const I={instancePath:a,schemaPath:"#/definitions/varRule/type",keyword:"type",params:{type:"object"},message:"must be object"};u===null?u=[I]:u.push(I),l++}var N=p===l;if(m=m||N,!m){const I=l;if(l===l)if(r&&typeof r=="object"&&!Array.isArray(r)){const R=l;for(const U in r)if(U!=="missing"){const _={instancePath:a,schemaPath:"#/definitions/missingRule/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:U},message:"must NOT have additional properties"};u===null?u=[_]:u.push(_),l++;break}if(R===l&&r.missing!==void 0){let U=r.missing;if(l===l)if(Array.isArray(U)){var D=!0;const w=U.length;for(let E=0;E2){const G={instancePath:a+"/missing_some",schemaPath:"#/definitions/missingSomeRule/properties/missing_some/maxItems",keyword:"maxItems",params:{limit:2},message:"must NOT have more than 2 items"};u===null?u=[G]:u.push(G),l++}else if(E.length<2){const G={instancePath:a+"/missing_some",schemaPath:"#/definitions/missingSomeRule/properties/missing_some/minItems",keyword:"minItems",params:{limit:2},message:"must NOT have fewer than 2 items"};u===null?u=[G]:u.push(G),l++}else{const G=E.length;if(G>0){const ce=l;if(typeof E[0]!="number"){const K={instancePath:a+"/missing_some/0",schemaPath:"#/definitions/missingSomeRule/properties/missing_some/items/0/type",keyword:"type",params:{type:"number"},message:"must be number"};u===null?u=[K]:u.push(K),l++}var X=ce===l}if(X&&G>1){let ce=E[1];const K=l;if(l===K)if(Array.isArray(ce)){var k=!0;const x=ce.length;for(let Z=0;Z{var v;u.has(g)?((v=u.get(g))===null||v===void 0?void 0:v.hash)!==p.hash&&m.push(g):l.push(g)}),u.forEach((p,g)=>{f.has(g)||d.push(g)}),this._flags=f,this._flagSetMetadata=c,[...l,...d,...m]}}class g2{constructor(a,s,f){this._logger=s?new sb(s):new dg,this._storage=a||new Rg(this._logger,f)}setConfigurations(a){return this._storage.setConfigurations(a)}getFlag(a){return this._storage.getFlag(a)}getFlags(){return this._storage.getFlags()}getFlagSetMetadata(){return this._storage.getFlagSetMetadata()}resolveBooleanEvaluation(a,s,f,c=this._logger){return this.resolve("boolean",a,s,f,c)}resolveStringEvaluation(a,s,f,c=this._logger){return this.resolve("string",a,s,f,c)}resolveNumberEvaluation(a,s,f,c=this._logger){return this.resolve("number",a,s,f,c)}resolveObjectEvaluation(a,s,f,c=this._logger){return this.resolve("object",a,s,f,c)}resolveAll(a={},s=this._logger){const f=[];for(const[c,u]of this.getFlags())try{if(u.state==="DISABLED")continue;const l=u.evaluate(a,s);l.value!==void 0?f.push(Object.assign(Object.assign({},l),{flagKey:c,value:l.value})):s.debug(`Flag ${c} omitted because ${l.errorCode}: ${l.errorMessage}`)}catch(l){s.debug(`Error resolving flag ${c}: ${l.message}`)}return f}resolve(a,s,f,c={},u=this._logger){const l=this._storage.getFlag(s);if(!l)return{value:f,reason:br.ERROR,errorCode:Fn.FLAG_NOT_FOUND,errorMessage:`flag '${s}' not found`,flagMetadata:this._storage.getFlagSetMetadata()};if(l.state==="DISABLED")return{value:f,reason:br.ERROR,errorCode:Fn.FLAG_NOT_FOUND,errorMessage:`flag '${s}' is disabled`,flagMetadata:l.metadata};const d=l.evaluate(c,u);return d.value===void 0?Object.assign(Object.assign({},d),{value:f}):typeof d.value!==a?{value:f,reason:br.ERROR,errorCode:Fn.TYPE_MISMATCH,errorMessage:`Evaluated type of the flag ${s} does not match. Expected ${a}, got ${typeof d.value}`,flagMetadata:l.metadata}:Object.assign(Object.assign({},d),{value:d.value})}}/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */function xg(r){return typeof r>"u"||r===null}function v2(r){return typeof r=="object"&&r!==null}function b2(r){return Array.isArray(r)?r:xg(r)?[]:[r]}function E2(r,a){var s,f,c,u;if(a)for(u=Object.keys(a),s=0,f=u.length;sd&&(o=" ... ",i=l-d+o.length),u-l>d&&(c=" ...",u=l+d-c.length),{str:o+n.slice(i,u).replace(/\t/g,"→")+c,pos:l-i+o.length}}function nd(n,i){return ft.repeat(" ",i-n.length)+n}function lA(n,i){if(i=Object.create(i||null),!n.buffer)return null;i.maxLength||(i.maxLength=79),typeof i.indent!="number"&&(i.indent=1),typeof i.linesBefore!="number"&&(i.linesBefore=3),typeof i.linesAfter!="number"&&(i.linesAfter=2);for(var u=/\r?\n|\r|\0/g,l=[0],s=[],o,c=-1;o=u.exec(n.buffer);)s.push(o.index),l.push(o.index+o[0].length),n.position<=o.index&&c<0&&(c=l.length-2);c<0&&(c=l.length-1);var d="",p,m,v=Math.min(n.line+i.linesAfter,s.length).toString().length,S=i.maxLength-(i.indent+v+3);for(p=1;p<=i.linesBefore&&!(c-p<0);p++)m=td(n.buffer,l[c-p],s[c-p],n.position-(l[c]-l[c-p]),S),d=ft.repeat(" ",i.indent)+nd((n.line-p+1).toString(),v)+" | "+m.str+` -`+d;for(m=td(n.buffer,l[c],s[c],n.position,S),d+=ft.repeat(" ",i.indent)+nd((n.line+1).toString(),v)+" | "+m.str+` -`,d+=ft.repeat("-",i.indent+v+3+m.pos)+`^ -`,p=1;p<=i.linesAfter&&!(c+p>=s.length);p++)m=td(n.buffer,l[c+p],s[c+p],n.position-(l[c]-l[c+p]),S),d+=ft.repeat(" ",i.indent)+nd((n.line+p+1).toString(),v)+" | "+m.str+` -`;return d.replace(/\n$/,"")}var uA=lA,sA=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],oA=["scalar","sequence","mapping"];function fA(n){var i={};return n!==null&&Object.keys(n).forEach(function(u){n[u].forEach(function(l){i[String(l)]=u})}),i}function cA(n,i){if(i=i||{},Object.keys(i).forEach(function(u){if(sA.indexOf(u)===-1)throw new Rt('Unknown option "'+u+'" is met in definition of "'+n+'" YAML type.')}),this.options=i,this.tag=n,this.kind=i.kind||null,this.resolve=i.resolve||function(){return!0},this.construct=i.construct||function(u){return u},this.instanceOf=i.instanceOf||null,this.predicate=i.predicate||null,this.represent=i.represent||null,this.representName=i.representName||null,this.defaultStyle=i.defaultStyle||null,this.multi=i.multi||!1,this.styleAliases=fA(i.styleAliases||null),oA.indexOf(this.kind)===-1)throw new Rt('Unknown kind "'+this.kind+'" is specified for "'+n+'" YAML type.')}var Et=cA;function I0(n,i){var u=[];return n[i].forEach(function(l){var s=u.length;u.forEach(function(o,c){o.tag===l.tag&&o.kind===l.kind&&o.multi===l.multi&&(s=c)}),u[s]=l}),u}function dA(){var n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},i,u;function l(s){s.multi?(n.multi[s.kind].push(s),n.multi.fallback.push(s)):n[s.kind][s.tag]=n.fallback[s.tag]=s}for(i=0,u=arguments.length;i=0?"0b"+n.toString(2):"-0b"+n.toString(2).slice(1)},octal:function(n){return n>=0?"0o"+n.toString(8):"-0o"+n.toString(8).slice(1)},decimal:function(n){return n.toString(10)},hexadecimal:function(n){return n>=0?"0x"+n.toString(16).toUpperCase():"-0x"+n.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),$A=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function OA(n){return!(n===null||!$A.test(n)||n[n.length-1]==="_")}function TA(n){var i,u;return i=n.replace(/_/g,"").toLowerCase(),u=i[0]==="-"?-1:1,"+-".indexOf(i[0])>=0&&(i=i.slice(1)),i===".inf"?u===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:i===".nan"?NaN:u*parseFloat(i,10)}var RA=/^[-+]?[0-9]+e/;function NA(n,i){var u;if(isNaN(n))switch(i){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===n)switch(i){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===n)switch(i){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ft.isNegativeZero(n))return"-0.0";return u=n.toString(10),RA.test(u)?u.replace("e",".e"):u}function jA(n){return Object.prototype.toString.call(n)==="[object Number]"&&(n%1!==0||ft.isNegativeZero(n))}var Pv=new Et("tag:yaml.org,2002:float",{kind:"scalar",resolve:OA,construct:TA,predicate:jA,represent:NA,defaultStyle:"lowercase"}),Kv=Vv.extend({implicit:[kv,Gv,Yv,Pv]}),Fv=Kv,Xv=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Qv=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]))?))?$");function DA(n){return n===null?!1:Xv.exec(n)!==null||Qv.exec(n)!==null}function MA(n){var i,u,l,s,o,c,d,p=0,m=null,v,S,L;if(i=Xv.exec(n),i===null&&(i=Qv.exec(n)),i===null)throw new Error("Date resolve error");if(u=+i[1],l=+i[2]-1,s=+i[3],!i[4])return new Date(Date.UTC(u,l,s));if(o=+i[4],c=+i[5],d=+i[6],i[7]){for(p=i[7].slice(0,3);p.length<3;)p+="0";p=+p}return i[9]&&(v=+i[10],S=+(i[11]||0),m=(v*60+S)*6e4,i[9]==="-"&&(m=-m)),L=new Date(Date.UTC(u,l,s,o,c,d,p)),m&&L.setTime(L.getTime()-m),L}function CA(n){return n.toISOString()}var Zv=new Et("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:DA,construct:MA,instanceOf:Date,represent:CA});function xA(n){return n==="<<"||n===null}var Jv=new Et("tag:yaml.org,2002:merge",{kind:"scalar",resolve:xA}),Dd=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;function LA(n){if(n===null)return!1;var i,u,l=0,s=n.length,o=Dd;for(u=0;u64)){if(i<0)return!1;l+=6}return l%8===0}function qA(n){var i,u,l=n.replace(/[\r\n=]/g,""),s=l.length,o=Dd,c=0,d=[];for(i=0;i>16&255),d.push(c>>8&255),d.push(c&255)),c=c<<6|o.indexOf(l.charAt(i));return u=s%4*6,u===0?(d.push(c>>16&255),d.push(c>>8&255),d.push(c&255)):u===18?(d.push(c>>10&255),d.push(c>>2&255)):u===12&&d.push(c>>4&255),new Uint8Array(d)}function UA(n){var i="",u=0,l,s,o=n.length,c=Dd;for(l=0;l>18&63],i+=c[u>>12&63],i+=c[u>>6&63],i+=c[u&63]),u=(u<<8)+n[l];return s=o%3,s===0?(i+=c[u>>18&63],i+=c[u>>12&63],i+=c[u>>6&63],i+=c[u&63]):s===2?(i+=c[u>>10&63],i+=c[u>>4&63],i+=c[u<<2&63],i+=c[64]):s===1&&(i+=c[u>>2&63],i+=c[u<<4&63],i+=c[64],i+=c[64]),i}function zA(n){return Object.prototype.toString.call(n)==="[object Uint8Array]"}var Wv=new Et("tag:yaml.org,2002:binary",{kind:"scalar",resolve:LA,construct:qA,predicate:zA,represent:UA}),IA=Object.prototype.hasOwnProperty,BA=Object.prototype.toString;function HA(n){if(n===null)return!0;var i=[],u,l,s,o,c,d=n;for(u=0,l=d.length;u>10)+55296,(n-65536&1023)+56320)}function u1(n,i,u){i==="__proto__"?Object.defineProperty(n,i,{configurable:!0,enumerable:!0,writable:!0,value:u}):n[i]=u}var s1=new Array(256),o1=new Array(256);for(var Li=0;Li<256;Li++)s1[Li]=V0(Li)?1:0,o1[Li]=V0(Li);function r2(n,i){this.input=n,this.filename=i.filename||null,this.schema=i.schema||Md,this.onWarning=i.onWarning||null,this.legacy=i.legacy||!1,this.json=i.json||!1,this.listener=i.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=n.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function f1(n,i){var u={name:n.filename,buffer:n.input.slice(0,-1),position:n.position,line:n.line,column:n.position-n.lineStart};return u.snippet=uA(u),new Rt(i,u)}function _e(n,i){throw f1(n,i)}function bs(n,i){n.onWarning&&n.onWarning.call(null,f1(n,i))}var k0={YAML:function(i,u,l){var s,o,c;i.version!==null&&_e(i,"duplication of %YAML directive"),l.length!==1&&_e(i,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(l[0]),s===null&&_e(i,"ill-formed argument of the YAML directive"),o=parseInt(s[1],10),c=parseInt(s[2],10),o!==1&&_e(i,"unacceptable YAML version of the document"),i.version=l[0],i.checkLineBreaks=c<2,c!==1&&c!==2&&bs(i,"unsupported YAML version of the document")},TAG:function(i,u,l){var s,o;l.length!==2&&_e(i,"TAG directive accepts exactly two arguments"),s=l[0],o=l[1],a1.test(s)||_e(i,"ill-formed tag handle (first argument) of the TAG directive"),Er.call(i.tagMap,s)&&_e(i,'there is a previously declared suffix for "'+s+'" tag handle'),l1.test(o)||_e(i,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{_e(i,"tag prefix is malformed: "+o)}i.tagMap[s]=o}};function yr(n,i,u,l){var s,o,c,d;if(i1&&(n.result+=ft.repeat(` -`,i-1))}function i2(n,i,u){var l,s,o,c,d,p,m,v,S=n.kind,L=n.result,C;if(C=n.input.charCodeAt(n.position),Lt(C)||zi(C)||C===35||C===38||C===42||C===33||C===124||C===62||C===39||C===34||C===37||C===64||C===96||(C===63||C===45)&&(s=n.input.charCodeAt(n.position+1),Lt(s)||u&&zi(s)))return!1;for(n.kind="scalar",n.result="",o=c=n.position,d=!1;C!==0;){if(C===58){if(s=n.input.charCodeAt(n.position+1),Lt(s)||u&&zi(s))break}else if(C===35){if(l=n.input.charCodeAt(n.position-1),Lt(l))break}else{if(n.position===n.lineStart&&Cs(n)||u&&zi(C))break;if(_n(C))if(p=n.line,m=n.lineStart,v=n.lineIndent,ut(n,!1,-1),n.lineIndent>=i){d=!0,C=n.input.charCodeAt(n.position);continue}else{n.position=c,n.line=p,n.lineStart=m,n.lineIndent=v;break}}d&&(yr(n,o,c,!1),xd(n,n.line-p),o=c=n.position,d=!1),Qr(C)||(c=n.position+1),C=n.input.charCodeAt(++n.position)}return yr(n,o,c,!1),n.result?!0:(n.kind=S,n.result=L,!1)}function a2(n,i){var u,l,s;if(u=n.input.charCodeAt(n.position),u!==39)return!1;for(n.kind="scalar",n.result="",n.position++,l=s=n.position;(u=n.input.charCodeAt(n.position))!==0;)if(u===39)if(yr(n,l,n.position,!0),u=n.input.charCodeAt(++n.position),u===39)l=n.position,n.position++,s=n.position;else return!0;else _n(u)?(yr(n,l,s,!0),xd(n,ut(n,!1,i)),l=s=n.position):n.position===n.lineStart&&Cs(n)?_e(n,"unexpected end of the document within a single quoted scalar"):(n.position++,s=n.position);_e(n,"unexpected end of the stream within a single quoted scalar")}function l2(n,i){var u,l,s,o,c,d;if(d=n.input.charCodeAt(n.position),d!==34)return!1;for(n.kind="scalar",n.result="",n.position++,u=l=n.position;(d=n.input.charCodeAt(n.position))!==0;){if(d===34)return yr(n,u,n.position,!0),n.position++,!0;if(d===92){if(yr(n,u,n.position,!0),d=n.input.charCodeAt(++n.position),_n(d))ut(n,!1,i);else if(d<256&&s1[d])n.result+=o1[d],n.position++;else if((c=e2(d))>0){for(s=c,o=0;s>0;s--)d=n.input.charCodeAt(++n.position),(c=WA(d))>=0?o=(o<<4)+c:_e(n,"expected hexadecimal character");n.result+=n2(o),n.position++}else _e(n,"unknown escape sequence");u=l=n.position}else _n(d)?(yr(n,u,l,!0),xd(n,ut(n,!1,i)),u=l=n.position):n.position===n.lineStart&&Cs(n)?_e(n,"unexpected end of the document within a double quoted scalar"):(n.position++,l=n.position)}_e(n,"unexpected end of the stream within a double quoted scalar")}function u2(n,i){var u=!0,l,s,o,c=n.tag,d,p=n.anchor,m,v,S,L,C,q=Object.create(null),j,y,A,g;if(g=n.input.charCodeAt(n.position),g===91)v=93,C=!1,d=[];else if(g===123)v=125,C=!0,d={};else return!1;for(n.anchor!==null&&(n.anchorMap[n.anchor]=d),g=n.input.charCodeAt(++n.position);g!==0;){if(ut(n,!0,i),g=n.input.charCodeAt(n.position),g===v)return n.position++,n.tag=c,n.anchor=p,n.kind=C?"mapping":"sequence",n.result=d,!0;u?g===44&&_e(n,"expected the node content, but found ','"):_e(n,"missed comma between flow collection entries"),y=j=A=null,S=L=!1,g===63&&(m=n.input.charCodeAt(n.position+1),Lt(m)&&(S=L=!0,n.position++,ut(n,!0,i))),l=n.line,s=n.lineStart,o=n.position,Vi(n,i,ys,!1,!0),y=n.tag,j=n.result,ut(n,!0,i),g=n.input.charCodeAt(n.position),(L||n.line===l)&&g===58&&(S=!0,g=n.input.charCodeAt(++n.position),ut(n,!0,i),Vi(n,i,ys,!1,!0),A=n.result),C?Ii(n,d,q,y,j,A,l,s,o):S?d.push(Ii(n,null,q,y,j,A,l,s,o)):d.push(j),ut(n,!0,i),g=n.input.charCodeAt(n.position),g===44?(u=!0,g=n.input.charCodeAt(++n.position)):u=!1}_e(n,"unexpected end of the stream within a flow collection")}function s2(n,i){var u,l,s=rd,o=!1,c=!1,d=i,p=0,m=!1,v,S;if(S=n.input.charCodeAt(n.position),S===124)l=!1;else if(S===62)l=!0;else return!1;for(n.kind="scalar",n.result="";S!==0;)if(S=n.input.charCodeAt(++n.position),S===43||S===45)rd===s?s=S===43?B0:XA:_e(n,"repeat of a chomping mode identifier");else if((v=t2(S))>=0)v===0?_e(n,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?_e(n,"repeat of an indentation width identifier"):(d=i+v-1,c=!0);else break;if(Qr(S)){do S=n.input.charCodeAt(++n.position);while(Qr(S));if(S===35)do S=n.input.charCodeAt(++n.position);while(!_n(S)&&S!==0)}for(;S!==0;){for(Cd(n),n.lineIndent=0,S=n.input.charCodeAt(n.position);(!c||n.lineIndentd&&(d=n.lineIndent),_n(S)){p++;continue}if(n.lineIndenti)&&p!==0)_e(n,"bad indentation of a sequence entry");else if(n.lineIndenti)&&(y&&(c=n.line,d=n.lineStart,p=n.position),Vi(n,i,vs,!0,s)&&(y?q=n.result:j=n.result),y||(Ii(n,S,L,C,q,j,c,d,p),C=q=j=null),ut(n,!0,-1),g=n.input.charCodeAt(n.position)),(n.line===o||n.lineIndent>i)&&g!==0)_e(n,"bad indentation of a mapping entry");else if(n.lineIndenti?p=1:n.lineIndent===i?p=0:n.lineIndenti?p=1:n.lineIndent===i?p=0:n.lineIndent tag; it should be "scalar", not "'+n.kind+'"'),S=0,L=n.implicitTypes.length;S"),n.result!==null&&q.kind!==n.kind&&_e(n,"unacceptable node kind for !<"+n.tag+'> tag; it should be "'+q.kind+'", not "'+n.kind+'"'),q.resolve(n.result,n.tag)?(n.result=q.construct(n.result,n.tag),n.anchor!==null&&(n.anchorMap[n.anchor]=n.result)):_e(n,"cannot resolve a node with !<"+n.tag+"> explicit tag")}return n.listener!==null&&n.listener("close",n),n.tag!==null||n.anchor!==null||v}function h2(n){var i=n.position,u,l,s,o=!1,c;for(n.version=null,n.checkLineBreaks=n.legacy,n.tagMap=Object.create(null),n.anchorMap=Object.create(null);(c=n.input.charCodeAt(n.position))!==0&&(ut(n,!0,-1),c=n.input.charCodeAt(n.position),!(n.lineIndent>0||c!==37));){for(o=!0,c=n.input.charCodeAt(++n.position),u=n.position;c!==0&&!Lt(c);)c=n.input.charCodeAt(++n.position);for(l=n.input.slice(u,n.position),s=[],l.length<1&&_e(n,"directive name must not be less than one character in length");c!==0;){for(;Qr(c);)c=n.input.charCodeAt(++n.position);if(c===35){do c=n.input.charCodeAt(++n.position);while(c!==0&&!_n(c));break}if(_n(c))break;for(u=n.position;c!==0&&!Lt(c);)c=n.input.charCodeAt(++n.position);s.push(n.input.slice(u,n.position))}c!==0&&Cd(n),Er.call(k0,l)?k0[l](n,l,s):bs(n,'unknown document directive "'+l+'"')}if(ut(n,!0,-1),n.lineIndent===0&&n.input.charCodeAt(n.position)===45&&n.input.charCodeAt(n.position+1)===45&&n.input.charCodeAt(n.position+2)===45?(n.position+=3,ut(n,!0,-1)):o&&_e(n,"directives end mark is expected"),Vi(n,n.lineIndent-1,vs,!1,!0),ut(n,!0,-1),n.checkLineBreaks&&ZA.test(n.input.slice(i,n.position))&&bs(n,"non-ASCII line breaks are interpreted as content"),n.documents.push(n.result),n.position===n.lineStart&&Cs(n)){n.input.charCodeAt(n.position)===46&&(n.position+=3,ut(n,!0,-1));return}if(n.position"u"&&(u=i,i=null);var l=c1(n,u);if(typeof i!="function")return l;for(var s=0,o=l.length;s=55296&&u<=56319&&i+1=56320&&l<=57343)?(u-55296)*1024+l-56320+65536:u}function E1(n){var i=/^\n* /;return i.test(n)}var _1=1,hd=2,S1=3,w1=4,Ui=5;function k2(n,i,u,l,s,o,c,d){var p,m=0,v=null,S=!1,L=!1,C=l!==-1,q=-1,j=H2(Fa(n,0))&&V2(Fa(n,n.length-1));if(i||c)for(p=0;p=65536?p+=2:p++){if(m=Fa(n,p),!nl(m))return Ui;j=j&&F0(m,v,d),v=m}else{for(p=0;p=65536?p+=2:p++){if(m=Fa(n,p),m===el)S=!0,C&&(L=L||p-q-1>l&&n[q+1]!==" ",q=p);else if(!nl(m))return Ui;j=j&&F0(m,v,d),v=m}L=L||C&&p-q-1>l&&n[q+1]!==" "}return!S&&!L?j&&!c&&!s(n)?_1:o===tl?Ui:hd:u>9&&E1(n)?Ui:c?o===tl?Ui:hd:L?w1:S1}function G2(n,i,u,l,s){n.dump=function(){if(i.length===0)return n.quotingType===tl?'""':"''";if(!n.noCompatMode&&(x2.indexOf(i)!==-1||L2.test(i)))return n.quotingType===tl?'"'+i+'"':"'"+i+"'";var o=n.indent*Math.max(1,u),c=n.lineWidth===-1?-1:Math.max(Math.min(n.lineWidth,40),n.lineWidth-o),d=l||n.flowLevel>-1&&u>=n.flowLevel;function p(m){return B2(n,m)}switch(k2(i,d,n.indent,c,p,n.quotingType,n.forceQuotes&&!l,s)){case _1:return i;case hd:return"'"+i.replace(/'/g,"''")+"'";case S1:return"|"+X0(i,n.indent)+Q0(P0(i,o));case w1:return">"+X0(i,n.indent)+Q0(P0(Y2(i,c),o));case Ui:return'"'+P2(i)+'"';default:throw new Rt("impossible error: invalid scalar style")}}()}function X0(n,i){var u=E1(n)?String(i):"",l=n[n.length-1]===` -`,s=l&&(n[n.length-2]===` -`||n===` -`),o=s?"+":l?"":"-";return u+o+` -`}function Q0(n){return n[n.length-1]===` -`?n.slice(0,-1):n}function Y2(n,i){for(var u=/(\n+)([^\n]*)/g,l=function(){var m=n.indexOf(` -`);return m=m!==-1?m:n.length,u.lastIndex=m,Z0(n.slice(0,m),i)}(),s=n[0]===` -`||n[0]===" ",o,c;c=u.exec(n);){var d=c[1],p=c[2];o=p[0]===" ",l+=d+(!s&&!o&&p!==""?` -`:"")+Z0(p,i),s=o}return l}function Z0(n,i){if(n===""||n[0]===" ")return n;for(var u=/ [^ ]/g,l,s=0,o,c=0,d=0,p="";l=u.exec(n);)d=l.index,d-s>i&&(o=c>s?c:d,p+=` -`+n.slice(s,o),s=o+1),c=d;return p+=` -`,n.length-s>i&&c>s?p+=n.slice(s,c)+` -`+n.slice(c+1):p+=n.slice(s),p.slice(1)}function P2(n){for(var i="",u=0,l,s=0;s=65536?s+=2:s++)u=Fa(n,s),l=At[u],!l&&nl(u)?(i+=n[s],u>=65536&&(i+=n[s+1])):i+=l||U2(u);return i}function K2(n,i,u){var l="",s=n.tag,o,c,d;for(o=0,c=u.length;o"u"&&Gn(n,i,null,!1,!1))&&(l!==""&&(l+=","+(n.condenseFlow?"":" ")),l+=n.dump);n.tag=s,n.dump="["+l+"]"}function J0(n,i,u,l){var s="",o=n.tag,c,d,p;for(c=0,d=u.length;c"u"&&Gn(n,i+1,null,!0,!0,!1,!0))&&((!l||s!=="")&&(s+=dd(n,i)),n.dump&&el===n.dump.charCodeAt(0)?s+="-":s+="- ",s+=n.dump);n.tag=o,n.dump=s||"[]"}function F2(n,i,u){var l="",s=n.tag,o=Object.keys(u),c,d,p,m,v;for(c=0,d=o.length;c1024&&(v+="? "),v+=n.dump+(n.condenseFlow?'"':"")+":"+(n.condenseFlow?"":" "),Gn(n,i,m,!1,!1)&&(v+=n.dump,l+=v));n.tag=s,n.dump="{"+l+"}"}function X2(n,i,u,l){var s="",o=n.tag,c=Object.keys(u),d,p,m,v,S,L;if(n.sortKeys===!0)c.sort();else if(typeof n.sortKeys=="function")c.sort(n.sortKeys);else if(n.sortKeys)throw new Rt("sortKeys must be a boolean or a function");for(d=0,p=c.length;d1024,S&&(n.dump&&el===n.dump.charCodeAt(0)?L+="?":L+="? "),L+=n.dump,S&&(L+=dd(n,i)),Gn(n,i+1,v,!0,S)&&(n.dump&&el===n.dump.charCodeAt(0)?L+=":":L+=": ",L+=n.dump,s+=L));n.tag=o,n.dump=s||"{}"}function W0(n,i,u){var l,s,o,c,d,p;for(s=u?n.explicitTypes:n.implicitTypes,o=0,c=s.length;o tag resolver accepts not "'+p+'" style');n.dump=l}return!0}return!1}function Gn(n,i,u,l,s,o,c){n.tag=null,n.dump=u,W0(n,u,!1)||W0(n,u,!0);var d=h1.call(n.dump),p=l,m;l&&(l=n.flowLevel<0||n.flowLevel>i);var v=d==="[object Object]"||d==="[object Array]",S,L;if(v&&(S=n.duplicates.indexOf(u),L=S!==-1),(n.tag!==null&&n.tag!=="?"||L||n.indent!==2&&i>0)&&(s=!1),L&&n.usedDuplicates[S])n.dump="*ref_"+S;else{if(v&&L&&!n.usedDuplicates[S]&&(n.usedDuplicates[S]=!0),d==="[object Object]")l&&Object.keys(n.dump).length!==0?(X2(n,i,n.dump,s),L&&(n.dump="&ref_"+S+n.dump)):(F2(n,i,n.dump),L&&(n.dump="&ref_"+S+" "+n.dump));else if(d==="[object Array]")l&&n.dump.length!==0?(n.noArrayIndent&&!c&&i>0?J0(n,i-1,n.dump,s):J0(n,i,n.dump,s),L&&(n.dump="&ref_"+S+n.dump)):(K2(n,i,n.dump),L&&(n.dump="&ref_"+S+" "+n.dump));else if(d==="[object String]")n.tag!=="?"&&G2(n,n.dump,i,o,p);else{if(d==="[object Undefined]")return!1;if(n.skipInvalid)return!1;throw new Rt("unacceptable kind of an object to dump "+d)}n.tag!==null&&n.tag!=="?"&&(m=encodeURI(n.tag[0]==="!"?n.tag.slice(1):n.tag).replace(/!/g,"%21"),n.tag[0]==="!"?m="!"+m:m.slice(0,18)==="tag:yaml.org,2002:"?m="!!"+m.slice(18):m="!<"+m+">",n.dump=m+" "+n.dump)}return!0}function Q2(n,i){var u=[],l=[],s,o;for(pd(n,u,l),s=0,o=l.length;s=":[{var:"age"},18]}}}}),flagKey:"feature-1",returnType:"boolean",context:Dt({age:20})},_$={description:["In this scenario, we have a feature flag with the key 'acceptable-feature-stability' with three variants: alpha, beta, and ga.","The flag has a targeting rule that enables the flag based on the customer ID.","The flag is enabled for customer-A in the alpha variant, for customer-B1 and customer-B2 in the beta variant, and for all other customers in the ga variant.","Experiment by changing the 'customerId' in the context."].join(" "),flagDefinition:jt({flags:{"acceptable-feature-stability":{state:"ENABLED",defaultVariant:"ga",variants:{alpha:"alpha",beta:"beta",ga:"ga"},targeting:{if:[{"===":[{var:"customerId"},"customer-A"]},"alpha",{in:[{var:"customerId"},["customer-B1","customer-B2"]]},"beta","ga"]}}}}),flagKey:"acceptable-feature-stability",returnType:"string",context:Dt({targetingKey:"sessionId-123",customerId:"customer-A"})},S$={description:['In this scenario, we have a feature flag with the key "enable-mainframe-access" that is enabled and has two variants: true and false.','This flag has a targeting rule defined that enables the flag for users with an email address that ends with "@ingen.com".',"Experiment with changing the email address in the context or in the targeting rule."].join(" "),flagDefinition:jt({flags:{"enable-mainframe-access":{state:"ENABLED",defaultVariant:"false",variants:{true:!0,false:!1},targeting:{if:[{ends_with:[{var:"email"},"@ingen.com"]},"true"]}}}}),flagKey:"enable-mainframe-access",returnType:"boolean",context:Dt({email:"john.arnold@ingen.com"})},w$={description:['In this scenario, we have a feature flag with the key "supports-one-hour-delivery" that is enabled and has two variants: true and false.','This flag has a targeting rule defined that enables the flag for users with a locale of "us" or "ca".',"Experiment with changing the locale in the context or in the locale list in the targeting rule."].join(" "),flagDefinition:jt({flags:{"supports-one-hour-delivery":{state:"ENABLED",defaultVariant:"false",variants:{true:!0,false:!1},targeting:{if:[{in:[{var:"locale"},["us","ca"]]},"true"]}}}}),context:Dt({locale:"us"}),flagKey:"supports-one-hour-delivery",returnType:"boolean"},A$={description:['In this scenario, we have a feature flag with the key "enable-announcement-banner" that is enabled and has two variants: true and false.',"This flag has a targeting rule defined that enables the flag after a specified time.",'The current time (epoch) can be accessed using "$flagd.timestamp" which is automatically provided by flagd.','Five seconds after loading this scenario, the response will change to "true".'].join(" "),flagDefinition:()=>jt({flags:{"enable-announcement-banner":{state:"ENABLED",defaultVariant:"false",variants:{true:!0,false:!1},targeting:{if:[{">":[{var:"$flagd.timestamp"},Math.floor(Date.now()/1e3)+5]},"true"]}}}}),flagKey:"enable-announcement-banner",returnType:"boolean",context:()=>Dt({})},$$={description:['In this scenario, we have a feature flag with the key "enable-performance-mode" that is enabled and has two variants: true and false.','This rule looks for the evaluation context "version". If the version is greater or equal to "1.7.0" the feature is enabled.','Otherwise, the "defaultVariant" is return. Experiment by changing the version in the context.'].join(" "),flagDefinition:jt({flags:{"enable-performance-mode":{state:"ENABLED",defaultVariant:"false",variants:{true:!0,false:!1},targeting:{if:[{sem_ver:[{var:"version"},">=","1.7.0"]},"true"]}}}}),flagKey:"enable-performance-mode",returnType:"boolean",context:Dt({version:"1.6.0"})},O$={description:['In this scenario, we have a feature flag with the key "color-palette-experiment" that is enabled and has four variants: red, blue, green, and grey.','The targeting rule uses the "fractional" operator, which deterministically splits the traffic based on the configuration.','This configuration splits the traffic evenly between the four variants by bucketing evaluations pseudorandomly using the "targetingKey" and feature flag key.','Experiment by changing the "targetingKey" to another value.'].join(" "),flagDefinition:jt({flags:{"color-palette-experiment":{state:"ENABLED",defaultVariant:"grey",variants:{red:"#b91c1c",blue:"#0284c7",green:"#16a34a",grey:"#4b5563"},targeting:{fractional:[["red",25],["blue",25],["green",25],["grey",25]]}}}}),flagKey:"color-palette-experiment",returnType:"string",context:Dt({targetingKey:"sessionId-123"})},T$={description:['In this scenario, we have a feature flag with the key "enable-new-llm-model" with multiple variant for illustrative purposes.',"This flag has a targeting rule defined that enables the flag for a percentage of users based on the release phase.",'The "targetingKey" ensures that the user always sees the same results during a each phase of the rollout process.'].join(" "),flagDefinition:()=>{const n=Math.floor(Date.now()/1e3)+5,i=Math.floor(Date.now()/1e3)+10,u=Math.floor(Date.now()/1e3)+15,l=Math.floor(Date.now()/1e3)+20;return jt({flags:{"enable-new-llm-model":{state:"ENABLED",defaultVariant:"disabled",variants:{disabled:!1,phase1Enabled:!0,phase1Disabled:!1,phase2Enabled:!0,phase2Disabled:!1,phase3Enabled:!0,phase3Disabled:!1,enabled:!0},targeting:{if:[{">=":[n,{var:"$flagd.timestamp"}]},"disabled",{"<=":[n,{var:"$flagd.timestamp"},i]},{fractional:[["phase1Enabled",10],["phase1Disabled",90]]},{"<=":[i,{var:"$flagd.timestamp"},u]},{fractional:[["phase2Enabled",25],["phase2Disabled",75]]},{"<=":[u,{var:"$flagd.timestamp"},l]},{fractional:[["phase3Enabled",50],["phase3Disabled",50]]},"enabled"]}}}})},flagKey:"enable-new-llm-model",returnType:"boolean",context:()=>Dt({targetingKey:"sessionId-12345"})},R$={description:["In this scenario, we have two feature flags that share targeting rule logic.","This is accomplished by defining a $evaluators object in the feature flag definition and referencing it by name in a targeting rule.","Experiment with changing the email domain in the shared evaluator."].join(" "),flagDefinition:jt({flags:{"feature-1":{state:"ENABLED",defaultVariant:"false",variants:{true:!0,false:!1},targeting:{if:[{$ref:"emailWithFaas"},"true"]}},"feature-2":{state:"ENABLED",defaultVariant:"false",variants:{true:!0,false:!1},targeting:{if:[{$ref:"emailWithFaas"},"true"]}}},$evaluators:{emailWithFaas:{ends_with:[{var:"email"},"@faas.com"]}}}),flagKey:"feature-1",returnType:"boolean",context:Dt({email:"example@faas.com"})},N$={description:["In this scenario, we have a feature flag that is evaluated based on its targeting key.","The targeting key is contain a string uniquely identifying the subject of the flag evaluation, such as a user's email, or a session identifier.",`In this case, null is returned from targeting if the targeting key doesn't match; this results in a reason of "DEFAULT", since no variant was matched by the targeting rule.`].join(" "),flagDefinition:jt({flags:{"targeting-key-flag":{state:"ENABLED",variants:{miss:"miss",hit:"hit"},defaultVariant:"miss",targeting:{if:[{"==":[{var:"targetingKey"},"5c3d8535-f81a-4478-a6d3-afaa4d51199e"]},"hit",null]}}}}),flagKey:"targeting-key-flag",returnType:"string",context:Dt({targetingKey:"5c3d8535-f81a-4478-a6d3-afaa4d51199e"})},j$={description:["In this scenario, we have a feature flag with metadata about the flag.","There is top-level metadata for the flag set and metadata specific to the flag.","These values are merged together, with the flag metadata taking precedence."].join(" "),flagDefinition:jt({flags:{"flag-with-metadata":{state:"ENABLED",variants:{on:!0,off:!1},defaultVariant:"on",metadata:{version:"1"}}},metadata:{flagSetId:"playground/dev"}}),flagKey:"flag-with-metadata",returnType:"boolean",context:Dt({})},fn={"Basic boolean flag":g$,"Basic numeric flag":y$,"Basic string flag":b$,"Basic object flag":v$,"Enable for a specific email domain":S$,"Enable based on users locale":w$,"Enable based on release version":$$,"Enable based on the current time":A$,"Chainable if/else/then":_$,"Multi-variant experiment":O$,"Progressive rollout":T$,"Shared evaluators":R$,"Boolean variant shorthand":E$,"Targeting key":N$,"Flag metadata":j$};function D$(n,i,u){return i in n?Object.defineProperty(n,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[i]=u,n}function nv(n,i){var u=Object.keys(n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(n);i&&(l=l.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),u.push.apply(u,l)}return u}function rv(n){for(var i=1;i=0)&&(u[s]=n[s]);return u}function C$(n,i){if(n==null)return{};var u=M$(n,i),l,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(n,l)&&(u[l]=n[l])}return u}function x$(n,i){return L$(n)||q$(n,i)||U$(n,i)||z$()}function L$(n){if(Array.isArray(n))return n}function q$(n,i){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(n)))){var u=[],l=!0,s=!1,o=void 0;try{for(var c=n[Symbol.iterator](),d;!(l=(d=c.next()).done)&&(u.push(d.value),!(i&&u.length===i));l=!0);}catch(p){s=!0,o=p}finally{try{!l&&c.return!=null&&c.return()}finally{if(s)throw o}}return u}}function U$(n,i){if(n){if(typeof n=="string")return iv(n,i);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return iv(n,i)}}function iv(n,i){(i==null||i>n.length)&&(i=n.length);for(var u=0,l=new Array(i);u=n.length?n.apply(this,s):function(){for(var c=arguments.length,d=new Array(c),p=0;p1&&arguments[1]!==void 0?arguments[1]:{};as.initial(n),as.handler(i);var u={current:n},l=Xa(J$)(u,i),s=Xa(Z$)(u),o=Xa(as.changes)(n),c=Xa(Q$)(u);function d(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(v){return v};return as.selector(m),m(u.current)}function p(m){B$(l,s,o,c)(m)}return[d,p]}function Q$(n,i){return rl(i)?i(n.current):i}function Z$(n,i){return n.current=lv(lv({},n.current),i),i}function J$(n,i,u){return rl(i)?i(n.current):Object.keys(u).forEach(function(l){var s;return(s=i[l])===null||s===void 0?void 0:s.call(i,n.current[l])}),u}var W$={create:X$},eO={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function tO(n){return function i(){for(var u=this,l=arguments.length,s=new Array(l),o=0;o=n.length?n.apply(this,s):function(){for(var c=arguments.length,d=new Array(c),p=0;pd&&(u=" ... ",a=f-d+u.length),s-f>d&&(l=" ...",s=f+d-l.length),{str:u+r.slice(a,s).replace(/\t/g,"→")+l,pos:f-a+u.length}}function ac(r,a){return ot.repeat(" ",a-r.length)+r}function D2(r,a){if(a=Object.create(a||null),!r.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);for(var s=/\r?\n|\r|\0/g,f=[0],c=[],u,l=-1;u=s.exec(r.buffer);)c.push(u.index),f.push(u.index+u[0].length),r.position<=u.index&&l<0&&(l=f.length-2);l<0&&(l=f.length-1);var d="",m,p,g=Math.min(r.line+a.linesAfter,c.length).toString().length,v=a.maxLength-(a.indent+g+3);for(m=1;m<=a.linesBefore&&!(l-m<0);m++)p=nc(r.buffer,f[l-m],c[l-m],r.position-(f[l]-f[l-m]),v),d=ot.repeat(" ",a.indent)+ac((r.line-m+1).toString(),g)+" | "+p.str+` +`+d;for(p=nc(r.buffer,f[l],c[l],r.position,v),d+=ot.repeat(" ",a.indent)+ac((r.line+1).toString(),g)+" | "+p.str+` +`,d+=ot.repeat("-",a.indent+g+3+p.pos)+`^ +`,m=1;m<=a.linesAfter&&!(l+m>=c.length);m++)p=nc(r.buffer,f[l+m],c[l+m],r.position-(f[l]-f[l+m]),v),d+=ot.repeat(" ",a.indent)+ac((r.line+m+1).toString(),g)+" | "+p.str+` +`;return d.replace(/\n$/,"")}var N2=D2,M2=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],j2=["scalar","sequence","mapping"];function C2(r){var a={};return r!==null&&Object.keys(r).forEach(function(s){r[s].forEach(function(f){a[String(f)]=s})}),a}function L2(r,a){if(a=a||{},Object.keys(a).forEach(function(s){if(M2.indexOf(s)===-1)throw new Rt('Unknown option "'+s+'" is met in definition of "'+r+'" YAML type.')}),this.options=a,this.tag=r,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(s){return s},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=C2(a.styleAliases||null),j2.indexOf(this.kind)===-1)throw new Rt('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}var vt=L2;function Ly(r,a){var s=[];return r[a].forEach(function(f){var c=s.length;s.forEach(function(u,l){u.tag===f.tag&&u.kind===f.kind&&u.multi===f.multi&&(c=l)}),s[c]=f}),s}function z2(){var r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},a,s;function f(c){c.multi?(r.multi[c.kind].push(c),r.multi.fallback.push(c)):r[c.kind][c.tag]=r.fallback[c.tag]=c}for(a=0,s=arguments.length;a=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},octal:function(r){return r>=0?"0o"+r.toString(8):"-0o"+r.toString(8).slice(1)},decimal:function(r){return r.toString(10)},hexadecimal:function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Q2=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function K2(r){return!(r===null||!Q2.test(r)||r[r.length-1]==="_")}function F2(r){var a,s;return a=r.replace(/_/g,"").toLowerCase(),s=a[0]==="-"?-1:1,"+-".indexOf(a[0])>=0&&(a=a.slice(1)),a===".inf"?s===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:a===".nan"?NaN:s*parseFloat(a,10)}var P2=/^[-+]?[0-9]+e/;function J2(r,a){var s;if(isNaN(r))switch(a){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(a){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(a){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ot.isNegativeZero(r))return"-0.0";return s=r.toString(10),P2.test(s)?s.replace("e",".e"):s}function W2(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||ot.isNegativeZero(r))}var qg=new vt("tag:yaml.org,2002:float",{kind:"scalar",resolve:K2,construct:F2,predicate:W2,represent:J2,defaultStyle:"lowercase"}),Hg=Lg.extend({implicit:[zg,Ug,Bg,qg]}),$g=Hg,kg=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Yg=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]))?))?$");function eE(r){return r===null?!1:kg.exec(r)!==null||Yg.exec(r)!==null}function tE(r){var a,s,f,c,u,l,d,m=0,p=null,g,v,T;if(a=kg.exec(r),a===null&&(a=Yg.exec(r)),a===null)throw new Error("Date resolve error");if(s=+a[1],f=+a[2]-1,c=+a[3],!a[4])return new Date(Date.UTC(s,f,c));if(u=+a[4],l=+a[5],d=+a[6],a[7]){for(m=a[7].slice(0,3);m.length<3;)m+="0";m=+m}return a[9]&&(g=+a[10],v=+(a[11]||0),p=(g*60+v)*6e4,a[9]==="-"&&(p=-p)),T=new Date(Date.UTC(s,f,c,u,l,d,m)),p&&T.setTime(T.getTime()-p),T}function rE(r){return r.toISOString()}var Gg=new vt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:eE,construct:tE,instanceOf:Date,represent:rE});function nE(r){return r==="<<"||r===null}var Vg=new vt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:nE}),zc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function aE(r){if(r===null)return!1;var a,s,f=0,c=r.length,u=zc;for(s=0;s64)){if(a<0)return!1;f+=6}return f%8===0}function iE(r){var a,s,f=r.replace(/[\r\n=]/g,""),c=f.length,u=zc,l=0,d=[];for(a=0;a>16&255),d.push(l>>8&255),d.push(l&255)),l=l<<6|u.indexOf(f.charAt(a));return s=c%4*6,s===0?(d.push(l>>16&255),d.push(l>>8&255),d.push(l&255)):s===18?(d.push(l>>10&255),d.push(l>>2&255)):s===12&&d.push(l>>4&255),new Uint8Array(d)}function lE(r){var a="",s=0,f,c,u=r.length,l=zc;for(f=0;f>18&63],a+=l[s>>12&63],a+=l[s>>6&63],a+=l[s&63]),s=(s<<8)+r[f];return c=u%3,c===0?(a+=l[s>>18&63],a+=l[s>>12&63],a+=l[s>>6&63],a+=l[s&63]):c===2?(a+=l[s>>10&63],a+=l[s>>4&63],a+=l[s<<2&63],a+=l[64]):c===1&&(a+=l[s>>2&63],a+=l[s<<4&63],a+=l[64],a+=l[64]),a}function uE(r){return Object.prototype.toString.call(r)==="[object Uint8Array]"}var Ig=new vt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:aE,construct:iE,predicate:uE,represent:lE}),sE=Object.prototype.hasOwnProperty,fE=Object.prototype.toString;function oE(r){if(r===null)return!0;var a=[],s,f,c,u,l,d=r;for(s=0,f=d.length;s>10)+55296,(r-65536&1023)+56320)}function Wg(r,a,s){a==="__proto__"?Object.defineProperty(r,a,{configurable:!0,enumerable:!0,writable:!0,value:s}):r[a]=s}var e0=new Array(256),t0=new Array(256);for(var Ca=0;Ca<256;Ca++)e0[Ca]=By(Ca)?1:0,t0[Ca]=By(Ca);function TE(r,a){this.input=r,this.filename=a.filename||null,this.schema=a.schema||Uc,this.onWarning=a.onWarning||null,this.legacy=a.legacy||!1,this.json=a.json||!1,this.listener=a.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=r.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function r0(r,a){var s={name:r.filename,buffer:r.input.slice(0,-1),position:r.position,line:r.line,column:r.position-r.lineStart};return s.snippet=N2(s),new Rt(a,s)}function be(r,a){throw r0(r,a)}function qu(r,a){r.onWarning&&r.onWarning.call(null,r0(r,a))}var qy={YAML:function(a,s,f){var c,u,l;a.version!==null&&be(a,"duplication of %YAML directive"),f.length!==1&&be(a,"YAML directive accepts exactly one argument"),c=/^([0-9]+)\.([0-9]+)$/.exec(f[0]),c===null&&be(a,"ill-formed argument of the YAML directive"),u=parseInt(c[1],10),l=parseInt(c[2],10),u!==1&&be(a,"unacceptable YAML version of the document"),a.version=f[0],a.checkLineBreaks=l<2,l!==1&&l!==2&&qu(a,"unsupported YAML version of the document")},TAG:function(a,s,f){var c,u;f.length!==2&&be(a,"TAG directive accepts exactly two arguments"),c=f[0],u=f[1],Pg.test(c)||be(a,"ill-formed tag handle (first argument) of the TAG directive"),Sn.call(a.tagMap,c)&&be(a,'there is a previously declared suffix for "'+c+'" tag handle'),Jg.test(u)||be(a,"ill-formed tag prefix (second argument) of the TAG directive");try{u=decodeURIComponent(u)}catch{be(a,"tag prefix is malformed: "+u)}a.tagMap[c]=u}};function _n(r,a,s,f){var c,u,l,d;if(a1&&(r.result+=ot.repeat(` +`,a-1))}function RE(r,a,s){var f,c,u,l,d,m,p,g,v=r.kind,T=r.result,j;if(j=r.input.charCodeAt(r.position),jt(j)||Ba(j)||j===35||j===38||j===42||j===33||j===124||j===62||j===39||j===34||j===37||j===64||j===96||(j===63||j===45)&&(c=r.input.charCodeAt(r.position+1),jt(c)||s&&Ba(c)))return!1;for(r.kind="scalar",r.result="",u=l=r.position,d=!1;j!==0;){if(j===58){if(c=r.input.charCodeAt(r.position+1),jt(c)||s&&Ba(c))break}else if(j===35){if(f=r.input.charCodeAt(r.position-1),jt(f))break}else{if(r.position===r.lineStart&&Zu(r)||s&&Ba(j))break;if(_r(j))if(m=r.line,p=r.lineStart,g=r.lineIndent,ut(r,!1,-1),r.lineIndent>=a){d=!0,j=r.input.charCodeAt(r.position);continue}else{r.position=l,r.line=m,r.lineStart=p,r.lineIndent=g;break}}d&&(_n(r,u,l,!1),qc(r,r.line-m),u=l=r.position,d=!1),Pn(j)||(l=r.position+1),j=r.input.charCodeAt(++r.position)}return _n(r,u,l,!1),r.result?!0:(r.kind=v,r.result=T,!1)}function xE(r,a){var s,f,c;if(s=r.input.charCodeAt(r.position),s!==39)return!1;for(r.kind="scalar",r.result="",r.position++,f=c=r.position;(s=r.input.charCodeAt(r.position))!==0;)if(s===39)if(_n(r,f,r.position,!0),s=r.input.charCodeAt(++r.position),s===39)f=r.position,r.position++,c=r.position;else return!0;else _r(s)?(_n(r,f,c,!0),qc(r,ut(r,!1,a)),f=c=r.position):r.position===r.lineStart&&Zu(r)?be(r,"unexpected end of the document within a single quoted scalar"):(r.position++,c=r.position);be(r,"unexpected end of the stream within a single quoted scalar")}function DE(r,a){var s,f,c,u,l,d;if(d=r.input.charCodeAt(r.position),d!==34)return!1;for(r.kind="scalar",r.result="",r.position++,s=f=r.position;(d=r.input.charCodeAt(r.position))!==0;){if(d===34)return _n(r,s,r.position,!0),r.position++,!0;if(d===92){if(_n(r,s,r.position,!0),d=r.input.charCodeAt(++r.position),_r(d))ut(r,!1,a);else if(d<256&&e0[d])r.result+=t0[d],r.position++;else if((l=wE(d))>0){for(c=l,u=0;c>0;c--)d=r.input.charCodeAt(++r.position),(l=_E(d))>=0?u=(u<<4)+l:be(r,"expected hexadecimal character");r.result+=SE(u),r.position++}else be(r,"unknown escape sequence");s=f=r.position}else _r(d)?(_n(r,s,f,!0),qc(r,ut(r,!1,a)),s=f=r.position):r.position===r.lineStart&&Zu(r)?be(r,"unexpected end of the document within a double quoted scalar"):(r.position++,f=r.position)}be(r,"unexpected end of the stream within a double quoted scalar")}function NE(r,a){var s=!0,f,c,u,l=r.tag,d,m=r.anchor,p,g,v,T,j,C=Object.create(null),N,D,X,k;if(k=r.input.charCodeAt(r.position),k===91)g=93,j=!1,d=[];else if(k===123)g=125,j=!0,d={};else return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=d),k=r.input.charCodeAt(++r.position);k!==0;){if(ut(r,!0,a),k=r.input.charCodeAt(r.position),k===g)return r.position++,r.tag=l,r.anchor=m,r.kind=j?"mapping":"sequence",r.result=d,!0;s?k===44&&be(r,"expected the node content, but found ','"):be(r,"missed comma between flow collection entries"),D=N=X=null,v=T=!1,k===63&&(p=r.input.charCodeAt(r.position+1),jt(p)&&(v=T=!0,r.position++,ut(r,!0,a))),f=r.line,c=r.lineStart,u=r.position,Fa(r,a,Uu,!1,!0),D=r.tag,N=r.result,ut(r,!0,a),k=r.input.charCodeAt(r.position),(T||r.line===f)&&k===58&&(v=!0,k=r.input.charCodeAt(++r.position),ut(r,!0,a),Fa(r,a,Uu,!1,!0),X=r.result),j?qa(r,d,C,D,N,X,f,c,u):v?d.push(qa(r,null,C,D,N,X,f,c,u)):d.push(N),ut(r,!0,a),k=r.input.charCodeAt(r.position),k===44?(s=!0,k=r.input.charCodeAt(++r.position)):s=!1}be(r,"unexpected end of the stream within a flow collection")}function ME(r,a){var s,f,c=ic,u=!1,l=!1,d=a,m=0,p=!1,g,v;if(v=r.input.charCodeAt(r.position),v===124)f=!1;else if(v===62)f=!0;else return!1;for(r.kind="scalar",r.result="";v!==0;)if(v=r.input.charCodeAt(++r.position),v===43||v===45)ic===c?c=v===43?zy:vE:be(r,"repeat of a chomping mode identifier");else if((g=OE(v))>=0)g===0?be(r,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?be(r,"repeat of an indentation width identifier"):(d=a+g-1,l=!0);else break;if(Pn(v)){do v=r.input.charCodeAt(++r.position);while(Pn(v));if(v===35)do v=r.input.charCodeAt(++r.position);while(!_r(v)&&v!==0)}for(;v!==0;){for(Bc(r),r.lineIndent=0,v=r.input.charCodeAt(r.position);(!l||r.lineIndentd&&(d=r.lineIndent),_r(v)){m++;continue}if(r.lineIndenta)&&m!==0)be(r,"bad indentation of a sequence entry");else if(r.lineIndenta)&&(D&&(l=r.line,d=r.lineStart,m=r.position),Fa(r,a,Bu,!0,c)&&(D?C=r.result:N=r.result),D||(qa(r,v,T,j,C,N,l,d,m),j=C=N=null),ut(r,!0,-1),k=r.input.charCodeAt(r.position)),(r.line===u||r.lineIndent>a)&&k!==0)be(r,"bad indentation of a mapping entry");else if(r.lineIndenta?m=1:r.lineIndent===a?m=0:r.lineIndenta?m=1:r.lineIndent===a?m=0:r.lineIndent tag; it should be "scalar", not "'+r.kind+'"'),v=0,T=r.implicitTypes.length;v"),r.result!==null&&C.kind!==r.kind&&be(r,"unacceptable node kind for !<"+r.tag+'> tag; it should be "'+C.kind+'", not "'+r.kind+'"'),C.resolve(r.result,r.tag)?(r.result=C.construct(r.result,r.tag),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):be(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")}return r.listener!==null&&r.listener("close",r),r.tag!==null||r.anchor!==null||g}function UE(r){var a=r.position,s,f,c,u=!1,l;for(r.version=null,r.checkLineBreaks=r.legacy,r.tagMap=Object.create(null),r.anchorMap=Object.create(null);(l=r.input.charCodeAt(r.position))!==0&&(ut(r,!0,-1),l=r.input.charCodeAt(r.position),!(r.lineIndent>0||l!==37));){for(u=!0,l=r.input.charCodeAt(++r.position),s=r.position;l!==0&&!jt(l);)l=r.input.charCodeAt(++r.position);for(f=r.input.slice(s,r.position),c=[],f.length<1&&be(r,"directive name must not be less than one character in length");l!==0;){for(;Pn(l);)l=r.input.charCodeAt(++r.position);if(l===35){do l=r.input.charCodeAt(++r.position);while(l!==0&&!_r(l));break}if(_r(l))break;for(s=r.position;l!==0&&!jt(l);)l=r.input.charCodeAt(++r.position);c.push(r.input.slice(s,r.position))}l!==0&&Bc(r),Sn.call(qy,f)?qy[f](r,f,c):qu(r,'unknown document directive "'+f+'"')}if(ut(r,!0,-1),r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45?(r.position+=3,ut(r,!0,-1)):u&&be(r,"directives end mark is expected"),Fa(r,r.lineIndent-1,Bu,!1,!0),ut(r,!0,-1),r.checkLineBreaks&&EE.test(r.input.slice(a,r.position))&&qu(r,"non-ASCII line breaks are interpreted as content"),r.documents.push(r.result),r.position===r.lineStart&&Zu(r)){r.input.charCodeAt(r.position)===46&&(r.position+=3,ut(r,!0,-1));return}if(r.position"u"&&(s=a,a=null);var f=n0(r,s);if(typeof a!="function")return f;for(var c=0,u=f.length;c=55296&&s<=56319&&a+1=56320&&f<=57343)?(s-55296)*1024+f-56320+65536:s}function h0(r){var a=/^\n* /;return a.test(r)}var d0=1,gc=2,p0=3,m0=4,za=5;function hA(r,a,s,f,c,u,l,d){var m,p=0,g=null,v=!1,T=!1,j=f!==-1,C=-1,N=oA(Ji(r,0))&&cA(Ji(r,r.length-1));if(a||l)for(m=0;m=65536?m+=2:m++){if(p=Ji(r,m),!sl(p))return za;N=N&&Gy(p,g,d),g=p}else{for(m=0;m=65536?m+=2:m++){if(p=Ji(r,m),p===ll)v=!0,j&&(T=T||m-C-1>f&&r[C+1]!==" ",C=m);else if(!sl(p))return za;N=N&&Gy(p,g,d),g=p}T=T||j&&m-C-1>f&&r[C+1]!==" "}return!v&&!T?N&&!l&&!c(r)?d0:u===ul?za:gc:s>9&&h0(r)?za:l?u===ul?za:gc:T?m0:p0}function dA(r,a,s,f,c){r.dump=(function(){if(a.length===0)return r.quotingType===ul?'""':"''";if(!r.noCompatMode&&(nA.indexOf(a)!==-1||aA.test(a)))return r.quotingType===ul?'"'+a+'"':"'"+a+"'";var u=r.indent*Math.max(1,s),l=r.lineWidth===-1?-1:Math.max(Math.min(r.lineWidth,40),r.lineWidth-u),d=f||r.flowLevel>-1&&s>=r.flowLevel;function m(p){return fA(r,p)}switch(hA(a,d,r.indent,l,m,r.quotingType,r.forceQuotes&&!f,c)){case d0:return a;case gc:return"'"+a.replace(/'/g,"''")+"'";case p0:return"|"+Vy(a,r.indent)+Iy(ky(a,u));case m0:return">"+Vy(a,r.indent)+Iy(ky(pA(a,l),u));case za:return'"'+mA(a)+'"';default:throw new Rt("impossible error: invalid scalar style")}})()}function Vy(r,a){var s=h0(r)?String(a):"",f=r[r.length-1]===` +`,c=f&&(r[r.length-2]===` +`||r===` +`),u=c?"+":f?"":"-";return s+u+` +`}function Iy(r){return r[r.length-1]===` +`?r.slice(0,-1):r}function pA(r,a){for(var s=/(\n+)([^\n]*)/g,f=(function(){var p=r.indexOf(` +`);return p=p!==-1?p:r.length,s.lastIndex=p,Xy(r.slice(0,p),a)})(),c=r[0]===` +`||r[0]===" ",u,l;l=s.exec(r);){var d=l[1],m=l[2];u=m[0]===" ",f+=d+(!c&&!u&&m!==""?` +`:"")+Xy(m,a),c=u}return f}function Xy(r,a){if(r===""||r[0]===" ")return r;for(var s=/ [^ ]/g,f,c=0,u,l=0,d=0,m="";f=s.exec(r);)d=f.index,d-c>a&&(u=l>c?l:d,m+=` +`+r.slice(c,u),c=u+1),l=d;return m+=` +`,r.length-c>a&&l>c?m+=r.slice(c,l)+` +`+r.slice(l+1):m+=r.slice(c),m.slice(1)}function mA(r){for(var a="",s=0,f,c=0;c=65536?c+=2:c++)s=Ji(r,c),f=_t[s],!f&&sl(s)?(a+=r[c],s>=65536&&(a+=r[c+1])):a+=f||lA(s);return a}function yA(r,a,s){var f="",c=r.tag,u,l,d;for(u=0,l=s.length;u"u"&&Vr(r,a,null,!1,!1))&&(f!==""&&(f+=","+(r.condenseFlow?"":" ")),f+=r.dump);r.tag=c,r.dump="["+f+"]"}function Zy(r,a,s,f){var c="",u=r.tag,l,d,m;for(l=0,d=s.length;l"u"&&Vr(r,a+1,null,!0,!0,!1,!0))&&((!f||c!=="")&&(c+=yc(r,a)),r.dump&&ll===r.dump.charCodeAt(0)?c+="-":c+="- ",c+=r.dump);r.tag=u,r.dump=c||"[]"}function gA(r,a,s){var f="",c=r.tag,u=Object.keys(s),l,d,m,p,g;for(l=0,d=u.length;l1024&&(g+="? "),g+=r.dump+(r.condenseFlow?'"':"")+":"+(r.condenseFlow?"":" "),Vr(r,a,p,!1,!1)&&(g+=r.dump,f+=g));r.tag=c,r.dump="{"+f+"}"}function vA(r,a,s,f){var c="",u=r.tag,l=Object.keys(s),d,m,p,g,v,T;if(r.sortKeys===!0)l.sort();else if(typeof r.sortKeys=="function")l.sort(r.sortKeys);else if(r.sortKeys)throw new Rt("sortKeys must be a boolean or a function");for(d=0,m=l.length;d1024,v&&(r.dump&&ll===r.dump.charCodeAt(0)?T+="?":T+="? "),T+=r.dump,v&&(T+=yc(r,a)),Vr(r,a+1,g,!0,v)&&(r.dump&&ll===r.dump.charCodeAt(0)?T+=":":T+=": ",T+=r.dump,c+=T));r.tag=u,r.dump=c||"{}"}function Qy(r,a,s){var f,c,u,l,d,m;for(c=s?r.explicitTypes:r.implicitTypes,u=0,l=c.length;u tag resolver accepts not "'+m+'" style');r.dump=f}return!0}return!1}function Vr(r,a,s,f,c,u,l){r.tag=null,r.dump=s,Qy(r,s,!1)||Qy(r,s,!0);var d=i0.call(r.dump),m=f,p;f&&(f=r.flowLevel<0||r.flowLevel>a);var g=d==="[object Object]"||d==="[object Array]",v,T;if(g&&(v=r.duplicates.indexOf(s),T=v!==-1),(r.tag!==null&&r.tag!=="?"||T||r.indent!==2&&a>0)&&(c=!1),T&&r.usedDuplicates[v])r.dump="*ref_"+v;else{if(g&&T&&!r.usedDuplicates[v]&&(r.usedDuplicates[v]=!0),d==="[object Object]")f&&Object.keys(r.dump).length!==0?(vA(r,a,r.dump,c),T&&(r.dump="&ref_"+v+r.dump)):(gA(r,a,r.dump),T&&(r.dump="&ref_"+v+" "+r.dump));else if(d==="[object Array]")f&&r.dump.length!==0?(r.noArrayIndent&&!l&&a>0?Zy(r,a-1,r.dump,c):Zy(r,a,r.dump,c),T&&(r.dump="&ref_"+v+r.dump)):(yA(r,a,r.dump),T&&(r.dump="&ref_"+v+" "+r.dump));else if(d==="[object String]")r.tag!=="?"&&dA(r,r.dump,a,u,m);else{if(d==="[object Undefined]")return!1;if(r.skipInvalid)return!1;throw new Rt("unacceptable kind of an object to dump "+d)}r.tag!==null&&r.tag!=="?"&&(p=encodeURI(r.tag[0]==="!"?r.tag.slice(1):r.tag).replace(/!/g,"%21"),r.tag[0]==="!"?p="!"+p:p.slice(0,18)==="tag:yaml.org,2002:"?p="!!"+p.slice(18):p="!<"+p+">",r.dump=p+" "+r.dump)}return!0}function bA(r,a){var s=[],f=[],c,u;for(vc(r,s,f),c=0,u=f.length;c=":[{var:"age"},18]}}}}),flagKey:"feature-1",returnType:"boolean",context:Ot({age:20}),codeDefault:"false"},VA={description:["In this scenario, we have a feature flag with the key 'acceptable-feature-stability' with three variants: alpha, beta, and ga.","The flag has a targeting rule that enables the flag based on the customer ID.","The flag is enabled for customer-A in the alpha variant, for customer-B1 and customer-B2 in the beta variant, and for all other customers in the ga variant.","Experiment by changing the 'customerId' in the context."].join(" "),flagDefinition:wt({flags:{"acceptable-feature-stability":{state:"ENABLED",defaultVariant:"ga",variants:{alpha:"alpha",beta:"beta",ga:"ga"},targeting:{if:[{"===":[{var:"customerId"},"customer-A"]},"alpha",{in:[{var:"customerId"},["customer-B1","customer-B2"]]},"beta","ga"]}}}}),flagKey:"acceptable-feature-stability",returnType:"string",context:Ot({targetingKey:"sessionId-123",customerId:"customer-A"}),codeDefault:'""'},IA={description:['In this scenario, we have a feature flag with the key "enable-mainframe-access" that is enabled and has two variants: on and off.','This flag has a targeting rule defined that enables the flag for users with an email address that ends with "@ingen.com".',"Experiment with changing the email address in the context or in the targeting rule."].join(" "),flagDefinition:wt({flags:{"enable-mainframe-access":{state:"ENABLED",defaultVariant:"off",variants:{on:!0,off:!1},targeting:{if:[{ends_with:[{var:"email"},"@ingen.com"]},"on"]}}}}),flagKey:"enable-mainframe-access",returnType:"boolean",context:Ot({email:"john.arnold@ingen.com"}),codeDefault:"false"},XA={description:['In this scenario, we have a feature flag with the key "supports-one-hour-delivery" that is enabled and has two variants: on and off.','This flag has a targeting rule defined that enables the flag for users with a locale of "us" or "ca".',"Experiment with changing the locale in the context or in the locale list in the targeting rule."].join(" "),flagDefinition:wt({flags:{"supports-one-hour-delivery":{state:"ENABLED",defaultVariant:"off",variants:{on:!0,off:!1},targeting:{if:[{in:[{var:"locale"},["us","ca"]]},"on"]}}}}),context:Ot({locale:"us"}),flagKey:"supports-one-hour-delivery",returnType:"boolean",codeDefault:"false"},ZA={description:['In this scenario, we have a feature flag with the key "enable-announcement-banner" that is enabled and has two variants: on and off.',"This flag has a targeting rule defined that enables the flag after a specified time.",'The current time (epoch) can be accessed using "$flagd.timestamp" which is automatically provided by flagd.','Five seconds after loading this scenario, the response will change to "on".'].join(" "),flagDefinition:()=>wt({flags:{"enable-announcement-banner":{state:"ENABLED",defaultVariant:"off",variants:{on:!0,off:!1},targeting:{if:[{">":[{var:"$flagd.timestamp"},Math.floor(Date.now()/1e3)+5]},"on"]}}}}),flagKey:"enable-announcement-banner",returnType:"boolean",context:()=>Ot({}),codeDefault:"false"},QA={description:['In this scenario, we have a feature flag with the key "enable-performance-mode" that is enabled and has two variants: on and off.','This rule looks for the evaluation context "version". If the version is greater or equal to "1.7.0" the feature is enabled.','Otherwise, the "defaultVariant" is return. Experiment by changing the version in the context.'].join(" "),flagDefinition:wt({flags:{"enable-performance-mode":{state:"ENABLED",defaultVariant:"off",variants:{on:!0,off:!1},targeting:{if:[{sem_ver:[{var:"version"},">=","1.7.0"]},"on"]}}}}),flagKey:"enable-performance-mode",returnType:"boolean",context:Ot({version:"1.6.0"}),codeDefault:"false"},KA={description:['In this scenario, we have a feature flag with the key "color-palette-experiment" that is enabled and has four variants: red, blue, green, and grey.','The targeting rule uses the "fractional" operator, which deterministically splits the traffic based on the configuration.','This configuration splits the traffic evenly between the four variants by bucketing evaluations pseudorandomly using the "targetingKey" and feature flag key.','Experiment by changing the "targetingKey" to another value.'].join(" "),flagDefinition:wt({flags:{"color-palette-experiment":{state:"ENABLED",defaultVariant:"grey",variants:{red:"#b91c1c",blue:"#0284c7",green:"#16a34a",grey:"#4b5563"},targeting:{fractional:[["red",25],["blue",25],["green",25],["grey",25]]}}}}),flagKey:"color-palette-experiment",returnType:"string",context:Ot({targetingKey:"sessionId-123"}),codeDefault:'"grey"'},FA={description:['In this scenario, we have a feature flag with the key "enable-new-llm-model" with multiple variant for illustrative purposes.',"This flag has a targeting rule defined that enables the flag for a percentage of users based on the release phase.",'The "targetingKey" ensures that the user always sees the same results during a each phase of the rollout process.'].join(" "),flagDefinition:()=>{const r=Math.floor(Date.now()/1e3)+5,a=Math.floor(Date.now()/1e3)+10,s=Math.floor(Date.now()/1e3)+15,f=Math.floor(Date.now()/1e3)+20;return wt({flags:{"enable-new-llm-model":{state:"ENABLED",defaultVariant:"disabled",variants:{disabled:!1,phase1Enabled:!0,phase1Disabled:!1,phase2Enabled:!0,phase2Disabled:!1,phase3Enabled:!0,phase3Disabled:!1,enabled:!0},targeting:{if:[{">=":[r,{var:"$flagd.timestamp"}]},"disabled",{"<=":[r,{var:"$flagd.timestamp"},a]},{fractional:[["phase1Enabled",10],["phase1Disabled",90]]},{"<=":[a,{var:"$flagd.timestamp"},s]},{fractional:[["phase2Enabled",25],["phase2Disabled",75]]},{"<=":[s,{var:"$flagd.timestamp"},f]},{fractional:[["phase3Enabled",50],["phase3Disabled",50]]},"enabled"]}}}})},flagKey:"enable-new-llm-model",returnType:"boolean",context:()=>Ot({targetingKey:"sessionId-12345"}),codeDefault:"false"},PA={description:["In this scenario, we have two feature flags that share targeting rule logic.","This is accomplished by defining a $evaluators object in the feature flag definition and referencing it by name in a targeting rule.","Experiment with changing the email domain in the shared evaluator."].join(" "),flagDefinition:wt({flags:{"feature-1":{state:"ENABLED",defaultVariant:"false",variants:{true:!0,false:!1},targeting:{if:[{$ref:"emailWithFaas"},"true"]}},"feature-2":{state:"ENABLED",defaultVariant:"false",variants:{true:!0,false:!1},targeting:{if:[{$ref:"emailWithFaas"},"true"]}}},$evaluators:{emailWithFaas:{ends_with:[{var:"email"},"@faas.com"]}}}),flagKey:"feature-1",returnType:"boolean",context:Ot({email:"example@faas.com"}),codeDefault:"false"},JA={description:["In this scenario, we have a feature flag that is evaluated based on its targeting key.","The targeting key is contain a string uniquely identifying the subject of the flag evaluation, such as a user's email, or a session identifier.",`In this case, null is returned from targeting if the targeting key doesn't match; this results in a reason of "DEFAULT", since no variant was matched by the targeting rule.`].join(" "),flagDefinition:wt({flags:{"targeting-key-flag":{state:"ENABLED",variants:{miss:"miss",hit:"hit"},defaultVariant:"miss",targeting:{if:[{"==":[{var:"targetingKey"},"5c3d8535-f81a-4478-a6d3-afaa4d51199e"]},"hit",null]}}}}),flagKey:"targeting-key-flag",returnType:"string",context:Ot({targetingKey:"5c3d8535-f81a-4478-a6d3-afaa4d51199e"}),codeDefault:'"miss"'},WA={description:["In this scenario, we have a feature flag with metadata about the flag.","There is top-level metadata for the flag set and metadata specific to the flag.","These values are merged together, with the flag metadata taking precedence."].join(" "),flagDefinition:wt({flags:{"flag-with-metadata":{state:"ENABLED",variants:{on:!0,off:!1},defaultVariant:"on",metadata:{version:"1"}}},metadata:{flagSetId:"playground/dev"}}),flagKey:"flag-with-metadata",returnType:"boolean",context:Ot({}),codeDefault:"false"},e_={description:["This scenario demonstrates code defaults in flagd. When defaultVariant is omitted or set to null, flagd falls back to the code-defined default value.","In this example, the flag has two variants (on and off) with defaultVariant set to null.","When evaluated, flagd returns reason=DEFAULT and omits the value and variant fields, allowing the client to use its own code default.","Note: Omitting defaultVariant entirely has the same effect as setting it to null - both trigger code default behavior.","Compare this with the basic boolean flag which has an explicit defaultVariant set to false."].join(" "),flagDefinition:wt({flags:{"code-default-flag":{state:"ENABLED",variants:{on:!0,off:!1},defaultVariant:null}}}),flagKey:"code-default-flag",returnType:"boolean",context:Ot({}),codeDefault:"true"},rr={"Basic boolean flag":HA,"Basic numeric flag":$A,"Basic string flag":YA,"Basic object flag":kA,"Enable for a specific email domain":IA,"Enable based on users locale":XA,"Enable based on release version":QA,"Enable based on the current time":ZA,"Chainable if/else/then":VA,"Multi-variant experiment":KA,"Progressive rollout":FA,"Shared evaluators":PA,"Boolean variant shorthand":GA,"Targeting key":JA,"Flag metadata":WA,"Code default":e_};function t_(r,a,s){return a in r?Object.defineProperty(r,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[a]=s,r}function Py(r,a){var s=Object.keys(r);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(r);a&&(f=f.filter(function(c){return Object.getOwnPropertyDescriptor(r,c).enumerable})),s.push.apply(s,f)}return s}function Jy(r){for(var a=1;a=0)&&(s[c]=r[c]);return s}function n_(r,a){if(r==null)return{};var s=r_(r,a),f,c;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(r);for(c=0;c=0)&&Object.prototype.propertyIsEnumerable.call(r,f)&&(s[f]=r[f])}return s}function a_(r,a){return i_(r)||l_(r,a)||u_(r,a)||s_()}function i_(r){if(Array.isArray(r))return r}function l_(r,a){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(r)))){var s=[],f=!0,c=!1,u=void 0;try{for(var l=r[Symbol.iterator](),d;!(f=(d=l.next()).done)&&(s.push(d.value),!(a&&s.length===a));f=!0);}catch(m){c=!0,u=m}finally{try{!f&&l.return!=null&&l.return()}finally{if(c)throw u}}return s}}function u_(r,a){if(r){if(typeof r=="string")return Wy(r,a);var s=Object.prototype.toString.call(r).slice(8,-1);if(s==="Object"&&r.constructor&&(s=r.constructor.name),s==="Map"||s==="Set")return Array.from(r);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return Wy(r,a)}}function Wy(r,a){(a==null||a>r.length)&&(a=r.length);for(var s=0,f=new Array(a);s=r.length?r.apply(this,c):function(){for(var l=arguments.length,d=new Array(l),m=0;m1&&arguments[1]!==void 0?arguments[1]:{};Tu.initial(r),Tu.handler(a);var s={current:r},f=Wi(__)(s,a),c=Wi(A_)(s),u=Wi(Tu.changes)(r),l=Wi(E_)(s);function d(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(g){return g};return Tu.selector(p),p(s.current)}function m(p){o_(f,c,u,l)(p)}return[d,m]}function E_(r,a){return fl(a)?a(r.current):a}function A_(r,a){return r.current=tg(tg({},r.current),a),a}function __(r,a,s){return fl(a)?a(r.current):Object.keys(s).forEach(function(f){var c;return(c=a[f])===null||c===void 0?void 0:c.call(a,r.current[f])}),s}var w_={create:b_},O_={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function S_(r){return function a(){for(var s=this,f=arguments.length,c=new Array(f),u=0;u=r.length?r.apply(this,c):function(){for(var l=arguments.length,d=new Array(l),m=0;m{l.current=!1}:n,i)}var Gt=OO;function Za(){}function Bi(n,i,u,l){return TO(n,l)||RO(n,i,u,l)}function TO(n,i){return n.editor.getModel(x1(n,i))}function RO(n,i,u,l){return n.editor.createModel(i,u,l?x1(n,l):void 0)}function x1(n,i){return n.Uri.parse(i)}function NO({original:n,modified:i,language:u,originalLanguage:l,modifiedLanguage:s,originalModelPath:o,modifiedModelPath:c,keepCurrentOriginalModel:d=!1,keepCurrentModifiedModel:p=!1,theme:m="light",loading:v="Loading...",options:S={},height:L="100%",width:C="100%",className:q,wrapperProps:j={},beforeMount:y=Za,onMount:A=Za}){let[g,E]=ve.useState(!1),[_,T]=ve.useState(!0),b=ve.useRef(null),R=ve.useRef(null),$=ve.useRef(null),D=ve.useRef(A),N=ve.useRef(y),Y=ve.useRef(!1);C1(()=>{let ne=D1.init();return ne.then(P=>(R.current=P)&&T(!1)).catch(P=>(P==null?void 0:P.type)!=="cancelation"&&console.error("Monaco initialization: error:",P)),()=>b.current?ee():ne.cancel()}),Gt(()=>{if(b.current&&R.current){let ne=b.current.getOriginalEditor(),P=Bi(R.current,n||"",l||u||"text",o||"");P!==ne.getModel()&&ne.setModel(P)}},[o],g),Gt(()=>{if(b.current&&R.current){let ne=b.current.getModifiedEditor(),P=Bi(R.current,i||"",s||u||"text",c||"");P!==ne.getModel()&&ne.setModel(P)}},[c],g),Gt(()=>{let ne=b.current.getModifiedEditor();ne.getOption(R.current.editor.EditorOption.readOnly)?ne.setValue(i||""):i!==ne.getValue()&&(ne.executeEdits("",[{range:ne.getModel().getFullModelRange(),text:i||"",forceMoveMarkers:!0}]),ne.pushUndoStop())},[i],g),Gt(()=>{var ne,P;(P=(ne=b.current)==null?void 0:ne.getModel())==null||P.original.setValue(n||"")},[n],g),Gt(()=>{let{original:ne,modified:P}=b.current.getModel();R.current.editor.setModelLanguage(ne,l||u||"text"),R.current.editor.setModelLanguage(P,s||u||"text")},[u,l,s],g),Gt(()=>{var ne;(ne=R.current)==null||ne.editor.setTheme(m)},[m],g),Gt(()=>{var ne;(ne=b.current)==null||ne.updateOptions(S)},[S],g);let X=ve.useCallback(()=>{var se;if(!R.current)return;N.current(R.current);let ne=Bi(R.current,n||"",l||u||"text",o||""),P=Bi(R.current,i||"",s||u||"text",c||"");(se=b.current)==null||se.setModel({original:ne,modified:P})},[u,i,s,n,l,o,c]),J=ve.useCallback(()=>{var ne;!Y.current&&$.current&&(b.current=R.current.editor.createDiffEditor($.current,{automaticLayout:!0,...S}),X(),(ne=R.current)==null||ne.editor.setTheme(m),E(!0),Y.current=!0)},[S,m,X]);ve.useEffect(()=>{g&&D.current(b.current,R.current)},[g]),ve.useEffect(()=>{!_&&!g&&J()},[_,g,J]);function ee(){var P,se,le,de;let ne=(P=b.current)==null?void 0:P.getModel();d||((se=ne==null?void 0:ne.original)==null||se.dispose()),p||((le=ne==null?void 0:ne.modified)==null||le.dispose()),(de=b.current)==null||de.dispose()}return Fr.createElement(M1,{width:C,height:L,isEditorReady:g,loading:v,_ref:$,className:q,wrapperProps:j})}var jO=NO;ve.memo(jO);function DO(n){let i=ve.useRef();return ve.useEffect(()=>{i.current=n},[n]),i.current}var MO=DO,ls=new Map;function CO({defaultValue:n,defaultLanguage:i,defaultPath:u,value:l,language:s,path:o,theme:c="light",line:d,loading:p="Loading...",options:m={},overrideServices:v={},saveViewState:S=!0,keepCurrentModel:L=!1,width:C="100%",height:q="100%",className:j,wrapperProps:y={},beforeMount:A=Za,onMount:g=Za,onChange:E,onValidate:_=Za}){let[T,b]=ve.useState(!1),[R,$]=ve.useState(!0),D=ve.useRef(null),N=ve.useRef(null),Y=ve.useRef(null),X=ve.useRef(g),J=ve.useRef(A),ee=ve.useRef(),ne=ve.useRef(l),P=MO(o),se=ve.useRef(!1),le=ve.useRef(!1);C1(()=>{let z=D1.init();return z.then(F=>(D.current=F)&&$(!1)).catch(F=>(F==null?void 0:F.type)!=="cancelation"&&console.error("Monaco initialization: error:",F)),()=>N.current?U():z.cancel()}),Gt(()=>{var F,H,O,V;let z=Bi(D.current,n||l||"",i||s||"",o||u||"");z!==((F=N.current)==null?void 0:F.getModel())&&(S&&ls.set(P,(H=N.current)==null?void 0:H.saveViewState()),(O=N.current)==null||O.setModel(z),S&&((V=N.current)==null||V.restoreViewState(ls.get(o))))},[o],T),Gt(()=>{var z;(z=N.current)==null||z.updateOptions(m)},[m],T),Gt(()=>{!N.current||l===void 0||(N.current.getOption(D.current.editor.EditorOption.readOnly)?N.current.setValue(l):l!==N.current.getValue()&&(le.current=!0,N.current.executeEdits("",[{range:N.current.getModel().getFullModelRange(),text:l,forceMoveMarkers:!0}]),N.current.pushUndoStop(),le.current=!1))},[l],T),Gt(()=>{var F,H;let z=(F=N.current)==null?void 0:F.getModel();z&&s&&((H=D.current)==null||H.editor.setModelLanguage(z,s))},[s],T),Gt(()=>{var z;d!==void 0&&((z=N.current)==null||z.revealLine(d))},[d],T),Gt(()=>{var z;(z=D.current)==null||z.editor.setTheme(c)},[c],T);let de=ve.useCallback(()=>{var z;if(!(!Y.current||!D.current)&&!se.current){J.current(D.current);let F=o||u,H=Bi(D.current,l||n||"",i||s||"",F||"");N.current=(z=D.current)==null?void 0:z.editor.create(Y.current,{model:H,automaticLayout:!0,...m},v),S&&N.current.restoreViewState(ls.get(F)),D.current.editor.setTheme(c),d!==void 0&&N.current.revealLine(d),b(!0),se.current=!0}},[n,i,u,l,s,o,m,v,S,c,d]);ve.useEffect(()=>{T&&X.current(N.current,D.current)},[T]),ve.useEffect(()=>{!R&&!T&&de()},[R,T,de]),ne.current=l,ve.useEffect(()=>{var z,F;T&&E&&((z=ee.current)==null||z.dispose(),ee.current=(F=N.current)==null?void 0:F.onDidChangeModelContent(H=>{le.current||E(N.current.getValue(),H)}))},[T,E]),ve.useEffect(()=>{if(T){let z=D.current.editor.onDidChangeMarkers(F=>{var O;let H=(O=N.current.getModel())==null?void 0:O.uri;if(H&&F.find(V=>V.path===H.path)){let V=D.current.editor.getModelMarkers({resource:H});_==null||_(V)}});return()=>{z==null||z.dispose()}}return()=>{}},[T,_]);function U(){var z,F;(z=ee.current)==null||z.dispose(),L?S&&ls.set(o,N.current.saveViewState()):(F=N.current.getModel())==null||F.dispose(),N.current.dispose()}return Fr.createElement(M1,{width:C,height:q,isEditorReady:T,loading:p,_ref:Y,className:j,wrapperProps:y})}var xO=CO,sv=ve.memo(xO);const qi="json",us="yaml",ov="data-md-color-scheme",LO="[data-md-component=palette]",fv=()=>document.body.getAttribute(ov)&&document.body.getAttribute(ov)!=="default"?"custom-dark":"custom",cv=n=>{n==null||n.editor.defineTheme("custom-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#00000000"}}),n==null||n.editor.defineTheme("custom",{base:"vs",inherit:!0,rules:[],colors:{"editor.background":"#00000000"}}),n==null||n.languages.json.jsonDefaults.setDiagnosticsOptions({enableSchemaRequest:!0,allowComments:!1})};function dv(n){const i=JSON.parse(n);return JSON.stringify(i,null,2)}function qO(){const[n,i]=ve.useState("Basic boolean flag"),[u,l]=ve.useState(fn[n].flagDefinition),[s,o]=ve.useState(fn[n].flagKey),[c,d]=ve.useState(fn[n].returnType),[p,m]=ve.useState(ev(fn[n].context)),[v,S]=ve.useState(!1),[L,C]=ve.useState(""),[q,j]=ve.useState([]),[y,A]=ve.useState(fn[n].description),[g,E]=ve.useState(!0),[_,T]=ve.useState(!0),[b,R]=ve.useState(!1),[$,D]=ve.useState("success"),[N,Y]=ve.useState(fv()),[X,J]=ve.useState(qi),ee=ve.useCallback(()=>{try{const H=X===qi?us:qi;l(H===us?tv(u):m$(u)),J(H);const O=new URL(window.location.href);O.searchParams.set("lang",H),window.history.replaceState({},"",O.href)}catch(H){console.error("Failed to convert",H)}},[u,X]),ne=ve.useCallback(()=>{C(""),S(!1);const H=fn[n];l(H.flagDefinition),J(qi),o(H.flagKey),d(H.returnType),m(ev(H.context)),A(H.description),E(!0),T(!0),R(!1),D("success")},[n]);ve.useEffect(()=>{ne()},[n,ne]);const P=ve.useMemo(()=>new Lv(console),[]),se=ve.useMemo(()=>new Fw(P,console),[P]);ve.useEffect(()=>{if(p$(u))try{const H=id(u);se.setConfigurations(H),j(Array.from(se.getFlags().keys())),E(!0)}catch(H){console.error("Invalid flagd configuration",H),E(!1)}else E(!1)},[u,se]),ve.useEffect(()=>{try{JSON.parse(p),T(!0)}catch(H){console.error("Invalid JSON input",H),T(!1)}},[p]),ve.useEffect(()=>{var V;const H=document.querySelector(LO),O=(V=window.component$)==null?void 0:V.subscribe(W=>{(W==null?void 0:W.ref)===H&&Y(fv())});return()=>{O==null||O.unsubscribe()}}),ve.useEffect(()=>{const H=new URLSearchParams(window.location.search),O=H.get("flags"),V=H.get("flag-key"),W=H.get("return-type"),me=H.get("eval-context"),re=H.get("lang"),M=H.get("scenario-name");if(O)try{let B=dv(O),x=qi;if(re===us&&(B=tv(B),x=us),l(B),J(x),V&&o(V),W&&d(W),me){const k=dv(me);m(k)}}catch(B){console.error("Error decoding URL parameters: ",B)}else M&&fn[M]&&(i(M),l(fn[M].flagDefinition))},[]);const le=()=>{S(!0);try{let H;const O=JSON.parse(p);switch(c){case"boolean":H=se.resolveBooleanEvaluation(s,!1,O,console);break;case"string":H=se.resolveStringEvaluation(s,"",O,console);break;case"number":H=se.resolveNumberEvaluation(s,0,O,console);break;case"object":H=se.resolveObjectEvaluation(s,{},O,console);break}D("success"),C(JSON.stringify(H,null,2))}catch(H){console.error("Invalid JSON input",H),D("failure"),C(H.message)}},de=ve.useMemo(()=>{try{return JSON.parse(L)}catch{return L}},[L]),U=d_("(max-width: 1220px)"),z={border:"none",backgroundColor:"var(--md-code-bg-color)",color:"var(--md-code-fg-color)",fontFeatureSettings:"kern",fontFamily:"var(--md-code-font-family)"},F=()=>{const H=window.location.origin+window.location.pathname,O=new URL(H),V=id(u),W=id(p);Object.keys(fn).includes(n)&&fn[n].flagDefinition===u?O.searchParams.set("scenario-name",n):(O.searchParams.delete("scenario-name"),O.searchParams.set("flags",V),O.searchParams.set("flag-key",s),O.searchParams.set("return-type",c),O.searchParams.set("eval-context",W),O.searchParams.set("lang",X)),window.history.pushState({},"",O.href),navigator.clipboard.writeText(O.href).then(()=>{console.log("URL copied to clipboard"),R(!0),setTimeout(()=>{R(!1)},5e3)}).catch(me=>{console.error("Failed to copy URL: ",me)})};return we.jsxs("div",{style:{maxWidth:"100%"},children:[we.jsxs("div",{children:[we.jsx("a",{href:"../",className:"playground-back",children:"Back to docs"}),we.jsxs("p",{style:{lineHeight:"1.4",fontSize:"medium"},children:["Explore flagd flag definitions in your browser. Begin by selecting an example below; these are merely starting points, so customize the flag definition as you wish. Find an overview of the flag definition structure ",we.jsx("a",{href:"/reference/flag-definitions/",children:"here"}),"."]})]}),we.jsxs("div",{children:[we.jsx("h4",{children:"Select a scenario"}),we.jsxs("div",{style:{display:"flex",flexDirection:U?"column":"row",textAlign:"left",gap:"16px",height:"100%"},children:[we.jsx("div",{style:{flex:"2"},children:we.jsx("select",{style:{width:"100%",minWidth:"250px",padding:"8px",...z},value:n,onChange:H=>i(H.target.value),children:Object.keys(fn).map(H=>we.jsx("option",{value:H,children:H},H))})}),we.jsx("div",{style:{flex:"3"},children:we.jsx("p",{style:{lineHeight:"1.4",margin:"-4px 0 0 0",fontSize:"small"},children:y})})]}),we.jsxs("div",{style:{display:"flex",flexDirection:U?"column":"row",textAlign:"left",gap:"16px",height:"100%"},children:[we.jsxs("div",{style:{flex:"3"},children:[we.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[we.jsx("h4",{style:{margin:0},children:"Feature definition"}),we.jsxs("button",{className:"md-button",style:{padding:"2px 8px",fontSize:"small"},disabled:!g,onClick:ee,children:["Switch to ",X===qi?"YAML":"JSON"]})]}),we.jsx("div",{style:{backgroundColor:z.backgroundColor},children:we.jsx(sv,{theme:N,width:"100%",height:"500px",language:X,value:u,options:{minimap:{enabled:!1},lineNumbers:"off"},beforeMount:cv,onChange:H=>{H&&l(H)}})})]}),we.jsxs("div",{style:{flex:"2"},children:[we.jsxs("div",{children:[we.jsx("h4",{children:"Flag key"}),we.jsx("input",{style:{width:"100%",maxWidth:"800px",padding:"8px",boxSizing:"border-box",...z},name:"flag-key",list:"flag-keys",value:s,onChange:H=>o(H.target.value)}),we.jsx("datalist",{id:"flag-keys",children:q.map((H,O)=>we.jsx("option",{value:H},O))})]}),we.jsxs("div",{children:[we.jsx("h4",{children:"Return type"}),we.jsxs("select",{style:{width:"100%",padding:"8px 0 8px 0",...z},value:c,onChange:H=>d(H.target.value),children:[we.jsx("option",{value:"boolean",children:"boolean"}),we.jsx("option",{value:"string",children:"string"}),we.jsx("option",{value:"number",children:"number"}),we.jsx("option",{value:"object",children:"object"})]})]}),we.jsxs("div",{children:[we.jsx("h4",{children:"Evaluation context"}),we.jsx("div",{style:{backgroundColor:z.backgroundColor},children:we.jsx(sv,{theme:N,width:"100%",height:"80px",language:"json",options:{minimap:{enabled:!1},lineNumbers:"off",folding:!1},beforeMount:cv,value:p,onChange:H=>{H&&m(H)}})})]}),we.jsxs("div",{style:{display:"flex",gap:"8px",paddingTop:"8px"},children:[we.jsx("button",{className:"md-button md-button--primary",onClick:le,disabled:!g||!_,children:"Evaluate"}),we.jsx("button",{className:"md-button",onClick:ne,children:"Reset"}),we.jsx("button",{className:"md-button",onClick:F,disabled:!g||!_,children:"Share"})]}),we.jsxs("div",{className:`output ${v?"visible":""} admonition ${$==="success"?"success":"failure"}`,children:[we.jsx("p",{className:"admonition-title",children:$==="success"?"Success":"Failure"}),typeof de=="object"?we.jsx("div",{style:{margin:"0.6rem 0 0.6rem 0"},children:Object.entries(de).map(([H,O])=>we.jsxs("div",{children:[we.jsxs("strong",{children:[H,":"]})," ",JSON.stringify(O)]},H))}):we.jsx("p",{children:de})]}),b&&we.jsx("h4",{className:"admonition-title",style:{paddingLeft:"45px",borderLeftWidth:"0rem",borderLeftStyle:"solid",left:"15px"},children:"URL copied to clipboard"})]})]})]})]})}o_.createRoot(document.getElementById("playground")).render(we.jsx(Fr.StrictMode,{children:we.jsx(qO,{})}));let hv=!1;new MutationObserver(()=>{document.getElementById("playground")?hv&&window.location.reload():hv=!0}).observe(document.body,{childList:!0,subtree:!0}); + `},rg=S_(D_)(b0),N_={config:R_},M_=function(){for(var a=arguments.length,s=new Array(a),f=0;f{f.current=!1}:r,a)}var Yt=F_;function nl(){}function Ha(r,a,s,f){return P_(r,f)||J_(r,a,s,f)}function P_(r,a){return r.editor.getModel(T0(r,a))}function J_(r,a,s,f){return r.editor.createModel(a,s,f?T0(r,f):void 0)}function T0(r,a){return r.Uri.parse(a)}function W_({original:r,modified:a,language:s,originalLanguage:f,modifiedLanguage:c,originalModelPath:u,modifiedModelPath:l,keepCurrentOriginalModel:d=!1,keepCurrentModifiedModel:m=!1,theme:p="light",loading:g="Loading...",options:v={},height:T="100%",width:j="100%",className:C,wrapperProps:N={},beforeMount:D=nl,onMount:X=nl}){let[k,I]=pe.useState(!1),[W,te]=pe.useState(!0),R=pe.useRef(null),U=pe.useRef(null),_=pe.useRef(null),w=pe.useRef(X),E=pe.useRef(D),q=pe.useRef(!1);S0(()=>{let z=w0.init();return z.then(x=>(U.current=x)&&te(!1)).catch(x=>(x==null?void 0:x.type)!=="cancelation"&&console.error("Monaco initialization: error:",x)),()=>R.current?K():z.cancel()}),Yt(()=>{if(R.current&&U.current){let z=R.current.getOriginalEditor(),x=Ha(U.current,r||"",f||s||"text",u||"");x!==z.getModel()&&z.setModel(x)}},[u],k),Yt(()=>{if(R.current&&U.current){let z=R.current.getModifiedEditor(),x=Ha(U.current,a||"",c||s||"text",l||"");x!==z.getModel()&&z.setModel(x)}},[l],k),Yt(()=>{let z=R.current.getModifiedEditor();z.getOption(U.current.editor.EditorOption.readOnly)?z.setValue(a||""):a!==z.getValue()&&(z.executeEdits("",[{range:z.getModel().getFullModelRange(),text:a||"",forceMoveMarkers:!0}]),z.pushUndoStop())},[a],k),Yt(()=>{var z,x;(x=(z=R.current)==null?void 0:z.getModel())==null||x.original.setValue(r||"")},[r],k),Yt(()=>{let{original:z,modified:x}=R.current.getModel();U.current.editor.setModelLanguage(z,f||s||"text"),U.current.editor.setModelLanguage(x,c||s||"text")},[s,f,c],k),Yt(()=>{var z;(z=U.current)==null||z.editor.setTheme(p)},[p],k),Yt(()=>{var z;(z=R.current)==null||z.updateOptions(v)},[v],k);let G=pe.useCallback(()=>{var Z;if(!U.current)return;E.current(U.current);let z=Ha(U.current,r||"",f||s||"text",u||""),x=Ha(U.current,a||"",c||s||"text",l||"");(Z=R.current)==null||Z.setModel({original:z,modified:x})},[s,a,c,r,f,u,l]),ce=pe.useCallback(()=>{var z;!q.current&&_.current&&(R.current=U.current.editor.createDiffEditor(_.current,{automaticLayout:!0,...v}),G(),(z=U.current)==null||z.editor.setTheme(p),I(!0),q.current=!0)},[v,p,G]);pe.useEffect(()=>{k&&w.current(R.current,U.current)},[k]),pe.useEffect(()=>{!W&&!k&&ce()},[W,k,ce]);function K(){var x,Z,P,J;let z=(x=R.current)==null?void 0:x.getModel();d||((Z=z==null?void 0:z.original)==null||Z.dispose()),m||((P=z==null?void 0:z.modified)==null||P.dispose()),(J=R.current)==null||J.dispose()}return Kn.createElement(O0,{width:j,height:T,isEditorReady:k,loading:g,_ref:_,className:C,wrapperProps:N})}var ew=W_;pe.memo(ew);function tw(r){let a=pe.useRef();return pe.useEffect(()=>{a.current=r},[r]),a.current}var rw=tw,Ru=new Map;function nw({defaultValue:r,defaultLanguage:a,defaultPath:s,value:f,language:c,path:u,theme:l="light",line:d,loading:m="Loading...",options:p={},overrideServices:g={},saveViewState:v=!0,keepCurrentModel:T=!1,width:j="100%",height:C="100%",className:N,wrapperProps:D={},beforeMount:X=nl,onMount:k=nl,onChange:I,onValidate:W=nl}){let[te,R]=pe.useState(!1),[U,_]=pe.useState(!0),w=pe.useRef(null),E=pe.useRef(null),q=pe.useRef(null),G=pe.useRef(k),ce=pe.useRef(X),K=pe.useRef(),z=pe.useRef(f),x=rw(u),Z=pe.useRef(!1),P=pe.useRef(!1);S0(()=>{let $=w0.init();return $.then(ee=>(w.current=ee)&&_(!1)).catch(ee=>(ee==null?void 0:ee.type)!=="cancelation"&&console.error("Monaco initialization: error:",ee)),()=>E.current?O():$.cancel()}),Yt(()=>{var ee,se,ie,he;let $=Ha(w.current,r||f||"",a||c||"",u||s||"");$!==((ee=E.current)==null?void 0:ee.getModel())&&(v&&Ru.set(x,(se=E.current)==null?void 0:se.saveViewState()),(ie=E.current)==null||ie.setModel($),v&&((he=E.current)==null||he.restoreViewState(Ru.get(u))))},[u],te),Yt(()=>{var $;($=E.current)==null||$.updateOptions(p)},[p],te),Yt(()=>{!E.current||f===void 0||(E.current.getOption(w.current.editor.EditorOption.readOnly)?E.current.setValue(f):f!==E.current.getValue()&&(P.current=!0,E.current.executeEdits("",[{range:E.current.getModel().getFullModelRange(),text:f,forceMoveMarkers:!0}]),E.current.pushUndoStop(),P.current=!1))},[f],te),Yt(()=>{var ee,se;let $=(ee=E.current)==null?void 0:ee.getModel();$&&c&&((se=w.current)==null||se.editor.setModelLanguage($,c))},[c],te),Yt(()=>{var $;d!==void 0&&(($=E.current)==null||$.revealLine(d))},[d],te),Yt(()=>{var $;($=w.current)==null||$.editor.setTheme(l)},[l],te);let J=pe.useCallback(()=>{var $;if(!(!q.current||!w.current)&&!Z.current){ce.current(w.current);let ee=u||s,se=Ha(w.current,f||r||"",a||c||"",ee||"");E.current=($=w.current)==null?void 0:$.editor.create(q.current,{model:se,automaticLayout:!0,...p},g),v&&E.current.restoreViewState(Ru.get(ee)),w.current.editor.setTheme(l),d!==void 0&&E.current.revealLine(d),R(!0),Z.current=!0}},[r,a,s,f,c,u,p,g,v,l,d]);pe.useEffect(()=>{te&&G.current(E.current,w.current)},[te]),pe.useEffect(()=>{!U&&!te&&J()},[U,te,J]),z.current=f,pe.useEffect(()=>{var $,ee;te&&I&&(($=K.current)==null||$.dispose(),K.current=(ee=E.current)==null?void 0:ee.onDidChangeModelContent(se=>{P.current||I(E.current.getValue(),se)}))},[te,I]),pe.useEffect(()=>{if(te){let $=w.current.editor.onDidChangeMarkers(ee=>{var ie;let se=(ie=E.current.getModel())==null?void 0:ie.uri;if(se&&ee.find(he=>he.path===se.path)){let he=w.current.editor.getModelMarkers({resource:se});W==null||W(he)}});return()=>{$==null||$.dispose()}}return()=>{}},[te,W]);function O(){var $,ee;($=K.current)==null||$.dispose(),T?v&&Ru.set(u,E.current.saveViewState()):(ee=E.current.getModel())==null||ee.dispose(),E.current.dispose()}return Kn.createElement(O0,{width:j,height:C,isEditorReady:te,loading:m,_ref:q,className:N,wrapperProps:D})}var aw=nw,ng=pe.memo(aw);const La="json",xu="yaml",ag="data-md-color-scheme",iw="[data-md-component=palette]",ig=()=>document.body.getAttribute(ag)&&document.body.getAttribute(ag)!=="default"?"custom-dark":"custom",lg=r=>{r==null||r.editor.defineTheme("custom-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#00000000"}}),r==null||r.editor.defineTheme("custom",{base:"vs",inherit:!0,rules:[],colors:{"editor.background":"#00000000"}}),r==null||r.languages.json.jsonDefaults.setDiagnosticsOptions({enableSchemaRequest:!0,allowComments:!1})};function ug(r){const a=JSON.parse(r);return JSON.stringify(a,null,2)}function lw(){const[r,a]=pe.useState("Basic boolean flag"),[s,f]=pe.useState(rr[r].flagDefinition),[c,u]=pe.useState(rr[r].flagKey),[l,d]=pe.useState(rr[r].returnType),[m,p]=pe.useState(rr[r].codeDefault),[g,v]=pe.useState(null),[T,j]=pe.useState(Ky(rr[r].context)),[C,N]=pe.useState(!1),[D,X]=pe.useState(""),[k,I]=pe.useState([]),[W,te]=pe.useState(rr[r].description),[R,U]=pe.useState(!0),[_,w]=pe.useState(!0),[E,q]=pe.useState(!1),[G,ce]=pe.useState("success"),[K,z]=pe.useState(ig()),[x,Z]=pe.useState(La),P=pe.useCallback(()=>{try{const B=x===La?xu:La;f(B===xu?Fy(s):qA(s)),Z(B);const b=new URL(window.location.href);b.searchParams.set("lang",B),window.history.replaceState({},"",b.href)}catch(B){console.error("Failed to convert",B)}},[s,x]),J=pe.useCallback(()=>{X(""),N(!1);const B=rr[r];f(B.flagDefinition),Z(La),u(B.flagKey),d(B.returnType),p(B.codeDefault),j(Ky(B.context)),te(B.description),U(!0),w(!0),q(!1),ce("success")},[r]);pe.useEffect(()=>{J()},[r,J]);const O=pe.useMemo(()=>new Rg(console),[]),$=pe.useMemo(()=>new g2(O,console),[O]);pe.useEffect(()=>{if(BA(s))try{const B=lc(s);$.setConfigurations(B),I(Array.from($.getFlags().keys())),U(!0)}catch(B){console.error("Invalid flagd configuration",B),U(!1)}else U(!1)},[s,$]),pe.useEffect(()=>{try{JSON.parse(T),w(!0)}catch(B){console.error("Invalid JSON input",B),w(!1)}},[T]),pe.useEffect(()=>{var S;const B=document.querySelector(iw),b=(S=window.component$)==null?void 0:S.subscribe(L=>{(L==null?void 0:L.ref)===B&&z(ig())});return()=>{b==null||b.unsubscribe()}}),pe.useEffect(()=>{const B=new URLSearchParams(window.location.search),b=B.get("flags"),S=B.get("flag-key"),L=B.get("return-type"),ae=B.get("code-default"),ue=B.get("eval-context"),oe=B.get("lang"),Ee=B.get("scenario-name");if(b)try{let Te=ug(b),Ue=La;if(oe===xu&&(Te=Fy(Te),Ue=xu),f(Te),Z(Ue),S&&u(S),L&&d(L),ae&&p(ae),ue){const Ve=ug(ue);j(Ve)}}catch(Te){console.error("Error decoding URL parameters: ",Te)}else Ee&&rr[Ee]&&(a(Ee),f(rr[Ee].flagDefinition))},[]);function ee(B,b){switch(b){case"boolean":return B==="true"||B==="True"||B==="TRUE";case"number":const S=parseFloat(B);return isNaN(S)?0:S;case"object":try{return JSON.parse(B)}catch{return{}}case"string":default:return B}}const se=()=>{N(!0);try{let B;const b=JSON.parse(T),S=ee(m,l);switch(l){case"boolean":B=$.resolveBooleanEvaluation(c,S,b,console);break;case"string":B=$.resolveStringEvaluation(c,S,b,console);break;case"number":B=$.resolveNumberEvaluation(c,S,b,console);break;case"object":B=$.resolveObjectEvaluation(c,S,b,console);break}B.variant||(B.value=void 0),ce("success"),v(m),X(JSON.stringify(B,null,2))}catch(B){console.error("Invalid JSON input",B),ce("failure"),X(B.message)}},ie=pe.useMemo(()=>{try{return JSON.parse(D)}catch{return D}},[D]),he=lb("(max-width: 1220px)"),de={border:"none",backgroundColor:"var(--md-code-bg-color)",color:"var(--md-code-fg-color)",fontFeatureSettings:"kern",fontFamily:"var(--md-code-font-family)"},Re=()=>{const B=window.location.origin+window.location.pathname,b=new URL(B),S=lc(s),L=lc(T);Object.keys(rr).includes(r)&&rr[r].flagDefinition===s?b.searchParams.set("scenario-name",r):(b.searchParams.delete("scenario-name"),b.searchParams.set("flags",S),b.searchParams.set("flag-key",c),b.searchParams.set("return-type",l),b.searchParams.set("code-default",m),b.searchParams.set("eval-context",L),b.searchParams.set("lang",x)),window.history.pushState({},"",b.href),navigator.clipboard.writeText(b.href).then(()=>{console.log("URL copied to clipboard"),q(!0),setTimeout(()=>{q(!1)},5e3)}).catch(ae=>{console.error("Failed to copy URL: ",ae)})};return ve.jsxs("div",{style:{maxWidth:"100%"},children:[ve.jsxs("div",{children:[ve.jsx("a",{href:"../",className:"playground-back",children:"Back to docs"}),ve.jsxs("p",{style:{lineHeight:"1.4",fontSize:"medium"},children:["Explore flagd flag definitions in your browser. Begin by selecting an example below; these are merely starting points, so customize the flag definition as you wish. Find an overview of the flag definition structure ",ve.jsx("a",{href:"/reference/flag-definitions/",children:"here"}),"."]})]}),ve.jsxs("div",{children:[ve.jsx("h4",{children:"Select a scenario"}),ve.jsxs("div",{style:{display:"flex",flexDirection:he?"column":"row",textAlign:"left",gap:"16px",height:"100%"},children:[ve.jsx("div",{style:{flex:"2"},children:ve.jsx("select",{style:{width:"100%",minWidth:"250px",padding:"8px",...de},value:r,onChange:B=>a(B.target.value),children:Object.keys(rr).map(B=>ve.jsx("option",{value:B,children:B},B))})}),ve.jsx("div",{style:{flex:"3"},children:ve.jsx("p",{style:{lineHeight:"1.4",margin:"-4px 0 0 0",fontSize:"small"},children:W})})]}),ve.jsxs("div",{style:{display:"flex",flexDirection:he?"column":"row",textAlign:"left",gap:"16px",height:"100%"},children:[ve.jsxs("div",{style:{flex:"3"},children:[ve.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[ve.jsx("h4",{style:{margin:0},children:"Feature definition"}),ve.jsxs("button",{className:"md-button",style:{padding:"2px 8px",fontSize:"small"},disabled:!R,onClick:P,children:["Switch to ",x===La?"YAML":"JSON"]})]}),ve.jsx("div",{style:{backgroundColor:de.backgroundColor},children:ve.jsx(ng,{theme:K,width:"100%",height:"500px",language:x,value:s,options:{minimap:{enabled:!1},lineNumbers:"off"},beforeMount:lg,onChange:B=>{B&&f(B)}})})]}),ve.jsxs("div",{style:{flex:"2"},children:[ve.jsxs("div",{children:[ve.jsx("h4",{children:"Flag key"}),ve.jsx("input",{style:{width:"100%",maxWidth:"800px",padding:"8px",boxSizing:"border-box",...de},name:"flag-key",list:"flag-keys",value:c,onChange:B=>u(B.target.value)}),ve.jsx("datalist",{id:"flag-keys",children:k.map((B,b)=>ve.jsx("option",{value:B},b))})]}),ve.jsxs("div",{children:[ve.jsx("h4",{children:"Return type"}),ve.jsxs("select",{style:{width:"100%",padding:"8px 0 8px 0",...de},value:l,onChange:B=>d(B.target.value),children:[ve.jsx("option",{value:"boolean",children:"boolean"}),ve.jsx("option",{value:"string",children:"string"}),ve.jsx("option",{value:"number",children:"number"}),ve.jsx("option",{value:"object",children:"object"})]})]}),ve.jsxs("div",{children:[ve.jsx("h4",{children:"Code default"}),ve.jsx("input",{style:{width:"100%",maxWidth:"800px",padding:"8px",boxSizing:"border-box",...de},name:"code-default",value:m,onChange:B=>p(B.target.value)}),ve.jsx("p",{style:{fontSize:"small",color:"var(--md-code-fg-color)",marginTop:"4px"},children:"The default value to use when defaultVariant is null/omitted, or when errors occur during evaluation."})]}),ve.jsxs("div",{children:[ve.jsx("h4",{children:"Evaluation context"}),ve.jsx("div",{style:{backgroundColor:de.backgroundColor},children:ve.jsx(ng,{theme:K,width:"100%",height:"80px",language:"json",options:{minimap:{enabled:!1},lineNumbers:"off",folding:!1},beforeMount:lg,value:T,onChange:B=>{B&&j(B)}})})]}),ve.jsxs("div",{style:{display:"flex",gap:"8px",paddingTop:"8px"},children:[ve.jsx("button",{className:"md-button md-button--primary",onClick:se,disabled:!R||!_,children:"Evaluate"}),ve.jsx("button",{className:"md-button",onClick:J,children:"Reset"}),ve.jsx("button",{className:"md-button",onClick:Re,disabled:!R||!_,children:"Share"})]}),ve.jsxs("div",{className:`output ${C?"visible":""} admonition ${G==="success"?"success":"failure"}`,children:[ve.jsx("p",{className:"admonition-title",children:G==="success"?"Success":"Failure"}),typeof ie=="object"?ve.jsxs("div",{style:{margin:"0.6rem 0 0.6rem 0"},children:[Object.entries(ie).map(([B,b])=>ve.jsxs("div",{children:[ve.jsxs("strong",{children:[B,":"]})," ",JSON.stringify(b)]},B)),g&&ie.value===void 0&&ve.jsxs("div",{children:[ve.jsx("strong",{children:"value:"})," ",g]})]}):ve.jsx("p",{children:ie})]}),E&&ve.jsx("h4",{className:"admonition-title",style:{paddingLeft:"45px",borderLeftWidth:"0rem",borderLeftStyle:"solid",left:"15px"},children:"URL copied to clipboard"})]})]})]})]})}nb.createRoot(document.getElementById("playground")).render(ve.jsx(Kn.StrictMode,{children:ve.jsx(lw,{})}));let sg=!1;new MutationObserver(()=>{document.getElementById("playground")?sg&&window.location.reload():sg=!0}).observe(document.body,{childList:!0,subtree:!0}); diff --git a/docs/quick-start.md b/docs/quick-start.md index 0052e73d4..03ace01f3 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -83,13 +83,13 @@ These are commonly used for A/B/(n) testing and experimentation. Test it out by running the following cURL command in a separate terminal: ```shell -curl -X POST "http://localhost:8013/flagd.evaluation.v1.Service/ResolveBoolean" \ +curl -X POST "http://localhost:8013/flagd.evaluation.v2.Service/ResolveBoolean" \ -d '{"flagKey":"show-welcome-banner","context":{}}' -H "Content-Type: application/json" ``` You should see the following result: -```json +```jsonc { "value": false, "reason": "STATIC", @@ -105,13 +105,13 @@ Open the `demo.flagd.json` file in a text editor and change the `defaultVariant` Save and rerun the following cURL command: ```shell -curl -X POST "http://localhost:8013/flagd.evaluation.v1.Service/ResolveBoolean" \ +curl -X POST "http://localhost:8013/flagd.evaluation.v2.Service/ResolveBoolean" \ -d '{"flagKey":"show-welcome-banner","context":{}}' -H "Content-Type: application/json" ``` You should see the updated results: -```json +```jsonc { "value": true, "reason": "STATIC", @@ -133,13 +133,13 @@ In this section, we'll talk about a multi-variant feature flag can be used to co Save and rerun the following cURL command: ```shell -curl -X POST "http://localhost:8013/flagd.evaluation.v1.Service/ResolveString" \ +curl -X POST "http://localhost:8013/flagd.evaluation.v2.Service/ResolveString" \ -d '{"flagKey":"background-color","context":{}}' -H "Content-Type: application/json" ``` You should see the updated results: -```json +```jsonc { "value": "#FF0000", "reason": "STATIC", @@ -156,7 +156,7 @@ This can be accomplished in flagd using targeting rules. Open the `demo.flagd.json` file in a text editor and extend the `background-color` to include a targeting rule. -``` json hl_lines="19-32" +```jsonc hl_lines="19-32" { "$schema": "https://flagd.dev/schema/v0/flags.json", "flags": { @@ -204,13 +204,13 @@ If there isn't a match, the `defaultVariant` is returned. Let's confirm that customers are still seeing the `red` variant by running the following command: ```shell -curl -X POST "http://localhost:8013/flagd.evaluation.v1.Service/ResolveString" \ +curl -X POST "http://localhost:8013/flagd.evaluation.v2.Service/ResolveString" \ -d '{"flagKey":"background-color","context":{"company": "stark industries"}}' -H "Content-Type: application/json" ``` You should see the updated results: -```json +```jsonc { "value": "#FF0000", "reason": "DEFAULT", @@ -226,13 +226,13 @@ Let's confirm that employees of Initech are seeing the updated variant. Run the following cURL command in the terminal: ```shell -curl -X POST "http://localhost:8013/flagd.evaluation.v1.Service/ResolveString" \ +curl -X POST "http://localhost:8013/flagd.evaluation.v2.Service/ResolveString" \ -d '{"flagKey":"background-color","context":{"company": "initech"}}' -H "Content-Type: application/json" ``` You should see the updated results: -```json +```jsonc { "value": "#00FF00", "reason": "TARGETING_MATCH", diff --git a/docs/reference/cheat-sheet.md b/docs/reference/cheat-sheet.md index 910c89c8b..b9e209fe6 100644 --- a/docs/reference/cheat-sheet.md +++ b/docs/reference/cheat-sheet.md @@ -122,7 +122,7 @@ curl -X POST 'http://localhost:8016/ofrep/v1/evaluate/flags/simple-boolean' Response: -```json +```jsonc { "key": "simple-boolean", "reason": "STATIC", @@ -153,7 +153,7 @@ curl -X POST 'http://localhost:8016/ofrep/v1/evaluate/flags' Response: -```json +```jsonc { "flags": [ {"key": "simple-boolean", "reason": "STATIC", "variant": "on", "value": true, "metadata": {}}, @@ -180,7 +180,7 @@ curl -X POST 'http://localhost:8016/ofrep/v1/evaluate/flags/email-based-feature' Response (email matches `@example.com`): -```json +```jsonc { "key": "email-based-feature", "reason": "TARGETING_MATCH", @@ -312,24 +312,24 @@ PROTO_DIR="flagd-schemas/protobuf/" ```shell # Boolean flag grpcurl -plaintext \ - -import-path "$PROTO_DIR" -proto flagd/evaluation/v1/evaluation.proto \ + -import-path "$PROTO_DIR" -proto flagd/evaluation/v2/evaluation.proto \ -d '{"flagKey": "simple-boolean", "context": {}}' \ localhost:8013 \ - flagd.evaluation.v1.Service/ResolveBoolean + flagd.evaluation.v2.Service/ResolveBoolean # String flag grpcurl -plaintext \ - -import-path "$PROTO_DIR" -proto flagd/evaluation/v1/evaluation.proto \ + -import-path "$PROTO_DIR" -proto flagd/evaluation/v2/evaluation.proto \ -d '{"flagKey": "simple-string", "context": {}}' \ localhost:8013 \ - flagd.evaluation.v1.Service/ResolveString + flagd.evaluation.v2.Service/ResolveString # With context grpcurl -plaintext \ - -import-path "$PROTO_DIR" -proto flagd/evaluation/v1/evaluation.proto \ + -import-path "$PROTO_DIR" -proto flagd/evaluation/v2/evaluation.proto \ -d '{"flagKey": "user-tier-flag", "context": {"tier": "enterprise"}}' \ localhost:8013 \ - flagd.evaluation.v1.Service/ResolveString + flagd.evaluation.v2.Service/ResolveString ``` ### Evaluate All Flags @@ -349,11 +349,11 @@ Filter which flags are evaluated using the `Flagd-Selector` header: ```shell # Evaluate only flags from the app flag set grpcurl -plaintext \ - -import-path "$PROTO_DIR" -proto flagd/evaluation/v1/evaluation.proto \ + -import-path "$PROTO_DIR" -proto flagd/evaluation/v2/evaluation.proto \ -H 'Flagd-Selector: flagSetId=app-flags' \ -d '{"flagKey": "simple-boolean", "context": {}}' \ localhost:8013 \ - flagd.evaluation.v1.Service/ResolveBoolean + flagd.evaluation.v2.Service/ResolveBoolean # ResolveAll with selector grpcurl -plaintext \ @@ -391,7 +391,7 @@ grpcurl -plaintext \ Response contains the complete flag configuration JSON: -```json +```jsonc { "flagConfiguration": "{\"flags\":{\"simple-boolean\":{...}}}" } diff --git a/docs/reference/flag-definitions.md b/docs/reference/flag-definitions.md index a796d99e2..cadbc25de 100644 --- a/docs/reference/flag-definitions.md +++ b/docs/reference/flag-definitions.md @@ -9,7 +9,7 @@ description: flagd flag definition `flags` is a **required** property. The flags property is a top-level property that contains a collection of individual flags and their corresponding flag configurations. -```json +```jsonc { "$schema": "https://flagd.dev/schema/v0/flags.json", "flags": { @@ -24,7 +24,7 @@ The flags property is a top-level property that contains a collection of individ The flag key **must** uniquely identify a flag so it can be used during flag evaluation. The flag key **should** convey the intent of the flag. -```json +```jsonc { "$schema": "https://flagd.dev/schema/v0/flags.json", "flags": { @@ -39,7 +39,7 @@ The flag key **should** convey the intent of the flag. A fully configured flag may look like this. -```json +```jsonc { "$schema": "https://flagd.dev/schema/v0/flags.json", "flags": { @@ -79,7 +79,7 @@ When the state is set to "DISABLED", flagd will behave like the flag doesn't exi Example: -```json +```jsonc "state": "ENABLED" ``` @@ -94,7 +94,7 @@ If another path, such as `/flagd.evaluation.v1.Service/ResolveString` is called, Example: -```json +```jsonc "variants": { "red": "c05543", "green": "2f5230", @@ -104,7 +104,7 @@ Example: Example: -```json +```jsonc "variants": { "on": true, "off": false @@ -113,7 +113,7 @@ Example: Example of an invalid configuration: -```json +```jsonc "variants": { "on": true, "off": "false" @@ -125,11 +125,21 @@ Example of an invalid configuration: `defaultVariant` is an **optional** property. If `defaultVariant` is a string, its value **must** match the name of one of the variants defined above. The default variant is used unless a targeting rule explicitly overrides it. -If `defaultVariant` is omitted or null, flagd providers will revert to the code default for the flag in question if targeting is not defined or falls through. -Example: +!!! note + + In previous versions of flagd, when `defaultVariant` was omitted, flagd would behave as if the flag does not exist, returning `reason=ERROR` and `error=FLAG_NOT_FOUND`. flagd now gracefully falls back to the code-defined default value when `defaultVariant` is omitted or set to `null`. This change allows users to define their own default values in code, providing more flexibility for feature flag implementations. + +If `defaultVariant` is omitted or set to `null`, flagd will gracefully fall back to the code-defined default value. +In this case, the evaluation response will: -```json +- Use reason code "DEFAULT" +- Omit the `value` and `variant` fields +- Allow the client to use its code-defined default value + +Example with explicit default: + +```jsonc "variants": { "on": true, "off": false @@ -137,9 +147,9 @@ Example: "defaultVariant": "off" ``` -Example: +Example with explicit default (string variants): -```json +```jsonc "variants": { "red": "c05543", "green": "2f5230", @@ -148,9 +158,9 @@ Example: "defaultVariant": "red" ``` -Example of explicitly using the code default: +Example using code default (explicit null): -```json +```jsonc "variants": { "on": true, "off": false @@ -158,9 +168,19 @@ Example of explicitly using the code default: "defaultVariant": null ``` +Example using code default (absent defaultVariant): + +```jsonc +"variants": { + "on": true, + "off": false +} +// defaultVariant omitted - also uses code default +``` + Example of an invalid configuration: -```json +```jsonc "variants": { "red": "c05543", "green": "2f5230", @@ -169,6 +189,29 @@ Example of an invalid configuration: "defaultVariant": "purple" ``` +#### Resolution Format + +When a configured default variant is used: + +```jsonc +{ + "value": false, + "reason": "DEFAULT", + "variant": "off", + "metadata": {} +} +``` + +When code default is used (`defaultVariant: null` or omitted): + +```jsonc +{ + "reason": "DEFAULT", + "metadata": {} + // Note: value and variant fields are omitted +} +``` + ### Targeting Rules `targeting` is an **optional** property. @@ -185,11 +228,6 @@ This can be useful for conditionally "exiting" targeting rules and falling back If an invalid variant is returned (not a string, `true`, or `false`, or a string that is not in the set of variants) the evaluation is considered erroneous. If `defaultVariant` is not defined or is `null`, and no variant is resolved from `targeting`, flagd providers will revert to the code default. -!!! note - - When `defaultVariant` is omitted, and no variant is resolved from a rule, providers default by behaving as if the flag does not exist (`reason=ERROR` and `error=FLAG_NOT_FOUND`). - This will be improved in upcoming versions, such that delegation to code default in this scenario will not be considered erroneous. - See [Boolean Variant Shorthand](#boolean-variant-shorthand). #### Evaluation Context @@ -212,7 +250,7 @@ flagd supports three sources of evaluation context: Context included as part of the evaluation request. For example, when accessing flagd via HTTP, the POST body may look like this: -```json +```jsonc { "flagKey": "booleanFlagKey", "context": { @@ -360,7 +398,7 @@ Consistent with built-in JsonLogic operators, flagd's custom operators return fa flagd and flagd providers map the [targeting key](https://openfeature.dev/specification/glossary#targeting-key) into the `"targetingKey"` property of the context used in rules. For example, if the targeting key for a particular evaluation was set to `"5c3d8535-f81a-4478-a6d3-afaa4d51199e"`, the following expression would evaluate to `true`: -```json +```jsonc "==": [ { "var": "targetingKey" @@ -385,7 +423,7 @@ It's a collection of shared targeting configurations used to reduce the number o Example: -```json +```jsonc { "$schema": "https://flagd.dev/schema/v0/flags.json", "flags": { @@ -462,7 +500,7 @@ Since rules that return `true` or `false` map to the variant indexed by the equi For example, this: -```json +```jsonc { "$schema": "https://flagd.dev/schema/v0/flags.json", "flags": { @@ -487,7 +525,7 @@ For example, this: can be shortened to this: -```json +```jsonc { "$schema": "https://flagd.dev/schema/v0/flags.json", "flags": { diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 4ab0cdd2c..48a283256 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -24,7 +24,7 @@ Why is my `int` response a `string`? Command: ```sh -curl -X POST "localhost:8013/flagd.evaluation.v1.Service/ResolveInt" -d '{"flagKey":"myIntFlag","context":{}}' -H "Content-Type: application/json" +curl -X POST "localhost:8013/flagd.evaluation.v2.Service/ResolveInt" -d '{"flagKey":"myIntFlag","context":{}}' -H "Content-Type: application/json" ``` Result: @@ -40,7 +40,7 @@ If a number value is required, and none of the provided SDK's can be used, then Command: ```sh -curl -X POST "localhost:8013/flagd.evaluation.v1.Service/ResolveFloat" -d '{"flagKey":"myIntFlag","context":{}}' -H "Content-Type: application/json" +curl -X POST "localhost:8013/flagd.evaluation.v2.Service/ResolveFloat" -d '{"flagKey":"myIntFlag","context":{}}' -H "Content-Type: application/json" ``` Result: @@ -113,3 +113,40 @@ curl -H "Flagd-Selector: flagSetId=my-app" \ http://localhost:8014/ofrep/v1/evaluate/flags # Check response metadata to see parsed selector ``` + +--- + +## Variant/value not included in response + +When you see that `value` and `variant` fields are missing from flag evaluation responses, it indicates that flagd is delegating to the code-defined default value. This is the expected behavior when `defaultVariant` is set to `null` or omitted. + +### Configured Default + +When a flag has an explicit `defaultVariant` configured: + +```json +{ + "value": false, + "reason": "DEFAULT", + "variant": "off", + "metadata": {} +} +``` + +This means the configured default variant was used because no targeting rule matched. + +### Code Default + +When a flag has `defaultVariant: null` or no `defaultVariant` is defined: + +```json +{ + "reason": "DEFAULT", + "metadata": {} + // Note: value and variant fields are omitted +} +``` + +This indicates that flagd is delegating to the code-defined default value. The absence of `value` and `variant` fields signals to the client SDK to use its code default. + +For more information about code defaults, see [Code Defaults](./concepts/feature-flagging.md#code-defaults). diff --git a/playground-app/package-lock.json b/playground-app/package-lock.json index f0f894e08..9a120b4ab 100644 --- a/playground-app/package-lock.json +++ b/playground-app/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0", "dependencies": { "@monaco-editor/react": "^4.7.0-rc.0", - "@openfeature/flagd-core": "^1.0.0", + "@openfeature/flagd-core": "^2.0.0", "js-yaml": "^4.1.1", "react": "^19.0.0", "react-dom": "^19.0.0", @@ -43,14 +43,15 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", + "@babel/helper-validator-identifier": "^7.28.5", "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" @@ -185,19 +186,21 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", - "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -212,25 +215,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", - "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.6.tgz", + "integrity": "sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/template": "^7.25.9", - "@babel/types": "^7.26.0" + "@babel/template": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.3.tgz", - "integrity": "sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.0.tgz", + "integrity": "sha512-IyDgFV5GeDUVX4YdF/3CPULtVGSXXMLh1xVIgdCgxApktqnQV0r7/8Nqthg+8YLGaAtdyIlo2qIdZrbCv4+7ww==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.26.3" + "@babel/types": "^7.29.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -270,25 +275,24 @@ } }, "node_modules/@babel/runtime": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", - "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz", + "integrity": "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==", + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/template": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", - "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.25.9", - "@babel/parser": "^7.25.9", - "@babel/types": "^7.25.9" + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -313,26 +317,28 @@ } }, "node_modules/@babel/types": { - "version": "7.26.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.3.tgz", - "integrity": "sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", - "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "aix" @@ -342,13 +348,14 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.2.tgz", - "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -358,13 +365,14 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", - "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -374,13 +382,14 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.2.tgz", - "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -390,13 +399,14 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", - "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -406,13 +416,14 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", - "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -422,13 +433,14 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", - "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -438,13 +450,14 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", - "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -454,13 +467,14 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", - "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -470,13 +484,14 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", - "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -486,13 +501,14 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", - "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -502,13 +518,14 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", - "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", "cpu": [ "loong64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -518,13 +535,14 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", - "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", "cpu": [ "mips64el" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -534,13 +552,14 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", - "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -550,13 +569,14 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", - "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -566,13 +586,14 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", - "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", "cpu": [ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -582,13 +603,14 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", - "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -598,13 +620,14 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz", - "integrity": "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "netbsd" @@ -614,13 +637,14 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", - "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "netbsd" @@ -630,13 +654,14 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz", - "integrity": "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "openbsd" @@ -646,13 +671,14 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", - "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "openbsd" @@ -661,14 +687,32 @@ "node": ">=18" } }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/sunos-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", - "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "sunos" @@ -678,13 +722,14 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", - "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -694,13 +739,14 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", - "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -710,13 +756,14 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", - "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -726,10 +773,11 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", - "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", "dev": true, + "license": "MIT", "dependencies": { "eslint-visitor-keys": "^3.4.3" }, @@ -753,34 +801,37 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.1.tgz", - "integrity": "sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==", + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.2.tgz", + "integrity": "sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@eslint/object-schema": "^2.1.5", + "@eslint/object-schema": "^2.1.7", "debug": "^4.3.1", - "minimatch": "^3.1.2" + "minimatch": "^3.1.5" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "node_modules/@eslint/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -788,11 +839,25 @@ "node": "*" } }, + "node_modules/@eslint/config-helpers": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/core": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.1.tgz", - "integrity": "sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.15" }, @@ -801,19 +866,20 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", - "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.5.tgz", + "integrity": "sha512-4IlJx0X0qftVsN5E+/vGujTRIFtwuLbNsVUe7TO6zYPDR1O6nFwvwhIKEKSrl6dZchmYBITazxKoUYOjdtjlRg==", "dev": true, + "license": "MIT", "dependencies": { - "ajv": "^6.12.4", + "ajv": "^6.14.0", "debug": "^4.3.2", "espree": "^10.0.1", "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", + "js-yaml": "^4.1.1", + "minimatch": "^3.1.5", "strip-json-comments": "^3.1.1" }, "engines": { @@ -823,27 +889,12 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -854,6 +905,7 @@ "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=18" }, @@ -861,17 +913,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -880,29 +927,36 @@ } }, "node_modules/@eslint/js": { - "version": "9.17.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz", - "integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==", + "version": "9.39.4", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.4.tgz", + "integrity": "sha512-nE7DEIchvtiFTwBw4Lfbu59PG+kCofhjsKaCWzxTpt4lfRjRMqG6uMBzKXuEcyXhOHoUp9riAm7/aWYGhXZ9cw==", "dev": true, + "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" } }, "node_modules/@eslint/object-schema": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.5.tgz", - "integrity": "sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==", + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz", - "integrity": "sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", "dev": true, + "license": "Apache-2.0", "dependencies": { + "@eslint/core": "^0.17.0", "levn": "^0.4.1" }, "engines": { @@ -958,10 +1012,11 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", - "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=18.18" }, @@ -1083,263 +1138,365 @@ "peer": true }, "node_modules/@openfeature/flagd-core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@openfeature/flagd-core/-/flagd-core-1.0.0.tgz", - "integrity": "sha512-JoaiDfQHgD15shkD5i/I+bpssvqqIwu2dkXMgQ8PfG/keYITCvNFIbxyqPKn+nAX9DR0Zp0P+spJTXtyxLMikw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@openfeature/flagd-core/-/flagd-core-2.0.0.tgz", + "integrity": "sha512-9H3FOFQTtQ/I1sOKTwowXMJg+qYisWZMebfkJb35q/V9dOIkKEdvC5MAmoLn7OF0JfpuMteQLuBJ08R133Mpog==", + "license": "Apache-2.0", "dependencies": { - "ajv": "^8.12.0", - "imurmurhash": "0.1.4", - "json-logic-engine": "4.0.2", - "object-hash": "3.0.0", - "semver": "7.5.3", - "tslib": "^2.3.0" + "imurmurhash": "^0.1.4", + "json-logic-engine": "^4.0.2", + "object-hash": "^3.0.0", + "semver": "^7.6.3" }, "peerDependencies": { "@openfeature/core": ">=1.6.0" } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.30.1.tgz", - "integrity": "sha512-pSWY+EVt3rJ9fQ3IqlrEUtXh3cGqGtPDH1FQlNZehO2yYxCHEX1SPsz1M//NXwYfbTlcKr9WObLnJX9FsS9K1Q==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.59.0.tgz", + "integrity": "sha512-upnNBkA6ZH2VKGcBj9Fyl9IGNPULcjXRlg0LLeaioQWueH30p6IXtJEbKAgvyv+mJaMxSm1l6xwDXYjpEMiLMg==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.30.1.tgz", - "integrity": "sha512-/NA2qXxE3D/BRjOJM8wQblmArQq1YoBVJjrjoTSBS09jgUisq7bqxNHJ8kjCHeV21W/9WDGwJEWSN0KQ2mtD/w==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.59.0.tgz", + "integrity": "sha512-hZ+Zxj3SySm4A/DylsDKZAeVg0mvi++0PYVceVyX7hemkw7OreKdCvW2oQ3T1FMZvCaQXqOTHb8qmBShoqk69Q==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.30.1.tgz", - "integrity": "sha512-r7FQIXD7gB0WJ5mokTUgUWPl0eYIH0wnxqeSAhuIwvnnpjdVB8cRRClyKLQr7lgzjctkbp5KmswWszlwYln03Q==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.59.0.tgz", + "integrity": "sha512-W2Psnbh1J8ZJw0xKAd8zdNgF9HRLkdWwwdWqubSVk0pUuQkoHnv7rx4GiF9rT4t5DIZGAsConRE3AxCdJ4m8rg==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.30.1.tgz", - "integrity": "sha512-x78BavIwSH6sqfP2xeI1hd1GpHL8J4W2BXcVM/5KYKoAD3nNsfitQhvWSw+TFtQTLZ9OmlF+FEInEHyubut2OA==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.59.0.tgz", + "integrity": "sha512-ZW2KkwlS4lwTv7ZVsYDiARfFCnSGhzYPdiOU4IM2fDbL+QGlyAbjgSFuqNRbSthybLbIJ915UtZBtmuLrQAT/w==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.30.1.tgz", - "integrity": "sha512-HYTlUAjbO1z8ywxsDFWADfTRfTIIy/oUlfIDmlHYmjUP2QRDTzBuWXc9O4CXM+bo9qfiCclmHk1x4ogBjOUpUQ==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.59.0.tgz", + "integrity": "sha512-EsKaJ5ytAu9jI3lonzn3BgG8iRBjV4LxZexygcQbpiU0wU0ATxhNVEpXKfUa0pS05gTcSDMKpn3Sx+QB9RlTTA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.30.1.tgz", - "integrity": "sha512-1MEdGqogQLccphhX5myCJqeGNYTNcmTyaic9S7CG3JhwuIByJ7J05vGbZxsizQthP1xpVx7kd3o31eOogfEirw==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.59.0.tgz", + "integrity": "sha512-d3DuZi2KzTMjImrxoHIAODUZYoUUMsuUiY4SRRcJy6NJoZ6iIqWnJu9IScV9jXysyGMVuW+KNzZvBLOcpdl3Vg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.30.1.tgz", - "integrity": "sha512-PaMRNBSqCx7K3Wc9QZkFx5+CX27WFpAMxJNiYGAXfmMIKC7jstlr32UhTgK6T07OtqR+wYlWm9IxzennjnvdJg==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.59.0.tgz", + "integrity": "sha512-t4ONHboXi/3E0rT6OZl1pKbl2Vgxf9vJfWgmUoCEVQVxhW6Cw/c8I6hbbu7DAvgp82RKiH7TpLwxnJeKv2pbsw==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.30.1.tgz", - "integrity": "sha512-B8Rcyj9AV7ZlEFqvB5BubG5iO6ANDsRKlhIxySXcF1axXYUyqwBok+XZPgIYGBgs7LDXfWfifxhw0Ik57T0Yug==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.59.0.tgz", + "integrity": "sha512-CikFT7aYPA2ufMD086cVORBYGHffBo4K8MQ4uPS/ZnY54GKj36i196u8U+aDVT2LX4eSMbyHtyOh7D7Zvk2VvA==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.30.1.tgz", - "integrity": "sha512-hqVyueGxAj3cBKrAI4aFHLV+h0Lv5VgWZs9CUGqr1z0fZtlADVV1YPOij6AhcK5An33EXaxnDLmJdQikcn5NEw==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.59.0.tgz", + "integrity": "sha512-jYgUGk5aLd1nUb1CtQ8E+t5JhLc9x5WdBKew9ZgAXg7DBk0ZHErLHdXM24rfX+bKrFe+Xp5YuJo54I5HFjGDAA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.30.1.tgz", - "integrity": "sha512-i4Ab2vnvS1AE1PyOIGp2kXni69gU2DAUVt6FSXeIqUCPIR3ZlheMW3oP2JkukDfu3PsexYRbOiJrY+yVNSk9oA==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.59.0.tgz", + "integrity": "sha512-peZRVEdnFWZ5Bh2KeumKG9ty7aCXzzEsHShOZEFiCQlDEepP1dpUl/SrUNXNg13UmZl+gzVDPsiCwnV1uI0RUA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, - "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.30.1.tgz", - "integrity": "sha512-fARcF5g296snX0oLGkVxPmysetwUk2zmHcca+e9ObOovBR++9ZPOhqFUM61UUZ2EYpXVPN1redgqVoBB34nTpQ==", + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.59.0.tgz", + "integrity": "sha512-gbUSW/97f7+r4gHy3Jlup8zDG190AuodsWnNiXErp9mT90iCy9NKKU0Xwx5k8VlRAIV2uU9CsMnEFg/xXaOfXg==", "cpu": [ "loong64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.30.1.tgz", - "integrity": "sha512-GLrZraoO3wVT4uFXh67ElpwQY0DIygxdv0BNW9Hkm3X34wu+BkqrDrkcsIapAY+N2ATEbvak0XQ9gxZtCIA5Rw==", + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.59.0.tgz", + "integrity": "sha512-yTRONe79E+o0FWFijasoTjtzG9EBedFXJMl888NBEDCDV9I2wGbFFfJQQe63OijbFCUZqxpHz1GzpbtSFikJ4Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.59.0.tgz", + "integrity": "sha512-sw1o3tfyk12k3OEpRddF68a1unZ5VCN7zoTNtSn2KndUE+ea3m3ROOKRCZxEpmT9nsGnogpFP9x6mnLTCaoLkA==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.59.0.tgz", + "integrity": "sha512-+2kLtQ4xT3AiIxkzFVFXfsmlZiG5FXYW7ZyIIvGA7Bdeuh9Z0aN4hVyXS/G1E9bTP/vqszNIN/pUKCk/BTHsKA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.30.1.tgz", - "integrity": "sha512-0WKLaAUUHKBtll0wvOmh6yh3S0wSU9+yas923JIChfxOaaBarmb/lBKPF0w/+jTVozFnOXJeRGZ8NvOxvk/jcw==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.59.0.tgz", + "integrity": "sha512-NDYMpsXYJJaj+I7UdwIuHHNxXZ/b/N2hR15NyH3m2qAtb/hHPA4g4SuuvrdxetTdndfj9b1WOmy73kcPRoERUg==", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.59.0.tgz", + "integrity": "sha512-nLckB8WOqHIf1bhymk+oHxvM9D3tyPndZH8i8+35p/1YiVoVswPid2yLzgX7ZJP0KQvnkhM4H6QZ5m0LzbyIAg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.30.1.tgz", - "integrity": "sha512-GWFs97Ruxo5Bt+cvVTQkOJ6TIx0xJDD/bMAOXWJg8TCSTEK8RnFeOeiFTxKniTc4vMIaWvCplMAFBt9miGxgkA==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.59.0.tgz", + "integrity": "sha512-oF87Ie3uAIvORFBpwnCvUzdeYUqi2wY6jRFWJAy1qus/udHFYIkplYRW+wo+GRUP4sKzYdmE1Y3+rY5Gc4ZO+w==", "cpu": [ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.30.1.tgz", - "integrity": "sha512-UtgGb7QGgXDIO+tqqJ5oZRGHsDLO8SlpE4MhqpY9Llpzi5rJMvrK6ZGhsRCST2abZdBqIBeXW6WPD5fGK5SDwg==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.59.0.tgz", + "integrity": "sha512-3AHmtQq/ppNuUspKAlvA8HtLybkDflkMuLK4DPo77DfthRb71V84/c4MlWJXixZz4uruIH4uaa07IqoAkG64fg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.30.1.tgz", - "integrity": "sha512-V9U8Ey2UqmQsBT+xTOeMzPzwDzyXmnAoO4edZhL7INkwQcaW1Ckv3WJX3qrrp/VHaDkEWIBWhRwP47r8cdrOow==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.59.0.tgz", + "integrity": "sha512-2UdiwS/9cTAx7qIUZB/fWtToJwvt0Vbo0zmnYt7ED35KPg13Q0ym1g442THLC7VyI6JfYTP4PiSOWyoMdV2/xg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.59.0.tgz", + "integrity": "sha512-M3bLRAVk6GOwFlPTIxVBSYKUaqfLrn8l0psKinkCFxl4lQvOSz8ZrKDz2gxcBwHFpci0B6rttydI4IpS4IS/jQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.59.0.tgz", + "integrity": "sha512-tt9KBJqaqp5i5HUZzoafHZX8b5Q2Fe7UjYERADll83O4fGqJ49O1FsL6LpdzVFQcpwvnyd0i+K/VSwu/o/nWlA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.30.1.tgz", - "integrity": "sha512-WabtHWiPaFF47W3PkHnjbmWawnX/aE57K47ZDT1BXTS5GgrBUEpvOzq0FI0V/UYzQJgdb8XlhVNH8/fwV8xDjw==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.59.0.tgz", + "integrity": "sha512-V5B6mG7OrGTwnxaNUzZTDTjDS7F75PO1ae6MJYdiMu60sq0CqN5CVeVsbhPxalupvTX8gXVSU9gq+Rx1/hvu6A==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.30.1.tgz", - "integrity": "sha512-pxHAU+Zv39hLUTdQQHUVHf4P+0C47y/ZloorHpzs2SXMRqeAWmGghzAhfOlzFHHwjvgokdFAhC4V+6kC1lRRfw==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.59.0.tgz", + "integrity": "sha512-UKFMHPuM9R0iBegwzKF4y0C4J9u8C6MEJgFuXTBerMk7EJ92GFVFYBfOZaSGLu6COf7FxpQNqhNS4c4icUPqxA==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.59.0.tgz", + "integrity": "sha512-laBkYlSS1n2L8fSo1thDNGrCTQMmxjYY5G0WFWjFFYZkKPjsMBsgJfGf4TLxXrF6RyhI60L8TMOjBMvXiTcxeA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.30.1.tgz", - "integrity": "sha512-D6qjsXGcvhTjv0kI4fU8tUuBDF/Ueee4SVX79VfNDXZa64TfCW1Slkb6Z7O1p7vflqZjcmOVdZlqf8gvJxc6og==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.59.0.tgz", + "integrity": "sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -1387,10 +1544,11 @@ } }, "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" }, "node_modules/@types/js-cookie": { "version": "2.2.7", @@ -1408,7 +1566,8 @@ "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/react": { "version": "19.0.3", @@ -1560,18 +1719,6 @@ "typescript": ">=4.8.4 <5.8.0" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@typescript-eslint/utils": { "version": "8.19.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.19.1.tgz", @@ -1649,10 +1796,11 @@ "integrity": "sha512-N8tkAACJx2ww8vFMneJmaAgmjAG1tnVBZJRLRcx061tmsLRZHSEZSLuGWnwPtunsSLvSqXQ2wfp7Mgqg1I+2dQ==" }, "node_modules/acorn": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -1665,19 +1813,22 @@ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", + "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", + "dev": true, + "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" }, "funding": { "type": "github", @@ -1711,10 +1862,11 @@ "dev": true }, "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -1768,6 +1920,7 @@ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -1830,7 +1983,8 @@ "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/convert-source-map": { "version": "2.0.0", @@ -1923,11 +2077,12 @@ } }, "node_modules/esbuild": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", - "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", "dev": true, "hasInstallScript": true, + "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -1935,31 +2090,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.2", - "@esbuild/android-arm": "0.24.2", - "@esbuild/android-arm64": "0.24.2", - "@esbuild/android-x64": "0.24.2", - "@esbuild/darwin-arm64": "0.24.2", - "@esbuild/darwin-x64": "0.24.2", - "@esbuild/freebsd-arm64": "0.24.2", - "@esbuild/freebsd-x64": "0.24.2", - "@esbuild/linux-arm": "0.24.2", - "@esbuild/linux-arm64": "0.24.2", - "@esbuild/linux-ia32": "0.24.2", - "@esbuild/linux-loong64": "0.24.2", - "@esbuild/linux-mips64el": "0.24.2", - "@esbuild/linux-ppc64": "0.24.2", - "@esbuild/linux-riscv64": "0.24.2", - "@esbuild/linux-s390x": "0.24.2", - "@esbuild/linux-x64": "0.24.2", - "@esbuild/netbsd-arm64": "0.24.2", - "@esbuild/netbsd-x64": "0.24.2", - "@esbuild/openbsd-arm64": "0.24.2", - "@esbuild/openbsd-x64": "0.24.2", - "@esbuild/sunos-x64": "0.24.2", - "@esbuild/win32-arm64": "0.24.2", - "@esbuild/win32-ia32": "0.24.2", - "@esbuild/win32-x64": "0.24.2" + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" } }, "node_modules/escalade": { @@ -1984,31 +2140,32 @@ } }, "node_modules/eslint": { - "version": "9.17.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.17.0.tgz", - "integrity": "sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA==", + "version": "9.39.4", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.4.tgz", + "integrity": "sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ==", "dev": true, + "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.19.0", - "@eslint/core": "^0.9.0", - "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "9.17.0", - "@eslint/plugin-kit": "^0.2.3", + "@eslint/config-array": "^0.21.2", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", + "@eslint/eslintrc": "^3.3.5", + "@eslint/js": "9.39.4", + "@eslint/plugin-kit": "^0.4.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.1", + "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", - "ajv": "^6.12.4", + "ajv": "^6.14.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.2.0", - "eslint-visitor-keys": "^4.2.0", - "espree": "^10.3.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -2020,7 +2177,7 @@ "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", + "minimatch": "^3.1.5", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, @@ -2064,10 +2221,11 @@ } }, "node_modules/eslint-scope": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", - "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -2091,37 +2249,23 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -2129,17 +2273,12 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -2148,14 +2287,15 @@ } }, "node_modules/espree": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", - "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.14.0", + "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.0" + "eslint-visitor-keys": "^4.2.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2165,10 +2305,11 @@ } }, "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -2193,6 +2334,7 @@ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -2255,7 +2397,8 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", @@ -2268,21 +2411,6 @@ "resolved": "https://registry.npmjs.org/fast-shallow-equal/-/fast-shallow-equal-1.0.0.tgz", "integrity": "sha512-HPtaa38cPgWvaCFmRNhlc6NG7pv6NUHqjPgVAkWGoB9mQMwYB27/K0CvOM5Czy+qpT3e8XJ6Q4aPAnzpNpzNaw==" }, - "node_modules/fast-uri": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.5.tgz", - "integrity": "sha512-5JnBCWpFlMo0a3ciDy/JckMzzv1U9coZrIhedq+HXxxUfDTAiS0LA8OKVao4G9BxmCVck/jtA5r3KAtRWEyD8Q==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fastify" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fastify" - } - ] - }, "node_modules/fastest-stable-stringify": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/fastest-stable-stringify/-/fastest-stable-stringify-2.0.2.tgz", @@ -2362,6 +2490,7 @@ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -2430,10 +2559,11 @@ } }, "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "dev": true, + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -2547,9 +2677,11 @@ } }, "node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -2649,12 +2781,13 @@ } }, "node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, + "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^2.0.2" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -2695,9 +2828,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", - "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", "dev": true, "funding": [ { @@ -2705,6 +2838,7 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -2784,6 +2918,7 @@ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -2828,9 +2963,9 @@ } }, "node_modules/postcss": { - "version": "8.4.49", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", - "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", + "version": "8.5.8", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz", + "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==", "dev": true, "funding": [ { @@ -2846,8 +2981,9 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "nanoid": "^3.3.7", + "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -2869,6 +3005,7 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -2955,19 +3092,6 @@ "react-dom": "*" } }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/resize-observer-polyfill": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", @@ -2978,6 +3102,7 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -2993,12 +3118,13 @@ } }, "node_modules/rollup": { - "version": "4.30.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.30.1.tgz", - "integrity": "sha512-mlJ4glW020fPuLi7DkM/lN97mYEZGWeqBnrljzN0gs7GLctqX3lNWxKQ7Gl712UAX+6fog/L3jh4gb7R6aVi3w==", + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.59.0.tgz", + "integrity": "sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==", "dev": true, + "license": "MIT", "dependencies": { - "@types/estree": "1.0.6" + "@types/estree": "1.0.8" }, "bin": { "rollup": "dist/bin/rollup" @@ -3008,25 +3134,31 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.30.1", - "@rollup/rollup-android-arm64": "4.30.1", - "@rollup/rollup-darwin-arm64": "4.30.1", - "@rollup/rollup-darwin-x64": "4.30.1", - "@rollup/rollup-freebsd-arm64": "4.30.1", - "@rollup/rollup-freebsd-x64": "4.30.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.30.1", - "@rollup/rollup-linux-arm-musleabihf": "4.30.1", - "@rollup/rollup-linux-arm64-gnu": "4.30.1", - "@rollup/rollup-linux-arm64-musl": "4.30.1", - "@rollup/rollup-linux-loongarch64-gnu": "4.30.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.30.1", - "@rollup/rollup-linux-riscv64-gnu": "4.30.1", - "@rollup/rollup-linux-s390x-gnu": "4.30.1", - "@rollup/rollup-linux-x64-gnu": "4.30.1", - "@rollup/rollup-linux-x64-musl": "4.30.1", - "@rollup/rollup-win32-arm64-msvc": "4.30.1", - "@rollup/rollup-win32-ia32-msvc": "4.30.1", - "@rollup/rollup-win32-x64-msvc": "4.30.1", + "@rollup/rollup-android-arm-eabi": "4.59.0", + "@rollup/rollup-android-arm64": "4.59.0", + "@rollup/rollup-darwin-arm64": "4.59.0", + "@rollup/rollup-darwin-x64": "4.59.0", + "@rollup/rollup-freebsd-arm64": "4.59.0", + "@rollup/rollup-freebsd-x64": "4.59.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.59.0", + "@rollup/rollup-linux-arm-musleabihf": "4.59.0", + "@rollup/rollup-linux-arm64-gnu": "4.59.0", + "@rollup/rollup-linux-arm64-musl": "4.59.0", + "@rollup/rollup-linux-loong64-gnu": "4.59.0", + "@rollup/rollup-linux-loong64-musl": "4.59.0", + "@rollup/rollup-linux-ppc64-gnu": "4.59.0", + "@rollup/rollup-linux-ppc64-musl": "4.59.0", + "@rollup/rollup-linux-riscv64-gnu": "4.59.0", + "@rollup/rollup-linux-riscv64-musl": "4.59.0", + "@rollup/rollup-linux-s390x-gnu": "4.59.0", + "@rollup/rollup-linux-x64-gnu": "4.59.0", + "@rollup/rollup-linux-x64-musl": "4.59.0", + "@rollup/rollup-openbsd-x64": "4.59.0", + "@rollup/rollup-openharmony-arm64": "4.59.0", + "@rollup/rollup-win32-arm64-msvc": "4.59.0", + "@rollup/rollup-win32-ia32-msvc": "4.59.0", + "@rollup/rollup-win32-x64-gnu": "4.59.0", + "@rollup/rollup-win32-x64-msvc": "4.59.0", "fsevents": "~2.3.2" } }, @@ -3078,12 +3210,10 @@ } }, "node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -3091,22 +3221,6 @@ "node": ">=10" } }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, "node_modules/set-harmonic-interval": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/set-harmonic-interval/-/set-harmonic-interval-1.0.1.tgz", @@ -3149,6 +3263,7 @@ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -3203,6 +3318,7 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -3235,6 +3351,54 @@ "node": ">=10" } }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -3334,19 +3498,24 @@ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, "node_modules/vite": { - "version": "6.0.7", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.0.7.tgz", - "integrity": "sha512-RDt8r/7qx9940f8FcOIAH9PTViRrghKaK2K1jY3RaAURrEUbm9Du1mJ72G+jlhtG3WwodnfzY8ORQZbBavZEAQ==", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", + "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", "dev": true, + "license": "MIT", "dependencies": { - "esbuild": "^0.24.2", - "postcss": "^8.4.49", - "rollup": "^4.23.0" + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" }, "bin": { "vite": "bin/vite.js" @@ -3409,6 +3578,37 @@ } } }, + "node_modules/vite/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/playground-app/package.json b/playground-app/package.json index 6a41d8c94..09a4243b9 100644 --- a/playground-app/package.json +++ b/playground-app/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@monaco-editor/react": "^4.7.0-rc.0", - "@openfeature/flagd-core": "^1.0.0", + "@openfeature/flagd-core": "^2.0.0", "js-yaml": "^4.1.1", "react": "^19.0.0", "react-dom": "^19.0.0", diff --git a/playground-app/src/App.tsx b/playground-app/src/App.tsx index 994a474b9..11816b283 100644 --- a/playground-app/src/App.tsx +++ b/playground-app/src/App.tsx @@ -63,6 +63,8 @@ function App() { const [returnType, setReturnType] = useState( scenarios[selectedTemplate].returnType ); + const [codeDefault, setCodeDefault] = useState(scenarios[selectedTemplate].codeDefault); + const [outputCodeDefault, setOutputCodeDefault] = useState(null); const [evaluationContext, setEvaluationContext] = useState( getString(scenarios[selectedTemplate].context) ); @@ -108,6 +110,7 @@ function App() { setFeatureDefinitionLanguage(LANG_JSON); setFlagKey(template.flagKey); setReturnType(template.returnType); + setCodeDefault(template.codeDefault); setEvaluationContext(getString(template.context)); setDescription(template.description); setValidFeatureDefinition(true); @@ -170,6 +173,7 @@ function App() { const flagsParam = urlParams.get('flags'); const flagKeyParam = urlParams.get('flag-key'); const returnTypeParam = urlParams.get('return-type'); + const codeDefaultParam = urlParams.get('code-default'); const evalContextParam = urlParams.get('eval-context'); const langParam = urlParams.get('lang'); const scenarioParam = urlParams.get('scenario-name'); @@ -185,6 +189,7 @@ function App() { setFeatureDefinitionLanguage(lang); if (flagKeyParam) setFlagKey(flagKeyParam); if (returnTypeParam) setReturnType(returnTypeParam as FlagValueType); + if (codeDefaultParam) setCodeDefault(codeDefaultParam); if (evalContextParam) { const formattedEvaluationContext = formatJson(evalContextParam); setEvaluationContext(formattedEvaluationContext); @@ -199,16 +204,37 @@ function App() { } }, []); +// Helper function to parse codeDefault string to the appropriate type based on returnType +function parseCodeDefault(codeDefault: string, returnType: FlagValueType): any { + switch (returnType) { + case "boolean": + return codeDefault === "true" || codeDefault === "True" || codeDefault === "TRUE"; + case "number": + const num = parseFloat(codeDefault); + return isNaN(num) ? 0 : num; + case "object": + try { + return JSON.parse(codeDefault); + } catch { + return {}; + } + case "string": + default: + return codeDefault; + } +} + const evaluate = () => { setShowOutput(true); try { let result; const context = JSON.parse(evaluationContext); + const parsedCodeDefault = parseCodeDefault(codeDefault, returnType); switch (returnType) { case "boolean": result = flagdCore.resolveBooleanEvaluation( flagKey, - false, + parsedCodeDefault, context, console ); @@ -216,7 +242,7 @@ function App() { case "string": result = flagdCore.resolveStringEvaluation( flagKey, - "", + parsedCodeDefault, context, console ); @@ -224,7 +250,7 @@ function App() { case "number": result = flagdCore.resolveNumberEvaluation( flagKey, - 0, + parsedCodeDefault, context, console ); @@ -232,13 +258,20 @@ function App() { case "object": result = flagdCore.resolveObjectEvaluation( flagKey, - {}, + parsedCodeDefault, context, console ); break; } + + // If there's no variant, set value to undefined and use codeDefault + if (!result.variant) { + result.value = undefined; + } + setStatus("success"); + setOutputCodeDefault(codeDefault); setOutput(JSON.stringify(result, null, 2)); } catch (error) { console.error("Invalid JSON input", error); @@ -279,6 +312,7 @@ function App() { newUrl.searchParams.set('flags', encodedFeatureDefinition); newUrl.searchParams.set('flag-key', flagKey); newUrl.searchParams.set('return-type', returnType); + newUrl.searchParams.set('code-default', codeDefault); newUrl.searchParams.set('eval-context', encodedEvaluationContext); newUrl.searchParams.set('lang', featureDefinitionLanguage); } @@ -446,6 +480,24 @@ function App() { +
+

Code default

+ setCodeDefault(e.target.value)} + /> +

+ The default value to use when defaultVariant is null/omitted, or when errors occur during evaluation. +

+

Evaluation context

@@ -503,6 +555,11 @@ function App() { {key}: {JSON.stringify(value)}
))} + {outputCodeDefault && parsedOutput.value === undefined && ( +
+ value: {outputCodeDefault} +
+ )}
) : (

{parsedOutput}

diff --git a/playground-app/src/scenarios/basic-boolean.ts b/playground-app/src/scenarios/basic-boolean.ts index 7bb9bb3a6..b80bfd04f 100644 --- a/playground-app/src/scenarios/basic-boolean.ts +++ b/playground-app/src/scenarios/basic-boolean.ts @@ -22,4 +22,5 @@ export const basicBoolean: Scenario = { flagKey: "basic-boolean", returnType: "boolean", context: contextToPrettyJson({}), + codeDefault: "false", }; diff --git a/playground-app/src/scenarios/basic-number.ts b/playground-app/src/scenarios/basic-number.ts index e40fab31b..38dca4a2a 100644 --- a/playground-app/src/scenarios/basic-number.ts +++ b/playground-app/src/scenarios/basic-number.ts @@ -22,4 +22,5 @@ export const basicNumber: Scenario = { flagKey: "basic-number", returnType: "number", context: contextToPrettyJson({}), + codeDefault: "0", }; diff --git a/playground-app/src/scenarios/basic-object.ts b/playground-app/src/scenarios/basic-object.ts index 23a83c2e5..72af701c3 100644 --- a/playground-app/src/scenarios/basic-object.ts +++ b/playground-app/src/scenarios/basic-object.ts @@ -26,4 +26,5 @@ export const basicObject: Scenario = { flagKey: "basic-object", returnType: "object", context: contextToPrettyJson({}), + codeDefault: "{}", }; diff --git a/playground-app/src/scenarios/basic-string.ts b/playground-app/src/scenarios/basic-string.ts index 09d4f7e38..ad2cab186 100644 --- a/playground-app/src/scenarios/basic-string.ts +++ b/playground-app/src/scenarios/basic-string.ts @@ -22,4 +22,5 @@ export const basicString: Scenario = { flagKey: "basic-string", returnType: "string", context: contextToPrettyJson({}), + codeDefault: "\"\"", }; diff --git a/playground-app/src/scenarios/boolean-shorthand.ts b/playground-app/src/scenarios/boolean-shorthand.ts index b59d1c728..42aa3a110 100644 --- a/playground-app/src/scenarios/boolean-shorthand.ts +++ b/playground-app/src/scenarios/boolean-shorthand.ts @@ -28,4 +28,5 @@ export const booleanShorthand: Scenario = { context: contextToPrettyJson({ age: 20, }), + codeDefault: "false", }; diff --git a/playground-app/src/scenarios/chainable-conditions.ts b/playground-app/src/scenarios/chainable-conditions.ts index e69acbd04..0ed7423e8 100644 --- a/playground-app/src/scenarios/chainable-conditions.ts +++ b/playground-app/src/scenarios/chainable-conditions.ts @@ -36,4 +36,5 @@ export const chainableConditions: Scenario = { targetingKey: "sessionId-123", customerId: "customer-A", }), + codeDefault: "\"\"", }; diff --git a/playground-app/src/scenarios/code-default.ts b/playground-app/src/scenarios/code-default.ts new file mode 100644 index 000000000..43e832521 --- /dev/null +++ b/playground-app/src/scenarios/code-default.ts @@ -0,0 +1,28 @@ +import type { Scenario } from "../types"; +import { contextToPrettyJson, featureDefinitionToPrettyJson } from "../utils"; + +export const codeDefault: Scenario = { + description: [ + "This scenario demonstrates code defaults in flagd. When defaultVariant is omitted or set to null, flagd falls back to the code-defined default value.", + "In this example, the flag has two variants (on and off) with defaultVariant set to null.", + "When evaluated, flagd returns reason=DEFAULT and omits the value and variant fields, allowing the client to use its own code default.", + "Note: Omitting defaultVariant entirely has the same effect as setting it to null - both trigger code default behavior.", + "Compare this with the basic boolean flag which has an explicit defaultVariant set to false.", + ].join(" "), + flagDefinition: featureDefinitionToPrettyJson({ + flags: { + "code-default-flag": { + state: "ENABLED", + variants: { + on: true, + off: false, + }, + defaultVariant: null, + }, + }, + }), + flagKey: "code-default-flag", + returnType: "boolean", + context: contextToPrettyJson({}), + codeDefault: "true", +}; diff --git a/playground-app/src/scenarios/enable-by-domain.ts b/playground-app/src/scenarios/enable-by-domain.ts index bfad82661..802fd85eb 100644 --- a/playground-app/src/scenarios/enable-by-domain.ts +++ b/playground-app/src/scenarios/enable-by-domain.ts @@ -3,7 +3,7 @@ import { contextToPrettyJson, featureDefinitionToPrettyJson } from "../utils"; export const enableByDomain: Scenario = { description: [ - 'In this scenario, we have a feature flag with the key "enable-mainframe-access" that is enabled and has two variants: true and false.', + 'In this scenario, we have a feature flag with the key "enable-mainframe-access" that is enabled and has two variants: on and off.', 'This flag has a targeting rule defined that enables the flag for users with an email address that ends with "@ingen.com".', 'Experiment with changing the email address in the context or in the targeting rule.', ].join(" "), @@ -11,13 +11,13 @@ export const enableByDomain: Scenario = { flags: { "enable-mainframe-access": { state: "ENABLED", - defaultVariant: "false", + defaultVariant: "off", variants: { - true: true, - false: false, + on: true, + off: false, }, targeting: { - if: [{ ends_with: [{ var: "email" }, "@ingen.com"] }, "true"], + if: [{ ends_with: [{ var: "email" }, "@ingen.com"] }, "on"], }, }, }, @@ -27,4 +27,5 @@ export const enableByDomain: Scenario = { context: contextToPrettyJson({ email: "john.arnold@ingen.com", }), + codeDefault: "false", }; diff --git a/playground-app/src/scenarios/enable-by-locale.ts b/playground-app/src/scenarios/enable-by-locale.ts index b46bbebe7..8583321ce 100644 --- a/playground-app/src/scenarios/enable-by-locale.ts +++ b/playground-app/src/scenarios/enable-by-locale.ts @@ -3,7 +3,7 @@ import { contextToPrettyJson, featureDefinitionToPrettyJson } from "../utils"; export const enableByLocale: Scenario = { description: [ - 'In this scenario, we have a feature flag with the key "supports-one-hour-delivery" that is enabled and has two variants: true and false.', + 'In this scenario, we have a feature flag with the key "supports-one-hour-delivery" that is enabled and has two variants: on and off.', 'This flag has a targeting rule defined that enables the flag for users with a locale of "us" or "ca".', 'Experiment with changing the locale in the context or in the locale list in the targeting rule.', ].join(" "), @@ -11,13 +11,13 @@ export const enableByLocale: Scenario = { flags: { "supports-one-hour-delivery": { state: "ENABLED", - defaultVariant: "false", + defaultVariant: "off", variants: { - true: true, - false: false, + on: true, + off: false, }, targeting: { - if: [{ in: [{ var: "locale" }, ["us", "ca"]] }, "true"], + if: [{ in: [{ var: "locale" }, ["us", "ca"]] }, "on"], }, }, }, @@ -27,4 +27,5 @@ export const enableByLocale: Scenario = { }), flagKey: "supports-one-hour-delivery", returnType: "boolean", + codeDefault: "false", }; diff --git a/playground-app/src/scenarios/enable-by-time.ts b/playground-app/src/scenarios/enable-by-time.ts index a192f7495..d14580380 100644 --- a/playground-app/src/scenarios/enable-by-time.ts +++ b/playground-app/src/scenarios/enable-by-time.ts @@ -3,20 +3,20 @@ import { contextToPrettyJson, featureDefinitionToPrettyJson } from "../utils"; export const enableByTime: Scenario = { description: [ - 'In this scenario, we have a feature flag with the key "enable-announcement-banner" that is enabled and has two variants: true and false.', + 'In this scenario, we have a feature flag with the key "enable-announcement-banner" that is enabled and has two variants: on and off.', "This flag has a targeting rule defined that enables the flag after a specified time.", 'The current time (epoch) can be accessed using "$flagd.timestamp" which is automatically provided by flagd.', - 'Five seconds after loading this scenario, the response will change to "true".', + 'Five seconds after loading this scenario, the response will change to "on".', ].join(" "), flagDefinition: () => featureDefinitionToPrettyJson({ flags: { "enable-announcement-banner": { state: "ENABLED", - defaultVariant: "false", + defaultVariant: "off", variants: { - true: true, - false: false, + on: true, + off: false, }, targeting: { if: [ @@ -26,7 +26,7 @@ export const enableByTime: Scenario = { Math.floor(Date.now() / 1000) + 5, ], }, - "true", + "on", ], }, }, @@ -35,4 +35,5 @@ export const enableByTime: Scenario = { flagKey: "enable-announcement-banner", returnType: "boolean", context: () => contextToPrettyJson({}), + codeDefault: "false", }; diff --git a/playground-app/src/scenarios/enable-by-version.ts b/playground-app/src/scenarios/enable-by-version.ts index b7b529ec7..440b9a149 100644 --- a/playground-app/src/scenarios/enable-by-version.ts +++ b/playground-app/src/scenarios/enable-by-version.ts @@ -3,7 +3,7 @@ import { contextToPrettyJson, featureDefinitionToPrettyJson } from "../utils"; export const enableByVersion: Scenario = { description: [ - 'In this scenario, we have a feature flag with the key "enable-performance-mode" that is enabled and has two variants: true and false.', + 'In this scenario, we have a feature flag with the key "enable-performance-mode" that is enabled and has two variants: on and off.', 'This rule looks for the evaluation context "version". If the version is greater or equal to "1.7.0" the feature is enabled.', 'Otherwise, the "defaultVariant" is return. Experiment by changing the version in the context.', ].join(" "), @@ -11,13 +11,13 @@ export const enableByVersion: Scenario = { flags: { "enable-performance-mode": { state: "ENABLED", - defaultVariant: "false", + defaultVariant: "off", variants: { - true: true, - false: false, + on: true, + off: false, }, targeting: { - if: [{ sem_ver: [{ var: "version" }, ">=", "1.7.0"] }, "true"], + if: [{ sem_ver: [{ var: "version" }, ">=", "1.7.0"] }, "on"], }, }, }, @@ -27,4 +27,5 @@ export const enableByVersion: Scenario = { context: contextToPrettyJson({ version: "1.6.0", }), + codeDefault: "false", }; diff --git a/playground-app/src/scenarios/flag-metadata.ts b/playground-app/src/scenarios/flag-metadata.ts index 325ee52a6..259e05ab9 100644 --- a/playground-app/src/scenarios/flag-metadata.ts +++ b/playground-app/src/scenarios/flag-metadata.ts @@ -28,4 +28,5 @@ export const flagMetadata: Scenario = { flagKey: "flag-with-metadata", returnType: "boolean", context: contextToPrettyJson({}), + codeDefault: "false", }; diff --git a/playground-app/src/scenarios/fraction-string.ts b/playground-app/src/scenarios/fraction-string.ts index a61472ca3..768dca47c 100644 --- a/playground-app/src/scenarios/fraction-string.ts +++ b/playground-app/src/scenarios/fraction-string.ts @@ -35,4 +35,5 @@ export const pseudoRandomSplit: Scenario = { context: contextToPrettyJson({ targetingKey: "sessionId-123", }), + codeDefault: "\"grey\"", }; diff --git a/playground-app/src/scenarios/index.ts b/playground-app/src/scenarios/index.ts index 456751da1..45c51e1f1 100644 --- a/playground-app/src/scenarios/index.ts +++ b/playground-app/src/scenarios/index.ts @@ -14,6 +14,7 @@ import { progressRollout } from "./progressive-rollout"; import { sharedEvaluators } from "./share-evaluators"; import { targetingKey } from "./targeting-key"; import { flagMetadata } from "./flag-metadata"; +import { codeDefault } from "./code-default"; export const scenarios = { "Basic boolean flag": basicBoolean, @@ -31,6 +32,7 @@ export const scenarios = { "Boolean variant shorthand": booleanShorthand, "Targeting key": targetingKey, "Flag metadata": flagMetadata, + "Code default": codeDefault, } satisfies { [name: string]: Scenario }; export type ScenarioName = keyof typeof scenarios; diff --git a/playground-app/src/scenarios/progressive-rollout.ts b/playground-app/src/scenarios/progressive-rollout.ts index fe189bb4f..e5677d5cb 100644 --- a/playground-app/src/scenarios/progressive-rollout.ts +++ b/playground-app/src/scenarios/progressive-rollout.ts @@ -65,4 +65,5 @@ export const progressRollout: Scenario = { contextToPrettyJson({ targetingKey: "sessionId-12345", }), + codeDefault: "false", }; diff --git a/playground-app/src/scenarios/share-evaluators.ts b/playground-app/src/scenarios/share-evaluators.ts index 8a4e16d87..204595c99 100644 --- a/playground-app/src/scenarios/share-evaluators.ts +++ b/playground-app/src/scenarios/share-evaluators.ts @@ -43,4 +43,5 @@ export const sharedEvaluators: Scenario = { context: contextToPrettyJson({ email: "example@faas.com", }), + codeDefault: "false", }; diff --git a/playground-app/src/scenarios/targeting-key.ts b/playground-app/src/scenarios/targeting-key.ts index 754c9bd5a..df26f6e0e 100644 --- a/playground-app/src/scenarios/targeting-key.ts +++ b/playground-app/src/scenarios/targeting-key.ts @@ -33,4 +33,5 @@ export const targetingKey: Scenario = { context: contextToPrettyJson({ targetingKey: "5c3d8535-f81a-4478-a6d3-afaa4d51199e", }), + codeDefault: "\"miss\"", }; diff --git a/playground-app/src/types.ts b/playground-app/src/types.ts index 065a27bc6..de88e6540 100644 --- a/playground-app/src/types.ts +++ b/playground-app/src/types.ts @@ -24,7 +24,7 @@ export type FeatureDefinition = { flags: { [key: string]: { state: "ENABLED" | "DISABLED"; - defaultVariant: string; + defaultVariant?: string | null | undefined; variants: | StringVariants | NumberVariants @@ -52,11 +52,16 @@ export type Scenario = { */ flagKey: string; /** - * The expected return type of the flag. - */ + /** + * The expected return type of the flag. + */ returnType: FlagValueType; /** - * A string or function that returns a string that represents evaluation context. - */ + * A string or function that returns a string that represents evaluation context. + */ context: string | (() => string); + /** + * The code default value to use when defaultVariant is null/omitted. + */ + codeDefault: string; }; From 284f198c61f26d270b4f357913f155f1ea9df0af Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Fri, 13 Mar 2026 11:35:56 -0400 Subject: [PATCH 3/5] docs: ADR proposing "rollout" operator (#1867) Proposes a "rollout operator". Facilitates linear, progressive rollouts as a fundamental feature flag use case: gradually shifting traffic from one variant to another over time. See ADR for justification and full proposal. See also: - draft implementation **WITH DEMO** in flagd: https://github.com/open-feature/flagd/pull/1868 - run demo with: `make build-flagd && ./demo-rollout.sh` - draft schema changes: https://github.com/open-feature/flagd-schemas/pull/205 ![output](https://github.com/user-attachments/assets/7eaeafea-bc60-40db-a1ac-65d9c15f82a4) --------- Signed-off-by: Todd Baert Signed-off-by: Nilushiya.K --- docs/architecture-decisions/fractional.md | 18 +- .../rollout-operator.md | 311 ++++++++++++++++++ 2 files changed, 327 insertions(+), 2 deletions(-) create mode 100644 docs/architecture-decisions/rollout-operator.md diff --git a/docs/architecture-decisions/fractional.md b/docs/architecture-decisions/fractional.md index caaf8b5e4..a453b033d 100644 --- a/docs/architecture-decisions/fractional.md +++ b/docs/architecture-decisions/fractional.md @@ -2,7 +2,7 @@ status: draft author: @toddbaert created: 2025-06-06 -updated: 2025-06-06 +updated: 2026-03-13 --- # Fractional Operator @@ -111,6 +111,21 @@ Note that in this example, we've also specified a custom bucketing value. } ``` +**Dynamic weights** are also supported: the weight argument in each variant array can be a JSONLogic expression that evaluates to a numeric value, not only a hard-coded integer. +This enables use cases such as time-based progressive rollouts, where the weight changes dynamically based on the evaluation context (e.g., `$flagd.timestamp`). +Negative weight values (which can result from dynamic expressions) must be clamped to 0. + +```jsonc +// Time-based progressive rollout using dynamic weights: +// the "on" weight grows as time advances, "off" weight shrinks. +{ + "fractional": [ + ["on", { "-": [{ "var": "$flagd.timestamp" }, 1740000000] }], + ["off", { "-": [1800000000, { "var": "$flagd.timestamp" }] }] + ] +} +``` + ### Consequences - Good, because Murmur3 is fast, has good avalanche properties, and we don't need "cryptographic" randomness @@ -118,4 +133,3 @@ Note that in this example, we've also specified a custom bucketing value. - Good, because our bucketing algorithm is relatively stable when new variants are added - Bad, because we only support string bucketing values - Bad, because we don't have bucket resolution finer than 1:99 -- Bad, because we don't support JSONLogic expressions within bucket definitions diff --git a/docs/architecture-decisions/rollout-operator.md b/docs/architecture-decisions/rollout-operator.md new file mode 100644 index 000000000..1e6f7bad6 --- /dev/null +++ b/docs/architecture-decisions/rollout-operator.md @@ -0,0 +1,311 @@ +--- +status: rejected +author: @toddbaert +created: 2026-02-06 +updated: 2026-03-13 +--- + +# Rollout Operator + +**Status: Rejected**: After discussion, this proposal was rejected in favor of enhancing the existing `fractional` operator to accept JSONLogic expressions as weight arguments (see the [Alternative Proposal](#alternative-proposal-enhanced-fractional-with-dynamic-weights) section below and the [Fractional Operator ADR](fractional.md)). +The rollout/rollback operators are largely syntactic sugar over `fractional` with dynamic weights, and the additional operator surface area across all language SDKs is not justified at this time. +The enhanced `fractional` approach has been proven to support both progressive rollouts and FILO rollbacks using only existing primitives. +A dedicated operator may be reconsidered in the future if strong user need emerges, perhaps "compiled" to the fractional alternative described. + +## Background + +Progressive rollouts are a fundamental feature flag use case: gradually shifting traffic from one variant to another over time. +While stepped progression can be approximated in flagd by manually updating `fractional` weights on a schedule, or building a ruleset with multiple discrete timestamp checks each with different fractional distributions, true linear progression, where the percentage changes continuously over time, requires a time-aware operator. +The proposed rollout operator provides this. + +The rollout operator complements (but does not make obsolete) the existing `fractional` operator by featuring a time dimension. +Where `fractional` distributes traffic across variants at a point in time, `rollout` transitions between any two variants over a time window, _including nested JSONLogic like `fractional` splits or conditional rules_. + +## Requirements + +- **Time-based**: traffic distribution must change automatically based on the current timestamp +- **Deterministic**: same user must get consistent results at a given point in time (no re-bucketing mid-request) +- **Composable**: must support nested JSONLogic (e.g., rollout to a `fractional` distribution) +- **Consistent hashing**: must use the same hashing strategy as `fractional` (MurmurHash3-32) +- **Cross-language portable**: must use only integer arithmetic (no floating-point operations) +- **JSONLogic conventions**: must follow established patterns for custom operators + +## Proposal + +### Operator Syntax + +Three forms are supported, following JSONLogic array conventions: + +```jsonc +// shorthand: roll from defaultVariant to "new" +{"rollout": [1704067200, 1706745600, "new"]} + +// longhand: explicit from and to - from "old" to "new" +{"rollout": [1704067200, 1706745600, "old", "new"]} + +// with custom bucketBy +{"rollout": [{"var": "email"}, 1704067200, 1706745600, "old", "new"]} +``` + +Parameters: + +- `bucketBy` (optional): JSONLogic expression for bucketing value; defaults to `flagKey + targetingKey`, consistent with existing `fractional` +- `startTime`: Unix timestamp (seconds) when rollout begins (0% on `to`). Must be less than `endTime`. +- `endTime`: Unix timestamp (seconds) when rollout completes (100% on `to`). Must be greater than `startTime`. +- `from`: Starting variant or expression (omit for shorthand to use `defaultVariant`) +- `to`: Target variant or expression + +**Timestamp validation**: To prevent accidental use of millisecond timestamps (which would schedule rollouts thousands of years in the future), the JSON Schema should enforce reasonable bounds on `startTime` and `endTime` (e.g., `minimum: 0`, `maximum: 3000000000`, approximately year 2065). + +### Hashing Consistency + +The rollout operator uses the same hashing strategy as `fractional` with one exception: + +- MurmurHash3 (32-bit) +- Same default bucketing value: `flagKey + targetingKey` +- Same `bucketBy` expression support +- After the bucketing value is retrieved, before hashing, the UTF-8 byte representation of `rollout` is appended to the bucketing value + - This injects entropy to ensure users in fractional rules nested within a `rollout` don't bucket identically (we want to ensure users early in a rollout don't always end up in the first fractional bucket). + - The `rollback` operator also appends `rollout` (not `rollback`) so that bucket assignments match the original rollout; this is essential for the pivot-time gate to correctly identify which users were transitioned. + +### Integer-Only Arithmetic + +Per the [High-Precision Fractional Bucketing ADR](high-precision-fractional-bucketing.md), we avoid floating-point operations entirely. + +Implementations must validate that `endTime > startTime` (strict inequality) at parse time, rejecting the configuration otherwise. +This also rejects `startTime == endTime` (duration = 0), which would be a degenerate case; an "instant rollout" is better expressed as a direct variant assignment. +Additionally, `elapsed` must be clamped to `[0, duration]` to prevent overflow from negative values or times beyond the window: + +```go +duration := endTime - startTime // validated > 0 at parse time +elapsed := currentTime - startTime + +// before startTime: everyone gets "from"; after endTime → everyone gets "to" +if elapsed <= 0 { + return from +} +if elapsed >= duration { + return to +} + +// Maps hash to [0, duration) range using integer math only +bucket := (uint64(hashValue) * uint64(duration)) >> 32 + +if bucket < uint64(elapsed) { + return to +} +return from +``` + +This is mathematically equivalent to `(hash/2^32) < (elapsed/duration)` but uses only: + +- 64-bit multiplication +- 32-bit right shift +- Integer comparison + +These operations are portable across all languages without floating-point precision concerns. + +### Nested JSONLogic Support + +Variants can be JSONLogic expressions, enabling composition: + +```jsonc +// Rollout to a fractional split +{ + "rollout": [ + 1704067200, 1706745600, + "old", + {"fractional": [["a", 50], ["b", 50]]} + ] +} + +// Conditional logic within rollout +{ + "rollout": [ + 1704067200, 1706745600, + "old", + {"if": [{"==": [{"var": "tier"}, "premium"]}, "premium-new", "basic-new"]} + ] +} +``` + +### Rollback Operator + +The `rollback` operator enables graceful reversal of a rollout, transitioning users back in **FILO order**: first adopters are last to revert, and users who never transitioned never see the new variant. + +This requires a **pivot time** (the moment the rollback was initiated) which encodes how far the original rollout had progressed. The pivot time gives the operator enough "memory" to gate out never-transitioned users and reverse the rest in order, without storing any state. The rollback uses the same time window as the original rollout; the rollback completes at `endTime`. + +```jsonc +// Rollback: same start/end as rollout, plus pivotTime +{"rollback": [1704067200, 1704068200, 1704067700, "new", "old"]} +``` + +Parameters: + +- `bucketBy` (optional): Same as `rollout`. +- `startTime`: `startTime` from the original rollout. +- `endTime`: Controls when the rollback completes. Using the original rollout's `endTime` compresses the rollback into the remaining window; setting `endTime` to `pivotTime + (pivotTime - startTime)` rolls back at the same rate as the rollout progressed, etc. +- `pivotTime`: Unix timestamp when the rollback was initiated. Must be between `startTime` and `endTime`. +- `from`: The variant users are currently on (the rollout's `to`). +- `to`: The variant users revert to (the rollout's `from`). + +**Implementation**: + +```go +duration := endTime - startTime +elapsedAtPivot := pivotTime - startTime +rollbackDuration := endTime - pivotTime +bucket := (uint64(hashValue) * uint64(duration)) >> 32 + +// Gate: user never transitioned during rollout → always gets "to" +if bucket >= uint64(elapsedAtPivot) { + return to +} + +// Rollback progress +rollbackElapsed := currentTime - pivotTime +if rollbackElapsed <= 0 { return from } +if rollbackElapsed >= rollbackDuration { return to } + +// Shrinking threshold: highest-bucket users (last adopted) revert first +remaining := rollbackDuration - rollbackElapsed +if bucket * uint64(rollbackDuration) < uint64(elapsedAtPivot) * uint64(remaining) { + return from // still on rolled-out variant +} +return to // reverted +``` + +All operations are integer-only, consistent with the `rollout` operator. + +**Example**: Rollout `[0, 1000, "old", "new"]` pivoted at t=500 (rollback completes at t=1000): + +- **Alice** (adoption time t=200): adopted "new" at t=200. Reverts to "old" at t=800. First in, last out. +- **Bob** (adoption time t=400): adopted "new" at t=400. Reverts to "old" at t=600. +- **Carol** (adoption time t=600): would have adopted at t=600, but pivot was t=500. **Never sees "new".** +- **Fred** (adoption time t=700): would have adopted at t=700, but pivot was t=500. **Never sees "new".** + +Without the pivot-time gate, Carol and Fred would temporarily be _exposed_ to "new" during rollback before being reverted, exactly the wrong behavior during an incident. The gate prevents this: any user whose bucket exceeds the elapsed time at pivot is immediately returned to "old" without ever seeing "new". + +Nested operators (like `fractional`) are **not affected** — the rollback uses the same hash, so fractional bucket assignments remain stable. + +### Future-proofing + +Later, we may want to support additional non-linear rollouts. +This can be done with an additional, optional, configuration parameter before the times params (similar to custom bucketing). + +```jsonc +{"rollout": [{"var": "email"}, "linear|exponential", 1704067200, 1706745600, "old", "new"]} +``` + +```jsonc +{"rollout": [{"var": "email"}, { some-json-logic-lambda }, 1704067200, 1706745600, "old", "new"]} +``` + +**Implementation of non-linear rollouts is out of the scope of this proposal.** + +### Alternative Proposal: Enhanced `fractional` with Dynamic Weights + +An alternative to a dedicated operator was proposed: use `fractional` with JSONLogic expressions as weights, combined with `$flagd.timestamp`, to achieve time-based progression without any new operator: + +```jsonc +{ + "fractional": [ + { "var": "targetingKey" }, + ["on", { "-": [{ "var": "$flagd.timestamp" }, 1740000000] }], + ["off", { "-": [1800000000, { "var": "$flagd.timestamp" }] }] + ] +} +``` + +As time advances, the weight of `"on"` grows and `"off"` shrinks, producing a progressive rollout using only existing primitives. +This requires allowing the `fractional` weight argument to be a JSONLogic expression (currently it must be a hard-coded integer), as well as clamping negative weights to 0, in addition to support for non-string/nested variants ([#1877](https://github.com/open-feature/flagd/pull/1877)) and high-precision bucketing. + +This approach is elegant and avoids a new operator. It achieves both forward rollout and FILO rollback using only existing JSONLogic primitives. The two approaches differ in the following ways: + +1. **FILO rollback.** With `fractional`, naively swapping the weight expressions to reverse a rollout produces FIFO ordering: early adopters revert first, not last. FILO rollback _is_ achievable by reflecting time around the pivot point. Given a rollout over `[Ts, Te]` pivoted at `Tp`, define `R = 2Tp - Ts` and use: + + ```jsonc + { + "fractional": [ + { "var": "targetingKey" }, + ["new", { "-": [R, { "var": "$flagd.timestamp" }] }], + ["old", { "-": [{ "+": [{ "var": "$flagd.timestamp" }, Te] }, 2Tp] }] + ] + } + ``` + + Where `R`, `Te`, `Ts`, and `Tp` are precomputed constants. Note that `R + Ts = (2Tp - Ts) + Ts = 2Tp`, so the `"old"` weight simplifies to `(t + Te) - 2Tp`. The `"new"` weight shrinks from `Tp - Ts` to 0, and the total weight is always `Te - Ts` (the rollout duration), naturally gating out never-transitioned users and reverting the rest in FILO order. + The rollback completes at `t = R = 2Tp - Ts`, not at the original `Te`; it mirrors the rollout at the same rate, so the rollback takes as long to complete as the rollout had progressed. For example, if the rollout ran for 300s before pivoting, the rollback also takes 300s. + +2. **Hash decorrelation.** The `rollout` operator automatically appends `"rollout"` (or some other salt) to the bucketing value before hashing, ensuring that a user's position in the rollout timeline does not correlate with their bucket in a nested `fractional`. +With the pure-fractional approach, the outer and inner `fractional` share the same hash, so early-rollout users systematically land in the first inner bucket. Users can work around this by manually adding a salt via `cat`, but that is non-obvious. + +3. **Operator surface area.** The `fractional` approach requires no new operators; only that `fractional` accept JSONLogic expressions as weight arguments (currently hard-coded integers). The dedicated operators are more readable but add new definition surface area that must be implemented across all language SDKs. + +#### Direct Comparison: Rollout with 50% Rollback + +To make the tradeoffs clear, here is both approaches implementing the same scenario: a linear rollout from `"off"` to `"on"` over `[1740000000, 1800000000]`, followed by a "first in, last out" rollback initiated at the 50% mark (`pivotTime = 1770000000`). + +**Using `rollout` / `rollback` operators:** + +Rollout: + +```jsonc +{"rollout": [1740000000, 1800000000, "off", "on"]} +``` + +Rollback (initiated at 50%): + +```jsonc +{"rollback": [1740000000, 1800000000, 1770000000, "on", "off"]} +``` + +**Using `fractional` with dynamic weights:** + +Rollout: + +```jsonc +{ + "fractional": [ + ["on", { "-": [{ "var": "$flagd.timestamp" }, 1740000000] }], + ["off", { "-": [1800000000, { "var": "$flagd.timestamp" }] }] + ] +} +``` + +Rollback (FILO, initiated at 50%; `R = 2 × 1770000000 − 1740000000 = 1800000000`, `2Tp = 2 × 1770000000 = 3540000000`): + +```jsonc +{ + "fractional": [ + ["on", { "-": [1800000000, { "var": "$flagd.timestamp" }] }], + ["off", { "-": [{ "+": [{ "var": "$flagd.timestamp" }, 1800000000] }, 3540000000] }] + ] +} +``` + +Note: the `"off"` weight simplifies to `t − 1740000000` (i.e., `t − Ts`), which mirrors the original rollout's `"on"` weight. The total weight is always `1800000000 − 1740000000 = 60000000` (the rollout duration), ensuring bucket assignments are preserved at the pivot instant. + +**Summary:** + +| | `rollout` / `rollback` | `fractional` with dynamic weights | +| ------------------------ | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------- | +| **Rollout definition** | Single operator with explicit, non-nested parameters | Nested arithmetic expressions over `$flagd.timestamp` | +| **Rollback definition** | Single operator, same as `rollout`, but adds `pivotTime` | New set of weight expressions, requires precomputing `R = 2Tp − Ts` | +| **Readability** | Intent is self-describing: time window, pivot, and direction are visible | User must reconstruct rollout semantics from arithmetic weight expressions | +| **Hash decorrelation** | Automatic (appends `"rollout"` salt before hashing) | Manual, requires adding a salt via `cat` to avoid correlated bucketing in nested `fractional` | +| **New operator surface** | Yes, `rollout` and `rollback` must be implemented in all SDKs | No, only requires `fractional` to accept JSONLogic weight expressions | +| **FILO correctness** | Built-in via `pivotTime` parameter | Achievable but non-obvious; naive weight-swap produces FIFO | + +### Consequences of Adding Rollout + +- Good, because this enables functionality present in many other systems +- Good, because time-based rollouts are declarative and require no external automation +- Good, because hashing is consistent with `fractional` +- Good, because integer-only math ensures cross-language portability +- Good, because nested JSONLogic enables complex rollout scenarios +- Good, because timestamp usage, array parameter style, and shorthand are consistent with other operators +- Good, because `rollback` enables graceful reversal without subjecting users to unnecessary thrashing. +- Bad, because it's more definition surface area to understand +- Bad, because additional timed mechanisms may represent changes in behavior ("time-bombs") that can be difficult to trace +- Bad, because consistently testing a time-sensitive operator might be somewhat challenging From 045f1051a6782d4ba432e35099a527ab52520301 Mon Sep 17 00:00:00 2001 From: Nilushiya Kaneshalingam <107831659+Nilushiya@users.noreply.github.com> Date: Mon, 16 Mar 2026 10:46:58 +0530 Subject: [PATCH 4/5] Update core/pkg/sync/kubernetes/kubernetes_sync_test.go Update core/pkg/sync/kubernetes/kubernetes_sync_test.go Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Nilushiya Kaneshalingam <107831659+Nilushiya@users.noreply.github.com> Signed-off-by: Nilushiya.K --- core/pkg/sync/kubernetes/kubernetes_sync_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/pkg/sync/kubernetes/kubernetes_sync_test.go b/core/pkg/sync/kubernetes/kubernetes_sync_test.go index 6ef624dbb..ba51182bb 100644 --- a/core/pkg/sync/kubernetes/kubernetes_sync_test.go +++ b/core/pkg/sync/kubernetes/kubernetes_sync_test.go @@ -677,9 +677,10 @@ func TestSync_ReSync(t *testing.T) { } }() - if err := tt.k.ReSync(context.Background(), dataChannel); err != nil { - t.Errorf("Unexpected error: %v", err) - } + if err := tt.k.ReSync(ctx, dataChannel); err != nil { + t.Errorf("Unexpected error: %v", err) + } + for i := tt.countMsg; i > 0; i-- { select { From 324cd8ef21297964c8dce4e89031bdd66ccd1cdf Mon Sep 17 00:00:00 2001 From: "Nilushiya.K" Date: Mon, 16 Mar 2026 12:31:56 +0530 Subject: [PATCH 5/5] function rename and remove dublication Signed-off-by: Nilushiya.K --- core/pkg/sync/kubernetes/kubernetes_sync.go | 8 +++++--- core/pkg/sync/kubernetes/kubernetes_sync_test.go | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/core/pkg/sync/kubernetes/kubernetes_sync.go b/core/pkg/sync/kubernetes/kubernetes_sync.go index 8eda198af..88fee6f32 100644 --- a/core/pkg/sync/kubernetes/kubernetes_sync.go +++ b/core/pkg/sync/kubernetes/kubernetes_sync.go @@ -27,6 +27,8 @@ var ( featureFlagResource = v1beta1.GroupVersion.WithResource("featureflags") ) +const invalidAPIVersionMsg = "invalid api version %s, expected %s" + type SyncOption func(s *Sync) type Sync struct { @@ -241,7 +243,7 @@ func commonHandler(obj interface{}, object types.NamespacedName, emitEvent Defau } if u.GetAPIVersion() != apiVersion { - return fmt.Errorf("invalid api version %s, expected %s", u.GetAPIVersion(), apiVersion) + return fmt.Errorf(invalidAPIVersionMsg, u.GetAPIVersion(), apiVersion) } if u.GetName() == object.Name { @@ -263,7 +265,7 @@ func updateFuncHandler(oldObj interface{}, newObj interface{}, object types.Name } if ffOldObj.GetAPIVersion() != apiVersion { - return fmt.Errorf("invalid api version %s, expected %s", ffOldObj.GetAPIVersion(), apiVersion) + return fmt.Errorf(invalidAPIVersionMsg, ffOldObj.GetAPIVersion(), apiVersion) } ffNewObj, err := asUnstructured(newObj) @@ -272,7 +274,7 @@ func updateFuncHandler(oldObj interface{}, newObj interface{}, object types.Name } if ffNewObj.GetAPIVersion() != apiVersion { - return fmt.Errorf("invalid api version %s, expected %s", ffNewObj.GetAPIVersion(), apiVersion) + return fmt.Errorf(invalidAPIVersionMsg, ffNewObj.GetAPIVersion(), apiVersion) } if object.Name == ffNewObj.GetName() && ffOldObj.GetResourceVersion() != ffNewObj.GetResourceVersion() { diff --git a/core/pkg/sync/kubernetes/kubernetes_sync_test.go b/core/pkg/sync/kubernetes/kubernetes_sync_test.go index ba51182bb..1ca8765c2 100644 --- a/core/pkg/sync/kubernetes/kubernetes_sync_test.go +++ b/core/pkg/sync/kubernetes/kubernetes_sync_test.go @@ -74,7 +74,7 @@ func Test_parseURI(t *testing.T) { } } -func Test_asUnstructured(t *testing.T) { +func TestAsUnstructured(t *testing.T) { validFFCfg := v1beta1.FeatureFlag{ TypeMeta: Metadata, }