@kong-ui-public/entities-certificates 2.1.4 → 2.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(Te,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("vue-router"),require("@kong-ui-public/i18n"),require("axios"),require("@kong/kongponents")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong-ui-public/i18n","axios","@kong/kongponents"],n):(Te=typeof globalThis<"u"?globalThis:Te||self,n(Te["kong-ui-public-entities-certificates"]={},Te.Vue,Te.VueRouter,Te["kong-ui-public-i18n"],Te.axios,Te.Kongponents))})(this,function(Te,n,Hr,cr,qf,Kf){"use strict";var co=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! *****************************************************************************
1
+ (function(Oe,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("vue-router"),require("@kong-ui-public/i18n"),require("axios"),require("@kong/kongponents")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong-ui-public/i18n","axios","@kong/kongponents"],n):(Oe=typeof globalThis<"u"?globalThis:Oe||self,n(Oe["kong-ui-public-entities-certificates"]={},Oe.Vue,Oe.VueRouter,Oe["kong-ui-public-i18n"],Oe.axios,Oe.Kongponents))})(this,function(Oe,n,Hr,cr,qf,Kf){"use strict";var co=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! *****************************************************************************
2
2
  Copyright (C) Microsoft. All rights reserved.
3
3
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
4
  this file except in compliance with the License. You may obtain a copy of the
@@ -11,7 +11,7 @@
11
11
 
12
12
  See the Apache Version 2.0 License for specific language governing permissions
13
13
  and limitations under the License.
14
- ***************************************************************************** */var qa;(function(e){(function(t){var r=typeof co=="object"?co:typeof self=="object"?self:typeof this=="object"?this:Function("return this;")(),i=o(e);typeof r.Reflect>"u"?r.Reflect=e:i=o(r.Reflect,i),t(i);function o(s,a){return function(c,l){typeof s[c]!="function"&&Object.defineProperty(s,c,{configurable:!0,writable:!0,value:l}),a&&a(c,l)}}})(function(t){var r=Object.prototype.hasOwnProperty,i=typeof Symbol=="function",o=i&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",s=i&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",a=typeof Object.create=="function",c={__proto__:[]}instanceof Array,l=!a&&!c,d={create:a?function(){return Fa(Object.create(null))}:c?function(){return Fa({__proto__:null})}:function(){return Fa({})},has:l?function(S,B){return r.call(S,B)}:function(S,B){return B in S},get:l?function(S,B){return r.call(S,B)?S[B]:void 0}:function(S,B){return S[B]}},p=Object.getPrototypeOf(Function),y=typeof process=="object"&&process.env&&process.env.REFLECT_METADATA_USE_MAP_POLYFILL==="true",A=!y&&typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:sb(),C=!y&&typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:ab(),h=!y&&typeof WeakMap=="function"?WeakMap:cb(),g=new h;function m(S,B,_,j){if(pe(_)){if(!Be(S))throw new TypeError;if(!we(B))throw new TypeError;return q(S,B)}else{if(!Be(S))throw new TypeError;if(!T(B))throw new TypeError;if(!T(j)&&!pe(j)&&!J(j))throw new TypeError;return J(j)&&(j=void 0),_=W(_),U(S,B,_,j)}}t("decorate",m);function v(S,B){function _(j,G){if(!T(j))throw new TypeError;if(!pe(G)&&!Lr(G))throw new TypeError;de(S,B,j,G)}return _}t("metadata",v);function b(S,B,_,j){if(!T(_))throw new TypeError;return pe(j)||(j=W(j)),de(S,B,_,j)}t("defineMetadata",b);function w(S,B,_){if(!T(B))throw new TypeError;return pe(_)||(_=W(_)),V(S,B,_)}t("hasMetadata",w);function x(S,B,_){if(!T(B))throw new TypeError;return pe(_)||(_=W(_)),te(S,B,_)}t("hasOwnMetadata",x);function F(S,B,_){if(!T(B))throw new TypeError;return pe(_)||(_=W(_)),le(S,B,_)}t("getMetadata",F);function Z(S,B,_){if(!T(B))throw new TypeError;return pe(_)||(_=W(_)),be(S,B,_)}t("getOwnMetadata",Z);function I(S,B){if(!T(S))throw new TypeError;return pe(B)||(B=W(B)),fe(S,B)}t("getMetadataKeys",I);function E(S,B){if(!T(S))throw new TypeError;return pe(B)||(B=W(B)),ke(S,B)}t("getOwnMetadataKeys",E);function M(S,B,_){if(!T(B))throw new TypeError;pe(_)||(_=W(_));var j=P(B,_,!1);if(pe(j)||!j.delete(S))return!1;if(j.size>0)return!0;var G=g.get(B);return G.delete(_),G.size>0||g.delete(B),!0}t("deleteMetadata",M);function q(S,B){for(var _=S.length-1;_>=0;--_){var j=S[_],G=j(B);if(!pe(G)&&!J(G)){if(!we(G))throw new TypeError;B=G}}return B}function U(S,B,_,j){for(var G=S.length-1;G>=0;--G){var Oe=S[G],X=Oe(B,_,j);if(!pe(X)&&!J(X)){if(!T(X))throw new TypeError;j=X}}return j}function P(S,B,_){var j=g.get(S);if(pe(j)){if(!_)return;j=new A,g.set(S,j)}var G=j.get(B);if(pe(G)){if(!_)return;G=new A,j.set(B,G)}return G}function V(S,B,_){var j=te(S,B,_);if(j)return!0;var G=Ha(B);return J(G)?!1:V(S,G,_)}function te(S,B,_){var j=P(B,_,!1);return pe(j)?!1:Ae(j.has(S))}function le(S,B,_){var j=te(S,B,_);if(j)return be(S,B,_);var G=Ha(B);if(!J(G))return le(S,G,_)}function be(S,B,_){var j=P(B,_,!1);if(!pe(j))return j.get(S)}function de(S,B,_,j){var G=P(_,j,!0);G.set(S,B)}function fe(S,B){var _=ke(S,B),j=Ha(S);if(j===null)return _;var G=fe(j,B);if(G.length<=0)return _;if(_.length<=0)return G;for(var Oe=new C,X=[],ee=0,Y=_;ee<Y.length;ee++){var oe=Y[ee],se=Oe.has(oe);se||(Oe.add(oe),X.push(oe))}for(var Lt=0,Lf=G;Lt<Lf.length;Lt++){var oe=Lf[Lt],se=Oe.has(oe);se||(Oe.add(oe),X.push(oe))}return X}function ke(S,B){var _=[],j=P(S,B,!1);if(pe(j))return _;for(var G=j.keys(),Oe=rb(G),X=0;;){var ee=nb(Oe);if(!ee)return _.length=X,_;var Y=ib(ee);try{_[X]=Y}catch(oe){try{ob(Oe)}finally{throw oe}}X++}}function Ut(S){if(S===null)return 1;switch(typeof S){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return S===null?1:6;default:return 6}}function pe(S){return S===void 0}function J(S){return S===null}function he(S){return typeof S=="symbol"}function T(S){return typeof S=="object"?S!==null:typeof S=="function"}function re(S,B){switch(Ut(S)){case 0:return S;case 1:return S;case 2:return S;case 3:return S;case 4:return S;case 5:return S}var _=B===3?"string":B===5?"number":"default",j=Uf(S,o);if(j!==void 0){var G=j.call(S,_);if(T(G))throw new TypeError;return G}return ye(S,_==="default"?"number":_)}function ye(S,B){if(B==="string"){var _=S.toString;if(K(_)){var j=_.call(S);if(!T(j))return j}var G=S.valueOf;if(K(G)){var j=G.call(S);if(!T(j))return j}}else{var G=S.valueOf;if(K(G)){var j=G.call(S);if(!T(j))return j}var Oe=S.toString;if(K(Oe)){var j=Oe.call(S);if(!T(j))return j}}throw new TypeError}function Ae(S){return!!S}function _t(S){return""+S}function W(S){var B=re(S,3);return he(B)?B:_t(B)}function Be(S){return Array.isArray?Array.isArray(S):S instanceof Object?S instanceof Array:Object.prototype.toString.call(S)==="[object Array]"}function K(S){return typeof S=="function"}function we(S){return typeof S=="function"}function Lr(S){switch(Ut(S)){case 3:return!0;case 4:return!0;default:return!1}}function Uf(S,B){var _=S[B];if(_!=null){if(!K(_))throw new TypeError;return _}}function rb(S){var B=Uf(S,s);if(!K(B))throw new TypeError;var _=B.call(S);if(!T(_))throw new TypeError;return _}function ib(S){return S.value}function nb(S){var B=S.next();return B.done?!1:B}function ob(S){var B=S.return;B&&B.call(S)}function Ha(S){var B=Object.getPrototypeOf(S);if(typeof S!="function"||S===p||B!==p)return B;var _=S.prototype,j=_&&Object.getPrototypeOf(_);if(j==null||j===Object.prototype)return B;var G=j.constructor;return typeof G!="function"||G===S?B:G}function sb(){var S={},B=[],_=function(){function X(ee,Y,oe){this._index=0,this._keys=ee,this._values=Y,this._selector=oe}return X.prototype["@@iterator"]=function(){return this},X.prototype[s]=function(){return this},X.prototype.next=function(){var ee=this._index;if(ee>=0&&ee<this._keys.length){var Y=this._selector(this._keys[ee],this._values[ee]);return ee+1>=this._keys.length?(this._index=-1,this._keys=B,this._values=B):this._index++,{value:Y,done:!1}}return{value:void 0,done:!0}},X.prototype.throw=function(ee){throw this._index>=0&&(this._index=-1,this._keys=B,this._values=B),ee},X.prototype.return=function(ee){return this._index>=0&&(this._index=-1,this._keys=B,this._values=B),{value:ee,done:!0}},X}();return function(){function X(){this._keys=[],this._values=[],this._cacheKey=S,this._cacheIndex=-2}return Object.defineProperty(X.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),X.prototype.has=function(ee){return this._find(ee,!1)>=0},X.prototype.get=function(ee){var Y=this._find(ee,!1);return Y>=0?this._values[Y]:void 0},X.prototype.set=function(ee,Y){var oe=this._find(ee,!0);return this._values[oe]=Y,this},X.prototype.delete=function(ee){var Y=this._find(ee,!1);if(Y>=0){for(var oe=this._keys.length,se=Y+1;se<oe;se++)this._keys[se-1]=this._keys[se],this._values[se-1]=this._values[se];return this._keys.length--,this._values.length--,ee===this._cacheKey&&(this._cacheKey=S,this._cacheIndex=-2),!0}return!1},X.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=S,this._cacheIndex=-2},X.prototype.keys=function(){return new _(this._keys,this._values,j)},X.prototype.values=function(){return new _(this._keys,this._values,G)},X.prototype.entries=function(){return new _(this._keys,this._values,Oe)},X.prototype["@@iterator"]=function(){return this.entries()},X.prototype[s]=function(){return this.entries()},X.prototype._find=function(ee,Y){return this._cacheKey!==ee&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=ee)),this._cacheIndex<0&&Y&&(this._cacheIndex=this._keys.length,this._keys.push(ee),this._values.push(void 0)),this._cacheIndex},X}();function j(X,ee){return X}function G(X,ee){return ee}function Oe(X,ee){return[X,ee]}}function ab(){return function(){function S(){this._map=new A}return Object.defineProperty(S.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),S.prototype.has=function(B){return this._map.has(B)},S.prototype.add=function(B){return this._map.set(B,B),this},S.prototype.delete=function(B){return this._map.delete(B)},S.prototype.clear=function(){this._map.clear()},S.prototype.keys=function(){return this._map.keys()},S.prototype.values=function(){return this._map.values()},S.prototype.entries=function(){return this._map.entries()},S.prototype["@@iterator"]=function(){return this.keys()},S.prototype[s]=function(){return this.keys()},S}()}function cb(){var S=16,B=d.create(),_=j();return function(){function Y(){this._key=j()}return Y.prototype.has=function(oe){var se=G(oe,!1);return se!==void 0?d.has(se,this._key):!1},Y.prototype.get=function(oe){var se=G(oe,!1);return se!==void 0?d.get(se,this._key):void 0},Y.prototype.set=function(oe,se){var Lt=G(oe,!0);return Lt[this._key]=se,this},Y.prototype.delete=function(oe){var se=G(oe,!1);return se!==void 0?delete se[this._key]:!1},Y.prototype.clear=function(){this._key=j()},Y}();function j(){var Y;do Y="@@WeakMap@@"+ee();while(d.has(B,Y));return B[Y]=!0,Y}function G(Y,oe){if(!r.call(Y,_)){if(!oe)return;Object.defineProperty(Y,_,{value:d.create()})}return Y[_]}function Oe(Y,oe){for(var se=0;se<oe;++se)Y[se]=Math.random()*255|0;return Y}function X(Y){return typeof Uint8Array=="function"?typeof crypto<"u"?crypto.getRandomValues(new Uint8Array(Y)):typeof msCrypto<"u"?msCrypto.getRandomValues(new Uint8Array(Y)):Oe(new Uint8Array(Y),Y):Oe(new Array(Y),Y)}function ee(){var Y=X(S);Y[6]=Y[6]&79|64,Y[8]=Y[8]&191|128;for(var oe="",se=0;se<S;++se){var Lt=Y[se];(se===4||se===6||se===8)&&(oe+="-"),Lt<16&&(oe+="0"),oe+=Lt.toString(16).toLowerCase()}return oe}}function Fa(S){return S.__=void 0,delete S.__,S}})})(qa||(qa={}));/*!
14
+ ***************************************************************************** */var qa;(function(e){(function(t){var r=typeof co=="object"?co:typeof self=="object"?self:typeof this=="object"?this:Function("return this;")(),i=o(e);typeof r.Reflect>"u"?r.Reflect=e:i=o(r.Reflect,i),t(i);function o(s,a){return function(c,l){typeof s[c]!="function"&&Object.defineProperty(s,c,{configurable:!0,writable:!0,value:l}),a&&a(c,l)}}})(function(t){var r=Object.prototype.hasOwnProperty,i=typeof Symbol=="function",o=i&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",s=i&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",a=typeof Object.create=="function",c={__proto__:[]}instanceof Array,l=!a&&!c,d={create:a?function(){return Fa(Object.create(null))}:c?function(){return Fa({__proto__:null})}:function(){return Fa({})},has:l?function(S,B){return r.call(S,B)}:function(S,B){return B in S},get:l?function(S,B){return r.call(S,B)?S[B]:void 0}:function(S,B){return S[B]}},p=Object.getPrototypeOf(Function),y=typeof process=="object"&&process.env&&process.env.REFLECT_METADATA_USE_MAP_POLYFILL==="true",A=!y&&typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:sb(),C=!y&&typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:ab(),h=!y&&typeof WeakMap=="function"?WeakMap:cb(),g=new h;function m(S,B,_,j){if(pe(_)){if(!Ae(S))throw new TypeError;if(!we(B))throw new TypeError;return q(S,B)}else{if(!Ae(S))throw new TypeError;if(!T(B))throw new TypeError;if(!T(j)&&!pe(j)&&!W(j))throw new TypeError;return W(j)&&(j=void 0),_=Y(_),U(S,B,_,j)}}t("decorate",m);function v(S,B){function _(j,G){if(!T(j))throw new TypeError;if(!pe(G)&&!Lr(G))throw new TypeError;de(S,B,j,G)}return _}t("metadata",v);function b(S,B,_,j){if(!T(_))throw new TypeError;return pe(j)||(j=Y(j)),de(S,B,_,j)}t("defineMetadata",b);function w(S,B,_){if(!T(B))throw new TypeError;return pe(_)||(_=Y(_)),V(S,B,_)}t("hasMetadata",w);function x(S,B,_){if(!T(B))throw new TypeError;return pe(_)||(_=Y(_)),te(S,B,_)}t("hasOwnMetadata",x);function F(S,B,_){if(!T(B))throw new TypeError;return pe(_)||(_=Y(_)),le(S,B,_)}t("getMetadata",F);function Z(S,B,_){if(!T(B))throw new TypeError;return pe(_)||(_=Y(_)),be(S,B,_)}t("getOwnMetadata",Z);function I(S,B){if(!T(S))throw new TypeError;return pe(B)||(B=Y(B)),fe(S,B)}t("getMetadataKeys",I);function E(S,B){if(!T(S))throw new TypeError;return pe(B)||(B=Y(B)),ke(S,B)}t("getOwnMetadataKeys",E);function M(S,B,_){if(!T(B))throw new TypeError;pe(_)||(_=Y(_));var j=P(B,_,!1);if(pe(j)||!j.delete(S))return!1;if(j.size>0)return!0;var G=g.get(B);return G.delete(_),G.size>0||g.delete(B),!0}t("deleteMetadata",M);function q(S,B){for(var _=S.length-1;_>=0;--_){var j=S[_],G=j(B);if(!pe(G)&&!W(G)){if(!we(G))throw new TypeError;B=G}}return B}function U(S,B,_,j){for(var G=S.length-1;G>=0;--G){var _e=S[G],X=_e(B,_,j);if(!pe(X)&&!W(X)){if(!T(X))throw new TypeError;j=X}}return j}function P(S,B,_){var j=g.get(S);if(pe(j)){if(!_)return;j=new A,g.set(S,j)}var G=j.get(B);if(pe(G)){if(!_)return;G=new A,j.set(B,G)}return G}function V(S,B,_){var j=te(S,B,_);if(j)return!0;var G=Ha(B);return W(G)?!1:V(S,G,_)}function te(S,B,_){var j=P(B,_,!1);return pe(j)?!1:De(j.has(S))}function le(S,B,_){var j=te(S,B,_);if(j)return be(S,B,_);var G=Ha(B);if(!W(G))return le(S,G,_)}function be(S,B,_){var j=P(B,_,!1);if(!pe(j))return j.get(S)}function de(S,B,_,j){var G=P(_,j,!0);G.set(S,B)}function fe(S,B){var _=ke(S,B),j=Ha(S);if(j===null)return _;var G=fe(j,B);if(G.length<=0)return _;if(_.length<=0)return G;for(var _e=new C,X=[],ee=0,J=_;ee<J.length;ee++){var oe=J[ee],se=_e.has(oe);se||(_e.add(oe),X.push(oe))}for(var Lt=0,Lf=G;Lt<Lf.length;Lt++){var oe=Lf[Lt],se=_e.has(oe);se||(_e.add(oe),X.push(oe))}return X}function ke(S,B){var _=[],j=P(S,B,!1);if(pe(j))return _;for(var G=j.keys(),_e=rb(G),X=0;;){var ee=nb(_e);if(!ee)return _.length=X,_;var J=ib(ee);try{_[X]=J}catch(oe){try{ob(_e)}finally{throw oe}}X++}}function Ut(S){if(S===null)return 1;switch(typeof S){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return S===null?1:6;default:return 6}}function pe(S){return S===void 0}function W(S){return S===null}function he(S){return typeof S=="symbol"}function T(S){return typeof S=="object"?S!==null:typeof S=="function"}function re(S,B){switch(Ut(S)){case 0:return S;case 1:return S;case 2:return S;case 3:return S;case 4:return S;case 5:return S}var _=B===3?"string":B===5?"number":"default",j=Uf(S,o);if(j!==void 0){var G=j.call(S,_);if(T(G))throw new TypeError;return G}return ye(S,_==="default"?"number":_)}function ye(S,B){if(B==="string"){var _=S.toString;if(K(_)){var j=_.call(S);if(!T(j))return j}var G=S.valueOf;if(K(G)){var j=G.call(S);if(!T(j))return j}}else{var G=S.valueOf;if(K(G)){var j=G.call(S);if(!T(j))return j}var _e=S.toString;if(K(_e)){var j=_e.call(S);if(!T(j))return j}}throw new TypeError}function De(S){return!!S}function _t(S){return""+S}function Y(S){var B=re(S,3);return he(B)?B:_t(B)}function Ae(S){return Array.isArray?Array.isArray(S):S instanceof Object?S instanceof Array:Object.prototype.toString.call(S)==="[object Array]"}function K(S){return typeof S=="function"}function we(S){return typeof S=="function"}function Lr(S){switch(Ut(S)){case 3:return!0;case 4:return!0;default:return!1}}function Uf(S,B){var _=S[B];if(_!=null){if(!K(_))throw new TypeError;return _}}function rb(S){var B=Uf(S,s);if(!K(B))throw new TypeError;var _=B.call(S);if(!T(_))throw new TypeError;return _}function ib(S){return S.value}function nb(S){var B=S.next();return B.done?!1:B}function ob(S){var B=S.return;B&&B.call(S)}function Ha(S){var B=Object.getPrototypeOf(S);if(typeof S!="function"||S===p||B!==p)return B;var _=S.prototype,j=_&&Object.getPrototypeOf(_);if(j==null||j===Object.prototype)return B;var G=j.constructor;return typeof G!="function"||G===S?B:G}function sb(){var S={},B=[],_=function(){function X(ee,J,oe){this._index=0,this._keys=ee,this._values=J,this._selector=oe}return X.prototype["@@iterator"]=function(){return this},X.prototype[s]=function(){return this},X.prototype.next=function(){var ee=this._index;if(ee>=0&&ee<this._keys.length){var J=this._selector(this._keys[ee],this._values[ee]);return ee+1>=this._keys.length?(this._index=-1,this._keys=B,this._values=B):this._index++,{value:J,done:!1}}return{value:void 0,done:!0}},X.prototype.throw=function(ee){throw this._index>=0&&(this._index=-1,this._keys=B,this._values=B),ee},X.prototype.return=function(ee){return this._index>=0&&(this._index=-1,this._keys=B,this._values=B),{value:ee,done:!0}},X}();return function(){function X(){this._keys=[],this._values=[],this._cacheKey=S,this._cacheIndex=-2}return Object.defineProperty(X.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),X.prototype.has=function(ee){return this._find(ee,!1)>=0},X.prototype.get=function(ee){var J=this._find(ee,!1);return J>=0?this._values[J]:void 0},X.prototype.set=function(ee,J){var oe=this._find(ee,!0);return this._values[oe]=J,this},X.prototype.delete=function(ee){var J=this._find(ee,!1);if(J>=0){for(var oe=this._keys.length,se=J+1;se<oe;se++)this._keys[se-1]=this._keys[se],this._values[se-1]=this._values[se];return this._keys.length--,this._values.length--,ee===this._cacheKey&&(this._cacheKey=S,this._cacheIndex=-2),!0}return!1},X.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=S,this._cacheIndex=-2},X.prototype.keys=function(){return new _(this._keys,this._values,j)},X.prototype.values=function(){return new _(this._keys,this._values,G)},X.prototype.entries=function(){return new _(this._keys,this._values,_e)},X.prototype["@@iterator"]=function(){return this.entries()},X.prototype[s]=function(){return this.entries()},X.prototype._find=function(ee,J){return this._cacheKey!==ee&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=ee)),this._cacheIndex<0&&J&&(this._cacheIndex=this._keys.length,this._keys.push(ee),this._values.push(void 0)),this._cacheIndex},X}();function j(X,ee){return X}function G(X,ee){return ee}function _e(X,ee){return[X,ee]}}function ab(){return function(){function S(){this._map=new A}return Object.defineProperty(S.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),S.prototype.has=function(B){return this._map.has(B)},S.prototype.add=function(B){return this._map.set(B,B),this},S.prototype.delete=function(B){return this._map.delete(B)},S.prototype.clear=function(){this._map.clear()},S.prototype.keys=function(){return this._map.keys()},S.prototype.values=function(){return this._map.values()},S.prototype.entries=function(){return this._map.entries()},S.prototype["@@iterator"]=function(){return this.keys()},S.prototype[s]=function(){return this.keys()},S}()}function cb(){var S=16,B=d.create(),_=j();return function(){function J(){this._key=j()}return J.prototype.has=function(oe){var se=G(oe,!1);return se!==void 0?d.has(se,this._key):!1},J.prototype.get=function(oe){var se=G(oe,!1);return se!==void 0?d.get(se,this._key):void 0},J.prototype.set=function(oe,se){var Lt=G(oe,!0);return Lt[this._key]=se,this},J.prototype.delete=function(oe){var se=G(oe,!1);return se!==void 0?delete se[this._key]:!1},J.prototype.clear=function(){this._key=j()},J}();function j(){var J;do J="@@WeakMap@@"+ee();while(d.has(B,J));return B[J]=!0,J}function G(J,oe){if(!r.call(J,_)){if(!oe)return;Object.defineProperty(J,_,{value:d.create()})}return J[_]}function _e(J,oe){for(var se=0;se<oe;++se)J[se]=Math.random()*255|0;return J}function X(J){return typeof Uint8Array=="function"?typeof crypto<"u"?crypto.getRandomValues(new Uint8Array(J)):typeof msCrypto<"u"?msCrypto.getRandomValues(new Uint8Array(J)):_e(new Uint8Array(J),J):_e(new Array(J),J)}function ee(){var J=X(S);J[6]=J[6]&79|64,J[8]=J[8]&191|128;for(var oe="",se=0;se<S;++se){var Lt=J[se];(se===4||se===6||se===8)&&(oe+="-"),Lt<16&&(oe+="0"),oe+=Lt.toString(16).toLowerCase()}return oe}}function Fa(S){return S.__=void 0,delete S.__,S}})})(qa||(qa={}));/*!
15
15
  * MIT License
16
16
  *
17
17
  * Copyright (c) 2017-2022 Peculiar Ventures, LLC
@@ -68,11 +68,11 @@
68
68
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
69
69
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
70
70
  *
71
- */function Ni(){if(typeof BigInt>"u")throw new Error("BigInt is not defined. Your environment doesn't implement BigInt.")}function fo(e){let t=0,r=0;for(let o=0;o<e.length;o++){const s=e[o];t+=s.byteLength}const i=new Uint8Array(t);for(let o=0;o<e.length;o++){const s=e[o];i.set(new Uint8Array(s),r),r+=s.byteLength}return i.buffer}function gt(e,t,r,i){return t instanceof Uint8Array?t.byteLength?r<0?(e.error="Wrong parameter: inputOffset less than zero",!1):i<0?(e.error="Wrong parameter: inputLength less than zero",!1):t.byteLength-r-i<0?(e.error="End of input reached before message was fully decoded (inconsistent offset and length values)",!1):!0:(e.error="Wrong parameter: inputBuffer has zero length",!1):(e.error="Wrong parameter: inputBuffer must be 'Uint8Array'",!1)}class _i{constructor(){this.items=[]}write(t){this.items.push(t)}final(){return fo(this.items)}}const Fr=[new Uint8Array([1])],Wa="0123456789",po="name",Ja="valueHexView",Xf="isHexOnly",ep="idBlock",tp="tagClass",rp="tagNumber",ip="isConstructed",np="fromBER",op="toBER",sp="local",Re="",tt=new ArrayBuffer(0),Oi=new Uint8Array(0),qr="EndOfContent",Ya="OCTET STRING",Za="BIT STRING";function ct(e){var t;return t=class extends e{constructor(...i){var o;super(...i);const s=i[0]||{};this.isHexOnly=(o=s.isHexOnly)!==null&&o!==void 0?o:!1,this.valueHexView=s.valueHex?D.toUint8Array(s.valueHex):Oi}get valueHex(){return this.valueHexView.slice().buffer}set valueHex(i){this.valueHexView=new Uint8Array(i)}fromBER(i,o,s){const a=i instanceof ArrayBuffer?new Uint8Array(i):i;if(!gt(this,a,o,s))return-1;const c=o+s;return this.valueHexView=a.subarray(o,c),this.valueHexView.length?(this.blockLength=s,c):(this.warnings.push("Zero buffer length"),o)}toBER(i=!1){return this.isHexOnly?i?new ArrayBuffer(this.valueHexView.byteLength):this.valueHexView.byteLength===this.valueHexView.buffer.byteLength?this.valueHexView.buffer:this.valueHexView.slice().buffer:(this.error="Flag 'isHexOnly' is not set, abort",tt)}toJSON(){return{...super.toJSON(),isHexOnly:this.isHexOnly,valueHex:R.ToHex(this.valueHexView)}}},t.NAME="hexBlock",t}class Ft{constructor({blockLength:t=0,error:r=Re,warnings:i=[],valueBeforeDecode:o=Oi}={}){this.blockLength=t,this.error=r,this.warnings=i,this.valueBeforeDecodeView=D.toUint8Array(o)}static blockName(){return this.NAME}get valueBeforeDecode(){return this.valueBeforeDecodeView.slice().buffer}set valueBeforeDecode(t){this.valueBeforeDecodeView=new Uint8Array(t)}toJSON(){return{blockName:this.constructor.NAME,blockLength:this.blockLength,error:this.error,warnings:this.warnings,valueBeforeDecode:R.ToHex(this.valueBeforeDecodeView)}}}Ft.NAME="baseBlock";class Pe extends Ft{fromBER(t,r,i){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")}toBER(t,r){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")}}Pe.NAME="valueBlock";class Qa extends ct(Ft){constructor({idBlock:t={}}={}){var r,i,o,s;super(),t?(this.isHexOnly=(r=t.isHexOnly)!==null&&r!==void 0?r:!1,this.valueHexView=t.valueHex?D.toUint8Array(t.valueHex):Oi,this.tagClass=(i=t.tagClass)!==null&&i!==void 0?i:-1,this.tagNumber=(o=t.tagNumber)!==null&&o!==void 0?o:-1,this.isConstructed=(s=t.isConstructed)!==null&&s!==void 0?s:!1):(this.tagClass=-1,this.tagNumber=-1,this.isConstructed=!1)}toBER(t=!1){let r=0;switch(this.tagClass){case 1:r|=0;break;case 2:r|=64;break;case 3:r|=128;break;case 4:r|=192;break;default:return this.error="Unknown tag class",tt}if(this.isConstructed&&(r|=32),this.tagNumber<31&&!this.isHexOnly){const o=new Uint8Array(1);if(!t){let s=this.tagNumber;s&=31,r|=s,o[0]=r}return o.buffer}if(!this.isHexOnly){const o=Ht(this.tagNumber,7),s=new Uint8Array(o),a=o.byteLength,c=new Uint8Array(a+1);if(c[0]=r|31,!t){for(let l=0;l<a-1;l++)c[l+1]=s[l]|128;c[a]=s[a-1]}return c.buffer}const i=new Uint8Array(this.valueHexView.byteLength+1);if(i[0]=r|31,!t){const o=this.valueHexView;for(let s=0;s<o.length-1;s++)i[s+1]=o[s]|128;i[this.valueHexView.byteLength]=o[o.length-1]}return i.buffer}fromBER(t,r,i){const o=D.toUint8Array(t);if(!gt(this,o,r,i))return-1;const s=o.subarray(r,r+i);if(s.length===0)return this.error="Zero buffer length",-1;switch(s[0]&192){case 0:this.tagClass=1;break;case 64:this.tagClass=2;break;case 128:this.tagClass=3;break;case 192:this.tagClass=4;break;default:return this.error="Unknown tag class",-1}this.isConstructed=(s[0]&32)===32,this.isHexOnly=!1;const c=s[0]&31;if(c!==31)this.tagNumber=c,this.blockLength=1;else{let l=1,d=this.valueHexView=new Uint8Array(255),p=255;for(;s[l]&128;){if(d[l-1]=s[l]&127,l++,l>=s.length)return this.error="End of input reached before message was fully decoded",-1;if(l===p){p+=255;const A=new Uint8Array(p);for(let C=0;C<d.length;C++)A[C]=d[C];d=this.valueHexView=new Uint8Array(p)}}this.blockLength=l+1,d[l-1]=s[l]&127;const y=new Uint8Array(l);for(let A=0;A<l;A++)y[A]=d[A];d=this.valueHexView=new Uint8Array(l),d.set(y),this.blockLength<=9?this.tagNumber=lr(d,7):(this.isHexOnly=!0,this.warnings.push("Tag too long, represented as hex-coded"))}if(this.tagClass===1&&this.isConstructed)switch(this.tagNumber){case 1:case 2:case 5:case 6:case 9:case 13:case 14:case 23:case 24:case 31:case 32:case 33:case 34:return this.error="Constructed encoding used for primitive type",-1}return r+this.blockLength}toJSON(){return{...super.toJSON(),tagClass:this.tagClass,tagNumber:this.tagNumber,isConstructed:this.isConstructed}}}Qa.NAME="identificationBlock";class Xa extends Ft{constructor({lenBlock:t={}}={}){var r,i,o;super(),this.isIndefiniteForm=(r=t.isIndefiniteForm)!==null&&r!==void 0?r:!1,this.longFormUsed=(i=t.longFormUsed)!==null&&i!==void 0?i:!1,this.length=(o=t.length)!==null&&o!==void 0?o:0}fromBER(t,r,i){const o=D.toUint8Array(t);if(!gt(this,o,r,i))return-1;const s=o.subarray(r,r+i);if(s.length===0)return this.error="Zero buffer length",-1;if(s[0]===255)return this.error="Length block 0xFF is reserved by standard",-1;if(this.isIndefiniteForm=s[0]===128,this.isIndefiniteForm)return this.blockLength=1,r+this.blockLength;if(this.longFormUsed=!!(s[0]&128),this.longFormUsed===!1)return this.length=s[0],this.blockLength=1,r+this.blockLength;const a=s[0]&127;if(a>8)return this.error="Too big integer",-1;if(a+1>s.length)return this.error="End of input reached before message was fully decoded",-1;const c=r+1,l=o.subarray(c,c+a);return l[a-1]===0&&this.warnings.push("Needlessly long encoded length"),this.length=lr(l,8),this.longFormUsed&&this.length<=127&&this.warnings.push("Unnecessary usage of long length form"),this.blockLength=a+1,r+this.blockLength}toBER(t=!1){let r,i;if(this.length>127&&(this.longFormUsed=!0),this.isIndefiniteForm)return r=new ArrayBuffer(1),t===!1&&(i=new Uint8Array(r),i[0]=128),r;if(this.longFormUsed){const o=Ht(this.length,8);if(o.byteLength>127)return this.error="Too big length",tt;if(r=new ArrayBuffer(o.byteLength+1),t)return r;const s=new Uint8Array(o);i=new Uint8Array(r),i[0]=o.byteLength|128;for(let a=0;a<o.byteLength;a++)i[a+1]=s[a];return r}return r=new ArrayBuffer(1),t===!1&&(i=new Uint8Array(r),i[0]=this.length),r}toJSON(){return{...super.toJSON(),isIndefiniteForm:this.isIndefiniteForm,longFormUsed:this.longFormUsed,length:this.length}}}Xa.NAME="lengthBlock";const $={};class Ee extends Ft{constructor({name:t=Re,optional:r=!1,primitiveSchema:i,...o}={},s){super(o),this.name=t,this.optional=r,i&&(this.primitiveSchema=i),this.idBlock=new Qa(o),this.lenBlock=new Xa(o),this.valueBlock=s?new s(o):new Pe(o)}fromBER(t,r,i){const o=this.valueBlock.fromBER(t,r,this.lenBlock.isIndefiniteForm?i:this.lenBlock.length);return o===-1?(this.error=this.valueBlock.error,o):(this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength),o)}toBER(t,r){const i=r||new _i;r||ec(this);const o=this.idBlock.toBER(t);if(i.write(o),this.lenBlock.isIndefiniteForm)i.write(new Uint8Array([128]).buffer),this.valueBlock.toBER(t,i),i.write(new ArrayBuffer(2));else{const s=this.valueBlock.toBER(t);this.lenBlock.length=s.byteLength;const a=this.lenBlock.toBER(t);i.write(a),i.write(s)}return r?tt:i.final()}toJSON(){const t={...super.toJSON(),idBlock:this.idBlock.toJSON(),lenBlock:this.lenBlock.toJSON(),valueBlock:this.valueBlock.toJSON(),name:this.name,optional:this.optional};return this.primitiveSchema&&(t.primitiveSchema=this.primitiveSchema.toJSON()),t}toString(t="ascii"){return t==="ascii"?this.onAsciiEncoding():R.ToHex(this.toBER())}onAsciiEncoding(){return`${this.constructor.NAME} : ${R.ToHex(this.valueBlock.valueBeforeDecodeView)}`}isEqual(t){if(this===t)return!0;if(!(t instanceof this.constructor))return!1;const r=this.toBER(),i=t.toBER();return Qf(r,i)}}Ee.NAME="BaseBlock";function ec(e){if(e instanceof $.Constructed)for(const t of e.valueBlock.value)ec(t)&&(e.lenBlock.isIndefiniteForm=!0);return!!e.lenBlock.isIndefiniteForm}class ho extends Ee{constructor({value:t=Re,...r}={},i){super(r,i),t&&this.fromString(t)}getValue(){return this.valueBlock.value}setValue(t){this.valueBlock.value=t}fromBER(t,r,i){const o=this.valueBlock.fromBER(t,r,this.lenBlock.isIndefiniteForm?i:this.lenBlock.length);return o===-1?(this.error=this.valueBlock.error,o):(this.fromBuffer(this.valueBlock.valueHexView),this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength),o)}onAsciiEncoding(){return`${this.constructor.NAME} : '${this.valueBlock.value}'`}}ho.NAME="BaseStringBlock";class tc extends ct(Pe){constructor({isHexOnly:t=!0,...r}={}){super(r),this.isHexOnly=t}}tc.NAME="PrimitiveValueBlock";var rc;class Kr extends Ee{constructor(t={}){super(t,tc),this.idBlock.isConstructed=!1}}rc=Kr,$.Primitive=rc,Kr.NAME="PRIMITIVE";function ap(e,t){if(e instanceof t)return e;const r=new t;return r.idBlock=e.idBlock,r.lenBlock=e.lenBlock,r.warnings=e.warnings,r.valueBeforeDecodeView=e.valueBeforeDecodeView,r}function ur(e,t=0,r=e.length){const i=t;let o=new Ee({},Pe);const s=new Ft;if(!gt(s,e,t,r))return o.error=s.error,{offset:-1,result:o};if(!e.subarray(t,t+r).length)return o.error="Zero buffer length",{offset:-1,result:o};let c=o.idBlock.fromBER(e,t,r);if(o.idBlock.warnings.length&&o.warnings.concat(o.idBlock.warnings),c===-1)return o.error=o.idBlock.error,{offset:-1,result:o};if(t=c,r-=o.idBlock.blockLength,c=o.lenBlock.fromBER(e,t,r),o.lenBlock.warnings.length&&o.warnings.concat(o.lenBlock.warnings),c===-1)return o.error=o.lenBlock.error,{offset:-1,result:o};if(t=c,r-=o.lenBlock.blockLength,!o.idBlock.isConstructed&&o.lenBlock.isIndefiniteForm)return o.error="Indefinite length form used for primitive encoding form",{offset:-1,result:o};let l=Ee;switch(o.idBlock.tagClass){case 1:if(o.idBlock.tagNumber>=37&&o.idBlock.isHexOnly===!1)return o.error="UNIVERSAL 37 and upper tags are reserved by ASN.1 standard",{offset:-1,result:o};switch(o.idBlock.tagNumber){case 0:if(o.idBlock.isConstructed&&o.lenBlock.length>0)return o.error="Type [UNIVERSAL 0] is reserved",{offset:-1,result:o};l=$.EndOfContent;break;case 1:l=$.Boolean;break;case 2:l=$.Integer;break;case 3:l=$.BitString;break;case 4:l=$.OctetString;break;case 5:l=$.Null;break;case 6:l=$.ObjectIdentifier;break;case 10:l=$.Enumerated;break;case 12:l=$.Utf8String;break;case 13:l=$.RelativeObjectIdentifier;break;case 14:l=$.TIME;break;case 15:return o.error="[UNIVERSAL 15] is reserved by ASN.1 standard",{offset:-1,result:o};case 16:l=$.Sequence;break;case 17:l=$.Set;break;case 18:l=$.NumericString;break;case 19:l=$.PrintableString;break;case 20:l=$.TeletexString;break;case 21:l=$.VideotexString;break;case 22:l=$.IA5String;break;case 23:l=$.UTCTime;break;case 24:l=$.GeneralizedTime;break;case 25:l=$.GraphicString;break;case 26:l=$.VisibleString;break;case 27:l=$.GeneralString;break;case 28:l=$.UniversalString;break;case 29:l=$.CharacterString;break;case 30:l=$.BmpString;break;case 31:l=$.DATE;break;case 32:l=$.TimeOfDay;break;case 33:l=$.DateTime;break;case 34:l=$.Duration;break;default:{const d=o.idBlock.isConstructed?new $.Constructed:new $.Primitive;d.idBlock=o.idBlock,d.lenBlock=o.lenBlock,d.warnings=o.warnings,o=d}}break;case 2:case 3:case 4:default:l=o.idBlock.isConstructed?$.Constructed:$.Primitive}return o=ap(o,l),c=o.fromBER(e,t,o.lenBlock.isIndefiniteForm?r:o.lenBlock.length),o.valueBeforeDecodeView=e.subarray(i,i+o.blockLength),{offset:c,result:o}}function dr(e){if(!e.byteLength){const t=new Ee({},Pe);return t.error="Input buffer has zero length",{offset:-1,result:t}}return ur(D.toUint8Array(e).slice(),0,e.byteLength)}function cp(e,t){return e?1:t}class Ot extends Pe{constructor({value:t=[],isIndefiniteForm:r=!1,...i}={}){super(i),this.value=t,this.isIndefiniteForm=r}fromBER(t,r,i){const o=D.toUint8Array(t);if(!gt(this,o,r,i))return-1;if(this.valueBeforeDecodeView=o.subarray(r,r+i),this.valueBeforeDecodeView.length===0)return this.warnings.push("Zero buffer length"),r;let s=r;for(;cp(this.isIndefiniteForm,i)>0;){const a=ur(o,s,i);if(a.offset===-1)return this.error=a.result.error,this.warnings.concat(a.result.warnings),-1;if(s=a.offset,this.blockLength+=a.result.blockLength,i-=a.result.blockLength,this.value.push(a.result),this.isIndefiniteForm&&a.result.constructor.NAME===qr)break}return this.isIndefiniteForm&&(this.value[this.value.length-1].constructor.NAME===qr?this.value.pop():this.warnings.push("No EndOfContent block encoded")),s}toBER(t,r){const i=r||new _i;for(let o=0;o<this.value.length;o++)this.value[o].toBER(t,i);return r?tt:i.final()}toJSON(){const t={...super.toJSON(),isIndefiniteForm:this.isIndefiniteForm,value:[]};for(const r of this.value)t.value.push(r.toJSON());return t}}Ot.NAME="ConstructedValueBlock";var ic;class Ue extends Ee{constructor(t={}){super(t,Ot),this.idBlock.isConstructed=!0}fromBER(t,r,i){this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm;const o=this.valueBlock.fromBER(t,r,this.lenBlock.isIndefiniteForm?i:this.lenBlock.length);return o===-1?(this.error=this.valueBlock.error,o):(this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength),o)}onAsciiEncoding(){const t=[];for(const i of this.valueBlock.value)t.push(i.toString("ascii").split(`
71
+ */function Ni(){if(typeof BigInt>"u")throw new Error("BigInt is not defined. Your environment doesn't implement BigInt.")}function fo(e){let t=0,r=0;for(let o=0;o<e.length;o++){const s=e[o];t+=s.byteLength}const i=new Uint8Array(t);for(let o=0;o<e.length;o++){const s=e[o];i.set(new Uint8Array(s),r),r+=s.byteLength}return i.buffer}function gt(e,t,r,i){return t instanceof Uint8Array?t.byteLength?r<0?(e.error="Wrong parameter: inputOffset less than zero",!1):i<0?(e.error="Wrong parameter: inputLength less than zero",!1):t.byteLength-r-i<0?(e.error="End of input reached before message was fully decoded (inconsistent offset and length values)",!1):!0:(e.error="Wrong parameter: inputBuffer has zero length",!1):(e.error="Wrong parameter: inputBuffer must be 'Uint8Array'",!1)}class _i{constructor(){this.items=[]}write(t){this.items.push(t)}final(){return fo(this.items)}}const Fr=[new Uint8Array([1])],Wa="0123456789",po="name",Ja="valueHexView",Xf="isHexOnly",ep="idBlock",tp="tagClass",rp="tagNumber",ip="isConstructed",np="fromBER",op="toBER",sp="local",Re="",tt=new ArrayBuffer(0),Oi=new Uint8Array(0),qr="EndOfContent",Ya="OCTET STRING",Za="BIT STRING";function ct(e){var t;return t=class extends e{constructor(...i){var o;super(...i);const s=i[0]||{};this.isHexOnly=(o=s.isHexOnly)!==null&&o!==void 0?o:!1,this.valueHexView=s.valueHex?D.toUint8Array(s.valueHex):Oi}get valueHex(){return this.valueHexView.slice().buffer}set valueHex(i){this.valueHexView=new Uint8Array(i)}fromBER(i,o,s){const a=i instanceof ArrayBuffer?new Uint8Array(i):i;if(!gt(this,a,o,s))return-1;const c=o+s;return this.valueHexView=a.subarray(o,c),this.valueHexView.length?(this.blockLength=s,c):(this.warnings.push("Zero buffer length"),o)}toBER(i=!1){return this.isHexOnly?i?new ArrayBuffer(this.valueHexView.byteLength):this.valueHexView.byteLength===this.valueHexView.buffer.byteLength?this.valueHexView.buffer:this.valueHexView.slice().buffer:(this.error="Flag 'isHexOnly' is not set, abort",tt)}toJSON(){return{...super.toJSON(),isHexOnly:this.isHexOnly,valueHex:R.ToHex(this.valueHexView)}}},t.NAME="hexBlock",t}class Ft{constructor({blockLength:t=0,error:r=Re,warnings:i=[],valueBeforeDecode:o=Oi}={}){this.blockLength=t,this.error=r,this.warnings=i,this.valueBeforeDecodeView=D.toUint8Array(o)}static blockName(){return this.NAME}get valueBeforeDecode(){return this.valueBeforeDecodeView.slice().buffer}set valueBeforeDecode(t){this.valueBeforeDecodeView=new Uint8Array(t)}toJSON(){return{blockName:this.constructor.NAME,blockLength:this.blockLength,error:this.error,warnings:this.warnings,valueBeforeDecode:R.ToHex(this.valueBeforeDecodeView)}}}Ft.NAME="baseBlock";class Pe extends Ft{fromBER(t,r,i){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")}toBER(t,r){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")}}Pe.NAME="valueBlock";class Qa extends ct(Ft){constructor({idBlock:t={}}={}){var r,i,o,s;super(),t?(this.isHexOnly=(r=t.isHexOnly)!==null&&r!==void 0?r:!1,this.valueHexView=t.valueHex?D.toUint8Array(t.valueHex):Oi,this.tagClass=(i=t.tagClass)!==null&&i!==void 0?i:-1,this.tagNumber=(o=t.tagNumber)!==null&&o!==void 0?o:-1,this.isConstructed=(s=t.isConstructed)!==null&&s!==void 0?s:!1):(this.tagClass=-1,this.tagNumber=-1,this.isConstructed=!1)}toBER(t=!1){let r=0;switch(this.tagClass){case 1:r|=0;break;case 2:r|=64;break;case 3:r|=128;break;case 4:r|=192;break;default:return this.error="Unknown tag class",tt}if(this.isConstructed&&(r|=32),this.tagNumber<31&&!this.isHexOnly){const o=new Uint8Array(1);if(!t){let s=this.tagNumber;s&=31,r|=s,o[0]=r}return o.buffer}if(!this.isHexOnly){const o=Ht(this.tagNumber,7),s=new Uint8Array(o),a=o.byteLength,c=new Uint8Array(a+1);if(c[0]=r|31,!t){for(let l=0;l<a-1;l++)c[l+1]=s[l]|128;c[a]=s[a-1]}return c.buffer}const i=new Uint8Array(this.valueHexView.byteLength+1);if(i[0]=r|31,!t){const o=this.valueHexView;for(let s=0;s<o.length-1;s++)i[s+1]=o[s]|128;i[this.valueHexView.byteLength]=o[o.length-1]}return i.buffer}fromBER(t,r,i){const o=D.toUint8Array(t);if(!gt(this,o,r,i))return-1;const s=o.subarray(r,r+i);if(s.length===0)return this.error="Zero buffer length",-1;switch(s[0]&192){case 0:this.tagClass=1;break;case 64:this.tagClass=2;break;case 128:this.tagClass=3;break;case 192:this.tagClass=4;break;default:return this.error="Unknown tag class",-1}this.isConstructed=(s[0]&32)===32,this.isHexOnly=!1;const c=s[0]&31;if(c!==31)this.tagNumber=c,this.blockLength=1;else{let l=1,d=this.valueHexView=new Uint8Array(255),p=255;for(;s[l]&128;){if(d[l-1]=s[l]&127,l++,l>=s.length)return this.error="End of input reached before message was fully decoded",-1;if(l===p){p+=255;const A=new Uint8Array(p);for(let C=0;C<d.length;C++)A[C]=d[C];d=this.valueHexView=new Uint8Array(p)}}this.blockLength=l+1,d[l-1]=s[l]&127;const y=new Uint8Array(l);for(let A=0;A<l;A++)y[A]=d[A];d=this.valueHexView=new Uint8Array(l),d.set(y),this.blockLength<=9?this.tagNumber=lr(d,7):(this.isHexOnly=!0,this.warnings.push("Tag too long, represented as hex-coded"))}if(this.tagClass===1&&this.isConstructed)switch(this.tagNumber){case 1:case 2:case 5:case 6:case 9:case 13:case 14:case 23:case 24:case 31:case 32:case 33:case 34:return this.error="Constructed encoding used for primitive type",-1}return r+this.blockLength}toJSON(){return{...super.toJSON(),tagClass:this.tagClass,tagNumber:this.tagNumber,isConstructed:this.isConstructed}}}Qa.NAME="identificationBlock";class Xa extends Ft{constructor({lenBlock:t={}}={}){var r,i,o;super(),this.isIndefiniteForm=(r=t.isIndefiniteForm)!==null&&r!==void 0?r:!1,this.longFormUsed=(i=t.longFormUsed)!==null&&i!==void 0?i:!1,this.length=(o=t.length)!==null&&o!==void 0?o:0}fromBER(t,r,i){const o=D.toUint8Array(t);if(!gt(this,o,r,i))return-1;const s=o.subarray(r,r+i);if(s.length===0)return this.error="Zero buffer length",-1;if(s[0]===255)return this.error="Length block 0xFF is reserved by standard",-1;if(this.isIndefiniteForm=s[0]===128,this.isIndefiniteForm)return this.blockLength=1,r+this.blockLength;if(this.longFormUsed=!!(s[0]&128),this.longFormUsed===!1)return this.length=s[0],this.blockLength=1,r+this.blockLength;const a=s[0]&127;if(a>8)return this.error="Too big integer",-1;if(a+1>s.length)return this.error="End of input reached before message was fully decoded",-1;const c=r+1,l=o.subarray(c,c+a);return l[a-1]===0&&this.warnings.push("Needlessly long encoded length"),this.length=lr(l,8),this.longFormUsed&&this.length<=127&&this.warnings.push("Unnecessary usage of long length form"),this.blockLength=a+1,r+this.blockLength}toBER(t=!1){let r,i;if(this.length>127&&(this.longFormUsed=!0),this.isIndefiniteForm)return r=new ArrayBuffer(1),t===!1&&(i=new Uint8Array(r),i[0]=128),r;if(this.longFormUsed){const o=Ht(this.length,8);if(o.byteLength>127)return this.error="Too big length",tt;if(r=new ArrayBuffer(o.byteLength+1),t)return r;const s=new Uint8Array(o);i=new Uint8Array(r),i[0]=o.byteLength|128;for(let a=0;a<o.byteLength;a++)i[a+1]=s[a];return r}return r=new ArrayBuffer(1),t===!1&&(i=new Uint8Array(r),i[0]=this.length),r}toJSON(){return{...super.toJSON(),isIndefiniteForm:this.isIndefiniteForm,longFormUsed:this.longFormUsed,length:this.length}}}Xa.NAME="lengthBlock";const $={};class Ie extends Ft{constructor({name:t=Re,optional:r=!1,primitiveSchema:i,...o}={},s){super(o),this.name=t,this.optional=r,i&&(this.primitiveSchema=i),this.idBlock=new Qa(o),this.lenBlock=new Xa(o),this.valueBlock=s?new s(o):new Pe(o)}fromBER(t,r,i){const o=this.valueBlock.fromBER(t,r,this.lenBlock.isIndefiniteForm?i:this.lenBlock.length);return o===-1?(this.error=this.valueBlock.error,o):(this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength),o)}toBER(t,r){const i=r||new _i;r||ec(this);const o=this.idBlock.toBER(t);if(i.write(o),this.lenBlock.isIndefiniteForm)i.write(new Uint8Array([128]).buffer),this.valueBlock.toBER(t,i),i.write(new ArrayBuffer(2));else{const s=this.valueBlock.toBER(t);this.lenBlock.length=s.byteLength;const a=this.lenBlock.toBER(t);i.write(a),i.write(s)}return r?tt:i.final()}toJSON(){const t={...super.toJSON(),idBlock:this.idBlock.toJSON(),lenBlock:this.lenBlock.toJSON(),valueBlock:this.valueBlock.toJSON(),name:this.name,optional:this.optional};return this.primitiveSchema&&(t.primitiveSchema=this.primitiveSchema.toJSON()),t}toString(t="ascii"){return t==="ascii"?this.onAsciiEncoding():R.ToHex(this.toBER())}onAsciiEncoding(){return`${this.constructor.NAME} : ${R.ToHex(this.valueBlock.valueBeforeDecodeView)}`}isEqual(t){if(this===t)return!0;if(!(t instanceof this.constructor))return!1;const r=this.toBER(),i=t.toBER();return Qf(r,i)}}Ie.NAME="BaseBlock";function ec(e){if(e instanceof $.Constructed)for(const t of e.valueBlock.value)ec(t)&&(e.lenBlock.isIndefiniteForm=!0);return!!e.lenBlock.isIndefiniteForm}class ho extends Ie{constructor({value:t=Re,...r}={},i){super(r,i),t&&this.fromString(t)}getValue(){return this.valueBlock.value}setValue(t){this.valueBlock.value=t}fromBER(t,r,i){const o=this.valueBlock.fromBER(t,r,this.lenBlock.isIndefiniteForm?i:this.lenBlock.length);return o===-1?(this.error=this.valueBlock.error,o):(this.fromBuffer(this.valueBlock.valueHexView),this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength),o)}onAsciiEncoding(){return`${this.constructor.NAME} : '${this.valueBlock.value}'`}}ho.NAME="BaseStringBlock";class tc extends ct(Pe){constructor({isHexOnly:t=!0,...r}={}){super(r),this.isHexOnly=t}}tc.NAME="PrimitiveValueBlock";var rc;class Kr extends Ie{constructor(t={}){super(t,tc),this.idBlock.isConstructed=!1}}rc=Kr,$.Primitive=rc,Kr.NAME="PRIMITIVE";function ap(e,t){if(e instanceof t)return e;const r=new t;return r.idBlock=e.idBlock,r.lenBlock=e.lenBlock,r.warnings=e.warnings,r.valueBeforeDecodeView=e.valueBeforeDecodeView,r}function ur(e,t=0,r=e.length){const i=t;let o=new Ie({},Pe);const s=new Ft;if(!gt(s,e,t,r))return o.error=s.error,{offset:-1,result:o};if(!e.subarray(t,t+r).length)return o.error="Zero buffer length",{offset:-1,result:o};let c=o.idBlock.fromBER(e,t,r);if(o.idBlock.warnings.length&&o.warnings.concat(o.idBlock.warnings),c===-1)return o.error=o.idBlock.error,{offset:-1,result:o};if(t=c,r-=o.idBlock.blockLength,c=o.lenBlock.fromBER(e,t,r),o.lenBlock.warnings.length&&o.warnings.concat(o.lenBlock.warnings),c===-1)return o.error=o.lenBlock.error,{offset:-1,result:o};if(t=c,r-=o.lenBlock.blockLength,!o.idBlock.isConstructed&&o.lenBlock.isIndefiniteForm)return o.error="Indefinite length form used for primitive encoding form",{offset:-1,result:o};let l=Ie;switch(o.idBlock.tagClass){case 1:if(o.idBlock.tagNumber>=37&&o.idBlock.isHexOnly===!1)return o.error="UNIVERSAL 37 and upper tags are reserved by ASN.1 standard",{offset:-1,result:o};switch(o.idBlock.tagNumber){case 0:if(o.idBlock.isConstructed&&o.lenBlock.length>0)return o.error="Type [UNIVERSAL 0] is reserved",{offset:-1,result:o};l=$.EndOfContent;break;case 1:l=$.Boolean;break;case 2:l=$.Integer;break;case 3:l=$.BitString;break;case 4:l=$.OctetString;break;case 5:l=$.Null;break;case 6:l=$.ObjectIdentifier;break;case 10:l=$.Enumerated;break;case 12:l=$.Utf8String;break;case 13:l=$.RelativeObjectIdentifier;break;case 14:l=$.TIME;break;case 15:return o.error="[UNIVERSAL 15] is reserved by ASN.1 standard",{offset:-1,result:o};case 16:l=$.Sequence;break;case 17:l=$.Set;break;case 18:l=$.NumericString;break;case 19:l=$.PrintableString;break;case 20:l=$.TeletexString;break;case 21:l=$.VideotexString;break;case 22:l=$.IA5String;break;case 23:l=$.UTCTime;break;case 24:l=$.GeneralizedTime;break;case 25:l=$.GraphicString;break;case 26:l=$.VisibleString;break;case 27:l=$.GeneralString;break;case 28:l=$.UniversalString;break;case 29:l=$.CharacterString;break;case 30:l=$.BmpString;break;case 31:l=$.DATE;break;case 32:l=$.TimeOfDay;break;case 33:l=$.DateTime;break;case 34:l=$.Duration;break;default:{const d=o.idBlock.isConstructed?new $.Constructed:new $.Primitive;d.idBlock=o.idBlock,d.lenBlock=o.lenBlock,d.warnings=o.warnings,o=d}}break;case 2:case 3:case 4:default:l=o.idBlock.isConstructed?$.Constructed:$.Primitive}return o=ap(o,l),c=o.fromBER(e,t,o.lenBlock.isIndefiniteForm?r:o.lenBlock.length),o.valueBeforeDecodeView=e.subarray(i,i+o.blockLength),{offset:c,result:o}}function dr(e){if(!e.byteLength){const t=new Ie({},Pe);return t.error="Input buffer has zero length",{offset:-1,result:t}}return ur(D.toUint8Array(e).slice(),0,e.byteLength)}function cp(e,t){return e?1:t}class Ot extends Pe{constructor({value:t=[],isIndefiniteForm:r=!1,...i}={}){super(i),this.value=t,this.isIndefiniteForm=r}fromBER(t,r,i){const o=D.toUint8Array(t);if(!gt(this,o,r,i))return-1;if(this.valueBeforeDecodeView=o.subarray(r,r+i),this.valueBeforeDecodeView.length===0)return this.warnings.push("Zero buffer length"),r;let s=r;for(;cp(this.isIndefiniteForm,i)>0;){const a=ur(o,s,i);if(a.offset===-1)return this.error=a.result.error,this.warnings.concat(a.result.warnings),-1;if(s=a.offset,this.blockLength+=a.result.blockLength,i-=a.result.blockLength,this.value.push(a.result),this.isIndefiniteForm&&a.result.constructor.NAME===qr)break}return this.isIndefiniteForm&&(this.value[this.value.length-1].constructor.NAME===qr?this.value.pop():this.warnings.push("No EndOfContent block encoded")),s}toBER(t,r){const i=r||new _i;for(let o=0;o<this.value.length;o++)this.value[o].toBER(t,i);return r?tt:i.final()}toJSON(){const t={...super.toJSON(),isIndefiniteForm:this.isIndefiniteForm,value:[]};for(const r of this.value)t.value.push(r.toJSON());return t}}Ot.NAME="ConstructedValueBlock";var ic;class Ue extends Ie{constructor(t={}){super(t,Ot),this.idBlock.isConstructed=!0}fromBER(t,r,i){this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm;const o=this.valueBlock.fromBER(t,r,this.lenBlock.isIndefiniteForm?i:this.lenBlock.length);return o===-1?(this.error=this.valueBlock.error,o):(this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength),o)}onAsciiEncoding(){const t=[];for(const i of this.valueBlock.value)t.push(i.toString("ascii").split(`
72
72
  `).map(o=>` ${o}`).join(`
73
73
  `));const r=this.idBlock.tagClass===3?`[${this.idBlock.tagNumber}]`:this.constructor.NAME;return t.length?`${r} :
74
74
  ${t.join(`
75
- `)}`:`${r} :`}}ic=Ue,$.Constructed=ic,Ue.NAME="CONSTRUCTED";class nc extends Pe{fromBER(t,r,i){return r}toBER(t){return tt}}nc.override="EndOfContentValueBlock";var oc;class yo extends Ee{constructor(t={}){super(t,nc),this.idBlock.tagClass=1,this.idBlock.tagNumber=0}}oc=yo,$.EndOfContent=oc,yo.NAME=qr;var sc;class qt extends Ee{constructor(t={}){super(t,Pe),this.idBlock.tagClass=1,this.idBlock.tagNumber=5}fromBER(t,r,i){return this.lenBlock.length>0&&this.warnings.push("Non-zero length of value block for Null type"),this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.blockLength+=i,r+i>t.byteLength?(this.error="End of input reached before message was fully decoded (inconsistent offset and length values)",-1):r+i}toBER(t,r){const i=new ArrayBuffer(2);if(!t){const o=new Uint8Array(i);o[0]=5,o[1]=0}return r&&r.write(i),i}onAsciiEncoding(){return`${this.constructor.NAME}`}}sc=qt,$.Null=sc,qt.NAME="NULL";class ac extends ct(Pe){constructor({value:t,...r}={}){super(r),r.valueHex?this.valueHexView=D.toUint8Array(r.valueHex):this.valueHexView=new Uint8Array(1),t&&(this.value=t)}get value(){for(const t of this.valueHexView)if(t>0)return!0;return!1}set value(t){this.valueHexView[0]=t?255:0}fromBER(t,r,i){const o=D.toUint8Array(t);return gt(this,o,r,i)?(this.valueHexView=o.subarray(r,r+i),i>1&&this.warnings.push("Boolean value encoded in more then 1 octet"),this.isHexOnly=!0,Ga.call(this),this.blockLength=i,r+i):-1}toBER(){return this.valueHexView.slice()}toJSON(){return{...super.toJSON(),value:this.value}}}ac.NAME="BooleanValueBlock";var cc;let Ti=class extends Ee{constructor(t={}){super(t,ac),this.idBlock.tagClass=1,this.idBlock.tagNumber=1}getValue(){return this.valueBlock.value}setValue(t){this.valueBlock.value=t}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.getValue}`}};cc=Ti,$.Boolean=cc,Ti.NAME="BOOLEAN";class lc extends ct(Ot){constructor({isConstructed:t=!1,...r}={}){super(r),this.isConstructed=t}fromBER(t,r,i){let o=0;if(this.isConstructed){if(this.isHexOnly=!1,o=Ot.prototype.fromBER.call(this,t,r,i),o===-1)return o;for(let s=0;s<this.value.length;s++){const a=this.value[s].constructor.NAME;if(a===qr){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, OCTET STRING may consists of OCTET STRINGs only",-1}if(a!==Ya)return this.error="OCTET STRING may consists of OCTET STRINGs only",-1}}else this.isHexOnly=!0,o=super.fromBER(t,r,i),this.blockLength=i;return o}toBER(t,r){return this.isConstructed?Ot.prototype.toBER.call(this,t,r):t?new ArrayBuffer(this.valueHexView.byteLength):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),isConstructed:this.isConstructed}}}lc.NAME="OctetStringValueBlock";var uc;let Kt=class Hf extends Ee{constructor({idBlock:t={},lenBlock:r={},...i}={}){var o,s;(o=i.isConstructed)!==null&&o!==void 0||(i.isConstructed=!!(!((s=i.value)===null||s===void 0)&&s.length)),super({idBlock:{isConstructed:i.isConstructed,...t},lenBlock:{...r,isIndefiniteForm:!!i.isIndefiniteForm},...i},lc),this.idBlock.tagClass=1,this.idBlock.tagNumber=4}fromBER(t,r,i){if(this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,i===0)return this.idBlock.error.length===0&&(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length===0&&(this.blockLength+=this.lenBlock.blockLength),r;if(!this.valueBlock.isConstructed){const s=(t instanceof ArrayBuffer?new Uint8Array(t):t).subarray(r,r+i);try{if(s.byteLength){const a=ur(s,0,s.byteLength);a.offset!==-1&&a.offset===i&&(this.valueBlock.value=[a.result])}}catch{}}return super.fromBER(t,r,i)}onAsciiEncoding(){return this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length?Ue.prototype.onAsciiEncoding.call(this):`${this.constructor.NAME} : ${R.ToHex(this.valueBlock.valueHexView)}`}getValue(){if(!this.idBlock.isConstructed)return this.valueBlock.valueHexView.slice().buffer;const t=[];for(const r of this.valueBlock.value)r instanceof Hf&&t.push(r.valueBlock.valueHexView);return D.concat(t)}};uc=Kt,$.OctetString=uc,Kt.NAME=Ya;class dc extends ct(Ot){constructor({unusedBits:t=0,isConstructed:r=!1,...i}={}){super(i),this.unusedBits=t,this.isConstructed=r,this.blockLength=this.valueHexView.byteLength}fromBER(t,r,i){if(!i)return r;let o=-1;if(this.isConstructed){if(o=Ot.prototype.fromBER.call(this,t,r,i),o===-1)return o;for(const c of this.value){const l=c.constructor.NAME;if(l===qr){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, BIT STRING may consists of BIT STRINGs only",-1}if(l!==Za)return this.error="BIT STRING may consists of BIT STRINGs only",-1;const d=c.valueBlock;if(this.unusedBits>0&&d.unusedBits>0)return this.error='Using of "unused bits" inside constructive BIT STRING allowed for least one only',-1;this.unusedBits=d.unusedBits}return o}const s=D.toUint8Array(t);if(!gt(this,s,r,i))return-1;const a=s.subarray(r,r+i);if(this.unusedBits=a[0],this.unusedBits>7)return this.error="Unused bits for BitString must be in range 0-7",-1;if(!this.unusedBits){const c=a.subarray(1);try{if(c.byteLength){const l=ur(c,0,c.byteLength);l.offset!==-1&&l.offset===i-1&&(this.value=[l.result])}}catch{}}return this.valueHexView=a.subarray(1),this.blockLength=a.length,r+i}toBER(t,r){if(this.isConstructed)return Ot.prototype.toBER.call(this,t,r);if(t)return new ArrayBuffer(this.valueHexView.byteLength+1);if(!this.valueHexView.byteLength)return tt;const i=new Uint8Array(this.valueHexView.length+1);return i[0]=this.unusedBits,i.set(this.valueHexView,1),i.buffer}toJSON(){return{...super.toJSON(),unusedBits:this.unusedBits,isConstructed:this.isConstructed}}}dc.NAME="BitStringValueBlock";var fc;let zt=class extends Ee{constructor({idBlock:t={},lenBlock:r={},...i}={}){var o,s;(o=i.isConstructed)!==null&&o!==void 0||(i.isConstructed=!!(!((s=i.value)===null||s===void 0)&&s.length)),super({idBlock:{isConstructed:i.isConstructed,...t},lenBlock:{...r,isIndefiniteForm:!!i.isIndefiniteForm},...i},dc),this.idBlock.tagClass=1,this.idBlock.tagNumber=3}fromBER(t,r,i){return this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,super.fromBER(t,r,i)}onAsciiEncoding(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length)return Ue.prototype.onAsciiEncoding.call(this);{const t=[],r=this.valueBlock.valueHexView;for(const o of r)t.push(o.toString(2).padStart(8,"0"));const i=t.join("");return`${this.constructor.NAME} : ${i.substring(0,i.length-this.valueBlock.unusedBits)}`}}};fc=zt,$.BitString=fc,zt.NAME=Za;var pc;function lp(e,t){const r=new Uint8Array([0]),i=new Uint8Array(e),o=new Uint8Array(t);let s=i.slice(0);const a=s.length-1,c=o.slice(0),l=c.length-1;let d=0;const p=l<a?a:l;let y=0;for(let A=p;A>=0;A--,y++){switch(!0){case y<c.length:d=s[a-y]+c[l-y]+r[0];break;default:d=s[a-y]+r[0]}switch(r[0]=d/10,!0){case y>=s.length:s=uo(new Uint8Array([d%10]),s);break;default:s[a-y]=d%10}}return r[0]>0&&(s=uo(r,s)),s}function hc(e){if(e>=Fr.length)for(let t=Fr.length;t<=e;t++){const r=new Uint8Array([0]);let i=Fr[t-1].slice(0);for(let o=i.length-1;o>=0;o--){const s=new Uint8Array([(i[o]<<1)+r[0]]);r[0]=s[0]/10,i[o]=s[0]%10}r[0]>0&&(i=uo(r,i)),Fr.push(i)}return Fr[e]}function up(e,t){let r=0;const i=new Uint8Array(e),o=new Uint8Array(t),s=i.slice(0),a=s.length-1,c=o.slice(0),l=c.length-1;let d,p=0;for(let y=l;y>=0;y--,p++)switch(d=s[a-p]-c[l-p]-r,!0){case d<0:r=1,s[a-p]=d+10;break;default:r=0,s[a-p]=d}if(r>0)for(let y=a-l+1;y>=0;y--,p++)if(d=s[a-p]-r,d<0)r=1,s[a-p]=d+10;else{r=0,s[a-p]=d;break}return s.slice()}class go extends ct(Pe){constructor({value:t,...r}={}){super(r),this._valueDec=0,r.valueHex&&this.setValueHex(),t!==void 0&&(this.valueDec=t)}setValueHex(){this.valueHexView.length>=4?(this.warnings.push("Too big Integer for decoding, hex only"),this.isHexOnly=!0,this._valueDec=0):(this.isHexOnly=!1,this.valueHexView.length>0&&(this._valueDec=Ga.call(this)))}set valueDec(t){this._valueDec=t,this.isHexOnly=!1,this.valueHexView=new Uint8Array(Zf(t))}get valueDec(){return this._valueDec}fromDER(t,r,i,o=0){const s=this.fromBER(t,r,i);if(s===-1)return s;const a=this.valueHexView;return a[0]===0&&a[1]&128?this.valueHexView=a.subarray(1):o!==0&&a.length<o&&(o-a.length>1&&(o=a.length+1),this.valueHexView=a.subarray(o-a.length)),s}toDER(t=!1){const r=this.valueHexView;switch(!0){case(r[0]&128)!==0:{const i=new Uint8Array(this.valueHexView.length+1);i[0]=0,i.set(r,1),this.valueHexView=i}break;case(r[0]===0&&(r[1]&128)===0):this.valueHexView=this.valueHexView.subarray(1);break}return this.toBER(t)}fromBER(t,r,i){const o=super.fromBER(t,r,i);return o===-1||this.setValueHex(),o}toBER(t){return t?new ArrayBuffer(this.valueHexView.length):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}toString(){const t=this.valueHexView.length*8-1;let r=new Uint8Array(this.valueHexView.length*8/3),i=0,o;const s=this.valueHexView;let a="",c=!1;for(let l=s.byteLength-1;l>=0;l--){o=s[l];for(let d=0;d<8;d++){if((o&1)===1)switch(i){case t:r=up(hc(i),r),a="-";break;default:r=lp(r,hc(i))}i++,o>>=1}}for(let l=0;l<r.length;l++)r[l]&&(c=!0),c&&(a+=Wa.charAt(r[l]));return c===!1&&(a+=Wa.charAt(0)),a}}pc=go,go.NAME="IntegerValueBlock",Object.defineProperty(pc.prototype,"valueHex",{set:function(e){this.valueHexView=new Uint8Array(e),this.setValueHex()},get:function(){return this.valueHexView.slice().buffer}});var yc;class lt extends Ee{constructor(t={}){super(t,go),this.idBlock.tagClass=1,this.idBlock.tagNumber=2}toBigInt(){return Ni(),BigInt(this.valueBlock.toString())}static fromBigInt(t){Ni();const r=BigInt(t),i=new _i,o=r.toString(16).replace(/^-/,""),s=new Uint8Array(R.FromHex(o));if(r<0){const c=new Uint8Array(s.length+(s[0]&128?1:0));c[0]|=128;const d=BigInt(`0x${R.ToHex(c)}`)+r,p=D.toUint8Array(R.FromHex(d.toString(16)));p[0]|=128,i.write(p)}else s[0]&128&&i.write(new Uint8Array([0])),i.write(s);return new lt({valueHex:i.final()})}convertToDER(){const t=new lt({valueHex:this.valueBlock.valueHexView});return t.valueBlock.toDER(),t}convertFromDER(){return new lt({valueHex:this.valueBlock.valueHexView[0]===0?this.valueBlock.valueHexView.subarray(1):this.valueBlock.valueHexView})}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()}`}}yc=lt,$.Integer=yc,lt.NAME="INTEGER";var gc;class Vi extends lt{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=10}}gc=Vi,$.Enumerated=gc,Vi.NAME="ENUMERATED";class mo extends ct(Pe){constructor({valueDec:t=-1,isFirstSid:r=!1,...i}={}){super(i),this.valueDec=t,this.isFirstSid=r}fromBER(t,r,i){if(!i)return r;const o=D.toUint8Array(t);if(!gt(this,o,r,i))return-1;const s=o.subarray(r,r+i);this.valueHexView=new Uint8Array(i);for(let c=0;c<i&&(this.valueHexView[c]=s[c]&127,this.blockLength++,!!(s[c]&128));c++);const a=new Uint8Array(this.blockLength);for(let c=0;c<this.blockLength;c++)a[c]=this.valueHexView[c];return this.valueHexView=a,s[this.blockLength-1]&128?(this.error="End of input reached before message was fully decoded",-1):(this.valueHexView[0]===0&&this.warnings.push("Needlessly long format of SID encoding"),this.blockLength<=8?this.valueDec=lr(this.valueHexView,7):(this.isHexOnly=!0,this.warnings.push("Too big SID for decoding, hex only")),r+this.blockLength)}set valueBigInt(t){Ni();let r=BigInt(t).toString(2);for(;r.length%7;)r="0"+r;const i=new Uint8Array(r.length/7);for(let o=0;o<i.length;o++)i[o]=parseInt(r.slice(o*7,o*7+7),2)+(o+1<i.length?128:0);this.fromBER(i.buffer,0,i.length)}toBER(t){if(this.isHexOnly){if(t)return new ArrayBuffer(this.valueHexView.byteLength);const o=this.valueHexView,s=new Uint8Array(this.blockLength);for(let a=0;a<this.blockLength-1;a++)s[a]=o[a]|128;return s[this.blockLength-1]=o[this.blockLength-1],s.buffer}const r=Ht(this.valueDec,7);if(r.byteLength===0)return this.error="Error during encoding SID value",tt;const i=new Uint8Array(r.byteLength);if(!t){const o=new Uint8Array(r),s=r.byteLength-1;for(let a=0;a<s;a++)i[a]=o[a]|128;i[s]=o[s]}return i}toString(){let t="";if(this.isHexOnly)t=R.ToHex(this.valueHexView);else if(this.isFirstSid){let r=this.valueDec;this.valueDec<=39?t="0.":this.valueDec<=79?(t="1.",r-=40):(t="2.",r-=80),t+=r.toString()}else t=this.valueDec.toString();return t}toJSON(){return{...super.toJSON(),valueDec:this.valueDec,isFirstSid:this.isFirstSid}}}mo.NAME="sidBlock";class mc extends Pe{constructor({value:t=Re,...r}={}){super(r),this.value=[],t&&this.fromString(t)}fromBER(t,r,i){let o=r;for(;i>0;){const s=new mo;if(o=s.fromBER(t,o,i),o===-1)return this.blockLength=0,this.error=s.error,o;this.value.length===0&&(s.isFirstSid=!0),this.blockLength+=s.blockLength,i-=s.blockLength,this.value.push(s)}return o}toBER(t){const r=[];for(let i=0;i<this.value.length;i++){const o=this.value[i].toBER(t);if(o.byteLength===0)return this.error=this.value[i].error,tt;r.push(o)}return fo(r)}fromString(t){this.value=[];let r=0,i=0,o="",s=!1;do if(i=t.indexOf(".",r),i===-1?o=t.substring(r):o=t.substring(r,i),r=i+1,s){const a=this.value[0];let c=0;switch(a.valueDec){case 0:break;case 1:c=40;break;case 2:c=80;break;default:this.value=[];return}const l=parseInt(o,10);if(isNaN(l))return;a.valueDec=l+c,s=!1}else{const a=new mo;if(o>Number.MAX_SAFE_INTEGER){Ni();const c=BigInt(o);a.valueBigInt=c}else if(a.valueDec=parseInt(o,10),isNaN(a.valueDec))return;this.value.length||(a.isFirstSid=!0,s=!0),this.value.push(a)}while(i!==-1)}toString(){let t="",r=!1;for(let i=0;i<this.value.length;i++){r=this.value[i].isHexOnly;let o=this.value[i].toString();i!==0&&(t=`${t}.`),r?(o=`{${o}}`,this.value[i].isFirstSid?t=`2.{${o} - 80}`:t+=o):t+=o}return t}toJSON(){const t={...super.toJSON(),value:this.toString(),sidArray:[]};for(let r=0;r<this.value.length;r++)t.sidArray.push(this.value[r].toJSON());return t}}mc.NAME="ObjectIdentifierValueBlock";var bc;class ji extends Ee{constructor(t={}){super(t,mc),this.idBlock.tagClass=1,this.idBlock.tagNumber=6}getValue(){return this.valueBlock.toString()}setValue(t){this.valueBlock.fromString(t)}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}}bc=ji,$.ObjectIdentifier=bc,ji.NAME="OBJECT IDENTIFIER";class bo extends ct(Ft){constructor({valueDec:t=0,...r}={}){super(r),this.valueDec=t}fromBER(t,r,i){if(i===0)return r;const o=D.toUint8Array(t);if(!gt(this,o,r,i))return-1;const s=o.subarray(r,r+i);this.valueHexView=new Uint8Array(i);for(let c=0;c<i&&(this.valueHexView[c]=s[c]&127,this.blockLength++,!!(s[c]&128));c++);const a=new Uint8Array(this.blockLength);for(let c=0;c<this.blockLength;c++)a[c]=this.valueHexView[c];return this.valueHexView=a,s[this.blockLength-1]&128?(this.error="End of input reached before message was fully decoded",-1):(this.valueHexView[0]===0&&this.warnings.push("Needlessly long format of SID encoding"),this.blockLength<=8?this.valueDec=lr(this.valueHexView,7):(this.isHexOnly=!0,this.warnings.push("Too big SID for decoding, hex only")),r+this.blockLength)}toBER(t){if(this.isHexOnly){if(t)return new ArrayBuffer(this.valueHexView.byteLength);const o=this.valueHexView,s=new Uint8Array(this.blockLength);for(let a=0;a<this.blockLength-1;a++)s[a]=o[a]|128;return s[this.blockLength-1]=o[this.blockLength-1],s.buffer}const r=Ht(this.valueDec,7);if(r.byteLength===0)return this.error="Error during encoding SID value",tt;const i=new Uint8Array(r.byteLength);if(!t){const o=new Uint8Array(r),s=r.byteLength-1;for(let a=0;a<s;a++)i[a]=o[a]|128;i[s]=o[s]}return i.buffer}toString(){let t="";return this.isHexOnly?t=R.ToHex(this.valueHexView):t=this.valueDec.toString(),t}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}}bo.NAME="relativeSidBlock";class wc extends Pe{constructor({value:t=Re,...r}={}){super(r),this.value=[],t&&this.fromString(t)}fromBER(t,r,i){let o=r;for(;i>0;){const s=new bo;if(o=s.fromBER(t,o,i),o===-1)return this.blockLength=0,this.error=s.error,o;this.blockLength+=s.blockLength,i-=s.blockLength,this.value.push(s)}return o}toBER(t,r){const i=[];for(let o=0;o<this.value.length;o++){const s=this.value[o].toBER(t);if(s.byteLength===0)return this.error=this.value[o].error,tt;i.push(s)}return fo(i)}fromString(t){this.value=[];let r=0,i=0,o="";do{i=t.indexOf(".",r),i===-1?o=t.substring(r):o=t.substring(r,i),r=i+1;const s=new bo;if(s.valueDec=parseInt(o,10),isNaN(s.valueDec))return!0;this.value.push(s)}while(i!==-1);return!0}toString(){let t="",r=!1;for(let i=0;i<this.value.length;i++){r=this.value[i].isHexOnly;let o=this.value[i].toString();i!==0&&(t=`${t}.`),r&&(o=`{${o}}`),t+=o}return t}toJSON(){const t={...super.toJSON(),value:this.toString(),sidArray:[]};for(let r=0;r<this.value.length;r++)t.sidArray.push(this.value[r].toJSON());return t}}wc.NAME="RelativeObjectIdentifierValueBlock";var vc;class wo extends Ee{constructor(t={}){super(t,wc),this.idBlock.tagClass=1,this.idBlock.tagNumber=13}getValue(){return this.valueBlock.toString()}setValue(t){this.valueBlock.fromString(t)}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}}vc=wo,$.RelativeObjectIdentifier=vc,wo.NAME="RelativeObjectIdentifier";var kc;class mt extends Ue{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=16}}kc=mt,$.Sequence=kc,mt.NAME="SEQUENCE";var Cc;let bt=class extends Ue{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=17}};Cc=bt,$.Set=Cc,bt.NAME="SET";class Sc extends ct(Pe){constructor({...t}={}){super(t),this.isHexOnly=!0,this.value=Re}toJSON(){return{...super.toJSON(),value:this.value}}}Sc.NAME="StringValueBlock";class xc extends Sc{}xc.NAME="SimpleStringValueBlock";class Ge extends ho{constructor({...t}={}){super(t,xc)}fromBuffer(t){this.valueBlock.value=String.fromCharCode.apply(null,D.toUint8Array(t))}fromString(t){const r=t.length,i=this.valueBlock.valueHexView=new Uint8Array(r);for(let o=0;o<r;o++)i[o]=t.charCodeAt(o);this.valueBlock.value=t}}Ge.NAME="SIMPLE STRING";class Ac extends Ge{fromBuffer(t){this.valueBlock.valueHexView=D.toUint8Array(t);try{this.valueBlock.value=R.ToUtf8String(t)}catch(r){this.warnings.push(`Error during "decodeURIComponent": ${r}, using raw string`),this.valueBlock.value=R.ToBinary(t)}}fromString(t){this.valueBlock.valueHexView=new Uint8Array(R.FromUtf8String(t)),this.valueBlock.value=t}}Ac.NAME="Utf8StringValueBlock";var Bc;class wt extends Ac{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=12}}Bc=wt,$.Utf8String=Bc,wt.NAME="UTF8String";class Ic extends Ge{fromBuffer(t){this.valueBlock.value=R.ToUtf16String(t),this.valueBlock.valueHexView=D.toUint8Array(t)}fromString(t){this.valueBlock.value=t,this.valueBlock.valueHexView=new Uint8Array(R.FromUtf16String(t))}}Ic.NAME="BmpStringValueBlock";var Ec;class Di extends Ic{constructor({...t}={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=30}}Ec=Di,$.BmpString=Ec,Di.NAME="BMPString";class Nc extends Ge{fromBuffer(t){const r=ArrayBuffer.isView(t)?t.slice().buffer:t.slice(0),i=new Uint8Array(r);for(let o=0;o<i.length;o+=4)i[o]=i[o+3],i[o+1]=i[o+2],i[o+2]=0,i[o+3]=0;this.valueBlock.value=String.fromCharCode.apply(null,new Uint32Array(r))}fromString(t){const r=t.length,i=this.valueBlock.valueHexView=new Uint8Array(r*4);for(let o=0;o<r;o++){const s=Ht(t.charCodeAt(o),8),a=new Uint8Array(s);if(a.length>4)continue;const c=4-a.length;for(let l=a.length-1;l>=0;l--)i[o*4+l+c]=a[l]}this.valueBlock.value=t}}Nc.NAME="UniversalStringValueBlock";var _c;class Pi extends Nc{constructor({...t}={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=28}}_c=Pi,$.UniversalString=_c,Pi.NAME="UniversalString";var Oc;class $i extends Ge{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=18}}Oc=$i,$.NumericString=Oc,$i.NAME="NumericString";var Tc;class Mi extends Ge{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=19}}Tc=Mi,$.PrintableString=Tc,Mi.NAME="PrintableString";var Vc;class Ri extends Ge{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=20}}Vc=Ri,$.TeletexString=Vc,Ri.NAME="TeletexString";var jc;class Ui extends Ge{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=21}}jc=Ui,$.VideotexString=jc,Ui.NAME="VideotexString";var Dc;class Li extends Ge{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=22}}Dc=Li,$.IA5String=Dc,Li.NAME="IA5String";var Pc;class Hi extends Ge{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=25}}Pc=Hi,$.GraphicString=Pc,Hi.NAME="GraphicString";var $c;class zr extends Ge{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=26}}$c=zr,$.VisibleString=$c,zr.NAME="VisibleString";var Mc;class Fi extends Ge{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=27}}Mc=Fi,$.GeneralString=Mc,Fi.NAME="GeneralString";var Rc;class qi extends Ge{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=29}}Rc=qi,$.CharacterString=Rc,qi.NAME="CharacterString";var Uc;class Gr extends zr{constructor({value:t,valueDate:r,...i}={}){if(super(i),this.year=0,this.month=0,this.day=0,this.hour=0,this.minute=0,this.second=0,t){this.fromString(t),this.valueBlock.valueHexView=new Uint8Array(t.length);for(let o=0;o<t.length;o++)this.valueBlock.valueHexView[o]=t.charCodeAt(o)}r&&(this.fromDate(r),this.valueBlock.valueHexView=new Uint8Array(this.toBuffer())),this.idBlock.tagClass=1,this.idBlock.tagNumber=23}fromBuffer(t){this.fromString(String.fromCharCode.apply(null,D.toUint8Array(t)))}toBuffer(){const t=this.toString(),r=new ArrayBuffer(t.length),i=new Uint8Array(r);for(let o=0;o<t.length;o++)i[o]=t.charCodeAt(o);return r}fromDate(t){this.year=t.getUTCFullYear(),this.month=t.getUTCMonth()+1,this.day=t.getUTCDate(),this.hour=t.getUTCHours(),this.minute=t.getUTCMinutes(),this.second=t.getUTCSeconds()}toDate(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second))}fromString(t){const i=/(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})Z/ig.exec(t);if(i===null){this.error="Wrong input string for conversion";return}const o=parseInt(i[1],10);o>=50?this.year=1900+o:this.year=2e3+o,this.month=parseInt(i[2],10),this.day=parseInt(i[3],10),this.hour=parseInt(i[4],10),this.minute=parseInt(i[5],10),this.second=parseInt(i[6],10)}toString(t="iso"){if(t==="iso"){const r=new Array(7);return r[0]=ze(this.year<2e3?this.year-1900:this.year-2e3,2),r[1]=ze(this.month,2),r[2]=ze(this.day,2),r[3]=ze(this.hour,2),r[4]=ze(this.minute,2),r[5]=ze(this.second,2),r[6]="Z",r.join("")}return super.toString(t)}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.toDate().toISOString()}`}toJSON(){return{...super.toJSON(),year:this.year,month:this.month,day:this.day,hour:this.hour,minute:this.minute,second:this.second}}}Uc=Gr,$.UTCTime=Uc,Gr.NAME="UTCTime";var Lc;class Ki extends Gr{constructor(t={}){var r;super(t),(r=this.millisecond)!==null&&r!==void 0||(this.millisecond=0),this.idBlock.tagClass=1,this.idBlock.tagNumber=24}fromDate(t){super.fromDate(t),this.millisecond=t.getUTCMilliseconds()}toDate(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond))}fromString(t){let r=!1,i="",o="",s=0,a,c=0,l=0;if(t[t.length-1]==="Z")i=t.substring(0,t.length-1),r=!0;else{const y=new Number(t[t.length-1]);if(isNaN(y.valueOf()))throw new Error("Wrong input string for conversion");i=t}if(r){if(i.indexOf("+")!==-1)throw new Error("Wrong input string for conversion");if(i.indexOf("-")!==-1)throw new Error("Wrong input string for conversion")}else{let y=1,A=i.indexOf("+"),C="";if(A===-1&&(A=i.indexOf("-"),y=-1),A!==-1){if(C=i.substring(A+1),i=i.substring(0,A),C.length!==2&&C.length!==4)throw new Error("Wrong input string for conversion");let h=parseInt(C.substring(0,2),10);if(isNaN(h.valueOf()))throw new Error("Wrong input string for conversion");if(c=y*h,C.length===4){if(h=parseInt(C.substring(2,4),10),isNaN(h.valueOf()))throw new Error("Wrong input string for conversion");l=y*h}}}let d=i.indexOf(".");if(d===-1&&(d=i.indexOf(",")),d!==-1){const y=new Number(`0${i.substring(d)}`);if(isNaN(y.valueOf()))throw new Error("Wrong input string for conversion");s=y.valueOf(),o=i.substring(0,d)}else o=i;switch(!0){case o.length===8:if(a=/(\d{4})(\d{2})(\d{2})/ig,d!==-1)throw new Error("Wrong input string for conversion");break;case o.length===10:if(a=/(\d{4})(\d{2})(\d{2})(\d{2})/ig,d!==-1){let y=60*s;this.minute=Math.floor(y),y=60*(y-this.minute),this.second=Math.floor(y),y=1e3*(y-this.second),this.millisecond=Math.floor(y)}break;case o.length===12:if(a=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/ig,d!==-1){let y=60*s;this.second=Math.floor(y),y=1e3*(y-this.second),this.millisecond=Math.floor(y)}break;case o.length===14:if(a=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/ig,d!==-1){const y=1e3*s;this.millisecond=Math.floor(y)}break;default:throw new Error("Wrong input string for conversion")}const p=a.exec(o);if(p===null)throw new Error("Wrong input string for conversion");for(let y=1;y<p.length;y++)switch(y){case 1:this.year=parseInt(p[y],10);break;case 2:this.month=parseInt(p[y],10);break;case 3:this.day=parseInt(p[y],10);break;case 4:this.hour=parseInt(p[y],10)+c;break;case 5:this.minute=parseInt(p[y],10)+l;break;case 6:this.second=parseInt(p[y],10);break;default:throw new Error("Wrong input string for conversion")}if(r===!1){const y=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond);this.year=y.getUTCFullYear(),this.month=y.getUTCMonth(),this.day=y.getUTCDay(),this.hour=y.getUTCHours(),this.minute=y.getUTCMinutes(),this.second=y.getUTCSeconds(),this.millisecond=y.getUTCMilliseconds()}}toString(t="iso"){if(t==="iso"){const r=[];return r.push(ze(this.year,4)),r.push(ze(this.month,2)),r.push(ze(this.day,2)),r.push(ze(this.hour,2)),r.push(ze(this.minute,2)),r.push(ze(this.second,2)),this.millisecond!==0&&(r.push("."),r.push(ze(this.millisecond,3))),r.push("Z"),r.join("")}return super.toString(t)}toJSON(){return{...super.toJSON(),millisecond:this.millisecond}}}Lc=Ki,$.GeneralizedTime=Lc,Ki.NAME="GeneralizedTime";var Hc;class vo extends wt{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=31}}Hc=vo,$.DATE=Hc,vo.NAME="DATE";var Fc;class ko extends wt{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=32}}Fc=ko,$.TimeOfDay=Fc,ko.NAME="TimeOfDay";var qc;class Co extends wt{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=33}}qc=Co,$.DateTime=qc,Co.NAME="DateTime";var Kc;class So extends wt{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=34}}Kc=So,$.Duration=Kc,So.NAME="Duration";var zc;class xo extends wt{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=14}}zc=xo,$.TIME=zc,xo.NAME="TIME";class Gt{constructor({name:t=Re,optional:r=!1}={}){this.name=t,this.optional=r}}class Ao extends Gt{constructor({value:t=[],...r}={}){super(r),this.value=t}}class zi extends Gt{constructor({value:t=new Gt,local:r=!1,...i}={}){super(i),this.value=t,this.local=r}}class dp{constructor({data:t=Oi}={}){this.dataView=D.toUint8Array(t)}get data(){return this.dataView.slice().buffer}set data(t){this.dataView=D.toUint8Array(t)}fromBER(t,r,i){const o=r+i;return this.dataView=D.toUint8Array(t).subarray(r,o),o}toBER(t){return this.dataView.slice().buffer}}function Wt(e,t,r){if(r instanceof Ao){for(let s=0;s<r.value.length;s++)if(Wt(e,t,r.value[s]).verified)return{verified:!0,result:e};{const s={verified:!1,result:{error:"Wrong values for Choice type"}};return r.hasOwnProperty(po)&&(s.name=r.name),s}}if(r instanceof Gt)return r.hasOwnProperty(po)&&(e[r.name]=t),{verified:!0,result:e};if(!(e instanceof Object))return{verified:!1,result:{error:"Wrong root object"}};if(!(t instanceof Object))return{verified:!1,result:{error:"Wrong ASN.1 data"}};if(!(r instanceof Object))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(ep in r))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(np in r.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(op in r.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};const i=r.idBlock.toBER(!1);if(i.byteLength===0)return{verified:!1,result:{error:"Error encoding idBlock for ASN.1 schema"}};if(r.idBlock.fromBER(i,0,i.byteLength)===-1)return{verified:!1,result:{error:"Error decoding idBlock for ASN.1 schema"}};if(r.idBlock.hasOwnProperty(tp)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(r.idBlock.tagClass!==t.idBlock.tagClass)return{verified:!1,result:e};if(r.idBlock.hasOwnProperty(rp)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(r.idBlock.tagNumber!==t.idBlock.tagNumber)return{verified:!1,result:e};if(r.idBlock.hasOwnProperty(ip)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(r.idBlock.isConstructed!==t.idBlock.isConstructed)return{verified:!1,result:e};if(!(Xf in r.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(r.idBlock.isHexOnly!==t.idBlock.isHexOnly)return{verified:!1,result:e};if(r.idBlock.isHexOnly){if(!(Ja in r.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};const s=r.idBlock.valueHexView,a=t.idBlock.valueHexView;if(s.length!==a.length)return{verified:!1,result:e};for(let c=0;c<s.length;c++)if(s[c]!==a[1])return{verified:!1,result:e}}if(r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,Re),r.name&&(e[r.name]=t)),r instanceof $.Constructed){let s=0,a={verified:!1,result:{error:"Unknown error"}},c=r.valueBlock.value.length;if(c>0&&r.valueBlock.value[0]instanceof zi&&(c=t.valueBlock.value.length),c===0)return{verified:!0,result:e};if(t.valueBlock.value.length===0&&r.valueBlock.value.length!==0){let l=!0;for(let d=0;d<r.valueBlock.value.length;d++)l=l&&(r.valueBlock.value[d].optional||!1);return l?{verified:!0,result:e}:(r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,Re),r.name&&delete e[r.name]),e.error="Inconsistent object length",{verified:!1,result:e})}for(let l=0;l<c;l++)if(l-s>=t.valueBlock.value.length){if(r.valueBlock.value[l].optional===!1){const d={verified:!1,result:e};return e.error="Inconsistent length between ASN.1 data and schema",r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,Re),r.name&&(delete e[r.name],d.name=r.name)),d}}else if(r.valueBlock.value[0]instanceof zi){if(a=Wt(e,t.valueBlock.value[l],r.valueBlock.value[0].value),a.verified===!1)if(r.valueBlock.value[0].optional)s++;else return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,Re),r.name&&delete e[r.name]),a;if(po in r.valueBlock.value[0]&&r.valueBlock.value[0].name.length>0){let d={};sp in r.valueBlock.value[0]&&r.valueBlock.value[0].local?d=t:d=e,typeof d[r.valueBlock.value[0].name]>"u"&&(d[r.valueBlock.value[0].name]=[]),d[r.valueBlock.value[0].name].push(t.valueBlock.value[l])}}else if(a=Wt(e,t.valueBlock.value[l-s],r.valueBlock.value[l]),a.verified===!1)if(r.valueBlock.value[l].optional)s++;else return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,Re),r.name&&delete e[r.name]),a;if(a.verified===!1){const l={verified:!1,result:e};return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,Re),r.name&&(delete e[r.name],l.name=r.name)),l}return{verified:!0,result:e}}if(r.primitiveSchema&&Ja in t.valueBlock){const s=ur(t.valueBlock.valueHexView);if(s.offset===-1){const a={verified:!1,result:s.result};return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,Re),r.name&&(delete e[r.name],a.name=r.name)),a}return Wt(e,s.result,r.primitiveSchema)}return{verified:!0,result:e}}function fp(e,t){if(!(t instanceof Object))return{verified:!1,result:{error:"Wrong ASN.1 schema type"}};const r=ur(D.toUint8Array(e));return r.offset===-1?{verified:!1,result:r.result}:Wt(r.result,r.result,t)}const Gc=Object.freeze(Object.defineProperty({__proto__:null,Any:Gt,BaseBlock:Ee,BaseStringBlock:ho,BitString:zt,BmpString:Di,Boolean:Ti,CharacterString:qi,Choice:Ao,Constructed:Ue,DATE:vo,DateTime:Co,Duration:So,EndOfContent:yo,Enumerated:Vi,GeneralString:Fi,GeneralizedTime:Ki,GraphicString:Hi,HexBlock:ct,IA5String:Li,Integer:lt,Null:qt,NumericString:$i,ObjectIdentifier:ji,OctetString:Kt,Primitive:Kr,PrintableString:Mi,RawData:dp,RelativeObjectIdentifier:wo,Repeated:zi,Sequence:mt,Set:bt,TIME:xo,TeletexString:Ri,TimeOfDay:ko,UTCTime:Gr,UniversalString:Pi,Utf8String:wt,ValueBlock:Pe,VideotexString:Ui,ViewWriter:_i,VisibleString:zr,compareSchema:Wt,fromBER:dr,verifySchema:fp},Symbol.toStringTag,{value:"Module"}));var N;(function(e){e[e.Sequence=0]="Sequence",e[e.Set=1]="Set",e[e.Choice=2]="Choice"})(N||(N={}));var k;(function(e){e[e.Any=1]="Any",e[e.Boolean=2]="Boolean",e[e.OctetString=3]="OctetString",e[e.BitString=4]="BitString",e[e.Integer=5]="Integer",e[e.Enumerated=6]="Enumerated",e[e.ObjectIdentifier=7]="ObjectIdentifier",e[e.Utf8String=8]="Utf8String",e[e.BmpString=9]="BmpString",e[e.UniversalString=10]="UniversalString",e[e.NumericString=11]="NumericString",e[e.PrintableString=12]="PrintableString",e[e.TeletexString=13]="TeletexString",e[e.VideotexString=14]="VideotexString",e[e.IA5String=15]="IA5String",e[e.GraphicString=16]="GraphicString",e[e.VisibleString=17]="VisibleString",e[e.GeneralString=18]="GeneralString",e[e.CharacterString=19]="CharacterString",e[e.UTCTime=20]="UTCTime",e[e.GeneralizedTime=21]="GeneralizedTime",e[e.DATE=22]="DATE",e[e.TimeOfDay=23]="TimeOfDay",e[e.DateTime=24]="DateTime",e[e.Duration=25]="Duration",e[e.TIME=26]="TIME",e[e.Null=27]="Null"})(k||(k={}));class Gi{constructor(t,r=0){if(this.unusedBits=0,this.value=new ArrayBuffer(0),t)if(typeof t=="number")this.fromNumber(t);else if(D.isBufferSource(t))this.unusedBits=r,this.value=D.toArrayBuffer(t);else throw TypeError("Unsupported type of 'params' argument for BitString")}fromASN(t){if(!(t instanceof zt))throw new TypeError("Argument 'asn' is not instance of ASN.1 BitString");return this.unusedBits=t.valueBlock.unusedBits,this.value=t.valueBlock.valueHex,this}toASN(){return new zt({unusedBits:this.unusedBits,valueHex:this.value})}toSchema(t){return new zt({name:t})}toNumber(){let t="";const r=new Uint8Array(this.value);for(const i of r)t+=i.toString(2).padStart(8,"0");return t=t.split("").reverse().join(""),this.unusedBits&&(t=t.slice(this.unusedBits).padStart(this.unusedBits,"0")),parseInt(t,2)}fromNumber(t){let r=t.toString(2);const i=r.length+7>>3;this.unusedBits=(i<<3)-r.length;const o=new Uint8Array(i);r=r.padStart(i<<3,"0").split("").reverse().join("");let s=0;for(;s<i;)o[s]=parseInt(r.slice(s<<3,(s<<3)+8),2),s++;this.value=o.buffer}}class ie{constructor(t){typeof t=="number"?this.buffer=new ArrayBuffer(t):D.isBufferSource(t)?this.buffer=D.toArrayBuffer(t):Array.isArray(t)?this.buffer=new Uint8Array(t):this.buffer=new ArrayBuffer(0)}get byteLength(){return this.buffer.byteLength}get byteOffset(){return 0}fromASN(t){if(!(t instanceof Kt))throw new TypeError("Argument 'asn' is not instance of ASN.1 OctetString");return this.buffer=t.valueBlock.valueHex,this}toASN(){return new Kt({valueHex:this.buffer})}toSchema(t){return new Kt({name:t})}}const pp={fromASN:e=>e instanceof qt?null:e.valueBeforeDecodeView,toASN:e=>{if(e===null)return new qt;const t=dr(e);if(t.result.error)throw new Error(t.result.error);return t.result}},hp={fromASN:e=>e.valueBlock.valueHexView.byteLength>=4?e.valueBlock.toString():e.valueBlock.valueDec,toASN:e=>new lt({value:+e})},yp={fromASN:e=>e.valueBlock.valueDec,toASN:e=>new Vi({value:e})},ge={fromASN:e=>e.valueBlock.valueHexView,toASN:e=>new lt({valueHex:e})},gp={fromASN:e=>e.valueBlock.valueHexView,toASN:e=>new zt({valueHex:e})},mp={fromASN:e=>e.valueBlock.toString(),toASN:e=>new ji({value:e})},bp={fromASN:e=>e.valueBlock.value,toASN:e=>new Ti({value:e})},Wi={fromASN:e=>e.valueBlock.valueHexView,toASN:e=>new Kt({valueHex:e})},wp={fromASN:e=>new ie(e.getValue()),toASN:e=>e.toASN()};function Ye(e){return{fromASN:t=>t.valueBlock.value,toASN:t=>new e({value:t})}}const Wc=Ye(wt),vp=Ye(Di),kp=Ye(Pi),Cp=Ye($i),Sp=Ye(Mi),xp=Ye(Ri),Ap=Ye(Ui),Bp=Ye(Li),Ip=Ye(Hi),Ep=Ye(zr),Np=Ye(Fi),_p=Ye(qi),Op={fromASN:e=>e.toDate(),toASN:e=>new Gr({valueDate:e})},Tp={fromASN:e=>e.toDate(),toASN:e=>new Ki({valueDate:e})},Vp={fromASN:()=>null,toASN:()=>new qt};function Bo(e){switch(e){case k.Any:return pp;case k.BitString:return gp;case k.BmpString:return vp;case k.Boolean:return bp;case k.CharacterString:return _p;case k.Enumerated:return yp;case k.GeneralString:return Np;case k.GeneralizedTime:return Tp;case k.GraphicString:return Ip;case k.IA5String:return Bp;case k.Integer:return hp;case k.Null:return Vp;case k.NumericString:return Cp;case k.ObjectIdentifier:return mp;case k.OctetString:return Wi;case k.PrintableString:return Sp;case k.TeletexString:return xp;case k.UTCTime:return Op;case k.UniversalString:return kp;case k.Utf8String:return Wc;case k.VideotexString:return Ap;case k.VisibleString:return Ep;default:return null}}function vt(e){return typeof e=="function"&&e.prototype?e.prototype.toASN&&e.prototype.fromASN?!0:vt(e.prototype):!!(e&&typeof e=="object"&&"toASN"in e&&"fromASN"in e)}function Jc(e){var t;if(e){const r=Object.getPrototypeOf(e);return((t=r==null?void 0:r.prototype)===null||t===void 0?void 0:t.constructor)===Array?!0:Jc(r)}return!1}function jp(e,t){if(!(e&&t)||e.byteLength!==t.byteLength)return!1;const r=new Uint8Array(e),i=new Uint8Array(t);for(let o=0;o<e.byteLength;o++)if(r[o]!==i[o])return!1;return!0}class Dp{constructor(){this.items=new WeakMap}has(t){return this.items.has(t)}get(t,r=!1){const i=this.items.get(t);if(!i)throw new Error(`Cannot get schema for '${t.prototype.constructor.name}' target`);if(r&&!i.schema)throw new Error(`Schema '${t.prototype.constructor.name}' doesn't contain ASN.1 schema. Call 'AsnSchemaStorage.cache'.`);return i}cache(t){const r=this.get(t);r.schema||(r.schema=this.create(t,!0))}createDefault(t){const r={type:N.Sequence,items:{}},i=this.findParentSchema(t);return i&&(Object.assign(r,i),r.items=Object.assign({},r.items,i.items)),r}create(t,r){const i=this.items.get(t)||this.createDefault(t),o=[];for(const s in i.items){const a=i.items[s],c=r?s:"";let l;if(typeof a.type=="number"){const p=k[a.type],y=Gc[p];if(!y)throw new Error(`Cannot get ASN1 class by name '${p}'`);l=new y({name:c})}else vt(a.type)?l=new a.type().toSchema(c):a.optional?this.get(a.type).type===N.Choice?l=new Gt({name:c}):(l=this.create(a.type,!1),l.name=c):l=new Gt({name:c});const d=!!a.optional||a.defaultValue!==void 0;if(a.repeated){l.name="";const p=a.repeated==="set"?bt:mt;l=new p({name:"",value:[new zi({name:c,value:l})]})}if(a.context!==null&&a.context!==void 0)if(a.implicit)if(typeof a.type=="number"||vt(a.type)){const p=a.repeated?Ue:Kr;o.push(new p({name:c,optional:d,idBlock:{tagClass:3,tagNumber:a.context}}))}else{this.cache(a.type);const p=!!a.repeated;let y=p?l:this.get(a.type,!0).schema;y="valueBlock"in y?y.valueBlock.value:y.value,o.push(new Ue({name:p?"":c,optional:d,idBlock:{tagClass:3,tagNumber:a.context},value:y}))}else o.push(new Ue({optional:d,idBlock:{tagClass:3,tagNumber:a.context},value:[l]}));else l.optional=d,o.push(l)}switch(i.type){case N.Sequence:return new mt({value:o,name:""});case N.Set:return new bt({value:o,name:""});case N.Choice:return new Ao({value:o,name:""});default:throw new Error("Unsupported ASN1 type in use")}}set(t,r){return this.items.set(t,r),this}findParentSchema(t){const r=Object.getPrototypeOf(t);return r?this.items.get(r)||this.findParentSchema(r):null}}const Ze=new Dp,O=e=>t=>{let r;Ze.has(t)?r=Ze.get(t):(r=Ze.createDefault(t),Ze.set(t,r)),Object.assign(r,e)},f=e=>(t,r)=>{let i;Ze.has(t.constructor)?i=Ze.get(t.constructor):(i=Ze.createDefault(t.constructor),Ze.set(t.constructor,i));const o=Object.assign({},e);if(typeof o.type=="number"&&!o.converter){const s=Bo(e.type);if(!s)throw new Error(`Cannot get default converter for property '${r}' of ${t.constructor.name}`);o.converter=s}i.items[r]=o};class Yc extends Error{constructor(){super(...arguments),this.schemas=[]}}class Pp{static parse(t,r){const i=dr(t);if(i.result.error)throw new Error(i.result.error);return this.fromASN(i.result,r)}static fromASN(t,r){var i;try{if(vt(r))return new r().fromASN(t);const o=Ze.get(r);Ze.cache(r);let s=o.schema;if(t.constructor===Ue&&o.type!==N.Choice){s=new Ue({idBlock:{tagClass:3,tagNumber:t.idBlock.tagNumber},value:o.schema.valueBlock.value});for(const l in o.items)delete t[l]}const a=Wt({},t,s);if(!a.verified)throw new Yc(`Data does not match to ${r.name} ASN1 schema. ${a.result.error}`);const c=new r;if(Jc(r)){if(!("value"in t.valueBlock&&Array.isArray(t.valueBlock.value)))throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");const l=o.itemType;if(typeof l=="number"){const d=Bo(l);if(!d)throw new Error(`Cannot get default converter for array item of ${r.name} ASN1 schema`);return r.from(t.valueBlock.value,p=>d.fromASN(p))}else return r.from(t.valueBlock.value,d=>this.fromASN(d,l))}for(const l in o.items){const d=a.result[l];if(!d)continue;const p=o.items[l],y=p.type;if(typeof y=="number"||vt(y)){const A=(i=p.converter)!==null&&i!==void 0?i:vt(y)?new y:null;if(!A)throw new Error("Converter is empty");if(p.repeated)if(p.implicit){const C=p.repeated==="sequence"?mt:bt,h=new C;h.valueBlock=d.valueBlock;const g=dr(h.toBER(!1));if(g.offset===-1)throw new Error(`Cannot parse the child item. ${g.result.error}`);if(!("value"in g.result.valueBlock&&Array.isArray(g.result.valueBlock.value)))throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");const m=g.result.valueBlock.value;c[l]=Array.from(m,v=>A.fromASN(v))}else c[l]=Array.from(d,C=>A.fromASN(C));else{let C=d;if(p.implicit){let h;if(vt(y))h=new y().toSchema("");else{const g=k[y],m=Gc[g];if(!m)throw new Error(`Cannot get '${g}' class from asn1js module`);h=new m}h.valueBlock=C.valueBlock,C=dr(h.toBER(!1)).result}c[l]=A.fromASN(C)}}else if(p.repeated){if(!Array.isArray(d))throw new Error("Cannot get list of items from the ASN.1 parsed value. ASN.1 value should be iterable.");c[l]=Array.from(d,A=>this.fromASN(A,y))}else c[l]=this.fromASN(d,y)}return c}catch(o){throw o instanceof Yc&&o.schemas.push(r.name),o}}}class Io{static serialize(t){return t instanceof Ee?t.toBER(!1):this.toASN(t).toBER(!1)}static toASN(t){if(t&&typeof t=="object"&&vt(t))return t.toASN();if(!(t&&typeof t=="object"))throw new TypeError("Parameter 1 should be type of Object.");const r=t.constructor,i=Ze.get(r);Ze.cache(r);let o=[];if(i.itemType){if(!Array.isArray(t))throw new TypeError("Parameter 1 should be type of Array.");if(typeof i.itemType=="number"){const a=Bo(i.itemType);if(!a)throw new Error(`Cannot get default converter for array item of ${r.name} ASN1 schema`);o=t.map(c=>a.toASN(c))}else o=t.map(a=>this.toAsnItem({type:i.itemType},"[]",r,a))}else for(const a in i.items){const c=i.items[a],l=t[a];if(l===void 0||c.defaultValue===l||typeof c.defaultValue=="object"&&typeof l=="object"&&jp(this.serialize(c.defaultValue),this.serialize(l)))continue;const d=Io.toAsnItem(c,a,r,l);if(typeof c.context=="number")if(c.implicit)if(!c.repeated&&(typeof c.type=="number"||vt(c.type))){const p={};p.valueHex=d instanceof qt?d.valueBeforeDecodeView:d.valueBlock.toBER(),o.push(new Kr({optional:c.optional,idBlock:{tagClass:3,tagNumber:c.context},...p}))}else o.push(new Ue({optional:c.optional,idBlock:{tagClass:3,tagNumber:c.context},value:d.valueBlock.value}));else o.push(new Ue({optional:c.optional,idBlock:{tagClass:3,tagNumber:c.context},value:[d]}));else c.repeated?o=o.concat(d):o.push(d)}let s;switch(i.type){case N.Sequence:s=new mt({value:o});break;case N.Set:s=new bt({value:o});break;case N.Choice:if(!o[0])throw new Error(`Schema '${r.name}' has wrong data. Choice cannot be empty.`);s=o[0];break}return s}static toAsnItem(t,r,i,o){let s;if(typeof t.type=="number"){const a=t.converter;if(!a)throw new Error(`Property '${r}' doesn't have converter for type ${k[t.type]} in schema '${i.name}'`);if(t.repeated){if(!Array.isArray(o))throw new TypeError("Parameter 'objProp' should be type of Array.");const c=Array.from(o,d=>a.toASN(d)),l=t.repeated==="sequence"?mt:bt;s=new l({value:c})}else s=a.toASN(o)}else if(t.repeated){if(!Array.isArray(o))throw new TypeError("Parameter 'objProp' should be type of Array.");const a=Array.from(o,l=>this.toASN(l)),c=t.repeated==="sequence"?mt:bt;s=new c({value:a})}else s=this.toASN(o);return s}}class ae extends Array{constructor(t=[]){if(typeof t=="number")super(t);else{super();for(const r of t)this.push(r)}}}class H{static serialize(t){return Io.serialize(t)}static parse(t,r){return Pp.parse(t,r)}static toString(t){const r=D.isBufferSource(t)?D.toArrayBuffer(t):H.serialize(t),i=dr(r);if(i.offset===-1)throw new Error(`Cannot decode ASN.1 data. ${i.result.error}`);return i.result.toString()}}function u(e,t,r,i){var o=arguments.length,s=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,i);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(s=(o<3?a(s):o>3?a(t,r,s):a(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}typeof SuppressedError=="function"&&SuppressedError;var Zc={exports:{}};(function(e){(function(t){const r="(0?\\d+|0x[a-f0-9]+)",i={fourOctet:new RegExp(`^${r}\\.${r}\\.${r}\\.${r}$`,"i"),threeOctet:new RegExp(`^${r}\\.${r}\\.${r}$`,"i"),twoOctet:new RegExp(`^${r}\\.${r}$`,"i"),longValue:new RegExp(`^${r}$`,"i")},o=new RegExp("^0[0-7]+$","i"),s=new RegExp("^0x[a-f0-9]+$","i"),a="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",l={zoneIndex:new RegExp(a,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${a})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${r}\\.${r}\\.${r}\\.${r}(${a})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${r}\\.${r}\\.${r}\\.${r}(${a})?$`,"i")};function d(h,g){if(h.indexOf("::")!==h.lastIndexOf("::"))return null;let m=0,v=-1,b=(h.match(l.zoneIndex)||[])[0],w,x;for(b&&(b=b.substring(1),h=h.replace(/%.+$/,""));(v=h.indexOf(":",v+1))>=0;)m++;if(h.substr(0,2)==="::"&&m--,h.substr(-2,2)==="::"&&m--,m>g)return null;for(x=g-m,w=":";x--;)w+="0:";return h=h.replace("::",w),h[0]===":"&&(h=h.slice(1)),h[h.length-1]===":"&&(h=h.slice(0,-1)),g=function(){const F=h.split(":"),Z=[];for(let I=0;I<F.length;I++)Z.push(parseInt(F[I],16));return Z}(),{parts:g,zoneId:b}}function p(h,g,m,v){if(h.length!==g.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let b=0,w;for(;v>0;){if(w=m-v,w<0&&(w=0),h[b]>>w!==g[b]>>w)return!1;v-=m,b+=1}return!0}function y(h){if(s.test(h))return parseInt(h,16);if(h[0]==="0"&&!isNaN(parseInt(h[1],10))){if(o.test(h))return parseInt(h,8);throw new Error(`ipaddr: cannot parse ${h} as octal`)}return parseInt(h,10)}function A(h,g){for(;h.length<g;)h=`0${h}`;return h}const C={};C.IPv4=function(){function h(g){if(g.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let m,v;for(m=0;m<g.length;m++)if(v=g[m],!(0<=v&&v<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=g}return h.prototype.SpecialRanges={unspecified:[[new h([0,0,0,0]),8]],broadcast:[[new h([255,255,255,255]),32]],multicast:[[new h([224,0,0,0]),4]],linkLocal:[[new h([169,254,0,0]),16]],loopback:[[new h([127,0,0,0]),8]],carrierGradeNat:[[new h([100,64,0,0]),10]],private:[[new h([10,0,0,0]),8],[new h([172,16,0,0]),12],[new h([192,168,0,0]),16]],reserved:[[new h([192,0,0,0]),24],[new h([192,0,2,0]),24],[new h([192,88,99,0]),24],[new h([198,18,0,0]),15],[new h([198,51,100,0]),24],[new h([203,0,113,0]),24],[new h([240,0,0,0]),4]]},h.prototype.kind=function(){return"ipv4"},h.prototype.match=function(g,m){let v;if(m===void 0&&(v=g,g=v[0],m=v[1]),g.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return p(this.octets,g.octets,8,m)},h.prototype.prefixLengthFromSubnetMask=function(){let g=0,m=!1;const v={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0};let b,w,x;for(b=3;b>=0;b-=1)if(w=this.octets[b],w in v){if(x=v[w],m&&x!==0)return null;x!==8&&(m=!0),g+=x}else return null;return 32-g},h.prototype.range=function(){return C.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){return this.octets.slice(0)},h.prototype.toIPv4MappedAddress=function(){return C.IPv6.parse(`::ffff:${this.toString()}`)},h.prototype.toNormalizedString=function(){return this.toString()},h.prototype.toString=function(){return this.octets.join(".")},h}(),C.IPv4.broadcastAddressFromCIDR=function(h){try{const g=this.parseCIDR(h),m=g[0].toByteArray(),v=this.subnetMaskFromPrefixLength(g[1]).toByteArray(),b=[];let w=0;for(;w<4;)b.push(parseInt(m[w],10)|parseInt(v[w],10)^255),w++;return new this(b)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},C.IPv4.isIPv4=function(h){return this.parser(h)!==null},C.IPv4.isValid=function(h){try{return new this(this.parser(h)),!0}catch{return!1}},C.IPv4.isValidFourPartDecimal=function(h){return!!(C.IPv4.isValid(h)&&h.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},C.IPv4.networkAddressFromCIDR=function(h){let g,m,v,b,w;try{for(g=this.parseCIDR(h),v=g[0].toByteArray(),w=this.subnetMaskFromPrefixLength(g[1]).toByteArray(),b=[],m=0;m<4;)b.push(parseInt(v[m],10)&parseInt(w[m],10)),m++;return new this(b)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},C.IPv4.parse=function(h){const g=this.parser(h);if(g===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(g)},C.IPv4.parseCIDR=function(h){let g;if(g=h.match(/^(.+)\/(\d+)$/)){const m=parseInt(g[2]);if(m>=0&&m<=32){const v=[this.parse(g[1]),m];return Object.defineProperty(v,"toString",{value:function(){return this.join("/")}}),v}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},C.IPv4.parser=function(h){let g,m,v;if(g=h.match(i.fourOctet))return function(){const b=g.slice(1,6),w=[];for(let x=0;x<b.length;x++)m=b[x],w.push(y(m));return w}();if(g=h.match(i.longValue)){if(v=y(g[1]),v>4294967295||v<0)throw new Error("ipaddr: address outside defined range");return function(){const b=[];let w;for(w=0;w<=24;w+=8)b.push(v>>w&255);return b}().reverse()}else return(g=h.match(i.twoOctet))?function(){const b=g.slice(1,4),w=[];if(v=y(b[1]),v>16777215||v<0)throw new Error("ipaddr: address outside defined range");return w.push(y(b[0])),w.push(v>>16&255),w.push(v>>8&255),w.push(v&255),w}():(g=h.match(i.threeOctet))?function(){const b=g.slice(1,5),w=[];if(v=y(b[2]),v>65535||v<0)throw new Error("ipaddr: address outside defined range");return w.push(y(b[0])),w.push(y(b[1])),w.push(v>>8&255),w.push(v&255),w}():null},C.IPv4.subnetMaskFromPrefixLength=function(h){if(h=parseInt(h),h<0||h>32)throw new Error("ipaddr: invalid IPv4 prefix length");const g=[0,0,0,0];let m=0;const v=Math.floor(h/8);for(;m<v;)g[m]=255,m++;return v<4&&(g[v]=Math.pow(2,h%8)-1<<8-h%8),new this(g)},C.IPv6=function(){function h(g,m){let v,b;if(g.length===16)for(this.parts=[],v=0;v<=14;v+=2)this.parts.push(g[v]<<8|g[v+1]);else if(g.length===8)this.parts=g;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(v=0;v<this.parts.length;v++)if(b=this.parts[v],!(0<=b&&b<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");m&&(this.zoneId=m)}return h.prototype.SpecialRanges={unspecified:[new h([0,0,0,0,0,0,0,0]),128],linkLocal:[new h([65152,0,0,0,0,0,0,0]),10],multicast:[new h([65280,0,0,0,0,0,0,0]),8],loopback:[new h([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new h([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new h([0,0,0,0,0,65535,0,0]),96],rfc6145:[new h([0,0,0,0,65535,0,0,0]),96],rfc6052:[new h([100,65435,0,0,0,0,0,0]),96],"6to4":[new h([8194,0,0,0,0,0,0,0]),16],teredo:[new h([8193,0,0,0,0,0,0,0]),32],reserved:[[new h([8193,3512,0,0,0,0,0,0]),32]],benchmarking:[new h([8193,2,0,0,0,0,0,0]),48],amt:[new h([8193,3,0,0,0,0,0,0]),32],as112v6:[new h([8193,4,274,0,0,0,0,0]),48],deprecated:[new h([8193,16,0,0,0,0,0,0]),28],orchid2:[new h([8193,32,0,0,0,0,0,0]),28]},h.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},h.prototype.kind=function(){return"ipv6"},h.prototype.match=function(g,m){let v;if(m===void 0&&(v=g,g=v[0],m=v[1]),g.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return p(this.parts,g.parts,16,m)},h.prototype.prefixLengthFromSubnetMask=function(){let g=0,m=!1;const v={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0};let b,w;for(let x=7;x>=0;x-=1)if(b=this.parts[x],b in v){if(w=v[b],m&&w!==0)return null;w!==16&&(m=!0),g+=w}else return null;return 128-g},h.prototype.range=function(){return C.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){let g;const m=[],v=this.parts;for(let b=0;b<v.length;b++)g=v[b],m.push(g>>8),m.push(g&255);return m},h.prototype.toFixedLengthString=function(){const g=(function(){const v=[];for(let b=0;b<this.parts.length;b++)v.push(A(this.parts[b].toString(16),4));return v}).call(this).join(":");let m="";return this.zoneId&&(m=`%${this.zoneId}`),g+m},h.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");const g=this.parts.slice(-2),m=g[0],v=g[1];return new C.IPv4([m>>8,m&255,v>>8,v&255])},h.prototype.toNormalizedString=function(){const g=(function(){const v=[];for(let b=0;b<this.parts.length;b++)v.push(this.parts[b].toString(16));return v}).call(this).join(":");let m="";return this.zoneId&&(m=`%${this.zoneId}`),g+m},h.prototype.toRFC5952String=function(){const g=/((^|:)(0(:|$)){2,})/g,m=this.toNormalizedString();let v=0,b=-1,w;for(;w=g.exec(m);)w[0].length>b&&(v=w.index,b=w[0].length);return b<0?m:`${m.substring(0,v)}::${m.substring(v+b)}`},h.prototype.toString=function(){return this.toRFC5952String()},h}(),C.IPv6.broadcastAddressFromCIDR=function(h){try{const g=this.parseCIDR(h),m=g[0].toByteArray(),v=this.subnetMaskFromPrefixLength(g[1]).toByteArray(),b=[];let w=0;for(;w<16;)b.push(parseInt(m[w],10)|parseInt(v[w],10)^255),w++;return new this(b)}catch(g){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${g})`)}},C.IPv6.isIPv6=function(h){return this.parser(h)!==null},C.IPv6.isValid=function(h){if(typeof h=="string"&&h.indexOf(":")===-1)return!1;try{const g=this.parser(h);return new this(g.parts,g.zoneId),!0}catch{return!1}},C.IPv6.networkAddressFromCIDR=function(h){let g,m,v,b,w;try{for(g=this.parseCIDR(h),v=g[0].toByteArray(),w=this.subnetMaskFromPrefixLength(g[1]).toByteArray(),b=[],m=0;m<16;)b.push(parseInt(v[m],10)&parseInt(w[m],10)),m++;return new this(b)}catch(x){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${x})`)}},C.IPv6.parse=function(h){const g=this.parser(h);if(g.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(g.parts,g.zoneId)},C.IPv6.parseCIDR=function(h){let g,m,v;if((m=h.match(/^(.+)\/(\d+)$/))&&(g=parseInt(m[2]),g>=0&&g<=128))return v=[this.parse(m[1]),g],Object.defineProperty(v,"toString",{value:function(){return this.join("/")}}),v;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},C.IPv6.parser=function(h){let g,m,v,b,w,x;if(v=h.match(l.deprecatedTransitional))return this.parser(`::ffff:${v[1]}`);if(l.native.test(h))return d(h,8);if((v=h.match(l.transitional))&&(x=v[6]||"",g=d(v[1].slice(0,-1)+x,6),g.parts)){for(w=[parseInt(v[2]),parseInt(v[3]),parseInt(v[4]),parseInt(v[5])],m=0;m<w.length;m++)if(b=w[m],!(0<=b&&b<=255))return null;return g.parts.push(w[0]<<8|w[1]),g.parts.push(w[2]<<8|w[3]),{parts:g.parts,zoneId:g.zoneId}}return null},C.IPv6.subnetMaskFromPrefixLength=function(h){if(h=parseInt(h),h<0||h>128)throw new Error("ipaddr: invalid IPv6 prefix length");const g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];let m=0;const v=Math.floor(h/8);for(;m<v;)g[m]=255,m++;return v<16&&(g[v]=Math.pow(2,h%8)-1<<8-h%8),new this(g)},C.fromByteArray=function(h){const g=h.length;if(g===4)return new C.IPv4(h);if(g===16)return new C.IPv6(h);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},C.isValid=function(h){return C.IPv6.isValid(h)||C.IPv4.isValid(h)},C.parse=function(h){if(C.IPv6.isValid(h))return C.IPv6.parse(h);if(C.IPv4.isValid(h))return C.IPv4.parse(h);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},C.parseCIDR=function(h){try{return C.IPv6.parseCIDR(h)}catch{try{return C.IPv4.parseCIDR(h)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},C.process=function(h){const g=this.parse(h);return g.kind()==="ipv6"&&g.isIPv4MappedAddress()?g.toIPv4Address():g},C.subnetMatch=function(h,g,m){let v,b,w,x;m==null&&(m="unicast");for(b in g)if(Object.prototype.hasOwnProperty.call(g,b)){for(w=g[b],w[0]&&!(w[0]instanceof Array)&&(w=[w]),v=0;v<w.length;v++)if(x=w[v],h.kind()===x[0].kind()&&h.match.apply(h,x))return b}return m},e.exports?e.exports=C:t.ipaddr=C})(co)})(Zc);var Qc=Zc.exports;class Xc{static decodeIP(t){if(t.length===64&&parseInt(t,16)===0)return"::/0";if(t.length!==16)return t;const r=parseInt(t.slice(8),16).toString(2).split("").reduce((o,s)=>o+ +s,0);let i=t.slice(0,8).replace(/(.{2})/g,o=>`${parseInt(o,16)}.`);return i=i.slice(0,-1),`${i}/${r}`}static toString(t){if(t.byteLength===4||t.byteLength===16){const r=new Uint8Array(t);return Qc.fromByteArray(Array.from(r)).toString()}return this.decodeIP(R.ToHex(t))}static fromString(t){const r=Qc.parse(t);return new Uint8Array(r.toByteArray()).buffer}}var Eo,No,_o;let Ne=class{constructor(t={}){Object.assign(this,t)}toString(){return this.bmpString||this.printableString||this.teletexString||this.universalString||this.utf8String||""}};u([f({type:k.TeletexString})],Ne.prototype,"teletexString",void 0),u([f({type:k.PrintableString})],Ne.prototype,"printableString",void 0),u([f({type:k.UniversalString})],Ne.prototype,"universalString",void 0),u([f({type:k.Utf8String})],Ne.prototype,"utf8String",void 0),u([f({type:k.BmpString})],Ne.prototype,"bmpString",void 0),Ne=u([O({type:N.Choice})],Ne);let fr=class extends Ne{constructor(t={}){super(t),Object.assign(this,t)}toString(){return this.ia5String||(this.anyValue?R.ToHex(this.anyValue):super.toString())}};u([f({type:k.IA5String})],fr.prototype,"ia5String",void 0),u([f({type:k.Any})],fr.prototype,"anyValue",void 0),fr=u([O({type:N.Choice})],fr);class Wr{constructor(t={}){this.type="",this.value=new fr,Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Wr.prototype,"type",void 0),u([f({type:fr})],Wr.prototype,"value",void 0);let pr=Eo=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Eo.prototype)}};pr=Eo=u([O({type:N.Set,itemType:Wr})],pr);let Oo=No=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,No.prototype)}};Oo=No=u([O({type:N.Sequence,itemType:pr})],Oo);let Ce=_o=class extends Oo{constructor(t){super(t),Object.setPrototypeOf(this,_o.prototype)}};Ce=_o=u([O({type:N.Sequence})],Ce);const $p={fromASN:e=>Xc.toString(Wi.fromASN(e)),toASN:e=>Wi.toASN(Xc.fromString(e))};class Jr{constructor(t={}){this.typeId="",this.value=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Jr.prototype,"typeId",void 0),u([f({type:k.Any,context:0})],Jr.prototype,"value",void 0);class To{constructor(t={}){this.partyName=new Ne,Object.assign(this,t)}}u([f({type:Ne,optional:!0,context:0,implicit:!0})],To.prototype,"nameAssigner",void 0),u([f({type:Ne,context:1,implicit:!0})],To.prototype,"partyName",void 0);let Q=class{constructor(t={}){Object.assign(this,t)}};u([f({type:Jr,context:0,implicit:!0})],Q.prototype,"otherName",void 0),u([f({type:k.IA5String,context:1,implicit:!0})],Q.prototype,"rfc822Name",void 0),u([f({type:k.IA5String,context:2,implicit:!0})],Q.prototype,"dNSName",void 0),u([f({type:k.Any,context:3,implicit:!0})],Q.prototype,"x400Address",void 0),u([f({type:Ce,context:4,implicit:!1})],Q.prototype,"directoryName",void 0),u([f({type:To,context:5})],Q.prototype,"ediPartyName",void 0),u([f({type:k.IA5String,context:6,implicit:!0})],Q.prototype,"uniformResourceIdentifier",void 0),u([f({type:k.OctetString,context:7,implicit:!0,converter:$p})],Q.prototype,"iPAddress",void 0),u([f({type:k.ObjectIdentifier,context:8,implicit:!0})],Q.prototype,"registeredID",void 0),Q=u([O({type:N.Choice})],Q);const hr="1.3.6.1.5.5.7.3",Jt="2.5.29";var Vo;class Ji{constructor(t={}){this.accessMethod="",this.accessLocation=new Q,Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Ji.prototype,"accessMethod",void 0),u([f({type:Q})],Ji.prototype,"accessLocation",void 0);let el=Vo=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Vo.prototype)}};el=Vo=u([O({type:N.Sequence,itemType:Ji})],el);const jo=`${Jt}.35`;class Do extends ie{}class Yt{constructor(t={}){t&&Object.assign(this,t)}}u([f({type:Do,context:0,optional:!0,implicit:!0})],Yt.prototype,"keyIdentifier",void 0),u([f({type:Q,context:1,optional:!0,implicit:!0,repeated:"sequence"})],Yt.prototype,"authorityCertIssuer",void 0),u([f({type:k.Integer,context:2,optional:!0,implicit:!0,converter:ge})],Yt.prototype,"authorityCertSerialNumber",void 0);const tl=`${Jt}.19`;class Yi{constructor(t={}){this.cA=!1,Object.assign(this,t)}}u([f({type:k.Boolean,defaultValue:!1})],Yi.prototype,"cA",void 0),u([f({type:k.Integer,optional:!0})],Yi.prototype,"pathLenConstraint",void 0);var Po;let $e=Po=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Po.prototype)}};$e=Po=u([O({type:N.Sequence,itemType:Q})],$e);var $o;let rl=$o=class extends $e{constructor(t){super(t),Object.setPrototypeOf(this,$o.prototype)}};rl=$o=u([O({type:N.Sequence})],rl);var Mo;const il=`${Jt}.32`;let kt=class{constructor(t={}){Object.assign(this,t)}toString(){return this.ia5String||this.visibleString||this.bmpString||this.utf8String||""}};u([f({type:k.IA5String})],kt.prototype,"ia5String",void 0),u([f({type:k.VisibleString})],kt.prototype,"visibleString",void 0),u([f({type:k.BmpString})],kt.prototype,"bmpString",void 0),u([f({type:k.Utf8String})],kt.prototype,"utf8String",void 0),kt=u([O({type:N.Choice})],kt);class Ro{constructor(t={}){this.organization=new kt,this.noticeNumbers=[],Object.assign(this,t)}}u([f({type:kt})],Ro.prototype,"organization",void 0),u([f({type:k.Integer,repeated:"sequence"})],Ro.prototype,"noticeNumbers",void 0);class Uo{constructor(t={}){Object.assign(this,t)}}u([f({type:Ro,optional:!0})],Uo.prototype,"noticeRef",void 0),u([f({type:kt,optional:!0})],Uo.prototype,"explicitText",void 0);let Zi=class{constructor(t={}){Object.assign(this,t)}};u([f({type:k.IA5String})],Zi.prototype,"cPSuri",void 0),u([f({type:Uo})],Zi.prototype,"userNotice",void 0),Zi=u([O({type:N.Choice})],Zi);class Lo{constructor(t={}){this.policyQualifierId="",this.qualifier=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Lo.prototype,"policyQualifierId",void 0),u([f({type:k.Any})],Lo.prototype,"qualifier",void 0);class Qi{constructor(t={}){this.policyIdentifier="",Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Qi.prototype,"policyIdentifier",void 0),u([f({type:Lo,repeated:"sequence",optional:!0})],Qi.prototype,"policyQualifiers",void 0);let Xi=Mo=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Mo.prototype)}};Xi=Mo=u([O({type:N.Sequence,itemType:Qi})],Xi);let en=class{constructor(t=0){this.value=t}};u([f({type:k.Integer})],en.prototype,"value",void 0),en=u([O({type:N.Choice})],en);let nl=class extends en{};nl=u([O({type:N.Choice})],nl);var Ho,rt;(function(e){e[e.unused=1]="unused",e[e.keyCompromise=2]="keyCompromise",e[e.cACompromise=4]="cACompromise",e[e.affiliationChanged=8]="affiliationChanged",e[e.superseded=16]="superseded",e[e.cessationOfOperation=32]="cessationOfOperation",e[e.certificateHold=64]="certificateHold",e[e.privilegeWithdrawn=128]="privilegeWithdrawn",e[e.aACompromise=256]="aACompromise"})(rt||(rt={}));class ol extends Gi{toJSON(){const t=[],r=this.toNumber();return r&rt.aACompromise&&t.push("aACompromise"),r&rt.affiliationChanged&&t.push("affiliationChanged"),r&rt.cACompromise&&t.push("cACompromise"),r&rt.certificateHold&&t.push("certificateHold"),r&rt.cessationOfOperation&&t.push("cessationOfOperation"),r&rt.keyCompromise&&t.push("keyCompromise"),r&rt.privilegeWithdrawn&&t.push("privilegeWithdrawn"),r&rt.superseded&&t.push("superseded"),r&rt.unused&&t.push("unused"),t}toString(){return`[${this.toJSON().join(", ")}]`}}let yr=class{constructor(t={}){Object.assign(this,t)}};u([f({type:Q,context:0,repeated:"sequence",implicit:!0})],yr.prototype,"fullName",void 0),u([f({type:pr,context:1,implicit:!0})],yr.prototype,"nameRelativeToCRLIssuer",void 0),yr=u([O({type:N.Choice})],yr);class Yr{constructor(t={}){Object.assign(this,t)}}u([f({type:yr,context:0,optional:!0})],Yr.prototype,"distributionPoint",void 0),u([f({type:ol,context:1,optional:!0,implicit:!0})],Yr.prototype,"reasons",void 0),u([f({type:Q,context:2,optional:!0,repeated:"sequence",implicit:!0})],Yr.prototype,"cRLIssuer",void 0);let Fo=Ho=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Ho.prototype)}};Fo=Ho=u([O({type:N.Sequence,itemType:Yr})],Fo);var qo;let sl=qo=class extends Fo{constructor(t){super(t),Object.setPrototypeOf(this,qo.prototype)}};sl=qo=u([O({type:N.Sequence,itemType:Yr})],sl);class Ve{constructor(t={}){this.onlyContainsUserCerts=Ve.ONLY,this.onlyContainsCACerts=Ve.ONLY,this.indirectCRL=Ve.ONLY,this.onlyContainsAttributeCerts=Ve.ONLY,Object.assign(this,t)}}Ve.ONLY=!1,u([f({type:yr,context:0,optional:!0})],Ve.prototype,"distributionPoint",void 0),u([f({type:k.Boolean,context:1,defaultValue:Ve.ONLY,implicit:!0})],Ve.prototype,"onlyContainsUserCerts",void 0),u([f({type:k.Boolean,context:2,defaultValue:Ve.ONLY,implicit:!0})],Ve.prototype,"onlyContainsCACerts",void 0),u([f({type:ol,context:3,optional:!0,implicit:!0})],Ve.prototype,"onlySomeReasons",void 0),u([f({type:k.Boolean,context:4,defaultValue:Ve.ONLY,implicit:!0})],Ve.prototype,"indirectCRL",void 0),u([f({type:k.Boolean,context:5,defaultValue:Ve.ONLY,implicit:!0})],Ve.prototype,"onlyContainsAttributeCerts",void 0);var Zr;(function(e){e[e.unspecified=0]="unspecified",e[e.keyCompromise=1]="keyCompromise",e[e.cACompromise=2]="cACompromise",e[e.affiliationChanged=3]="affiliationChanged",e[e.superseded=4]="superseded",e[e.cessationOfOperation=5]="cessationOfOperation",e[e.certificateHold=6]="certificateHold",e[e.removeFromCRL=8]="removeFromCRL",e[e.privilegeWithdrawn=9]="privilegeWithdrawn",e[e.aACompromise=10]="aACompromise"})(Zr||(Zr={}));let Ko=class{constructor(t=Zr.unspecified){this.reason=Zr.unspecified,this.reason=t}toJSON(){return Zr[this.reason]}toString(){return this.toJSON()}};u([f({type:k.Enumerated})],Ko.prototype,"reason",void 0),Ko=u([O({type:N.Choice})],Ko);var zo;const al=`${Jt}.37`;let tn=zo=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,zo.prototype)}};tn=zo=u([O({type:N.Sequence,itemType:k.ObjectIdentifier})],tn);const Mp=`${hr}.1`,Rp=`${hr}.2`,Up=`${hr}.3`,Lp=`${hr}.4`,Hp=`${hr}.8`,Fp=`${hr}.9`;let Go=class{constructor(t=new ArrayBuffer(0)){this.value=t}};u([f({type:k.Integer,converter:ge})],Go.prototype,"value",void 0),Go=u([O({type:N.Choice})],Go);let Wo=class{constructor(t){this.value=new Date,t&&(this.value=t)}};u([f({type:k.GeneralizedTime})],Wo.prototype,"value",void 0),Wo=u([O({type:N.Choice})],Wo);var Jo;let cl=Jo=class extends $e{constructor(t){super(t),Object.setPrototypeOf(this,Jo.prototype)}};cl=Jo=u([O({type:N.Sequence})],cl);const ll=`${Jt}.15`;var it;(function(e){e[e.digitalSignature=1]="digitalSignature",e[e.nonRepudiation=2]="nonRepudiation",e[e.keyEncipherment=4]="keyEncipherment",e[e.dataEncipherment=8]="dataEncipherment",e[e.keyAgreement=16]="keyAgreement",e[e.keyCertSign=32]="keyCertSign",e[e.cRLSign=64]="cRLSign",e[e.encipherOnly=128]="encipherOnly",e[e.decipherOnly=256]="decipherOnly"})(it||(it={}));class Yo extends Gi{toJSON(){const t=this.toNumber(),r=[];return t&it.cRLSign&&r.push("crlSign"),t&it.dataEncipherment&&r.push("dataEncipherment"),t&it.decipherOnly&&r.push("decipherOnly"),t&it.digitalSignature&&r.push("digitalSignature"),t&it.encipherOnly&&r.push("encipherOnly"),t&it.keyAgreement&&r.push("keyAgreement"),t&it.keyCertSign&&r.push("keyCertSign"),t&it.keyEncipherment&&r.push("keyEncipherment"),t&it.nonRepudiation&&r.push("nonRepudiation"),r}toString(){return`[${this.toJSON().join(", ")}]`}}var Zo;class rn{constructor(t={}){this.base=new Q,this.minimum=0,Object.assign(this,t)}}u([f({type:Q})],rn.prototype,"base",void 0),u([f({type:k.Integer,context:0,defaultValue:0,implicit:!0})],rn.prototype,"minimum",void 0),u([f({type:k.Integer,context:1,optional:!0,implicit:!0})],rn.prototype,"maximum",void 0);let nn=Zo=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Zo.prototype)}};nn=Zo=u([O({type:N.Sequence,itemType:rn})],nn);class ul{constructor(t={}){Object.assign(this,t)}}u([f({type:nn,context:0,optional:!0,implicit:!0})],ul.prototype,"permittedSubtrees",void 0),u([f({type:nn,context:1,optional:!0,implicit:!0})],ul.prototype,"excludedSubtrees",void 0);class dl{constructor(t={}){Object.assign(this,t)}}u([f({type:k.Integer,context:0,implicit:!0,optional:!0,converter:ge})],dl.prototype,"requireExplicitPolicy",void 0),u([f({type:k.Integer,context:1,implicit:!0,optional:!0,converter:ge})],dl.prototype,"inhibitPolicyMapping",void 0);var Qo;class Xo{constructor(t={}){this.issuerDomainPolicy="",this.subjectDomainPolicy="",Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Xo.prototype,"issuerDomainPolicy",void 0),u([f({type:k.ObjectIdentifier})],Xo.prototype,"subjectDomainPolicy",void 0);let fl=Qo=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Qo.prototype)}};fl=Qo=u([O({type:N.Sequence,itemType:Xo})],fl);var es;const pl=`${Jt}.17`;let ts=es=class extends $e{constructor(t){super(t),Object.setPrototypeOf(this,es.prototype)}};ts=es=u([O({type:N.Sequence})],ts);let Ct=class{constructor(t={}){this.type="",this.values=[],Object.assign(this,t)}};u([f({type:k.ObjectIdentifier})],Ct.prototype,"type",void 0),u([f({type:k.Any,repeated:"set"})],Ct.prototype,"values",void 0);var rs;let hl=rs=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,rs.prototype)}};hl=rs=u([O({type:N.Sequence,itemType:Ct})],hl);const yl=`${Jt}.14`;class Tt extends Do{}class gl{constructor(t={}){Object.assign(this,t)}}u([f({type:k.GeneralizedTime,context:0,implicit:!0,optional:!0})],gl.prototype,"notBefore",void 0),u([f({type:k.GeneralizedTime,context:1,implicit:!0,optional:!0})],gl.prototype,"notAfter",void 0);var Qr;(function(e){e[e.keyUpdateAllowed=1]="keyUpdateAllowed",e[e.newExtensions=2]="newExtensions",e[e.pKIXCertificate=4]="pKIXCertificate"})(Qr||(Qr={}));class ml extends Gi{toJSON(){const t=[],r=this.toNumber();return r&Qr.pKIXCertificate&&t.push("pKIXCertificate"),r&Qr.newExtensions&&t.push("newExtensions"),r&Qr.keyUpdateAllowed&&t.push("keyUpdateAllowed"),t}toString(){return`[${this.toJSON().join(", ")}]`}}class bl{constructor(t={}){this.entrustVers="",this.entrustInfoFlags=new ml,Object.assign(this,t)}}u([f({type:k.GeneralString})],bl.prototype,"entrustVers",void 0),u([f({type:ml})],bl.prototype,"entrustInfoFlags",void 0);var is;let wl=is=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,is.prototype)}};wl=is=u([O({type:N.Sequence,itemType:Ji})],wl);class L{constructor(t={}){this.algorithm="",Object.assign(this,t)}isEqual(t){return t instanceof L&&t.algorithm==this.algorithm&&(t.parameters&&this.parameters&&za(t.parameters,this.parameters)||t.parameters===this.parameters)}}u([f({type:k.ObjectIdentifier})],L.prototype,"algorithm",void 0),u([f({type:k.Any,optional:!0})],L.prototype,"parameters",void 0);class St{constructor(t={}){this.algorithm=new L,this.subjectPublicKey=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:L})],St.prototype,"algorithm",void 0),u([f({type:k.BitString})],St.prototype,"subjectPublicKey",void 0);let je=class{constructor(t){if(t)if(typeof t=="string"||typeof t=="number"||t instanceof Date){const r=new Date(t);r.getUTCFullYear()>2049?this.generalTime=r:this.utcTime=r}else Object.assign(this,t)}getTime(){const t=this.utcTime||this.generalTime;if(!t)throw new Error("Cannot get time from CHOICE object");return t}};u([f({type:k.UTCTime})],je.prototype,"utcTime",void 0),u([f({type:k.GeneralizedTime})],je.prototype,"generalTime",void 0),je=u([O({type:N.Choice})],je);class on{constructor(t){this.notBefore=new je(new Date),this.notAfter=new je(new Date),t&&(this.notBefore=new je(t.notBefore),this.notAfter=new je(t.notAfter))}}u([f({type:je})],on.prototype,"notBefore",void 0),u([f({type:je})],on.prototype,"notAfter",void 0);var ns;let nt=class Ff{constructor(t={}){this.extnID="",this.critical=Ff.CRITICAL,this.extnValue=new ie,Object.assign(this,t)}};nt.CRITICAL=!1,u([f({type:k.ObjectIdentifier})],nt.prototype,"extnID",void 0),u([f({type:k.Boolean,defaultValue:nt.CRITICAL})],nt.prototype,"critical",void 0),u([f({type:ie})],nt.prototype,"extnValue",void 0);let Zt=ns=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,ns.prototype)}};Zt=ns=u([O({type:N.Sequence,itemType:nt})],Zt);var gr;(function(e){e[e.v1=0]="v1",e[e.v2=1]="v2",e[e.v3=2]="v3"})(gr||(gr={}));class Qe{constructor(t={}){this.version=gr.v1,this.serialNumber=new ArrayBuffer(0),this.signature=new L,this.issuer=new Ce,this.validity=new on,this.subject=new Ce,this.subjectPublicKeyInfo=new St,Object.assign(this,t)}}u([f({type:k.Integer,context:0,defaultValue:gr.v1})],Qe.prototype,"version",void 0),u([f({type:k.Integer,converter:ge})],Qe.prototype,"serialNumber",void 0),u([f({type:L})],Qe.prototype,"signature",void 0),u([f({type:Ce})],Qe.prototype,"issuer",void 0),u([f({type:on})],Qe.prototype,"validity",void 0),u([f({type:Ce})],Qe.prototype,"subject",void 0),u([f({type:St})],Qe.prototype,"subjectPublicKeyInfo",void 0),u([f({type:k.BitString,context:1,implicit:!0,optional:!0})],Qe.prototype,"issuerUniqueID",void 0),u([f({type:k.BitString,context:2,implicit:!0,optional:!0})],Qe.prototype,"subjectUniqueID",void 0),u([f({type:Zt,context:3,optional:!0})],Qe.prototype,"extensions",void 0);class mr{constructor(t={}){this.tbsCertificate=new Qe,this.signatureAlgorithm=new L,this.signatureValue=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:Qe})],mr.prototype,"tbsCertificate",void 0),u([f({type:L})],mr.prototype,"signatureAlgorithm",void 0),u([f({type:k.BitString})],mr.prototype,"signatureValue",void 0);class sn{constructor(t={}){this.userCertificate=new ArrayBuffer(0),this.revocationDate=new je,Object.assign(this,t)}}u([f({type:k.Integer,converter:ge})],sn.prototype,"userCertificate",void 0),u([f({type:je})],sn.prototype,"revocationDate",void 0),u([f({type:nt,optional:!0,repeated:"sequence"})],sn.prototype,"crlEntryExtensions",void 0);class xt{constructor(t={}){this.signature=new L,this.issuer=new Ce,this.thisUpdate=new je,Object.assign(this,t)}}u([f({type:k.Integer,optional:!0})],xt.prototype,"version",void 0),u([f({type:L})],xt.prototype,"signature",void 0),u([f({type:Ce})],xt.prototype,"issuer",void 0),u([f({type:je})],xt.prototype,"thisUpdate",void 0),u([f({type:je,optional:!0})],xt.prototype,"nextUpdate",void 0),u([f({type:sn,repeated:"sequence",optional:!0})],xt.prototype,"revokedCertificates",void 0),u([f({type:nt,optional:!0,context:0,repeated:"sequence"})],xt.prototype,"crlExtensions",void 0);let os=class{constructor(t={}){this.tbsCertList=new xt,this.signatureAlgorithm=new L,this.signature=new ArrayBuffer(0),Object.assign(this,t)}};u([f({type:xt})],os.prototype,"tbsCertList",void 0),u([f({type:L})],os.prototype,"signatureAlgorithm",void 0),u([f({type:k.BitString})],os.prototype,"signature",void 0);let br=class{constructor(t={}){this.attrType="",this.attrValues=[],Object.assign(this,t)}};u([f({type:k.ObjectIdentifier})],br.prototype,"attrType",void 0),u([f({type:k.Any,repeated:"set"})],br.prototype,"attrValues",void 0);class ss{constructor(t={}){this.acIssuer=new Q,this.acSerial=0,this.attrs=[],Object.assign(this,t)}}u([f({type:Q})],ss.prototype,"acIssuer",void 0),u([f({type:k.Integer})],ss.prototype,"acSerial",void 0),u([f({type:Ct,repeated:"sequence"})],ss.prototype,"attrs",void 0);var as;let an=as=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,as.prototype)}};an=as=u([O({type:N.Sequence,itemType:k.ObjectIdentifier})],an);class cn{constructor(t={}){this.permitUnSpecified=!0,Object.assign(this,t)}}u([f({type:k.Integer,optional:!0})],cn.prototype,"pathLenConstraint",void 0),u([f({type:an,implicit:!0,context:0,optional:!0})],cn.prototype,"permittedAttrs",void 0),u([f({type:an,implicit:!0,context:1,optional:!0})],cn.prototype,"excludedAttrs",void 0),u([f({type:k.Boolean,defaultValue:!0})],cn.prototype,"permitUnSpecified",void 0);class Qt{constructor(t={}){this.issuer=new $e,this.serial=new ArrayBuffer(0),this.issuerUID=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:$e})],Qt.prototype,"issuer",void 0),u([f({type:k.Integer,converter:ge})],Qt.prototype,"serial",void 0),u([f({type:k.BitString,optional:!0})],Qt.prototype,"issuerUID",void 0);var cs;(function(e){e[e.publicKey=0]="publicKey",e[e.publicKeyCert=1]="publicKeyCert",e[e.otherObjectTypes=2]="otherObjectTypes"})(cs||(cs={}));class Xt{constructor(t={}){this.digestedObjectType=cs.publicKey,this.digestAlgorithm=new L,this.objectDigest=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.Enumerated})],Xt.prototype,"digestedObjectType",void 0),u([f({type:k.ObjectIdentifier,optional:!0})],Xt.prototype,"otherObjectTypeID",void 0),u([f({type:L})],Xt.prototype,"digestAlgorithm",void 0),u([f({type:k.BitString})],Xt.prototype,"objectDigest",void 0);class ln{constructor(t={}){Object.assign(this,t)}}u([f({type:$e,optional:!0})],ln.prototype,"issuerName",void 0),u([f({type:Qt,context:0,implicit:!0,optional:!0})],ln.prototype,"baseCertificateID",void 0),u([f({type:Xt,context:1,implicit:!0,optional:!0})],ln.prototype,"objectDigestInfo",void 0);let wr=class{constructor(t={}){Object.assign(this,t)}};u([f({type:Q,repeated:"sequence"})],wr.prototype,"v1Form",void 0),u([f({type:ln,context:0,implicit:!0})],wr.prototype,"v2Form",void 0),wr=u([O({type:N.Choice})],wr);class un{constructor(t={}){this.notBeforeTime=new Date,this.notAfterTime=new Date,Object.assign(this,t)}}u([f({type:k.GeneralizedTime})],un.prototype,"notBeforeTime",void 0),u([f({type:k.GeneralizedTime})],un.prototype,"notAfterTime",void 0);class Xr{constructor(t={}){Object.assign(this,t)}}u([f({type:Qt,implicit:!0,context:0,optional:!0})],Xr.prototype,"baseCertificateID",void 0),u([f({type:$e,implicit:!0,context:1,optional:!0})],Xr.prototype,"entityName",void 0),u([f({type:Xt,implicit:!0,context:2,optional:!0})],Xr.prototype,"objectDigestInfo",void 0);var ls;(function(e){e[e.v2=1]="v2"})(ls||(ls={}));class ot{constructor(t={}){this.version=ls.v2,this.holder=new Xr,this.issuer=new wr,this.signature=new L,this.serialNumber=new ArrayBuffer(0),this.attrCertValidityPeriod=new un,this.attributes=[],Object.assign(this,t)}}u([f({type:k.Integer})],ot.prototype,"version",void 0),u([f({type:Xr})],ot.prototype,"holder",void 0),u([f({type:wr})],ot.prototype,"issuer",void 0),u([f({type:L})],ot.prototype,"signature",void 0),u([f({type:k.Integer,converter:ge})],ot.prototype,"serialNumber",void 0),u([f({type:un})],ot.prototype,"attrCertValidityPeriod",void 0),u([f({type:Ct,repeated:"sequence"})],ot.prototype,"attributes",void 0),u([f({type:k.BitString,optional:!0})],ot.prototype,"issuerUniqueID",void 0),u([f({type:Zt,optional:!0})],ot.prototype,"extensions",void 0);class dn{constructor(t={}){this.acinfo=new ot,this.signatureAlgorithm=new L,this.signatureValue=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:ot})],dn.prototype,"acinfo",void 0),u([f({type:L})],dn.prototype,"signatureAlgorithm",void 0),u([f({type:k.BitString})],dn.prototype,"signatureValue",void 0);var fn;(function(e){e[e.unmarked=1]="unmarked",e[e.unclassified=2]="unclassified",e[e.restricted=4]="restricted",e[e.confidential=8]="confidential",e[e.secret=16]="secret",e[e.topSecret=32]="topSecret"})(fn||(fn={}));class us extends Gi{}class ds{constructor(t={}){this.type="",this.value=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier,implicit:!0,context:0})],ds.prototype,"type",void 0),u([f({type:k.Any,implicit:!0,context:1})],ds.prototype,"value",void 0);class fs{constructor(t={}){this.policyId="",this.classList=new us(fn.unclassified),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],fs.prototype,"policyId",void 0),u([f({type:us,defaultValue:new us(fn.unclassified)})],fs.prototype,"classList",void 0),u([f({type:ds,repeated:"set"})],fs.prototype,"securityCategories",void 0);class pn{constructor(t={}){Object.assign(this,t)}}u([f({type:ie})],pn.prototype,"cotets",void 0),u([f({type:k.ObjectIdentifier})],pn.prototype,"oid",void 0),u([f({type:k.Utf8String})],pn.prototype,"string",void 0);class vl{constructor(t={}){this.values=[],Object.assign(this,t)}}u([f({type:$e,implicit:!0,context:0,optional:!0})],vl.prototype,"policyAuthority",void 0),u([f({type:pn,repeated:"sequence"})],vl.prototype,"values",void 0);var ps;class hn{constructor(t={}){this.targetCertificate=new Qt,Object.assign(this,t)}}u([f({type:Qt})],hn.prototype,"targetCertificate",void 0),u([f({type:Q,optional:!0})],hn.prototype,"targetName",void 0),u([f({type:Xt,optional:!0})],hn.prototype,"certDigestInfo",void 0);let vr=class{constructor(t={}){Object.assign(this,t)}};u([f({type:Q,context:0,implicit:!0})],vr.prototype,"targetName",void 0),u([f({type:Q,context:1,implicit:!0})],vr.prototype,"targetGroup",void 0),u([f({type:hn,context:2,implicit:!0})],vr.prototype,"targetCert",void 0),vr=u([O({type:N.Choice})],vr);let hs=ps=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,ps.prototype)}};hs=ps=u([O({type:N.Sequence,itemType:vr})],hs);var ys;let kl=ys=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,ys.prototype)}};kl=ys=u([O({type:N.Sequence,itemType:hs})],kl);class Cl{constructor(t={}){Object.assign(this,t)}}u([f({type:$e,implicit:!0,context:0,optional:!0})],Cl.prototype,"roleAuthority",void 0),u([f({type:Q,implicit:!0,context:1})],Cl.prototype,"roleName",void 0);class gs{constructor(t={}){this.service=new Q,this.ident=new Q,Object.assign(this,t)}}u([f({type:Q})],gs.prototype,"service",void 0),u([f({type:Q})],gs.prototype,"ident",void 0),u([f({type:ie,optional:!0})],gs.prototype,"authInfo",void 0);var ms;class bs{constructor(t={}){this.otherCertFormat="",this.otherCert=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],bs.prototype,"otherCertFormat",void 0),u([f({type:k.Any})],bs.prototype,"otherCert",void 0);let kr=class{constructor(t={}){Object.assign(this,t)}};u([f({type:mr})],kr.prototype,"certificate",void 0),u([f({type:dn,context:2,implicit:!0})],kr.prototype,"v2AttrCert",void 0),u([f({type:bs,context:3,implicit:!0})],kr.prototype,"other",void 0),kr=u([O({type:N.Choice})],kr);let yn=ms=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,ms.prototype)}};yn=ms=u([O({type:N.Set,itemType:kr})],yn);class Cr{constructor(t={}){this.contentType="",this.content=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Cr.prototype,"contentType",void 0),u([f({type:k.Any,context:0})],Cr.prototype,"content",void 0);let ei=class{constructor(t={}){Object.assign(this,t)}};u([f({type:ie})],ei.prototype,"single",void 0),u([f({type:k.Any})],ei.prototype,"any",void 0),ei=u([O({type:N.Choice})],ei);class gn{constructor(t={}){this.eContentType="",Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],gn.prototype,"eContentType",void 0),u([f({type:ei,context:0,optional:!0})],gn.prototype,"eContent",void 0);var At;(function(e){e[e.v0=0]="v0",e[e.v1=1]="v1",e[e.v2=2]="v2",e[e.v3=3]="v3",e[e.v4=4]="v4",e[e.v5=5]="v5"})(At||(At={}));let ti=class extends L{};ti=u([O({type:N.Sequence})],ti);let mn=class extends L{};mn=u([O({type:N.Sequence})],mn);let ut=class extends L{};ut=u([O({type:N.Sequence})],ut);let bn=class extends L{};bn=u([O({type:N.Sequence})],bn);let Sl=class extends L{};Sl=u([O({type:N.Sequence})],Sl);let ws=class extends L{};ws=u([O({type:N.Sequence})],ws);let ri=class{constructor(t={}){Object.assign(this,t)}};u([f({type:ie,context:0,implicit:!0,optional:!0})],ri.prototype,"value",void 0),u([f({type:ie,converter:wp,context:0,implicit:!0,optional:!0,repeated:"sequence"})],ri.prototype,"constructedValue",void 0),ri=u([O({type:N.Choice})],ri);class ii{constructor(t={}){this.contentType="",this.contentEncryptionAlgorithm=new bn,Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],ii.prototype,"contentType",void 0),u([f({type:bn})],ii.prototype,"contentEncryptionAlgorithm",void 0),u([f({type:ri,optional:!0})],ii.prototype,"encryptedContent",void 0);class Sr{constructor(t={}){this.issuer=new Ce,this.serialNumber=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:Ce})],Sr.prototype,"issuer",void 0),u([f({type:k.Integer,converter:ge})],Sr.prototype,"serialNumber",void 0);class wn{constructor(t={}){this.keyAttrId="",Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],wn.prototype,"keyAttrId",void 0),u([f({type:k.Any,optional:!0})],wn.prototype,"keyAttr",void 0);var vs;class vn{constructor(t={}){this.subjectKeyIdentifier=new Tt,Object.assign(this,t)}}u([f({type:Tt})],vn.prototype,"subjectKeyIdentifier",void 0),u([f({type:k.GeneralizedTime,optional:!0})],vn.prototype,"date",void 0),u([f({type:wn,optional:!0})],vn.prototype,"other",void 0);let xr=class{constructor(t={}){Object.assign(this,t)}};u([f({type:vn,context:0,implicit:!0,optional:!0})],xr.prototype,"rKeyId",void 0),u([f({type:Sr,optional:!0})],xr.prototype,"issuerAndSerialNumber",void 0),xr=u([O({type:N.Choice})],xr);class ks{constructor(t={}){this.rid=new xr,this.encryptedKey=new ie,Object.assign(this,t)}}u([f({type:xr})],ks.prototype,"rid",void 0),u([f({type:ie})],ks.prototype,"encryptedKey",void 0);let kn=vs=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,vs.prototype)}};kn=vs=u([O({type:N.Sequence,itemType:ks})],kn);class Cs{constructor(t={}){this.algorithm=new L,this.publicKey=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:L})],Cs.prototype,"algorithm",void 0),u([f({type:k.BitString})],Cs.prototype,"publicKey",void 0);let er=class{constructor(t={}){Object.assign(this,t)}};u([f({type:Tt,context:0,implicit:!0,optional:!0})],er.prototype,"subjectKeyIdentifier",void 0),u([f({type:Cs,context:1,implicit:!0,optional:!0})],er.prototype,"originatorKey",void 0),u([f({type:Sr,optional:!0})],er.prototype,"issuerAndSerialNumber",void 0),er=u([O({type:N.Choice})],er);class Ar{constructor(t={}){this.version=At.v3,this.originator=new er,this.keyEncryptionAlgorithm=new ut,this.recipientEncryptedKeys=new kn,Object.assign(this,t)}}u([f({type:k.Integer})],Ar.prototype,"version",void 0),u([f({type:er,context:0})],Ar.prototype,"originator",void 0),u([f({type:ie,context:1,optional:!0})],Ar.prototype,"ukm",void 0),u([f({type:ut})],Ar.prototype,"keyEncryptionAlgorithm",void 0),u([f({type:kn})],Ar.prototype,"recipientEncryptedKeys",void 0);let Br=class{constructor(t={}){Object.assign(this,t)}};u([f({type:Tt,context:0,implicit:!0})],Br.prototype,"subjectKeyIdentifier",void 0),u([f({type:Sr})],Br.prototype,"issuerAndSerialNumber",void 0),Br=u([O({type:N.Choice})],Br);class ni{constructor(t={}){this.version=At.v0,this.rid=new Br,this.keyEncryptionAlgorithm=new ut,this.encryptedKey=new ie,Object.assign(this,t)}}u([f({type:k.Integer})],ni.prototype,"version",void 0),u([f({type:Br})],ni.prototype,"rid",void 0),u([f({type:ut})],ni.prototype,"keyEncryptionAlgorithm",void 0),u([f({type:ie})],ni.prototype,"encryptedKey",void 0);class oi{constructor(t={}){this.keyIdentifier=new ie,Object.assign(this,t)}}u([f({type:ie})],oi.prototype,"keyIdentifier",void 0),u([f({type:k.GeneralizedTime,optional:!0})],oi.prototype,"date",void 0),u([f({type:wn,optional:!0})],oi.prototype,"other",void 0);class si{constructor(t={}){this.version=At.v4,this.kekid=new oi,this.keyEncryptionAlgorithm=new ut,this.encryptedKey=new ie,Object.assign(this,t)}}u([f({type:k.Integer})],si.prototype,"version",void 0),u([f({type:oi})],si.prototype,"kekid",void 0),u([f({type:ut})],si.prototype,"keyEncryptionAlgorithm",void 0),u([f({type:ie})],si.prototype,"encryptedKey",void 0);class ai{constructor(t={}){this.version=At.v0,this.keyEncryptionAlgorithm=new ut,this.encryptedKey=new ie,Object.assign(this,t)}}u([f({type:k.Integer})],ai.prototype,"version",void 0),u([f({type:ws,context:0,optional:!0})],ai.prototype,"keyDerivationAlgorithm",void 0),u([f({type:ut})],ai.prototype,"keyEncryptionAlgorithm",void 0),u([f({type:ie})],ai.prototype,"encryptedKey",void 0);class Ss{constructor(t={}){this.oriType="",this.oriValue=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Ss.prototype,"oriType",void 0),u([f({type:k.Any})],Ss.prototype,"oriValue",void 0);let Vt=class{constructor(t={}){Object.assign(this,t)}};u([f({type:ni,optional:!0})],Vt.prototype,"ktri",void 0),u([f({type:Ar,context:1,implicit:!0,optional:!0})],Vt.prototype,"kari",void 0),u([f({type:si,context:2,implicit:!0,optional:!0})],Vt.prototype,"kekri",void 0),u([f({type:ai,context:3,implicit:!0,optional:!0})],Vt.prototype,"pwri",void 0),u([f({type:Ss,context:4,implicit:!0,optional:!0})],Vt.prototype,"ori",void 0),Vt=u([O({type:N.Choice})],Vt);var xs;let Cn=xs=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,xs.prototype)}};Cn=xs=u([O({type:N.Set,itemType:Vt})],Cn);var As;class Sn{constructor(t={}){this.otherRevInfoFormat="",this.otherRevInfo=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Sn.prototype,"otherRevInfoFormat",void 0),u([f({type:k.Any})],Sn.prototype,"otherRevInfo",void 0);let ci=class{constructor(t={}){this.other=new Sn,Object.assign(this,t)}};u([f({type:Sn,context:1,implicit:!0})],ci.prototype,"other",void 0),ci=u([O({type:N.Choice})],ci);let Bs=As=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,As.prototype)}};Bs=As=u([O({type:N.Set,itemType:ci})],Bs);class Is{constructor(t={}){Object.assign(this,t)}}u([f({type:yn,context:0,implicit:!0,optional:!0})],Is.prototype,"certs",void 0),u([f({type:Bs,context:1,implicit:!0,optional:!0})],Is.prototype,"crls",void 0);var Es;let Ns=Es=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Es.prototype)}};Ns=Es=u([O({type:N.Set,itemType:br})],Ns);class li{constructor(t={}){this.version=At.v0,this.recipientInfos=new Cn,this.encryptedContentInfo=new ii,Object.assign(this,t)}}u([f({type:k.Integer})],li.prototype,"version",void 0),u([f({type:Is,context:0,implicit:!0,optional:!0})],li.prototype,"originatorInfo",void 0),u([f({type:Cn})],li.prototype,"recipientInfos",void 0),u([f({type:ii})],li.prototype,"encryptedContentInfo",void 0),u([f({type:Ns,context:1,implicit:!0,optional:!0})],li.prototype,"unprotectedAttrs",void 0);const qp="1.2.840.113549.1.7.2";let Ir=class{constructor(t={}){Object.assign(this,t)}};u([f({type:Tt,context:0,implicit:!0})],Ir.prototype,"subjectKeyIdentifier",void 0),u([f({type:Sr})],Ir.prototype,"issuerAndSerialNumber",void 0),Ir=u([O({type:N.Choice})],Ir);var _s;class Bt{constructor(t={}){this.version=At.v0,this.sid=new Ir,this.digestAlgorithm=new ti,this.signatureAlgorithm=new mn,this.signature=new ie,Object.assign(this,t)}}u([f({type:k.Integer})],Bt.prototype,"version",void 0),u([f({type:Ir})],Bt.prototype,"sid",void 0),u([f({type:ti})],Bt.prototype,"digestAlgorithm",void 0),u([f({type:br,repeated:"set",context:0,implicit:!0,optional:!0})],Bt.prototype,"signedAttrs",void 0),u([f({type:mn})],Bt.prototype,"signatureAlgorithm",void 0),u([f({type:ie})],Bt.prototype,"signature",void 0),u([f({type:br,repeated:"set",context:1,implicit:!0,optional:!0})],Bt.prototype,"unsignedAttrs",void 0);let xn=_s=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,_s.prototype)}};xn=_s=u([O({type:N.Set,itemType:Bt})],xn);var Os;let An=Os=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Os.prototype)}};An=Os=u([O({type:N.Set,itemType:ti})],An);class Er{constructor(t={}){this.version=At.v0,this.digestAlgorithms=new An,this.encapContentInfo=new gn,this.signerInfos=new xn,Object.assign(this,t)}}u([f({type:k.Integer})],Er.prototype,"version",void 0),u([f({type:An})],Er.prototype,"digestAlgorithms",void 0),u([f({type:gn})],Er.prototype,"encapContentInfo",void 0),u([f({type:yn,context:0,implicit:!0,optional:!0})],Er.prototype,"certificates",void 0),u([f({type:ci,context:1,implicit:!0,optional:!0})],Er.prototype,"crls",void 0),u([f({type:xn})],Er.prototype,"signerInfos",void 0);const ui="1.2.840.10045.2.1",Ts="1.2.840.10045.4.1",xl="1.2.840.10045.4.3.1",Vs="1.2.840.10045.4.3.2",js="1.2.840.10045.4.3.3",Ds="1.2.840.10045.4.3.4",Al="1.2.840.10045.3.1.7",Bl="1.3.132.0.34",Il="1.3.132.0.35";function di(e){return new L({algorithm:e})}const Kp=di(Ts);di(xl);const zp=di(Vs),Gp=di(js),Wp=di(Ds);let Nr=class{constructor(t={}){Object.assign(this,t)}};u([f({type:k.ObjectIdentifier})],Nr.prototype,"namedCurve",void 0),Nr=u([O({type:N.Choice})],Nr);class Bn{constructor(t={}){this.version=1,this.privateKey=new ie,Object.assign(this,t)}}u([f({type:k.Integer})],Bn.prototype,"version",void 0),u([f({type:ie})],Bn.prototype,"privateKey",void 0),u([f({type:Nr,context:0,optional:!0})],Bn.prototype,"parameters",void 0),u([f({type:k.BitString,context:1,optional:!0})],Bn.prototype,"publicKey",void 0);class In{constructor(t={}){this.r=new ArrayBuffer(0),this.s=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.Integer,converter:ge})],In.prototype,"r",void 0),u([f({type:k.Integer,converter:ge})],In.prototype,"s",void 0);const Le="1.2.840.113549.1.1",_r=`${Le}.1`,Jp=`${Le}.7`,Yp=`${Le}.9`,Zp=`${Le}.10`,Qp=`${Le}.2`,Xp=`${Le}.4`,En=`${Le}.5`,eh=`${Le}.14`,Ps=`${Le}.11`,Nn=`${Le}.12`,_n=`${Le}.13`,El=`${Le}.15`,Nl=`${Le}.16`,_l="1.3.14.3.2.26",Ol="2.16.840.1.101.3.4.2.4",Tl="2.16.840.1.101.3.4.2.1",Vl="2.16.840.1.101.3.4.2.2",jl="2.16.840.1.101.3.4.2.3",th="2.16.840.1.101.3.4.2.5",rh="2.16.840.1.101.3.4.2.6",ih="1.2.840.113549.2.2",nh="1.2.840.113549.2.5",$s=`${Le}.8`;function Se(e){return new L({algorithm:e,parameters:null})}Se(ih),Se(nh);const tr=Se(_l);Se(Ol),Se(Tl),Se(Vl),Se(jl),Se(th),Se(rh);const Dl=new L({algorithm:$s,parameters:H.serialize(tr)}),Pl=new L({algorithm:Yp,parameters:H.serialize(Wi.toASN(new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]).buffer))});Se(_r),Se(Qp),Se(Xp),Se(En),Se(El),Se(Nl),Se(Nn),Se(_n),Se(El),Se(Nl);class On{constructor(t={}){this.hashAlgorithm=new L(tr),this.maskGenAlgorithm=new L({algorithm:$s,parameters:H.serialize(tr)}),this.pSourceAlgorithm=new L(Pl),Object.assign(this,t)}}u([f({type:L,context:0,defaultValue:tr})],On.prototype,"hashAlgorithm",void 0),u([f({type:L,context:1,defaultValue:Dl})],On.prototype,"maskGenAlgorithm",void 0),u([f({type:L,context:2,defaultValue:Pl})],On.prototype,"pSourceAlgorithm",void 0),new L({algorithm:Jp,parameters:H.serialize(new On)});class fi{constructor(t={}){this.hashAlgorithm=new L(tr),this.maskGenAlgorithm=new L({algorithm:$s,parameters:H.serialize(tr)}),this.saltLength=20,this.trailerField=1,Object.assign(this,t)}}u([f({type:L,context:0,defaultValue:tr})],fi.prototype,"hashAlgorithm",void 0),u([f({type:L,context:1,defaultValue:Dl})],fi.prototype,"maskGenAlgorithm",void 0),u([f({type:k.Integer,context:2,defaultValue:20})],fi.prototype,"saltLength",void 0),u([f({type:k.Integer,context:3,defaultValue:1})],fi.prototype,"trailerField",void 0),new L({algorithm:Zp,parameters:H.serialize(new fi)});class Tn{constructor(t={}){this.digestAlgorithm=new L,this.digest=new ie,Object.assign(this,t)}}u([f({type:L})],Tn.prototype,"digestAlgorithm",void 0),u([f({type:ie})],Tn.prototype,"digest",void 0);var Ms;class Vn{constructor(t={}){this.prime=new ArrayBuffer(0),this.exponent=new ArrayBuffer(0),this.coefficient=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.Integer,converter:ge})],Vn.prototype,"prime",void 0),u([f({type:k.Integer,converter:ge})],Vn.prototype,"exponent",void 0),u([f({type:k.Integer,converter:ge})],Vn.prototype,"coefficient",void 0);let Rs=Ms=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Ms.prototype)}};Rs=Ms=u([O({type:N.Sequence,itemType:Vn})],Rs);class dt{constructor(t={}){this.version=0,this.modulus=new ArrayBuffer(0),this.publicExponent=new ArrayBuffer(0),this.privateExponent=new ArrayBuffer(0),this.prime1=new ArrayBuffer(0),this.prime2=new ArrayBuffer(0),this.exponent1=new ArrayBuffer(0),this.exponent2=new ArrayBuffer(0),this.coefficient=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.Integer})],dt.prototype,"version",void 0),u([f({type:k.Integer,converter:ge})],dt.prototype,"modulus",void 0),u([f({type:k.Integer,converter:ge})],dt.prototype,"publicExponent",void 0),u([f({type:k.Integer,converter:ge})],dt.prototype,"privateExponent",void 0),u([f({type:k.Integer,converter:ge})],dt.prototype,"prime1",void 0),u([f({type:k.Integer,converter:ge})],dt.prototype,"prime2",void 0),u([f({type:k.Integer,converter:ge})],dt.prototype,"exponent1",void 0),u([f({type:k.Integer,converter:ge})],dt.prototype,"exponent2",void 0),u([f({type:k.Integer,converter:ge})],dt.prototype,"coefficient",void 0),u([f({type:Rs,optional:!0})],dt.prototype,"otherPrimeInfos",void 0);class Us{constructor(t={}){this.modulus=new ArrayBuffer(0),this.publicExponent=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.Integer,converter:ge})],Us.prototype,"modulus",void 0),u([f({type:k.Integer,converter:ge})],Us.prototype,"publicExponent",void 0);var Ls;(function(e){e[e.Transient=0]="Transient",e[e.Singleton=1]="Singleton",e[e.ResolutionScoped=2]="ResolutionScoped",e[e.ContainerScoped=3]="ContainerScoped"})(Ls||(Ls={}));const He=Ls;/*! *****************************************************************************
75
+ `)}`:`${r} :`}}ic=Ue,$.Constructed=ic,Ue.NAME="CONSTRUCTED";class nc extends Pe{fromBER(t,r,i){return r}toBER(t){return tt}}nc.override="EndOfContentValueBlock";var oc;class yo extends Ie{constructor(t={}){super(t,nc),this.idBlock.tagClass=1,this.idBlock.tagNumber=0}}oc=yo,$.EndOfContent=oc,yo.NAME=qr;var sc;class qt extends Ie{constructor(t={}){super(t,Pe),this.idBlock.tagClass=1,this.idBlock.tagNumber=5}fromBER(t,r,i){return this.lenBlock.length>0&&this.warnings.push("Non-zero length of value block for Null type"),this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.blockLength+=i,r+i>t.byteLength?(this.error="End of input reached before message was fully decoded (inconsistent offset and length values)",-1):r+i}toBER(t,r){const i=new ArrayBuffer(2);if(!t){const o=new Uint8Array(i);o[0]=5,o[1]=0}return r&&r.write(i),i}onAsciiEncoding(){return`${this.constructor.NAME}`}}sc=qt,$.Null=sc,qt.NAME="NULL";class ac extends ct(Pe){constructor({value:t,...r}={}){super(r),r.valueHex?this.valueHexView=D.toUint8Array(r.valueHex):this.valueHexView=new Uint8Array(1),t&&(this.value=t)}get value(){for(const t of this.valueHexView)if(t>0)return!0;return!1}set value(t){this.valueHexView[0]=t?255:0}fromBER(t,r,i){const o=D.toUint8Array(t);return gt(this,o,r,i)?(this.valueHexView=o.subarray(r,r+i),i>1&&this.warnings.push("Boolean value encoded in more then 1 octet"),this.isHexOnly=!0,Ga.call(this),this.blockLength=i,r+i):-1}toBER(){return this.valueHexView.slice()}toJSON(){return{...super.toJSON(),value:this.value}}}ac.NAME="BooleanValueBlock";var cc;let Ti=class extends Ie{constructor(t={}){super(t,ac),this.idBlock.tagClass=1,this.idBlock.tagNumber=1}getValue(){return this.valueBlock.value}setValue(t){this.valueBlock.value=t}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.getValue}`}};cc=Ti,$.Boolean=cc,Ti.NAME="BOOLEAN";class lc extends ct(Ot){constructor({isConstructed:t=!1,...r}={}){super(r),this.isConstructed=t}fromBER(t,r,i){let o=0;if(this.isConstructed){if(this.isHexOnly=!1,o=Ot.prototype.fromBER.call(this,t,r,i),o===-1)return o;for(let s=0;s<this.value.length;s++){const a=this.value[s].constructor.NAME;if(a===qr){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, OCTET STRING may consists of OCTET STRINGs only",-1}if(a!==Ya)return this.error="OCTET STRING may consists of OCTET STRINGs only",-1}}else this.isHexOnly=!0,o=super.fromBER(t,r,i),this.blockLength=i;return o}toBER(t,r){return this.isConstructed?Ot.prototype.toBER.call(this,t,r):t?new ArrayBuffer(this.valueHexView.byteLength):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),isConstructed:this.isConstructed}}}lc.NAME="OctetStringValueBlock";var uc;let Kt=class Hf extends Ie{constructor({idBlock:t={},lenBlock:r={},...i}={}){var o,s;(o=i.isConstructed)!==null&&o!==void 0||(i.isConstructed=!!(!((s=i.value)===null||s===void 0)&&s.length)),super({idBlock:{isConstructed:i.isConstructed,...t},lenBlock:{...r,isIndefiniteForm:!!i.isIndefiniteForm},...i},lc),this.idBlock.tagClass=1,this.idBlock.tagNumber=4}fromBER(t,r,i){if(this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,i===0)return this.idBlock.error.length===0&&(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length===0&&(this.blockLength+=this.lenBlock.blockLength),r;if(!this.valueBlock.isConstructed){const s=(t instanceof ArrayBuffer?new Uint8Array(t):t).subarray(r,r+i);try{if(s.byteLength){const a=ur(s,0,s.byteLength);a.offset!==-1&&a.offset===i&&(this.valueBlock.value=[a.result])}}catch{}}return super.fromBER(t,r,i)}onAsciiEncoding(){return this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length?Ue.prototype.onAsciiEncoding.call(this):`${this.constructor.NAME} : ${R.ToHex(this.valueBlock.valueHexView)}`}getValue(){if(!this.idBlock.isConstructed)return this.valueBlock.valueHexView.slice().buffer;const t=[];for(const r of this.valueBlock.value)r instanceof Hf&&t.push(r.valueBlock.valueHexView);return D.concat(t)}};uc=Kt,$.OctetString=uc,Kt.NAME=Ya;class dc extends ct(Ot){constructor({unusedBits:t=0,isConstructed:r=!1,...i}={}){super(i),this.unusedBits=t,this.isConstructed=r,this.blockLength=this.valueHexView.byteLength}fromBER(t,r,i){if(!i)return r;let o=-1;if(this.isConstructed){if(o=Ot.prototype.fromBER.call(this,t,r,i),o===-1)return o;for(const c of this.value){const l=c.constructor.NAME;if(l===qr){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, BIT STRING may consists of BIT STRINGs only",-1}if(l!==Za)return this.error="BIT STRING may consists of BIT STRINGs only",-1;const d=c.valueBlock;if(this.unusedBits>0&&d.unusedBits>0)return this.error='Using of "unused bits" inside constructive BIT STRING allowed for least one only',-1;this.unusedBits=d.unusedBits}return o}const s=D.toUint8Array(t);if(!gt(this,s,r,i))return-1;const a=s.subarray(r,r+i);if(this.unusedBits=a[0],this.unusedBits>7)return this.error="Unused bits for BitString must be in range 0-7",-1;if(!this.unusedBits){const c=a.subarray(1);try{if(c.byteLength){const l=ur(c,0,c.byteLength);l.offset!==-1&&l.offset===i-1&&(this.value=[l.result])}}catch{}}return this.valueHexView=a.subarray(1),this.blockLength=a.length,r+i}toBER(t,r){if(this.isConstructed)return Ot.prototype.toBER.call(this,t,r);if(t)return new ArrayBuffer(this.valueHexView.byteLength+1);if(!this.valueHexView.byteLength)return tt;const i=new Uint8Array(this.valueHexView.length+1);return i[0]=this.unusedBits,i.set(this.valueHexView,1),i.buffer}toJSON(){return{...super.toJSON(),unusedBits:this.unusedBits,isConstructed:this.isConstructed}}}dc.NAME="BitStringValueBlock";var fc;let zt=class extends Ie{constructor({idBlock:t={},lenBlock:r={},...i}={}){var o,s;(o=i.isConstructed)!==null&&o!==void 0||(i.isConstructed=!!(!((s=i.value)===null||s===void 0)&&s.length)),super({idBlock:{isConstructed:i.isConstructed,...t},lenBlock:{...r,isIndefiniteForm:!!i.isIndefiniteForm},...i},dc),this.idBlock.tagClass=1,this.idBlock.tagNumber=3}fromBER(t,r,i){return this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,super.fromBER(t,r,i)}onAsciiEncoding(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length)return Ue.prototype.onAsciiEncoding.call(this);{const t=[],r=this.valueBlock.valueHexView;for(const o of r)t.push(o.toString(2).padStart(8,"0"));const i=t.join("");return`${this.constructor.NAME} : ${i.substring(0,i.length-this.valueBlock.unusedBits)}`}}};fc=zt,$.BitString=fc,zt.NAME=Za;var pc;function lp(e,t){const r=new Uint8Array([0]),i=new Uint8Array(e),o=new Uint8Array(t);let s=i.slice(0);const a=s.length-1,c=o.slice(0),l=c.length-1;let d=0;const p=l<a?a:l;let y=0;for(let A=p;A>=0;A--,y++){switch(!0){case y<c.length:d=s[a-y]+c[l-y]+r[0];break;default:d=s[a-y]+r[0]}switch(r[0]=d/10,!0){case y>=s.length:s=uo(new Uint8Array([d%10]),s);break;default:s[a-y]=d%10}}return r[0]>0&&(s=uo(r,s)),s}function hc(e){if(e>=Fr.length)for(let t=Fr.length;t<=e;t++){const r=new Uint8Array([0]);let i=Fr[t-1].slice(0);for(let o=i.length-1;o>=0;o--){const s=new Uint8Array([(i[o]<<1)+r[0]]);r[0]=s[0]/10,i[o]=s[0]%10}r[0]>0&&(i=uo(r,i)),Fr.push(i)}return Fr[e]}function up(e,t){let r=0;const i=new Uint8Array(e),o=new Uint8Array(t),s=i.slice(0),a=s.length-1,c=o.slice(0),l=c.length-1;let d,p=0;for(let y=l;y>=0;y--,p++)switch(d=s[a-p]-c[l-p]-r,!0){case d<0:r=1,s[a-p]=d+10;break;default:r=0,s[a-p]=d}if(r>0)for(let y=a-l+1;y>=0;y--,p++)if(d=s[a-p]-r,d<0)r=1,s[a-p]=d+10;else{r=0,s[a-p]=d;break}return s.slice()}class go extends ct(Pe){constructor({value:t,...r}={}){super(r),this._valueDec=0,r.valueHex&&this.setValueHex(),t!==void 0&&(this.valueDec=t)}setValueHex(){this.valueHexView.length>=4?(this.warnings.push("Too big Integer for decoding, hex only"),this.isHexOnly=!0,this._valueDec=0):(this.isHexOnly=!1,this.valueHexView.length>0&&(this._valueDec=Ga.call(this)))}set valueDec(t){this._valueDec=t,this.isHexOnly=!1,this.valueHexView=new Uint8Array(Zf(t))}get valueDec(){return this._valueDec}fromDER(t,r,i,o=0){const s=this.fromBER(t,r,i);if(s===-1)return s;const a=this.valueHexView;return a[0]===0&&a[1]&128?this.valueHexView=a.subarray(1):o!==0&&a.length<o&&(o-a.length>1&&(o=a.length+1),this.valueHexView=a.subarray(o-a.length)),s}toDER(t=!1){const r=this.valueHexView;switch(!0){case(r[0]&128)!==0:{const i=new Uint8Array(this.valueHexView.length+1);i[0]=0,i.set(r,1),this.valueHexView=i}break;case(r[0]===0&&(r[1]&128)===0):this.valueHexView=this.valueHexView.subarray(1);break}return this.toBER(t)}fromBER(t,r,i){const o=super.fromBER(t,r,i);return o===-1||this.setValueHex(),o}toBER(t){return t?new ArrayBuffer(this.valueHexView.length):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}toString(){const t=this.valueHexView.length*8-1;let r=new Uint8Array(this.valueHexView.length*8/3),i=0,o;const s=this.valueHexView;let a="",c=!1;for(let l=s.byteLength-1;l>=0;l--){o=s[l];for(let d=0;d<8;d++){if((o&1)===1)switch(i){case t:r=up(hc(i),r),a="-";break;default:r=lp(r,hc(i))}i++,o>>=1}}for(let l=0;l<r.length;l++)r[l]&&(c=!0),c&&(a+=Wa.charAt(r[l]));return c===!1&&(a+=Wa.charAt(0)),a}}pc=go,go.NAME="IntegerValueBlock",Object.defineProperty(pc.prototype,"valueHex",{set:function(e){this.valueHexView=new Uint8Array(e),this.setValueHex()},get:function(){return this.valueHexView.slice().buffer}});var yc;class lt extends Ie{constructor(t={}){super(t,go),this.idBlock.tagClass=1,this.idBlock.tagNumber=2}toBigInt(){return Ni(),BigInt(this.valueBlock.toString())}static fromBigInt(t){Ni();const r=BigInt(t),i=new _i,o=r.toString(16).replace(/^-/,""),s=new Uint8Array(R.FromHex(o));if(r<0){const c=new Uint8Array(s.length+(s[0]&128?1:0));c[0]|=128;const d=BigInt(`0x${R.ToHex(c)}`)+r,p=D.toUint8Array(R.FromHex(d.toString(16)));p[0]|=128,i.write(p)}else s[0]&128&&i.write(new Uint8Array([0])),i.write(s);return new lt({valueHex:i.final()})}convertToDER(){const t=new lt({valueHex:this.valueBlock.valueHexView});return t.valueBlock.toDER(),t}convertFromDER(){return new lt({valueHex:this.valueBlock.valueHexView[0]===0?this.valueBlock.valueHexView.subarray(1):this.valueBlock.valueHexView})}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()}`}}yc=lt,$.Integer=yc,lt.NAME="INTEGER";var gc;class Vi extends lt{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=10}}gc=Vi,$.Enumerated=gc,Vi.NAME="ENUMERATED";class mo extends ct(Pe){constructor({valueDec:t=-1,isFirstSid:r=!1,...i}={}){super(i),this.valueDec=t,this.isFirstSid=r}fromBER(t,r,i){if(!i)return r;const o=D.toUint8Array(t);if(!gt(this,o,r,i))return-1;const s=o.subarray(r,r+i);this.valueHexView=new Uint8Array(i);for(let c=0;c<i&&(this.valueHexView[c]=s[c]&127,this.blockLength++,!!(s[c]&128));c++);const a=new Uint8Array(this.blockLength);for(let c=0;c<this.blockLength;c++)a[c]=this.valueHexView[c];return this.valueHexView=a,s[this.blockLength-1]&128?(this.error="End of input reached before message was fully decoded",-1):(this.valueHexView[0]===0&&this.warnings.push("Needlessly long format of SID encoding"),this.blockLength<=8?this.valueDec=lr(this.valueHexView,7):(this.isHexOnly=!0,this.warnings.push("Too big SID for decoding, hex only")),r+this.blockLength)}set valueBigInt(t){Ni();let r=BigInt(t).toString(2);for(;r.length%7;)r="0"+r;const i=new Uint8Array(r.length/7);for(let o=0;o<i.length;o++)i[o]=parseInt(r.slice(o*7,o*7+7),2)+(o+1<i.length?128:0);this.fromBER(i.buffer,0,i.length)}toBER(t){if(this.isHexOnly){if(t)return new ArrayBuffer(this.valueHexView.byteLength);const o=this.valueHexView,s=new Uint8Array(this.blockLength);for(let a=0;a<this.blockLength-1;a++)s[a]=o[a]|128;return s[this.blockLength-1]=o[this.blockLength-1],s.buffer}const r=Ht(this.valueDec,7);if(r.byteLength===0)return this.error="Error during encoding SID value",tt;const i=new Uint8Array(r.byteLength);if(!t){const o=new Uint8Array(r),s=r.byteLength-1;for(let a=0;a<s;a++)i[a]=o[a]|128;i[s]=o[s]}return i}toString(){let t="";if(this.isHexOnly)t=R.ToHex(this.valueHexView);else if(this.isFirstSid){let r=this.valueDec;this.valueDec<=39?t="0.":this.valueDec<=79?(t="1.",r-=40):(t="2.",r-=80),t+=r.toString()}else t=this.valueDec.toString();return t}toJSON(){return{...super.toJSON(),valueDec:this.valueDec,isFirstSid:this.isFirstSid}}}mo.NAME="sidBlock";class mc extends Pe{constructor({value:t=Re,...r}={}){super(r),this.value=[],t&&this.fromString(t)}fromBER(t,r,i){let o=r;for(;i>0;){const s=new mo;if(o=s.fromBER(t,o,i),o===-1)return this.blockLength=0,this.error=s.error,o;this.value.length===0&&(s.isFirstSid=!0),this.blockLength+=s.blockLength,i-=s.blockLength,this.value.push(s)}return o}toBER(t){const r=[];for(let i=0;i<this.value.length;i++){const o=this.value[i].toBER(t);if(o.byteLength===0)return this.error=this.value[i].error,tt;r.push(o)}return fo(r)}fromString(t){this.value=[];let r=0,i=0,o="",s=!1;do if(i=t.indexOf(".",r),i===-1?o=t.substring(r):o=t.substring(r,i),r=i+1,s){const a=this.value[0];let c=0;switch(a.valueDec){case 0:break;case 1:c=40;break;case 2:c=80;break;default:this.value=[];return}const l=parseInt(o,10);if(isNaN(l))return;a.valueDec=l+c,s=!1}else{const a=new mo;if(o>Number.MAX_SAFE_INTEGER){Ni();const c=BigInt(o);a.valueBigInt=c}else if(a.valueDec=parseInt(o,10),isNaN(a.valueDec))return;this.value.length||(a.isFirstSid=!0,s=!0),this.value.push(a)}while(i!==-1)}toString(){let t="",r=!1;for(let i=0;i<this.value.length;i++){r=this.value[i].isHexOnly;let o=this.value[i].toString();i!==0&&(t=`${t}.`),r?(o=`{${o}}`,this.value[i].isFirstSid?t=`2.{${o} - 80}`:t+=o):t+=o}return t}toJSON(){const t={...super.toJSON(),value:this.toString(),sidArray:[]};for(let r=0;r<this.value.length;r++)t.sidArray.push(this.value[r].toJSON());return t}}mc.NAME="ObjectIdentifierValueBlock";var bc;class ji extends Ie{constructor(t={}){super(t,mc),this.idBlock.tagClass=1,this.idBlock.tagNumber=6}getValue(){return this.valueBlock.toString()}setValue(t){this.valueBlock.fromString(t)}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}}bc=ji,$.ObjectIdentifier=bc,ji.NAME="OBJECT IDENTIFIER";class bo extends ct(Ft){constructor({valueDec:t=0,...r}={}){super(r),this.valueDec=t}fromBER(t,r,i){if(i===0)return r;const o=D.toUint8Array(t);if(!gt(this,o,r,i))return-1;const s=o.subarray(r,r+i);this.valueHexView=new Uint8Array(i);for(let c=0;c<i&&(this.valueHexView[c]=s[c]&127,this.blockLength++,!!(s[c]&128));c++);const a=new Uint8Array(this.blockLength);for(let c=0;c<this.blockLength;c++)a[c]=this.valueHexView[c];return this.valueHexView=a,s[this.blockLength-1]&128?(this.error="End of input reached before message was fully decoded",-1):(this.valueHexView[0]===0&&this.warnings.push("Needlessly long format of SID encoding"),this.blockLength<=8?this.valueDec=lr(this.valueHexView,7):(this.isHexOnly=!0,this.warnings.push("Too big SID for decoding, hex only")),r+this.blockLength)}toBER(t){if(this.isHexOnly){if(t)return new ArrayBuffer(this.valueHexView.byteLength);const o=this.valueHexView,s=new Uint8Array(this.blockLength);for(let a=0;a<this.blockLength-1;a++)s[a]=o[a]|128;return s[this.blockLength-1]=o[this.blockLength-1],s.buffer}const r=Ht(this.valueDec,7);if(r.byteLength===0)return this.error="Error during encoding SID value",tt;const i=new Uint8Array(r.byteLength);if(!t){const o=new Uint8Array(r),s=r.byteLength-1;for(let a=0;a<s;a++)i[a]=o[a]|128;i[s]=o[s]}return i.buffer}toString(){let t="";return this.isHexOnly?t=R.ToHex(this.valueHexView):t=this.valueDec.toString(),t}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}}bo.NAME="relativeSidBlock";class wc extends Pe{constructor({value:t=Re,...r}={}){super(r),this.value=[],t&&this.fromString(t)}fromBER(t,r,i){let o=r;for(;i>0;){const s=new bo;if(o=s.fromBER(t,o,i),o===-1)return this.blockLength=0,this.error=s.error,o;this.blockLength+=s.blockLength,i-=s.blockLength,this.value.push(s)}return o}toBER(t,r){const i=[];for(let o=0;o<this.value.length;o++){const s=this.value[o].toBER(t);if(s.byteLength===0)return this.error=this.value[o].error,tt;i.push(s)}return fo(i)}fromString(t){this.value=[];let r=0,i=0,o="";do{i=t.indexOf(".",r),i===-1?o=t.substring(r):o=t.substring(r,i),r=i+1;const s=new bo;if(s.valueDec=parseInt(o,10),isNaN(s.valueDec))return!0;this.value.push(s)}while(i!==-1);return!0}toString(){let t="",r=!1;for(let i=0;i<this.value.length;i++){r=this.value[i].isHexOnly;let o=this.value[i].toString();i!==0&&(t=`${t}.`),r&&(o=`{${o}}`),t+=o}return t}toJSON(){const t={...super.toJSON(),value:this.toString(),sidArray:[]};for(let r=0;r<this.value.length;r++)t.sidArray.push(this.value[r].toJSON());return t}}wc.NAME="RelativeObjectIdentifierValueBlock";var vc;class wo extends Ie{constructor(t={}){super(t,wc),this.idBlock.tagClass=1,this.idBlock.tagNumber=13}getValue(){return this.valueBlock.toString()}setValue(t){this.valueBlock.fromString(t)}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}}vc=wo,$.RelativeObjectIdentifier=vc,wo.NAME="RelativeObjectIdentifier";var kc;class mt extends Ue{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=16}}kc=mt,$.Sequence=kc,mt.NAME="SEQUENCE";var Cc;let bt=class extends Ue{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=17}};Cc=bt,$.Set=Cc,bt.NAME="SET";class Sc extends ct(Pe){constructor({...t}={}){super(t),this.isHexOnly=!0,this.value=Re}toJSON(){return{...super.toJSON(),value:this.value}}}Sc.NAME="StringValueBlock";class xc extends Sc{}xc.NAME="SimpleStringValueBlock";class Ge extends ho{constructor({...t}={}){super(t,xc)}fromBuffer(t){this.valueBlock.value=String.fromCharCode.apply(null,D.toUint8Array(t))}fromString(t){const r=t.length,i=this.valueBlock.valueHexView=new Uint8Array(r);for(let o=0;o<r;o++)i[o]=t.charCodeAt(o);this.valueBlock.value=t}}Ge.NAME="SIMPLE STRING";class Ac extends Ge{fromBuffer(t){this.valueBlock.valueHexView=D.toUint8Array(t);try{this.valueBlock.value=R.ToUtf8String(t)}catch(r){this.warnings.push(`Error during "decodeURIComponent": ${r}, using raw string`),this.valueBlock.value=R.ToBinary(t)}}fromString(t){this.valueBlock.valueHexView=new Uint8Array(R.FromUtf8String(t)),this.valueBlock.value=t}}Ac.NAME="Utf8StringValueBlock";var Bc;class wt extends Ac{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=12}}Bc=wt,$.Utf8String=Bc,wt.NAME="UTF8String";class Ic extends Ge{fromBuffer(t){this.valueBlock.value=R.ToUtf16String(t),this.valueBlock.valueHexView=D.toUint8Array(t)}fromString(t){this.valueBlock.value=t,this.valueBlock.valueHexView=new Uint8Array(R.FromUtf16String(t))}}Ic.NAME="BmpStringValueBlock";var Ec;class Di extends Ic{constructor({...t}={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=30}}Ec=Di,$.BmpString=Ec,Di.NAME="BMPString";class Nc extends Ge{fromBuffer(t){const r=ArrayBuffer.isView(t)?t.slice().buffer:t.slice(0),i=new Uint8Array(r);for(let o=0;o<i.length;o+=4)i[o]=i[o+3],i[o+1]=i[o+2],i[o+2]=0,i[o+3]=0;this.valueBlock.value=String.fromCharCode.apply(null,new Uint32Array(r))}fromString(t){const r=t.length,i=this.valueBlock.valueHexView=new Uint8Array(r*4);for(let o=0;o<r;o++){const s=Ht(t.charCodeAt(o),8),a=new Uint8Array(s);if(a.length>4)continue;const c=4-a.length;for(let l=a.length-1;l>=0;l--)i[o*4+l+c]=a[l]}this.valueBlock.value=t}}Nc.NAME="UniversalStringValueBlock";var _c;class Pi extends Nc{constructor({...t}={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=28}}_c=Pi,$.UniversalString=_c,Pi.NAME="UniversalString";var Oc;class $i extends Ge{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=18}}Oc=$i,$.NumericString=Oc,$i.NAME="NumericString";var Tc;class Mi extends Ge{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=19}}Tc=Mi,$.PrintableString=Tc,Mi.NAME="PrintableString";var Vc;class Ri extends Ge{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=20}}Vc=Ri,$.TeletexString=Vc,Ri.NAME="TeletexString";var jc;class Ui extends Ge{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=21}}jc=Ui,$.VideotexString=jc,Ui.NAME="VideotexString";var Dc;class Li extends Ge{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=22}}Dc=Li,$.IA5String=Dc,Li.NAME="IA5String";var Pc;class Hi extends Ge{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=25}}Pc=Hi,$.GraphicString=Pc,Hi.NAME="GraphicString";var $c;class zr extends Ge{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=26}}$c=zr,$.VisibleString=$c,zr.NAME="VisibleString";var Mc;class Fi extends Ge{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=27}}Mc=Fi,$.GeneralString=Mc,Fi.NAME="GeneralString";var Rc;class qi extends Ge{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=29}}Rc=qi,$.CharacterString=Rc,qi.NAME="CharacterString";var Uc;class Gr extends zr{constructor({value:t,valueDate:r,...i}={}){if(super(i),this.year=0,this.month=0,this.day=0,this.hour=0,this.minute=0,this.second=0,t){this.fromString(t),this.valueBlock.valueHexView=new Uint8Array(t.length);for(let o=0;o<t.length;o++)this.valueBlock.valueHexView[o]=t.charCodeAt(o)}r&&(this.fromDate(r),this.valueBlock.valueHexView=new Uint8Array(this.toBuffer())),this.idBlock.tagClass=1,this.idBlock.tagNumber=23}fromBuffer(t){this.fromString(String.fromCharCode.apply(null,D.toUint8Array(t)))}toBuffer(){const t=this.toString(),r=new ArrayBuffer(t.length),i=new Uint8Array(r);for(let o=0;o<t.length;o++)i[o]=t.charCodeAt(o);return r}fromDate(t){this.year=t.getUTCFullYear(),this.month=t.getUTCMonth()+1,this.day=t.getUTCDate(),this.hour=t.getUTCHours(),this.minute=t.getUTCMinutes(),this.second=t.getUTCSeconds()}toDate(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second))}fromString(t){const i=/(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})Z/ig.exec(t);if(i===null){this.error="Wrong input string for conversion";return}const o=parseInt(i[1],10);o>=50?this.year=1900+o:this.year=2e3+o,this.month=parseInt(i[2],10),this.day=parseInt(i[3],10),this.hour=parseInt(i[4],10),this.minute=parseInt(i[5],10),this.second=parseInt(i[6],10)}toString(t="iso"){if(t==="iso"){const r=new Array(7);return r[0]=ze(this.year<2e3?this.year-1900:this.year-2e3,2),r[1]=ze(this.month,2),r[2]=ze(this.day,2),r[3]=ze(this.hour,2),r[4]=ze(this.minute,2),r[5]=ze(this.second,2),r[6]="Z",r.join("")}return super.toString(t)}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.toDate().toISOString()}`}toJSON(){return{...super.toJSON(),year:this.year,month:this.month,day:this.day,hour:this.hour,minute:this.minute,second:this.second}}}Uc=Gr,$.UTCTime=Uc,Gr.NAME="UTCTime";var Lc;class Ki extends Gr{constructor(t={}){var r;super(t),(r=this.millisecond)!==null&&r!==void 0||(this.millisecond=0),this.idBlock.tagClass=1,this.idBlock.tagNumber=24}fromDate(t){super.fromDate(t),this.millisecond=t.getUTCMilliseconds()}toDate(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond))}fromString(t){let r=!1,i="",o="",s=0,a,c=0,l=0;if(t[t.length-1]==="Z")i=t.substring(0,t.length-1),r=!0;else{const y=new Number(t[t.length-1]);if(isNaN(y.valueOf()))throw new Error("Wrong input string for conversion");i=t}if(r){if(i.indexOf("+")!==-1)throw new Error("Wrong input string for conversion");if(i.indexOf("-")!==-1)throw new Error("Wrong input string for conversion")}else{let y=1,A=i.indexOf("+"),C="";if(A===-1&&(A=i.indexOf("-"),y=-1),A!==-1){if(C=i.substring(A+1),i=i.substring(0,A),C.length!==2&&C.length!==4)throw new Error("Wrong input string for conversion");let h=parseInt(C.substring(0,2),10);if(isNaN(h.valueOf()))throw new Error("Wrong input string for conversion");if(c=y*h,C.length===4){if(h=parseInt(C.substring(2,4),10),isNaN(h.valueOf()))throw new Error("Wrong input string for conversion");l=y*h}}}let d=i.indexOf(".");if(d===-1&&(d=i.indexOf(",")),d!==-1){const y=new Number(`0${i.substring(d)}`);if(isNaN(y.valueOf()))throw new Error("Wrong input string for conversion");s=y.valueOf(),o=i.substring(0,d)}else o=i;switch(!0){case o.length===8:if(a=/(\d{4})(\d{2})(\d{2})/ig,d!==-1)throw new Error("Wrong input string for conversion");break;case o.length===10:if(a=/(\d{4})(\d{2})(\d{2})(\d{2})/ig,d!==-1){let y=60*s;this.minute=Math.floor(y),y=60*(y-this.minute),this.second=Math.floor(y),y=1e3*(y-this.second),this.millisecond=Math.floor(y)}break;case o.length===12:if(a=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/ig,d!==-1){let y=60*s;this.second=Math.floor(y),y=1e3*(y-this.second),this.millisecond=Math.floor(y)}break;case o.length===14:if(a=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/ig,d!==-1){const y=1e3*s;this.millisecond=Math.floor(y)}break;default:throw new Error("Wrong input string for conversion")}const p=a.exec(o);if(p===null)throw new Error("Wrong input string for conversion");for(let y=1;y<p.length;y++)switch(y){case 1:this.year=parseInt(p[y],10);break;case 2:this.month=parseInt(p[y],10);break;case 3:this.day=parseInt(p[y],10);break;case 4:this.hour=parseInt(p[y],10)+c;break;case 5:this.minute=parseInt(p[y],10)+l;break;case 6:this.second=parseInt(p[y],10);break;default:throw new Error("Wrong input string for conversion")}if(r===!1){const y=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond);this.year=y.getUTCFullYear(),this.month=y.getUTCMonth(),this.day=y.getUTCDay(),this.hour=y.getUTCHours(),this.minute=y.getUTCMinutes(),this.second=y.getUTCSeconds(),this.millisecond=y.getUTCMilliseconds()}}toString(t="iso"){if(t==="iso"){const r=[];return r.push(ze(this.year,4)),r.push(ze(this.month,2)),r.push(ze(this.day,2)),r.push(ze(this.hour,2)),r.push(ze(this.minute,2)),r.push(ze(this.second,2)),this.millisecond!==0&&(r.push("."),r.push(ze(this.millisecond,3))),r.push("Z"),r.join("")}return super.toString(t)}toJSON(){return{...super.toJSON(),millisecond:this.millisecond}}}Lc=Ki,$.GeneralizedTime=Lc,Ki.NAME="GeneralizedTime";var Hc;class vo extends wt{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=31}}Hc=vo,$.DATE=Hc,vo.NAME="DATE";var Fc;class ko extends wt{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=32}}Fc=ko,$.TimeOfDay=Fc,ko.NAME="TimeOfDay";var qc;class Co extends wt{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=33}}qc=Co,$.DateTime=qc,Co.NAME="DateTime";var Kc;class So extends wt{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=34}}Kc=So,$.Duration=Kc,So.NAME="Duration";var zc;class xo extends wt{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=14}}zc=xo,$.TIME=zc,xo.NAME="TIME";class Gt{constructor({name:t=Re,optional:r=!1}={}){this.name=t,this.optional=r}}class Ao extends Gt{constructor({value:t=[],...r}={}){super(r),this.value=t}}class zi extends Gt{constructor({value:t=new Gt,local:r=!1,...i}={}){super(i),this.value=t,this.local=r}}class dp{constructor({data:t=Oi}={}){this.dataView=D.toUint8Array(t)}get data(){return this.dataView.slice().buffer}set data(t){this.dataView=D.toUint8Array(t)}fromBER(t,r,i){const o=r+i;return this.dataView=D.toUint8Array(t).subarray(r,o),o}toBER(t){return this.dataView.slice().buffer}}function Wt(e,t,r){if(r instanceof Ao){for(let s=0;s<r.value.length;s++)if(Wt(e,t,r.value[s]).verified)return{verified:!0,result:e};{const s={verified:!1,result:{error:"Wrong values for Choice type"}};return r.hasOwnProperty(po)&&(s.name=r.name),s}}if(r instanceof Gt)return r.hasOwnProperty(po)&&(e[r.name]=t),{verified:!0,result:e};if(!(e instanceof Object))return{verified:!1,result:{error:"Wrong root object"}};if(!(t instanceof Object))return{verified:!1,result:{error:"Wrong ASN.1 data"}};if(!(r instanceof Object))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(ep in r))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(np in r.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(op in r.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};const i=r.idBlock.toBER(!1);if(i.byteLength===0)return{verified:!1,result:{error:"Error encoding idBlock for ASN.1 schema"}};if(r.idBlock.fromBER(i,0,i.byteLength)===-1)return{verified:!1,result:{error:"Error decoding idBlock for ASN.1 schema"}};if(r.idBlock.hasOwnProperty(tp)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(r.idBlock.tagClass!==t.idBlock.tagClass)return{verified:!1,result:e};if(r.idBlock.hasOwnProperty(rp)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(r.idBlock.tagNumber!==t.idBlock.tagNumber)return{verified:!1,result:e};if(r.idBlock.hasOwnProperty(ip)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(r.idBlock.isConstructed!==t.idBlock.isConstructed)return{verified:!1,result:e};if(!(Xf in r.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(r.idBlock.isHexOnly!==t.idBlock.isHexOnly)return{verified:!1,result:e};if(r.idBlock.isHexOnly){if(!(Ja in r.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};const s=r.idBlock.valueHexView,a=t.idBlock.valueHexView;if(s.length!==a.length)return{verified:!1,result:e};for(let c=0;c<s.length;c++)if(s[c]!==a[1])return{verified:!1,result:e}}if(r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,Re),r.name&&(e[r.name]=t)),r instanceof $.Constructed){let s=0,a={verified:!1,result:{error:"Unknown error"}},c=r.valueBlock.value.length;if(c>0&&r.valueBlock.value[0]instanceof zi&&(c=t.valueBlock.value.length),c===0)return{verified:!0,result:e};if(t.valueBlock.value.length===0&&r.valueBlock.value.length!==0){let l=!0;for(let d=0;d<r.valueBlock.value.length;d++)l=l&&(r.valueBlock.value[d].optional||!1);return l?{verified:!0,result:e}:(r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,Re),r.name&&delete e[r.name]),e.error="Inconsistent object length",{verified:!1,result:e})}for(let l=0;l<c;l++)if(l-s>=t.valueBlock.value.length){if(r.valueBlock.value[l].optional===!1){const d={verified:!1,result:e};return e.error="Inconsistent length between ASN.1 data and schema",r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,Re),r.name&&(delete e[r.name],d.name=r.name)),d}}else if(r.valueBlock.value[0]instanceof zi){if(a=Wt(e,t.valueBlock.value[l],r.valueBlock.value[0].value),a.verified===!1)if(r.valueBlock.value[0].optional)s++;else return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,Re),r.name&&delete e[r.name]),a;if(po in r.valueBlock.value[0]&&r.valueBlock.value[0].name.length>0){let d={};sp in r.valueBlock.value[0]&&r.valueBlock.value[0].local?d=t:d=e,typeof d[r.valueBlock.value[0].name]>"u"&&(d[r.valueBlock.value[0].name]=[]),d[r.valueBlock.value[0].name].push(t.valueBlock.value[l])}}else if(a=Wt(e,t.valueBlock.value[l-s],r.valueBlock.value[l]),a.verified===!1)if(r.valueBlock.value[l].optional)s++;else return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,Re),r.name&&delete e[r.name]),a;if(a.verified===!1){const l={verified:!1,result:e};return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,Re),r.name&&(delete e[r.name],l.name=r.name)),l}return{verified:!0,result:e}}if(r.primitiveSchema&&Ja in t.valueBlock){const s=ur(t.valueBlock.valueHexView);if(s.offset===-1){const a={verified:!1,result:s.result};return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,Re),r.name&&(delete e[r.name],a.name=r.name)),a}return Wt(e,s.result,r.primitiveSchema)}return{verified:!0,result:e}}function fp(e,t){if(!(t instanceof Object))return{verified:!1,result:{error:"Wrong ASN.1 schema type"}};const r=ur(D.toUint8Array(e));return r.offset===-1?{verified:!1,result:r.result}:Wt(r.result,r.result,t)}const Gc=Object.freeze(Object.defineProperty({__proto__:null,Any:Gt,BaseBlock:Ie,BaseStringBlock:ho,BitString:zt,BmpString:Di,Boolean:Ti,CharacterString:qi,Choice:Ao,Constructed:Ue,DATE:vo,DateTime:Co,Duration:So,EndOfContent:yo,Enumerated:Vi,GeneralString:Fi,GeneralizedTime:Ki,GraphicString:Hi,HexBlock:ct,IA5String:Li,Integer:lt,Null:qt,NumericString:$i,ObjectIdentifier:ji,OctetString:Kt,Primitive:Kr,PrintableString:Mi,RawData:dp,RelativeObjectIdentifier:wo,Repeated:zi,Sequence:mt,Set:bt,TIME:xo,TeletexString:Ri,TimeOfDay:ko,UTCTime:Gr,UniversalString:Pi,Utf8String:wt,ValueBlock:Pe,VideotexString:Ui,ViewWriter:_i,VisibleString:zr,compareSchema:Wt,fromBER:dr,verifySchema:fp},Symbol.toStringTag,{value:"Module"}));var N;(function(e){e[e.Sequence=0]="Sequence",e[e.Set=1]="Set",e[e.Choice=2]="Choice"})(N||(N={}));var k;(function(e){e[e.Any=1]="Any",e[e.Boolean=2]="Boolean",e[e.OctetString=3]="OctetString",e[e.BitString=4]="BitString",e[e.Integer=5]="Integer",e[e.Enumerated=6]="Enumerated",e[e.ObjectIdentifier=7]="ObjectIdentifier",e[e.Utf8String=8]="Utf8String",e[e.BmpString=9]="BmpString",e[e.UniversalString=10]="UniversalString",e[e.NumericString=11]="NumericString",e[e.PrintableString=12]="PrintableString",e[e.TeletexString=13]="TeletexString",e[e.VideotexString=14]="VideotexString",e[e.IA5String=15]="IA5String",e[e.GraphicString=16]="GraphicString",e[e.VisibleString=17]="VisibleString",e[e.GeneralString=18]="GeneralString",e[e.CharacterString=19]="CharacterString",e[e.UTCTime=20]="UTCTime",e[e.GeneralizedTime=21]="GeneralizedTime",e[e.DATE=22]="DATE",e[e.TimeOfDay=23]="TimeOfDay",e[e.DateTime=24]="DateTime",e[e.Duration=25]="Duration",e[e.TIME=26]="TIME",e[e.Null=27]="Null"})(k||(k={}));class Gi{constructor(t,r=0){if(this.unusedBits=0,this.value=new ArrayBuffer(0),t)if(typeof t=="number")this.fromNumber(t);else if(D.isBufferSource(t))this.unusedBits=r,this.value=D.toArrayBuffer(t);else throw TypeError("Unsupported type of 'params' argument for BitString")}fromASN(t){if(!(t instanceof zt))throw new TypeError("Argument 'asn' is not instance of ASN.1 BitString");return this.unusedBits=t.valueBlock.unusedBits,this.value=t.valueBlock.valueHex,this}toASN(){return new zt({unusedBits:this.unusedBits,valueHex:this.value})}toSchema(t){return new zt({name:t})}toNumber(){let t="";const r=new Uint8Array(this.value);for(const i of r)t+=i.toString(2).padStart(8,"0");return t=t.split("").reverse().join(""),this.unusedBits&&(t=t.slice(this.unusedBits).padStart(this.unusedBits,"0")),parseInt(t,2)}fromNumber(t){let r=t.toString(2);const i=r.length+7>>3;this.unusedBits=(i<<3)-r.length;const o=new Uint8Array(i);r=r.padStart(i<<3,"0").split("").reverse().join("");let s=0;for(;s<i;)o[s]=parseInt(r.slice(s<<3,(s<<3)+8),2),s++;this.value=o.buffer}}class ie{constructor(t){typeof t=="number"?this.buffer=new ArrayBuffer(t):D.isBufferSource(t)?this.buffer=D.toArrayBuffer(t):Array.isArray(t)?this.buffer=new Uint8Array(t):this.buffer=new ArrayBuffer(0)}get byteLength(){return this.buffer.byteLength}get byteOffset(){return 0}fromASN(t){if(!(t instanceof Kt))throw new TypeError("Argument 'asn' is not instance of ASN.1 OctetString");return this.buffer=t.valueBlock.valueHex,this}toASN(){return new Kt({valueHex:this.buffer})}toSchema(t){return new Kt({name:t})}}const pp={fromASN:e=>e instanceof qt?null:e.valueBeforeDecodeView,toASN:e=>{if(e===null)return new qt;const t=dr(e);if(t.result.error)throw new Error(t.result.error);return t.result}},hp={fromASN:e=>e.valueBlock.valueHexView.byteLength>=4?e.valueBlock.toString():e.valueBlock.valueDec,toASN:e=>new lt({value:+e})},yp={fromASN:e=>e.valueBlock.valueDec,toASN:e=>new Vi({value:e})},ge={fromASN:e=>e.valueBlock.valueHexView,toASN:e=>new lt({valueHex:e})},gp={fromASN:e=>e.valueBlock.valueHexView,toASN:e=>new zt({valueHex:e})},mp={fromASN:e=>e.valueBlock.toString(),toASN:e=>new ji({value:e})},bp={fromASN:e=>e.valueBlock.value,toASN:e=>new Ti({value:e})},Wi={fromASN:e=>e.valueBlock.valueHexView,toASN:e=>new Kt({valueHex:e})},wp={fromASN:e=>new ie(e.getValue()),toASN:e=>e.toASN()};function Ye(e){return{fromASN:t=>t.valueBlock.value,toASN:t=>new e({value:t})}}const Wc=Ye(wt),vp=Ye(Di),kp=Ye(Pi),Cp=Ye($i),Sp=Ye(Mi),xp=Ye(Ri),Ap=Ye(Ui),Bp=Ye(Li),Ip=Ye(Hi),Ep=Ye(zr),Np=Ye(Fi),_p=Ye(qi),Op={fromASN:e=>e.toDate(),toASN:e=>new Gr({valueDate:e})},Tp={fromASN:e=>e.toDate(),toASN:e=>new Ki({valueDate:e})},Vp={fromASN:()=>null,toASN:()=>new qt};function Bo(e){switch(e){case k.Any:return pp;case k.BitString:return gp;case k.BmpString:return vp;case k.Boolean:return bp;case k.CharacterString:return _p;case k.Enumerated:return yp;case k.GeneralString:return Np;case k.GeneralizedTime:return Tp;case k.GraphicString:return Ip;case k.IA5String:return Bp;case k.Integer:return hp;case k.Null:return Vp;case k.NumericString:return Cp;case k.ObjectIdentifier:return mp;case k.OctetString:return Wi;case k.PrintableString:return Sp;case k.TeletexString:return xp;case k.UTCTime:return Op;case k.UniversalString:return kp;case k.Utf8String:return Wc;case k.VideotexString:return Ap;case k.VisibleString:return Ep;default:return null}}function vt(e){return typeof e=="function"&&e.prototype?e.prototype.toASN&&e.prototype.fromASN?!0:vt(e.prototype):!!(e&&typeof e=="object"&&"toASN"in e&&"fromASN"in e)}function Jc(e){var t;if(e){const r=Object.getPrototypeOf(e);return((t=r==null?void 0:r.prototype)===null||t===void 0?void 0:t.constructor)===Array?!0:Jc(r)}return!1}function jp(e,t){if(!(e&&t)||e.byteLength!==t.byteLength)return!1;const r=new Uint8Array(e),i=new Uint8Array(t);for(let o=0;o<e.byteLength;o++)if(r[o]!==i[o])return!1;return!0}class Dp{constructor(){this.items=new WeakMap}has(t){return this.items.has(t)}get(t,r=!1){const i=this.items.get(t);if(!i)throw new Error(`Cannot get schema for '${t.prototype.constructor.name}' target`);if(r&&!i.schema)throw new Error(`Schema '${t.prototype.constructor.name}' doesn't contain ASN.1 schema. Call 'AsnSchemaStorage.cache'.`);return i}cache(t){const r=this.get(t);r.schema||(r.schema=this.create(t,!0))}createDefault(t){const r={type:N.Sequence,items:{}},i=this.findParentSchema(t);return i&&(Object.assign(r,i),r.items=Object.assign({},r.items,i.items)),r}create(t,r){const i=this.items.get(t)||this.createDefault(t),o=[];for(const s in i.items){const a=i.items[s],c=r?s:"";let l;if(typeof a.type=="number"){const p=k[a.type],y=Gc[p];if(!y)throw new Error(`Cannot get ASN1 class by name '${p}'`);l=new y({name:c})}else vt(a.type)?l=new a.type().toSchema(c):a.optional?this.get(a.type).type===N.Choice?l=new Gt({name:c}):(l=this.create(a.type,!1),l.name=c):l=new Gt({name:c});const d=!!a.optional||a.defaultValue!==void 0;if(a.repeated){l.name="";const p=a.repeated==="set"?bt:mt;l=new p({name:"",value:[new zi({name:c,value:l})]})}if(a.context!==null&&a.context!==void 0)if(a.implicit)if(typeof a.type=="number"||vt(a.type)){const p=a.repeated?Ue:Kr;o.push(new p({name:c,optional:d,idBlock:{tagClass:3,tagNumber:a.context}}))}else{this.cache(a.type);const p=!!a.repeated;let y=p?l:this.get(a.type,!0).schema;y="valueBlock"in y?y.valueBlock.value:y.value,o.push(new Ue({name:p?"":c,optional:d,idBlock:{tagClass:3,tagNumber:a.context},value:y}))}else o.push(new Ue({optional:d,idBlock:{tagClass:3,tagNumber:a.context},value:[l]}));else l.optional=d,o.push(l)}switch(i.type){case N.Sequence:return new mt({value:o,name:""});case N.Set:return new bt({value:o,name:""});case N.Choice:return new Ao({value:o,name:""});default:throw new Error("Unsupported ASN1 type in use")}}set(t,r){return this.items.set(t,r),this}findParentSchema(t){const r=Object.getPrototypeOf(t);return r?this.items.get(r)||this.findParentSchema(r):null}}const Ze=new Dp,O=e=>t=>{let r;Ze.has(t)?r=Ze.get(t):(r=Ze.createDefault(t),Ze.set(t,r)),Object.assign(r,e)},f=e=>(t,r)=>{let i;Ze.has(t.constructor)?i=Ze.get(t.constructor):(i=Ze.createDefault(t.constructor),Ze.set(t.constructor,i));const o=Object.assign({},e);if(typeof o.type=="number"&&!o.converter){const s=Bo(e.type);if(!s)throw new Error(`Cannot get default converter for property '${r}' of ${t.constructor.name}`);o.converter=s}i.items[r]=o};class Yc extends Error{constructor(){super(...arguments),this.schemas=[]}}class Pp{static parse(t,r){const i=dr(t);if(i.result.error)throw new Error(i.result.error);return this.fromASN(i.result,r)}static fromASN(t,r){var i;try{if(vt(r))return new r().fromASN(t);const o=Ze.get(r);Ze.cache(r);let s=o.schema;if(t.constructor===Ue&&o.type!==N.Choice){s=new Ue({idBlock:{tagClass:3,tagNumber:t.idBlock.tagNumber},value:o.schema.valueBlock.value});for(const l in o.items)delete t[l]}const a=Wt({},t,s);if(!a.verified)throw new Yc(`Data does not match to ${r.name} ASN1 schema. ${a.result.error}`);const c=new r;if(Jc(r)){if(!("value"in t.valueBlock&&Array.isArray(t.valueBlock.value)))throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");const l=o.itemType;if(typeof l=="number"){const d=Bo(l);if(!d)throw new Error(`Cannot get default converter for array item of ${r.name} ASN1 schema`);return r.from(t.valueBlock.value,p=>d.fromASN(p))}else return r.from(t.valueBlock.value,d=>this.fromASN(d,l))}for(const l in o.items){const d=a.result[l];if(!d)continue;const p=o.items[l],y=p.type;if(typeof y=="number"||vt(y)){const A=(i=p.converter)!==null&&i!==void 0?i:vt(y)?new y:null;if(!A)throw new Error("Converter is empty");if(p.repeated)if(p.implicit){const C=p.repeated==="sequence"?mt:bt,h=new C;h.valueBlock=d.valueBlock;const g=dr(h.toBER(!1));if(g.offset===-1)throw new Error(`Cannot parse the child item. ${g.result.error}`);if(!("value"in g.result.valueBlock&&Array.isArray(g.result.valueBlock.value)))throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");const m=g.result.valueBlock.value;c[l]=Array.from(m,v=>A.fromASN(v))}else c[l]=Array.from(d,C=>A.fromASN(C));else{let C=d;if(p.implicit){let h;if(vt(y))h=new y().toSchema("");else{const g=k[y],m=Gc[g];if(!m)throw new Error(`Cannot get '${g}' class from asn1js module`);h=new m}h.valueBlock=C.valueBlock,C=dr(h.toBER(!1)).result}c[l]=A.fromASN(C)}}else if(p.repeated){if(!Array.isArray(d))throw new Error("Cannot get list of items from the ASN.1 parsed value. ASN.1 value should be iterable.");c[l]=Array.from(d,A=>this.fromASN(A,y))}else c[l]=this.fromASN(d,y)}return c}catch(o){throw o instanceof Yc&&o.schemas.push(r.name),o}}}class Io{static serialize(t){return t instanceof Ie?t.toBER(!1):this.toASN(t).toBER(!1)}static toASN(t){if(t&&typeof t=="object"&&vt(t))return t.toASN();if(!(t&&typeof t=="object"))throw new TypeError("Parameter 1 should be type of Object.");const r=t.constructor,i=Ze.get(r);Ze.cache(r);let o=[];if(i.itemType){if(!Array.isArray(t))throw new TypeError("Parameter 1 should be type of Array.");if(typeof i.itemType=="number"){const a=Bo(i.itemType);if(!a)throw new Error(`Cannot get default converter for array item of ${r.name} ASN1 schema`);o=t.map(c=>a.toASN(c))}else o=t.map(a=>this.toAsnItem({type:i.itemType},"[]",r,a))}else for(const a in i.items){const c=i.items[a],l=t[a];if(l===void 0||c.defaultValue===l||typeof c.defaultValue=="object"&&typeof l=="object"&&jp(this.serialize(c.defaultValue),this.serialize(l)))continue;const d=Io.toAsnItem(c,a,r,l);if(typeof c.context=="number")if(c.implicit)if(!c.repeated&&(typeof c.type=="number"||vt(c.type))){const p={};p.valueHex=d instanceof qt?d.valueBeforeDecodeView:d.valueBlock.toBER(),o.push(new Kr({optional:c.optional,idBlock:{tagClass:3,tagNumber:c.context},...p}))}else o.push(new Ue({optional:c.optional,idBlock:{tagClass:3,tagNumber:c.context},value:d.valueBlock.value}));else o.push(new Ue({optional:c.optional,idBlock:{tagClass:3,tagNumber:c.context},value:[d]}));else c.repeated?o=o.concat(d):o.push(d)}let s;switch(i.type){case N.Sequence:s=new mt({value:o});break;case N.Set:s=new bt({value:o});break;case N.Choice:if(!o[0])throw new Error(`Schema '${r.name}' has wrong data. Choice cannot be empty.`);s=o[0];break}return s}static toAsnItem(t,r,i,o){let s;if(typeof t.type=="number"){const a=t.converter;if(!a)throw new Error(`Property '${r}' doesn't have converter for type ${k[t.type]} in schema '${i.name}'`);if(t.repeated){if(!Array.isArray(o))throw new TypeError("Parameter 'objProp' should be type of Array.");const c=Array.from(o,d=>a.toASN(d)),l=t.repeated==="sequence"?mt:bt;s=new l({value:c})}else s=a.toASN(o)}else if(t.repeated){if(!Array.isArray(o))throw new TypeError("Parameter 'objProp' should be type of Array.");const a=Array.from(o,l=>this.toASN(l)),c=t.repeated==="sequence"?mt:bt;s=new c({value:a})}else s=this.toASN(o);return s}}class ae extends Array{constructor(t=[]){if(typeof t=="number")super(t);else{super();for(const r of t)this.push(r)}}}class H{static serialize(t){return Io.serialize(t)}static parse(t,r){return Pp.parse(t,r)}static toString(t){const r=D.isBufferSource(t)?D.toArrayBuffer(t):H.serialize(t),i=dr(r);if(i.offset===-1)throw new Error(`Cannot decode ASN.1 data. ${i.result.error}`);return i.result.toString()}}function u(e,t,r,i){var o=arguments.length,s=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,i);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(s=(o<3?a(s):o>3?a(t,r,s):a(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}typeof SuppressedError=="function"&&SuppressedError;var Zc={exports:{}};(function(e){(function(t){const r="(0?\\d+|0x[a-f0-9]+)",i={fourOctet:new RegExp(`^${r}\\.${r}\\.${r}\\.${r}$`,"i"),threeOctet:new RegExp(`^${r}\\.${r}\\.${r}$`,"i"),twoOctet:new RegExp(`^${r}\\.${r}$`,"i"),longValue:new RegExp(`^${r}$`,"i")},o=new RegExp("^0[0-7]+$","i"),s=new RegExp("^0x[a-f0-9]+$","i"),a="%[0-9a-z]{1,}",c="(?:[0-9a-f]+::?)+",l={zoneIndex:new RegExp(a,"i"),native:new RegExp(`^(::)?(${c})?([0-9a-f]+)?(::)?(${a})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${r}\\.${r}\\.${r}\\.${r}(${a})?)$`,"i"),transitional:new RegExp(`^((?:${c})|(?:::)(?:${c})?)${r}\\.${r}\\.${r}\\.${r}(${a})?$`,"i")};function d(h,g){if(h.indexOf("::")!==h.lastIndexOf("::"))return null;let m=0,v=-1,b=(h.match(l.zoneIndex)||[])[0],w,x;for(b&&(b=b.substring(1),h=h.replace(/%.+$/,""));(v=h.indexOf(":",v+1))>=0;)m++;if(h.substr(0,2)==="::"&&m--,h.substr(-2,2)==="::"&&m--,m>g)return null;for(x=g-m,w=":";x--;)w+="0:";return h=h.replace("::",w),h[0]===":"&&(h=h.slice(1)),h[h.length-1]===":"&&(h=h.slice(0,-1)),g=function(){const F=h.split(":"),Z=[];for(let I=0;I<F.length;I++)Z.push(parseInt(F[I],16));return Z}(),{parts:g,zoneId:b}}function p(h,g,m,v){if(h.length!==g.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let b=0,w;for(;v>0;){if(w=m-v,w<0&&(w=0),h[b]>>w!==g[b]>>w)return!1;v-=m,b+=1}return!0}function y(h){if(s.test(h))return parseInt(h,16);if(h[0]==="0"&&!isNaN(parseInt(h[1],10))){if(o.test(h))return parseInt(h,8);throw new Error(`ipaddr: cannot parse ${h} as octal`)}return parseInt(h,10)}function A(h,g){for(;h.length<g;)h=`0${h}`;return h}const C={};C.IPv4=function(){function h(g){if(g.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let m,v;for(m=0;m<g.length;m++)if(v=g[m],!(0<=v&&v<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=g}return h.prototype.SpecialRanges={unspecified:[[new h([0,0,0,0]),8]],broadcast:[[new h([255,255,255,255]),32]],multicast:[[new h([224,0,0,0]),4]],linkLocal:[[new h([169,254,0,0]),16]],loopback:[[new h([127,0,0,0]),8]],carrierGradeNat:[[new h([100,64,0,0]),10]],private:[[new h([10,0,0,0]),8],[new h([172,16,0,0]),12],[new h([192,168,0,0]),16]],reserved:[[new h([192,0,0,0]),24],[new h([192,0,2,0]),24],[new h([192,88,99,0]),24],[new h([198,18,0,0]),15],[new h([198,51,100,0]),24],[new h([203,0,113,0]),24],[new h([240,0,0,0]),4]]},h.prototype.kind=function(){return"ipv4"},h.prototype.match=function(g,m){let v;if(m===void 0&&(v=g,g=v[0],m=v[1]),g.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return p(this.octets,g.octets,8,m)},h.prototype.prefixLengthFromSubnetMask=function(){let g=0,m=!1;const v={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0};let b,w,x;for(b=3;b>=0;b-=1)if(w=this.octets[b],w in v){if(x=v[w],m&&x!==0)return null;x!==8&&(m=!0),g+=x}else return null;return 32-g},h.prototype.range=function(){return C.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){return this.octets.slice(0)},h.prototype.toIPv4MappedAddress=function(){return C.IPv6.parse(`::ffff:${this.toString()}`)},h.prototype.toNormalizedString=function(){return this.toString()},h.prototype.toString=function(){return this.octets.join(".")},h}(),C.IPv4.broadcastAddressFromCIDR=function(h){try{const g=this.parseCIDR(h),m=g[0].toByteArray(),v=this.subnetMaskFromPrefixLength(g[1]).toByteArray(),b=[];let w=0;for(;w<4;)b.push(parseInt(m[w],10)|parseInt(v[w],10)^255),w++;return new this(b)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},C.IPv4.isIPv4=function(h){return this.parser(h)!==null},C.IPv4.isValid=function(h){try{return new this(this.parser(h)),!0}catch{return!1}},C.IPv4.isValidFourPartDecimal=function(h){return!!(C.IPv4.isValid(h)&&h.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},C.IPv4.networkAddressFromCIDR=function(h){let g,m,v,b,w;try{for(g=this.parseCIDR(h),v=g[0].toByteArray(),w=this.subnetMaskFromPrefixLength(g[1]).toByteArray(),b=[],m=0;m<4;)b.push(parseInt(v[m],10)&parseInt(w[m],10)),m++;return new this(b)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},C.IPv4.parse=function(h){const g=this.parser(h);if(g===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(g)},C.IPv4.parseCIDR=function(h){let g;if(g=h.match(/^(.+)\/(\d+)$/)){const m=parseInt(g[2]);if(m>=0&&m<=32){const v=[this.parse(g[1]),m];return Object.defineProperty(v,"toString",{value:function(){return this.join("/")}}),v}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},C.IPv4.parser=function(h){let g,m,v;if(g=h.match(i.fourOctet))return function(){const b=g.slice(1,6),w=[];for(let x=0;x<b.length;x++)m=b[x],w.push(y(m));return w}();if(g=h.match(i.longValue)){if(v=y(g[1]),v>4294967295||v<0)throw new Error("ipaddr: address outside defined range");return function(){const b=[];let w;for(w=0;w<=24;w+=8)b.push(v>>w&255);return b}().reverse()}else return(g=h.match(i.twoOctet))?function(){const b=g.slice(1,4),w=[];if(v=y(b[1]),v>16777215||v<0)throw new Error("ipaddr: address outside defined range");return w.push(y(b[0])),w.push(v>>16&255),w.push(v>>8&255),w.push(v&255),w}():(g=h.match(i.threeOctet))?function(){const b=g.slice(1,5),w=[];if(v=y(b[2]),v>65535||v<0)throw new Error("ipaddr: address outside defined range");return w.push(y(b[0])),w.push(y(b[1])),w.push(v>>8&255),w.push(v&255),w}():null},C.IPv4.subnetMaskFromPrefixLength=function(h){if(h=parseInt(h),h<0||h>32)throw new Error("ipaddr: invalid IPv4 prefix length");const g=[0,0,0,0];let m=0;const v=Math.floor(h/8);for(;m<v;)g[m]=255,m++;return v<4&&(g[v]=Math.pow(2,h%8)-1<<8-h%8),new this(g)},C.IPv6=function(){function h(g,m){let v,b;if(g.length===16)for(this.parts=[],v=0;v<=14;v+=2)this.parts.push(g[v]<<8|g[v+1]);else if(g.length===8)this.parts=g;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(v=0;v<this.parts.length;v++)if(b=this.parts[v],!(0<=b&&b<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");m&&(this.zoneId=m)}return h.prototype.SpecialRanges={unspecified:[new h([0,0,0,0,0,0,0,0]),128],linkLocal:[new h([65152,0,0,0,0,0,0,0]),10],multicast:[new h([65280,0,0,0,0,0,0,0]),8],loopback:[new h([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new h([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new h([0,0,0,0,0,65535,0,0]),96],rfc6145:[new h([0,0,0,0,65535,0,0,0]),96],rfc6052:[new h([100,65435,0,0,0,0,0,0]),96],"6to4":[new h([8194,0,0,0,0,0,0,0]),16],teredo:[new h([8193,0,0,0,0,0,0,0]),32],reserved:[[new h([8193,3512,0,0,0,0,0,0]),32]],benchmarking:[new h([8193,2,0,0,0,0,0,0]),48],amt:[new h([8193,3,0,0,0,0,0,0]),32],as112v6:[new h([8193,4,274,0,0,0,0,0]),48],deprecated:[new h([8193,16,0,0,0,0,0,0]),28],orchid2:[new h([8193,32,0,0,0,0,0,0]),28]},h.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},h.prototype.kind=function(){return"ipv6"},h.prototype.match=function(g,m){let v;if(m===void 0&&(v=g,g=v[0],m=v[1]),g.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return p(this.parts,g.parts,16,m)},h.prototype.prefixLengthFromSubnetMask=function(){let g=0,m=!1;const v={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0};let b,w;for(let x=7;x>=0;x-=1)if(b=this.parts[x],b in v){if(w=v[b],m&&w!==0)return null;w!==16&&(m=!0),g+=w}else return null;return 128-g},h.prototype.range=function(){return C.subnetMatch(this,this.SpecialRanges)},h.prototype.toByteArray=function(){let g;const m=[],v=this.parts;for(let b=0;b<v.length;b++)g=v[b],m.push(g>>8),m.push(g&255);return m},h.prototype.toFixedLengthString=function(){const g=(function(){const v=[];for(let b=0;b<this.parts.length;b++)v.push(A(this.parts[b].toString(16),4));return v}).call(this).join(":");let m="";return this.zoneId&&(m=`%${this.zoneId}`),g+m},h.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");const g=this.parts.slice(-2),m=g[0],v=g[1];return new C.IPv4([m>>8,m&255,v>>8,v&255])},h.prototype.toNormalizedString=function(){const g=(function(){const v=[];for(let b=0;b<this.parts.length;b++)v.push(this.parts[b].toString(16));return v}).call(this).join(":");let m="";return this.zoneId&&(m=`%${this.zoneId}`),g+m},h.prototype.toRFC5952String=function(){const g=/((^|:)(0(:|$)){2,})/g,m=this.toNormalizedString();let v=0,b=-1,w;for(;w=g.exec(m);)w[0].length>b&&(v=w.index,b=w[0].length);return b<0?m:`${m.substring(0,v)}::${m.substring(v+b)}`},h.prototype.toString=function(){return this.toRFC5952String()},h}(),C.IPv6.broadcastAddressFromCIDR=function(h){try{const g=this.parseCIDR(h),m=g[0].toByteArray(),v=this.subnetMaskFromPrefixLength(g[1]).toByteArray(),b=[];let w=0;for(;w<16;)b.push(parseInt(m[w],10)|parseInt(v[w],10)^255),w++;return new this(b)}catch(g){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${g})`)}},C.IPv6.isIPv6=function(h){return this.parser(h)!==null},C.IPv6.isValid=function(h){if(typeof h=="string"&&h.indexOf(":")===-1)return!1;try{const g=this.parser(h);return new this(g.parts,g.zoneId),!0}catch{return!1}},C.IPv6.networkAddressFromCIDR=function(h){let g,m,v,b,w;try{for(g=this.parseCIDR(h),v=g[0].toByteArray(),w=this.subnetMaskFromPrefixLength(g[1]).toByteArray(),b=[],m=0;m<16;)b.push(parseInt(v[m],10)&parseInt(w[m],10)),m++;return new this(b)}catch(x){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${x})`)}},C.IPv6.parse=function(h){const g=this.parser(h);if(g.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(g.parts,g.zoneId)},C.IPv6.parseCIDR=function(h){let g,m,v;if((m=h.match(/^(.+)\/(\d+)$/))&&(g=parseInt(m[2]),g>=0&&g<=128))return v=[this.parse(m[1]),g],Object.defineProperty(v,"toString",{value:function(){return this.join("/")}}),v;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},C.IPv6.parser=function(h){let g,m,v,b,w,x;if(v=h.match(l.deprecatedTransitional))return this.parser(`::ffff:${v[1]}`);if(l.native.test(h))return d(h,8);if((v=h.match(l.transitional))&&(x=v[6]||"",g=d(v[1].slice(0,-1)+x,6),g.parts)){for(w=[parseInt(v[2]),parseInt(v[3]),parseInt(v[4]),parseInt(v[5])],m=0;m<w.length;m++)if(b=w[m],!(0<=b&&b<=255))return null;return g.parts.push(w[0]<<8|w[1]),g.parts.push(w[2]<<8|w[3]),{parts:g.parts,zoneId:g.zoneId}}return null},C.IPv6.subnetMaskFromPrefixLength=function(h){if(h=parseInt(h),h<0||h>128)throw new Error("ipaddr: invalid IPv6 prefix length");const g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];let m=0;const v=Math.floor(h/8);for(;m<v;)g[m]=255,m++;return v<16&&(g[v]=Math.pow(2,h%8)-1<<8-h%8),new this(g)},C.fromByteArray=function(h){const g=h.length;if(g===4)return new C.IPv4(h);if(g===16)return new C.IPv6(h);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},C.isValid=function(h){return C.IPv6.isValid(h)||C.IPv4.isValid(h)},C.parse=function(h){if(C.IPv6.isValid(h))return C.IPv6.parse(h);if(C.IPv4.isValid(h))return C.IPv4.parse(h);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},C.parseCIDR=function(h){try{return C.IPv6.parseCIDR(h)}catch{try{return C.IPv4.parseCIDR(h)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},C.process=function(h){const g=this.parse(h);return g.kind()==="ipv6"&&g.isIPv4MappedAddress()?g.toIPv4Address():g},C.subnetMatch=function(h,g,m){let v,b,w,x;m==null&&(m="unicast");for(b in g)if(Object.prototype.hasOwnProperty.call(g,b)){for(w=g[b],w[0]&&!(w[0]instanceof Array)&&(w=[w]),v=0;v<w.length;v++)if(x=w[v],h.kind()===x[0].kind()&&h.match.apply(h,x))return b}return m},e.exports?e.exports=C:t.ipaddr=C})(co)})(Zc);var Qc=Zc.exports;class Xc{static decodeIP(t){if(t.length===64&&parseInt(t,16)===0)return"::/0";if(t.length!==16)return t;const r=parseInt(t.slice(8),16).toString(2).split("").reduce((o,s)=>o+ +s,0);let i=t.slice(0,8).replace(/(.{2})/g,o=>`${parseInt(o,16)}.`);return i=i.slice(0,-1),`${i}/${r}`}static toString(t){if(t.byteLength===4||t.byteLength===16){const r=new Uint8Array(t);return Qc.fromByteArray(Array.from(r)).toString()}return this.decodeIP(R.ToHex(t))}static fromString(t){const r=Qc.parse(t);return new Uint8Array(r.toByteArray()).buffer}}var Eo,No,_o;let Ee=class{constructor(t={}){Object.assign(this,t)}toString(){return this.bmpString||this.printableString||this.teletexString||this.universalString||this.utf8String||""}};u([f({type:k.TeletexString})],Ee.prototype,"teletexString",void 0),u([f({type:k.PrintableString})],Ee.prototype,"printableString",void 0),u([f({type:k.UniversalString})],Ee.prototype,"universalString",void 0),u([f({type:k.Utf8String})],Ee.prototype,"utf8String",void 0),u([f({type:k.BmpString})],Ee.prototype,"bmpString",void 0),Ee=u([O({type:N.Choice})],Ee);let fr=class extends Ee{constructor(t={}){super(t),Object.assign(this,t)}toString(){return this.ia5String||(this.anyValue?R.ToHex(this.anyValue):super.toString())}};u([f({type:k.IA5String})],fr.prototype,"ia5String",void 0),u([f({type:k.Any})],fr.prototype,"anyValue",void 0),fr=u([O({type:N.Choice})],fr);class Wr{constructor(t={}){this.type="",this.value=new fr,Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Wr.prototype,"type",void 0),u([f({type:fr})],Wr.prototype,"value",void 0);let pr=Eo=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Eo.prototype)}};pr=Eo=u([O({type:N.Set,itemType:Wr})],pr);let Oo=No=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,No.prototype)}};Oo=No=u([O({type:N.Sequence,itemType:pr})],Oo);let Ce=_o=class extends Oo{constructor(t){super(t),Object.setPrototypeOf(this,_o.prototype)}};Ce=_o=u([O({type:N.Sequence})],Ce);const $p={fromASN:e=>Xc.toString(Wi.fromASN(e)),toASN:e=>Wi.toASN(Xc.fromString(e))};class Jr{constructor(t={}){this.typeId="",this.value=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Jr.prototype,"typeId",void 0),u([f({type:k.Any,context:0})],Jr.prototype,"value",void 0);class To{constructor(t={}){this.partyName=new Ee,Object.assign(this,t)}}u([f({type:Ee,optional:!0,context:0,implicit:!0})],To.prototype,"nameAssigner",void 0),u([f({type:Ee,context:1,implicit:!0})],To.prototype,"partyName",void 0);let Q=class{constructor(t={}){Object.assign(this,t)}};u([f({type:Jr,context:0,implicit:!0})],Q.prototype,"otherName",void 0),u([f({type:k.IA5String,context:1,implicit:!0})],Q.prototype,"rfc822Name",void 0),u([f({type:k.IA5String,context:2,implicit:!0})],Q.prototype,"dNSName",void 0),u([f({type:k.Any,context:3,implicit:!0})],Q.prototype,"x400Address",void 0),u([f({type:Ce,context:4,implicit:!1})],Q.prototype,"directoryName",void 0),u([f({type:To,context:5})],Q.prototype,"ediPartyName",void 0),u([f({type:k.IA5String,context:6,implicit:!0})],Q.prototype,"uniformResourceIdentifier",void 0),u([f({type:k.OctetString,context:7,implicit:!0,converter:$p})],Q.prototype,"iPAddress",void 0),u([f({type:k.ObjectIdentifier,context:8,implicit:!0})],Q.prototype,"registeredID",void 0),Q=u([O({type:N.Choice})],Q);const hr="1.3.6.1.5.5.7.3",Jt="2.5.29";var Vo;class Ji{constructor(t={}){this.accessMethod="",this.accessLocation=new Q,Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Ji.prototype,"accessMethod",void 0),u([f({type:Q})],Ji.prototype,"accessLocation",void 0);let el=Vo=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Vo.prototype)}};el=Vo=u([O({type:N.Sequence,itemType:Ji})],el);const jo=`${Jt}.35`;class Do extends ie{}class Yt{constructor(t={}){t&&Object.assign(this,t)}}u([f({type:Do,context:0,optional:!0,implicit:!0})],Yt.prototype,"keyIdentifier",void 0),u([f({type:Q,context:1,optional:!0,implicit:!0,repeated:"sequence"})],Yt.prototype,"authorityCertIssuer",void 0),u([f({type:k.Integer,context:2,optional:!0,implicit:!0,converter:ge})],Yt.prototype,"authorityCertSerialNumber",void 0);const tl=`${Jt}.19`;class Yi{constructor(t={}){this.cA=!1,Object.assign(this,t)}}u([f({type:k.Boolean,defaultValue:!1})],Yi.prototype,"cA",void 0),u([f({type:k.Integer,optional:!0})],Yi.prototype,"pathLenConstraint",void 0);var Po;let $e=Po=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Po.prototype)}};$e=Po=u([O({type:N.Sequence,itemType:Q})],$e);var $o;let rl=$o=class extends $e{constructor(t){super(t),Object.setPrototypeOf(this,$o.prototype)}};rl=$o=u([O({type:N.Sequence})],rl);var Mo;const il=`${Jt}.32`;let kt=class{constructor(t={}){Object.assign(this,t)}toString(){return this.ia5String||this.visibleString||this.bmpString||this.utf8String||""}};u([f({type:k.IA5String})],kt.prototype,"ia5String",void 0),u([f({type:k.VisibleString})],kt.prototype,"visibleString",void 0),u([f({type:k.BmpString})],kt.prototype,"bmpString",void 0),u([f({type:k.Utf8String})],kt.prototype,"utf8String",void 0),kt=u([O({type:N.Choice})],kt);class Ro{constructor(t={}){this.organization=new kt,this.noticeNumbers=[],Object.assign(this,t)}}u([f({type:kt})],Ro.prototype,"organization",void 0),u([f({type:k.Integer,repeated:"sequence"})],Ro.prototype,"noticeNumbers",void 0);class Uo{constructor(t={}){Object.assign(this,t)}}u([f({type:Ro,optional:!0})],Uo.prototype,"noticeRef",void 0),u([f({type:kt,optional:!0})],Uo.prototype,"explicitText",void 0);let Zi=class{constructor(t={}){Object.assign(this,t)}};u([f({type:k.IA5String})],Zi.prototype,"cPSuri",void 0),u([f({type:Uo})],Zi.prototype,"userNotice",void 0),Zi=u([O({type:N.Choice})],Zi);class Lo{constructor(t={}){this.policyQualifierId="",this.qualifier=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Lo.prototype,"policyQualifierId",void 0),u([f({type:k.Any})],Lo.prototype,"qualifier",void 0);class Qi{constructor(t={}){this.policyIdentifier="",Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Qi.prototype,"policyIdentifier",void 0),u([f({type:Lo,repeated:"sequence",optional:!0})],Qi.prototype,"policyQualifiers",void 0);let Xi=Mo=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Mo.prototype)}};Xi=Mo=u([O({type:N.Sequence,itemType:Qi})],Xi);let en=class{constructor(t=0){this.value=t}};u([f({type:k.Integer})],en.prototype,"value",void 0),en=u([O({type:N.Choice})],en);let nl=class extends en{};nl=u([O({type:N.Choice})],nl);var Ho,rt;(function(e){e[e.unused=1]="unused",e[e.keyCompromise=2]="keyCompromise",e[e.cACompromise=4]="cACompromise",e[e.affiliationChanged=8]="affiliationChanged",e[e.superseded=16]="superseded",e[e.cessationOfOperation=32]="cessationOfOperation",e[e.certificateHold=64]="certificateHold",e[e.privilegeWithdrawn=128]="privilegeWithdrawn",e[e.aACompromise=256]="aACompromise"})(rt||(rt={}));class ol extends Gi{toJSON(){const t=[],r=this.toNumber();return r&rt.aACompromise&&t.push("aACompromise"),r&rt.affiliationChanged&&t.push("affiliationChanged"),r&rt.cACompromise&&t.push("cACompromise"),r&rt.certificateHold&&t.push("certificateHold"),r&rt.cessationOfOperation&&t.push("cessationOfOperation"),r&rt.keyCompromise&&t.push("keyCompromise"),r&rt.privilegeWithdrawn&&t.push("privilegeWithdrawn"),r&rt.superseded&&t.push("superseded"),r&rt.unused&&t.push("unused"),t}toString(){return`[${this.toJSON().join(", ")}]`}}let yr=class{constructor(t={}){Object.assign(this,t)}};u([f({type:Q,context:0,repeated:"sequence",implicit:!0})],yr.prototype,"fullName",void 0),u([f({type:pr,context:1,implicit:!0})],yr.prototype,"nameRelativeToCRLIssuer",void 0),yr=u([O({type:N.Choice})],yr);class Yr{constructor(t={}){Object.assign(this,t)}}u([f({type:yr,context:0,optional:!0})],Yr.prototype,"distributionPoint",void 0),u([f({type:ol,context:1,optional:!0,implicit:!0})],Yr.prototype,"reasons",void 0),u([f({type:Q,context:2,optional:!0,repeated:"sequence",implicit:!0})],Yr.prototype,"cRLIssuer",void 0);let Fo=Ho=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Ho.prototype)}};Fo=Ho=u([O({type:N.Sequence,itemType:Yr})],Fo);var qo;let sl=qo=class extends Fo{constructor(t){super(t),Object.setPrototypeOf(this,qo.prototype)}};sl=qo=u([O({type:N.Sequence,itemType:Yr})],sl);class Te{constructor(t={}){this.onlyContainsUserCerts=Te.ONLY,this.onlyContainsCACerts=Te.ONLY,this.indirectCRL=Te.ONLY,this.onlyContainsAttributeCerts=Te.ONLY,Object.assign(this,t)}}Te.ONLY=!1,u([f({type:yr,context:0,optional:!0})],Te.prototype,"distributionPoint",void 0),u([f({type:k.Boolean,context:1,defaultValue:Te.ONLY,implicit:!0})],Te.prototype,"onlyContainsUserCerts",void 0),u([f({type:k.Boolean,context:2,defaultValue:Te.ONLY,implicit:!0})],Te.prototype,"onlyContainsCACerts",void 0),u([f({type:ol,context:3,optional:!0,implicit:!0})],Te.prototype,"onlySomeReasons",void 0),u([f({type:k.Boolean,context:4,defaultValue:Te.ONLY,implicit:!0})],Te.prototype,"indirectCRL",void 0),u([f({type:k.Boolean,context:5,defaultValue:Te.ONLY,implicit:!0})],Te.prototype,"onlyContainsAttributeCerts",void 0);var Zr;(function(e){e[e.unspecified=0]="unspecified",e[e.keyCompromise=1]="keyCompromise",e[e.cACompromise=2]="cACompromise",e[e.affiliationChanged=3]="affiliationChanged",e[e.superseded=4]="superseded",e[e.cessationOfOperation=5]="cessationOfOperation",e[e.certificateHold=6]="certificateHold",e[e.removeFromCRL=8]="removeFromCRL",e[e.privilegeWithdrawn=9]="privilegeWithdrawn",e[e.aACompromise=10]="aACompromise"})(Zr||(Zr={}));let Ko=class{constructor(t=Zr.unspecified){this.reason=Zr.unspecified,this.reason=t}toJSON(){return Zr[this.reason]}toString(){return this.toJSON()}};u([f({type:k.Enumerated})],Ko.prototype,"reason",void 0),Ko=u([O({type:N.Choice})],Ko);var zo;const al=`${Jt}.37`;let tn=zo=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,zo.prototype)}};tn=zo=u([O({type:N.Sequence,itemType:k.ObjectIdentifier})],tn);const Mp=`${hr}.1`,Rp=`${hr}.2`,Up=`${hr}.3`,Lp=`${hr}.4`,Hp=`${hr}.8`,Fp=`${hr}.9`;let Go=class{constructor(t=new ArrayBuffer(0)){this.value=t}};u([f({type:k.Integer,converter:ge})],Go.prototype,"value",void 0),Go=u([O({type:N.Choice})],Go);let Wo=class{constructor(t){this.value=new Date,t&&(this.value=t)}};u([f({type:k.GeneralizedTime})],Wo.prototype,"value",void 0),Wo=u([O({type:N.Choice})],Wo);var Jo;let cl=Jo=class extends $e{constructor(t){super(t),Object.setPrototypeOf(this,Jo.prototype)}};cl=Jo=u([O({type:N.Sequence})],cl);const ll=`${Jt}.15`;var it;(function(e){e[e.digitalSignature=1]="digitalSignature",e[e.nonRepudiation=2]="nonRepudiation",e[e.keyEncipherment=4]="keyEncipherment",e[e.dataEncipherment=8]="dataEncipherment",e[e.keyAgreement=16]="keyAgreement",e[e.keyCertSign=32]="keyCertSign",e[e.cRLSign=64]="cRLSign",e[e.encipherOnly=128]="encipherOnly",e[e.decipherOnly=256]="decipherOnly"})(it||(it={}));class Yo extends Gi{toJSON(){const t=this.toNumber(),r=[];return t&it.cRLSign&&r.push("crlSign"),t&it.dataEncipherment&&r.push("dataEncipherment"),t&it.decipherOnly&&r.push("decipherOnly"),t&it.digitalSignature&&r.push("digitalSignature"),t&it.encipherOnly&&r.push("encipherOnly"),t&it.keyAgreement&&r.push("keyAgreement"),t&it.keyCertSign&&r.push("keyCertSign"),t&it.keyEncipherment&&r.push("keyEncipherment"),t&it.nonRepudiation&&r.push("nonRepudiation"),r}toString(){return`[${this.toJSON().join(", ")}]`}}var Zo;class rn{constructor(t={}){this.base=new Q,this.minimum=0,Object.assign(this,t)}}u([f({type:Q})],rn.prototype,"base",void 0),u([f({type:k.Integer,context:0,defaultValue:0,implicit:!0})],rn.prototype,"minimum",void 0),u([f({type:k.Integer,context:1,optional:!0,implicit:!0})],rn.prototype,"maximum",void 0);let nn=Zo=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Zo.prototype)}};nn=Zo=u([O({type:N.Sequence,itemType:rn})],nn);class ul{constructor(t={}){Object.assign(this,t)}}u([f({type:nn,context:0,optional:!0,implicit:!0})],ul.prototype,"permittedSubtrees",void 0),u([f({type:nn,context:1,optional:!0,implicit:!0})],ul.prototype,"excludedSubtrees",void 0);class dl{constructor(t={}){Object.assign(this,t)}}u([f({type:k.Integer,context:0,implicit:!0,optional:!0,converter:ge})],dl.prototype,"requireExplicitPolicy",void 0),u([f({type:k.Integer,context:1,implicit:!0,optional:!0,converter:ge})],dl.prototype,"inhibitPolicyMapping",void 0);var Qo;class Xo{constructor(t={}){this.issuerDomainPolicy="",this.subjectDomainPolicy="",Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Xo.prototype,"issuerDomainPolicy",void 0),u([f({type:k.ObjectIdentifier})],Xo.prototype,"subjectDomainPolicy",void 0);let fl=Qo=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Qo.prototype)}};fl=Qo=u([O({type:N.Sequence,itemType:Xo})],fl);var es;const pl=`${Jt}.17`;let ts=es=class extends $e{constructor(t){super(t),Object.setPrototypeOf(this,es.prototype)}};ts=es=u([O({type:N.Sequence})],ts);let Ct=class{constructor(t={}){this.type="",this.values=[],Object.assign(this,t)}};u([f({type:k.ObjectIdentifier})],Ct.prototype,"type",void 0),u([f({type:k.Any,repeated:"set"})],Ct.prototype,"values",void 0);var rs;let hl=rs=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,rs.prototype)}};hl=rs=u([O({type:N.Sequence,itemType:Ct})],hl);const yl=`${Jt}.14`;class Tt extends Do{}class gl{constructor(t={}){Object.assign(this,t)}}u([f({type:k.GeneralizedTime,context:0,implicit:!0,optional:!0})],gl.prototype,"notBefore",void 0),u([f({type:k.GeneralizedTime,context:1,implicit:!0,optional:!0})],gl.prototype,"notAfter",void 0);var Qr;(function(e){e[e.keyUpdateAllowed=1]="keyUpdateAllowed",e[e.newExtensions=2]="newExtensions",e[e.pKIXCertificate=4]="pKIXCertificate"})(Qr||(Qr={}));class ml extends Gi{toJSON(){const t=[],r=this.toNumber();return r&Qr.pKIXCertificate&&t.push("pKIXCertificate"),r&Qr.newExtensions&&t.push("newExtensions"),r&Qr.keyUpdateAllowed&&t.push("keyUpdateAllowed"),t}toString(){return`[${this.toJSON().join(", ")}]`}}class bl{constructor(t={}){this.entrustVers="",this.entrustInfoFlags=new ml,Object.assign(this,t)}}u([f({type:k.GeneralString})],bl.prototype,"entrustVers",void 0),u([f({type:ml})],bl.prototype,"entrustInfoFlags",void 0);var is;let wl=is=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,is.prototype)}};wl=is=u([O({type:N.Sequence,itemType:Ji})],wl);class L{constructor(t={}){this.algorithm="",Object.assign(this,t)}isEqual(t){return t instanceof L&&t.algorithm==this.algorithm&&(t.parameters&&this.parameters&&za(t.parameters,this.parameters)||t.parameters===this.parameters)}}u([f({type:k.ObjectIdentifier})],L.prototype,"algorithm",void 0),u([f({type:k.Any,optional:!0})],L.prototype,"parameters",void 0);class St{constructor(t={}){this.algorithm=new L,this.subjectPublicKey=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:L})],St.prototype,"algorithm",void 0),u([f({type:k.BitString})],St.prototype,"subjectPublicKey",void 0);let Ve=class{constructor(t){if(t)if(typeof t=="string"||typeof t=="number"||t instanceof Date){const r=new Date(t);r.getUTCFullYear()>2049?this.generalTime=r:this.utcTime=r}else Object.assign(this,t)}getTime(){const t=this.utcTime||this.generalTime;if(!t)throw new Error("Cannot get time from CHOICE object");return t}};u([f({type:k.UTCTime})],Ve.prototype,"utcTime",void 0),u([f({type:k.GeneralizedTime})],Ve.prototype,"generalTime",void 0),Ve=u([O({type:N.Choice})],Ve);class on{constructor(t){this.notBefore=new Ve(new Date),this.notAfter=new Ve(new Date),t&&(this.notBefore=new Ve(t.notBefore),this.notAfter=new Ve(t.notAfter))}}u([f({type:Ve})],on.prototype,"notBefore",void 0),u([f({type:Ve})],on.prototype,"notAfter",void 0);var ns;let nt=class Ff{constructor(t={}){this.extnID="",this.critical=Ff.CRITICAL,this.extnValue=new ie,Object.assign(this,t)}};nt.CRITICAL=!1,u([f({type:k.ObjectIdentifier})],nt.prototype,"extnID",void 0),u([f({type:k.Boolean,defaultValue:nt.CRITICAL})],nt.prototype,"critical",void 0),u([f({type:ie})],nt.prototype,"extnValue",void 0);let Zt=ns=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,ns.prototype)}};Zt=ns=u([O({type:N.Sequence,itemType:nt})],Zt);var gr;(function(e){e[e.v1=0]="v1",e[e.v2=1]="v2",e[e.v3=2]="v3"})(gr||(gr={}));class Qe{constructor(t={}){this.version=gr.v1,this.serialNumber=new ArrayBuffer(0),this.signature=new L,this.issuer=new Ce,this.validity=new on,this.subject=new Ce,this.subjectPublicKeyInfo=new St,Object.assign(this,t)}}u([f({type:k.Integer,context:0,defaultValue:gr.v1})],Qe.prototype,"version",void 0),u([f({type:k.Integer,converter:ge})],Qe.prototype,"serialNumber",void 0),u([f({type:L})],Qe.prototype,"signature",void 0),u([f({type:Ce})],Qe.prototype,"issuer",void 0),u([f({type:on})],Qe.prototype,"validity",void 0),u([f({type:Ce})],Qe.prototype,"subject",void 0),u([f({type:St})],Qe.prototype,"subjectPublicKeyInfo",void 0),u([f({type:k.BitString,context:1,implicit:!0,optional:!0})],Qe.prototype,"issuerUniqueID",void 0),u([f({type:k.BitString,context:2,implicit:!0,optional:!0})],Qe.prototype,"subjectUniqueID",void 0),u([f({type:Zt,context:3,optional:!0})],Qe.prototype,"extensions",void 0);class mr{constructor(t={}){this.tbsCertificate=new Qe,this.signatureAlgorithm=new L,this.signatureValue=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:Qe})],mr.prototype,"tbsCertificate",void 0),u([f({type:L})],mr.prototype,"signatureAlgorithm",void 0),u([f({type:k.BitString})],mr.prototype,"signatureValue",void 0);class sn{constructor(t={}){this.userCertificate=new ArrayBuffer(0),this.revocationDate=new Ve,Object.assign(this,t)}}u([f({type:k.Integer,converter:ge})],sn.prototype,"userCertificate",void 0),u([f({type:Ve})],sn.prototype,"revocationDate",void 0),u([f({type:nt,optional:!0,repeated:"sequence"})],sn.prototype,"crlEntryExtensions",void 0);class xt{constructor(t={}){this.signature=new L,this.issuer=new Ce,this.thisUpdate=new Ve,Object.assign(this,t)}}u([f({type:k.Integer,optional:!0})],xt.prototype,"version",void 0),u([f({type:L})],xt.prototype,"signature",void 0),u([f({type:Ce})],xt.prototype,"issuer",void 0),u([f({type:Ve})],xt.prototype,"thisUpdate",void 0),u([f({type:Ve,optional:!0})],xt.prototype,"nextUpdate",void 0),u([f({type:sn,repeated:"sequence",optional:!0})],xt.prototype,"revokedCertificates",void 0),u([f({type:nt,optional:!0,context:0,repeated:"sequence"})],xt.prototype,"crlExtensions",void 0);let os=class{constructor(t={}){this.tbsCertList=new xt,this.signatureAlgorithm=new L,this.signature=new ArrayBuffer(0),Object.assign(this,t)}};u([f({type:xt})],os.prototype,"tbsCertList",void 0),u([f({type:L})],os.prototype,"signatureAlgorithm",void 0),u([f({type:k.BitString})],os.prototype,"signature",void 0);let br=class{constructor(t={}){this.attrType="",this.attrValues=[],Object.assign(this,t)}};u([f({type:k.ObjectIdentifier})],br.prototype,"attrType",void 0),u([f({type:k.Any,repeated:"set"})],br.prototype,"attrValues",void 0);class ss{constructor(t={}){this.acIssuer=new Q,this.acSerial=0,this.attrs=[],Object.assign(this,t)}}u([f({type:Q})],ss.prototype,"acIssuer",void 0),u([f({type:k.Integer})],ss.prototype,"acSerial",void 0),u([f({type:Ct,repeated:"sequence"})],ss.prototype,"attrs",void 0);var as;let an=as=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,as.prototype)}};an=as=u([O({type:N.Sequence,itemType:k.ObjectIdentifier})],an);class cn{constructor(t={}){this.permitUnSpecified=!0,Object.assign(this,t)}}u([f({type:k.Integer,optional:!0})],cn.prototype,"pathLenConstraint",void 0),u([f({type:an,implicit:!0,context:0,optional:!0})],cn.prototype,"permittedAttrs",void 0),u([f({type:an,implicit:!0,context:1,optional:!0})],cn.prototype,"excludedAttrs",void 0),u([f({type:k.Boolean,defaultValue:!0})],cn.prototype,"permitUnSpecified",void 0);class Qt{constructor(t={}){this.issuer=new $e,this.serial=new ArrayBuffer(0),this.issuerUID=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:$e})],Qt.prototype,"issuer",void 0),u([f({type:k.Integer,converter:ge})],Qt.prototype,"serial",void 0),u([f({type:k.BitString,optional:!0})],Qt.prototype,"issuerUID",void 0);var cs;(function(e){e[e.publicKey=0]="publicKey",e[e.publicKeyCert=1]="publicKeyCert",e[e.otherObjectTypes=2]="otherObjectTypes"})(cs||(cs={}));class Xt{constructor(t={}){this.digestedObjectType=cs.publicKey,this.digestAlgorithm=new L,this.objectDigest=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.Enumerated})],Xt.prototype,"digestedObjectType",void 0),u([f({type:k.ObjectIdentifier,optional:!0})],Xt.prototype,"otherObjectTypeID",void 0),u([f({type:L})],Xt.prototype,"digestAlgorithm",void 0),u([f({type:k.BitString})],Xt.prototype,"objectDigest",void 0);class ln{constructor(t={}){Object.assign(this,t)}}u([f({type:$e,optional:!0})],ln.prototype,"issuerName",void 0),u([f({type:Qt,context:0,implicit:!0,optional:!0})],ln.prototype,"baseCertificateID",void 0),u([f({type:Xt,context:1,implicit:!0,optional:!0})],ln.prototype,"objectDigestInfo",void 0);let wr=class{constructor(t={}){Object.assign(this,t)}};u([f({type:Q,repeated:"sequence"})],wr.prototype,"v1Form",void 0),u([f({type:ln,context:0,implicit:!0})],wr.prototype,"v2Form",void 0),wr=u([O({type:N.Choice})],wr);class un{constructor(t={}){this.notBeforeTime=new Date,this.notAfterTime=new Date,Object.assign(this,t)}}u([f({type:k.GeneralizedTime})],un.prototype,"notBeforeTime",void 0),u([f({type:k.GeneralizedTime})],un.prototype,"notAfterTime",void 0);class Xr{constructor(t={}){Object.assign(this,t)}}u([f({type:Qt,implicit:!0,context:0,optional:!0})],Xr.prototype,"baseCertificateID",void 0),u([f({type:$e,implicit:!0,context:1,optional:!0})],Xr.prototype,"entityName",void 0),u([f({type:Xt,implicit:!0,context:2,optional:!0})],Xr.prototype,"objectDigestInfo",void 0);var ls;(function(e){e[e.v2=1]="v2"})(ls||(ls={}));class ot{constructor(t={}){this.version=ls.v2,this.holder=new Xr,this.issuer=new wr,this.signature=new L,this.serialNumber=new ArrayBuffer(0),this.attrCertValidityPeriod=new un,this.attributes=[],Object.assign(this,t)}}u([f({type:k.Integer})],ot.prototype,"version",void 0),u([f({type:Xr})],ot.prototype,"holder",void 0),u([f({type:wr})],ot.prototype,"issuer",void 0),u([f({type:L})],ot.prototype,"signature",void 0),u([f({type:k.Integer,converter:ge})],ot.prototype,"serialNumber",void 0),u([f({type:un})],ot.prototype,"attrCertValidityPeriod",void 0),u([f({type:Ct,repeated:"sequence"})],ot.prototype,"attributes",void 0),u([f({type:k.BitString,optional:!0})],ot.prototype,"issuerUniqueID",void 0),u([f({type:Zt,optional:!0})],ot.prototype,"extensions",void 0);class dn{constructor(t={}){this.acinfo=new ot,this.signatureAlgorithm=new L,this.signatureValue=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:ot})],dn.prototype,"acinfo",void 0),u([f({type:L})],dn.prototype,"signatureAlgorithm",void 0),u([f({type:k.BitString})],dn.prototype,"signatureValue",void 0);var fn;(function(e){e[e.unmarked=1]="unmarked",e[e.unclassified=2]="unclassified",e[e.restricted=4]="restricted",e[e.confidential=8]="confidential",e[e.secret=16]="secret",e[e.topSecret=32]="topSecret"})(fn||(fn={}));class us extends Gi{}class ds{constructor(t={}){this.type="",this.value=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier,implicit:!0,context:0})],ds.prototype,"type",void 0),u([f({type:k.Any,implicit:!0,context:1})],ds.prototype,"value",void 0);class fs{constructor(t={}){this.policyId="",this.classList=new us(fn.unclassified),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],fs.prototype,"policyId",void 0),u([f({type:us,defaultValue:new us(fn.unclassified)})],fs.prototype,"classList",void 0),u([f({type:ds,repeated:"set"})],fs.prototype,"securityCategories",void 0);class pn{constructor(t={}){Object.assign(this,t)}}u([f({type:ie})],pn.prototype,"cotets",void 0),u([f({type:k.ObjectIdentifier})],pn.prototype,"oid",void 0),u([f({type:k.Utf8String})],pn.prototype,"string",void 0);class vl{constructor(t={}){this.values=[],Object.assign(this,t)}}u([f({type:$e,implicit:!0,context:0,optional:!0})],vl.prototype,"policyAuthority",void 0),u([f({type:pn,repeated:"sequence"})],vl.prototype,"values",void 0);var ps;class hn{constructor(t={}){this.targetCertificate=new Qt,Object.assign(this,t)}}u([f({type:Qt})],hn.prototype,"targetCertificate",void 0),u([f({type:Q,optional:!0})],hn.prototype,"targetName",void 0),u([f({type:Xt,optional:!0})],hn.prototype,"certDigestInfo",void 0);let vr=class{constructor(t={}){Object.assign(this,t)}};u([f({type:Q,context:0,implicit:!0})],vr.prototype,"targetName",void 0),u([f({type:Q,context:1,implicit:!0})],vr.prototype,"targetGroup",void 0),u([f({type:hn,context:2,implicit:!0})],vr.prototype,"targetCert",void 0),vr=u([O({type:N.Choice})],vr);let hs=ps=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,ps.prototype)}};hs=ps=u([O({type:N.Sequence,itemType:vr})],hs);var ys;let kl=ys=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,ys.prototype)}};kl=ys=u([O({type:N.Sequence,itemType:hs})],kl);class Cl{constructor(t={}){Object.assign(this,t)}}u([f({type:$e,implicit:!0,context:0,optional:!0})],Cl.prototype,"roleAuthority",void 0),u([f({type:Q,implicit:!0,context:1})],Cl.prototype,"roleName",void 0);class gs{constructor(t={}){this.service=new Q,this.ident=new Q,Object.assign(this,t)}}u([f({type:Q})],gs.prototype,"service",void 0),u([f({type:Q})],gs.prototype,"ident",void 0),u([f({type:ie,optional:!0})],gs.prototype,"authInfo",void 0);var ms;class bs{constructor(t={}){this.otherCertFormat="",this.otherCert=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],bs.prototype,"otherCertFormat",void 0),u([f({type:k.Any})],bs.prototype,"otherCert",void 0);let kr=class{constructor(t={}){Object.assign(this,t)}};u([f({type:mr})],kr.prototype,"certificate",void 0),u([f({type:dn,context:2,implicit:!0})],kr.prototype,"v2AttrCert",void 0),u([f({type:bs,context:3,implicit:!0})],kr.prototype,"other",void 0),kr=u([O({type:N.Choice})],kr);let yn=ms=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,ms.prototype)}};yn=ms=u([O({type:N.Set,itemType:kr})],yn);class Cr{constructor(t={}){this.contentType="",this.content=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Cr.prototype,"contentType",void 0),u([f({type:k.Any,context:0})],Cr.prototype,"content",void 0);let ei=class{constructor(t={}){Object.assign(this,t)}};u([f({type:ie})],ei.prototype,"single",void 0),u([f({type:k.Any})],ei.prototype,"any",void 0),ei=u([O({type:N.Choice})],ei);class gn{constructor(t={}){this.eContentType="",Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],gn.prototype,"eContentType",void 0),u([f({type:ei,context:0,optional:!0})],gn.prototype,"eContent",void 0);var At;(function(e){e[e.v0=0]="v0",e[e.v1=1]="v1",e[e.v2=2]="v2",e[e.v3=3]="v3",e[e.v4=4]="v4",e[e.v5=5]="v5"})(At||(At={}));let ti=class extends L{};ti=u([O({type:N.Sequence})],ti);let mn=class extends L{};mn=u([O({type:N.Sequence})],mn);let ut=class extends L{};ut=u([O({type:N.Sequence})],ut);let bn=class extends L{};bn=u([O({type:N.Sequence})],bn);let Sl=class extends L{};Sl=u([O({type:N.Sequence})],Sl);let ws=class extends L{};ws=u([O({type:N.Sequence})],ws);let ri=class{constructor(t={}){Object.assign(this,t)}};u([f({type:ie,context:0,implicit:!0,optional:!0})],ri.prototype,"value",void 0),u([f({type:ie,converter:wp,context:0,implicit:!0,optional:!0,repeated:"sequence"})],ri.prototype,"constructedValue",void 0),ri=u([O({type:N.Choice})],ri);class ii{constructor(t={}){this.contentType="",this.contentEncryptionAlgorithm=new bn,Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],ii.prototype,"contentType",void 0),u([f({type:bn})],ii.prototype,"contentEncryptionAlgorithm",void 0),u([f({type:ri,optional:!0})],ii.prototype,"encryptedContent",void 0);class Sr{constructor(t={}){this.issuer=new Ce,this.serialNumber=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:Ce})],Sr.prototype,"issuer",void 0),u([f({type:k.Integer,converter:ge})],Sr.prototype,"serialNumber",void 0);class wn{constructor(t={}){this.keyAttrId="",Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],wn.prototype,"keyAttrId",void 0),u([f({type:k.Any,optional:!0})],wn.prototype,"keyAttr",void 0);var vs;class vn{constructor(t={}){this.subjectKeyIdentifier=new Tt,Object.assign(this,t)}}u([f({type:Tt})],vn.prototype,"subjectKeyIdentifier",void 0),u([f({type:k.GeneralizedTime,optional:!0})],vn.prototype,"date",void 0),u([f({type:wn,optional:!0})],vn.prototype,"other",void 0);let xr=class{constructor(t={}){Object.assign(this,t)}};u([f({type:vn,context:0,implicit:!0,optional:!0})],xr.prototype,"rKeyId",void 0),u([f({type:Sr,optional:!0})],xr.prototype,"issuerAndSerialNumber",void 0),xr=u([O({type:N.Choice})],xr);class ks{constructor(t={}){this.rid=new xr,this.encryptedKey=new ie,Object.assign(this,t)}}u([f({type:xr})],ks.prototype,"rid",void 0),u([f({type:ie})],ks.prototype,"encryptedKey",void 0);let kn=vs=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,vs.prototype)}};kn=vs=u([O({type:N.Sequence,itemType:ks})],kn);class Cs{constructor(t={}){this.algorithm=new L,this.publicKey=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:L})],Cs.prototype,"algorithm",void 0),u([f({type:k.BitString})],Cs.prototype,"publicKey",void 0);let er=class{constructor(t={}){Object.assign(this,t)}};u([f({type:Tt,context:0,implicit:!0,optional:!0})],er.prototype,"subjectKeyIdentifier",void 0),u([f({type:Cs,context:1,implicit:!0,optional:!0})],er.prototype,"originatorKey",void 0),u([f({type:Sr,optional:!0})],er.prototype,"issuerAndSerialNumber",void 0),er=u([O({type:N.Choice})],er);class Ar{constructor(t={}){this.version=At.v3,this.originator=new er,this.keyEncryptionAlgorithm=new ut,this.recipientEncryptedKeys=new kn,Object.assign(this,t)}}u([f({type:k.Integer})],Ar.prototype,"version",void 0),u([f({type:er,context:0})],Ar.prototype,"originator",void 0),u([f({type:ie,context:1,optional:!0})],Ar.prototype,"ukm",void 0),u([f({type:ut})],Ar.prototype,"keyEncryptionAlgorithm",void 0),u([f({type:kn})],Ar.prototype,"recipientEncryptedKeys",void 0);let Br=class{constructor(t={}){Object.assign(this,t)}};u([f({type:Tt,context:0,implicit:!0})],Br.prototype,"subjectKeyIdentifier",void 0),u([f({type:Sr})],Br.prototype,"issuerAndSerialNumber",void 0),Br=u([O({type:N.Choice})],Br);class ni{constructor(t={}){this.version=At.v0,this.rid=new Br,this.keyEncryptionAlgorithm=new ut,this.encryptedKey=new ie,Object.assign(this,t)}}u([f({type:k.Integer})],ni.prototype,"version",void 0),u([f({type:Br})],ni.prototype,"rid",void 0),u([f({type:ut})],ni.prototype,"keyEncryptionAlgorithm",void 0),u([f({type:ie})],ni.prototype,"encryptedKey",void 0);class oi{constructor(t={}){this.keyIdentifier=new ie,Object.assign(this,t)}}u([f({type:ie})],oi.prototype,"keyIdentifier",void 0),u([f({type:k.GeneralizedTime,optional:!0})],oi.prototype,"date",void 0),u([f({type:wn,optional:!0})],oi.prototype,"other",void 0);class si{constructor(t={}){this.version=At.v4,this.kekid=new oi,this.keyEncryptionAlgorithm=new ut,this.encryptedKey=new ie,Object.assign(this,t)}}u([f({type:k.Integer})],si.prototype,"version",void 0),u([f({type:oi})],si.prototype,"kekid",void 0),u([f({type:ut})],si.prototype,"keyEncryptionAlgorithm",void 0),u([f({type:ie})],si.prototype,"encryptedKey",void 0);class ai{constructor(t={}){this.version=At.v0,this.keyEncryptionAlgorithm=new ut,this.encryptedKey=new ie,Object.assign(this,t)}}u([f({type:k.Integer})],ai.prototype,"version",void 0),u([f({type:ws,context:0,optional:!0})],ai.prototype,"keyDerivationAlgorithm",void 0),u([f({type:ut})],ai.prototype,"keyEncryptionAlgorithm",void 0),u([f({type:ie})],ai.prototype,"encryptedKey",void 0);class Ss{constructor(t={}){this.oriType="",this.oriValue=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Ss.prototype,"oriType",void 0),u([f({type:k.Any})],Ss.prototype,"oriValue",void 0);let Vt=class{constructor(t={}){Object.assign(this,t)}};u([f({type:ni,optional:!0})],Vt.prototype,"ktri",void 0),u([f({type:Ar,context:1,implicit:!0,optional:!0})],Vt.prototype,"kari",void 0),u([f({type:si,context:2,implicit:!0,optional:!0})],Vt.prototype,"kekri",void 0),u([f({type:ai,context:3,implicit:!0,optional:!0})],Vt.prototype,"pwri",void 0),u([f({type:Ss,context:4,implicit:!0,optional:!0})],Vt.prototype,"ori",void 0),Vt=u([O({type:N.Choice})],Vt);var xs;let Cn=xs=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,xs.prototype)}};Cn=xs=u([O({type:N.Set,itemType:Vt})],Cn);var As;class Sn{constructor(t={}){this.otherRevInfoFormat="",this.otherRevInfo=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Sn.prototype,"otherRevInfoFormat",void 0),u([f({type:k.Any})],Sn.prototype,"otherRevInfo",void 0);let ci=class{constructor(t={}){this.other=new Sn,Object.assign(this,t)}};u([f({type:Sn,context:1,implicit:!0})],ci.prototype,"other",void 0),ci=u([O({type:N.Choice})],ci);let Bs=As=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,As.prototype)}};Bs=As=u([O({type:N.Set,itemType:ci})],Bs);class Is{constructor(t={}){Object.assign(this,t)}}u([f({type:yn,context:0,implicit:!0,optional:!0})],Is.prototype,"certs",void 0),u([f({type:Bs,context:1,implicit:!0,optional:!0})],Is.prototype,"crls",void 0);var Es;let Ns=Es=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Es.prototype)}};Ns=Es=u([O({type:N.Set,itemType:br})],Ns);class li{constructor(t={}){this.version=At.v0,this.recipientInfos=new Cn,this.encryptedContentInfo=new ii,Object.assign(this,t)}}u([f({type:k.Integer})],li.prototype,"version",void 0),u([f({type:Is,context:0,implicit:!0,optional:!0})],li.prototype,"originatorInfo",void 0),u([f({type:Cn})],li.prototype,"recipientInfos",void 0),u([f({type:ii})],li.prototype,"encryptedContentInfo",void 0),u([f({type:Ns,context:1,implicit:!0,optional:!0})],li.prototype,"unprotectedAttrs",void 0);const qp="1.2.840.113549.1.7.2";let Ir=class{constructor(t={}){Object.assign(this,t)}};u([f({type:Tt,context:0,implicit:!0})],Ir.prototype,"subjectKeyIdentifier",void 0),u([f({type:Sr})],Ir.prototype,"issuerAndSerialNumber",void 0),Ir=u([O({type:N.Choice})],Ir);var _s;class Bt{constructor(t={}){this.version=At.v0,this.sid=new Ir,this.digestAlgorithm=new ti,this.signatureAlgorithm=new mn,this.signature=new ie,Object.assign(this,t)}}u([f({type:k.Integer})],Bt.prototype,"version",void 0),u([f({type:Ir})],Bt.prototype,"sid",void 0),u([f({type:ti})],Bt.prototype,"digestAlgorithm",void 0),u([f({type:br,repeated:"set",context:0,implicit:!0,optional:!0})],Bt.prototype,"signedAttrs",void 0),u([f({type:mn})],Bt.prototype,"signatureAlgorithm",void 0),u([f({type:ie})],Bt.prototype,"signature",void 0),u([f({type:br,repeated:"set",context:1,implicit:!0,optional:!0})],Bt.prototype,"unsignedAttrs",void 0);let xn=_s=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,_s.prototype)}};xn=_s=u([O({type:N.Set,itemType:Bt})],xn);var Os;let An=Os=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Os.prototype)}};An=Os=u([O({type:N.Set,itemType:ti})],An);class Er{constructor(t={}){this.version=At.v0,this.digestAlgorithms=new An,this.encapContentInfo=new gn,this.signerInfos=new xn,Object.assign(this,t)}}u([f({type:k.Integer})],Er.prototype,"version",void 0),u([f({type:An})],Er.prototype,"digestAlgorithms",void 0),u([f({type:gn})],Er.prototype,"encapContentInfo",void 0),u([f({type:yn,context:0,implicit:!0,optional:!0})],Er.prototype,"certificates",void 0),u([f({type:ci,context:1,implicit:!0,optional:!0})],Er.prototype,"crls",void 0),u([f({type:xn})],Er.prototype,"signerInfos",void 0);const ui="1.2.840.10045.2.1",Ts="1.2.840.10045.4.1",xl="1.2.840.10045.4.3.1",Vs="1.2.840.10045.4.3.2",js="1.2.840.10045.4.3.3",Ds="1.2.840.10045.4.3.4",Al="1.2.840.10045.3.1.7",Bl="1.3.132.0.34",Il="1.3.132.0.35";function di(e){return new L({algorithm:e})}const Kp=di(Ts);di(xl);const zp=di(Vs),Gp=di(js),Wp=di(Ds);let Nr=class{constructor(t={}){Object.assign(this,t)}};u([f({type:k.ObjectIdentifier})],Nr.prototype,"namedCurve",void 0),Nr=u([O({type:N.Choice})],Nr);class Bn{constructor(t={}){this.version=1,this.privateKey=new ie,Object.assign(this,t)}}u([f({type:k.Integer})],Bn.prototype,"version",void 0),u([f({type:ie})],Bn.prototype,"privateKey",void 0),u([f({type:Nr,context:0,optional:!0})],Bn.prototype,"parameters",void 0),u([f({type:k.BitString,context:1,optional:!0})],Bn.prototype,"publicKey",void 0);class In{constructor(t={}){this.r=new ArrayBuffer(0),this.s=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.Integer,converter:ge})],In.prototype,"r",void 0),u([f({type:k.Integer,converter:ge})],In.prototype,"s",void 0);const Le="1.2.840.113549.1.1",_r=`${Le}.1`,Jp=`${Le}.7`,Yp=`${Le}.9`,Zp=`${Le}.10`,Qp=`${Le}.2`,Xp=`${Le}.4`,En=`${Le}.5`,eh=`${Le}.14`,Ps=`${Le}.11`,Nn=`${Le}.12`,_n=`${Le}.13`,El=`${Le}.15`,Nl=`${Le}.16`,_l="1.3.14.3.2.26",Ol="2.16.840.1.101.3.4.2.4",Tl="2.16.840.1.101.3.4.2.1",Vl="2.16.840.1.101.3.4.2.2",jl="2.16.840.1.101.3.4.2.3",th="2.16.840.1.101.3.4.2.5",rh="2.16.840.1.101.3.4.2.6",ih="1.2.840.113549.2.2",nh="1.2.840.113549.2.5",$s=`${Le}.8`;function Se(e){return new L({algorithm:e,parameters:null})}Se(ih),Se(nh);const tr=Se(_l);Se(Ol),Se(Tl),Se(Vl),Se(jl),Se(th),Se(rh);const Dl=new L({algorithm:$s,parameters:H.serialize(tr)}),Pl=new L({algorithm:Yp,parameters:H.serialize(Wi.toASN(new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]).buffer))});Se(_r),Se(Qp),Se(Xp),Se(En),Se(El),Se(Nl),Se(Nn),Se(_n),Se(El),Se(Nl);class On{constructor(t={}){this.hashAlgorithm=new L(tr),this.maskGenAlgorithm=new L({algorithm:$s,parameters:H.serialize(tr)}),this.pSourceAlgorithm=new L(Pl),Object.assign(this,t)}}u([f({type:L,context:0,defaultValue:tr})],On.prototype,"hashAlgorithm",void 0),u([f({type:L,context:1,defaultValue:Dl})],On.prototype,"maskGenAlgorithm",void 0),u([f({type:L,context:2,defaultValue:Pl})],On.prototype,"pSourceAlgorithm",void 0),new L({algorithm:Jp,parameters:H.serialize(new On)});class fi{constructor(t={}){this.hashAlgorithm=new L(tr),this.maskGenAlgorithm=new L({algorithm:$s,parameters:H.serialize(tr)}),this.saltLength=20,this.trailerField=1,Object.assign(this,t)}}u([f({type:L,context:0,defaultValue:tr})],fi.prototype,"hashAlgorithm",void 0),u([f({type:L,context:1,defaultValue:Dl})],fi.prototype,"maskGenAlgorithm",void 0),u([f({type:k.Integer,context:2,defaultValue:20})],fi.prototype,"saltLength",void 0),u([f({type:k.Integer,context:3,defaultValue:1})],fi.prototype,"trailerField",void 0),new L({algorithm:Zp,parameters:H.serialize(new fi)});class Tn{constructor(t={}){this.digestAlgorithm=new L,this.digest=new ie,Object.assign(this,t)}}u([f({type:L})],Tn.prototype,"digestAlgorithm",void 0),u([f({type:ie})],Tn.prototype,"digest",void 0);var Ms;class Vn{constructor(t={}){this.prime=new ArrayBuffer(0),this.exponent=new ArrayBuffer(0),this.coefficient=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.Integer,converter:ge})],Vn.prototype,"prime",void 0),u([f({type:k.Integer,converter:ge})],Vn.prototype,"exponent",void 0),u([f({type:k.Integer,converter:ge})],Vn.prototype,"coefficient",void 0);let Rs=Ms=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Ms.prototype)}};Rs=Ms=u([O({type:N.Sequence,itemType:Vn})],Rs);class dt{constructor(t={}){this.version=0,this.modulus=new ArrayBuffer(0),this.publicExponent=new ArrayBuffer(0),this.privateExponent=new ArrayBuffer(0),this.prime1=new ArrayBuffer(0),this.prime2=new ArrayBuffer(0),this.exponent1=new ArrayBuffer(0),this.exponent2=new ArrayBuffer(0),this.coefficient=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.Integer})],dt.prototype,"version",void 0),u([f({type:k.Integer,converter:ge})],dt.prototype,"modulus",void 0),u([f({type:k.Integer,converter:ge})],dt.prototype,"publicExponent",void 0),u([f({type:k.Integer,converter:ge})],dt.prototype,"privateExponent",void 0),u([f({type:k.Integer,converter:ge})],dt.prototype,"prime1",void 0),u([f({type:k.Integer,converter:ge})],dt.prototype,"prime2",void 0),u([f({type:k.Integer,converter:ge})],dt.prototype,"exponent1",void 0),u([f({type:k.Integer,converter:ge})],dt.prototype,"exponent2",void 0),u([f({type:k.Integer,converter:ge})],dt.prototype,"coefficient",void 0),u([f({type:Rs,optional:!0})],dt.prototype,"otherPrimeInfos",void 0);class Us{constructor(t={}){this.modulus=new ArrayBuffer(0),this.publicExponent=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.Integer,converter:ge})],Us.prototype,"modulus",void 0),u([f({type:k.Integer,converter:ge})],Us.prototype,"publicExponent",void 0);var Ls;(function(e){e[e.Transient=0]="Transient",e[e.Singleton=1]="Singleton",e[e.ResolutionScoped=2]="ResolutionScoped",e[e.ContainerScoped=3]="ContainerScoped"})(Ls||(Ls={}));const He=Ls;/*! *****************************************************************************
76
76
  Copyright (c) Microsoft Corporation.
77
77
 
78
78
  Permission to use, copy, modify, and/or distribute this software for any
@@ -87,7 +87,7 @@ ${t.join(`
87
87
  PERFORMANCE OF THIS SOFTWARE.
88
88
  ***************************************************************************** */var Hs=function(e,t){return Hs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},Hs(e,t)};function Fs(e,t){Hs(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function oh(e,t,r,i){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function c(p){try{d(i.next(p))}catch(y){a(y)}}function l(p){try{d(i.throw(p))}catch(y){a(y)}}function d(p){p.done?s(p.value):o(p.value).then(c,l)}d((i=i.apply(e,t||[])).next())})}function sh(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,o,s,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(d){return function(p){return l([d,p])}}function l(d){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]<s[3])){r.label=d[1];break}if(d[0]===6&&r.label<s[1]){r.label=s[1],s=d;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(d);break}s[2]&&r.ops.pop(),r.trys.pop();continue}d=t.call(e,r)}catch(p){d=[6,p],o=0}finally{i=s=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function jn(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Dn(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i=r.call(e),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(c){a={error:c}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return s}function rr(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Dn(arguments[t]));return e}var ah="injectionTokens";function ch(e){var t=Reflect.getMetadata("design:paramtypes",e)||[],r=Reflect.getOwnMetadata(ah,e)||{};return Object.keys(r).forEach(function(i){t[+i]=r[i]}),t}function $l(e){return!!e.useClass}function qs(e){return!!e.useFactory}var Ml=function(){function e(t){this.wrap=t,this.reflectMethods=["get","getPrototypeOf","setPrototypeOf","getOwnPropertyDescriptor","defineProperty","has","set","deleteProperty","apply","construct","ownKeys"]}return e.prototype.createProxy=function(t){var r=this,i={},o=!1,s,a=function(){return o||(s=t(r.wrap()),o=!0),s};return new Proxy(i,this.createHandler(a))},e.prototype.createHandler=function(t){var r={},i=function(o){r[o]=function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];s[0]=t();var c=Reflect[o];return c.apply(void 0,rr(s))}};return this.reflectMethods.forEach(i),r},e}();function Or(e){return typeof e=="string"||typeof e=="symbol"}function lh(e){return typeof e=="object"&&"token"in e&&"multiple"in e}function Rl(e){return typeof e=="object"&&"token"in e&&"transform"in e}function uh(e){return typeof e=="function"||e instanceof Ml}function Pn(e){return!!e.useToken}function $n(e){return e.useValue!=null}function dh(e){return $l(e)||$n(e)||Pn(e)||qs(e)}var Ks=function(){function e(){this._registryMap=new Map}return e.prototype.entries=function(){return this._registryMap.entries()},e.prototype.getAll=function(t){return this.ensure(t),this._registryMap.get(t)},e.prototype.get=function(t){this.ensure(t);var r=this._registryMap.get(t);return r[r.length-1]||null},e.prototype.set=function(t,r){this.ensure(t),this._registryMap.get(t).push(r)},e.prototype.setAll=function(t,r){this._registryMap.set(t,r)},e.prototype.has=function(t){return this.ensure(t),this._registryMap.get(t).length>0},e.prototype.clear=function(){this._registryMap.clear()},e.prototype.ensure=function(t){this._registryMap.has(t)||this._registryMap.set(t,[])},e}(),fh=function(e){Fs(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ks),Ul=function(){function e(){this.scopedResolutions=new Map}return e}();function ph(e,t){if(e===null)return"at position #"+t;var r=e.split(",")[t].trim();return'"'+r+'" at position #'+t}function hh(e,t,r){return r===void 0&&(r=" "),rr([e],t.message.split(`
89
89
  `).map(function(i){return r+i})).join(`
90
- `)}function yh(e,t,r){var i=Dn(e.toString().match(/constructor\(([\w, ]+)\)/)||[],2),o=i[1],s=o===void 0?null:o,a=ph(s,t);return hh("Cannot inject the dependency "+a+' of "'+e.name+'" constructor. Reason:',r)}function gh(e){if(typeof e.dispose!="function")return!1;var t=e.dispose;return!(t.length>0)}var mh=function(e){Fs(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ks),bh=function(e){Fs(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ks),wh=function(){function e(){this.preResolution=new mh,this.postResolution=new bh}return e}(),Ll=new Map,vh=function(){function e(t){this.parent=t,this._registry=new fh,this.interceptors=new wh,this.disposed=!1,this.disposables=new Set}return e.prototype.register=function(t,r,i){i===void 0&&(i={lifecycle:He.Transient}),this.ensureNotDisposed();var o;if(dh(r)?o=r:o={useClass:r},Pn(o))for(var s=[t],a=o;a!=null;){var c=a.useToken;if(s.includes(c))throw new Error("Token registration cycle detected! "+rr(s,[c]).join(" -> "));s.push(c);var l=this._registry.get(c);l&&Pn(l.provider)?a=l.provider:a=null}if((i.lifecycle===He.Singleton||i.lifecycle==He.ContainerScoped||i.lifecycle==He.ResolutionScoped)&&($n(o)||qs(o)))throw new Error('Cannot use lifecycle "'+He[i.lifecycle]+'" with ValueProviders or FactoryProviders');return this._registry.set(t,{provider:o,options:i}),this},e.prototype.registerType=function(t,r){return this.ensureNotDisposed(),Or(r)?this.register(t,{useToken:r}):this.register(t,{useClass:r})},e.prototype.registerInstance=function(t,r){return this.ensureNotDisposed(),this.register(t,{useValue:r})},e.prototype.registerSingleton=function(t,r){if(this.ensureNotDisposed(),Or(t)){if(Or(r))return this.register(t,{useToken:r},{lifecycle:He.Singleton});if(r)return this.register(t,{useClass:r},{lifecycle:He.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}var i=t;return r&&!Or(r)&&(i=r),this.register(t,{useClass:i},{lifecycle:He.Singleton})},e.prototype.resolve=function(t,r){r===void 0&&(r=new Ul),this.ensureNotDisposed();var i=this.getRegistration(t);if(!i&&Or(t))throw new Error('Attempted to resolve unregistered dependency token: "'+t.toString()+'"');if(this.executePreResolutionInterceptor(t,"Single"),i){var o=this.resolveRegistration(i,r);return this.executePostResolutionInterceptor(t,o,"Single"),o}if(uh(t)){var o=this.construct(t,r);return this.executePostResolutionInterceptor(t,o,"Single"),o}throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")},e.prototype.executePreResolutionInterceptor=function(t,r){var i,o;if(this.interceptors.preResolution.has(t)){var s=[];try{for(var a=jn(this.interceptors.preResolution.getAll(t)),c=a.next();!c.done;c=a.next()){var l=c.value;l.options.frequency!="Once"&&s.push(l),l.callback(t,r)}}catch(d){i={error:d}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}this.interceptors.preResolution.setAll(t,s)}},e.prototype.executePostResolutionInterceptor=function(t,r,i){var o,s;if(this.interceptors.postResolution.has(t)){var a=[];try{for(var c=jn(this.interceptors.postResolution.getAll(t)),l=c.next();!l.done;l=c.next()){var d=l.value;d.options.frequency!="Once"&&a.push(d),d.callback(t,r,i)}}catch(p){o={error:p}}finally{try{l&&!l.done&&(s=c.return)&&s.call(c)}finally{if(o)throw o.error}}this.interceptors.postResolution.setAll(t,a)}},e.prototype.resolveRegistration=function(t,r){if(this.ensureNotDisposed(),t.options.lifecycle===He.ResolutionScoped&&r.scopedResolutions.has(t))return r.scopedResolutions.get(t);var i=t.options.lifecycle===He.Singleton,o=t.options.lifecycle===He.ContainerScoped,s=i||o,a;return $n(t.provider)?a=t.provider.useValue:Pn(t.provider)?a=s?t.instance||(t.instance=this.resolve(t.provider.useToken,r)):this.resolve(t.provider.useToken,r):$l(t.provider)?a=s?t.instance||(t.instance=this.construct(t.provider.useClass,r)):this.construct(t.provider.useClass,r):qs(t.provider)?a=t.provider.useFactory(this):a=this.construct(t.provider,r),t.options.lifecycle===He.ResolutionScoped&&r.scopedResolutions.set(t,a),a},e.prototype.resolveAll=function(t,r){var i=this;r===void 0&&(r=new Ul),this.ensureNotDisposed();var o=this.getAllRegistrations(t);if(!o&&Or(t))throw new Error('Attempted to resolve unregistered dependency token: "'+t.toString()+'"');if(this.executePreResolutionInterceptor(t,"All"),o){var s=o.map(function(c){return i.resolveRegistration(c,r)});return this.executePostResolutionInterceptor(t,s,"All"),s}var a=[this.construct(t,r)];return this.executePostResolutionInterceptor(t,a,"All"),a},e.prototype.isRegistered=function(t,r){return r===void 0&&(r=!1),this.ensureNotDisposed(),this._registry.has(t)||r&&(this.parent||!1)&&this.parent.isRegistered(t,!0)},e.prototype.reset=function(){this.ensureNotDisposed(),this._registry.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()},e.prototype.clearInstances=function(){var t,r;this.ensureNotDisposed();try{for(var i=jn(this._registry.entries()),o=i.next();!o.done;o=i.next()){var s=Dn(o.value,2),a=s[0],c=s[1];this._registry.setAll(a,c.filter(function(l){return!$n(l.provider)}).map(function(l){return l.instance=void 0,l}))}}catch(l){t={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}},e.prototype.createChildContainer=function(){var t,r;this.ensureNotDisposed();var i=new e(this);try{for(var o=jn(this._registry.entries()),s=o.next();!s.done;s=o.next()){var a=Dn(s.value,2),c=a[0],l=a[1];l.some(function(d){var p=d.options;return p.lifecycle===He.ContainerScoped})&&i._registry.setAll(c,l.map(function(d){return d.options.lifecycle===He.ContainerScoped?{provider:d.provider,options:d.options}:d}))}}catch(d){t={error:d}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return i},e.prototype.beforeResolution=function(t,r,i){i===void 0&&(i={frequency:"Always"}),this.interceptors.preResolution.set(t,{callback:r,options:i})},e.prototype.afterResolution=function(t,r,i){i===void 0&&(i={frequency:"Always"}),this.interceptors.postResolution.set(t,{callback:r,options:i})},e.prototype.dispose=function(){return oh(this,void 0,void 0,function(){var t;return sh(this,function(r){switch(r.label){case 0:return this.disposed=!0,t=[],this.disposables.forEach(function(i){var o=i.dispose();o&&t.push(o)}),[4,Promise.all(t)];case 1:return r.sent(),[2]}})})},e.prototype.getRegistration=function(t){return this.isRegistered(t)?this._registry.get(t):this.parent?this.parent.getRegistration(t):null},e.prototype.getAllRegistrations=function(t){return this.isRegistered(t)?this._registry.getAll(t):this.parent?this.parent.getAllRegistrations(t):null},e.prototype.construct=function(t,r){var i=this;if(t instanceof Ml)return t.createProxy(function(s){return i.resolve(s,r)});var o=function(){var s=Ll.get(t);if(!s||s.length===0){if(t.length===0)return new t;throw new Error('TypeInfo not known for "'+t.name+'"')}var a=s.map(i.resolveParams(r,t));return new(t.bind.apply(t,rr([void 0],a)))}();return gh(o)&&this.disposables.add(o),o},e.prototype.resolveParams=function(t,r){var i=this;return function(o,s){var a,c,l;try{return lh(o)?Rl(o)?o.multiple?(a=i.resolve(o.transform)).transform.apply(a,rr([i.resolveAll(o.token)],o.transformArgs)):(c=i.resolve(o.transform)).transform.apply(c,rr([i.resolve(o.token,t)],o.transformArgs)):o.multiple?i.resolveAll(o.token):i.resolve(o.token,t):Rl(o)?(l=i.resolve(o.transform,t)).transform.apply(l,rr([i.resolve(o.token,t)],o.transformArgs)):i.resolve(o,t)}catch(d){throw new Error(yh(r,s,d))}}},e.prototype.ensureNotDisposed=function(){if(this.disposed)throw new Error("This container has been disposed, you cannot interact with a disposed container")},e}(),Xe=new vh;function zs(){return function(e){Ll.set(e,ch(e))}}if(typeof Reflect>"u"||!Reflect.getMetadata)throw new Error(`tsyringe requires a reflect polyfill. Please add 'import "reflect-metadata"' to the top of your entry point.`);var Gs;class Mn{constructor(t={}){this.attrId="",this.attrValues=[],Object.assign(t)}}u([f({type:k.ObjectIdentifier})],Mn.prototype,"attrId",void 0),u([f({type:k.Any,repeated:"set"})],Mn.prototype,"attrValues",void 0);let Hl=Gs=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Gs.prototype)}};Hl=Gs=u([O({type:N.Sequence,itemType:Mn})],Hl);var Ws;let Fl=Ws=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Ws.prototype)}};Fl=Ws=u([O({type:N.Sequence,itemType:Cr})],Fl);class ql{constructor(t={}){this.certId="",this.certValue=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],ql.prototype,"certId",void 0),u([f({type:k.Any,context:0})],ql.prototype,"certValue",void 0);class Kl{constructor(t={}){this.crlId="",this.crltValue=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Kl.prototype,"crlId",void 0),u([f({type:k.Any,context:0})],Kl.prototype,"crltValue",void 0);class zl extends ie{}let Rn=class{constructor(t={}){this.encryptionAlgorithm=new L,this.encryptedData=new zl,Object.assign(this,t)}};u([f({type:L})],Rn.prototype,"encryptionAlgorithm",void 0),u([f({type:zl})],Rn.prototype,"encryptedData",void 0);var Js,Ys;(function(e){e[e.v1=0]="v1"})(Ys||(Ys={}));class Gl extends ie{}let Zs=Js=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Js.prototype)}};Zs=Js=u([O({type:N.Sequence,itemType:Ct})],Zs);class pi{constructor(t={}){this.version=Ys.v1,this.privateKeyAlgorithm=new L,this.privateKey=new Gl,Object.assign(this,t)}}u([f({type:k.Integer})],pi.prototype,"version",void 0),u([f({type:L})],pi.prototype,"privateKeyAlgorithm",void 0),u([f({type:Gl})],pi.prototype,"privateKey",void 0),u([f({type:Zs,implicit:!0,context:0,optional:!0})],pi.prototype,"attributes",void 0);let Wl=class extends pi{};Wl=u([O({type:N.Sequence})],Wl);let Jl=class extends Rn{};Jl=u([O({type:N.Sequence})],Jl);class Yl{constructor(t={}){this.secretTypeId="",this.secretValue=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Yl.prototype,"secretTypeId",void 0),u([f({type:k.Any,context:0})],Yl.prototype,"secretValue",void 0);class hi{constructor(t={}){this.mac=new Tn,this.macSalt=new ie,this.iterations=1,Object.assign(this,t)}}u([f({type:Tn})],hi.prototype,"mac",void 0),u([f({type:ie})],hi.prototype,"macSalt",void 0),u([f({type:k.Integer,defaultValue:1})],hi.prototype,"iterations",void 0);class Un{constructor(t={}){this.version=3,this.authSafe=new Cr,this.macData=new hi,Object.assign(this,t)}}u([f({type:k.Integer})],Un.prototype,"version",void 0),u([f({type:Cr})],Un.prototype,"authSafe",void 0),u([f({type:hi,optional:!0})],Un.prototype,"macData",void 0);var Qs;class Ln{constructor(t={}){this.bagId="",this.bagValue=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Ln.prototype,"bagId",void 0),u([f({type:k.Any,context:0})],Ln.prototype,"bagValue",void 0),u([f({type:Mn,repeated:"set",optional:!0})],Ln.prototype,"bagAttributes",void 0);let Zl=Qs=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Qs.prototype)}};Zl=Qs=u([O({type:N.Sequence,itemType:Ln})],Zl);var Xs,ea,ta;const Ql="1.2.840.113549.1.9",Xl=`${Ql}.7`,ra=`${Ql}.14`;let Hn=class extends Ne{constructor(t={}){super(t)}toString(){return this.ia5String||super.toString()}};u([f({type:k.IA5String})],Hn.prototype,"ia5String",void 0),Hn=u([O({type:N.Choice})],Hn);let eu=class extends Cr{};eu=u([O({type:N.Sequence})],eu);let tu=class extends Un{};tu=u([O({type:N.Sequence})],tu);let ru=class extends Rn{};ru=u([O({type:N.Sequence})],ru);let ia=class{constructor(t=""){this.value=t}toString(){return this.value}};u([f({type:k.IA5String})],ia.prototype,"value",void 0),ia=u([O({type:N.Choice})],ia);let iu=class extends Hn{};iu=u([O({type:N.Choice})],iu);let nu=class extends Ne{};nu=u([O({type:N.Choice})],nu);let na=class{constructor(t=new Date){this.value=t}};u([f({type:k.GeneralizedTime})],na.prototype,"value",void 0),na=u([O({type:N.Choice})],na);let ou=class extends Ne{};ou=u([O({type:N.Choice})],ou);let oa=class{constructor(t="M"){this.value=t}toString(){return this.value}};u([f({type:k.PrintableString})],oa.prototype,"value",void 0),oa=u([O({type:N.Choice})],oa);let Fn=class{constructor(t=""){this.value=t}toString(){return this.value}};u([f({type:k.PrintableString})],Fn.prototype,"value",void 0),Fn=u([O({type:N.Choice})],Fn);let su=class extends Fn{};su=u([O({type:N.Choice})],su);let au=class extends Ne{};au=u([O({type:N.Choice})],au);let sa=class{constructor(t=""){this.value=t}toString(){return this.value}};u([f({type:k.ObjectIdentifier})],sa.prototype,"value",void 0),sa=u([O({type:N.Choice})],sa);let cu=class extends je{};cu=u([O({type:N.Choice})],cu);let aa=class{constructor(t=0){this.value=t}toString(){return this.value.toString()}};u([f({type:k.Integer})],aa.prototype,"value",void 0),aa=u([O({type:N.Choice})],aa);let lu=class extends Bt{};lu=u([O({type:N.Sequence})],lu);let qn=class extends Ne{};qn=u([O({type:N.Choice})],qn);let uu=Xs=class extends Zt{constructor(t){super(t),Object.setPrototypeOf(this,Xs.prototype)}};uu=Xs=u([O({type:N.Sequence})],uu);let du=ea=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,ea.prototype)}};du=ea=u([O({type:N.Set,itemType:br})],du);let ca=class{constructor(t=""){this.value=t}toString(){return this.value}};u([f({type:k.BmpString})],ca.prototype,"value",void 0),ca=u([O({type:N.Choice})],ca);let la=class extends L{};la=u([O({type:N.Sequence})],la);let fu=ta=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,ta.prototype)}};fu=ta=u([O({type:N.Sequence,itemType:la})],fu);var ua;let Kn=ua=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,ua.prototype)}};Kn=ua=u([O({type:N.Sequence,itemType:Ct})],Kn);class Tr{constructor(t={}){this.version=0,this.subject=new Ce,this.subjectPKInfo=new St,this.attributes=new Kn,Object.assign(this,t)}}u([f({type:k.Integer})],Tr.prototype,"version",void 0),u([f({type:Ce})],Tr.prototype,"subject",void 0),u([f({type:St})],Tr.prototype,"subjectPKInfo",void 0),u([f({type:Kn,implicit:!0,context:0})],Tr.prototype,"attributes",void 0);class yi{constructor(t={}){this.certificationRequestInfo=new Tr,this.signatureAlgorithm=new L,this.signature=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:Tr})],yi.prototype,"certificationRequestInfo",void 0),u([f({type:L})],yi.prototype,"signatureAlgorithm",void 0),u([f({type:k.BitString})],yi.prototype,"signature",void 0);/*!
90
+ `)}function yh(e,t,r){var i=Dn(e.toString().match(/constructor\(([\w, ]+)\)/)||[],2),o=i[1],s=o===void 0?null:o,a=ph(s,t);return hh("Cannot inject the dependency "+a+' of "'+e.name+'" constructor. Reason:',r)}function gh(e){if(typeof e.dispose!="function")return!1;var t=e.dispose;return!(t.length>0)}var mh=function(e){Fs(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ks),bh=function(e){Fs(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Ks),wh=function(){function e(){this.preResolution=new mh,this.postResolution=new bh}return e}(),Ll=new Map,vh=function(){function e(t){this.parent=t,this._registry=new fh,this.interceptors=new wh,this.disposed=!1,this.disposables=new Set}return e.prototype.register=function(t,r,i){i===void 0&&(i={lifecycle:He.Transient}),this.ensureNotDisposed();var o;if(dh(r)?o=r:o={useClass:r},Pn(o))for(var s=[t],a=o;a!=null;){var c=a.useToken;if(s.includes(c))throw new Error("Token registration cycle detected! "+rr(s,[c]).join(" -> "));s.push(c);var l=this._registry.get(c);l&&Pn(l.provider)?a=l.provider:a=null}if((i.lifecycle===He.Singleton||i.lifecycle==He.ContainerScoped||i.lifecycle==He.ResolutionScoped)&&($n(o)||qs(o)))throw new Error('Cannot use lifecycle "'+He[i.lifecycle]+'" with ValueProviders or FactoryProviders');return this._registry.set(t,{provider:o,options:i}),this},e.prototype.registerType=function(t,r){return this.ensureNotDisposed(),Or(r)?this.register(t,{useToken:r}):this.register(t,{useClass:r})},e.prototype.registerInstance=function(t,r){return this.ensureNotDisposed(),this.register(t,{useValue:r})},e.prototype.registerSingleton=function(t,r){if(this.ensureNotDisposed(),Or(t)){if(Or(r))return this.register(t,{useToken:r},{lifecycle:He.Singleton});if(r)return this.register(t,{useClass:r},{lifecycle:He.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}var i=t;return r&&!Or(r)&&(i=r),this.register(t,{useClass:i},{lifecycle:He.Singleton})},e.prototype.resolve=function(t,r){r===void 0&&(r=new Ul),this.ensureNotDisposed();var i=this.getRegistration(t);if(!i&&Or(t))throw new Error('Attempted to resolve unregistered dependency token: "'+t.toString()+'"');if(this.executePreResolutionInterceptor(t,"Single"),i){var o=this.resolveRegistration(i,r);return this.executePostResolutionInterceptor(t,o,"Single"),o}if(uh(t)){var o=this.construct(t,r);return this.executePostResolutionInterceptor(t,o,"Single"),o}throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")},e.prototype.executePreResolutionInterceptor=function(t,r){var i,o;if(this.interceptors.preResolution.has(t)){var s=[];try{for(var a=jn(this.interceptors.preResolution.getAll(t)),c=a.next();!c.done;c=a.next()){var l=c.value;l.options.frequency!="Once"&&s.push(l),l.callback(t,r)}}catch(d){i={error:d}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}this.interceptors.preResolution.setAll(t,s)}},e.prototype.executePostResolutionInterceptor=function(t,r,i){var o,s;if(this.interceptors.postResolution.has(t)){var a=[];try{for(var c=jn(this.interceptors.postResolution.getAll(t)),l=c.next();!l.done;l=c.next()){var d=l.value;d.options.frequency!="Once"&&a.push(d),d.callback(t,r,i)}}catch(p){o={error:p}}finally{try{l&&!l.done&&(s=c.return)&&s.call(c)}finally{if(o)throw o.error}}this.interceptors.postResolution.setAll(t,a)}},e.prototype.resolveRegistration=function(t,r){if(this.ensureNotDisposed(),t.options.lifecycle===He.ResolutionScoped&&r.scopedResolutions.has(t))return r.scopedResolutions.get(t);var i=t.options.lifecycle===He.Singleton,o=t.options.lifecycle===He.ContainerScoped,s=i||o,a;return $n(t.provider)?a=t.provider.useValue:Pn(t.provider)?a=s?t.instance||(t.instance=this.resolve(t.provider.useToken,r)):this.resolve(t.provider.useToken,r):$l(t.provider)?a=s?t.instance||(t.instance=this.construct(t.provider.useClass,r)):this.construct(t.provider.useClass,r):qs(t.provider)?a=t.provider.useFactory(this):a=this.construct(t.provider,r),t.options.lifecycle===He.ResolutionScoped&&r.scopedResolutions.set(t,a),a},e.prototype.resolveAll=function(t,r){var i=this;r===void 0&&(r=new Ul),this.ensureNotDisposed();var o=this.getAllRegistrations(t);if(!o&&Or(t))throw new Error('Attempted to resolve unregistered dependency token: "'+t.toString()+'"');if(this.executePreResolutionInterceptor(t,"All"),o){var s=o.map(function(c){return i.resolveRegistration(c,r)});return this.executePostResolutionInterceptor(t,s,"All"),s}var a=[this.construct(t,r)];return this.executePostResolutionInterceptor(t,a,"All"),a},e.prototype.isRegistered=function(t,r){return r===void 0&&(r=!1),this.ensureNotDisposed(),this._registry.has(t)||r&&(this.parent||!1)&&this.parent.isRegistered(t,!0)},e.prototype.reset=function(){this.ensureNotDisposed(),this._registry.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()},e.prototype.clearInstances=function(){var t,r;this.ensureNotDisposed();try{for(var i=jn(this._registry.entries()),o=i.next();!o.done;o=i.next()){var s=Dn(o.value,2),a=s[0],c=s[1];this._registry.setAll(a,c.filter(function(l){return!$n(l.provider)}).map(function(l){return l.instance=void 0,l}))}}catch(l){t={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}},e.prototype.createChildContainer=function(){var t,r;this.ensureNotDisposed();var i=new e(this);try{for(var o=jn(this._registry.entries()),s=o.next();!s.done;s=o.next()){var a=Dn(s.value,2),c=a[0],l=a[1];l.some(function(d){var p=d.options;return p.lifecycle===He.ContainerScoped})&&i._registry.setAll(c,l.map(function(d){return d.options.lifecycle===He.ContainerScoped?{provider:d.provider,options:d.options}:d}))}}catch(d){t={error:d}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return i},e.prototype.beforeResolution=function(t,r,i){i===void 0&&(i={frequency:"Always"}),this.interceptors.preResolution.set(t,{callback:r,options:i})},e.prototype.afterResolution=function(t,r,i){i===void 0&&(i={frequency:"Always"}),this.interceptors.postResolution.set(t,{callback:r,options:i})},e.prototype.dispose=function(){return oh(this,void 0,void 0,function(){var t;return sh(this,function(r){switch(r.label){case 0:return this.disposed=!0,t=[],this.disposables.forEach(function(i){var o=i.dispose();o&&t.push(o)}),[4,Promise.all(t)];case 1:return r.sent(),[2]}})})},e.prototype.getRegistration=function(t){return this.isRegistered(t)?this._registry.get(t):this.parent?this.parent.getRegistration(t):null},e.prototype.getAllRegistrations=function(t){return this.isRegistered(t)?this._registry.getAll(t):this.parent?this.parent.getAllRegistrations(t):null},e.prototype.construct=function(t,r){var i=this;if(t instanceof Ml)return t.createProxy(function(s){return i.resolve(s,r)});var o=function(){var s=Ll.get(t);if(!s||s.length===0){if(t.length===0)return new t;throw new Error('TypeInfo not known for "'+t.name+'"')}var a=s.map(i.resolveParams(r,t));return new(t.bind.apply(t,rr([void 0],a)))}();return gh(o)&&this.disposables.add(o),o},e.prototype.resolveParams=function(t,r){var i=this;return function(o,s){var a,c,l;try{return lh(o)?Rl(o)?o.multiple?(a=i.resolve(o.transform)).transform.apply(a,rr([i.resolveAll(o.token)],o.transformArgs)):(c=i.resolve(o.transform)).transform.apply(c,rr([i.resolve(o.token,t)],o.transformArgs)):o.multiple?i.resolveAll(o.token):i.resolve(o.token,t):Rl(o)?(l=i.resolve(o.transform,t)).transform.apply(l,rr([i.resolve(o.token,t)],o.transformArgs)):i.resolve(o,t)}catch(d){throw new Error(yh(r,s,d))}}},e.prototype.ensureNotDisposed=function(){if(this.disposed)throw new Error("This container has been disposed, you cannot interact with a disposed container")},e}(),Xe=new vh;function zs(){return function(e){Ll.set(e,ch(e))}}if(typeof Reflect>"u"||!Reflect.getMetadata)throw new Error(`tsyringe requires a reflect polyfill. Please add 'import "reflect-metadata"' to the top of your entry point.`);var Gs;class Mn{constructor(t={}){this.attrId="",this.attrValues=[],Object.assign(t)}}u([f({type:k.ObjectIdentifier})],Mn.prototype,"attrId",void 0),u([f({type:k.Any,repeated:"set"})],Mn.prototype,"attrValues",void 0);let Hl=Gs=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Gs.prototype)}};Hl=Gs=u([O({type:N.Sequence,itemType:Mn})],Hl);var Ws;let Fl=Ws=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Ws.prototype)}};Fl=Ws=u([O({type:N.Sequence,itemType:Cr})],Fl);class ql{constructor(t={}){this.certId="",this.certValue=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],ql.prototype,"certId",void 0),u([f({type:k.Any,context:0})],ql.prototype,"certValue",void 0);class Kl{constructor(t={}){this.crlId="",this.crltValue=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Kl.prototype,"crlId",void 0),u([f({type:k.Any,context:0})],Kl.prototype,"crltValue",void 0);class zl extends ie{}let Rn=class{constructor(t={}){this.encryptionAlgorithm=new L,this.encryptedData=new zl,Object.assign(this,t)}};u([f({type:L})],Rn.prototype,"encryptionAlgorithm",void 0),u([f({type:zl})],Rn.prototype,"encryptedData",void 0);var Js,Ys;(function(e){e[e.v1=0]="v1"})(Ys||(Ys={}));class Gl extends ie{}let Zs=Js=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Js.prototype)}};Zs=Js=u([O({type:N.Sequence,itemType:Ct})],Zs);class pi{constructor(t={}){this.version=Ys.v1,this.privateKeyAlgorithm=new L,this.privateKey=new Gl,Object.assign(this,t)}}u([f({type:k.Integer})],pi.prototype,"version",void 0),u([f({type:L})],pi.prototype,"privateKeyAlgorithm",void 0),u([f({type:Gl})],pi.prototype,"privateKey",void 0),u([f({type:Zs,implicit:!0,context:0,optional:!0})],pi.prototype,"attributes",void 0);let Wl=class extends pi{};Wl=u([O({type:N.Sequence})],Wl);let Jl=class extends Rn{};Jl=u([O({type:N.Sequence})],Jl);class Yl{constructor(t={}){this.secretTypeId="",this.secretValue=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Yl.prototype,"secretTypeId",void 0),u([f({type:k.Any,context:0})],Yl.prototype,"secretValue",void 0);class hi{constructor(t={}){this.mac=new Tn,this.macSalt=new ie,this.iterations=1,Object.assign(this,t)}}u([f({type:Tn})],hi.prototype,"mac",void 0),u([f({type:ie})],hi.prototype,"macSalt",void 0),u([f({type:k.Integer,defaultValue:1})],hi.prototype,"iterations",void 0);class Un{constructor(t={}){this.version=3,this.authSafe=new Cr,this.macData=new hi,Object.assign(this,t)}}u([f({type:k.Integer})],Un.prototype,"version",void 0),u([f({type:Cr})],Un.prototype,"authSafe",void 0),u([f({type:hi,optional:!0})],Un.prototype,"macData",void 0);var Qs;class Ln{constructor(t={}){this.bagId="",this.bagValue=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:k.ObjectIdentifier})],Ln.prototype,"bagId",void 0),u([f({type:k.Any,context:0})],Ln.prototype,"bagValue",void 0),u([f({type:Mn,repeated:"set",optional:!0})],Ln.prototype,"bagAttributes",void 0);let Zl=Qs=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,Qs.prototype)}};Zl=Qs=u([O({type:N.Sequence,itemType:Ln})],Zl);var Xs,ea,ta;const Ql="1.2.840.113549.1.9",Xl=`${Ql}.7`,ra=`${Ql}.14`;let Hn=class extends Ee{constructor(t={}){super(t)}toString(){return this.ia5String||super.toString()}};u([f({type:k.IA5String})],Hn.prototype,"ia5String",void 0),Hn=u([O({type:N.Choice})],Hn);let eu=class extends Cr{};eu=u([O({type:N.Sequence})],eu);let tu=class extends Un{};tu=u([O({type:N.Sequence})],tu);let ru=class extends Rn{};ru=u([O({type:N.Sequence})],ru);let ia=class{constructor(t=""){this.value=t}toString(){return this.value}};u([f({type:k.IA5String})],ia.prototype,"value",void 0),ia=u([O({type:N.Choice})],ia);let iu=class extends Hn{};iu=u([O({type:N.Choice})],iu);let nu=class extends Ee{};nu=u([O({type:N.Choice})],nu);let na=class{constructor(t=new Date){this.value=t}};u([f({type:k.GeneralizedTime})],na.prototype,"value",void 0),na=u([O({type:N.Choice})],na);let ou=class extends Ee{};ou=u([O({type:N.Choice})],ou);let oa=class{constructor(t="M"){this.value=t}toString(){return this.value}};u([f({type:k.PrintableString})],oa.prototype,"value",void 0),oa=u([O({type:N.Choice})],oa);let Fn=class{constructor(t=""){this.value=t}toString(){return this.value}};u([f({type:k.PrintableString})],Fn.prototype,"value",void 0),Fn=u([O({type:N.Choice})],Fn);let su=class extends Fn{};su=u([O({type:N.Choice})],su);let au=class extends Ee{};au=u([O({type:N.Choice})],au);let sa=class{constructor(t=""){this.value=t}toString(){return this.value}};u([f({type:k.ObjectIdentifier})],sa.prototype,"value",void 0),sa=u([O({type:N.Choice})],sa);let cu=class extends Ve{};cu=u([O({type:N.Choice})],cu);let aa=class{constructor(t=0){this.value=t}toString(){return this.value.toString()}};u([f({type:k.Integer})],aa.prototype,"value",void 0),aa=u([O({type:N.Choice})],aa);let lu=class extends Bt{};lu=u([O({type:N.Sequence})],lu);let qn=class extends Ee{};qn=u([O({type:N.Choice})],qn);let uu=Xs=class extends Zt{constructor(t){super(t),Object.setPrototypeOf(this,Xs.prototype)}};uu=Xs=u([O({type:N.Sequence})],uu);let du=ea=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,ea.prototype)}};du=ea=u([O({type:N.Set,itemType:br})],du);let ca=class{constructor(t=""){this.value=t}toString(){return this.value}};u([f({type:k.BmpString})],ca.prototype,"value",void 0),ca=u([O({type:N.Choice})],ca);let la=class extends L{};la=u([O({type:N.Sequence})],la);let fu=ta=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,ta.prototype)}};fu=ta=u([O({type:N.Sequence,itemType:la})],fu);var ua;let Kn=ua=class extends ae{constructor(t){super(t),Object.setPrototypeOf(this,ua.prototype)}};Kn=ua=u([O({type:N.Sequence,itemType:Ct})],Kn);class Tr{constructor(t={}){this.version=0,this.subject=new Ce,this.subjectPKInfo=new St,this.attributes=new Kn,Object.assign(this,t)}}u([f({type:k.Integer})],Tr.prototype,"version",void 0),u([f({type:Ce})],Tr.prototype,"subject",void 0),u([f({type:St})],Tr.prototype,"subjectPKInfo",void 0),u([f({type:Kn,implicit:!0,context:0})],Tr.prototype,"attributes",void 0);class yi{constructor(t={}){this.certificationRequestInfo=new Tr,this.signatureAlgorithm=new L,this.signature=new ArrayBuffer(0),Object.assign(this,t)}}u([f({type:Tr})],yi.prototype,"certificationRequestInfo",void 0),u([f({type:L})],yi.prototype,"signatureAlgorithm",void 0),u([f({type:k.BitString})],yi.prototype,"signature",void 0);/*!
91
91
  * MIT License
92
92
  *
93
93
  * Copyright (c) Peculiar Ventures. All rights reserved.
@@ -112,16 +112,16 @@ ${t.join(`
112
112
  *
113
113
  */const zn="crypto.algorithm";class kh{getAlgorithms(){return Xe.resolveAll(zn)}toAsnAlgorithm(t){({...t});for(const r of this.getAlgorithms()){const i=r.toAsnAlgorithm(t);if(i)return i}if(/^[0-9.]+$/.test(t.name)){const r=new L({algorithm:t.name});if("parameters"in t){const i=t;r.parameters=i.parameters}return r}throw new Error("Cannot convert WebCrypto algorithm to ASN.1 algorithm")}toWebAlgorithm(t){for(const i of this.getAlgorithms()){const o=i.toWebAlgorithm(t);if(o)return o}return{name:t.algorithm,parameters:t.parameters}}}const Gn="crypto.algorithmProvider";Xe.registerSingleton(Gn,kh);var Wn;const Fe="1.3.36.3.3.2.8.1.1",pu=`${Fe}.1`,hu=`${Fe}.2`,yu=`${Fe}.3`,gu=`${Fe}.4`,mu=`${Fe}.5`,bu=`${Fe}.6`,wu=`${Fe}.7`,vu=`${Fe}.8`,ku=`${Fe}.9`,Cu=`${Fe}.10`,Su=`${Fe}.11`,xu=`${Fe}.12`,Au=`${Fe}.13`,Bu=`${Fe}.14`,Iu="brainpoolP160r1",Eu="brainpoolP160t1",Nu="brainpoolP192r1",_u="brainpoolP192t1",Ou="brainpoolP224r1",Tu="brainpoolP224t1",Vu="brainpoolP256r1",ju="brainpoolP256t1",Du="brainpoolP320r1",Pu="brainpoolP320t1",$u="brainpoolP384r1",Mu="brainpoolP384t1",Ru="brainpoolP512r1",Uu="brainpoolP512t1",me="ECDSA";let gi=Wn=class{toAsnAlgorithm(t){switch(t.name.toLowerCase()){case me.toLowerCase():if("hash"in t)switch((typeof t.hash=="string"?t.hash:t.hash.name).toLowerCase()){case"sha-1":return Kp;case"sha-256":return zp;case"sha-384":return Gp;case"sha-512":return Wp}else if("namedCurve"in t){let r="";switch(t.namedCurve){case"P-256":r=Al;break;case"K-256":r=Wn.SECP256K1;break;case"P-384":r=Bl;break;case"P-521":r=Il;break;case Iu:r=pu;break;case Eu:r=hu;break;case Nu:r=yu;break;case _u:r=gu;break;case Ou:r=mu;break;case Tu:r=bu;break;case Vu:r=wu;break;case ju:r=vu;break;case Du:r=ku;break;case Pu:r=Cu;break;case $u:r=Su;break;case Mu:r=xu;break;case Ru:r=Au;break;case Uu:r=Bu;break}if(r)return new L({algorithm:ui,parameters:H.serialize(new Nr({namedCurve:r}))})}}return null}toWebAlgorithm(t){switch(t.algorithm){case Ts:return{name:me,hash:{name:"SHA-1"}};case Vs:return{name:me,hash:{name:"SHA-256"}};case js:return{name:me,hash:{name:"SHA-384"}};case Ds:return{name:me,hash:{name:"SHA-512"}};case ui:{if(!t.parameters)throw new TypeError("Cannot get required parameters from EC algorithm");switch(H.parse(t.parameters,Nr).namedCurve){case Al:return{name:me,namedCurve:"P-256"};case Wn.SECP256K1:return{name:me,namedCurve:"K-256"};case Bl:return{name:me,namedCurve:"P-384"};case Il:return{name:me,namedCurve:"P-521"};case pu:return{name:me,namedCurve:Iu};case hu:return{name:me,namedCurve:Eu};case yu:return{name:me,namedCurve:Nu};case gu:return{name:me,namedCurve:_u};case mu:return{name:me,namedCurve:Ou};case bu:return{name:me,namedCurve:Tu};case wu:return{name:me,namedCurve:Vu};case vu:return{name:me,namedCurve:ju};case ku:return{name:me,namedCurve:Du};case Cu:return{name:me,namedCurve:Pu};case Su:return{name:me,namedCurve:$u};case xu:return{name:me,namedCurve:Mu};case Au:return{name:me,namedCurve:Ru};case Bu:return{name:me,namedCurve:Uu}}}}return null}};gi.SECP256K1="1.3.132.0.10",gi=Wn=u([zs()],gi),Xe.registerSingleton(zn,gi);const Lu=Symbol("name"),Hu=Symbol("value");class ce{constructor(t,r={},i=""){this[Lu]=t,this[Hu]=i;for(const o in r)this[o]=r[o]}}ce.NAME=Lu,ce.VALUE=Hu;class Ch{static toTextObject(t){const r=new ce("Algorithm Identifier",{},jt.toString(t.algorithm));if(t.parameters)switch(t.algorithm){case ui:{const i=new gi().toWebAlgorithm(t);i&&"namedCurve"in i?r["Named Curve"]=i.namedCurve:r.Parameters=t.parameters;break}default:r.Parameters=t.parameters}return r}}class jt{static toString(t){const r=this.items[t];return r||t}}jt.items={[_l]:"sha1",[Ol]:"sha224",[Tl]:"sha256",[Vl]:"sha384",[jl]:"sha512",[_r]:"rsaEncryption",[En]:"sha1WithRSAEncryption",[eh]:"sha224WithRSAEncryption",[Ps]:"sha256WithRSAEncryption",[Nn]:"sha384WithRSAEncryption",[_n]:"sha512WithRSAEncryption",[ui]:"ecPublicKey",[Ts]:"ecdsaWithSHA1",[xl]:"ecdsaWithSHA224",[Vs]:"ecdsaWithSHA256",[js]:"ecdsaWithSHA384",[Ds]:"ecdsaWithSHA512",[Mp]:"TLS WWW server authentication",[Rp]:"TLS WWW client authentication",[Up]:"Code Signing",[Lp]:"E-mail Protection",[Hp]:"Time Stamping",[Fp]:"OCSP Signing",[qp]:"Signed Data"};class ir{static serialize(t){return this.serializeObj(t).join(`
114
114
  `)}static pad(t=0){return"".padStart(2*t," ")}static serializeObj(t,r=0){const i=[];let o=this.pad(r++),s="";const a=t[ce.VALUE];a&&(s=` ${a}`),i.push(`${o}${t[ce.NAME]}:${s}`),o=this.pad(r);for(const c in t){if(typeof c=="symbol")continue;const l=t[c],d=c?`${c}: `:"";if(typeof l=="string"||typeof l=="number"||typeof l=="boolean")i.push(`${o}${d}${l}`);else if(l instanceof Date)i.push(`${o}${d}${l.toUTCString()}`);else if(Array.isArray(l))for(const p of l)p[ce.NAME]=c,i.push(...this.serializeObj(p,r));else if(l instanceof ce)l[ce.NAME]=c,i.push(...this.serializeObj(l,r));else if(D.isBufferSource(l))c?(i.push(`${o}${d}`),i.push(...this.serializeBufferSource(l,r+1))):i.push(...this.serializeBufferSource(l,r));else if("toTextObject"in l){const p=l.toTextObject();p[ce.NAME]=c,i.push(...this.serializeObj(p,r))}else throw new TypeError("Cannot serialize data in text format. Unsupported type.")}return i}static serializeBufferSource(t,r=0){const i=this.pad(r),o=D.toUint8Array(t),s=[];for(let a=0;a<o.length;){const c=[];for(let l=0;l<16&&a<o.length;l++){l===8&&c.push("");const d=o[a++].toString(16).padStart(2,"0");c.push(d)}s.push(`${i}${c.join(" ")}`)}return s}static serializeAlgorithm(t){return this.algorithmSerializer.toTextObject(t)}}ir.oidSerializer=jt,ir.algorithmSerializer=Ch;class Dt{constructor(...t){if(t.length===1){const r=t[0];this.rawData=H.serialize(r),this.onInit(r)}else{const r=H.parse(t[0],t[1]);this.rawData=D.toArrayBuffer(t[0]),this.onInit(r)}}equal(t){return t instanceof Dt?za(t.rawData,this.rawData):!1}toString(t="text"){switch(t){case"asn":return H.toString(this.rawData);case"text":return ir.serialize(this.toTextObject());case"hex":return R.ToHex(this.rawData);case"base64":return R.ToBase64(this.rawData);case"base64url":return R.ToBase64Url(this.rawData);default:throw TypeError("Argument 'format' is unsupported value")}}getTextName(){return this.constructor.NAME}toTextObject(){const t=this.toTextObjectEmpty();return t[""]=this.rawData,t}toTextObjectEmpty(t){return new ce(this.getTextName(),{},t)}}Dt.NAME="ASN";class ft extends Dt{constructor(...t){let r;D.isBufferSource(t[0])?r=D.toArrayBuffer(t[0]):r=H.serialize(new nt({extnID:t[0],critical:t[1],extnValue:new ie(D.toArrayBuffer(t[2]))})),super(r,nt)}onInit(t){this.type=t.extnID,this.critical=t.critical,this.value=t.extnValue.buffer}toTextObject(){const t=this.toTextObjectWithoutValue();return t[""]=this.value,t}toTextObjectWithoutValue(){const t=this.toTextObjectEmpty(this.critical?"critical":void 0);return t[ce.NAME]===ft.NAME&&(t[ce.NAME]=jt.toString(this.type)),t}}var Fu;class nr{static isCryptoKeyPair(t){return t&&t.privateKey&&t.publicKey}static isCryptoKey(t){return t&&t.usages&&t.type&&t.algorithm&&t.extractable!==void 0}constructor(){this.items=new Map,this[Fu]="CryptoProvider",typeof self<"u"&&typeof crypto<"u"&&this.set(nr.DEFAULT,crypto)}clear(){this.items.clear()}delete(t){return this.items.delete(t)}forEach(t,r){return this.items.forEach(t,r)}has(t){return this.items.has(t)}get size(){return this.items.size}entries(){return this.items.entries()}keys(){return this.items.keys()}values(){return this.items.values()}[Symbol.iterator](){return this.items[Symbol.iterator]()}get(t=nr.DEFAULT){const r=this.items.get(t.toLowerCase());if(!r)throw new Error(`Cannot get Crypto by name '${t}'`);return r}set(t,r){if(typeof t=="string"){if(!r)throw new TypeError("Argument 'value' is required");this.items.set(t.toLowerCase(),r)}else this.items.set(nr.DEFAULT,t);return this}}Fu=Symbol.toStringTag,nr.DEFAULT="default";const We=new nr,Sh=/^[0-2](?:\.[1-9][0-9]*)+$/;function xh(e){return new RegExp(Sh).test(e)}class qu{constructor(t={}){this.items={};for(const r in t)this.register(r,t[r])}get(t){return this.items[t]||null}findId(t){return xh(t)?t:this.get(t)}register(t,r){this.items[t]=r,this.items[r]=t}}const qe=new qu;qe.register("CN","2.5.4.3"),qe.register("L","2.5.4.7"),qe.register("ST","2.5.4.8"),qe.register("O","2.5.4.10"),qe.register("OU","2.5.4.11"),qe.register("C","2.5.4.6"),qe.register("DC","0.9.2342.19200300.100.1.25"),qe.register("E","1.2.840.113549.1.9.1"),qe.register("G","2.5.4.42"),qe.register("I","2.5.4.43"),qe.register("SN","2.5.4.4"),qe.register("T","2.5.4.12");function Ah(e,t){return`\\${R.ToHex(R.FromUtf8String(t)).toUpperCase()}`}function Bh(e){return e.replace(/([,+"\\<>;])/g,"\\$1").replace(/^([ #])/,"\\$1").replace(/([ ]$)/,"\\$1").replace(/([\r\n\t])/,Ah)}class Pt{static isASCII(t){for(let r=0;r<t.length;r++)if(t.charCodeAt(r)>255)return!1;return!0}constructor(t,r={}){this.extraNames=new qu,this.asn=new Ce;for(const i in r)if(Object.prototype.hasOwnProperty.call(r,i)){const o=r[i];this.extraNames.register(i,o)}typeof t=="string"?this.asn=this.fromString(t):t instanceof Ce?this.asn=t:D.isBufferSource(t)?this.asn=H.parse(t,Ce):this.asn=this.fromJSON(t)}getField(t){const r=this.extraNames.findId(t)||qe.findId(t),i=[];for(const o of this.asn)for(const s of o)s.type===r&&i.push(s.value.toString());return i}getName(t){return this.extraNames.get(t)||qe.get(t)}toString(){return this.asn.map(t=>t.map(r=>{const i=this.getName(r.type)||r.type,o=r.value.anyValue?`#${R.ToHex(r.value.anyValue)}`:Bh(r.value.toString());return`${i}=${o}`}).join("+")).join(", ")}toJSON(){var t;const r=[];for(const i of this.asn){const o={};for(const s of i){const a=this.getName(s.type)||s.type;(t=o[a])!==null&&t!==void 0||(o[a]=[]),o[a].push(s.value.anyValue?`#${R.ToHex(s.value.anyValue)}`:s.value.toString())}r.push(o)}return r}fromString(t){const r=new Ce,i=/(\d\.[\d.]*\d|[A-Za-z]+)=((?:"")|(?:".*?[^\\]")|(?:[^,+].*?(?:[^\\][,+]))|(?:))([,+])?/g;let o=null,s=",";for(;o=i.exec(`${t},`);){let[,a,c]=o;const l=c[c.length-1];(l===","||l==="+")&&(c=c.slice(0,c.length-1),o[3]=l);const d=o[3];if(/[\d.]+/.test(a)||(a=this.getName(a)||""),!a)throw new Error(`Cannot get OID for name type '${a}'`);const p=new Wr({type:a});if(c.charAt(0)==="#")p.value.anyValue=R.FromHex(c.slice(1));else{const y=/"(.*?[^\\])?"/.exec(c);y&&(c=y[1]),c=c.replace(/\\0a/ig,`
115
- `).replace(/\\0d/ig,"\r").replace(/\\0g/ig," ").replace(/\\(.)/g,"$1"),a===this.getName("E")||a===this.getName("DC")?p.value.ia5String=c:Pt.isASCII(c)?p.value.printableString=c:p.value.utf8String=c}s==="+"?r[r.length-1].push(p):r.push(new pr([p])),s=d}return r}fromJSON(t){const r=new Ce;for(const i of t){const o=new pr;for(const s in i){let a=s;if(/[\d.]+/.test(s)||(a=this.getName(s)||""),!a)throw new Error(`Cannot get OID for name type '${s}'`);const c=i[s];for(const l of c){const d=new Wr({type:a});if(typeof l=="object")for(const p in l)switch(p){case"ia5String":d.value.ia5String=l[p];break;case"utf8String":d.value.utf8String=l[p];break;case"universalString":d.value.universalString=l[p];break;case"bmpString":d.value.bmpString=l[p];break;case"printableString":d.value.printableString=l[p];break}else l[0]==="#"?d.value.anyValue=R.FromHex(l.slice(1)):a===this.getName("E")||a===this.getName("DC")?d.value.ia5String=l:d.value.printableString=l;o.push(d)}}r.push(o)}return r}toArrayBuffer(){return H.serialize(this.asn)}async getThumbprint(...t){var r;let i,o="SHA-1";return t.length>=1&&!(!((r=t[0])===null||r===void 0)&&r.subtle)?(o=t[0]||o,i=t[1]||We.get()):i=t[0]||We.get(),await i.subtle.digest(o,this.toArrayBuffer())}}const Ku="Cannot initialize GeneralName from ASN.1 data.",zu=`${Ku} Unsupported string format in use.`,Ih=`${Ku} Value doesn't match to GUID regular expression.`,Gu=/^([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})$/i,Wu="1.3.6.1.4.1.311.25.1",Ju="1.3.6.1.4.1.311.20.2.3",da="dns",fa="dn",pa="email",ha="ip",ya="url",ga="guid",ma="upn",Jn="id";class Yu extends Dt{constructor(...t){let r;if(t.length===2)switch(t[0]){case fa:{const i=new Pt(t[1]).toArrayBuffer(),o=H.parse(i,Ce);r=new Q({directoryName:o});break}case da:r=new Q({dNSName:t[1]});break;case pa:r=new Q({rfc822Name:t[1]});break;case ga:{const i=new RegExp(Gu,"i").exec(t[1]);if(!i)throw new Error("Cannot parse GUID value. Value doesn't match to regular expression");const o=i.slice(1).map((s,a)=>a<3?R.ToHex(new Uint8Array(R.FromHex(s)).reverse()):s).join("");r=new Q({otherName:new Jr({typeId:Wu,value:H.serialize(new ie(R.FromHex(o)))})});break}case ha:r=new Q({iPAddress:t[1]});break;case Jn:r=new Q({registeredID:t[1]});break;case ma:{r=new Q({otherName:new Jr({typeId:Ju,value:H.serialize(Wc.toASN(t[1]))})});break}case ya:r=new Q({uniformResourceIdentifier:t[1]});break;default:throw new Error("Cannot create GeneralName. Unsupported type of the name")}else D.isBufferSource(t[0])?r=H.parse(t[0],Q):r=t[0];super(r)}onInit(t){if(t.dNSName!=null)this.type=da,this.value=t.dNSName;else if(t.rfc822Name!=null)this.type=pa,this.value=t.rfc822Name;else if(t.iPAddress!=null)this.type=ha,this.value=t.iPAddress;else if(t.uniformResourceIdentifier!=null)this.type=ya,this.value=t.uniformResourceIdentifier;else if(t.registeredID!=null)this.type=Jn,this.value=t.registeredID;else if(t.directoryName!=null)this.type=fa,this.value=new Pt(t.directoryName).toString();else if(t.otherName!=null)if(t.otherName.typeId===Wu){this.type=ga;const r=H.parse(t.otherName.value,ie),i=new RegExp(Gu,"i").exec(R.ToHex(r));if(!i)throw new Error(Ih);this.value=i.slice(1).map((o,s)=>s<3?R.ToHex(new Uint8Array(R.FromHex(o)).reverse()):o).join("-")}else if(t.otherName.typeId===Ju)this.type=ma,this.value=H.parse(t.otherName.value,Ne).toString();else throw new Error(zu);else throw new Error(zu)}toJSON(){return{type:this.type,value:this.value}}toTextObject(){let t;switch(this.type){case fa:case da:case ga:case ha:case Jn:case ma:case ya:t=this.type.toUpperCase();break;case pa:t="Email";break;default:throw new Error("Unsupported GeneralName type")}let r=this.value;return this.type===Jn&&(r=jt.toString(r)),new ce(t,void 0,r)}}class mi extends Dt{constructor(t){let r;if(t instanceof $e)r=t;else if(Array.isArray(t)){const i=[];for(const o of t)if(o instanceof Q)i.push(o);else{const s=H.parse(new Yu(o.type,o.value).rawData,Q);i.push(s)}r=new $e(i)}else if(D.isBufferSource(t))r=H.parse(t,$e);else throw new Error("Cannot initialize GeneralNames. Incorrect incoming arguments");super(r)}onInit(t){const r=[];for(const i of t){let o=null;try{o=new Yu(i)}catch{continue}r.push(o)}this.items=r}toJSON(){return this.items.map(t=>t.toJSON())}toTextObject(){const t=super.toTextObjectEmpty();for(const r of this.items){const i=r.toTextObject();let o=t[i[ce.NAME]];Array.isArray(o)||(o=[],t[i[ce.NAME]]=o),o.push(i)}return t}}mi.NAME="GeneralNames";const bi="-{5}",wi="\\n",Eh=`[^${wi}]+`,Nh=`${bi}BEGIN (${Eh}(?=${bi}))${bi}`,_h=`${bi}END \\1${bi}`,Vr="\\n",Oh=`[^:${wi}]+`,Th=`(?:[^${wi}]+${Vr}(?: +[^${wi}]+${Vr})*)`,Vh=`(?:[a-zA-Z0-9=+/]+${Vr})+`,Zu=`${Nh}${Vr}(?:((?:${Oh}: ${Th})+))?${Vr}?(${Vh})${_h}`;class Je{static isPem(t){return typeof t=="string"&&new RegExp(Zu,"g").test(t)}static decodeWithHeaders(t){t=t.replace(/\r/g,"");const r=new RegExp(Zu,"g"),i=[];let o=null;for(;o=r.exec(t);){const s=o[3].replace(new RegExp(`[${wi}]+`,"g"),""),a={type:o[1],headers:[],rawData:R.FromBase64(s)},c=o[2];if(c){const l=c.split(new RegExp(Vr,"g"));let d=null;for(const p of l){const[y,A]=p.split(/:(.*)/);if(A===void 0){if(!d)throw new Error("Cannot parse PEM string. Incorrect header value");d.value+=y.trim()}else d&&a.headers.push(d),d={key:y,value:A.trim()}}d&&a.headers.push(d)}i.push(a)}return i}static decode(t){return this.decodeWithHeaders(t).map(i=>i.rawData)}static decodeFirst(t){const r=this.decode(t);if(!r.length)throw new RangeError("PEM string doesn't contain any objects");return r[0]}static encode(t,r){if(Array.isArray(t)){const i=new Array;return r?t.forEach(o=>{if(!D.isBufferSource(o))throw new TypeError("Cannot encode array of BufferSource in PEM format. Not all items of the array are BufferSource");i.push(this.encodeStruct({type:r,rawData:D.toArrayBuffer(o)}))}):t.forEach(o=>{if(!("type"in o))throw new TypeError("Cannot encode array of PemStruct in PEM format. Not all items of the array are PemStrut");i.push(this.encodeStruct(o))}),i.join(`
115
+ `).replace(/\\0d/ig,"\r").replace(/\\0g/ig," ").replace(/\\(.)/g,"$1"),a===this.getName("E")||a===this.getName("DC")?p.value.ia5String=c:Pt.isASCII(c)?p.value.printableString=c:p.value.utf8String=c}s==="+"?r[r.length-1].push(p):r.push(new pr([p])),s=d}return r}fromJSON(t){const r=new Ce;for(const i of t){const o=new pr;for(const s in i){let a=s;if(/[\d.]+/.test(s)||(a=this.getName(s)||""),!a)throw new Error(`Cannot get OID for name type '${s}'`);const c=i[s];for(const l of c){const d=new Wr({type:a});if(typeof l=="object")for(const p in l)switch(p){case"ia5String":d.value.ia5String=l[p];break;case"utf8String":d.value.utf8String=l[p];break;case"universalString":d.value.universalString=l[p];break;case"bmpString":d.value.bmpString=l[p];break;case"printableString":d.value.printableString=l[p];break}else l[0]==="#"?d.value.anyValue=R.FromHex(l.slice(1)):a===this.getName("E")||a===this.getName("DC")?d.value.ia5String=l:d.value.printableString=l;o.push(d)}}r.push(o)}return r}toArrayBuffer(){return H.serialize(this.asn)}async getThumbprint(...t){var r;let i,o="SHA-1";return t.length>=1&&!(!((r=t[0])===null||r===void 0)&&r.subtle)?(o=t[0]||o,i=t[1]||We.get()):i=t[0]||We.get(),await i.subtle.digest(o,this.toArrayBuffer())}}const Ku="Cannot initialize GeneralName from ASN.1 data.",zu=`${Ku} Unsupported string format in use.`,Ih=`${Ku} Value doesn't match to GUID regular expression.`,Gu=/^([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})$/i,Wu="1.3.6.1.4.1.311.25.1",Ju="1.3.6.1.4.1.311.20.2.3",da="dns",fa="dn",pa="email",ha="ip",ya="url",ga="guid",ma="upn",Jn="id";class Yu extends Dt{constructor(...t){let r;if(t.length===2)switch(t[0]){case fa:{const i=new Pt(t[1]).toArrayBuffer(),o=H.parse(i,Ce);r=new Q({directoryName:o});break}case da:r=new Q({dNSName:t[1]});break;case pa:r=new Q({rfc822Name:t[1]});break;case ga:{const i=new RegExp(Gu,"i").exec(t[1]);if(!i)throw new Error("Cannot parse GUID value. Value doesn't match to regular expression");const o=i.slice(1).map((s,a)=>a<3?R.ToHex(new Uint8Array(R.FromHex(s)).reverse()):s).join("");r=new Q({otherName:new Jr({typeId:Wu,value:H.serialize(new ie(R.FromHex(o)))})});break}case ha:r=new Q({iPAddress:t[1]});break;case Jn:r=new Q({registeredID:t[1]});break;case ma:{r=new Q({otherName:new Jr({typeId:Ju,value:H.serialize(Wc.toASN(t[1]))})});break}case ya:r=new Q({uniformResourceIdentifier:t[1]});break;default:throw new Error("Cannot create GeneralName. Unsupported type of the name")}else D.isBufferSource(t[0])?r=H.parse(t[0],Q):r=t[0];super(r)}onInit(t){if(t.dNSName!=null)this.type=da,this.value=t.dNSName;else if(t.rfc822Name!=null)this.type=pa,this.value=t.rfc822Name;else if(t.iPAddress!=null)this.type=ha,this.value=t.iPAddress;else if(t.uniformResourceIdentifier!=null)this.type=ya,this.value=t.uniformResourceIdentifier;else if(t.registeredID!=null)this.type=Jn,this.value=t.registeredID;else if(t.directoryName!=null)this.type=fa,this.value=new Pt(t.directoryName).toString();else if(t.otherName!=null)if(t.otherName.typeId===Wu){this.type=ga;const r=H.parse(t.otherName.value,ie),i=new RegExp(Gu,"i").exec(R.ToHex(r));if(!i)throw new Error(Ih);this.value=i.slice(1).map((o,s)=>s<3?R.ToHex(new Uint8Array(R.FromHex(o)).reverse()):o).join("-")}else if(t.otherName.typeId===Ju)this.type=ma,this.value=H.parse(t.otherName.value,Ee).toString();else throw new Error(zu);else throw new Error(zu)}toJSON(){return{type:this.type,value:this.value}}toTextObject(){let t;switch(this.type){case fa:case da:case ga:case ha:case Jn:case ma:case ya:t=this.type.toUpperCase();break;case pa:t="Email";break;default:throw new Error("Unsupported GeneralName type")}let r=this.value;return this.type===Jn&&(r=jt.toString(r)),new ce(t,void 0,r)}}class mi extends Dt{constructor(t){let r;if(t instanceof $e)r=t;else if(Array.isArray(t)){const i=[];for(const o of t)if(o instanceof Q)i.push(o);else{const s=H.parse(new Yu(o.type,o.value).rawData,Q);i.push(s)}r=new $e(i)}else if(D.isBufferSource(t))r=H.parse(t,$e);else throw new Error("Cannot initialize GeneralNames. Incorrect incoming arguments");super(r)}onInit(t){const r=[];for(const i of t){let o=null;try{o=new Yu(i)}catch{continue}r.push(o)}this.items=r}toJSON(){return this.items.map(t=>t.toJSON())}toTextObject(){const t=super.toTextObjectEmpty();for(const r of this.items){const i=r.toTextObject();let o=t[i[ce.NAME]];Array.isArray(o)||(o=[],t[i[ce.NAME]]=o),o.push(i)}return t}}mi.NAME="GeneralNames";const bi="-{5}",wi="\\n",Eh=`[^${wi}]+`,Nh=`${bi}BEGIN (${Eh}(?=${bi}))${bi}`,_h=`${bi}END \\1${bi}`,Vr="\\n",Oh=`[^:${wi}]+`,Th=`(?:[^${wi}]+${Vr}(?: +[^${wi}]+${Vr})*)`,Vh=`(?:[a-zA-Z0-9=+/]+${Vr})+`,Zu=`${Nh}${Vr}(?:((?:${Oh}: ${Th})+))?${Vr}?(${Vh})${_h}`;class Je{static isPem(t){return typeof t=="string"&&new RegExp(Zu,"g").test(t)}static decodeWithHeaders(t){t=t.replace(/\r/g,"");const r=new RegExp(Zu,"g"),i=[];let o=null;for(;o=r.exec(t);){const s=o[3].replace(new RegExp(`[${wi}]+`,"g"),""),a={type:o[1],headers:[],rawData:R.FromBase64(s)},c=o[2];if(c){const l=c.split(new RegExp(Vr,"g"));let d=null;for(const p of l){const[y,A]=p.split(/:(.*)/);if(A===void 0){if(!d)throw new Error("Cannot parse PEM string. Incorrect header value");d.value+=y.trim()}else d&&a.headers.push(d),d={key:y,value:A.trim()}}d&&a.headers.push(d)}i.push(a)}return i}static decode(t){return this.decodeWithHeaders(t).map(i=>i.rawData)}static decodeFirst(t){const r=this.decode(t);if(!r.length)throw new RangeError("PEM string doesn't contain any objects");return r[0]}static encode(t,r){if(Array.isArray(t)){const i=new Array;return r?t.forEach(o=>{if(!D.isBufferSource(o))throw new TypeError("Cannot encode array of BufferSource in PEM format. Not all items of the array are BufferSource");i.push(this.encodeStruct({type:r,rawData:D.toArrayBuffer(o)}))}):t.forEach(o=>{if(!("type"in o))throw new TypeError("Cannot encode array of PemStruct in PEM format. Not all items of the array are PemStrut");i.push(this.encodeStruct(o))}),i.join(`
116
116
  `)}else{if(!r)throw new Error("Required argument 'tag' is missed");return this.encodeStruct({type:r,rawData:D.toArrayBuffer(t)})}}static encodeStruct(t){var r;const i=t.type.toLocaleUpperCase(),o=[];if(o.push(`-----BEGIN ${i}-----`),!((r=t.headers)===null||r===void 0)&&r.length){for(const d of t.headers)o.push(`${d.key}: ${d.value}`);o.push("")}const s=R.ToBase64(t.rawData);let a,c=0;const l=Array();for(;c<s.length&&(s.length-c<64?a=s.substring(c):(a=s.substring(c,c+64),c+=64),a.length!==0);)if(l.push(a),a.length<64)break;return o.push(...l),o.push(`-----END ${i}-----`),o.join(`
117
- `)}}Je.CertificateTag="CERTIFICATE",Je.CrlTag="CRL",Je.CertificateRequestTag="CERTIFICATE REQUEST",Je.PublicKeyTag="PUBLIC KEY",Je.PrivateKeyTag="PRIVATE KEY";class It extends Dt{static isAsnEncoded(t){return D.isBufferSource(t)||typeof t=="string"}static toArrayBuffer(t){if(typeof t=="string"){if(Je.isPem(t))return Je.decode(t)[0];if(R.isHex(t))return R.FromHex(t);if(R.isBase64(t))return R.FromBase64(t);if(R.isBase64Url(t))return R.FromBase64Url(t);throw new TypeError("Unsupported format of 'raw' argument. Must be one of DER, PEM, HEX, Base64, or Base4Url")}else{const r=R.ToBinary(t);return Je.isPem(r)?Je.decode(r)[0]:R.isHex(r)?R.FromHex(r):R.isBase64(r)?R.FromBase64(r):R.isBase64Url(r)?R.FromBase64Url(r):D.toArrayBuffer(t)}}constructor(...t){It.isAsnEncoded(t[0])?super(It.toArrayBuffer(t[0]),t[1]):super(t[0])}toString(t="pem"){switch(t){case"pem":return Je.encode(this.rawData,this.tag);default:return super.toString(t)}}}class or extends It{constructor(t){It.isAsnEncoded(t)?super(t,St):super(t),this.tag=Je.PublicKeyTag}async export(...t){let r,i=["verify"],o={hash:"SHA-256",...this.algorithm};return t.length>1?(o=t[0]||o,i=t[1]||i,r=t[2]||We.get()):r=t[0]||We.get(),r.subtle.importKey("spki",this.rawData,o,!0,i)}onInit(t){const r=Xe.resolve(Gn),i=this.algorithm=r.toWebAlgorithm(t.algorithm);switch(t.algorithm.algorithm){case _r:{const o=H.parse(t.subjectPublicKey,Us),s=D.toUint8Array(o.modulus);i.publicExponent=D.toUint8Array(o.publicExponent),i.modulusLength=(s[0]?s:s.slice(1)).byteLength<<3;break}}}async getThumbprint(...t){var r;let i,o="SHA-1";return t.length>=1&&!(!((r=t[0])===null||r===void 0)&&r.subtle)?(o=t[0]||o,i=t[1]||We.get()):i=t[0]||We.get(),await i.subtle.digest(o,this.rawData)}async getKeyIdentifier(t){t||(t=We.get());const r=H.parse(this.rawData,St);return await t.subtle.digest("SHA-1",r.subjectPublicKey)}toTextObject(){const t=this.toTextObjectEmpty(),r=H.parse(this.rawData,St);switch(t.Algorithm=ir.serializeAlgorithm(r.algorithm),r.algorithm.algorithm){case ui:t["EC Point"]=r.subjectPublicKey;break;case _r:default:t["Raw Data"]=r.subjectPublicKey}return t}}class pt{static register(t,r){this.items.set(t,r)}static create(t){const r=new ft(t),i=this.items.get(r.type);return i?new i(t):r}}pt.items=new Map;const Yn="crypto.signatureFormatter";class jh{toAsnSignature(t,r){return D.toArrayBuffer(r)}toWebSignature(t,r){return D.toArrayBuffer(r)}}class Zn extends It{constructor(t){It.isAsnEncoded(t)?super(t,mr):super(t),this.tag=Je.CertificateTag}onInit(t){const r=t.tbsCertificate;this.tbs=H.serialize(r),this.serialNumber=R.ToHex(r.serialNumber),this.subjectName=new Pt(r.subject),this.subject=new Pt(r.subject).toString(),this.issuerName=new Pt(r.issuer),this.issuer=this.issuerName.toString();const i=Xe.resolve(Gn);this.signatureAlgorithm=i.toWebAlgorithm(t.signatureAlgorithm),this.signature=t.signatureValue;const o=r.validity.notBefore.utcTime||r.validity.notBefore.generalTime;if(!o)throw new Error("Cannot get 'notBefore' value");this.notBefore=o;const s=r.validity.notAfter.utcTime||r.validity.notAfter.generalTime;if(!s)throw new Error("Cannot get 'notAfter' value");this.notAfter=s,this.extensions=[],r.extensions&&(this.extensions=r.extensions.map(a=>pt.create(H.serialize(a)))),this.publicKey=new or(r.subjectPublicKeyInfo)}getExtension(t){for(const r of this.extensions)if(typeof t=="string"){if(r.type===t)return r}else if(r instanceof t)return r;return null}getExtensions(t){return this.extensions.filter(r=>typeof t=="string"?r.type===t:r instanceof t)}async verify(t={},r=We.get()){let i,o;const s=t.publicKey;try{if(!s)i={...this.publicKey.algorithm,...this.signatureAlgorithm},o=await this.publicKey.export(i,["verify"],r);else if("publicKey"in s)i={...s.publicKey.algorithm,...this.signatureAlgorithm},o=await s.publicKey.export(i,["verify"],r);else if(s instanceof or)i={...s.algorithm,...this.signatureAlgorithm},o=await s.export(i,["verify"],r);else if(D.isBufferSource(s)){const d=new or(s);i={...d.algorithm,...this.signatureAlgorithm},o=await d.export(i,["verify"],r)}else i={...s.algorithm,...this.signatureAlgorithm},o=s}catch{return!1}const a=Xe.resolveAll(Yn).reverse();let c=null;for(const d of a)if(c=d.toWebSignature(i,this.signature),c)break;if(!c)throw Error("Cannot convert ASN.1 signature value to WebCrypto format");const l=await r.subtle.verify(this.signatureAlgorithm,o,c,this.tbs);if(t.signatureOnly)return l;{const p=(t.date||new Date).getTime();return l&&this.notBefore.getTime()<p&&p<this.notAfter.getTime()}}async getThumbprint(...t){let r,i="SHA-1";return t[0]&&(t[0].subtle?r=t[0]:(i=t[0]||i,r=t[1])),r??(r=We.get()),await r.subtle.digest(i,this.rawData)}async isSelfSigned(t=We.get()){return this.subject===this.issuer&&await this.verify({signatureOnly:!0},t)}toTextObject(){const t=this.toTextObjectEmpty(),r=H.parse(this.rawData,mr),i=r.tbsCertificate,o=new ce("",{Version:`${gr[i.version]} (${i.version})`,"Serial Number":i.serialNumber,"Signature Algorithm":ir.serializeAlgorithm(i.signature),Issuer:this.issuer,Validity:new ce("",{"Not Before":i.validity.notBefore.getTime(),"Not After":i.validity.notAfter.getTime()}),Subject:this.subject,"Subject Public Key Info":this.publicKey});if(i.issuerUniqueID&&(o["Issuer Unique ID"]=i.issuerUniqueID),i.subjectUniqueID&&(o["Subject Unique ID"]=i.subjectUniqueID),this.extensions.length){const s=new ce("");for(const a of this.extensions){const c=a.toTextObject();s[c[ce.NAME]]=c}o.Extensions=s}return t.Data=o,t.Signature=new ce("",{Algorithm:ir.serializeAlgorithm(r.signatureAlgorithm),"":r.signatureValue}),t}}Zn.NAME="Certificate";class vi extends ft{static async create(t,r=!1,i=We.get()){if(t instanceof Zn||nr.isCryptoKey(t)){const o=t instanceof Zn?await t.publicKey.export(i):t,s=await i.subtle.exportKey("spki",o),c=await new or(s).getKeyIdentifier(i);return new vi(R.ToHex(c),r)}else return new vi(t,r)}constructor(...t){if(D.isBufferSource(t[0]))super(t[0]);else if(typeof t[0]=="string"){const r=new Yt({keyIdentifier:new Do(R.FromHex(t[0]))});super(jo,t[1],H.serialize(r))}else{const r=t[0],i=r.name instanceof mi?H.parse(r.name.rawData,$e):r.name,o=new Yt({authorityCertIssuer:i,authorityCertSerialNumber:R.FromHex(r.serialNumber)});super(jo,t[1],H.serialize(o))}}onInit(t){super.onInit(t);const r=H.parse(t.extnValue,Yt);r.keyIdentifier&&(this.keyId=R.ToHex(r.keyIdentifier)),r.authorityCertIssuer&&r.authorityCertSerialNumber&&(this.certId={name:r.authorityCertIssuer,serialNumber:R.ToHex(r.authorityCertSerialNumber)})}toTextObject(){const t=this.toTextObjectWithoutValue(),r=H.parse(this.value,Yt);return r.authorityCertIssuer&&(t["Authority Issuer"]=new mi(r.authorityCertIssuer).toTextObject()),r.authorityCertSerialNumber&&(t["Authority Serial Number"]=r.authorityCertSerialNumber),r.keyIdentifier&&(t[""]=r.keyIdentifier),t}}vi.NAME="Authority Key Identifier";class Qu extends ft{constructor(...t){if(D.isBufferSource(t[0])){super(t[0]);const r=H.parse(this.value,Yi);this.ca=r.cA,this.pathLength=r.pathLenConstraint}else{const r=new Yi({cA:t[0],pathLenConstraint:t[1]});super(tl,t[2],H.serialize(r)),this.ca=t[0],this.pathLength=t[1]}}toTextObject(){const t=this.toTextObjectWithoutValue();return this.ca&&(t.CA=this.ca),this.pathLength!==void 0&&(t["Path Length"]=this.pathLength),t}}Qu.NAME="Basic Constraints";var Xu;(function(e){e.serverAuth="1.3.6.1.5.5.7.3.1",e.clientAuth="1.3.6.1.5.5.7.3.2",e.codeSigning="1.3.6.1.5.5.7.3.3",e.emailProtection="1.3.6.1.5.5.7.3.4",e.timeStamping="1.3.6.1.5.5.7.3.8",e.ocspSigning="1.3.6.1.5.5.7.3.9"})(Xu||(Xu={}));class ed extends ft{constructor(...t){if(D.isBufferSource(t[0])){super(t[0]);const r=H.parse(this.value,tn);this.usages=r.map(i=>i)}else{const r=new tn(t[0]);super(al,t[1],H.serialize(r)),this.usages=t[0]}}toTextObject(){const t=this.toTextObjectWithoutValue();return t[""]=this.usages.map(r=>jt.toString(r)).join(", "),t}}ed.NAME="Extended Key Usages";var ba;(function(e){e[e.digitalSignature=1]="digitalSignature",e[e.nonRepudiation=2]="nonRepudiation",e[e.keyEncipherment=4]="keyEncipherment",e[e.dataEncipherment=8]="dataEncipherment",e[e.keyAgreement=16]="keyAgreement",e[e.keyCertSign=32]="keyCertSign",e[e.cRLSign=64]="cRLSign",e[e.encipherOnly=128]="encipherOnly",e[e.decipherOnly=256]="decipherOnly"})(ba||(ba={}));class wa extends ft{constructor(...t){if(D.isBufferSource(t[0])){super(t[0]);const r=H.parse(this.value,Yo);this.usages=r.toNumber()}else{const r=new Yo(t[0]);super(ll,t[1],H.serialize(r)),this.usages=t[0]}}toTextObject(){const t=this.toTextObjectWithoutValue(),r=H.parse(this.value,Yo);return t[""]=r.toJSON().join(", "),t}}wa.NAME="Key Usages";class Qn extends ft{static async create(t,r=!1,i=We.get()){let o;t instanceof or?o=t.rawData:"publicKey"in t?o=t.publicKey.rawData:D.isBufferSource(t)?o=t:o=await i.subtle.exportKey("spki",t);const a=await new or(o).getKeyIdentifier(i);return new Qn(R.ToHex(a),r)}constructor(...t){if(D.isBufferSource(t[0])){super(t[0]);const r=H.parse(this.value,Tt);this.keyId=R.ToHex(r)}else{const r=typeof t[0]=="string"?R.FromHex(t[0]):t[0],i=new Tt(r);super(yl,t[1],H.serialize(i)),this.keyId=R.ToHex(r)}}toTextObject(){const t=this.toTextObjectWithoutValue(),r=H.parse(this.value,Tt);return t[""]=r,t}}Qn.NAME="Subject Key Identifier";class va extends ft{constructor(...t){D.isBufferSource(t[0])?super(t[0]):super(pl,t[1],new mi(t[0]||[]).rawData)}onInit(t){super.onInit(t);const r=H.parse(t.extnValue,ts);this.names=new mi(r)}toTextObject(){const t=this.toTextObjectWithoutValue(),r=this.names.toTextObject();for(const i in r)t[i]=r[i];return t}}va.NAME="Subject Alternative Name";class td extends ft{constructor(...t){var r;if(D.isBufferSource(t[0])){super(t[0]);const i=H.parse(this.value,Xi);this.policies=i.map(o=>o.policyIdentifier)}else{const i=t[0],o=(r=t[1])!==null&&r!==void 0?r:!1,s=new Xi(i.map(a=>new Qi({policyIdentifier:a})));super(il,o,H.serialize(s)),this.policies=i}}toTextObject(){const t=this.toTextObjectWithoutValue();return t.Policy=this.policies.map(r=>new ce("",{},jt.toString(r))),t}}td.NAME="Certificate Policies",pt.register(il,td);class jr extends Dt{constructor(...t){let r;if(D.isBufferSource(t[0]))r=D.toArrayBuffer(t[0]);else{const i=t[0],o=Array.isArray(t[1])?t[1].map(s=>D.toArrayBuffer(s)):[];r=H.serialize(new Ct({type:i,values:o}))}super(r,Ct)}onInit(t){this.type=t.type,this.values=t.values}toTextObject(){const t=this.toTextObjectWithoutValue();return t.Value=this.values.map(r=>new ce("",{"":r})),t}toTextObjectWithoutValue(){const t=this.toTextObjectEmpty();return t[ce.NAME]===jr.NAME&&(t[ce.NAME]=jt.toString(this.type)),t}}jr.NAME="Attribute";class rd extends jr{constructor(...t){var r;if(D.isBufferSource(t[0]))super(t[0]);else{const i=new qn({printableString:t[0]});super(Xl,[H.serialize(i)])}(r=this.password)!==null&&r!==void 0||(this.password="")}onInit(t){if(super.onInit(t),this.values[0]){const r=H.parse(this.values[0],qn);this.password=r.toString()}}toTextObject(){const t=this.toTextObjectWithoutValue();return t[ce.VALUE]=this.password,t}}rd.NAME="Challenge Password";class ka extends jr{constructor(...t){var r;if(D.isBufferSource(t[0]))super(t[0]);else{const i=t[0],o=new Zt;for(const s of i)o.push(H.parse(s.rawData,nt));super(ra,[H.serialize(o)])}(r=this.items)!==null&&r!==void 0||(this.items=[])}onInit(t){if(super.onInit(t),this.values[0]){const r=H.parse(this.values[0],Zt);this.items=r.map(i=>pt.create(H.serialize(i)))}}toTextObject(){const t=this.toTextObjectWithoutValue(),r=this.items.map(i=>i.toTextObject());for(const i of r)t[i[ce.NAME]]=i;return t}}ka.NAME="Extensions";class Xn{static register(t,r){this.items.set(t,r)}static create(t){const r=new jr(t),i=this.items.get(r.type);return i?new i(t):r}}Xn.items=new Map;let Ca=class{toAsnAlgorithm(t){switch(t.name.toLowerCase()){case"rsassa-pkcs1-v1_5":if("hash"in t){let r;if(typeof t.hash=="string")r=t.hash;else if(t.hash&&typeof t.hash=="object"&&"name"in t.hash&&typeof t.hash.name=="string")r=t.hash.name.toUpperCase();else throw new Error("Cannot get hash algorithm name");switch(r.toLowerCase()){case"sha-1":return new L({algorithm:En,parameters:null});case"sha-256":return new L({algorithm:Ps,parameters:null});case"sha-384":return new L({algorithm:Nn,parameters:null});case"sha-512":return new L({algorithm:_n,parameters:null})}}else return new L({algorithm:_r,parameters:null})}return null}toWebAlgorithm(t){switch(t.algorithm){case _r:return{name:"RSASSA-PKCS1-v1_5"};case En:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-1"}};case Ps:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case Nn:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}};case _n:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}}}return null}};Ca=u([zs()],Ca),Xe.registerSingleton(zn,Ca);class et{addPadding(t,r){const i=D.toUint8Array(r),o=new Uint8Array(t);return o.set(i,t-i.length),o}removePadding(t,r=!1){let i=D.toUint8Array(t);for(let o=0;o<i.length;o++)if(i[o]){i=i.slice(o);break}if(r&&i[0]>127){const o=new Uint8Array(i.length+1);return o.set(i,1),o.buffer}return i.buffer}toAsnSignature(t,r){if(t.name==="ECDSA"){const i=t.namedCurve,o=et.namedCurveSize.get(i)||et.defaultNamedCurveSize,s=new In,a=D.toUint8Array(r);return s.r=this.removePadding(a.slice(0,o),!0),s.s=this.removePadding(a.slice(o,o+o),!0),H.serialize(s)}return null}toWebSignature(t,r){if(t.name==="ECDSA"){const i=H.parse(r,In),o=t.namedCurve,s=et.namedCurveSize.get(o)||et.defaultNamedCurveSize,a=this.addPadding(s,this.removePadding(i.r)),c=this.addPadding(s,this.removePadding(i.s));return Yf(a,c)}return null}}et.namedCurveSize=new Map,et.defaultNamedCurveSize=32;const id="1.3.101.110",nd="1.3.101.111",od="1.3.101.112",sd="1.3.101.113";let Sa=class{toAsnAlgorithm(t){let r=null;switch(t.name.toLowerCase()){case"eddsa":switch(t.namedCurve.toLowerCase()){case"ed25519":r=od;break;case"ed448":r=sd;break}break;case"ecdh-es":switch(t.namedCurve.toLowerCase()){case"x25519":r=id;break;case"x448":r=nd;break}}return r?new L({algorithm:r}):null}toWebAlgorithm(t){switch(t.algorithm){case od:return{name:"EdDSA",namedCurve:"Ed25519"};case sd:return{name:"EdDSA",namedCurve:"Ed448"};case id:return{name:"ECDH-ES",namedCurve:"X25519"};case nd:return{name:"ECDH-ES",namedCurve:"X448"}}return null}};Sa=u([zs()],Sa),Xe.registerSingleton(zn,Sa);class Dh extends It{constructor(t){It.isAsnEncoded(t)?super(t,yi):super(t),this.tag=Je.CertificateRequestTag}onInit(t){this.tbs=H.serialize(t.certificationRequestInfo),this.publicKey=new or(t.certificationRequestInfo.subjectPKInfo);const r=Xe.resolve(Gn);this.signatureAlgorithm=r.toWebAlgorithm(t.signatureAlgorithm),this.signature=t.signature,this.attributes=t.certificationRequestInfo.attributes.map(o=>Xn.create(H.serialize(o)));const i=this.getAttribute(ra);this.extensions=[],i instanceof ka&&(this.extensions=i.items),this.subjectName=new Pt(t.certificationRequestInfo.subject),this.subject=this.subjectName.toString()}getAttribute(t){for(const r of this.attributes)if(r.type===t)return r;return null}getAttributes(t){return this.attributes.filter(r=>r.type===t)}getExtension(t){for(const r of this.extensions)if(r.type===t)return r;return null}getExtensions(t){return this.extensions.filter(r=>r.type===t)}async verify(t=We.get()){const r={...this.publicKey.algorithm,...this.signatureAlgorithm},i=await this.publicKey.export(r,["verify"],t),o=Xe.resolveAll(Yn).reverse();let s=null;for(const c of o)if(s=c.toWebSignature(r,this.signature),s)break;if(!s)throw Error("Cannot convert WebCrypto signature value to ASN.1 format");return await t.subtle.verify(this.signatureAlgorithm,i,s,this.tbs)}toTextObject(){const t=this.toTextObjectEmpty(),r=H.parse(this.rawData,yi),i=r.certificationRequestInfo,o=new ce("",{Version:`${gr[i.version]} (${i.version})`,Subject:this.subject,"Subject Public Key Info":this.publicKey});if(this.attributes.length){const s=new ce("");for(const a of this.attributes){const c=a.toTextObject();s[c[ce.NAME]]=c}o.Attributes=s}return t.Data=o,t.Signature=new ce("",{Algorithm:ir.serializeAlgorithm(r.signatureAlgorithm),"":r.signature}),t}}Dh.NAME="PKCS#10 Certificate Request";var ad;(function(e){e[e.unspecified=0]="unspecified",e[e.keyCompromise=1]="keyCompromise",e[e.cACompromise=2]="cACompromise",e[e.affiliationChanged=3]="affiliationChanged",e[e.superseded=4]="superseded",e[e.cessationOfOperation=5]="cessationOfOperation",e[e.certificateHold=6]="certificateHold",e[e.removeFromCRL=8]="removeFromCRL",e[e.privilegeWithdrawn=9]="privilegeWithdrawn",e[e.aACompromise=10]="aACompromise"})(ad||(ad={})),pt.register(tl,Qu),pt.register(al,ed),pt.register(ll,wa),pt.register(yl,Qn),pt.register(jo,vi),pt.register(pl,va),Xn.register(Xl,rd),Xn.register(ra,ka),Xe.registerSingleton(Yn,jh),Xe.registerSingleton(Yn,et),et.namedCurveSize.set("P-256",32),et.namedCurveSize.set("K-256",32),et.namedCurveSize.set("P-384",48),et.namedCurveSize.set("P-521",66);function cd(){return{parseMetaCertificateData:t=>{if(/{vault:\/\/.*}/g.test(t))throw new Error("not a X.509 certificate");const r=new Zn(t),i={subject:r.subjectName.toString(),issuer:r.issuer,notAfter:r.notAfter};for(const o of r.extensions)if(o instanceof va){const s=o.names.toJSON(),c=Object.entries(s).map(l=>({type:l[1].type,value:l[1].value})).reduce((l,d)=>{const p=d.type,y=l[p]??[];return{...l,[p]:[...y,d.value]}},{});for(const l in c)i.subjectAltName=`${l}=${c[l].join(", ")}`}else if(o instanceof wa){const s=Object.values(ba),a=Array(s.length/2).fill(null).reduce((c,l,d)=>{const p=s[s.length/2+d];if(o.usages&p){const y=s[d];c.push(y)}return c},[]);i.keyUsage=a}return i}}}function Ph(){const e=cd(),t=n.ref({}),r=o=>{if(!(o.id in t.value))try{t.value[o.id]=e.parseMetaCertificateData(o.cert)}catch{t.value[o.id]=void 0}return t.value[o.id]};return{certificateDataCache:t,getCertificateData:o=>{const s=r(o);return{schemaIssuer:(s==null?void 0:s.issuer)||"",schemaSubject:(s==null?void 0:s.subject)||"",schemaExpiry:(s==null?void 0:s.notAfter)instanceof Date?s.notAfter.getTime()/1e3:0,schemaSanNames:(s==null?void 0:s.subjectAltName)||"",schemaKeyUsages:(s==null?void 0:s.keyUsage)||[]}}}}const $h={certificates:{title:"Certificates",list:{toolbar_actions:{new_certificate:"New Certificate"},table_headers:{subject:"Subject",expiry:"Expiry",san:"SAN",cert:"Cert",tags:"Tags",issuer:"Issuer",snis:"SNIs"},empty_state:{title:"Configure a New Certificate",description:"Certificates handle SSL/TLS termination for encrypted requests."}},form:{sections:{ssl:{title:"SSL Key Pair",description:"The PEM-encoded public certificate chain and private key of the SSL key pair and the alternate."},general:{title:"General Information",description:"General information will help identify and manage this key."}},fields:{cert:{label:"Cert",tooltip:"PEM-encoded public certificate chain of the SSL key pair. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},key:{label:"Key",tooltip:"PEM-encoded private key of the SSL key pair. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},cert_alt:{label:"Cert Alt",tooltip:"PEM-encoded public certificate chain of the alternate SSL key pair. This should only be set if you have both RSA and ECDSA types of certificate available and would like Kong to prefer serving using ECDSA certs when client advertises support for it. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},key_alt:{label:"Key Alt",tooltip:"PEM-encoded private key of the alternate SSL key pair. This should only be set if you have both RSA and ECDSA types of certificate available and would like Kong to prefer serving using ECDSA certs when client advertises support for it. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}},actions:{create:"New Certificate",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",addSni:"Add to New SNI",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact ID"},delete:{title:"Delete a Certificate",description:"Your organization's original certificate {bolded-text}.",boldedText:"will not be affected",description2:"This action cannot be reversed so make sure to check the certificate usage before deleting."},errors:{general:"Certificates could not be retrieved",delete:"The certificate could not be deleted at this time",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"}},"ca-certificates":{title:"CA Certificates",list:{toolbar_actions:{new_ca_certificate:"New CA Certificate"},table_headers:{issuer:"Issuer",expiry:"Expiry",tags:"Tags"},empty_state:{title:"Configure a New CA Certificate",description:"CA certificates validate client or server certificates."}},form:{sections:{cert:{title:"Public Certificate",description:"The PEM-encoded public certificate of the CA and it’s SHA256 hex digest."},general:{title:"General Information",description:"General information will help identify and manage this key."}},fields:{cert:{label:"Cert",tooltip:"PEM-encoded public certificate of the CA."},cert_digest:{label:"Cert Digest",tooltip:"SHA256 hex digest of the public certificate"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}},actions:{create:"New CA Certificate",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact ID"},delete:{title:"Delete a CA Certificate",description:"Your organization's original certificate {bolded-text}.",boldedText:"will not be affected",description2:"This action cannot be reversed so make sure to check the certificate usage before deleting."},errors:{general:"CA Certificates could not be retrieved",delete:"The CA Certificate could not be deleted at this time",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"}},general:{"key-usages":{KEY_USAGE_TYPE_KEY_CERT_SIGN:"keyCertSign",KEY_USAGE_TYPE_CRL_SIGN:"cRLSign",KEY_USAGE_TYPE_ENCIPHER_ONLY:"encipherOnly",KEY_USAGE_TYPE_DIGITAL_SIGNATURE:"digitalSignature",KEY_USAGE_TYPE_KEY_ENCIPHERMENT:"keyEncipherment",KEY_USAGE_TYPE_DATA_ENCIPHERMENT:"dataEncipherment",KEY_USAGE_TYPE_KEY_AGREEMENT:"keyAgreement",KEY_USAGE_TYPE_CONTENT_COMMITMENT:"nonRepudiation"}}};function Mh(){const e=cr.createI18n("en-us",$h);return{i18n:e,i18nT:cr.i18nTComponent(e)}}const ht={useCertificate:Ph,useI18n:Mh,useX509:cd},ki={list:{konnect:"/api/runtime_groups/{controlPlaneId}/certificates",kongManager:"/{workspace}/certificates"},form:{konnect:{create:"/api/runtime_groups/{controlPlaneId}/certificates",edit:"/api/runtime_groups/{controlPlaneId}/certificates/{id}",validate:"/api/runtime_groups/{controlPlaneId}/v1/schemas/json/certificate/validate"},kongManager:{create:"/{workspace}/certificates",edit:"/{workspace}/certificates/{id}",validate:"/{workspace}/schemas/certificates/validate"}}},Rh={fail:"Failed to copy id to clipboard",success:{prefix:"Successfully",content:" copied to clipboard"}},Uh="Copy to clipboard",Lh={message:Rh,iconTitle:Uh},Hh="kong-ui-copy-uuid-notify",ld="24px",Fh=(e,t)=>{const r=e.__vccOpts||e;for(const[i,o]of t)r[i]=o;return r},qh=e=>(n.pushScopeId("data-v-243f8fec"),e=e(),n.popScopeId(),e),Kh=["aria-hidden"],zh={key:0,"data-testid":"kui-icon-svg-title"},Gh=qh(()=>n.createElementVNode("path",{d:"M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",fill:"currentColor"},null,-1)),Wh=n.defineComponent({__name:"CopyIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:ld,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const t=String(e).replace(/px/gi,""),r=Number(t);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const t=e,r=n.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const o=String(t.size).replace(/px/gi,""),s=Number(o);if(s&&!isNaN(s)&&Number.isInteger(s)&&s>0)return`${s}px`}return ld}),i=n.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:r.value,lineHeight:"0",width:r.value}));return(o,s)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon copy-icon","data-testid":"kui-icon-wrapper-copy-icon",style:n.normalizeStyle(i.value)},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-copy-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(n.openBlock(),n.createElementBlock("title",zh,n.toDisplayString(e.title),1)):n.createCommentVNode("",!0),Gh],8,Kh))]),_:1},8,["aria-hidden","style"]))}}),Jh=Fh(Wh,[["__scopeId","data-v-243f8fec"]]),Yh="16px",Zh={class:"kong-ui-copy-uuid"},Qh=["onClick"],ud=15,Xh=n.defineComponent({__name:"CopyUuid",props:{uuid:{type:String,required:!0},idTooltip:{type:String,default:""},truncated:{type:Boolean,default:!0},useMono:{type:Boolean,default:!0},notify:{type:Function,default:void 0},iconColor:{type:String,default:"rgba(0, 0, 0, 0.45)"},tooltip:{type:String,default:""},successTooltip:{type:String,default:""},format:{type:String,required:!1,default:"uuid",validator:e=>["uuid","hidden","redacted","deleted"].includes(e)}},emits:["success","error"],setup(e,{emit:t}){const r=e,{t:i}=cr.createI18n("en-us",Lh),o=r.notify||n.inject(Hh,()=>{}),s=n.computed(()=>r.idTooltip?{label:r.idTooltip,positionFixed:!0,placement:"bottomStart"}:{title:r.uuid}),a=n.computed(()=>!!(r.tooltip&&r.successTooltip)),c=n.ref(r.tooltip),l=n.computed(()=>r.tooltip?{label:c.value,positionFixed:!0,maxWidth:"500px",placement:"bottomStart"}:{}),d=n.computed(()=>{var A;return r.format==="redacted"?"*****":r.format==="deleted"?`*${(A=r.uuid)==null?void 0:A.substring(0,5)}`:r.uuid}),p=A=>{c.value=A,setTimeout(()=>{c.value=r.tooltip},1800)},y=A=>{var C,h;if(!A(r.uuid)){typeof o=="function"&&o({type:"error",message:i("message.fail")}),a.value?p(i("message.fail")):t("error",r.uuid);return}const g=((C=r.uuid)==null?void 0:C.length)>ud,m=r.format==="hidden"||r.format==="redacted"?i("message.success.prefix"):`"${((h=r.uuid)==null?void 0:h.substring(0,ud))+(g?"...":"")}"`;typeof o=="function"&&o({type:"success",message:`${m}${i("message.success.content")}`}),a.value?p(r.successTooltip):t("success",r.uuid)};return(A,C)=>{const h=n.resolveComponent("KClipboardProvider");return n.openBlock(),n.createElementBlock("div",Zh,[e.format!=="hidden"?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.idTooltip?"KTooltip":"div"),n.mergeProps({key:0},s.value,{"data-testid":"copy-id"}),{default:n.withCtx(()=>[n.createElementVNode("div",{class:n.normalizeClass(["uuid-container",e.truncated?"truncated-uuid":null,e.useMono?"mono":null])},n.toDisplayString(d.value),3)]),_:1},16)):n.createCommentVNode("",!0),(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.tooltip?"KTooltip":"div"),n.mergeProps(l.value,{class:"uuid-icon-wrapper"}),{default:n.withCtx(()=>[n.createVNode(h,null,{default:n.withCtx(({copyToClipboard:g})=>[n.createElementVNode("span",{"data-testid":"copy-to-clipboard",role:"button",tabindex:"0",onClick:n.withModifiers(m=>y(g),["stop"])},[n.createVNode(n.unref(Jh),{class:"uuid-icon",color:e.iconColor,decorative:!!e.tooltip,size:n.unref(Yh),title:n.unref(i)("iconTitle")},null,8,["color","decorative","size","title"])],8,Qh)]),_:1})]),_:1},16))])}}}),ey=(e,t)=>{const r=e.__vccOpts||e;for(const[i,o]of t)r[i]=o;return r},ty=ey(Xh,[["__scopeId","data-v-0c07874b"]]);var xa=(e=>(e.GatewayService="service",e.Route="route",e.Consumer="consumer",e.ConsumerGroup="consumer group",e.Plugin="plugin",e.Upstream="upstream",e.Certificate="certificate",e.CACertificate="ca certificate",e.SNI="SNI",e.Key="key",e.KeySet="key set",e.Vault="vault",e.Application="application",e.Developer="developer",e.acls="ACL Credential",e["basic-auth"]="Basic Auth Credential",e["key-auth"]="Key Auth Credential",e["key-auth-enc"]="Key Auth Encrypted Credential",e.oauth2="OAuth 2.0 Credential",e["hmac-auth"]="HMAC Credential",e.jwt="JWT Credential",e.Target="target",e.Policy="policy",e))(xa||{}),sr=(e=>(e.Edit="edit",e.Create="create",e))(sr||{}),$t=(e=>(e[e.Loading=0]="Loading",e[e.Idle=1]="Idle",e[e.NoResults=2]="NoResults",e[e.Error=3]="Error",e))($t||{}),ne=(e=>(e.ID="id",e.IdArray="id-array",e.Text="plain-text",e.Date="date",e.Redacted="redacted",e.RedactedArray="redacted-array",e.Json="json",e.JsonArray="json-array",e.BadgeTag="badge-tag",e.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e))(ne||{}),ue=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e))(ue||{});function Aa(e={}){return{axiosInstance:qf.create({withCredentials:!0,timeout:3e4,...e})}}function ry(){return{debounce:(e,t)=>{let r;return(...i)=>{clearTimeout(r),r=window==null?void 0:window.setTimeout(()=>{e(...i)},t)}}}}const Ba="khcp-user-table-preferences",iy={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function ny(){const e=r=>{if(typeof r=="string")try{return JSON.parse(r)}catch(i){console.error("useTablePreferences(tryParseJson)",i);return}},t=()=>{const r=e(localStorage.getItem(Ba));return!r||!Object.keys(r).length?new Map:new Map(Object.entries(r))};return{setTablePreferences:(r,i)=>{try{const o=t();o.set(r,i),localStorage.setItem(Ba,JSON.stringify(Object.fromEntries(o.entries())))}catch(o){console.error("useTablePreferences(setTablePreferences)",o)}},getTablePreferences:r=>{const i=t();return(i==null?void 0:i.get(r))||void 0||iy},deleteAllTablePreferences:()=>{localStorage.removeItem(Ba)}}}const oy={actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},sy={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},ay={actions:{save:"Save",cancel:"Cancel",back:"Back"},errors:{edit:"The entity could not be edited at this time."}},cy={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},ly={title:"Configuration",actions:{copy:"Copy JSON"},sections:{advanced:"Advanced",plugin:"Plugin Specific Configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last Updated",created_at_label:"Created",tags_label:"Tags",link:"Link"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}",structuredFormat:"Structured"}},uy={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},dy={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},fy={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},py={enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}},hy={global:oy,deleteModal:sy,baseForm:ay,baseTable:cy,baseConfigCard:ly,filter:uy,debouncedFilter:dy,errors:fy,toggleModal:py};function Ia(){const e=cr.createI18n("en-us",hy);return{i18n:e,i18nT:cr.i18nTComponent(e)}}function dd(){const e=(r,i)=>(i==null?void 0:i[r])??void 0,t=(r,i)=>{if(r.length!==i.length)return!1;const o=new Set([...r,...i]);for(const s of o){const a=r.filter(l=>l===s).length,c=i.filter(l=>l===s).length;if(a!==c)return!1}return!0};return{getPropValue:e,objectsAreEqual:(r,i,o)=>{if(o){if(Object.keys(r).length===Object.keys(i).length)for(const s in r)if(Array.isArray(r[s])&&Array.isArray(i[s])){if(t(r[s],i[s]))continue;return!1}else{if(r[s]===i[s])continue;return!1}else return!1;return!0}try{return JSON.stringify(r)===JSON.stringify(i)}catch{return!1}},sortAlpha:r=>(i,o)=>{let s=i[r]===void 0||i[r]===null?"":i[r],a=o[r]===void 0||o[r]===null?"":o[r];return Array.isArray(i[r])&&(s=i[r][0]),Array.isArray(o[r])&&(a=o[r][0]),s.localeCompare(a)},isValidUuid:r=>r?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(r):!1}}function yy(e,t,r,i={fetchedItemsKey:"data",searchKeys:["id"]}){r||(r="100");const{axiosInstance:o}=Aa({headers:e.requestHeaders}),{i18n:{t:s}}=Ia(),{debounce:a}=ry(),c=a(async x=>{await w(x)},200),l=n.ref(!1),d=n.ref(""),p=n.ref(""),y=n.ref([]),A=n.ref([]),C=n.ref(void 0),h=n.unref(t);let g=`${e.apiBaseUrl}${h}`;e.app==="konnect"?g=g.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"&&(g=g.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:""));const{isValidUuid:m}=dd(),v=async()=>{try{l.value=!0;const{data:x}=await o.get(`${g}?size=${r}`);x!=null&&x.next||(C.value=i.fetchedItemsKey in x?x[i.fetchedItemsKey]:[]),A.value=i.fetchedItemsKey in x?x[i.fetchedItemsKey]:[],y.value=A.value}catch{y.value=[],d.value=s("debouncedFilter.errors.fetch")}finally{l.value=!1}},b=n.ref(""),w=async x=>{var F,Z,I;if(b.value!==x)if(b.value=x||"",C.value===void 0)try{if(l.value=!0,d.value="",p.value="",e.app==="konnect"){let E=g+"";x&&(E+=`/${x}`);const{data:M}=await o.get(`${E}?size=${r}`);i.fetchedItemsKey in M?y.value=M[i.fetchedItemsKey]:M!=null&&M.id?y.value=[M]:y.value=[]}else if(x){const E=[];m(x)&&i.searchKeys.includes("id")?E.push((async()=>{const{data:U}=await o.get(`${g}/${x}`);return[U[i.fetchedItemsKey]??U]})()):E.push(...i.searchKeys.filter(U=>U!=="id").map(async U=>{const{data:P}=await o.get(`${g}?${U}=${x}`);return P[i.fetchedItemsKey]}));const M=await Promise.all(E),q=new Set;y.value=[],(F=M==null?void 0:M.forEach)==null||F.call(M,U=>{var P;(P=U==null?void 0:U.forEach)==null||P.call(U,V=>{q.has(V.id)||(q.add(V.id),y.value.push(V))})})}else y.value=A.value}catch(E){((Z=E==null?void 0:E.response)==null?void 0:Z.status)===404?p.value=s("debouncedFilter.errors.invalid"):(y.value=[],d.value=s("debouncedFilter.errors.fetch"))}finally{l.value=!1}else l.value=!0,p.value="",x?(y.value=(I=C.value)==null?void 0:I.filter(E=>{var M;let q=!1;for(const U of i.searchKeys){const P=typeof E[U]=="string"?(M=E[U])==null?void 0:M.toLowerCase():E[U];P!=null&&P.includes(x.toLowerCase())&&(q=!0)}return q}),(!y.value||!y.value.length)&&(p.value=s("debouncedFilter.errors.invalid"))):y.value=C.value,l.value=!1};return{loading:l,error:d,validationError:p,results:y,allRecords:C,loadItems:v,debouncedQueryChange:c}}function gy(e,t){const r=n.unref(t),i=n.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${r}`):new URL(r));return i.value.search="",o=>`${i.value.href}/${o}`}function my(){const{i18n:{t:e}}=Ia();return{getMessageFromError:t=>{var r,i,o;if(!t)return e("errors.unexpected");if((r=t==null?void 0:t.response)!=null&&r.data){if(t.response.data.detail)return t.response.data.detail;if((i=t.response.data.details)!=null&&i.length)return t.response.data.details.map(s=>{let a=e("errors.unexpected");return s.messages&&typeof s.messages=="object"&&s.messages.length&&(a=s.messages.join(", ")),s.field?`${s.field} - ${a}`:a}).join("; ");if(t.response.data.message){const{message:s}=t.response.data;return Array.isArray(s)?(o=s[0])!=null&&o.constraints?Object.values(s[0].constraints)[0]:s[0]:s}if(typeof t.response.data=="string")return t.response.data;if(typeof t.response.data=="object")return Object.keys(t.response.data).map(s=>`${s} ${t.response.data[s]}`).join(", ")}return t.message||e("errors.unexpected")}}}function by(e){const t=window.location.origin,r=t.endsWith("/")?t:`${t}/`;try{const i=e.join("/"),o=`${r}${i}`,s=e.some(a=>a.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(o)&&!s&&new URL(o))return`${r}${i}`;throw new Error("Invalid url")}catch(i){return console.warn("Failed to build valid URL:",i),""}}function fd(e,t){const r=n.ref(n.unref(e)),i=n.ref(n.unref(t)),o=n.computed(()=>!!(r.value.app==="konnect"||r.value.isExactMatch)),s=n.computed(()=>i.value.startsWith("/")?new URL(`${window.location.origin}${i.value}`):new URL(i.value));return a=>{const{page:c,pageSize:l,offset:d,sortColumnKey:p,sortColumnOrder:y,query:A}=a;try{let C=new URL(s.value.href);return o.value&&A?(C.search="",C=new URL(`${C.href}?filter[name][contains]=${A}`)):(o.value||new URLSearchParams(A).forEach((h,g)=>{C.searchParams.append(g,h)}),p&&C.searchParams.append("sort_by",p),y==="desc"&&C.searchParams.append("sort_desc","1"),C.searchParams.append("size",String(l))),d&&c!==1&&C.searchParams.append("offset",String(d)),C.href}catch(C){return console.error("RouteList(fetcher)",C),i.value}}}function wy(e,t,r="data"){const i=n.unref(t),{axiosInstance:o}=Aa({headers:e.requestHeaders}),s=fd(e,i),a=n.ref({status:$t.Idle});return{fetcher:async c=>{try{a.value={status:$t.Loading};const l=s(c),{data:d}=await o.get(l),p=r&&r.replace(/[^\w-_]/gi,"");let y;d[p]&&Array.isArray(d[p])?y=d[p]:Array.isArray(d)?y=d:y=Object.keys(d).length?[d]:[];const A={data:y,total:y.length,...d.offset?{pagination:{offset:d.offset}}:null};return a.value={status:$t.Idle,response:A},A}catch(l){const d={data:[],total:0};return c.query&&l.response.status===404?(a.value={status:$t.NoResults,response:d,error:l},d):(a.value={status:$t.Error,response:d,error:l},d)}},fetcherState:a}}function vy(){const e=(r,i="_")=>r?r.split(i).map(o=>o.toLowerCase()==="id"?o.toUpperCase():o.charAt(0).toUpperCase()+o.substring(1)).join(" "):"",t=/(?:^|[\s-:'"])\w/g;return{capitalize:r=>r?r.replace(t,i=>i.toUpperCase()):"",convertKeyToTitle:e}}const pd=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,hd=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(pd);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},yd=e=>e==="*"||e==="x"||e==="X",gd=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},ky=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],Cy=(e,t)=>{if(yd(e)||yd(t))return 0;const[r,i]=ky(gd(e),gd(t));return r>i?1:r<i?-1:0},md=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const i=Cy(e[r]||"0",t[r]||"0");if(i!==0)return i}return 0},Sy=(e,t)=>{const r=hd(e),i=hd(t),o=r.pop(),s=i.pop(),a=md(r,i);return a!==0?a:o&&s?md(o.split("."),s.split(".")):o||s?o?-1:1:0},bd=(e,t,r)=>{xy(r);const i=Sy(e,t);return wd[r].includes(i)},wd={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},vd=Object.keys(wd),xy=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(vd.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${vd.join("|")}`)},Ay=e=>typeof e=="string"&&/^[v\d]/.test(e)&&pd.test(e);function By(e){const{gatewayInfo:t,supportedRange:r}=e;if(!t)return!0;const{edition:i,version:o}=t;if(!Ay(o))return console.error("Invalid version"),!1;const s=r[i];if(!s)return!1;const[a,c]=s;return!(a&&bd(o,a,"<")||c&&bd(o,c,">"))}function Iy(e){const t=n.ref(0),r=n.ref(0),i=n.ref(!1);return n.watch(e,o=>{o&&!i.value&&(t.value=o.offsetWidth,r.value=o.scrollWidth,i.value=!0)}),{isTruncated:n.computed(()=>t.value<r.value)}}const Ie={useAxios:Aa,useDebouncedFilter:yy,useDeleteUrlBuilder:gy,useErrors:my,useExternalLinkCreator:by,useFetcher:wy,useFetchUrlBuilder:fd,useHelpers:dd,useStringHelpers:vy,useI18n:Ia,useGatewayFeatureSupported:By,useTruncationDetector:Iy},Ey={fail:"Failed to copy id to clipboard",success:{prefix:"Successfully",content:" copied to clipboard"}},Ny="Copy to clipboard",_y={message:Ey,iconTitle:Ny},Oy="kong-ui-copy-uuid-notify",kd="24px",Ty=(e,t)=>{const r=e.__vccOpts||e;for(const[i,o]of t)r[i]=o;return r},Vy=e=>(n.pushScopeId("data-v-243f8fec"),e=e(),n.popScopeId(),e),jy=["aria-hidden"],Dy={key:0,"data-testid":"kui-icon-svg-title"},Py=Vy(()=>n.createElementVNode("path",{d:"M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",fill:"currentColor"},null,-1)),$y=n.defineComponent({__name:"CopyIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:kd,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const t=String(e).replace(/px/gi,""),r=Number(t);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const t=e,r=n.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const o=String(t.size).replace(/px/gi,""),s=Number(o);if(s&&!isNaN(s)&&Number.isInteger(s)&&s>0)return`${s}px`}return kd}),i=n.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:r.value,lineHeight:"0",width:r.value}));return(o,s)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon copy-icon","data-testid":"kui-icon-wrapper-copy-icon",style:n.normalizeStyle(i.value)},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-copy-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(n.openBlock(),n.createElementBlock("title",Dy,n.toDisplayString(e.title),1)):n.createCommentVNode("",!0),Py],8,jy))]),_:1},8,["aria-hidden","style"]))}}),My=Ty($y,[["__scopeId","data-v-243f8fec"]]),Ry="16px",Uy={class:"kong-ui-copy-uuid"},Ly=["onClick"],Cd=15,Hy=n.defineComponent({__name:"CopyUuid",props:{uuid:{type:String,required:!0},idTooltip:{type:String,default:""},truncated:{type:Boolean,default:!0},useMono:{type:Boolean,default:!0},notify:{type:Function,default:void 0},iconColor:{type:String,default:"rgba(0, 0, 0, 0.45)"},tooltip:{type:String,default:""},successTooltip:{type:String,default:""},format:{type:String,required:!1,default:"uuid",validator:e=>["uuid","hidden","redacted","deleted"].includes(e)}},emits:["success","error"],setup(e,{emit:t}){const r=e,{t:i}=cr.createI18n("en-us",_y),o=r.notify||n.inject(Oy,()=>{}),s=n.computed(()=>r.idTooltip?{label:r.idTooltip,positionFixed:!0,placement:"bottomStart"}:{title:r.uuid}),a=n.computed(()=>!!(r.tooltip&&r.successTooltip)),c=n.ref(r.tooltip),l=n.computed(()=>r.tooltip?{label:c.value,positionFixed:!0,maxWidth:"500px",placement:"bottomStart"}:{}),d=n.computed(()=>{var A;return r.format==="redacted"?"*****":r.format==="deleted"?`*${(A=r.uuid)==null?void 0:A.substring(0,5)}`:r.uuid}),p=A=>{c.value=A,setTimeout(()=>{c.value=r.tooltip},1800)},y=A=>{var C,h;if(!A(r.uuid)){typeof o=="function"&&o({type:"error",message:i("message.fail")}),a.value?p(i("message.fail")):t("error",r.uuid);return}const g=((C=r.uuid)==null?void 0:C.length)>Cd,m=r.format==="hidden"||r.format==="redacted"?i("message.success.prefix"):`"${((h=r.uuid)==null?void 0:h.substring(0,Cd))+(g?"...":"")}"`;typeof o=="function"&&o({type:"success",message:`${m}${i("message.success.content")}`}),a.value?p(r.successTooltip):t("success",r.uuid)};return(A,C)=>{const h=n.resolveComponent("KClipboardProvider");return n.openBlock(),n.createElementBlock("div",Uy,[e.format!=="hidden"?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.idTooltip?"KTooltip":"div"),n.mergeProps({key:0},s.value,{"data-testid":"copy-id"}),{default:n.withCtx(()=>[n.createElementVNode("div",{class:n.normalizeClass(["uuid-container",e.truncated?"truncated-uuid":null,e.useMono?"mono":null])},n.toDisplayString(d.value),3)]),_:1},16)):n.createCommentVNode("",!0),(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.tooltip?"KTooltip":"div"),n.mergeProps(l.value,{class:"uuid-icon-wrapper"}),{default:n.withCtx(()=>[n.createVNode(h,null,{default:n.withCtx(({copyToClipboard:g})=>[n.createElementVNode("span",{"data-testid":"copy-to-clipboard",role:"button",tabindex:"0",onClick:n.withModifiers(m=>y(g),["stop"])},[n.createVNode(n.unref(My),{class:"uuid-icon",color:e.iconColor,decorative:!!e.tooltip,size:n.unref(Ry),title:n.unref(i)("iconTitle")},null,8,["color","decorative","size","title"])],8,Ly)]),_:1})]),_:1},16))])}}}),Fy=(e,t)=>{const r=e.__vccOpts||e;for(const[i,o]of t)r[i]=o;return r},Sd=Fy(Hy,[["__scopeId","data-v-0c07874b"]]),qy={key:0,class:"config-card-fieldset-title"},Ky=n.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(e){const t=e,{i18n:{t:r}}=Ie.useI18n(),{convertKeyToTitle:i}=Ie.useStringHelpers(),o=n.computed(()=>t.item.key??"json-array-item"),s=n.computed(()=>t.item.value??t.item),a=n.computed(()=>{const l=JSON.parse(JSON.stringify(s.value));return t.isArrayItem&&delete l.name,l}),c=n.computed(()=>{var l;return t.isArrayItem?(l=s.value)!=null&&l.name?i(s.value.name,"_"):r("baseConfigCard.general.entryTitle",{index:t.index}):""});return(l,d)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.isArrayItem?"fieldset":"div"),{class:n.normalizeClass(e.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:n.withCtx(()=>[e.isArrayItem?(n.openBlock(),n.createElementBlock("legend",qy,[n.createElementVNode("b",null,n.toDisplayString(c.value),1)])):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(a.value),(p,y)=>(n.openBlock(),n.createBlock(Ci,{key:`${o.value}-property-${y}`,item:{key:p,label:n.unref(i)(p),value:a.value[p]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),st=(e,t)=>{const r=e.__vccOpts||e;for(const[i,o]of t)r[i]=o;return r},xd=st(Ky,[["__scopeId","data-v-68ca83ec"]]),zy=st(n.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(e){const{i18n:{t}}=Ie.useI18n();return(r,i)=>{const o=n.resolveComponent("KButton");return n.openBlock(),n.createElementBlock("div",null,[n.createVNode(o,{appearance:"tertiary",class:"navigation-button",onClick:i[0]||(i[0]=s=>r.$emit("navigation-click",e.item))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.item.value||n.unref(t)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),[["__scopeId","data-v-c96811e5"]]),Gy=n.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(e){const{i18n:{t}}=Ie.useI18n();return(r,i)=>{const o=n.resolveComponent("KBadge");return n.openBlock(),n.createBlock(o,{appearance:e.status?"success":"neutral"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.status?n.unref(t)("baseConfigCard.statusBadge.enabledLabel"):n.unref(t)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),Wy="#0044f4",Jy="#e0e4ea",Yy="#3a3f51",Zy="1px",Qy="20px",Xy={class:"config-card-details-row"},eg=["data-testid"],tg=["data-testid"],rg=["data-testid"],ig=["data-testid"],ng={key:1},og=["data-testid"],sg=["data-testid"],ag=["data-testid"],cg=["data-testid"],lg={name:"ConfigCardItem",components:{CopyUuid:Sd,JsonCardItem:xd,StatusBadge:Gy,InternalLinkItem:zy}},ug=n.defineComponent({...lg,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(e,{emit:t}){const r=e;n.useCssVars(C=>({"23f3018c":d.value?"none":`solid ${n.unref(Zy)} ${n.unref(Jy)}`,"3815ec6d":l.value&&a.value?"block":"flex","1957f153":l.value&&a.value?"100%":r.slim?"50%":"25%","195a372e":l.value&&a.value?"100%":r.slim?"50%":"75%"}));const i=n.useSlots(),{i18n:{t:o,formatUnixTimeStamp:s}}=Ie.useI18n(),a=n.computed(()=>r.item.value!==void 0&&r.item.value!==null&&r.item.value!==""),c=n.computed(()=>!!(r.item.tooltip||i["label-tooltip"])),l=n.computed(()=>r.item.type===ne.Json||r.item.type===ne.JsonArray),d=n.computed(()=>r.item.type===ne.JsonArray),p=n.computed(()=>{switch(r.item.type){case ne.ID:return{tag:"CopyUuid",attrs:{"data-testid":`${r.item.key}-copy-uuid`,"success-tooltip":o("baseConfigCard.copy.success"),tooltip:o("baseConfigCard.copy.tooltip",{label:r.item.label}),truncated:!1,uuid:r.item.value,notify:()=>{}}};case ne.IdArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{"success-tooltip":o("baseConfigCard.copy.success"),tooltip:o("baseConfigCard.copy.tooltip",{label:r.item.label}),truncated:!1,notify:()=>{}}};case ne.Redacted:return{tag:"CopyUuid",attrs:{"data-testid":`${r.item.key}-copy-uuid-redacted`,format:"redacted","success-tooltip":o("baseConfigCard.copy.success"),tooltip:o("baseConfigCard.copy.tooltip",{label:r.item.label}),truncated:!1,uuid:r.item.value,notify:()=>{}}};case ne.RedactedArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{format:"redacted","success-tooltip":o("baseConfigCard.copy.success"),tooltip:o("baseConfigCard.copy.tooltip",{label:r.item.label}),truncated:!1,notify:()=>{}}};case ne.Date:return{tag:"div",attrs:{"data-testid":`${r.item.key}-date`},text:s(r.item.value)};case ne.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${r.item.key}-badge-status`,status:r.item.value}};case ne.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case ne.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case ne.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${r.item.key}-internal-link`,item:r.item,onNavigationClick:C=>{t("navigation-click",C)}}};case ne.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${r.item.key}-external-link`,href:r.item.value},text:r.item.value};case ne.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-content`,item:r.item}};case ne.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-array-content`,item:r.item}};default:return{tag:"div",attrs:{"data-testid":`${r.item.key}-plain-text`},text:r.item.value}}}),y=n.ref(),{isTruncated:A}=Ie.useTruncationDetector(y);return(C,h)=>{const g=n.resolveComponent("KLabel"),m=n.resolveComponent("KBadge"),v=n.resolveComponent("KMethodBadge"),b=n.resolveComponent("KTooltip");return n.openBlock(),n.createElementBlock("div",Xy,[n.createElementVNode("div",{class:"config-card-details-label","data-testid":`${e.item.key}-label`},[n.renderSlot(C.$slots,"label",{item:e.item},()=>[n.createVNode(g,{"tooltip-attributes":{maxWidth:"500px"}},n.createSlots({default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.item.label)+" ",1)]),_:2},[c.value?{name:"tooltip",fn:n.withCtx(()=>[n.createElementVNode("div",{"data-testid":`${e.item.key}-label-tooltip`},[n.renderSlot(C.$slots,"label-tooltip",{},()=>[n.createTextVNode(n.toDisplayString(e.item.tooltip),1)],!0)],8,tg)]),key:"0"}:void 0]),1024)],!0)],8,eg),n.createElementVNode("div",{class:"config-card-details-value","data-testid":`${e.item.key}-property-value`},[n.renderSlot(C.$slots,e.item.key,{rowValue:e.item.value},()=>[a.value?(n.openBlock(),n.createElementBlock("div",ng,[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(p.value.tag),n.normalizeProps(n.guardReactiveProps(p.value.attrs)),{default:n.withCtx(()=>[p.value.additionalComponent==="KBadge"?(n.openBlock(),n.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-badge-tags`},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.item.value,(w,x)=>(n.openBlock(),n.createBlock(m,{key:`${e.item.key}-badge-tag-${x}`,class:"config-badge","data-testid":`${e.item.key}-badge-tag-${x}`,"truncation-tooltip":w},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(w),1)]),_:2},1032,["data-testid","truncation-tooltip"]))),128))],8,og)):n.createCommentVNode("",!0),p.value.additionalComponent==="CopyUuid"?(n.openBlock(),n.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${e.item.key}-copy-uuid-array`},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.item.value,(w,x)=>(n.openBlock(),n.createBlock(n.unref(Sd),n.mergeProps(p.value.childAttrs,{key:`${e.item.key}-copy-uuid-${x}`,"data-testid":`${e.item.key}-copy-uuid-${x}`,uuid:w}),null,16,["data-testid","uuid"]))),128))],8,sg)):p.value.additionalComponent==="KMethodBadge"?(n.openBlock(),n.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${e.item.key}-badge-methods`},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.item.value,(w,x)=>(n.openBlock(),n.createBlock(v,{key:`${e.item.key}-badge-method-${x}`,class:"config-badge","data-testid":`${e.item.key}-badge-method-${x}`,"is-rounded":"",label:w,method:n.unref(Kf.MethodsArray).includes(w.toLowerCase())?w.toLowerCase():"custom"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(w),1)]),_:2},1032,["data-testid","label","method"]))),128))],8,ag)):n.createCommentVNode("",!0),p.value.additionalComponent==="JsonCardItem"?(n.openBlock(),n.createElementBlock("div",{key:3,"data-testid":`${r.item.key}-json-array-content`},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.item.value,(w,x)=>(n.openBlock(),n.createBlock(xd,{key:`json-array-item-${x}`,index:x,"is-array-item":"",item:w},null,8,["index","item"]))),128))],8,cg)):(n.openBlock(),n.createBlock(b,{key:4,label:n.unref(A)?e.item.value:""},{default:n.withCtx(()=>[n.createElementVNode("span",{ref_key:"textContent",ref:y,class:n.normalizeClass(["attrs-data-text",{truncated:e.truncated}])},n.toDisplayString(p.value.text),3)]),_:1},8,["label"]))]),_:1},16))])):(n.openBlock(),n.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-no-value`}," – ",8,ig))],!0)],8,rg)])}}}),Ci=st(ug,[["__scopeId","data-v-e851fc7c"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Ad(e){return typeof e>"u"||e===null}function dg(e){return typeof e=="object"&&e!==null}function fg(e){return Array.isArray(e)?e:Ad(e)?[]:[e]}function pg(e,t){var r,i,o,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)o=s[r],e[o]=t[o];return e}function hg(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}function yg(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var gg=Ad,mg=dg,bg=fg,wg=hg,vg=yg,kg=pg,xe={isNothing:gg,isObject:mg,toArray:bg,repeat:wg,isNegativeZero:vg,extend:kg};function Bd(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
117
+ `)}}Je.CertificateTag="CERTIFICATE",Je.CrlTag="CRL",Je.CertificateRequestTag="CERTIFICATE REQUEST",Je.PublicKeyTag="PUBLIC KEY",Je.PrivateKeyTag="PRIVATE KEY";class It extends Dt{static isAsnEncoded(t){return D.isBufferSource(t)||typeof t=="string"}static toArrayBuffer(t){if(typeof t=="string"){if(Je.isPem(t))return Je.decode(t)[0];if(R.isHex(t))return R.FromHex(t);if(R.isBase64(t))return R.FromBase64(t);if(R.isBase64Url(t))return R.FromBase64Url(t);throw new TypeError("Unsupported format of 'raw' argument. Must be one of DER, PEM, HEX, Base64, or Base4Url")}else{const r=R.ToBinary(t);return Je.isPem(r)?Je.decode(r)[0]:R.isHex(r)?R.FromHex(r):R.isBase64(r)?R.FromBase64(r):R.isBase64Url(r)?R.FromBase64Url(r):D.toArrayBuffer(t)}}constructor(...t){It.isAsnEncoded(t[0])?super(It.toArrayBuffer(t[0]),t[1]):super(t[0])}toString(t="pem"){switch(t){case"pem":return Je.encode(this.rawData,this.tag);default:return super.toString(t)}}}class or extends It{constructor(t){It.isAsnEncoded(t)?super(t,St):super(t),this.tag=Je.PublicKeyTag}async export(...t){let r,i=["verify"],o={hash:"SHA-256",...this.algorithm};return t.length>1?(o=t[0]||o,i=t[1]||i,r=t[2]||We.get()):r=t[0]||We.get(),r.subtle.importKey("spki",this.rawData,o,!0,i)}onInit(t){const r=Xe.resolve(Gn),i=this.algorithm=r.toWebAlgorithm(t.algorithm);switch(t.algorithm.algorithm){case _r:{const o=H.parse(t.subjectPublicKey,Us),s=D.toUint8Array(o.modulus);i.publicExponent=D.toUint8Array(o.publicExponent),i.modulusLength=(s[0]?s:s.slice(1)).byteLength<<3;break}}}async getThumbprint(...t){var r;let i,o="SHA-1";return t.length>=1&&!(!((r=t[0])===null||r===void 0)&&r.subtle)?(o=t[0]||o,i=t[1]||We.get()):i=t[0]||We.get(),await i.subtle.digest(o,this.rawData)}async getKeyIdentifier(t){t||(t=We.get());const r=H.parse(this.rawData,St);return await t.subtle.digest("SHA-1",r.subjectPublicKey)}toTextObject(){const t=this.toTextObjectEmpty(),r=H.parse(this.rawData,St);switch(t.Algorithm=ir.serializeAlgorithm(r.algorithm),r.algorithm.algorithm){case ui:t["EC Point"]=r.subjectPublicKey;break;case _r:default:t["Raw Data"]=r.subjectPublicKey}return t}}class pt{static register(t,r){this.items.set(t,r)}static create(t){const r=new ft(t),i=this.items.get(r.type);return i?new i(t):r}}pt.items=new Map;const Yn="crypto.signatureFormatter";class jh{toAsnSignature(t,r){return D.toArrayBuffer(r)}toWebSignature(t,r){return D.toArrayBuffer(r)}}class Zn extends It{constructor(t){It.isAsnEncoded(t)?super(t,mr):super(t),this.tag=Je.CertificateTag}onInit(t){const r=t.tbsCertificate;this.tbs=H.serialize(r),this.serialNumber=R.ToHex(r.serialNumber),this.subjectName=new Pt(r.subject),this.subject=new Pt(r.subject).toString(),this.issuerName=new Pt(r.issuer),this.issuer=this.issuerName.toString();const i=Xe.resolve(Gn);this.signatureAlgorithm=i.toWebAlgorithm(t.signatureAlgorithm),this.signature=t.signatureValue;const o=r.validity.notBefore.utcTime||r.validity.notBefore.generalTime;if(!o)throw new Error("Cannot get 'notBefore' value");this.notBefore=o;const s=r.validity.notAfter.utcTime||r.validity.notAfter.generalTime;if(!s)throw new Error("Cannot get 'notAfter' value");this.notAfter=s,this.extensions=[],r.extensions&&(this.extensions=r.extensions.map(a=>pt.create(H.serialize(a)))),this.publicKey=new or(r.subjectPublicKeyInfo)}getExtension(t){for(const r of this.extensions)if(typeof t=="string"){if(r.type===t)return r}else if(r instanceof t)return r;return null}getExtensions(t){return this.extensions.filter(r=>typeof t=="string"?r.type===t:r instanceof t)}async verify(t={},r=We.get()){let i,o;const s=t.publicKey;try{if(!s)i={...this.publicKey.algorithm,...this.signatureAlgorithm},o=await this.publicKey.export(i,["verify"],r);else if("publicKey"in s)i={...s.publicKey.algorithm,...this.signatureAlgorithm},o=await s.publicKey.export(i,["verify"],r);else if(s instanceof or)i={...s.algorithm,...this.signatureAlgorithm},o=await s.export(i,["verify"],r);else if(D.isBufferSource(s)){const d=new or(s);i={...d.algorithm,...this.signatureAlgorithm},o=await d.export(i,["verify"],r)}else i={...s.algorithm,...this.signatureAlgorithm},o=s}catch{return!1}const a=Xe.resolveAll(Yn).reverse();let c=null;for(const d of a)if(c=d.toWebSignature(i,this.signature),c)break;if(!c)throw Error("Cannot convert ASN.1 signature value to WebCrypto format");const l=await r.subtle.verify(this.signatureAlgorithm,o,c,this.tbs);if(t.signatureOnly)return l;{const p=(t.date||new Date).getTime();return l&&this.notBefore.getTime()<p&&p<this.notAfter.getTime()}}async getThumbprint(...t){let r,i="SHA-1";return t[0]&&(t[0].subtle?r=t[0]:(i=t[0]||i,r=t[1])),r??(r=We.get()),await r.subtle.digest(i,this.rawData)}async isSelfSigned(t=We.get()){return this.subject===this.issuer&&await this.verify({signatureOnly:!0},t)}toTextObject(){const t=this.toTextObjectEmpty(),r=H.parse(this.rawData,mr),i=r.tbsCertificate,o=new ce("",{Version:`${gr[i.version]} (${i.version})`,"Serial Number":i.serialNumber,"Signature Algorithm":ir.serializeAlgorithm(i.signature),Issuer:this.issuer,Validity:new ce("",{"Not Before":i.validity.notBefore.getTime(),"Not After":i.validity.notAfter.getTime()}),Subject:this.subject,"Subject Public Key Info":this.publicKey});if(i.issuerUniqueID&&(o["Issuer Unique ID"]=i.issuerUniqueID),i.subjectUniqueID&&(o["Subject Unique ID"]=i.subjectUniqueID),this.extensions.length){const s=new ce("");for(const a of this.extensions){const c=a.toTextObject();s[c[ce.NAME]]=c}o.Extensions=s}return t.Data=o,t.Signature=new ce("",{Algorithm:ir.serializeAlgorithm(r.signatureAlgorithm),"":r.signatureValue}),t}}Zn.NAME="Certificate";class vi extends ft{static async create(t,r=!1,i=We.get()){if(t instanceof Zn||nr.isCryptoKey(t)){const o=t instanceof Zn?await t.publicKey.export(i):t,s=await i.subtle.exportKey("spki",o),c=await new or(s).getKeyIdentifier(i);return new vi(R.ToHex(c),r)}else return new vi(t,r)}constructor(...t){if(D.isBufferSource(t[0]))super(t[0]);else if(typeof t[0]=="string"){const r=new Yt({keyIdentifier:new Do(R.FromHex(t[0]))});super(jo,t[1],H.serialize(r))}else{const r=t[0],i=r.name instanceof mi?H.parse(r.name.rawData,$e):r.name,o=new Yt({authorityCertIssuer:i,authorityCertSerialNumber:R.FromHex(r.serialNumber)});super(jo,t[1],H.serialize(o))}}onInit(t){super.onInit(t);const r=H.parse(t.extnValue,Yt);r.keyIdentifier&&(this.keyId=R.ToHex(r.keyIdentifier)),r.authorityCertIssuer&&r.authorityCertSerialNumber&&(this.certId={name:r.authorityCertIssuer,serialNumber:R.ToHex(r.authorityCertSerialNumber)})}toTextObject(){const t=this.toTextObjectWithoutValue(),r=H.parse(this.value,Yt);return r.authorityCertIssuer&&(t["Authority Issuer"]=new mi(r.authorityCertIssuer).toTextObject()),r.authorityCertSerialNumber&&(t["Authority Serial Number"]=r.authorityCertSerialNumber),r.keyIdentifier&&(t[""]=r.keyIdentifier),t}}vi.NAME="Authority Key Identifier";class Qu extends ft{constructor(...t){if(D.isBufferSource(t[0])){super(t[0]);const r=H.parse(this.value,Yi);this.ca=r.cA,this.pathLength=r.pathLenConstraint}else{const r=new Yi({cA:t[0],pathLenConstraint:t[1]});super(tl,t[2],H.serialize(r)),this.ca=t[0],this.pathLength=t[1]}}toTextObject(){const t=this.toTextObjectWithoutValue();return this.ca&&(t.CA=this.ca),this.pathLength!==void 0&&(t["Path Length"]=this.pathLength),t}}Qu.NAME="Basic Constraints";var Xu;(function(e){e.serverAuth="1.3.6.1.5.5.7.3.1",e.clientAuth="1.3.6.1.5.5.7.3.2",e.codeSigning="1.3.6.1.5.5.7.3.3",e.emailProtection="1.3.6.1.5.5.7.3.4",e.timeStamping="1.3.6.1.5.5.7.3.8",e.ocspSigning="1.3.6.1.5.5.7.3.9"})(Xu||(Xu={}));class ed extends ft{constructor(...t){if(D.isBufferSource(t[0])){super(t[0]);const r=H.parse(this.value,tn);this.usages=r.map(i=>i)}else{const r=new tn(t[0]);super(al,t[1],H.serialize(r)),this.usages=t[0]}}toTextObject(){const t=this.toTextObjectWithoutValue();return t[""]=this.usages.map(r=>jt.toString(r)).join(", "),t}}ed.NAME="Extended Key Usages";var ba;(function(e){e[e.digitalSignature=1]="digitalSignature",e[e.nonRepudiation=2]="nonRepudiation",e[e.keyEncipherment=4]="keyEncipherment",e[e.dataEncipherment=8]="dataEncipherment",e[e.keyAgreement=16]="keyAgreement",e[e.keyCertSign=32]="keyCertSign",e[e.cRLSign=64]="cRLSign",e[e.encipherOnly=128]="encipherOnly",e[e.decipherOnly=256]="decipherOnly"})(ba||(ba={}));class wa extends ft{constructor(...t){if(D.isBufferSource(t[0])){super(t[0]);const r=H.parse(this.value,Yo);this.usages=r.toNumber()}else{const r=new Yo(t[0]);super(ll,t[1],H.serialize(r)),this.usages=t[0]}}toTextObject(){const t=this.toTextObjectWithoutValue(),r=H.parse(this.value,Yo);return t[""]=r.toJSON().join(", "),t}}wa.NAME="Key Usages";class Qn extends ft{static async create(t,r=!1,i=We.get()){let o;t instanceof or?o=t.rawData:"publicKey"in t?o=t.publicKey.rawData:D.isBufferSource(t)?o=t:o=await i.subtle.exportKey("spki",t);const a=await new or(o).getKeyIdentifier(i);return new Qn(R.ToHex(a),r)}constructor(...t){if(D.isBufferSource(t[0])){super(t[0]);const r=H.parse(this.value,Tt);this.keyId=R.ToHex(r)}else{const r=typeof t[0]=="string"?R.FromHex(t[0]):t[0],i=new Tt(r);super(yl,t[1],H.serialize(i)),this.keyId=R.ToHex(r)}}toTextObject(){const t=this.toTextObjectWithoutValue(),r=H.parse(this.value,Tt);return t[""]=r,t}}Qn.NAME="Subject Key Identifier";class va extends ft{constructor(...t){D.isBufferSource(t[0])?super(t[0]):super(pl,t[1],new mi(t[0]||[]).rawData)}onInit(t){super.onInit(t);const r=H.parse(t.extnValue,ts);this.names=new mi(r)}toTextObject(){const t=this.toTextObjectWithoutValue(),r=this.names.toTextObject();for(const i in r)t[i]=r[i];return t}}va.NAME="Subject Alternative Name";class td extends ft{constructor(...t){var r;if(D.isBufferSource(t[0])){super(t[0]);const i=H.parse(this.value,Xi);this.policies=i.map(o=>o.policyIdentifier)}else{const i=t[0],o=(r=t[1])!==null&&r!==void 0?r:!1,s=new Xi(i.map(a=>new Qi({policyIdentifier:a})));super(il,o,H.serialize(s)),this.policies=i}}toTextObject(){const t=this.toTextObjectWithoutValue();return t.Policy=this.policies.map(r=>new ce("",{},jt.toString(r))),t}}td.NAME="Certificate Policies",pt.register(il,td);class jr extends Dt{constructor(...t){let r;if(D.isBufferSource(t[0]))r=D.toArrayBuffer(t[0]);else{const i=t[0],o=Array.isArray(t[1])?t[1].map(s=>D.toArrayBuffer(s)):[];r=H.serialize(new Ct({type:i,values:o}))}super(r,Ct)}onInit(t){this.type=t.type,this.values=t.values}toTextObject(){const t=this.toTextObjectWithoutValue();return t.Value=this.values.map(r=>new ce("",{"":r})),t}toTextObjectWithoutValue(){const t=this.toTextObjectEmpty();return t[ce.NAME]===jr.NAME&&(t[ce.NAME]=jt.toString(this.type)),t}}jr.NAME="Attribute";class rd extends jr{constructor(...t){var r;if(D.isBufferSource(t[0]))super(t[0]);else{const i=new qn({printableString:t[0]});super(Xl,[H.serialize(i)])}(r=this.password)!==null&&r!==void 0||(this.password="")}onInit(t){if(super.onInit(t),this.values[0]){const r=H.parse(this.values[0],qn);this.password=r.toString()}}toTextObject(){const t=this.toTextObjectWithoutValue();return t[ce.VALUE]=this.password,t}}rd.NAME="Challenge Password";class ka extends jr{constructor(...t){var r;if(D.isBufferSource(t[0]))super(t[0]);else{const i=t[0],o=new Zt;for(const s of i)o.push(H.parse(s.rawData,nt));super(ra,[H.serialize(o)])}(r=this.items)!==null&&r!==void 0||(this.items=[])}onInit(t){if(super.onInit(t),this.values[0]){const r=H.parse(this.values[0],Zt);this.items=r.map(i=>pt.create(H.serialize(i)))}}toTextObject(){const t=this.toTextObjectWithoutValue(),r=this.items.map(i=>i.toTextObject());for(const i of r)t[i[ce.NAME]]=i;return t}}ka.NAME="Extensions";class Xn{static register(t,r){this.items.set(t,r)}static create(t){const r=new jr(t),i=this.items.get(r.type);return i?new i(t):r}}Xn.items=new Map;let Ca=class{toAsnAlgorithm(t){switch(t.name.toLowerCase()){case"rsassa-pkcs1-v1_5":if("hash"in t){let r;if(typeof t.hash=="string")r=t.hash;else if(t.hash&&typeof t.hash=="object"&&"name"in t.hash&&typeof t.hash.name=="string")r=t.hash.name.toUpperCase();else throw new Error("Cannot get hash algorithm name");switch(r.toLowerCase()){case"sha-1":return new L({algorithm:En,parameters:null});case"sha-256":return new L({algorithm:Ps,parameters:null});case"sha-384":return new L({algorithm:Nn,parameters:null});case"sha-512":return new L({algorithm:_n,parameters:null})}}else return new L({algorithm:_r,parameters:null})}return null}toWebAlgorithm(t){switch(t.algorithm){case _r:return{name:"RSASSA-PKCS1-v1_5"};case En:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-1"}};case Ps:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case Nn:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}};case _n:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}}}return null}};Ca=u([zs()],Ca),Xe.registerSingleton(zn,Ca);class et{addPadding(t,r){const i=D.toUint8Array(r),o=new Uint8Array(t);return o.set(i,t-i.length),o}removePadding(t,r=!1){let i=D.toUint8Array(t);for(let o=0;o<i.length;o++)if(i[o]){i=i.slice(o);break}if(r&&i[0]>127){const o=new Uint8Array(i.length+1);return o.set(i,1),o.buffer}return i.buffer}toAsnSignature(t,r){if(t.name==="ECDSA"){const i=t.namedCurve,o=et.namedCurveSize.get(i)||et.defaultNamedCurveSize,s=new In,a=D.toUint8Array(r);return s.r=this.removePadding(a.slice(0,o),!0),s.s=this.removePadding(a.slice(o,o+o),!0),H.serialize(s)}return null}toWebSignature(t,r){if(t.name==="ECDSA"){const i=H.parse(r,In),o=t.namedCurve,s=et.namedCurveSize.get(o)||et.defaultNamedCurveSize,a=this.addPadding(s,this.removePadding(i.r)),c=this.addPadding(s,this.removePadding(i.s));return Yf(a,c)}return null}}et.namedCurveSize=new Map,et.defaultNamedCurveSize=32;const id="1.3.101.110",nd="1.3.101.111",od="1.3.101.112",sd="1.3.101.113";let Sa=class{toAsnAlgorithm(t){let r=null;switch(t.name.toLowerCase()){case"eddsa":switch(t.namedCurve.toLowerCase()){case"ed25519":r=od;break;case"ed448":r=sd;break}break;case"ecdh-es":switch(t.namedCurve.toLowerCase()){case"x25519":r=id;break;case"x448":r=nd;break}}return r?new L({algorithm:r}):null}toWebAlgorithm(t){switch(t.algorithm){case od:return{name:"EdDSA",namedCurve:"Ed25519"};case sd:return{name:"EdDSA",namedCurve:"Ed448"};case id:return{name:"ECDH-ES",namedCurve:"X25519"};case nd:return{name:"ECDH-ES",namedCurve:"X448"}}return null}};Sa=u([zs()],Sa),Xe.registerSingleton(zn,Sa);class Dh extends It{constructor(t){It.isAsnEncoded(t)?super(t,yi):super(t),this.tag=Je.CertificateRequestTag}onInit(t){this.tbs=H.serialize(t.certificationRequestInfo),this.publicKey=new or(t.certificationRequestInfo.subjectPKInfo);const r=Xe.resolve(Gn);this.signatureAlgorithm=r.toWebAlgorithm(t.signatureAlgorithm),this.signature=t.signature,this.attributes=t.certificationRequestInfo.attributes.map(o=>Xn.create(H.serialize(o)));const i=this.getAttribute(ra);this.extensions=[],i instanceof ka&&(this.extensions=i.items),this.subjectName=new Pt(t.certificationRequestInfo.subject),this.subject=this.subjectName.toString()}getAttribute(t){for(const r of this.attributes)if(r.type===t)return r;return null}getAttributes(t){return this.attributes.filter(r=>r.type===t)}getExtension(t){for(const r of this.extensions)if(r.type===t)return r;return null}getExtensions(t){return this.extensions.filter(r=>r.type===t)}async verify(t=We.get()){const r={...this.publicKey.algorithm,...this.signatureAlgorithm},i=await this.publicKey.export(r,["verify"],t),o=Xe.resolveAll(Yn).reverse();let s=null;for(const c of o)if(s=c.toWebSignature(r,this.signature),s)break;if(!s)throw Error("Cannot convert WebCrypto signature value to ASN.1 format");return await t.subtle.verify(this.signatureAlgorithm,i,s,this.tbs)}toTextObject(){const t=this.toTextObjectEmpty(),r=H.parse(this.rawData,yi),i=r.certificationRequestInfo,o=new ce("",{Version:`${gr[i.version]} (${i.version})`,Subject:this.subject,"Subject Public Key Info":this.publicKey});if(this.attributes.length){const s=new ce("");for(const a of this.attributes){const c=a.toTextObject();s[c[ce.NAME]]=c}o.Attributes=s}return t.Data=o,t.Signature=new ce("",{Algorithm:ir.serializeAlgorithm(r.signatureAlgorithm),"":r.signature}),t}}Dh.NAME="PKCS#10 Certificate Request";var ad;(function(e){e[e.unspecified=0]="unspecified",e[e.keyCompromise=1]="keyCompromise",e[e.cACompromise=2]="cACompromise",e[e.affiliationChanged=3]="affiliationChanged",e[e.superseded=4]="superseded",e[e.cessationOfOperation=5]="cessationOfOperation",e[e.certificateHold=6]="certificateHold",e[e.removeFromCRL=8]="removeFromCRL",e[e.privilegeWithdrawn=9]="privilegeWithdrawn",e[e.aACompromise=10]="aACompromise"})(ad||(ad={})),pt.register(tl,Qu),pt.register(al,ed),pt.register(ll,wa),pt.register(yl,Qn),pt.register(jo,vi),pt.register(pl,va),Xn.register(Xl,rd),Xn.register(ra,ka),Xe.registerSingleton(Yn,jh),Xe.registerSingleton(Yn,et),et.namedCurveSize.set("P-256",32),et.namedCurveSize.set("K-256",32),et.namedCurveSize.set("P-384",48),et.namedCurveSize.set("P-521",66);function cd(){return{parseMetaCertificateData:t=>{if(/{vault:\/\/.*}/g.test(t))throw new Error("not a X.509 certificate");const r=new Zn(t),i={subject:r.subjectName.toString(),issuer:r.issuer,notAfter:r.notAfter};for(const o of r.extensions)if(o instanceof va){const s=o.names.toJSON(),c=Object.entries(s).map(l=>({type:l[1].type,value:l[1].value})).reduce((l,d)=>{const p=d.type,y=l[p]??[];return{...l,[p]:[...y,d.value]}},{});for(const l in c)i.subjectAltName=`${l}=${c[l].join(", ")}`}else if(o instanceof wa){const s=Object.values(ba),a=Array(s.length/2).fill(null).reduce((c,l,d)=>{const p=s[s.length/2+d];if(o.usages&p){const y=s[d];c.push(y)}return c},[]);i.keyUsage=a}return i}}}function Ph(){const e=cd(),t=n.ref({}),r=o=>{if(!(o.id in t.value))try{t.value[o.id]=e.parseMetaCertificateData(o.cert)}catch{t.value[o.id]=void 0}return t.value[o.id]};return{certificateDataCache:t,getCertificateData:o=>{const s=r(o);return{schemaIssuer:(s==null?void 0:s.issuer)||"",schemaSubject:(s==null?void 0:s.subject)||"",schemaExpiry:(s==null?void 0:s.notAfter)instanceof Date?s.notAfter.getTime()/1e3:0,schemaSanNames:(s==null?void 0:s.subjectAltName)||"",schemaKeyUsages:(s==null?void 0:s.keyUsage)||[]}}}}const $h={certificates:{title:"Certificates",list:{toolbar_actions:{new_certificate:"New Certificate"},table_headers:{subject:"Subject",expiry:"Expiry",san:"SAN",cert:"Cert",tags:"Tags",issuer:"Issuer",snis:"SNIs"},empty_state:{title:"Configure a New Certificate",description:"Certificates handle SSL/TLS termination for encrypted requests."}},form:{sections:{ssl:{title:"SSL Key Pair",description:"The PEM-encoded public certificate chain and private key of the SSL key pair and the alternate."},general:{title:"General Information",description:"General information will help identify and manage this key."}},fields:{cert:{label:"Cert",tooltip:"PEM-encoded public certificate chain of the SSL key pair. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},key:{label:"Key",tooltip:"PEM-encoded private key of the SSL key pair. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},cert_alt:{label:"Cert Alt",tooltip:"PEM-encoded public certificate chain of the alternate SSL key pair. This should only be set if you have both RSA and ECDSA types of certificate available and would like Kong to prefer serving using ECDSA certs when client advertises support for it. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},key_alt:{label:"Key Alt",tooltip:"PEM-encoded private key of the alternate SSL key pair. This should only be set if you have both RSA and ECDSA types of certificate available and would like Kong to prefer serving using ECDSA certs when client advertises support for it. This field is {emphasis}, which means it can be securely stored as a secret in a vault. References must follow a specific format.",emphasis:"referenceable"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}},actions:{create:"New Certificate",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",addSni:"Add to New SNI",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact ID"},delete:{title:"Delete a Certificate",description:"Your organization's original certificate {bolded-text}.",boldedText:"will not be affected",description2:"This action cannot be reversed so make sure to check the certificate usage before deleting."},errors:{general:"Certificates could not be retrieved",delete:"The certificate could not be deleted at this time",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"}},"ca-certificates":{title:"CA Certificates",list:{toolbar_actions:{new_ca_certificate:"New CA Certificate"},table_headers:{issuer:"Issuer",expiry:"Expiry",tags:"Tags"},empty_state:{title:"Configure a New CA Certificate",description:"CA certificates validate client or server certificates."}},form:{sections:{cert:{title:"Public Certificate",description:"The PEM-encoded public certificate of the CA and it’s SHA256 hex digest."},general:{title:"General Information",description:"General information will help identify and manage this key."}},fields:{cert:{label:"Cert",tooltip:"PEM-encoded public certificate of the CA."},cert_digest:{label:"Cert Digest",tooltip:"SHA256 hex digest of the public certificate"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings for grouping and filtering, separated by commas."}}},actions:{create:"New CA Certificate",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",clear:"Clear",view:"View Details"},search:{placeholder:"Filter by exact ID"},delete:{title:"Delete a CA Certificate",description:"Your organization's original certificate {bolded-text}.",boldedText:"will not be affected",description2:"This action cannot be reversed so make sure to check the certificate usage before deleting."},errors:{general:"CA Certificates could not be retrieved",delete:"The CA Certificate could not be deleted at this time",copy:"Failed to copy to clipboard"},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"}},general:{"key-usages":{KEY_USAGE_TYPE_KEY_CERT_SIGN:"keyCertSign",KEY_USAGE_TYPE_CRL_SIGN:"cRLSign",KEY_USAGE_TYPE_ENCIPHER_ONLY:"encipherOnly",KEY_USAGE_TYPE_DIGITAL_SIGNATURE:"digitalSignature",KEY_USAGE_TYPE_KEY_ENCIPHERMENT:"keyEncipherment",KEY_USAGE_TYPE_DATA_ENCIPHERMENT:"dataEncipherment",KEY_USAGE_TYPE_KEY_AGREEMENT:"keyAgreement",KEY_USAGE_TYPE_CONTENT_COMMITMENT:"nonRepudiation"}}};function Mh(){const e=cr.createI18n("en-us",$h);return{i18n:e,i18nT:cr.i18nTComponent(e)}}const ht={useCertificate:Ph,useI18n:Mh,useX509:cd},ki={list:{konnect:"/api/runtime_groups/{controlPlaneId}/certificates",kongManager:"/{workspace}/certificates"},form:{konnect:{create:"/api/runtime_groups/{controlPlaneId}/certificates",edit:"/api/runtime_groups/{controlPlaneId}/certificates/{id}",validate:"/api/runtime_groups/{controlPlaneId}/v1/schemas/json/certificate/validate"},kongManager:{create:"/{workspace}/certificates",edit:"/{workspace}/certificates/{id}",validate:"/{workspace}/schemas/certificates/validate"}}},Rh={fail:"Failed to copy id to clipboard",success:{prefix:"Successfully",content:" copied to clipboard"}},Uh="Copy to clipboard",Lh={message:Rh,iconTitle:Uh},Hh="kong-ui-copy-uuid-notify",ld="24px",Fh=(e,t)=>{const r=e.__vccOpts||e;for(const[i,o]of t)r[i]=o;return r},qh=e=>(n.pushScopeId("data-v-77afb926"),e=e(),n.popScopeId(),e),Kh=["aria-hidden"],zh={key:0,"data-testid":"kui-icon-svg-title"},Gh=qh(()=>n.createElementVNode("path",{d:"M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",fill:"currentColor"},null,-1)),Wh=n.defineComponent({__name:"CopyIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:ld,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const t=String(e).replace(/px/gi,""),r=Number(t);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const t=e,r=n.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const o=String(t.size).replace(/px/gi,""),s=Number(o);if(s&&!isNaN(s)&&Number.isInteger(s)&&s>0)return`${s}px`}return ld}),i=n.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:r.value,lineHeight:"0",width:r.value}));return(o,s)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon copy-icon","data-testid":"kui-icon-wrapper-copy-icon",style:n.normalizeStyle(i.value)},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-copy-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(n.openBlock(),n.createElementBlock("title",zh,n.toDisplayString(e.title),1)):n.createCommentVNode("",!0),Gh],8,Kh))]),_:1},8,["aria-hidden","style"]))}}),Jh=Fh(Wh,[["__scopeId","data-v-77afb926"]]),Yh="16px",Zh={class:"kong-ui-copy-uuid"},Qh=["onClick"],ud=15,Xh=n.defineComponent({__name:"CopyUuid",props:{uuid:{type:String,required:!0},idTooltip:{type:String,default:""},truncated:{type:Boolean,default:!0},useMono:{type:Boolean,default:!0},notify:{type:Function,default:void 0},iconColor:{type:String,default:"rgba(0, 0, 0, 0.45)"},tooltip:{type:String,default:""},successTooltip:{type:String,default:""},format:{type:String,required:!1,default:"uuid",validator:e=>["uuid","hidden","redacted","deleted"].includes(e)}},emits:["success","error"],setup(e,{emit:t}){const r=e,{t:i}=cr.createI18n("en-us",Lh),o=r.notify||n.inject(Hh,()=>{}),s=n.computed(()=>r.idTooltip?{label:r.idTooltip,positionFixed:!0,placement:"bottomStart"}:{title:r.uuid}),a=n.computed(()=>!!(r.tooltip&&r.successTooltip)),c=n.ref(r.tooltip),l=n.computed(()=>r.tooltip?{label:c.value,positionFixed:!0,maxWidth:"500px",placement:"bottomStart"}:{}),d=n.computed(()=>{var A;return r.format==="redacted"?"*****":r.format==="deleted"?`*${(A=r.uuid)==null?void 0:A.substring(0,5)}`:r.uuid}),p=A=>{c.value=A,setTimeout(()=>{c.value=r.tooltip},1800)},y=A=>{var C,h;if(!A(r.uuid)){typeof o=="function"&&o({type:"error",message:i("message.fail")}),a.value?p(i("message.fail")):t("error",r.uuid);return}const g=((C=r.uuid)==null?void 0:C.length)>ud,m=r.format==="hidden"||r.format==="redacted"?i("message.success.prefix"):`"${((h=r.uuid)==null?void 0:h.substring(0,ud))+(g?"...":"")}"`;typeof o=="function"&&o({type:"success",message:`${m}${i("message.success.content")}`}),a.value?p(r.successTooltip):t("success",r.uuid)};return(A,C)=>{const h=n.resolveComponent("KClipboardProvider");return n.openBlock(),n.createElementBlock("div",Zh,[e.format!=="hidden"?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.idTooltip?"KTooltip":"div"),n.mergeProps({key:0},s.value,{"data-testid":"copy-id"}),{default:n.withCtx(()=>[n.createElementVNode("div",{class:n.normalizeClass(["uuid-container",e.truncated?"truncated-uuid":null,e.useMono?"mono":null])},n.toDisplayString(d.value),3)]),_:1},16)):n.createCommentVNode("",!0),(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.tooltip?"KTooltip":"div"),n.mergeProps(l.value,{class:"uuid-icon-wrapper"}),{default:n.withCtx(()=>[n.createVNode(h,null,{default:n.withCtx(({copyToClipboard:g})=>[n.createElementVNode("span",{"data-testid":"copy-to-clipboard",role:"button",tabindex:"0",onClick:n.withModifiers(m=>y(g),["stop"])},[n.createVNode(n.unref(Jh),{class:"uuid-icon",color:e.iconColor,decorative:!!e.tooltip,size:n.unref(Yh),title:n.unref(i)("iconTitle")},null,8,["color","decorative","size","title"])],8,Qh)]),_:1})]),_:1},16))])}}}),ey=(e,t)=>{const r=e.__vccOpts||e;for(const[i,o]of t)r[i]=o;return r},ty=ey(Xh,[["__scopeId","data-v-0c07874b"]]);var xa=(e=>(e.GatewayService="service",e.Route="route",e.Consumer="consumer",e.ConsumerGroup="consumer group",e.Plugin="plugin",e.Upstream="upstream",e.Certificate="certificate",e.CACertificate="ca certificate",e.SNI="SNI",e.Key="key",e.KeySet="key set",e.Vault="vault",e.Application="application",e.Developer="developer",e.acls="ACL Credential",e["basic-auth"]="Basic Auth Credential",e["key-auth"]="Key Auth Credential",e["key-auth-enc"]="Key Auth Encrypted Credential",e.oauth2="OAuth 2.0 Credential",e["hmac-auth"]="HMAC Credential",e.jwt="JWT Credential",e.Target="target",e.Policy="policy",e))(xa||{}),sr=(e=>(e.Edit="edit",e.Create="create",e))(sr||{}),$t=(e=>(e[e.Loading=0]="Loading",e[e.Idle=1]="Idle",e[e.NoResults=2]="NoResults",e[e.Error=3]="Error",e))($t||{}),ne=(e=>(e.ID="id",e.IdArray="id-array",e.Text="plain-text",e.Date="date",e.Redacted="redacted",e.RedactedArray="redacted-array",e.Json="json",e.JsonArray="json-array",e.BadgeTag="badge-tag",e.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e))(ne||{}),ue=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e))(ue||{});function Aa(e={}){return{axiosInstance:qf.create({withCredentials:!0,timeout:3e4,...e})}}function ry(){return{debounce:(e,t)=>{let r;return(...i)=>{clearTimeout(r),r=window==null?void 0:window.setTimeout(()=>{e(...i)},t)}}}}const Ba="khcp-user-table-preferences",iy={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function ny(){const e=r=>{if(typeof r=="string")try{return JSON.parse(r)}catch(i){console.error("useTablePreferences(tryParseJson)",i);return}},t=()=>{const r=e(localStorage.getItem(Ba));return!r||!Object.keys(r).length?new Map:new Map(Object.entries(r))};return{setTablePreferences:(r,i)=>{try{const o=t();o.set(r,i),localStorage.setItem(Ba,JSON.stringify(Object.fromEntries(o.entries())))}catch(o){console.error("useTablePreferences(setTablePreferences)",o)}},getTablePreferences:r=>{const i=t();return(i==null?void 0:i.get(r))||void 0||iy},deleteAllTablePreferences:()=>{localStorage.removeItem(Ba)}}}const oy={actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},sy={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},ay={actions:{save:"Save",cancel:"Cancel",back:"Back"},errors:{edit:"The entity could not be edited at this time."}},cy={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},ly={title:"Configuration",actions:{copy:"Copy JSON"},sections:{advanced:"Advanced",plugin:"Plugin Specific Configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last Updated",created_at_label:"Created",tags_label:"Tags",link:"Link"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}",structuredFormat:"Structured"}},uy={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},dy={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},fy={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},py={enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}},hy={global:oy,deleteModal:sy,baseForm:ay,baseTable:cy,baseConfigCard:ly,filter:uy,debouncedFilter:dy,errors:fy,toggleModal:py};function Ia(){const e=cr.createI18n("en-us",hy);return{i18n:e,i18nT:cr.i18nTComponent(e)}}function dd(){const e=(r,i)=>(i==null?void 0:i[r])??void 0,t=(r,i)=>{if(r.length!==i.length)return!1;const o=new Set([...r,...i]);for(const s of o){const a=r.filter(l=>l===s).length,c=i.filter(l=>l===s).length;if(a!==c)return!1}return!0};return{getPropValue:e,objectsAreEqual:(r,i,o)=>{if(o){if(Object.keys(r).length===Object.keys(i).length)for(const s in r)if(Array.isArray(r[s])&&Array.isArray(i[s])){if(t(r[s],i[s]))continue;return!1}else{if(r[s]===i[s])continue;return!1}else return!1;return!0}try{return JSON.stringify(r)===JSON.stringify(i)}catch{return!1}},sortAlpha:r=>(i,o)=>{let s=i[r]===void 0||i[r]===null?"":i[r],a=o[r]===void 0||o[r]===null?"":o[r];return Array.isArray(i[r])&&(s=i[r][0]),Array.isArray(o[r])&&(a=o[r][0]),s.localeCompare(a)},isValidUuid:r=>r?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(r):!1}}function yy(e,t,r,i={fetchedItemsKey:"data",searchKeys:["id"]}){r||(r="100");const{axiosInstance:o}=Aa({headers:e.requestHeaders}),{i18n:{t:s}}=Ia(),{debounce:a}=ry(),c=a(async x=>{await w(x)},200),l=n.ref(!1),d=n.ref(""),p=n.ref(""),y=n.ref([]),A=n.ref([]),C=n.ref(void 0),h=n.unref(t);let g=`${e.apiBaseUrl}${h}`;e.app==="konnect"?g=g.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"&&(g=g.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:""));const{isValidUuid:m}=dd(),v=async()=>{try{l.value=!0;const{data:x}=await o.get(`${g}?size=${r}`);x!=null&&x.next||(C.value=i.fetchedItemsKey in x?x[i.fetchedItemsKey]:[]),A.value=i.fetchedItemsKey in x?x[i.fetchedItemsKey]:[],y.value=A.value}catch{y.value=[],d.value=s("debouncedFilter.errors.fetch")}finally{l.value=!1}},b=n.ref(""),w=async x=>{var F,Z,I;if(b.value!==x)if(b.value=x||"",C.value===void 0)try{if(l.value=!0,d.value="",p.value="",e.app==="konnect"){let E=g+"";x&&(E+=`/${x}`);const{data:M}=await o.get(`${E}?size=${r}`);i.fetchedItemsKey in M?y.value=M[i.fetchedItemsKey]:M!=null&&M.id?y.value=[M]:y.value=[]}else if(x){const E=[];m(x)&&i.searchKeys.includes("id")?E.push((async()=>{const{data:U}=await o.get(`${g}/${x}`);return[U[i.fetchedItemsKey]??U]})()):E.push(...i.searchKeys.filter(U=>U!=="id").map(async U=>{const{data:P}=await o.get(`${g}?${U}=${x}`);return P[i.fetchedItemsKey]}));const M=await Promise.all(E),q=new Set;y.value=[],(F=M==null?void 0:M.forEach)==null||F.call(M,U=>{var P;(P=U==null?void 0:U.forEach)==null||P.call(U,V=>{q.has(V.id)||(q.add(V.id),y.value.push(V))})})}else y.value=A.value}catch(E){((Z=E==null?void 0:E.response)==null?void 0:Z.status)===404?p.value=s("debouncedFilter.errors.invalid"):(y.value=[],d.value=s("debouncedFilter.errors.fetch"))}finally{l.value=!1}else l.value=!0,p.value="",x?(y.value=(I=C.value)==null?void 0:I.filter(E=>{var M;let q=!1;for(const U of i.searchKeys){const P=typeof E[U]=="string"?(M=E[U])==null?void 0:M.toLowerCase():E[U];P!=null&&P.includes(x.toLowerCase())&&(q=!0)}return q}),(!y.value||!y.value.length)&&(p.value=s("debouncedFilter.errors.invalid"))):y.value=C.value,l.value=!1};return{loading:l,error:d,validationError:p,results:y,allRecords:C,loadItems:v,debouncedQueryChange:c}}function gy(e,t){const r=n.unref(t),i=n.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${r}`):new URL(r));return i.value.search="",o=>`${i.value.href}/${o}`}function my(){const{i18n:{t:e}}=Ia();return{getMessageFromError:t=>{var r,i,o;if(!t)return e("errors.unexpected");if((r=t==null?void 0:t.response)!=null&&r.data){if(t.response.data.detail)return t.response.data.detail;if((i=t.response.data.details)!=null&&i.length)return t.response.data.details.map(s=>{let a=e("errors.unexpected");return s.messages&&typeof s.messages=="object"&&s.messages.length&&(a=s.messages.join(", ")),s.field?`${s.field} - ${a}`:a}).join("; ");if(t.response.data.message){const{message:s}=t.response.data;return Array.isArray(s)?(o=s[0])!=null&&o.constraints?Object.values(s[0].constraints)[0]:s[0]:s}if(typeof t.response.data=="string")return t.response.data;if(typeof t.response.data=="object")return Object.keys(t.response.data).map(s=>`${s} ${t.response.data[s]}`).join(", ")}return t.message||e("errors.unexpected")}}}function by(e){const t=window.location.origin,r=t.endsWith("/")?t:`${t}/`;try{const i=e.join("/"),o=`${r}${i}`,s=e.some(a=>a.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(o)&&!s&&new URL(o))return`${r}${i}`;throw new Error("Invalid url")}catch(i){return console.warn("Failed to build valid URL:",i),""}}function fd(e,t){const r=n.ref(n.unref(e)),i=n.ref(n.unref(t)),o=n.computed(()=>!!(r.value.app==="konnect"||r.value.isExactMatch)),s=n.computed(()=>i.value.startsWith("/")?new URL(`${window.location.origin}${i.value}`):new URL(i.value));return a=>{const{page:c,pageSize:l,offset:d,sortColumnKey:p,sortColumnOrder:y,query:A}=a;try{let C=new URL(s.value.href);return o.value&&A?(C.search="",C=new URL(`${C.href}?filter[name][contains]=${A}`)):(o.value||new URLSearchParams(A).forEach((h,g)=>{C.searchParams.append(g,h)}),p&&C.searchParams.append("sort_by",p),y==="desc"&&C.searchParams.append("sort_desc","1"),C.searchParams.append("size",String(l))),d&&c!==1&&C.searchParams.append("offset",String(d)),C.href}catch(C){return console.error("RouteList(fetcher)",C),i.value}}}function wy(e,t,r="data"){const i=n.unref(t),{axiosInstance:o}=Aa({headers:e.requestHeaders}),s=fd(e,i),a=n.ref({status:$t.Idle});return{fetcher:async c=>{try{a.value={status:$t.Loading};const l=s(c),{data:d}=await o.get(l),p=r&&r.replace(/[^\w-_]/gi,"");let y;d[p]&&Array.isArray(d[p])?y=d[p]:Array.isArray(d)?y=d:y=Object.keys(d).length?[d]:[];const A={data:y,total:y.length,...d.offset?{pagination:{offset:d.offset}}:null};return a.value={status:$t.Idle,response:A},A}catch(l){const d={data:[],total:0};return c.query&&l.response.status===404?(a.value={status:$t.NoResults,response:d,error:l},d):(a.value={status:$t.Error,response:d,error:l},d)}},fetcherState:a}}function vy(){const e=(r,i="_")=>r?r.split(i).map(o=>o.toLowerCase()==="id"?o.toUpperCase():o.charAt(0).toUpperCase()+o.substring(1)).join(" "):"",t=/(?:^|[\s-:'"])\w/g;return{capitalize:r=>r?r.replace(t,i=>i.toUpperCase()):"",convertKeyToTitle:e}}const pd=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,hd=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(pd);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},yd=e=>e==="*"||e==="x"||e==="X",gd=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},ky=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],Cy=(e,t)=>{if(yd(e)||yd(t))return 0;const[r,i]=ky(gd(e),gd(t));return r>i?1:r<i?-1:0},md=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const i=Cy(e[r]||"0",t[r]||"0");if(i!==0)return i}return 0},Sy=(e,t)=>{const r=hd(e),i=hd(t),o=r.pop(),s=i.pop(),a=md(r,i);return a!==0?a:o&&s?md(o.split("."),s.split(".")):o||s?o?-1:1:0},bd=(e,t,r)=>{xy(r);const i=Sy(e,t);return wd[r].includes(i)},wd={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},vd=Object.keys(wd),xy=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(vd.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${vd.join("|")}`)},Ay=e=>typeof e=="string"&&/^[v\d]/.test(e)&&pd.test(e);function By(e){const{gatewayInfo:t,supportedRange:r}=e;if(!t)return!0;const{edition:i,version:o}=t;if(!Ay(o))return console.error("Invalid version"),!1;const s=r[i];if(!s)return!1;const[a,c]=s;return!(a&&bd(o,a,"<")||c&&bd(o,c,">"))}function Iy(e){const t=n.ref(0),r=n.ref(0),i=n.ref(!1);return n.watch(e,o=>{o&&!i.value&&(t.value=o.offsetWidth,r.value=o.scrollWidth,i.value=!0)}),{isTruncated:n.computed(()=>t.value<r.value)}}const Be={useAxios:Aa,useDebouncedFilter:yy,useDeleteUrlBuilder:gy,useErrors:my,useExternalLinkCreator:by,useFetcher:wy,useFetchUrlBuilder:fd,useHelpers:dd,useStringHelpers:vy,useI18n:Ia,useGatewayFeatureSupported:By,useTruncationDetector:Iy},Ey={fail:"Failed to copy id to clipboard",success:{prefix:"Successfully",content:" copied to clipboard"}},Ny="Copy to clipboard",_y={message:Ey,iconTitle:Ny},Oy="kong-ui-copy-uuid-notify",kd="24px",Ty=(e,t)=>{const r=e.__vccOpts||e;for(const[i,o]of t)r[i]=o;return r},Vy=e=>(n.pushScopeId("data-v-77afb926"),e=e(),n.popScopeId(),e),jy=["aria-hidden"],Dy={key:0,"data-testid":"kui-icon-svg-title"},Py=Vy(()=>n.createElementVNode("path",{d:"M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",fill:"currentColor"},null,-1)),$y=n.defineComponent({__name:"CopyIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:kd,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const t=String(e).replace(/px/gi,""),r=Number(t);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const t=e,r=n.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const o=String(t.size).replace(/px/gi,""),s=Number(o);if(s&&!isNaN(s)&&Number.isInteger(s)&&s>0)return`${s}px`}return kd}),i=n.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:r.value,lineHeight:"0",width:r.value}));return(o,s)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon copy-icon","data-testid":"kui-icon-wrapper-copy-icon",style:n.normalizeStyle(i.value)},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-copy-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(n.openBlock(),n.createElementBlock("title",Dy,n.toDisplayString(e.title),1)):n.createCommentVNode("",!0),Py],8,jy))]),_:1},8,["aria-hidden","style"]))}}),My=Ty($y,[["__scopeId","data-v-77afb926"]]),Ry="16px",Uy={class:"kong-ui-copy-uuid"},Ly=["onClick"],Cd=15,Hy=n.defineComponent({__name:"CopyUuid",props:{uuid:{type:String,required:!0},idTooltip:{type:String,default:""},truncated:{type:Boolean,default:!0},useMono:{type:Boolean,default:!0},notify:{type:Function,default:void 0},iconColor:{type:String,default:"rgba(0, 0, 0, 0.45)"},tooltip:{type:String,default:""},successTooltip:{type:String,default:""},format:{type:String,required:!1,default:"uuid",validator:e=>["uuid","hidden","redacted","deleted"].includes(e)}},emits:["success","error"],setup(e,{emit:t}){const r=e,{t:i}=cr.createI18n("en-us",_y),o=r.notify||n.inject(Oy,()=>{}),s=n.computed(()=>r.idTooltip?{label:r.idTooltip,positionFixed:!0,placement:"bottomStart"}:{title:r.uuid}),a=n.computed(()=>!!(r.tooltip&&r.successTooltip)),c=n.ref(r.tooltip),l=n.computed(()=>r.tooltip?{label:c.value,positionFixed:!0,maxWidth:"500px",placement:"bottomStart"}:{}),d=n.computed(()=>{var A;return r.format==="redacted"?"*****":r.format==="deleted"?`*${(A=r.uuid)==null?void 0:A.substring(0,5)}`:r.uuid}),p=A=>{c.value=A,setTimeout(()=>{c.value=r.tooltip},1800)},y=A=>{var C,h;if(!A(r.uuid)){typeof o=="function"&&o({type:"error",message:i("message.fail")}),a.value?p(i("message.fail")):t("error",r.uuid);return}const g=((C=r.uuid)==null?void 0:C.length)>Cd,m=r.format==="hidden"||r.format==="redacted"?i("message.success.prefix"):`"${((h=r.uuid)==null?void 0:h.substring(0,Cd))+(g?"...":"")}"`;typeof o=="function"&&o({type:"success",message:`${m}${i("message.success.content")}`}),a.value?p(r.successTooltip):t("success",r.uuid)};return(A,C)=>{const h=n.resolveComponent("KClipboardProvider");return n.openBlock(),n.createElementBlock("div",Uy,[e.format!=="hidden"?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.idTooltip?"KTooltip":"div"),n.mergeProps({key:0},s.value,{"data-testid":"copy-id"}),{default:n.withCtx(()=>[n.createElementVNode("div",{class:n.normalizeClass(["uuid-container",e.truncated?"truncated-uuid":null,e.useMono?"mono":null])},n.toDisplayString(d.value),3)]),_:1},16)):n.createCommentVNode("",!0),(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.tooltip?"KTooltip":"div"),n.mergeProps(l.value,{class:"uuid-icon-wrapper"}),{default:n.withCtx(()=>[n.createVNode(h,null,{default:n.withCtx(({copyToClipboard:g})=>[n.createElementVNode("span",{"data-testid":"copy-to-clipboard",role:"button",tabindex:"0",onClick:n.withModifiers(m=>y(g),["stop"])},[n.createVNode(n.unref(My),{class:"uuid-icon",color:e.iconColor,decorative:!!e.tooltip,size:n.unref(Ry),title:n.unref(i)("iconTitle")},null,8,["color","decorative","size","title"])],8,Ly)]),_:1})]),_:1},16))])}}}),Fy=(e,t)=>{const r=e.__vccOpts||e;for(const[i,o]of t)r[i]=o;return r},Sd=Fy(Hy,[["__scopeId","data-v-0c07874b"]]),qy={key:0,class:"config-card-fieldset-title"},Ky=n.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(e){const t=e,{i18n:{t:r}}=Be.useI18n(),{convertKeyToTitle:i}=Be.useStringHelpers(),o=n.computed(()=>t.item.key??"json-array-item"),s=n.computed(()=>t.item.value??t.item),a=n.computed(()=>{const l=JSON.parse(JSON.stringify(s.value));return t.isArrayItem&&delete l.name,l}),c=n.computed(()=>{var l;return t.isArrayItem?(l=s.value)!=null&&l.name?i(s.value.name,"_"):r("baseConfigCard.general.entryTitle",{index:t.index}):""});return(l,d)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.isArrayItem?"fieldset":"div"),{class:n.normalizeClass(e.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:n.withCtx(()=>[e.isArrayItem?(n.openBlock(),n.createElementBlock("legend",qy,[n.createElementVNode("b",null,n.toDisplayString(c.value),1)])):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(a.value),(p,y)=>(n.openBlock(),n.createBlock(Ci,{key:`${o.value}-property-${y}`,item:{key:p,label:n.unref(i)(p),value:a.value[p]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),st=(e,t)=>{const r=e.__vccOpts||e;for(const[i,o]of t)r[i]=o;return r},xd=st(Ky,[["__scopeId","data-v-68ca83ec"]]),zy=st(n.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(e){const{i18n:{t}}=Be.useI18n();return(r,i)=>{const o=n.resolveComponent("KButton");return n.openBlock(),n.createElementBlock("div",null,[n.createVNode(o,{appearance:"tertiary",class:"navigation-button",onClick:i[0]||(i[0]=s=>r.$emit("navigation-click",e.item))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.item.value||n.unref(t)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),[["__scopeId","data-v-c96811e5"]]),Gy=n.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(e){const{i18n:{t}}=Be.useI18n();return(r,i)=>{const o=n.resolveComponent("KBadge");return n.openBlock(),n.createBlock(o,{appearance:e.status?"success":"neutral"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.status?n.unref(t)("baseConfigCard.statusBadge.enabledLabel"):n.unref(t)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),Wy="#0044f4",Jy="#e0e4ea",Yy="#3a3f51",Zy="1px",Qy="20px",Xy={class:"config-card-details-row"},eg=["data-testid"],tg=["data-testid"],rg=["data-testid"],ig=["data-testid"],ng={key:1},og=["data-testid"],sg=["data-testid"],ag=["data-testid"],cg=["data-testid"],lg={name:"ConfigCardItem",components:{CopyUuid:Sd,JsonCardItem:xd,StatusBadge:Gy,InternalLinkItem:zy}},ug=n.defineComponent({...lg,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(e,{emit:t}){const r=e;n.useCssVars(C=>({"23f3018c":d.value?"none":`solid ${n.unref(Zy)} ${n.unref(Jy)}`,"3815ec6d":l.value&&a.value?"block":"flex","1957f153":l.value&&a.value?"100%":r.slim?"50%":"25%","195a372e":l.value&&a.value?"100%":r.slim?"50%":"75%"}));const i=n.useSlots(),{i18n:{t:o,formatUnixTimeStamp:s}}=Be.useI18n(),a=n.computed(()=>r.item.value!==void 0&&r.item.value!==null&&r.item.value!==""),c=n.computed(()=>!!(r.item.tooltip||i["label-tooltip"])),l=n.computed(()=>r.item.type===ne.Json||r.item.type===ne.JsonArray),d=n.computed(()=>r.item.type===ne.JsonArray),p=n.computed(()=>{switch(r.item.type){case ne.ID:return{tag:"CopyUuid",attrs:{"data-testid":`${r.item.key}-copy-uuid`,"success-tooltip":o("baseConfigCard.copy.success"),tooltip:o("baseConfigCard.copy.tooltip",{label:r.item.label}),truncated:!1,uuid:r.item.value,notify:()=>{}}};case ne.IdArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{"success-tooltip":o("baseConfigCard.copy.success"),tooltip:o("baseConfigCard.copy.tooltip",{label:r.item.label}),truncated:!1,notify:()=>{}}};case ne.Redacted:return{tag:"CopyUuid",attrs:{"data-testid":`${r.item.key}-copy-uuid-redacted`,format:"redacted","success-tooltip":o("baseConfigCard.copy.success"),tooltip:o("baseConfigCard.copy.tooltip",{label:r.item.label}),truncated:!1,uuid:r.item.value,notify:()=>{}}};case ne.RedactedArray:return{tag:"div",additionalComponent:"CopyUuid",childAttrs:{format:"redacted","success-tooltip":o("baseConfigCard.copy.success"),tooltip:o("baseConfigCard.copy.tooltip",{label:r.item.label}),truncated:!1,notify:()=>{}}};case ne.Date:return{tag:"div",attrs:{"data-testid":`${r.item.key}-date`},text:s(r.item.value)};case ne.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${r.item.key}-badge-status`,status:r.item.value}};case ne.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case ne.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case ne.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${r.item.key}-internal-link`,item:r.item,onNavigationClick:C=>{t("navigation-click",C)}}};case ne.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${r.item.key}-external-link`,href:r.item.value},text:r.item.value};case ne.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-content`,item:r.item}};case ne.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-array-content`,item:r.item}};default:return{tag:"div",attrs:{"data-testid":`${r.item.key}-plain-text`},text:r.item.value}}}),y=n.ref(),{isTruncated:A}=Be.useTruncationDetector(y);return(C,h)=>{const g=n.resolveComponent("KLabel"),m=n.resolveComponent("KBadge"),v=n.resolveComponent("KMethodBadge"),b=n.resolveComponent("KTooltip");return n.openBlock(),n.createElementBlock("div",Xy,[n.createElementVNode("div",{class:"config-card-details-label","data-testid":`${e.item.key}-label`},[n.renderSlot(C.$slots,"label",{item:e.item},()=>[n.createVNode(g,{"tooltip-attributes":{maxWidth:"500px"}},n.createSlots({default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.item.label)+" ",1)]),_:2},[c.value?{name:"tooltip",fn:n.withCtx(()=>[n.createElementVNode("div",{"data-testid":`${e.item.key}-label-tooltip`},[n.renderSlot(C.$slots,"label-tooltip",{},()=>[n.createTextVNode(n.toDisplayString(e.item.tooltip),1)],!0)],8,tg)]),key:"0"}:void 0]),1024)],!0)],8,eg),n.createElementVNode("div",{class:"config-card-details-value","data-testid":`${e.item.key}-property-value`},[n.renderSlot(C.$slots,e.item.key,{rowValue:e.item.value},()=>[a.value?(n.openBlock(),n.createElementBlock("div",ng,[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(p.value.tag),n.normalizeProps(n.guardReactiveProps(p.value.attrs)),{default:n.withCtx(()=>[p.value.additionalComponent==="KBadge"?(n.openBlock(),n.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-badge-tags`},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.item.value,(w,x)=>(n.openBlock(),n.createBlock(m,{key:`${e.item.key}-badge-tag-${x}`,class:"config-badge","data-testid":`${e.item.key}-badge-tag-${x}`,"truncation-tooltip":w},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(w),1)]),_:2},1032,["data-testid","truncation-tooltip"]))),128))],8,og)):n.createCommentVNode("",!0),p.value.additionalComponent==="CopyUuid"?(n.openBlock(),n.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${e.item.key}-copy-uuid-array`},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.item.value,(w,x)=>(n.openBlock(),n.createBlock(n.unref(Sd),n.mergeProps(p.value.childAttrs,{key:`${e.item.key}-copy-uuid-${x}`,"data-testid":`${e.item.key}-copy-uuid-${x}`,uuid:w}),null,16,["data-testid","uuid"]))),128))],8,sg)):p.value.additionalComponent==="KMethodBadge"?(n.openBlock(),n.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${e.item.key}-badge-methods`},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.item.value,(w,x)=>(n.openBlock(),n.createBlock(v,{key:`${e.item.key}-badge-method-${x}`,class:"config-badge","data-testid":`${e.item.key}-badge-method-${x}`,"is-rounded":"",label:w,method:n.unref(Kf.MethodsArray).includes(w.toLowerCase())?w.toLowerCase():"custom"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(w),1)]),_:2},1032,["data-testid","label","method"]))),128))],8,ag)):n.createCommentVNode("",!0),p.value.additionalComponent==="JsonCardItem"?(n.openBlock(),n.createElementBlock("div",{key:3,"data-testid":`${r.item.key}-json-array-content`},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.item.value,(w,x)=>(n.openBlock(),n.createBlock(xd,{key:`json-array-item-${x}`,index:x,"is-array-item":"",item:w},null,8,["index","item"]))),128))],8,cg)):(n.openBlock(),n.createBlock(b,{key:4,label:n.unref(A)?e.item.value:""},{default:n.withCtx(()=>[n.createElementVNode("span",{ref_key:"textContent",ref:y,class:n.normalizeClass(["attrs-data-text",{truncated:e.truncated}])},n.toDisplayString(p.value.text),3)]),_:1},8,["label"]))]),_:1},16))])):(n.openBlock(),n.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-no-value`}," – ",8,ig))],!0)],8,rg)])}}}),Ci=st(ug,[["__scopeId","data-v-e851fc7c"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Ad(e){return typeof e>"u"||e===null}function dg(e){return typeof e=="object"&&e!==null}function fg(e){return Array.isArray(e)?e:Ad(e)?[]:[e]}function pg(e,t){var r,i,o,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)o=s[r],e[o]=t[o];return e}function hg(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}function yg(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var gg=Ad,mg=dg,bg=fg,wg=hg,vg=yg,kg=pg,xe={isNothing:gg,isObject:mg,toArray:bg,repeat:wg,isNegativeZero:vg,extend:kg};function Bd(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
118
118
 
119
119
  `+e.mark.snippet),i+" "+r):i}function Si(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Bd(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Si.prototype=Object.create(Error.prototype),Si.prototype.constructor=Si,Si.prototype.toString=function(e){return this.name+": "+Bd(this,e)};var Me=Si;function Ea(e,t,r,i,o){var s="",a="",c=Math.floor(o/2)-1;return i-t>c&&(s=" ... ",t=i-c+s.length),r-i>c&&(a=" ...",r=i+c-a.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+a,pos:i-t+s.length}}function Na(e,t){return xe.repeat(" ",t-e.length)+e}function Cg(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],o=[],s,a=-1;s=r.exec(e.buffer);)o.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var c="",l,d,p=Math.min(e.line+t.linesAfter,o.length).toString().length,y=t.maxLength-(t.indent+p+3);for(l=1;l<=t.linesBefore&&!(a-l<0);l++)d=Ea(e.buffer,i[a-l],o[a-l],e.position-(i[a]-i[a-l]),y),c=xe.repeat(" ",t.indent)+Na((e.line-l+1).toString(),p)+" | "+d.str+`
120
120
  `+c;for(d=Ea(e.buffer,i[a],o[a],e.position,y),c+=xe.repeat(" ",t.indent)+Na((e.line+1).toString(),p)+" | "+d.str+`
121
121
  `,c+=xe.repeat("-",t.indent+p+3+d.pos)+`^
122
122
  `,l=1;l<=t.linesAfter&&!(a+l>=o.length);l++)d=Ea(e.buffer,i[a+l],o[a+l],e.position-(i[a]-i[a+l]),y),c+=xe.repeat(" ",t.indent)+Na((e.line+l+1).toString(),p)+" | "+d.str+`
123
- `;return c.replace(/\n$/,"")}var Sg=Cg,xg=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ag=["scalar","sequence","mapping"];function Bg(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}function Ig(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(xg.indexOf(r)===-1)throw new Me('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Bg(t.styleAliases||null),Ag.indexOf(this.kind)===-1)throw new Me('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var _e=Ig;function Id(e,t){var r=[];return e[t].forEach(function(i){var o=r.length;r.forEach(function(s,a){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(o=a)}),r[o]=i}),r}function Eg(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}function _a(e){return this.extend(e)}_a.prototype.extend=function(e){var t=[],r=[];if(e instanceof _e)r.push(e);else if(Array.isArray(e))r=r.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit));else throw new Me("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.forEach(function(o){if(!(o instanceof _e))throw new Me("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Me("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new Me("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(o){if(!(o instanceof _e))throw new Me("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(_a.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=Id(i,"implicit"),i.compiledExplicit=Id(i,"explicit"),i.compiledTypeMap=Eg(i.compiledImplicit,i.compiledExplicit),i};var Ed=_a,Nd=new _e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),_d=new _e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Od=new _e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Td=new Ed({explicit:[Nd,_d,Od]});function Ng(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function _g(){return null}function Og(e){return e===null}var Vd=new _e("tag:yaml.org,2002:null",{kind:"scalar",resolve:Ng,construct:_g,predicate:Og,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Tg(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function Vg(e){return e==="true"||e==="True"||e==="TRUE"}function jg(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var jd=new _e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Tg,construct:Vg,predicate:jg,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function Dg(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Pg(e){return 48<=e&&e<=55}function $g(e){return 48<=e&&e<=57}function Mg(e){if(e===null)return!1;var t=e.length,r=0,i=!1,o;if(!t)return!1;if(o=e[r],(o==="-"||o==="+")&&(o=e[++r]),o==="0"){if(r+1===t)return!0;if(o=e[++r],o==="b"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;i=!0}return i&&o!=="_"}if(o==="x"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!Dg(e.charCodeAt(r)))return!1;i=!0}return i&&o!=="_"}if(o==="o"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!Pg(e.charCodeAt(r)))return!1;i=!0}return i&&o!=="_"}}if(o==="_")return!1;for(;r<t;r++)if(o=e[r],o!=="_"){if(!$g(e.charCodeAt(r)))return!1;i=!0}return!(!i||o==="_")}function Rg(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function Ug(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!xe.isNegativeZero(e)}var Dd=new _e("tag:yaml.org,2002:int",{kind:"scalar",resolve:Mg,construct:Rg,predicate:Ug,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Lg=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Hg(e){return!(e===null||!Lg.test(e)||e[e.length-1]==="_")}function Fg(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}var qg=/^[-+]?[0-9]+e/;function Kg(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(xe.isNegativeZero(e))return"-0.0";return r=e.toString(10),qg.test(r)?r.replace("e",".e"):r}function zg(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||xe.isNegativeZero(e))}var Pd=new _e("tag:yaml.org,2002:float",{kind:"scalar",resolve:Hg,construct:Fg,predicate:zg,represent:Kg,defaultStyle:"lowercase"}),$d=Td.extend({implicit:[Vd,jd,Dd,Pd]}),Md=$d,Rd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ud=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 Gg(e){return e===null?!1:Rd.exec(e)!==null||Ud.exec(e)!==null}function Wg(e){var t,r,i,o,s,a,c,l=0,d=null,p,y,A;if(t=Rd.exec(e),t===null&&(t=Ud.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(r,i,o));if(s=+t[4],a=+t[5],c=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(p=+t[10],y=+(t[11]||0),d=(p*60+y)*6e4,t[9]==="-"&&(d=-d)),A=new Date(Date.UTC(r,i,o,s,a,c,l)),d&&A.setTime(A.getTime()-d),A}function Jg(e){return e.toISOString()}var Ld=new _e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Gg,construct:Wg,instanceOf:Date,represent:Jg});function Yg(e){return e==="<<"||e===null}var Hd=new _e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Yg}),Oa=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
124
- \r`;function Zg(e){if(e===null)return!1;var t,r,i=0,o=e.length,s=Oa;for(r=0;r<o;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}function Qg(e){var t,r,i=e.replace(/[\r\n=]/g,""),o=i.length,s=Oa,a=0,c=[];for(t=0;t<o;t++)t%4===0&&t&&(c.push(a>>16&255),c.push(a>>8&255),c.push(a&255)),a=a<<6|s.indexOf(i.charAt(t));return r=o%4*6,r===0?(c.push(a>>16&255),c.push(a>>8&255),c.push(a&255)):r===18?(c.push(a>>10&255),c.push(a>>2&255)):r===12&&c.push(a>>4&255),new Uint8Array(c)}function Xg(e){var t="",r=0,i,o,s=e.length,a=Oa;for(i=0;i<s;i++)i%3===0&&i&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[i];return o=s%3,o===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):o===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):o===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}function em(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Fd=new _e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Zg,construct:Qg,predicate:em,represent:Xg}),tm=Object.prototype.hasOwnProperty,rm=Object.prototype.toString;function im(e){if(e===null)return!0;var t=[],r,i,o,s,a,c=e;for(r=0,i=c.length;r<i;r+=1){if(o=c[r],a=!1,rm.call(o)!=="[object Object]")return!1;for(s in o)if(tm.call(o,s))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function nm(e){return e!==null?e:[]}var qd=new _e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:im,construct:nm}),om=Object.prototype.toString;function sm(e){if(e===null)return!0;var t,r,i,o,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(i=a[t],om.call(i)!=="[object Object]"||(o=Object.keys(i),o.length!==1))return!1;s[t]=[o[0],i[o[0]]]}return!0}function am(e){if(e===null)return[];var t,r,i,o,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1)i=a[t],o=Object.keys(i),s[t]=[o[0],i[o[0]]];return s}var Kd=new _e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:sm,construct:am}),cm=Object.prototype.hasOwnProperty;function lm(e){if(e===null)return!0;var t,r=e;for(t in r)if(cm.call(r,t)&&r[t]!==null)return!1;return!0}function um(e){return e!==null?e:{}}var zd=new _e("tag:yaml.org,2002:set",{kind:"mapping",resolve:lm,construct:um}),Ta=Md.extend({implicit:[Ld,Hd],explicit:[Fd,qd,Kd,zd]}),Mt=Object.prototype.hasOwnProperty,eo=1,Gd=2,Wd=3,to=4,Va=1,dm=2,Jd=3,fm=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,pm=/[\x85\u2028\u2029]/,hm=/[,\[\]\{\}]/,Yd=/^(?:!|!!|![a-z\-]+!)$/i,Zd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Qd(e){return Object.prototype.toString.call(e)}function yt(e){return e===10||e===13}function ar(e){return e===9||e===32}function Ke(e){return e===9||e===32||e===10||e===13}function Dr(e){return e===44||e===91||e===93||e===123||e===125}function ym(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function gm(e){return e===120?2:e===117?4:e===85?8:0}function mm(e){return 48<=e&&e<=57?e-48:-1}function Xd(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
123
+ `;return c.replace(/\n$/,"")}var Sg=Cg,xg=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ag=["scalar","sequence","mapping"];function Bg(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}function Ig(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(xg.indexOf(r)===-1)throw new Me('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Bg(t.styleAliases||null),Ag.indexOf(this.kind)===-1)throw new Me('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Ne=Ig;function Id(e,t){var r=[];return e[t].forEach(function(i){var o=r.length;r.forEach(function(s,a){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(o=a)}),r[o]=i}),r}function Eg(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}function _a(e){return this.extend(e)}_a.prototype.extend=function(e){var t=[],r=[];if(e instanceof Ne)r.push(e);else if(Array.isArray(e))r=r.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit));else throw new Me("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.forEach(function(o){if(!(o instanceof Ne))throw new Me("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Me("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new Me("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(o){if(!(o instanceof Ne))throw new Me("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(_a.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=Id(i,"implicit"),i.compiledExplicit=Id(i,"explicit"),i.compiledTypeMap=Eg(i.compiledImplicit,i.compiledExplicit),i};var Ed=_a,Nd=new Ne("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),_d=new Ne("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Od=new Ne("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Td=new Ed({explicit:[Nd,_d,Od]});function Ng(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function _g(){return null}function Og(e){return e===null}var Vd=new Ne("tag:yaml.org,2002:null",{kind:"scalar",resolve:Ng,construct:_g,predicate:Og,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Tg(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function Vg(e){return e==="true"||e==="True"||e==="TRUE"}function jg(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var jd=new Ne("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Tg,construct:Vg,predicate:jg,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function Dg(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Pg(e){return 48<=e&&e<=55}function $g(e){return 48<=e&&e<=57}function Mg(e){if(e===null)return!1;var t=e.length,r=0,i=!1,o;if(!t)return!1;if(o=e[r],(o==="-"||o==="+")&&(o=e[++r]),o==="0"){if(r+1===t)return!0;if(o=e[++r],o==="b"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;i=!0}return i&&o!=="_"}if(o==="x"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!Dg(e.charCodeAt(r)))return!1;i=!0}return i&&o!=="_"}if(o==="o"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!Pg(e.charCodeAt(r)))return!1;i=!0}return i&&o!=="_"}}if(o==="_")return!1;for(;r<t;r++)if(o=e[r],o!=="_"){if(!$g(e.charCodeAt(r)))return!1;i=!0}return!(!i||o==="_")}function Rg(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function Ug(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!xe.isNegativeZero(e)}var Dd=new Ne("tag:yaml.org,2002:int",{kind:"scalar",resolve:Mg,construct:Rg,predicate:Ug,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Lg=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Hg(e){return!(e===null||!Lg.test(e)||e[e.length-1]==="_")}function Fg(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}var qg=/^[-+]?[0-9]+e/;function Kg(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(xe.isNegativeZero(e))return"-0.0";return r=e.toString(10),qg.test(r)?r.replace("e",".e"):r}function zg(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||xe.isNegativeZero(e))}var Pd=new Ne("tag:yaml.org,2002:float",{kind:"scalar",resolve:Hg,construct:Fg,predicate:zg,represent:Kg,defaultStyle:"lowercase"}),$d=Td.extend({implicit:[Vd,jd,Dd,Pd]}),Md=$d,Rd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ud=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 Gg(e){return e===null?!1:Rd.exec(e)!==null||Ud.exec(e)!==null}function Wg(e){var t,r,i,o,s,a,c,l=0,d=null,p,y,A;if(t=Rd.exec(e),t===null&&(t=Ud.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(r,i,o));if(s=+t[4],a=+t[5],c=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(p=+t[10],y=+(t[11]||0),d=(p*60+y)*6e4,t[9]==="-"&&(d=-d)),A=new Date(Date.UTC(r,i,o,s,a,c,l)),d&&A.setTime(A.getTime()-d),A}function Jg(e){return e.toISOString()}var Ld=new Ne("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Gg,construct:Wg,instanceOf:Date,represent:Jg});function Yg(e){return e==="<<"||e===null}var Hd=new Ne("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Yg}),Oa=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
124
+ \r`;function Zg(e){if(e===null)return!1;var t,r,i=0,o=e.length,s=Oa;for(r=0;r<o;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}function Qg(e){var t,r,i=e.replace(/[\r\n=]/g,""),o=i.length,s=Oa,a=0,c=[];for(t=0;t<o;t++)t%4===0&&t&&(c.push(a>>16&255),c.push(a>>8&255),c.push(a&255)),a=a<<6|s.indexOf(i.charAt(t));return r=o%4*6,r===0?(c.push(a>>16&255),c.push(a>>8&255),c.push(a&255)):r===18?(c.push(a>>10&255),c.push(a>>2&255)):r===12&&c.push(a>>4&255),new Uint8Array(c)}function Xg(e){var t="",r=0,i,o,s=e.length,a=Oa;for(i=0;i<s;i++)i%3===0&&i&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[i];return o=s%3,o===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):o===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):o===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}function em(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Fd=new Ne("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Zg,construct:Qg,predicate:em,represent:Xg}),tm=Object.prototype.hasOwnProperty,rm=Object.prototype.toString;function im(e){if(e===null)return!0;var t=[],r,i,o,s,a,c=e;for(r=0,i=c.length;r<i;r+=1){if(o=c[r],a=!1,rm.call(o)!=="[object Object]")return!1;for(s in o)if(tm.call(o,s))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function nm(e){return e!==null?e:[]}var qd=new Ne("tag:yaml.org,2002:omap",{kind:"sequence",resolve:im,construct:nm}),om=Object.prototype.toString;function sm(e){if(e===null)return!0;var t,r,i,o,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(i=a[t],om.call(i)!=="[object Object]"||(o=Object.keys(i),o.length!==1))return!1;s[t]=[o[0],i[o[0]]]}return!0}function am(e){if(e===null)return[];var t,r,i,o,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1)i=a[t],o=Object.keys(i),s[t]=[o[0],i[o[0]]];return s}var Kd=new Ne("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:sm,construct:am}),cm=Object.prototype.hasOwnProperty;function lm(e){if(e===null)return!0;var t,r=e;for(t in r)if(cm.call(r,t)&&r[t]!==null)return!1;return!0}function um(e){return e!==null?e:{}}var zd=new Ne("tag:yaml.org,2002:set",{kind:"mapping",resolve:lm,construct:um}),Ta=Md.extend({implicit:[Ld,Hd],explicit:[Fd,qd,Kd,zd]}),Mt=Object.prototype.hasOwnProperty,eo=1,Gd=2,Wd=3,to=4,Va=1,dm=2,Jd=3,fm=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,pm=/[\x85\u2028\u2029]/,hm=/[,\[\]\{\}]/,Yd=/^(?:!|!!|![a-z\-]+!)$/i,Zd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Qd(e){return Object.prototype.toString.call(e)}function yt(e){return e===10||e===13}function ar(e){return e===9||e===32}function Ke(e){return e===9||e===32||e===10||e===13}function Dr(e){return e===44||e===91||e===93||e===123||e===125}function ym(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function gm(e){return e===120?2:e===117?4:e===85?8:0}function mm(e){return 48<=e&&e<=57?e-48:-1}function Xd(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
125
125
  `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function bm(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}for(var ef=new Array(256),tf=new Array(256),Pr=0;Pr<256;Pr++)ef[Pr]=Xd(Pr)?1:0,tf[Pr]=Xd(Pr);function wm(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Ta,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function rf(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Sg(r),new Me(t,r)}function z(e,t){throw rf(e,t)}function ro(e,t){e.onWarning&&e.onWarning.call(null,rf(e,t))}var nf={YAML:function(e,t,r){var i,o,s;e.version!==null&&z(e,"duplication of %YAML directive"),r.length!==1&&z(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&z(e,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),s=parseInt(i[2],10),o!==1&&z(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&ro(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var i,o;r.length!==2&&z(e,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],Yd.test(i)||z(e,"ill-formed tag handle (first argument) of the TAG directive"),Mt.call(e.tagMap,i)&&z(e,'there is a previously declared suffix for "'+i+'" tag handle'),Zd.test(o)||z(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{z(e,"tag prefix is malformed: "+o)}e.tagMap[i]=o}};function Rt(e,t,r,i){var o,s,a,c;if(t<r){if(c=e.input.slice(t,r),i)for(o=0,s=c.length;o<s;o+=1)a=c.charCodeAt(o),a===9||32<=a&&a<=1114111||z(e,"expected valid JSON character");else fm.test(c)&&z(e,"the stream contains non-printable characters");e.result+=c}}function of(e,t,r,i){var o,s,a,c;for(xe.isObject(r)||z(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),a=0,c=o.length;a<c;a+=1)s=o[a],Mt.call(t,s)||(t[s]=r[s],i[s]=!0)}function $r(e,t,r,i,o,s,a,c,l){var d,p;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),d=0,p=o.length;d<p;d+=1)Array.isArray(o[d])&&z(e,"nested arrays are not supported inside keys"),typeof o=="object"&&Qd(o[d])==="[object Object]"&&(o[d]="[object Object]");if(typeof o=="object"&&Qd(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(d=0,p=s.length;d<p;d+=1)of(e,t,s[d],r);else of(e,t,s,r);else!e.json&&!Mt.call(r,o)&&Mt.call(t,o)&&(e.line=a||e.line,e.lineStart=c||e.lineStart,e.position=l||e.position,z(e,"duplicated mapping key")),o==="__proto__"?Object.defineProperty(t,o,{configurable:!0,enumerable:!0,writable:!0,value:s}):t[o]=s,delete r[o];return t}function ja(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):z(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function ve(e,t,r){for(var i=0,o=e.input.charCodeAt(e.position);o!==0;){for(;ar(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(yt(o))for(ja(e),o=e.input.charCodeAt(e.position),i++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&ro(e,"deficient indentation"),i}function io(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Ke(r)))}function Da(e,t){t===1?e.result+=" ":t>1&&(e.result+=xe.repeat(`
126
126
  `,t-1))}function vm(e,t,r){var i,o,s,a,c,l,d,p,y=e.kind,A=e.result,C;if(C=e.input.charCodeAt(e.position),Ke(C)||Dr(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)&&(o=e.input.charCodeAt(e.position+1),Ke(o)||r&&Dr(o)))return!1;for(e.kind="scalar",e.result="",s=a=e.position,c=!1;C!==0;){if(C===58){if(o=e.input.charCodeAt(e.position+1),Ke(o)||r&&Dr(o))break}else if(C===35){if(i=e.input.charCodeAt(e.position-1),Ke(i))break}else{if(e.position===e.lineStart&&io(e)||r&&Dr(C))break;if(yt(C))if(l=e.line,d=e.lineStart,p=e.lineIndent,ve(e,!1,-1),e.lineIndent>=t){c=!0,C=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=l,e.lineStart=d,e.lineIndent=p;break}}c&&(Rt(e,s,a,!1),Da(e,e.line-l),s=a=e.position,c=!1),ar(C)||(a=e.position+1),C=e.input.charCodeAt(++e.position)}return Rt(e,s,a,!1),e.result?!0:(e.kind=y,e.result=A,!1)}function km(e,t){var r,i,o;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Rt(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,o=e.position;else return!0;else yt(r)?(Rt(e,i,o,!0),Da(e,ve(e,!1,t)),i=o=e.position):e.position===e.lineStart&&io(e)?z(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);z(e,"unexpected end of the stream within a single quoted scalar")}function Cm(e,t){var r,i,o,s,a,c;if(c=e.input.charCodeAt(e.position),c!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(c=e.input.charCodeAt(e.position))!==0;){if(c===34)return Rt(e,r,e.position,!0),e.position++,!0;if(c===92){if(Rt(e,r,e.position,!0),c=e.input.charCodeAt(++e.position),yt(c))ve(e,!1,t);else if(c<256&&ef[c])e.result+=tf[c],e.position++;else if((a=gm(c))>0){for(o=a,s=0;o>0;o--)c=e.input.charCodeAt(++e.position),(a=ym(c))>=0?s=(s<<4)+a:z(e,"expected hexadecimal character");e.result+=bm(s),e.position++}else z(e,"unknown escape sequence");r=i=e.position}else yt(c)?(Rt(e,r,i,!0),Da(e,ve(e,!1,t)),r=i=e.position):e.position===e.lineStart&&io(e)?z(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}z(e,"unexpected end of the stream within a double quoted scalar")}function Sm(e,t){var r=!0,i,o,s,a=e.tag,c,l=e.anchor,d,p,y,A,C,h=Object.create(null),g,m,v,b;if(b=e.input.charCodeAt(e.position),b===91)p=93,C=!1,c=[];else if(b===123)p=125,C=!0,c={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),b=e.input.charCodeAt(++e.position);b!==0;){if(ve(e,!0,t),b=e.input.charCodeAt(e.position),b===p)return e.position++,e.tag=a,e.anchor=l,e.kind=C?"mapping":"sequence",e.result=c,!0;r?b===44&&z(e,"expected the node content, but found ','"):z(e,"missed comma between flow collection entries"),m=g=v=null,y=A=!1,b===63&&(d=e.input.charCodeAt(e.position+1),Ke(d)&&(y=A=!0,e.position++,ve(e,!0,t))),i=e.line,o=e.lineStart,s=e.position,Mr(e,t,eo,!1,!0),m=e.tag,g=e.result,ve(e,!0,t),b=e.input.charCodeAt(e.position),(A||e.line===i)&&b===58&&(y=!0,b=e.input.charCodeAt(++e.position),ve(e,!0,t),Mr(e,t,eo,!1,!0),v=e.result),C?$r(e,c,h,m,g,v,i,o,s):y?c.push($r(e,null,h,m,g,v,i,o,s)):c.push(g),ve(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}z(e,"unexpected end of the stream within a flow collection")}function xm(e,t){var r,i,o=Va,s=!1,a=!1,c=t,l=0,d=!1,p,y;if(y=e.input.charCodeAt(e.position),y===124)i=!1;else if(y===62)i=!0;else return!1;for(e.kind="scalar",e.result="";y!==0;)if(y=e.input.charCodeAt(++e.position),y===43||y===45)Va===o?o=y===43?Jd:dm:z(e,"repeat of a chomping mode identifier");else if((p=mm(y))>=0)p===0?z(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?z(e,"repeat of an indentation width identifier"):(c=t+p-1,a=!0);else break;if(ar(y)){do y=e.input.charCodeAt(++e.position);while(ar(y));if(y===35)do y=e.input.charCodeAt(++e.position);while(!yt(y)&&y!==0)}for(;y!==0;){for(ja(e),e.lineIndent=0,y=e.input.charCodeAt(e.position);(!a||e.lineIndent<c)&&y===32;)e.lineIndent++,y=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>c&&(c=e.lineIndent),yt(y)){l++;continue}if(e.lineIndent<c){o===Jd?e.result+=xe.repeat(`
127
127
  `,s?1+l:l):o===Va&&s&&(e.result+=`
@@ -130,7 +130,7 @@ ${t.join(`
130
130
  `,l+1)):l===0?s&&(e.result+=" "):e.result+=xe.repeat(`
131
131
  `,l):e.result+=xe.repeat(`
132
132
  `,s?1+l:l),s=!0,a=!0,l=0,r=e.position;!yt(y)&&y!==0;)y=e.input.charCodeAt(++e.position);Rt(e,r,e.position,!1)}return!0}function sf(e,t){var r,i=e.tag,o=e.anchor,s=[],a,c=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,z(e,"tab characters must not be used in indentation")),!(l!==45||(a=e.input.charCodeAt(e.position+1),!Ke(a))));){if(c=!0,e.position++,ve(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Mr(e,t,Wd,!1,!0),s.push(e.result),ve(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)z(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return c?(e.tag=i,e.anchor=o,e.kind="sequence",e.result=s,!0):!1}function Am(e,t,r){var i,o,s,a,c,l,d=e.tag,p=e.anchor,y={},A=Object.create(null),C=null,h=null,g=null,m=!1,v=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=y),b=e.input.charCodeAt(e.position);b!==0;){if(!m&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,z(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(b===63||b===58)&&Ke(i))b===63?(m&&($r(e,y,A,C,h,null,a,c,l),C=h=g=null),v=!0,m=!0,o=!0):m?(m=!1,o=!0):z(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(a=e.line,c=e.lineStart,l=e.position,!Mr(e,r,Gd,!1,!0))break;if(e.line===s){for(b=e.input.charCodeAt(e.position);ar(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Ke(b)||z(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&($r(e,y,A,C,h,null,a,c,l),C=h=g=null),v=!0,m=!1,o=!1,C=e.tag,h=e.result;else if(v)z(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=d,e.anchor=p,!0}else if(v)z(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=d,e.anchor=p,!0}if((e.line===s||e.lineIndent>t)&&(m&&(a=e.line,c=e.lineStart,l=e.position),Mr(e,t,to,!0,o)&&(m?h=e.result:g=e.result),m||($r(e,y,A,C,h,g,a,c,l),C=h=g=null),ve(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&b!==0)z(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&$r(e,y,A,C,h,null,a,c,l),v&&(e.tag=d,e.anchor=p,e.kind="mapping",e.result=y),v}function Bm(e){var t,r=!1,i=!1,o,s,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&z(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(i=!0,o="!!",a=e.input.charCodeAt(++e.position)):o="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(s=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):z(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Ke(a);)a===33&&(i?z(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),Yd.test(o)||z(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),hm.test(s)&&z(e,"tag suffix cannot contain flow indicator characters")}s&&!Zd.test(s)&&z(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{z(e,"tag name is malformed: "+s)}return r?e.tag=s:Mt.call(e.tagMap,o)?e.tag=e.tagMap[o]+s:o==="!"?e.tag="!"+s:o==="!!"?e.tag="tag:yaml.org,2002:"+s:z(e,'undeclared tag handle "'+o+'"'),!0}function Im(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&z(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Ke(r)&&!Dr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&z(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Em(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Ke(i)&&!Dr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&z(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Mt.call(e.anchorMap,r)||z(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],ve(e,!0,-1),!0}function Mr(e,t,r,i,o){var s,a,c,l=1,d=!1,p=!1,y,A,C,h,g,m;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=a=c=to===r||Wd===r,i&&ve(e,!0,-1)&&(d=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Bm(e)||Im(e);)ve(e,!0,-1)?(d=!0,c=s,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):c=!1;if(c&&(c=d||o),(l===1||to===r)&&(eo===r||Gd===r?g=t:g=t+1,m=e.position-e.lineStart,l===1?c&&(sf(e,m)||Am(e,m,g))||Sm(e,g)?p=!0:(a&&xm(e,g)||km(e,g)||Cm(e,g)?p=!0:Em(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&z(e,"alias node should not have any properties")):vm(e,g,eo===r)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(p=c&&sf(e,m))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&z(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),y=0,A=e.implicitTypes.length;y<A;y+=1)if(h=e.implicitTypes[y],h.resolve(e.result)){e.result=h.construct(e.result),e.tag=h.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Mt.call(e.typeMap[e.kind||"fallback"],e.tag))h=e.typeMap[e.kind||"fallback"][e.tag];else for(h=null,C=e.typeMap.multi[e.kind||"fallback"],y=0,A=C.length;y<A;y+=1)if(e.tag.slice(0,C[y].tag.length)===C[y].tag){h=C[y];break}h||z(e,"unknown tag !<"+e.tag+">"),e.result!==null&&h.kind!==e.kind&&z(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+h.kind+'", not "'+e.kind+'"'),h.resolve(e.result,e.tag)?(e.result=h.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):z(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}function Nm(e){var t=e.position,r,i,o,s=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(ve(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(s=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!Ke(a);)a=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),o=[],i.length<1&&z(e,"directive name must not be less than one character in length");a!==0;){for(;ar(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!yt(a));break}if(yt(a))break;for(r=e.position;a!==0&&!Ke(a);)a=e.input.charCodeAt(++e.position);o.push(e.input.slice(r,e.position))}a!==0&&ja(e),Mt.call(nf,i)?nf[i](e,i,o):ro(e,'unknown document directive "'+i+'"')}if(ve(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,ve(e,!0,-1)):s&&z(e,"directives end mark is expected"),Mr(e,e.lineIndent-1,to,!1,!0),ve(e,!0,-1),e.checkLineBreaks&&pm.test(e.input.slice(t,e.position))&&ro(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&io(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,ve(e,!0,-1));return}if(e.position<e.length-1)z(e,"end of the stream or a document separator is expected");else return}function af(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
133
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new wm(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,z(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Nm(r);return r.documents}function _m(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=af(e,r);if(typeof t!="function")return i;for(var o=0,s=i.length;o<s;o+=1)t(i[o])}function Om(e,t){var r=af(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Me("expected a single document in the stream, but found more")}}var Tm=_m,Vm=Om,cf={loadAll:Tm,load:Vm},lf=Object.prototype.toString,uf=Object.prototype.hasOwnProperty,Pa=65279,jm=9,xi=10,Dm=13,Pm=32,$m=33,Mm=34,$a=35,Rm=37,Um=38,Lm=39,Hm=42,df=44,Fm=45,no=58,qm=61,Km=62,zm=63,Gm=64,ff=91,pf=93,Wm=96,hf=123,Jm=124,yf=125,De={};De[0]="\\0",De[7]="\\a",De[8]="\\b",De[9]="\\t",De[10]="\\n",De[11]="\\v",De[12]="\\f",De[13]="\\r",De[27]="\\e",De[34]='\\"',De[92]="\\\\",De[133]="\\N",De[160]="\\_",De[8232]="\\L",De[8233]="\\P";var Ym=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Zm=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Qm(e,t){var r,i,o,s,a,c,l;if(t===null)return{};for(r={},i=Object.keys(t),o=0,s=i.length;o<s;o+=1)a=i[o],c=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),l=e.compiledTypeMap.fallback[a],l&&uf.call(l.styleAliases,c)&&(c=l.styleAliases[c]),r[a]=c;return r}function Xm(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Me("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+xe.repeat("0",i-t.length)+t}var e0=1,Ai=2;function t0(e){this.schema=e.schema||Ta,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=xe.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Qm(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Ai:e0,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function gf(e,t){for(var r=xe.repeat(" ",t),i=0,o=-1,s="",a,c=e.length;i<c;)o=e.indexOf(`
133
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new wm(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,z(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Nm(r);return r.documents}function _m(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=af(e,r);if(typeof t!="function")return i;for(var o=0,s=i.length;o<s;o+=1)t(i[o])}function Om(e,t){var r=af(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Me("expected a single document in the stream, but found more")}}var Tm=_m,Vm=Om,cf={loadAll:Tm,load:Vm},lf=Object.prototype.toString,uf=Object.prototype.hasOwnProperty,Pa=65279,jm=9,xi=10,Dm=13,Pm=32,$m=33,Mm=34,$a=35,Rm=37,Um=38,Lm=39,Hm=42,df=44,Fm=45,no=58,qm=61,Km=62,zm=63,Gm=64,ff=91,pf=93,Wm=96,hf=123,Jm=124,yf=125,je={};je[0]="\\0",je[7]="\\a",je[8]="\\b",je[9]="\\t",je[10]="\\n",je[11]="\\v",je[12]="\\f",je[13]="\\r",je[27]="\\e",je[34]='\\"',je[92]="\\\\",je[133]="\\N",je[160]="\\_",je[8232]="\\L",je[8233]="\\P";var Ym=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Zm=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Qm(e,t){var r,i,o,s,a,c,l;if(t===null)return{};for(r={},i=Object.keys(t),o=0,s=i.length;o<s;o+=1)a=i[o],c=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),l=e.compiledTypeMap.fallback[a],l&&uf.call(l.styleAliases,c)&&(c=l.styleAliases[c]),r[a]=c;return r}function Xm(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Me("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+xe.repeat("0",i-t.length)+t}var e0=1,Ai=2;function t0(e){this.schema=e.schema||Ta,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=xe.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Qm(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Ai:e0,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function gf(e,t){for(var r=xe.repeat(" ",t),i=0,o=-1,s="",a,c=e.length;i<c;)o=e.indexOf(`
134
134
  `,i),o===-1?(a=e.slice(i),i=c):(a=e.slice(i,o+1),i=o+1),a.length&&a!==`
135
135
  `&&(s+=r),s+=a;return s}function Ma(e,t){return`
136
136
  `+xe.repeat(" ",e.indent*t)}function r0(e,t){var r,i,o;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(o=e.implicitTypes[r],o.resolve(t))return!0;return!1}function oo(e){return e===Pm||e===jm}function Bi(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Pa||65536<=e&&e<=1114111}function mf(e){return Bi(e)&&e!==Pa&&e!==Dm&&e!==xi}function bf(e,t,r){var i=mf(e),o=i&&!oo(e);return(r?i:i&&e!==df&&e!==ff&&e!==pf&&e!==hf&&e!==yf)&&e!==$a&&!(t===no&&!o)||mf(t)&&!oo(t)&&e===$a||t===no&&o}function i0(e){return Bi(e)&&e!==Pa&&!oo(e)&&e!==Fm&&e!==zm&&e!==no&&e!==df&&e!==ff&&e!==pf&&e!==hf&&e!==yf&&e!==$a&&e!==Um&&e!==Hm&&e!==$m&&e!==Jm&&e!==qm&&e!==Km&&e!==Lm&&e!==Mm&&e!==Rm&&e!==Gm&&e!==Wm}function n0(e){return!oo(e)&&e!==no}function Ii(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function wf(e){var t=/^\n* /;return t.test(e)}var vf=1,Ra=2,kf=3,Cf=4,Rr=5;function o0(e,t,r,i,o,s,a,c){var l,d=0,p=null,y=!1,A=!1,C=i!==-1,h=-1,g=i0(Ii(e,0))&&n0(Ii(e,e.length-1));if(t||a)for(l=0;l<e.length;d>=65536?l+=2:l++){if(d=Ii(e,l),!Bi(d))return Rr;g=g&&bf(d,p,c),p=d}else{for(l=0;l<e.length;d>=65536?l+=2:l++){if(d=Ii(e,l),d===xi)y=!0,C&&(A=A||l-h-1>i&&e[h+1]!==" ",h=l);else if(!Bi(d))return Rr;g=g&&bf(d,p,c),p=d}A=A||C&&l-h-1>i&&e[h+1]!==" "}return!y&&!A?g&&!a&&!o(e)?vf:s===Ai?Rr:Ra:r>9&&wf(e)?Rr:a?s===Ai?Rr:Ra:A?Cf:kf}function s0(e,t,r,i,o){e.dump=function(){if(t.length===0)return e.quotingType===Ai?'""':"''";if(!e.noCompatMode&&(Ym.indexOf(t)!==-1||Zm.test(t)))return e.quotingType===Ai?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),c=i||e.flowLevel>-1&&r>=e.flowLevel;function l(d){return r0(e,d)}switch(o0(t,c,e.indent,a,l,e.quotingType,e.forceQuotes&&!i,o)){case vf:return t;case Ra:return"'"+t.replace(/'/g,"''")+"'";case kf:return"|"+Sf(t,e.indent)+xf(gf(t,s));case Cf:return">"+Sf(t,e.indent)+xf(gf(a0(t,a),s));case Rr:return'"'+c0(t)+'"';default:throw new Me("impossible error: invalid scalar style")}}()}function Sf(e,t){var r=wf(e)?String(t):"",i=e[e.length-1]===`
@@ -144,5 +144,5 @@ ${t.join(`
144
144
  `:"")+Af(l,t),o=s}return i}function Af(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,o=0,s,a=0,c=0,l="";i=r.exec(e);)c=i.index,c-o>t&&(s=a>o?a:c,l+=`
145
145
  `+e.slice(o,s),o=s+1),a=c;return l+=`
146
146
  `,e.length-o>t&&a>o?l+=e.slice(o,a)+`
147
- `+e.slice(a+1):l+=e.slice(o),l.slice(1)}function c0(e){for(var t="",r=0,i,o=0;o<e.length;r>=65536?o+=2:o++)r=Ii(e,o),i=De[r],!i&&Bi(r)?(t+=e[o],r>=65536&&(t+=e[o+1])):t+=i||Xm(r);return t}function l0(e,t,r){var i="",o=e.tag,s,a,c;for(s=0,a=r.length;s<a;s+=1)c=r[s],e.replacer&&(c=e.replacer.call(r,String(s),c)),(Et(e,t,c,!1,!1)||typeof c>"u"&&Et(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=o,e.dump="["+i+"]"}function Bf(e,t,r,i){var o="",s=e.tag,a,c,l;for(a=0,c=r.length;a<c;a+=1)l=r[a],e.replacer&&(l=e.replacer.call(r,String(a),l)),(Et(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Et(e,t+1,null,!0,!0,!1,!0))&&((!i||o!=="")&&(o+=Ma(e,t)),e.dump&&xi===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=s,e.dump=o||"[]"}function u0(e,t,r){var i="",o=e.tag,s=Object.keys(r),a,c,l,d,p;for(a=0,c=s.length;a<c;a+=1)p="",i!==""&&(p+=", "),e.condenseFlow&&(p+='"'),l=s[a],d=r[l],e.replacer&&(d=e.replacer.call(r,l,d)),Et(e,t,l,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Et(e,t,d,!1,!1)&&(p+=e.dump,i+=p));e.tag=o,e.dump="{"+i+"}"}function d0(e,t,r,i){var o="",s=e.tag,a=Object.keys(r),c,l,d,p,y,A;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new Me("sortKeys must be a boolean or a function");for(c=0,l=a.length;c<l;c+=1)A="",(!i||o!=="")&&(A+=Ma(e,t)),d=a[c],p=r[d],e.replacer&&(p=e.replacer.call(r,d,p)),Et(e,t+1,d,!0,!0,!0)&&(y=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,y&&(e.dump&&xi===e.dump.charCodeAt(0)?A+="?":A+="? "),A+=e.dump,y&&(A+=Ma(e,t)),Et(e,t+1,p,!0,y)&&(e.dump&&xi===e.dump.charCodeAt(0)?A+=":":A+=": ",A+=e.dump,o+=A));e.tag=s,e.dump=o||"{}"}function If(e,t,r){var i,o,s,a,c,l;for(o=r?e.explicitTypes:e.implicitTypes,s=0,a=o.length;s<a;s+=1)if(c=o[s],(c.instanceOf||c.predicate)&&(!c.instanceOf||typeof t=="object"&&t instanceof c.instanceOf)&&(!c.predicate||c.predicate(t))){if(r?c.multi&&c.representName?e.tag=c.representName(t):e.tag=c.tag:e.tag="?",c.represent){if(l=e.styleMap[c.tag]||c.defaultStyle,lf.call(c.represent)==="[object Function]")i=c.represent(t,l);else if(uf.call(c.represent,l))i=c.represent[l](t,l);else throw new Me("!<"+c.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}function Et(e,t,r,i,o,s,a){e.tag=null,e.dump=r,If(e,r,!1)||If(e,r,!0);var c=lf.call(e.dump),l=i,d;i&&(i=e.flowLevel<0||e.flowLevel>t);var p=c==="[object Object]"||c==="[object Array]",y,A;if(p&&(y=e.duplicates.indexOf(r),A=y!==-1),(e.tag!==null&&e.tag!=="?"||A||e.indent!==2&&t>0)&&(o=!1),A&&e.usedDuplicates[y])e.dump="*ref_"+y;else{if(p&&A&&!e.usedDuplicates[y]&&(e.usedDuplicates[y]=!0),c==="[object Object]")i&&Object.keys(e.dump).length!==0?(d0(e,t,e.dump,o),A&&(e.dump="&ref_"+y+e.dump)):(u0(e,t,e.dump),A&&(e.dump="&ref_"+y+" "+e.dump));else if(c==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?Bf(e,t-1,e.dump,o):Bf(e,t,e.dump,o),A&&(e.dump="&ref_"+y+e.dump)):(l0(e,t,e.dump),A&&(e.dump="&ref_"+y+" "+e.dump));else if(c==="[object String]")e.tag!=="?"&&s0(e,e.dump,t,s,l);else{if(c==="[object Undefined]"||e.skipInvalid)return!1;throw new Me("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}function f0(e,t){var r=[],i=[],o,s;for(Ua(e,r,i),o=0,s=i.length;o<s;o+=1)t.duplicates.push(r[i[o]]);t.usedDuplicates=new Array(s)}function Ua(e,t,r){var i,o,s;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(t.push(e),Array.isArray(e))for(o=0,s=e.length;o<s;o+=1)Ua(e[o],t,r);else for(i=Object.keys(e),o=0,s=i.length;o<s;o+=1)Ua(e[i[o]],t,r)}function p0(e,t){t=t||{};var r=new t0(t);r.noRefs||f0(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Et(r,0,i,!0,!0)?r.dump+`
148
- `:""}var h0=p0,y0={dump:h0};function La(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var g0=_e,m0=Ed,b0=Td,w0=$d,v0=Md,k0=Ta,C0=cf.load,S0=cf.loadAll,x0=y0.dump,A0=Me,B0={binary:Fd,float:Pd,map:Od,null:Vd,pairs:Kd,set:zd,timestamp:Ld,bool:jd,int:Dd,merge:Hd,omap:qd,seq:_d,str:Nd},I0=La("safeLoad","load"),E0=La("safeLoadAll","loadAll"),N0=La("safeDump","dump"),_0={Type:g0,Schema:m0,FAILSAFE_SCHEMA:b0,JSON_SCHEMA:w0,CORE_SCHEMA:v0,DEFAULT_SCHEMA:k0,load:C0,loadAll:S0,dump:x0,YAMLException:A0,types:B0,safeLoad:I0,safeLoadAll:E0,safeDump:N0};const O0={key:0,class:"config-card-display-form"},T0=["data-testid"],V0={key:0,class:"config-card-prop-section-title"},j0={key:1,class:"config-card-display-json"},D0={key:2,class:"config-card-display-yaml"},P0=st(n.defineComponent({__name:"ConfigCardDisplay",props:{propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:e=>["structured","yaml","json"].includes(e)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>null}},setup(e){const t=e,r=n.useSlots(),{i18n:{t:i}}=Ie.useI18n(),o=c=>!!(c.tooltip||r[`${c.key}-label-tooltip`]),s=n.ref(""),a=n.ref("");return n.watch(()=>t.format,c=>{if(c!=="structured"){const l=JSON.parse(JSON.stringify(t.record));delete l.created_at,delete l.updated_at,c==="json"?s.value=JSON.stringify(l,null,2):c==="yaml"&&(a.value=_0.dump(l))}},{immediate:!0}),(c,l)=>{const d=n.resolveComponent("KCodeBlock");return n.openBlock(),n.createElementBlock(n.Fragment,null,[e.format==="structured"?(n.openBlock(),n.createElementBlock("div",O0,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.propListTypes,p=>(n.openBlock(),n.createElementBlock("div",{key:`config-card-details-${p}-props`,class:n.normalizeClass(`config-card-details-${p}-props`),"data-testid":`config-card-details-${p}-props`},[p!=="basic"?(n.openBlock(),n.createElementBlock("div",V0,n.toDisplayString(p==="advanced"?n.unref(i)("baseConfigCard.sections.advanced"):n.unref(i)("baseConfigCard.sections.plugin")),1)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.propertyCollections[p],y=>(n.openBlock(),n.createBlock(Ci,{key:y.key,item:y},n.createSlots({label:n.withCtx(()=>[n.renderSlot(c.$slots,`${y.key}-label`,{row:y},void 0,!0)]),[y.key]:n.withCtx(({rowValue:A})=>[n.renderSlot(c.$slots,y.key,{row:y,rowValue:A},void 0,!0)]),_:2},[o(y)?{name:"label-tooltip",fn:n.withCtx(()=>[n.renderSlot(c.$slots,`${y.key}-label-tooltip`,{row:y},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,T0))),128))])):n.createCommentVNode("",!0),e.format==="json"?(n.openBlock(),n.createElementBlock("div",j0,[n.createVNode(d,{id:"config-card-codeblock",code:s.value,language:"json",theme:"dark"},null,8,["code"])])):n.createCommentVNode("",!0),e.format==="yaml"?(n.openBlock(),n.createElementBlock("div",D0,[n.createVNode(d,{id:"config-card-codeblock",code:a.value,language:"yaml",theme:"dark"},null,8,["code"])])):n.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-c914c7e4"]]),Ef="24px",$0=(e,t)=>{const r=e.__vccOpts||e;for(const[i,o]of t)r[i]=o;return r},M0=e=>(n.pushScopeId("data-v-81457922"),e=e(),n.popScopeId(),e),R0=["aria-hidden"],U0={key:0,"data-testid":"kui-icon-svg-title"},L0=M0(()=>n.createElementVNode("path",{d:"M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",fill:"currentColor"},null,-1)),H0=n.defineComponent({__name:"BookIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Ef,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const t=String(e).replace(/px/gi,""),r=Number(t);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const t=e,r=n.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const o=String(t.size).replace(/px/gi,""),s=Number(o);if(s&&!isNaN(s)&&Number.isInteger(s)&&s>0)return`${s}px`}return Ef}),i=n.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:r.value,lineHeight:"0",width:r.value}));return(o,s)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon book-icon","data-testid":"kui-icon-wrapper-book-icon",style:n.normalizeStyle(i.value)},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-book-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(n.openBlock(),n.createElementBlock("title",U0,n.toDisplayString(e.title),1)):n.createCommentVNode("",!0),L0],8,R0))]),_:1},8,["aria-hidden","style"]))}}),F0=$0(H0,[["__scopeId","data-v-81457922"]]),q0={"data-testid":"config-card-title"},K0={class:"config-card-actions"},z0=["href"],G0={key:2,class:"config-card-details-section"},W0={key:3,class:"config-card-details-section"},J0=["data-testid"],Y0={key:0,class:"config-card-prop-section-title"},Nf=st(n.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1}},emits:["loading","fetch:success","fetch:error","copy:success","copy:error"],setup(e,{emit:t}){var r;const i=e,o=n.useSlots(),{i18n:{t:s}}=Ie.useI18n(),{getMessageFromError:a}=Ie.useErrors(),{convertKeyToTitle:c}=Ie.useStringHelpers(),{axiosInstance:l}=Ie.useAxios({headers:(r=i.config)==null?void 0:r.requestHeaders}),d=[{label:s("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:"JSON",value:"json"},{label:"YAML",value:"yaml"}],p=n.ref("structured"),y=E=>{p.value=E==null?void 0:E.value},A={id:{type:ne.ID,label:s("baseConfigCard.commonFields.id_label"),order:0,section:ue.Basic},name:{order:1,section:ue.Basic},enabled:{type:ne.BadgeStatus,order:2,section:ue.Basic},updated_at:{type:ne.Date,label:s("baseConfigCard.commonFields.updated_at_label"),order:3,section:ue.Basic},created_at:{type:ne.Date,label:s("baseConfigCard.commonFields.created_at_label"),order:4,section:ue.Basic},tags:{type:ne.BadgeTag,order:-1,section:ue.Basic}},C=n.ref(!1),h=n.ref(!1),g=n.ref(""),m=n.ref(),v=n.computed(()=>{var E,M,q;if(!m.value)return[];const U=[],P=Object.keys(m.value).length;for(const V in m.value){const te=(M=(E=i.configSchema)==null?void 0:E[V])==null?void 0:M.order,le=(q=A[V])==null?void 0:q.order;let be=P;(le||le===0)&&(be=le===-1?P+1:le),te&&(be=te===-1?P+1:te),U.push([V,be])}return U.sort(function(V,te){return V[1]-te[1]}),U.map(V=>{var te,le;const be=V[0],de=(te=m.value)==null?void 0:te[be],fe=((le=i.configSchema)==null?void 0:le[be])||{},ke=A[be];return{key:be,value:de,hidden:fe.hidden||!1,type:fe.type??((ke==null?void 0:ke.type)||ne.Text),label:fe.label??((ke==null?void 0:ke.label)||c(be)),tooltip:fe.tooltip??((ke==null?void 0:ke.tooltip)||void 0),section:fe.section??((ke==null?void 0:ke.section)||ue.Advanced)}}).filter(V=>!V.hidden&&V.key!==i.pluginConfigKey)}),b=n.computed(()=>{var E,M;if(!m.value||!i.pluginConfigKey)return[];const q=m.value[i.pluginConfigKey]||{},U=Object.keys(q).length,P=[];for(const V in q){const te=(M=(E=i.pluginConfigSchema)==null?void 0:E[V])==null?void 0:M.order,le=q[V];let be=le!=null&&le!==""?U-1:U;te&&(be=te===-1?U+1:te),P.push([V,be])}return P.sort(function(V,te){return V[1]-te[1]}),P.map(V=>{var te;const le=V[0],be=q[le],de=((te=i.pluginConfigSchema)==null?void 0:te[le])||{};return{key:le,value:be,hidden:de.hidden||!1,type:de.type??ne.Text,label:de.label??c(le),tooltip:de.tooltip??void 0,section:ue.Plugin}}).filter(V=>!V.hidden)}),w=n.computed(()=>{var E,M,q,U;return{basic:(E=v.value)==null?void 0:E.filter(P=>P.section===ue.Basic),advanced:(M=v.value)==null?void 0:M.filter(P=>P.section===ue.Advanced),plugin:(U=b.value)==null?void 0:U.concat((q=v.value)==null?void 0:q.filter(P=>P.section===ue.Plugin))}}),x=n.computed(()=>{const E=[];return w.value.basic.length&&E.push("basic"),w.value.advanced.length&&E.push("advanced"),w.value.plugin.length&&E.push("plugin"),E}),F=E=>!!(E.tooltip||o[`${E.key}-label-tooltip`]),Z=n.computed(()=>{var E,M;let q=`${i.config.apiBaseUrl}${i.fetchUrl}`;return i.config.app==="konnect"?q=q.replace(/{controlPlaneId}/gi,((E=i.config)==null?void 0:E.controlPlaneId)||""):i.config.app==="kongManager"&&(q=q.replace(/\/{workspace}/gi,(M=i.config)!=null&&M.workspace?`/${i.config.workspace}`:"")),q=q.replace(/{id}/gi,i.config.entityId),q}),I=E=>{m.value&&E(JSON.stringify(m.value))?t("copy:success",m.value):t("copy:error")};return n.watch(C,E=>{t("loading",E)},{immediate:!0}),n.onBeforeMount(async()=>{h.value=!1,C.value=!0;try{const{data:E}=await l.get(Z.value);if(i.dataKey)if(typeof E[i.dataKey]<"u")m.value={...E[i.dataKey]};else throw new Error(s("errors.dataKeyUndefined",{dataKey:i.dataKey}));else m.value={...E};Object.keys(i.configSchema).filter(M=>i.configSchema[M].forceShow).forEach(M=>{m.value&&typeof m.value[M]>"u"&&(m.value[M]=null)}),t("fetch:success",E)}catch(E){const M=a(E);g.value=M.startsWith("code")?s("baseConfigCard.errors.load"):M,h.value=!0,t("fetch:error",E)}finally{C.value=!1}}),(E,M)=>{const q=n.resolveComponent("KLabel"),U=n.resolveComponent("KSelect"),P=n.resolveComponent("KButton"),V=n.resolveComponent("KClipboardProvider"),te=n.resolveComponent("KSkeleton"),le=n.resolveComponent("KEmptyState"),be=n.resolveComponent("KCard");return n.openBlock(),n.createBlock(be,{class:"kong-ui-entity-base-config-card"},n.createSlots({actions:n.withCtx(()=>[n.createElementVNode("div",K0,[n.renderSlot(E.$slots,"actions",{},void 0,!0),e.config.jsonYamlEnabled?(n.openBlock(),n.createBlock(q,{key:0,class:"config-format-select-label","data-testid":"config-format-select-label"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.label),1)]),_:1})):n.createCommentVNode("",!0),e.config.jsonYamlEnabled?(n.openBlock(),n.createBlock(U,{key:1,appearance:"select","data-testid":"select-config-format",items:d,onChange:y})):n.createCommentVNode("",!0),i.config.jsonYamlEnabled&&e.configCardDoc?(n.openBlock(),n.createBlock(P,{key:2,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:n.withCtx(()=>[n.createElementVNode("a",{href:e.configCardDoc,rel:"noopener",target:"_blank"},[n.createVNode(n.unref(F0),{size:n.unref(Qy)},null,8,["size"])],8,z0)]),_:1})):n.createCommentVNode("",!0),e.config.jsonYamlEnabled?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(V,{key:3},{default:n.withCtx(({copyToClipboard:de})=>[!C.value&&!h.value?(n.openBlock(),n.createBlock(P,{key:0,appearance:"tertiary","data-testid":"json-copy-button",onClick:fe=>I(de)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(s)("baseConfigCard.actions.copy")),1)]),_:2},1032,["onClick"])):n.createCommentVNode("",!0)]),_:1}))])]),body:n.withCtx(()=>[C.value?(n.openBlock(),n.createBlock(te,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):h.value?(n.openBlock(),n.createBlock(le,{key:1,"data-testid":"config-card-fetch-error","is-error":""},{message:n.withCtx(()=>[n.createElementVNode("h3",null,n.toDisplayString(g.value),1)]),_:1})):n.createCommentVNode("",!0),e.config.jsonYamlEnabled?(n.openBlock(),n.createElementBlock("div",G0,[n.createVNode(P0,{format:p.value,"prop-list-types":x.value,"property-collections":w.value,record:m.value},n.createSlots({_:2},[n.renderList(Object.keys(E.$slots),de=>({name:de,fn:n.withCtx(({row:fe,rowValue:ke})=>[n.renderSlot(E.$slots,de,{row:fe,rowValue:ke},void 0,!0)])}))]),1032,["format","prop-list-types","property-collections","record"])])):(n.openBlock(),n.createElementBlock("div",W0,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(x.value,de=>(n.openBlock(),n.createElementBlock("div",{key:`config-card-details-${de}-props`,class:n.normalizeClass(`config-card-details-${de}-props`),"data-testid":`config-card-details-${de}-props`},[de!=="basic"?(n.openBlock(),n.createElementBlock("div",Y0,n.toDisplayString(de==="advanced"?n.unref(s)("baseConfigCard.sections.advanced"):n.unref(s)("baseConfigCard.sections.plugin")),1)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(w.value[de],fe=>(n.openBlock(),n.createBlock(Ci,{key:fe.key,item:fe},n.createSlots({label:n.withCtx(()=>[n.renderSlot(E.$slots,`${fe.key}-label`,{row:fe},void 0,!0)]),[fe.key]:n.withCtx(({rowValue:ke})=>[n.renderSlot(E.$slots,fe.key,{row:fe,rowValue:ke},void 0,!0)]),_:2},[F(fe)?{name:"label-tooltip",fn:n.withCtx(()=>[n.renderSlot(E.$slots,`${fe.key}-label-tooltip`,{row:fe},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,J0))),128))]))]),_:2},[e.hideTitle?void 0:{name:"title",fn:n.withCtx(()=>[n.createElementVNode("div",q0,[n.renderSlot(E.$slots,"title",{},()=>[n.createTextVNode(n.toDisplayString(n.unref(s)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1024)}}}),[["__scopeId","data-v-b3999889"]]),Z0=["onReset","onSubmit"],Q0={class:"form-actions","data-testid":"form-actions"},_f=st(n.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},editId:{type:String,required:!1,default:""},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(e,{emit:t}){var r;const i=e,o=Hr.useRouter(),{i18n:{t:s}}=Ie.useI18n(),{getMessageFromError:a}=Ie.useErrors(),{axiosInstance:c}=Ie.useAxios({headers:(r=i.config)==null?void 0:r.requestHeaders}),l=n.ref(!1),d=n.ref(!1),p=n.ref(""),y=n.computed(()=>i.canSubmit===!1||i.isReadonly),A=n.computed(()=>{var m,v;if(!i.editId)return"";let b=`${i.config.apiBaseUrl}${i.fetchUrl}`;return i.config.app==="konnect"?b=b.replace(/{controlPlaneId}/gi,((m=i.config)==null?void 0:m.controlPlaneId)||""):i.config.app==="kongManager"&&(b=b.replace(/\/{workspace}/gi,(v=i.config)!=null&&v.workspace?`/${i.config.workspace}`:"")),b=b.replace(/{id}/gi,i.editId),b}),C=()=>{i.config.cancelRoute?o.push(i.config.cancelRoute):h()},h=()=>{t("cancel")},g=()=>{y.value||t("submit")};return n.watch(()=>l.value,m=>{t("loading",m)},{immediate:!0}),n.onBeforeMount(async()=>{if(i.editId)try{d.value=!1,l.value=!0;const{data:m}=await c.get(A.value);t("fetch:success",m)}catch(m){const v=a(m);p.value=v.startsWith("code")?s("baseForm.errors.edit"):v,d.value=!0,t("fetch:error",m)}finally{l.value=!1}}),(m,v)=>{const b=n.resolveComponent("KSkeleton"),w=n.resolveComponent("KEmptyState"),x=n.resolveComponent("KAlert"),F=n.resolveComponent("KButton"),Z=n.resolveComponent("KCard");return n.openBlock(),n.createBlock(Z,{class:"kong-ui-entity-base-form"},{body:n.withCtx(()=>[l.value?(n.openBlock(),n.createBlock(b,{key:0,type:"form"})):d.value?(n.openBlock(),n.createBlock(w,{key:1,"cta-text":n.unref(s)("baseForm.actions.back"),"data-testid":"form-fetch-error","handle-click":C,"is-error":!0},{message:n.withCtx(()=>[n.createElementVNode("h3",null,n.toDisplayString(p.value),1)]),_:1},8,["cta-text"])):(n.openBlock(),n.createElementBlock("form",{key:2,"data-testid":"form-content",onReset:n.withModifiers(h,["prevent"]),onSubmit:n.withModifiers(g,["prevent"])},[n.renderSlot(m.$slots,"default",{},void 0,!0),e.errorMessage?(n.openBlock(),n.createBlock(x,{key:0,"alert-message":e.errorMessage,appearance:"danger","data-testid":"form-error"},null,8,["alert-message"])):n.createCommentVNode("",!0),n.createElementVNode("div",Q0,[n.renderSlot(m.$slots,"form-actions",{},()=>[n.createVNode(F,{appearance:"secondary","data-testid":"form-cancel",disabled:e.isReadonly,type:"reset"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(s)("baseForm.actions.cancel")),1)]),_:1},8,["disabled"]),n.createVNode(F,{appearance:"primary","data-testid":"form-submit",disabled:y.value,type:"submit"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(s)("baseForm.actions.save")),1)]),_:1},8,["disabled"])],!0)])],40,Z0))]),_:3})}}}),[["__scopeId","data-v-81612aef"]]),X0={key:0,"data-testid":"first-col"},e1=st(n.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0}},setup(e){const t=e,r=n.computed(()=>{var g;return((g=t.rowEl)==null?void 0:g.querySelector(`[data-testid="${t.keyName}"]`))||null}),i=n.computed(()=>{var g;return((g=r.value)==null?void 0:g.querySelector('[data-testid="first-col"]'))||null}),o=n.computed(()=>{var g,m;const v=(g=t.rowEl)==null?void 0:g.querySelectorAll("td");return v?((m=v[0])==null?void 0:m.getAttribute("data-testid"))===t.keyName:!1});let s;const a=()=>{s&&(s.disconnect(),s=void 0)},c=()=>{var g,m,v;d.value=((g=i.value)==null?void 0:g.getBoundingClientRect().width)||0,p.value=((m=r.value)==null?void 0:m.clientWidth)||0,y.value=((v=l.value)==null?void 0:v.innerText)||""},l=n.ref({}),d=n.ref(0),p=n.ref(0),y=n.ref(""),A=n.computed(()=>[i.value,r.value]),C=n.watch(A,g=>{if(o.value&&(a(),"ResizeObserver"in window&&window)){s=new ResizeObserver(m=>{window.requestAnimationFrame(()=>{!Array.isArray(m)||!m.length||c()})});for(const m of g)m&&s.observe(m)}},{immediate:!0,flush:"post",deep:!0}),h=n.computed(()=>o.value?d.value>p.value:!1);return n.onMounted(()=>{c()}),n.onUnmounted(()=>{C()}),(g,m)=>{const v=n.resolveComponent("KTooltip");return n.openBlock(),n.createElementBlock("span",{ref_key:"contentRef",ref:l,class:"content-wrapper"},[o.value?(n.openBlock(),n.createElementBlock("span",X0,[n.createVNode(v,{label:h.value?y.value:"","max-width":"300",placement:"bottomStart"},{default:n.withCtx(()=>[n.renderSlot(g.$slots,"default",{},void 0,!0)]),_:3},8,["label"])])):n.renderSlot(g.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-e42a20c9"]]),t1={class:"toolbar-container"},r1={key:0,class:"toolbar-button-container"},i1=["data-testid"],Of=st(n.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:[String,Object],default:null},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},dropdownMenuWidth:{type:String,default:"",required:!1},title:{type:String,default:""},disableRowClick:{type:Boolean,default:!1}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(e,{emit:t}){const r=e,{i18n:{t:i}}=Ie.useI18n(),o=n.computed(()=>{var x,F;return typeof r.errorMessage=="string"?{hasError:!!r.errorMessage,title:r.errorMessage,message:void 0}:{hasError:!!r.errorMessage,title:(x=r.errorMessage)==null?void 0:x.title,message:(F=r.errorMessage)==null?void 0:F.message}}),s=n.computed(()=>r.cacheIdentifier||r.preferencesStorageKey),a=x=>x.hasData||!!r.query,c=n.computed(()=>{const x=[];return Object.keys(r.tableHeaders).forEach(F=>{const Z=r.tableHeaders[F];x.push({label:Z.label??F,key:F,sortable:Z.sortable??!1})}),r.enableEntityActions&&x.push({key:"actions",hideLabel:!0}),x}),l=x=>({"data-rowid":x.id,"data-testid":x.name,...r.rowAttributes(x)}),d=n.ref({}),p=x=>{var F;return(F=d.value)==null?void 0:F.$el.querySelector(`[data-rowid="${x.id}"]`)},y=x=>{const F={"data-testid":x.headerKey,...r.cellAttributes(x)};return x.colIndex===0&&(F.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),F},A=()=>{t("empty-state-cta-clicked"),C()},C=()=>{t("clear-search-input")},h=n.computed(()=>r.disableRowClick?void 0:(x,F)=>{t("click:row",F)}),g=x=>{t("sort",x)},{setTablePreferences:m,getTablePreferences:v}=ny(),b=n.computed(()=>{const x=v(r.preferencesStorageKey);return{...r.initialFetcherParams,...x}}),w=x=>{r.preferencesStorageKey&&m(r.preferencesStorageKey,x)};return(x,F)=>{const Z=n.resolveComponent("KIcon"),I=n.resolveComponent("KButton"),E=n.resolveComponent("KDropdown"),M=n.resolveComponent("KTable"),q=n.resolveComponent("KCard");return n.openBlock(),n.createBlock(q,{class:"kong-ui-entity-base-table",title:e.title},{body:n.withCtx(()=>[n.createVNode(M,{ref_key:"tableRefs",ref:d,"cache-identifier":s.value,"cell-attrs":y,"disable-pagination-page-jump":e.disablePaginationPageJump,"disable-sorting":e.disableSorting,"empty-state-action-button-icon":e.query?"":"plus","empty-state-action-message":e.query?n.unref(i)("baseTable.emptyState.noSearchResultsCtaText"):e.emptyStateOptions.ctaText,"empty-state-action-route":e.query?"":e.emptyStateOptions.ctaPath,"empty-state-icon":e.query?"stateNoSearchResults":"stateGruceo","empty-state-icon-size":"96","empty-state-message":e.query?n.unref(i)("baseTable.emptyState.noSearchResultsMessage"):e.emptyStateOptions.message,"empty-state-title":e.query?n.unref(i)("baseTable.emptyState.noSearchResultsTitle"):e.emptyStateOptions.title,"enable-client-sort":e.enableClientSort,"error-state-message":o.value.message,"error-state-title":o.value.title,fetcher:e.fetcher,"fetcher-cache-key":String(e.fetcherCacheKey),"has-error":o.value.hasError,headers:c.value,"hide-pagination-when-optional":"","initial-fetcher-params":b.value,"is-loading":e.isLoading,"pagination-type":e.paginationType,"row-attrs":l,"search-input":e.query,onKtableEmptyStateCtaClicked:A,"onRow:click":h.value,onSort:F[0]||(F[0]=U=>g(U)),"onUpdate:tablePreferences":w},n.createSlots({toolbar:n.withCtx(({state:U})=>[n.withDirectives(n.createElementVNode("div",t1,[n.renderSlot(x.$slots,"toolbar-filter",{},void 0,!0),x.$slots["toolbar-button"]?(n.openBlock(),n.createElementBlock("div",r1,[n.renderSlot(x.$slots,"toolbar-button",{},void 0,!0)])):n.createCommentVNode("",!0)],512),[[n.vShow,a(U)]])]),actions:n.withCtx(({row:U,rowKey:P,rowValue:V})=>[n.createElementVNode("div",{class:"actions-container","data-testid":U.name},[n.createVNode(E,{"kpop-attributes":{placement:"bottomEnd"},width:e.dropdownMenuWidth},{items:n.withCtx(()=>[n.renderSlot(x.$slots,"actions",{row:U,rowKey:P,rowValue:V},void 0,!0)]),default:n.withCtx(()=>[n.createVNode(I,{class:"actions-trigger","data-testid":"overflow-actions-button",size:"small"},{icon:n.withCtx(()=>[n.createVNode(Z,{color:n.unref(Yy),icon:"more",size:"16"},null,8,["color"])]),_:1})]),_:2},1032,["width"])],8,i1)]),_:2},[n.renderList(e.tableHeaders,(U,P)=>({name:P,fn:n.withCtx(({row:V,rowKey:te,rowValue:le})=>[n.createVNode(e1,{"key-name":String(P),"row-el":p(V)},{default:n.withCtx(()=>[n.renderSlot(x.$slots,P,{row:V,rowKey:te,rowValue:le},()=>[n.createTextVNode(n.toDisplayString(le),1)],!0)]),_:2},1032,["key-name","row-el"])])}))]),1032,["cache-identifier","disable-pagination-page-jump","disable-sorting","empty-state-action-button-icon","empty-state-action-message","empty-state-action-route","empty-state-icon","empty-state-message","empty-state-title","enable-client-sort","error-state-message","error-state-title","fetcher","fetcher-cache-key","has-error","headers","initial-fetcher-params","is-loading","pagination-type","search-input","onRow:click"])]),_:3},8,["title"])}}}),[["__scopeId","data-v-499a771c"]]),n1={key:0,class:"kong-ui-entity-delete-error"},o1={key:1,class:"description"},Tf=st(n.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(e,{emit:t}){const r=e,{i18nT:i}=Ie.useI18n(),o=n.computed(()=>r.needConfirm?r.entityName:""),s=()=>{t("cancel")},a=()=>{t("proceed")};return(c,l)=>{const d=n.resolveComponent("KAlert"),p=n.resolveComponent("KPrompt");return n.openBlock(),n.createBlock(p,{"action-button-text":"Yes, delete","action-pending":e.actionPending,class:"kong-ui-entity-delete-modal","confirmation-text":o.value,"is-visible":e.visible,title:e.title,type:"danger",onCanceled:s,onProceed:a},{"body-content":n.withCtx(()=>[e.error?(n.openBlock(),n.createElementBlock("div",n1,[n.createVNode(d,{appearance:"danger"},{alertMessage:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.error),1)]),_:1})])):n.createCommentVNode("",!0),n.createVNode(n.unref(i),{class:"message",keypath:r.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},n.createSlots({entityType:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(r.entityType),1)]),_:2},[r.entityName?{name:"entityName",fn:n.withCtx(()=>[n.createElementVNode("strong",null,n.toDisplayString(r.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),r.description||c.$slots.description?(n.openBlock(),n.createElementBlock("div",o1,[n.renderSlot(c.$slots,"description",{},()=>[n.createElementVNode("p",null,n.toDisplayString(r.description),1)],!0)])):n.createCommentVNode("",!0)]),_:3},8,["action-pending","confirmation-text","is-visible","title"])}}}),[["__scopeId","data-v-1c9a2a07"]]),s1={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},a1={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},c1=["fill"],l1={mask:"url(#mask0_180_20349)"},u1=["fill"],Vf=n.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${Wy})`}},setup(e){return(t,r)=>(n.openBlock(),n.createElementBlock("svg",s1,[n.createElementVNode("mask",a1,[n.createElementVNode("rect",{fill:e.color,height:"20",width:"20"},null,8,c1)]),n.createElementVNode("g",l1,[n.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:e.color},null,8,u1)])]))}}),d1={key:1,class:"kong-ui-entity-filter"},f1={class:"menu-item-title"},p1={class:"menu-item-indicator"},h1={class:"menu-item-body"},y1=["for"],g1={class:"menu-item-buttons"},m1={class:"filter-clear-button-container"},jf=st(n.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,{i18n:{t:i}}=Ie.useI18n(),o=n.ref(!1),s=n.ref({}),a=n.computed(()=>{const m=[];return new URLSearchParams(r.modelValue).forEach((v,b)=>{v!==""&&m.push(b)}),m}),c=n.computed(()=>{const m=r.config.fields;return Object.keys(m).filter(v=>m[v].searchable).map(v=>({label:m[v].label||v,value:v}))});n.watch(()=>r.modelValue,m=>{s.value={},new URLSearchParams(m).forEach((v,b)=>{s.value[b]=v})});const l=()=>{o.value=!o.value},d=m=>{t("update:modelValue",m)},p=m=>`filter-${m}`,y=m=>{var v,b;return(((b=(v=r.config.schema)==null?void 0:v[m])==null?void 0:b.values)??[]).map(w=>({value:w,label:w}))},A=m=>{var v,b;return((b=(v=r.config.schema)==null?void 0:v[m])==null?void 0:b.type)??"text"},C=m=>{s.value={...s.value,[m]:""},g()},h=()=>{s.value={},g(!0)},g=(m=!1)=>{const v=Object.keys(s.value).reduce((b,w)=>(s.value[w]&&(b[w]=`${s.value[w]}`),b),{});m&&(o.value=!1),t("update:modelValue",new URLSearchParams(v).toString())};return(m,v)=>{const b=n.resolveComponent("KInput"),w=n.resolveComponent("KButton"),x=n.resolveComponent("KSelect"),F=n.resolveComponent("KMenuItem"),Z=n.resolveComponent("KMenu");return e.config.isExactMatch?(n.openBlock(),n.createBlock(b,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":e.modelValue,placeholder:e.config.placeholder,"onUpdate:modelValue":d},{before:n.withCtx(()=>[n.createVNode(Vf)]),_:1},8,["model-value","placeholder"])):(n.openBlock(),n.createElementBlock("div",d1,[n.createVNode(w,{appearance:"tertiary","data-testid":"filter-button",onClick:l},{default:n.withCtx(()=>[n.createVNode(Vf),n.createTextVNode(" "+n.toDisplayString(n.unref(i)("filter.filterButtonText"))+" "+n.toDisplayString(a.value.length>0?`(${a.value.length})`:""),1)]),_:1}),n.withDirectives(n.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:l},null,512),[[n.vShow,o.value]]),n.withDirectives(n.createVNode(Z,{class:"kong-ui-entity-filter-menu"},{body:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(c.value,(I,E)=>(n.openBlock(),n.createBlock(F,{key:I.value,"data-testid":I.value,expandable:"","last-menu-item":E===c.value.length-1},{itemTitle:n.withCtx(()=>[n.createElementVNode("span",f1,[n.createTextVNode(n.toDisplayString(I.label)+" ",1),n.withDirectives(n.createElementVNode("span",p1,null,512),[[n.vShow,a.value.includes(I.value)]])])]),itemBody:n.withCtx(()=>{var M,q;return[n.createElementVNode("div",h1,[n.createElementVNode("label",{class:"menu-item-label",for:p(I.value)},n.toDisplayString(n.unref(i)("filter.fieldLabel")),9,y1),((q=(M=e.config.schema)==null?void 0:M[I.value])==null?void 0:q.type)==="select"?(n.openBlock(),n.createBlock(x,{key:0,id:p(I.value),modelValue:s.value[I.value],"onUpdate:modelValue":U=>s.value[I.value]=U,appearance:"select",items:y(I.value),placeholder:n.unref(i)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(n.openBlock(),n.createBlock(b,{key:1,id:p(I.value),modelValue:s.value[I.value],"onUpdate:modelValue":U=>s.value[I.value]=U,autocomplete:"off",placeholder:n.unref(i)("filter.inputPlaceholder"),type:A(I.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))]),n.createElementVNode("div",g1,[n.createVNode(w,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:v[0]||(v[0]=U=>g(!0))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("filter.applyButtonText")),1)]),_:1}),n.createVNode(w,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:U=>C(I.value)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])])]}),_:2},1032,["data-testid","last-menu-item"]))),128))]),actionButton:n.withCtx(()=>[n.createElementVNode("div",m1,[n.createVNode(w,{appearance:"tertiary",size:"small",onClick:h},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("filter.clearAllButtonText")),1)]),_:1})])]),_:1},512),[[n.vShow,o.value]])]))}}}),[["__scopeId","data-v-15962ee2"]]),Nt=n.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(e){const t=e,r=n.ref(void 0),i=n.computed(()=>r.value===!0||r.value!==void 0&&t.forceShow===!0);return n.watch(()=>t.authFunction,async()=>{r.value=await t.authFunction()},{immediate:!0}),(o,s)=>i.value?n.renderSlot(o.$slots,"default",{key:0,isAllowed:r.value}):n.createCommentVNode("",!0)}}),b1={class:"form-section-wrapper"},w1={key:0,class:"form-section-title"},v1={key:1,class:"form-section-description"},k1={key:2,class:"form-section-footer"},C1={class:"form-section-content"},so=st(n.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1}},setup(e){const t=n.useSlots();return(r,i)=>(n.openBlock(),n.createElementBlock("fieldset",{class:n.normalizeClass(["kong-ui-entity-form-section",{"has-divider":e.hasDivider}])},[n.createElementVNode("div",b1,[e.hideInfoHeader?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["form-section-info",{sticky:e.stickyInfoHeader}])},[e.title?(n.openBlock(),n.createElementBlock("h4",w1,n.toDisplayString(e.title),1)):n.createCommentVNode("",!0),e.description||n.unref(t).description?(n.openBlock(),n.createElementBlock("div",v1,[n.renderSlot(r.$slots,"description",{},()=>[n.createElementVNode("p",null,n.toDisplayString(e.description),1)],!0)])):n.createCommentVNode("",!0),n.unref(t).footer?(n.openBlock(),n.createElementBlock("div",k1,[n.renderSlot(r.$slots,"footer",{},void 0,!0)])):n.createCommentVNode("",!0)],2)),n.createElementVNode("div",C1,[n.renderSlot(r.$slots,"default",{},void 0,!0)])])],2))}}),[["__scopeId","data-v-8b6dc312"]]),{useAxios:ao,useDeleteUrlBuilder:Df,useErrors:Pf,useExternalLinkCreator:Cb,useFetchUrlBuilder:Sb,useFetcher:$f,useDebouncedFilter:xb,useStringHelpers:Mf,useHelpers:Rf,useGatewayFeatureSupported:Ab,useTruncationDetector:Bb}=Ie,Ib="",Eb="",S1={class:"kong-ui-entities-certificates-list"},x1={key:0},A1={key:1},B1={key:0},I1={key:1},E1={key:0},N1={key:1},_1={key:1},O1={key:1},T1=n.defineComponent({__name:"CertificateList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.createRoute||!e.getViewRoute||!e.getEditRoute||e.app==="kongManager"&&!e.isExactMatch&&!e.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canCreateSni:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success"],setup(e,{emit:t}){var he;const r=e,{i18n:{t:i,formatUnixTimeStamp:o},i18nT:s}=ht.useI18n(),a=Hr.useRouter(),{axiosInstance:c}=ao({headers:(he=r.config)==null?void 0:he.requestHeaders}),l=n.ref(1),d=n.computed(()=>r.config.app!=="kongManager"||!!r.config.disableSorting),y={subject:{label:i("certificates.list.table_headers.subject")},expiry:{label:i("certificates.list.table_headers.expiry")},san:{label:i("certificates.list.table_headers.san")},cert:{label:i("certificates.list.table_headers.cert")},tags:{label:i("certificates.list.table_headers.tags"),sortable:!0}},A=n.computed(()=>{var re,ye;let T=`${r.config.apiBaseUrl}${ki.list[r.config.app]}`;return r.config.app==="konnect"?T=T.replace(/{controlPlaneId}/gi,((re=r.config)==null?void 0:re.controlPlaneId)||""):r.config.app==="kongManager"&&(T=T.replace(/\/{workspace}/gi,(ye=r.config)!=null&&ye.workspace?`/${r.config.workspace}`:"")),T}),C=n.ref(""),h=n.computed(()=>{const T=r.config.app==="konnect"||r.config.isExactMatch;return T?{isExactMatch:T,placeholder:i("certificates.search.placeholder")}:{isExactMatch:T,schema:r.config.filterSchema}}),{fetcher:g,fetcherState:m}=$f(r.config,A.value),v=()=>{C.value=""},b=()=>{l.value++},w=n.ref(null),x=(T,re)=>{const ye=T.id;if(!re(ye)){t("copy:error",{entity:T,field:"id",message:i("certificates.errors.copy")});return}t("copy:success",{entity:T,field:"id",message:i("certificates.copy.success",{val:ye})})},F=(T,re)=>{const ye=JSON.stringify(T);if(!re(ye)){t("copy:error",{entity:T,message:i("certificates.errors.copy")});return}t("copy:success",{entity:T,message:i("certificates.copy.success_brief")})},Z=(T,re)=>{T.type==="error"?t("copy:error",{entity:re,field:"cert",message:i("certificates.errors.copy")}):t("copy:success",{entity:re,field:"cert",message:i("certificates.copy.success_brief")})},I=async T=>{var ye;await((ye=r.canRetrieve)==null?void 0:ye.call(r,T))&&a.push(r.config.getViewRoute(T.id))},E=T=>({label:i("certificates.actions.view"),to:r.config.getViewRoute(T)}),M=T=>({label:i("certificates.actions.edit"),to:r.config.getEditRoute(T)}),q=T=>{if(r.config.getCreateSniRoute)return{label:i("certificates.actions.addSni"),to:r.config.getCreateSniRoute(T)}},U=n.ref(void 0),P=n.ref(!1),V=n.ref(!1),te=n.ref(""),le=Df(r.config,A.value),{certificateDataCache:be,getCertificateData:de}=ht.useCertificate(),fe=T=>{U.value=T,P.value=!0},ke=()=>{P.value=!1},Ut=async()=>{var T,re,ye;if((T=U.value)!=null&&T.id){V.value=!0;try{await c.delete(le(U.value.id)),V.value=!1,P.value=!1,l.value++,t("delete:success",U.value)}catch(Ae){te.value=((ye=(re=Ae.response)==null?void 0:re.data)==null?void 0:ye.message)||Ae.message||i("certificates.errors.delete"),t("error",Ae)}finally{V.value=!1}}},pe=n.ref(!0);n.watch(m,T=>{var re,ye,Ae,_t,W;if(((ye=(re=T==null?void 0:T.response)==null?void 0:re.data)==null?void 0:ye.length)===0&&(pe.value=!1),T.status===$t.Error){w.value={title:i("certificates.errors.general")},(W=(_t=(Ae=T.error)==null?void 0:Ae.response)==null?void 0:_t.data)!=null&&W.message&&(w.value.message=T.error.response.data.message),t("error",T.error);return}be.value={},w.value=null});const J=n.ref({ctaPath:r.config.createRoute,ctaText:void 0,message:i("certificates.list.empty_state.description"),title:i("certificates.title")});return n.onBeforeMount(async()=>{await r.canCreate()&&(J.value.title=i("certificates.list.empty_state.title"),J.value.ctaText=i("certificates.actions.create"))}),(T,re)=>{const ye=n.resolveComponent("KButton"),Ae=n.resolveComponent("KBadge"),_t=n.resolveComponent("KTruncate"),W=n.resolveComponent("KDropdownItem"),Be=n.resolveComponent("KClipboardProvider");return n.openBlock(),n.createElementBlock("div",S1,[n.createVNode(n.unref(Of),{"cache-identifier":e.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":d.value,"empty-state-options":J.value,"enable-entity-actions":"","error-message":w.value,fetcher:n.unref(g),"fetcher-cache-key":l.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-certificates-list",query:C.value,"table-headers":n.unref(y),"use-action-outside":e.useActionOutside,onClearSearchInput:v,"onClick:row":re[2]||(re[2]=K=>I(K)),onSort:b},{"toolbar-filter":n.withCtx(()=>[n.createVNode(n.unref(jf),{modelValue:C.value,"onUpdate:modelValue":re[0]||(re[0]=K=>C.value=K),config:h.value},null,8,["modelValue","config"])]),"toolbar-button":n.withCtx(()=>[(n.openBlock(),n.createBlock(n.Teleport,{disabled:!e.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[n.createVNode(n.unref(Nt),{"auth-function":()=>e.canCreate()},{default:n.withCtx(()=>[n.withDirectives(n.createVNode(ye,{appearance:"primary","data-testid":"toolbar-add-certificate",icon:"plus",to:e.config.createRoute},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("certificates.list.toolbar_actions.new_certificate")),1)]),_:1},8,["to"]),[[n.vShow,pe.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),subject:n.withCtx(({row:K})=>{var we;return[e.config.app==="konnect"?(n.openBlock(),n.createElementBlock("b",x1,n.toDisplayString((we=K==null?void 0:K.metadata)!=null&&we.subject?K.metadata.subject:"-"),1)):(n.openBlock(),n.createElementBlock("b",A1,n.toDisplayString(n.unref(de)(K).schemaSubject||"-"),1))]}),expiry:n.withCtx(({row:K})=>{var we;return[e.config.app==="konnect"?(n.openBlock(),n.createElementBlock("span",B1,n.toDisplayString((we=K==null?void 0:K.metadata)!=null&&we.expiry?n.unref(o)(K.metadata.expiry):"-"),1)):(n.openBlock(),n.createElementBlock("span",I1,n.toDisplayString(n.unref(de)(K).schemaExpiry?n.unref(o)(n.unref(de)(K).schemaExpiry):"-"),1))]}),san:n.withCtx(({row:K})=>{var we;return[e.config.app==="konnect"?(n.openBlock(),n.createElementBlock("span",E1,n.toDisplayString((we=K==null?void 0:K.metadata)!=null&&we.dns_names?`dns=${K.metadata.dns_names.join(", ")}`:"-"),1)):(n.openBlock(),n.createElementBlock("span",N1,n.toDisplayString(n.unref(de)(K).schemaSanNames||"-"),1))]}),cert:n.withCtx(({row:K})=>[K!=null&&K.cert?(n.openBlock(),n.createBlock(n.unref(ty),{key:0,"data-testid":"copy-certificate-cert",notify:we=>Z(we,K),truncated:!0,uuid:K.cert},null,8,["notify","uuid"])):(n.openBlock(),n.createElementBlock("span",_1,"-"))]),tags:n.withCtx(({row:K})=>{var we;return[((we=K==null?void 0:K.tags)==null?void 0:we.length)>0?(n.openBlock(),n.createBlock(_t,{key:0},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(K==null?void 0:K.tags,Lr=>(n.openBlock(),n.createBlock(Ae,{key:Lr,onClick:re[1]||(re[1]=n.withModifiers(()=>{},["stop"]))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(Lr),1)]),_:2},1024))),128))]),_:2},1024)):(n.openBlock(),n.createElementBlock("span",O1,"-"))]}),actions:n.withCtx(({row:K})=>[n.createVNode(Be,null,{default:n.withCtx(({copyToClipboard:we})=>[n.createVNode(W,{"data-testid":"action-entity-copy-id",onClick:Lr=>x(K,we)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("certificates.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),n.createVNode(Be,null,{default:n.withCtx(({copyToClipboard:we})=>[n.createVNode(W,{"data-testid":"action-entity-copy-json",onClick:Lr=>F(K,we)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("certificates.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),n.createVNode(n.unref(Nt),{"auth-function":()=>e.canRetrieve(K)},{default:n.withCtx(()=>[n.createVNode(W,{"data-testid":"action-entity-view","has-divider":"",item:E(K.id)},null,8,["item"])]),_:2},1032,["auth-function"]),n.createVNode(n.unref(Nt),{"auth-function":()=>e.canEdit(K)},{default:n.withCtx(()=>[n.createVNode(W,{"data-testid":"action-entity-edit",item:M(K.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.config.getCreateSniRoute?(n.openBlock(),n.createBlock(n.unref(Nt),{key:0,"auth-function":()=>e.canCreateSni()},{default:n.withCtx(()=>[n.createVNode(W,{"data-testid":"action-entity-add-sni",item:q(K.id)},null,8,["item"])]),_:2},1032,["auth-function"])):n.createCommentVNode("",!0),n.createVNode(n.unref(Nt),{"auth-function":()=>e.canDelete(K)},{default:n.withCtx(()=>[n.createVNode(W,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:we=>fe(K)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("certificates.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","use-action-outside"]),n.createVNode(n.unref(Tf),{"action-pending":V.value,"entity-type":n.unref(xa).Certificate,error:te.value,title:n.unref(i)("certificates.delete.title"),visible:P.value,onCancel:ke,onProceed:Ut},{description:n.withCtx(()=>[n.createVNode(n.unref(s),{keypath:"certificates.delete.description",scope:"global"},{"bolded-text":n.withCtx(()=>[n.createElementVNode("b",null,n.toDisplayString(n.unref(i)("certificates.delete.boldedText")),1)]),_:1}),n.createElementVNode("p",null,n.toDisplayString(n.unref(i)("certificates.delete.description2")),1)]),_:1},8,["action-pending","entity-type","error","title","visible"])])}}}),Nb="",Ur=(e,t)=>{const r=e.__vccOpts||e;for(const[i,o]of t)r[i]=o;return r},V1=Ur(T1,[["__scopeId","data-v-9d09ebe5"]]),j1={class:"kong-ui-entities-certificates-form"},D1=n.defineComponent({__name:"CertificateForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.cancelRoute)},certificateId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(e,{emit:t}){var b;const r=e,i=Hr.useRouter(),{i18nT:o,i18n:{t:s}}=ht.useI18n(),{getMessageFromError:a}=Pf(),{axiosInstance:c}=ao({headers:(b=r.config)==null?void 0:b.requestHeaders}),l=n.computed(()=>ki.form[r.config.app].edit),d=n.computed(()=>r.certificateId?sr.Edit:sr.Create),p=n.reactive({fields:{cert:"",key:"",certAlt:"",keyAlt:"",tags:""},isReadonly:!1,errorMessage:""}),y=n.reactive({cert:"",key:"",certAlt:"",keyAlt:"",tags:""}),A=n.computed(()=>(d.value===sr.Create||JSON.stringify(p.fields)!==JSON.stringify(y))&&!!p.fields.cert&&!!p.fields.key),C=w=>{var x;p.fields.cert=(w==null?void 0:w.cert)||"",p.fields.key=(w==null?void 0:w.key)||"",p.fields.certAlt=(w==null?void 0:w.cert_alt)||"",p.fields.keyAlt=(w==null?void 0:w.key_alt)||"",p.fields.tags=((x=w==null?void 0:w.tags)==null?void 0:x.join(", "))||"",Object.assign(y,p.fields)},h=()=>{i.push(r.config.cancelRoute)},g=n.computed(()=>{var x,F;let w=`${r.config.apiBaseUrl}${ki.form[r.config.app].validate}`;return r.config.app==="konnect"?w=w.replace(/{controlPlaneId}/gi,((x=r.config)==null?void 0:x.controlPlaneId)||""):r.config.app==="kongManager"&&(w=w.replace(/\/{workspace}/gi,(F=r.config)!=null&&F.workspace?`/${r.config.workspace}`:"")),w=w.replace(/{id}/gi,r.certificateId),w}),m=n.computed(()=>{var x,F;let w=`${r.config.apiBaseUrl}${ki.form[r.config.app][d.value]}`;return r.config.app==="konnect"?w=w.replace(/{controlPlaneId}/gi,((x=r.config)==null?void 0:x.controlPlaneId)||""):r.config.app==="kongManager"&&(w=w.replace(/\/{workspace}/gi,(F=r.config)!=null&&F.workspace?`/${r.config.workspace}`:"")),w=w.replace(/{id}/gi,r.certificateId),w}),v=async()=>{var w,x,F,Z,I,E,M,q,U;try{p.isReadonly=!0;const P={cert:p.fields.cert,key:p.fields.key,cert_alt:p.fields.certAlt||null,key_alt:p.fields.keyAlt||null,tags:(x=(w=p.fields.tags.split(","))==null?void 0:w.map(te=>String(te||"").trim()))==null?void 0:x.filter(te=>te!=="")};let V;await c.post(g.value,P),d.value==="create"?V=await c.post(m.value,P):d.value==="edit"&&(V=((F=r.config)==null?void 0:F.app)==="konnect"?await c.put(m.value,P):await c.patch(m.value,P)),p.fields.cert=((Z=V==null?void 0:V.data)==null?void 0:Z.cert)||"",p.fields.key=((I=V==null?void 0:V.data)==null?void 0:I.key)||"",p.fields.certAlt=((E=V==null?void 0:V.data)==null?void 0:E.cert_alt)||"",p.fields.keyAlt=((M=V==null?void 0:V.data)==null?void 0:M.key_alt)||"",p.fields.tags=((U=(q=V==null?void 0:V.data)==null?void 0:q.tags)==null?void 0:U.join(", "))||"",Object.assign(y,p.fields),t("update",V==null?void 0:V.data)}catch(P){p.errorMessage=a(P),t("error",P)}finally{p.isReadonly=!1}};return(w,x)=>{const F=n.resolveComponent("KTextArea"),Z=n.resolveComponent("KInput");return n.openBlock(),n.createElementBlock("div",j1,[n.createVNode(n.unref(_f),{"can-submit":A.value,config:e.config,"edit-id":e.certificateId,"error-message":p.errorMessage,"fetch-url":l.value,"is-readonly":p.isReadonly,onCancel:h,"onFetch:error":x[5]||(x[5]=I=>w.$emit("error",I)),"onFetch:success":C,onLoading:x[6]||(x[6]=I=>w.$emit("loading",I)),onSubmit:v},{default:n.withCtx(()=>[n.createVNode(n.unref(so),{description:n.unref(s)("certificates.form.sections.ssl.description"),title:n.unref(s)("certificates.form.sections.ssl.title")},{default:n.withCtx(()=>[n.createVNode(F,{modelValue:p.fields.cert,"onUpdate:modelValue":x[0]||(x[0]=I=>p.fields.cert=I),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"certificate-form-cert",label:n.unref(s)("certificates.form.fields.cert.label"),readonly:p.isReadonly,required:""},{"label-tooltip":n.withCtx(()=>[n.createVNode(n.unref(o),{keypath:"certificates.form.fields.cert.tooltip",scope:"global"},{emphasis:n.withCtx(()=>[n.createElementVNode("em",null,n.toDisplayString(n.unref(s)("certificates.form.fields.cert.emphasis")),1)]),_:1})]),_:1},8,["modelValue","label","readonly"]),n.createVNode(F,{modelValue:p.fields.key,"onUpdate:modelValue":x[1]||(x[1]=I=>p.fields.key=I),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"certificate-form-key",label:n.unref(s)("certificates.form.fields.key.label"),readonly:p.isReadonly,required:""},{"label-tooltip":n.withCtx(()=>[n.createVNode(n.unref(o),{keypath:"certificates.form.fields.key.tooltip",scope:"global"},{emphasis:n.withCtx(()=>[n.createElementVNode("em",null,n.toDisplayString(n.unref(s)("certificates.form.fields.key.emphasis")),1)]),_:1})]),_:1},8,["modelValue","label","readonly"]),n.createVNode(F,{modelValue:p.fields.certAlt,"onUpdate:modelValue":x[2]||(x[2]=I=>p.fields.certAlt=I),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"certificate-form-cert-alt",label:n.unref(s)("certificates.form.fields.cert_alt.label"),readonly:p.isReadonly},{"label-tooltip":n.withCtx(()=>[n.createVNode(n.unref(o),{keypath:"certificates.form.fields.cert_alt.tooltip",scope:"global"},{emphasis:n.withCtx(()=>[n.createElementVNode("em",null,n.toDisplayString(n.unref(s)("certificates.form.fields.cert_alt.emphasis")),1)]),_:1})]),_:1},8,["modelValue","label","readonly"]),n.createVNode(F,{modelValue:p.fields.keyAlt,"onUpdate:modelValue":x[3]||(x[3]=I=>p.fields.keyAlt=I),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"certificate-form-key-alt",label:n.unref(s)("certificates.form.fields.key_alt.label"),readonly:p.isReadonly},{"label-tooltip":n.withCtx(()=>[n.createVNode(n.unref(o),{keypath:"certificates.form.fields.key_alt.tooltip",scope:"global"},{emphasis:n.withCtx(()=>[n.createElementVNode("em",null,n.toDisplayString(n.unref(s)("certificates.form.fields.key_alt.emphasis")),1)]),_:1})]),_:1},8,["modelValue","label","readonly"])]),_:1},8,["description","title"]),n.createVNode(n.unref(so),{description:n.unref(s)("certificates.form.sections.general.description"),title:n.unref(s)("certificates.form.sections.general.title")},{default:n.withCtx(()=>[n.createVNode(Z,{modelValue:p.fields.tags,"onUpdate:modelValue":x[4]||(x[4]=I=>p.fields.tags=I),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"certificate-form-tags",help:n.unref(s)("certificates.form.fields.tags.help"),label:n.unref(s)("certificates.form.fields.tags.label"),"label-attributes":{info:n.unref(s)("certificates.form.fields.tags.tooltip")},placeholder:n.unref(s)("certificates.form.fields.tags.placeholder"),readonly:p.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","error-message","fetch-url","is-readonly"])])}}}),_b="",P1=Ur(D1,[["__scopeId","data-v-f66bc18c"]]),Ei={list:{konnect:"/api/runtime_groups/{controlPlaneId}/ca_certificates",kongManager:"/{workspace}/ca_certificates"},form:{konnect:{create:"/api/runtime_groups/{controlPlaneId}/ca_certificates",edit:"/api/runtime_groups/{controlPlaneId}/ca_certificates/{id}",validate:"/api/runtime_groups/{controlPlaneId}/v1/schemas/json/ca-certificate/validate"},kongManager:{create:"/{workspace}/ca_certificates",edit:"/{workspace}/ca_certificates/{id}",validate:"/{workspace}/schemas/ca_certificates/validate"}}},$1={class:"kong-ui-ca-certificate-entity-config-card"},M1={key:0},R1=n.defineComponent({__name:"CACertificateConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success","copy:success"],setup(e,{emit:t}){const r=e,i=["dns_names","san_names","subject"],{i18n:{t:o,formatUnixTimeStamp:s}}=ht.useI18n(),{convertKeyToTitle:a}=Mf(),{getPropValue:c}=Rf(),{getCertificateData:l}=ht.useCertificate(),d=n.computed(()=>Ei.form[r.config.app].edit),p=n.ref(),y=n.computed(()=>{if(p.value)return l(p.value)}),A=n.computed(()=>{var b;return((b=y.value)==null?void 0:b.schemaIssuer)||""}),C=n.computed(()=>{var b,w;return(b=y.value)!=null&&b.schemaExpiry?s((w=y.value)==null?void 0:w.schemaExpiry):""}),h=n.computed(()=>{var b;return((b=y.value)==null?void 0:b.schemaKeyUsages)||[]}),g=(b,w)=>{const x=c("rowValue",w);if(b==="expiry")return C.value;if(b==="key_usages")return h.value;if(x)return x[b]},m=b=>{p.value=b,t("fetch:success",b)},v=n.ref({id:{},updated_at:{},created_at:{},cert:{section:ue.Basic,label:o("ca-certificates.form.fields.cert.label"),tooltip:o("ca-certificates.form.fields.cert.tooltip"),order:5},cert_digest:{section:ue.Basic,label:o("ca-certificates.form.fields.cert_digest.label"),tooltip:o("ca-certificates.form.fields.cert_digest.tooltip"),order:6},metadata:{section:ue.Basic,type:ne.Json,order:7},...r.config.app==="kongManager"&&{expiry:{label:o("certificates.list.table_headers.expiry"),section:ue.Basic,order:1.7,forceShow:!0},issuer:{section:ue.Basic,order:1.5,forceShow:!0},key_usages:{section:ue.Basic,forceShow:!0}},tags:{tooltip:o("ca-certificates.form.fields.tags.tooltip")}});return(b,w)=>{const x=n.resolveComponent("KCodeBlock"),F=n.resolveComponent("KLabel"),Z=n.resolveComponent("KBadge");return n.openBlock(),n.createElementBlock("div",$1,[n.createVNode(n.unref(Nf),{config:e.config,"config-card-doc":e.configCardDoc,"config-schema":v.value,"fetch-url":d.value,"hide-title":e.hideTitle,"onCopy:success":w[0]||(w[0]=I=>b.$emit("copy:success",I)),"onFetch:error":w[1]||(w[1]=I=>b.$emit("fetch:error",I)),"onFetch:success":m,onLoading:w[2]||(w[2]=I=>b.$emit("loading",I))},{cert:n.withCtx(I=>[n.unref(c)("rowValue",I)?(n.openBlock(),n.createBlock(x,{key:0,id:`ca-cert-${e.config.entityId}-cert-codeblock`,code:n.unref(c)("rowValue",I),"is-single-line":"",language:"plaintext"},null,8,["id","code"])):n.createCommentVNode("",!0)]),"metadata-label":n.withCtx(()=>[n.createVNode(F,{class:"metadata-label"},{default:n.withCtx(()=>[n.createTextVNode(" Metadata ")]),_:1})]),metadata:n.withCtx(I=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(n.unref(c)("rowValue",I)).filter(E=>!i.includes(E)),E=>(n.openBlock(),n.createBlock(n.unref(Ci),{key:E,"data-testid":`ca-cert-metadata-${E}`,item:{key:E,label:n.unref(a)(E),value:g(E,I),type:E==="key_usages"?n.unref(ne).BadgeTag:n.unref(ne).Text}},null,8,["data-testid","item"]))),128))]),expiry:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(C.value||"–"),1)]),issuer:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(A.value||"–"),1)]),key_usages:n.withCtx(()=>[h.value.length?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",M1,n.toDisplayString("–"))),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(h.value,(I,E)=>(n.openBlock(),n.createBlock(Z,{key:`key_usages-badge-tag-${E}`,class:"config-badge","data-testid":`key_usages-badge-tag-${E}`,"truncation-tooltip":I},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(I),1)]),_:2},1032,["data-testid","truncation-tooltip"]))),128))]),_:1},8,["config","config-card-doc","config-schema","fetch-url","hide-title"])])}}}),Ob="",U1=Ur(R1,[["__scopeId","data-v-5110105b"]]),L1={class:"kong-ui-entities-ca-certificates-list"},H1={key:0},F1={key:1},q1={key:0},K1={key:1},z1={key:1},G1=n.defineComponent({__name:"CACertificateList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.createRoute||!e.getViewRoute||!e.getEditRoute||e.app==="kongManager"&&!e.isExactMatch&&!e.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success"],setup(e,{emit:t}){var pe;const r=e,{i18n:{t:i,formatUnixTimeStamp:o},i18nT:s}=ht.useI18n(),a=Hr.useRouter(),{axiosInstance:c}=ao({headers:(pe=r.config)==null?void 0:pe.requestHeaders}),l=n.ref(1),d=n.computed(()=>r.config.app!=="kongManager"||!!r.config.disableSorting),y={issuer:{label:i("ca-certificates.list.table_headers.issuer")},expiry:{label:i("ca-certificates.list.table_headers.expiry")},tags:{label:i("ca-certificates.list.table_headers.tags"),sortable:!0}},A=n.computed(()=>{var he,T;let J=`${r.config.apiBaseUrl}${Ei.list[r.config.app]}`;return r.config.app==="konnect"?J=J.replace(/{controlPlaneId}/gi,((he=r.config)==null?void 0:he.controlPlaneId)||""):r.config.app==="kongManager"&&(J=J.replace(/\/{workspace}/gi,(T=r.config)!=null&&T.workspace?`/${r.config.workspace}`:"")),J}),C=n.ref(""),h=n.computed(()=>{const J=r.config.app==="konnect"||r.config.isExactMatch;return J?{isExactMatch:J,placeholder:i("ca-certificates.search.placeholder")}:{isExactMatch:J,schema:r.config.filterSchema}}),{fetcher:g,fetcherState:m}=$f(r.config,A.value),v=()=>{C.value=""},b=()=>{l.value++},w=n.ref(null),x=(J,he)=>{const T=J.id;if(!he(T)){t("copy:error",{entity:J,field:"id",message:i("ca-certificates.errors.copy")});return}t("copy:success",{entity:J,field:"id",message:i("ca-certificates.copy.success",{val:T})})},F=(J,he)=>{const T=JSON.stringify(J);if(!he(T)){t("copy:error",{entity:J,message:i("ca-certificates.errors.copy")});return}t("copy:success",{entity:J,message:i("ca-certificates.copy.success_brief")})},Z=async J=>{var T;await((T=r.canRetrieve)==null?void 0:T.call(r,J))&&a.push(r.config.getViewRoute(J.id))},I=J=>({label:i("ca-certificates.actions.view"),to:r.config.getViewRoute(J)}),E=J=>({label:i("ca-certificates.actions.edit"),to:r.config.getEditRoute(J)}),M=n.ref(void 0),q=n.ref(!1),U=n.ref(!1),P=n.ref(""),V=Df(r.config,A.value),{certificateDataCache:te,getCertificateData:le}=ht.useCertificate(),be=J=>{M.value=J,q.value=!0},de=()=>{q.value=!1},fe=async()=>{var J,he,T;if((J=M.value)!=null&&J.id){U.value=!0;try{await c.delete(V(M.value.id)),U.value=!1,q.value=!1,l.value++,t("delete:success",M.value)}catch(re){P.value=((T=(he=re.response)==null?void 0:he.data)==null?void 0:T.message)||re.message||i("ca-certificates.errors.delete"),t("error",re)}finally{U.value=!1}}},ke=n.ref(!0);n.watch(m,J=>{var he,T,re,ye,Ae;if(((T=(he=J==null?void 0:J.response)==null?void 0:he.data)==null?void 0:T.length)===0&&(ke.value=!1),J.status===$t.Error){w.value={title:i("ca-certificates.errors.general")},(Ae=(ye=(re=J.error)==null?void 0:re.response)==null?void 0:ye.data)!=null&&Ae.message&&(w.value.message=J.error.response.data.message),t("error",J.error);return}te.value={},w.value=null});const Ut=n.ref({ctaPath:r.config.createRoute,ctaText:void 0,message:i("ca-certificates.list.empty_state.description"),title:i("ca-certificates.title")});return n.onBeforeMount(async()=>{await r.canCreate()&&(Ut.value.title=i("ca-certificates.list.empty_state.title"),Ut.value.ctaText=i("ca-certificates.actions.create"))}),(J,he)=>{const T=n.resolveComponent("KButton"),re=n.resolveComponent("KBadge"),ye=n.resolveComponent("KTruncate"),Ae=n.resolveComponent("KDropdownItem"),_t=n.resolveComponent("KClipboardProvider");return n.openBlock(),n.createElementBlock("div",L1,[n.createVNode(n.unref(Of),{"cache-identifier":e.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":d.value,"empty-state-options":Ut.value,"enable-entity-actions":"","error-message":w.value,fetcher:n.unref(g),"fetcher-cache-key":l.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-ca-certificates-list",query:C.value,"table-headers":n.unref(y),"use-action-outside":e.useActionOutside,onClearSearchInput:v,"onClick:row":he[2]||(he[2]=W=>Z(W)),onSort:b},{"toolbar-filter":n.withCtx(()=>[n.createVNode(n.unref(jf),{modelValue:C.value,"onUpdate:modelValue":he[0]||(he[0]=W=>C.value=W),config:h.value},null,8,["modelValue","config"])]),"toolbar-button":n.withCtx(()=>[(n.openBlock(),n.createBlock(n.Teleport,{disabled:!e.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[n.createVNode(n.unref(Nt),{"auth-function":()=>e.canCreate()},{default:n.withCtx(()=>[n.withDirectives(n.createVNode(T,{appearance:"primary","data-testid":"toolbar-add-ca-certificate",icon:"plus",to:e.config.createRoute},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("ca-certificates.list.toolbar_actions.new_ca_certificate")),1)]),_:1},8,["to"]),[[n.vShow,ke.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),issuer:n.withCtx(({row:W})=>{var Be;return[e.config.app==="konnect"?(n.openBlock(),n.createElementBlock("b",H1,n.toDisplayString((Be=W==null?void 0:W.metadata)!=null&&Be.issuer?W.metadata.issuer:"-"),1)):(n.openBlock(),n.createElementBlock("b",F1,n.toDisplayString(n.unref(le)(W).schemaIssuer||"-"),1))]}),expiry:n.withCtx(({row:W})=>{var Be;return[e.config.app==="konnect"?(n.openBlock(),n.createElementBlock("span",q1,n.toDisplayString((Be=W==null?void 0:W.metadata)!=null&&Be.expiry?n.unref(o)(W.metadata.expiry):"-"),1)):(n.openBlock(),n.createElementBlock("span",K1,n.toDisplayString(n.unref(le)(W).schemaExpiry?n.unref(o)(n.unref(le)(W).schemaExpiry):"-"),1))]}),tags:n.withCtx(({row:W})=>{var Be;return[((Be=W==null?void 0:W.tags)==null?void 0:Be.length)>0?(n.openBlock(),n.createBlock(ye,{key:0},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(W==null?void 0:W.tags,K=>(n.openBlock(),n.createBlock(re,{key:K,onClick:he[1]||(he[1]=n.withModifiers(()=>{},["stop"]))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(K),1)]),_:2},1024))),128))]),_:2},1024)):(n.openBlock(),n.createElementBlock("span",z1,"-"))]}),actions:n.withCtx(({row:W})=>[n.createVNode(_t,null,{default:n.withCtx(({copyToClipboard:Be})=>[n.createVNode(Ae,{"data-testid":"action-entity-copy-id",onClick:K=>x(W,Be)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("ca-certificates.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),n.createVNode(_t,null,{default:n.withCtx(({copyToClipboard:Be})=>[n.createVNode(Ae,{"data-testid":"action-entity-copy-json",onClick:K=>F(W,Be)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("ca-certificates.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),n.createVNode(n.unref(Nt),{"auth-function":()=>e.canRetrieve(W)},{default:n.withCtx(()=>[n.createVNode(Ae,{"data-testid":"action-entity-view","has-divider":"",item:I(W.id)},null,8,["item"])]),_:2},1032,["auth-function"]),n.createVNode(n.unref(Nt),{"auth-function":()=>e.canEdit(W)},{default:n.withCtx(()=>[n.createVNode(Ae,{"data-testid":"action-entity-edit",item:E(W.id)},null,8,["item"])]),_:2},1032,["auth-function"]),n.createVNode(n.unref(Nt),{"auth-function":()=>e.canDelete(W)},{default:n.withCtx(()=>[n.createVNode(Ae,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:Be=>be(W)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("ca-certificates.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","use-action-outside"]),n.createVNode(n.unref(Tf),{"action-pending":U.value,"entity-type":n.unref(xa).CACertificate,error:P.value,title:n.unref(i)("ca-certificates.delete.title"),visible:q.value,onCancel:de,onProceed:fe},{description:n.withCtx(()=>[n.createVNode(n.unref(s),{keypath:"ca-certificates.delete.description",scope:"global"},{"bolded-text":n.withCtx(()=>[n.createElementVNode("b",null,n.toDisplayString(n.unref(i)("ca-certificates.delete.boldedText")),1)]),_:1}),n.createElementVNode("p",null,n.toDisplayString(n.unref(i)("ca-certificates.delete.description2")),1)]),_:1},8,["action-pending","entity-type","error","title","visible"])])}}}),Tb="",W1=Ur(G1,[["__scopeId","data-v-affff314"]]),J1={class:"kong-ui-entities-ca-certificates-form"},Y1=n.defineComponent({__name:"CACertificateForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.cancelRoute)},certificateId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(e,{emit:t}){var v;const r=e,i=Hr.useRouter(),{i18n:{t:o}}=ht.useI18n(),{getMessageFromError:s}=Pf(),{axiosInstance:a}=ao({headers:(v=r.config)==null?void 0:v.requestHeaders}),c=n.computed(()=>Ei.form[r.config.app].edit),l=n.computed(()=>r.certificateId?sr.Edit:sr.Create),d=n.reactive({fields:{cert:"",certDigest:"",tags:""},isReadonly:!1,errorMessage:""}),p=n.reactive({cert:"",certDigest:"",tags:""}),y=n.computed(()=>(l.value===sr.Create||JSON.stringify(d.fields)!==JSON.stringify(p))&&!!d.fields.cert),A=b=>{var w;d.fields.cert=(b==null?void 0:b.cert)||"",d.fields.certDigest=(b==null?void 0:b.cert_digest)||"",d.fields.tags=((w=b==null?void 0:b.tags)==null?void 0:w.join(", "))||"",Object.assign(p,d.fields)},C=()=>{i.push(r.config.cancelRoute)},h=n.computed(()=>{var w,x;let b=`${r.config.apiBaseUrl}${Ei.form[r.config.app].validate}`;return r.config.app==="konnect"?b=b.replace(/{controlPlaneId}/gi,((w=r.config)==null?void 0:w.controlPlaneId)||""):r.config.app==="kongManager"&&(b=b.replace(/\/{workspace}/gi,(x=r.config)!=null&&x.workspace?`/${r.config.workspace}`:"")),b=b.replace(/{id}/gi,r.certificateId),b}),g=n.computed(()=>{var w,x;let b=`${r.config.apiBaseUrl}${Ei.form[r.config.app][l.value]}`;return r.config.app==="konnect"?b=b.replace(/{controlPlaneId}/gi,((w=r.config)==null?void 0:w.controlPlaneId)||""):r.config.app==="kongManager"&&(b=b.replace(/\/{workspace}/gi,(x=r.config)!=null&&x.workspace?`/${r.config.workspace}`:"")),b=b.replace(/{id}/gi,r.certificateId),b}),m=async()=>{var b,w,x,F,Z,I,E;try{d.isReadonly=!0;const M={cert:d.fields.cert,cert_digest:d.fields.certDigest||null,tags:(w=(b=d.fields.tags.split(","))==null?void 0:b.map(U=>String(U||"").trim()))==null?void 0:w.filter(U=>U!=="")};let q;await a.post(h.value,M),l.value==="create"?q=await a.post(g.value,M):l.value==="edit"&&(q=((x=r.config)==null?void 0:x.app)==="konnect"?await a.put(g.value,M):await a.patch(g.value,M)),d.fields.cert=((F=q==null?void 0:q.data)==null?void 0:F.cert)||"",d.fields.certDigest=((Z=q==null?void 0:q.data)==null?void 0:Z.cert_digest)||"",d.fields.tags=((E=(I=q==null?void 0:q.data)==null?void 0:I.tags)==null?void 0:E.join(", "))||"",Object.assign(p,d.fields),t("update",q==null?void 0:q.data)}catch(M){d.errorMessage=s(M),t("error",M)}finally{d.isReadonly=!1}};return(b,w)=>{const x=n.resolveComponent("KTextArea"),F=n.resolveComponent("KInput");return n.openBlock(),n.createElementBlock("div",J1,[n.createVNode(n.unref(_f),{"can-submit":y.value,config:e.config,"edit-id":e.certificateId,"error-message":d.errorMessage,"fetch-url":c.value,"is-readonly":d.isReadonly,onCancel:C,"onFetch:error":w[3]||(w[3]=Z=>b.$emit("error",Z)),"onFetch:success":A,onLoading:w[4]||(w[4]=Z=>b.$emit("loading",Z)),onSubmit:m},{default:n.withCtx(()=>[n.createVNode(n.unref(so),{description:n.unref(o)("ca-certificates.form.sections.cert.description"),title:n.unref(o)("ca-certificates.form.sections.cert.title")},{default:n.withCtx(()=>[n.createVNode(x,{modelValue:d.fields.cert,"onUpdate:modelValue":w[0]||(w[0]=Z=>d.fields.cert=Z),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"ca-certificate-form-cert",label:n.unref(o)("ca-certificates.form.fields.cert.label"),"label-attributes":{info:n.unref(o)("ca-certificates.form.fields.cert.tooltip")},readonly:d.isReadonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),n.createVNode(F,{modelValue:d.fields.certDigest,"onUpdate:modelValue":w[1]||(w[1]=Z=>d.fields.certDigest=Z),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"ca-certificate-form-cert-digest",label:n.unref(o)("ca-certificates.form.fields.cert_digest.label"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])]),_:1},8,["description","title"]),n.createVNode(n.unref(so),{description:n.unref(o)("ca-certificates.form.sections.general.description"),title:n.unref(o)("ca-certificates.form.sections.general.title")},{default:n.withCtx(()=>[n.createVNode(F,{modelValue:d.fields.tags,"onUpdate:modelValue":w[2]||(w[2]=Z=>d.fields.tags=Z),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"ca-certificate-form-tags",help:n.unref(o)("ca-certificates.form.fields.tags.help"),label:n.unref(o)("ca-certificates.form.fields.tags.label"),"label-attributes":{info:n.unref(o)("ca-certificates.form.fields.tags.tooltip")},placeholder:n.unref(o)("ca-certificates.form.fields.tags.placeholder"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","error-message","fetch-url","is-readonly"])])}}}),Vb="",Z1=Ur(Y1,[["__scopeId","data-v-bad536b1"]]),Q1={class:"kong-ui-certificate-entity-config-card"},X1={key:0},eb=n.defineComponent({__name:"CertificateConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success","copy:success"],setup(e,{emit:t}){const r=e,{i18n:{t:i,formatUnixTimeStamp:o},i18nT:s}=ht.useI18n(),{convertKeyToTitle:a}=Mf(),{getPropValue:c}=Rf(),{getCertificateData:l}=ht.useCertificate(),d=n.computed(()=>ki.form[r.config.app].edit),p=n.ref(),y=n.ref({id:{},cert:{section:ue.Basic},key:{section:ue.Basic,type:ne.Redacted},metadata:{section:ue.Basic,type:ne.Json},snis:{section:ue.Basic,type:ne.BadgeTag,label:i("certificates.list.table_headers.snis")},updated_at:{},created_at:{},tags:{tooltip:i("certificates.form.fields.tags.tooltip")},...r.config.app==="kongManager"&&{expiry:{section:ue.Basic,label:i("certificates.list.table_headers.expiry"),forceShow:!0},issuer:{section:ue.Basic,label:i("certificates.list.table_headers.issuer"),forceShow:!0},san_names:{section:ue.Basic,label:i("certificates.list.table_headers.san"),forceShow:!0},subject:{section:ue.Basic,label:i("certificates.list.table_headers.subject"),forceShow:!0},key_usages:{forceShow:!0}},cert_alt:{section:ue.Advanced},key_alt:{section:ue.Advanced,type:ne.Redacted}}),A=I=>{p.value=I,t("fetch:success",I)},C=(I,E)=>{const M=c("rowValue",E);if(I==="expiry")return g.value;if(I==="key_usages")return w.value;if(I==="san_names")return v.value;if(M)return M[I]},h=n.computed(()=>{if(p.value)return l(p.value)}),g=n.computed(()=>{var I,E;return(I=h.value)!=null&&I.schemaExpiry?o((E=h.value)==null?void 0:E.schemaExpiry):""}),m=n.computed(()=>{var I;return((I=h.value)==null?void 0:I.schemaIssuer)||""}),v=n.computed(()=>{var I;return((I=h.value)==null?void 0:I.schemaSanNames)||""}),b=n.computed(()=>{var I;return((I=h.value)==null?void 0:I.schemaSubject)||""}),w=n.computed(()=>{var I;return((I=h.value)==null?void 0:I.schemaKeyUsages)||[]}),x=n.computed(()=>{var I,E;return((E=(I=p==null?void 0:p.value)==null?void 0:I.snis)==null?void 0:E.length)>0}),F=n.computed(()=>{var I;return!!((I=p==null?void 0:p.value)!=null&&I.cert_alt)}),Z=I=>{var E,M;return I==="san_names"?i("certificates.list.table_headers.san"):((M=(E=y.value)==null?void 0:E[I])==null?void 0:M.label)||a(I)};return(I,E)=>{const M=n.resolveComponent("KCodeBlock"),q=n.resolveComponent("KLabel"),U=n.resolveComponent("KBadge");return n.openBlock(),n.createElementBlock("div",Q1,[n.createVNode(n.unref(Nf),{config:e.config,"config-card-doc":e.configCardDoc,"config-schema":y.value,"fetch-url":d.value,"hide-title":e.hideTitle,"onCopy:success":E[0]||(E[0]=P=>I.$emit("copy:success",P)),"onFetch:error":E[1]||(E[1]=P=>I.$emit("fetch:error",P)),"onFetch:success":A,onLoading:E[2]||(E[2]=P=>I.$emit("loading",P))},n.createSlots({"cert-label-tooltip":n.withCtx(()=>[n.createVNode(n.unref(s),{keypath:"certificates.form.fields.cert.tooltip",scope:"global"},{emphasis:n.withCtx(()=>[n.createElementVNode("i",null,n.toDisplayString(n.unref(i)("certificates.form.fields.cert.emphasis")),1)]),_:1})]),cert:n.withCtx(P=>[n.unref(c)("rowValue",P)?(n.openBlock(),n.createBlock(M,{key:0,id:`certificate-${e.config.entityId}-cert-codeblock`,code:n.unref(c)("rowValue",P),"is-single-line":"",language:"plaintext"},null,8,["id","code"])):n.createCommentVNode("",!0)]),"key-label-tooltip":n.withCtx(()=>[n.createVNode(n.unref(s),{keypath:"certificates.form.fields.key.tooltip",scope:"global"},{emphasis:n.withCtx(()=>[n.createElementVNode("i",null,n.toDisplayString(n.unref(i)("certificates.form.fields.key.emphasis")),1)]),_:1})]),"metadata-label":n.withCtx(()=>[n.createVNode(q,{class:"metadata-label"},{default:n.withCtx(()=>[n.createTextVNode(" Metadata ")]),_:1})]),metadata:n.withCtx(P=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(n.unref(c)("rowValue",P)),V=>(n.openBlock(),n.createBlock(n.unref(Ci),{key:V,item:{key:V,value:C(V,P),label:Z(V),type:V==="key_usages"||V==="snis"||V==="dns_names"?n.unref(ne).BadgeTag:n.unref(ne).Text}},null,8,["item"]))),128))]),expiry:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(g.value||"–"),1)]),issuer:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(m.value||"–"),1)]),san_names:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(v.value||"–"),1)]),subject:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(b.value||"–"),1)]),"cert_alt-label-tooltip":n.withCtx(()=>[n.createVNode(n.unref(s),{keypath:"certificates.form.fields.cert_alt.tooltip",scope:"global"},{emphasis:n.withCtx(()=>[n.createElementVNode("i",null,n.toDisplayString(n.unref(i)("certificates.form.fields.cert_alt.emphasis")),1)]),_:1})]),"key_alt-label-tooltip":n.withCtx(()=>[n.createVNode(n.unref(s),{keypath:"certificates.form.fields.key_alt.tooltip",scope:"global"},{emphasis:n.withCtx(()=>[n.createElementVNode("i",null,n.toDisplayString(n.unref(i)("certificates.form.fields.key_alt.emphasis")),1)]),_:1})]),key_usages:n.withCtx(()=>[w.value.length?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",X1,n.toDisplayString("–"))),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(w.value,(P,V)=>(n.openBlock(),n.createBlock(U,{key:`key_usages-badge-tag-${V}`,class:"config-badge","data-testid":`key_usages-badge-tag-${V}`,"truncation-tooltip":P},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(P),1)]),_:2},1032,["data-testid","truncation-tooltip"]))),128))]),_:2},[x.value?void 0:{name:"snis",fn:n.withCtx(()=>[n.createTextVNode(" – ")]),key:"0"},F.value?{name:"cert_alt",fn:n.withCtx(P=>[n.createTextVNode(" > "),n.unref(c)("rowValue",P)?(n.openBlock(),n.createBlock(M,{key:0,id:`certificate-${e.config.entityId}-cert-alt-codeblock`,code:n.unref(c)("rowValue",P),"is-single-line":"",language:"plaintext"},null,8,["id","code"])):n.createCommentVNode("",!0)]),key:"1"}:void 0]),1032,["config","config-card-doc","config-schema","fetch-url","hide-title"])])}}}),jb="",tb=Ur(eb,[["__scopeId","data-v-69ded264"]]);Te.CACertificateConfigCard=U1,Te.CACertificateForm=Z1,Te.CACertificateList=W1,Te.CertificateConfigCard=tb,Te.CertificateForm=P1,Te.CertificateList=V1,Object.defineProperty(Te,Symbol.toStringTag,{value:"Module"})});
147
+ `+e.slice(a+1):l+=e.slice(o),l.slice(1)}function c0(e){for(var t="",r=0,i,o=0;o<e.length;r>=65536?o+=2:o++)r=Ii(e,o),i=je[r],!i&&Bi(r)?(t+=e[o],r>=65536&&(t+=e[o+1])):t+=i||Xm(r);return t}function l0(e,t,r){var i="",o=e.tag,s,a,c;for(s=0,a=r.length;s<a;s+=1)c=r[s],e.replacer&&(c=e.replacer.call(r,String(s),c)),(Et(e,t,c,!1,!1)||typeof c>"u"&&Et(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=o,e.dump="["+i+"]"}function Bf(e,t,r,i){var o="",s=e.tag,a,c,l;for(a=0,c=r.length;a<c;a+=1)l=r[a],e.replacer&&(l=e.replacer.call(r,String(a),l)),(Et(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Et(e,t+1,null,!0,!0,!1,!0))&&((!i||o!=="")&&(o+=Ma(e,t)),e.dump&&xi===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=s,e.dump=o||"[]"}function u0(e,t,r){var i="",o=e.tag,s=Object.keys(r),a,c,l,d,p;for(a=0,c=s.length;a<c;a+=1)p="",i!==""&&(p+=", "),e.condenseFlow&&(p+='"'),l=s[a],d=r[l],e.replacer&&(d=e.replacer.call(r,l,d)),Et(e,t,l,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Et(e,t,d,!1,!1)&&(p+=e.dump,i+=p));e.tag=o,e.dump="{"+i+"}"}function d0(e,t,r,i){var o="",s=e.tag,a=Object.keys(r),c,l,d,p,y,A;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new Me("sortKeys must be a boolean or a function");for(c=0,l=a.length;c<l;c+=1)A="",(!i||o!=="")&&(A+=Ma(e,t)),d=a[c],p=r[d],e.replacer&&(p=e.replacer.call(r,d,p)),Et(e,t+1,d,!0,!0,!0)&&(y=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,y&&(e.dump&&xi===e.dump.charCodeAt(0)?A+="?":A+="? "),A+=e.dump,y&&(A+=Ma(e,t)),Et(e,t+1,p,!0,y)&&(e.dump&&xi===e.dump.charCodeAt(0)?A+=":":A+=": ",A+=e.dump,o+=A));e.tag=s,e.dump=o||"{}"}function If(e,t,r){var i,o,s,a,c,l;for(o=r?e.explicitTypes:e.implicitTypes,s=0,a=o.length;s<a;s+=1)if(c=o[s],(c.instanceOf||c.predicate)&&(!c.instanceOf||typeof t=="object"&&t instanceof c.instanceOf)&&(!c.predicate||c.predicate(t))){if(r?c.multi&&c.representName?e.tag=c.representName(t):e.tag=c.tag:e.tag="?",c.represent){if(l=e.styleMap[c.tag]||c.defaultStyle,lf.call(c.represent)==="[object Function]")i=c.represent(t,l);else if(uf.call(c.represent,l))i=c.represent[l](t,l);else throw new Me("!<"+c.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}function Et(e,t,r,i,o,s,a){e.tag=null,e.dump=r,If(e,r,!1)||If(e,r,!0);var c=lf.call(e.dump),l=i,d;i&&(i=e.flowLevel<0||e.flowLevel>t);var p=c==="[object Object]"||c==="[object Array]",y,A;if(p&&(y=e.duplicates.indexOf(r),A=y!==-1),(e.tag!==null&&e.tag!=="?"||A||e.indent!==2&&t>0)&&(o=!1),A&&e.usedDuplicates[y])e.dump="*ref_"+y;else{if(p&&A&&!e.usedDuplicates[y]&&(e.usedDuplicates[y]=!0),c==="[object Object]")i&&Object.keys(e.dump).length!==0?(d0(e,t,e.dump,o),A&&(e.dump="&ref_"+y+e.dump)):(u0(e,t,e.dump),A&&(e.dump="&ref_"+y+" "+e.dump));else if(c==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?Bf(e,t-1,e.dump,o):Bf(e,t,e.dump,o),A&&(e.dump="&ref_"+y+e.dump)):(l0(e,t,e.dump),A&&(e.dump="&ref_"+y+" "+e.dump));else if(c==="[object String]")e.tag!=="?"&&s0(e,e.dump,t,s,l);else{if(c==="[object Undefined]"||e.skipInvalid)return!1;throw new Me("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}function f0(e,t){var r=[],i=[],o,s;for(Ua(e,r,i),o=0,s=i.length;o<s;o+=1)t.duplicates.push(r[i[o]]);t.usedDuplicates=new Array(s)}function Ua(e,t,r){var i,o,s;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(t.push(e),Array.isArray(e))for(o=0,s=e.length;o<s;o+=1)Ua(e[o],t,r);else for(i=Object.keys(e),o=0,s=i.length;o<s;o+=1)Ua(e[i[o]],t,r)}function p0(e,t){t=t||{};var r=new t0(t);r.noRefs||f0(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Et(r,0,i,!0,!0)?r.dump+`
148
+ `:""}var h0=p0,y0={dump:h0};function La(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var g0=Ne,m0=Ed,b0=Td,w0=$d,v0=Md,k0=Ta,C0=cf.load,S0=cf.loadAll,x0=y0.dump,A0=Me,B0={binary:Fd,float:Pd,map:Od,null:Vd,pairs:Kd,set:zd,timestamp:Ld,bool:jd,int:Dd,merge:Hd,omap:qd,seq:_d,str:Nd},I0=La("safeLoad","load"),E0=La("safeLoadAll","loadAll"),N0=La("safeDump","dump"),_0={Type:g0,Schema:m0,FAILSAFE_SCHEMA:b0,JSON_SCHEMA:w0,CORE_SCHEMA:v0,DEFAULT_SCHEMA:k0,load:C0,loadAll:S0,dump:x0,YAMLException:A0,types:B0,safeLoad:I0,safeLoadAll:E0,safeDump:N0};const O0={key:0,class:"config-card-display-form"},T0=["data-testid"],V0={key:0,class:"config-card-prop-section-title"},j0={key:1,class:"config-card-display-json"},D0={key:2,class:"config-card-display-yaml"},P0=st(n.defineComponent({__name:"ConfigCardDisplay",props:{propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:e=>["structured","yaml","json"].includes(e)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>null}},setup(e){const t=e,r=n.useSlots(),{i18n:{t:i}}=Be.useI18n(),o=c=>!!(c.tooltip||r[`${c.key}-label-tooltip`]),s=n.ref(""),a=n.ref("");return n.watch(()=>t.format,c=>{if(c!=="structured"){const l=JSON.parse(JSON.stringify(t.record));delete l.created_at,delete l.updated_at,c==="json"?s.value=JSON.stringify(l,null,2):c==="yaml"&&(a.value=_0.dump(l))}},{immediate:!0}),(c,l)=>{const d=n.resolveComponent("KCodeBlock");return n.openBlock(),n.createElementBlock(n.Fragment,null,[e.format==="structured"?(n.openBlock(),n.createElementBlock("div",O0,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.propListTypes,p=>(n.openBlock(),n.createElementBlock("div",{key:`config-card-details-${p}-props`,class:n.normalizeClass(`config-card-details-${p}-props`),"data-testid":`config-card-details-${p}-props`},[p!=="basic"?(n.openBlock(),n.createElementBlock("div",V0,n.toDisplayString(p==="advanced"?n.unref(i)("baseConfigCard.sections.advanced"):n.unref(i)("baseConfigCard.sections.plugin")),1)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.propertyCollections[p],y=>(n.openBlock(),n.createBlock(Ci,{key:y.key,item:y},n.createSlots({label:n.withCtx(()=>[n.renderSlot(c.$slots,`${y.key}-label`,{row:y},void 0,!0)]),[y.key]:n.withCtx(({rowValue:A})=>[n.renderSlot(c.$slots,y.key,{row:y,rowValue:A},void 0,!0)]),_:2},[o(y)?{name:"label-tooltip",fn:n.withCtx(()=>[n.renderSlot(c.$slots,`${y.key}-label-tooltip`,{row:y},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,T0))),128))])):n.createCommentVNode("",!0),e.format==="json"?(n.openBlock(),n.createElementBlock("div",j0,[n.createVNode(d,{id:"config-card-codeblock",code:s.value,language:"json",theme:"dark"},null,8,["code"])])):n.createCommentVNode("",!0),e.format==="yaml"?(n.openBlock(),n.createElementBlock("div",D0,[n.createVNode(d,{id:"config-card-codeblock",code:a.value,language:"yaml",theme:"dark"},null,8,["code"])])):n.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-c914c7e4"]]),Ef="24px",$0=(e,t)=>{const r=e.__vccOpts||e;for(const[i,o]of t)r[i]=o;return r},M0=e=>(n.pushScopeId("data-v-4c9d405a"),e=e(),n.popScopeId(),e),R0=["aria-hidden"],U0={key:0,"data-testid":"kui-icon-svg-title"},L0=M0(()=>n.createElementVNode("path",{d:"M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",fill:"currentColor"},null,-1)),H0=n.defineComponent({__name:"BookIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Ef,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const t=String(e).replace(/px/gi,""),r=Number(t);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const t=e,r=n.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const o=String(t.size).replace(/px/gi,""),s=Number(o);if(s&&!isNaN(s)&&Number.isInteger(s)&&s>0)return`${s}px`}return Ef}),i=n.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:r.value,lineHeight:"0",width:r.value}));return(o,s)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon book-icon","data-testid":"kui-icon-wrapper-book-icon",style:n.normalizeStyle(i.value)},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-book-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(n.openBlock(),n.createElementBlock("title",U0,n.toDisplayString(e.title),1)):n.createCommentVNode("",!0),L0],8,R0))]),_:1},8,["aria-hidden","style"]))}}),F0=$0(H0,[["__scopeId","data-v-4c9d405a"]]),q0={"data-testid":"config-card-title"},K0={class:"config-card-actions"},z0=["href"],G0={key:2,class:"config-card-details-section"},W0={key:3,class:"config-card-details-section"},J0=["data-testid"],Y0={key:0,class:"config-card-prop-section-title"},Nf=st(n.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1}},emits:["loading","fetch:success","fetch:error","copy:success","copy:error"],setup(e,{emit:t}){var r;const i=e,o=n.useSlots(),{i18n:{t:s}}=Be.useI18n(),{getMessageFromError:a}=Be.useErrors(),{convertKeyToTitle:c}=Be.useStringHelpers(),{axiosInstance:l}=Be.useAxios({headers:(r=i.config)==null?void 0:r.requestHeaders}),d=[{label:s("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:"JSON",value:"json"},{label:"YAML",value:"yaml"}],p=n.ref("structured"),y=E=>{p.value=E==null?void 0:E.value},A={id:{type:ne.ID,label:s("baseConfigCard.commonFields.id_label"),order:0,section:ue.Basic},name:{order:1,section:ue.Basic},enabled:{type:ne.BadgeStatus,order:2,section:ue.Basic},updated_at:{type:ne.Date,label:s("baseConfigCard.commonFields.updated_at_label"),order:3,section:ue.Basic},created_at:{type:ne.Date,label:s("baseConfigCard.commonFields.created_at_label"),order:4,section:ue.Basic},tags:{type:ne.BadgeTag,order:-1,section:ue.Basic}},C=n.ref(!1),h=n.ref(!1),g=n.ref(""),m=n.ref(),v=n.computed(()=>{var E,M,q;if(!m.value)return[];const U=[],P=Object.keys(m.value).length;for(const V in m.value){const te=(M=(E=i.configSchema)==null?void 0:E[V])==null?void 0:M.order,le=(q=A[V])==null?void 0:q.order;let be=P;(le||le===0)&&(be=le===-1?P+1:le),te&&(be=te===-1?P+1:te),U.push([V,be])}return U.sort(function(V,te){return V[1]-te[1]}),U.map(V=>{var te,le;const be=V[0],de=(te=m.value)==null?void 0:te[be],fe=((le=i.configSchema)==null?void 0:le[be])||{},ke=A[be];return{key:be,value:de,hidden:fe.hidden||!1,type:fe.type??((ke==null?void 0:ke.type)||ne.Text),label:fe.label??((ke==null?void 0:ke.label)||c(be)),tooltip:fe.tooltip??((ke==null?void 0:ke.tooltip)||void 0),section:fe.section??((ke==null?void 0:ke.section)||ue.Advanced)}}).filter(V=>!V.hidden&&V.key!==i.pluginConfigKey)}),b=n.computed(()=>{var E,M;if(!m.value||!i.pluginConfigKey)return[];const q=m.value[i.pluginConfigKey]||{},U=Object.keys(q).length,P=[];for(const V in q){const te=(M=(E=i.pluginConfigSchema)==null?void 0:E[V])==null?void 0:M.order,le=q[V];let be=le!=null&&le!==""?U-1:U;te&&(be=te===-1?U+1:te),P.push([V,be])}return P.sort(function(V,te){return V[1]-te[1]}),P.map(V=>{var te;const le=V[0],be=q[le],de=((te=i.pluginConfigSchema)==null?void 0:te[le])||{};return{key:le,value:be,hidden:de.hidden||!1,type:de.type??ne.Text,label:de.label??c(le),tooltip:de.tooltip??void 0,section:ue.Plugin}}).filter(V=>!V.hidden)}),w=n.computed(()=>{var E,M,q,U;return{basic:(E=v.value)==null?void 0:E.filter(P=>P.section===ue.Basic),advanced:(M=v.value)==null?void 0:M.filter(P=>P.section===ue.Advanced),plugin:(U=b.value)==null?void 0:U.concat((q=v.value)==null?void 0:q.filter(P=>P.section===ue.Plugin))}}),x=n.computed(()=>{const E=[];return w.value.basic.length&&E.push("basic"),w.value.advanced.length&&E.push("advanced"),w.value.plugin.length&&E.push("plugin"),E}),F=E=>!!(E.tooltip||o[`${E.key}-label-tooltip`]),Z=n.computed(()=>{var E,M;let q=`${i.config.apiBaseUrl}${i.fetchUrl}`;return i.config.app==="konnect"?q=q.replace(/{controlPlaneId}/gi,((E=i.config)==null?void 0:E.controlPlaneId)||""):i.config.app==="kongManager"&&(q=q.replace(/\/{workspace}/gi,(M=i.config)!=null&&M.workspace?`/${i.config.workspace}`:"")),q=q.replace(/{id}/gi,i.config.entityId),q}),I=E=>{m.value&&E(JSON.stringify(m.value))?t("copy:success",m.value):t("copy:error")};return n.watch(C,E=>{t("loading",E)},{immediate:!0}),n.onBeforeMount(async()=>{h.value=!1,C.value=!0;try{const{data:E}=await l.get(Z.value);if(i.dataKey)if(typeof E[i.dataKey]<"u")m.value={...E[i.dataKey]};else throw new Error(s("errors.dataKeyUndefined",{dataKey:i.dataKey}));else m.value={...E};Object.keys(i.configSchema).filter(M=>i.configSchema[M].forceShow).forEach(M=>{m.value&&typeof m.value[M]>"u"&&(m.value[M]=null)}),t("fetch:success",E)}catch(E){const M=a(E);g.value=M.startsWith("code")?s("baseConfigCard.errors.load"):M,h.value=!0,t("fetch:error",E)}finally{C.value=!1}}),(E,M)=>{const q=n.resolveComponent("KLabel"),U=n.resolveComponent("KSelect"),P=n.resolveComponent("KButton"),V=n.resolveComponent("KClipboardProvider"),te=n.resolveComponent("KSkeleton"),le=n.resolveComponent("KEmptyState"),be=n.resolveComponent("KCard");return n.openBlock(),n.createBlock(be,{class:"kong-ui-entity-base-config-card"},n.createSlots({actions:n.withCtx(()=>[n.createElementVNode("div",K0,[n.renderSlot(E.$slots,"actions",{},void 0,!0),e.config.jsonYamlEnabled?(n.openBlock(),n.createBlock(q,{key:0,class:"config-format-select-label","data-testid":"config-format-select-label"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.label),1)]),_:1})):n.createCommentVNode("",!0),e.config.jsonYamlEnabled?(n.openBlock(),n.createBlock(U,{key:1,appearance:"select","data-testid":"select-config-format",items:d,onChange:y})):n.createCommentVNode("",!0),i.config.jsonYamlEnabled&&e.configCardDoc?(n.openBlock(),n.createBlock(P,{key:2,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:n.withCtx(()=>[n.createElementVNode("a",{href:e.configCardDoc,rel:"noopener",target:"_blank"},[n.createVNode(n.unref(F0),{size:n.unref(Qy)},null,8,["size"])],8,z0)]),_:1})):n.createCommentVNode("",!0),e.config.jsonYamlEnabled?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(V,{key:3},{default:n.withCtx(({copyToClipboard:de})=>[!C.value&&!h.value?(n.openBlock(),n.createBlock(P,{key:0,appearance:"tertiary","data-testid":"json-copy-button",onClick:fe=>I(de)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(s)("baseConfigCard.actions.copy")),1)]),_:2},1032,["onClick"])):n.createCommentVNode("",!0)]),_:1}))])]),body:n.withCtx(()=>[C.value?(n.openBlock(),n.createBlock(te,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):h.value?(n.openBlock(),n.createBlock(le,{key:1,"data-testid":"config-card-fetch-error","is-error":""},{message:n.withCtx(()=>[n.createElementVNode("h3",null,n.toDisplayString(g.value),1)]),_:1})):n.createCommentVNode("",!0),e.config.jsonYamlEnabled?(n.openBlock(),n.createElementBlock("div",G0,[n.createVNode(P0,{format:p.value,"prop-list-types":x.value,"property-collections":w.value,record:m.value},n.createSlots({_:2},[n.renderList(Object.keys(E.$slots),de=>({name:de,fn:n.withCtx(({row:fe,rowValue:ke})=>[n.renderSlot(E.$slots,de,{row:fe,rowValue:ke},void 0,!0)])}))]),1032,["format","prop-list-types","property-collections","record"])])):(n.openBlock(),n.createElementBlock("div",W0,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(x.value,de=>(n.openBlock(),n.createElementBlock("div",{key:`config-card-details-${de}-props`,class:n.normalizeClass(`config-card-details-${de}-props`),"data-testid":`config-card-details-${de}-props`},[de!=="basic"?(n.openBlock(),n.createElementBlock("div",Y0,n.toDisplayString(de==="advanced"?n.unref(s)("baseConfigCard.sections.advanced"):n.unref(s)("baseConfigCard.sections.plugin")),1)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(w.value[de],fe=>(n.openBlock(),n.createBlock(Ci,{key:fe.key,item:fe},n.createSlots({label:n.withCtx(()=>[n.renderSlot(E.$slots,`${fe.key}-label`,{row:fe},void 0,!0)]),[fe.key]:n.withCtx(({rowValue:ke})=>[n.renderSlot(E.$slots,fe.key,{row:fe,rowValue:ke},void 0,!0)]),_:2},[F(fe)?{name:"label-tooltip",fn:n.withCtx(()=>[n.renderSlot(E.$slots,`${fe.key}-label-tooltip`,{row:fe},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,J0))),128))]))]),_:2},[e.hideTitle?void 0:{name:"title",fn:n.withCtx(()=>[n.createElementVNode("div",q0,[n.renderSlot(E.$slots,"title",{},()=>[n.createTextVNode(n.toDisplayString(n.unref(s)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1024)}}}),[["__scopeId","data-v-b3999889"]]),Z0=["onReset","onSubmit"],Q0={class:"form-actions","data-testid":"form-actions"},_f=st(n.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},editId:{type:String,required:!1,default:""},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(e,{emit:t}){var r;const i=e,o=Hr.useRouter(),{i18n:{t:s}}=Be.useI18n(),{getMessageFromError:a}=Be.useErrors(),{axiosInstance:c}=Be.useAxios({headers:(r=i.config)==null?void 0:r.requestHeaders}),l=n.ref(!1),d=n.ref(!1),p=n.ref(""),y=n.computed(()=>i.canSubmit===!1||i.isReadonly),A=n.computed(()=>{var m,v;if(!i.editId)return"";let b=`${i.config.apiBaseUrl}${i.fetchUrl}`;return i.config.app==="konnect"?b=b.replace(/{controlPlaneId}/gi,((m=i.config)==null?void 0:m.controlPlaneId)||""):i.config.app==="kongManager"&&(b=b.replace(/\/{workspace}/gi,(v=i.config)!=null&&v.workspace?`/${i.config.workspace}`:"")),b=b.replace(/{id}/gi,i.editId),b}),C=()=>{i.config.cancelRoute?o.push(i.config.cancelRoute):h()},h=()=>{t("cancel")},g=()=>{y.value||t("submit")};return n.watch(()=>l.value,m=>{t("loading",m)},{immediate:!0}),n.onBeforeMount(async()=>{if(i.editId)try{d.value=!1,l.value=!0;const{data:m}=await c.get(A.value);t("fetch:success",m)}catch(m){const v=a(m);p.value=v.startsWith("code")?s("baseForm.errors.edit"):v,d.value=!0,t("fetch:error",m)}finally{l.value=!1}}),(m,v)=>{const b=n.resolveComponent("KSkeleton"),w=n.resolveComponent("KEmptyState"),x=n.resolveComponent("KAlert"),F=n.resolveComponent("KButton"),Z=n.resolveComponent("KCard");return n.openBlock(),n.createBlock(Z,{class:"kong-ui-entity-base-form"},{body:n.withCtx(()=>[l.value?(n.openBlock(),n.createBlock(b,{key:0,type:"form"})):d.value?(n.openBlock(),n.createBlock(w,{key:1,"cta-text":n.unref(s)("baseForm.actions.back"),"data-testid":"form-fetch-error","handle-click":C,"is-error":!0},{message:n.withCtx(()=>[n.createElementVNode("h3",null,n.toDisplayString(p.value),1)]),_:1},8,["cta-text"])):(n.openBlock(),n.createElementBlock("form",{key:2,"data-testid":"form-content",onReset:n.withModifiers(h,["prevent"]),onSubmit:n.withModifiers(g,["prevent"])},[n.renderSlot(m.$slots,"default",{},void 0,!0),e.errorMessage?(n.openBlock(),n.createBlock(x,{key:0,"alert-message":e.errorMessage,appearance:"danger","data-testid":"form-error"},null,8,["alert-message"])):n.createCommentVNode("",!0),n.createElementVNode("div",Q0,[n.renderSlot(m.$slots,"form-actions",{},()=>[n.createVNode(F,{appearance:"secondary","data-testid":"form-cancel",disabled:e.isReadonly,type:"reset"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(s)("baseForm.actions.cancel")),1)]),_:1},8,["disabled"]),n.createVNode(F,{appearance:"primary","data-testid":"form-submit",disabled:y.value,type:"submit"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(s)("baseForm.actions.save")),1)]),_:1},8,["disabled"])],!0)])],40,Z0))]),_:3})}}}),[["__scopeId","data-v-81612aef"]]),X0={key:0,"data-testid":"first-col"},e1=st(n.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0}},setup(e){const t=e,r=n.computed(()=>{var g;return((g=t.rowEl)==null?void 0:g.querySelector(`[data-testid="${t.keyName}"]`))||null}),i=n.computed(()=>{var g;return((g=r.value)==null?void 0:g.querySelector('[data-testid="first-col"]'))||null}),o=n.computed(()=>{var g,m;const v=(g=t.rowEl)==null?void 0:g.querySelectorAll("td");return v?((m=v[0])==null?void 0:m.getAttribute("data-testid"))===t.keyName:!1});let s;const a=()=>{s&&(s.disconnect(),s=void 0)},c=()=>{var g,m,v;d.value=((g=i.value)==null?void 0:g.getBoundingClientRect().width)||0,p.value=((m=r.value)==null?void 0:m.clientWidth)||0,y.value=((v=l.value)==null?void 0:v.innerText)||""},l=n.ref({}),d=n.ref(0),p=n.ref(0),y=n.ref(""),A=n.computed(()=>[i.value,r.value]),C=n.watch(A,g=>{if(o.value&&(a(),"ResizeObserver"in window&&window)){s=new ResizeObserver(m=>{window.requestAnimationFrame(()=>{!Array.isArray(m)||!m.length||c()})});for(const m of g)m&&s.observe(m)}},{immediate:!0,flush:"post",deep:!0}),h=n.computed(()=>o.value?d.value>p.value:!1);return n.onMounted(()=>{c()}),n.onUnmounted(()=>{C()}),(g,m)=>{const v=n.resolveComponent("KTooltip");return n.openBlock(),n.createElementBlock("span",{ref_key:"contentRef",ref:l,class:"content-wrapper"},[o.value?(n.openBlock(),n.createElementBlock("span",X0,[n.createVNode(v,{label:h.value?y.value:"","max-width":"300",placement:"bottomStart"},{default:n.withCtx(()=>[n.renderSlot(g.$slots,"default",{},void 0,!0)]),_:3},8,["label"])])):n.renderSlot(g.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-e42a20c9"]]),t1={class:"toolbar-container"},r1={key:0,class:"toolbar-button-container"},i1=["data-testid"],Of=st(n.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:[String,Object],default:null},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},dropdownMenuWidth:{type:String,default:"",required:!1},title:{type:String,default:""},disableRowClick:{type:Boolean,default:!1}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(e,{emit:t}){const r=e,{i18n:{t:i}}=Be.useI18n(),o=n.computed(()=>{var x,F;return typeof r.errorMessage=="string"?{hasError:!!r.errorMessage,title:r.errorMessage,message:void 0}:{hasError:!!r.errorMessage,title:(x=r.errorMessage)==null?void 0:x.title,message:(F=r.errorMessage)==null?void 0:F.message}}),s=n.computed(()=>r.cacheIdentifier||r.preferencesStorageKey),a=x=>x.hasData||!!r.query,c=n.computed(()=>{const x=[];return Object.keys(r.tableHeaders).forEach(F=>{const Z=r.tableHeaders[F];x.push({label:Z.label??F,key:F,sortable:Z.sortable??!1})}),r.enableEntityActions&&x.push({key:"actions",hideLabel:!0}),x}),l=x=>({"data-rowid":x.id,"data-testid":x.name,...r.rowAttributes(x)}),d=n.ref({}),p=x=>{var F;return(F=d.value)==null?void 0:F.$el.querySelector(`[data-rowid="${x.id}"]`)},y=x=>{const F={"data-testid":x.headerKey,...r.cellAttributes(x)};return x.colIndex===0&&(F.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),F},A=()=>{t("empty-state-cta-clicked"),C()},C=()=>{t("clear-search-input")},h=n.computed(()=>r.disableRowClick?void 0:(x,F)=>{t("click:row",F)}),g=x=>{t("sort",x)},{setTablePreferences:m,getTablePreferences:v}=ny(),b=n.computed(()=>{const x=v(r.preferencesStorageKey);return{...r.initialFetcherParams,...x}}),w=x=>{r.preferencesStorageKey&&m(r.preferencesStorageKey,x)};return(x,F)=>{const Z=n.resolveComponent("KIcon"),I=n.resolveComponent("KButton"),E=n.resolveComponent("KDropdown"),M=n.resolveComponent("KTable"),q=n.resolveComponent("KCard");return n.openBlock(),n.createBlock(q,{class:"kong-ui-entity-base-table",title:e.title},{body:n.withCtx(()=>[n.createVNode(M,{ref_key:"tableRefs",ref:d,"cache-identifier":s.value,"cell-attrs":y,"disable-pagination-page-jump":e.disablePaginationPageJump,"disable-sorting":e.disableSorting,"empty-state-action-button-icon":e.query?"":"plus","empty-state-action-message":e.query?n.unref(i)("baseTable.emptyState.noSearchResultsCtaText"):e.emptyStateOptions.ctaText,"empty-state-action-route":e.query?"":e.emptyStateOptions.ctaPath,"empty-state-icon":e.query?"stateNoSearchResults":"stateGruceo","empty-state-icon-size":"96","empty-state-message":e.query?n.unref(i)("baseTable.emptyState.noSearchResultsMessage"):e.emptyStateOptions.message,"empty-state-title":e.query?n.unref(i)("baseTable.emptyState.noSearchResultsTitle"):e.emptyStateOptions.title,"enable-client-sort":e.enableClientSort,"error-state-message":o.value.message,"error-state-title":o.value.title,fetcher:e.fetcher,"fetcher-cache-key":String(e.fetcherCacheKey),"has-error":o.value.hasError,headers:c.value,"hide-pagination-when-optional":"","initial-fetcher-params":b.value,"is-loading":e.isLoading,"pagination-type":e.paginationType,"row-attrs":l,"search-input":e.query,onKtableEmptyStateCtaClicked:A,"onRow:click":h.value,onSort:F[0]||(F[0]=U=>g(U)),"onUpdate:tablePreferences":w},n.createSlots({toolbar:n.withCtx(({state:U})=>[n.withDirectives(n.createElementVNode("div",t1,[n.renderSlot(x.$slots,"toolbar-filter",{},void 0,!0),x.$slots["toolbar-button"]?(n.openBlock(),n.createElementBlock("div",r1,[n.renderSlot(x.$slots,"toolbar-button",{},void 0,!0)])):n.createCommentVNode("",!0)],512),[[n.vShow,a(U)]])]),actions:n.withCtx(({row:U,rowKey:P,rowValue:V})=>[n.createElementVNode("div",{class:"actions-container","data-testid":U.name},[n.createVNode(E,{"kpop-attributes":{placement:"bottomEnd"},width:e.dropdownMenuWidth},{items:n.withCtx(()=>[n.renderSlot(x.$slots,"actions",{row:U,rowKey:P,rowValue:V},void 0,!0)]),default:n.withCtx(()=>[n.createVNode(I,{class:"actions-trigger","data-testid":"overflow-actions-button",size:"small"},{icon:n.withCtx(()=>[n.createVNode(Z,{color:n.unref(Yy),icon:"more",size:"16"},null,8,["color"])]),_:1})]),_:2},1032,["width"])],8,i1)]),_:2},[n.renderList(e.tableHeaders,(U,P)=>({name:P,fn:n.withCtx(({row:V,rowKey:te,rowValue:le})=>[n.createVNode(e1,{"key-name":String(P),"row-el":p(V)},{default:n.withCtx(()=>[n.renderSlot(x.$slots,P,{row:V,rowKey:te,rowValue:le},()=>[n.createTextVNode(n.toDisplayString(le),1)],!0)]),_:2},1032,["key-name","row-el"])])}))]),1032,["cache-identifier","disable-pagination-page-jump","disable-sorting","empty-state-action-button-icon","empty-state-action-message","empty-state-action-route","empty-state-icon","empty-state-message","empty-state-title","enable-client-sort","error-state-message","error-state-title","fetcher","fetcher-cache-key","has-error","headers","initial-fetcher-params","is-loading","pagination-type","search-input","onRow:click"])]),_:3},8,["title"])}}}),[["__scopeId","data-v-499a771c"]]),n1={key:0,class:"kong-ui-entity-delete-error"},o1={key:1,class:"description"},Tf=st(n.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(e,{emit:t}){const r=e,{i18nT:i}=Be.useI18n(),o=n.computed(()=>r.needConfirm?r.entityName:""),s=()=>{t("cancel")},a=()=>{t("proceed")};return(c,l)=>{const d=n.resolveComponent("KAlert"),p=n.resolveComponent("KPrompt");return n.openBlock(),n.createBlock(p,{"action-button-text":"Yes, delete","action-pending":e.actionPending,class:"kong-ui-entity-delete-modal","confirmation-text":o.value,"is-visible":e.visible,title:e.title,type:"danger",onCanceled:s,onProceed:a},{"body-content":n.withCtx(()=>[e.error?(n.openBlock(),n.createElementBlock("div",n1,[n.createVNode(d,{appearance:"danger"},{alertMessage:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.error),1)]),_:1})])):n.createCommentVNode("",!0),n.createVNode(n.unref(i),{class:"message",keypath:r.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},n.createSlots({entityType:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(r.entityType),1)]),_:2},[r.entityName?{name:"entityName",fn:n.withCtx(()=>[n.createElementVNode("strong",null,n.toDisplayString(r.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),r.description||c.$slots.description?(n.openBlock(),n.createElementBlock("div",o1,[n.renderSlot(c.$slots,"description",{},()=>[n.createElementVNode("p",null,n.toDisplayString(r.description),1)],!0)])):n.createCommentVNode("",!0)]),_:3},8,["action-pending","confirmation-text","is-visible","title"])}}}),[["__scopeId","data-v-1c9a2a07"]]),s1={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},a1={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},c1=["fill"],l1={mask:"url(#mask0_180_20349)"},u1=["fill"],Vf=n.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${Wy})`}},setup(e){return(t,r)=>(n.openBlock(),n.createElementBlock("svg",s1,[n.createElementVNode("mask",a1,[n.createElementVNode("rect",{fill:e.color,height:"20",width:"20"},null,8,c1)]),n.createElementVNode("g",l1,[n.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:e.color},null,8,u1)])]))}}),d1={key:1,class:"kong-ui-entity-filter"},f1={class:"menu-item-title"},p1={class:"menu-item-indicator"},h1={class:"menu-item-body"},y1=["for"],g1={class:"menu-item-buttons"},m1={class:"filter-clear-button-container"},jf=st(n.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,{i18n:{t:i}}=Be.useI18n(),o=n.ref(!1),s=n.ref({}),a=n.computed(()=>{const m=[];return new URLSearchParams(r.modelValue).forEach((v,b)=>{v!==""&&m.push(b)}),m}),c=n.computed(()=>{const m=r.config.fields;return Object.keys(m).filter(v=>m[v].searchable).map(v=>({label:m[v].label||v,value:v}))});n.watch(()=>r.modelValue,m=>{s.value={},new URLSearchParams(m).forEach((v,b)=>{s.value[b]=v})});const l=()=>{o.value=!o.value},d=m=>{t("update:modelValue",m)},p=m=>`filter-${m}`,y=m=>{var v,b;return(((b=(v=r.config.schema)==null?void 0:v[m])==null?void 0:b.values)??[]).map(w=>({value:w,label:w}))},A=m=>{var v,b;return((b=(v=r.config.schema)==null?void 0:v[m])==null?void 0:b.type)??"text"},C=m=>{s.value={...s.value,[m]:""},g()},h=()=>{s.value={},g(!0)},g=(m=!1)=>{const v=Object.keys(s.value).reduce((b,w)=>(s.value[w]&&(b[w]=`${s.value[w]}`),b),{});m&&(o.value=!1),t("update:modelValue",new URLSearchParams(v).toString())};return(m,v)=>{const b=n.resolveComponent("KInput"),w=n.resolveComponent("KButton"),x=n.resolveComponent("KSelect"),F=n.resolveComponent("KMenuItem"),Z=n.resolveComponent("KMenu");return e.config.isExactMatch?(n.openBlock(),n.createBlock(b,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":e.modelValue,placeholder:e.config.placeholder,"onUpdate:modelValue":d},{before:n.withCtx(()=>[n.createVNode(Vf)]),_:1},8,["model-value","placeholder"])):(n.openBlock(),n.createElementBlock("div",d1,[n.createVNode(w,{appearance:"tertiary","data-testid":"filter-button",onClick:l},{default:n.withCtx(()=>[n.createVNode(Vf),n.createTextVNode(" "+n.toDisplayString(n.unref(i)("filter.filterButtonText"))+" "+n.toDisplayString(a.value.length>0?`(${a.value.length})`:""),1)]),_:1}),n.withDirectives(n.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:l},null,512),[[n.vShow,o.value]]),n.withDirectives(n.createVNode(Z,{class:"kong-ui-entity-filter-menu"},{body:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(c.value,(I,E)=>(n.openBlock(),n.createBlock(F,{key:I.value,"data-testid":I.value,expandable:"","last-menu-item":E===c.value.length-1},{itemTitle:n.withCtx(()=>[n.createElementVNode("span",f1,[n.createTextVNode(n.toDisplayString(I.label)+" ",1),n.withDirectives(n.createElementVNode("span",p1,null,512),[[n.vShow,a.value.includes(I.value)]])])]),itemBody:n.withCtx(()=>{var M,q;return[n.createElementVNode("div",h1,[n.createElementVNode("label",{class:"menu-item-label",for:p(I.value)},n.toDisplayString(n.unref(i)("filter.fieldLabel")),9,y1),((q=(M=e.config.schema)==null?void 0:M[I.value])==null?void 0:q.type)==="select"?(n.openBlock(),n.createBlock(x,{key:0,id:p(I.value),modelValue:s.value[I.value],"onUpdate:modelValue":U=>s.value[I.value]=U,appearance:"select",items:y(I.value),placeholder:n.unref(i)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(n.openBlock(),n.createBlock(b,{key:1,id:p(I.value),modelValue:s.value[I.value],"onUpdate:modelValue":U=>s.value[I.value]=U,autocomplete:"off",placeholder:n.unref(i)("filter.inputPlaceholder"),type:A(I.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))]),n.createElementVNode("div",g1,[n.createVNode(w,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:v[0]||(v[0]=U=>g(!0))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("filter.applyButtonText")),1)]),_:1}),n.createVNode(w,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:U=>C(I.value)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])])]}),_:2},1032,["data-testid","last-menu-item"]))),128))]),actionButton:n.withCtx(()=>[n.createElementVNode("div",m1,[n.createVNode(w,{appearance:"tertiary",size:"small",onClick:h},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("filter.clearAllButtonText")),1)]),_:1})])]),_:1},512),[[n.vShow,o.value]])]))}}}),[["__scopeId","data-v-15962ee2"]]),Nt=n.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(e){const t=e,r=n.ref(void 0),i=n.computed(()=>r.value===!0||r.value!==void 0&&t.forceShow===!0);return n.watch(()=>t.authFunction,async()=>{r.value=await t.authFunction()},{immediate:!0}),(o,s)=>i.value?n.renderSlot(o.$slots,"default",{key:0,isAllowed:r.value}):n.createCommentVNode("",!0)}}),b1={class:"form-section-wrapper"},w1={key:0,class:"form-section-title"},v1={key:1,class:"form-section-description"},k1={key:2,class:"form-section-footer"},C1={class:"form-section-content"},so=st(n.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1}},setup(e){const t=n.useSlots();return(r,i)=>(n.openBlock(),n.createElementBlock("fieldset",{class:n.normalizeClass(["kong-ui-entity-form-section",{"has-divider":e.hasDivider}])},[n.createElementVNode("div",b1,[e.hideInfoHeader?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["form-section-info",{sticky:e.stickyInfoHeader}])},[e.title?(n.openBlock(),n.createElementBlock("h4",w1,n.toDisplayString(e.title),1)):n.createCommentVNode("",!0),e.description||n.unref(t).description?(n.openBlock(),n.createElementBlock("div",v1,[n.renderSlot(r.$slots,"description",{},()=>[n.createElementVNode("p",null,n.toDisplayString(e.description),1)],!0)])):n.createCommentVNode("",!0),n.unref(t).footer?(n.openBlock(),n.createElementBlock("div",k1,[n.renderSlot(r.$slots,"footer",{},void 0,!0)])):n.createCommentVNode("",!0)],2)),n.createElementVNode("div",C1,[n.renderSlot(r.$slots,"default",{},void 0,!0)])])],2))}}),[["__scopeId","data-v-8b6dc312"]]),{useAxios:ao,useDeleteUrlBuilder:Df,useErrors:Pf,useExternalLinkCreator:Cb,useFetchUrlBuilder:Sb,useFetcher:$f,useDebouncedFilter:xb,useStringHelpers:Mf,useHelpers:Rf,useGatewayFeatureSupported:Ab,useTruncationDetector:Bb}=Be,Ib="",Eb="",S1={class:"kong-ui-entities-certificates-list"},x1={key:0},A1={key:1},B1={key:0},I1={key:1},E1={key:0},N1={key:1},_1={key:1},O1={key:1},T1=n.defineComponent({__name:"CertificateList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.createRoute||!e.getViewRoute||!e.getEditRoute||e.app==="kongManager"&&!e.isExactMatch&&!e.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canCreateSni:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success"],setup(e,{emit:t}){var he;const r=e,{i18n:{t:i,formatUnixTimeStamp:o},i18nT:s}=ht.useI18n(),a=Hr.useRouter(),{axiosInstance:c}=ao({headers:(he=r.config)==null?void 0:he.requestHeaders}),l=n.ref(1),d=n.computed(()=>r.config.app!=="kongManager"||!!r.config.disableSorting),y={subject:{label:i("certificates.list.table_headers.subject")},expiry:{label:i("certificates.list.table_headers.expiry")},san:{label:i("certificates.list.table_headers.san")},cert:{label:i("certificates.list.table_headers.cert")},tags:{label:i("certificates.list.table_headers.tags"),sortable:!0}},A=n.computed(()=>{var re,ye;let T=`${r.config.apiBaseUrl}${ki.list[r.config.app]}`;return r.config.app==="konnect"?T=T.replace(/{controlPlaneId}/gi,((re=r.config)==null?void 0:re.controlPlaneId)||""):r.config.app==="kongManager"&&(T=T.replace(/\/{workspace}/gi,(ye=r.config)!=null&&ye.workspace?`/${r.config.workspace}`:"")),T}),C=n.ref(""),h=n.computed(()=>{const T=r.config.app==="konnect"||r.config.isExactMatch;return T?{isExactMatch:T,placeholder:i("certificates.search.placeholder")}:{isExactMatch:T,schema:r.config.filterSchema}}),{fetcher:g,fetcherState:m}=$f(r.config,A.value),v=()=>{C.value=""},b=()=>{l.value++},w=n.ref(null),x=(T,re)=>{const ye=T.id;if(!re(ye)){t("copy:error",{entity:T,field:"id",message:i("certificates.errors.copy")});return}t("copy:success",{entity:T,field:"id",message:i("certificates.copy.success",{val:ye})})},F=(T,re)=>{const ye=JSON.stringify(T);if(!re(ye)){t("copy:error",{entity:T,message:i("certificates.errors.copy")});return}t("copy:success",{entity:T,message:i("certificates.copy.success_brief")})},Z=(T,re)=>{T.type==="error"?t("copy:error",{entity:re,field:"cert",message:i("certificates.errors.copy")}):t("copy:success",{entity:re,field:"cert",message:i("certificates.copy.success_brief")})},I=async T=>{var ye;await((ye=r.canRetrieve)==null?void 0:ye.call(r,T))&&a.push(r.config.getViewRoute(T.id))},E=T=>({label:i("certificates.actions.view"),to:r.config.getViewRoute(T)}),M=T=>({label:i("certificates.actions.edit"),to:r.config.getEditRoute(T)}),q=T=>{if(r.config.getCreateSniRoute)return{label:i("certificates.actions.addSni"),to:r.config.getCreateSniRoute(T)}},U=n.ref(void 0),P=n.ref(!1),V=n.ref(!1),te=n.ref(""),le=Df(r.config,A.value),{certificateDataCache:be,getCertificateData:de}=ht.useCertificate(),fe=T=>{U.value=T,P.value=!0},ke=()=>{P.value=!1},Ut=async()=>{var T,re,ye;if((T=U.value)!=null&&T.id){V.value=!0;try{await c.delete(le(U.value.id)),V.value=!1,P.value=!1,l.value++,t("delete:success",U.value)}catch(De){te.value=((ye=(re=De.response)==null?void 0:re.data)==null?void 0:ye.message)||De.message||i("certificates.errors.delete"),t("error",De)}finally{V.value=!1}}},pe=n.ref(!0);n.watch(m,T=>{var re,ye,De,_t;if(Array.isArray((re=T==null?void 0:T.response)==null?void 0:re.data)&&(pe.value=T.response.data.length>0),T.status===$t.Error){w.value={title:i("certificates.errors.general")},(_t=(De=(ye=T.error)==null?void 0:ye.response)==null?void 0:De.data)!=null&&_t.message&&(w.value.message=T.error.response.data.message),t("error",T.error);return}be.value={},w.value=null});const W=n.ref({ctaPath:r.config.createRoute,ctaText:void 0,message:i("certificates.list.empty_state.description"),title:i("certificates.title")});return n.onBeforeMount(async()=>{await r.canCreate()&&(W.value.title=i("certificates.list.empty_state.title"),W.value.ctaText=i("certificates.actions.create"))}),(T,re)=>{const ye=n.resolveComponent("KButton"),De=n.resolveComponent("KBadge"),_t=n.resolveComponent("KTruncate"),Y=n.resolveComponent("KDropdownItem"),Ae=n.resolveComponent("KClipboardProvider");return n.openBlock(),n.createElementBlock("div",S1,[n.createVNode(n.unref(Of),{"cache-identifier":e.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":d.value,"empty-state-options":W.value,"enable-entity-actions":"","error-message":w.value,fetcher:n.unref(g),"fetcher-cache-key":l.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-certificates-list",query:C.value,"table-headers":n.unref(y),"use-action-outside":e.useActionOutside,onClearSearchInput:v,"onClick:row":re[2]||(re[2]=K=>I(K)),onSort:b},{"toolbar-filter":n.withCtx(()=>[n.createVNode(n.unref(jf),{modelValue:C.value,"onUpdate:modelValue":re[0]||(re[0]=K=>C.value=K),config:h.value},null,8,["modelValue","config"])]),"toolbar-button":n.withCtx(()=>[(n.openBlock(),n.createBlock(n.Teleport,{disabled:!e.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[n.createVNode(n.unref(Nt),{"auth-function":()=>e.canCreate()},{default:n.withCtx(()=>[n.withDirectives(n.createVNode(ye,{appearance:"primary","data-testid":"toolbar-add-certificate",icon:"plus",to:e.config.createRoute},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("certificates.list.toolbar_actions.new_certificate")),1)]),_:1},8,["to"]),[[n.vShow,pe.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),subject:n.withCtx(({row:K})=>{var we;return[e.config.app==="konnect"?(n.openBlock(),n.createElementBlock("b",x1,n.toDisplayString((we=K==null?void 0:K.metadata)!=null&&we.subject?K.metadata.subject:"-"),1)):(n.openBlock(),n.createElementBlock("b",A1,n.toDisplayString(n.unref(de)(K).schemaSubject||"-"),1))]}),expiry:n.withCtx(({row:K})=>{var we;return[e.config.app==="konnect"?(n.openBlock(),n.createElementBlock("span",B1,n.toDisplayString((we=K==null?void 0:K.metadata)!=null&&we.expiry?n.unref(o)(K.metadata.expiry):"-"),1)):(n.openBlock(),n.createElementBlock("span",I1,n.toDisplayString(n.unref(de)(K).schemaExpiry?n.unref(o)(n.unref(de)(K).schemaExpiry):"-"),1))]}),san:n.withCtx(({row:K})=>{var we;return[e.config.app==="konnect"?(n.openBlock(),n.createElementBlock("span",E1,n.toDisplayString((we=K==null?void 0:K.metadata)!=null&&we.dns_names?`dns=${K.metadata.dns_names.join(", ")}`:"-"),1)):(n.openBlock(),n.createElementBlock("span",N1,n.toDisplayString(n.unref(de)(K).schemaSanNames||"-"),1))]}),cert:n.withCtx(({row:K})=>[K!=null&&K.cert?(n.openBlock(),n.createBlock(n.unref(ty),{key:0,"data-testid":"copy-certificate-cert",notify:we=>Z(we,K),truncated:!0,uuid:K.cert},null,8,["notify","uuid"])):(n.openBlock(),n.createElementBlock("span",_1,"-"))]),tags:n.withCtx(({row:K})=>{var we;return[((we=K==null?void 0:K.tags)==null?void 0:we.length)>0?(n.openBlock(),n.createBlock(_t,{key:0},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(K==null?void 0:K.tags,Lr=>(n.openBlock(),n.createBlock(De,{key:Lr,onClick:re[1]||(re[1]=n.withModifiers(()=>{},["stop"]))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(Lr),1)]),_:2},1024))),128))]),_:2},1024)):(n.openBlock(),n.createElementBlock("span",O1,"-"))]}),actions:n.withCtx(({row:K})=>[n.createVNode(Ae,null,{default:n.withCtx(({copyToClipboard:we})=>[n.createVNode(Y,{"data-testid":"action-entity-copy-id",onClick:Lr=>x(K,we)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("certificates.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),n.createVNode(Ae,null,{default:n.withCtx(({copyToClipboard:we})=>[n.createVNode(Y,{"data-testid":"action-entity-copy-json",onClick:Lr=>F(K,we)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("certificates.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),n.createVNode(n.unref(Nt),{"auth-function":()=>e.canRetrieve(K)},{default:n.withCtx(()=>[n.createVNode(Y,{"data-testid":"action-entity-view","has-divider":"",item:E(K.id)},null,8,["item"])]),_:2},1032,["auth-function"]),n.createVNode(n.unref(Nt),{"auth-function":()=>e.canEdit(K)},{default:n.withCtx(()=>[n.createVNode(Y,{"data-testid":"action-entity-edit",item:M(K.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.config.getCreateSniRoute?(n.openBlock(),n.createBlock(n.unref(Nt),{key:0,"auth-function":()=>e.canCreateSni()},{default:n.withCtx(()=>[n.createVNode(Y,{"data-testid":"action-entity-add-sni",item:q(K.id)},null,8,["item"])]),_:2},1032,["auth-function"])):n.createCommentVNode("",!0),n.createVNode(n.unref(Nt),{"auth-function":()=>e.canDelete(K)},{default:n.withCtx(()=>[n.createVNode(Y,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:we=>fe(K)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("certificates.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","use-action-outside"]),n.createVNode(n.unref(Tf),{"action-pending":V.value,"entity-type":n.unref(xa).Certificate,error:te.value,title:n.unref(i)("certificates.delete.title"),visible:P.value,onCancel:ke,onProceed:Ut},{description:n.withCtx(()=>[n.createVNode(n.unref(s),{keypath:"certificates.delete.description",scope:"global"},{"bolded-text":n.withCtx(()=>[n.createElementVNode("b",null,n.toDisplayString(n.unref(i)("certificates.delete.boldedText")),1)]),_:1}),n.createElementVNode("p",null,n.toDisplayString(n.unref(i)("certificates.delete.description2")),1)]),_:1},8,["action-pending","entity-type","error","title","visible"])])}}}),Nb="",Ur=(e,t)=>{const r=e.__vccOpts||e;for(const[i,o]of t)r[i]=o;return r},V1=Ur(T1,[["__scopeId","data-v-412e1ee1"]]),j1={class:"kong-ui-entities-certificates-form"},D1=n.defineComponent({__name:"CertificateForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.cancelRoute)},certificateId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(e,{emit:t}){var b;const r=e,i=Hr.useRouter(),{i18nT:o,i18n:{t:s}}=ht.useI18n(),{getMessageFromError:a}=Pf(),{axiosInstance:c}=ao({headers:(b=r.config)==null?void 0:b.requestHeaders}),l=n.computed(()=>ki.form[r.config.app].edit),d=n.computed(()=>r.certificateId?sr.Edit:sr.Create),p=n.reactive({fields:{cert:"",key:"",certAlt:"",keyAlt:"",tags:""},isReadonly:!1,errorMessage:""}),y=n.reactive({cert:"",key:"",certAlt:"",keyAlt:"",tags:""}),A=n.computed(()=>(d.value===sr.Create||JSON.stringify(p.fields)!==JSON.stringify(y))&&!!p.fields.cert&&!!p.fields.key),C=w=>{var x;p.fields.cert=(w==null?void 0:w.cert)||"",p.fields.key=(w==null?void 0:w.key)||"",p.fields.certAlt=(w==null?void 0:w.cert_alt)||"",p.fields.keyAlt=(w==null?void 0:w.key_alt)||"",p.fields.tags=((x=w==null?void 0:w.tags)==null?void 0:x.join(", "))||"",Object.assign(y,p.fields)},h=()=>{i.push(r.config.cancelRoute)},g=n.computed(()=>{var x,F;let w=`${r.config.apiBaseUrl}${ki.form[r.config.app].validate}`;return r.config.app==="konnect"?w=w.replace(/{controlPlaneId}/gi,((x=r.config)==null?void 0:x.controlPlaneId)||""):r.config.app==="kongManager"&&(w=w.replace(/\/{workspace}/gi,(F=r.config)!=null&&F.workspace?`/${r.config.workspace}`:"")),w=w.replace(/{id}/gi,r.certificateId),w}),m=n.computed(()=>{var x,F;let w=`${r.config.apiBaseUrl}${ki.form[r.config.app][d.value]}`;return r.config.app==="konnect"?w=w.replace(/{controlPlaneId}/gi,((x=r.config)==null?void 0:x.controlPlaneId)||""):r.config.app==="kongManager"&&(w=w.replace(/\/{workspace}/gi,(F=r.config)!=null&&F.workspace?`/${r.config.workspace}`:"")),w=w.replace(/{id}/gi,r.certificateId),w}),v=async()=>{var w,x,F,Z,I,E,M,q,U;try{p.isReadonly=!0;const P={cert:p.fields.cert,key:p.fields.key,cert_alt:p.fields.certAlt||null,key_alt:p.fields.keyAlt||null,tags:(x=(w=p.fields.tags.split(","))==null?void 0:w.map(te=>String(te||"").trim()))==null?void 0:x.filter(te=>te!=="")};let V;await c.post(g.value,P),d.value==="create"?V=await c.post(m.value,P):d.value==="edit"&&(V=((F=r.config)==null?void 0:F.app)==="konnect"?await c.put(m.value,P):await c.patch(m.value,P)),p.fields.cert=((Z=V==null?void 0:V.data)==null?void 0:Z.cert)||"",p.fields.key=((I=V==null?void 0:V.data)==null?void 0:I.key)||"",p.fields.certAlt=((E=V==null?void 0:V.data)==null?void 0:E.cert_alt)||"",p.fields.keyAlt=((M=V==null?void 0:V.data)==null?void 0:M.key_alt)||"",p.fields.tags=((U=(q=V==null?void 0:V.data)==null?void 0:q.tags)==null?void 0:U.join(", "))||"",Object.assign(y,p.fields),t("update",V==null?void 0:V.data)}catch(P){p.errorMessage=a(P),t("error",P)}finally{p.isReadonly=!1}};return(w,x)=>{const F=n.resolveComponent("KTextArea"),Z=n.resolveComponent("KInput");return n.openBlock(),n.createElementBlock("div",j1,[n.createVNode(n.unref(_f),{"can-submit":A.value,config:e.config,"edit-id":e.certificateId,"error-message":p.errorMessage,"fetch-url":l.value,"is-readonly":p.isReadonly,onCancel:h,"onFetch:error":x[5]||(x[5]=I=>w.$emit("error",I)),"onFetch:success":C,onLoading:x[6]||(x[6]=I=>w.$emit("loading",I)),onSubmit:v},{default:n.withCtx(()=>[n.createVNode(n.unref(so),{description:n.unref(s)("certificates.form.sections.ssl.description"),title:n.unref(s)("certificates.form.sections.ssl.title")},{default:n.withCtx(()=>[n.createVNode(F,{modelValue:p.fields.cert,"onUpdate:modelValue":x[0]||(x[0]=I=>p.fields.cert=I),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"certificate-form-cert",label:n.unref(s)("certificates.form.fields.cert.label"),readonly:p.isReadonly,required:""},{"label-tooltip":n.withCtx(()=>[n.createVNode(n.unref(o),{keypath:"certificates.form.fields.cert.tooltip",scope:"global"},{emphasis:n.withCtx(()=>[n.createElementVNode("em",null,n.toDisplayString(n.unref(s)("certificates.form.fields.cert.emphasis")),1)]),_:1})]),_:1},8,["modelValue","label","readonly"]),n.createVNode(F,{modelValue:p.fields.key,"onUpdate:modelValue":x[1]||(x[1]=I=>p.fields.key=I),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"certificate-form-key",label:n.unref(s)("certificates.form.fields.key.label"),readonly:p.isReadonly,required:""},{"label-tooltip":n.withCtx(()=>[n.createVNode(n.unref(o),{keypath:"certificates.form.fields.key.tooltip",scope:"global"},{emphasis:n.withCtx(()=>[n.createElementVNode("em",null,n.toDisplayString(n.unref(s)("certificates.form.fields.key.emphasis")),1)]),_:1})]),_:1},8,["modelValue","label","readonly"]),n.createVNode(F,{modelValue:p.fields.certAlt,"onUpdate:modelValue":x[2]||(x[2]=I=>p.fields.certAlt=I),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"certificate-form-cert-alt",label:n.unref(s)("certificates.form.fields.cert_alt.label"),readonly:p.isReadonly},{"label-tooltip":n.withCtx(()=>[n.createVNode(n.unref(o),{keypath:"certificates.form.fields.cert_alt.tooltip",scope:"global"},{emphasis:n.withCtx(()=>[n.createElementVNode("em",null,n.toDisplayString(n.unref(s)("certificates.form.fields.cert_alt.emphasis")),1)]),_:1})]),_:1},8,["modelValue","label","readonly"]),n.createVNode(F,{modelValue:p.fields.keyAlt,"onUpdate:modelValue":x[3]||(x[3]=I=>p.fields.keyAlt=I),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"certificate-form-key-alt",label:n.unref(s)("certificates.form.fields.key_alt.label"),readonly:p.isReadonly},{"label-tooltip":n.withCtx(()=>[n.createVNode(n.unref(o),{keypath:"certificates.form.fields.key_alt.tooltip",scope:"global"},{emphasis:n.withCtx(()=>[n.createElementVNode("em",null,n.toDisplayString(n.unref(s)("certificates.form.fields.key_alt.emphasis")),1)]),_:1})]),_:1},8,["modelValue","label","readonly"])]),_:1},8,["description","title"]),n.createVNode(n.unref(so),{description:n.unref(s)("certificates.form.sections.general.description"),title:n.unref(s)("certificates.form.sections.general.title")},{default:n.withCtx(()=>[n.createVNode(Z,{modelValue:p.fields.tags,"onUpdate:modelValue":x[4]||(x[4]=I=>p.fields.tags=I),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"certificate-form-tags",help:n.unref(s)("certificates.form.fields.tags.help"),label:n.unref(s)("certificates.form.fields.tags.label"),"label-attributes":{info:n.unref(s)("certificates.form.fields.tags.tooltip")},placeholder:n.unref(s)("certificates.form.fields.tags.placeholder"),readonly:p.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","error-message","fetch-url","is-readonly"])])}}}),_b="",P1=Ur(D1,[["__scopeId","data-v-f66bc18c"]]),Ei={list:{konnect:"/api/runtime_groups/{controlPlaneId}/ca_certificates",kongManager:"/{workspace}/ca_certificates"},form:{konnect:{create:"/api/runtime_groups/{controlPlaneId}/ca_certificates",edit:"/api/runtime_groups/{controlPlaneId}/ca_certificates/{id}",validate:"/api/runtime_groups/{controlPlaneId}/v1/schemas/json/ca-certificate/validate"},kongManager:{create:"/{workspace}/ca_certificates",edit:"/{workspace}/ca_certificates/{id}",validate:"/{workspace}/schemas/ca_certificates/validate"}}},$1={class:"kong-ui-ca-certificate-entity-config-card"},M1={key:0},R1=n.defineComponent({__name:"CACertificateConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success","copy:success"],setup(e,{emit:t}){const r=e,i=["dns_names","san_names","subject"],{i18n:{t:o,formatUnixTimeStamp:s}}=ht.useI18n(),{convertKeyToTitle:a}=Mf(),{getPropValue:c}=Rf(),{getCertificateData:l}=ht.useCertificate(),d=n.computed(()=>Ei.form[r.config.app].edit),p=n.ref(),y=n.computed(()=>{if(p.value)return l(p.value)}),A=n.computed(()=>{var b;return((b=y.value)==null?void 0:b.schemaIssuer)||""}),C=n.computed(()=>{var b,w;return(b=y.value)!=null&&b.schemaExpiry?s((w=y.value)==null?void 0:w.schemaExpiry):""}),h=n.computed(()=>{var b;return((b=y.value)==null?void 0:b.schemaKeyUsages)||[]}),g=(b,w)=>{const x=c("rowValue",w);if(b==="expiry")return C.value;if(b==="key_usages")return h.value;if(x)return x[b]},m=b=>{p.value=b,t("fetch:success",b)},v=n.ref({id:{},updated_at:{},created_at:{},cert:{section:ue.Basic,label:o("ca-certificates.form.fields.cert.label"),tooltip:o("ca-certificates.form.fields.cert.tooltip"),order:5},cert_digest:{section:ue.Basic,label:o("ca-certificates.form.fields.cert_digest.label"),tooltip:o("ca-certificates.form.fields.cert_digest.tooltip"),order:6},metadata:{section:ue.Basic,type:ne.Json,order:7},...r.config.app==="kongManager"&&{expiry:{label:o("certificates.list.table_headers.expiry"),section:ue.Basic,order:1.7,forceShow:!0},issuer:{section:ue.Basic,order:1.5,forceShow:!0},key_usages:{section:ue.Basic,forceShow:!0}},tags:{tooltip:o("ca-certificates.form.fields.tags.tooltip")}});return(b,w)=>{const x=n.resolveComponent("KCodeBlock"),F=n.resolveComponent("KLabel"),Z=n.resolveComponent("KBadge");return n.openBlock(),n.createElementBlock("div",$1,[n.createVNode(n.unref(Nf),{config:e.config,"config-card-doc":e.configCardDoc,"config-schema":v.value,"fetch-url":d.value,"hide-title":e.hideTitle,"onCopy:success":w[0]||(w[0]=I=>b.$emit("copy:success",I)),"onFetch:error":w[1]||(w[1]=I=>b.$emit("fetch:error",I)),"onFetch:success":m,onLoading:w[2]||(w[2]=I=>b.$emit("loading",I))},{cert:n.withCtx(I=>[n.unref(c)("rowValue",I)?(n.openBlock(),n.createBlock(x,{key:0,id:`ca-cert-${e.config.entityId}-cert-codeblock`,code:n.unref(c)("rowValue",I),"is-single-line":"",language:"plaintext"},null,8,["id","code"])):n.createCommentVNode("",!0)]),"metadata-label":n.withCtx(()=>[n.createVNode(F,{class:"metadata-label"},{default:n.withCtx(()=>[n.createTextVNode(" Metadata ")]),_:1})]),metadata:n.withCtx(I=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(n.unref(c)("rowValue",I)).filter(E=>!i.includes(E)),E=>(n.openBlock(),n.createBlock(n.unref(Ci),{key:E,"data-testid":`ca-cert-metadata-${E}`,item:{key:E,label:n.unref(a)(E),value:g(E,I),type:E==="key_usages"?n.unref(ne).BadgeTag:n.unref(ne).Text}},null,8,["data-testid","item"]))),128))]),expiry:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(C.value||"–"),1)]),issuer:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(A.value||"–"),1)]),key_usages:n.withCtx(()=>[h.value.length?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",M1,n.toDisplayString("–"))),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(h.value,(I,E)=>(n.openBlock(),n.createBlock(Z,{key:`key_usages-badge-tag-${E}`,class:"config-badge","data-testid":`key_usages-badge-tag-${E}`,"truncation-tooltip":I},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(I),1)]),_:2},1032,["data-testid","truncation-tooltip"]))),128))]),_:1},8,["config","config-card-doc","config-schema","fetch-url","hide-title"])])}}}),Ob="",U1=Ur(R1,[["__scopeId","data-v-5110105b"]]),L1={class:"kong-ui-entities-ca-certificates-list"},H1={key:0},F1={key:1},q1={key:0},K1={key:1},z1={key:1},G1=n.defineComponent({__name:"CACertificateList",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||!e.createRoute||!e.getViewRoute||!e.getEditRoute||e.app==="kongManager"&&!e.isExactMatch&&!e.filterSchema)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","copy:success","copy:error","delete:success"],setup(e,{emit:t}){var pe;const r=e,{i18n:{t:i,formatUnixTimeStamp:o},i18nT:s}=ht.useI18n(),a=Hr.useRouter(),{axiosInstance:c}=ao({headers:(pe=r.config)==null?void 0:pe.requestHeaders}),l=n.ref(1),d=n.computed(()=>r.config.app!=="kongManager"||!!r.config.disableSorting),y={issuer:{label:i("ca-certificates.list.table_headers.issuer")},expiry:{label:i("ca-certificates.list.table_headers.expiry")},tags:{label:i("ca-certificates.list.table_headers.tags"),sortable:!0}},A=n.computed(()=>{var he,T;let W=`${r.config.apiBaseUrl}${Ei.list[r.config.app]}`;return r.config.app==="konnect"?W=W.replace(/{controlPlaneId}/gi,((he=r.config)==null?void 0:he.controlPlaneId)||""):r.config.app==="kongManager"&&(W=W.replace(/\/{workspace}/gi,(T=r.config)!=null&&T.workspace?`/${r.config.workspace}`:"")),W}),C=n.ref(""),h=n.computed(()=>{const W=r.config.app==="konnect"||r.config.isExactMatch;return W?{isExactMatch:W,placeholder:i("ca-certificates.search.placeholder")}:{isExactMatch:W,schema:r.config.filterSchema}}),{fetcher:g,fetcherState:m}=$f(r.config,A.value),v=()=>{C.value=""},b=()=>{l.value++},w=n.ref(null),x=(W,he)=>{const T=W.id;if(!he(T)){t("copy:error",{entity:W,field:"id",message:i("ca-certificates.errors.copy")});return}t("copy:success",{entity:W,field:"id",message:i("ca-certificates.copy.success",{val:T})})},F=(W,he)=>{const T=JSON.stringify(W);if(!he(T)){t("copy:error",{entity:W,message:i("ca-certificates.errors.copy")});return}t("copy:success",{entity:W,message:i("ca-certificates.copy.success_brief")})},Z=async W=>{var T;await((T=r.canRetrieve)==null?void 0:T.call(r,W))&&a.push(r.config.getViewRoute(W.id))},I=W=>({label:i("ca-certificates.actions.view"),to:r.config.getViewRoute(W)}),E=W=>({label:i("ca-certificates.actions.edit"),to:r.config.getEditRoute(W)}),M=n.ref(void 0),q=n.ref(!1),U=n.ref(!1),P=n.ref(""),V=Df(r.config,A.value),{certificateDataCache:te,getCertificateData:le}=ht.useCertificate(),be=W=>{M.value=W,q.value=!0},de=()=>{q.value=!1},fe=async()=>{var W,he,T;if((W=M.value)!=null&&W.id){U.value=!0;try{await c.delete(V(M.value.id)),U.value=!1,q.value=!1,l.value++,t("delete:success",M.value)}catch(re){P.value=((T=(he=re.response)==null?void 0:he.data)==null?void 0:T.message)||re.message||i("ca-certificates.errors.delete"),t("error",re)}finally{U.value=!1}}},ke=n.ref(!0);n.watch(m,W=>{var he,T,re,ye;if(Array.isArray((he=W==null?void 0:W.response)==null?void 0:he.data)&&(ke.value=W.response.data.length>0),W.status===$t.Error){w.value={title:i("ca-certificates.errors.general")},(ye=(re=(T=W.error)==null?void 0:T.response)==null?void 0:re.data)!=null&&ye.message&&(w.value.message=W.error.response.data.message),t("error",W.error);return}te.value={},w.value=null});const Ut=n.ref({ctaPath:r.config.createRoute,ctaText:void 0,message:i("ca-certificates.list.empty_state.description"),title:i("ca-certificates.title")});return n.onBeforeMount(async()=>{await r.canCreate()&&(Ut.value.title=i("ca-certificates.list.empty_state.title"),Ut.value.ctaText=i("ca-certificates.actions.create"))}),(W,he)=>{const T=n.resolveComponent("KButton"),re=n.resolveComponent("KBadge"),ye=n.resolveComponent("KTruncate"),De=n.resolveComponent("KDropdownItem"),_t=n.resolveComponent("KClipboardProvider");return n.openBlock(),n.createElementBlock("div",L1,[n.createVNode(n.unref(Of),{"cache-identifier":e.cacheIdentifier,"disable-pagination-page-jump":"","disable-sorting":d.value,"empty-state-options":Ut.value,"enable-entity-actions":"","error-message":w.value,fetcher:n.unref(g),"fetcher-cache-key":l.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-ca-certificates-list",query:C.value,"table-headers":n.unref(y),"use-action-outside":e.useActionOutside,onClearSearchInput:v,"onClick:row":he[2]||(he[2]=Y=>Z(Y)),onSort:b},{"toolbar-filter":n.withCtx(()=>[n.createVNode(n.unref(jf),{modelValue:C.value,"onUpdate:modelValue":he[0]||(he[0]=Y=>C.value=Y),config:h.value},null,8,["modelValue","config"])]),"toolbar-button":n.withCtx(()=>[(n.openBlock(),n.createBlock(n.Teleport,{disabled:!e.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[n.createVNode(n.unref(Nt),{"auth-function":()=>e.canCreate()},{default:n.withCtx(()=>[n.withDirectives(n.createVNode(T,{appearance:"primary","data-testid":"toolbar-add-ca-certificate",icon:"plus",to:e.config.createRoute},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("ca-certificates.list.toolbar_actions.new_ca_certificate")),1)]),_:1},8,["to"]),[[n.vShow,ke.value]])]),_:1},8,["auth-function"])],8,["disabled"]))]),issuer:n.withCtx(({row:Y})=>{var Ae;return[e.config.app==="konnect"?(n.openBlock(),n.createElementBlock("b",H1,n.toDisplayString((Ae=Y==null?void 0:Y.metadata)!=null&&Ae.issuer?Y.metadata.issuer:"-"),1)):(n.openBlock(),n.createElementBlock("b",F1,n.toDisplayString(n.unref(le)(Y).schemaIssuer||"-"),1))]}),expiry:n.withCtx(({row:Y})=>{var Ae;return[e.config.app==="konnect"?(n.openBlock(),n.createElementBlock("span",q1,n.toDisplayString((Ae=Y==null?void 0:Y.metadata)!=null&&Ae.expiry?n.unref(o)(Y.metadata.expiry):"-"),1)):(n.openBlock(),n.createElementBlock("span",K1,n.toDisplayString(n.unref(le)(Y).schemaExpiry?n.unref(o)(n.unref(le)(Y).schemaExpiry):"-"),1))]}),tags:n.withCtx(({row:Y})=>{var Ae;return[((Ae=Y==null?void 0:Y.tags)==null?void 0:Ae.length)>0?(n.openBlock(),n.createBlock(ye,{key:0},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Y==null?void 0:Y.tags,K=>(n.openBlock(),n.createBlock(re,{key:K,onClick:he[1]||(he[1]=n.withModifiers(()=>{},["stop"]))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(K),1)]),_:2},1024))),128))]),_:2},1024)):(n.openBlock(),n.createElementBlock("span",z1,"-"))]}),actions:n.withCtx(({row:Y})=>[n.createVNode(_t,null,{default:n.withCtx(({copyToClipboard:Ae})=>[n.createVNode(De,{"data-testid":"action-entity-copy-id",onClick:K=>x(Y,Ae)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("ca-certificates.actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),n.createVNode(_t,null,{default:n.withCtx(({copyToClipboard:Ae})=>[n.createVNode(De,{"data-testid":"action-entity-copy-json",onClick:K=>F(Y,Ae)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("ca-certificates.actions.copy_json")),1)]),_:2},1032,["onClick"])]),_:2},1024),n.createVNode(n.unref(Nt),{"auth-function":()=>e.canRetrieve(Y)},{default:n.withCtx(()=>[n.createVNode(De,{"data-testid":"action-entity-view","has-divider":"",item:I(Y.id)},null,8,["item"])]),_:2},1032,["auth-function"]),n.createVNode(n.unref(Nt),{"auth-function":()=>e.canEdit(Y)},{default:n.withCtx(()=>[n.createVNode(De,{"data-testid":"action-entity-edit",item:E(Y.id)},null,8,["item"])]),_:2},1032,["auth-function"]),n.createVNode(n.unref(Nt),{"auth-function":()=>e.canDelete(Y)},{default:n.withCtx(()=>[n.createVNode(De,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:Ae=>be(Y)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("ca-certificates.actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","use-action-outside"]),n.createVNode(n.unref(Tf),{"action-pending":U.value,"entity-type":n.unref(xa).CACertificate,error:P.value,title:n.unref(i)("ca-certificates.delete.title"),visible:q.value,onCancel:de,onProceed:fe},{description:n.withCtx(()=>[n.createVNode(n.unref(s),{keypath:"ca-certificates.delete.description",scope:"global"},{"bolded-text":n.withCtx(()=>[n.createElementVNode("b",null,n.toDisplayString(n.unref(i)("ca-certificates.delete.boldedText")),1)]),_:1}),n.createElementVNode("p",null,n.toDisplayString(n.unref(i)("ca-certificates.delete.description2")),1)]),_:1},8,["action-pending","entity-type","error","title","visible"])])}}}),Tb="",W1=Ur(G1,[["__scopeId","data-v-067baf74"]]),J1={class:"kong-ui-entities-ca-certificates-form"},Y1=n.defineComponent({__name:"CACertificateForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.cancelRoute)},certificateId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(e,{emit:t}){var v;const r=e,i=Hr.useRouter(),{i18n:{t:o}}=ht.useI18n(),{getMessageFromError:s}=Pf(),{axiosInstance:a}=ao({headers:(v=r.config)==null?void 0:v.requestHeaders}),c=n.computed(()=>Ei.form[r.config.app].edit),l=n.computed(()=>r.certificateId?sr.Edit:sr.Create),d=n.reactive({fields:{cert:"",certDigest:"",tags:""},isReadonly:!1,errorMessage:""}),p=n.reactive({cert:"",certDigest:"",tags:""}),y=n.computed(()=>(l.value===sr.Create||JSON.stringify(d.fields)!==JSON.stringify(p))&&!!d.fields.cert),A=b=>{var w;d.fields.cert=(b==null?void 0:b.cert)||"",d.fields.certDigest=(b==null?void 0:b.cert_digest)||"",d.fields.tags=((w=b==null?void 0:b.tags)==null?void 0:w.join(", "))||"",Object.assign(p,d.fields)},C=()=>{i.push(r.config.cancelRoute)},h=n.computed(()=>{var w,x;let b=`${r.config.apiBaseUrl}${Ei.form[r.config.app].validate}`;return r.config.app==="konnect"?b=b.replace(/{controlPlaneId}/gi,((w=r.config)==null?void 0:w.controlPlaneId)||""):r.config.app==="kongManager"&&(b=b.replace(/\/{workspace}/gi,(x=r.config)!=null&&x.workspace?`/${r.config.workspace}`:"")),b=b.replace(/{id}/gi,r.certificateId),b}),g=n.computed(()=>{var w,x;let b=`${r.config.apiBaseUrl}${Ei.form[r.config.app][l.value]}`;return r.config.app==="konnect"?b=b.replace(/{controlPlaneId}/gi,((w=r.config)==null?void 0:w.controlPlaneId)||""):r.config.app==="kongManager"&&(b=b.replace(/\/{workspace}/gi,(x=r.config)!=null&&x.workspace?`/${r.config.workspace}`:"")),b=b.replace(/{id}/gi,r.certificateId),b}),m=async()=>{var b,w,x,F,Z,I,E;try{d.isReadonly=!0;const M={cert:d.fields.cert,cert_digest:d.fields.certDigest||null,tags:(w=(b=d.fields.tags.split(","))==null?void 0:b.map(U=>String(U||"").trim()))==null?void 0:w.filter(U=>U!=="")};let q;await a.post(h.value,M),l.value==="create"?q=await a.post(g.value,M):l.value==="edit"&&(q=((x=r.config)==null?void 0:x.app)==="konnect"?await a.put(g.value,M):await a.patch(g.value,M)),d.fields.cert=((F=q==null?void 0:q.data)==null?void 0:F.cert)||"",d.fields.certDigest=((Z=q==null?void 0:q.data)==null?void 0:Z.cert_digest)||"",d.fields.tags=((E=(I=q==null?void 0:q.data)==null?void 0:I.tags)==null?void 0:E.join(", "))||"",Object.assign(p,d.fields),t("update",q==null?void 0:q.data)}catch(M){d.errorMessage=s(M),t("error",M)}finally{d.isReadonly=!1}};return(b,w)=>{const x=n.resolveComponent("KTextArea"),F=n.resolveComponent("KInput");return n.openBlock(),n.createElementBlock("div",J1,[n.createVNode(n.unref(_f),{"can-submit":y.value,config:e.config,"edit-id":e.certificateId,"error-message":d.errorMessage,"fetch-url":c.value,"is-readonly":d.isReadonly,onCancel:C,"onFetch:error":w[3]||(w[3]=Z=>b.$emit("error",Z)),"onFetch:success":A,onLoading:w[4]||(w[4]=Z=>b.$emit("loading",Z)),onSubmit:m},{default:n.withCtx(()=>[n.createVNode(n.unref(so),{description:n.unref(o)("ca-certificates.form.sections.cert.description"),title:n.unref(o)("ca-certificates.form.sections.cert.title")},{default:n.withCtx(()=>[n.createVNode(x,{modelValue:d.fields.cert,"onUpdate:modelValue":w[0]||(w[0]=Z=>d.fields.cert=Z),modelModifiers:{trim:!0},"character-limit":!1,class:"certificate-form-textarea","data-testid":"ca-certificate-form-cert",label:n.unref(o)("ca-certificates.form.fields.cert.label"),"label-attributes":{info:n.unref(o)("ca-certificates.form.fields.cert.tooltip")},readonly:d.isReadonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),n.createVNode(F,{modelValue:d.fields.certDigest,"onUpdate:modelValue":w[1]||(w[1]=Z=>d.fields.certDigest=Z),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"ca-certificate-form-cert-digest",label:n.unref(o)("ca-certificates.form.fields.cert_digest.label"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])]),_:1},8,["description","title"]),n.createVNode(n.unref(so),{description:n.unref(o)("ca-certificates.form.sections.general.description"),title:n.unref(o)("ca-certificates.form.sections.general.title")},{default:n.withCtx(()=>[n.createVNode(F,{modelValue:d.fields.tags,"onUpdate:modelValue":w[2]||(w[2]=Z=>d.fields.tags=Z),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"ca-certificate-form-tags",help:n.unref(o)("ca-certificates.form.fields.tags.help"),label:n.unref(o)("ca-certificates.form.fields.tags.label"),"label-attributes":{info:n.unref(o)("ca-certificates.form.fields.tags.tooltip")},placeholder:n.unref(o)("ca-certificates.form.fields.tags.placeholder"),readonly:d.isReadonly,type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","error-message","fetch-url","is-readonly"])])}}}),Vb="",Z1=Ur(Y1,[["__scopeId","data-v-bad536b1"]]),Q1={class:"kong-ui-certificate-entity-config-card"},X1={key:0},eb=n.defineComponent({__name:"CertificateConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success","copy:success"],setup(e,{emit:t}){const r=e,{i18n:{t:i,formatUnixTimeStamp:o},i18nT:s}=ht.useI18n(),{convertKeyToTitle:a}=Mf(),{getPropValue:c}=Rf(),{getCertificateData:l}=ht.useCertificate(),d=n.computed(()=>ki.form[r.config.app].edit),p=n.ref(),y=n.ref({id:{},cert:{section:ue.Basic},key:{section:ue.Basic,type:ne.Redacted},metadata:{section:ue.Basic,type:ne.Json},snis:{section:ue.Basic,type:ne.BadgeTag,label:i("certificates.list.table_headers.snis")},updated_at:{},created_at:{},tags:{tooltip:i("certificates.form.fields.tags.tooltip")},...r.config.app==="kongManager"&&{expiry:{section:ue.Basic,label:i("certificates.list.table_headers.expiry"),forceShow:!0},issuer:{section:ue.Basic,label:i("certificates.list.table_headers.issuer"),forceShow:!0},san_names:{section:ue.Basic,label:i("certificates.list.table_headers.san"),forceShow:!0},subject:{section:ue.Basic,label:i("certificates.list.table_headers.subject"),forceShow:!0},key_usages:{forceShow:!0}},cert_alt:{section:ue.Advanced},key_alt:{section:ue.Advanced,type:ne.Redacted}}),A=I=>{p.value=I,t("fetch:success",I)},C=(I,E)=>{const M=c("rowValue",E);if(I==="expiry")return g.value;if(I==="key_usages")return w.value;if(I==="san_names")return v.value;if(M)return M[I]},h=n.computed(()=>{if(p.value)return l(p.value)}),g=n.computed(()=>{var I,E;return(I=h.value)!=null&&I.schemaExpiry?o((E=h.value)==null?void 0:E.schemaExpiry):""}),m=n.computed(()=>{var I;return((I=h.value)==null?void 0:I.schemaIssuer)||""}),v=n.computed(()=>{var I;return((I=h.value)==null?void 0:I.schemaSanNames)||""}),b=n.computed(()=>{var I;return((I=h.value)==null?void 0:I.schemaSubject)||""}),w=n.computed(()=>{var I;return((I=h.value)==null?void 0:I.schemaKeyUsages)||[]}),x=n.computed(()=>{var I,E;return((E=(I=p==null?void 0:p.value)==null?void 0:I.snis)==null?void 0:E.length)>0}),F=n.computed(()=>{var I;return!!((I=p==null?void 0:p.value)!=null&&I.cert_alt)}),Z=I=>{var E,M;return I==="san_names"?i("certificates.list.table_headers.san"):((M=(E=y.value)==null?void 0:E[I])==null?void 0:M.label)||a(I)};return(I,E)=>{const M=n.resolveComponent("KCodeBlock"),q=n.resolveComponent("KLabel"),U=n.resolveComponent("KBadge");return n.openBlock(),n.createElementBlock("div",Q1,[n.createVNode(n.unref(Nf),{config:e.config,"config-card-doc":e.configCardDoc,"config-schema":y.value,"fetch-url":d.value,"hide-title":e.hideTitle,"onCopy:success":E[0]||(E[0]=P=>I.$emit("copy:success",P)),"onFetch:error":E[1]||(E[1]=P=>I.$emit("fetch:error",P)),"onFetch:success":A,onLoading:E[2]||(E[2]=P=>I.$emit("loading",P))},n.createSlots({"cert-label-tooltip":n.withCtx(()=>[n.createVNode(n.unref(s),{keypath:"certificates.form.fields.cert.tooltip",scope:"global"},{emphasis:n.withCtx(()=>[n.createElementVNode("i",null,n.toDisplayString(n.unref(i)("certificates.form.fields.cert.emphasis")),1)]),_:1})]),cert:n.withCtx(P=>[n.unref(c)("rowValue",P)?(n.openBlock(),n.createBlock(M,{key:0,id:`certificate-${e.config.entityId}-cert-codeblock`,code:n.unref(c)("rowValue",P),"is-single-line":"",language:"plaintext"},null,8,["id","code"])):n.createCommentVNode("",!0)]),"key-label-tooltip":n.withCtx(()=>[n.createVNode(n.unref(s),{keypath:"certificates.form.fields.key.tooltip",scope:"global"},{emphasis:n.withCtx(()=>[n.createElementVNode("i",null,n.toDisplayString(n.unref(i)("certificates.form.fields.key.emphasis")),1)]),_:1})]),"metadata-label":n.withCtx(()=>[n.createVNode(q,{class:"metadata-label"},{default:n.withCtx(()=>[n.createTextVNode(" Metadata ")]),_:1})]),metadata:n.withCtx(P=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Object.keys(n.unref(c)("rowValue",P)),V=>(n.openBlock(),n.createBlock(n.unref(Ci),{key:V,item:{key:V,value:C(V,P),label:Z(V),type:V==="key_usages"||V==="snis"||V==="dns_names"?n.unref(ne).BadgeTag:n.unref(ne).Text}},null,8,["item"]))),128))]),expiry:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(g.value||"–"),1)]),issuer:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(m.value||"–"),1)]),san_names:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(v.value||"–"),1)]),subject:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(b.value||"–"),1)]),"cert_alt-label-tooltip":n.withCtx(()=>[n.createVNode(n.unref(s),{keypath:"certificates.form.fields.cert_alt.tooltip",scope:"global"},{emphasis:n.withCtx(()=>[n.createElementVNode("i",null,n.toDisplayString(n.unref(i)("certificates.form.fields.cert_alt.emphasis")),1)]),_:1})]),"key_alt-label-tooltip":n.withCtx(()=>[n.createVNode(n.unref(s),{keypath:"certificates.form.fields.key_alt.tooltip",scope:"global"},{emphasis:n.withCtx(()=>[n.createElementVNode("i",null,n.toDisplayString(n.unref(i)("certificates.form.fields.key_alt.emphasis")),1)]),_:1})]),key_usages:n.withCtx(()=>[w.value.length?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",X1,n.toDisplayString("–"))),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(w.value,(P,V)=>(n.openBlock(),n.createBlock(U,{key:`key_usages-badge-tag-${V}`,class:"config-badge","data-testid":`key_usages-badge-tag-${V}`,"truncation-tooltip":P},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(P),1)]),_:2},1032,["data-testid","truncation-tooltip"]))),128))]),_:2},[x.value?void 0:{name:"snis",fn:n.withCtx(()=>[n.createTextVNode(" – ")]),key:"0"},F.value?{name:"cert_alt",fn:n.withCtx(P=>[n.createTextVNode(" > "),n.unref(c)("rowValue",P)?(n.openBlock(),n.createBlock(M,{key:0,id:`certificate-${e.config.entityId}-cert-alt-codeblock`,code:n.unref(c)("rowValue",P),"is-single-line":"",language:"plaintext"},null,8,["id","code"])):n.createCommentVNode("",!0)]),key:"1"}:void 0]),1032,["config","config-card-doc","config-schema","fetch-url","hide-title"])])}}}),jb="",tb=Ur(eb,[["__scopeId","data-v-69ded264"]]);Oe.CACertificateConfigCard=U1,Oe.CACertificateForm=Z1,Oe.CACertificateList=W1,Oe.CertificateConfigCard=tb,Oe.CertificateForm=P1,Oe.CertificateList=V1,Object.defineProperty(Oe,Symbol.toStringTag,{value:"Module"})});