@opra/common 1.0.0-alpha.9 → 1.0.0-beta.2
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.
- package/browser/index.cjs +12 -0
- package/browser/index.mjs +12 -0
- package/cjs/document/api-document.js +11 -0
- package/cjs/document/common/api-base.js +1 -1
- package/cjs/document/common/document-element.js +2 -0
- package/cjs/document/data-type/api-field.js +8 -7
- package/cjs/document/data-type/complex-type-base.js +5 -3
- package/cjs/document/data-type/extended-types/date-string.type.js +2 -2
- package/cjs/document/data-type/extended-types/date-time-string.type.js +2 -2
- package/cjs/document/data-type/extended-types/date-time.type.js +2 -2
- package/cjs/document/data-type/extended-types/date.type.js +2 -2
- package/cjs/document/data-type/extended-types/email.type.js +2 -2
- package/cjs/document/data-type/extended-types/filter.type.js +1 -1
- package/cjs/document/data-type/extended-types/time.type.js +2 -2
- package/cjs/document/data-type/extended-types/url.type.js +2 -2
- package/cjs/document/data-type/omit-type.js +7 -2
- package/cjs/document/data-type/partial-type.js +7 -2
- package/cjs/document/data-type/pick-type.js +1 -2
- package/cjs/document/data-type/primitive-types/object.type.js +0 -3
- package/cjs/document/data-type/required-type.js +1 -2
- package/cjs/document/data-type/simple-type.js +1 -6
- package/cjs/document/data-type/utils/create-mapped-class.js +1 -2
- package/cjs/document/data-type/utils/get-is-inherited-predicate-fn.js +1 -2
- package/cjs/document/decorators/api-field-decorator.js +4 -6
- package/cjs/document/decorators/complex-type.decorator.js +1 -2
- package/cjs/document/decorators/http-controller.decorator.js +2 -3
- package/cjs/document/decorators/http-operation-entity.decorator.js +68 -74
- package/cjs/document/decorators/http-operation.decorator.js +4 -2
- package/cjs/document/decorators/simple-type.decorator.js +2 -3
- package/cjs/document/factory/api-document.factory.js +17 -8
- package/cjs/document/http/http-api.js +0 -1
- package/cjs/document/http/http-controller.js +4 -2
- package/cjs/document/http/http-media-type.js +17 -2
- package/cjs/document/http/http-multipart-field.js +0 -1
- package/cjs/document/http/http-operation-response.js +0 -1
- package/cjs/document/http/http-operation.js +12 -1
- package/cjs/document/http/http-parameter.js +2 -0
- package/cjs/document/http/http-request-body.js +0 -1
- package/cjs/document/http/http-status-range.js +5 -2
- package/cjs/document/utils/parse-regexp.util.js +1 -2
- package/cjs/document/utils/string-compare.util.js +1 -2
- package/cjs/exception/opra-exception.js +1 -0
- package/cjs/filter/build.js +21 -22
- package/cjs/filter/filter-rules.js +17 -16
- package/cjs/filter/parse.js +1 -2
- package/cjs/filter/utils.js +2 -3
- package/cjs/helpers/function-utils.js +1 -2
- package/cjs/helpers/get-stack-filename.js +2 -3
- package/cjs/helpers/index.js +1 -0
- package/cjs/helpers/mixin-utils.js +2 -3
- package/cjs/helpers/object-utils.js +5 -6
- package/cjs/helpers/parse-fields-projection.js +3 -3
- package/cjs/helpers/safe-json-stringify.js +16 -0
- package/cjs/helpers/type-guards.js +10 -11
- package/cjs/i18n/string-utils.js +2 -3
- package/cjs/i18n/translate.js +1 -2
- package/cjs/schema/index.js +2 -27
- package/cjs/schema/opra-schema.js +24 -0
- package/cjs/schema/type-guards.js +7 -8
- package/esm/document/api-document.js +11 -0
- package/esm/document/common/api-base.js +1 -1
- package/esm/document/common/document-element.js +2 -0
- package/esm/document/data-type/api-field.js +8 -7
- package/esm/document/data-type/complex-type-base.js +5 -3
- package/esm/document/data-type/extended-types/date-string.type.js +2 -2
- package/esm/document/data-type/extended-types/date-time-string.type.js +2 -2
- package/esm/document/data-type/extended-types/date-time.type.js +2 -2
- package/esm/document/data-type/extended-types/date.type.js +2 -2
- package/esm/document/data-type/extended-types/email.type.js +2 -2
- package/esm/document/data-type/extended-types/filter.type.js +1 -1
- package/esm/document/data-type/extended-types/time.type.js +2 -2
- package/esm/document/data-type/extended-types/url.type.js +2 -2
- package/esm/document/data-type/omit-type.js +6 -0
- package/esm/document/data-type/partial-type.js +6 -0
- package/esm/document/data-type/primitive-types/object.type.js +0 -3
- package/esm/document/data-type/simple-type.js +1 -6
- package/esm/document/decorators/api-field-decorator.js +1 -2
- package/esm/document/decorators/http-controller.decorator.js +1 -1
- package/esm/document/decorators/http-operation-entity.decorator.js +25 -31
- package/esm/document/decorators/http-operation.decorator.js +3 -0
- package/esm/document/factory/api-document.factory.js +17 -7
- package/esm/document/http/http-api.js +0 -1
- package/esm/document/http/http-controller.js +3 -2
- package/esm/document/http/http-media-type.js +16 -2
- package/esm/document/http/http-multipart-field.js +0 -1
- package/esm/document/http/http-operation-response.js +0 -1
- package/esm/document/http/http-operation.js +12 -1
- package/esm/document/http/http-parameter.js +2 -0
- package/esm/document/http/http-request-body.js +0 -1
- package/esm/document/http/http-status-range.js +5 -2
- package/esm/exception/opra-exception.js +1 -0
- package/esm/filter/filter-rules.js +10 -9
- package/esm/helpers/index.js +1 -0
- package/esm/helpers/object-utils.js +2 -2
- package/esm/helpers/safe-json-stringify.js +13 -0
- package/esm/package.json +3 -0
- package/esm/schema/index.js +2 -27
- package/esm/schema/opra-schema.js +21 -0
- package/package.json +47 -53
- package/types/document/api-document.d.ts +2 -1
- package/types/document/common/api-base.d.ts +2 -2
- package/types/document/common/data-type-map.d.ts +1 -1
- package/types/document/common/document-element.d.ts +1 -0
- package/types/document/common/document-node.d.ts +8 -8
- package/types/document/common/value.d.ts +1 -1
- package/types/document/data-type/api-field.d.ts +11 -1
- package/types/document/data-type/complex-type-base.d.ts +6 -7
- package/types/document/data-type/complex-type.d.ts +1 -1
- package/types/document/data-type/data-type.d.ts +3 -2
- package/types/document/data-type/enum-type.d.ts +2 -2
- package/types/document/data-type/extended-types/base64.type.d.ts +1 -1
- package/types/document/data-type/extended-types/date-string.type.d.ts +1 -1
- package/types/document/data-type/extended-types/date-time-string.type.d.ts +1 -1
- package/types/document/data-type/extended-types/date-time.type.d.ts +1 -1
- package/types/document/data-type/extended-types/date.type.d.ts +1 -1
- package/types/document/data-type/extended-types/email.type.d.ts +1 -1
- package/types/document/data-type/extended-types/field-path.type.d.ts +3 -3
- package/types/document/data-type/extended-types/filter.type.d.ts +3 -3
- package/types/document/data-type/extended-types/object-id.type.d.ts +1 -1
- package/types/document/data-type/extended-types/operation-result.type.d.ts +2 -2
- package/types/document/data-type/extended-types/time.type.d.ts +1 -1
- package/types/document/data-type/extended-types/url.type.d.ts +1 -1
- package/types/document/data-type/extended-types/uuid.type.d.ts +1 -1
- package/types/document/data-type/mapped-type.d.ts +3 -3
- package/types/document/data-type/mixin-type.d.ts +1 -1
- package/types/document/data-type/omit-type.d.ts +1 -7
- package/types/document/data-type/partial-type.d.ts +1 -7
- package/types/document/data-type/pick-type.d.ts +3 -3
- package/types/document/data-type/primitive-types/any.type.d.ts +1 -1
- package/types/document/data-type/primitive-types/bigint.type.d.ts +1 -1
- package/types/document/data-type/primitive-types/boolean.type.d.ts +1 -1
- package/types/document/data-type/primitive-types/integer.type.d.ts +1 -1
- package/types/document/data-type/primitive-types/null.type.d.ts +1 -1
- package/types/document/data-type/primitive-types/number.type.d.ts +1 -1
- package/types/document/data-type/primitive-types/string.type.d.ts +1 -1
- package/types/document/data-type/required-type.d.ts +8 -8
- package/types/document/data-type/simple-type.d.ts +2 -2
- package/types/document/data-type/utils/create-mapped-class.d.ts +2 -2
- package/types/document/decorators/api-field-decorator.d.ts +1 -1
- package/types/document/decorators/http-controller.decorator.d.ts +3 -3
- package/types/document/decorators/http-operation-entity.decorator.d.ts +5 -4
- package/types/document/decorators/http-operation.decorator.d.ts +1 -1
- package/types/document/factory/api-document.factory.d.ts +2 -1
- package/types/document/factory/data-type.factory.d.ts +1 -1
- package/types/document/factory/http-api.factory.d.ts +1 -1
- package/types/document/http/http-api.d.ts +2 -2
- package/types/document/http/http-controller.d.ts +1 -1
- package/types/document/http/http-media-type.d.ts +3 -2
- package/types/document/http/http-multipart-field.d.ts +1 -2
- package/types/document/http/http-operation-response.d.ts +1 -1
- package/types/document/http/http-operation.d.ts +6 -5
- package/types/document/http/http-parameter.d.ts +2 -2
- package/types/document/http/http-request-body.d.ts +1 -1
- package/types/document/http/http-status-range.d.ts +2 -1
- package/types/exception/http-errors/bad-request.error.d.ts +1 -1
- package/types/exception/http-errors/conflict.error.d.ts +1 -1
- package/types/exception/http-errors/failed-dependency.error.d.ts +1 -1
- package/types/exception/http-errors/forbidden.error.d.ts +1 -1
- package/types/exception/http-errors/internal-server.error.d.ts +1 -1
- package/types/exception/http-errors/method-not-allowed.error.d.ts +1 -1
- package/types/exception/http-errors/not-acceptable.error.d.ts +1 -1
- package/types/exception/http-errors/not-found.error.d.ts +1 -1
- package/types/exception/http-errors/permission.error.d.ts +1 -1
- package/types/exception/http-errors/unauthorized.error.d.ts +1 -1
- package/types/exception/http-errors/unprocessable-entity.error.d.ts +1 -1
- package/types/exception/opra-exception.d.ts +1 -1
- package/types/exception/opra-http-error.d.ts +1 -1
- package/types/filter/antlr/OpraFilterParser.d.ts +1 -1
- package/types/filter/ast/expressions/comparison-expression.d.ts +1 -1
- package/types/filter/errors.d.ts +3 -4
- package/types/filter/filter-rules.d.ts +5 -5
- package/types/filter/opra-error-listener.d.ts +1 -2
- package/types/helpers/function-utils.d.ts +1 -1
- package/types/helpers/index.d.ts +1 -0
- package/types/helpers/mixin-utils.d.ts +1 -1
- package/types/helpers/object-utils.d.ts +1 -1
- package/types/helpers/safe-json-stringify.d.ts +1 -0
- package/types/helpers/type-guards.d.ts +1 -3
- package/types/i18n/i18n.d.ts +2 -2
- package/types/i18n/translate.d.ts +1 -1
- package/types/index.d.cts +9 -0
- package/types/schema/{document.interface.d.ts → api-document.interface.d.ts} +4 -4
- package/types/schema/data-type/complex-type.interface.d.ts +1 -1
- package/types/schema/data-type/data-type.interface.d.ts +1 -1
- package/types/schema/data-type/enum-type.interface.d.ts +1 -1
- package/types/schema/data-type/mapped-type.interface.d.ts +3 -3
- package/types/schema/data-type/mixin-type.interface.d.ts +1 -1
- package/types/schema/data-type-container.interface.d.ts +1 -1
- package/types/schema/http/http-controller.interface.d.ts +2 -2
- package/types/schema/http/http-media-type.interface.d.ts +1 -1
- package/types/schema/http/http-operation-response.interface.d.ts +2 -2
- package/types/schema/http/http-operation.interface.d.ts +8 -4
- package/types/schema/http/http-parameter.interface.d.ts +2 -2
- package/types/schema/index.d.ts +2 -62
- package/types/schema/opra-schema.d.ts +21 -0
- package/types/schema/type-guards.d.ts +1 -1
- package/browser.js +0 -13393
- /package/cjs/schema/{document.interface.js → api-document.interface.js} +0 -0
- /package/esm/schema/{document.interface.js → api-document.interface.js} +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/****************************************
|
|
2
|
+
* All rights reserved Panates® 2022-2024
|
|
3
|
+
* http://www.panates.com
|
|
4
|
+
*****************************************/
|
|
5
|
+
|
|
6
|
+
var Vo=Object.defineProperty;var s=(i,e)=>Vo(i,"name",{value:e,configurable:!0});var Ko=(i,e)=>{for(var t in e)Vo(i,t,{get:e[t],enumerable:!0})};import"reflect-metadata";BigInt.prototype.toJSON||(BigInt.prototype.toJSON=function(){return this.toString()});RegExp.prototype.toJSON||(RegExp.prototype.toJSON=function(){return this.toString()});import $s from"putil-promisify";function Gt(i){return typeof i=="function"&&i.prototype&&i.prototype.constructor===i&&i.prototype.constructor.name!=="Function"&&i.prototype.constructor.name!=="embedded"}s(Gt,"isConstructor");function zr(i){return i!==null&&typeof i=="object"&&typeof i.pipe=="function"}s(zr,"isStream");function sc(i){return zr(i)&&typeof i._read=="function"&&typeof i._readableState=="object"}s(sc,"isReadable");function ac(i){return zr(i)&&typeof i._write=="function"}s(ac,"isWritable");function pc(i){return zr(i)&&typeof i.getReader=="function"&&typeof i.pipeThrough=="function"&&typeof i.pipeTo=="function"}s(pc,"isReadableStream");function cc(i){return i!==null&&typeof i=="object"&&typeof i.size=="number"&&typeof i.arrayBuffer=="function"&&typeof i.stream=="function"}s(cc,"isBlob");function lc(i){return i!==null&&typeof i.constructor=="function"&&i.constructor.name==="FormData"&&typeof i.append=="function"&&typeof i.getAll=="function"}s(lc,"isFormData");function fc(i){return i!==null&&typeof i=="object"&&typeof i.host=="string"&&typeof i.href=="string"}s(fc,"isURL");function uc(i){return Symbol.iterator in i}s(uc,"isIterable");function mc(i){return Symbol.asyncIterator in i}s(mc,"isAsyncIterable");async function xe(i){return i=$s.isPromise(i)?await i:i,typeof i=="function"?Gt(i)?i:await i():i}s(xe,"resolveThunk");var zo=/^(?:file:\/\/)?(.+)$/;function xc(i=1){if(i>=Error.stackTraceLimit)throw new TypeError("getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `"+i+"` and Error.stackTraceLimit was: `"+Error.stackTraceLimit+"`");let e=Error.prepareStackTrace;Error.prepareStackTrace=(r,n)=>n;let t=new Error().stack;if(Error.prepareStackTrace=e,t!==null&&typeof t=="object"){let r=t[i]?t[i].getFileName():void 0,n=r?zo.exec(r):void 0;return n?n[1]:""}return""}s(xc,"getStackFileName");function gc(i=1){if(i>=Error.stackTraceLimit)throw new TypeError("getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `"+i+"` and Error.stackTraceLimit was: `"+Error.stackTraceLimit+"`");let e=Error.prepareStackTrace;Error.prepareStackTrace=(r,n)=>n;let t=new Error().stack;if(Error.prepareStackTrace=e,t!==null&&typeof t=="object"){let r=t[i]?t[i].getFileName():void 0,n=r?zo.exec(r):void 0;return n?n[1]:""}return""}s(gc,"getErrorStack");function Yt(i,e,t){for(let r of Object.getOwnPropertyNames(e))r==="constructor"||r==="__proto__"||r==="toJSON"||r==="toString"||t&&!t(r)||Object.defineProperty(i,r,Object.getOwnPropertyDescriptor(e,r)||Object.create(null))}s(Yt,"mergePrototype");function Qt(i,e,t=r=>!0){try{let r=new e;Object.getOwnPropertyNames(r).filter(o=>typeof r[o]<"u"&&typeof i[o]>"u").filter(o=>t(o)).forEach(o=>{i[o]=r[o]})}catch{}}s(Qt,"inheritPropertyInitializers");import Jr from"putil-isplainobject";import Vs from"putil-merge";var T=Symbol.for("opra.type.metadata"),te=Symbol("opra.http-controller.metadata"),y=Symbol.for("opra.type.decoder"),g=Symbol("opra.type.encoder"),S=Symbol.for("DECORATOR"),Ie=Symbol.for("BUILTIN"),Jo=/([a-z$_]\w+):(.+)/i,$=/^[a-z][\w_]*$/i,Xt=/^(.*)Type(\d*)$/,B=Symbol.for("kDataTypeMap"),Zt=Symbol.for("kCtorMap"),ge=Symbol.for("kTypeNSMap");function I(i,e){return Vs({},i,{deep:s(t=>Jr(t)&&!t[T],"deep"),descriptor:!0,filter:s((t,r)=>{let n=t[r];return!e||typeof n!="function"&&(typeof n!="object"||Jr(n)||Array.isArray(n))},"filter")})}s(I,"cloneObject");function x(i,e){if(!(i&&typeof i=="object"))return i;for(let t of Object.keys(i))i[t]===void 0?delete i[t]:e&&typeof i[t]=="object"&&x(i[t]);return i}s(x,"omitUndefined");function Ks(i,e){if(!(i&&typeof i=="object"))return i;for(let t of Object.keys(i))i[t]==null?delete i[t]:e&&Jr(i[t])&&Ks(i[t]);return i}s(Ks,"omitNullish");import{splitString as Wo}from"fast-tokenizer";var zs=/^([+-])?([a-z_$]\w*)$/i,Js=/[^.]\(/g,Wr=class Wr{};s(Wr,"FieldsProjection");var Le=Wr;(function(i){let t=class t{};s(t,"Item");let e=t;i.Item=e})(Le||(Le={}));function Go(i,e){let t=Array.isArray(i)?i:[i];if(!(t&&t.length))return;let r=new Le;for(let n of t)e||(n=n.toLowerCase()),Yo(n,r);return r}s(Go,"parseFieldsProjection");function Yo(i,e){i=i.replace(Js,r=>r.charAt(0)+"."+r.substring(1));let t=Wo(i,{delimiters:".",brackets:!0,keepBrackets:!1});for(let r=0;r<t.length;r++){let n=t[r];if(n.includes(",")){let c=Wo(n,{delimiters:",",brackets:!0,keepBrackets:!0});for(let l of c)Yo(l,e);continue}let o=zs.exec(n);if(!o)throw new TypeError(`Invalid field path (${i})`);let a=o[2],p=e[a]=e[a]||new Le.Item;o[1]&&(p.sign=o[1]),r===t.length-1?delete p.projection:e=p.projection=p.projection||new Le}}s(Yo,"parse");function Ws(i){return i&&typeof i.forEach=="function"}s(Ws,"isMap");var V=Symbol.for("kEntries"),ie=Symbol.for("kKeyMap"),Ht=Symbol.for("kWellKnownKeys"),Gr=Symbol.for("kOptions"),Ke=Symbol.for("kSize"),Yr=class Yr{constructor(e,t){Object.defineProperty(this,Ke,{value:0,enumerable:!1,writable:!0}),Object.defineProperty(this,V,{value:{},enumerable:!1,writable:!0}),Object.defineProperty(this,ie,{value:{},enumerable:!1,writable:!0}),Object.defineProperty(this,Ht,{value:{},enumerable:!1,writable:!0});let r=!!(t!=null&&t.caseSensitive);Object.defineProperty(this,Gr,{value:{caseSensitive:r},enumerable:!1}),t!=null&&t.wellKnownKeys&&t.wellKnownKeys.forEach(n=>{r?this[Ht][n]=n:this[Ht][n.toLowerCase()]=n}),this.clear(),e&&this.setAll(e)}get size(){return this[Ke]}clear(){Object.keys(this[V]).forEach(e=>delete this[V][e]),Object.keys(this[ie]).forEach(e=>delete this[ie][e]),this[Ke]=0}forEach(e,t){for(let[r,n]of this.entries())e.call(t,n,r,this)}get(e){if(e)return this[V][this._getStoringKey(e)]}has(e){return e?Object.prototype.hasOwnProperty.call(this[V],this._getStoringKey(e)):!1}set(e,t){let r=this._getStoringKey(e);e=this._getOriginalKey(e);let n=Object.prototype.hasOwnProperty.call(this[V],r);return this[V][r]=t,n||this[Ke]++,this[ie][r]=e,this}setAll(e){return Ws(e)?e.forEach((t,r)=>this.set(r,t)):Object.keys(e).forEach(t=>this.set(t,e[t])),this}keys(){return Object.values(this[ie])[Symbol.iterator]()}values(){return Object.values(this[V])[Symbol.iterator]()}entries(){return Object.entries(this[V])[Symbol.iterator]()}delete(e){let t=this._getStoringKey(e),r=Object.prototype.hasOwnProperty.call(this[V],t);return delete this[V][t],delete this[ie][t],r||this[Ke]--,r}sort(e){let t={...this[V]},r={...this[ie]},n=Array.from(this.keys());e?n.sort(e):n.sort(),this.clear();for(let o of n)this[V][o]=t[o],this[ie][o]=r[o];return this[Ke]=n.length,this}toObject(){let e={};for(let[t,r]of Object.entries(this[ie]))e[r]=this[V][t];return e}[Symbol.iterator](){return this.entries()}get[Symbol.toStringTag](){return"[Object ResponsiveMap]"}_getOriginalKey(e){if(!e||this[Gr].caseSensitive)return e;let t=this._getStoringKey(e);return this[ie][t]??this[Ht][t]??e}_getStoringKey(e){return this[Gr].caseSensitive?e:e.toLowerCase()}};s(Yr,"ResponsiveMap");var P=Yr;function jc(i,e,t){let r=new WeakSet;return JSON.stringify(i,(n,o)=>{if(o!==null&&typeof o=="object"){if(r.has(o))return;r.add(o)}return e?e(n,o):o},t)}s(jc,"safeJsonStringify");var h={};Ko(h,{ComplexType:()=>ze,EnumType:()=>Je,HttpController:()=>Dt,HttpOperation:()=>Qr,MappedType:()=>We,MixinType:()=>Ge,SimpleType:()=>Ye,SpecVersion:()=>Gs,isComplexType:()=>Qs,isDataType:()=>Ys,isEnumType:()=>ea,isHttpController:()=>ta,isMappedType:()=>Hs,isMixinType:()=>Zs,isSimpleType:()=>Xs});var Gs="1.0";var ze;(function(i){i.Kind="ComplexType"})(ze||(ze={}));var Je;(function(i){i.Kind="EnumType"})(Je||(Je={}));var We;(function(i){i.Kind="MappedType"})(We||(We={}));var Ge;(function(i){i.Kind="MixinType"})(Ge||(Ge={}));var Ye;(function(i){i.Kind="SimpleType"})(Ye||(Ye={}));var Dt;(function(i){i.Kind="HttpController"})(Dt||(Dt={}));var Qr;(function(i){i.Kind="HttpOperation"})(Qr||(Qr={}));function Ys(i){return i&&typeof i=="object"&&(i.kind===ze.Kind||i.kind===Je.Kind||i.kind===We.Kind||i.kind===Ye.Kind||i.kind===Ge.Kind)}s(Ys,"isDataType");function Qs(i){return i&&typeof i=="object"&&i.kind===ze.Kind}s(Qs,"isComplexType");function Xs(i){return i&&typeof i=="object"&&i.kind===Ye.Kind}s(Xs,"isSimpleType");function Zs(i){return i&&typeof i=="object"&&i.kind===Ge.Kind}s(Zs,"isMixinType");function Hs(i){return i&&typeof i=="object"&&i.kind===We.Kind}s(Hs,"isMappedType");function ea(i){return i&&typeof i=="object"&&i.kind===Je.Kind}s(ea,"isEnumType");function ta(i){return i&&typeof i=="object"&&i.kind===Dt.Kind}s(ta,"isHttpController");import na from"@browsery/i18next";import{splitString as oa,tokenize as Zo}from"fast-tokenizer";var ra=/\\(.)/g,ia=/(\\)/g;function Qo(i){return i.replace(ia,"\\\\")}s(Qo,"escapeString");function Xo(i){return i.replace(ra,"$1")}s(Xo,"unescapeString");var sa=Object.getPrototypeOf(na.createInstance()).constructor,St=class St extends sa{async init(e,t){let r=typeof e=="object"?e:{},n=typeof e=="function"?e:t;try{let o=await super.init(r,n),a=this.services.formatter;if(a.add("lowercase",(p,c)=>p.toLocaleLowerCase(c)),a.add("uppercase",(p,c)=>p.toLocaleUpperCase(c)),a.add("upperFirst",(p,c)=>p.charAt(0).toLocaleUpperCase(c)+p.substring(1)),r!=null&&r.resources)for(let p of Object.keys(r.resources)){let c=r.resources[p];for(let l of Object.keys(c))this.addResourceBundle(p,l,c[l],!1,!0)}return n&&n(null,o),o}catch(o){throw n&&n(o,this.t),o}}deep(e,t){if(e==null)return e;let r=new WeakMap;return this._deepTranslate(e,r,t)}createInstance(e,t){return new St(e,t)}static createInstance(e,t){return new St(e,t)}_deepTranslate(e,t,r){if(e==null||r!=null&&r.ignore&&r.ignore(e,this))return e;if(typeof e=="object"&&t.has(e))return t.get(e);if(typeof e=="string"){let n="";for(let o of Zo(e,{brackets:{"$t(":")"},quotes:!0,keepQuotes:!0,keepBrackets:!0,keepDelimiters:!0})){if(o.startsWith("$t(")&&o.endsWith(")")){o=o.substring(3,o.length-1);let a=oa(o,{delimiters:"?",quotes:!0,brackets:{"{":"}"}}),p=Xo(o.substring((a[0]||"").length+1));o=a[0]||"";let c=[],l=null;for(let u of Zo(o,{delimiters:",",quotes:!0,brackets:{"{":"}"}})){if(u.startsWith("{")){l=JSON.parse(u);continue}c.push(u)}let _=c.length>1?"$t("+c.join(",")+")":c[0];n+=p?this.t(_,p,{...r,...l}):this.t(_,{...r,...l});continue}n+=o}return n}if(Array.isArray(e)){let n=Array(e.length);t.set(e,n);for(let o=0,a=e.length;o<a;o++)n[o]=this._deepTranslate(e[o],t,r);return t.delete(e),n}if(typeof e=="object"){if(Buffer.isBuffer(e)||Buffer.isBuffer(e)||e instanceof Symbol||e instanceof RegExp||e instanceof Map||e instanceof Set||e instanceof WeakMap||e instanceof WeakSet)return e;let n={};t.set(e,n);let o=Object.keys(e);for(let a=0,p=o.length;a<p;a++){let c=o[a];n[c]=this._deepTranslate(e[c],t,r)}return t.delete(e),n}return e}static get defaultInstance(){return aa}};s(St,"I18n");var It=St,aa=It.createInstance();var pa=/(\))/g;function R(i,e,t){let r=e&&typeof e=="object"?e:void 0,n=typeof e=="string"?e:t;return"$t("+i+(r?","+JSON.stringify(r):"")+(n?"?"+Qo(n).replace(pa,"\\$1"):"")+")"}s(R,"translate");var Xr=It.createInstance();Xr.init().catch(()=>{});var Zr=class Zr extends Error{constructor(e,t){super("Unknown error"),this.severity="error",t=t||(e instanceof Error?e:void 0),e instanceof Error&&(t=e),t&&t instanceof Error&&(this.cause=t,t.stack&&(this.stack=t.stack)),typeof e=="string"?this.initString(e):e instanceof Error?this.initError(e):this.init(e),this.message=this.message||this.constructor.name}toString(){return Xr.deep(this.message)}toJSON(){var t;let e="production";return x({message:this.message,severity:this.severity,system:this.system,code:this.code,details:this.details,stack:e==="dev"||e==="development"||e==="test"?(t=this.stack)==null?void 0:t.split(`
|
|
7
|
+
`):void 0},!0)}init(e){this.message=(e==null?void 0:e.message)||this.constructor.name,this.severity=(e==null?void 0:e.severity)||"error",e&&(this.system=e.system,this.code=e.code,this.details=e.details)}initString(e){this.init({message:String(e||"")||this.constructor.name,severity:"error",code:this.constructor.name})}initError(e){this.init({message:e.message,severity:e.severity||"error",code:e.code||e.constructor.name})}};s(Zr,"OpraException");var me=Zr;var Hr=class Hr extends me{constructor(){super(""),this.details=[]}add(e){return this.details.push(e),this}};s(Hr,"OpraDocumentError");var Qe=Hr;var ei=class ei{constructor(e){this.path="",this.error=new Qe,this.showErrorDetails=!0,this.maxErrors=(e==null?void 0:e.maxErrors)||0,this.error.message=""}addError(e){if(!this.error.details.length)if(e instanceof Error)this.error.stack=e.stack;else{let t=new Error;Error.captureStackTrace(t,this.addError),this.error.stack=t.stack}if(this.error.add({message:typeof e=="string"?e:e.message,path:this.path,...typeof e=="object"?e:void 0}),this.error.details.length>=this.maxErrors)throw this.error}enter(e,t){let r=this.path;this.path=this.path+e;try{return t()}catch(n){n!==this.error&&this.addError(n)}finally{this.path=r}}async enterAsync(e,t){let r=this.path;this.path=this.path+e;try{return await t()}catch(n){n!==this.error&&this.addError(n)}finally{this.path=r}}extend(e){let t={...e};return Object.setPrototypeOf(t,this),t}};s(ei,"DocumentInitContext");var ne=ei;import"reflect-metadata";import{asMutable as Ta}from"ts-gems";import ca from"lodash.omit";function ti(i){return function(e){var n;let t;if(!(i!=null&&i.embedded))if(i!=null&&i.name){if(!$.test(i.name))throw new TypeError(`"${i.name}" is not a valid type name`);t=i.name}else t=((n=e.name.match(Xt))==null?void 0:n[1])||e.name;let r=Reflect.getOwnMetadata(T,e);r||(r={},Reflect.defineMetadata(T,r,e)),r.kind=h.ComplexType.Kind,r.name=t,i&&Object.assign(r,ca(i,["kind","name","base","fields"]))}}s(ti,"ComplexTypeDecorator");import{asMutable as ya}from"ts-gems";import{asMutable as la}from"ts-gems";import{uid as fa}from"uid";var ri=class ri{constructor(e,t){this.element=e,this.parent=t}getDocument(){if(this._document)return this._document;if(this.element[ge])return this.element;if(this.parent)return this._document=this.parent.getDocument();throw new Error("ApiDocument not found in document tree")}hasDataType(e){var r;let t=(r=this[B])==null?void 0:r.has(e);return t||(this.parent?this.parent.hasDataType(e):!1)}findDataType(e){var r;let t=(r=this[B])==null?void 0:r.get(e);return t||(this.parent?this.parent.findDataType(e):void 0)}getDataType(e){let t=this.findDataType(e);if(t)return t;let r="";if(typeof e=="function")r=Reflect.getMetadata(T,e).name;else if(typeof e=="object"){let n=e[T];r=n==null?void 0:n.name}throw typeof e=="string"&&(r=e),new TypeError("Unknown data type"+(r?" ("+r+")":""))}getDataTypeNameWithNs(e){if(!e.name)return;let t=this.getDocument().getDataTypeNs(e);return t?t+":"+e.name:e.name}getComplexType(e){let t=this.getDataType(e);if(t.kind===h.ComplexType.Kind)return t;throw new TypeError(`Data type "${t.name}" is not a ComplexType`)}getSimpleType(e){let t=this.getDataType(e);if(t.kind===h.SimpleType.Kind)return t;throw new TypeError(`Data type "${t.name||t}" is not a SimpleType`)}getEnumType(e){let t=this.getDataType(e);if(t.kind===h.EnumType.Kind)return t;throw new TypeError(`Data type "${t.name||t}" is not a EnumType`)}getMappedType(e){let t=this.getDataType(e);if(t.kind===h.MappedType.Kind)return t;throw new TypeError(`Data type "${t.name||t}" is not a MappedType`)}getMixinType(e){let t=this.getDataType(e);if(t.kind===h.MixinType.Kind)return t;throw new TypeError(`Data type "${t.name||t}" is not a MixinType`)}};s(ri,"DocumentNode");var er=ri;var b=s(function(i){if(!this)throw new TypeError('"this" should be passed to call class constructor');let e=la(this);e.id=fa(16),Object.defineProperty(e,"node",{value:new er(this,i==null?void 0:i.node),enumerable:!1,writable:!0}),i&&Object.defineProperty(e,"owner",{value:i,enumerable:!1,writable:!0})},"DocumentElement"),ni=class ni{};s(ni,"DocumentElementClass");var ii=ni;b.prototype=ii.prototype;function oi(i){return function(e,t){if(typeof t!="string")throw new TypeError("Symbol properties can't be used as a field");let r=Reflect.getOwnMetadata(T,e.constructor)||{};r.kind=h.ComplexType.Kind,r.fields=r.fields||{};let n=Reflect.getMetadata("design:type",e,t),o=r.fields[t]={...i};n===Array?o.isArray=!0:o.type=o.type||n,Reflect.defineMetadata(T,r,e.constructor)}}s(oi,"ApiFieldDecorator");import{asMutable as ma}from"ts-gems";import{validator as ha,vg as Pe}from"valgen";import{asMutable as ua}from"ts-gems";var tr=Symbol.for("nodejs.util.inspect.custom"),Lt="\x1B[0m",rr="\x1B[33m",ir="\x1B[35m";var O=s(function(i,e,t){if(!this)throw new TypeError('"this" should be passed to call class constructor');if(e!=null&&e.name&&!$.test(e.name))throw new TypeError(`"${e.name}" is not a valid DataType name`);b.call(this,i);let r=ua(this);r.kind=e.kind,r.name=e.name,r.description=e.description,r.abstract=e.abstract,r.examples=e.examples},"DataType"),ai=class ai extends b{get embedded(){return!this.name}toJSON(){return x({kind:this.kind,description:this.description,abstract:this.abstract,examples:this.examples})}toString(){return`[${Object.getPrototypeOf(this).constructor.name} ${this.name||"#Embedded"}]`}[tr](){return`[${rr+Object.getPrototypeOf(this).constructor.name+Lt} ${ir+this.name+Lt}]`}};s(ai,"DataTypeClass");var si=ai;O.prototype=si.prototype;var da=/^([+-])?([a-z$_][\w.]*)$/i,w=s(function(...i){if(!this)throw new TypeError('"this" should be passed to call class constructor');let[e,t,r]=i;O.call(this,e,t,r);let n=ma(this);n.fields=new P},"ComplexTypeBase"),ci=class ci extends O{findField(e){if(e.includes(".")){let r=this.parseFieldPath(e).pop();return r==null?void 0:r.field}return this.fields.get(e)}getField(e){let t=this.findField(e);if(!t)throw new Error(R("error:UNKNOWN_FIELD",{field:e}));return t}parseFieldPath(e,t){var u,C,$o;let r=this,n,o=e.split("."),a=o.length,p=[],c=this.owner.node.getDataType("object"),l=t==null?void 0:t.allowSigns,_=s(()=>p.map(Se=>Se.fieldName).join("."),"getStrPath");for(let Se=0;Se<a;Se++){let z={fieldName:o[Se],dataType:c};p.push(z);let Wt=da.exec(o[Se]);if(!Wt)throw new TypeError(`Invalid field name (${_()})`);if(Wt[1]&&((Se===0&&l==="first"||l==="each")&&(z.sign=Wt[1]),z.fieldName=Wt[2]),r){if(r instanceof w){if(n=r.fields.get(z.fieldName),n){z.fieldName=n.name,z.field=n,z.dataType=n.type,r=n.type;continue}if(((u=r.additionalFields)==null?void 0:u[0])===!0){z.additionalField=!0,z.dataType=c,r=void 0;continue}if(((C=r.additionalFields)==null?void 0:C[0])==="type"&&(($o=r.additionalFields)==null?void 0:$o[1])instanceof O){z.additionalField=!0,z.dataType=r.additionalFields[1],r=r.additionalFields[1];continue}throw new Error(`Unknown field (${p.map(Kr=>Kr.fieldName).join(".")})`)}throw new TypeError(`"${p.map(Kr=>Kr.fieldName).join(".")}" field is not a complex type and has no child fields`)}z.additionalField=!0,z.dataType=c}return p}normalizeFieldPath(e,t){return this.parseFieldPath(e,t).map(r=>(r.sign||"")+r.fieldName).join(".")}generateCodec(e,t){let r=Array.isArray(t==null?void 0:t.projection)?Go(t.projection):t==null?void 0:t.projection,n=this._generateSchema(e,{...t,projection:r,currentPath:""}),o;if(this.additionalFields instanceof O)o=this.additionalFields.generateCodec(e,t);else if(typeof this.additionalFields=="boolean")o=this.additionalFields;else if(Array.isArray(this.additionalFields))if(this.additionalFields.length<2)o="error";else{let a=o[1];o=ha((p,c,l)=>c.fail(l,a,p))}return Pe.isObject(n,{ctor:this.name==="object"?Object:this.ctor,additionalFields:o,name:this.name,coerce:!0,caseInSensitive:t==null?void 0:t.caseInSensitive,onFail:t==null?void 0:t.onFail})}_generateSchema(e,t){var c;let r={},{currentPath:n,projection:o}=t,a=!!(o&&Object.values(o).find(l=>!l.sign)),p;for(let l of this.fields.values()){if(t.ignoreReadonlyFields&&l.readonly||t.ignoreWriteonlyFields&&l.writeonly||t.ignoreHiddenFields&&l.hidden){r[l.name]=Pe.isUndefined({coerce:!0});continue}p=l.name;let _;if(o!=="*"&&(_=o==null?void 0:o[p.toLowerCase()],(_==null?void 0:_.sign)==="-"||a&&!_||!a&&l.exclusive&&!_)){r[l.name]=Pe.isUndefined({coerce:!0});continue}let u=this._generateFieldCodec(e,l,{...t,partial:t.partial==="deep"?t.partial:void 0,projection:typeof o=="object"?((c=o[p])==null?void 0:c.projection)||"*":o,currentPath:n+(n?".":"")+p});r[p]=t.partial||!l.required?Pe.optional(u):Pe.required(u)}return r}_generateFieldCodec(e,t,r){let n=t.type.generateCodec(e,r);return t.fixed&&(n=Pe.isEnum([t.fixed])),t.isArray&&(n=Pe.isArray(n)),n}};s(ci,"ComplexTypeBaseClass");var pi=ci;w.prototype=pi.prototype;var M=s(function(...i){if(!this){let[o]=i;return M[S](o)}let[e,t]=i;b.call(this,e);let r=ya(this);r.name=t.name;let n=t.origin||e;if(!(n instanceof w))throw new Error("Field origin should be one of ComplexType, MappedType or MixinType");r.origin=n,r.type=t.type||e.node.getDataType("any"),r.description=t.description,r.isArray=t.isArray,r.default=t.default,r.fixed=t.fixed,r.required=t.required,r.exclusive=t.exclusive,r.translatable=t.translatable,r.deprecated=t.deprecated,r.readonly=t.readonly,r.writeonly=t.writeonly,r.examples=t.examples,r.hidden=t.hidden},"ApiField"),fi=class fi extends b{toJSON(){var t;let e=this.type?this.node.getDataTypeNameWithNs(this.type):void 0;return x({type:e||((t=this.type)==null?void 0:t.toJSON()),description:this.description,isArray:this.isArray||void 0,default:this.default,fixed:this.fixed,required:this.required||void 0,exclusive:this.exclusive||void 0,translatable:this.translatable||void 0,deprecated:this.deprecated||void 0,readonly:this.readonly||void 0,writeonly:this.writeonly||void 0,examples:this.examples})}};s(fi,"ApiFieldClass");var li=fi;M.prototype=li.prototype;Object.assign(M,oi);M[S]=oi;var Q=s(function(...i){var o;if(!this)return Q[S].apply(void 0,i);let[e,t]=i,r=i[2]||new ne({maxErrors:0});w.call(this,e,t,r);let n=Ta(this);n.kind=h.ComplexType.Kind,n.additionalFields=t.additionalFields,n.keyField=t.keyField,t.base&&r.enter(".base",()=>{if(!(t.base instanceof w))throw new TypeError(`"${t.base.kind}" can't be set as base for a "${this.kind}"`);n.base=t.base,n.additionalFields==null&&n.base.additionalFields&&(n.additionalFields=n.base.additionalFields);for(let a of n.base.fields.values())this.fields.set(a.name,new M(this,a))}),n.ctor=t.ctor||((o=n.base)==null?void 0:o.ctor),t.fields&&r.enter(".fields",()=>{for(let[a,p]of Object.entries(t.fields)){let c=new M(this,{...p,name:a});this.fields.set(c.name,c)}})},"ComplexType"),mi=class mi extends w{extendsFrom(e){var t;return e instanceof O||(e=this.node.getDataType(e)),e instanceof w?e===this?!0:!!((t=this.base)!=null&&t.extendsFrom(e)):!1}toJSON(){let e=this.base?this.node.getDataTypeNameWithNs(this.base):void 0,t=x({...w.prototype.toJSON.call(this),kind:this.kind,base:this.base?e||this.base.toJSON():void 0});if(this.additionalFields)if(this.additionalFields instanceof O){let r=this.node.getDataTypeNameWithNs(this.additionalFields);t.additionalFields=r||this.additionalFields.toJSON()}else t.additionalFields=this.additionalFields;if(this.fields.size){let r={},n=0;for(let o of this.fields.values())o.origin===this&&(r[o.name]=o.toJSON(),n++);n&&(t.fields=r)}return x(t)}};s(mi,"ComplexTypeClass");var ui=mi;Q.prototype=ui.prototype;Object.assign(Q,ti);Q[S]=ti;import"reflect-metadata";import{asMutable as Ea}from"ts-gems";import{vg as _a}from"valgen";var oe=s(function(...i){if(!this)return oe[S].apply(void 0,i);let[e,t,r]=i;O.call(this,e,t,r);let n=Ea(this);if(n.kind=h.EnumType.Kind,t.base){if(!(t.base instanceof oe))throw new TypeError(`"${t.base.kind}" can't be set as base for a "${n.kind}"`);n.base=t.base}n.instance=t.instance,n.ownAttributes=I(t.attributes||{}),n.attributes=n.base?I(n.base.attributes):{};for(let[o,a]of Object.entries(n.ownAttributes))n.attributes[o]=a},"EnumType"),hi=class hi extends O{extendsFrom(e){var t;return e instanceof O||(e=this.node.getDataType(e)),e instanceof oe?e===this?!0:!!((t=this.base)!=null&&t.extendsFrom(e)):!1}generateCodec(){return _a.isEnum(Object.keys(this.attributes))}toJSON(){let e=this.base?this.node.getDataTypeNameWithNs(this.base):void 0;return x({...O.prototype.toJSON.call(this),base:this.base?e||this.base.toJSON():void 0,attributes:I(this.ownAttributes)})}};s(hi,"EnumTypeClass");var Pt=hi;oe.prototype=Pt.prototype;Object.assign(oe,Pt);function xa(i,...e){let t=e.length>=2?e[0]:void 0,r=e.length>=2?e[1]:e[0],n={},o=i;if(Array.isArray(i)){if(t){if(!Array.isArray(t))throw new TypeError('Both "target" and "base" arguments should be array');o=[...t,...i]}n={},i.forEach(p=>{var l;let c=(l=r==null?void 0:r.meanings)==null?void 0:l[p];n[p]=x({description:c})})}else{if(t){if(Array.isArray(t))throw new TypeError('Both "target" and "base" arguments should be enum object');o={...t,...i}}Object.keys(i).forEach(p=>{var l;let c=(l=r==null?void 0:r.meanings)==null?void 0:l[p];n[i[p]]=x({alias:p,description:c})})}let a={kind:h.EnumType.Kind,attributes:n,base:r.base,name:r.name,description:r==null?void 0:r.description};return Object.defineProperty(i,T,{value:a,enumerable:!1,configurable:!0,writable:!0}),o}s(xa,"EnumTypeFactory");oe.prototype=Pt.prototype;oe[S]=xa;import"reflect-metadata";import{asMutable as ga}from"ts-gems";function nr(i,e){let t=i==null?void 0:i.map(n=>String(n).toLowerCase()),r=e==null?void 0:e.map(n=>String(n).toLowerCase());return n=>r&&r.includes(n.toLowerCase())?!1:t?t.includes(n.toLowerCase()):!0}s(nr,"getIsInheritedPredicateFn");var Me=s(function(...i){var o;if(!this)throw new TypeError('"this" should be passed to call class constructor');let[e,t,r]=i;w.call(this,e,t,r);let n=ga(this);if(n.kind=h.MappedType.Kind,t.base){if(!(t.base instanceof w))throw new TypeError(`"${t.base.kind}" can't be set as base for a "${this.kind}"`);n.base=t.base,n.ctor=t.ctor||n.base.ctor,t.pick?n.pick=t.pick.map(l=>n.base.normalizeFieldPath(l)):t.omit?n.omit=t.omit.map(l=>n.base.normalizeFieldPath(l)):t.partial?n.partial=Array.isArray(t.partial)?t.partial.map(l=>n.base.normalizeFieldPath(l)):t.partial:t.required&&(n.required=Array.isArray(t.required)?t.required.map(l=>n.base.normalizeFieldPath(l)):t.required);let a=nr(n.pick,n.omit),p=Array.isArray(n.partial)?n.partial.map(l=>l.toLowerCase()):n.partial,c=Array.isArray(n.required)?n.required.map(l=>l.toLowerCase()):n.required;for(let[l,_]of n.base.fields.entries()){if(!a(l))continue;let u={..._};p===!0||Array.isArray(p)&&p.includes(_.name.toLowerCase())?u.required=!1:(c===!0||Array.isArray(c)&&c.includes(_.name.toLowerCase()))&&(u.required=!0);let C=new M(this,u);n.fields.set(C.name,C)}(!n.pick||n.base.additionalFields===!1||Array.isArray(n.base.additionalFields)&&((o=n.base.additionalFields)==null?void 0:o[0])==="error")&&(n.additionalFields=n.base.additionalFields),t.base.keyField&&a(t.base.keyField)&&(n.keyField=t.base.keyField)}},"MappedType"),yi=class yi extends w{extendsFrom(e){var t;return e instanceof O||(e=this.node.getDataType(e)),e instanceof w?e===this?!0:!!((t=this.base)!=null&&t.extendsFrom(e)):!1}toJSON(){let e=this.base?this.node.getDataTypeNameWithNs(this.base):void 0;return x({...w.prototype.toJSON.call(this),base:e||this.base.toJSON(),kind:this.kind,pick:this.pick,omit:this.omit,partial:this.partial,required:this.required})}};s(yi,"MappedTypeClass");var di=yi;Me.prototype=di.prototype;Me._applyMixin=()=>{};import"reflect-metadata";import{asMutable as Oa}from"ts-gems";var Xe=s(function(...i){if(!this)return Xe[S].apply(void 0,i);let[e,t,r]=i;w.call(this,e,t,r);let n=Oa(this);n.kind=h.MixinType.Kind,n.types=[];for(let o of t.types){n.additionalFields!==!0&&(o.additionalFields===!0?n.additionalFields=!0:n.additionalFields||(n.additionalFields=o.additionalFields));for(let a of o.fields.values()){let p=new M(this,a);n.fields.set(p.name,p)}n.types.push(o),o.keyField&&(n.keyField=o.keyField)}},"MixinType"),Ei=class Ei extends w{extendsFrom(e){if(e instanceof O||(e=this.node.getDataType(e)),!(e instanceof w))return!1;if(e===this)return!0;for(let t of this.types)if(t.extendsFrom(e))return!0;return!1}toJSON(){return x({...w.prototype.toJSON.call(this),kind:this.kind,types:this.types.map(e=>{let t=this.node.getDataTypeNameWithNs(e);return t||e.toJSON()})})}};s(Ei,"MixinTypeClass");var Ti=Ei;Xe.prototype=Ti.prototype;Xe[S]=Ra;function Ra(...i){let e=i.filter(a=>typeof a=="function"),t=typeof i[i.length-1]=="object"?i[i.length-1]:void 0;if(!e.length)throw new TypeError("No Class has been provided");if(e.length===1)return e[0];let r=e[0].name+"Mixin",n={[r]:class{constructor(){for(let a of e)Qt(this,a)}}}[r],o={...t,kind:h.MixinType.Kind,types:[]};Reflect.defineMetadata(T,o,n);for(let a of e){let p=Reflect.getMetadata(T,a);if(!(p&&(p.kind===h.ComplexType.Kind||p.kind===h.MixinType.Kind||p.kind===h.MappedType.Kind)))throw new TypeError(`Class "${a.name}" is not a ${h.ComplexType.Kind}, ${h.MixinType.Kind} or ${h.MappedType.Kind}`);o.types.push(a),Yt(n.prototype,a.prototype)}return n}s(Ra,"MixinTypeFactory");import"reflect-metadata";import{asMutable as ba}from"ts-gems";import{isAny as es}from"valgen";import Aa from"lodash.omit";function _i(i){let e=[],t=s(function(r){var a;let n;if(!(i!=null&&i.embedded))if(i!=null&&i.name){if(!$.test(i.name))throw new TypeError(`"${i.name}" is not a valid type name`);n=i.name}else n=((a=r.name.match(Xt))==null?void 0:a[1])||r.name,n=n.toLowerCase();let o=Reflect.getOwnMetadata(T,r)||{};o.kind=h.SimpleType.Kind,o.name=n,i&&Object.assign(o,Aa(i,["kind","name"])),Reflect.defineMetadata(T,o,r)},"decorator");return t.Example=(r,n)=>(e.push(o=>{o.examples=o.examples||[],o.examples.push({description:n,value:r})}),t),t}s(_i,"SimpleTypeDecoratorFactory");function Ho(i){return(e,t)=>{if(typeof t!="string")throw new TypeError("Symbol properties can't be decorated with Attribute");let r=Reflect.getOwnMetadata(T,e.constructor)||{},n=Reflect.getMetadata("design:type",e,t),o="string";n===Boolean?o="boolean":n===Number&&(o="number"),r.kind=h.SimpleType.Kind,r.attributes=r.attributes||{},r.attributes[t]={format:(i==null?void 0:i.format)||o,description:i==null?void 0:i.description,deprecated:i==null?void 0:i.deprecated},Reflect.defineMetadata(T,r,e.constructor)}}s(Ho,"AttributeDecoratorFactory");var m=s(function(...i){var o,a;if(!this)return m[S](...i);let[e,t,r]=i;O.call(this,e,t,r);let n=ba(this);if(n.kind=h.SimpleType.Kind,t.base){if(!(t.base instanceof m))throw new TypeError(`"${t.base.kind}" can't be set as base for a "${this.kind}"`);n.base=t.base}if(n.properties=t.properties,n.ownNameMappings={...t.nameMappings},n.nameMappings={...(o=n.base)==null?void 0:o.nameMappings,...t.nameMappings},n.ownAttributes=I(t.attributes||{}),n.attributes=n.base?I(n.base.attributes):{},n.ownAttributes)for(let[p,c]of Object.entries(n.ownAttributes)){if((a=n.attributes[p])!=null&&a.sealed)throw new TypeError(`Sealed attribute "${p}" can not be overwritten`);n.attributes[p]=c}n._generateDecoder=t.generateDecoder,n._generateEncoder=t.generateEncoder},"SimpleType"),gi=class gi extends O{extendsFrom(e){var t;return e instanceof O||(e=this.node.getDataType(e)),e instanceof m?e===this?!0:!!((t=this.base)!=null&&t.extendsFrom(e)):!1}generateCodec(e,t,r){let n={...this.properties,...r};if(e==="decode"){let a=this;for(;a;){if(a._generateDecoder)return a._generateDecoder(n,(t==null?void 0:t.documentElement)||this.owner);a=this.base}return es}let o=this;for(;o;){if(o._generateEncoder)return o._generateEncoder(n,(t==null?void 0:t.documentElement)||this.owner);o=this.base}return es}toJSON(){let e=x(this.ownAttributes),t;this.properties&&typeof this.properties.toJSON=="function"?t=this.properties.toJSON(this.properties,this.owner):t=this.properties?I(this.properties):{};let r=this.base?this.node.getDataTypeNameWithNs(this.base):void 0,n=x({...O.prototype.toJSON.apply(this),base:this.base?r||this.base.toJSON():void 0,attributes:e&&Object.keys(e).length?e:void 0,properties:Object.keys(t).length?t:void 0});return Object.keys(this.ownNameMappings).length&&(n.nameMappings={...this.ownNameMappings}),n}};s(gi,"SimpleTypeClass");var xi=gi;m.prototype=xi.prototype;Object.assign(m,_i);m[S]=_i;m.Attribute=Ho;var Oi=Symbol("initializing"),Ri=class Ri{static async createDataType(e,t,r){e=e||new ne({maxErrors:0});let n=await this._importDataTypeArgs(e,t,r);if(n)return typeof n=="string"?t.node.getDataType(n):this._createDataType(e,t,n)}static async addDataTypes(e,t,r){let n=t.node[B];if(!n)throw new TypeError("DocumentElement should has [kDataTypeMap] property");let o=await this.createAllDataTypes(e,t,r);if(o)for(let a of o)a!=null&&a.name&&n.set(a.name,a)}static async createAllDataTypes(e,t,r){e=e||new ne({maxErrors:0});let n=await this._prepareAllInitArgs(e,t,r);if(!n)return;let o=new P;for(let c of n)o.set(c.name,c);let a=e.extend({initArgsMap:o}),p=[];for(let[c,l]of o.entries())e.enter(`[${c}]`,()=>{if(!o.has(c))return;let _=this._createDataType(a,t,l);_&&p.push(_)});return p}static async _prepareAllInitArgs(e,t,r){let n=new P,o=new P,a=e.extend({owner:t,importQueue:n,initArgsMap:o});if(!t.node[B])throw new TypeError("DocumentElement should has [kDataTypeMap] property");if(Array.isArray(r)){let p=0;for(let c of r)await a.enterAsync(`$[${p++}]`,async()=>{c=await xe(c);let l=Reflect.getMetadata(T,c)||c[T];if(!(l&&l.name))return typeof c=="function"?a.addError(`Class "${c.name}" doesn't have a valid data type metadata`):a.addError("Object doesn't have a valid data type metadata");n.set(l.name,c)})}else{let p,c;for([c,p]of Object.entries(r))p=await xe(p),n.set(c,typeof p=="object"?{...p,name:c}:p)}for(let p of Array.from(n.keys())){if(!n.has(p))continue;let c=await this._importDataTypeArgs(a,t,p);c&&typeof c!="string"&&a.addError("Embedded data type can't be loaded into document node directly")}return Array.from(o.values())}static async _importDataTypeArgs(e,t,r){var _;r=await xe(r);let{importQueue:n,initArgsMap:o}=e,a=t.node.findDataType(r);if(a instanceof O)return a.name;let p,c,l;if(typeof r!="string"){let C=t.node.getDocument().types[Zt].get(r);C&&(r=C)}if(typeof r=="string"){let u=r;if(r=(n==null?void 0:n.get(u))||((_=e.initArgsMap)==null?void 0:_.get(u)),!r)return e.addError(`Unknown data type (${u})`)}if(typeof r=="function"){if(p=Reflect.getMetadata(T,r),!p)return e.addError(`Class "${r.name}" doesn't have a valid DataType metadata`);c=r}else if(typeof r=="object"){if(p=r[T],p)l=r,p.kind!==h.EnumType.Kind&&(p=void 0);else if(h.isDataType(r))p=r,c=p.ctor;else if(c=Object.getPrototypeOf(r).constructor,p=c&&Reflect.getMetadata(T,c),p&&p.kind===h.SimpleType.Kind){let u=await this._importDataTypeArgs(e,t,p.name);return u?typeof u=="object"&&u.kind!==h.SimpleType.Kind?e.addError("Kind of base data type is not same"):{kind:h.SimpleType.Kind,name:void 0,base:u,properties:r}:void 0}}return p?e.enterAsync(p.name?`[${p.name}]`:"",async()=>{if(p.name){let C=o==null?void 0:o.get(p.name);if(C)return C[Oi]?e.addError("Circular reference detected"):p.name}let u={kind:p.kind,name:p.name};u[Oi]=!0;try{if(u.name)if(n!=null&&n.has(u.name))o==null||o.set(p.name,u),u._instance={name:p.name},u[B]=t.node[B];else return e.addError(`Data Type (${u.name}) must be explicitly added to type list in the document scope`);switch(u.kind){case h.ComplexType.Kind:u.ctor=c,await this._prepareComplexTypeArgs(e,t,u,p);break;case h.EnumType.Kind:u.instance=l,await this._prepareEnumTypeArgs(e,t,u,p);break;case h.MappedType.Kind:await this._prepareMappedTypeArgs(e,t,u,p);break;case h.MixinType.Kind:await this._prepareMixinTypeArgs(e,t,u,p);break;case h.SimpleType.Kind:u.ctor=c,await this._prepareSimpleTypeArgs(e,t,u,p);break;default:return e.addError(`Invalid data type kind ${p.kind}`)}}finally{u.name&&(n==null||n.delete(u.name)),delete u[Oi]}return n&&u.name?u.name:u}):e.addError("No DataType metadata found")}static async _prepareDataTypeArgs(e,t,r){t.description=r.description,t.abstract=r.abstract,t.examples=r.examples}static async _prepareComplexTypeArgs(e,t,r,n){await this._prepareDataTypeArgs(e,r,n),await e.enterAsync(".base",async()=>{let o;if(n.base)o=await this._importDataTypeArgs(e,t,n.base);else if(r.ctor){let a=Object.getPrototypeOf(r.ctor.prototype).constructor;Reflect.hasMetadata(T,a)&&(o=await this._importDataTypeArgs(e,t,a))}o&&(r.base=ve(o),r.ctor=r.ctor||o.ctor)}),n.additionalFields!=null&&(typeof n.additionalFields=="boolean"||Array.isArray(n.additionalFields)?r.additionalFields=n.additionalFields:await e.enterAsync(".additionalFields",async()=>{let o=await this._importDataTypeArgs(e,t,n.additionalFields);o&&(r.additionalFields=ve(o))})),n.fields&&(r.fields={},await e.enterAsync(".fields",async()=>{for(let[o,a]of Object.entries(n.fields))await e.enterAsync(`[${o}]`,async()=>{let p=typeof a=="string"?{type:a}:a;if(p.isArray&&!p.type)return e.addError('"type" must be defined explicitly for array fields');let c=await this._importDataTypeArgs(e,t,p.type||"any");c&&(r.fields[o]={...p,type:ve(c)})})}))}static async _prepareEnumTypeArgs(e,t,r,n){await this._prepareDataTypeArgs(e,r,n),n.base&&await e.enterAsync(".base",async()=>{let o=await this._importDataTypeArgs(e,t,n.base);o&&(r.base=ve(o))}),r.attributes=I(n.attributes)}static async _prepareSimpleTypeArgs(e,t,r,n){var o,a,p,c;await this._prepareDataTypeArgs(e,r,n),await e.enterAsync(".base",async()=>{let l;if(n.base)l=await this._importDataTypeArgs(e,t,n.base);else if(r.ctor){let _=Object.getPrototypeOf(r.ctor.prototype).constructor;Reflect.hasMetadata(T,_)&&(l=await this._importDataTypeArgs(e,t,_))}l&&(r.base=ve(l),r.ctor=r.ctor||l.ctor)}),r.properties=n.properties,r.nameMappings=n.nameMappings,!r.properties&&r.ctor&&(r.properties=new r.ctor),n.attributes&&(r.attributes=I(n.attributes)),typeof((o=r.properties)==null?void 0:o[y])=="function"&&(r.generateDecoder=(a=r.properties)==null?void 0:a[y].bind(r.properties)),typeof((p=r.properties)==null?void 0:p[g])=="function"&&(r.generateEncoder=(c=r.properties)==null?void 0:c[g].bind(r.properties))}static async _prepareMappedTypeArgs(e,t,r,n){await this._prepareDataTypeArgs(e,r,n),await e.enterAsync(".base",async()=>{let o;if(n.base)o=await this._importDataTypeArgs(e,t,n.base);else if(r.ctor){let a=Object.getPrototypeOf(r.ctor.prototype).constructor;Reflect.hasMetadata(T,a)&&(o=await this._importDataTypeArgs(e,t,a))}o&&(r.base=ve(o),r.ctor=r.ctor||o.ctor)}),n.pick?r.pick=[...n.pick]:n.omit?r.omit=[...n.omit]:n.partial?r.partial=Array.isArray(n.partial)?[...n.partial]:n.partial:n.required&&(r.required=Array.isArray(n.required)?[...n.required]:n.required)}static async _prepareMixinTypeArgs(e,t,r,n){await this._prepareDataTypeArgs(e,r,n),r.types=[],await e.enterAsync(".types",async()=>{let o=n.types,a=0;for(let p of o)await e.enterAsync(`[${a++}]`,async()=>{let c=await this._importDataTypeArgs(e,t,p);c&&r.types.push(ve(c))})})}static _createDataType(e,t,r){var a;let n=t.node.findDataType(typeof r=="string"?r:r.name||"");if(n instanceof O)return n;let o=typeof r=="string"?(a=e.initArgsMap)==null?void 0:a.get(r):r;if(o){let p=o[B];switch(p||delete o._instance,n=o._instance,n!=null&&n.name&&p&&p.set(n.name,n),o==null?void 0:o.kind){case h.ComplexType.Kind:return this._createComplexType(e,t,o);case h.EnumType.Kind:return this._createEnumType(e,t,o);case h.MappedType.Kind:return this._createMappedType(e,t,o);case h.MixinType.Kind:return this._createMixinType(e,t,o);case h.SimpleType.Kind:return this._createSimpleType(e,t,o);default:break}}e.addError(`Unknown data type (${String(r)})`)}static _createComplexType(e,t,r){let n=r._instance||{};Object.setPrototypeOf(n,Q.prototype);let o=I(r);return r.base&&e.enter(".base",()=>{o.base=this._createDataType(e,t,r.base)}),r.additionalFields&&e.enter(".additionalFields",()=>{typeof r.additionalFields=="boolean"||Array.isArray(r.additionalFields)?o.additionalFields=r.additionalFields:o.additionalFields=this._createDataType(e,t,r.additionalFields)}),o.fields={},r.fields&&e.enter(".fields",()=>{for(let[a,p]of Object.entries(r.fields))e.enter(`[${a}]`,()=>{let c=this._createDataType(e,t,p.type);c&&(o.fields[a]={...p,name:a,type:c})})}),Q.apply(n,[t,o]),n}static _createEnumType(e,t,r){let n=r._instance||{};Object.setPrototypeOf(n,oe.prototype);let o=I(r);return r.base&&e.enter(".base",()=>{o.base=this._createDataType(e,t,r.base)}),o.attributes=r.attributes,oe.apply(n,[t,o]),n}static _createMappedType(e,t,r){let n=r._instance||{};Object.setPrototypeOf(n,Me.prototype);let o=I(r);return r.base&&e.enter(".base",()=>{o.base=this._createDataType(e,t,r.base)}),Me.apply(n,[t,o]),n}static _createMixinType(e,t,r){let n=r._instance||{};Object.setPrototypeOf(n,Xe.prototype);let o=I(r);return r.types&&e.enter(".types",()=>{o.types=[];let a=0;for(let p of r.types)e.enter(`[${a++}]`,()=>{let c=this._createDataType(e,t,p);if(!(c instanceof w))throw new TypeError(`"${c==null?void 0:c.kind}" can't be set as base for a "${o.kind}"`);o.types.push(c)})}),Xe.apply(n,[t,o]),n}static _createSimpleType(e,t,r){let n=r._instance||{};Object.setPrototypeOf(n,m.prototype);let o=I(r);return r.base&&e.enter(".base",()=>{o.base=this._createDataType(e,t,r.base)}),m.apply(n,[t,o]),n}};s(Ri,"DataTypeFactory");var J=Ri;function ve(i){return typeof i=="object"&&i.name?i.name:i}s(ve,"preferName");var Ai=class Ai extends b{constructor(e){super(e),this.name="OpraApi"}toJSON(){return x({protocol:this.protocol,name:this.name,description:this.description})}async _initialize(e,t){if(!$.test(e.name))throw new TypeError(`Invalid api name (${e.name})`);this.name=e.name,this.description=e==null?void 0:e.description}};s(Ai,"ApiBase");var or=Ai;import Sa from"path-browserify";import{asMutable as Ia}from"ts-gems";var ts,rs,X=Symbol.for("kMap"),Mt=Symbol.for("kCtorMap"),bi=class bi{constructor(){this[ts]=new P,this[rs]=new WeakMap}get size(){return this[X].size}forEach(e,t){this[X].forEach(e,t)}get(e){let t=typeof e=="string"?e:this[Mt].get(e);if(!t&&typeof e=="function"){let r=Reflect.getMetadata(T,e);t=r==null?void 0:r.name}if(!t&&typeof e=="object"){let r=e[T];t=r==null?void 0:r.name}return t?this[X].get(t):void 0}set(e,t){this[X].set(e,t),t.ctor?this[Mt].set(t.ctor,e):t.instance&&this[Mt].set(t.instance,e)}has(e){if(e instanceof O)return!!e.name&&this[X].has(e.name);let t=typeof e=="string"?e:this[Mt].get(e);return t?this[X].has(t):!1}keys(){return this[X].keys()}values(){return this[X].values()}entries(){return this[X].entries()}sort(e){return this[X].sort(e),this}[(ts=X,rs=Mt,Symbol.iterator)](){return this[X][Symbol.iterator]()}};s(bi,"DataTypeMap");var Oe=bi;import Na from"lodash.omit";import wi from"putil-merge";var Da=/^(.*)(Controller)$/;function Ni(i){let e=[],t=s(function(r){var c;let n=i==null?void 0:i.name;n||(n=((c=Da.exec(r.name))==null?void 0:c[1])||r.name);let o={},a=Reflect.getOwnMetadata(te,Object.getPrototypeOf(r));a&&wi(o,a,{deep:!0});let p=Reflect.getOwnMetadata(te,r);p&&wi(o,p,{deep:!0}),wi(o,{kind:h.HttpController.Kind,name:n,path:n,...Na(i,["kind","name","instance","endpoints","key"])},{deep:!0}),Reflect.defineMetadata(te,o,r);for(let l of e)l(o);Reflect.defineMetadata(te,o,r)},"decorator");return t.Cookie=(r,n)=>(e.push(o=>{let a=typeof n=="string"||typeof n=="function"?{name:r,location:"cookie",type:n}:{...n,name:r,location:"cookie"};o.parameters=o.parameters||[],o.parameters.push(a)}),t),t.Header=(r,n)=>(e.push(o=>{let a=typeof n=="string"||typeof n=="function"?{name:r,location:"header",type:n}:{...n,name:r,location:"header"};o.parameters=o.parameters||[],o.parameters.push(a)}),t),t.QueryParam=(r,n)=>(e.push(o=>{let a=typeof n=="string"||typeof n=="function"?{name:r,location:"query",type:n}:{...n,name:r,location:"query"};o.parameters=o.parameters||[],o.parameters.push(a)}),t),t.PathParam=(r,n)=>(e.push(o=>{let a=typeof n=="string"||typeof n=="function"?{name:r,location:"path",type:n}:{...n,name:r,location:"path"};o.parameters=o.parameters||[],o.parameters.push(a)}),t),t.KeyParam=(r,n)=>(e.push(o=>{var p;(p=o.path)!=null&&p.includes(":"+r)||(o.path=(o.path||"")+"@:"+r);let a=typeof n=="string"||typeof n=="function"?{name:r,location:"path",type:n,keyParam:!0}:{...n,name:r,location:"path",keyParam:!0};o.parameters=o.parameters||[],o.parameters.push(a)}),t),t.UseType=(...r)=>(e.push(n=>{n.types=n.types||[],n.types.push(...r)}),t),t}s(Ni,"HttpControllerDecoratorFactory");var Z=s(function(...i){var n;if(!this)return Z[S].apply(void 0,i);let[e,t]=i;if(b.call(this,e),!$.test(t.name))throw new TypeError(`Invalid resource name (${t.name})`);let r=Ia(this);r.kind=h.HttpController.Kind,r.types=r.node[B]=new Oe,r.operations=new P,r.controllers=new P,r.parameters=[],r.name=t.name,r.description=t.description,r.path=t.path??t.name,r.instance=t.instance,r.ctor=t.ctor,r._controllerReverseMap=new WeakMap,(n=r._initialize)==null||n.call(r,t)},"HttpController"),Si=class Si extends b{get isRoot(){return!(this.owner instanceof Z)}findController(e){if(typeof e=="function"){let t=this._controllerReverseMap.get(e);if(t!=null)return t;for(let r of this.controllers.values()){if(r.ctor===e)return this._controllerReverseMap.set(e,r),r;if(r.controllers.size&&(t=r.findController(e),t))return this._controllerReverseMap.set(e,t),t}this._controllerReverseMap.set(e,null);return}if(e.startsWith("/")&&(e=e.substring(1)),e.includes("/")){let t=e.split("/"),r=this;for(;r&&t.length>0;)r=r.controllers.get(t.shift());return r}return this.controllers.get(e)}findParameter(e,t){let r=e.toLowerCase(),n;for(n of this.parameters)if(!(t&&t!==n.location)&&(typeof n.name=="string"&&(n._nameLower=n._nameLower||n.name.toLowerCase(),n._nameLower===r)||n.name instanceof RegExp&&n.name.test(e)))return n;if(this.node.parent&&this.node.parent.element instanceof Z)return this.node.parent.element.findParameter(e,t)}getFullUrl(){return Sa.posix.join(this.owner instanceof Z?this.owner.getFullUrl():"/",this.path)}toString(){return`[HttpController ${this.name}]`}toJSON(){let e=x({kind:this.kind,description:this.description,path:this.path});if(this.operations.size){e.operations={};for(let t of this.operations.values())e.operations[t.name]=t.toJSON()}if(this.controllers.size){e.controllers={};for(let t of this.controllers.values())e.controllers[t.name]=t.toJSON()}if(this.types.size){e.types={};for(let t of this.types.values())e.types[t.name]=t.toJSON()}if(this.parameters.length){e.parameters=[];for(let t of this.parameters)e.parameters.push(t.toJSON())}return e}[tr](){return`[${rr}HttpController${ir+this.name+Lt}]`}};s(Si,"HttpControllerClass");var Di=Si;Z.prototype=Di.prototype;Object.assign(Z,Ni);Z[S]=Ni;var Ii=class Ii extends or{constructor(e){super(e),this._controllerReverseMap=new WeakMap,this.protocol="http",this.controllers=new P}findController(e){return Z.prototype.findController.call(this,e)}findOperation(e,t){let r=this.findController(e);return r==null?void 0:r.operations.get(t)}toJSON(){let t={...super.toJSON(),protocol:this.protocol,url:this.url,controllers:{}};for(let r of this.controllers.values())t.controllers[r.name]=r.toJSON();return t}};s(Ii,"HttpApi");var sr=Ii;import La from"@browsery/type-is";import{asMutable as Pa}from"ts-gems";import{isAny as Ma,vg as va}from"valgen";var Re=s(function(i,e){if(!this)throw new TypeError('"this" should be passed to call class constructor');b.call(this,i);let t=Pa(this);if(e.contentType){let r=Array.isArray(e.contentType)?e.contentType:[e.contentType];r=r.map(n=>n.split(/\s*,\s*/)).flat(),t.contentType=r.length>1?r:r[0]}t.description=e.description,t.contentEncoding=e.contentEncoding,t.examples=e.examples,t.multipartFields=[],t.maxFieldsSize=e.maxFieldsSize,t.maxFields=e.maxFields,t.maxFiles=e.maxFiles,t.maxFileSize=e.maxFileSize,t.maxTotalFileSize=e.maxTotalFileSize,e!=null&&e.type&&(t.type=(e==null?void 0:e.type)instanceof O?e.type:t.owner.node.getDataType(e.type)),t.isArray=e.isArray},"HttpMediaType"),Pi=class Pi extends b{findMultipartField(e,t){if(this.multipartFields){for(let r of this.multipartFields)if((!t||t===r.fieldType)&&(r.fieldName instanceof RegExp&&r.fieldName.test(e)||r.fieldName===e))return r}}toJSON(){var r,n;let e=this.type?this.node.getDataTypeNameWithNs(this.type):void 0,t=x({description:this.description,contentType:this.contentType,contentEncoding:this.contentEncoding,type:e||((r=this.type)==null?void 0:r.toJSON()),isArray:this.isArray,example:this.example,examples:this.examples,maxFields:this.maxFields,maxFieldsSize:this.maxFieldsSize,maxFiles:this.maxFiles,maxFileSize:this.maxFileSize,maxTotalFileSize:this.maxTotalFileSize});return(n=this.multipartFields)!=null&&n.length&&(t.multipartFields=this.multipartFields.map(o=>o.toJSON())),t}generateCodec(e,t){let r;return this.type?r=this.type.generateCodec(e,t):this.contentType&&(Array.isArray(this.contentType)?this.contentType:[this.contentType]).find(o=>La.is(o,["json"]))&&(r=this.node.findDataType("object").generateCodec(e)),r=r||Ma,this.isArray?va.isArray(r):r}};s(Pi,"HttpMediaTypeClass");var Li=Pi;Re.prototype=Li.prototype;function ar(i,e){let t=i.lastIndexOf("/");if(i.startsWith("/")&&t){let r=i.substring(1,t),n=i.substring(t+1);if(e!=null&&e.includeFlags)for(let o of e==null?void 0:e.includeFlags)n.includes(o)||(n+=o);if(e!=null&&e.excludeFlags)for(let o of e==null?void 0:e.excludeFlags)n.replace(o,"");return new RegExp(r,n)}throw new TypeError(`"${i}" is not a valid RegExp string`)}s(ar,"parseRegExp");var Mi=class Mi extends Re{constructor(e,t){super(e,t),this.fieldName=t.fieldName instanceof RegExp?t.fieldName:t.fieldName.startsWith("/")?ar(t.fieldName):t.fieldName,this.fieldType=t.fieldType,this.required=t.required}toJSON(){return x({fieldName:this.fieldName,fieldType:this.fieldType,required:this.required,...super.toJSON()})}};s(Mi,"HttpMultipartField");var pr=Mi;import ka from"path-browserify";import{asMutable as ja}from"ts-gems";import Fa from"lodash.omit";var is;(function(i){i.X_Opra_Version="X-Opra-Version",i.X_Total_Count="X-Total-Count",i.WWW_Authenticate="WWW-Authenticate",i.Authorization="Authorization",i.Proxy_Authenticate="Proxy-Authenticate",i.Proxy_Authorization="Proxy-Authorization",i.Age="Age",i.Cache_Control="Cache-Control",i.Clear_Site_Data="Clear-Site-Data",i.Expires="Expires",i.Pragma="Pragma",i.Last_Modified="Last-Modified",i.ETag="ETag",i.If_Match="If-Match",i.If_None_Match="If-None-Match",i.If_Modified_Since="If-Modified-Since",i.If_Unmodified_Since="If-Unmodified-Since",i.Vary="Vary",i.Connection="Connection",i.Keep_Alive="Keep-Alive",i.Accept="Accept",i.Accept_Encoding="Accept-Encoding",i.Accept_Language="Accept-Language",i.Expect="Expect",i.Cookie="Cookie",i.Set_Cookie="Set-Cookie",i.Access_Control_Allow_Origin="Access-Control-Allow-Origin",i.Access_Control_Allow_Credentials="Access-Control-Allow-Credentials",i.Access_Control_Allow_Headers="Access-Control-Allow-Headers",i.Access_Control_Allow_Methods="Access-Control-Allow-Methods",i.Access_Control_Expose_Headers="Access-Control-Expose-Headers",i.Access_Control_Max_Age="Access-Control-Max-Age",i.Access_Control_Request_Headers="Access-Control-Request-Headers",i.Access_Control_Request_Method="Access-Control-Request-Method",i.Origin="Origin",i.Timing_Allow_Origin="Timing-Allow-Origin",i.Content_Disposition="Content-Disposition",i.Content_ID="Content-ID",i.Content_Length="Content-Length",i.Content_Type="Content-Type",i.Content_Transfer_Encoding="Content-Transfer-Encoding",i.Content_Encoding="Content-Encoding",i.Content_Language="Content-Language",i.Content_Location="Content-Location",i.Forwarded="Forwarded",i.X_Forwarded_For="X-Forwarded-For",i.X_Forwarded_Host="X-Forwarded-Host",i.X_Forwarded_Proto="X-Forwarded-Proto",i.Via="Via",i.Location="Location",i.From="From",i.Host="Host",i.Referer="Referer",i.Referrer_Policy="Referrer-Policy",i.User_Agent="User-Agent",i.Allow="Allow",i.Server="Server",i.Accept_Ranges="Accept-Ranges",i.Range="Range",i.If_Range="If-Range",i.Content_Range="Content-Range",i.Cross_Origin_Embedder_Policy="Cross-Origin-Embedder-Policy",i.Cross_Origin_Opener_Policy="Cross-Origin-Opener-Policy",i.Cross_Origin_Resource_Policy="Cross-Origin-Resource-Policy",i.Content_Security_Policy="Content-Security-Policy",i.Content_Security_Policy_Report_Only="Content-Security-Policy-Report-Only",i.Expect_CT="Expect-CT",i.Feature_Policy="Feature-Policy",i.Strict_Transport_Security="Strict-Transport-Security",i.Upgrade="Upgrade",i.Upgrade_Insecure_Requests="Upgrade-Insecure-Requests",i.X_Content_Type_Options="X-Content-Type-Options",i.X_Download_Options="X-Download-Options",i.X_Frame_Options="X-Frame-Options",i.X_Permitted_Cross_Domain_Policies="X-Permitted-Cross-Domain-Policies",i.X_Powered_By="X-Powered-By",i.X_XSS_Protection="X-XSS-Protection",i.Transfer_Encoding="Transfer-Encoding",i.TE="TE",i.Trailer="Trailer",i.Sec_WebSocket_Key="Sec-WebSocket-Key",i.Sec_WebSocket_Extensions="Sec-WebSocket-Extensions",i.Sec_WebSocket_Accept="Sec-WebSocket-Accept",i.Sec_WebSocket_Protocol="Sec-WebSocket-Protocol",i.Sec_WebSocket_Version="Sec-WebSocket-Version",i.Date="Date",i.Retry_After="Retry-After",i.Server_Timing="Server-Timing",i.X_DNS_Prefetch_Control="X-DNS-Prefetch-Control",i.Max_Forwards="Max-Forwards"})(is||(is={}));var N;(function(i){i[i.CONTINUE=100]="CONTINUE",i[i.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",i[i.PROCESSING=102]="PROCESSING",i[i.EARLYHINTS=103]="EARLYHINTS",i[i.OK=200]="OK",i[i.CREATED=201]="CREATED",i[i.ACCEPTED=202]="ACCEPTED",i[i.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",i[i.NO_CONTENT=204]="NO_CONTENT",i[i.RESET_CONTENT=205]="RESET_CONTENT",i[i.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",i[i.AMBIGUOUS=300]="AMBIGUOUS",i[i.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",i[i.FOUND=302]="FOUND",i[i.SEE_OTHER=303]="SEE_OTHER",i[i.NOT_MODIFIED=304]="NOT_MODIFIED",i[i.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",i[i.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",i[i.BAD_REQUEST=400]="BAD_REQUEST",i[i.UNAUTHORIZED=401]="UNAUTHORIZED",i[i.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",i[i.FORBIDDEN=403]="FORBIDDEN",i[i.NOT_FOUND=404]="NOT_FOUND",i[i.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",i[i.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",i[i.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",i[i.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",i[i.CONFLICT=409]="CONFLICT",i[i.GONE=410]="GONE",i[i.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",i[i.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",i[i.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",i[i.URI_TOO_LONG=414]="URI_TOO_LONG",i[i.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",i[i.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",i[i.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",i[i.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",i[i.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",i[i.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",i[i.LOCKED=423]="LOCKED",i[i.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",i[i.TOO_EARLY=425]="TOO_EARLY",i[i.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",i[i.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",i[i.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",i[i.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",i[i.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",i[i.BAD_GATEWAY=502]="BAD_GATEWAY",i[i.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",i[i.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",i[i.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",i[i.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",i[i.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",i[i.LOOP_DETECTED=508]="LOOP_DETECTED",i[i.NOT_EXTENDED=510]="NOT_EXTENDED",i[i.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED"})(N||(N={}));var n0={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a Teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"};var L;(function(i){i.json="application/json",i.opra_response_json="application/opra.response+json",i.xml="application/XML",i.text="text/plain",i.html="text/html",i.markdown="text/markdown",i.binary="binary/octet-stream"})(L||(L={}));function F(i,e){let t=s((r,n)=>{if(typeof n!="string")throw new TypeError("Symbol properties can not be decorated");let o={kind:h.HttpOperation.Kind,...Fa(e,["kind"])},a=Reflect.getOwnMetadata(te,r.constructor)||{};a.operations=a.operations||{},a.operations[n]=o;for(let p of i)p(o);Reflect.defineMetadata(te,a,r.constructor)},"decorator");return t.Cookie=(r,n)=>(i.push(o=>{let a=typeof n=="string"||typeof n=="function"?{name:r,location:"cookie",type:n}:{...n,name:r,location:"cookie"};o.parameters?o.parameters=o.parameters.filter(p=>!(p.location==="cookie"&&String(p.name)===String(r))):o.parameters=[],o.parameters.push(a)}),t),t.Header=(r,n)=>(i.push(o=>{let a=typeof n=="string"||typeof n=="function"?{name:r,location:"header",type:n}:{...n,name:r,location:"header"};o.parameters?o.parameters=o.parameters.filter(p=>!(p.location==="header"&&String(p.name)===String(r))):o.parameters=[],o.parameters.push(a)}),t),t.QueryParam=(r,n)=>(i.push(o=>{let a=typeof n=="string"||typeof n=="function"?{name:r,location:"query",type:n}:{...n,name:r,location:"query"};o.parameters?o.parameters=o.parameters.filter(p=>!(p.location==="query"&&String(p.name)===String(r))):o.parameters=[],o.parameters.push(a)}),t),t.PathParam=(r,n)=>(i.push(o=>{let a=typeof n=="string"||typeof n=="function"?{name:r,location:"path",type:n}:{...n,name:r,location:"path"};o.parameters?o.parameters=o.parameters.filter(p=>!(p.location==="path"&&String(p.name)===String(r))):o.parameters=[],o.parameters.push(a)}),t),t.Response=(r,n)=>{let o={...n,statusCode:r};return o.type&&(o.contentType=o.contentType||L.opra_response_json,o.contentEncoding=o.contentEncoding||"utf-8"),o.contentType===L.opra_response_json&&(o.contentEncoding=o.contentEncoding||"utf-8"),i.push(a=>{a.responses=a.responses||[],a.responses.push(o)}),t},t.RequestContent=function(r){let n=typeof r=="object"?r:{type:r};return n.type&&(n.contentType=n.contentType||L.json,n.contentEncoding=n.contentEncoding||"utf-8"),i.push(o=>{o.requestBody=o.requestBody||{required:!0,content:[]},o.requestBody.content=o.requestBody.content||[],o.requestBody.content.push(n)}),t},t.MultipartContent=function(r,n){let o={...r,contentType:(r==null?void 0:r.contentType)||"multipart/form-data"};if(i.push(a=>{a.requestBody=a.requestBody||{required:!0,content:[]},a.requestBody.content=a.requestBody.content||[],a.requestBody.content.push(o)}),n){let a={Field(p,c){return o.multipartFields=o.multipartFields||[],o.multipartFields.push({fieldName:p,fieldType:"field",...c}),a},File(p,c){return o.multipartFields=o.multipartFields||[],o.multipartFields.push({fieldName:p,fieldType:"file",...c}),a}};n(a)}return t},t.UseType=(...r)=>(i.push(n=>{n.types=n.types||[],n.types.push(...r)}),t),t}s(F,"HttpOperationDecoratorFactory");var D=s(function(...i){if(!this){let[n]=i,o=[];return D[S].call(void 0,o,n)}let[e,t]=i;if(b.call(this,e),!$.test(t.name))throw new TypeError(`Invalid operation name (${t.name})`);let r=ja(this);r.parameters=[],r.responses=[],r.types=r.node[B]=new Oe,r.name=t.name,r.path=t.path,r.mergePath=t.mergePath,r.method=t.method||"GET",r.description=t.description,r.composition=t.composition,r.compositionOptions=t.compositionOptions?I(t.compositionOptions):void 0},"HttpOperation"),Fi=class Fi extends b{findParameter(e,t){let r=e.toLowerCase(),n;for(n of this.parameters)if(!(t&&t!==n.location)&&(typeof n.name=="string"&&(n._nameLower=n._nameLower||n.name.toLowerCase(),n._nameLower===r)||n.name instanceof RegExp&&n.name.test(e)))return n}getFullUrl(){let e=this.owner.getFullUrl();return e?this.path?this.mergePath?e+this.path:ka.posix.join(e,this.path):e:this.path||"/"}toJSON(){var t;let e=x({kind:h.HttpOperation.Kind,description:this.description,method:this.method,path:this.path,mergePath:this.mergePath,composition:this.composition,requestBody:(t=this.requestBody)==null?void 0:t.toJSON()});if(this.parameters.length){e.parameters=[];for(let r of this.parameters)e.parameters.push(r.toJSON())}return this.responses.length&&(e.responses=this.responses.map(r=>r.toJSON())),e}};s(Fi,"HttpOperationClass");var vi=Fi;D.prototype=vi.prototype;D[S]=F;D.GET=function(i){return F([],{...i,method:"GET"})};D.DELETE=function(i){return F([],{...i,method:"DELETE"})};D.HEAD=function(i){return F([],{...i,method:"HEAD"})};D.OPTIONS=function(i){return F([],{...i,method:"OPTIONS"})};D.PATCH=function(i){return F([],{...i,method:"PATCH"})};D.POST=function(i){return F([],{...i,method:"POST"})};D.PUT=function(i){return F([],{...i,method:"PUT"})};D.SEARCH=function(i){return F([],{...i,method:"SEARCH"})};var Ua=/^([1-6]\d{2})(?:-([1-6]\d{2}))?$/,ki=class ki{constructor(e,t){if(this.start=0,this.end=0,e&&typeof e=="object"&&(this.start=e.start||0,this.end=e.end||0),typeof e=="number"&&(this.start=e,this.end=t||this.start),typeof e=="string"){let r=Ua.exec(e);if(!r)throw new TypeError(`"${e}" is not a valid Status Code range`);this.start=parseInt(r[1],10),this.end=r[2]?parseInt(r[2],10):this.start}}includes(e){return e>=this.start&&e<=this.end}intersects(e,t){return t>=this.start&&e<=this.end}toString(){return this.start===this.end?String(this.start):String(this.start)+"-"+String(this.end)}toJSON(){return!this.end||this.start===this.end?this.start:{start:this.start,end:this.end}}};s(ki,"HttpStatusRange");var vt=ki;var ji=class ji extends Re{constructor(e,t){super(e,t),this.parameters=[],this.statusCode=(Array.isArray(t.statusCode)?t.statusCode:[t.statusCode]).map(r=>typeof r=="object"?new vt(r.start,r.end):new vt(r)),this.partial=t.partial}findParameter(e,t){e=e.toLowerCase();for(let r of this.parameters)if((!t||t===r.location)&&(r.name instanceof RegExp&&r.name.test(e)||r.name===e))return r}toJSON(){let e=this.statusCode.map(r=>r.toJSON()),t=x({...super.toJSON(),statusCode:e.length===1&&typeof e[0]=="number"?e[0]:e,partial:this.partial});if(this.parameters.length){t.parameters=[];for(let r of this.parameters)t.parameters.push(r.toJSON())}return t}};s(ji,"HttpOperationResponse");var cr=ji;import{asMutable as Ba}from"ts-gems";import{asMutable as Ca}from"ts-gems";var lr=s(function(i,e){if(!this)throw new TypeError('"this" should be passed to call class constructor');b.call(this,i);let t=Ca(this);t.description=e.description,t.type=e.type,t.examples=e.examples,t.isArray=e.isArray},"Value"),Ci=class Ci extends b{toJSON(){let e=this.type?this.node.getDataTypeNameWithNs(this.type):void 0;return x({type:this.type?e||this.type.toJSON():"any",description:this.description,isArray:this.isArray,examples:this.examples})}};s(Ci,"ValueClass");var Ui=Ci;lr.prototype=Ui.prototype;var Ft=s(function(i,e){if(!this)throw new TypeError('"this" should be passed to call class constructor');lr.call(this,i,e);let t=Ba(this);e.name&&(t.name=e.name instanceof RegExp?e.name:e.name.startsWith("/")?ar(e.name,{includeFlags:"i",excludeFlags:"m"}):e.name),t.location=e.location,t.deprecated=e.deprecated,t.required=e.required,t.required==null&&e.location==="path"&&(t.required=!0),t.arraySeparator=e.arraySeparator,t.keyParam=e.keyParam},"HttpParameter"),qi=class qi extends lr{toJSON(){return x({...super.toJSON(),name:this.name,location:this.location,arraySeparator:this.arraySeparator,keyParam:this.keyParam,required:this.required,deprecated:this.deprecated})}};s(qi,"HttpParameterClass");var Bi=qi;Ft.prototype=Bi.prototype;var $i=class $i extends b{constructor(e){super(e),this.content=[]}toJSON(){return x({description:this.description,required:this.required,maxContentSize:this.maxContentSize,content:this.content.length?this.content.map(e=>e.toJSON()):[],partial:this.partial})}};s($i,"HttpRequestBody");var fr=$i;var Vi=class Vi{static async createApi(e,t,r){let n=new sr(t);return n.name=r.name,n.description=r.description,n.url=r.url,r.controllers&&await e.enterAsync(".controllers",async()=>{if(Array.isArray(r.controllers))for(let o of r.controllers){let a=await this._createController(e,n,o);a&&n.controllers.set(a.name,a)}else for(let[o,a]of Object.entries(r.controllers)){let p=await this._createController(e,n,a,o);p&&n.controllers.set(p.name,p)}}),n}static async _createController(e,t,r,n){typeof r=="function"&&!Gt(r)&&(r=t instanceof Z?r(t.instance):r()),r=await xe(r);let o,a,p;if(typeof r=="function"){if(a=Reflect.getMetadata(te,r),!a)return e.addError(`Class "${r.name}" doesn't have a valid HttpController metadata`);o=r}else o=Object.getPrototypeOf(r).constructor,a=Reflect.getMetadata(te,o),a?p=r:(a=r,r.instance==="object"&&(p=r.instance,o=Object.getPrototypeOf(p).constructor));if(!a)return e.addError(`Class "${o.name}" is not decorated with HttpController()`);if(n=n||a.name,!n)throw new TypeError("Controller name required");let c=new Z(t,{...a,name:n,instance:p,ctor:o});return a.types&&await e.enterAsync(".types",async()=>{await J.addDataTypes(e,c,a.types)}),a.parameters&&await e.enterAsync(".parameters",async()=>{let l=0;for(let _ of a.parameters)await e.enterAsync(`[${l++}]`,async()=>{let u={..._};await e.enterAsync(".type",async()=>{_.type&&(u.type=c.node.findDataType(_.type)),!u.type&&typeof _.type=="object"&&(u.type=await J.createDataType(e,c,_.type)),u.type||(u.type=c.node.getDataType("any"))});let C=new Ft(c,u);c.parameters.push(C)})}),a.operations&&await e.enterAsync(".operations",async()=>{for(let[l,_]of Object.entries(a.operations))await e.enterAsync(`[${l}]`,async()=>{let u=new D(c,{name:l,method:"GET"});await this._initHttpOperation(e,u,_),c.operations.set(l,u)})}),a.controllers&&await e.enterAsync(".controllers",async()=>{if(Array.isArray(a.controllers)){let l=0;for(let _ of a.controllers)await e.enterAsync(`[${l}]`,async()=>{let u=await this._createController(e,c,_);u&&(c.controllers.get(u.name)&&e.addError(`Duplicate controller name (${u.name})`),c.controllers.set(u.name,u))}),l++}else for(let[l,_]of Object.entries(a.controllers))await e.enterAsync(`[${l}]`,async()=>{let u=await this._createController(e,c,_,l);u&&(c.controllers.get(u.name)&&e.addError(`Duplicate controller name (${u.name})`),c.controllers.set(u.name,u))})}),c}static async _initHttpOperation(e,t,r){let n={...r,name:t.name,types:void 0};return D.apply(t,[t.owner,n]),r.types&&await e.enterAsync(".types",async()=>{await J.addDataTypes(e,t,r.types)}),r.parameters&&await e.enterAsync(".parameters",async()=>{let o=0;for(let a of r.parameters)await e.enterAsync(`[${o++}]`,async()=>{let p={...a};await e.enterAsync(".type",async()=>{a.type&&(p.type=t.node.findDataType(a.type)),!p.type&&typeof a.type=="object"&&(p.type=await J.createDataType(e,t,a.type)),p.type||(p.type=t.node.getDataType("any"))});let c=new Ft(t,p);t.parameters.push(c)})}),r.responses&&await e.enterAsync(".responses",async()=>{let o=0;for(let a of r.responses)await e.enterAsync(`[${o++}]`,async()=>{let p=new cr(t,{statusCode:a.statusCode});await this._initHttpOperationResponse(e,p,a),t.responses.push(p)})}),r.requestBody&&await e.enterAsync(".requestBody",async()=>{let o=new fr(t);await this._initHttpRequestBody(e,o,r.requestBody),t.requestBody=o}),t}static async _initHttpMediaType(e,t,r){Re.call(t,t.owner,{...r,type:void 0,multipartFields:void 0}),r.type&&await e.enterAsync(".type",async()=>{r.type&&(t.type=t.node.findDataType(r.type)),!t.type&&(typeof r.type=="object"||typeof r.type=="function")&&(t.type=await J.createDataType(e,t,r.type)),t.type||(t.type=t.node.getDataType("any"))}),r.multipartFields&&await e.enterAsync(".multipartFields",async()=>{for(let n=0;n<r.multipartFields.length;n++)await e.enterAsync(`[${n}]`,async()=>{let o=r.multipartFields[n],a=new pr(t,{fieldName:o.fieldName,fieldType:o.fieldType});await this._initHttpMediaType(e,a,o),t.multipartFields.push(a)})})}static async _initHttpOperationResponse(e,t,r){await this._initHttpMediaType(e,t,r),t.partial=r.partial,r.parameters&&await e.enterAsync(".parameters",async()=>{let n=0;for(let o of r.parameters)await e.enterAsync(`[${n++}]`,async()=>{let a={...o};await e.enterAsync(".type",async()=>{o.type&&(a.type=t.node.findDataType(o.type)),!a.type&&typeof o.type=="object"&&(a.type=await J.createDataType(e,t,o.type)),a.type||(a.type=t.node.getDataType("any"))});let p=new Ft(t,a);t.parameters.push(p)})})}static async _initHttpRequestBody(e,t,r){t.description=r.description,t.required=r.required,t.maxContentSize=r.maxContentSize,t.immediateFetch=r.immediateFetch,t.partial=r.partial,r.content&&await e.enterAsync(".content",async()=>{for(let n=0;n<r.content.length;n++)await e.enterAsync(`[${n}]`,async()=>{let o=r.content[n],a=new Re(t,String(n));await this._initHttpMediaType(e,a,o),t.content.push(a)})})}};s(Vi,"HttpApiFactory");var Ze=Vi;import{md5 as $a}from"super-fast-md5";var ns,Ki=class Ki extends b{constructor(){super(null),this[ns]=new WeakMap,this.id="",this.info={},this.references=new P,this.types=new Oe,this.node[B]=this.types,this.node.findDataType=this._findDataType.bind(this)}getDataTypeNs(e){let t=e instanceof O?this._findDataType(e.name||""):this._findDataType(e);if(t)return this[ge].get(t)}findDocument(e){if(this.id===e)return this;for(let t of this.references.values()){if(t.id===e)return t;let r=t.findDocument(e);if(r)return r}}toJSON(){return this.export()}export(){let e=x({spec:h.SpecVersion,id:this.id,url:this.url,info:I(this.info,!0)});if(this.references.size){let t=0,r={};for(let[n,o]of this.references.entries())o[Ie]||(r[n]={id:o.id,url:o.url,info:I(o.info,!0)},t++);t&&(e.references=r)}if(this.types.size){e.types={};for(let t of this.types.values())e.types[t.name]=t.toJSON()}return this.api&&(e.api=this.api.toJSON()),e}invalidate(){let e=this.export();delete e.id,this.id=$a(JSON.stringify(e)),this[ge]=new WeakMap}_findDataType(e,t){let r=this.types.get(e);if(r||!this.references.size)return r;if(typeof e=="string"){let o=Jo.exec(e);if(o){let a=o[1];if(a){let p=this.references.get(a);return p?(t=t||new WeakMap,t.set(this,!0),t.set(p,!0),p._findDataType(o[2],t)):void 0}e=o[2]}}t=t||new WeakMap,t.set(this,!0);let n=Array.from(this.references.keys()).reverse();for(let o of n){let a=this.references.get(o);if(r=a==null?void 0:a.types.get(e),r)return this[ge].set(r,a!=null&&a[Ie]?"":o),r}for(let o of n){let a=this.references.get(o);if(t.set(a,!0),r=a._findDataType(e,t),r)return this[ge].set(r,a!=null&&a[Ie]?"":o),r}}};s(Ki,"ApiDocument");var Fe=Ki;ns=ge;import{__decorate as Va,__metadata as Ka}from"tslib";import{vg as os}from"valgen";var He,ur=(He=class{constructor(e){e&&Object.assign(this,e)}[y](){return os.isBase64({coerce:!0})}[g](){return os.isBase64({coerce:!0})}},s(He,"Base64Type"),He);ur=Va([m({description:"A stream of bytes, base64 encoded",nameMappings:{js:"string",json:"string"}}),Ka("design:paramtypes",[Object])],ur);import{__decorate as zi,__metadata as Ji}from"tslib";import{isDateString as mr,toString as ss,vg as Ae}from"valgen";var et,tt=(et=class{constructor(e){e&&Object.assign(this,e)}[y](e){let t=Ae.isDate({precision:"date",coerce:!0}),r=[];return e.minValue&&(mr(e.minValue),r.push(ss,Ae.isGte(e.minValue))),e.maxValue&&(mr(e.maxValue),r.push(ss,Ae.isLte(e.maxValue))),r.length>0?Ae.pipe([t,...r],{returnIndex:0}):t}[g](e){let t=Ae.isDateString({precision:"date",trim:"date",coerce:!0}),r=[];return e.minValue&&(mr(e.minValue),r.push(Ae.isGte(e.minValue))),e.maxValue&&(mr(e.maxValue),r.push(Ae.isLte(e.maxValue))),r.length>0?Ae.pipe([t,...r],{returnIndex:0}):t}},s(et,"DateType"),et);zi([m.Attribute({description:"Minimum value"}),Ji("design:type",String)],tt.prototype,"minValue",void 0);zi([m.Attribute({description:"Maximum value"}),Ji("design:type",String)],tt.prototype,"maxValue",void 0);tt=zi([m({description:"A date without time",nameMappings:{js:"Date",json:"string"}}).Example("2021-04-18","Full date value"),Ji("design:paramtypes",[Object])],tt);import{__decorate as Wi,__metadata as Gi}from"tslib";import{vg as hr}from"valgen";var rt,it=(rt=class{constructor(e){e&&Object.assign(this,e)}[y](e){let t=hr.isDateString({trim:"date",coerce:!0}),r=[];return e.minValue&&r.push(hr.isGte(e.minValue)),e.maxValue&&r.push(hr.isLte(e.maxValue)),r.length>0?hr.pipe([t,...r],{returnIndex:0}):t}[g](e){return this[y](e)}},s(rt,"DateStringType"),rt);Wi([m.Attribute({description:"Minimum value"}),Gi("design:type",String)],it.prototype,"minValue",void 0);Wi([m.Attribute({description:"Maximum value"}),Gi("design:type",String)],it.prototype,"maxValue",void 0);it=Wi([m({description:"Date string value",nameMappings:{js:"string",json:"string"}}).Example("2021-04-18","Full date value").Example("2021-04","Date value without day").Example("2021","Year only value"),Gi("design:paramtypes",[Object])],it);import{__decorate as Yi,__metadata as Qi}from"tslib";import{isDateString as dr,toString as as,vg as be}from"valgen";var nt,ot=(nt=class{constructor(e){e&&Object.assign(this,e)}[y](e){let t=be.isDate({precision:"time",coerce:!0}),r=[];return e.minValue&&(dr(e.minValue),r.push(as,be.isGte(e.minValue))),e.maxValue&&(dr(e.maxValue),r.push(as,be.isLte(e.maxValue))),r.length>0?be.pipe([t,...r],{returnIndex:0}):t}[g](e){let t=be.isDateString({precision:"time",trim:"time",coerce:!0}),r=[];return e.minValue&&(dr(e.minValue),r.push(be.isGte(e.minValue))),e.maxValue&&(dr(e.maxValue),r.push(be.isLte(e.maxValue))),r.length>0?be.pipe([t,...r],{returnIndex:0}):t}},s(nt,"DateTimeType"),nt);Yi([m.Attribute({description:"Minimum value"}),Qi("design:type",String)],ot.prototype,"minValue",void 0);Yi([m.Attribute({description:"Maximum value"}),Qi("design:type",String)],ot.prototype,"maxValue",void 0);ot=Yi([m({description:"A full datetime value",nameMappings:{js:"string",json:"string"}}).Example("2021-04-18T22:30:15").Example("2021-04-18 22:30:15").Example("2021-04-18 22:30"),Qi("design:paramtypes",[Object])],ot);import{__decorate as Xi,__metadata as Zi}from"tslib";import{vg as yr}from"valgen";var st,at=(st=class{constructor(e){e&&Object.assign(this,e)}[y](e){let t=yr.isDateString({coerce:!0}),r=[];return e.minValue&&r.push(yr.isGte(e.minValue)),e.maxValue&&r.push(yr.isLte(e.maxValue)),r.length>0?yr.pipe([t,...r]):t}[g](e){return this[y](e)}},s(st,"DateTimeStringType"),st);Xi([m.Attribute({description:"Minimum value"}),Zi("design:type",String)],at.prototype,"minValue",void 0);Xi([m.Attribute({description:"Maximum value"}),Zi("design:type",String)],at.prototype,"maxValue",void 0);at=Xi([m({description:"DateTime string value",nameMappings:{js:"string",json:"string"}}).Example("2021-04-18T22:30:15+01:00","Full date-time value with timezone").Example("2021-04-18T22:30:15","Full date-time value without timezone").Example("2021-04-18 22:30","Date-time value").Example("2021-04-18","Date value").Example("2021-04","Date value without day").Example("2021","Year only value"),Zi("design:paramtypes",[Object])],at);import{__decorate as se,__metadata as ae}from"tslib";import{vg as ps}from"valgen";var pt,W=(pt=class{constructor(e){e&&Object.assign(this,e)}[y](e){return ps.isEmail({...e,coerce:!0})}[g](e){return ps.isEmail({...e,coerce:!0})}},s(pt,"EmailType"),pt);se([m.Attribute({description:"If set to `true`, the validator will also match `Display Name <email-address>",default:!1}),ae("design:type",Boolean)],W.prototype,"allowDisplayName",void 0);se([m.Attribute({description:"If set to `true`, the validator will reject strings without the format `Display Name <email-address>",default:!1}),ae("design:type",Boolean)],W.prototype,"requireDisplayName",void 0);se([m.Attribute({description:"If set to `false`, the validator will not allow any non-English UTF8 character in email address's local part",default:!0}),ae("design:type",Boolean)],W.prototype,"utf8LocalPart",void 0);se([m.Attribute({description:"If set to `true`, the validator will not check for the standard max length of an email",default:!1}),ae("design:type",Boolean)],W.prototype,"ignoreMaxLength",void 0);se([m.Attribute({description:"If set to `true`, the validator will allow IP addresses in the host part",default:!1}),ae("design:type",Boolean)],W.prototype,"allowIpDomain",void 0);se([m.Attribute({description:"If set to `true`, some additional validation will be enabled, e.g. disallowing certain syntactically valid email addresses that are rejected by GMail.",default:!1}),ae("design:type",Boolean)],W.prototype,"domainSpecificValidation",void 0);se([m.Attribute({description:"If set to an array of strings and the part of the email after the @ symbol one of the strings defined in it, the validation fails."}),ae("design:type",Array)],W.prototype,"hostBlacklist",void 0);se([m.Attribute({description:"If set to an array of strings and the part of the email after the @ symbol matches none of the strings defined in it, the validation fails."}),ae("design:type",Array)],W.prototype,"hostWhitelist",void 0);se([m.Attribute({description:"If set to a string, then the validator will reject emails that include any of the characters in the string, in the name part."}),ae("design:type",String)],W.prototype,"blacklistedChars",void 0);W=se([m({description:"An email value",nameMappings:{js:"string",json:"string"}}).Example("some.body@example.com"),ae("design:paramtypes",[Object])],W);import{__decorate as Hi,__metadata as en}from"tslib";import{toString as za,validator as Ja,vg as Wa}from"valgen";var ct,H=(ct=class{constructor(e){e&&Object.assign(this,e)}[y](e,t){let r=e.dataType?t.node.getComplexType(e.dataType):t.node.getComplexType("object"),n=e.allowSigns,o=Ja("decodeFieldPath",a=>r.normalizeFieldPath(a,{allowSigns:n}));return Wa.pipe([za,o])}[g](e,t){return this[y](e,t)}toJSON(e,t){let r=e.dataType?t.node.getComplexType(e.dataType):t.node.getComplexType("object"),n=r?t.node.getDataTypeNameWithNs(r):void 0;return{dataType:n||r.toJSON(),allowSigns:e.allowSigns}}},s(ct,"FieldPathType"),ct);Hi([m.Attribute({description:"Data type which field belong to"}),en("design:type",Object)],H.prototype,"dataType",void 0);Hi([m.Attribute({description:'Determines if signs (+,-) are allowed. If set "first" signs are allowed only beginning of the field pathIf set "each" signs are allowed at each field in the path'}),en("design:type",String)],H.prototype,"allowSigns",void 0);H=Hi([m({description:"Field path",nameMappings:{js:"string",json:"string"}}),en("design:paramtypes",[Object])],H);import{__decorate as Mo,__metadata as vo}from"tslib";import{validator as Ns}from"valgen";var tn=class tn extends me{constructor(e,t,r){super(e,t instanceof Error?t:void 0),this.status=(typeof t=="number"?t:Number(r))||500}setStatus(e){return this.status=e,this}initError(e){typeof e.status=="number"?this.status=e.status:typeof e.getStatus=="function"&&(this.status=e.getStatus()),super.initError(e)}};s(tn,"OpraHttpError");var A=tn;var rn=class rn extends A{constructor(){super(...arguments),this.status=400}init(e){super.init({message:R("error:BAD_REQUEST","Bad request"),code:"BAD_REQUEST",...e})}};s(rn,"BadRequestError");var cs=rn;var nn=class nn extends A{constructor(){super(...arguments),this.status=409}init(e){super.init({message:R("error:CONFLICT","Conflict"),code:"CONFLICT",...e})}};s(nn,"ConflictError");var ls=nn;var on=class on extends A{constructor(){super(...arguments),this.status=424}init(e){super.init({message:R("error:FAILED_DEPENDENCY","The request failed due to failure of a previous request"),code:"FAILED_DEPENDENCY",...e})}};s(on,"FailedDependencyError");var fs=on;var sn=class sn extends A{constructor(){super(...arguments),this.status=N.FORBIDDEN}init(e){super.init({message:R("error:FORBIDDEN","You are not authorized to perform this action"),code:"FORBIDDEN",...e})}};s(sn,"ForbiddenError");var Tr=sn;var an=class an extends A{constructor(){super(...arguments),this.status=500}init(e){super.init({message:R("error:INTERNAL_SERVER_ERROR","Internal server error"),code:"INTERNAL_SERVER_ERROR",severity:"fatal",...e})}};s(an,"InternalServerError");var us=an;var pn=class pn extends A{constructor(){super(...arguments),this.status=405}init(e){super.init({message:R("error:METHOD_NOT_ALLOWED","Method not allowed"),code:"METHOD_NOT_ALLOWED",...e})}};s(pn,"MethodNotAllowedError");var ms=pn;var cn=class cn extends A{constructor(){super(...arguments),this.status=406}init(e){super.init({message:R("error:NOT_ACCEPTABLE","Not Acceptable"),code:"NOT_ACCEPTABLE",...e})}};s(cn,"NotAcceptableError");var hs=cn;var ln=class ln extends A{constructor(){super(...arguments),this.status=404}init(e){super.init({message:R("error:NOT_FOUND","Not found"),code:"NOT_FOUND",...e})}};s(ln,"NotFoundError");var ds=ln;var fn=class fn extends Tr{init(e){super.init({message:R("error:PERMISSION_ERROR","You dont have permission for this operation"),code:"PERMISSION_ERROR",...e})}};s(fn,"PermissionError");var ys=fn;var un=class un extends A{constructor(e,t,r){super({message:R("error:RESOURCE_CONFLICT",{resource:e,fields:t},"There is already an other {{resource}} resource with same values ({{fields}})"),severity:"error",code:"RESOURCE_CONFLICT",details:{resource:e,location:t}},r),this.status=409}};s(un,"ResourceConflictError");var Ts=un;var mn=class mn extends A{constructor(e,t,r){super({message:R("error:RESOURCE_NOT_AVAILABLE",`Resource "${e}${t?"/"+t:""}" is not available`),severity:"error",code:"RESOURCE_NOT_AVAILABLE",details:{resource:e,key:t}},r,N.UNPROCESSABLE_ENTITY)}};s(mn,"ResourceNotAvailableError");var Es=mn;var hn=class hn extends A{constructor(){super(...arguments),this.status=401}init(e){super.init({message:R("error:UNAUTHORIZED","You have not been authenticated to perform this action"),code:"UNAUTHORIZED",...e})}};s(hn,"UnauthorizedError");var _s=hn;var dn=class dn extends A{constructor(){super(...arguments),this.status=422}init(e){super.init({message:R("error:UNPROCESSABLE_ENTITY","Unprocessable entity"),severity:"error",code:"UNPROCESSABLE_ENTITY",...e})}};s(dn,"UnprocessableEntityError");var xs=dn;var gs;(function(i){let e;(function(t){t.fatal="fatal",t.error="error",t.warning="warning",t.info="info"})(e=i.Enum||(i.Enum={})),i.name="IssueSeverity",i.description="Severity of the issue",i.Keys=Object.keys(i),i.descriptions={fatal:"The issue caused the action to fail and no further checking could be performed",error:"The issue is sufficiently important to cause the action to fail",warning:"The issue is not important enough to cause the action to fail but may cause it to be performed suboptimally or in a way that is not as desired",info:"The issue has no relation to the degree of success of the action"}})(gs||(gs={}));var yn=class yn{constructor(){this.kind=Object.getPrototypeOf(this).constructor.name}};s(yn,"Ast");var kt=yn;var Tn=class Tn extends kt{};s(Tn,"Expression");var k=Tn;var En=class En extends k{};s(En,"Term");var ke=En;var _n=class _n extends ke{constructor(e){super(),this.value=e}toString(){return""+this.value}};s(_n,"Literal");var v=_n;var xn=class xn extends k{constructor(){super(),this.items=[]}append(e,t){return this.items.push(new Er({op:e,expression:t})),this}toString(){return this.items.map((e,t)=>(t>0?e.op:"")+e.expression).join("")}};s(xn,"ArithmeticExpression");var je=xn,gn=class gn{constructor(e){Object.assign(this,e)}};s(gn,"ArithmeticExpressionItem");var Er=gn;var On=class On extends ke{constructor(e){super(),this.items=e}toString(){return"["+this.items.map(e=>""+e).join(",")+"]"}};s(On,"ArrayExpression");var he=On;var Ga=/\w/,Rn=class Rn extends k{constructor(e){super(),Object.assign(this,e)}toString(){return`${this.left}${Ga.test(this.op)?" "+this.op+" ":this.op}${this.right}`}};s(Rn,"ComparisonExpression");var de=Rn;var An=class An extends k{constructor(e){super(),Object.assign(this,e),this.op==="&&"&&(this.op="and"),this.op==="||"&&(this.op="or")}toString(){return this.items.map(e=>""+e).join(" "+this.op+" ")}};s(An,"LogicalExpression");var pe=An;var bn=class bn extends k{constructor(e){super(),this.expression=e}toString(){return`(${this.expression})`}};s(bn,"NegativeExpression");var jt=bn;var wn=class wn extends k{constructor(e){super(),this.expression=e}toString(){return`(${this.expression})`}};s(wn,"ParenthesizedExpression");var ye=wn;var Nn=class Nn extends v{constructor(e){super(e)}};s(Nn,"BooleanLiteral");var Ue=Nn;import{toDateDef as ep}from"putil-varhelpers";var Dn=class Dn extends TypeError{};s(Dn,"SyntaxError");var _r=Dn,Sn=class Sn extends TypeError{constructor(e){super(typeof e=="string"?e:e==null?void 0:e.message),typeof e=="object"&&Object.assign(this,e)}};s(Sn,"FilterValidationError");var we=Sn,In=class In extends Error{constructor(e,t){super(e),Object.assign(this,t)}};s(In,"FilterParseError");var xr=In;var Ya=/'/g,Qa=/(\\)/g,Xa=/\\(.)/g;function Za(i){return i.replace(Qa,"\\\\")}s(Za,"escapeString");function Ha(i){return i.replace(Xa,"$1")}s(Ha,"unescapeString");function lt(i){return"'"+Za(i).replace(Ya,"\\'")+"'"}s(lt,"quoteFilterString");function Ut(i){return i&&(i.startsWith("'")||i.startsWith('"'))&&i.endsWith(i.charAt(0))?Ha(i.substring(1,i.length-1)):i}s(Ut,"unquoteFilterString");var Os=new Date(0),Ln=class Ln extends v{constructor(e){if(super(""),e instanceof Date){this.value=e.toISOString();return}if(typeof e=="string"&&ep(e,Os)!==Os){this.value=e;return}throw new we(`Invalid date value "${e}"`)}toString(){return lt(this.value)}};s(Ln,"DateLiteral");var Te=Ln;var Pn=class Pn extends v{constructor(){super(null),this.value=null}};s(Pn,"NullLiteral");var Ce=Pn;var Mn=class Mn extends v{constructor(e){if(super(0),typeof e=="number"||typeof e=="bigint"){this.value=e;return}try{if(typeof e=="string"){if(e.includes(".")){this.value=parseFloat(e);return}let t=Number(e);""+t===e?this.value=t:this.value=BigInt(e);return}}catch{}throw new we(`Invalid number literal ${e}`)}toString(){return typeof this.value=="bigint"?(""+this.value).replace(/n$/,""):""+this.value}};s(Mn,"NumberLiteral");var Ee=Mn;var vn=class vn extends v{constructor(e){super(""+e)}};s(vn,"QualifiedIdentifier");var ce=vn;var Fn=class Fn extends v{constructor(e){super(""+e)}toString(){return lt(this.value)}};s(Fn,"StringLiteral");var Be=Fn;var tp=/^([01]\d|2[0-3]):([0-5]\d)(:[0-5]\d)?(\.(\d+))?$/,kn=class kn extends v{constructor(e){if(super(""),e instanceof Date){this.value=gr(e.getHours())+":"+gr(e.getMinutes())+(e.getSeconds()?":"+gr(e.getSeconds()):"")+(e.getMilliseconds()?"."+gr(e.getMilliseconds()):"");return}if(typeof e=="string"&&tp.test(e)){this.value=e;return}throw new we(`Invalid time value "${e}"`)}toString(){return lt(this.value)}};s(kn,"TimeLiteral");var qe=kn;function gr(i){return i<=9?"0"+i:""+i}s(gr,"pad");import{CharStream as Tp,CommonTokenStream as Ep}from"@browsery/antlr4";import{ATNDeserializer as rp,DFA as ip,Lexer as np,LexerATNSimulator as op,PredictionContextCache as sp,Token as ap}from"@browsery/antlr4";var q=class q extends np{constructor(e){super(e),this._interp=new op(this,q._ATN,q.DecisionsToDFA,new sp)}get grammarFileName(){return"OpraFilter.g4"}get literalNames(){return q.literalNames}get symbolicNames(){return q.symbolicNames}get ruleNames(){return q.ruleNames}get serializedATN(){return q._serializedATN}get channelNames(){return q.channelNames}get modeNames(){return q.modeNames}static get _ATN(){return q.__ATN||(q.__ATN=new rp().deserialize(q._serializedATN)),q.__ATN}};s(q,"OpraFilterLexer");var d=q;d.T__0=1;d.T__1=2;d.T__2=3;d.T__3=4;d.T__4=5;d.T__5=6;d.T__6=7;d.T__7=8;d.T__8=9;d.T__9=10;d.T__10=11;d.T__11=12;d.T__12=13;d.T__13=14;d.T__14=15;d.T__15=16;d.T__16=17;d.T__17=18;d.T__18=19;d.T__19=20;d.T__20=21;d.T__21=22;d.T__22=23;d.T__23=24;d.T__24=25;d.T__25=26;d.T__26=27;d.T__27=28;d.T__28=29;d.T__29=30;d.T__30=31;d.T__31=32;d.T__32=33;d.T__33=34;d.IDENTIFIER=35;d.POLAR_OP=36;d.DATE=37;d.DATETIME=38;d.TIME=39;d.NUMBER=40;d.INTEGER=41;d.STRING=42;d.WHITESPACE=43;d.EOF=ap.EOF;d.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"];d.literalNames=[null,"'('","')'","'not'","'!'","'.'","'@'","'['","','","']'","'true'","'false'","'null'","'Infinity'","'infinity'","'+'","'-'","'*'","'/'","'<='","'<'","'>'","'>='","'='","'!='","'in'","'!in'","'like'","'!like'","'ilike'","'!ilike'","'and'","'or'","'&&'","'||'"];d.symbolicNames=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"IDENTIFIER","POLAR_OP","DATE","DATETIME","TIME","NUMBER","INTEGER","STRING","WHITESPACE"];d.modeNames=["DEFAULT_MODE"];d.ruleNames=["T__0","T__1","T__2","T__3","T__4","T__5","T__6","T__7","T__8","T__9","T__10","T__11","T__12","T__13","T__14","T__15","T__16","T__17","T__18","T__19","T__20","T__21","T__22","T__23","T__24","T__25","T__26","T__27","T__28","T__29","T__30","T__31","T__32","T__33","IDENTIFIER","POLAR_OP","DATE","DATETIME","TIME","NUMBER","INTEGER","STRING","WHITESPACE","DIGIT","DATEFORMAT","TIMEFORMAT","TIMEZONEOFFSETFORMAT","ESC","UNICODE","HEX"];d._serializedATN=[4,0,43,426,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,1,0,1,0,1,1,1,1,1,2,1,2,1,2,1,2,1,3,1,3,1,4,1,4,1,5,1,5,1,6,1,6,1,7,1,7,1,8,1,8,1,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,15,1,15,1,16,1,16,1,17,1,17,1,18,1,18,1,18,1,19,1,19,1,20,1,20,1,21,1,21,1,21,1,22,1,22,1,23,1,23,1,23,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30,1,31,1,31,1,31,1,32,1,32,1,32,1,33,1,33,1,33,1,34,1,34,5,34,225,8,34,10,34,12,34,228,9,34,1,35,1,35,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,3,36,240,8,36,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,3,37,256,8,37,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,3,38,266,8,38,1,39,3,39,269,8,39,1,39,4,39,272,8,39,11,39,12,39,273,1,39,1,39,5,39,278,8,39,10,39,12,39,281,9,39,3,39,283,8,39,1,39,1,39,3,39,287,8,39,1,39,4,39,290,8,39,11,39,12,39,291,3,39,294,8,39,1,39,1,39,1,39,1,39,4,39,300,8,39,11,39,12,39,301,3,39,304,8,39,1,40,3,40,307,8,40,1,40,4,40,310,8,40,11,40,12,40,311,1,40,1,40,1,40,1,40,4,40,318,8,40,11,40,12,40,319,3,40,322,8,40,1,41,1,41,1,41,5,41,327,8,41,10,41,12,41,330,9,41,1,41,1,41,1,41,1,41,5,41,336,8,41,10,41,12,41,339,9,41,1,41,3,41,342,8,41,1,42,4,42,345,8,42,11,42,12,42,346,1,42,1,42,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,3,44,362,8,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,3,44,371,8,44,1,45,1,45,1,45,1,45,3,45,377,8,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,4,45,389,8,45,11,45,12,45,390,3,45,393,8,45,3,45,395,8,45,1,46,1,46,1,46,3,46,400,8,46,1,46,1,46,1,46,3,46,405,8,46,1,46,1,46,1,46,3,46,410,8,46,3,46,412,8,46,1,47,1,47,1,47,3,47,417,8,47,1,48,1,48,1,48,1,48,1,48,1,48,1,49,1,49,0,0,50,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,30,61,31,63,32,65,33,67,34,69,35,71,36,73,37,75,38,77,39,79,40,81,41,83,42,85,43,87,0,89,0,91,0,93,0,95,0,97,0,99,0,1,0,16,4,0,36,36,65,90,95,95,97,122,5,0,36,36,48,57,65,90,95,95,97,122,2,0,43,43,45,45,1,0,39,39,1,0,34,34,3,0,9,10,13,13,32,32,1,0,48,57,1,0,48,48,1,0,49,57,1,0,49,49,1,0,48,50,1,0,49,51,1,0,48,49,1,0,48,51,1,0,48,53,3,0,48,57,65,70,97,102,453,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,1,101,1,0,0,0,3,103,1,0,0,0,5,105,1,0,0,0,7,109,1,0,0,0,9,111,1,0,0,0,11,113,1,0,0,0,13,115,1,0,0,0,15,117,1,0,0,0,17,119,1,0,0,0,19,121,1,0,0,0,21,126,1,0,0,0,23,132,1,0,0,0,25,137,1,0,0,0,27,146,1,0,0,0,29,155,1,0,0,0,31,157,1,0,0,0,33,159,1,0,0,0,35,161,1,0,0,0,37,163,1,0,0,0,39,166,1,0,0,0,41,168,1,0,0,0,43,170,1,0,0,0,45,173,1,0,0,0,47,175,1,0,0,0,49,178,1,0,0,0,51,181,1,0,0,0,53,185,1,0,0,0,55,190,1,0,0,0,57,196,1,0,0,0,59,202,1,0,0,0,61,209,1,0,0,0,63,213,1,0,0,0,65,216,1,0,0,0,67,219,1,0,0,0,69,222,1,0,0,0,71,229,1,0,0,0,73,239,1,0,0,0,75,255,1,0,0,0,77,265,1,0,0,0,79,303,1,0,0,0,81,321,1,0,0,0,83,341,1,0,0,0,85,344,1,0,0,0,87,350,1,0,0,0,89,352,1,0,0,0,91,376,1,0,0,0,93,411,1,0,0,0,95,413,1,0,0,0,97,418,1,0,0,0,99,424,1,0,0,0,101,102,5,40,0,0,102,2,1,0,0,0,103,104,5,41,0,0,104,4,1,0,0,0,105,106,5,110,0,0,106,107,5,111,0,0,107,108,5,116,0,0,108,6,1,0,0,0,109,110,5,33,0,0,110,8,1,0,0,0,111,112,5,46,0,0,112,10,1,0,0,0,113,114,5,64,0,0,114,12,1,0,0,0,115,116,5,91,0,0,116,14,1,0,0,0,117,118,5,44,0,0,118,16,1,0,0,0,119,120,5,93,0,0,120,18,1,0,0,0,121,122,5,116,0,0,122,123,5,114,0,0,123,124,5,117,0,0,124,125,5,101,0,0,125,20,1,0,0,0,126,127,5,102,0,0,127,128,5,97,0,0,128,129,5,108,0,0,129,130,5,115,0,0,130,131,5,101,0,0,131,22,1,0,0,0,132,133,5,110,0,0,133,134,5,117,0,0,134,135,5,108,0,0,135,136,5,108,0,0,136,24,1,0,0,0,137,138,5,73,0,0,138,139,5,110,0,0,139,140,5,102,0,0,140,141,5,105,0,0,141,142,5,110,0,0,142,143,5,105,0,0,143,144,5,116,0,0,144,145,5,121,0,0,145,26,1,0,0,0,146,147,5,105,0,0,147,148,5,110,0,0,148,149,5,102,0,0,149,150,5,105,0,0,150,151,5,110,0,0,151,152,5,105,0,0,152,153,5,116,0,0,153,154,5,121,0,0,154,28,1,0,0,0,155,156,5,43,0,0,156,30,1,0,0,0,157,158,5,45,0,0,158,32,1,0,0,0,159,160,5,42,0,0,160,34,1,0,0,0,161,162,5,47,0,0,162,36,1,0,0,0,163,164,5,60,0,0,164,165,5,61,0,0,165,38,1,0,0,0,166,167,5,60,0,0,167,40,1,0,0,0,168,169,5,62,0,0,169,42,1,0,0,0,170,171,5,62,0,0,171,172,5,61,0,0,172,44,1,0,0,0,173,174,5,61,0,0,174,46,1,0,0,0,175,176,5,33,0,0,176,177,5,61,0,0,177,48,1,0,0,0,178,179,5,105,0,0,179,180,5,110,0,0,180,50,1,0,0,0,181,182,5,33,0,0,182,183,5,105,0,0,183,184,5,110,0,0,184,52,1,0,0,0,185,186,5,108,0,0,186,187,5,105,0,0,187,188,5,107,0,0,188,189,5,101,0,0,189,54,1,0,0,0,190,191,5,33,0,0,191,192,5,108,0,0,192,193,5,105,0,0,193,194,5,107,0,0,194,195,5,101,0,0,195,56,1,0,0,0,196,197,5,105,0,0,197,198,5,108,0,0,198,199,5,105,0,0,199,200,5,107,0,0,200,201,5,101,0,0,201,58,1,0,0,0,202,203,5,33,0,0,203,204,5,105,0,0,204,205,5,108,0,0,205,206,5,105,0,0,206,207,5,107,0,0,207,208,5,101,0,0,208,60,1,0,0,0,209,210,5,97,0,0,210,211,5,110,0,0,211,212,5,100,0,0,212,62,1,0,0,0,213,214,5,111,0,0,214,215,5,114,0,0,215,64,1,0,0,0,216,217,5,38,0,0,217,218,5,38,0,0,218,66,1,0,0,0,219,220,5,124,0,0,220,221,5,124,0,0,221,68,1,0,0,0,222,226,7,0,0,0,223,225,7,1,0,0,224,223,1,0,0,0,225,228,1,0,0,0,226,224,1,0,0,0,226,227,1,0,0,0,227,70,1,0,0,0,228,226,1,0,0,0,229,230,7,2,0,0,230,72,1,0,0,0,231,232,5,39,0,0,232,233,3,89,44,0,233,234,5,39,0,0,234,240,1,0,0,0,235,236,5,34,0,0,236,237,3,89,44,0,237,238,5,34,0,0,238,240,1,0,0,0,239,231,1,0,0,0,239,235,1,0,0,0,240,74,1,0,0,0,241,242,5,39,0,0,242,243,3,89,44,0,243,244,5,84,0,0,244,245,3,91,45,0,245,246,3,93,46,0,246,247,5,39,0,0,247,256,1,0,0,0,248,249,5,34,0,0,249,250,3,89,44,0,250,251,5,84,0,0,251,252,3,91,45,0,252,253,3,93,46,0,253,254,5,34,0,0,254,256,1,0,0,0,255,241,1,0,0,0,255,248,1,0,0,0,256,76,1,0,0,0,257,258,5,39,0,0,258,259,3,91,45,0,259,260,5,39,0,0,260,266,1,0,0,0,261,262,5,34,0,0,262,263,3,91,45,0,263,264,5,34,0,0,264,266,1,0,0,0,265,257,1,0,0,0,265,261,1,0,0,0,266,78,1,0,0,0,267,269,3,71,35,0,268,267,1,0,0,0,268,269,1,0,0,0,269,271,1,0,0,0,270,272,3,87,43,0,271,270,1,0,0,0,272,273,1,0,0,0,273,271,1,0,0,0,273,274,1,0,0,0,274,282,1,0,0,0,275,279,5,46,0,0,276,278,3,87,43,0,277,276,1,0,0,0,278,281,1,0,0,0,279,277,1,0,0,0,279,280,1,0,0,0,280,283,1,0,0,0,281,279,1,0,0,0,282,275,1,0,0,0,282,283,1,0,0,0,283,293,1,0,0,0,284,286,5,69,0,0,285,287,7,2,0,0,286,285,1,0,0,0,286,287,1,0,0,0,287,289,1,0,0,0,288,290,3,87,43,0,289,288,1,0,0,0,290,291,1,0,0,0,291,289,1,0,0,0,291,292,1,0,0,0,292,294,1,0,0,0,293,284,1,0,0,0,293,294,1,0,0,0,294,304,1,0,0,0,295,296,5,48,0,0,296,297,5,120,0,0,297,299,1,0,0,0,298,300,3,99,49,0,299,298,1,0,0,0,300,301,1,0,0,0,301,299,1,0,0,0,301,302,1,0,0,0,302,304,1,0,0,0,303,268,1,0,0,0,303,295,1,0,0,0,304,80,1,0,0,0,305,307,3,71,35,0,306,305,1,0,0,0,306,307,1,0,0,0,307,309,1,0,0,0,308,310,3,87,43,0,309,308,1,0,0,0,310,311,1,0,0,0,311,309,1,0,0,0,311,312,1,0,0,0,312,322,1,0,0,0,313,314,5,48,0,0,314,315,5,120,0,0,315,317,1,0,0,0,316,318,3,99,49,0,317,316,1,0,0,0,318,319,1,0,0,0,319,317,1,0,0,0,319,320,1,0,0,0,320,322,1,0,0,0,321,306,1,0,0,0,321,313,1,0,0,0,322,82,1,0,0,0,323,328,5,39,0,0,324,327,3,95,47,0,325,327,8,3,0,0,326,324,1,0,0,0,326,325,1,0,0,0,327,330,1,0,0,0,328,326,1,0,0,0,328,329,1,0,0,0,329,331,1,0,0,0,330,328,1,0,0,0,331,342,5,39,0,0,332,337,5,34,0,0,333,336,3,95,47,0,334,336,8,4,0,0,335,333,1,0,0,0,335,334,1,0,0,0,336,339,1,0,0,0,337,335,1,0,0,0,337,338,1,0,0,0,338,340,1,0,0,0,339,337,1,0,0,0,340,342,5,34,0,0,341,323,1,0,0,0,341,332,1,0,0,0,342,84,1,0,0,0,343,345,7,5,0,0,344,343,1,0,0,0,345,346,1,0,0,0,346,344,1,0,0,0,346,347,1,0,0,0,347,348,1,0,0,0,348,349,6,42,0,0,349,86,1,0,0,0,350,351,7,6,0,0,351,88,1,0,0,0,352,353,7,6,0,0,353,354,7,6,0,0,354,355,7,6,0,0,355,356,7,6,0,0,356,361,5,45,0,0,357,358,7,7,0,0,358,362,7,8,0,0,359,360,7,9,0,0,360,362,7,10,0,0,361,357,1,0,0,0,361,359,1,0,0,0,362,363,1,0,0,0,363,370,5,45,0,0,364,365,7,11,0,0,365,371,7,7,0,0,366,367,7,10,0,0,367,371,7,8,0,0,368,369,5,51,0,0,369,371,5,49,0,0,370,364,1,0,0,0,370,366,1,0,0,0,370,368,1,0,0,0,371,90,1,0,0,0,372,373,7,12,0,0,373,377,7,6,0,0,374,375,5,50,0,0,375,377,7,13,0,0,376,372,1,0,0,0,376,374,1,0,0,0,377,378,1,0,0,0,378,379,5,58,0,0,379,380,7,14,0,0,380,381,7,6,0,0,381,394,1,0,0,0,382,383,5,58,0,0,383,384,7,14,0,0,384,385,7,6,0,0,385,392,1,0,0,0,386,388,5,46,0,0,387,389,7,6,0,0,388,387,1,0,0,0,389,390,1,0,0,0,390,388,1,0,0,0,390,391,1,0,0,0,391,393,1,0,0,0,392,386,1,0,0,0,392,393,1,0,0,0,393,395,1,0,0,0,394,382,1,0,0,0,394,395,1,0,0,0,395,92,1,0,0,0,396,412,5,90,0,0,397,404,7,2,0,0,398,400,7,12,0,0,399,398,1,0,0,0,399,400,1,0,0,0,400,401,1,0,0,0,401,405,7,6,0,0,402,403,5,50,0,0,403,405,7,13,0,0,404,399,1,0,0,0,404,402,1,0,0,0,405,409,1,0,0,0,406,407,5,58,0,0,407,408,7,14,0,0,408,410,7,6,0,0,409,406,1,0,0,0,409,410,1,0,0,0,410,412,1,0,0,0,411,396,1,0,0,0,411,397,1,0,0,0,412,94,1,0,0,0,413,416,5,92,0,0,414,417,3,97,48,0,415,417,9,0,0,0,416,414,1,0,0,0,416,415,1,0,0,0,417,96,1,0,0,0,418,419,5,117,0,0,419,420,3,99,49,0,420,421,3,99,49,0,421,422,3,99,49,0,422,423,3,99,49,0,423,98,1,0,0,0,424,425,7,15,0,0,425,100,1,0,0,0,35,0,226,239,255,265,268,273,279,282,286,291,293,301,303,306,311,319,321,326,328,335,337,341,346,361,370,376,390,392,394,399,404,409,411,416,1,0,1,0];d.DecisionsToDFA=d._ATN.decisionToState.map((i,e)=>new ip(i,e));var Rs=d;import{ATN as As,ATNDeserializer as pp,DFA as cp,FailedPredicateException as lp,NoViableAltException as jn,Parser as fp,ParserATNSimulator as up,ParserRuleContext as U,PredictionContextCache as mp,RecognitionException as j,Token as hp}from"@browsery/antlr4";var E=class E extends fp{get grammarFileName(){return"OpraFilter.g4"}get literalNames(){return E.literalNames}get symbolicNames(){return E.symbolicNames}get ruleNames(){return E.ruleNames}get serializedATN(){return E._serializedATN}createFailedPredicateException(e,t){return new lp(this,e,t)}constructor(e){super(e),this._interp=new up(this,E._ATN,E.DecisionsToDFA,new mp)}root(){let e=new Un(this,this._ctx,this.state);this.enterRule(e,0,E.RULE_root);try{this.enterOuterAlt(e,1),this.state=34,this.expression(0),this.state=35,this.match(E.EOF)}catch(t){if(t instanceof j)e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t);else throw t}finally{this.exitRule()}return e}expression(e){e===void 0&&(e=0);let t=this._ctx,r=this.state,n=new G(this,this._ctx,r),o=n,a=2;this.enterRecursionRule(n,2,E.RULE_expression,e);let p;try{let c;this.enterOuterAlt(n,1);{switch(this.state=48,this._errHandler.sync(this),this._input.LA(1)){case 35:n=new qn(this,n),this._ctx=n,o=n,this.state=38,n._left=this.comparisonLeft(),this.state=39,n._operator=this.comparisonOperator(),this.state=40,n._right=this.comparisonRight();break;case 1:n=new Cn(this,n),this._ctx=n,o=n,this.state=42,this.match(E.T__0),this.state=43,this.parenthesizedItem(),this.state=44,this.match(E.T__1);break;case 3:case 4:n=new Bn(this,n),this._ctx=n,o=n,this.state=46,p=this._input.LA(1),p===3||p===4?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=47,this.expression(1);break;default:throw new jn(this)}for(this._ctx.stop=this._input.LT(-1),this.state=56,this._errHandler.sync(this),c=this._interp.adaptivePredict(this._input,1,this._ctx);c!==2&&c!==As.INVALID_ALT_NUMBER;){if(c===1){this._parseListeners!=null&&this.triggerExitRuleEvent(),o=n;{if(n=new Ct(this,new G(this,t,r)),this.pushNewRecursionContext(n,a,E.RULE_expression),this.state=50,!this.precpred(this._ctx,3))throw this.createFailedPredicateException("this.precpred(this._ctx, 3)");this.state=51,n._op=this.logicalOperator(),this.state=52,this.expression(4)}}this.state=58,this._errHandler.sync(this),c=this._interp.adaptivePredict(this._input,1,this._ctx)}}}catch(c){if(c instanceof j)n.exception=c,this._errHandler.reportError(this,c),this._errHandler.recover(this,c);else throw c}finally{this.unrollRecursionContexts(t)}return n}comparisonLeft(){let e=new Or(this,this._ctx,this.state);this.enterRule(e,4,E.RULE_comparisonLeft);try{this.enterOuterAlt(e,1),this.state=59,this.qualifiedIdentifier()}catch(t){if(t instanceof j)e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t);else throw t}finally{this.exitRule()}return e}comparisonRight(){let e=new Rr(this,this._ctx,this.state);this.enterRule(e,6,E.RULE_comparisonRight);try{switch(this.state=65,this._errHandler.sync(this),this._input.LA(1)){case 10:case 11:case 12:case 13:case 14:case 37:case 38:case 39:case 40:case 42:this.enterOuterAlt(e,1),this.state=61,this.value();break;case 35:this.enterOuterAlt(e,2),this.state=62,this.qualifiedIdentifier();break;case 6:this.enterOuterAlt(e,3),this.state=63,this.externalConstant();break;case 7:this.enterOuterAlt(e,4),this.state=64,this.arrayValue();break;default:throw new jn(this)}}catch(t){if(t instanceof j)e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t);else throw t}finally{this.exitRule()}return e}parenthesizedItem(){let e=new Ar(this,this._ctx,this.state);this.enterRule(e,8,E.RULE_parenthesizedItem);try{this.enterOuterAlt(e,1),this.state=67,this.expression(0)}catch(t){if(t instanceof j)e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t);else throw t}finally{this.exitRule()}return e}value(){let e=new K(this,this._ctx,this.state);this.enterRule(e,10,E.RULE_value);try{switch(this.state=77,this._errHandler.sync(this),this._input.LA(1)){case 40:e=new Yn(this,e),this.enterOuterAlt(e,1),this.state=69,this.match(E.NUMBER);break;case 13:case 14:e=new Wn(this,e),this.enterOuterAlt(e,2),this.state=70,this.infinity();break;case 10:case 11:e=new Gn(this,e),this.enterOuterAlt(e,3),this.state=71,this.boolean_();break;case 12:e=new Vn(this,e),this.enterOuterAlt(e,4),this.state=72,this.null_();break;case 37:e=new Jn(this,e),this.enterOuterAlt(e,5),this.state=73,this.match(E.DATE);break;case 38:e=new Kn(this,e),this.enterOuterAlt(e,6),this.state=74,this.match(E.DATETIME);break;case 39:e=new $n(this,e),this.enterOuterAlt(e,7),this.state=75,this.match(E.TIME);break;case 42:e=new zn(this,e),this.enterOuterAlt(e,8),this.state=76,this.match(E.STRING);break;default:throw new jn(this)}}catch(t){if(t instanceof j)e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t);else throw t}finally{this.exitRule()}return e}qualifiedIdentifier(){let e=new Bt(this,this._ctx,this.state);this.enterRule(e,12,E.RULE_qualifiedIdentifier);try{let t;this.enterOuterAlt(e,1);{for(this.state=84,this._errHandler.sync(this),t=this._interp.adaptivePredict(this._input,4,this._ctx);t!==2&&t!==As.INVALID_ALT_NUMBER;)t===1&&(this.state=79,this.identifier(),this.state=80,this.match(E.T__4)),this.state=86,this._errHandler.sync(this),t=this._interp.adaptivePredict(this._input,4,this._ctx);this.state=87,this.identifier()}}catch(t){if(t instanceof j)e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t);else throw t}finally{this.exitRule()}return e}externalConstant(){let e=new br(this,this._ctx,this.state);this.enterRule(e,14,E.RULE_externalConstant);try{this.enterOuterAlt(e,1),this.state=89,this.match(E.T__5),this.state=90,this.identifier()}catch(t){if(t instanceof j)e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t);else throw t}finally{this.exitRule()}return e}identifier(){let e=new ft(this,this._ctx,this.state);this.enterRule(e,16,E.RULE_identifier);try{this.enterOuterAlt(e,1),this.state=92,this.match(E.IDENTIFIER)}catch(t){if(t instanceof j)e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t);else throw t}finally{this.exitRule()}return e}arrayValue(){let e=new wr(this,this._ctx,this.state);this.enterRule(e,18,E.RULE_arrayValue);let t;try{this.enterOuterAlt(e,1);{for(this.state=94,this.match(E.T__6),this.state=95,this.value(),this.state=100,this._errHandler.sync(this),t=this._input.LA(1);t===8;)this.state=96,this.match(E.T__7),this.state=97,this.value(),this.state=102,this._errHandler.sync(this),t=this._input.LA(1);this.state=103,this.match(E.T__8)}}catch(r){if(r instanceof j)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}boolean_(){let e=new Nr(this,this._ctx,this.state);this.enterRule(e,20,E.RULE_boolean);let t;try{this.enterOuterAlt(e,1),this.state=105,t=this._input.LA(1),t===10||t===11?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(r){if(r instanceof j)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}null_(){let e=new Dr(this,this._ctx,this.state);this.enterRule(e,22,E.RULE_null);try{this.enterOuterAlt(e,1),this.state=107,this.match(E.T__11)}catch(t){if(t instanceof j)e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t);else throw t}finally{this.exitRule()}return e}infinity(){let e=new Sr(this,this._ctx,this.state);this.enterRule(e,24,E.RULE_infinity);let t;try{this.enterOuterAlt(e,1),this.state=109,t=this._input.LA(1),t===13||t===14?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(r){if(r instanceof j)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}arithmeticOperator(){let e=new Qn(this,this._ctx,this.state);this.enterRule(e,26,E.RULE_arithmeticOperator);let t;try{this.enterOuterAlt(e,1),this.state=111,t=this._input.LA(1),!(t&-32)&&1<<t&491520?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(r){if(r instanceof j)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}comparisonOperator(){let e=new Ir(this,this._ctx,this.state);this.enterRule(e,28,E.RULE_comparisonOperator);let t;try{this.enterOuterAlt(e,1),this.state=113,t=this._input.LA(1),!(t&-32)&&1<<t&2146959360?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(r){if(r instanceof j)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}logicalOperator(){let e=new Lr(this,this._ctx,this.state);this.enterRule(e,30,E.RULE_logicalOperator);let t;try{this.enterOuterAlt(e,1),this.state=115,t=this._input.LA(1),!(t-31&-32)&&1<<t-31&15?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(r){if(r instanceof j)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}polarityOperator(){let e=new Xn(this,this._ctx,this.state);this.enterRule(e,32,E.RULE_polarityOperator);try{this.enterOuterAlt(e,1),this.state=117,this.match(E.POLAR_OP)}catch(t){if(t instanceof j)e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t);else throw t}finally{this.exitRule()}return e}sempred(e,t,r){switch(t){case 1:return this.expression_sempred(e,r)}return!0}expression_sempred(e,t){switch(t){case 0:return this.precpred(this._ctx,3)}return!0}static get _ATN(){return E.__ATN||(E.__ATN=new pp().deserialize(E._serializedATN)),E.__ATN}};s(E,"OpraFilterParser");var f=E;f.T__0=1;f.T__1=2;f.T__2=3;f.T__3=4;f.T__4=5;f.T__5=6;f.T__6=7;f.T__7=8;f.T__8=9;f.T__9=10;f.T__10=11;f.T__11=12;f.T__12=13;f.T__13=14;f.T__14=15;f.T__15=16;f.T__16=17;f.T__17=18;f.T__18=19;f.T__19=20;f.T__20=21;f.T__21=22;f.T__22=23;f.T__23=24;f.T__24=25;f.T__25=26;f.T__26=27;f.T__27=28;f.T__28=29;f.T__29=30;f.T__30=31;f.T__31=32;f.T__32=33;f.T__33=34;f.IDENTIFIER=35;f.POLAR_OP=36;f.DATE=37;f.DATETIME=38;f.TIME=39;f.NUMBER=40;f.INTEGER=41;f.STRING=42;f.WHITESPACE=43;f.EOF=hp.EOF;f.RULE_root=0;f.RULE_expression=1;f.RULE_comparisonLeft=2;f.RULE_comparisonRight=3;f.RULE_parenthesizedItem=4;f.RULE_value=5;f.RULE_qualifiedIdentifier=6;f.RULE_externalConstant=7;f.RULE_identifier=8;f.RULE_arrayValue=9;f.RULE_boolean=10;f.RULE_null=11;f.RULE_infinity=12;f.RULE_arithmeticOperator=13;f.RULE_comparisonOperator=14;f.RULE_logicalOperator=15;f.RULE_polarityOperator=16;f.literalNames=[null,"'('","')'","'not'","'!'","'.'","'@'","'['","','","']'","'true'","'false'","'null'","'Infinity'","'infinity'","'+'","'-'","'*'","'/'","'<='","'<'","'>'","'>='","'='","'!='","'in'","'!in'","'like'","'!like'","'ilike'","'!ilike'","'and'","'or'","'&&'","'||'"];f.symbolicNames=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"IDENTIFIER","POLAR_OP","DATE","DATETIME","TIME","NUMBER","INTEGER","STRING","WHITESPACE"];f.ruleNames=["root","expression","comparisonLeft","comparisonRight","parenthesizedItem","value","qualifiedIdentifier","externalConstant","identifier","arrayValue","boolean","null","infinity","arithmeticOperator","comparisonOperator","logicalOperator","polarityOperator"];f._serializedATN=[4,1,43,120,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,49,8,1,1,1,1,1,1,1,1,1,5,1,55,8,1,10,1,12,1,58,9,1,1,2,1,2,1,3,1,3,1,3,1,3,3,3,66,8,3,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,78,8,5,1,6,1,6,1,6,5,6,83,8,6,10,6,12,6,86,9,6,1,6,1,6,1,7,1,7,1,7,1,8,1,8,1,9,1,9,1,9,1,9,5,9,99,8,9,10,9,12,9,102,9,9,1,9,1,9,1,10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1,15,1,15,1,16,1,16,1,16,0,1,2,17,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,6,1,0,3,4,1,0,10,11,1,0,13,14,1,0,15,18,1,0,19,30,1,0,31,34,117,0,34,1,0,0,0,2,48,1,0,0,0,4,59,1,0,0,0,6,65,1,0,0,0,8,67,1,0,0,0,10,77,1,0,0,0,12,84,1,0,0,0,14,89,1,0,0,0,16,92,1,0,0,0,18,94,1,0,0,0,20,105,1,0,0,0,22,107,1,0,0,0,24,109,1,0,0,0,26,111,1,0,0,0,28,113,1,0,0,0,30,115,1,0,0,0,32,117,1,0,0,0,34,35,3,2,1,0,35,36,5,0,0,1,36,1,1,0,0,0,37,38,6,1,-1,0,38,39,3,4,2,0,39,40,3,28,14,0,40,41,3,6,3,0,41,49,1,0,0,0,42,43,5,1,0,0,43,44,3,8,4,0,44,45,5,2,0,0,45,49,1,0,0,0,46,47,7,0,0,0,47,49,3,2,1,1,48,37,1,0,0,0,48,42,1,0,0,0,48,46,1,0,0,0,49,56,1,0,0,0,50,51,10,3,0,0,51,52,3,30,15,0,52,53,3,2,1,4,53,55,1,0,0,0,54,50,1,0,0,0,55,58,1,0,0,0,56,54,1,0,0,0,56,57,1,0,0,0,57,3,1,0,0,0,58,56,1,0,0,0,59,60,3,12,6,0,60,5,1,0,0,0,61,66,3,10,5,0,62,66,3,12,6,0,63,66,3,14,7,0,64,66,3,18,9,0,65,61,1,0,0,0,65,62,1,0,0,0,65,63,1,0,0,0,65,64,1,0,0,0,66,7,1,0,0,0,67,68,3,2,1,0,68,9,1,0,0,0,69,78,5,40,0,0,70,78,3,24,12,0,71,78,3,20,10,0,72,78,3,22,11,0,73,78,5,37,0,0,74,78,5,38,0,0,75,78,5,39,0,0,76,78,5,42,0,0,77,69,1,0,0,0,77,70,1,0,0,0,77,71,1,0,0,0,77,72,1,0,0,0,77,73,1,0,0,0,77,74,1,0,0,0,77,75,1,0,0,0,77,76,1,0,0,0,78,11,1,0,0,0,79,80,3,16,8,0,80,81,5,5,0,0,81,83,1,0,0,0,82,79,1,0,0,0,83,86,1,0,0,0,84,82,1,0,0,0,84,85,1,0,0,0,85,87,1,0,0,0,86,84,1,0,0,0,87,88,3,16,8,0,88,13,1,0,0,0,89,90,5,6,0,0,90,91,3,16,8,0,91,15,1,0,0,0,92,93,5,35,0,0,93,17,1,0,0,0,94,95,5,7,0,0,95,100,3,10,5,0,96,97,5,8,0,0,97,99,3,10,5,0,98,96,1,0,0,0,99,102,1,0,0,0,100,98,1,0,0,0,100,101,1,0,0,0,101,103,1,0,0,0,102,100,1,0,0,0,103,104,5,9,0,0,104,19,1,0,0,0,105,106,7,1,0,0,106,21,1,0,0,0,107,108,5,12,0,0,108,23,1,0,0,0,109,110,7,2,0,0,110,25,1,0,0,0,111,112,7,3,0,0,112,27,1,0,0,0,113,114,7,4,0,0,114,29,1,0,0,0,115,116,7,5,0,0,116,31,1,0,0,0,117,118,5,36,0,0,118,33,1,0,0,0,6,48,56,65,77,84,100];f.DecisionsToDFA=f._ATN.decisionToState.map((i,e)=>new cp(i,e));var bs=f,Zn=class Zn extends U{constructor(e,t,r){super(t,r),this.parser=e}expression(){return this.getTypedRuleContext(G,0)}EOF(){return this.getToken(f.EOF,0)}get ruleIndex(){return f.RULE_root}enterRule(e){e.enterRoot&&e.enterRoot(this)}exitRule(e){e.exitRoot&&e.exitRoot(this)}accept(e){return e.visitRoot?e.visitRoot(this):e.visitChildren(this)}};s(Zn,"RootContext");var Un=Zn,Hn=class Hn extends U{constructor(e,t,r){super(t,r),this.parser=e}get ruleIndex(){return f.RULE_expression}copyFrom(e){super.copyFrom(e)}};s(Hn,"ExpressionContext");var G=Hn,eo=class eo extends G{constructor(e,t){super(e,t.parentCtx,t.invokingState),super.copyFrom(t)}parenthesizedItem(){return this.getTypedRuleContext(Ar,0)}enterRule(e){e.enterParenthesizedExpression&&e.enterParenthesizedExpression(this)}exitRule(e){e.exitParenthesizedExpression&&e.exitParenthesizedExpression(this)}accept(e){return e.visitParenthesizedExpression?e.visitParenthesizedExpression(this):e.visitChildren(this)}};s(eo,"ParenthesizedExpressionContext");var Cn=eo,to=class to extends G{constructor(e,t){super(e,t.parentCtx,t.invokingState),super.copyFrom(t)}expression(){return this.getTypedRuleContext(G,0)}enterRule(e){e.enterNegativeExpression&&e.enterNegativeExpression(this)}exitRule(e){e.exitNegativeExpression&&e.exitNegativeExpression(this)}accept(e){return e.visitNegativeExpression?e.visitNegativeExpression(this):e.visitChildren(this)}};s(to,"NegativeExpressionContext");var Bn=to,ro=class ro extends G{constructor(e,t){super(e,t.parentCtx,t.invokingState),super.copyFrom(t)}comparisonLeft(){return this.getTypedRuleContext(Or,0)}comparisonOperator(){return this.getTypedRuleContext(Ir,0)}comparisonRight(){return this.getTypedRuleContext(Rr,0)}enterRule(e){e.enterComparisonExpression&&e.enterComparisonExpression(this)}exitRule(e){e.exitComparisonExpression&&e.exitComparisonExpression(this)}accept(e){return e.visitComparisonExpression?e.visitComparisonExpression(this):e.visitChildren(this)}};s(ro,"ComparisonExpressionContext");var qn=ro,io=class io extends G{constructor(e,t){super(e,t.parentCtx,t.invokingState),super.copyFrom(t)}expression_list(){return this.getTypedRuleContexts(G)}expression(e){return this.getTypedRuleContext(G,e)}logicalOperator(){return this.getTypedRuleContext(Lr,0)}enterRule(e){e.enterLogicalExpression&&e.enterLogicalExpression(this)}exitRule(e){e.exitLogicalExpression&&e.exitLogicalExpression(this)}accept(e){return e.visitLogicalExpression?e.visitLogicalExpression(this):e.visitChildren(this)}};s(io,"LogicalExpressionContext");var Ct=io,no=class no extends U{constructor(e,t,r){super(t,r),this.parser=e}qualifiedIdentifier(){return this.getTypedRuleContext(Bt,0)}get ruleIndex(){return f.RULE_comparisonLeft}enterRule(e){e.enterComparisonLeft&&e.enterComparisonLeft(this)}exitRule(e){e.exitComparisonLeft&&e.exitComparisonLeft(this)}accept(e){return e.visitComparisonLeft?e.visitComparisonLeft(this):e.visitChildren(this)}};s(no,"ComparisonLeftContext");var Or=no,oo=class oo extends U{constructor(e,t,r){super(t,r),this.parser=e}value(){return this.getTypedRuleContext(K,0)}qualifiedIdentifier(){return this.getTypedRuleContext(Bt,0)}externalConstant(){return this.getTypedRuleContext(br,0)}arrayValue(){return this.getTypedRuleContext(wr,0)}get ruleIndex(){return f.RULE_comparisonRight}enterRule(e){e.enterComparisonRight&&e.enterComparisonRight(this)}exitRule(e){e.exitComparisonRight&&e.exitComparisonRight(this)}accept(e){return e.visitComparisonRight?e.visitComparisonRight(this):e.visitChildren(this)}};s(oo,"ComparisonRightContext");var Rr=oo,so=class so extends U{constructor(e,t,r){super(t,r),this.parser=e}expression(){return this.getTypedRuleContext(G,0)}get ruleIndex(){return f.RULE_parenthesizedItem}enterRule(e){e.enterParenthesizedItem&&e.enterParenthesizedItem(this)}exitRule(e){e.exitParenthesizedItem&&e.exitParenthesizedItem(this)}accept(e){return e.visitParenthesizedItem?e.visitParenthesizedItem(this):e.visitChildren(this)}};s(so,"ParenthesizedItemContext");var Ar=so,ao=class ao extends U{constructor(e,t,r){super(t,r),this.parser=e}get ruleIndex(){return f.RULE_value}copyFrom(e){super.copyFrom(e)}};s(ao,"ValueContext");var K=ao,po=class po extends K{constructor(e,t){super(e,t.parentCtx,t.invokingState),super.copyFrom(t)}TIME(){return this.getToken(f.TIME,0)}enterRule(e){e.enterTimeLiteral&&e.enterTimeLiteral(this)}exitRule(e){e.exitTimeLiteral&&e.exitTimeLiteral(this)}accept(e){return e.visitTimeLiteral?e.visitTimeLiteral(this):e.visitChildren(this)}};s(po,"TimeLiteralContext");var $n=po,co=class co extends K{constructor(e,t){super(e,t.parentCtx,t.invokingState),super.copyFrom(t)}null_(){return this.getTypedRuleContext(Dr,0)}enterRule(e){e.enterNullLiteral&&e.enterNullLiteral(this)}exitRule(e){e.exitNullLiteral&&e.exitNullLiteral(this)}accept(e){return e.visitNullLiteral?e.visitNullLiteral(this):e.visitChildren(this)}};s(co,"NullLiteralContext");var Vn=co,lo=class lo extends K{constructor(e,t){super(e,t.parentCtx,t.invokingState),super.copyFrom(t)}DATETIME(){return this.getToken(f.DATETIME,0)}enterRule(e){e.enterDateTimeLiteral&&e.enterDateTimeLiteral(this)}exitRule(e){e.exitDateTimeLiteral&&e.exitDateTimeLiteral(this)}accept(e){return e.visitDateTimeLiteral?e.visitDateTimeLiteral(this):e.visitChildren(this)}};s(lo,"DateTimeLiteralContext");var Kn=lo,fo=class fo extends K{constructor(e,t){super(e,t.parentCtx,t.invokingState),super.copyFrom(t)}STRING(){return this.getToken(f.STRING,0)}enterRule(e){e.enterStringLiteral&&e.enterStringLiteral(this)}exitRule(e){e.exitStringLiteral&&e.exitStringLiteral(this)}accept(e){return e.visitStringLiteral?e.visitStringLiteral(this):e.visitChildren(this)}};s(fo,"StringLiteralContext");var zn=fo,uo=class uo extends K{constructor(e,t){super(e,t.parentCtx,t.invokingState),super.copyFrom(t)}DATE(){return this.getToken(f.DATE,0)}enterRule(e){e.enterDateLiteral&&e.enterDateLiteral(this)}exitRule(e){e.exitDateLiteral&&e.exitDateLiteral(this)}accept(e){return e.visitDateLiteral?e.visitDateLiteral(this):e.visitChildren(this)}};s(uo,"DateLiteralContext");var Jn=uo,mo=class mo extends K{constructor(e,t){super(e,t.parentCtx,t.invokingState),super.copyFrom(t)}infinity(){return this.getTypedRuleContext(Sr,0)}enterRule(e){e.enterInfinityLiteral&&e.enterInfinityLiteral(this)}exitRule(e){e.exitInfinityLiteral&&e.exitInfinityLiteral(this)}accept(e){return e.visitInfinityLiteral?e.visitInfinityLiteral(this):e.visitChildren(this)}};s(mo,"InfinityLiteralContext");var Wn=mo,ho=class ho extends K{constructor(e,t){super(e,t.parentCtx,t.invokingState),super.copyFrom(t)}boolean_(){return this.getTypedRuleContext(Nr,0)}enterRule(e){e.enterBooleanLiteral&&e.enterBooleanLiteral(this)}exitRule(e){e.exitBooleanLiteral&&e.exitBooleanLiteral(this)}accept(e){return e.visitBooleanLiteral?e.visitBooleanLiteral(this):e.visitChildren(this)}};s(ho,"BooleanLiteralContext");var Gn=ho,yo=class yo extends K{constructor(e,t){super(e,t.parentCtx,t.invokingState),super.copyFrom(t)}NUMBER(){return this.getToken(f.NUMBER,0)}enterRule(e){e.enterNumberLiteral&&e.enterNumberLiteral(this)}exitRule(e){e.exitNumberLiteral&&e.exitNumberLiteral(this)}accept(e){return e.visitNumberLiteral?e.visitNumberLiteral(this):e.visitChildren(this)}};s(yo,"NumberLiteralContext");var Yn=yo,To=class To extends U{constructor(e,t,r){super(t,r),this.parser=e}identifier_list(){return this.getTypedRuleContexts(ft)}identifier(e){return this.getTypedRuleContext(ft,e)}get ruleIndex(){return f.RULE_qualifiedIdentifier}enterRule(e){e.enterQualifiedIdentifier&&e.enterQualifiedIdentifier(this)}exitRule(e){e.exitQualifiedIdentifier&&e.exitQualifiedIdentifier(this)}accept(e){return e.visitQualifiedIdentifier?e.visitQualifiedIdentifier(this):e.visitChildren(this)}};s(To,"QualifiedIdentifierContext");var Bt=To,Eo=class Eo extends U{constructor(e,t,r){super(t,r),this.parser=e}identifier(){return this.getTypedRuleContext(ft,0)}get ruleIndex(){return f.RULE_externalConstant}enterRule(e){e.enterExternalConstant&&e.enterExternalConstant(this)}exitRule(e){e.exitExternalConstant&&e.exitExternalConstant(this)}accept(e){return e.visitExternalConstant?e.visitExternalConstant(this):e.visitChildren(this)}};s(Eo,"ExternalConstantContext");var br=Eo,_o=class _o extends U{constructor(e,t,r){super(t,r),this.parser=e}IDENTIFIER(){return this.getToken(f.IDENTIFIER,0)}get ruleIndex(){return f.RULE_identifier}enterRule(e){e.enterIdentifier&&e.enterIdentifier(this)}exitRule(e){e.exitIdentifier&&e.exitIdentifier(this)}accept(e){return e.visitIdentifier?e.visitIdentifier(this):e.visitChildren(this)}};s(_o,"IdentifierContext");var ft=_o,xo=class xo extends U{constructor(e,t,r){super(t,r),this.parser=e}value_list(){return this.getTypedRuleContexts(K)}value(e){return this.getTypedRuleContext(K,e)}get ruleIndex(){return f.RULE_arrayValue}enterRule(e){e.enterArrayValue&&e.enterArrayValue(this)}exitRule(e){e.exitArrayValue&&e.exitArrayValue(this)}accept(e){return e.visitArrayValue?e.visitArrayValue(this):e.visitChildren(this)}};s(xo,"ArrayValueContext");var wr=xo,go=class go extends U{constructor(e,t,r){super(t,r),this.parser=e}get ruleIndex(){return f.RULE_boolean}enterRule(e){e.enterBoolean&&e.enterBoolean(this)}exitRule(e){e.exitBoolean&&e.exitBoolean(this)}accept(e){return e.visitBoolean?e.visitBoolean(this):e.visitChildren(this)}};s(go,"BooleanContext");var Nr=go,Oo=class Oo extends U{constructor(e,t,r){super(t,r),this.parser=e}get ruleIndex(){return f.RULE_null}enterRule(e){e.enterNull&&e.enterNull(this)}exitRule(e){e.exitNull&&e.exitNull(this)}accept(e){return e.visitNull?e.visitNull(this):e.visitChildren(this)}};s(Oo,"NullContext");var Dr=Oo,Ro=class Ro extends U{constructor(e,t,r){super(t,r),this.parser=e}get ruleIndex(){return f.RULE_infinity}enterRule(e){e.enterInfinity&&e.enterInfinity(this)}exitRule(e){e.exitInfinity&&e.exitInfinity(this)}accept(e){return e.visitInfinity?e.visitInfinity(this):e.visitChildren(this)}};s(Ro,"InfinityContext");var Sr=Ro,Ao=class Ao extends U{constructor(e,t,r){super(t,r),this.parser=e}get ruleIndex(){return f.RULE_arithmeticOperator}enterRule(e){e.enterArithmeticOperator&&e.enterArithmeticOperator(this)}exitRule(e){e.exitArithmeticOperator&&e.exitArithmeticOperator(this)}accept(e){return e.visitArithmeticOperator?e.visitArithmeticOperator(this):e.visitChildren(this)}};s(Ao,"ArithmeticOperatorContext");var Qn=Ao,bo=class bo extends U{constructor(e,t,r){super(t,r),this.parser=e}get ruleIndex(){return f.RULE_comparisonOperator}enterRule(e){e.enterComparisonOperator&&e.enterComparisonOperator(this)}exitRule(e){e.exitComparisonOperator&&e.exitComparisonOperator(this)}accept(e){return e.visitComparisonOperator?e.visitComparisonOperator(this):e.visitChildren(this)}};s(bo,"ComparisonOperatorContext");var Ir=bo,wo=class wo extends U{constructor(e,t,r){super(t,r),this.parser=e}get ruleIndex(){return f.RULE_logicalOperator}enterRule(e){e.enterLogicalOperator&&e.enterLogicalOperator(this)}exitRule(e){e.exitLogicalOperator&&e.exitLogicalOperator(this)}accept(e){return e.visitLogicalOperator?e.visitLogicalOperator(this):e.visitChildren(this)}};s(wo,"LogicalOperatorContext");var Lr=wo,No=class No extends U{constructor(e,t,r){super(t,r),this.parser=e}POLAR_OP(){return this.getToken(f.POLAR_OP,0)}get ruleIndex(){return f.RULE_polarityOperator}enterRule(e){e.enterPolarityOperator&&e.enterPolarityOperator(this)}exitRule(e){e.exitPolarityOperator&&e.exitPolarityOperator(this)}accept(e){return e.visitPolarityOperator?e.visitPolarityOperator(this):e.visitChildren(this)}};s(No,"PolarityOperatorContext");var Xn=No;import{ParseTreeVisitor as dp}from"@browsery/antlr4";var Do=class Do extends v{constructor(e){super(""+e)}toString(){return"@"+super.toString()}};s(Do,"ExternalConstant");var Pr=Do;var So=class So extends dp{constructor(e){super(),this._timeZone=e==null?void 0:e.timeZone}visitChildren(e){let t=super.visitChildren(e);return Array.isArray(t)&&t.length<2?t[0]:t??e.getText()}defaultResult(){}visitRoot(e){return this.visit(e.expression())}visitParenthesizedExpression(e){let t=this.visit(e.parenthesizedItem());return new ye(t)}visitParenthesizedItem(e){return this.visit(e.expression())}visitNegativeExpression(e){let t=this.visit(e.expression());return new jt(t)}visitComparisonExpression(e){return new de({op:e.comparisonOperator().getText(),left:this.visit(e.comparisonLeft()),right:this.visit(e.comparisonRight())})}visitLogicalExpression(e){let t=[],r=s((n,o)=>{for(let a of n){if(a instanceof Ct&&a.logicalOperator().getText()===o){r(a.expression_list(),a.logicalOperator().getText());continue}let p=this.visit(a);t.push(p)}},"wrapChildren");return r(e.expression_list(),e.logicalOperator().getText()),new pe({op:e.logicalOperator().getText(),items:t})}visitQualifiedIdentifier(e){return new ce(e.getText())}visitExternalConstant(e){return new Pr(e.identifier().getText())}visitNullLiteral(){return new Ce}visitBooleanLiteral(e){return new Ue(e.getText()==="true")}visitNumberLiteral(e){return new Ee(e.getText())}visitStringLiteral(e){return new Be(Ut(e.getText()))}visitInfinityLiteral(){return new Ee(1/0)}visitDateLiteral(e){return new Te(Ut(e.getText()))}visitDateTimeLiteral(e){return new Te(Ut(e.getText()))}visitTimeLiteral(e){return new qe(Ut(e.getText()))}visitArrayValue(e){return new he(e.value_list().map(t=>this.visit(t)))}};s(So,"FilterTreeVisitor");var qt=So;import{ErrorListener as yp}from"@browsery/antlr4";var Io=class Io extends yp{constructor(e){super(),this.errors=e}syntaxError(e,t,r,n,o,a){this.errors.push(new xr(o,{recognizer:e,offendingSymbol:t,line:r,column:n,e:a}))}};s(Io,"OpraErrorListener");var $t=Io;function Lo(i,e){let t=new Tp(i),r=new Rs(t),n=new Ep(r),o=new bs(n);o.buildParseTrees=!0;let a=[],p=new $t(a);r.removeErrorListeners(),r.addErrorListener(p),o.removeErrorListeners(),o.addErrorListener(p);let c=o.root();if(a.length){let l=[];for(let u of a)l.push(u.message+(i.includes(`
|
|
8
|
+
`)?" at line: "+u.line+" column: "+u.column:" at column: "+u.column));let _=new _r(l.join(`
|
|
9
|
+
`));throw _.errors=a,_}return e=e||new qt,e.visit(c)}s(Lo,"parse");var Po=class Po{constructor(e,t){if(this._rules=new P,Object.defineProperty(this,"_rules",{value:new P(null,{caseSensitive:t==null?void 0:t.caseSensitive}),enumerable:!1}),e)for(let[r,n]of Object.entries(e))this.set(r,n)}set(e,t){let r=typeof(t==null?void 0:t.operators)=="string"?t.operators.split(/\s*[,| ]\s*/):t==null?void 0:t.operators;this._rules.set(e,x({...t,operators:r}))}normalizeFilter(e,t){if(!e)return;let r=typeof e=="string"?Lo(e):e;if(r instanceof de){if(this.normalizeFilter(r.left,t),!(r.left instanceof ce&&r.left.field))throw new TypeError("Invalid filter query. Left side should be a data field.");let n=this._rules.get(r.left.value);if(!n)throw new me({message:R("error:UNACCEPTED_FILTER_FIELD",{field:r.left.value}),code:"UNACCEPTED_FILTER_FIELD",details:{field:r.left.value}});if(n.operators&&!n.operators.includes(r.op))throw new me({message:R("error:UNACCEPTED_FILTER_OPERATION",{field:r.left.value}),code:"UNACCEPTED_FILTER_OPERATION",details:{field:r.left.value,operator:r.op}});return this.normalizeFilter(r.right,t),r}return r instanceof pe?(r.items.forEach(n=>this.normalizeFilter(n,t)),r):r instanceof je?(r.items.forEach(n=>this.normalizeFilter(n.expression,t)),r):r instanceof he?(r.items.forEach(n=>this.normalizeFilter(n,t)),r):r instanceof ye?(this.normalizeFilter(r.expression,t),r):(r instanceof ce&&t&&(r.value=t.normalizeFieldPath(r.value),r.field=t.getField(r.value),r.dataType=r.field.type),r)}toJSON(){return this._rules.toObject()}[Symbol.iterator](){return this._rules.entries()}};s(Po,"FilterRules");var _e=Po;var Vt={};Ko(Vt,{$and:()=>xp,$arithmetic:()=>Up,$array:()=>ws,$date:()=>gp,$eq:()=>bp,$field:()=>Ap,$gt:()=>Np,$gte:()=>Dp,$ilike:()=>Fp,$in:()=>Lp,$like:()=>Mp,$lt:()=>Sp,$lte:()=>Ip,$ne:()=>wp,$notILike:()=>kp,$notIn:()=>Pp,$notLike:()=>vp,$number:()=>Rp,$or:()=>_p,$paren:()=>jp,$time:()=>Op,ArithmeticExpression:()=>je,ArithmeticExpressionItem:()=>Er,ArrayExpression:()=>he,Ast:()=>kt,BooleanLiteral:()=>Ue,ComparisonExpression:()=>de,DateLiteral:()=>Te,Expression:()=>k,FilterTreeVisitor:()=>qt,Literal:()=>v,LogicalExpression:()=>pe,NegativeExpression:()=>jt,NullLiteral:()=>Ce,NumberLiteral:()=>Ee,OpraErrorListener:()=>$t,ParenthesizedExpression:()=>ye,QualifiedIdentifier:()=>ce,StringLiteral:()=>Be,Term:()=>ke,TimeLiteral:()=>qe,parse:()=>Lo});function _p(...i){return new pe({op:"or",items:i})}s(_p,"$or");function xp(...i){return new pe({op:"and",items:i})}s(xp,"$and");function gp(i){return new Te(i)}s(gp,"$date");function Op(i){return new qe(i)}s(Op,"$time");function Rp(i){return new Ee(i)}s(Rp,"$number");function ws(...i){return new he(i.map(Mr))}s(ws,"$array");function Ap(i){return new ce(i)}s(Ap,"$field");function bp(i,e){return ee("=",i,e)}s(bp,"$eq");function wp(i,e){return ee("!=",i,e)}s(wp,"$ne");function Np(i,e){return ee(">",i,e)}s(Np,"$gt");function Dp(i,e){return ee(">=",i,e)}s(Dp,"$gte");function Sp(i,e){return ee("<",i,e)}s(Sp,"$lt");function Ip(i,e){return ee("<=",i,e)}s(Ip,"$lte");function Lp(i,e){return ee("in",i,e)}s(Lp,"$in");function Pp(i,e){return ee("!in",i,e)}s(Pp,"$notIn");function Mp(i,e){return ee("like",i,e)}s(Mp,"$like");function vp(i,e){return ee("!like",i,e)}s(vp,"$notLike");function Fp(i,e){return ee("ilike",i,e)}s(Fp,"$ilike");function kp(i,e){return ee("!ilike",i,e)}s(kp,"$notILike");function jp(i){return new ye(i)}s(jp,"$paren");function Up(i){let e=new je;return e.add=t=>(e.append("+",ut(t)),e),e.sub=t=>(e.append("-",ut(t)),e),e.mul=t=>(e.append("*",ut(t)),e),e.div=t=>(e.append("/",ut(t)),e),e.append("+",Mr(i)),e}s(Up,"$arithmetic");function ee(i,e,t){let r=Mr(e),n=Mr(t);return new de({op:i,left:r,right:n})}s(ee,"comparisonExpression");var Mr=s(i=>Array.isArray(i)?ws(...i.map(ut)):ut(i),"wrapEntryValue"),ut=s(i=>i instanceof k?i:typeof i=="boolean"?new Ue(i):typeof i=="number"||typeof i=="bigint"?new Ee(i):i==null?new Ce:i instanceof Date?new Te(i):new Be(""+i),"_wrapEntryValue");var mt,re=(mt=class{constructor(e){e&&Object.assign(this,e)}[y](e,t){let r=e.dataType?t.node.getComplexType(e.dataType):t.node.getComplexType("object"),n=e.rules?new _e(e.rules):void 0;return Cp(r,n)}[g](){return Bp}toJSON(e,t){let r=e.dataType?t.node.getComplexType(e.dataType):t.node.getComplexType("object");return{dataType:r.name?r.name:r.toJSON(),rules:e.rules}}},s(mt,"FilterType"),mt);Mo([m.Attribute({description:"Data type which filtering fields belong to"}),vo("design:type",Object)],re.prototype,"dataType",void 0);Mo([m.Attribute({description:"Stringified JSON object defines filtering rules",format:"string"}),vo("design:type",Object)],re.prototype,"rules",void 0);re=Mo([m({description:"A query filter",nameMappings:{js:"object",json:"string"}}),vo("design:paramtypes",[Object])],re);var Cp=s((i,e)=>Ns("decodeFilter",(t,r,n)=>{if(typeof t=="string")try{let o=Vt.parse(t);return e?e.normalizeFilter(o,i):o}catch(o){r.fail(n,`Not a valid filter expression. ${o.message}`,t);return}r.fail(n,"Nt a valid filter expression string",t)}),"decodeFilter"),Bp=Ns("encodeFilter",(i,e,t)=>{if(i instanceof Vt.Ast)return i.toString();e.fail(t,"Not a valid filter expression",i)});import{__decorate as qp,__metadata as $p}from"tslib";import{vg as Ds}from"valgen";var ht,vr=(ht=class{constructor(e){e&&Object.assign(this,e)}[y](){return Ds.isObjectId({coerce:!0})}[g](){return Ds.isObjectId({coerce:!0})}},s(ht,"ObjectIdType"),ht);vr=qp([m({description:"A MongoDB ObjectID value",nameMappings:{js:"object",json:"string"}}),$p("design:paramtypes",[Object])],vr);import{__decorate as le,__metadata as fe}from"tslib";var dt,Y=(dt=class{constructor(e){e&&Object.assign(this,e)}},s(dt,"OperationResult"),dt);le([M(),fe("design:type",Number)],Y.prototype,"affected",void 0);le([M(),fe("design:type",Number)],Y.prototype,"totalMatches",void 0);le([M(),fe("design:type",String)],Y.prototype,"context",void 0);le([M(),fe("design:type",String)],Y.prototype,"type",void 0);le([M(),fe("design:type",String)],Y.prototype,"message",void 0);le([M({type:"any"}),fe("design:type",Object)],Y.prototype,"payload",void 0);le([M({type:"object"}),fe("design:type",Array)],Y.prototype,"errors",void 0);Y=le([Q({description:"Operation result"}),fe("design:paramtypes",[Object])],Y);(function(i){function e(t){var n;let r=(n=class extends i{constructor(...a){super(...a)}},s(n,"OperationResult_"),n);return le([M({type:t,required:!0}),fe("design:type",Object)],r.prototype,"payload",void 0),r=le([Q({embedded:!0}),fe("design:paramtypes",[Object])],r),r}s(e,"forPayload"),i.forPayload=e})(Y||(Y={}));import{__decorate as Fo,__metadata as ko}from"tslib";import{vg as Fr}from"valgen";var Vp=/^([0-1][0-9]|2[0-4]):([0-5][0-9])(?::([0-5][0-9]))?$/,yt,Tt=(yt=class{constructor(e){e&&Object.assign(this,e)}[y](e){let t=Fr.matches(Vp,{formatName:"time",coerce:!0}),r=[];return e.minValue&&r.push(Fr.isGte(e.minValue)),e.maxValue&&r.push(Fr.isLte(e.maxValue)),r.length>0?Fr.pipe([t,...r],{returnIndex:0}):t}[g](e){return this[y](e)}},s(yt,"TimeType"),yt);Fo([m.Attribute({description:"Minimum value"}),ko("design:type",String)],Tt.prototype,"minValue",void 0);Fo([m.Attribute({description:"Maximum value"}),ko("design:type",String)],Tt.prototype,"maxValue",void 0);Tt=Fo([m({description:"Time string in 24h format",nameMappings:{js:"string",json:"string"}}).Example("18:23:00","Full time value").Example("18:23:00","Time value without seconds"),ko("design:paramtypes",[Object])],Tt);import{__decorate as Kp,__metadata as zp}from"tslib";import{vg as Ss}from"valgen";var Et,kr=(Et=class{constructor(e){e&&Object.assign(this,e)}[y](){return Ss.isURL({coerce:!0})}[g](){return Ss.isURL({coerce:!0})}},s(Et,"UrlType"),Et);kr=Kp([m({description:"A Uniform Resource Identifier Reference (RFC 3986 icon) value",nameMappings:{js:"string",json:"string"}}).Example("http://tempuri.org"),zp("design:paramtypes",[Object])],kr);import{__decorate as Ls,__metadata as Ps}from"tslib";import{vg as Is}from"valgen";var _t,Kt=(_t=class{constructor(e){e&&Object.assign(this,e)}[y](e){return Is.isUUID(e==null?void 0:e.version,{coerce:!0})}[g](e){return Is.isUUID(e==null?void 0:e.version,{coerce:!0})}},s(_t,"UuidType"),_t);Ls([m.Attribute({description:"Version of the UUID"}),Ps("design:type",Number)],Kt.prototype,"version",void 0);Kt=Ls([m({description:"A Universal Unique Identifier (UUID) value",nameMappings:{js:"string",json:"string"}}),Ps("design:paramtypes",[Object])],Kt);function Ne(i,e,t){let r=nr(e.pick,e.omit),n=typeof i=="string"?i.charAt(0).toUpperCase()+i.substring(1):i.name,o=(t==null?void 0:t.name)||n+"Mapped",a={[o]:class{constructor(){typeof i=="function"&&Qt(this,i,r)}}}[o];if(typeof i=="function"&&Yt(a.prototype,i.prototype),typeof i=="function"){let c=Reflect.getOwnMetadata(T,i);if(!c)throw new TypeError(`Class "${i}" doesn't have datatype metadata information`);if(!(c.kind===h.ComplexType.Kind||c.kind===h.MappedType.Kind||c.kind===h.MixinType.Kind))throw new TypeError(`Class "${i}" is not a ${h.ComplexType.Kind}`)}let p={...t,kind:"MappedType",base:i};return e.pick&&(p.pick=e.pick),e.omit&&(p.omit=e.omit),e.partial&&(p.partial=e.partial),e.required&&(p.required=e.required),Reflect.defineMetadata(T,p,a),typeof i=="function"&&Me._applyMixin(a,i,{...e,isInheritedPredicate:r}),a}s(Ne,"createMappedClass");function GE(i,e,t){return Ne(i,{omit:e},t)}s(GE,"OmitType");function ZE(i,...e){let t=Array.isArray(e[0])?e[0]:!0,r=Array.isArray(e[0])?e[1]:e[0];return Ne(i,{partial:t},r)}s(ZE,"PartialType");function r3(i,e,t){return Ne(i,{pick:e},t)}s(r3,"PickType");import{__decorate as Jp,__metadata as Wp}from"tslib";import{isAny as Ms}from"valgen";var xt,jr=(xt=class{constructor(e){e&&Object.assign(this,e)}[y](){return Ms}[g](){return Ms}},s(xt,"AnyType"),xt);jr=Jp([m({description:"Represents any value"}),Wp("design:paramtypes",[Object])],jr);import{__decorate as Gp,__metadata as Yp}from"tslib";import{toBigint as Fs,vg as Bo}from"valgen";import{__decorate as Uo,__metadata as Co}from"tslib";import{toNumber as vs,vg as jo}from"valgen";var gt,ue=(gt=class{constructor(e){e&&Object.assign(this,e)}[y](e){let t=[];return e.minValue&&t.push(jo.isGte(e.minValue)),e.maxValue&&t.push(jo.isLte(e.maxValue)),t.length>0?jo.pipe([vs,...t],{returnIndex:0}):vs}[g](e){return this[y](e)}},s(gt,"NumberType"),gt);Uo([m.Attribute({description:"Determines the minimum value"}),Co("design:type",Number)],ue.prototype,"minValue",void 0);Uo([m.Attribute({description:"Determines the maximum value"}),Co("design:type",Number)],ue.prototype,"maxValue",void 0);ue=Uo([m({description:"Both Integer as well as Floating-Point numbers",nameMappings:{js:"number",json:"number"}}),Co("design:paramtypes",[Object])],ue);var Ot,Ur=(Ot=class extends ue{constructor(e){super(e)}[y](e){let t=[];return e.minValue&&t.push(Bo.isGte(e.minValue)),e.maxValue&&t.push(Bo.isLte(e.maxValue)),t.length>0?Bo.pipe([Fs,...t],{returnIndex:0}):Fs}[g](e){return this[y](e)}},s(Ot,"BigintType"),Ot);Ur=Gp([m({description:"BigInt number",nameMappings:{js:"bigint",json:"string"}}),Yp("design:paramtypes",[Object])],Ur);import{__decorate as Qp,__metadata as Xp}from"tslib";import{toBoolean as ks}from"valgen";var Rt,Cr=(Rt=class{constructor(e){e&&Object.assign(this,e)}[y](){return ks}[g](){return ks}},s(Rt,"BooleanType"),Rt);Cr=Qp([m({description:"Simple true/false value",nameMappings:{js:"boolean",json:"boolean"}}),Xp("design:paramtypes",[Object])],Cr);import{__decorate as Zp,__metadata as Hp}from"tslib";import{toInteger as js,vg as qo}from"valgen";var At,$e=(At=class extends ue{constructor(e){super(e)}[y](e){let t=[];return e.minValue&&t.push(qo.isGte(e.minValue)),e.maxValue&&t.push(qo.isLte(e.maxValue)),t.length>0?qo.pipe([js,...t],{returnIndex:0}):js}[g](e){return this[y](e)}},s(At,"IntegerType"),At);$e=Zp([m({description:"An integer number",nameMappings:{js:"number",json:"number"}}),Hp("design:paramtypes",[Object])],$e);import{__decorate as ec,__metadata as tc}from"tslib";import{isNull as Us}from"valgen";var bt,Br=(bt=class{constructor(e){e&&Object.assign(this,e)}[y](){return Us}[g](){return Us}},s(bt,"NullType"),bt);Br=ec([m({description:"A Null value",nameMappings:{js:"null",json:"null"}}),tc("design:paramtypes",[Object])],Br);import{__decorate as rc,__metadata as ic}from"tslib";var wt,qr=(wt=class{constructor(e){e&&Object.assign(this,e)}},s(wt,"ObjectType"),wt);qr=rc([Q({name:"object",description:"A non modelled object",additionalFields:!0}),ic("design:paramtypes",[Object])],qr);import{__decorate as zt,__metadata as Jt}from"tslib";import{toString as Cs,vg as $r}from"valgen";var Nt,De=(Nt=class{constructor(e){e&&Object.assign(this,e)}[y](e){let t=[];if(e.pattern){let r=e.patternName;r||(r=Reflect.getMetadata(T,Object.getPrototypeOf(this).constructor).name),t.push($r.matches(e.pattern,{formatName:r}))}return e.minLength&&t.push($r.lengthMin(e.minLength)),e.maxLength&&t.push($r.lengthMax(e.maxLength)),t.length>0?$r.pipe([Cs,...t],{returnIndex:0}):Cs}[g](e){return this[y](e)}},s(Nt,"StringType"),Nt);zt([m.Attribute({description:"Regex pattern to be used for validation"}),Jt("design:type",Object)],De.prototype,"pattern",void 0);zt([m.Attribute({description:"Name of the pattern"}),Jt("design:type",String)],De.prototype,"patternName",void 0);zt([m.Attribute({description:"Minimum number of characters"}),Jt("design:type",Number)],De.prototype,"minLength",void 0);zt([m.Attribute({description:"Minimum number of characters"}),Jt("design:type",Number)],De.prototype,"maxLength",void 0);De=zt([m({description:"A sequence of characters",nameMappings:{js:"string",json:"string"}}),Jt("design:paramtypes",[Object])],De);function c2(i,...e){let t=Array.isArray(e[0])?e[0]:!0,r=Array.isArray(e[0])?e[1]:e[0];return Ne(i,{required:t},r)}s(c2,"RequiredType");D.Entity={};D.Entity.Create=function(i,e){var o;let t;typeof i=="object"&&!i[T]?t=i:t={...e,type:i};let r=[],n=F(r,{method:"POST",...t,composition:"Entity.Create",requestBody:{immediateFetch:!0,...t.requestBody,required:!0}});return n.QueryParam("projection",{description:"Determines fields projection",type:new H({dataType:t.type,allowSigns:"each"}),isArray:!0,arraySeparator:","}).RequestContent(((o=t.requestBody)==null?void 0:o.type)||t.type).Response(N.CREATED,{description:'Operation is successful. Returns OperationResult with "payload" field that contains the created resource.',contentType:L.opra_response_json,type:t.type,partial:"deep"}).Response(N.UNPROCESSABLE_ENTITY,{description:"The request was well-formed but was unable to process operation due to one or many errors.",contentType:L.opra_response_json}),r.push(a=>{let p=a.compositionOptions=a.compositionOptions||{};p.type=Ve(t.type)}),n};D.Entity.Delete=function(i,e){let t;typeof i=="object"&&!i[T]?t=i:t={...e,type:i};let r=[],n=F(r,{method:"DELETE",...t,composition:"Entity.Delete"});return n.Response(N.OK,{description:'Operation is successful. Returns OperationResult with "affected" field.',contentType:L.opra_response_json}).Response(N.UNPROCESSABLE_ENTITY,{description:"The request was well-formed but was unable to process operation due to one or many errors.",contentType:L.opra_response_json}),n.KeyParam=(o,a)=>{let p=typeof a=="string"||typeof a=="function"?{name:o,location:"path",type:a,keyParam:!0}:{...a,name:o,location:"path",keyParam:!0};return n.PathParam(o,p),r.push(c=>{var l;(l=c.path)!=null&&l.includes(":"+o)||(c.path=(c.path||"")+"@:"+o),c.mergePath=!0}),n},r.push(o=>{let a=o.compositionOptions=o.compositionOptions||{};a.type=Ve(t.type)}),n};D.Entity.DeleteMany=function(i,e){let t;typeof i=="object"&&!i[T]?t=i:t={...e,type:i};let r=[],n=new _e,o=new re({dataType:t.type});o.rules={};let a=F(r,{method:"DELETE",...t,composition:"Entity.DeleteMany"});return a.Response(N.OK,{description:'Operation is successful. Returns OperationResult with "affected" field.',contentType:L.opra_response_json}).Response(N.UNPROCESSABLE_ENTITY,{description:"The request was well-formed but was unable to process operation due to one or many errors.",contentType:L.opra_response_json}).QueryParam("filter",{type:o,description:"Determines filter fields"}),r.push(p=>{let c=p.compositionOptions=p.compositionOptions||{};c.type=Ve(t.type)}),a.Filter=(p,c,l)=>(r.push(()=>{n.set(p,{operators:c,description:l}),o.rules=n.toJSON()}),a),a};D.Entity.FindMany=function(i,e){let t;typeof i=="object"&&!i[T]?t=i:t={...e,type:i};let r=[],n=new _e,o=new re({dataType:t.type});o.rules={};let a=F(r,{method:"GET",...t,composition:"Entity.FindMany"});return a.Response(N.OK,{description:'Operation is successful. Returns OperationResult with "payload" field that contains list of resources.',contentType:L.opra_response_json,type:t.type,partial:"deep",isArray:!0}).Response(N.UNPROCESSABLE_ENTITY,{description:"The request was well-formed but was unable to process operation due to one or many errors.",contentType:L.opra_response_json}).QueryParam("limit",{description:"Determines number of returning instances",type:new $e({minValue:1,maxValue:t.maxLimit})}).QueryParam("skip",{description:"Determines number of returning instances",type:new $e({minValue:1})}).QueryParam("count",{description:"Counts all matching instances if enabled",type:Boolean}).QueryParam("projection",{description:"Determines fields projection",type:new H({dataType:t.type,allowSigns:"each"}),isArray:!0,arraySeparator:","}).QueryParam("filter",{type:o,description:"Determines filter fields"}).QueryParam("sort",{description:"Determines sort fields",type:new H({dataType:t.type,allowSigns:"first"}),isArray:!0,arraySeparator:","}),r.push(p=>{let c=p.compositionOptions=p.compositionOptions||{};c.type=Ve(t.type),t.defaultLimit&&(c.defaultLimit=t.defaultLimit),t.defaultProjection&&(c.defaultProjection=t.defaultProjection),t.maxLimit&&(c.maxLimit=t.maxLimit)}),a.DefaultSort=(...p)=>(r.push(c=>{let l=c.compositionOptions=c.compositionOptions||{};l.defaultSort=p}),a),a.SortFields=(...p)=>(r.push(c=>{let l=c.compositionOptions=c.compositionOptions||{};l.sortFields=p}),a),a.Filter=(p,c,l)=>(r.push(()=>{n.set(p,{operators:c,description:l}),o.rules=n.toJSON()}),a),a};D.Entity.Get=function(i,e){let t;typeof i=="object"&&!i[T]?t=i:t={...e,type:i};let r=[],n=F(r,{method:"GET",...t,composition:"Entity.Get"});return n.QueryParam("projection",{description:"Determines fields projection",type:new H({dataType:t.type,allowSigns:"each"}),isArray:!0,arraySeparator:","}).Response(N.OK,{description:'Operation is successful. Returns OperationResult with "payload" field that contains the resource asked for.',contentType:L.opra_response_json,type:t.type,partial:"deep"}).Response(N.NO_CONTENT,{description:"Operation is successful but no resource found"}).Response(N.UNPROCESSABLE_ENTITY,{description:"The request was well-formed but was unable to process operation due to one or many errors.",contentType:L.opra_response_json}),n.KeyParam=(o,a)=>{let p=typeof a=="string"||typeof a=="function"?{name:o,location:"path",type:a,keyParam:!0}:{...a,name:o,location:"path",keyParam:!0};return n.PathParam(o,p),r.push(c=>{var l;(l=c.path)!=null&&l.includes(":"+o)||(c.path=(c.path||"")+"@:"+o),c.mergePath=!0}),n},r.push(o=>{let a=o.compositionOptions=o.compositionOptions||{};a.type=Ve(t.type)}),n};D.Entity.UpdateMany=function(i,e){var p;let t;typeof i=="object"&&!i[T]?t=i:t={...e,type:i};let r=[],n=new re({dataType:t.type});n.rules={};let o=new _e,a=F(r,{method:"PATCH",...t,composition:"Entity.UpdateMany",requestBody:{immediateFetch:!0,partial:"deep",...t.requestBody,required:!0}});return a.RequestContent(((p=t.requestBody)==null?void 0:p.type)||t.type).Response(N.OK,{description:'Operation is successful. Returns OperationResult with "affected" field.',contentType:L.opra_response_json}).Response(N.UNPROCESSABLE_ENTITY,{description:"The request was well-formed but was unable to process operation due to one or many errors.",contentType:L.opra_response_json}).QueryParam("filter",{type:n,description:"Determines filter fields"}),r.push(c=>{let l=c.compositionOptions=c.compositionOptions||{};l.type=Ve(t.type)}),a.Filter=(c,l,_)=>(r.push(()=>{o.set(c,{operators:l,description:_}),n.rules=o.toJSON()}),a),a};D.Entity.Update=function(i,e){var p;let t;typeof i=="object"&&!i[T]?t=i:t={...e,type:i};let r=[],n=new _e,o=new re({dataType:t.type});o.rules={};let a=F(r,{method:"PATCH",...t,composition:"Entity.Update",requestBody:{partial:"deep",immediateFetch:!0,...t.requestBody,required:!0}});return a.QueryParam("projection",{description:"Determines fields projection",type:new H({dataType:t.type,allowSigns:"each"}),isArray:!0,arraySeparator:","}).QueryParam("filter",{type:o,description:"Determines filter fields"}).RequestContent(((p=t.requestBody)==null?void 0:p.type)||t.type).Response(N.OK,{description:'Operation is successful. Returns OperationResult with "payload" field that contains updated resource.',contentType:L.opra_response_json,type:t.type,partial:"deep"}).Response(N.NO_CONTENT,{description:"Operation is successful but no resource found"}).Response(N.UNPROCESSABLE_ENTITY,{description:"The request was well-formed but was unable to process operation due to one or many errors.",contentType:L.opra_response_json}),a.KeyParam=(c,l)=>{let _=typeof l=="string"||typeof l=="function"?{name:c,location:"path",type:l,keyParam:!0}:{...l,name:c,location:"path",keyParam:!0};return a.PathParam(c,_),r.push(u=>{var C;(C=u.path)!=null&&C.includes(":"+c)||(u.path=(u.path||"")+"@:"+c),u.mergePath=!0}),a},r.push(c=>{let l=c.compositionOptions=c.compositionOptions||{};l.type=Ve(t.type)}),a.Filter=(c,l,_)=>(r.push(()=>{n.set(c,{operators:l,description:_}),o.rules=n.toJSON()}),a),a};function Ve(i){if(typeof i=="string")return i;let e=Reflect.getMetadata(T,i);if(!e)throw new TypeError(`Type (${i}) is not decorated with any datatype decorators`);if(e!=null&&e.name)return e.name;throw new TypeError("You should provide named data type but embedded one found")}s(Ve,"getDataTypeName");var nc="https://oprajs.com/spec/v"+h.SpecVersion,Vr=class Vr{constructor(){this._allDocuments={}}static async createDocument(e,t){let r=new Vr,n=t instanceof ne?t:new ne(t);try{let o=new Fe;if(await r.initDocument(o,n,e),n.error.details.length)throw n.error;return o}catch(o){try{o instanceof Qe||n.addError(o)}catch{}if(!n.error.message){let a=n.error.details.length;n.error.message=`(${a}) error${a>1?"s":""} found in document schema.`,n.showErrorDetails&&(n.error.message+=n.error.details.map(p=>`
|
|
10
|
+
|
|
11
|
+
- ${p.message}`+(p.path?`
|
|
12
|
+
@${p.path}`:"")).join(""))}throw n.error}}async initDocument(e,t,r){let n;if(typeof r=="string"){if(n=await(await fetch(r,{method:"GET"})).json(),!n)return t.addError(`Invalid response returned from url: ${r}`);n.url=r}else n=r;let o;if(!e[Ie]){let a=e.node.findDataType("string");o=a==null?void 0:a.node.getDocument(),o||(o=await this.createBuiltinDocument(t),e.references.set("opra",o))}n.spec=n.spec||h.SpecVersion,e.url=n.url,n.info&&(e.info={...n.info}),n.references&&await t.enterAsync(".references",async()=>{let a,p;for([a,p]of Object.entries(n.references))p=await xe(p),await t.enterAsync(`[${a}]`,async()=>{if(!$.test(a))throw new TypeError(`Invalid namespace (${a})`);if(p instanceof Fe){e.references.set(a,p);return}let c=new Fe;o&&c.references.set("opra",o),await this.initDocument(c,t,p),e.references.set(a,this._allDocuments[c.id])})}),n.types&&await t.enterAsync(".types",async()=>{await J.addDataTypes(t,e,n.types)}),n.api&&await t.enterAsync(".api",async()=>{if(n.api.protocol==="http"){let a=await Ze.createApi(t,e,n.api);a&&(e.api=a)}else t.addError(`Unknown service protocol (${n.api.protocol})`)}),e.invalidate(),this._allDocuments[e.id]||(this._allDocuments[e.id]=e)}async createBuiltinDocument(e){let t={spec:h.SpecVersion,url:nc,info:{version:h.SpecVersion,title:"Opra built-in types",license:{url:"https://github.com/oprajs/opra/blob/main/LICENSE",name:"MIT"}},types:[jr,Ur,Cr,$e,Br,ue,qr,De,ur,tt,it,ot,at,W,H,re,vr,Y,Tt,kr,Kt]},r=new Fe;r[Ie]=!0;let n=Object.getPrototypeOf(BigInt(0)).constructor,o=Object.getPrototypeOf(Buffer.from([])),a=r.types[Zt];return a.set(Object,"object"),a.set(String,"string"),a.set(Number,"number"),a.set(Boolean,"boolean"),a.set(Object,"any"),a.set(Date,"datetime"),a.set(n,"bigint"),a.set(ArrayBuffer,"base64"),a.set(SharedArrayBuffer,"base64"),a.set(o,"base64"),await this.initDocument(r,e,t),r}};s(Vr,"ApiDocumentFactory");var Bs=Vr;var qs;(function(i){i.HttpApiFactory=Ze,i.DataTypeFactory=J})(qs||(qs={}));import{uid as O_}from"uid";export{jr as AnyType,or as ApiBase,Fe as ApiDocument,Bs as ApiDocumentFactory,M as ApiField,Ie as BUILTIN,cs as BadRequestError,ur as Base64Type,sa as BaseI18n,Ur as BigintType,Cr as BooleanType,$ as CLASS_NAME_PATTERN,Q as ComplexType,ls as ConflictError,T as DATATYPE_METADATA,y as DECODER,S as DECORATOR,O as DataType,Oe as DataTypeMap,it as DateStringType,at as DateTimeStringType,ot as DateTimeType,tt as DateType,b as DocumentElement,ne as DocumentInitContext,er as DocumentNode,g as ENCODER,Xt as EXTRACT_TYPENAME_PATTERN,W as EmailType,oe as EnumType,fs as FailedDependencyError,H as FieldPathType,Le as FieldsProjection,re as FilterType,Tr as ForbiddenError,te as HTTP_CONTROLLER_METADATA,sr as HttpApi,Z as HttpController,is as HttpHeaderCodes,Re as HttpMediaType,pr as HttpMultipartField,D as HttpOperation,cr as HttpOperationResponse,Ft as HttpParameter,fr as HttpRequestBody,N as HttpStatusCode,n0 as HttpStatusMessages,vt as HttpStatusRange,It as I18n,$e as IntegerType,us as InternalServerError,gs as IssueSeverity,Me as MappedType,ms as MethodNotAllowedError,L as MimeTypes,Xe as MixinType,Jo as NAMESPACE_PATTERN,hs as NotAcceptableError,ds as NotFoundError,Br as NullType,ue as NumberType,vr as ObjectIdType,qr as ObjectType,GE as OmitType,Y as OperationResult,Qe as OpraDocumentError,me as OpraException,Vt as OpraFilter,A as OpraHttpError,h as OpraSchema,ZE as PartialType,ys as PermissionError,r3 as PickType,c2 as RequiredType,Ts as ResourceConflictError,Es as ResourceNotAvailableError,P as ResponsiveMap,m as SimpleType,De as StringType,Tt as TimeType,_s as UnauthorizedError,xs as UnprocessableEntityError,kr as UrlType,Kt as UuidType,qs as classes,I as cloneObject,gc as getErrorStack,xc as getStackFileName,Xr as i18n,Qt as inheritPropertyInitializers,mc as isAsyncIterable,cc as isBlob,Gt as isConstructor,lc as isFormData,uc as isIterable,sc as isReadable,pc as isReadableStream,zr as isStream,fc as isURL,ac as isWritable,Zt as kCtorMap,B as kDataTypeMap,ge as kTypeNSMap,Yt as mergePrototype,Ks as omitNullish,x as omitUndefined,Yo as parse,Go as parseFieldsProjection,xe as resolveThunk,jc as safeJsonStringify,R as translate,O_ as uid};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.ApiDocument = void 0;
|
|
5
|
+
const super_fast_md5_1 = require("super-fast-md5");
|
|
5
6
|
const index_js_1 = require("../helpers/index.js");
|
|
6
7
|
const index_js_2 = require("../schema/index.js");
|
|
7
8
|
const data_type_map_js_1 = require("./common/data-type-map.js");
|
|
@@ -16,6 +17,8 @@ class ApiDocument extends document_element_js_1.DocumentElement {
|
|
|
16
17
|
constructor() {
|
|
17
18
|
super(null);
|
|
18
19
|
this[_a] = new WeakMap();
|
|
20
|
+
this.id = '';
|
|
21
|
+
this.info = {};
|
|
19
22
|
this.references = new index_js_1.ResponsiveMap();
|
|
20
23
|
this.types = new data_type_map_js_1.DataTypeMap();
|
|
21
24
|
this.node[constants_js_1.kDataTypeMap] = this.types;
|
|
@@ -80,6 +83,14 @@ class ApiDocument extends document_element_js_1.DocumentElement {
|
|
|
80
83
|
out.api = this.api.toJSON();
|
|
81
84
|
return out;
|
|
82
85
|
}
|
|
86
|
+
invalidate() {
|
|
87
|
+
/** Generate id */
|
|
88
|
+
const x = this.export();
|
|
89
|
+
delete x.id;
|
|
90
|
+
this.id = (0, super_fast_md5_1.md5)(JSON.stringify(x));
|
|
91
|
+
/** Clear [kTypeNSMap] */
|
|
92
|
+
this[constants_js_1.kTypeNSMap] = new WeakMap();
|
|
93
|
+
}
|
|
83
94
|
_findDataType(nameOrCtor, visitedRefs) {
|
|
84
95
|
let result = this.types.get(nameOrCtor);
|
|
85
96
|
if (result || !this.references.size)
|
|
@@ -7,7 +7,7 @@ const document_element_js_1 = require("./document-element.js");
|
|
|
7
7
|
class ApiBase extends document_element_js_1.DocumentElement {
|
|
8
8
|
constructor(owner) {
|
|
9
9
|
super(owner);
|
|
10
|
-
this.
|
|
10
|
+
this.name = 'OpraApi';
|
|
11
11
|
}
|
|
12
12
|
toJSON() {
|
|
13
13
|
return (0, index_js_1.omitUndefined)({
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DocumentElement = void 0;
|
|
4
4
|
const ts_gems_1 = require("ts-gems");
|
|
5
|
+
const uid_1 = require("uid");
|
|
5
6
|
const document_node_js_1 = require("./document-node.js");
|
|
6
7
|
/**
|
|
7
8
|
*
|
|
@@ -11,6 +12,7 @@ exports.DocumentElement = function (owner) {
|
|
|
11
12
|
if (!this)
|
|
12
13
|
throw new TypeError('"this" should be passed to call class constructor');
|
|
13
14
|
const _this = (0, ts_gems_1.asMutable)(this);
|
|
15
|
+
_this.id = (0, uid_1.uid)(16);
|
|
14
16
|
Object.defineProperty(_this, 'node', {
|
|
15
17
|
value: new document_node_js_1.DocumentNode(this, owner?.node),
|
|
16
18
|
enumerable: false,
|
|
@@ -40,6 +40,7 @@ exports.ApiField = function (...args) {
|
|
|
40
40
|
_this.readonly = initArgs.readonly;
|
|
41
41
|
_this.writeonly = initArgs.writeonly;
|
|
42
42
|
_this.examples = initArgs.examples;
|
|
43
|
+
_this.hidden = initArgs.hidden;
|
|
43
44
|
};
|
|
44
45
|
/**
|
|
45
46
|
*
|
|
@@ -51,15 +52,15 @@ class ApiFieldClass extends document_element_js_1.DocumentElement {
|
|
|
51
52
|
return (0, index_js_1.omitUndefined)({
|
|
52
53
|
type: typeName ? typeName : this.type?.toJSON(),
|
|
53
54
|
description: this.description,
|
|
54
|
-
isArray: this.isArray,
|
|
55
|
+
isArray: this.isArray || undefined,
|
|
55
56
|
default: this.default,
|
|
56
57
|
fixed: this.fixed,
|
|
57
|
-
required: this.required,
|
|
58
|
-
exclusive: this.exclusive,
|
|
59
|
-
translatable: this.translatable,
|
|
60
|
-
deprecated: this.deprecated,
|
|
61
|
-
readonly: this.readonly,
|
|
62
|
-
writeonly: this.writeonly,
|
|
58
|
+
required: this.required || undefined,
|
|
59
|
+
exclusive: this.exclusive || undefined,
|
|
60
|
+
translatable: this.translatable || undefined,
|
|
61
|
+
deprecated: this.deprecated || undefined,
|
|
62
|
+
readonly: this.readonly || undefined,
|
|
63
|
+
writeonly: this.writeonly || undefined,
|
|
63
64
|
examples: this.examples,
|
|
64
65
|
});
|
|
65
66
|
}
|
|
@@ -132,7 +132,7 @@ class ComplexTypeBaseClass extends data_type_js_1.DataType {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
return valgen_1.vg.isObject(schema, {
|
|
135
|
-
ctor: this.ctor,
|
|
135
|
+
ctor: this.name === 'object' ? Object : this.ctor,
|
|
136
136
|
additionalFields,
|
|
137
137
|
name: this.name,
|
|
138
138
|
coerce: true,
|
|
@@ -147,7 +147,9 @@ class ComplexTypeBaseClass extends data_type_js_1.DataType {
|
|
|
147
147
|
// Process fields
|
|
148
148
|
let fieldName;
|
|
149
149
|
for (const field of this.fields.values()) {
|
|
150
|
-
if ((context.ignoreReadonlyFields && field.readonly) ||
|
|
150
|
+
if ((context.ignoreReadonlyFields && field.readonly) ||
|
|
151
|
+
(context.ignoreWriteonlyFields && field.writeonly) ||
|
|
152
|
+
(context.ignoreHiddenFields && field.hidden)) {
|
|
151
153
|
schema[field.name] = valgen_1.vg.isUndefined({ coerce: true });
|
|
152
154
|
continue;
|
|
153
155
|
}
|
|
@@ -169,7 +171,7 @@ class ComplexTypeBaseClass extends data_type_js_1.DataType {
|
|
|
169
171
|
const fn = this._generateFieldCodec(codec, field, {
|
|
170
172
|
...context,
|
|
171
173
|
partial: context.partial === 'deep' ? context.partial : undefined,
|
|
172
|
-
projection: projection
|
|
174
|
+
projection: typeof projection === 'object' ? projection[fieldName]?.projection || '*' : projection,
|
|
173
175
|
currentPath: currentPath + (currentPath ? '.' : '') + fieldName,
|
|
174
176
|
});
|
|
175
177
|
schema[fieldName] = context.partial || !field.required ? valgen_1.vg.optional(fn) : valgen_1.vg.required(fn);
|
|
@@ -37,7 +37,7 @@ tslib_1.__decorate([
|
|
|
37
37
|
tslib_1.__metadata("design:type", String)
|
|
38
38
|
], DateStringType.prototype, "maxValue", void 0);
|
|
39
39
|
exports.DateStringType = DateStringType = tslib_1.__decorate([
|
|
40
|
-
(0, simple_type_js_1.SimpleType)({
|
|
40
|
+
((0, simple_type_js_1.SimpleType)({
|
|
41
41
|
description: 'Date string value',
|
|
42
42
|
nameMappings: {
|
|
43
43
|
js: 'string',
|
|
@@ -46,6 +46,6 @@ exports.DateStringType = DateStringType = tslib_1.__decorate([
|
|
|
46
46
|
})
|
|
47
47
|
.Example('2021-04-18', 'Full date value')
|
|
48
48
|
.Example('2021-04', 'Date value without day')
|
|
49
|
-
.Example('2021', 'Year only value'),
|
|
49
|
+
.Example('2021', 'Year only value')),
|
|
50
50
|
tslib_1.__metadata("design:paramtypes", [Object])
|
|
51
51
|
], DateStringType);
|
|
@@ -37,7 +37,7 @@ tslib_1.__decorate([
|
|
|
37
37
|
tslib_1.__metadata("design:type", String)
|
|
38
38
|
], DateTimeStringType.prototype, "maxValue", void 0);
|
|
39
39
|
exports.DateTimeStringType = DateTimeStringType = tslib_1.__decorate([
|
|
40
|
-
(0, simple_type_js_1.SimpleType)({
|
|
40
|
+
((0, simple_type_js_1.SimpleType)({
|
|
41
41
|
description: 'DateTime string value',
|
|
42
42
|
nameMappings: {
|
|
43
43
|
js: 'string',
|
|
@@ -49,6 +49,6 @@ exports.DateTimeStringType = DateTimeStringType = tslib_1.__decorate([
|
|
|
49
49
|
.Example('2021-04-18 22:30', 'Date-time value')
|
|
50
50
|
.Example('2021-04-18', 'Date value')
|
|
51
51
|
.Example('2021-04', 'Date value without day')
|
|
52
|
-
.Example('2021', 'Year only value'),
|
|
52
|
+
.Example('2021', 'Year only value')),
|
|
53
53
|
tslib_1.__metadata("design:paramtypes", [Object])
|
|
54
54
|
], DateTimeStringType);
|
|
@@ -51,7 +51,7 @@ tslib_1.__decorate([
|
|
|
51
51
|
tslib_1.__metadata("design:type", String)
|
|
52
52
|
], DateTimeType.prototype, "maxValue", void 0);
|
|
53
53
|
exports.DateTimeType = DateTimeType = tslib_1.__decorate([
|
|
54
|
-
(0, simple_type_js_1.SimpleType)({
|
|
54
|
+
((0, simple_type_js_1.SimpleType)({
|
|
55
55
|
description: 'A full datetime value',
|
|
56
56
|
nameMappings: {
|
|
57
57
|
js: 'string',
|
|
@@ -60,6 +60,6 @@ exports.DateTimeType = DateTimeType = tslib_1.__decorate([
|
|
|
60
60
|
})
|
|
61
61
|
.Example('2021-04-18T22:30:15')
|
|
62
62
|
.Example('2021-04-18 22:30:15')
|
|
63
|
-
.Example('2021-04-18 22:30'),
|
|
63
|
+
.Example('2021-04-18 22:30')),
|
|
64
64
|
tslib_1.__metadata("design:paramtypes", [Object])
|
|
65
65
|
], DateTimeType);
|
|
@@ -51,12 +51,12 @@ tslib_1.__decorate([
|
|
|
51
51
|
tslib_1.__metadata("design:type", String)
|
|
52
52
|
], DateType.prototype, "maxValue", void 0);
|
|
53
53
|
exports.DateType = DateType = tslib_1.__decorate([
|
|
54
|
-
(0, simple_type_js_1.SimpleType)({
|
|
54
|
+
((0, simple_type_js_1.SimpleType)({
|
|
55
55
|
description: 'A date without time',
|
|
56
56
|
nameMappings: {
|
|
57
57
|
js: 'Date',
|
|
58
58
|
json: 'string',
|
|
59
59
|
},
|
|
60
|
-
}).Example('2021-04-18', 'Full date value'),
|
|
60
|
+
}).Example('2021-04-18', 'Full date value')),
|
|
61
61
|
tslib_1.__metadata("design:paramtypes", [Object])
|
|
62
62
|
], DateType);
|