@tsed/schema-formio 8.9.5 → 8.10.0-rc.1
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.
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
(function(B,Et){typeof exports=="object"&&typeof module<"u"?Et(exports,require("/home/runner/work/tsed/tsed/node_modules/change-case/dist/index.js"),require("\0/home/runner/work/tsed/tsed/node_modules/change-case/dist/index.js?commonjs-external"),require("\0/home/runner/work/tsed/tsed/node_modules/statuses/index.js?commonjs-external"),require("\0/home/runner/work/tsed/tsed/node_modules/picomatch/index.js?commonjs-external")):typeof define=="function"&&define.amd?define(["exports","/home/runner/work/tsed/tsed/node_modules/change-case/dist/index.js","\0/home/runner/work/tsed/tsed/node_modules/change-case/dist/index.js?commonjs-external","\0/home/runner/work/tsed/tsed/node_modules/statuses/index.js?commonjs-external","\0/home/runner/work/tsed/tsed/node_modules/picomatch/index.js?commonjs-external"],Et):(B=typeof globalThis<"u"?globalThis:B||self,Et(B["@tsed/schema-formio"]={},B.index_js,B.require$$0,B.require$$1,B.require$$2))})(this,function(B,Et,ya,ga,Oa){"use strict";const Es=new Map;function Ye(m,E){return Es.set(m,E)}function Ao(m){if(!Es.has(m))throw new Error(`Formio ${m} mapper doesn't exists`);return Es.get(m)}function me(m,E,s){return Ao(m)(E,s)}var Dr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},xr={exports:{}},ba=xr.exports,Co;function va(){return Co||(Co=1,function(m,E){(function(s,$){$(E)})(ba,function(s){var $=i=>{throw TypeError(i)},le=(i,p,l)=>p.has(i)||$("Cannot "+l),ge=(i,p,l)=>(le(i,p,"read from private field"),l?l.call(i):p.get(i)),Ke=(i,p,l)=>p.has(i)?$("Cannot add the same private member more than once"):p instanceof WeakSet?p.add(i):p.set(i,l),We=(i,p,l,w)=>(le(i,p,"write to private field"),p.set(i,l),l),U,Ne,ee,ut,Re=(i=>(i.PARAM="parameter",i.PARAM_CTOR="parameter.constructor",i.PARAM_STC="parameter.static",i.PROP="property",i.PROP_STC="property.static",i.METHOD="method",i.METHOD_STC="method.static",i.CLASS="class",i))(Re||{});function gt(i){return i.prototype?i:i.constructor}function Oe(i){return gt(i)}function Ve(i){const[p,l,w]=i,R=K=>p!==Oe(p)?K:`${K}.static`;return typeof w=="number"?l?R("parameter"):"parameter.constructor":w&&w.value?R("method"):l&&w===void 0||w?R("property"):Re.CLASS}function rt(i){return i===Date||i instanceof Date&&!isNaN(+i)}function Ee(i){return typeof i=="function"}function pt(i){return i==null}function nt(i){return typeof i=="boolean"||i instanceof Boolean||i===Boolean}function st(i){return typeof i=="boolean"||i instanceof Boolean||i===Boolean}function ht(i){return typeof i=="number"}function Ot(i){return typeof i=="number"||i instanceof Number||i===Number}function ue(i){return typeof i=="string"}function $r(i){return typeof i=="string"||i instanceof String||i===String}function vn(i){return $r(i)||Ot(i)||st(i)}function bt(i){return ue(i)||ht(i)||nt(i)}function z(i){return[String,Number,Boolean].includes(i)}function Ir(i){return i instanceof RegExp}function W(i){return typeof i=="symbol"}function Nr(i){return typeof i=="symbol"||i instanceof Symbol||i===Symbol}const wn=i=>pt(i)||bt(i)||W(i)||Ee(i),ft=(i,p=new WeakMap)=>{if(wn(i))return i;const l=p.get(i);if(l)return l;if(ArrayBuffer.isView(i))return Buffer.isBuffer(i)?Buffer.from(i):new(Oe(i))(i.buffer.slice(0),i.byteOffset,i.byteLength);if(rt(i))return new Date(i);if(Ir(i))return new RegExp(i);if(Array.isArray(i)){const R=[];return p.set(i,R),i.forEach((K,ne)=>R[ne]=ft(K,p)),R}if(i instanceof Map){const R=new Map;return p.set(i,R),i.forEach((K,ne)=>R.set(ft(ne,p),ft(K,p))),R}if(i instanceof Set){const R=new Set;return p.set(i,R),i.forEach(K=>R.add(ft(K,p))),R}const w=Object.create(Reflect.getPrototypeOf(i));return p.set(i,w),Reflect.ownKeys(i).forEach(R=>{const K=Object.getOwnPropertyDescriptor(i,R);K&&(Ee(K.value)?Object.defineProperty(w,R,K):Object.defineProperty(w,R,{...K,value:ft(K.value,p)}))}),w};function fr(i){return i?Oe(i)!==Object?Object.create(i):{}:{}}function Rt(i){return["__proto__","constructor","prototype"].includes(i)}function Lr(i){return Object.keys(i).filter(p=>!Rt(p))}function qr(i){return(p,l,w)=>{const R=p.findIndex(K=>i(K,l));return R===-1?[...p,l]:(p[R]=mt(p[R],l,w),p)}}const Sn=qr((i,p)=>i===p);function u({reducers:i,parentKey:p}){return i?p&&i[p]?i[p]:i.default||Sn:Sn}function At(i,p){return bt(i)||W(i)||Ee(i)||p===void 0}function fe(i,p){return i==null||i===""&&p!==""}function mt(i,p,l={}){if(fe(p,i))return i;if(At(p,i))return p;if(Array.isArray(i)){const R=u(l);return[].concat(p).reduce((K,ne)=>R(K,ne,l),[...i])}const w=fr(i);return[...Lr(i),...Lr(p)].reduce((R,K)=>{var ne;const Ae=i&&i[K],xe=mt(Ae,p&&p[K],{...l,parentKey:K});return l.cleanUndefinedProps&&xe===void 0||(R[K]=((ne=l.alter)==null?void 0:ne.call(l,K,xe))??xe),R},w)}function ot(i,p){return Reflect.getOwnPropertyDescriptor(i&&i.prototype||i,p)}function js(i,p){var l;return(l=ot(i,p))==null?void 0:l.value}function Fr(i){return typeof i=="function"?i.name:i.constructor.name}const Mn=i=>i.toString().replace("Symbol(","").replace(")","");function vt(i){switch(typeof i){default:return""+i;case"symbol":return Mn(i);case"function":return Fr(i)}}var Ht=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Dr<"u"?Dr:typeof self<"u"?self:{},Jr={};/*! *****************************************************************************
|
|
2
|
+
Copyright (C) Microsoft. All rights reserved.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
5
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
8
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
9
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
10
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
11
|
+
|
|
12
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
13
|
+
and limitations under the License.
|
|
14
|
+
***************************************************************************** */var Br;function lt(){if(Br)return Jr;Br=1;var i;return function(p){(function(l){var w=typeof globalThis=="object"?globalThis:typeof Ht=="object"?Ht:typeof self=="object"?self:typeof this=="object"?this:xe(),R=K(p);typeof w.Reflect<"u"&&(R=K(w.Reflect,R)),l(R,w),typeof w.Reflect>"u"&&(w.Reflect=p);function K(it,_t){return function(wt,nr){Object.defineProperty(it,wt,{configurable:!0,writable:!0,value:nr}),_t&&_t(wt,nr)}}function ne(){try{return Function("return this;")()}catch{}}function Ae(){try{return(0,eval)("(function() { return this; })()")}catch{}}function xe(){return ne()||Ae()}})(function(l,w){var R=Object.prototype.hasOwnProperty,K=typeof Symbol=="function",ne=K&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",Ae=K&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",xe=typeof Object.create=="function",it={__proto__:[]}instanceof Array,_t=!xe&&!it,wt={create:xe?function(){return Jt(Object.create(null))}:it?function(){return Jt({__proto__:null})}:function(){return Jt({})},has:_t?function(y,O){return R.call(y,O)}:function(y,O){return O in y},get:_t?function(y,O){return R.call(y,O)?y[O]:void 0}:function(y,O){return y[O]}},nr=Object.getPrototypeOf(Function),sr=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Us(),en=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Ks(),tn=typeof WeakMap=="function"?WeakMap:Ws(),qt=K?Symbol.for("@reflect-metadata:registry"):void 0,Er=Js(),Hn=Bs(Er);function zn(y,O,S,j){if(Z(S)){if(!is(y))throw new TypeError;if(!as(O))throw new TypeError;return es(y,O)}else{if(!is(y))throw new TypeError;if(!je(O))throw new TypeError;if(!je(j)&&!Z(j)&&!Dt(j))throw new TypeError;return Dt(j)&&(j=void 0),S=at(S),or(y,O,S,j)}}l("decorate",zn);function Rr(y,O){function S(j,V){if(!je(j))throw new TypeError;if(!Z(V)&&!cs(V))throw new TypeError;sn(y,O,j,V)}return S}l("metadata",Rr);function Yn(y,O,S,j){if(!je(S))throw new TypeError;return Z(j)||(j=at(j)),sn(y,O,S,j)}l("defineMetadata",Yn);function rn(y,O,S){if(!je(O))throw new TypeError;return Z(S)||(S=at(S)),ts(y,O,S)}l("hasMetadata",rn);function Xn(y,O,S){if(!je(O))throw new TypeError;return Z(S)||(S=at(S)),Ft(y,O,S)}l("hasOwnMetadata",Xn);function Is(y,O,S){if(!je(O))throw new TypeError;return Z(S)||(S=at(S)),rs(y,O,S)}l("getMetadata",Is);function Zn(y,O,S){if(!je(O))throw new TypeError;return Z(S)||(S=at(S)),nn(y,O,S)}l("getOwnMetadata",Zn);function Qn(y,O){if(!je(y))throw new TypeError;return Z(O)||(O=at(O)),on(y,O)}l("getMetadataKeys",Qn);function Ns(y,O){if(!je(y))throw new TypeError;return Z(O)||(O=at(O)),ns(y,O)}l("getOwnMetadataKeys",Ns);function Ls(y,O,S){if(!je(O))throw new TypeError;if(Z(S)||(S=at(S)),!je(O))throw new TypeError;Z(S)||(S=at(S));var j=ar(O,S,!1);return Z(j)?!1:j.OrdinaryDeleteMetadata(y,O,S)}l("deleteMetadata",Ls);function es(y,O){for(var S=y.length-1;S>=0;--S){var j=y[S],V=j(O);if(!Z(V)&&!Dt(V)){if(!as(V))throw new TypeError;O=V}}return O}function or(y,O,S,j){for(var V=y.length-1;V>=0;--V){var ke=y[V],_e=ke(O,S,j);if(!Z(_e)&&!Dt(_e)){if(!je(_e))throw new TypeError;j=_e}}return j}function ts(y,O,S){var j=Ft(y,O,S);if(j)return!0;var V=un(O);return Dt(V)?!1:ts(y,V,S)}function Ft(y,O,S){var j=ar(O,S,!1);return Z(j)?!1:cn(j.OrdinaryHasOwnMetadata(y,O,S))}function rs(y,O,S){var j=Ft(y,O,S);if(j)return nn(y,O,S);var V=un(O);if(!Dt(V))return rs(y,V,S)}function nn(y,O,S){var j=ar(O,S,!1);if(!Z(j))return j.OrdinaryGetOwnMetadata(y,O,S)}function sn(y,O,S,j){var V=ar(S,j,!0);V.OrdinaryDefineOwnMetadata(y,O,S,j)}function on(y,O){var S=ns(y,O),j=un(y);if(j===null)return S;var V=on(j,O);if(V.length<=0)return S;if(S.length<=0)return V;for(var ke=new en,_e=[],re=0,D=S;re<D.length;re++){var I=D[re],L=ke.has(I);L||(ke.add(I),_e.push(I))}for(var F=0,oe=V;F<oe.length;F++){var I=oe[F],L=ke.has(I);L||(ke.add(I),_e.push(I))}return _e}function ns(y,O){var S=ar(y,O,!1);return S?S.OrdinaryOwnMetadataKeys(y,O):[]}function an(y){if(y===null)return 1;switch(typeof y){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return y===null?1:6;default:return 6}}function Z(y){return y===void 0}function Dt(y){return y===null}function qs(y){return typeof y=="symbol"}function je(y){return typeof y=="object"?y!==null:typeof y=="function"}function ss(y,O){switch(an(y)){case 0:return y;case 1:return y;case 2:return y;case 3:return y;case 4:return y;case 5:return y}var S="string",j=us(y,ne);if(j!==void 0){var V=j.call(y,S);if(je(V))throw new TypeError;return V}return Fs(y)}function Fs(y,O){var S,j;{var V=y.toString;if(Ar(V)){var j=V.call(y);if(!je(j))return j}var S=y.valueOf;if(Ar(S)){var j=S.call(y);if(!je(j))return j}}throw new TypeError}function cn(y){return!!y}function os(y){return""+y}function at(y){var O=ss(y);return qs(O)?O:os(O)}function is(y){return Array.isArray?Array.isArray(y):y instanceof Object?y instanceof Array:Object.prototype.toString.call(y)==="[object Array]"}function Ar(y){return typeof y=="function"}function as(y){return typeof y=="function"}function cs(y){switch(an(y)){case 3:return!0;case 4:return!0;default:return!1}}function J(y,O){return y===O||y!==y&&O!==O}function us(y,O){var S=y[O];if(S!=null){if(!Ar(S))throw new TypeError;return S}}function ps(y){var O=us(y,Ae);if(!Ar(O))throw new TypeError;var S=O.call(y);if(!je(S))throw new TypeError;return S}function ir(y){return y.value}function fs(y){var O=y.next();return O.done?!1:O}function ls(y){var O=y.return;O&&O.call(y)}function un(y){var O=Object.getPrototypeOf(y);if(typeof y!="function"||y===nr||O!==nr)return O;var S=y.prototype,j=S&&Object.getPrototypeOf(S);if(j==null||j===Object.prototype)return O;var V=j.constructor;return typeof V!="function"||V===y?O:V}function Te(){var y;!Z(qt)&&typeof w.Reflect<"u"&&!(qt in w.Reflect)&&typeof w.Reflect.defineMetadata=="function"&&(y=Gs(w.Reflect));var O,S,j,V=new tn,ke={registerProvider:_e,getProvider:D,setProvider:L};return ke;function _e(F){if(!Object.isExtensible(ke))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case y===F:break;case Z(O):O=F;break;case O===F:break;case Z(S):S=F;break;case S===F:break;default:j===void 0&&(j=new en),j.add(F);break}}function re(F,oe){if(!Z(O)){if(O.isProviderFor(F,oe))return O;if(!Z(S)){if(S.isProviderFor(F,oe))return O;if(!Z(j))for(var we=ps(j);;){var Ce=fs(we);if(!Ce)return;var Xe=ir(Ce);if(Xe.isProviderFor(F,oe))return ls(we),Xe}}}if(!Z(y)&&y.isProviderFor(F,oe))return y}function D(F,oe){var we=V.get(F),Ce;return Z(we)||(Ce=we.get(oe)),Z(Ce)&&(Ce=re(F,oe),Z(Ce)||(Z(we)&&(we=new sr,V.set(F,we)),we.set(oe,Ce))),Ce}function I(F){if(Z(F))throw new TypeError;return O===F||S===F||!Z(j)&&j.has(F)}function L(F,oe,we){if(!I(we))throw new Error("Metadata provider not registered.");var Ce=D(F,oe);if(Ce!==we){if(!Z(Ce))return!1;var Xe=V.get(F);Z(Xe)&&(Xe=new sr,V.set(F,Xe)),Xe.set(oe,we)}return!0}}function Js(){var y;return!Z(qt)&&je(w.Reflect)&&Object.isExtensible(w.Reflect)&&(y=w.Reflect[qt]),Z(y)&&(y=Te()),!Z(qt)&&je(w.Reflect)&&Object.isExtensible(w.Reflect)&&Object.defineProperty(w.Reflect,qt,{enumerable:!1,configurable:!1,writable:!1,value:y}),y}function Bs(y){var O=new tn,S={isProviderFor:function(I,L){var F=O.get(I);return Z(F)?!1:F.has(L)},OrdinaryDefineOwnMetadata:_e,OrdinaryHasOwnMetadata:V,OrdinaryGetOwnMetadata:ke,OrdinaryOwnMetadataKeys:re,OrdinaryDeleteMetadata:D};return Er.registerProvider(S),S;function j(I,L,F){var oe=O.get(I),we=!1;if(Z(oe)){if(!F)return;oe=new sr,O.set(I,oe),we=!0}var Ce=oe.get(L);if(Z(Ce)){if(!F)return;if(Ce=new sr,oe.set(L,Ce),!y.setProvider(I,L,S))throw oe.delete(L),we&&O.delete(I),new Error("Wrong provider for target.")}return Ce}function V(I,L,F){var oe=j(L,F,!1);return Z(oe)?!1:cn(oe.has(I))}function ke(I,L,F){var oe=j(L,F,!1);if(!Z(oe))return oe.get(I)}function _e(I,L,F,oe){var we=j(F,oe,!0);we.set(I,L)}function re(I,L){var F=[],oe=j(I,L,!1);if(Z(oe))return F;for(var we=oe.keys(),Ce=ps(we),Xe=0;;){var hs=fs(Ce);if(!hs)return F.length=Xe,F;var Vs=ir(hs);try{F[Xe]=Vs}catch(pn){try{ls(Ce)}finally{throw pn}}Xe++}}function D(I,L,F){var oe=j(L,F,!1);if(Z(oe)||!oe.delete(I))return!1;if(oe.size===0){var we=O.get(L);Z(we)||(we.delete(F),we.size===0&&O.delete(we))}return!0}}function Gs(y){var O=y.defineMetadata,S=y.hasOwnMetadata,j=y.getOwnMetadata,V=y.getOwnMetadataKeys,ke=y.deleteMetadata,_e=new tn,re={isProviderFor:function(D,I){var L=_e.get(D);return!Z(L)&&L.has(I)?!0:V(D,I).length?(Z(L)&&(L=new en,_e.set(D,L)),L.add(I),!0):!1},OrdinaryDefineOwnMetadata:O,OrdinaryHasOwnMetadata:S,OrdinaryGetOwnMetadata:j,OrdinaryOwnMetadataKeys:V,OrdinaryDeleteMetadata:ke};return re}function ar(y,O,S){var j=Er.getProvider(y,O);if(!Z(j))return j;if(S){if(Er.setProvider(y,O,Hn))return Hn;throw new Error("Illegal state.")}}function Us(){var y={},O=[],S=function(){function re(D,I,L){this._index=0,this._keys=D,this._values=I,this._selector=L}return re.prototype["@@iterator"]=function(){return this},re.prototype[Ae]=function(){return this},re.prototype.next=function(){var D=this._index;if(D>=0&&D<this._keys.length){var I=this._selector(this._keys[D],this._values[D]);return D+1>=this._keys.length?(this._index=-1,this._keys=O,this._values=O):this._index++,{value:I,done:!1}}return{value:void 0,done:!0}},re.prototype.throw=function(D){throw this._index>=0&&(this._index=-1,this._keys=O,this._values=O),D},re.prototype.return=function(D){return this._index>=0&&(this._index=-1,this._keys=O,this._values=O),{value:D,done:!0}},re}(),j=function(){function re(){this._keys=[],this._values=[],this._cacheKey=y,this._cacheIndex=-2}return Object.defineProperty(re.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),re.prototype.has=function(D){return this._find(D,!1)>=0},re.prototype.get=function(D){var I=this._find(D,!1);return I>=0?this._values[I]:void 0},re.prototype.set=function(D,I){var L=this._find(D,!0);return this._values[L]=I,this},re.prototype.delete=function(D){var I=this._find(D,!1);if(I>=0){for(var L=this._keys.length,F=I+1;F<L;F++)this._keys[F-1]=this._keys[F],this._values[F-1]=this._values[F];return this._keys.length--,this._values.length--,J(D,this._cacheKey)&&(this._cacheKey=y,this._cacheIndex=-2),!0}return!1},re.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=y,this._cacheIndex=-2},re.prototype.keys=function(){return new S(this._keys,this._values,V)},re.prototype.values=function(){return new S(this._keys,this._values,ke)},re.prototype.entries=function(){return new S(this._keys,this._values,_e)},re.prototype["@@iterator"]=function(){return this.entries()},re.prototype[Ae]=function(){return this.entries()},re.prototype._find=function(D,I){if(!J(this._cacheKey,D)){this._cacheIndex=-1;for(var L=0;L<this._keys.length;L++)if(J(this._keys[L],D)){this._cacheIndex=L;break}}return this._cacheIndex<0&&I&&(this._cacheIndex=this._keys.length,this._keys.push(D),this._values.push(void 0)),this._cacheIndex},re}();return j;function V(re,D){return re}function ke(re,D){return D}function _e(re,D){return[re,D]}}function Ks(){var y=function(){function O(){this._map=new sr}return Object.defineProperty(O.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),O.prototype.has=function(S){return this._map.has(S)},O.prototype.add=function(S){return this._map.set(S,S),this},O.prototype.delete=function(S){return this._map.delete(S)},O.prototype.clear=function(){this._map.clear()},O.prototype.keys=function(){return this._map.keys()},O.prototype.values=function(){return this._map.keys()},O.prototype.entries=function(){return this._map.entries()},O.prototype["@@iterator"]=function(){return this.keys()},O.prototype[Ae]=function(){return this.keys()},O}();return y}function Ws(){var y=16,O=wt.create(),S=j();return function(){function D(){this._key=j()}return D.prototype.has=function(I){var L=V(I,!1);return L!==void 0?wt.has(L,this._key):!1},D.prototype.get=function(I){var L=V(I,!1);return L!==void 0?wt.get(L,this._key):void 0},D.prototype.set=function(I,L){var F=V(I,!0);return F[this._key]=L,this},D.prototype.delete=function(I){var L=V(I,!1);return L!==void 0?delete L[this._key]:!1},D.prototype.clear=function(){this._key=j()},D}();function j(){var D;do D="@@WeakMap@@"+re();while(wt.has(O,D));return O[D]=!0,D}function V(D,I){if(!R.call(D,S)){if(!I)return;Object.defineProperty(D,S,{value:wt.create()})}return D[S]}function ke(D,I){for(var L=0;L<I;++L)D[L]=Math.random()*255|0;return D}function _e(D){if(typeof Uint8Array=="function"){var I=new Uint8Array(D);return typeof crypto<"u"?crypto.getRandomValues(I):typeof msCrypto<"u"?msCrypto.getRandomValues(I):ke(I,D),I}return ke(new Array(D),D)}function re(){var D=_e(y);D[6]=D[6]&79|64,D[8]=D[8]&191|128;for(var I="",L=0;L<y;++L){var F=D[L];(L===4||L===6||L===8)&&(I+="-"),F<16&&(I+="0"),I+=F.toString(16).toLowerCase()}return I}}function Jt(y){return y.__=void 0,delete y.__,y}})}(i||(i={})),Jr}lt();const lr="design:paramtypes",Gr="design:type",hr="design:returntype",Ct=new Map,$t=class{static get(p,l,w){return Reflect.getMetadata(p,Oe(l),w)}static getOwn(p,l,w){return Reflect.getOwnMetadata(p,Oe(l),w)}static getType(p,l){return Reflect.getMetadata(Gr,p,l)}static getOwnType(p,l){return Reflect.getMetadata(Gr,p,l)}static getReturnType(p,l){return Reflect.getMetadata(hr,p,l)}static getOwnReturnType(p,l){return Reflect.getOwnMetadata(hr,p,l)}static has(p,l,w){try{return Reflect.hasMetadata(p,Oe(l),w)}catch{}return!1}static hasOwn(p,l,w){return Reflect.hasOwnMetadata(p,Oe(l),w)}static delete(p,l,w){return Reflect.deleteMetadata(p,Oe(l),w)}static setParamTypes(p,l,w){return this.set(lr,w,p.prototype,l)}static set(p,l,w,R){const K=Ct.has(p)?Ct.get(p)||[]:[],ne=Oe(w);K.indexOf(ne)===-1&&(K.push(ne),Ct.set(p,K)),Reflect.defineMetadata(p,l,Oe(w),R)}static getParamTypes(p,l){return Reflect.getMetadata(lr,p,l)||[]}static getOwnParamTypes(p,l){return Reflect.getOwnMetadata(lr,p,l)||[]}};$t.getTargetsFromPropertyKey=i=>Ct.has(i)?Ct.get(i)||[]:[];let Ze=$t;const Tn="tsed:class:store",Je="tsed:method:store",Pn="tsed:property:store",mr="tsed:param:store",zt=new Map;function He(i,...p){if(W(p[0]))return zt.has(p[0])||zt.set(p[0],new Qe),zt.get(p[0]);{const l=Ze;return l.hasOwn(i,...p)||l.set(i,new Qe,...p),l.getOwn(i,...p)}}function Ur(i){const[p,l,w]=i;switch(Ve(i)){case Re.PARAM_CTOR:case Re.PARAM_STC:case Re.PARAM:const R=He(mr,p,l);return R.has(""+w)||R.set(""+w,new Qe),R.get(""+w);case Re.PROP:case Re.PROP_STC:return He(Pn,p,l);case Re.METHOD:case Re.METHOD_STC:return He(Je,p,l);case Re.CLASS:return He(Tn,p)}}class Qe{constructor(){this._entries=new Map}static from(...p){return Ur(p)}static fromMethod(p,l){return Qe.from(p,l,ot(p,l))}static mergeStoreFrom(p,l,...w){const R=Qe.from(p,...w);return Qe.from(l,...w)._entries.forEach((K,ne)=>{R.merge(ne,K)}),R}static mergeStoreMethodFrom(p,l,w){return this.mergeStoreFrom(p,l,w,ot(p,w))}get(p,l){return this._entries.get(vt(p))||l}has(p){return this._entries.has(vt(p))}set(p,l){return this._entries.set(vt(p),l),this}delete(p){return this._entries.delete(vt(p))}merge(p,l,w=!1){let R=this.get(p);return R&&(l=ft(l),R=ft(R),l=w?mt(l,R):mt(R,l)),this.set(p,l),this}toJson(){return[...this._entries.entries()].reduce((p,[l,w])=>({...p,[l]:w}),{})}}function Yt(i){return(...p)=>{const l=Qe.from(...p),w=i(l,p);return typeof w=="function"&&w(...p),p[2]}}function En(i,p){return Yt(l=>{l.merge(i,p)})}function Rn(i,p){return Yt(l=>{l.set(i,p)})}class dr extends Error{constructor(p,l){super(dr.buildMessage(p,l))}static buildMessage(p,l){const[w,R,K]=l,ne=Ve(l),Ae=ne.split("/")[0],xe=Ae==="parameter"?".["+K+"]":"",it=R?"."+R:Ae==="parameter"?".constructor":"",_t=vt(Oe(w))+it+xe;return`${p.name} cannot be used as ${ne} decorator on ${_t}`}}var Kr=(i=>(i.PROD="production",i.DEV="development",i.TEST="test",i))(Kr||{});const _s=Kr,et=Function;Dr.Type=et;function Xt(i){return i&&Object.getPrototypeOf(i)}function yr(i){return Xt(i)}function It(i){const p=[];let l=Oe(i);for(;l&&vt(l)!=="";)p.unshift(l),l=yr(l);return p}function gr(i){return typeof i=="object"}function An(i){return!!i&&typeof i.lift=="function"&&typeof i.subscribe=="function"}function Wr(i){return i===Promise||i instanceof Promise||!!i&&typeof i.subscribe!="function"&&typeof i.then=="function"}function Or(i){return i!==null&&typeof i=="object"&&typeof i.pipe=="function"}function Ue(i){return gr(i)&&"data"in i&&"headers"in i&&"status"in i&&"statusText"in i}var Vr=(i=>(i.PENDING="PENDING",i.CANCELED="CANCELED",i.RESOLVED="RESOLVED",i.REJECTED="REJECTED",i))(Vr||{}),Zt=(i=>(i.STREAM="STREAM",i.BUFFER="BUFFER",i.DATA="DATA",i))(Zt||{});class br{constructor({hasNextFunction:p=!1}={}){Ke(this,U),Ke(this,Ne),Ke(this,ee),Ke(this,ut),this.status="PENDING",We(this,ee,!1),We(this,ee,p),We(this,ut,new Promise((l,w)=>{We(this,U,l),We(this,Ne,w)}))}isDone(){return this.status!=="PENDING"}get next(){return We(this,ee,!0),p=>{if(!this.isDone())return p?this.reject(p):this.resolve({type:"DATA"})}}call(p){if(this.isDone())return Promise.resolve(this);try{this.handle(p())}catch(l){this.reject(l)}return ge(this,ut)}reject(p){this.isDone()||(this.done("REJECTED"),ge(this,Ne).call(this,p))}resolve(p={}){this.isDone()||(this.done("RESOLVED"),ge(this,U).call(this,{...p,state:"RESOLVED"}))}destroy(){}cancel(){if(!this.isDone())return this.done("CANCELED"),ge(this,U).call(this,{state:"CANCELED"})}done(p){this.destroy(),this.status=p}handle(p,l={}){if(!this.isDone()){if(p){if(this.isCanceledResponse(p))return this.cancel();if(An(p)&&(p=p.toPromise()),Ue(p))return this.handle(p.data,{...l,status:p.status,headers:p.headers});if(Or(p))return this.resolve({...l,type:"STREAM",data:p});if(Or(p)||Buffer.isBuffer(p))return this.resolve({...l,type:"BUFFER",data:p});if(Wr(p))return p.then(w=>this.handle(w,l)).catch(w=>w.response&&Ue(w.response)?this.handle(w.response):this.reject(w))}if(!ge(this,ee))return this.resolve({...l,data:p,type:"DATA"})}}isCanceledResponse(p){return p==="CANCELED"}}U=new WeakMap,Ne=new WeakMap,ee=new WeakMap,ut=new WeakMap;function Hr(i){try{i()}catch(p){return p}}async function Ds(i){try{await i()}catch(p){return p}}function xs(i,p=[]){return Object.entries(i).reduce((l,[w,R])=>(Rt(w)||p.includes(w)||R===void 0||(l[w]=R),l),{})}function Cn(i){return typeof i=="function"?i:i.constructor}function zr(i){return Cn(i)}function te(i){return Oe(i)===i?i.prototype:i}function jn(i){const p=new Map;return i=Oe(i),It(i).forEach(l=>{Reflect.ownKeys(te(l)).forEach(w=>{var R;W(w)||w==="constructor"||(R=Object.getOwnPropertyDescriptor(te(l),w))!=null&&R.get||p.set(w,{target:l,propertyKey:w})})}),Array.from(p.values())}function Qt(i,p){jn(i).forEach(({target:l,propertyKey:w})=>{const R=te(i);l!==Oe(i)&&(Object.defineProperty(R,w,{writable:!0,configurable:!0,value(...Ae){return te(l)[w].apply(this,Ae)}}),Qe.mergeStoreMethodFrom(i,l,w));let K=ot(i,w);const ne=p(R,w,K)||K;ne&&Object.defineProperty(R,w,ne)})}function _n(i,p){return[i,p,ot(i,p)]}function vr(i){return Array.isArray(i)}function jt(i){return i===Array||vr(i)}function Nt(i){return i&&Ee(i)&&!i.prototype}function Dn(i){return i&&"isBuffer"in i&&typeof i.isBuffer=="function"?!0:xn(i)}function xn(i){return!!(i&&(i===Uint8Array||i instanceof Uint8Array))}function wr(i){return i===Object}function kn(i){return wr(Oe(i))&&i!==Object}function Sr(i){return!i||Nt(i)?!1:!(W(i)||vn(i)||wr(i)||rt(i)||Wr(i)||jt(i)||Dn(i))}function ks(i){return Sr(i)?Oe(i):i}function Lt(i){return`${(zr(i).toString().split(`
|
|
15
|
+
`).find(p=>p.indexOf("constructor(")>-1)||"constructor()").replace("{","").trim()}`}function er(i){return Lt(i).split("constructor(")[1].split(")")[0].split(", ").filter(Boolean).map(p=>p.trim())}function tr(){return`e${Math.random().toString(36).substring(7)}`}const $n=i=>{const[p,l,w,R="."]=i;return gr(l)||ue(p)?{expression:p,scope:l,defaultValue:w,separator:R}:{expression:l,scope:p,defaultValue:w,separator:R}};function In(...i){const p=$n(i);let l=p.scope;const{expression:w,defaultValue:R,separator:K}=p;if(!w)return l;if(!l)return R;const ne=w.split(K),Ae=xe=>{if(l){if(l[xe]!==void 0||gr(l)&&xe in l)return l[xe];if(Ee(l.get))return l.get(xe)}};for(;(l=Ae(ne.shift()))&&ne.length;);return l===void 0?R:l}function rr(i){return i&&typeof i.toJSON=="function"}function $s(i,p){let l="0.0.0.0",w=p;return typeof p=="string"&&p.indexOf(":")>-1&&([l,w]=p.split(":"),w=+w),{protocol:i,address:l,port:w,toString(){return[`${this.protocol}://${this.address}`,typeof this.port=="number"&&this.port].filter(Boolean).join(":")}}}function Mr(i,p){for(const l of It(i)){const w=Object.getOwnPropertyDescriptor(l&&l.prototype||l,p);if(w)return w}}function Nn(i){return jt(i)||i===Map||i instanceof Map||i===Set||i instanceof Set||i===WeakMap||i instanceof WeakMap||i===WeakSet||i instanceof WeakSet}function Ln(i){return i===""||pt(i)}function qn(i,p){const l=Oe(i);if(l){const w=Mr(l,p);if(w)return w.enumerable}return Object.prototype.propertyIsEnumerable.call(i,p)}function Fn(i,p,l=5){if(!i||!p)return!1;for(i=Oe(i),p=Oe(p);vt(i)!=="";){if(!l)return!1;if(i===p)return!0;i=Xt(i),l--}return!1}function Jn(i){return!!(i&&i!=null&&i._isAMomentObject)}function Yr(i){return i&&i._bsontype}function Tr(i){return!!(rr(i)&&i.$isMongooseModelPrototype||Yr(i))}function Bn(i){return!(Buffer.isBuffer(i)||Or(i)||nt(i)||ht(i)||ue(i)||pt(i))}function Gn(i){return $r(i)?"string":Ot(i)?"number":st(i)?"boolean":"any"}function Un(i,p,l,w="."){const R=p.split(w),K=(ne,Ae)=>Rt(ne)?!1:Ae?(typeof i.set=="function"?i.set(ne,l):i[ne]=l,!1):(typeof i.set=="function"?(i.has(ne)||i.set(ne,{}),i=i.get(ne)):i=i[ne]=i[ne]||{},!0);for(;K(R.shift(),!R.length););}function Xr(i){return i?ue(i)?p=>p[i]:i:(p,l)=>String(l)}function Kn(i,p){if(vr(i)){const w=Xr(p||"id");return i.reduce((R,K,ne)=>([].concat(w(K,ne)).forEach(Ae=>{var xe;const it=R.get(Ae);K=((xe=it==null?void 0:it.merge)==null?void 0:xe.call(it,K))||K,R.set(Ae,K)}),R),new Map)}const l=Xr(p);return Object.entries(i).reduce((w,[R,K])=>w.set(l(K,R),K),new Map)}function Zr(i){return Array.from(new Set(i).values())}function Wn(i,p="id"){const l=new Map;return i.forEach(w=>{l.set(w[p],w)}),Array.from(l.values())}function Qr(...i){return(...p)=>{const l=typeof p[2]=="object";if(i.filter(w=>!!w).forEach(w=>{const R=w(...p);l&&typeof R=="object"&&(p[2]=R)}),l)return p[2]}}function Vn(i){return(p,l)=>i(p,l,ot(p,l))}function Pr(...i){return(p,l)=>{i.filter(Boolean).forEach(w=>w(p,l,ot(p,l)))}}s.AnyToPromise=br,s.AnyToPromiseResponseTypes=Zt,s.AnyToPromiseStatus=Vr,s.CLASS_STORE=Tn,s.DecoratorTypes=Re,s.Env=Kr,s.EnvTypes=_s,s.METHOD_STORE=Je,s.Metadata=Ze,s.PARAM_STORE=mr,s.PROPERTY_STORE=Pn,s.Store=Qe,s.StoreFn=Yt,s.StoreMerge=En,s.StoreSet=Rn,s.Type=et,s.UnsupportedDecoratorType=dr,s.ancestorOf=Xt,s.ancestorsOf=It,s.catchAsyncError=Ds,s.catchError=Hr,s.classOf=Oe,s.cleanObject=xs,s.constructorOf=zr,s.createInstance=fr,s.decorateMethodsOf=Qt,s.decoratorArgs=_n,s.decoratorTypeOf=Ve,s.deepClone=ft,s.deepMerge=mt,s.descriptorOf=ot,s.getClass=gt,s.getClassOrSymbol=ks,s.getConstructor=Cn,s.getConstructorArgNames=er,s.getHostInfoFromPort=$s,s.getInheritedClass=yr,s.getRandomId=tr,s.getValue=In,s.hasJsonMethod=rr,s.inheritedDescriptorOf=Mr,s.isArray=vr,s.isArrayOrArrayClass=jt,s.isArrowFn=Nt,s.isBoolean=nt,s.isBooleanOrBooleanClass=st,s.isBuffer=Dn,s.isClass=Sr,s.isClassObject=wr,s.isCollection=Nn,s.isDate=rt,s.isEmpty=Ln,s.isEnumerable=qn,s.isFunction=Ee,s.isInheritedFrom=Fn,s.isMethodDescriptor=js,s.isMomentObject=Jn,s.isMongooseObject=Tr,s.isNil=pt,s.isNumber=ht,s.isNumberOrNumberClass=Ot,s.isObject=gr,s.isObjectID=Yr,s.isObservable=An,s.isPlainObject=kn,s.isPrimitive=bt,s.isPrimitiveClass=z,s.isPrimitiveOrPrimitiveClass=vn,s.isPromise=Wr,s.isProtectedKey=Rt,s.isRegExp=Ir,s.isSerializable=Bn,s.isStream=Or,s.isString=ue,s.isStringOrStringClass=$r,s.isSymbol=W,s.isSymbolOrSymbolClass=Nr,s.isUint8Array=xn,s.mergeReducerBuilder=qr,s.methodsOf=jn,s.nameOf=vt,s.nameOfClass=Fr,s.nameOfSymbol=Mn,s.objectKeys=Lr,s.primitiveOf=Gn,s.prototypeOf=te,s.setValue=Un,s.toMap=Kn,s.toStringConstructor=Lt,s.uniq=Zr,s.uniqBy=Wn,s.useDecorators=Qr,s.useMethodDecorator=Vn,s.useMethodDecorators=Pr,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})})}(xr,xr.exports)),xr.exports}var be=va();function Rs(m,E){return m.$ref?be.getValue(E,m.$ref.replace("#/","").replace(/\//g,".")):m}function jo(m,E){switch(m=Rs(m,E),m==null?void 0:m.type){case"object":return!m.properties&&!m.$ref?me("map",m,E):me("nested",m,E);case"array":return me("array",m,E);case"string":return me("string",m,E);case"boolean":return me("boolean",m,E);case"integer":case"number":return me("number",m,E)}return{}}Ye("any",jo);function _o(m,E){const s=m.items.$ref?Rs(m.items,E):m.items,{type:$}=s;switch($){case"object":return{...me("default",m,E),...me("editgrid",s,E)};case"string":if(s.enum)return{...me("enum",s,E),inline:!1,type:"selectboxes"};const le=me($,s,E);return be.cleanObject({...le,multiple:le.type==="tags"?void 0:!0});default:case"number":return{...me($,s,E),multiple:!0}}}Ye("array",_o);function wa(m,E){const s=me("default",m,E);return be.cleanObject({...s,input:!0,type:s.type||"checkbox"})}Ye("boolean",wa);function Sa(m,E){const s=me("default",m,E),$={enableMinDateInput:!1,enableMaxDateInput:!1,input:!0,...s,type:"datetime",datePicker:{disableWeekends:!1,disableWeekdays:!1,...be.getValue(s,"datePicker")},widget:{type:"calendar",displayInTimezone:"viewer",locale:"en",useLocaleSettings:!1,allowInput:!0,mode:"single",noCalendar:!1,hourIncrement:1,minuteIncrement:1,minDate:null,disableWeekends:!1,disableWeekdays:!1,maxDate:null,...be.getValue(s,"widget")}};return m.format==="date"?{...$,format:"yyyy-MM-dd",enableTime:!1,widget:{...$.widget,enableTime:!1,format:"yyyy-MM-dd",...be.getValue(s,"widget")}}:{...$,timePicker:{showMeridian:!1,...be.getValue(s,"timePicker")},widget:{...$.widget,enableTime:!0,time_24hr:!0,...be.getValue(s,"widget")}}}Ye("date",Sa);function Do(m){return Object.entries(m).reduce((s,[$,le])=>$.startsWith("x-formio-")?{...s,[$.replace("x-formio-","")]:le}:s,{})}function xo(m,E){const s=Do(m);return be.cleanObject({...s,disabled:!!m.readOnly,description:m.description,defaultValue:m.default})}Ye("default",xo);function ko(m,E){var le;const s=me("default",m,E),$=m.enum.map(ge=>({label:ge,value:ge}));return s.type==="select"?be.cleanObject({...s,data:{json:((le=s.data)==null?void 0:le.json)||JSON.stringify($)},dataSrc:"json",idPath:"value",valueProperty:"value",template:s.template||"<span>{{ item.label }}</span>"}):be.cleanObject({...s,values:m["x-values"]||$.map(ge=>({...ge,shortcut:""}))})}Ye("enum",ko);function $o(m,E){return{...me("default",m,E),type:"datamap",tableView:!1,input:!0,valueComponent:{...m.additionalProperties?me("any",m.additionalProperties,E):{},hideLabel:!0,tableView:!0}}}Ye("map",$o);function Io(m,E){return{...me("default",m,E),label:!1,tableView:!1,type:"form",display:"form",input:!0,components:[{key:"panel",label:E.parentKey&&Et.sentenceCase(E.parentKey),...me("panel",m,E)}]}}Ye("nested",Io);function As(m,E){const s=me("default",m,E);return be.cleanObject({...s,input:!0,delimiter:be.getValue(s,"delimiter",!1),inputFormat:be.getValue(s,"inputFormat","plain"),mask:be.getValue(s,"mask",!1),requireDecimal:!1,type:"number"})}Ye("number",As),Ye("integer",As);function No(m,E){return{...me("default",m,E),rowDrafts:!1,type:"editgrid",input:!0,components:me("properties",m,E)}}Ye("editgrid",No);function Lo(m,E){return{...me("default",m,E),collapsible:!1,input:!1,tableView:!1,components:me("properties",m,E)}}Ye("panel",Lo);function Ma(m,E){if(m.data){const s={...m.data};return Object.entries(s).forEach(([$,le])=>{be.isFunction(le)&&E.resolvers.push(async ge=>{s[$]=await le({...E,component:m,form:ge})})}),{...m,data:s}}return m}function Ta(m,E,s,$){const le=(s.required||[]).includes(m),ge={...E.validate||{},required:le,pattern:$.pattern,minLength:!le||le&&$.minLength>1?$.minLength:void 0,maxLength:$.maxLength,min:$.minimum||$.minItems,max:$.maximum||$.maxItems};switch($.type){case"string":$.minLength===0&&ge.required&&(ge.minLength=void 0,ge.required=!1);break;case"boolean":ge.required=!1;break}return be.cleanObject(ge)}function qo(m,E){const s={label:"Tabs",key:"tabs",type:"tabs",input:!1,tableView:!1,components:new Map,pushed:!1},$=[];return Object.entries(m.properties).forEach(([le,ge])=>{const Ke=ge["x-formiotabs"],We=me("any",ge,{...E,parentKey:le});let U=be.cleanObject({key:le,...We,label:We.label==!1?void 0:We.label||ge.title||Et.sentenceCase(le),validate:Ta(le,We,m,ge)});U=Ma(U,E),Ke?(s.pushed||($.push(s),s.pushed=!0),s.components.has(Ke.key)||s.components.set(Ke.key,{...Ke,components:[]}),s.components.get(Ke.key).components.push(U)):$.push(U)}),s.components.size&&(s.components=[...s.components.values()]),$}Ye("properties",qo);function Fo(m,E){if(m.format){const $=me("default",m,E);switch(m.format){case"date":case"date-time":return me("date",m,E);case"uri":return be.cleanObject({input:!0,...$,type:$.type||"url"});default:return be.cleanObject({input:!0,...$,type:$.type||m.format})}}if(m.enum){const $=me("enum",m,E);return{...$,type:$.type||"radio"}}const s=me("default",m,E);return be.cleanObject({input:!0,type:s.type||"textfield",...s})}Ye("string",Fo);var kr={exports:{}},Pa=kr.exports,Jo;function Ea(){return Jo||(Jo=1,function(m,E){(function(s,$){$(E,ya,ga,Oa)})(Pa,function(s,$,le,ge){var Ke=t=>{throw TypeError(t)},We=(t,e,r)=>e.has(t)||Ke("Cannot "+r),U=(t,e,r)=>(We(t,e,"read from private field"),r?r.call(t):e.get(t)),Ne=(t,e,r)=>e.has(t)?Ke("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),ee=(t,e,r,n)=>(We(t,e,"write to private field"),e.set(t,r),r),ut,Re,gt,Oe,Ve,rt,Ee,pt,nt,st,ht,Ot,ue=(t=>(t.ALL="ALL",t.GET="GET",t.POST="POST",t.PUT="PUT",t.PATCH="PATCH",t.HEAD="HEAD",t.DELETE="DELETE",t.OPTIONS="OPTIONS",t.TRACE="TRACE",t.PUBLISH="PUBLISH",t.SUBSCRIBE="SUBSCRIBE",t.CUSTOM="CUSTOM",t))(ue||{});const $r=["ALL","GET","POST","PUT","PATCH","HEAD","DELETE","OPTIONS","TRACE","CUSTOM"],vn=["PUBLISH","SUBSCRIBE"],bt=new Map;function z(t,e,r){return bt.set(r?`${r}:${t}`:t,e)}function Ir(t,e){const r=bt.get(`${e==null?void 0:e.specType}:${t}`)||bt.get(t);if(r)return r;throw new Error(`JsonSchema ${t} mapper doesn't exists`)}function W(t,e,r,n){return Ir(t,r)(...e,r,n)}function Nr(t){return bt.has(t)}function wn(t,e){return t.find(r=>bt.has(`${e==null?void 0:e.specType}:${r}`))||t.find(r=>bt.has(r))}function ft(t){return t.split("/").filter(Boolean).join("/")}var fr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Dr<"u"?Dr:typeof self<"u"?self:{},Rt={exports:{}},Lr=Rt.exports,qr;function Sn(){return qr||(qr=1,function(t,e){(function(r,n){n(e)})(Lr,function(r){var n=o=>{throw TypeError(o)},a=(o,f,d)=>f.has(o)||n("Cannot "+d),c=(o,f,d)=>(a(o,f,"read from private field"),d?d.call(o):f.get(o)),h=(o,f,d)=>f.has(o)?n("Cannot add the same private member more than once"):f instanceof WeakSet?f.add(o):f.set(o,d),v=(o,f,d,T)=>(a(o,f,"write to private field"),f.set(o,d),d),P,C,x,Y,ve=(o=>(o.PARAM="parameter",o.PARAM_CTOR="parameter.constructor",o.PARAM_STC="parameter.static",o.PROP="property",o.PROP_STC="property.static",o.METHOD="method",o.METHOD_STC="method.static",o.CLASS="class",o))(ve||{});function ze(o){return o.prototype?o:o.constructor}function he(o){return ze(o)}function St(o){const[f,d,T]=o,A=H=>f!==he(f)?H:`${H}.static`;return typeof T=="number"?d?A("parameter"):"parameter.constructor":T&&T.value?A("method"):d&&T===void 0||T?A("property"):ve.CLASS}function xt(o){return o===Date||o instanceof Date&&!isNaN(+o)}function Bt(o){return typeof o=="function"}function De(o){return o==null}function ie(o){return typeof o=="boolean"||o instanceof Boolean||o===Boolean}function se(o){return typeof o=="boolean"||o instanceof Boolean||o===Boolean}function Me(o){return typeof o=="number"}function de(o){return typeof o=="number"||o instanceof Number||o===Number}function ye(o){return typeof o=="string"}function ct(o){return typeof o=="string"||o instanceof String||o===String}function bs(o){return ct(o)||de(o)||se(o)}function co(o){return ye(o)||Me(o)||ie(o)}function Lu(o){return[String,Number,Boolean].includes(o)}function Oi(o){return o instanceof RegExp}function Cr(o){return typeof o=="symbol"}function qu(o){return typeof o=="symbol"||o instanceof Symbol||o===Symbol}const Fu=o=>De(o)||co(o)||Cr(o)||Bt(o),Gt=(o,f=new WeakMap)=>{if(Fu(o))return o;const d=f.get(o);if(d)return d;if(ArrayBuffer.isView(o))return Buffer.isBuffer(o)?Buffer.from(o):new(he(o))(o.buffer.slice(0),o.byteOffset,o.byteLength);if(xt(o))return new Date(o);if(Oi(o))return new RegExp(o);if(Array.isArray(o)){const A=[];return f.set(o,A),o.forEach((H,pe)=>A[pe]=Gt(H,f)),A}if(o instanceof Map){const A=new Map;return f.set(o,A),o.forEach((H,pe)=>A.set(Gt(pe,f),Gt(H,f))),A}if(o instanceof Set){const A=new Set;return f.set(o,A),o.forEach(H=>A.add(Gt(H,f))),A}const T=Object.create(Reflect.getPrototypeOf(o));return f.set(o,T),Reflect.ownKeys(o).forEach(A=>{const H=Object.getOwnPropertyDescriptor(o,A);H&&(Bt(H.value)?Object.defineProperty(T,A,H):Object.defineProperty(T,A,{...H,value:Gt(H.value,f)}))}),T};function bi(o){return o?he(o)!==Object?Object.create(o):{}:{}}function vs(o){return["__proto__","constructor","prototype"].includes(o)}function uo(o){return Object.keys(o).filter(f=>!vs(f))}function vi(o){return(f,d,T)=>{const A=f.findIndex(H=>o(H,d));return A===-1?[...f,d]:(f[A]=ln(f[A],d,T),f)}}const wi=vi((o,f)=>o===f);function Ju({reducers:o,parentKey:f}){return o?f&&o[f]?o[f]:o.default||wi:wi}function Bu(o,f){return co(o)||Cr(o)||Bt(o)||f===void 0}function Gu(o,f){return o==null||o===""&&f!==""}function ln(o,f,d={}){if(Gu(f,o))return o;if(Bu(f,o))return f;if(Array.isArray(o)){const A=Ju(d);return[].concat(f).reduce((H,pe)=>A(H,pe,d),[...o])}const T=bi(o);return[...uo(o),...uo(f)].reduce((A,H)=>{var pe;const $e=o&&o[H],Be=ln($e,f&&f[H],{...d,parentKey:H});return d.cleanUndefinedProps&&Be===void 0||(A[H]=((pe=d.alter)==null?void 0:pe.call(d,H,Be))??Be),A},T)}function Ut(o,f){return Reflect.getOwnPropertyDescriptor(o&&o.prototype||o,f)}function Uu(o,f){var d;return(d=Ut(o,f))==null?void 0:d.value}function Si(o){return typeof o=="function"?o.name:o.constructor.name}const Mi=o=>o.toString().replace("Symbol(","").replace(")","");function Kt(o){switch(typeof o){default:return""+o;case"symbol":return Mi(o);case"function":return Si(o)}}var Ti=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof fr<"u"?fr:typeof self<"u"?self:{},Pi={};/*! *****************************************************************************
|
|
16
|
+
Copyright (C) Microsoft. All rights reserved.
|
|
17
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
18
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
19
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
20
|
+
|
|
21
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
22
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
23
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
24
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
25
|
+
|
|
26
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
27
|
+
and limitations under the License.
|
|
28
|
+
***************************************************************************** */var Ei;function Ku(){if(Ei)return Pi;Ei=1;var o;return function(f){(function(d){var T=typeof globalThis=="object"?globalThis:typeof Ti=="object"?Ti:typeof self=="object"?self:typeof this=="object"?this:Be(),A=H(f);typeof T.Reflect<"u"&&(A=H(T.Reflect,A)),d(A,T),typeof T.Reflect>"u"&&(T.Reflect=f);function H(Tt,pr){return function(Wt,dn){Object.defineProperty(Tt,Wt,{configurable:!0,writable:!0,value:dn}),pr&&pr(Wt,dn)}}function pe(){try{return Function("return this;")()}catch{}}function $e(){try{return(0,eval)("(function() { return this; })()")}catch{}}function Be(){return pe()||$e()}})(function(d,T){var A=Object.prototype.hasOwnProperty,H=typeof Symbol=="function",pe=H&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",$e=H&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",Be=typeof Object.create=="function",Tt={__proto__:[]}instanceof Array,pr=!Be&&!Tt,Wt={create:Be?function(){return Ro(Object.create(null))}:Tt?function(){return Ro({__proto__:null})}:function(){return Ro({})},has:pr?function(g,b){return A.call(g,b)}:function(g,b){return b in g},get:pr?function(g,b){return A.call(g,b)?g[b]:void 0}:function(g,b){return g[b]}},dn=Object.getPrototypeOf(Function),yn=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Kp(),So=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Wp(),Mo=typeof WeakMap=="function"?WeakMap:Vp(),jr=H?Symbol.for("@reflect-metadata:registry"):void 0,Ts=Bp(),Qi=Gp(Ts);function Tp(g,b,M,_){if(Q(M)){if(!ca(g))throw new TypeError;if(!ua(b))throw new TypeError;return kp(g,b)}else{if(!ca(g))throw new TypeError;if(!qe(b))throw new TypeError;if(!qe(_)&&!Q(_)&&!_r(_))throw new TypeError;return _r(_)&&(_=void 0),M=Pt(M),$p(g,b,M,_)}}d("decorate",Tp);function Pp(g,b){function M(_,X){if(!qe(_))throw new TypeError;if(!Q(X)&&!Fp(X))throw new TypeError;na(g,b,_,X)}return M}d("metadata",Pp);function Ep(g,b,M,_){if(!qe(M))throw new TypeError;return Q(_)||(_=Pt(_)),na(g,b,M,_)}d("defineMetadata",Ep);function Rp(g,b,M){if(!qe(b))throw new TypeError;return Q(M)||(M=Pt(M)),ea(g,b,M)}d("hasMetadata",Rp);function Ap(g,b,M){if(!qe(b))throw new TypeError;return Q(M)||(M=Pt(M)),To(g,b,M)}d("hasOwnMetadata",Ap);function Cp(g,b,M){if(!qe(b))throw new TypeError;return Q(M)||(M=Pt(M)),ta(g,b,M)}d("getMetadata",Cp);function jp(g,b,M){if(!qe(b))throw new TypeError;return Q(M)||(M=Pt(M)),ra(g,b,M)}d("getOwnMetadata",jp);function _p(g,b){if(!qe(g))throw new TypeError;return Q(b)||(b=Pt(b)),sa(g,b)}d("getMetadataKeys",_p);function Dp(g,b){if(!qe(g))throw new TypeError;return Q(b)||(b=Pt(b)),oa(g,b)}d("getOwnMetadataKeys",Dp);function xp(g,b,M){if(!qe(b))throw new TypeError;if(Q(M)||(M=Pt(M)),!qe(b))throw new TypeError;Q(M)||(M=Pt(M));var _=gn(b,M,!1);return Q(_)?!1:_.OrdinaryDeleteMetadata(g,b,M)}d("deleteMetadata",xp);function kp(g,b){for(var M=g.length-1;M>=0;--M){var _=g[M],X=_(b);if(!Q(X)&&!_r(X)){if(!ua(X))throw new TypeError;b=X}}return b}function $p(g,b,M,_){for(var X=g.length-1;X>=0;--X){var Ge=g[X],Fe=Ge(b,M,_);if(!Q(Fe)&&!_r(Fe)){if(!qe(Fe))throw new TypeError;_=Fe}}return _}function ea(g,b,M){var _=To(g,b,M);if(_)return!0;var X=Eo(b);return _r(X)?!1:ea(g,X,M)}function To(g,b,M){var _=gn(b,M,!1);return Q(_)?!1:aa(_.OrdinaryHasOwnMetadata(g,b,M))}function ta(g,b,M){var _=To(g,b,M);if(_)return ra(g,b,M);var X=Eo(b);if(!_r(X))return ta(g,X,M)}function ra(g,b,M){var _=gn(b,M,!1);if(!Q(_))return _.OrdinaryGetOwnMetadata(g,b,M)}function na(g,b,M,_){var X=gn(M,_,!0);X.OrdinaryDefineOwnMetadata(g,b,M,_)}function sa(g,b){var M=oa(g,b),_=Eo(g);if(_===null)return M;var X=sa(_,b);if(X.length<=0)return M;if(M.length<=0)return X;for(var Ge=new So,Fe=[],ae=0,k=M;ae<k.length;ae++){var N=k[ae],q=Ge.has(N);q||(Ge.add(N),Fe.push(N))}for(var G=0,ce=X;G<ce.length;G++){var N=ce[G],q=Ge.has(N);q||(Ge.add(N),Fe.push(N))}return Fe}function oa(g,b){var M=gn(g,b,!1);return M?M.OrdinaryOwnMetadataKeys(g,b):[]}function ia(g){if(g===null)return 1;switch(typeof g){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return g===null?1:6;default:return 6}}function Q(g){return g===void 0}function _r(g){return g===null}function Ip(g){return typeof g=="symbol"}function qe(g){return typeof g=="object"?g!==null:typeof g=="function"}function Np(g,b){switch(ia(g)){case 0:return g;case 1:return g;case 2:return g;case 3:return g;case 4:return g;case 5:return g}var M="string",_=pa(g,pe);if(_!==void 0){var X=_.call(g,M);if(qe(X))throw new TypeError;return X}return Lp(g)}function Lp(g,b){var M,_;{var X=g.toString;if(Ps(X)){var _=X.call(g);if(!qe(_))return _}var M=g.valueOf;if(Ps(M)){var _=M.call(g);if(!qe(_))return _}}throw new TypeError}function aa(g){return!!g}function qp(g){return""+g}function Pt(g){var b=Np(g);return Ip(b)?b:qp(b)}function ca(g){return Array.isArray?Array.isArray(g):g instanceof Object?g instanceof Array:Object.prototype.toString.call(g)==="[object Array]"}function Ps(g){return typeof g=="function"}function ua(g){return typeof g=="function"}function Fp(g){switch(ia(g)){case 3:return!0;case 4:return!0;default:return!1}}function Po(g,b){return g===b||g!==g&&b!==b}function pa(g,b){var M=g[b];if(M!=null){if(!Ps(M))throw new TypeError;return M}}function fa(g){var b=pa(g,$e);if(!Ps(b))throw new TypeError;var M=b.call(g);if(!qe(M))throw new TypeError;return M}function la(g){return g.value}function ha(g){var b=g.next();return b.done?!1:b}function ma(g){var b=g.return;b&&b.call(g)}function Eo(g){var b=Object.getPrototypeOf(g);if(typeof g!="function"||g===dn||b!==dn)return b;var M=g.prototype,_=M&&Object.getPrototypeOf(M);if(_==null||_===Object.prototype)return b;var X=_.constructor;return typeof X!="function"||X===g?b:X}function Jp(){var g;!Q(jr)&&typeof T.Reflect<"u"&&!(jr in T.Reflect)&&typeof T.Reflect.defineMetadata=="function"&&(g=Up(T.Reflect));var b,M,_,X=new Mo,Ge={registerProvider:Fe,getProvider:k,setProvider:q};return Ge;function Fe(G){if(!Object.isExtensible(Ge))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case g===G:break;case Q(b):b=G;break;case b===G:break;case Q(M):M=G;break;case M===G:break;default:_===void 0&&(_=new So),_.add(G);break}}function ae(G,ce){if(!Q(b)){if(b.isProviderFor(G,ce))return b;if(!Q(M)){if(M.isProviderFor(G,ce))return b;if(!Q(_))for(var Pe=fa(_);;){var Ie=ha(Pe);if(!Ie)return;var yt=la(Ie);if(yt.isProviderFor(G,ce))return ma(Pe),yt}}}if(!Q(g)&&g.isProviderFor(G,ce))return g}function k(G,ce){var Pe=X.get(G),Ie;return Q(Pe)||(Ie=Pe.get(ce)),Q(Ie)&&(Ie=ae(G,ce),Q(Ie)||(Q(Pe)&&(Pe=new yn,X.set(G,Pe)),Pe.set(ce,Ie))),Ie}function N(G){if(Q(G))throw new TypeError;return b===G||M===G||!Q(_)&&_.has(G)}function q(G,ce,Pe){if(!N(Pe))throw new Error("Metadata provider not registered.");var Ie=k(G,ce);if(Ie!==Pe){if(!Q(Ie))return!1;var yt=X.get(G);Q(yt)&&(yt=new yn,X.set(G,yt)),yt.set(ce,Pe)}return!0}}function Bp(){var g;return!Q(jr)&&qe(T.Reflect)&&Object.isExtensible(T.Reflect)&&(g=T.Reflect[jr]),Q(g)&&(g=Jp()),!Q(jr)&&qe(T.Reflect)&&Object.isExtensible(T.Reflect)&&Object.defineProperty(T.Reflect,jr,{enumerable:!1,configurable:!1,writable:!1,value:g}),g}function Gp(g){var b=new Mo,M={isProviderFor:function(N,q){var G=b.get(N);return Q(G)?!1:G.has(q)},OrdinaryDefineOwnMetadata:Fe,OrdinaryHasOwnMetadata:X,OrdinaryGetOwnMetadata:Ge,OrdinaryOwnMetadataKeys:ae,OrdinaryDeleteMetadata:k};return Ts.registerProvider(M),M;function _(N,q,G){var ce=b.get(N),Pe=!1;if(Q(ce)){if(!G)return;ce=new yn,b.set(N,ce),Pe=!0}var Ie=ce.get(q);if(Q(Ie)){if(!G)return;if(Ie=new yn,ce.set(q,Ie),!g.setProvider(N,q,M))throw ce.delete(q),Pe&&b.delete(N),new Error("Wrong provider for target.")}return Ie}function X(N,q,G){var ce=_(q,G,!1);return Q(ce)?!1:aa(ce.has(N))}function Ge(N,q,G){var ce=_(q,G,!1);if(!Q(ce))return ce.get(N)}function Fe(N,q,G,ce){var Pe=_(G,ce,!0);Pe.set(N,q)}function ae(N,q){var G=[],ce=_(N,q,!1);if(Q(ce))return G;for(var Pe=ce.keys(),Ie=fa(Pe),yt=0;;){var da=ha(Ie);if(!da)return G.length=yt,G;var Hp=la(da);try{G[yt]=Hp}catch(zp){try{ma(Ie)}finally{throw zp}}yt++}}function k(N,q,G){var ce=_(q,G,!1);if(Q(ce)||!ce.delete(N))return!1;if(ce.size===0){var Pe=b.get(q);Q(Pe)||(Pe.delete(G),Pe.size===0&&b.delete(Pe))}return!0}}function Up(g){var b=g.defineMetadata,M=g.hasOwnMetadata,_=g.getOwnMetadata,X=g.getOwnMetadataKeys,Ge=g.deleteMetadata,Fe=new Mo,ae={isProviderFor:function(k,N){var q=Fe.get(k);return!Q(q)&&q.has(N)?!0:X(k,N).length?(Q(q)&&(q=new So,Fe.set(k,q)),q.add(N),!0):!1},OrdinaryDefineOwnMetadata:b,OrdinaryHasOwnMetadata:M,OrdinaryGetOwnMetadata:_,OrdinaryOwnMetadataKeys:X,OrdinaryDeleteMetadata:Ge};return ae}function gn(g,b,M){var _=Ts.getProvider(g,b);if(!Q(_))return _;if(M){if(Ts.setProvider(g,b,Qi))return Qi;throw new Error("Illegal state.")}}function Kp(){var g={},b=[],M=function(){function ae(k,N,q){this._index=0,this._keys=k,this._values=N,this._selector=q}return ae.prototype["@@iterator"]=function(){return this},ae.prototype[$e]=function(){return this},ae.prototype.next=function(){var k=this._index;if(k>=0&&k<this._keys.length){var N=this._selector(this._keys[k],this._values[k]);return k+1>=this._keys.length?(this._index=-1,this._keys=b,this._values=b):this._index++,{value:N,done:!1}}return{value:void 0,done:!0}},ae.prototype.throw=function(k){throw this._index>=0&&(this._index=-1,this._keys=b,this._values=b),k},ae.prototype.return=function(k){return this._index>=0&&(this._index=-1,this._keys=b,this._values=b),{value:k,done:!0}},ae}(),_=function(){function ae(){this._keys=[],this._values=[],this._cacheKey=g,this._cacheIndex=-2}return Object.defineProperty(ae.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),ae.prototype.has=function(k){return this._find(k,!1)>=0},ae.prototype.get=function(k){var N=this._find(k,!1);return N>=0?this._values[N]:void 0},ae.prototype.set=function(k,N){var q=this._find(k,!0);return this._values[q]=N,this},ae.prototype.delete=function(k){var N=this._find(k,!1);if(N>=0){for(var q=this._keys.length,G=N+1;G<q;G++)this._keys[G-1]=this._keys[G],this._values[G-1]=this._values[G];return this._keys.length--,this._values.length--,Po(k,this._cacheKey)&&(this._cacheKey=g,this._cacheIndex=-2),!0}return!1},ae.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=g,this._cacheIndex=-2},ae.prototype.keys=function(){return new M(this._keys,this._values,X)},ae.prototype.values=function(){return new M(this._keys,this._values,Ge)},ae.prototype.entries=function(){return new M(this._keys,this._values,Fe)},ae.prototype["@@iterator"]=function(){return this.entries()},ae.prototype[$e]=function(){return this.entries()},ae.prototype._find=function(k,N){if(!Po(this._cacheKey,k)){this._cacheIndex=-1;for(var q=0;q<this._keys.length;q++)if(Po(this._keys[q],k)){this._cacheIndex=q;break}}return this._cacheIndex<0&&N&&(this._cacheIndex=this._keys.length,this._keys.push(k),this._values.push(void 0)),this._cacheIndex},ae}();return _;function X(ae,k){return ae}function Ge(ae,k){return k}function Fe(ae,k){return[ae,k]}}function Wp(){var g=function(){function b(){this._map=new yn}return Object.defineProperty(b.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),b.prototype.has=function(M){return this._map.has(M)},b.prototype.add=function(M){return this._map.set(M,M),this},b.prototype.delete=function(M){return this._map.delete(M)},b.prototype.clear=function(){this._map.clear()},b.prototype.keys=function(){return this._map.keys()},b.prototype.values=function(){return this._map.keys()},b.prototype.entries=function(){return this._map.entries()},b.prototype["@@iterator"]=function(){return this.keys()},b.prototype[$e]=function(){return this.keys()},b}();return g}function Vp(){var g=16,b=Wt.create(),M=_();return function(){function k(){this._key=_()}return k.prototype.has=function(N){var q=X(N,!1);return q!==void 0?Wt.has(q,this._key):!1},k.prototype.get=function(N){var q=X(N,!1);return q!==void 0?Wt.get(q,this._key):void 0},k.prototype.set=function(N,q){var G=X(N,!0);return G[this._key]=q,this},k.prototype.delete=function(N){var q=X(N,!1);return q!==void 0?delete q[this._key]:!1},k.prototype.clear=function(){this._key=_()},k}();function _(){var k;do k="@@WeakMap@@"+ae();while(Wt.has(b,k));return b[k]=!0,k}function X(k,N){if(!A.call(k,M)){if(!N)return;Object.defineProperty(k,M,{value:Wt.create()})}return k[M]}function Ge(k,N){for(var q=0;q<N;++q)k[q]=Math.random()*255|0;return k}function Fe(k){if(typeof Uint8Array=="function"){var N=new Uint8Array(k);return typeof crypto<"u"?crypto.getRandomValues(N):typeof msCrypto<"u"?msCrypto.getRandomValues(N):Ge(N,k),N}return Ge(new Array(k),k)}function ae(){var k=Fe(g);k[6]=k[6]&79|64,k[8]=k[8]&191|128;for(var N="",q=0;q<g;++q){var G=k[q];(q===4||q===6||q===8)&&(N+="-"),G<16&&(N+="0"),N+=G.toString(16).toLowerCase()}return N}}function Ro(g){return g.__=void 0,delete g.__,g}})}(o||(o={})),Pi}Ku();const po="design:paramtypes",Ri="design:type",Ai="design:returntype",hn=new Map,Ci=class{static get(o,f,d){return Reflect.getMetadata(o,he(f),d)}static getOwn(o,f,d){return Reflect.getOwnMetadata(o,he(f),d)}static getType(o,f){return Reflect.getMetadata(Ri,o,f)}static getOwnType(o,f){return Reflect.getMetadata(Ri,o,f)}static getReturnType(o,f){return Reflect.getMetadata(Ai,o,f)}static getOwnReturnType(o,f){return Reflect.getOwnMetadata(Ai,o,f)}static has(o,f,d){try{return Reflect.hasMetadata(o,he(f),d)}catch{}return!1}static hasOwn(o,f,d){return Reflect.hasOwnMetadata(o,he(f),d)}static delete(o,f,d){return Reflect.deleteMetadata(o,he(f),d)}static setParamTypes(o,f,d){return this.set(po,d,o.prototype,f)}static set(o,f,d,T){const A=hn.has(o)?hn.get(o)||[]:[],H=he(d);A.indexOf(H)===-1&&(A.push(H),hn.set(o,A)),Reflect.defineMetadata(o,f,he(d),T)}static getParamTypes(o,f){return Reflect.getMetadata(po,o,f)||[]}static getOwnParamTypes(o,f){return Reflect.getOwnMetadata(po,o,f)||[]}};Ci.getTargetsFromPropertyKey=o=>hn.has(o)?hn.get(o)||[]:[];let ji=Ci;const _i="tsed:class:store",Di="tsed:method:store",xi="tsed:property:store",ki="tsed:param:store",fo=new Map;function ws(o,...f){if(Cr(f[0]))return fo.has(f[0])||fo.set(f[0],new Mt),fo.get(f[0]);{const d=ji;return d.hasOwn(o,...f)||d.set(o,new Mt,...f),d.getOwn(o,...f)}}function Wu(o){const[f,d,T]=o;switch(St(o)){case ve.PARAM_CTOR:case ve.PARAM_STC:case ve.PARAM:const A=ws(ki,f,d);return A.has(""+T)||A.set(""+T,new Mt),A.get(""+T);case ve.PROP:case ve.PROP_STC:return ws(xi,f,d);case ve.METHOD:case ve.METHOD_STC:return ws(Di,f,d);case ve.CLASS:return ws(_i,f)}}class Mt{constructor(){this._entries=new Map}static from(...f){return Wu(f)}static fromMethod(f,d){return Mt.from(f,d,Ut(f,d))}static mergeStoreFrom(f,d,...T){const A=Mt.from(f,...T);return Mt.from(d,...T)._entries.forEach((H,pe)=>{A.merge(pe,H)}),A}static mergeStoreMethodFrom(f,d,T){return this.mergeStoreFrom(f,d,T,Ut(f,T))}get(f,d){return this._entries.get(Kt(f))||d}has(f){return this._entries.has(Kt(f))}set(f,d){return this._entries.set(Kt(f),d),this}delete(f){return this._entries.delete(Kt(f))}merge(f,d,T=!1){let A=this.get(f);return A&&(d=Gt(d),A=Gt(A),d=T?ln(d,A):ln(A,d)),this.set(f,d),this}toJson(){return[...this._entries.entries()].reduce((f,[d,T])=>({...f,[d]:T}),{})}}function lo(o){return(...f)=>{const d=Mt.from(...f),T=o(d,f);return typeof T=="function"&&T(...f),f[2]}}function Vu(o,f){return lo(d=>{d.merge(o,f)})}function Hu(o,f){return lo(d=>{d.set(o,f)})}class ho extends Error{constructor(f,d){super(ho.buildMessage(f,d))}static buildMessage(f,d){const[T,A,H]=d,pe=St(d),$e=pe.split("/")[0],Be=$e==="parameter"?".["+H+"]":"",Tt=A?"."+A:$e==="parameter"?".constructor":"",pr=Kt(he(T))+Tt+Be;return`${f.name} cannot be used as ${pe} decorator on ${pr}`}}var mo=(o=>(o.PROD="production",o.DEV="development",o.TEST="test",o))(mo||{});const zu=mo,$i=Function;fr.Type=$i;function yo(o){return o&&Object.getPrototypeOf(o)}function Ii(o){return yo(o)}function go(o){const f=[];let d=he(o);for(;d&&Kt(d)!=="";)f.unshift(d),d=Ii(d);return f}function Ss(o){return typeof o=="object"}function Ni(o){return!!o&&typeof o.lift=="function"&&typeof o.subscribe=="function"}function Oo(o){return o===Promise||o instanceof Promise||!!o&&typeof o.subscribe!="function"&&typeof o.then=="function"}function Ms(o){return o!==null&&typeof o=="object"&&typeof o.pipe=="function"}function Li(o){return Ss(o)&&"data"in o&&"headers"in o&&"status"in o&&"statusText"in o}var qi=(o=>(o.PENDING="PENDING",o.CANCELED="CANCELED",o.RESOLVED="RESOLVED",o.REJECTED="REJECTED",o))(qi||{}),Fi=(o=>(o.STREAM="STREAM",o.BUFFER="BUFFER",o.DATA="DATA",o))(Fi||{});class Yu{constructor({hasNextFunction:f=!1}={}){h(this,P),h(this,C),h(this,x),h(this,Y),this.status="PENDING",v(this,x,!1),v(this,x,f),v(this,Y,new Promise((d,T)=>{v(this,P,d),v(this,C,T)}))}isDone(){return this.status!=="PENDING"}get next(){return v(this,x,!0),f=>{if(!this.isDone())return f?this.reject(f):this.resolve({type:"DATA"})}}call(f){if(this.isDone())return Promise.resolve(this);try{this.handle(f())}catch(d){this.reject(d)}return c(this,Y)}reject(f){this.isDone()||(this.done("REJECTED"),c(this,C).call(this,f))}resolve(f={}){this.isDone()||(this.done("RESOLVED"),c(this,P).call(this,{...f,state:"RESOLVED"}))}destroy(){}cancel(){if(!this.isDone())return this.done("CANCELED"),c(this,P).call(this,{state:"CANCELED"})}done(f){this.destroy(),this.status=f}handle(f,d={}){if(!this.isDone()){if(f){if(this.isCanceledResponse(f))return this.cancel();if(Ni(f)&&(f=f.toPromise()),Li(f))return this.handle(f.data,{...d,status:f.status,headers:f.headers});if(Ms(f))return this.resolve({...d,type:"STREAM",data:f});if(Ms(f)||Buffer.isBuffer(f))return this.resolve({...d,type:"BUFFER",data:f});if(Oo(f))return f.then(T=>this.handle(T,d)).catch(T=>T.response&&Li(T.response)?this.handle(T.response):this.reject(T))}if(!c(this,x))return this.resolve({...d,data:f,type:"DATA"})}}isCanceledResponse(f){return f==="CANCELED"}}P=new WeakMap,C=new WeakMap,x=new WeakMap,Y=new WeakMap;function Xu(o){try{o()}catch(f){return f}}async function Zu(o){try{await o()}catch(f){return f}}function Qu(o,f=[]){return Object.entries(o).reduce((d,[T,A])=>(vs(T)||f.includes(T)||A===void 0||(d[T]=A),d),{})}function Ji(o){return typeof o=="function"?o:o.constructor}function Bi(o){return Ji(o)}function mn(o){return he(o)===o?o.prototype:o}function Gi(o){const f=new Map;return o=he(o),go(o).forEach(d=>{Reflect.ownKeys(mn(d)).forEach(T=>{var A;Cr(T)||T==="constructor"||(A=Object.getOwnPropertyDescriptor(mn(d),T))!=null&&A.get||f.set(T,{target:d,propertyKey:T})})}),Array.from(f.values())}function ep(o,f){Gi(o).forEach(({target:d,propertyKey:T})=>{const A=mn(o);d!==he(o)&&(Object.defineProperty(A,T,{writable:!0,configurable:!0,value(...$e){return mn(d)[T].apply(this,$e)}}),Mt.mergeStoreMethodFrom(o,d,T));let H=Ut(o,T);const pe=f(A,T,H)||H;pe&&Object.defineProperty(A,T,pe)})}function tp(o,f){return[o,f,Ut(o,f)]}function bo(o){return Array.isArray(o)}function vo(o){return o===Array||bo(o)}function Ui(o){return o&&Bt(o)&&!o.prototype}function Ki(o){return o&&"isBuffer"in o&&typeof o.isBuffer=="function"?!0:Wi(o)}function Wi(o){return!!(o&&(o===Uint8Array||o instanceof Uint8Array))}function wo(o){return o===Object}function rp(o){return wo(he(o))&&o!==Object}function Vi(o){return!o||Ui(o)?!1:!(Cr(o)||bs(o)||wo(o)||xt(o)||Oo(o)||vo(o)||Ki(o))}function np(o){return Vi(o)?he(o):o}function Hi(o){return`${(Bi(o).toString().split(`
|
|
29
|
+
`).find(f=>f.indexOf("constructor(")>-1)||"constructor()").replace("{","").trim()}`}function sp(o){return Hi(o).split("constructor(")[1].split(")")[0].split(", ").filter(Boolean).map(f=>f.trim())}function op(){return`e${Math.random().toString(36).substring(7)}`}const ip=o=>{const[f,d,T,A="."]=o;return Ss(d)||ye(f)?{expression:f,scope:d,defaultValue:T,separator:A}:{expression:d,scope:f,defaultValue:T,separator:A}};function ap(...o){const f=ip(o);let d=f.scope;const{expression:T,defaultValue:A,separator:H}=f;if(!T)return d;if(!d)return A;const pe=T.split(H),$e=Be=>{if(d){if(d[Be]!==void 0||Ss(d)&&Be in d)return d[Be];if(Bt(d.get))return d.get(Be)}};for(;(d=$e(pe.shift()))&&pe.length;);return d===void 0?A:d}function zi(o){return o&&typeof o.toJSON=="function"}function cp(o,f){let d="0.0.0.0",T=f;return typeof f=="string"&&f.indexOf(":")>-1&&([d,T]=f.split(":"),T=+T),{protocol:o,address:d,port:T,toString(){return[`${this.protocol}://${this.address}`,typeof this.port=="number"&&this.port].filter(Boolean).join(":")}}}function Yi(o,f){for(const d of go(o)){const T=Object.getOwnPropertyDescriptor(d&&d.prototype||d,f);if(T)return T}}function up(o){return vo(o)||o===Map||o instanceof Map||o===Set||o instanceof Set||o===WeakMap||o instanceof WeakMap||o===WeakSet||o instanceof WeakSet}function pp(o){return o===""||De(o)}function fp(o,f){const d=he(o);if(d){const T=Yi(d,f);if(T)return T.enumerable}return Object.prototype.propertyIsEnumerable.call(o,f)}function lp(o,f,d=5){if(!o||!f)return!1;for(o=he(o),f=he(f);Kt(o)!=="";){if(!d)return!1;if(o===f)return!0;o=yo(o),d--}return!1}function hp(o){return!!(o&&o!=null&&o._isAMomentObject)}function Xi(o){return o&&o._bsontype}function mp(o){return!!(zi(o)&&o.$isMongooseModelPrototype||Xi(o))}function dp(o){return!(Buffer.isBuffer(o)||Ms(o)||ie(o)||Me(o)||ye(o)||De(o))}function yp(o){return ct(o)?"string":de(o)?"number":se(o)?"boolean":"any"}function gp(o,f,d,T="."){const A=f.split(T),H=(pe,$e)=>vs(pe)?!1:$e?(typeof o.set=="function"?o.set(pe,d):o[pe]=d,!1):(typeof o.set=="function"?(o.has(pe)||o.set(pe,{}),o=o.get(pe)):o=o[pe]=o[pe]||{},!0);for(;H(A.shift(),!A.length););}function Zi(o){return o?ye(o)?f=>f[o]:o:(f,d)=>String(d)}function Op(o,f){if(bo(o)){const T=Zi(f||"id");return o.reduce((A,H,pe)=>([].concat(T(H,pe)).forEach($e=>{var Be;const Tt=A.get($e);H=((Be=Tt==null?void 0:Tt.merge)==null?void 0:Be.call(Tt,H))||H,A.set($e,H)}),A),new Map)}const d=Zi(f);return Object.entries(o).reduce((T,[A,H])=>T.set(d(H,A),H),new Map)}function bp(o){return Array.from(new Set(o).values())}function vp(o,f="id"){const d=new Map;return o.forEach(T=>{d.set(T[f],T)}),Array.from(d.values())}function wp(...o){return(...f)=>{const d=typeof f[2]=="object";if(o.filter(T=>!!T).forEach(T=>{const A=T(...f);d&&typeof A=="object"&&(f[2]=A)}),d)return f[2]}}function Sp(o){return(f,d)=>o(f,d,Ut(f,d))}function Mp(...o){return(f,d)=>{o.filter(Boolean).forEach(T=>T(f,d,Ut(f,d)))}}r.AnyToPromise=Yu,r.AnyToPromiseResponseTypes=Fi,r.AnyToPromiseStatus=qi,r.CLASS_STORE=_i,r.DecoratorTypes=ve,r.Env=mo,r.EnvTypes=zu,r.METHOD_STORE=Di,r.Metadata=ji,r.PARAM_STORE=ki,r.PROPERTY_STORE=xi,r.Store=Mt,r.StoreFn=lo,r.StoreMerge=Vu,r.StoreSet=Hu,r.Type=$i,r.UnsupportedDecoratorType=ho,r.ancestorOf=yo,r.ancestorsOf=go,r.catchAsyncError=Zu,r.catchError=Xu,r.classOf=he,r.cleanObject=Qu,r.constructorOf=Bi,r.createInstance=bi,r.decorateMethodsOf=ep,r.decoratorArgs=tp,r.decoratorTypeOf=St,r.deepClone=Gt,r.deepMerge=ln,r.descriptorOf=Ut,r.getClass=ze,r.getClassOrSymbol=np,r.getConstructor=Ji,r.getConstructorArgNames=sp,r.getHostInfoFromPort=cp,r.getInheritedClass=Ii,r.getRandomId=op,r.getValue=ap,r.hasJsonMethod=zi,r.inheritedDescriptorOf=Yi,r.isArray=bo,r.isArrayOrArrayClass=vo,r.isArrowFn=Ui,r.isBoolean=ie,r.isBooleanOrBooleanClass=se,r.isBuffer=Ki,r.isClass=Vi,r.isClassObject=wo,r.isCollection=up,r.isDate=xt,r.isEmpty=pp,r.isEnumerable=fp,r.isFunction=Bt,r.isInheritedFrom=lp,r.isMethodDescriptor=Uu,r.isMomentObject=hp,r.isMongooseObject=mp,r.isNil=De,r.isNumber=Me,r.isNumberOrNumberClass=de,r.isObject=Ss,r.isObjectID=Xi,r.isObservable=Ni,r.isPlainObject=rp,r.isPrimitive=co,r.isPrimitiveClass=Lu,r.isPrimitiveOrPrimitiveClass=bs,r.isPromise=Oo,r.isProtectedKey=vs,r.isRegExp=Oi,r.isSerializable=dp,r.isStream=Ms,r.isString=ye,r.isStringOrStringClass=ct,r.isSymbol=Cr,r.isSymbolOrSymbolClass=qu,r.isUint8Array=Wi,r.mergeReducerBuilder=vi,r.methodsOf=Gi,r.nameOf=Kt,r.nameOfClass=Si,r.nameOfSymbol=Mi,r.objectKeys=uo,r.primitiveOf=yp,r.prototypeOf=mn,r.setValue=gp,r.toMap=Op,r.toStringConstructor=Hi,r.uniq=bp,r.uniqBy=vp,r.useDecorators=wp,r.useMethodDecorator=Sp,r.useMethodDecorators=Mp,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})})}(Rt,Rt.exports)),Rt.exports}var u=Sn();const At=new Map;class fe{constructor(e){this.isStore=!0;const{target:r,propertyKey:n,descriptor:a,index:c,decoratorType:h}=e;this.target=r,this.propertyKey=n,this.propertyName=String(n),this.descriptor=a,this.index=c,this.decoratorType=h,this.token=r,this.store=e.store,this.parent=this}get targetName(){return u.nameOf(this.token)}get isCollection(){return!!this.collectionType}get isArray(){return u.isArrayOrArrayClass(this.collectionType)}get discriminatorAncestor(){const e=u.ancestorsOf(this.target).find(r=>fe.from(r).schema.isDiscriminator);return e&&fe.from(e)}get isPrimitive(){return u.isPrimitiveOrPrimitiveClass(this._type)}get isDate(){return u.isDate(this.computedType)}get isObject(){return u.isObject(this.computedType)}get isClass(){return u.isClass(this.computedType)}get schema(){return this._schema}get nestedGenerics(){return this.schema.nestedGenerics}set nestedGenerics(e){this.schema.nestedGenerics=e}get type(){return this._type}set type(e){this._type=e,this.build()}get computedType(){return this.itemSchema.getComputedType()}get itemSchema(){return this.isCollection?this.schema.itemSchema():this.schema}get parentSchema(){return this.parent.schema}get isDiscriminatorChild(){var e;return this.schema.isDiscriminator&&((e=this.discriminatorAncestor)==null?void 0:e.schema.discriminator().base)!==this.target}static from(...e){if(e[0].isStore)return e[0];const r=e[0];e.length>1&&(e[0]=u.prototypeOf(e[0]));const n=u.Store.from(...e);if(!n.has("JsonEntityStore")){const a=u.decoratorTypeOf(e),c=At.get(a),h=new c({store:n,decoratorType:a,target:u.classOf(r),propertyKey:e[1],index:typeof e[2]=="number"?e[2]:void 0,descriptor:typeof e[2]=="object"?e[2]:void 0});h.build(),n.set("JsonEntityStore",h)}return n.get("JsonEntityStore")}static fromMethod(e,r){return this.from(e,r,u.descriptorOf(e,r))}static get(e,r,n){return fe.from(u.prototypeOf(e),r,n)}isGetterOnly(){return u.isObject(this.descriptor)&&!this.descriptor.value&&this.descriptor.get&&!this.descriptor.set}get(e,r){return this.store.get(e,r)}set(e,r){return this.store.set(e,r)}toString(){return[this.targetName,this.propertyName,this.index].filter(e=>e!==void 0).join(":")}buildType(e){u.isCollection(e)?this.collectionType=e:(this._type=e,this._type&&u.isPlainObject(this._type)&&(this._type=String))}set path(e){this.store.set("path",e)}get path(){return this.store.get("path")}getBestType(){return this.itemSchema.hasDiscriminator?this.itemSchema.discriminator().base:u.isClassObject(this.type)?this.itemSchema.getTarget():u.isArrowFn(this.type)?this.type():this.type}}function mt(t){return e=>{At.set(t,e)}}var ot={exports:{}},js=ot.exports,Fr;function Mn(){return Fr||(Fr=1,function(t,e){(function(r,n){n(e)})(js,function(r){var n=De=>{throw TypeError(De)},a=(De,ie,se)=>ie.has(De)||n("Cannot "+se),c=(De,ie,se)=>(a(De,ie,"read from private field"),se?se.call(De):ie.get(De)),h=(De,ie,se)=>ie.has(De)?n("Cannot add the same private member more than once"):ie instanceof WeakSet?ie.add(De):ie.set(De,se),v;function P(De,ie){return!De||!ie.ref||De&&ie.ref===De}class C{constructor(){h(this,v,new Map)}has(ie){var se;return!!((se=c(this,v).get(ie))!=null&&se.length)}on(ie,se,Me){let de=se;Me||(Me=de,de=void 0);const ye=c(this,v).get(ie)||[];return ye.push({cb:Me,ref:de}),c(this,v).set(ie,ye),this}once(ie,se,Me){Me||(Me=se);const de=(...ye)=>{Me(...ye),this.off(ie,de)};return this.on(ie,se,de),this}off(ie,se){const Me=(de,ye)=>{ye.length?c(this,v).set(de,ye):c(this,v).delete(de)};if(typeof ie=="string"&&se){let de=c(this,v).get(ie);de&&Me(ie,de.filter(ye=>ye.cb!==se))}else{const de=ie;c(this,v).forEach((ye,ct)=>{Me(ct,ye.filter(bs=>bs.ref!==de))})}return this}emit(ie,se,Me){Array.isArray(se)&&(Me=se,se=void 0),Me||(Me=[]);const de=c(this,v).get(ie);if(de!=null&&de.length)for(const ye of de)P(se,ye)&&ye.cb.apply(null,Me)}async asyncEmit(ie,se,Me){Array.isArray(se)&&(Me=se,se=void 0);const de=c(this,v).get(ie);if(de!=null&&de.length){const ye=de.filter(ct=>P(se,ct)).map(ct=>ct.cb.apply(null,Me));await Promise.all(ye)}}alter(ie,se,Me=[],de=null){const ye=c(this,v).get(ie);if(ye!=null&&ye.length)for(const{cb:ct}of ye)se=ct.call(de,se,...Me);return se}async asyncAlter(ie,se,Me=[],de=null){const ye=c(this,v).get(ie);if(ye!=null&&ye.length)for(const ct of ye)se=await ct.cb.call(de,se,...Me);return se}destroy(){c(this,v).clear()}}v=new WeakMap;const x=new C,Y=x.on.bind(x),ve=x.once.bind(x),ze=x.off.bind(x),he=x.emit.bind(x),St=x.asyncEmit.bind(x),xt=x.alter.bind(x),Bt=x.asyncAlter.bind(x);r.$alter=xt,r.$asyncAlter=Bt,r.$asyncEmit=St,r.$emit=he,r.$off=ze,r.$on=Y,r.$once=ve,r.Hooks=C,r.hooks=x,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})})}(ot,ot.exports)),ot.exports}var vt=Mn();const Ht=new Map;function Jr(t){return u.isPromise(t)||t===Function?Object:u.isClass(t)||u.isSymbol(t)||u.isPrimitiveOrPrimitiveClass(t)||u.isClassObject(t)||u.isDate(t)||u.isCollection(t)?u.classOf(t):u.isArrowFn(t)?t():t}const Br=["string","number","integer","boolean","object","array","null","any"];function lt(t){return t===null?"null":u.isPrimitiveOrPrimitiveClass(t)?Br.indexOf(t)>-1?t:typeof t=="string"?t==="file"?"file":"generic":u.primitiveOf(t):t===Array?"array":u.isArray(t)?t.map(lt):t===Set?"array":u.isDate(t)||u.isBuffer(t)?"string":"object"}const lr=t=>u.isObject(t)&&t!==null?Object.entries(t).reduce((e,[r,n])=>isNaN(+r)?e.concat(n):e,[]):t;function Gr(t){const e=t.reduce((a,c)=>a.concat(lr(c)),[]),r=a=>a===null?"null":typeof a,n=e.reduce((a,c)=>a.add(r(c)),new Set);return{values:u.uniq(e),types:n}}function hr(t){return String(t).replace(/^(\/)(.*)(\/)$/,"$2")}class Ct{constructor({base:e,propertyName:r,types:n,values:a}={}){this.values=new Map,this.types=new Map,Object.assign(this,u.cleanObject({base:e,propertyName:r,types:n?new Map(n):void 0,values:a?new Map(a):void 0}))}add(e,r){return r.forEach(n=>{this.values.set(n,e)}),this.types.set(e,r),this}getType(e){return this.values.get(e)||this.base}getValues(e){return this.types.get(e)}getDefaultValue(e){const r=this.types.get(e);return r?r[0]:void 0}children(){return[...new Set([...this.types.keys()])]}}function $t(t){return t instanceof Je?t:Object.entries(t).reduce((e,[r,n])=>(e[hr(r)]=Ze(n),e),{})}function Ze(t){return u.isArray(t)?t.map(Ze):t.isStore||t.$isJsonDocument||t.isLazyRef?t:u.classOf(t)!==Object&&u.isClass(t)?fe.from(t).schema:u.isObject(t)?Je.from(t):u.isPrimitiveClass(t)?Je.from({type:t}):t}const Tn=class Vt extends Map{constructor(e={}){super(),Ne(this,ut),Ne(this,Re),Ne(this,gt),Ne(this,Oe),Ne(this,Ve),Ne(this,rt),Ne(this,Ee),Ne(this,pt),Ne(this,nt),Ne(this,st),this.$kind="schema",this.$isJsonDocument=!0,this.$hooks=new vt.Hooks,this.$required=new Set,this.$allow=[],this.$forwardGroups=!1,this.$ignore=!1,this.isDiscriminatorKey=!1,this.isDiscriminator=!1,ee(this,ut,!1),ee(this,Re,null),ee(this,Oe,[]),ee(this,Ve,new Map),ee(this,pt,!1),ee(this,nt,!1),ee(this,st,!1),e&&this.assign(e)}get alias(){return U(this,Ve)}get nestedGenerics(){return U(this,Oe)}set nestedGenerics(e){ee(this,Oe,e)}get genericLabels(){return U(this,gt)}set genericLabels(e){ee(this,gt,e)}get isClass(){return u.isClass(this.class)&&![Map,Array,Set,Object,Date,Boolean,Number,String].includes(U(this,Ee))}get isCollection(){return U(this,nt)}get isGeneric(){return U(this,pt)}get discriminatorAncestor(){const e=u.ancestorsOf(U(this,Ee)).find(r=>fe.from(r).schema.isDiscriminator);return e&&fe.from(e).schema}get hasGenerics(){return!!(this.nestedGenerics&&this.nestedGenerics.length)}get genericType(){return this.get("$ref")}get class(){return this.getComputedType()}get canRef(){return U(this,st)}get isNullable(){return U(this,ut)}get isReadOnly(){return this.get("readOnly")}get isWriteOnly(){return this.get("writeOnly")}get hasDiscriminator(){return!!U(this,Re)}static from(e={}){return new Vt(e)}nullable(e){ee(this,ut,e)}itemSchema(e={}){return ee(this,rt,U(this,rt)||Ze(e)),U(this,rt).assign(e),U(this,rt)}getAliasOf(e){return U(this,Ve).get(e)}addAlias(e,r){return U(this,Ve).set(e,r),U(this,Ve).set(r,e),this}removeAlias(e){const r=U(this,Ve).get(e);return r&&U(this,Ve).delete(r),U(this,Ve).delete(e),this}$id(e){return super.set("$id",e),this}$ref(e){return super.set("$ref",e),this}$schema(e){return super.set("$schema",e),this}label(e){return ee(this,st,!0),super.set("name",e),this}name(e){return super.set("name",e),this}ignore(e){return typeof e!="boolean"&&this.$hooks.on("ignore",e),this.$ignore=e,this}default(e){return super.set("default",e),this}const(e){return super.set("const",e),this}description(e){return super.set("description",e),this}discriminator(){return this.isDiscriminator=!0,ee(this,Re,U(this,Re)||new Ct({base:U(this,Ee)}))}discriminatorKey(e){return this.discriminator().propertyName=e,this.isDiscriminator=!0,this}discriminatorValue(...e){const r=this.discriminatorAncestor.discriminator();r.add(U(this,Ee),e),this.isDiscriminator=!0;const n=this.get("properties"),a=n[r.propertyName]||new Vt({type:"string"});return e.length===1?(a.const(e[0]),a.examples([e[0]])):(a.enum(...e),a.examples(e)),n[r.propertyName]=a,this.set("properties",n),this}additionalItems(e){return super.set("additionalItems",Ze(e)),this}contains(e){return super.set("contains",Ze(e)),this}examples(e){return super.set("examples",e),this}example(...e){return this.examples(e)}items(e){return super.set("items",ee(this,rt,Ze(e))),this}maxItems(e){return super.set("maxItems",e),this}minItems(e){return super.set("minItems",e),this}uniqueItems(e){return super.set("uniqueItems",e),this}maxProperties(e){return super.set("maxProperties",e),this}minProperties(e){return super.set("minProperties",e),this}allow(...e){return[].concat(this.getJsonType()).includes("string")&&!this.has("minLength")&&this.minLength(1),e.forEach(r=>{switch(r){case"":this.set("minLength",void 0);break;case null:this.any(...["null"].concat(this.getJsonType(),this.$allow.map(n=>typeof n)));break}}),this.$allow.push(...e),this}required(e=!0){if(u.isArray(e))this.$required.clear(),e.forEach(r=>this.$required.add(r));else{const r=this.clone();return r.$selfRequired=e,[].concat(r.getJsonType()).includes("string")&&r.minLength(1),r}return this}addRequired(e){return this.$required.add(e),this}removeRequired(e){return this.$required.delete(e),this}isRequired(e){return this.$required.has(e)}properties(e){return super.set("properties",$t(e)),this}addProperty(e,r){const n=this.get("properties")||{};return n[e]=r,super.set("properties",$t(n)),this}patternProperties(e){return super.set("patternProperties",$t(e)),this}additionalProperties(e){return super.set("additionalProperties",Ze(e)),this}unknown(e=!0){return this.additionalProperties(e)}dependencies(e){return super.set("dependencies",$t(e)),this}propertyNames(e){return super.set("propertyNames",Ze(e)),this}enum(e,...r){if(Ht.has(e))return this.enum(Ht.get(e));if(e instanceof Vt)e.getName()?super.set("enum",e):super.set("enum",e.get("enum")).any(...e.get("enum").map(n=>typeof n));else{const{values:n,types:a}=Gr([e,r].flat());super.set("enum",n).any(...a)}return this}definitions(e){return super.set("definitions",$t(e)),this}allOf(e){return this.setManyOf("allOf",e),this}anyOf(e){return this.setManyOf("anyOf",e),this}oneOf(e){return this.setManyOf("oneOf",e),this}not(e){return super.set("not",Ze(e)),this}multipleOf(e){return super.set("multipleOf",e),this}maximum(e){return super.set("maximum",e),this}exclusiveMaximum(e){return super.set("exclusiveMaximum",e),this}minimum(e){return super.set("minimum",e),this}exclusiveMinimum(e){return super.set("exclusiveMinimum",e),this}maxLength(e){return super.set("maxLength",e),this}minLength(e){return super.set("minLength",e),this}pattern(e){return super.set("pattern",hr(e)),this}format(e){return super.set("format",e),this}type(e){switch(e){case"map":case Map:super.set("type",lt(e)),ee(this,Ee,e),ee(this,nt,!0),this.has("additionalProperties")||super.set("additionalProperties",this.itemSchema({}));break;case"array":case Array:super.set("type",lt(e)),ee(this,Ee,e),ee(this,nt,!0),this.has("items")||super.set("items",this.itemSchema({}));break;case"set":case Set:super.set("type",lt(e)),ee(this,Ee,e),ee(this,nt,!0),this.uniqueItems(!0),this.has("items")||super.set("items",this.itemSchema({}));break;case"integer":this.integer();break;case"number":case"string":case"boolean":case"object":case Object:case Date:case Boolean:case Number:case String:super.set("type",lt(e)),ee(this,Ee,e),this.has("properties")||super.set("properties",{});break;default:if(u.isClass(e)||u.isFunction(e))super.set("type",void 0),ee(this,Ee,e),this.has("properties")||super.set("properties",{});else{const r=lt(e);r==="generic"?(ee(this,pt,!0),super.set("$ref",e)):super.set("type",r)}}return this}any(...e){var r;return e=e.length?e:["integer","number","string","boolean","array","object","null"],e=u.uniq(e).map(n=>u.isClass(n)?n:{type:lt(n)}),e.length>1?this.anyOf(e):this.type(((r=e[0])==null?void 0:r.type)||e[0]),this}integer(){return super.set("type","integer"),super.set("multipleOf",1),this}title(e){return super.set("title",e),this}readOnly(e){return super.set("readOnly",e),this}writeOnly(e){return super.set("writeOnly",e),this}customKey(e,r){return super.set(`#${e}`,r),this}toObject(e){return this.toJSON(e)}toJSON(e){return W("schema",[this],e)}assign(e={}){return(e instanceof Vt?[...e.entries()]:Object.entries(e)).forEach(([r,n])=>{this.set(r,n)}),e instanceof Vt&&(this.$selfRequired=e.$selfRequired,this.$allow.push(...e.$allow),e.$required.forEach(r=>{this.$required.add(r)}),ee(this,Re,U(this,Re)?new Ct(U(this,Re)):null),this.isDiscriminator=e.isDiscriminator,this.isDiscriminatorKey=e.isDiscriminatorKey,ee(this,st,U(e,st)),ee(this,Ve,new Map(U(this,Ve).entries())),U(e,gt)&&ee(this,gt,[...U(e,gt)]),ee(this,Oe,U(e,Oe).map(r=>[...r])),ee(this,Ee,U(e,Ee)),ee(this,pt,U(e,pt)),ee(this,nt,U(e,nt)),ee(this,st,U(e,st)),ee(this,ut,U(e,ut)),super.set("type",e.get("type"))),this}set(e,r){return e in this?u.isFunction(this[e])&&this[e](r):super.set(e,r),this}getComputedType(){return Jr(U(this,Ee))}getComputedItemType(){return U(this,rt)?U(this,rt).getComputedType():this.getComputedType()}getJsonType(){return this.get("anyOf")?this.get("anyOf").map(e=>e.getJsonType()):this.get("type")||lt(this.getComputedType())}getTarget(){return U(this,Ee)}getName(){return this.get("name")||(u.isClass(U(this,Ee))?u.nameOf(u.classOf(this.getComputedType())):"")}clone(){return new Vt(this)}setManyOf(e,r){let n=r.filter(c=>(c==null?void 0:c.type)==="null"?(this.nullable(!0),!1):!0).map(Ze);if(n.length===1&&!(r[0]instanceof Vt)&&!this.isNullable){if(!n[0].hasDiscriminator)return this.type(r[0]);const c=n[0].discriminator().children();if(!c.length)return this.type(r[0]);n=c.map(Ze)}super.set(e,n);const a=n[0];if(a.isDiscriminator){const c=a.discriminatorAncestor.discriminator(),{propertyName:h}=c;super.set("discriminator",{propertyName:h,mapping:n.reduce((v,P)=>{var C;return(C=c.types.get(P.getTarget()))==null||C.forEach(x=>{v[x]=P}),v},{})}),this.isDiscriminator=!0,ee(this,Re,c)}}};ut=new WeakMap,Re=new WeakMap,gt=new WeakMap,Oe=new WeakMap,Ve=new WeakMap,rt=new WeakMap,Ee=new WeakMap,pt=new WeakMap,nt=new WeakMap,st=new WeakMap;let Je=Tn;var Pn=(t,e,r,n)=>{for(var a=e,c=t.length-1,h;c>=0;c--)(h=t[c])&&(a=h(a)||a);return a};s.JsonClassStore=class extends fe{constructor(){super(...arguments),this.children=new Map}get path(){return this.store.get("path","/")}set path(t){this.store.set("path",t)}build(){this._type||this.buildType(this.target),this._type=this._type||Object,this._schema=Je.from({type:this.type})}},s.JsonClassStore=Pn([mt(u.DecoratorTypes.CLASS)],s.JsonClassStore);const mr=t=>Number(t)&&200<=Number(t)&&Number(t)<300,zt=t=>Number(t)&&300<=Number(t)&&Number(t)<400;class He extends Map{constructor(e={}){super(),this.$kind="map",this.$isJsonDocument=!0,this.assign(e)}assign(e={}){return Object.entries(e).forEach(([r,n])=>{u.isFunction(this[r])?this[r](n):this.set(r,n)}),this}toJSON(e){return W("map",[this],e)}}function Ur(t){return Object.keys(t).reduce((e,r)=>{const n=t[r];let a=typeof n,c={example:n};return a==="object"&&(c=n,c.example=c.value===void 0?c.example:c.value,delete c.value,a=typeof c.example),c.type=c.type||a,e[r]=u.cleanObject(c),e},{})}function Qe(t,e=He){return Object.entries(t).reduce((r,[n,a])=>(r.set(n,new e(a)),r),new He)}class Yt extends He{constructor(){super(...arguments),this.$kind="operationMedia",this.groups=[]}schema(e){return this.set("schema",e),this}examples(e){return this.set("examples",e),this}}class En extends He{constructor(e={}){super(e),this.$kind="operationResponse",this.content(e.content||{})}description(e){return this.set("description",e),this}headers(e){return this.set("headers",Ur(e)),this}content(e){return this.set("content",Qe(e,Yt)),this}getContent(){return this.get("content")}getMedia(e,r=!0){var n;return r&&this.addMedia(e),(n=this.getContent())==null?void 0:n.get(e)}addMedia(e){const r=this.get("content");return r.has(e)||r.set(e,new Yt),this}isBinary(){return this.getContent().has("application/octet-stream")}}class Rn extends He{constructor(e,r){super(),this.method=e,this.path=r}summary(e){return super.set("summary",e),this}description(e){return super.set("description",e),this}}class dr extends He{constructor(e={}){super({parameters:[],responses:new He,...e}),Ne(this,ht),Ne(this,Ot),this.$kind="operation",this.operationPaths=new Map,ee(this,Ot,!1)}get response(){return this.getResponses().get(this.getStatus().toString())}get status(){return U(this,ht)}tags(e){return super.set("tags",e),this}addTags(e){return e=u.uniqBy([...this.get("tags")||[],...e],"name"),this.tags(e)}summary(e){return super.set("summary",e),this}operationId(e){return this.set("operationId",e),this}responses(e){return this.set("responses",e),this}defaultStatus(e){return ee(this,ht,e),this}getStatus(){return U(this,ht)||200}setRedirection(e=302){return ee(this,Ot,!0),ee(this,ht,e),this}isRedirection(e){return U(this,Ot)&&e?zt(e):U(this,Ot)}addResponse(e,r){if((mr(e)||zt(e))&&!U(this,ht)){const c=this.getResponseOf(200);this.getResponses().set(e.toString(),c).delete("200"),this.defaultStatus(Number(e))}const n=e==="default"?this.getStatus().toString():e.toString(),a=this.getResponses().get(n);return a?(r.forEach((c,h)=>{["content"].includes(h)||a.set(h,u.deepMerge(a.get(h),c))}),a.status=Number(n)):(r.status=Number(n),this.getResponses().set(n,r)),this}getResponses(){return this.get("responses")}getResponseOf(e){return(e==="default"?this.response:this.getResponses().get(String(e)))||new En}ensureResponseOf(e){return this.addResponse(e,this.getResponseOf(e)),this.getResponseOf(e)}getHeadersOf(e){return this.getResponseOf(e).get("headers")||{}}getContentTypeOf(e){return[...this.getResponseOf(e).get("content").keys()].slice(-1)[0]}security(e){return this.set("security",e),this}addSecurityScopes(e,r){const n=this.get("security")||{};return n[e]=u.uniq([...n[e]||[],...r]),this.security(n)}description(e){return super.set("description",e),this}deprecated(e){return super.set("deprecated",e),this}parameters(e){return super.set("parameters",e),this}addParameter(e,r){e===-1&&(e=this.get("parameters").length),this.get("parameters")[e]=r}consumes(e){return super.set("consumes",e),this}produces(e){return super.set("produces",e),this}addProduce(e){const r=u.uniq([].concat(this.get("produces"),e)).filter(Boolean);this.set("produces",r)}addOperationPath(e,r){const n=new Rn(e,r);return this.operationPaths.set(String(e)+String(r),n),n}getAllowedOperationPath(e){return e?[...this.operationPaths.values()].filter(({method:r})=>r&&e.includes(r.toUpperCase())):[...this.operationPaths.values()]}}ht=new WeakMap,Ot=new WeakMap;var Kr=(t,e,r,n)=>{for(var a=e,c=t.length-1,h;c>=0;c--)(h=t[c])&&(a=h(a)||a);return a};s.JsonMethodStore=class extends fe{constructor(t){super({store:u.Store.fromMethod(t.target,t.propertyKey),descriptor:u.descriptorOf(t.target,t.propertyKey),...t}),this.parent=fe.from(this.target),this.middlewares=[],this.beforeMiddlewares=[],this.afterMiddlewares=[],this.operation=new dr,this.children=new Map;const{beforeMiddlewares:e=[],middlewares:r=[],afterMiddlewares:n=[]}=t;this.after(n),this.before(e),this.use(r)}get params(){return this.parameters}get view(){return this.store.get("view")}set view(t){this.store.set("view",t)}get acceptMimes(){return this.store.get("acceptMimes",[])}set acceptMimes(t){this.store.set("acceptMimes",t)}get parameters(){return[...this.children.values()]}get operationPaths(){return this.operation.operationPaths}static get(t,e,r){return r=r||u.descriptorOf(u.prototypeOf(t),e),fe.from(u.prototypeOf(t),e,r)}getResponseOptions(t,{contentType:e="application/json",includes:r}={}){var n;const a=this.operation.getResponseOf(t).getMedia(e,!1);if(a&&a.has("schema")){const c=a.get("schema");let h=a.groups;return r&&(n=a.allowedGroups)!=null&&n.size&&(h=[...h||[],...r.filter(v=>a.allowedGroups.has(v))]),{type:c.getComputedItemType(),groups:h}}return{type:this.type}}before(t){return this.beforeMiddlewares=this.beforeMiddlewares.concat(t).filter(u.isFunction),this}after(t){return this.afterMiddlewares=this.afterMiddlewares.concat(t).filter(u.isFunction),this}use(t){return this.middlewares=this.middlewares.concat(t).filter(u.isFunction),this}get(t){const e=u.Store.from(this.target).get(t);return u.deepMerge(e,this.store.get(t))}getParamTypes(){return[...this.children.values()].reduce((t,e)=>({...t,[e.paramType]:!0}),{})}build(){if(!this._type){let t=u.Metadata.getReturnType(this.target,this.propertyKey);t=u.isPromise(t)?void 0:t,this.buildType(t)}this._type=this._type||Object,this.parent.children.set(this.propertyName,this),u.isCollection(this._type)&&(this.collectionType=this._type,delete this._type),this._schema=Je.from({type:this.collectionType||this.type}),this.collectionType&&this._schema.itemSchema(this.type),this.parent.schema.addProperty(this.propertyName,this.schema)}},s.JsonMethodStore=Kr([mt(u.DecoratorTypes.METHOD)],s.JsonMethodStore);const _s=s.JsonMethodStore;var et=(t=>(t.BODY="body",t.PATH="path",t.QUERY="query",t.HEADER="header",t.COOKIES="cookie",t.FILES="files",t))(et||{});function Xt(t){return String(t).toLowerCase().replace("raw_","").replace("cookies","cookie")}function yr(t){return Object.values(et).includes(Xt(t))}class It extends He{constructor(){super(...arguments),this.$kind="operationInParameter",this.nestedGenerics=[],this.$schema=new Je}getName(){const e=this.get("name");return this.get("in")==="files"?e.split(".")[0]:e}name(e){return this.set("name",e),this}examples(e){return super.set("examples",e),this}description(e){return this.set("description",e),this}in(e,r=""){return this.set("in",Xt(e)),this.expression=r,this}required(e){return this.set("required",e),this}schema(e){return e?(this.$schema=e,this):this.$schema}itemSchema(e){return this.$schema.isCollection?(e&&this.$schema.itemSchema(e),this.$schema.itemSchema()):(e&&this.schema(e),this.schema())}toJSON(e){return W("operationInParameter",[this],e)}}var gr=(t,e,r,n)=>{for(var a=e,c=t.length-1,h;c>=0;c--)(h=t[c])&&(a=h(a)||a);return a};s.JsonParameterStore=class extends fe{constructor(t){super(t),this.parameter=new It,this.parent=fe.fromMethod(this.target,this.propertyKey),this.pipes=t.pipes||[],this.paramType=t.paramType||this.paramType,this.expression=t.expression||this.expression,this.dataPath=t.dataPath||this.dataPath}get nestedGenerics(){return this.parameter.nestedGenerics}set nestedGenerics(t){this.parameter.nestedGenerics=t}get required(){return!!this.parameter.get("required")}set required(t){this.parameter.required(t)}get allowedRequiredValues(){return this.schema.$allow}get schema(){return this.parameter.$schema}static getParams(t,e){const r=[],n=u.ancestorsOf(t).reverse().find(a=>u.isMethodDescriptor(a,e)&&fe.fromMethod(a,e).children.size);return n?(fe.fromMethod(n,e).children.forEach((a,c)=>{r[+c]=a}),r):[]}static get(t,e,r){return fe.from(u.prototypeOf(t),e,r)}isRequired(t){return this.required&&[void 0,null,""].includes(t)&&!this.allowedRequiredValues.includes(t)}build(){if(!this._type){const t=u.Metadata.getParamTypes(u.prototypeOf(this.target),this.propertyKey)[this.index];this.buildType(t)}this._type=this._type||Object,this.parent.children.set(this.index,this),this.parent.operation.addParameter(this.index,this.parameter),this.collectionType&&this.parameter.schema().type(this.collectionType),u.isClass(this._type)?this.parameter.itemSchema(fe.from(this._type).schema):this.parameter.itemSchema().type(this._type)}},s.JsonParameterStore=gr([mt(u.DecoratorTypes.PARAM)],s.JsonParameterStore);const An=s.JsonParameterStore;var Wr=(t,e,r,n)=>{for(var a=e,c=t.length-1,h;c>=0;c--)(h=t[c])&&(a=h(a)||a);return a};s.JsonPropertyStore=class extends fe{constructor(){super(...arguments),this.parent=fe.from(this.target)}get required(){return this.parent.schema.isRequired(this.propertyKey)}set required(t){t?this.parent.schema.addRequired(this.propertyKey):this.parent.schema.removeRequired(this.propertyKey)}get allowedRequiredValues(){return this.schema.$allow}discriminatorKey(){return this.parent.schema.discriminatorKey(String(this.propertyKey)),this.itemSchema.isDiscriminatorKey=!0,this}isDiscriminatorKey(){return this.itemSchema.isDiscriminatorKey}isRequired(t){return this.required&&[void 0,null,""].includes(t)&&!this.allowedRequiredValues.includes(t)}build(){this._type||this.buildType(u.Metadata.getType(u.prototypeOf(this.target),this.propertyKey)),this._type=this._type||Object;let t=this.parent.schema.get("properties")[this.propertyName];t||(this.parent.children.set(this.propertyName,this),t=Je.from({type:this.collectionType||this.type}),this.collectionType&&t.itemSchema(this.type)),this.parent.schema.addProperty(this.propertyName,t),this._schema=t}static get(t,e){return fe.from(u.prototypeOf(t),e)}},s.JsonPropertyStore=Wr([mt(u.DecoratorTypes.PROP)],s.JsonPropertyStore);const Or=s.JsonPropertyStore;At.set(u.DecoratorTypes.CLASS,s.JsonClassStore),At.set(u.DecoratorTypes.PROP,s.JsonPropertyStore),At.set(u.DecoratorTypes.PARAM,s.JsonParameterStore),At.set(u.DecoratorTypes.METHOD,s.JsonMethodStore);function Ue(...t){return fe.from(...t)}class Vr extends Map{constructor(){super(...arguments),this.$kind="operationPaths",this.$isJsonDocument=!0,this.getKey=(e,r)=>`${e}-${r}`}setOperationPath(e){const r=this.getKey(e.method,e.path);this.set(r,e)}}function Zt(t){const e=t.isStore?t:Ue(t);return e.$inherited||(e.$inherited=u.ancestorsOf(e.target).reverse().reduce((r,n)=>r.set(n,Ue(n)),new Map)),e.$inherited}function br(t){const e=t.isStore?t:Ue(t);if(!e.$operations){const r=new Vr;e.$operations=new Map,Zt(e).forEach(n=>{n.children.forEach(a=>{a instanceof s.JsonMethodStore&&!e.$operations.has(a.propertyKey)&&e.$operations.set(a.propertyKey,a)})}),e.$operations.forEach(n=>{n.operation.operationPaths.forEach(a=>{r.setOperationPath(a)})}),r.clear()}return e.$operations}function Hr(t){return!t.store.get("hidden")}const Ds=[ue.PUBLISH,ue.SUBSCRIBE];function xs(t){return(e,{operationPath:r,operationStore:n})=>{var a,c,h,v;const P=t.ctrlRootPath||"/",C=r.method.toLowerCase(),x=$.camelCase(`${C.toLowerCase()} ${n.parent.schema.getName()}`),Y=W("message",[n,r],t);return{...e,[P]:{...e[P],[C]:{...(a=e[P])==null?void 0:a[C],operationId:x,message:{oneOf:[...((v=(h=(c=e[P])==null?void 0:c[C])==null?void 0:h.message)==null?void 0:v.oneOf)||[],Y]}}}}}}function Cn(t){return e=>{const r=e.operation.getAllowedOperationPath(Ds);return r.length===0?[]:r.map(n=>({operationPath:n,operationStore:e}))}}function zr(t,{channels:e,rootPath:r,...n}){const a=Ue(t).path,c=ft(r+a);return n={...n,ctrlRootPath:c},[...br(t).values()].filter(Hr).flatMap(Cn()).reduce(xs(n),e)}z("channels",zr);var te=(t=>(t.JSON="jsonschema",t.SWAGGER="swagger2",t.OPENAPI="openapi3",t.ASYNCAPI="asyncapi2",t))(te||{});function jn(t,e){var r;const n={channels:W("channels",[t],e)};return n.tags=u.uniqBy(e.tags,"name"),(r=e.components)!=null&&r.schemas&&Object.keys(e.components.schemas).length&&(n.components={...e.components,schemas:e.components.schemas}),n}z("generate",jn,te.ASYNCAPI);function Qt(t,e){return e.length?e.length===1?e[0]:{[t]:e}:null}function _n(t,e,{tags:r=[],defaultTags:n=[],...a}={}){const{path:c,method:h}=e,v=String(c);let P=u.getValue(a.components,"messages."+c,u.cleanObject({description:t.operation.get("description"),summary:t.operation.get("summary")}));if(h.toUpperCase()===ue.PUBLISH){const C=W("payload",[t,e],a);C&&(P.payload=C);const x=t.operation.getAllowedOperationPath([ue.SUBSCRIBE]).map(ve=>W("message",[t,ve],a)).filter(Boolean),Y=Qt("oneOf",x);Y&&(P["x-response"]=Y)}else{const C=W("response",[t,e],a);C&&(P["x-response"]=C)}return a.components.messages=a.components.messages||{},a.components.messages[v]=P,{$ref:`#/components/messages/${v}`}}z("message",_n,te.ASYNCAPI);function vr(t,e){return t.reduce((r,n,a)=>r.set(n,e[a]),new Map)}function jt(t){if(t.genericLabels&&t.genericTypes){const{genericLabels:e,genericTypes:r,...n}=t;return{...n,generics:vr(e,r)}}return t}function Nt(t){const[e,...r]=t.nestedGenerics;return{genericTypes:e,nestedGenerics:r}}function Dn(t,e={}){return{...e,groups:t.groups,groupsName:t.groupsName}}function xn(t,e){return t.get("parameters").filter(r=>yr(r.get("in")))}function wr(t,e,r){const n=xn(t.operation),a=$.pascalCase([e.path,e.method,"Payload"].join(" "));u.setValue(r,`components.schemas.${a}`,{});const c=n.map(h=>{const v=Dn(h,r),P=W("item",[h.$schema],{...v,...Nt(h)});switch(h.get("in")){case et.BODY:return P;case et.QUERY:case et.PATH:case et.HEADER:return{type:"object",properties:{[h.get("name")]:P}}}return P},{}).filter(Boolean);return Qt("allOf",c)}z("payload",wr,te.ASYNCAPI);function kn(t,e,r){const n=t.operation.getResponses(),a=[],c=[],h=[],v=[];[...n.entries()].forEach(([ve,ze])=>{const he=W("map",[ze],r);if(a.push(+ve),c.push(he.description),+ve!=204){const{content:St}=he,xt=St[Object.keys(St)[0]];h.push(xt)}});const P=$.pascalCase([e.path,e.method,"Response"].join(" ")),C={type:"object",properties:{status:{type:"number",enum:a},statusText:{type:"string",enum:c}},required:["status"]},x=Qt("oneOf",h);x&&u.setValue(C,"properties.data",x);const Y=Qt("oneOf",v);return v.length&&u.setValue(C,"properties.error",Y),u.setValue(r,`components.schemas.${P}`,C),{$ref:`#/components/schemas/${P}`}}z("response",kn,te.ASYNCAPI);class Sr{constructor(e){this.getType=e,this.isLazyRef=!0}get target(){return this.getType()}get schema(){return Ue(this.getType()).schema}get name(){return u.nameOf(this.getType())}}function ks(t){const{host:e=`#/${[te.OPENAPI,te.ASYNCAPI].includes(t.specType)?"components/schemas":"definitions"}`}=t;return e}function Lt(t,e){return e.groups&&e.groups.length?$.pascalCase(`${t} ${e.groupsName||e.groups.join(" ")}`):t}function er(t,e,r){const n={$ref:`${ks(r)}/${t}`},a=e.isReadOnly,c=e.isWriteOnly;return u.cleanObject({readOnly:a?!0:void 0,writeOnly:c?!0:void 0,...a||c?{anyOf:[n]}:n})}function tr(t,e,r){const n=Lt(t.getName(),r);return e&&u.setValue(r,`components.schemas.${n}`,e),er(n,t,r)}function $n(t,e={}){if(typeof t!="object"||t===null)return t;if(t instanceof Sr)return W("lazyRef",[t],e);if(t instanceof Je&&t.get("enum")instanceof Je){const r=t.get("enum");return tr(r,r.toJSON(e),e)}if(t.$kind&&t.$isJsonDocument){const r=wn([t.$kind,"map"],e),n=W(r,[t],jt(e));return t.canRef?tr(t,n,e):n}return W("object",[t],e)}z("any",$n);function In(t,e){const r=fe.from(t.class),n=Lt(r.schema.getName()||t.getName(),e);if(t.hasGenerics){const{type:a,properties:c,additionalProperties:h,items:v,...P}=t.toJSON(e),C={...W("any",[r.schema],{...e,...Nt(t),root:!1}),...P};if(C.title){const x=Lt(C.title,e);return u.setValue(e.components,`schemas.${x}`,C),delete C.title,er(x,t,e)}return C}return u.getValue(e,`components.schemas.${n}`)||(u.setValue(e,`components.schemas.${n}`,{}),e.components.schemas[n]=W("any",[r.schema],jt({...e,root:!1}))),er(n,t,e)}z("class",In);function rr(t,e,r){var n;if((n=t.discriminator)!=null&&n.mapping){const a=Object.entries(t.discriminator.mapping),c={};for(const[h,v]of a)c[h]=u.isString(v)?v:tr(v,null,r).$ref;t.discriminator.mapping=c}return t}function $s(t){var e;return(e=t.discriminator)!=null&&e.mapping&&delete t.discriminator.mapping,t}z("discriminatorMapping",$s);function Mr(t,e,r){var n;return r.inlineEnums&&(n=t.enum)!=null&&n.$isJsonDocument&&(t.enum=t.enum.toJSON().enum),t.enum&&(t.type=t.type==="object"||t.type===void 0?"string":t.type),t}z("enums",Mr);function Nn(t,e){const{generics:r}=e;if(r&&t.$ref&&r.has(t.$ref)){let n=r.get(t.$ref);if(u.isPrimitiveClass(n))return{type:lt(n)};if(n===Date)return{type:"string",format:"date-time"};if(n.toJSON)return n.toJSON({...e,generics:void 0});if(n===Object)return{type:"object"};if(u.isClass(n)){const a={class:n};if(e.nestedGenerics.length===0)return W("class",[a],{...e,generics:void 0});const c=fe.from(a.class);return W("schema",[c.schema],{...e,...Nt(e),root:!1})}}return t}z("generics",Nn);function Ln(t,e){if(e!=null&&e.type&&e!=null&&e.$ref){const{$ref:r,...n}=e;e={allOf:[{$ref:r},n]}}return e}function qn(t,{target:e,...r}){const n=Array.from(Zt(e).entries()).filter(([a])=>u.classOf(a)!==u.classOf(e));if(n.length){const a=n.reduce((c,[,h])=>u.deepMerge(c,W("schema",[h.schema],r),{alter:Ln}),{});return u.deepMerge(a,t,{alter:Ln})}return t}z("inheritedClass",qn);function Fn(t,e){return t&&t.isClass?W("class",[t],e):W("any",[t],e)}z("item",Fn);function Jn(t,e){var r;const n=t.name;if((r=e.$refs)!=null&&r.find(c=>c===t.target))return er(n,t.schema,e);e.$refs=[...e.$refs||[],t.target];const a=t.getType()&&W("schema",[t.schema],jt(e));return tr(t.schema,a,e)}z("lazyRef",Jn);function Yr(t,{ignore:e=[],...r}={}){return r=jt(r),Array.from(t.entries()).reduce((n,[a,c])=>(e.includes(a)||(n[a]=W("item",[c],r)),n),{})}z("map",Yr);const Tr=["oneOf","allOf","anyOf"],Bn=["minLength","maxLength","pattern","format"],Gn=[],Un=["minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf"],Xr=["maxItems","minItems","uniqueItems","items","contains","maxContains","minContains"],Kn=["maxItems","minItems","uniqueItems","items","contains","maxContains","minContains","patternProperties","dependencies"],Zr=["const","enum"];function Wn(t,e){return e!=null&&e.isNullable&&(t.discriminator||(t.$ref?t=u.cleanObject({...t,$ref:void 0,anyOf:[{type:"null"},{$ref:t.$ref}]}):Tr.some(r=>{if(t[r])if(t[r]=t[r].filter(n=>n.type!=="null"),t[r].length===1){const n=t[r];t=u.cleanObject({...t,...n[0],[r]:void 0,type:["null",Number.isInteger(t.multipleOf)?"integer":n[0].type]})}else t[r]=[{type:"null"}].concat(t[r]).map(n=>(Number.isInteger(n.multipleOf)&&(n.type="integer"),n)),delete t.type}))),t}z("nullable",Wn);function Qr(t,e){var r,n;if(u.isBoolean(t.$ignore)&&t.$ignore)return!0;let a=(r=t==null?void 0:t.$hooks)==null?void 0:r.alter("ignore",!1,[e]);return a||(e.groups!==!1?(n=t==null?void 0:t.$hooks)==null?void 0:n.alter("groups",!1,[e.groups]):a)}function Vn(t,e){const{specType:r,operationIdFormatter:n,root:a,components:c,genericTypes:h,nestedGenerics:v,useAlias:P,genericLabels:C,...x}=e;return Object.entries(t).reduce((Y,[ve,ze])=>{if(e.withIgnoredProps!==!1&&!Qr(ze,x)){const he={...e,groups:t!=null&&t.$forwardGroups||ze!=null&&ze.$forwardGroups?e.groups:void 0};Y[ve]=W("item",[ze],he),Y[ve]=W("nullable",[Y[ve],ze],he)}return Y},u.isArray(t)?[]:{})}z("object",Vn);function Pr(t,e,r){return t.map(n=>W("item",[n],{...e,genericLabels:r.genericLabels}))}z("anyOf",Pr),z("allOf",Pr),z("oneOf",Pr);function i(t,e,r){return t.isClass?W("class",[t],e):W("any",[t],{...e,genericLabels:r.genericLabels})}z("properties",i),z("items",i),z("additionalProperties",i),z("propertyNames",i),z("contains",i),z("dependencies",i),z("patternProperties",i),z("additionalItems",i),z("not",i),z("definitions",i);function p(t,e,r){var n;return r.groups!==!1?(n=e==null?void 0:e.$hooks)==null?void 0:n.alter("requiredGroups",t,[r.groups]):t}function l(t,e,r={}){const{useAlias:n}=r,a=Object.keys(t.properties||{});return(c,h)=>{const v=n&&e.alias.get(h)||h;return a.includes(v)?c.concat(v):c}}function w(t,e,r){let n=t.required||[];return n=[...n,...e.$required],e.get("properties")&&(n=Object.entries(e.get("properties")).reduce((a,[c,h])=>h&&h.$selfRequired!==void 0?h.$selfRequired?a.concat(c):a.filter(v=>v===c):a,n)),p(u.uniq(n),e,r)}function R(t,e,r){if(r.groups&&r.groups.includes("partial"))return t.discriminator?{...t,required:[t.discriminator.propertyName]}:t;let n=w(t,e,r);return n=u.uniq(n).reduce(l(t,e,r),[]),t.discriminator&&n.push(t.discriminator.propertyName),n.length&&(t.required=n),t}z("required",R);function K(t,e){return Object.entries(t).reduce((r,[n,a])=>(n=e.get(n)||n,r[n]=a,r),{})}function ne(t){return Tr.find(e=>t[e])}const Ae={string:{properties:Bn,is:u.isString},number:{properties:Un,is:u.isNumber},boolean:{properties:Gn,is:u.isBoolean},array:{properties:Xr,is:()=>!1},object:{properties:Kn,is:()=>!1}};function xe(t,e,r){const n=Ae[t];n==null||n.properties.concat(Zr).forEach(a=>{e[a]!==void 0&&(Zr.includes(a)?r[a]=e[a].filter(n.is):(r[a]=e[a],delete e[a]))})}function it(t,e,r){const n=ne(t);return n&&(t[n].forEach(a=>{xe(a.type,t,a)}),Tr.forEach(a=>{t[a]&&r.groups!==!1&&e.$hooks.has(a)&&(t={...t,[a]:e.$hooks.alter(a,t[a],[r.groups])})}),delete t.const,delete t.enum,t.items||t.properties||delete t.type),t}const _t=["name","$required","$hooks","_nestedGenerics",te.OPENAPI,te.SWAGGER,te.JSON],wt=[];function nr(t,e){return typeof e=="object"&&["items","properties","additionalProperties"].includes(t)&&Object.keys(e).length===0}function sr(t,e,r){return typeof e=="object"&&r&&["properties","additionalProperties"].includes(t)}function en(t,{specType:e=te.JSON,customKeys:r=!1}){return _t.includes(t)||t.startsWith("#")&&(r===!1||e!==te.JSON)||e!==te.JSON&&wt.includes(t)}function tn(t,e,r){return t==="examples"&&u.isObject(e)&&[te.OPENAPI,te.ASYNCAPI].includes(r.specType)}function qt(t){let e=!1;t||(e=!0,t={components:{schemas:{}},inlineEnums:!0});const{useAlias:r=!0,components:n={schemas:{}}}=t;return t={...t,useAlias:r,components:n},{addDef:e,options:t}}function Er(t,e){const{useAlias:r}=e;return[...t.keys()].filter(n=>!en(n,e)).reduce((n,a)=>{let c=t.get(a);if(a=a.replace(/^#/,""),a==="type")return n[a]=t.getJsonType(),n;if(tn(a,c,e)&&(a="example",c=Object.values(c)[0]),c&&typeof c=="object"&&Nr(a)){if(c=W(a,[c],e,t),nr(a,c))return n;sr(a,c,r)&&(c=K(c,t.alias))}return n[a]=c,n},{})}function Hn(t,e){let r=Er(t,e);return t.isClass&&(r=W("inheritedClass",[r],{...e,root:!1,target:t.getComputedType()})),r=W("generics",[r],{...e,root:!1}),t.has(e.specType)&&(r={...r,...t.get(e.specType).toJSON(e)}),u.isFunction(r.default)&&(r.default=r.default()),r=W("required",[r,t],e),r=W("nullable",[r,t],e),r=it(r,t,e),r=W("enums",[r,t],e),r=W("discriminatorMapping",[r,t],e),r}function zn(t,e){const{options:r,addDef:n}=qt(e),a=Hn(t,r);return n&&Object.keys(u.getValue(r,"components.schemas",{})).length&&(a.definitions=r.components.schemas),a}z("schema",zn),z("discriminatorMapping",rr,te.OPENAPI),z("discriminatorMapping",rr,te.SWAGGER),z("discriminatorMapping",rr,te.ASYNCAPI);function Rr(t,e,r){return t=Mr(t,e,r),t.const&&(t.enum=[t.const],delete t.const),t}z("enums",Rr,te.OPENAPI),z("enums",Rr,te.SWAGGER),z("enums",Rr,te.ASYNCAPI);function Yn(t,e){e={...e,specType:te.OPENAPI};const r={paths:W("paths",[t],e)};return r.tags=u.uniqBy(e.tags,"name"),Object.keys(u.getValue(e,"components.schemas",{})).length&&(r.components={schemas:e.components.schemas}),r}z("generate",Yn,te.OPENAPI),z("generate",Yn,te.SWAGGER);function rn(t,e){var r,n,a,c;return e!=null&&e.isNullable?t.$ref?u.cleanObject({...t,...t.$ref&&{anyOf:[{$ref:t.$ref}],type:void 0},nullable:!0,$ref:void 0}):u.cleanObject({...t,...((r=t.anyOf)==null?void 0:r.length)===1?{...t.anyOf[0],anyOf:void 0,type:Number.isInteger(t.multipleOf)?"integer":(n=t.anyOf[0])==null?void 0:n.type}:{type:((a=t.anyOf)==null?void 0:a.length)>1?void 0:t.type,anyOf:(c=t.anyOf)==null?void 0:c.map(h=>(Number.isInteger(h.multipleOf)&&(h.type="integer"),h))},nullable:!0}):t}z("nullable",rn,te.OPENAPI),z("nullable",rn,te.SWAGGER);function Xn(t,{jsonSchema:e}){const r={type:"string",format:"binary",oneOf:void 0};return e.type==="array"?(e.items=u.cleanObject({...e.items,...r}),t.schema=e,t):(t.schema=u.cleanObject({...e,...r}),t)}z("operationInFiles",Xn);function Is(t,e={}){return{...e,groups:t.groups,groupsName:t.groupsName}}function Zn(t,e){var r;const n=Is(t,e),a={...((r=n.components)==null?void 0:r.schemas)||{}},{type:c,schema:h,...v}=W("map",[t],n),P=W("item",[t.$schema],{...n,...Nt(t)});v.required=v.required||t.get("in")===et.PATH;const C={...n,jsonSchema:P,jsonParameter:t,oldSchemas:a},x=$.camelCase(`operationIn ${t.get("in")}`);return Nr(x)?W(x,[v],C):(v.schema=P,v)}z("operationInParameter",Zn);function Qn(t,e){return t.flatMap(r=>W("operationInParameter",[r],e)).filter(Boolean)}z("operationInParameters",Qn);function Ns(t,e){if(!e)return;let r=!1;const n=Object.entries(e).reduce((a,[c,{value:h,description:v,...P}])=>h[t]===void 0?a:(r=!0,{...a,[c]:{...P,value:h[t],description:v}}),{});return r?n:void 0}function Ls(t,{jsonParameter:e,...r}){var n,a,c;const h=Lt(e.$schema.getName(),r),v=(a=(n=r.components)==null?void 0:n.schemas)==null?void 0:a[h];return v&&!((c=r.oldSchemas)!=null&&c[h])&&delete r.components.schemas[e.$schema.getName()],Object.entries((v==null?void 0:v.properties)||{}).reduce((P,[C,{description:x,...Y}])=>[...P,u.cleanObject({...t,name:C,required:((v==null?void 0:v.required)||[]).includes(C),description:x,schema:Y,style:Y.$ref?"deepObject":void 0,examples:Ns(C,t.examples)})],[])}function es(t,{jsonSchema:e,jsonParameters:r,...n}){if(e.$ref){if(!t.name)return Ls(t,n);t.style="deepObject"}return t.schema=e,t}z("operationInQuery",es);const or=le.codes.reduce((t,e)=>{const r=String(le(e));return{...t,[String(e)]:{label:r,code:$.constantCase(r)}}},{});or[200].label="Success",or[200].code="SUCCESS";function ts(t){var e;return(e=or[t])==null?void 0:e.code}function Ft(t){var e;return(e=or[t])==null?void 0:e.label}function rs(t,e){return t.get("parameters").filter(r=>yr(r.get("in"))).reduce((r,n)=>{const[a,c]=r;return[et.BODY,et.FILES].includes(n.get("in"))?[a,[...c,n]]:[[...a,n],c]},[[],[]])}function nn(t,{tags:e=[],defaultTags:r=[],...n}={}){var a,c;const{consumes:h,produces:v,...P}=W("map",[t],{...n,ignore:["parameters"]});P.security&&(P.security=[].concat(P.security)),t.get("responses").size===0&&(P.responses={200:{description:Ft(200)}});const C={...n,consumes:(a=t.get("consumes"))!=null&&a.length?t.get("consumes"):["application/json"]},[x,Y]=rs(t);P.parameters=W("operationInParameters",[x],n),Y.length&&(P.requestBody=W("operationRequestBody",[Y],C));const ve=(c=P.tags)!=null&&c.length?P.tags:r;return ve.length&&(P.tags=ve.map(({name:ze})=>ze)),e.push(...ve),P}z("operation",nn);function sn(t,e){let r=[...t.groups||[]];return W("map",[t],{...e,groups:r,groupsName:t.groupsName})}z("operationMedia",sn);class on extends He{constructor(e={}){super(e),this.$kind="operationRequestBody",this.content(e.content||{})}description(e){return this.set("description",e),this}content(e){return this.set("content",Qe(e)),this}addContent(e,r,n){const a=this.get("content"),c=new He;return c.set("schema",r),n&&c.set("examples",n),a.set(e,c),this}required(e){return this.set("required",e),this}}function ns(t,e){let r=new Je;const n={},a=[];let c=0;const h=t.some(v=>v.get("in")==="files");return t.forEach(v=>{const P=v.getName();[...v.entries()].filter(([x])=>!["in","name"].includes(x)).forEach(([x,Y])=>{n[x]===void 0&&(n[x]=Y)});const C=W("operationInParameter",[v],e);if(P){const x={...C.schema||{type:C.type}};h&&C.description&&(x.description=C.description),r.addProperty(P,x),v.get("required")&&r.addRequired(P),c++}else a.push(C)}),!c&&a.length===1?a[0]:(r.type("object"),n.description&&h&&delete n.description,{schema:r.toJSON(e),required:!1,...n})}function an(t,{consumes:e,...r}){const{schema:n,description:a,examples:c,in:h,...v}=ns(t,r),P=new on(v);return a&&P.description(a),e.forEach(C=>{P.addContent(C,n,c)}),W("map",[P],r)}z("operationRequestBody",an);function Z(t,e={}){const r=W("map",[t],e);return t.status===204&&delete r.content,r.headers&&Object.entries(r.headers).forEach(([n,{type:a,...c}])=>{r.headers[n]={...c,schema:{type:a}}}),r}z("operationResponse",Z);function Dt(t,e){return t.map(r=>e.parameters.find(n=>n.in===r.in&&n.name===r.name)||r).concat(...e.parameters.filter(r=>r.in!=="path"))}function qs(t){const[e,r]=t.split("="),n=(r||e).split("."),a=n.splice(0,1)[0];return{prefix:r&&e?`${e}=`:"",name:a,postfix:n.length?`.${n.join(".")}`:""}}function je(t){let e=0;return t.split("").filter(r=>{r==="("&&e++;const n=e===0;return r===")"&&e--,n}).join("").split("/").filter(r=>!!r)}function ss(t,e=""){e instanceof RegExp&&(e=e.toString().replace(/^\//g,"").replace(/\/$/g,"").replace(/\\/g,""));const r=[],n=[];let a=!1,c="";return je(`${t}${e}`).map(h=>{const v=h.replace(":","").replace("?","");if(h.includes(":")){const P=h.includes("?");P&&!a&&(a=!0,n.push({path:c,parameters:[].concat(r)}));const{prefix:C,name:x,postfix:Y}=qs(v);c+=`/${C}{${x}}${Y}`,r.push({in:"path",name:x,type:"string",required:!0}),P&&a&&n.push({path:c,parameters:[].concat(r)})}else c+=`/${h}`}),n.length?n:[{path:c,parameters:[].concat(r)}]}const Fs="%c.%m";function cn(t=""){const e=new Map,r=(n,a)=>{const c=(t||Fs).replace(/%c/,n).replace(/%m/,a);return t===""?$.camelCase(c):c};return(n,a,c="")=>{const h=r(n,a),v=n+a;if(!e.has(v))return e.set(v,0),h;const P=c.match(/{(\w+)}/gi);if(P){const x=n+a+P[0];if(!e.has(x))return e.set(x,0),$.camelCase(`${h} By ${P}`)}const C=e.get(v)+1;return e.set(v,C),`${h}_${C}`}}function os(t,{store:e,operationIdFormatter:r}){return r(e.parent.schema.get("name")||e.parent.targetName,e.propertyName,t)}const at=[ue.ALL,ue.GET,ue.POST,ue.PUT,ue.PATCH,ue.HEAD,ue.OPTIONS,ue.DELETE,ue.TRACE];function is(t,{path:e,method:r,operation:n}){return{...t,[e]:{...t[e],[r.toLowerCase()]:n}}}function Ar(t){return({operationPath:e,operation:r,operationStore:n})=>{const{path:a,method:c}=e;return ss(t.ctrlRootPath,a).map(({path:h,parameters:v})=>(h=h||"/",v=Dt(v.map(({type:P,...C})=>({...C,schema:{type:P}})),r),{operation:{...r,...e.toJSON(t),parameters:v,operationId:r.operationId||os(h,{...t,store:n})},method:c,path:h}))}}function as(t){return e=>{const r=e.operation.getAllowedOperationPath(at);if(r.length===0)return[];const n=W("operation",[e.operation],t);return r.map(a=>({operationPath:a,operation:n,operationStore:e}))}}function cs(t,{paths:e,rootPath:r,...n}){const a=Ue(t).path,c=ft(r+a);return n={...n,ctrlRootPath:c},[...br(t).values()].filter(Hr).filter(h=>h.operation.getAllowedOperationPath(at).length>0).flatMap(as(n)).flatMap(Ar(n)).reduce(is,e)}z("paths",cs);function J(t){return(...e)=>{const r=t(Ue(...e),e);typeof r=="function"&&r(...e)}}function us(...t){return J(e=>{e.store.set("childrenControllers",t),t.forEach(r=>{u.Store.from(r).set("parentController",e.token)})})}function ps(t,...e){return J(r=>{t=t||$.snakeCase(r.targetName),r.discriminatorAncestor&&r.schema.discriminatorValue(t,...e)})}function ir(t,e){if(!t)throw new Error("A type is required on `@CollectionOf(type)` decorator. Please give a type or wrap it inside an arrow function if you have a circular reference.");const r={};let n=!1;const a=(...c)=>{const h=fe.from(...c);e&&(h.collectionType=e,h.schema.type(e)),h.type=t,h.itemSchema.type(t),h.schema.assign(r),h.isArray&&n&&(h.schema.set("contains",h.schema.get("items")),h.schema.delete("items"))};return a.MinItems=c=>(r.minItems=c,a),a.MaxItems=c=>(r.maxItems=c,a),a.MinProperties=c=>(r.minProperties=c,a),a.MaxProperties=c=>(r.maxProperties=c,a),a.Contains=()=>(n=!0,a),a.UniqueItems=(c=!0)=>(r.uniqueItems=c,a),a}function fs(t){return ir(t,Array)}function ls(t){return ir(t,Map)}function un(t){return ir(t).Contains()}function Te(t,e){const r={};return(...n)=>{const a=u.useDecorators(e(...n));return a.Error=c=>(r.message=c,u.useDecorators(a,r.message&&J(h=>{const v=h.parentSchema.get("#errorMessage")||{};t==="required"?h.parentSchema.customKey("errorMessage",u.deepMerge(v,{[t]:{[h.propertyName]:c}})):h.itemSchema.customKey("errorMessage",u.deepMerge(v,{[t]:c}))}))),a}}const Js=Te("maxItems",t=>{if(t<0)throw new Error("The value of maxItems MUST be a non-negative integer.");return J(e=>{e.schema.maxItems(t)})}),Bs=Te("maxProperties",t=>{if(t<0)throw new Error("The value of maxProperties MUST be a non-negative integer.");return J(e=>{e.isCollection?e.schema.maxProperties(t):e.itemSchema.maxProperties(t)})}),Gs=Te("minItems",t=>{if(t<0)throw new Error("The value of minItems MUST be a non-negative integer.");return J(e=>{e.schema.minItems(t)})}),ar=Te("minProperties",t=>{if(t<0)throw new Error("The value of minProperties MUST be a non-negative integer.");return J(e=>{e.isCollection?e.schema.minProperties(t):e.itemSchema.minProperties(t)})}),Us=Te("uniqueItems",(t=!0)=>J(e=>{e.schema.uniqueItems(t)}));function Ks(t){return J((e,r)=>{e.itemSchema.additionalProperties(t)})}function Ws(...t){return J(e=>{e.itemSchema.allOf(t)})}function Jt(t){return J(e=>{t&&((u.isClass(t)||u.isArrowFn(t))&&(e.type=t),e.itemSchema.type(t))})}function y(...t){const e=t.find(r=>u.isClass(r));return u.useDecorators(e&&Jt(e),J((r,n)=>{r.decoratorType===u.DecoratorTypes.PARAM&&(r.required=!0),r.decoratorType===u.DecoratorTypes.PROP&&r.parentSchema.addRequired(r.propertyName),r.schema.allow(...t)}))}function O(...t){return J(e=>{e.itemSchema.any(...t)})}function S(...t){return J(e=>{e.itemSchema.anyOf(t)})}function j(t){return J(e=>{e.itemSchema.const(t)})}function V(t,e){return J(r=>{r.itemSchema.customKey(t,e)})}function ke(t){return J(e=>{Object.entries(t).forEach(([r,n])=>{e.itemSchema.customKey(r,n)})})}function _e(t){return J(e=>{e.itemSchema.default(t)})}function re(t){return J(e=>{const r=e.parentSchema.get("#errorMessage")||{};e.parentSchema.customKey("errorMessage",{...r,...t})})}function D(t){return u.useDecorators(re({_:t}))}function I(t){return J((e,r)=>{var n;switch(u.decoratorTypeOf(r)){case u.DecoratorTypes.PROP:case u.DecoratorTypes.CLASS:e.schema.description(t);break;case u.DecoratorTypes.PARAM:e.parameter.description(t);break;case u.DecoratorTypes.METHOD:(n=e.operation)==null||n.description(t);break}})}function L(){return u.useDecorators(Jt(),J(t=>{t.discriminatorKey()}))}function F(t,...e){return J(r=>{r.itemSchema.enum(t,...e)})}const oe=Te("enum",F);function we(...t){return J(e=>{e.schema.examples(t)})}function Ce(t){return J(e=>{e.parameter.examples(t)})}const Xe=Te("maximum",(t,e=!1)=>J(r=>{e?r.itemSchema.exclusiveMaximum(t):r.itemSchema.maximum(t)})),hs=Xe,Vs=Te("exclusiveMaximum",(t,e=!0)=>Xe(t,e)),pn=Te("minimum",(t,e=!1)=>J(r=>{e?r.itemSchema.exclusiveMinimum(t):r.itemSchema.minimum(t)})),sc=pn,oc=Te("exclusiveMinimum",(t,e=!0)=>pn(t,e));var tt=(t=>(t.DATE_TIME="date-time",t.DATE="date",t.TIME="time",t.EMAIL="email",t.HOSTNAME="hostname",t.IPV4="ipv4",t.IPV6="ipv6",t.URI="uri",t.URL="url",t.URI_REF="uri-reference",t.URI_TEMPLATE="uri-template",t.JSON_POINTER="json-pointer",t.RELATIVE_JSON_POINTER="relative-json-pointer",t.UUID="uuid",t.REGEX="regex",t))(tt||{});const cr=Te("format",t=>J(e=>{e.itemSchema.format(t)})),ic=Te("format",()=>cr(tt.EMAIL)),ac=Te("format",()=>cr(tt.DATE_TIME)),cc=Te("format",()=>cr(tt.DATE)),uc=Te("format",()=>cr(tt.TIME)),pc=Te("format",()=>cr(tt.URI)),fc=Te("format",()=>cr(tt.URL));function lc(t=!0){return J(e=>{e.schema.$forwardGroups=t})}function Uo(t,e){e=[].concat(e),t=[].concat(t);let r=new Set,n=new Set,a=new Set,c=0,h=v=>{a.add(v.output)};for(let v=0;v<e.length;v++){let P=ge(String(e[v]),{onResult:h},!0),C=P.state.negated||P.state.negatedExtglob;C&&c++;for(let x of t){let Y=P(x,!0);(C?!Y.isMatch:Y.isMatch)&&(C?r.add(Y.output):(r.delete(Y.output),n.add(Y.output)))}}return!!(c===e.length?[...a]:[...n]).filter(v=>!r.has(v)).length}function Hs(t,e=[]){const r=t.filter(a=>a.startsWith("!")).map(a=>a.replace("!","")),n=t.filter(a=>!a.startsWith("!"));return r.length&&e.length&&Uo(r,e)?!0:n.length?!Uo(t.filter(a=>!a.startsWith("!")),e):!1}function hc(t,e){const r=Object.entries(t[0]);e.children.forEach(n=>{const a=r.filter(([,c])=>c.includes(n.propertyName)).map(([c])=>c);zs(...a)(n.target,n.propertyKey)})}function zs(...t){return J(e=>{switch(e.decoratorType){case u.DecoratorTypes.CLASS:hc(t,e);break;case u.DecoratorTypes.PROP:V("x-groups",t)(e.target,e.propertyKey),e.schema.$hooks.on("groups",(n,a)=>!n&&Hs(t,a)?!0:n);break;case u.DecoratorTypes.PARAM:let r="";t.length==2&&u.isArray(t[1])&&(r=t[0],t=t[1]),e.parameter.groups=t,e.parameter.groupsName=r;break}})}function mc(){return u.StoreSet("hidden",!0)}function dc(t=!0){return J(e=>{e.schema.ignore(t)})}function yc(){return J(t=>{t.itemSchema.type("integer")})}function gc(t,e=!1){return J(r=>{e?r.schema.label(t):r.itemSchema.label(t)})}const Oc=Te("maxLength",t=>{if(t<0)throw new Error("The value of maxLength MUST be a non-negative integer.");return J(e=>{e.itemSchema.maxLength(t)})}),bc=Te("minLength",t=>{if(t<0)throw new Error("The value of minLength MUST be a non-negative integer.");return J(e=>{e.itemSchema.minLength(t)})}),vc=Te("multipleOf",t=>{if(t<=0)throw new Error("The value of multipleOf MUST be a number, strictly greater than 0.");return J(e=>{e.itemSchema.multipleOf(t)})});function Ko(t){return J((e,r)=>{switch(u.decoratorTypeOf(r)){case u.DecoratorTypes.CLASS:e.schema.name(t);break;case u.DecoratorTypes.PARAM:e.parameter.name(t);break;default:e.parent.schema.addAlias(r[1],t)}})}function wc(t,...e){return e=[t,...e],u.useDecorators(e.length===1&&Jt(e[0]),O(null,...e))}function Sc(...t){return J(e=>{e.itemSchema.oneOf(t)})}function Wo(){return J(t=>{switch(t.decoratorType){case u.DecoratorTypes.PARAM:t.required=!1;break;case u.DecoratorTypes.PROP:t.parentSchema.removeRequired(t.propertyName);break}})}const Mc=Te("pattern",t=>J(e=>{e.itemSchema.pattern(t)}));function Tc(t=!0){return J(e=>{e.itemSchema.readOnly(t)})}function Vo(t){return J(e=>{e.schema.assign(t)})}function Pc(t,e){return J(r=>{r.schema.set(t,e)})}function Ec(t,...e){return Vo({properties:{...e.reduce((r,n)=>({...r,[n]:t}),{})}})}const Rc=Te("required",(t=!0,...e)=>t?y(...e):Wo());function Ac(...t){return J(e=>{e.parent.schema.$hooks.on("requiredGroups",(r,n)=>Hs(t,n)?r.filter(a=>a!==e.propertyKey):r)})}function Cc(t){return J(e=>{e.schema.title(t)})}function jc(t){return J(()=>u.useDecorators(re({type:t})))}function _c(t=!0){return J(e=>{e.itemSchema.writeOnly(t)})}function Le(t=Object){if(u.isClass(t)){const{schema:e}=Ue(t);return e.properties=function(r){return Object.entries(r).forEach(([n,a])=>{Ue(t.prototype,n).schema.assign(a)}),this},e}return Je.from({type:t})}function ms(){return Le(String)}function Dc(t){return u.isObject(t)&&!("toJSON"in t)}function xc(...t){const e=[t.map(n=>Dc(n)?ms().enum(Object.values(n)):n)],r=(...n)=>{const a=fe.from(...n);a.nestedGenerics=e};return r.Nested=(...n)=>(e.push(n),r),r}function kc(...t){return e=>{const r=fe.from(e);r.schema.genericLabels=t}}function fn(...t){return J((e,r)=>{switch(e.decoratorType){case u.DecoratorTypes.METHOD:e.operation.consumes(t);break;case u.DecoratorTypes.CLASS:u.decorateMethodsOf(r[0],fn(...t));break;default:throw new u.UnsupportedDecoratorType(fn,r)}})}function $c(...t){return u.useDecorators(fn(...t),u.StoreSet("acceptMimes",t))}class Ys extends Map{constructor(e={}){super(),this.actions=[],Object.entries(e).forEach(([r,n])=>{this.set(r,n)})}addAction(e){return this.actions.push(e),this}build(){const e=(...a)=>this.bind(a,e),r=a=>(...c)=>(a(...c),e),n=a=>r((...c)=>{a in this?this[a](...c):this.set(a,c[0])});return this.methods.forEach(a=>{e[$.pascalCase(a)]=n(a)}),e}toObject(){return[...this.entries()].reduce((e,[r,n])=>({...e,[r]:n}),{})}getMergedKey(e,r){let n=this.get(e)||r;if(n)return this.decoratorType===u.DecoratorTypes.CLASS&&(n={...n,...r||{}}),{...r||{},...n}}bind(e,r){this.entity=fe.from(...e),this.beforeInit(),this.onInit(e,r),this.afterInit()}onInit(e,r){this.forEach((n,a)=>{this.onMapKey(a,n)})}onMapKey(e,r){this.entity.set(e,r)}runActions(){return this.actions.forEach(e=>{e(this)}),this}beforeInit(){}afterInit(){}}const Ho=new Map;function Ic(t,e){Ho.set(t,e)}function zo(t){return Ho.get(t)}function Nc(t){return u.isObject(t)&&!("toJSON"in t)}function Yo(t){return t.map(e=>Nc(e)?ms().enum(Object.values(e)):e)}class Lc extends Ys{constructor({status:e,model:r}){super(),this.methods=["contentType","description","examples","type","status","of","ofInteger","oneOf","allOf","anyOf","nested","header","headers","schema","title","groups","allowedGroups","location","binary"],this.model(r),this.status(e)}type(e){return this.model(e)}model(e){return e&&this.set("model",e),this}status(e){return this.set("status",e),e&&Ft(e)&&!this.get("description")&&(this.set("description",Ft(e)),this.get("model")||this.model(zo(+e))),this}headers(e){return this.set("headers",{...this.get("headers")||{},...Ur(e)}),this}header(e,r){return r===void 0&&u.isString(e)?this.headers({[e]:{type:"string"}}):this.headers({[e]:r})}location(e,r={}){return this.headers({Location:{...r,value:e}}),this}groups(...e){return e.length===2&&u.isArray(e[1])?(this.set("groupsName",e[0]),this.set("groups",e[1])):this.set("groups",e),this}allowedGroups(...e){return this.set("allowedGroups",new Set(e)),this}nested(...e){const r=this.get("model");return this.checkPrimitive(r),this.checkCollection(r),this.addAction(n=>{this.get("schema").nestedGenerics.push(Yo(e))}),this}of(...e){const r=this.get("model");return this.checkPrimitive(r),this.addAction(()=>{const n=this.get("schema");u.isCollection(r)?n==null||n.itemSchema({type:e[0]}):n==null||n.nestedGenerics.push(Yo(e))}),this}ofInteger(){return this.of("integer")}oneOf(...e){return this.manyOf("oneOf",e)}allOf(...e){return this.manyOf("allOf",e)}anyOf(...e){return this.manyOf("anyOf",e)}schema(e){return this.addAction(()=>{this.get("schema").assign(e)}),this}examples(e){return this.set("examples",u.isString(e)?[e]:e),this}title(e){return this.schema({title:e})}binary(){return this.type(String),this.set("contentType","application/octet-stream"),this.schema({format:"binary"}),this}checkPrimitive(e){if(u.isPrimitiveOrPrimitiveClass(e))throw new Error("Returns.Of cannot be used with the following primitive classes: String, Number, Boolean")}checkCollection(e){if(u.isCollection(e))throw new Error("Returns.Nested cannot be used with the following classes: Map, Set, Array, String, Number, Boolean")}getContentType(){const e=this.get("model");let r=this.get("contentType");return(e&&!u.isPlainObject(e)&&!u.isPrimitiveOrPrimitiveClass(e)||this.hasOfTypes)&&(r=r||"application/json"),r}getStatus(){return this.get("status")||"default"}onInit(e,r){switch(u.decoratorTypeOf(e)){case u.DecoratorTypes.METHOD:this.entity=fe.from(...e),this.entity.operation&&this.map();break;case u.DecoratorTypes.CLASS:this.decoratorType=u.DecoratorTypes.CLASS,u.decorateMethodsOf(e[0],r);break}}map(){const e=this.get("model"),{entity:r,decoratorType:n}=this,a=this.entity.operation,c=this.getStatus(),h=a.ensureResponseOf(c),v=this.getContentType();let{description:P=h.get("description")}=this.toObject();P&&(P=n===u.DecoratorTypes.CLASS&&h.get("description")||P,h.description(P));const C=this.getMergedKey("headers",h.get("headers"));return C&&h.headers(C),this.mapMedia(h),(mr(this.get("status"))||c==="default")&&e&&(r.type=e),v&&a.addProduce(v),this.runActions()}mapMedia(e){const r=this.getContentType(),n=this.get("model"),a=e.getMedia(r||"*/*"),c=a.get("schema")||new Je({type:n}),h=this.get("groups"),v=this.get("groupsName"),P=this.get("allowedGroups"),C=this.entity.operation;if(n&&(u.isArray(n)?c.oneOf(n.map(Y=>({type:Y}))):c.type(n)),this.set("schema",c),a.schema(c),a.groups=h,a.groupsName=v,P){a.allowedGroups=P;const Y=new It;Y.in("query").name("includes"),Y.schema(Je.from({type:"array",items:{type:"string",enum:[...P]}})),C.addParameter(-1,Y)}const x=this.get("examples");return x&&a.examples(x),a}manyOf(e,r){const n=this.get("model");return this.hasOfTypes=!0,this.addAction(()=>{const a=this.get("schema");u.isCollection(n)?(a.type(n||Object),a.itemSchema().set(e,r)):a.set(e,r)}),this}}function ur(t,e){return new Lc({status:t,model:e}).build()}function qc(t){return ur().ContentType(t)}function Xs(t=!0){return J((e,r)=>{switch(u.decoratorTypeOf(r)){case u.DecoratorTypes.METHOD:e.operation.deprecated(t);break;case u.DecoratorTypes.CLASS:u.decorateMethodsOf(r[0],Xs(t));break;case u.DecoratorTypes.PARAM:e.parameter.set("deprecated",t);break;case u.DecoratorTypes.PROP:e.schema.set("deprecated",t);break;default:throw new u.UnsupportedDecoratorType(Xs,r)}})}function Fc(t,e){return e!==void 0&&(t={[t]:e}),e===void 0&&u.isString(t)&&(t={[t]:{type:"string"}}),ur().Headers(t)}function Zs(t){const e=new It,r={},n=(a,c,h)=>{const v=fe.from(a,c,h);switch(v.decoratorType){case u.DecoratorTypes.PARAM:v.parameter.in(t);break;case u.DecoratorTypes.METHOD:e.in(t),v.operation.addParameter(-1,e),e.schema(Je.from(r));break;case u.DecoratorTypes.CLASS:u.decorateMethodsOf(a,n);break;default:throw new u.UnsupportedDecoratorType(Zs,[a,c,h])}};return n.Type=a=>(r.type=a,n),n.Name=a=>(e.name(a),n),n.Description=a=>(e.description(a),n),n.Required=(a=!0)=>(e.required(a),n),n.Pattern=a=>n.Schema({pattern:a.toString()}),n.Schema=a=>(Object.assign(r,a.toJSON?a.toJSON():a),n),n}function Jc(t){return(...e)=>{const[r,n,a]=e,c=u.Metadata.getParamTypes(r,n)[a]===Array;t=typeof t=="object"?void 0:t;const h=[t,!c&&"0"].filter(Boolean).join(".");u.useDecorators(Zs(et.FILES),Ko(h),u.useMethodDecorators(ur(400).Description("<File too long | Too many parts | Too many files | Field name too long | Field value too long | Too many fields | Unexpected field> [fieldName] Example: File too long file1"),fn("multipart/form-data")))(...e)}}function Bc(t,e){return ur().Location(t,e)}const Gc=new Set([...Object.keys(ue).filter(t=>t!==ue.CUSTOM).map(t=>t.toLowerCase())]);function Xo(t){let e,r;const n=t.filter(a=>typeof a=="string"&&Gc.has(a.toLowerCase())?(e=a.toLocaleUpperCase(),!1):typeof a=="string"||a instanceof RegExp?(r=a||"/",!1):!!a);return{path:r,method:e,use:n}}class Uc extends Ys{constructor(){super(...arguments),this.methods=["name","description","summary","method","id","use","useAfter","useBefore"]}beforeInit(){const e=this.get("path"),r=ue[this.get("method")]||ue.CUSTOM;e&&(this.operationPath=this.entity.operation.addOperationPath(r,e))}onMapKey(e,r){var n,a;switch(e){case"name":case"id":this.entity.operation.operationId(r);return;case"summary":(n=this.operationPath)==null||n.summary(r),this.entity.operation.summary(r);return;case"description":(a=this.operationPath)==null||a.description(r),this.entity.operation.description(r);return;case"use":this.entity.use(r);return;case"useAfter":this.entity.after(r);return;case"useBefore":this.entity.before(r);return}return super.onMapKey(e,r)}}function dt(...t){const e=Xo(t);return new Uc(e).build()}function Zo(t){return J((e,r)=>{if(e.decoratorType!==u.DecoratorTypes.METHOD)throw new u.UnsupportedDecoratorType(Zo,r);e.operation.operationId(t)})}function Qo(t,e="/"){return J((r,n)=>{if(r.decoratorType!==u.DecoratorTypes.METHOD)throw new u.UnsupportedDecoratorType(Qo,n);r.operation.addOperationPath(t.toUpperCase(),e)})}function Kc(){return zs("partial")}function ei(t){return J((e,r)=>{if(e.decoratorType!==u.DecoratorTypes.CLASS)throw new u.UnsupportedDecoratorType(ei,r);e.path=t})}function Qs(...t){return J((e,r)=>{switch(e.decoratorType){case u.DecoratorTypes.METHOD:e.operation.produces(t);break;case u.DecoratorTypes.CLASS:u.decorateMethodsOf(r[0],Qs(...t));break;default:throw new u.UnsupportedDecoratorType(Qs,r)}})}function Wc(t){return dt(ue.PUBLISH,t)}function Vc(...t){const{status:e,url:r,meta:n}=t.reduce((a,c)=>u.isNumber(c)?(a.status=c,a):u.isString(c)?(a.url=c,a):(a.meta=c,a),{status:302,url:"",meta:{}});return u.useDecorators(ur(e).Location(r,n),J(a=>{var c;(c=a.operation)==null||c.setRedirection(e)}))}function Hc(t="/",...e){return dt(...[ue.ALL,t].concat(e))}function zc(t="/",...e){return dt(...[ue.GET,t].concat(e))}function Yc(t="/",...e){return dt(...[ue.POST,t].concat(e))}function Xc(t="/",...e){return dt(...[ue.PUT,t].concat(e))}function Zc(t="/",...e){return dt(...[ue.DELETE,t].concat(e))}function Qc(t="/",...e){return dt(...[ue.HEAD,t].concat(e))}function eu(t="/",...e){return dt(...[ue.PATCH,t].concat(e))}function tu(t="/",...e){return dt(...[ue.OPTIONS,t].concat(e))}function ds(t,...e){return J((r,n)=>{switch(r.decoratorType){case u.DecoratorTypes.METHOD:Array.isArray(t)?r.operation.security(t):r.operation.addSecurityScopes(t,e);break;case u.DecoratorTypes.CLASS:Array.isArray(t)?u.decorateMethodsOf(n[0],ds(t)):u.decorateMethodsOf(n[0],ds(t,...e));break;default:throw new u.UnsupportedDecoratorType(ds,n)}})}function ru(t,e){return ur(t,e)}function nu(t){return dt(ue.SUBSCRIBE,t)}function ti(t){return J((e,r)=>{if(e.decoratorType!==u.DecoratorTypes.METHOD)throw new u.UnsupportedDecoratorType(ti,r);e.operation.summary(t)})}function su(t){return t.map(e=>typeof e=="string"?{name:e}:e)}function eo(...t){return J((e,r)=>{switch(e.decoratorType){case u.DecoratorTypes.METHOD:e.operation.addTags(su(t));break;case u.DecoratorTypes.CLASS:u.decorateMethodsOf(r[0],eo(...t));break;default:throw new u.UnsupportedDecoratorType(eo,r)}})}function ou(t,e){return u.StoreSet("view",{path:t,options:e})}function to(t,e){if(t instanceof RegExp||e instanceof RegExp){if(!t)return e;if(!e)return t;const n=t instanceof RegExp?t:new RegExp(t,"gi"),a=e instanceof RegExp?e:new RegExp(e,"gi");return new RegExp(n.source+a.source,(n.global?"g":"")+(n.ignoreCase?"i":"")+(n.multiline?"m":""))}t&&e&&t.endsWith("/")&&e.startsWith("/")&&(e=e.slice(1));const r=(t||"")+(e||"");return r.endsWith("/")&&r.length>1?r.slice(0,-1):r}class ri{constructor(e){Object.assign(this,e),this.paramsTypes=this.endpoint.getParamTypes()}get url(){return this.fullPath}get path(){var e;return(e=this.operationPath)==null?void 0:e.path}get fullPath(){return to(this.basePath,this.path)}get method(){var e;return((e=this.operationPath)==null?void 0:e.method)||"USE"}get name(){return`${this.endpoint.targetName}.${this.methodClassName}()`}get className(){return this.endpoint.targetName}get methodClassName(){return this.propertyKey}get parameters(){return this.endpoint.parameters}get propertyKey(){return String(this.endpoint.propertyKey)}get propertyName(){return this.endpoint.propertyName}get store(){return this.endpoint.store}get operation(){return this.endpoint.operation}get operationId(){return this.operation.get("operationId")||this.endpoint.propertyKey}has(e){return this.paramsTypes[e]}}function iu(...t){return Le().allOf(t)}function au(...t){return Le().any(...t)}function cu(...t){return Le().anyOf(t)}function uu(){return Le(Boolean)}function pu(){return Le(Array)}function fu(){return Le(Map).unknown(!0)}function lu(){return Le(Array).uniqueItems(!0)}function hu(){return Le(Date).format(tt.DATE)}function mu(){return Le(Date).format(tt.DATE_TIME)}function du(){return Le(Date).format(tt.TIME)}function yu(){return Le(String).format(tt.EMAIL)}function gu(t){const e=ms().enum(t);return Ht.set(t,e),e}function Ou(){return Le(Number).integer()}function bu(t){try{if(t())return fe.from(t()).schema}catch{}return new Sr(t)}function vu(){return Le(Number)}function wu(t={}){return Le(Object).properties(t)}function Su(...t){return Le().oneOf(t)}function Mu(){return Le(String).format(tt.URI)}function Tu(){return Le(String).format(tt.URL)}const ys=u.mergeReducerBuilder((t,e)=>t.type&&t.type&&t.type===e.type&&e.type==="array"?JSON.stringify(t.items)===JSON.stringify(e.items):t.type&&t.type===e.type||t.$ref&&t.$ref===e.$ref),ni=u.mergeReducerBuilder((t,e)=>t.in===e.in&&t.name===e.name),si=u.mergeReducerBuilder((t,e)=>!!Object.keys(e).find(r=>!!t[r])),oi=u.mergeReducerBuilder((t,e)=>t.name===e.name),Pu={security:si,parameters:ni,oneOf:ys,anyOf:ys,allOf:ys,tags:oi};function gs(t,e){return u.deepMerge(t,e,{reducers:Pu,cleanUndefinedProps:!0})}const ro=new Map;function Eu(t,e,r){ro.has(t)||ro.set(t,new Map);const n=ro.get(t),a=JSON.stringify(e);return n.has(a)||n.set(a,r()),n.get(a)}function Ru(t,e){const r=Ue(t),{rootPath:n="/"}=e;return e={...e,rootPath:n,defaultTags:[u.cleanObject({name:r.schema.getName(),description:r.schema.get("description")})]},W("generate",[r],e)}function no(t,e={}){if(e={specType:te.OPENAPI,...e,tags:[],paths:{},channels:{},components:{},operationIdFormatter:e.operationIdFormatter||cn(e.operationIdPattern),root:!1},u.isArray(t)){let r={};return e={...e,append(n){r=gs(r,n)}},t.forEach(({token:n,...a})=>{const c=no(n,{...e,...a});e.append(c)}),r}return Eu(t,e,()=>Ru(t,e))}function ii(t){return t.startsWith("3.")?te.OPENAPI:te.SWAGGER}function ai(t){return"openapi"in t?te.OPENAPI:te.SWAGGER}function so(t){const{title:e,description:r,version:n,termsOfService:a,contact:c,license:h}=t;return u.cleanObject({version:n,title:e,description:r,termsOfService:a,contact:c,license:h})}function oo(t,{version:e,specVersion:r,acceptMimes:n=["application/json"]}){const{paths:a,security:c,tags:h,host:v,basePath:P,schemes:C,consumes:x=[],produces:Y=["application/json"],definitions:ve,parameters:ze,responses:he,securityDefinitions:St,externalDocs:xt}=t;return{swagger:r,consumes:u.uniq([...n,...x]),produces:u.uniq([...Y]),info:so(u.getValue(t,"info",{})),paths:a,host:v,basePath:P,schemes:C,definitions:ve,parameters:ze,responses:he,security:c,securityDefinitions:St,tags:h,externalDocs:xt}}function io(t,{specVersion:e}){const{servers:r,paths:n,components:a,security:c,tags:h,externalDocs:v}=t;return{openapi:e,info:so(u.getValue(t,"info",{})),servers:r,paths:n,components:a,security:c,tags:h,externalDocs:v}}function ci(t,{fileSpec:e,acceptMimes:r,specVersion:n,version:a}){n=n||u.getValue(t,"openapi",u.getValue(t,"swagger","2.0"));const c={specVersion:n,acceptMimes:r};switch(ii(n)){case te.OPENAPI:t=io(t,c),e=e&&io(e,c);break;default:case te.SWAGGER:t=oo(t,c),e=e&&oo(e,c);break}return t=gs(t,e),u.setValue(t,"info.title",u.getValue(t,"info.title","Api documentation")),u.setValue(t,"info.version",u.getValue(t,"info.version",a)),t}const Au=["get","put","post","delete","options","head","patch","trace"],Cu=["format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","minLength","maxLength","multipleOf","minItems","maxItems","uniqueItems","minProperties","maxProperties","additionalProperties","pattern","enum","default"],ju=["type","items"],_u=/^(application\/json|[^;\/ \t]+\/[^;\/ \t]+[+]json)[ \t]*(;.*)?$/,Os={APPLICATION_X_WWW_URLENCODED:"application/x-www-form-urlencoded",MULTIPART_FORM_DATA:"multipart/form-data"};function Du(t){return t.replace("#/components/schemas/","#/definitions/").replace("#/components/","#/x-components/")}function ao(t){if(Array.isArray(t))t.forEach(ao);else if(typeof t=="object")for(let e in t)e==="$ref"?t.$ref=Du(t.$ref):ao(t[e])}function ui(t){return new RegExp(_u,"i").test(t)}function pi(t){const e=Object.keys(Os).map(r=>Os[r]);return Object.keys(t).filter(r=>e.indexOf(r)>-1||ui(r))}function fi(t){function e(r){const{scheme:n,type:a,name:c,bearerFormat:h,flows:v,...P}=r;switch(a){case"http":if(n==="basic")return{...P,type:n};if(n==="bearer")return{...P,type:"apiKey",name:"Authorization",in:"header"};break;case"oauth2":const C=Object.keys(v)[0],x=v[C];let Y=C;return Y==="clientCredentials"?Y="application":Y==="authorizationCode"&&(Y="accessCode"),{type:a,flow:Y,authorizationUrl:x.authorizationUrl,tokenUrl:x.tokenUrl,scopes:x.scopes}}}return Object.entries(t).reduce((r,[n,a])=>{const c=e(a);return c&&(r[n]=c),r},{})}function li(t){let e=t.url;const r=t.variables||{};for(const a in r){const c=r[a]||{};if(c.default){const h=RegExp(`{${a}}`,"g");e=e.replace(h,c.default)}}const n=new URL(e);return{host:n.host?n.host:void 0,basePath:n.pathname,schemes:n.protocol!==null?[n.protocol.substring(0,n.protocol.length-1)]:void 0}}class hi{constructor(e){this.spec=JSON.parse(JSON.stringify(e))}convertInfos(){const e=this.spec.servers&&this.spec.servers[0];return e?li(e):{}}resolveReference(e,r,n){if(!r||!r.$ref)return r;const a=r.$ref;if(a.startsWith("#")){const c=a.split("/").map(v=>v.replace(/~1/g,"/").replace(/~0/g,"~"));c.shift();let h=e;return c.forEach(v=>{h=h[v]}),n?JSON.parse(JSON.stringify(h)):h}}convert(){const e={swagger:"2.0",...this.convertInfos(),paths:this.spec.paths?this.convertOperations(this.spec.paths,this.spec):void 0};return this.spec.components&&(this.convertSchemas(),this.convertSecurityDefinitions(),this.spec["x-components"]=this.spec.components,delete this.spec.components,ao(this.spec)),delete this.spec.servers,delete this.spec.openapi,delete this.spec["x-components"],u.cleanObject({...e,...this.spec})}convertOperations(e,r){return Object.entries(e).reduce((n,[a,c])=>{const h=n[a]=this.resolveReference({...r,paths:n},c,!0);return this.convertParameters(h),Object.keys(h).forEach(v=>{if(Au.indexOf(v)>=0){const P=h[v]=this.resolveReference({...r,paths:n},h[v],!0);this.convertOperationParameters(P),this.convertResponses(P)}}),n},e)}convertOperationParameters(e){let r,n,a,c;if(e.parameters=e.parameters||[],e.requestBody){let h=this.resolveReference(this.spec,e.requestBody,!0);if(e.requestBody.content){const v=pi(e.requestBody.content)[0],P={content:{}},C=e.requestBody.content[v];C&&C.schema&&C.schema.$ref&&!C.schema.$ref.startsWith("#")&&(h=this.resolveReference(this.spec,C.schema,!0),P.content[`${v}`]={schema:h},h=P)}if(h.name="body",r=h.content,r&&Object.keys(r).length){if(a=Object.keys(r).filter(v=>v.indexOf("/")>0),c=a.filter(v=>v.indexOf("*")<0),n=pi(r)[0],delete h.content,[Os.APPLICATION_X_WWW_URLENCODED,Os.MULTIPART_FORM_DATA].includes(n))if(e.consumes=c,h.in="formData",h.schema=r[n].schema,h.schema=this.resolveReference(this.spec,h.schema,!0),h.schema.type==="object"&&h.schema.properties){const v=h.schema.required||[];Object.keys(h.schema.properties).forEach(P=>{var C;const x=h.schema.properties[P];if(!x.readOnly){const Y={name:P,in:"formData",schema:x};v.indexOf(P)>=0&&(Y.required=!0),(C=e.parameters)==null||C.push(Y)}})}else e.parameters.push(h);else n?(e.consumes=c,h.in="body",h.schema=r[n].schema,e.parameters.push(h)):a&&(e.consumes=c||["application/octet-stream"],h.in="body",h.name=h.name||"file",delete h.type,h.schema=r[a[0]].schema||{type:"string",format:"binary"},e.parameters.push(h));h.schema&&this.convertSchema(h.schema,"request")}delete e.requestBody}this.convertParameters(e)}convertParameters(e){e.parameters!==void 0&&(e.parameters=e.parameters||[],(e.parameters||[]).forEach((r,n)=>{if(r=e.parameters[n]=this.resolveReference(this.spec,r,!1),r.in!=="body"){if(this.copySchemaProperties(r,Cu),this.copySchemaProperties(r,ju),this.copySchemaXProperties(r),!r.description){const a=this.resolveReference(this.spec,r.schema,!1);a&&a.description&&(r.description=a.description)}r.example!==void 0&&(r["x-example"]=r.example),delete r.schema,delete r.allowReserved,delete r.example}if(r.type==="array")switch(r.style||(r.in==="query"||r.in==="cookie"?"form":"simple")){case"matrix":r.collectionFormat=r.explode?void 0:"csv";break;case"label":r.collectionFormat=void 0;break;case"simple":r.collectionFormat="csv";break;case"spaceDelimited":r.collectionFormat="ssv";break;case"pipeDelimited":r.collectionFormat="pipes";break;case"deepOpbject":r.collectionFormat="multi";break;case"form":r.collectionFormat=r.explode===!1?"csv":"multi";break}delete r.style,delete r.explode}))}copySchemaProperties(e,r){let n=this.resolveReference(this.spec,e.schema,!0);n&&r.forEach(a=>{const c=n[a];a==="additionalProperties"&&typeof c=="boolean"||c!==void 0&&(e[a]=c)})}copySchemaXProperties(e){let r=this.resolveReference(this.spec,e.schema,!0);r&&Object.keys(r).forEach(n=>{Reflect.hasOwnProperty.call(r,n)&&!Reflect.hasOwnProperty.call(e,n)&&n.startsWith("x-")&&(e[n]=r[n])})}convertResponses(e){Object.keys(e.responses||{}).forEach(r=>{const n=e.responses[r]=this.resolveReference(this.spec,e.responses[r],!0);if(n.content){let a=null,c=null;if(Object.keys(n.content).forEach(h=>{const v=h.indexOf("*")<0?h:"application/octet-stream";e.produces?e.produces.indexOf(v)<0&&e.produces.push(v):e.produces=[v];const P=n.content[h];a=a||P.schema,!c&&ui(v)&&(c=P.schema),P.example&&(n.examples=n.examples||{},n.examples[v]=P.example)}),a){n.schema=c||a;const h=this.resolveReference(this.spec,n.schema,!0);h&&n.schema.$ref&&!n.schema.$ref.startsWith("#")&&(n.schema=h),this.convertSchema(n.schema,"response")}}Object.keys(n.headers||{}).forEach(a=>{const c=this.resolveReference(this.spec,n.headers[a],!0);c.schema&&(c.type=c.schema.type,c.format=c.schema.format,delete c.schema),n.headers[a]=c}),delete n.content})}convertSchema(e,r){if(e.oneOf&&(delete e.oneOf,e.discriminator&&delete e.discriminator),e.anyOf&&(delete e.anyOf,e.discriminator&&delete e.discriminator),e.allOf)for(const n in e.allOf)this.convertSchema(e.allOf[n],r);switch(e.discriminator&&(e.discriminator.mapping&&this.convertDiscriminatorMapping(e.discriminator.mapping),e.discriminator=e.discriminator.propertyName),e.type){case"object":e.properties&&Object.keys(e.properties).forEach(n=>{e.properties[n].writeOnly===!0&&r==="response"?delete e.properties[n]:(this.convertSchema(e.properties[n],r),delete e.properties[n].writeOnly)});break;case"array":e.items&&this.convertSchema(e.items,r)}e.nullable&&(e["x-nullable"]=!0,delete e.nullable),e.deprecated!==void 0&&(e["x-deprecated"]===void 0&&(e["x-deprecated"]=e.deprecated),delete e.deprecated)}convertSchemas(){this.spec.definitions=this.spec.components.schemas,Object.keys(this.spec.definitions||{}).forEach(e=>{this.convertSchema(this.spec.definitions[e])}),delete this.spec.components.schemas}convertDiscriminatorMapping(e){Object.keys(e).forEach(r=>{const n=e[r];if(typeof n!="string"){console.warn(`Ignoring ${n} for ${r} in discriminator.mapping.`);return}let a;if(/^[a-zA-Z0-9._-]+$/.test(n))try{a=this.resolveReference(this.spec,{$ref:`#/components/schemas/${n}`},!1)}catch(c){console.debug(`Error resolving ${n} for ${r} as schema name in discriminator.mapping: ${c}`)}if(!a)try{a=this.resolveReference(this.spec,{$ref:n},!1)}catch(c){console.debug(`Error resolving ${n} for ${r} in discriminator.mapping: ${c}`)}a?(a["x-discriminator-value"]=r,a["x-ms-discriminator-value"]=r):console.warn(`Unable to resolve ${n} for ${r} in discriminator.mapping.`)})}convertSecurityDefinitions(){this.spec.components.securitySchemes&&(this.spec.securityDefinitions=fi(this.spec.components.securitySchemes),delete this.spec.components.securitySchemes)}}function mi(t){return new hi(t).convert()}function xu({tokens:t,...e}){const{version:r="1.0.0",acceptMimes:n,fileSpec:a={},specVersion:c}=e,h=ci(u.getValue(e,"spec",{}),{fileSpec:a,version:r,specVersion:c,acceptMimes:n}),v=ai(h);let P=no(t,e);const C=gs(h,P);return e.sortPaths&&(C.paths=Object.fromEntries(Object.entries(C.paths).sort(([x],[Y])=>x.localeCompare(Y)))),v===te.SWAGGER?mi(C):C}const di="$cache:schemes";function ku(t){return JSON.stringify(t)}function $u(t,e){const r=t.store.get(di)||new Map,n=ku(e);if(!r.has(n)){const a=W("schema",[t.schema],e);Object.keys(u.getValue(e,"components.schemas",{})).length&&(a.definitions=e.components.schemas),r.set(n,a)}return t.store.set(di,r),r.get(n)}function Iu(t,e={}){var r;const n=Ue(t),a=e.specType||te.JSON;return e={endpoint:!0,groups:[],inlineEnums:a===te.JSON,...e,specType:a,components:{schemas:{}}},n.decoratorType==="parameter"&&(e={...e,genericTypes:n.nestedGenerics[0],nestedGenerics:n.nestedGenerics,groups:(r=n.parameter)==null?void 0:r.groups}),$u(n,e)}function yi(t,e={}){const r=t.isStore?t:Ue(t),n=to(e.basePath,r.path);let a=[];return e.withChildren&&(a=r.get("childrenControllers",[]).reduce((c,h)=>c.concat(yi(h,{...e,basePath:n})),a)),[...br(t).values()].reduce((c,h)=>{const{operation:v}=h;return v&&v.getAllowedOperationPath(e.allowedVerbs).forEach(P=>{c.push(new ri({basePath:n,token:t,endpoint:h,operationPath:P}))}),c},a)}function gi(t){const e=t.isStore?t:Ue(t);if(!e.$properties){const r=Zt(e);e.$properties=new Map,r.forEach(n=>{n.children.forEach(a=>{e.$properties.has(a.propertyKey)||e.$properties.set(a.propertyKey,a)})})}return e.$properties}function Nu(t,e={}){const r=gi(t),n=new Map;return r.forEach((a,c)=>{!e.withIgnoredProps&&Qr(a.itemSchema,e)||n.set(c,a)}),n}s.ARRAY_PROPERTIES=Xr,s.AcceptMime=$c,s.AdditionalProperties=Ks,s.All=Hc,s.AllOf=Ws,s.Allow=y,s.Any=O,s.AnyOf=S,s.ArrayOf=fs,s.BOOLEAN_PROPERTIES=Gn,s.COMMON_PROPERTIES=Zr,s.Children=us,s.CollectionContains=un,s.CollectionOf=ir,s.Const=j,s.Consumes=fn,s.ContentType=qc,s.Converter=hi,s.CustomKey=V,s.CustomKeys=ke,s.DateFormat=cc,s.DateTime=ac,s.DecoratorContext=Ys,s.Default=_e,s.DefaultMsg=D,s.Delete=Zc,s.Deprecated=Xs,s.Description=I,s.Discriminator=Ct,s.DiscriminatorKey=L,s.DiscriminatorValue=ps,s.Email=ic,s.EndpointMetadata=_s,s.Enum=oe,s.ErrorMsg=re,s.Example=we,s.Examples=Ce,s.ExclusiveMaximum=Vs,s.ExclusiveMinimum=oc,s.For=Pc,s.Format=cr,s.ForwardGroups=lc,s.GenericOf=xc,s.Generics=kc,s.Get=zc,s.Groups=zs,s.HTTP_STATUS_MESSAGES=or,s.Head=Qc,s.Header=Fc,s.Hidden=mc,s.Ignore=dc,s.In=Zs,s.InFile=Jc,s.Integer=yc,s.JSON_TYPES=Br,s.JsonEntitiesContainer=At,s.JsonEntityComponent=mt,s.JsonEntityFn=J,s.JsonEntityStore=fe,s.JsonFormatTypes=tt,s.JsonLazyRef=Sr,s.JsonMap=He,s.JsonMedia=Yt,s.JsonMethodPath=Rn,s.JsonOperation=dr,s.JsonOperationPathsMap=Vr,s.JsonOperationRoute=ri,s.JsonParameter=It,s.JsonParameterTypes=et,s.JsonRequestBody=on,s.JsonResponse=En,s.JsonSchema=Je,s.LabelledAs=gc,s.Location=Bc,s.MANY_OF_PROPERTIES=Tr,s.MapOf=ls,s.Max=hs,s.MaxItems=Js,s.MaxLength=Oc,s.MaxProperties=Bs,s.Maximum=Xe,s.Min=sc,s.MinItems=Gs,s.MinLength=bc,s.MinProperties=ar,s.Minimum=pn,s.MultipleOf=vc,s.NUMBER_PROPERTIES=Un,s.Name=Ko,s.Nullable=wc,s.OBJECT_PROPERTIES=Kn,s.OPERATION_HTTP_VERBS=$r,s.OPERATION_WS_VERBS=vn,s.OneOf=Sc,s.Operation=dt,s.OperationId=Zo,s.OperationPath=Qo,s.OperationVerbs=ue,s.Optional=Wo,s.Options=tu,s.ParamMetadata=An,s.Partial=Kc,s.Patch=eu,s.Path=ei,s.Pattern=Mc,s.Post=Yc,s.Produces=Qs,s.Property=Jt,s.PropertyMetadata=Or,s.Publish=Wc,s.Put=Xc,s.ReadOnly=Tc,s.RecordOf=Ec,s.Redirect=Vc,s.Required=Rc,s.RequiredGroups=Ac,s.Returns=ur,s.STRING_PROPERTIES=Bn,s.Schema=Vo,s.Security=ds,s.SpecTypes=te,s.Status=ru,s.Subscribe=nu,s.Summary=ti,s.Tags=eo,s.TimeFormat=uc,s.Title=Cc,s.TypeError=jc,s.UniqueItems=Us,s.Uri=pc,s.Url=fc,s.View=ou,s.WriteOnly=_c,s.allOf=iu,s.alterIgnore=Qr,s.alterOneOf=it,s.alterRequiredGroups=p,s.any=au,s.anyMapper=$n,s.anyOf=cu,s.array=pu,s.boolean=uu,s.buildPath=ft,s.channelsMapper=zr,s.classMapper=In,s.concatParameters=Dt,s.concatPath=to,s.createRef=er,s.createRefName=Lt,s.date=hu,s.datetime=mu,s.defineStatusModel=Ic,s.discriminatorMappingMapper=rr,s.email=yu,s.enums=gu,s.enumsMapper=Mr,s.enumsRegistry=Ht,s.execMapper=W,s.execOneOfMapper=wn,s.formatParameterType=Xt,s.from=Le,s.generateSpec=xu,s.genericsMapper=Nn,s.getComputedType=Jr,s.getGenericsMap=vr,s.getInheritedStores=Zt,s.getJsonEntityStore=Ue,s.getJsonPathParameters=ss,s.getJsonSchema=Iu,s.getJsonSchemaMapper=Ir,s.getJsonType=lt,s.getOperationId=os,s.getOperationsRoutes=yi,s.getOperationsStores=br,s.getProperties=Nu,s.getPropertiesStores=gi,s.getSpec=no,s.getSpecType=ii,s.getSpecTypeFromSpec=ai,s.getStatusConstant=ts,s.getStatusMessage=Ft,s.getStatusModel=zo,s.hasMapper=Nr,s.inheritedClassMapper=qn,s.integer=Ou,s.isParameterType=yr,s.isRedirectionStatus=zt,s.isSuccessStatus=mr,s.itemMapper=Fn,s.lazyRef=bu,s.lazyRefMapper=Jn,s.makeOf=Qt,s.map=fu,s.mapAliasedProperties=K,s.mapGenericsOptions=jt,s.mapHeaders=Ur,s.mapMapper=Yr,s.mapOpenSpec=ci,s.mapOpenSpec2=oo,s.mapOpenSpec3=io,s.mapOpenSpecInfo=so,s.mapOperationOptions=Xo,s.matchGroups=Hs,s.mergeSpec=gs,s.messageMapper=_n,s.nullableMapper=Wn,s.nullableMapperOpenApi=rn,s.number=vu,s.object=wu,s.objectMapper=Vn,s.ofMapper=Pr,s.oneOf=Su,s.operationIdFormatter=cn,s.operationInFilesMapper=Xn,s.operationInParameterMapper=Zn,s.operationInParametersMapper=Qn,s.operationInQueryMapper=es,s.operationMapper=nn,s.operationMediaMapper=sn,s.operationRequestBodyMapper=an,s.operationResponseMapper=Z,s.parameters=ni,s.pathsMapper=cs,s.payloadMapper=wr,s.popGenerics=Nt,s.propertiesMapper=i,s.registerJsonSchemaMapper=z,s.removeHiddenOperation=Hr,s.requiredMapper=R,s.responsePayloadMapper=kn,s.schemaMapper=zn,s.schemesReducer=ys,s.security=si,s.serializeEnum=lr,s.serializeEnumValues=Gr,s.set=lu,s.string=ms,s.tagsReducer=oi,s.time=du,s.toJsonMapCollection=Qe,s.toJsonRegex=hr,s.toRef=tr,s.transformInformation=li,s.transformSecurity=fi,s.transformToOS2=mi,s.uri=Mu,s.url=Tu,s.withErrorMsg=Te,s.wrapEnumsMapper=Rr,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})})}(kr,kr.exports)),kr.exports}var kt=Ea();function Se(m){return m=Object.entries(m).reduce((E,[s,$])=>(s==="validate"&&(E["x-formio-validate"]={...E["x-formio-validate"]||{},...$}),{...E,[`x-formio-${s}`]:$}),{}),kt.JsonEntityFn(E=>{Object.entries(m).forEach(([s,$])=>{E.itemSchema.customKey(s,$),E.isCollection&&E.schema.customKey(s,$)})})}function Cs(m){return Se({conditional:m})}function Ra(m,E){return Cs({show:!0,when:m,eq:E})}function Aa(m,E){return Cs({show:!1,when:m,eq:E})}function Ca(m={}){return Se({currency:"USD",inputFormat:"plain",mask:!1,spellcheck:!0,delimiter:!0,...m,type:"currency"})}function ja(m){return Se({customClass:m})}function _a(m){const E=m.toString(),[s,...$]=E.split("=>");let le=$.join("=>");return s.includes("{")||(le=le.replace(new RegExp(`${s.trim()}.`,"gi"),"")),`show = ${le.trim()}`}function Da(m){return be.isArrowFn(m)&&(m=_a(m)),Se({customConditional:m})}const xa=m=>async E=>{const s=await m(E);return JSON.stringify(s)};function ka(m,E={}){return Se({...E,dataSrc:"json",data:{...E.data,json:be.isFunction(m)?xa(m):JSON.stringify(m)}})}function $a(m,E={}){return Se({...E,dataSrc:"url",data:{...E.data,url:m}})}function Ia(m){return Se({errorLabel:m})}function On(m,E){return Se({validate:{[m]:E}})}function Na(m){return On("customMessage",m)}const bn=new Map;function Bo(m){return kt.JsonEntityFn(E=>E.decoratorType==="property"?Se({label:m}):kt.CustomKey("x-formio-label",m))}function La(m={}){return be.useDecorators(E=>{const s=m.name||be.nameOf(E),$=Et.kebabCase(s);bn.set(s,E),bn.set($,E)},m.name&&kt.Name(m.name),m.label&&Bo(m.label),m&&be.StoreSet("formio:form",m))}function qa(m=!0){return Se({hidden:m})}function Fa(m={}){return be.useDecorators(kt.CollectionOf(String),Se({...m,tableView:!1,storeas:"array",type:"tags"}))}function Ja(m,E=""){return Se({inputMask:m,inputMaskPlaceholderChar:E})}function Ba(...m){return Se({inputMasks:m})}function Ga(m){return On("maxWords",m)}function Ua(m){return On("minWords",m)}function Ka(m=!0){return Se({modalEdit:m})}function Wa(m=!1){return Se({multiple:m})}function Va(m=!0){return Se({openWhenEmpty:m})}function Ha(m={}){return Se({...m,type:"password",protected:!0})}function za(m){return Se({placeholder:m})}function Ya(m){return Se({prefix:m})}function Xa(m={}){return Se({selectThreshold:.3,input:!0,widget:"choicesjs",...m,type:"select"})}function Za(m){return Se({suffix:m})}function Qa(m){return Se({tableView:m})}function ec(m){return kt.JsonEntityFn(E=>{E.schema.customKey("x-formiotabs",{key:Et.camelCase(m),label:m})})}function tc(m={}){return Se({autoExpand:!1,...m,type:"textarea"})}function rc(m){return Se({case:m})}function nc(m){return Se({tooltip:m})}async function Go(m,E={}){if(!m)return;if(be.isString(m))return Go(bn.get(m),E);const s=kt.JsonEntityStore.from(m),$=kt.getJsonSchema(s,{...E,inlineEnums:!0,customKeys:!0}),le=s.schema.getName(),ge=Et.kebabCase(le),Ke=[],We=me("properties",$,{...E,definitions:$.definitions,resolvers:Ke}),U={title:le,type:"form",display:"form",tags:[],access:[],submissionAccess:[],...s.store.get("formio:form",{}),name:ge,machineName:ge,components:We};return await Promise.all(Ke.map(Ne=>Ne(U,E))),U}B.Component=Se,B.Conditional=Cs,B.Currency=Ca,B.CustomClass=ja,B.CustomConditional=Da,B.DataSourceJson=ka,B.DataSourceUrl=$a,B.ErrorLabel=Ia,B.ErrorMessage=Na,B.Form=La,B.FormsContainer=bn,B.Hidden=qa,B.HideWhen=Aa,B.InputTags=Fa,B.Label=Bo,B.Mask=Ja,B.Masks=Ba,B.MaxWords=Ga,B.MinWords=Ua,B.ModalEdit=Ka,B.Multiple=Wa,B.OpenWhenEmpty=Va,B.Password=Ha,B.Placeholder=za,B.Prefix=Ya,B.Select=Xa,B.ShowWhen=Ra,B.Suffix=Za,B.TableView=Qa,B.Tabs=ec,B.TextCase=rc,B.Textarea=tc,B.Tooltip=nc,B.Validate=On,B.anyToComponent=jo,B.arrayToComponent=_o,B.defaultToComponent=xo,B.enumToComponent=ko,B.execMapper=me,B.getFormioMapper=Ao,B.getFormioProps=Do,B.getFormioSchema=Go,B.getRef=Rs,B.mapToComponent=$o,B.nestedToComponent=Io,B.numberToComponent=As,B.objectToEditGrid=No,B.panelToComponent=Lo,B.propertiesToComponents=qo,B.registerFormioMapper=Ye,B.stringToComponent=Fo,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
"name": "@tsed/schema-formio",
|
|
3
3
|
"description": "Transform Ts.ED Schema & JsonSchema to a valid Formio schema",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "8.
|
|
5
|
+
"version": "8.10.0-rc.1",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/esm/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
9
9
|
"typings": "./lib/types/index.d.ts",
|
|
10
|
-
"browser": "./lib/browser/schema-formio.umd.
|
|
10
|
+
"browser": "./lib/browser/schema-formio.umd.cjs",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
13
|
"tsed-source": "./src/index.ts",
|
|
14
14
|
"types": "./lib/types/index.d.ts",
|
|
15
|
-
"browser": "./lib/browser/schema-formio.umd.
|
|
15
|
+
"browser": "./lib/browser/schema-formio.umd.cjs",
|
|
16
16
|
"import": "./lib/esm/index.js",
|
|
17
17
|
"default": "./lib/esm/index.js"
|
|
18
18
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"scripts": {
|
|
21
21
|
"clean": "rm -rf lib",
|
|
22
22
|
"build": "yarn clean && yarn barrels && yarn build:ts && yarn run build:browser",
|
|
23
|
-
"build:browser": "
|
|
23
|
+
"build:browser": "vite build",
|
|
24
24
|
"barrels": "barrels",
|
|
25
25
|
"test": "vitest run",
|
|
26
26
|
"build:ts": "tsc --build tsconfig.esm.json",
|
|
@@ -39,24 +39,25 @@
|
|
|
39
39
|
"tsed"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@tsed/formio-types": "8.
|
|
42
|
+
"@tsed/formio-types": "8.10.0-rc.1",
|
|
43
43
|
"change-case": "^5.4.4",
|
|
44
44
|
"tslib": "2.7.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@tsed/barrels": "8.
|
|
48
|
-
"@tsed/core": "8.
|
|
49
|
-
"@tsed/openspec": "8.
|
|
50
|
-
"@tsed/schema": "8.
|
|
51
|
-
"@tsed/typescript": "8.
|
|
47
|
+
"@tsed/barrels": "8.10.0-rc.1",
|
|
48
|
+
"@tsed/core": "8.10.0-rc.1",
|
|
49
|
+
"@tsed/openspec": "8.10.0-rc.1",
|
|
50
|
+
"@tsed/schema": "8.10.0-rc.1",
|
|
51
|
+
"@tsed/typescript": "8.10.0-rc.1",
|
|
52
52
|
"eslint": "9.12.0",
|
|
53
53
|
"typescript": "5.4.5",
|
|
54
|
+
"vite": "6.2.2",
|
|
54
55
|
"vitest": "3.1.4"
|
|
55
56
|
},
|
|
56
57
|
"peerDependencies": {
|
|
57
|
-
"@tsed/core": ">=8.
|
|
58
|
-
"@tsed/openspec": ">=8.
|
|
59
|
-
"@tsed/schema": ">=8.
|
|
58
|
+
"@tsed/core": ">=8.0.0",
|
|
59
|
+
"@tsed/openspec": ">=8.0.0",
|
|
60
|
+
"@tsed/schema": ">=8.0.0",
|
|
60
61
|
"formiojs": ">=4.0.0",
|
|
61
62
|
"lodash": ">=4.0.0",
|
|
62
63
|
"moment": ">=2.0.0"
|
|
@@ -87,5 +88,8 @@
|
|
|
87
88
|
},
|
|
88
89
|
"homepage": "https://github.com/tsedio/tsed/tree/production/packages/third-parties/schema-formio",
|
|
89
90
|
"author": "Romain Lenzotti",
|
|
90
|
-
"license": "MIT"
|
|
91
|
+
"license": "MIT",
|
|
92
|
+
"publishConfig": {
|
|
93
|
+
"tag": "rc"
|
|
94
|
+
}
|
|
91
95
|
}
|
package/vite.config.mts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {defineConfig} from "vite";
|
|
2
|
+
import {join} from "node:path";
|
|
3
|
+
|
|
4
|
+
// https://vitejs.dev/config/
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
plugins: [],
|
|
7
|
+
build: {
|
|
8
|
+
outDir: "lib/browser",
|
|
9
|
+
lib: {
|
|
10
|
+
entry: join(import.meta.dirname, "src/index.ts"),
|
|
11
|
+
formats: ["umd"],
|
|
12
|
+
name: "@tsed/schema-formio",
|
|
13
|
+
fileName: "schema-formio"
|
|
14
|
+
},
|
|
15
|
+
rollupOptions: {
|
|
16
|
+
external: /node_modules\/(.*)/
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
});
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@tsed/core"),require("@tsed/schema")):"function"==typeof define&&define.amd?define(["@tsed/core","@tsed/schema"],t):"object"==typeof exports?exports["@tsed/schema-formio"]=t(require("@tsed/core"),require("@tsed/schema")):e["@tsed/schema-formio"]=t(e["@tsed/core"],e["@tsed/schema"])}(self,((e,t)=>(()=>{"use strict";var n={414:t=>{t.exports=e},538:e=>{e.exports=t}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};o.r(i),o.d(i,{Component:()=>A,Conditional:()=>N,Currency:()=>z,CustomClass:()=>H,CustomConditional:()=>R,DataSourceJson:()=>B,DataSourceUrl:()=>Q,ErrorLabel:()=>X,ErrorMessage:()=>Z,Form:()=>ne,FormsContainer:()=>ee,Hidden:()=>re,HideWhen:()=>_,InputTags:()=>oe,Label:()=>te,Mask:()=>ie,Masks:()=>ae,MaxWords:()=>ue,MinWords:()=>se,ModalEdit:()=>ce,Multiple:()=>le,OpenWhenEmpty:()=>pe,Password:()=>me,Placeholder:()=>de,Prefix:()=>fe,Select:()=>ye,ShowWhen:()=>U,Suffix:()=>be,TableView:()=>ge,Tabs:()=>he,TextCase:()=>xe,Textarea:()=>we,Tooltip:()=>je,Validate:()=>Y,anyToComponent:()=>m,arrayToComponent:()=>d,defaultToComponent:()=>y,enumToComponent:()=>b,execMapper:()=>c,getFormioMapper:()=>s,getFormioProps:()=>f,getFormioSchema:()=>Ce,getRef:()=>p,mapToComponent:()=>g,nestedToComponent:()=>F,numberToComponent:()=>W,objectToEditGrid:()=>q,panelToComponent:()=>$,propertiesToComponents:()=>I,registerFormioMapper:()=>u,stringToComponent:()=>J});const a=new Map;function u(e,t){return a.set(e,t)}function s(e){if(!a.has(e))throw new Error(`Formio ${e} mapper doesn't exists`);return a.get(e)}function c(e,t,n){return s(e)(t,n)}var l=o(414);function p(e,t){return e.$ref?(0,l.getValue)(t,e.$ref.replace("#/","").replace(/\//g,".")):e}function m(e,t){switch(e=p(e,t),e?.type){case"object":return e.properties||e.$ref?c("nested",e,t):c("map",e,t);case"array":return c("array",e,t);case"string":return c("string",e,t);case"boolean":return c("boolean",e,t);case"integer":case"number":return c("number",e,t)}return{}}function d(e,t){const n=e.items.$ref?p(e.items,t):e.items,{type:r}=n;switch(r){case"object":return{...c("default",e,t),...c("editgrid",n,t)};case"string":if(n.enum)return{...c("enum",n,t),inline:!1,type:"selectboxes"};const o=c(r,n,t);return(0,l.cleanObject)({...o,multiple:"tags"!==o.type||void 0});default:return{...c(r,n,t),multiple:!0}}}function f(e){return Object.entries(e).reduce(((e,[t,n])=>t.startsWith("x-formio-")?{...e,[t.replace("x-formio-","")]:n}:e),{})}function y(e,t){const n=f(e);return(0,l.cleanObject)({...n,disabled:!!e.readOnly,description:e.description,defaultValue:e.default})}function b(e,t){const n=c("default",e,t),r=e.enum.map((e=>({label:e,value:e})));return"select"===n.type?(0,l.cleanObject)({...n,data:{json:n.data?.json||JSON.stringify(r)},dataSrc:"json",idPath:"value",valueProperty:"value",template:n.template||"<span>{{ item.label }}</span>"}):(0,l.cleanObject)({...n,values:e["x-values"]||r.map((e=>({...e,shortcut:""})))})}function g(e,t){return{...c("default",e,t),type:"datamap",tableView:!1,input:!0,valueComponent:{...e.additionalProperties?c("any",e.additionalProperties,t):{},hideLabel:!0,tableView:!0}}}u("any",m),u("array",d),u("boolean",(function(e,t){const n=c("default",e,t);return(0,l.cleanObject)({...n,input:!0,type:n.type||"checkbox"})})),u("date",(function(e,t){const n=c("default",e,t),r={enableMinDateInput:!1,enableMaxDateInput:!1,input:!0,...n,type:"datetime",datePicker:{disableWeekends:!1,disableWeekdays:!1,...(0,l.getValue)(n,"datePicker")},widget:{type:"calendar",displayInTimezone:"viewer",locale:"en",useLocaleSettings:!1,allowInput:!0,mode:"single",noCalendar:!1,hourIncrement:1,minuteIncrement:1,minDate:null,disableWeekends:!1,disableWeekdays:!1,maxDate:null,...(0,l.getValue)(n,"widget")}};return"date"===e.format?{...r,format:"yyyy-MM-dd",enableTime:!1,widget:{...r.widget,enableTime:!1,format:"yyyy-MM-dd",...(0,l.getValue)(n,"widget")}}:{...r,timePicker:{showMeridian:!1,...(0,l.getValue)(n,"timePicker")},widget:{...r.widget,enableTime:!0,time_24hr:!0,...(0,l.getValue)(n,"widget")}}})),u("default",y),u("enum",b),u("map",g);const h=/([\p{Ll}\d])(\p{Lu})/gu,w=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,x=/(\d)\p{Ll}|(\p{L})\d/u,j=/[^\p{L}\d]+/giu,C="$1\0$2",v="";function k(e){let t=e.trim();t=t.replace(h,C).replace(w,C),t=t.replace(j,"\0");let n=0,r=t.length;for(;"\0"===t.charAt(n);)n++;if(n===r)return[];for(;"\0"===t.charAt(r-1);)r--;return t.slice(n,r).split(/\0/g)}function O(e){const t=k(e);for(let e=0;e<t.length;e++){const n=t[e],r=x.exec(n);if(r){const o=r.index+(r[1]??r[2]).length;t.splice(e,1,n.slice(0,o),n.slice(o))}}return t}function S(e,t){const[n,r,o]=P(e,t),i=L(t?.locale),a=V(t?.locale),u=t?.mergeAmbiguousCharacters?E(i,a):function(e,t){return(n,r)=>{const o=n[0];return(r>0&&o>="0"&&o<="9"?"_"+o:t(o))+e(n.slice(1))}}(i,a);return n+r.map(((e,t)=>0===t?i(e):u(e,t))).join(t?.delimiter??"")+o}function M(e,t){return function(e,t){const[n,r,o]=P(e,t);return n+r.map(L(t?.locale)).join(t?.delimiter??" ")+o}(e,{delimiter:"-",...t})}function T(e,t){const[n,r,o]=P(e,t),i=L(t?.locale),a=V(t?.locale),u=E(i,a);return n+r.map(((e,t)=>0===t?u(e):i(e))).join(t?.delimiter??" ")+o}function L(e){return!1===e?e=>e.toLowerCase():t=>t.toLocaleLowerCase(e)}function V(e){return!1===e?e=>e.toUpperCase():t=>t.toLocaleUpperCase(e)}function E(e,t){return n=>`${t(n[0])}${e(n.slice(1))}`}function P(e,t={}){const n=t.split??(t.separateNumbers?O:k),r=t.prefixCharacters??v,o=t.suffixCharacters??v;let i=0,a=e.length;for(;i<e.length;){const t=e.charAt(i);if(!r.includes(t))break;i++}for(;a>i;){const t=a-1,n=e.charAt(t);if(!o.includes(n))break;a=t}return[e.slice(0,i),n(e.slice(i,a)),e.slice(a)]}function F(e,t){return{...c("default",e,t),label:!1,tableView:!1,type:"form",display:"form",input:!0,components:[{key:"panel",label:t.parentKey&&T(t.parentKey),...c("panel",e,t)}]}}function W(e,t){const n=c("default",e,t);return(0,l.cleanObject)({...n,input:!0,delimiter:(0,l.getValue)(n,"delimiter",!1),inputFormat:(0,l.getValue)(n,"inputFormat","plain"),mask:(0,l.getValue)(n,"mask",!1),requireDecimal:!1,type:"number"})}function q(e,t){return{...c("default",e,t),rowDrafts:!1,type:"editgrid",input:!0,components:c("properties",e,t)}}function $(e,t){return{...c("default",e,t),collapsible:!1,input:!1,tableView:!1,components:c("properties",e,t)}}function D(e,t,n,r){const o=(n.required||[]).includes(e),i={...t.validate||{},required:o,pattern:r.pattern,minLength:!o||o&&r.minLength>1?r.minLength:void 0,maxLength:r.maxLength,min:r.minimum||r.minItems,max:r.maximum||r.maxItems};switch(r.type){case"string":0===r.minLength&&i.required&&(i.minLength=void 0,i.required=!1);break;case"boolean":i.required=!1}return(0,l.cleanObject)(i)}function I(e,t){const n={label:"Tabs",key:"tabs",type:"tabs",input:!1,tableView:!1,components:new Map,pushed:!1},r=[];return Object.entries(e.properties).forEach((([o,i])=>{const a=i["x-formiotabs"],u=c("any",i,{...t,parentKey:o});let s=(0,l.cleanObject)({key:o,...u,label:0==u.label?void 0:u.label||i.title||T(o),validate:D(o,u,e,i)});s=function(e,t){if(e.data){const n={...e.data};return Object.entries(n).forEach((([r,o])=>{(0,l.isFunction)(o)&&t.resolvers.push((async i=>{n[r]=await o({...t,component:e,form:i})}))})),{...e,data:n}}return e}(s,t),a?(n.pushed||(r.push(n),n.pushed=!0),n.components.has(a.key)||n.components.set(a.key,{...a,components:[]}),n.components.get(a.key).components.push(s)):r.push(s)})),n.components.size&&(n.components=[...n.components.values()]),r}function J(e,t){if(e.format){const n=c("default",e,t);switch(e.format){case"date":case"date-time":return c("date",e,t);case"uri":return(0,l.cleanObject)({input:!0,...n,type:n.type||"url"});default:return(0,l.cleanObject)({input:!0,...n,type:n.type||e.format})}}if(e.enum){const n=c("enum",e,t);return{...n,type:n.type||"radio"}}const n=c("default",e,t);return(0,l.cleanObject)({input:!0,type:n.type||"textfield",...n})}u("nested",F),u("number",W),u("integer",W),u("editgrid",q),u("panel",$),u("properties",I),u("string",J);var K=o(538);function A(e){return e=Object.entries(e).reduce(((e,[t,n])=>("validate"===t&&(e["x-formio-validate"]={...e["x-formio-validate"]||{},...n}),{...e,[`x-formio-${t}`]:n})),{}),(0,K.JsonEntityFn)((t=>{Object.entries(e).forEach((([e,n])=>{t.itemSchema.customKey(e,n),t.isCollection&&t.schema.customKey(e,n)}))}))}function N(e){return A({conditional:e})}function U(e,t){return N({show:!0,when:e,eq:t})}function _(e,t){return N({show:!1,when:e,eq:t})}function z(e={}){return A({currency:"USD",inputFormat:"plain",mask:!1,spellcheck:!0,delimiter:!0,...e,type:"currency"})}function H(e){return A({customClass:e})}function R(e){return(0,l.isArrowFn)(e)&&(e=function(e){const t=e.toString(),[n,...r]=t.split("=>");let o=r.join("=>");return n.includes("{")||(o=o.replace(new RegExp(`${n.trim()}.`,"gi"),"")),`show = ${o.trim()}`}(e)),A({customConditional:e})}const G=e=>async t=>{const n=await e(t);return JSON.stringify(n)};function B(e,t={}){return A({...t,dataSrc:"json",data:{...t.data,json:(0,l.isFunction)(e)?G(e):JSON.stringify(e)}})}function Q(e,t={}){return A({...t,dataSrc:"url",data:{...t.data,url:e}})}function X(e){return A({errorLabel:e})}function Y(e,t){return A({validate:{[e]:t}})}function Z(e){return Y("customMessage",e)}const ee=new Map;function te(e){return(0,K.JsonEntityFn)((t=>"property"===t.decoratorType?A({label:e}):(0,K.CustomKey)("x-formio-label",e)))}function ne(e={}){return(0,l.useDecorators)((t=>{const n=e.name||(0,l.nameOf)(t),r=M(n);ee.set(n,t),ee.set(r,t)}),e.name&&(0,K.Name)(e.name),e.label&&te(e.label),e&&(0,l.StoreSet)("formio:form",e))}function re(e=!0){return A({hidden:e})}function oe(e={}){return(0,l.useDecorators)((0,K.CollectionOf)(String),A({...e,tableView:!1,storeas:"array",type:"tags"}))}function ie(e,t=""){return A({inputMask:e,inputMaskPlaceholderChar:t})}function ae(...e){return A({inputMasks:e})}function ue(e){return Y("maxWords",e)}function se(e){return Y("minWords",e)}function ce(e=!0){return A({modalEdit:e})}function le(e=!1){return A({multiple:e})}function pe(e=!0){return A({openWhenEmpty:e})}function me(e={}){return A({...e,type:"password",protected:!0})}function de(e){return A({placeholder:e})}function fe(e){return A({prefix:e})}function ye(e={}){return A({selectThreshold:.3,input:!0,widget:"choicesjs",...e,type:"select"})}function be(e){return A({suffix:e})}function ge(e){return A({tableView:e})}function he(e){return(0,K.JsonEntityFn)((t=>{t.schema.customKey("x-formiotabs",{key:S(e),label:e})}))}function we(e={}){return A({autoExpand:!1,...e,type:"textarea"})}function xe(e){return A({case:e})}function je(e){return A({tooltip:e})}async function Ce(e,t={}){if(!e)return;if((0,l.isString)(e))return Ce(ee.get(e),t);const n=K.JsonEntityStore.from(e),r=(0,K.getJsonSchema)(n,{...t,inlineEnums:!0,customKeys:!0}),o=n.schema.getName(),i=M(o),a=[],u=c("properties",r,{...t,definitions:r.definitions,resolvers:a}),s={title:o,type:"form",display:"form",tags:[],access:[],submissionAccess:[],...n.store.get("formio:form",{}),name:i,machineName:i,components:u};return await Promise.all(a.map((e=>e(s,t)))),s}return i})()));
|
|
2
|
-
//# sourceMappingURL=schema-formio.umd.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema-formio.umd.min.js","mappings":"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","sources":["webpack://@tsed/schema-formio/webpack/universalModuleDefinition","webpack://@tsed/schema-formio/external umd \"@tsed/core\"","webpack://@tsed/schema-formio/external umd \"@tsed/schema\"","webpack://@tsed/schema-formio/webpack/bootstrap","webpack://@tsed/schema-formio/webpack/runtime/define property getters","webpack://@tsed/schema-formio/webpack/runtime/hasOwnProperty shorthand","webpack://@tsed/schema-formio/webpack/runtime/make namespace object","webpack://@tsed/schema-formio/./src/registries/FormioMappersContainer.ts","webpack://@tsed/schema-formio/./src/utils/getRef.ts","webpack://@tsed/schema-formio/./src/components/anyToComponent.ts","webpack://@tsed/schema-formio/./src/components/arrayToComponent.ts","webpack://@tsed/schema-formio/./src/utils/getFormioProps.ts","webpack://@tsed/schema-formio/./src/components/defaultToComponent.ts","webpack://@tsed/schema-formio/./src/components/enumToComponent.ts","webpack://@tsed/schema-formio/./src/components/mapToComponent.ts","webpack://@tsed/schema-formio/./src/components/booleanToComponent.ts","webpack://@tsed/schema-formio/./src/components/dateToComponent.ts","webpack://@tsed/schema-formio/../../../node_modules/change-case/dist/index.js","webpack://@tsed/schema-formio/./src/components/nestedToComponent.ts","webpack://@tsed/schema-formio/./src/components/numberToComponent.ts","webpack://@tsed/schema-formio/./src/components/objectToEditGrid.ts","webpack://@tsed/schema-formio/./src/components/panelToComponent.ts","webpack://@tsed/schema-formio/./src/components/propertiesToComponents.ts","webpack://@tsed/schema-formio/./src/components/stringToComponent.ts","webpack://@tsed/schema-formio/./src/decorators/component.ts","webpack://@tsed/schema-formio/./src/decorators/conditional.ts","webpack://@tsed/schema-formio/./src/decorators/currency.ts","webpack://@tsed/schema-formio/./src/decorators/customClass.ts","webpack://@tsed/schema-formio/./src/decorators/customConditional.ts","webpack://@tsed/schema-formio/./src/decorators/dataSourceJson.ts","webpack://@tsed/schema-formio/./src/decorators/dataSourceUrl.ts","webpack://@tsed/schema-formio/./src/decorators/errorLabel.ts","webpack://@tsed/schema-formio/./src/decorators/validate.ts","webpack://@tsed/schema-formio/./src/decorators/errorMessage.ts","webpack://@tsed/schema-formio/./src/registries/FormsContainer.ts","webpack://@tsed/schema-formio/./src/decorators/label.ts","webpack://@tsed/schema-formio/./src/decorators/form.ts","webpack://@tsed/schema-formio/./src/decorators/hidden.ts","webpack://@tsed/schema-formio/./src/decorators/inputTags.ts","webpack://@tsed/schema-formio/./src/decorators/mask.ts","webpack://@tsed/schema-formio/./src/decorators/maxWords.ts","webpack://@tsed/schema-formio/./src/decorators/minWords.ts","webpack://@tsed/schema-formio/./src/decorators/modalEdit.ts","webpack://@tsed/schema-formio/./src/decorators/multiple.ts","webpack://@tsed/schema-formio/./src/decorators/openWhenEmpty.ts","webpack://@tsed/schema-formio/./src/decorators/password.ts","webpack://@tsed/schema-formio/./src/decorators/placeholder.ts","webpack://@tsed/schema-formio/./src/decorators/prefix.ts","webpack://@tsed/schema-formio/./src/decorators/select.ts","webpack://@tsed/schema-formio/./src/decorators/suffix.ts","webpack://@tsed/schema-formio/./src/decorators/tableView.ts","webpack://@tsed/schema-formio/./src/decorators/tabs.ts","webpack://@tsed/schema-formio/./src/decorators/textarea.ts","webpack://@tsed/schema-formio/./src/decorators/textCase.ts","webpack://@tsed/schema-formio/./src/decorators/tooltip.ts","webpack://@tsed/schema-formio/./src/utils/getFormioSchema.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@tsed/core\"), require(\"@tsed/schema\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"@tsed/core\", \"@tsed/schema\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@tsed/schema-formio\"] = factory(require(\"@tsed/core\"), require(\"@tsed/schema\"));\n\telse\n\t\troot[\"@tsed/schema-formio\"] = factory(root[\"@tsed/core\"], root[\"@tsed/schema\"]);\n})(self, (__WEBPACK_EXTERNAL_MODULE__414__, __WEBPACK_EXTERNAL_MODULE__538__) => {\nreturn ","module.exports = __WEBPACK_EXTERNAL_MODULE__414__;","module.exports = __WEBPACK_EXTERNAL_MODULE__538__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export interface FormioMapper {\n (schema: any, options: any): any;\n}\n\nconst FormioMappersContainer: Map<string, FormioMapper> = new Map();\n\nexport function registerFormioMapper(type: string, mapper: FormioMapper) {\n return FormioMappersContainer.set(type, mapper);\n}\n\nexport function getFormioMapper(type: string): FormioMapper {\n // istanbul ignore next\n if (!FormioMappersContainer.has(type)) {\n throw new Error(`Formio ${type} mapper doesn't exists`);\n }\n return FormioMappersContainer.get(type)!;\n}\n\nexport function execMapper(type: string, schema: any, options: any): any {\n return getFormioMapper(type)(schema, options);\n}\n","import {getValue} from \"@tsed/core\";\n\nexport function getRef(schema: any, options: any) {\n if (schema.$ref) {\n return getValue(options, schema.$ref.replace(\"#/\", \"\").replace(/\\//g, \".\"));\n }\n return schema;\n}\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\nimport {getRef} from \"../utils/getRef.js\";\n\nexport function anyToComponent(schema: any, options: any) {\n schema = getRef(schema, options);\n\n switch (schema?.type) {\n case \"object\":\n if (!schema.properties && !schema.$ref) {\n return execMapper(\"map\", schema, options);\n }\n\n return execMapper(\"nested\", schema, options);\n case \"array\":\n return execMapper(\"array\", schema, options);\n case \"string\":\n return execMapper(\"string\", schema, options);\n case \"boolean\":\n return execMapper(\"boolean\", schema, options);\n case \"integer\":\n case \"number\":\n return execMapper(\"number\", schema, options);\n }\n\n return {};\n}\n\nregisterFormioMapper(\"any\", anyToComponent);\n","import {cleanObject} from \"@tsed/core\";\n\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\nimport {getRef} from \"../utils/getRef.js\";\n\nexport function arrayToComponent(schema: any, options: any) {\n const itemSchema = schema.items.$ref ? getRef(schema.items, options) : schema.items;\n\n const {type} = itemSchema;\n\n switch (type) {\n case \"object\": // editgrid\n return {\n ...execMapper(\"default\", schema, options),\n ...execMapper(\"editgrid\", itemSchema, options)\n };\n case \"string\": // tag or enum?\n if (itemSchema.enum) {\n const component = execMapper(\"enum\", itemSchema, options);\n\n return {\n ...component,\n inline: false,\n type: \"selectboxes\"\n };\n }\n\n const component = execMapper(type, itemSchema, options);\n\n return cleanObject({\n ...component,\n multiple: component.type === \"tags\" ? undefined : true\n });\n default:\n case \"number\":\n return {\n ...execMapper(type, itemSchema, options),\n multiple: true\n };\n }\n}\n\nregisterFormioMapper(\"array\", arrayToComponent);\n","export function getFormioProps(schema: any) {\n const formioProps: any = Object.entries(schema).reduce((props, [key, value]) => {\n if (key.startsWith(\"x-formio-\")) {\n return {\n ...props,\n [key.replace(\"x-formio-\", \"\")]: value\n };\n }\n return props;\n }, {});\n return formioProps;\n}\n","import {cleanObject} from \"@tsed/core\";\n\nimport {registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\nimport {getFormioProps} from \"../utils/getFormioProps.js\";\n\nexport function defaultToComponent(schema: any, options: any): any {\n const formioProps = getFormioProps(schema);\n\n return cleanObject({\n ...formioProps,\n disabled: !!schema.readOnly,\n description: schema.description,\n defaultValue: schema.default\n });\n}\n\nregisterFormioMapper(\"default\", defaultToComponent);\n","import {cleanObject} from \"@tsed/core\";\n\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\n\nexport function enumToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n const values = schema.enum.map((value: any) => {\n return {\n label: value,\n value\n };\n });\n\n if (component.type === \"select\") {\n return cleanObject({\n ...component,\n data: {\n json: component.data?.json || JSON.stringify(values)\n },\n dataSrc: \"json\",\n idPath: \"value\",\n valueProperty: \"value\",\n template: component.template || \"<span>{{ item.label }}</span>\"\n });\n }\n\n return cleanObject({\n ...component,\n values: schema[\"x-values\"] || values.map((value: any) => ({...value, shortcut: \"\"}))\n });\n}\n\nregisterFormioMapper(\"enum\", enumToComponent);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\n\nexport function mapToComponent(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n type: \"datamap\",\n tableView: false,\n input: true,\n valueComponent: {\n ...(schema.additionalProperties ? execMapper(\"any\", schema.additionalProperties, options) : {}),\n hideLabel: true,\n tableView: true\n }\n };\n}\n\nregisterFormioMapper(\"map\", mapToComponent);\n","import {cleanObject} from \"@tsed/core\";\n\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\n\nfunction booleanToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n\n return cleanObject({\n ...component,\n input: true,\n type: component.type || \"checkbox\"\n });\n}\n\nregisterFormioMapper(\"boolean\", booleanToComponent);\n","import {getValue} from \"@tsed/core\";\n\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\n\nfunction dateToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n\n const base = {\n enableMinDateInput: false,\n enableMaxDateInput: false,\n input: true,\n ...component,\n type: \"datetime\",\n datePicker: {\n disableWeekends: false,\n disableWeekdays: false,\n ...getValue(component, \"datePicker\")\n },\n widget: {\n type: \"calendar\",\n displayInTimezone: \"viewer\",\n locale: \"en\",\n useLocaleSettings: false,\n allowInput: true,\n mode: \"single\",\n noCalendar: false,\n hourIncrement: 1,\n minuteIncrement: 1,\n minDate: null,\n disableWeekends: false,\n disableWeekdays: false,\n maxDate: null,\n ...getValue(component, \"widget\")\n }\n };\n\n if (schema.format === \"date\") {\n return {\n ...base,\n format: \"yyyy-MM-dd\",\n enableTime: false,\n widget: {\n ...base.widget,\n enableTime: false,\n format: \"yyyy-MM-dd\",\n ...getValue(component, \"widget\")\n }\n };\n }\n\n return {\n ...base,\n timePicker: {\n showMeridian: false,\n ...getValue(component, \"timePicker\")\n },\n widget: {\n ...base.widget,\n enableTime: true,\n time_24hr: true,\n ...getValue(component, \"widget\")\n }\n };\n}\n\nregisterFormioMapper(\"date\", dateToComponent);\n","// Regexps involved with splitting words in various case formats.\nconst SPLIT_LOWER_UPPER_RE = /([\\p{Ll}\\d])(\\p{Lu})/gu;\nconst SPLIT_UPPER_UPPER_RE = /(\\p{Lu})([\\p{Lu}][\\p{Ll}])/gu;\n// Used to iterate over the initial split result and separate numbers.\nconst SPLIT_SEPARATE_NUMBER_RE = /(\\d)\\p{Ll}|(\\p{L})\\d/u;\n// Regexp involved with stripping non-word characters from the result.\nconst DEFAULT_STRIP_REGEXP = /[^\\p{L}\\d]+/giu;\n// The replacement value for splits.\nconst SPLIT_REPLACE_VALUE = \"$1\\0$2\";\n// The default characters to keep after transforming case.\nconst DEFAULT_PREFIX_SUFFIX_CHARACTERS = \"\";\n/**\n * Split any cased input strings into an array of words.\n */\nexport function split(value) {\n let result = value.trim();\n result = result\n .replace(SPLIT_LOWER_UPPER_RE, SPLIT_REPLACE_VALUE)\n .replace(SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE);\n result = result.replace(DEFAULT_STRIP_REGEXP, \"\\0\");\n let start = 0;\n let end = result.length;\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === \"\\0\")\n start++;\n if (start === end)\n return [];\n while (result.charAt(end - 1) === \"\\0\")\n end--;\n return result.slice(start, end).split(/\\0/g);\n}\n/**\n * Split the input string into an array of words, separating numbers.\n */\nexport function splitSeparateNumbers(value) {\n const words = split(value);\n for (let i = 0; i < words.length; i++) {\n const word = words[i];\n const match = SPLIT_SEPARATE_NUMBER_RE.exec(word);\n if (match) {\n const offset = match.index + (match[1] ?? match[2]).length;\n words.splice(i, 1, word.slice(0, offset), word.slice(offset));\n }\n }\n return words;\n}\n/**\n * Convert a string to space separated lower case (`foo bar`).\n */\nexport function noCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n return (prefix +\n words.map(lowerFactory(options?.locale)).join(options?.delimiter ?? \" \") +\n suffix);\n}\n/**\n * Convert a string to camel case (`fooBar`).\n */\nexport function camelCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n const transform = options?.mergeAmbiguousCharacters\n ? capitalCaseTransformFactory(lower, upper)\n : pascalCaseTransformFactory(lower, upper);\n return (prefix +\n words\n .map((word, index) => {\n if (index === 0)\n return lower(word);\n return transform(word, index);\n })\n .join(options?.delimiter ?? \"\") +\n suffix);\n}\n/**\n * Convert a string to pascal case (`FooBar`).\n */\nexport function pascalCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n const transform = options?.mergeAmbiguousCharacters\n ? capitalCaseTransformFactory(lower, upper)\n : pascalCaseTransformFactory(lower, upper);\n return prefix + words.map(transform).join(options?.delimiter ?? \"\") + suffix;\n}\n/**\n * Convert a string to pascal snake case (`Foo_Bar`).\n */\nexport function pascalSnakeCase(input, options) {\n return capitalCase(input, { delimiter: \"_\", ...options });\n}\n/**\n * Convert a string to capital case (`Foo Bar`).\n */\nexport function capitalCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n return (prefix +\n words\n .map(capitalCaseTransformFactory(lower, upper))\n .join(options?.delimiter ?? \" \") +\n suffix);\n}\n/**\n * Convert a string to constant case (`FOO_BAR`).\n */\nexport function constantCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n return (prefix +\n words.map(upperFactory(options?.locale)).join(options?.delimiter ?? \"_\") +\n suffix);\n}\n/**\n * Convert a string to dot case (`foo.bar`).\n */\nexport function dotCase(input, options) {\n return noCase(input, { delimiter: \".\", ...options });\n}\n/**\n * Convert a string to kebab case (`foo-bar`).\n */\nexport function kebabCase(input, options) {\n return noCase(input, { delimiter: \"-\", ...options });\n}\n/**\n * Convert a string to path case (`foo/bar`).\n */\nexport function pathCase(input, options) {\n return noCase(input, { delimiter: \"/\", ...options });\n}\n/**\n * Convert a string to path case (`Foo bar`).\n */\nexport function sentenceCase(input, options) {\n const [prefix, words, suffix] = splitPrefixSuffix(input, options);\n const lower = lowerFactory(options?.locale);\n const upper = upperFactory(options?.locale);\n const transform = capitalCaseTransformFactory(lower, upper);\n return (prefix +\n words\n .map((word, index) => {\n if (index === 0)\n return transform(word);\n return lower(word);\n })\n .join(options?.delimiter ?? \" \") +\n suffix);\n}\n/**\n * Convert a string to snake case (`foo_bar`).\n */\nexport function snakeCase(input, options) {\n return noCase(input, { delimiter: \"_\", ...options });\n}\n/**\n * Convert a string to header case (`Foo-Bar`).\n */\nexport function trainCase(input, options) {\n return capitalCase(input, { delimiter: \"-\", ...options });\n}\nfunction lowerFactory(locale) {\n return locale === false\n ? (input) => input.toLowerCase()\n : (input) => input.toLocaleLowerCase(locale);\n}\nfunction upperFactory(locale) {\n return locale === false\n ? (input) => input.toUpperCase()\n : (input) => input.toLocaleUpperCase(locale);\n}\nfunction capitalCaseTransformFactory(lower, upper) {\n return (word) => `${upper(word[0])}${lower(word.slice(1))}`;\n}\nfunction pascalCaseTransformFactory(lower, upper) {\n return (word, index) => {\n const char0 = word[0];\n const initial = index > 0 && char0 >= \"0\" && char0 <= \"9\" ? \"_\" + char0 : upper(char0);\n return initial + lower(word.slice(1));\n };\n}\nfunction splitPrefixSuffix(input, options = {}) {\n const splitFn = options.split ?? (options.separateNumbers ? splitSeparateNumbers : split);\n const prefixCharacters = options.prefixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;\n const suffixCharacters = options.suffixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;\n let prefixIndex = 0;\n let suffixIndex = input.length;\n while (prefixIndex < input.length) {\n const char = input.charAt(prefixIndex);\n if (!prefixCharacters.includes(char))\n break;\n prefixIndex++;\n }\n while (suffixIndex > prefixIndex) {\n const index = suffixIndex - 1;\n const char = input.charAt(index);\n if (!suffixCharacters.includes(char))\n break;\n suffixIndex = index;\n }\n return [\n input.slice(0, prefixIndex),\n splitFn(input.slice(prefixIndex, suffixIndex)),\n input.slice(suffixIndex),\n ];\n}\n//# sourceMappingURL=index.js.map","import {sentenceCase} from \"change-case\";\n\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\n\nexport function nestedToComponent(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n label: false,\n tableView: false,\n type: \"form\",\n display: \"form\",\n input: true,\n components: [\n {\n key: \"panel\",\n label: options.parentKey && sentenceCase(options.parentKey),\n ...execMapper(\"panel\", schema, options)\n }\n ]\n };\n}\n\nregisterFormioMapper(\"nested\", nestedToComponent);\n","import {cleanObject, getValue} from \"@tsed/core\";\n\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\n\nexport function numberToComponent(schema: any, options: any) {\n const component = execMapper(\"default\", schema, options);\n\n return cleanObject({\n ...component,\n input: true,\n delimiter: getValue(component, \"delimiter\", false),\n inputFormat: getValue(component, \"inputFormat\", \"plain\"),\n mask: getValue(component, \"mask\", false),\n requireDecimal: false,\n type: \"number\"\n });\n}\n\nregisterFormioMapper(\"number\", numberToComponent);\nregisterFormioMapper(\"integer\", numberToComponent);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\n\nexport function objectToEditGrid(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n rowDrafts: false,\n type: \"editgrid\",\n input: true,\n components: execMapper(\"properties\", schema, options)\n };\n}\n\nregisterFormioMapper(\"editgrid\", objectToEditGrid);\n","import {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\n\nexport function panelToComponent(schema: any, options: any) {\n return {\n ...execMapper(\"default\", schema, options),\n collapsible: false,\n input: false,\n tableView: false,\n components: execMapper(\"properties\", schema, options)\n };\n}\n\nregisterFormioMapper(\"panel\", panelToComponent);\n","import {cleanObject, isFunction} from \"@tsed/core\";\nimport {FormioComponent, FormioForm} from \"@tsed/formio-types\";\nimport {sentenceCase} from \"change-case\";\n\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\n\nfunction bindResolvers(component: FormioComponent, options: any) {\n if (component.data) {\n const data = {...component.data};\n\n Object.entries(data).forEach(([key, resolver]) => {\n if (isFunction(resolver)) {\n options.resolvers.push(async (form: FormioForm) => {\n data[key] = await resolver({...options, component, form});\n });\n }\n });\n\n return {\n ...component,\n data\n };\n }\n\n return component;\n}\n\nfunction mapValidation(key: string, base: FormioComponent, schema: any, propSchema: any) {\n const required = (schema.required || []).includes(key);\n const validate = {\n ...(base.validate || {}),\n required,\n pattern: propSchema.pattern,\n minLength: !required || (required && propSchema.minLength > 1) ? propSchema.minLength : undefined,\n maxLength: propSchema.maxLength,\n min: propSchema.minimum || propSchema.minItems,\n max: propSchema.maximum || propSchema.maxItems\n };\n\n switch (propSchema.type) {\n case \"string\":\n if (propSchema.minLength === 0 && validate.required) {\n validate.minLength = undefined;\n validate.required = false;\n }\n break;\n case \"boolean\":\n validate.required = false;\n break;\n }\n\n return cleanObject(validate);\n}\n\nexport function propertiesToComponents(schema: any, options: any): any[] {\n const tabs = {\n label: \"Tabs\",\n key: \"tabs\",\n type: \"tabs\",\n input: false,\n tableView: false,\n components: new Map<string, any>(),\n pushed: false\n };\n const components: any[] = [];\n\n Object.entries(schema.properties).forEach(([key, propSchema]: [string, any]) => {\n const tabsOptions = propSchema[\"x-formiotabs\"];\n const base = execMapper(\"any\", propSchema, {...options, parentKey: key});\n\n let component = cleanObject({\n key,\n ...base,\n label: base.label == false ? undefined : base.label || propSchema.title || sentenceCase(key),\n validate: mapValidation(key, base, schema, propSchema)\n });\n\n component = bindResolvers(component, options);\n\n if (tabsOptions) {\n if (!tabs.pushed) {\n components.push(tabs);\n tabs.pushed = true;\n }\n\n if (!tabs.components.has(tabsOptions.key)) {\n tabs.components.set(tabsOptions.key, {\n ...tabsOptions,\n components: []\n });\n }\n\n tabs.components.get(tabsOptions.key).components.push(component);\n } else {\n components.push(component);\n }\n });\n\n if (tabs.components.size) {\n tabs.components = [...tabs.components.values()] as any;\n }\n\n return components;\n}\n\nregisterFormioMapper(\"properties\", propertiesToComponents);\n","import {cleanObject} from \"@tsed/core\";\n\nimport {execMapper, registerFormioMapper} from \"../registries/FormioMappersContainer.js\";\n\nexport function stringToComponent(schema: any, options: any) {\n if (schema.format) {\n const component = execMapper(\"default\", schema, options);\n switch (schema.format) {\n case \"date\":\n case \"date-time\":\n return execMapper(\"date\", schema, options);\n case \"uri\":\n return cleanObject({\n input: true,\n ...component,\n type: component.type || \"url\"\n });\n default:\n return cleanObject({\n input: true,\n ...component,\n type: component.type || schema.format\n });\n }\n }\n\n if (schema.enum) {\n const component = execMapper(\"enum\", schema, options);\n\n return {\n ...component,\n type: component.type || \"radio\"\n };\n }\n\n const component = execMapper(\"default\", schema, options);\n return cleanObject({\n input: true,\n type: component.type || \"textfield\",\n ...component\n });\n}\n\nregisterFormioMapper(\"string\", stringToComponent);\n","import {JsonEntityFn, JsonEntityStore} from \"@tsed/schema\";\n\n/**\n * Declare a formio Component schema on the decorated propertyKey.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Component(component: Record<string, any>): PropertyDecorator {\n component = Object.entries(component).reduce((component: Record<string, any>, [key, value]) => {\n if (key === \"validate\") {\n component[\"x-formio-validate\"] = {\n ...(component[\"x-formio-validate\"] || {}),\n ...value\n };\n }\n\n return {\n ...component,\n [`x-formio-${key}`]: value\n };\n }, {});\n\n return JsonEntityFn((store: JsonEntityStore) => {\n Object.entries(component).forEach(([key, value]) => {\n store.itemSchema.customKey(key, value);\n\n if (store.isCollection) {\n store.schema.customKey(key, value);\n }\n });\n });\n}\n","import {Component} from \"./component.js\";\n\n/**\n * Adds a conditional display rule on the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param conditional\n */\nexport function Conditional(conditional: {show: boolean; when: string; eq: any}) {\n return Component({\n conditional\n });\n}\n\n/**\n * Adds a conditional display rule on the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param property\n * @param eq\n */\nexport function ShowWhen(property: string, eq: any) {\n return Conditional({\n show: true,\n when: property,\n eq\n });\n}\n\n/**\n * Adds a conditional display rule on the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param property\n * @param eq\n */\nexport function HideWhen(property: string, eq: any) {\n return Conditional({\n show: false,\n when: property,\n eq\n });\n}\n","import {Component} from \"./component.js\";\n/**\n * Configure the property as Currency component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Currency(props: Record<string, any> = {}): PropertyDecorator {\n return Component({\n currency: \"USD\",\n inputFormat: \"plain\",\n mask: false,\n spellcheck: true,\n delimiter: true,\n ...props,\n type: \"currency\"\n });\n}\n","import {Component} from \"./component.js\";\n\n/**\n * Add a custom css class.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function CustomClass(customClass: string) {\n return Component({\n customClass\n });\n}\n","import {isArrowFn} from \"@tsed/core\";\nimport {FormioComponent, FormioForm, FormioSubmission} from \"@tsed/formio-types\";\nimport type {Utils} from \"formiojs\";\nimport type {LoDashStatic} from \"lodash\";\nimport type {Moment} from \"moment\";\n\nimport {Component} from \"./component.js\";\n\nexport interface CustomConditionalCtx<Value = any, Data = any, Row = any> {\n /**\n * The complete submission object.\n */\n form: FormioForm;\n /**\n * The complete submission object.\n */\n submission: FormioSubmission<Data>;\n /**\n * The complete submission data object.\n */\n data: Data;\n /**\n * Contextual \"row\" data, used within DataGrid, EditGrid, and Container components\n */\n row: Row;\n /**\n * The current component JSON\n */\n component: FormioComponent;\n /**\n * The current component instance.\n */\n instance: any;\n /**\n * The current value of the component.\n */\n value: Value;\n /**\n * The moment.js library for date manipulation.\n */\n moment: Moment;\n /**\n * An instance of Lodash.\n */\n _: LoDashStatic;\n /**\n * An instance of the FormioUtils object.\n */\n utils: typeof Utils;\n /**\n * An alias for \"utils\".\n */\n util: typeof Utils;\n}\n\nfunction sanitize(customConditional: Function) {\n const str = customConditional.toString();\n\n const [signature, ...fn] = str.split(\"=>\");\n let content = fn.join(\"=>\");\n\n if (!signature.includes(\"{\")) {\n content = content.replace(new RegExp(`${signature.trim()}.`, \"gi\"), \"\");\n }\n\n return `show = ${content.trim()}`;\n}\n\n/**\n * Adds custom conditional rule to display or not the input form.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param customConditional\n */\nexport function CustomConditional(customConditional: string | ((ctx: CustomConditionalCtx) => any)) {\n if (isArrowFn(customConditional)) {\n customConditional = sanitize(customConditional);\n }\n\n return Component({\n customConditional\n });\n}\n","import {isFunction} from \"@tsed/core\";\n\nimport {FormioDataResolver, FormioDataResolverCtx} from \"../domain/FormioDataResolver.js\";\nimport {Component} from \"./component.js\";\n\nconst wrap = (resolver: FormioDataResolver) => async (opts: FormioDataResolverCtx) => {\n const result = await resolver(opts);\n return JSON.stringify(result);\n};\n\n/**\n * Set custom json data source\n * @param data\n * @param props\n * @constructor\n */\nexport function DataSourceJson(data: any | FormioDataResolver, props: Record<string, any> = {}) {\n return Component({\n ...props,\n dataSrc: \"json\",\n data: {\n ...props.data,\n json: isFunction(data) ? wrap(data) : JSON.stringify(data)\n }\n });\n}\n","import {FormioDataResolver} from \"../domain/FormioDataResolver.js\";\nimport {Component} from \"./component.js\";\n\n/**\n * Set URL data on the current component.\n * @param url\n * @param props\n * @constructor\n */\nexport function DataSourceUrl(url: string | FormioDataResolver, props: Record<string, any> = {}) {\n return Component({\n ...props,\n dataSrc: \"url\",\n data: {\n ...props.data,\n url\n }\n });\n}\n","import {Component} from \"./component.js\";\n\n/**\n * Set the error label when an error occur.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function ErrorLabel(message: string) {\n return Component({\n errorLabel: message\n });\n}\n","import {Component} from \"./component.js\";\n\n/**\n * Add validation rules.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param key\n * @param value\n */\nexport function Validate(key: string, value: any) {\n return Component({\n validate: {\n [key]: value\n }\n });\n}\n","import {Validate} from \"./validate.js\";\n\n/**\n * Add error message when an error occur.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param message\n */\nexport function ErrorMessage(message: string) {\n return Validate(\"customMessage\", message);\n}\n","import {Type} from \"@tsed/core\";\n\n// tslint:disable-next-line:variable-name\nexport const FormsContainer: Map<string, Type> = new Map();\n","import {CustomKey, JsonEntityFn} from \"@tsed/schema\";\n\nimport {Component} from \"./component.js\";\n\n/**\n * Change the label field\n * @decorator\n * @formio\n * @property\n * @schema\n * @param label\n */\nexport function Label(label: string) {\n return JsonEntityFn((entity) => {\n return entity.decoratorType === \"property\"\n ? Component({\n label\n })\n : CustomKey(\"x-formio-label\", label);\n });\n}\n","import {nameOf, StoreSet, useDecorators} from \"@tsed/core\";\nimport {FormioForm} from \"@tsed/formio-types\";\nimport {Name} from \"@tsed/schema\";\nimport {kebabCase} from \"change-case\";\n\nimport {FormsContainer} from \"../registries/FormsContainer.js\";\nimport {Label} from \"./label.js\";\n\n/**\n * Expose the model as Formio Form.\n * @param form\n */\nexport function Form(form: Partial<Omit<FormioForm, \"components\" | \"_id\">> = {}): ClassDecorator {\n return useDecorators(\n (target: any) => {\n const name = form.name || nameOf(target);\n const machineName = kebabCase(name);\n FormsContainer.set(name, target as any);\n FormsContainer.set(machineName, target as any);\n },\n form.name && Name(form.name),\n form.label && Label(form.label),\n form && StoreSet(\"formio:form\", form)\n );\n}\n","import {Component} from \"./component.js\";\n\n/**\n * Set hidden field.\n *\n * A hidden field is still a part of the form, but is hidden from view.\n *\n * @param bool\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Hidden(bool: boolean = true): PropertyDecorator {\n return Component({\n hidden: bool\n });\n}\n","import {useDecorators} from \"@tsed/core\";\nimport {CollectionOf} from \"@tsed/schema\";\n\nimport {Component} from \"./component.js\";\n/**\n * Configure the property as Tags component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function InputTags(props: Record<string, any> = {}): PropertyDecorator {\n return useDecorators(\n CollectionOf(String),\n Component({\n ...props,\n tableView: false,\n storeas: \"array\",\n type: \"tags\"\n })\n );\n}\n","import {Component} from \"./component.js\";\n\n/**\n * An input mask helps the user with input by ensuring a predefined format.\n *\n * - 9: numeric\n * - a: alphabetical\n * - *: alphanumeric\n *\n * Example telephone mask: (999) 999-9999\n *\n * See the [jquery.inputmask](https://github.com/RobinHerbots/Inputmask) documentation for more information.\n *\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Mask(inputMask: string, inputMaskPlaceholderChar: string = \"\") {\n return Component({\n inputMask,\n inputMaskPlaceholderChar\n });\n}\n\n/**\n * An input mask helps the user with input by ensuring a predefined format.\n *\n * - 9: numeric\n * - a: alphabetical\n * - *: alphanumeric\n *\n * Example telephone mask: (999) 999-9999\n *\n * See the [jquery.inputmask](https://github.com/RobinHerbots/Inputmask) documentation for more information.\n *\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Masks(...inputMasks: {label: string; mask: string}[]) {\n return Component({\n inputMasks\n });\n}\n","import {Validate} from \"./validate.js\";\n\n/**\n * Add the minimum amount of words that can be added to this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param value\n */\nexport function MaxWords(value: number) {\n return Validate(\"maxWords\", value);\n}\n","import {Validate} from \"./validate.js\";\n\n/**\n * Add the maximum amount of words that can be added to this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param value\n */\nexport function MinWords(value: number) {\n return Validate(\"minWords\", value);\n}\n","import {Component} from \"./component.js\";\n\n/**\n * Opens up a modal to edit the value of this component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function ModalEdit(modalEdit = true) {\n return Component({\n modalEdit\n });\n}\n","import {Component} from \"./component.js\";\n\n/**\n * Change the multiple value on the decorated property.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Multiple(multiple = false): PropertyDecorator {\n return Component({\n multiple\n });\n}\n","import {Component} from \"./component.js\";\n\n/**\n * Open automatically the editgrid when the list is empty.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function OpenWhenEmpty(openWhenEmpty = true): PropertyDecorator {\n return Component({\n openWhenEmpty\n });\n}\n","import {Component} from \"./component.js\";\n\nexport interface PasswordOpts extends Record<string, any> {\n showCharCount?: boolean;\n showWordCount?: boolean;\n}\n/**\n * Configure the property as Password component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Password(props: PasswordOpts = {}): PropertyDecorator {\n return Component({\n ...props,\n type: \"password\",\n protected: true\n });\n}\n","import {Component} from \"./component.js\";\n\n/**\n * The placeholder text that will appear when this field is empty.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param placeholder\n */\nexport function Placeholder(placeholder: string) {\n return Component({\n placeholder\n });\n}\n","import {Component} from \"./component.js\";\n\n/**\n * Add prefix word on the decorated field.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Prefix(prefix: string) {\n return Component({\n prefix\n });\n}\n","import {Component} from \"./component.js\";\n\nexport interface SelectOpts extends Record<string, any> {\n idPath?: string;\n valueProperty?: string;\n template?: string;\n multiple?: boolean;\n}\n\n/**\n * Configure the property as Select component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Select(props: SelectOpts = {}): PropertyDecorator {\n return Component({\n selectThreshold: 0.3,\n input: true,\n widget: \"choicesjs\",\n ...props,\n type: \"select\"\n });\n}\n","import {Component} from \"./component.js\";\n\n/**\n * Add suffix word on the decorated field.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Suffix(suffix: string) {\n return Component({\n suffix\n });\n}\n","import {Component} from \"./component.js\";\n\n/**\n * Change the visibility of the current property on a table.\n * @param bool\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function TableView(bool: boolean): PropertyDecorator {\n return Component({\n tableView: bool\n });\n}\n","import {JsonEntityFn, JsonEntityStore} from \"@tsed/schema\";\nimport {camelCase} from \"change-case\";\n\n/**\n * Group the current property in tabs components.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Tabs(label: string) {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.schema.customKey(\"x-formiotabs\", {\n key: camelCase(label),\n label\n });\n });\n}\n","import {Component} from \"./component.js\";\n\nexport interface TextareaOpts extends Record<string, any> {\n showCharCount?: boolean;\n showWordCount?: boolean;\n}\n\n/**\n * Configure the property as Textarea component.\n * @decorator\n * @formio\n * @property\n * @schema\n */\nexport function Textarea(props: TextareaOpts = {}): PropertyDecorator {\n return Component({\n autoExpand: false,\n ...props,\n type: \"textarea\"\n });\n}\n","import {Component} from \"./component.js\";\n\n/**\n * Force the output of this field to be sanitized in a specific format.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param textCase\n */\nexport function TextCase(textCase: \"uppercase\" | \"lowercase\") {\n return Component({\n case: textCase\n });\n}\n","import {Component} from \"./component.js\";\n\n/**\n * Adds a tooltip to the side of this field.\n * @decorator\n * @formio\n * @property\n * @schema\n * @param tooltip\n */\nexport function Tooltip(tooltip: string) {\n return Component({\n tooltip\n });\n}\n","import \"../components/anyToComponent.js\";\nimport \"../components/arrayToComponent.js\";\nimport \"../components/booleanToComponent.js\";\nimport \"../components/dateToComponent.js\";\nimport \"../components/defaultToComponent.js\";\nimport \"../components/enumToComponent.js\";\nimport \"../components/mapToComponent.js\";\nimport \"../components/nestedToComponent.js\";\nimport \"../components/numberToComponent.js\";\nimport \"../components/objectToEditGrid.js\";\nimport \"../components/panelToComponent.js\";\nimport \"../components/propertiesToComponents.js\";\nimport \"../components/stringToComponent.js\";\n\nimport {isString, Type} from \"@tsed/core\";\nimport {FormioForm} from \"@tsed/formio-types\";\nimport {getJsonSchema, JsonEntityStore, JsonSchemaOptions} from \"@tsed/schema\";\nimport {kebabCase} from \"change-case\";\n\nimport {execMapper} from \"../registries/FormioMappersContainer.js\";\nimport {FormsContainer} from \"../registries/FormsContainer.js\";\n\nexport async function getFormioSchema(\n model: string | any | undefined,\n options: JsonSchemaOptions = {}\n): Promise<Omit<FormioForm, \"_id\" | \"deleted\" | \"owner\"> | undefined> {\n if (!model) {\n return undefined;\n }\n\n if (isString(model)) {\n return getFormioSchema(FormsContainer.get(model) as Type<any>, options);\n }\n\n const entity = JsonEntityStore.from(model);\n const schema = getJsonSchema(entity, {\n ...options,\n inlineEnums: true,\n customKeys: true\n });\n\n const name = entity.schema.getName();\n const machineName = kebabCase(name);\n const resolvers: Promise<any>[] = [];\n const components = execMapper(\"properties\", schema, {...options, definitions: schema.definitions, resolvers});\n const form = {\n title: name,\n type: \"form\",\n display: \"form\",\n tags: [],\n access: [],\n submissionAccess: [],\n ...entity.store.get<any>(\"formio:form\", {}),\n name: machineName,\n machineName,\n components\n };\n\n await Promise.all(resolvers.map((resolver: any) => resolver(form, options)));\n\n return form as unknown as FormioForm;\n}\n"],"names":["root","factory","exports","module","require","define","amd","self","__WEBPACK_EXTERNAL_MODULE__414__","__WEBPACK_EXTERNAL_MODULE__538__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","FormioMappersContainer","Map","registerFormioMapper","type","mapper","set","getFormioMapper","has","Error","execMapper","schema","options","getRef","$ref","getValue","replace","anyToComponent","properties","arrayToComponent","itemSchema","items","enum","inline","component","cleanObject","multiple","getFormioProps","entries","reduce","props","startsWith","defaultToComponent","formioProps","disabled","readOnly","description","defaultValue","default","enumToComponent","values","map","label","data","json","JSON","stringify","dataSrc","idPath","valueProperty","template","shortcut","mapToComponent","tableView","input","valueComponent","additionalProperties","hideLabel","base","enableMinDateInput","enableMaxDateInput","datePicker","disableWeekends","disableWeekdays","widget","displayInTimezone","locale","useLocaleSettings","allowInput","mode","noCalendar","hourIncrement","minuteIncrement","minDate","maxDate","format","enableTime","timePicker","showMeridian","time_24hr","SPLIT_LOWER_UPPER_RE","SPLIT_UPPER_UPPER_RE","SPLIT_SEPARATE_NUMBER_RE","DEFAULT_STRIP_REGEXP","SPLIT_REPLACE_VALUE","DEFAULT_PREFIX_SUFFIX_CHARACTERS","split","result","trim","start","end","length","charAt","slice","splitSeparateNumbers","words","i","word","match","exec","offset","index","splice","camelCase","prefix","suffix","splitPrefixSuffix","lower","lowerFactory","upper","upperFactory","transform","mergeAmbiguousCharacters","capitalCaseTransformFactory","char0","pascalCaseTransformFactory","join","delimiter","kebabCase","noCase","sentenceCase","toLowerCase","toLocaleLowerCase","toUpperCase","toLocaleUpperCase","splitFn","separateNumbers","prefixCharacters","suffixCharacters","prefixIndex","suffixIndex","char","includes","nestedToComponent","display","components","parentKey","numberToComponent","inputFormat","mask","requireDecimal","objectToEditGrid","rowDrafts","panelToComponent","collapsible","mapValidation","propSchema","required","validate","pattern","minLength","maxLength","min","minimum","minItems","max","maximum","maxItems","propertiesToComponents","tabs","pushed","forEach","tabsOptions","title","resolver","isFunction","resolvers","push","async","form","bindResolvers","size","stringToComponent","Component","JsonEntityFn","store","customKey","isCollection","Conditional","conditional","ShowWhen","property","eq","show","when","HideWhen","Currency","currency","spellcheck","CustomClass","customClass","CustomConditional","customConditional","isArrowFn","str","toString","signature","fn","content","RegExp","sanitize","wrap","opts","DataSourceJson","DataSourceUrl","url","ErrorLabel","message","errorLabel","Validate","ErrorMessage","FormsContainer","Label","entity","decoratorType","CustomKey","Form","useDecorators","target","name","nameOf","machineName","Name","StoreSet","Hidden","bool","hidden","InputTags","CollectionOf","String","storeas","Mask","inputMask","inputMaskPlaceholderChar","Masks","inputMasks","MaxWords","MinWords","ModalEdit","modalEdit","Multiple","OpenWhenEmpty","openWhenEmpty","Password","protected","Placeholder","placeholder","Prefix","Select","selectThreshold","Suffix","TableView","Tabs","Textarea","autoExpand","TextCase","textCase","case","Tooltip","tooltip","getFormioSchema","model","isString","JsonEntityStore","from","getJsonSchema","inlineEnums","customKeys","getName","definitions","tags","access","submissionAccess","Promise","all"],"sourceRoot":""}
|
package/webpack.config.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
module.exports = require("@tsed/webpack-config").create({
|
|
2
|
-
root: __dirname,
|
|
3
|
-
name: "schema-formio",
|
|
4
|
-
externals: {
|
|
5
|
-
"@tsed/core": "@tsed/core",
|
|
6
|
-
"@tsed/schema": "@tsed/schema",
|
|
7
|
-
"@tsed/di": "@tsed/di",
|
|
8
|
-
formiojs: "formiojs",
|
|
9
|
-
lodash: "lodash",
|
|
10
|
-
moment: "moment"
|
|
11
|
-
}
|
|
12
|
-
});
|