@michaelmishin/speclens 0.1.2 → 0.3.0
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/README.md +126 -5
- package/dist/speclens.iife.js +1323 -134
- package/dist/speclens.iife.js.map +1 -1
- package/dist/speclens.js +2058 -278
- package/dist/speclens.js.map +1 -1
- package/package.json +1 -1
package/dist/speclens.iife.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
var SpecLens=function(e){"use strict";var t,r,n=Object.defineProperty,o=(e,t,r)=>((e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function i(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var a,l={},c={};var d,p,u={};
|
|
2
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var f=(p||(p=1,function(e){const t=function(){if(a)return c;a=1,c.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},c.toByteArray=function(e){var n,o,i=s(e),a=i[0],l=i[1],c=new r(function(e,t,r){return 3*(t+r)/4-r}(0,a,l)),d=0,p=l>0?a-4:a;for(o=0;o<p;o+=4)n=t[e.charCodeAt(o)]<<18|t[e.charCodeAt(o+1)]<<12|t[e.charCodeAt(o+2)]<<6|t[e.charCodeAt(o+3)],c[d++]=n>>16&255,c[d++]=n>>8&255,c[d++]=255&n;return 2===l&&(n=t[e.charCodeAt(o)]<<2|t[e.charCodeAt(o+1)]>>4,c[d++]=255&n),1===l&&(n=t[e.charCodeAt(o)]<<10|t[e.charCodeAt(o+1)]<<4|t[e.charCodeAt(o+2)]>>2,c[d++]=n>>8&255,c[d++]=255&n),c},c.fromByteArray=function(t){for(var r,n=t.length,o=n%3,s=[],i=16383,a=0,c=n-o;a<c;a+=i)s.push(l(t,a,a+i>c?c:a+i));return 1===o?(r=t[n-1],s.push(e[r>>2]+e[r<<4&63]+"==")):2===o&&(r=(t[n-2]<<8)+t[n-1],s.push(e[r>>10]+e[r>>4&63]+e[r<<2&63]+"=")),s.join("")};for(var e=[],t=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)e[o]=n[o],t[n.charCodeAt(o)]=o;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function i(t){return e[t>>18&63]+e[t>>12&63]+e[t>>6&63]+e[63&t]}function l(e,t,r){for(var n,o=[],s=t;s<r;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(i(n));return o.join("")}return t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63,c}(),r=(d||(d=1,u.read=function(e,t,r,n,o){var s,i,a=8*o-n-1,l=(1<<a)-1,c=l>>1,d=-7,p=r?o-1:0,u=r?-1:1,f=e[t+p];for(p+=u,s=f&(1<<-d)-1,f>>=-d,d+=a;d>0;s=256*s+e[t+p],p+=u,d-=8);for(i=s&(1<<-d)-1,s>>=-d,d+=n;d>0;i=256*i+e[t+p],p+=u,d-=8);if(0===s)s=1-c;else{if(s===l)return i?NaN:1/0*(f?-1:1);i+=Math.pow(2,n),s-=c}return(f?-1:1)*i*Math.pow(2,s-n)},u.write=function(e,t,r,n,o,s){var i,a,l,c=8*s-o-1,d=(1<<c)-1,p=d>>1,u=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,h=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,i=d):(i=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-i))<1&&(i--,l*=2),(t+=i+p>=1?u/l:u*Math.pow(2,1-p))*l>=2&&(i++,l/=2),i+p>=d?(a=0,i=d):i+p>=1?(a=(t*l-1)*Math.pow(2,o),i+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,o),i=0));o>=8;e[r+f]=255&a,f+=h,a/=256,o-=8);for(i=i<<o|a,c+=o;c>0;e[r+f]=255&i,f+=h,i/=256,c-=8);e[r+f-h]|=128*m}),u),n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=i,e.SlowBuffer=function(e){return+e!=e&&(e=0),i.alloc(+e)},e.INSPECT_MAX_BYTES=50;const o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,i.prototype),t}function i(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=s(r);const o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Q(e,Uint8Array)){const t=new Uint8Array(e);return m(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Q(e,ArrayBuffer)||e&&Q(e.buffer,ArrayBuffer))return m(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Q(e,SharedArrayBuffer)||e&&Q(e.buffer,SharedArrayBuffer)))return m(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return i.from(n,t,r);const o=function(e){if(i.isBuffer(e)){const t=0|g(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?s(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return i.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function p(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return p(e),s(e<0?0:0|g(e))}function h(e){const t=e.length<0?0:0|g(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function m(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,i.prototype),n}function g(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function y(e,t){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(o)return n?-1:G(e).length;t=(""+t).toLowerCase(),o=!0}}function v(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function $(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=i.from(t,n)),i.isBuffer(t))return 0===t.length?-1:x(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):x(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function x(e,t,r,n,o){let s,i=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;i=2,a/=2,l/=2,r/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){let n=-1;for(s=r;s<a;s++)if(c(e,s)===c(t,-1===n?0:s-n)){if(-1===n&&(n=s),s-n+1===l)return n*i}else-1!==n&&(s-=s-n),n=-1}else for(r+l>a&&(r=a-l),s=r;s>=0;s--){let r=!0;for(let n=0;n<l;n++)if(c(e,s+n)!==c(t,n)){r=!1;break}if(r)return s}return-1}function w(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const s=t.length;let i;for(n>s/2&&(n=s/2),i=0;i<n;++i){const n=parseInt(t.substr(2*i,2),16);if(Y(n))return i;e[r+i]=n}return i}function _(e,t,r,n){return Z(G(t,e.length-r),e,r,n)}function k(e,t,r,n){return Z(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return Z(K(t),e,r,n)}function j(e,t,r,n){return Z(function(e,t){let r,n,o;const s=[];for(let i=0;i<e.length&&!((t-=2)<0);++i)r=e.charCodeAt(i),n=r>>8,o=r%256,s.push(o),s.push(n);return s}(t,e.length-r),e,r,n)}function O(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function P(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let s=null,i=t>239?4:t>223?3:t>191?2:1;if(o+i<=r){let r,n,a,l;switch(i){case 1:t<128&&(s=t);break;case 2:r=e[o+1],128==(192&r)&&(l=(31&t)<<6|63&r,l>127&&(s=l));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(l=(15&t)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:r=e[o+1],n=e[o+2],a=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,l>65535&&l<1114112&&(s=l))}}null===s?(s=65533,i=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),o+=i}return function(e){const t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=E));return r}(n)}e.kMaxLength=o,i.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(cp){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}}),i.poolSize=8192,i.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array),i.alloc=function(e,t,r){return function(e,t,r){return p(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},i.allocUnsafe=function(e){return f(e)},i.allocUnsafeSlow=function(e){return f(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==i.prototype},i.compare=function(e,t){if(Q(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),Q(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,s=Math.min(r,n);o<s;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},i.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return i.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=i.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(Q(t,Uint8Array))o+t.length>n.length?(i.isBuffer(t)||(t=i.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!i.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},i.byteLength=y,i.prototype._isBuffer=!0,i.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)b(this,t,t+1);return this},i.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},i.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},i.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):v.apply(this,arguments)},i.prototype.toLocaleString=i.prototype.toString,i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===i.compare(this,e)},i.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},n&&(i.prototype[n]=i.prototype.inspect),i.prototype.compare=function(e,t,r,n,o){if(Q(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),!i.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let s=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const l=Math.min(s,a),c=this.slice(n,o),d=e.slice(t,r);for(let i=0;i<l;++i)if(c[i]!==d[i]){s=c[i],a=d[i];break}return s<a?-1:a<s?1:0},i.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},i.prototype.indexOf=function(e,t,r){return $(this,e,t,r,!0)},i.prototype.lastIndexOf=function(e,t,r){return $(this,e,t,r,!1)},i.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return k(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const E=4096;function T(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function A(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function C(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let s=t;s<r;++s)o+=X[e[s]];return o}function I(e,t,r){const n=e.slice(t,r);let o="";for(let s=0;s<n.length-1;s+=2)o+=String.fromCharCode(n[s]+256*n[s+1]);return o}function R(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,o,s){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function M(e,t,r,n,o){F(t,n,o,e,r,7);let s=Number(t&BigInt(4294967295));e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,r}function q(e,t,r,n,o){F(t,n,o,e,r,7);let s=Number(t&BigInt(4294967295));e[r+7]=s,s>>=8,e[r+6]=s,s>>=8,e[r+5]=s,s>>=8,e[r+4]=s;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=i,i>>=8,e[r+2]=i,i>>=8,e[r+1]=i,i>>=8,e[r]=i,r+8}function z(e,t,r,n,o,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,n,o,s){return t=+t,n>>>=0,s||z(e,0,n,4),r.write(e,t,n,o,23,4),n+4}function L(e,t,n,o,s){return t=+t,n>>>=0,s||z(e,0,n,8),r.write(e,t,n,o,52,8),n+8}i.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,i.prototype),n},i.prototype.readUintLE=i.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e],o=1,s=0;for(;++s<t&&(o*=256);)n+=this[e+s]*o;return n},i.prototype.readUintBE=i.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},i.prototype.readUint8=i.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readBigUInt64LE=ee(function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||J(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))}),i.prototype.readBigUInt64BE=ee(function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||J(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)}),i.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e],o=1,s=0;for(;++s<t&&(o*=256);)n+=this[e+s]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},i.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=t,o=1,s=this[e+--n];for(;n>0&&(o*=256);)s+=this[e+--n]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*t)),s},i.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readBigInt64LE=ee(function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||J(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),i.prototype.readBigInt64BE=ee(function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||J(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),i.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),r.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),r.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),r.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),r.read(this,e,!1,52,8)},i.prototype.writeUintLE=i.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,s=0;for(this[t]=255&e;++s<r&&(o*=256);)this[t+s]=e/o&255;return t+r},i.prototype.writeUintBE=i.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+r},i.prototype.writeUint8=i.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeBigUInt64LE=ee(function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeBigUInt64BE=ee(function(e,t=0){return q(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let o=0,s=1,i=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===i&&0!==this[t+o-1]&&(i=1),this[t+o]=(e/s|0)-i&255;return t+r},i.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let o=r-1,s=1,i=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===i&&0!==this[t+o+1]&&(i=1),this[t+o]=(e/s|0)-i&255;return t+r},i.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeBigInt64LE=ee(function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),i.prototype.writeBigInt64BE=ee(function(e,t=0){return q(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),i.prototype.writeFloatLE=function(e,t,r){return U(this,e,t,!0,r)},i.prototype.writeFloatBE=function(e,t,r){return U(this,e,t,!1,r)},i.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},i.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},i.prototype.copy=function(e,t,r,n){if(!i.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},i.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!i.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const s=i.isBuffer(e)?e:i.from(e,n),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=s[o%a]}return this};const D={};function B(e,t,r){D[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function H(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function F(e,t,r,n,o,s){if(e>r||e<t){const r="bigint"==typeof t?"n":"";let n;throw n=0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(s+1)}${r}`:`>= -(2${r} ** ${8*(s+1)-1}${r}) and < 2 ** ${8*(s+1)-1}${r}`,new D.ERR_OUT_OF_RANGE("value",n,e)}!function(e,t,r){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||J(t,e.length-(r+1))}(n,o,s)}function V(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function J(e,t,r){if(Math.floor(e)!==e)throw V(e,r),new D.ERR_OUT_OF_RANGE("offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${t}`,e)}B("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),B("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),B("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=H(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=H(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n},RangeError);const W=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let o=null;const s=[];for(let i=0;i<n;++i){if(r=e.charCodeAt(i),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(i+1===n){(t-=3)>-1&&s.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&s.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function K(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Z(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function ee(e){return"undefined"==typeof BigInt?te:e}function te(){throw new Error("BigInt not supported")}}(l)),l);
|
|
2
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var h=(p||(p=1,function(e){const t=function(){if(a)return c;a=1,c.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},c.toByteArray=function(e){var n,o,i=s(e),a=i[0],l=i[1],c=new r(function(e,t,r){return 3*(t+r)/4-r}(0,a,l)),d=0,p=l>0?a-4:a;for(o=0;o<p;o+=4)n=t[e.charCodeAt(o)]<<18|t[e.charCodeAt(o+1)]<<12|t[e.charCodeAt(o+2)]<<6|t[e.charCodeAt(o+3)],c[d++]=n>>16&255,c[d++]=n>>8&255,c[d++]=255&n;return 2===l&&(n=t[e.charCodeAt(o)]<<2|t[e.charCodeAt(o+1)]>>4,c[d++]=255&n),1===l&&(n=t[e.charCodeAt(o)]<<10|t[e.charCodeAt(o+1)]<<4|t[e.charCodeAt(o+2)]>>2,c[d++]=n>>8&255,c[d++]=255&n),c},c.fromByteArray=function(t){for(var r,n=t.length,o=n%3,s=[],i=16383,a=0,c=n-o;a<c;a+=i)s.push(l(t,a,a+i>c?c:a+i));return 1===o?(r=t[n-1],s.push(e[r>>2]+e[r<<4&63]+"==")):2===o&&(r=(t[n-2]<<8)+t[n-1],s.push(e[r>>10]+e[r>>4&63]+e[r<<2&63]+"=")),s.join("")};for(var e=[],t=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)e[o]=n[o],t[n.charCodeAt(o)]=o;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function i(t){return e[t>>18&63]+e[t>>12&63]+e[t>>6&63]+e[63&t]}function l(e,t,r){for(var n,o=[],s=t;s<r;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(i(n));return o.join("")}return t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63,c}(),r=(d||(d=1,u.read=function(e,t,r,n,o){var s,i,a=8*o-n-1,l=(1<<a)-1,c=l>>1,d=-7,p=r?o-1:0,u=r?-1:1,h=e[t+p];for(p+=u,s=h&(1<<-d)-1,h>>=-d,d+=a;d>0;s=256*s+e[t+p],p+=u,d-=8);for(i=s&(1<<-d)-1,s>>=-d,d+=n;d>0;i=256*i+e[t+p],p+=u,d-=8);if(0===s)s=1-c;else{if(s===l)return i?NaN:1/0*(h?-1:1);i+=Math.pow(2,n),s-=c}return(h?-1:1)*i*Math.pow(2,s-n)},u.write=function(e,t,r,n,o,s){var i,a,l,c=8*s-o-1,d=(1<<c)-1,p=d>>1,u=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:s-1,f=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,i=d):(i=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-i))<1&&(i--,l*=2),(t+=i+p>=1?u/l:u*Math.pow(2,1-p))*l>=2&&(i++,l/=2),i+p>=d?(a=0,i=d):i+p>=1?(a=(t*l-1)*Math.pow(2,o),i+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,o),i=0));o>=8;e[r+h]=255&a,h+=f,a/=256,o-=8);for(i=i<<o|a,c+=o;c>0;e[r+h]=255&i,h+=f,i/=256,c-=8);e[r+h-f]|=128*m}),u),n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=i,e.SlowBuffer=function(e){return+e!=e&&(e=0),i.alloc(+e)},e.INSPECT_MAX_BYTES=50;const o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,i.prototype),t}function i(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=s(r);const o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return m(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return m(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return m(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return i.from(n,t,r);const o=function(e){if(i.isBuffer(e)){const t=0|g(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Q(e.length)?s(0):f(e):"Buffer"===e.type&&Array.isArray(e.data)?f(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return i.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function p(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return p(e),s(e<0?0:0|g(e))}function f(e){const t=e.length<0?0:0|g(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function m(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,i.prototype),n}function g(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function y(e,t){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(o)return n?-1:W(e).length;t=(""+t).toLowerCase(),o=!0}}function v(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return j(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function $(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Q(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=i.from(t,n)),i.isBuffer(t))return 0===t.length?-1:x(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):x(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function x(e,t,r,n,o){let s,i=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;i=2,a/=2,l/=2,r/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){let n=-1;for(s=r;s<a;s++)if(c(e,s)===c(t,-1===n?0:s-n)){if(-1===n&&(n=s),s-n+1===l)return n*i}else-1!==n&&(s-=s-n),n=-1}else for(r+l>a&&(r=a-l),s=r;s>=0;s--){let r=!0;for(let n=0;n<l;n++)if(c(e,s+n)!==c(t,n)){r=!1;break}if(r)return s}return-1}function w(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const s=t.length;let i;for(n>s/2&&(n=s/2),i=0;i<n;++i){const n=parseInt(t.substr(2*i,2),16);if(Q(n))return i;e[r+i]=n}return i}function _(e,t,r,n){return Z(W(t,e.length-r),e,r,n)}function k(e,t,r,n){return Z(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return Z(K(t),e,r,n)}function O(e,t,r,n){return Z(function(e,t){let r,n,o;const s=[];for(let i=0;i<e.length&&!((t-=2)<0);++i)r=e.charCodeAt(i),n=r>>8,o=r%256,s.push(o),s.push(n);return s}(t,e.length-r),e,r,n)}function j(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function P(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let s=null,i=t>239?4:t>223?3:t>191?2:1;if(o+i<=r){let r,n,a,l;switch(i){case 1:t<128&&(s=t);break;case 2:r=e[o+1],128==(192&r)&&(l=(31&t)<<6|63&r,l>127&&(s=l));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(l=(15&t)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:r=e[o+1],n=e[o+2],a=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,l>65535&&l<1114112&&(s=l))}}null===s?(s=65533,i=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),o+=i}return function(e){const t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=E));return r}(n)}e.kMaxLength=o,i.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}}),i.poolSize=8192,i.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array),i.alloc=function(e,t,r){return function(e,t,r){return p(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},i.allocUnsafe=function(e){return h(e)},i.allocUnsafeSlow=function(e){return h(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==i.prototype},i.compare=function(e,t){if(Y(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,s=Math.min(r,n);o<s;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},i.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return i.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=i.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(Y(t,Uint8Array))o+t.length>n.length?(i.isBuffer(t)||(t=i.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!i.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},i.byteLength=y,i.prototype._isBuffer=!0,i.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)b(this,t,t+1);return this},i.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},i.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},i.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):v.apply(this,arguments)},i.prototype.toLocaleString=i.prototype.toString,i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===i.compare(this,e)},i.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},n&&(i.prototype[n]=i.prototype.inspect),i.prototype.compare=function(e,t,r,n,o){if(Y(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),!i.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let s=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const l=Math.min(s,a),c=this.slice(n,o),d=e.slice(t,r);for(let i=0;i<l;++i)if(c[i]!==d[i]){s=c[i],a=d[i];break}return s<a?-1:a<s?1:0},i.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},i.prototype.indexOf=function(e,t,r){return $(this,e,t,r,!0)},i.prototype.lastIndexOf=function(e,t,r){return $(this,e,t,r,!1)},i.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return k(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const E=4096;function T(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function A(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function C(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let s=t;s<r;++s)o+=X[e[s]];return o}function I(e,t,r){const n=e.slice(t,r);let o="";for(let s=0;s<n.length-1;s+=2)o+=String.fromCharCode(n[s]+256*n[s+1]);return o}function R(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,o,s){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function M(e,t,r,n,o){F(t,n,o,e,r,7);let s=Number(t&BigInt(4294967295));e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,r}function q(e,t,r,n,o){F(t,n,o,e,r,7);let s=Number(t&BigInt(4294967295));e[r+7]=s,s>>=8,e[r+6]=s,s>>=8,e[r+5]=s,s>>=8,e[r+4]=s;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=i,i>>=8,e[r+2]=i,i>>=8,e[r+1]=i,i>>=8,e[r]=i,r+8}function z(e,t,r,n,o,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,n,o,s){return t=+t,n>>>=0,s||z(e,0,n,4),r.write(e,t,n,o,23,4),n+4}function U(e,t,n,o,s){return t=+t,n>>>=0,s||z(e,0,n,8),r.write(e,t,n,o,52,8),n+8}i.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,i.prototype),n},i.prototype.readUintLE=i.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e],o=1,s=0;for(;++s<t&&(o*=256);)n+=this[e+s]*o;return n},i.prototype.readUintBE=i.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},i.prototype.readUint8=i.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readBigUInt64LE=ee(function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))}),i.prototype.readBigUInt64BE=ee(function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)}),i.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e],o=1,s=0;for(;++s<t&&(o*=256);)n+=this[e+s]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},i.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=t,o=1,s=this[e+--n];for(;n>0&&(o*=256);)s+=this[e+--n]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*t)),s},i.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readBigInt64LE=ee(function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),i.prototype.readBigInt64BE=ee(function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),i.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),r.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),r.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),r.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),r.read(this,e,!1,52,8)},i.prototype.writeUintLE=i.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,s=0;for(this[t]=255&e;++s<r&&(o*=256);)this[t+s]=e/o&255;return t+r},i.prototype.writeUintBE=i.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+r},i.prototype.writeUint8=i.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeBigUInt64LE=ee(function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeBigUInt64BE=ee(function(e,t=0){return q(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let o=0,s=1,i=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===i&&0!==this[t+o-1]&&(i=1),this[t+o]=(e/s|0)-i&255;return t+r},i.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let o=r-1,s=1,i=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===i&&0!==this[t+o+1]&&(i=1),this[t+o]=(e/s|0)-i&255;return t+r},i.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeBigInt64LE=ee(function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),i.prototype.writeBigInt64BE=ee(function(e,t=0){return q(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),i.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},i.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},i.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},i.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},i.prototype.copy=function(e,t,r,n){if(!i.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},i.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!i.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const s=i.isBuffer(e)?e:i.from(e,n),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=s[o%a]}return this};const D={};function B(e,t,r){D[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function H(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function F(e,t,r,n,o,s){if(e>r||e<t){const r="bigint"==typeof t?"n":"";let n;throw n=0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(s+1)}${r}`:`>= -(2${r} ** ${8*(s+1)-1}${r}) and < 2 ** ${8*(s+1)-1}${r}`,new D.ERR_OUT_OF_RANGE("value",n,e)}!function(e,t,r){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||G(t,e.length-(r+1))}(n,o,s)}function V(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function G(e,t,r){if(Math.floor(e)!==e)throw V(e,r),new D.ERR_OUT_OF_RANGE("offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${t}`,e)}B("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),B("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),B("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=H(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=H(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n},RangeError);const J=/[^+/0-9A-Za-z-_]/g;function W(e,t){let r;t=t||1/0;const n=e.length;let o=null;const s=[];for(let i=0;i<n;++i){if(r=e.charCodeAt(i),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(i+1===n){(t-=3)>-1&&s.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&s.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function K(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(J,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Z(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function ee(e){return"undefined"==typeof BigInt?te:e}function te(){throw new Error("BigInt not supported")}}(l)),l);
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
|
5
5
|
* Copyright 2019 Google LLC
|
|
6
6
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
7
|
-
*/const
|
|
7
|
+
*/const f=globalThis,m=f.ShadowRoot&&(void 0===f.ShadyCSS||f.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,g=Symbol(),y=new WeakMap;let v=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==g)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(m&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=y.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&y.set(t,e))}return e}toString(){return this.cssText}};const b=(e,...t)=>{const r=1===e.length?e[0]:t.reduce((t,r,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1],e[0]);return new v(r,e,g)},$=m?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new v("string"==typeof e?e:e+"",void 0,g))(t)})(e):e,{is:x,defineProperty:w,getOwnPropertyDescriptor:_,getOwnPropertyNames:k,getOwnPropertySymbols:S,getPrototypeOf:O}=Object,j=globalThis,P=j.trustedTypes,E=P?P.emptyScript:"",T=j.reactiveElementPolyfillSupport,A=(e,t)=>e,C={toAttribute(e,t){switch(t){case Boolean:e=e?E:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(n){r=null}}return r}},I=(e,t)=>!x(e,t),R={attribute:!0,type:String,converter:C,reflect:!1,useDefault:!1,hasChanged:I};
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/Symbol.metadata??(Symbol.metadata=Symbol("metadata")),
|
|
12
|
+
*/Symbol.metadata??(Symbol.metadata=Symbol("metadata")),j.litPropertyMetadata??(j.litPropertyMetadata=new WeakMap);let N=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=R){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&w(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:o}=_(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:n,set(t){const s=null==n?void 0:n.call(this);null==o||o.call(this,t),this.requestUpdate(e,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??R}static _$Ei(){if(this.hasOwnProperty(A("elementProperties")))return;const e=O(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(A("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(A("properties"))){const e=this.properties,t=[...k(e),...S(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[t,r]of this.elementProperties){const e=this._$Eu(t,r);void 0!==e&&this._$Eh.set(e,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift($(e))}else void 0!==e&&t.push($(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(e=this.constructor.l)||e.forEach(e=>e(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),void 0!==this.renderRoot&&this.isConnected&&(null==(t=e.hostConnected)||t.call(e))}removeController(e){var t;null==(t=this._$EO)||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(m)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const r of t){const t=document.createElement("style"),n=f.litNonce;void 0!==n&&t.setAttribute("nonce",n),t.textContent=r.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(e=this._$EO)||e.forEach(e=>{var t;return null==(t=e.hostConnected)?void 0:t.call(e)})}enableUpdating(e){}disconnectedCallback(){var e;null==(e=this._$EO)||e.forEach(e=>{var t;return null==(t=e.hostDisconnected)?void 0:t.call(e)})}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){var r;const n=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,n);if(void 0!==o&&!0===n.reflect){const s=(void 0!==(null==(r=n.converter)?void 0:r.toAttribute)?n.converter:C).toAttribute(t,n.type);this._$Em=e,null==s?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(e,t){var r,n;const o=this.constructor,s=o._$Eh.get(e);if(void 0!==s&&this._$Em!==s){const e=o.getPropertyOptions(s),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null==(r=e.converter)?void 0:r.fromAttribute)?e.converter:C;this._$Em=s;const a=i.fromAttribute(t,e.type);this[s]=a??(null==(n=this._$Ej)?void 0:n.get(s))??a,this._$Em=null}}requestUpdate(e,t,r,n=!1,o){var s;if(void 0!==e){const i=this.constructor;if(!1===n&&(o=this[e]),r??(r=i.getPropertyOptions(e)),!((r.hasChanged??I)(o,t)||r.useDefault&&r.reflect&&o===(null==(s=this._$Ej)?void 0:s.get(e))&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:n,wrapped:o},s){r&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,s??t??this[e]),!0!==o||void 0!==s)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),!0===n&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e){const{wrapped:e}=r,n=this[t];!0!==e||this._$AL.has(t)||void 0===n||this.C(t,void 0,r,n)}}let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),null==(e=this._$EO)||e.forEach(e=>{var t;return null==(t=e.hostUpdate)?void 0:t.call(e)}),this.update(r)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(r)}willUpdate(e){}_$AE(e){var t;null==(t=this._$EO)||t.forEach(e=>{var t;return null==(t=e.hostUpdated)?void 0:t.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(e){}firstUpdated(e){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[A("elementProperties")]=new Map,N[A("finalized")]=new Map,null==T||T({ReactiveElement:N}),(j.reactiveElementVersions??(j.reactiveElementVersions=[])).push("2.1.2");
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
17
|
*/
|
|
18
|
-
const M=globalThis,q=e=>e,z=M.trustedTypes,
|
|
18
|
+
const M=globalThis,q=e=>e,z=M.trustedTypes,L=z?z.createPolicy("lit-html",{createHTML:e=>e}):void 0,U="$lit$",D=`lit$${Math.random().toFixed(9).slice(2)}$`,B="?"+D,H=`<${B}>`,F=document,V=()=>F.createComment(""),G=e=>null===e||"object"!=typeof e&&"function"!=typeof e,J=Array.isArray,W="[ \t\n\f\r]",K=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z=/-->/g,Y=/>/g,Q=RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),X=/'/g,ee=/"/g,te=/^(?:script|style|textarea|title)$/i,re=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),ne=re(1),oe=re(2),se=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),ae=new WeakMap,le=F.createTreeWalker(F,129);function ce(e,t){if(!J(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==L?L.createHTML(t):t}class de{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let o=0,s=0;const i=e.length-1,a=this.parts,[l,c]=((e,t)=>{const r=e.length-1,n=[];let o,s=2===t?"<svg>":3===t?"<math>":"",i=K;for(let a=0;a<r;a++){const t=e[a];let r,l,c=-1,d=0;for(;d<t.length&&(i.lastIndex=d,l=i.exec(t),null!==l);)d=i.lastIndex,i===K?"!--"===l[1]?i=Z:void 0!==l[1]?i=Y:void 0!==l[2]?(te.test(l[2])&&(o=RegExp("</"+l[2],"g")),i=Q):void 0!==l[3]&&(i=Q):i===Q?">"===l[0]?(i=o??K,c=-1):void 0===l[1]?c=-2:(c=i.lastIndex-l[2].length,r=l[1],i=void 0===l[3]?Q:'"'===l[3]?ee:X):i===ee||i===X?i=Q:i===Z||i===Y?i=K:(i=Q,o=void 0);const p=i===Q&&e[a+1].startsWith("/>")?" ":"";s+=i===K?t+H:c>=0?(n.push(r),t.slice(0,c)+U+t.slice(c)+D+p):t+D+(-2===c?a:p)}return[ce(e,s+(e[r]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),n]})(e,t);if(this.el=de.createElement(l,r),le.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=le.nextNode())&&a.length<i;){if(1===n.nodeType){if(n.hasAttributes())for(const e of n.getAttributeNames())if(e.endsWith(U)){const t=c[s++],r=n.getAttribute(e).split(D),i=/([.?@])?(.*)/.exec(t);a.push({type:1,index:o,name:i[2],strings:r,ctor:"."===i[1]?me:"?"===i[1]?ge:"@"===i[1]?ye:fe}),n.removeAttribute(e)}else e.startsWith(D)&&(a.push({type:6,index:o}),n.removeAttribute(e));if(te.test(n.tagName)){const e=n.textContent.split(D),t=e.length-1;if(t>0){n.textContent=z?z.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],V()),le.nextNode(),a.push({type:2,index:++o});n.append(e[t],V())}}}else if(8===n.nodeType)if(n.data===B)a.push({type:2,index:o});else{let e=-1;for(;-1!==(e=n.data.indexOf(D,e+1));)a.push({type:7,index:o}),e+=D.length-1}o++}}static createElement(e,t){const r=F.createElement("template");return r.innerHTML=e,r}}function pe(e,t,r=e,n){var o,s;if(t===se)return t;let i=void 0!==n?null==(o=r._$Co)?void 0:o[n]:r._$Cl;const a=G(t)?void 0:t._$litDirective$;return(null==i?void 0:i.constructor)!==a&&(null==(s=null==i?void 0:i._$AO)||s.call(i,!1),void 0===a?i=void 0:(i=new a(e),i._$AT(e,r,n)),void 0!==n?(r._$Co??(r._$Co=[]))[n]=i:r._$Cl=i),void 0!==i&&(t=pe(e,i._$AS(e,t.values),i,n)),t}class ue{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,n=((null==e?void 0:e.creationScope)??F).importNode(t,!0);le.currentNode=n;let o=le.nextNode(),s=0,i=0,a=r[0];for(;void 0!==a;){if(s===a.index){let t;2===a.type?t=new he(o,o.nextSibling,this,e):1===a.type?t=new a.ctor(o,a.name,a.strings,this,e):6===a.type&&(t=new ve(o,this,e)),this._$AV.push(t),a=r[++i]}s!==(null==a?void 0:a.index)&&(o=le.nextNode(),s++)}return le.currentNode=F,n}p(e){let t=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class he{get _$AU(){var e;return(null==(e=this._$AM)?void 0:e._$AU)??this._$Cv}constructor(e,t,r,n){this.type=2,this._$AH=ie,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=(null==n?void 0:n.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===(null==e?void 0:e.nodeType)&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=pe(this,e,t),G(e)?e===ie||null==e||""===e?(this._$AH!==ie&&this._$AR(),this._$AH=ie):e!==this._$AH&&e!==se&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>J(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]))(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==ie&&G(this._$AH)?this._$AA.nextSibling.data=e:this.T(F.createTextNode(e)),this._$AH=e}$(e){var t;const{values:r,_$litType$:n}=e,o="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=de.createElement(ce(n.h,n.h[0]),this.options)),n);if((null==(t=this._$AH)?void 0:t._$AD)===o)this._$AH.p(r);else{const e=new ue(o,this),t=e.u(this.options);e.p(r),this.T(t),this._$AH=e}}_$AC(e){let t=ae.get(e.strings);return void 0===t&&ae.set(e.strings,t=new de(e)),t}k(e){J(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,n=0;for(const o of e)n===t.length?t.push(r=new he(this.O(V()),this.O(V()),this,this.options)):r=t[n],r._$AI(o),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){var r;for(null==(r=this._$AP)||r.call(this,!1,!0,t);e!==this._$AB;){const t=q(e).nextSibling;q(e).remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cv=e,null==(t=this._$AP)||t.call(this,e))}}class fe{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,o){this.type=1,this._$AH=ie,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=o,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=ie}_$AI(e,t=this,r,n){const o=this.strings;let s=!1;if(void 0===o)e=pe(this,e,t,0),s=!G(e)||e!==this._$AH&&e!==se,s&&(this._$AH=e);else{const n=e;let i,a;for(e=o[0],i=0;i<o.length-1;i++)a=pe(this,n[r+i],t,i),a===se&&(a=this._$AH[i]),s||(s=!G(a)||a!==this._$AH[i]),a===ie?e=ie:e!==ie&&(e+=(a??"")+o[i+1]),this._$AH[i]=a}s&&!n&&this.j(e)}j(e){e===ie?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class me extends fe{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===ie?void 0:e}}class ge extends fe{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==ie)}}class ye extends fe{constructor(e,t,r,n,o){super(e,t,r,n,o),this.type=5}_$AI(e,t=this){if((e=pe(this,e,t,0)??ie)===se)return;const r=this._$AH,n=e===ie&&r!==ie||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,o=e!==ie&&(r===ie||n);n&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t;"function"==typeof this._$AH?this._$AH.call((null==(t=this.options)?void 0:t.host)??this.element,e):this._$AH.handleEvent(e)}}class ve{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){pe(this,e)}}const be=M.litHtmlPolyfillSupport;null==be||be(de,he),(M.litHtmlVersions??(M.litHtmlVersions=[])).push("3.3.2");const $e=globalThis;
|
|
19
19
|
/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/let xe=class extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,r)=>{const n=(null==r?void 0:r.renderBefore)??t;let o=n._$litPart$;if(void 0===o){const e=(null==r?void 0:r.renderBefore)??null;n._$litPart$=o=new
|
|
23
|
+
*/let xe=class extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,r)=>{const n=(null==r?void 0:r.renderBefore)??t;let o=n._$litPart$;if(void 0===o){const e=(null==r?void 0:r.renderBefore)??null;n._$litPart$=o=new he(t.insertBefore(V(),e),e,void 0,r??{})}return o._$AI(e),o})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null==(e=this._$Do)||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null==(e=this._$Do)||e.setConnected(!1)}render(){return se}};xe._$litElement$=!0,xe.finalized=!0,null==(t=$e.litElementHydrateSupport)||t.call($e,{LitElement:xe});const we=$e.litElementPolyfillSupport;null==we||we({LitElement:xe}),($e.litElementVersions??($e.litElementVersions=[])).push("4.2.2");
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
@@ -31,17 +31,23 @@ const _e=e=>(t,r)=>{void 0!==r?r.addInitializer(()=>{customElements.define(e,t)}
|
|
|
31
31
|
* @license
|
|
32
32
|
* Copyright 2017 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
|
-
*/function
|
|
34
|
+
*/function Oe(e){return(t,r)=>"object"==typeof r?Se(e,t,r):((e,t,r)=>{const n=t.hasOwnProperty(r);return t.constructor.createProperty(r,e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}
|
|
35
35
|
/**
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2017 Google LLC
|
|
38
38
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
-
*/function
|
|
39
|
+
*/function je(e){return Oe({...e,state:!0,attribute:!1})}
|
|
40
40
|
/**
|
|
41
41
|
* @license
|
|
42
42
|
* Copyright 2017 Google LLC
|
|
43
43
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
44
|
-
*/
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* @license
|
|
47
|
+
* Copyright 2017 Google LLC
|
|
48
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
49
|
+
*/
|
|
50
|
+
function Pe(e,t){return(t,r,n)=>((e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,r),r))(t,r,{get(){return(null==(t=this.renderRoot)?void 0:t.querySelector(e))??null;var t}})}const Ee=b`
|
|
45
51
|
*, *::before, *::after {
|
|
46
52
|
box-sizing: border-box;
|
|
47
53
|
}
|
|
@@ -103,7 +109,7 @@ const _e=e=>(t,r)=>{void 0!==r?r.addInitializer(()=>{customElements.define(e,t)}
|
|
|
103
109
|
display: block;
|
|
104
110
|
max-width: 100%;
|
|
105
111
|
}
|
|
106
|
-
`,
|
|
112
|
+
`,Te=b`
|
|
107
113
|
:host {
|
|
108
114
|
/* ── Typography ───────────────────────────── */
|
|
109
115
|
--sl-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
|
|
@@ -165,7 +171,7 @@ const _e=e=>(t,r)=>{void 0!==r?r.addInitializer(()=>{customElements.define(e,t)}
|
|
|
165
171
|
--sl-sidebar-width: 280px;
|
|
166
172
|
--sl-header-height: 56px;
|
|
167
173
|
}
|
|
168
|
-
`,
|
|
174
|
+
`,Ae=b`
|
|
169
175
|
/* ── Light Theme (default) ────────────────── */
|
|
170
176
|
:host,
|
|
171
177
|
:host([data-theme="light"]),
|
|
@@ -247,13 +253,13 @@ const _e=e=>(t,r)=>{void 0!==r?r.addInitializer(()=>{customElements.define(e,t)}
|
|
|
247
253
|
--sl-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
|
|
248
254
|
--sl-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
|
|
249
255
|
}
|
|
250
|
-
`;var Ae={};function Ce(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}function Ie(e,...t){let r=0;return e.replace(/%[sdj%]/g,e=>{if("%%"===e)return"%";if(r>=t.length)return e;const n=t[r++];if("%s"===e)return String(n);if("%d"===e)return String(Number(n));if("%j"===e)try{return JSON.stringify(n)}catch{return"[Circular]"}return String(n)})}function Re(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,writable:!0,configurable:!0}})}const Ne={inspect:Ce,format:Ie,inherits:Re},Me=i(Object.freeze(Object.defineProperty({__proto__:null,default:Ne,format:Ie,inherits:Re,inspect:Ce},Symbol.toStringTag,{value:"Module"})));var qe;function ze(){if(qe)return Ae;qe=1;const e=Me;Ae.format=e.format,Ae.inherits=e.inherits;Ae.swaggerParamRegExp=/\{([^/}]+)}/g;const t=["get","post","put","delete","patch","options","head","trace"];function r(e,t){if(e.url&&e.url.startsWith("/")){const r=new URL(t),n=r.protocol+"//"+r.hostname+e.url;return e.url=n,e}}return Ae.fixOasRelativeServers=function(e,n){e.openapi&&n&&(n.startsWith("http:")||n.startsWith("https:"))&&(e.servers&&e.servers.map(e=>r(e,n)),["paths","webhooks"].forEach(o=>{Object.keys(e[o]||[]).forEach(s=>{const i=e[o][s];Object.keys(i).forEach(e=>{"servers"===e?i[e].map(e=>r(e,n)):t.includes(e)&&i[e].servers&&i[e].servers.map(e=>r(e,n))})})}))},Ae}const Ue=/\r?\n/,Le=/\bono[ @]/;function De(e,t){let r=He(e.stack),n=t?t.stack:void 0;return r&&n?r+"\n\n"+n:r||n}function Be(e,t,r){r?Object.defineProperty(t,"stack",{get:()=>De({stack:e.get.apply(t)},r),enumerable:!1,configurable:!0}):function(e,t){Object.defineProperty(e,"stack",{get:()=>He(t.get.apply(e)),enumerable:!1,configurable:!0})}(t,e)}function He(e){if(e){let t,r=e.split(Ue);for(let e=0;e<r.length;e++){let n=r[e];if(Le.test(n))void 0===t&&(t=e);else if(void 0!==t){r.splice(t,e-t);break}}if(r.length>0)return r.join("\n")}return e}const Fe=["function","symbol","undefined"],Ve=["constructor","prototype","__proto__"],Je=Object.getPrototypeOf({});function We(){let e={},t=this;for(let r of Ge(t))if("string"==typeof r){let n=t[r],o=typeof n;Fe.includes(o)||(e[r]=n)}return e}function Ge(e,t=[]){let r=[];for(;e&&e!==Je;)r=r.concat(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e)),e=Object.getPrototypeOf(e);let n=new Set(r);for(let o of t.concat(Ve))n.delete(o);return n}const Ke=["name","message","stack"];function Ze(e,t,r){let n=e;return function(e,t){let r=Object.getOwnPropertyDescriptor(e,"stack");!function(e){return Boolean(e&&e.configurable&&"function"==typeof e.get)}(r)?function(e){return Boolean(!e||e.writable||"function"==typeof e.set)}(r)&&(e.stack=De(e,t)):Be(r,e,t)}(n,t),t&&"object"==typeof t&&function(e,t){let r=Ge(t,Ke),n=e,o=t;for(let s of r)if(void 0===n[s])try{n[s]=o[s]}catch(cp){}}(n,t),n.toJSON=We,r&&"object"==typeof r&&Object.assign(n,r),n}const Qe=Ye;function Ye(e,t){function r(...r){let{originalError:n,props:o,message:s}=function(e,t){let r,n,o,s="";return"string"==typeof e[0]?o=e:"string"==typeof e[1]?(e[0]instanceof Error?r=e[0]:n=e[0],o=e.slice(1)):(r=e[0],n=e[1],o=e.slice(2)),o.length>0&&(s=t.format?t.format.apply(void 0,o):o.join(" ")),t.concatMessages&&r&&r.message&&(s+=(s?" \n":"")+r.message),{originalError:r,props:n,message:s}}(r,t);return Ze(new e(s),n,o)}return t=function(e){return{concatMessages:void 0===(e=e||{}).concatMessages||Boolean(e.concatMessages),format:void 0!==e.format&&"function"==typeof e.format&&e.format}}(t),r[Symbol.species]=e,r}Ye.toJSON=function(e){return We.call(e)},Ye.extend=function(e,t,r){return r||t instanceof Error?Ze(e,t,r):t?Ze(e,void 0,t):Ze(e)};const Xe=tt;tt.error=new Qe(Error),tt.eval=new Qe(EvalError),tt.range=new Qe(RangeError),tt.reference=new Qe(ReferenceError),tt.syntax=new Qe(SyntaxError),tt.type=new Qe(TypeError),tt.uri=new Qe(URIError);const et=tt;function tt(...e){let t=e[0];if("object"==typeof t&&"string"==typeof t.name)for(let r of Object.values(et))if("function"==typeof r&&"ono"===r.name){let n=r[Symbol.species];if(n&&n!==Error&&(t instanceof n||t.name===n.name))return r.apply(void 0,e)}return tt.error.apply(void 0,e)}"object"==typeof module&&"object"==typeof module.exports&&(module.exports=Object.assign(module.exports.default,module.exports));const rt=i(Object.freeze(Object.defineProperty({__proto__:null,Ono:Qe,default:Xe,ono:Xe},Symbol.toStringTag,{value:"Module"})));var nt,ot={exports:{}},st={},it={},at={},lt={},ct={},dt={};function pt(){return nt||(nt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e),{})}}function o(e,...t){const r=[e[0]];let o=0;for(;o<t.length;)a(r,t[o]),r.push(e[++o]);return new n(r)}e._Code=n,e.nil=new n(""),e._=o;const s=new n("+");function i(e,...t){const r=[c(e[0])];let o=0;for(;o<t.length;)r.push(s),a(r,t[o]),r.push(s,c(e[++o]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===s){const r=l(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new n(r)}function a(e,t){var o;t instanceof n?e.push(...t._items):t instanceof r?e.push(t):e.push("number"==typeof(o=t)||"boolean"==typeof o||null===o?o:c(Array.isArray(o)?o.join(","):o))}function l(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof r||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof r?void 0:`"${e}${t.slice(1)}`}function c(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.str=i,e.addCodeArg=a,e.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:i`${e}${t}`},e.stringify=function(e){return new n(c(e))},e.safeStringify=c,e.getProperty=function(t){return"string"==typeof t&&e.IDENTIFIER.test(t)?new n(`.${t}`):o`[${t}]`},e.getEsmExportName=function(t){if("string"==typeof t&&e.IDENTIFIER.test(t))return new n(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)},e.regexpCode=function(e){return new n(e.toString())}}(dt)),dt}var ut,ft,ht={};function mt(){return ut||(ut=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=pt();class r extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var n,o;(o=n||(e.UsedValueState=n={}))[o.Started=0]="Started",o[o.Completed=1]="Completed",e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class s{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}e.Scope=s;class i extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=t._`.${new t.Name(r)}[${n}]`}}e.ValueScopeName=i;const a=t._`\n`;e.ValueScope=class extends s{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?a:t.nil}}get(){return this._scope}name(e){return new i(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:o}=n,s=null!==(r=t.key)&&void 0!==r?r:t.ref;let i=this._values[o];if(i){const e=i.get(s);if(e)return e}else i=this._values[o]=new Map;i.set(s,n);const a=this._scope[o]||(this._scope[o]=[]),l=a.length;return a[l]=t.ref,n.setValue(t,{property:o,itemIndex:l}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,r=this._values){return this._reduceValues(r,r=>{if(void 0===r.scopePath)throw new Error(`CodeGen: name "${r}" has no value`);return t._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,r)}_reduceValues(o,s,i={},a){let l=t.nil;for(const c in o){const d=o[c];if(!d)continue;const p=i[c]=i[c]||new Map;d.forEach(o=>{if(p.has(o))return;p.set(o,n.Started);let i=s(o);if(i){const r=this.opts.es5?e.varKinds.var:e.varKinds.const;l=t._`${l}${r} ${o} = ${i};${this.opts._n}`}else{if(!(i=null==a?void 0:a(o)))throw new r(o);l=t._`${l}${i}${this.opts._n}`}p.set(o,n.Completed)})}return l}}}(ht)),ht}function gt(){return ft||(ft=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=pt(),r=mt();var n=pt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var o=mt();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(e,t){return this}}class i extends s{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const n=e?r.varKinds.var:this.varKind,o=void 0===this.rhs?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=E(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=E(this.rhs,e,r),this}get names(){return P(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}}class l extends a{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class c extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class d extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class p extends s{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class u extends s{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=E(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class f extends s{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const o=r[n];o.optimizeNames(e,t)||(T(e,o.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>O(e,t.names),{})}}class h extends f{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class m extends f{}class g extends h{}g.kind="else";class y extends h{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new g(e):e}return t?!1===e?t instanceof y?t:t.nodes:this.nodes.length?this:new y(A(e),t instanceof y?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=E(this.condition,e,t),this}get names(){const e=super.names;return P(e,this.condition),this.else&&O(e,this.else.names),e}}y.kind="if";class v extends h{}v.kind="for";class b extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=E(this.iteration,e,t),this}get names(){return O(super.names,this.iteration.names)}}class $ extends v{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?r.varKinds.var:this.varKind,{name:n,from:o,to:s}=this;return`for(${t} ${n}=${o}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){const e=P(super.names,this.from);return P(e,this.to)}}class x extends v{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=E(this.iterable,e,t),this}get names(){return O(super.names,this.iterable.names)}}class w extends h{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}w.kind="func";class _ extends f{render(e){return"return "+super.render(e)}}_.kind="return";class k extends h{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&O(e,this.catch.names),this.finally&&O(e,this.finally.names),e}}class S extends h{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}S.kind="catch";class j extends h{render(e){return"finally"+super.render(e)}}j.kind="finally";function O(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function P(e,r){return r instanceof t._CodeOrName?O(e,r.names):e}function E(e,r,n){return e instanceof t.Name?s(e):(o=e)instanceof t._Code&&o._items.some(e=>e instanceof t.Name&&1===r[e.str]&&void 0!==n[e.str])?new t._Code(e._items.reduce((e,r)=>(r instanceof t.Name&&(r=s(r)),r instanceof t._Code?e.push(...r._items):e.push(r),e),[])):e;var o;function s(e){const t=n[e.str];return void 0===t||1!==r[e.str]?e:(delete r[e.str],t)}}function T(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function A(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:t._`!${N(e)}`}e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new m]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const o=this._scope.toName(t);return void 0!==r&&n&&(this._constants[o.str]=r),this._leafNode(new i(e,o,r)),o}const(e,t,n){return this._def(r.varKinds.const,e,t,n)}let(e,t,n){return this._def(r.varKinds.let,e,t,n)}var(e,t,n){return this._def(r.varKinds.var,e,t,n)}assign(e,t,r){return this._leafNode(new a(e,t,r))}add(t,r){return this._leafNode(new l(t,e.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new u(e)),this}object(...e){const r=["{"];for(const[n,o]of e)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,t.addCodeArg)(r,o));return r.push("}"),new t._Code(r)}if(e,t,r){if(this._blockNode(new y(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new y(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(y,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new b(e),t)}forRange(e,t,n,o,s=(this.opts.es5?r.varKinds.var:r.varKinds.let)){const i=this._scope.toName(e);return this._for(new $(s,i,t,n),()=>o(i))}forOf(e,n,o,s=r.varKinds.const){const i=this._scope.toName(e);if(this.opts.es5){const e=n instanceof t.Name?n:this.var("_arr",n);return this.forRange("_i",0,t._`${e}.length`,r=>{this.var(i,t._`${e}[${r}]`),o(i)})}return this._for(new x("of",s,i,n),()=>o(i))}forIn(e,n,o,s=(this.opts.es5?r.varKinds.var:r.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,t._`Object.keys(${n})`,o);const i=this._scope.toName(e);return this._for(new x("in",s,i,n),()=>o(i))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new c(e))}break(e){return this._leafNode(new d(e))}return(e){const t=new _;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(_)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new k;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new S(e),t(e)}return r&&(this._currNode=n.finally=new j,this.code(r)),this._endBlockNode(S,j)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,r=t.nil,n,o){return this._blockNode(new w(e,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof y))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},e.not=A;const C=R(e.operators.AND);e.and=function(...e){return e.reduce(C)};const I=R(e.operators.OR);function R(e){return(r,n)=>r===t.nil?n:n===t.nil?r:t._`${N(r)} ${e} ${N(n)}`}function N(e){return e instanceof t.Name?e:t._`(${e})`}e.or=function(...e){return e.reduce(I)}}(ct)),ct}var yt,vt={};function bt(){if(yt)return vt;yt=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.checkStrictMode=vt.getErrorPath=vt.Type=vt.useFunc=vt.setEvaluated=vt.evaluatedPropsToName=vt.mergeEvaluated=vt.eachItem=vt.unescapeJsonPointer=vt.escapeJsonPointer=vt.escapeFragment=vt.unescapeFragment=vt.schemaRefOrVal=vt.schemaHasRulesButRef=vt.schemaHasRules=vt.checkUnknownRules=vt.alwaysValidSchema=vt.toHash=void 0;const e=gt(),t=pt();function r(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const o=n.RULES.keywords;for(const s in t)o[s]||u(e,`unknown keyword: "${s}"`)}function n(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function o(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function s(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function i({mergeNames:t,mergeToName:r,mergeValues:n,resultToName:o}){return(s,i,a,l)=>{const c=void 0===a?i:a instanceof e.Name?(i instanceof e.Name?t(s,i,a):r(s,i,a),a):i instanceof e.Name?(r(s,a,i),i):n(i,a);return l!==e.Name||c instanceof e.Name?c:o(s,c)}}function a(t,r){if(!0===r)return t.var("props",!0);const n=t.var("props",e._`{}`);return void 0!==r&&l(t,n,r),n}function l(t,r,n){Object.keys(n).forEach(n=>t.assign(e._`${r}${(0,e.getProperty)(n)}`,!0))}vt.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},vt.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(r(e,t),!n(t,e.self.RULES.all))},vt.checkUnknownRules=r,vt.schemaHasRules=n,vt.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},vt.schemaRefOrVal=function({topSchemaRef:t,schemaPath:r},n,o,s){if(!s){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return e._`${n}`}return e._`${t}${r}${(0,e.getProperty)(o)}`},vt.unescapeFragment=function(e){return s(decodeURIComponent(e))},vt.escapeFragment=function(e){return encodeURIComponent(o(e))},vt.escapeJsonPointer=o,vt.unescapeJsonPointer=s,vt.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},vt.mergeEvaluated={props:i({mergeNames:(t,r,n)=>t.if(e._`${n} !== true && ${r} !== undefined`,()=>{t.if(e._`${r} === true`,()=>t.assign(n,!0),()=>t.assign(n,e._`${n} || {}`).code(e._`Object.assign(${n}, ${r})`))}),mergeToName:(t,r,n)=>t.if(e._`${n} !== true`,()=>{!0===r?t.assign(n,!0):(t.assign(n,e._`${n} || {}`),l(t,n,r))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:a}),items:i({mergeNames:(t,r,n)=>t.if(e._`${n} !== true && ${r} !== undefined`,()=>t.assign(n,e._`${r} === true ? true : ${n} > ${r} ? ${n} : ${r}`)),mergeToName:(t,r,n)=>t.if(e._`${n} !== true`,()=>t.assign(n,!0===r||e._`${n} > ${r} ? ${n} : ${r}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},vt.evaluatedPropsToName=a,vt.setEvaluated=l;const c={};var d,p;function u(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}return vt.useFunc=function(e,r){return e.scopeValue("func",{ref:r,code:c[r.code]||(c[r.code]=new t._Code(r.code))})},(p=d||(vt.Type=d={}))[p.Num=0]="Num",p[p.Str=1]="Str",vt.getErrorPath=function(t,r,n){if(t instanceof e.Name){const o=r===d.Num;return n?o?e._`"[" + ${t} + "]"`:e._`"['" + ${t} + "']"`:o?e._`"/" + ${t}`:e._`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,e.getProperty)(t).toString():"/"+o(t)},vt.checkStrictMode=u,vt}var $t,xt,wt,_t={};function kt(){if($t)return _t;$t=1,Object.defineProperty(_t,"__esModule",{value:!0});const e=gt(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return _t.default=t,_t}function St(){return xt||(xt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=gt(),r=bt(),n=kt();function o(e,r){const o=e.const("err",r);e.if(t._`${n.default.vErrors} === null`,()=>e.assign(n.default.vErrors,t._`[${o}]`),t._`${n.default.vErrors}.push(${o})`),e.code(t._`${n.default.errors}++`)}function s(e,r){const{gen:n,validateName:o,schemaEnv:s}=e;s.$async?n.throw(t._`new ${e.ValidationError}(${r})`):(n.assign(t._`${o}.errors`,r),n.return(!1))}e.keywordError={message:({keyword:e})=>t.str`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:r})=>r?t.str`"${e}" keyword must be ${r} ($data)`:t.str`"${e}" keyword is invalid ($data)`},e.reportError=function(r,n=e.keywordError,i,l){const{it:c}=r,{gen:d,compositeRule:p,allErrors:u}=c,f=a(r,n,i);(null!=l?l:p||u)?o(d,f):s(c,t._`[${f}]`)},e.reportExtraError=function(t,r=e.keywordError,i){const{it:l}=t,{gen:c,compositeRule:d,allErrors:p}=l;o(c,a(t,r,i)),d||p||s(l,n.default.vErrors)},e.resetErrorsCount=function(e,r){e.assign(n.default.errors,r),e.if(t._`${n.default.vErrors} !== null`,()=>e.if(r,()=>e.assign(t._`${n.default.vErrors}.length`,r),()=>e.assign(n.default.vErrors,null)))},e.extendErrors=function({gen:e,keyword:r,schemaValue:o,data:s,errsCount:i,it:a}){if(void 0===i)throw new Error("ajv implementation error");const l=e.name("err");e.forRange("i",i,n.default.errors,i=>{e.const(l,t._`${n.default.vErrors}[${i}]`),e.if(t._`${l}.instancePath === undefined`,()=>e.assign(t._`${l}.instancePath`,(0,t.strConcat)(n.default.instancePath,a.errorPath))),e.assign(t._`${l}.schemaPath`,t.str`${a.errSchemaPath}/${r}`),a.opts.verbose&&(e.assign(t._`${l}.schema`,o),e.assign(t._`${l}.data`,s))})};const i={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function a(e,r,o){const{createErrors:s}=e.it;return!1===s?t._`{}`:function(e,r,o={}){const{gen:s,it:a}=e,d=[l(a,o),c(e,o)];return function(e,{params:r,message:o},s){const{keyword:a,data:l,schemaValue:c,it:d}=e,{opts:p,propertyName:u,topSchemaRef:f,schemaPath:h}=d;s.push([i.keyword,a],[i.params,"function"==typeof r?r(e):r||t._`{}`]),p.messages&&s.push([i.message,"function"==typeof o?o(e):o]);p.verbose&&s.push([i.schema,c],[i.parentSchema,t._`${f}${h}`],[n.default.data,l]);u&&s.push([i.propertyName,u])}(e,r,d),s.object(...d)}(e,r,o)}function l({errorPath:e},{instancePath:o}){const s=o?t.str`${e}${(0,r.getErrorPath)(o,r.Type.Str)}`:e;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,s)]}function c({keyword:e,it:{errSchemaPath:n}},{schemaPath:o,parentSchema:s}){let a=s?n:t.str`${n}/${e}`;return o&&(a=t.str`${a}${(0,r.getErrorPath)(o,r.Type.Str)}`),[i.schemaPath,a]}}(lt)),lt}function jt(){if(wt)return at;wt=1,Object.defineProperty(at,"__esModule",{value:!0}),at.boolOrEmptySchema=at.topBoolOrEmptySchema=void 0;const e=St(),t=gt(),r=kt(),n={message:"boolean schema is false"};function o(t,r){const{gen:o,data:s}=t,i={gen:o,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,e.reportError)(i,n,void 0,r)}return at.topBoolOrEmptySchema=function(e){const{gen:n,schema:s,validateName:i}=e;!1===s?o(e,!1):"object"==typeof s&&!0===s.$async?n.return(r.default.data):(n.assign(t._`${i}.errors`,null),n.return(!0))},at.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),o(e)):r.var(t,!0)},at}var Ot,Pt={},Et={};function Tt(){if(Ot)return Et;Ot=1,Object.defineProperty(Et,"__esModule",{value:!0}),Et.getRules=Et.isJSONType=void 0;const e=new Set(["string","number","integer","boolean","null","object","array"]);return Et.isJSONType=function(t){return"string"==typeof t&&e.has(t)},Et.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}},Et}var At,Ct,It={};function Rt(){if(At)return It;function e(e,r){return r.rules.some(r=>t(e,r))}function t(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some(t=>void 0!==e[t]))}return At=1,Object.defineProperty(It,"__esModule",{value:!0}),It.shouldUseRule=It.shouldUseGroup=It.schemaHasRulesForType=void 0,It.schemaHasRulesForType=function({schema:t,self:r},n){const o=r.RULES.types[n];return o&&!0!==o&&e(t,o)},It.shouldUseGroup=e,It.shouldUseRule=t,It}function Nt(){if(Ct)return Pt;Ct=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.reportTypeError=Pt.checkDataTypes=Pt.checkDataType=Pt.coerceAndCheckDataType=Pt.getJSONTypes=Pt.getSchemaTypes=Pt.DataType=void 0;const e=Tt(),t=Rt(),r=St(),n=gt(),o=bt();var s,i;function a(t){const r=Array.isArray(t)?t:t?[t]:[];if(r.every(e.isJSONType))return r;throw new Error("type must be JSONType or JSONType[]: "+r.join(","))}(i=s||(Pt.DataType=s={}))[i.Correct=0]="Correct",i[i.Wrong=1]="Wrong",Pt.getSchemaTypes=function(e){const t=a(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},Pt.getJSONTypes=a,Pt.coerceAndCheckDataType=function(e,r){const{gen:o,data:i,opts:a}=e,c=function(e,t){return t?e.filter(e=>l.has(e)||"array"===t&&"array"===e):[]}(r,a.coerceTypes),p=r.length>0&&!(0===c.length&&1===r.length&&(0,t.schemaHasRulesForType)(e,r[0]));if(p){const t=d(r,i,a.strictNumbers,s.Wrong);o.if(t,()=>{c.length?function(e,t,r){const{gen:o,data:s,opts:i}=e,a=o.let("dataType",n._`typeof ${s}`),c=o.let("coerced",n._`undefined`);"array"===i.coerceTypes&&o.if(n._`${a} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,()=>o.assign(s,n._`${s}[0]`).assign(a,n._`typeof ${s}`).if(d(t,s,i.strictNumbers),()=>o.assign(c,s)));o.if(n._`${c} !== undefined`);for(const n of r)(l.has(n)||"array"===n&&"array"===i.coerceTypes)&&p(n);function p(e){switch(e){case"string":return void o.elseIf(n._`${a} == "number" || ${a} == "boolean"`).assign(c,n._`"" + ${s}`).elseIf(n._`${s} === null`).assign(c,n._`""`);case"number":return void o.elseIf(n._`${a} == "boolean" || ${s} === null
|
|
256
|
+
`;var Ce={};function Ie(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}function Re(e,...t){let r=0;return e.replace(/%[sdj%]/g,e=>{if("%%"===e)return"%";if(r>=t.length)return e;const n=t[r++];if("%s"===e)return String(n);if("%d"===e)return String(Number(n));if("%j"===e)try{return JSON.stringify(n)}catch{return"[Circular]"}return String(n)})}function Ne(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,writable:!0,configurable:!0}})}const Me={inspect:Ie,format:Re,inherits:Ne},qe=i(Object.freeze(Object.defineProperty({__proto__:null,default:Me,format:Re,inherits:Ne,inspect:Ie},Symbol.toStringTag,{value:"Module"})));var ze;function Le(){if(ze)return Ce;ze=1;const e=qe;Ce.format=e.format,Ce.inherits=e.inherits;Ce.swaggerParamRegExp=/\{([^/}]+)}/g;const t=["get","post","put","delete","patch","options","head","trace"];function r(e,t){if(e.url&&e.url.startsWith("/")){const r=new URL(t),n=r.protocol+"//"+r.hostname+e.url;return e.url=n,e}}return Ce.fixOasRelativeServers=function(e,n){e.openapi&&n&&(n.startsWith("http:")||n.startsWith("https:"))&&(e.servers&&e.servers.map(e=>r(e,n)),["paths","webhooks"].forEach(o=>{Object.keys(e[o]||[]).forEach(s=>{const i=e[o][s];Object.keys(i).forEach(e=>{"servers"===e?i[e].map(e=>r(e,n)):t.includes(e)&&i[e].servers&&i[e].servers.map(e=>r(e,n))})})}))},Ce}const Ue=/\r?\n/,De=/\bono[ @]/;function Be(e,t){let r=Fe(e.stack),n=t?t.stack:void 0;return r&&n?r+"\n\n"+n:r||n}function He(e,t,r){r?Object.defineProperty(t,"stack",{get:()=>Be({stack:e.get.apply(t)},r),enumerable:!1,configurable:!0}):function(e,t){Object.defineProperty(e,"stack",{get:()=>Fe(t.get.apply(e)),enumerable:!1,configurable:!0})}(t,e)}function Fe(e){if(e){let t,r=e.split(Ue);for(let e=0;e<r.length;e++){let n=r[e];if(De.test(n))void 0===t&&(t=e);else if(void 0!==t){r.splice(t,e-t);break}}if(r.length>0)return r.join("\n")}return e}const Ve=["function","symbol","undefined"],Ge=["constructor","prototype","__proto__"],Je=Object.getPrototypeOf({});function We(){let e={},t=this;for(let r of Ke(t))if("string"==typeof r){let n=t[r],o=typeof n;Ve.includes(o)||(e[r]=n)}return e}function Ke(e,t=[]){let r=[];for(;e&&e!==Je;)r=r.concat(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e)),e=Object.getPrototypeOf(e);let n=new Set(r);for(let o of t.concat(Ge))n.delete(o);return n}const Ze=["name","message","stack"];function Ye(e,t,r){let n=e;return function(e,t){let r=Object.getOwnPropertyDescriptor(e,"stack");!function(e){return Boolean(e&&e.configurable&&"function"==typeof e.get)}(r)?function(e){return Boolean(!e||e.writable||"function"==typeof e.set)}(r)&&(e.stack=Be(e,t)):He(r,e,t)}(n,t),t&&"object"==typeof t&&function(e,t){let r=Ke(t,Ze),n=e,o=t;for(let i of r)if(void 0===n[i])try{n[i]=o[i]}catch(s){}}(n,t),n.toJSON=We,r&&"object"==typeof r&&Object.assign(n,r),n}const Qe=Xe;function Xe(e,t){function r(...r){let{originalError:n,props:o,message:s}=function(e,t){let r,n,o,s="";return"string"==typeof e[0]?o=e:"string"==typeof e[1]?(e[0]instanceof Error?r=e[0]:n=e[0],o=e.slice(1)):(r=e[0],n=e[1],o=e.slice(2)),o.length>0&&(s=t.format?t.format.apply(void 0,o):o.join(" ")),t.concatMessages&&r&&r.message&&(s+=(s?" \n":"")+r.message),{originalError:r,props:n,message:s}}(r,t);return Ye(new e(s),n,o)}return t=function(e){return{concatMessages:void 0===(e=e||{}).concatMessages||Boolean(e.concatMessages),format:void 0!==e.format&&"function"==typeof e.format&&e.format}}(t),r[Symbol.species]=e,r}Xe.toJSON=function(e){return We.call(e)},Xe.extend=function(e,t,r){return r||t instanceof Error?Ye(e,t,r):t?Ye(e,void 0,t):Ye(e)};const et=rt;rt.error=new Qe(Error),rt.eval=new Qe(EvalError),rt.range=new Qe(RangeError),rt.reference=new Qe(ReferenceError),rt.syntax=new Qe(SyntaxError),rt.type=new Qe(TypeError),rt.uri=new Qe(URIError);const tt=rt;function rt(...e){let t=e[0];if("object"==typeof t&&"string"==typeof t.name)for(let r of Object.values(tt))if("function"==typeof r&&"ono"===r.name){let n=r[Symbol.species];if(n&&n!==Error&&(t instanceof n||t.name===n.name))return r.apply(void 0,e)}return rt.error.apply(void 0,e)}"object"==typeof module&&"object"==typeof module.exports&&(module.exports=Object.assign(module.exports.default,module.exports));const nt=i(Object.freeze(Object.defineProperty({__proto__:null,Ono:Qe,default:et,ono:et},Symbol.toStringTag,{value:"Module"})));var ot,st={exports:{}},it={},at={},lt={},ct={},dt={},pt={};function ut(){return ot||(ot=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e),{})}}function o(e,...t){const r=[e[0]];let o=0;for(;o<t.length;)a(r,t[o]),r.push(e[++o]);return new n(r)}e._Code=n,e.nil=new n(""),e._=o;const s=new n("+");function i(e,...t){const r=[c(e[0])];let o=0;for(;o<t.length;)r.push(s),a(r,t[o]),r.push(s,c(e[++o]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===s){const r=l(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new n(r)}function a(e,t){var o;t instanceof n?e.push(...t._items):t instanceof r?e.push(t):e.push("number"==typeof(o=t)||"boolean"==typeof o||null===o?o:c(Array.isArray(o)?o.join(","):o))}function l(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof r||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof r?void 0:`"${e}${t.slice(1)}`}function c(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.str=i,e.addCodeArg=a,e.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:i`${e}${t}`},e.stringify=function(e){return new n(c(e))},e.safeStringify=c,e.getProperty=function(t){return"string"==typeof t&&e.IDENTIFIER.test(t)?new n(`.${t}`):o`[${t}]`},e.getEsmExportName=function(t){if("string"==typeof t&&e.IDENTIFIER.test(t))return new n(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)},e.regexpCode=function(e){return new n(e.toString())}}(pt)),pt}var ht,ft,mt={};function gt(){return ht||(ht=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=ut();class r extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var n,o;(o=n||(e.UsedValueState=n={}))[o.Started=0]="Started",o[o.Completed=1]="Completed",e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class s{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}e.Scope=s;class i extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=t._`.${new t.Name(r)}[${n}]`}}e.ValueScopeName=i;const a=t._`\n`;e.ValueScope=class extends s{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?a:t.nil}}get(){return this._scope}name(e){return new i(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:o}=n,s=null!==(r=t.key)&&void 0!==r?r:t.ref;let i=this._values[o];if(i){const e=i.get(s);if(e)return e}else i=this._values[o]=new Map;i.set(s,n);const a=this._scope[o]||(this._scope[o]=[]),l=a.length;return a[l]=t.ref,n.setValue(t,{property:o,itemIndex:l}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,r=this._values){return this._reduceValues(r,r=>{if(void 0===r.scopePath)throw new Error(`CodeGen: name "${r}" has no value`);return t._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,r)}_reduceValues(o,s,i={},a){let l=t.nil;for(const c in o){const d=o[c];if(!d)continue;const p=i[c]=i[c]||new Map;d.forEach(o=>{if(p.has(o))return;p.set(o,n.Started);let i=s(o);if(i){const r=this.opts.es5?e.varKinds.var:e.varKinds.const;l=t._`${l}${r} ${o} = ${i};${this.opts._n}`}else{if(!(i=null==a?void 0:a(o)))throw new r(o);l=t._`${l}${i}${this.opts._n}`}p.set(o,n.Completed)})}return l}}}(mt)),mt}function yt(){return ft||(ft=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=ut(),r=gt();var n=ut();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var o=gt();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(e,t){return this}}class i extends s{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const n=e?r.varKinds.var:this.varKind,o=void 0===this.rhs?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=E(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=E(this.rhs,e,r),this}get names(){return P(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}}class l extends a{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class c extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class d extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class p extends s{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class u extends s{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=E(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class h extends s{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const o=r[n];o.optimizeNames(e,t)||(T(e,o.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>j(e,t.names),{})}}class f extends h{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class m extends h{}class g extends f{}g.kind="else";class y extends f{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new g(e):e}return t?!1===e?t instanceof y?t:t.nodes:this.nodes.length?this:new y(A(e),t instanceof y?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=E(this.condition,e,t),this}get names(){const e=super.names;return P(e,this.condition),this.else&&j(e,this.else.names),e}}y.kind="if";class v extends f{}v.kind="for";class b extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=E(this.iteration,e,t),this}get names(){return j(super.names,this.iteration.names)}}class $ extends v{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?r.varKinds.var:this.varKind,{name:n,from:o,to:s}=this;return`for(${t} ${n}=${o}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){const e=P(super.names,this.from);return P(e,this.to)}}class x extends v{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=E(this.iterable,e,t),this}get names(){return j(super.names,this.iterable.names)}}class w extends f{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}w.kind="func";class _ extends h{render(e){return"return "+super.render(e)}}_.kind="return";class k extends f{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&j(e,this.catch.names),this.finally&&j(e,this.finally.names),e}}class S extends f{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}S.kind="catch";class O extends f{render(e){return"finally"+super.render(e)}}O.kind="finally";function j(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function P(e,r){return r instanceof t._CodeOrName?j(e,r.names):e}function E(e,r,n){return e instanceof t.Name?s(e):(o=e)instanceof t._Code&&o._items.some(e=>e instanceof t.Name&&1===r[e.str]&&void 0!==n[e.str])?new t._Code(e._items.reduce((e,r)=>(r instanceof t.Name&&(r=s(r)),r instanceof t._Code?e.push(...r._items):e.push(r),e),[])):e;var o;function s(e){const t=n[e.str];return void 0===t||1!==r[e.str]?e:(delete r[e.str],t)}}function T(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function A(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:t._`!${N(e)}`}e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new m]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const o=this._scope.toName(t);return void 0!==r&&n&&(this._constants[o.str]=r),this._leafNode(new i(e,o,r)),o}const(e,t,n){return this._def(r.varKinds.const,e,t,n)}let(e,t,n){return this._def(r.varKinds.let,e,t,n)}var(e,t,n){return this._def(r.varKinds.var,e,t,n)}assign(e,t,r){return this._leafNode(new a(e,t,r))}add(t,r){return this._leafNode(new l(t,e.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new u(e)),this}object(...e){const r=["{"];for(const[n,o]of e)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,t.addCodeArg)(r,o));return r.push("}"),new t._Code(r)}if(e,t,r){if(this._blockNode(new y(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new y(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(y,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new b(e),t)}forRange(e,t,n,o,s=(this.opts.es5?r.varKinds.var:r.varKinds.let)){const i=this._scope.toName(e);return this._for(new $(s,i,t,n),()=>o(i))}forOf(e,n,o,s=r.varKinds.const){const i=this._scope.toName(e);if(this.opts.es5){const e=n instanceof t.Name?n:this.var("_arr",n);return this.forRange("_i",0,t._`${e}.length`,r=>{this.var(i,t._`${e}[${r}]`),o(i)})}return this._for(new x("of",s,i,n),()=>o(i))}forIn(e,n,o,s=(this.opts.es5?r.varKinds.var:r.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,t._`Object.keys(${n})`,o);const i=this._scope.toName(e);return this._for(new x("in",s,i,n),()=>o(i))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new c(e))}break(e){return this._leafNode(new d(e))}return(e){const t=new _;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(_)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new k;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new S(e),t(e)}return r&&(this._currNode=n.finally=new O,this.code(r)),this._endBlockNode(S,O)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,r=t.nil,n,o){return this._blockNode(new w(e,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof y))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},e.not=A;const C=R(e.operators.AND);e.and=function(...e){return e.reduce(C)};const I=R(e.operators.OR);function R(e){return(r,n)=>r===t.nil?n:n===t.nil?r:t._`${N(r)} ${e} ${N(n)}`}function N(e){return e instanceof t.Name?e:t._`(${e})`}e.or=function(...e){return e.reduce(I)}}(dt)),dt}var vt,bt={};function $t(){if(vt)return bt;vt=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.checkStrictMode=bt.getErrorPath=bt.Type=bt.useFunc=bt.setEvaluated=bt.evaluatedPropsToName=bt.mergeEvaluated=bt.eachItem=bt.unescapeJsonPointer=bt.escapeJsonPointer=bt.escapeFragment=bt.unescapeFragment=bt.schemaRefOrVal=bt.schemaHasRulesButRef=bt.schemaHasRules=bt.checkUnknownRules=bt.alwaysValidSchema=bt.toHash=void 0;const e=yt(),t=ut();function r(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const o=n.RULES.keywords;for(const s in t)o[s]||u(e,`unknown keyword: "${s}"`)}function n(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function o(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function s(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function i({mergeNames:t,mergeToName:r,mergeValues:n,resultToName:o}){return(s,i,a,l)=>{const c=void 0===a?i:a instanceof e.Name?(i instanceof e.Name?t(s,i,a):r(s,i,a),a):i instanceof e.Name?(r(s,a,i),i):n(i,a);return l!==e.Name||c instanceof e.Name?c:o(s,c)}}function a(t,r){if(!0===r)return t.var("props",!0);const n=t.var("props",e._`{}`);return void 0!==r&&l(t,n,r),n}function l(t,r,n){Object.keys(n).forEach(n=>t.assign(e._`${r}${(0,e.getProperty)(n)}`,!0))}bt.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},bt.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(r(e,t),!n(t,e.self.RULES.all))},bt.checkUnknownRules=r,bt.schemaHasRules=n,bt.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},bt.schemaRefOrVal=function({topSchemaRef:t,schemaPath:r},n,o,s){if(!s){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return e._`${n}`}return e._`${t}${r}${(0,e.getProperty)(o)}`},bt.unescapeFragment=function(e){return s(decodeURIComponent(e))},bt.escapeFragment=function(e){return encodeURIComponent(o(e))},bt.escapeJsonPointer=o,bt.unescapeJsonPointer=s,bt.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},bt.mergeEvaluated={props:i({mergeNames:(t,r,n)=>t.if(e._`${n} !== true && ${r} !== undefined`,()=>{t.if(e._`${r} === true`,()=>t.assign(n,!0),()=>t.assign(n,e._`${n} || {}`).code(e._`Object.assign(${n}, ${r})`))}),mergeToName:(t,r,n)=>t.if(e._`${n} !== true`,()=>{!0===r?t.assign(n,!0):(t.assign(n,e._`${n} || {}`),l(t,n,r))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:a}),items:i({mergeNames:(t,r,n)=>t.if(e._`${n} !== true && ${r} !== undefined`,()=>t.assign(n,e._`${r} === true ? true : ${n} > ${r} ? ${n} : ${r}`)),mergeToName:(t,r,n)=>t.if(e._`${n} !== true`,()=>t.assign(n,!0===r||e._`${n} > ${r} ? ${n} : ${r}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},bt.evaluatedPropsToName=a,bt.setEvaluated=l;const c={};var d,p;function u(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}return bt.useFunc=function(e,r){return e.scopeValue("func",{ref:r,code:c[r.code]||(c[r.code]=new t._Code(r.code))})},(p=d||(bt.Type=d={}))[p.Num=0]="Num",p[p.Str=1]="Str",bt.getErrorPath=function(t,r,n){if(t instanceof e.Name){const o=r===d.Num;return n?o?e._`"[" + ${t} + "]"`:e._`"['" + ${t} + "']"`:o?e._`"/" + ${t}`:e._`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,e.getProperty)(t).toString():"/"+o(t)},bt.checkStrictMode=u,bt}var xt,wt,_t,kt={};function St(){if(xt)return kt;xt=1,Object.defineProperty(kt,"__esModule",{value:!0});const e=yt(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return kt.default=t,kt}function Ot(){return wt||(wt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=yt(),r=$t(),n=St();function o(e,r){const o=e.const("err",r);e.if(t._`${n.default.vErrors} === null`,()=>e.assign(n.default.vErrors,t._`[${o}]`),t._`${n.default.vErrors}.push(${o})`),e.code(t._`${n.default.errors}++`)}function s(e,r){const{gen:n,validateName:o,schemaEnv:s}=e;s.$async?n.throw(t._`new ${e.ValidationError}(${r})`):(n.assign(t._`${o}.errors`,r),n.return(!1))}e.keywordError={message:({keyword:e})=>t.str`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:r})=>r?t.str`"${e}" keyword must be ${r} ($data)`:t.str`"${e}" keyword is invalid ($data)`},e.reportError=function(r,n=e.keywordError,i,l){const{it:c}=r,{gen:d,compositeRule:p,allErrors:u}=c,h=a(r,n,i);(null!=l?l:p||u)?o(d,h):s(c,t._`[${h}]`)},e.reportExtraError=function(t,r=e.keywordError,i){const{it:l}=t,{gen:c,compositeRule:d,allErrors:p}=l;o(c,a(t,r,i)),d||p||s(l,n.default.vErrors)},e.resetErrorsCount=function(e,r){e.assign(n.default.errors,r),e.if(t._`${n.default.vErrors} !== null`,()=>e.if(r,()=>e.assign(t._`${n.default.vErrors}.length`,r),()=>e.assign(n.default.vErrors,null)))},e.extendErrors=function({gen:e,keyword:r,schemaValue:o,data:s,errsCount:i,it:a}){if(void 0===i)throw new Error("ajv implementation error");const l=e.name("err");e.forRange("i",i,n.default.errors,i=>{e.const(l,t._`${n.default.vErrors}[${i}]`),e.if(t._`${l}.instancePath === undefined`,()=>e.assign(t._`${l}.instancePath`,(0,t.strConcat)(n.default.instancePath,a.errorPath))),e.assign(t._`${l}.schemaPath`,t.str`${a.errSchemaPath}/${r}`),a.opts.verbose&&(e.assign(t._`${l}.schema`,o),e.assign(t._`${l}.data`,s))})};const i={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function a(e,r,o){const{createErrors:s}=e.it;return!1===s?t._`{}`:function(e,r,o={}){const{gen:s,it:a}=e,d=[l(a,o),c(e,o)];return function(e,{params:r,message:o},s){const{keyword:a,data:l,schemaValue:c,it:d}=e,{opts:p,propertyName:u,topSchemaRef:h,schemaPath:f}=d;s.push([i.keyword,a],[i.params,"function"==typeof r?r(e):r||t._`{}`]),p.messages&&s.push([i.message,"function"==typeof o?o(e):o]);p.verbose&&s.push([i.schema,c],[i.parentSchema,t._`${h}${f}`],[n.default.data,l]);u&&s.push([i.propertyName,u])}(e,r,d),s.object(...d)}(e,r,o)}function l({errorPath:e},{instancePath:o}){const s=o?t.str`${e}${(0,r.getErrorPath)(o,r.Type.Str)}`:e;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,s)]}function c({keyword:e,it:{errSchemaPath:n}},{schemaPath:o,parentSchema:s}){let a=s?n:t.str`${n}/${e}`;return o&&(a=t.str`${a}${(0,r.getErrorPath)(o,r.Type.Str)}`),[i.schemaPath,a]}}(ct)),ct}function jt(){if(_t)return lt;_t=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.boolOrEmptySchema=lt.topBoolOrEmptySchema=void 0;const e=Ot(),t=yt(),r=St(),n={message:"boolean schema is false"};function o(t,r){const{gen:o,data:s}=t,i={gen:o,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,e.reportError)(i,n,void 0,r)}return lt.topBoolOrEmptySchema=function(e){const{gen:n,schema:s,validateName:i}=e;!1===s?o(e,!1):"object"==typeof s&&!0===s.$async?n.return(r.default.data):(n.assign(t._`${i}.errors`,null),n.return(!0))},lt.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),o(e)):r.var(t,!0)},lt}var Pt,Et={},Tt={};function At(){if(Pt)return Tt;Pt=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.getRules=Tt.isJSONType=void 0;const e=new Set(["string","number","integer","boolean","null","object","array"]);return Tt.isJSONType=function(t){return"string"==typeof t&&e.has(t)},Tt.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}},Tt}var Ct,It,Rt={};function Nt(){if(Ct)return Rt;function e(e,r){return r.rules.some(r=>t(e,r))}function t(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some(t=>void 0!==e[t]))}return Ct=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.shouldUseRule=Rt.shouldUseGroup=Rt.schemaHasRulesForType=void 0,Rt.schemaHasRulesForType=function({schema:t,self:r},n){const o=r.RULES.types[n];return o&&!0!==o&&e(t,o)},Rt.shouldUseGroup=e,Rt.shouldUseRule=t,Rt}function Mt(){if(It)return Et;It=1,Object.defineProperty(Et,"__esModule",{value:!0}),Et.reportTypeError=Et.checkDataTypes=Et.checkDataType=Et.coerceAndCheckDataType=Et.getJSONTypes=Et.getSchemaTypes=Et.DataType=void 0;const e=At(),t=Nt(),r=Ot(),n=yt(),o=$t();var s,i;function a(t){const r=Array.isArray(t)?t:t?[t]:[];if(r.every(e.isJSONType))return r;throw new Error("type must be JSONType or JSONType[]: "+r.join(","))}(i=s||(Et.DataType=s={}))[i.Correct=0]="Correct",i[i.Wrong=1]="Wrong",Et.getSchemaTypes=function(e){const t=a(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},Et.getJSONTypes=a,Et.coerceAndCheckDataType=function(e,r){const{gen:o,data:i,opts:a}=e,c=function(e,t){return t?e.filter(e=>l.has(e)||"array"===t&&"array"===e):[]}(r,a.coerceTypes),p=r.length>0&&!(0===c.length&&1===r.length&&(0,t.schemaHasRulesForType)(e,r[0]));if(p){const t=d(r,i,a.strictNumbers,s.Wrong);o.if(t,()=>{c.length?function(e,t,r){const{gen:o,data:s,opts:i}=e,a=o.let("dataType",n._`typeof ${s}`),c=o.let("coerced",n._`undefined`);"array"===i.coerceTypes&&o.if(n._`${a} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,()=>o.assign(s,n._`${s}[0]`).assign(a,n._`typeof ${s}`).if(d(t,s,i.strictNumbers),()=>o.assign(c,s)));o.if(n._`${c} !== undefined`);for(const n of r)(l.has(n)||"array"===n&&"array"===i.coerceTypes)&&p(n);function p(e){switch(e){case"string":return void o.elseIf(n._`${a} == "number" || ${a} == "boolean"`).assign(c,n._`"" + ${s}`).elseIf(n._`${s} === null`).assign(c,n._`""`);case"number":return void o.elseIf(n._`${a} == "boolean" || ${s} === null
|
|
251
257
|
|| (${a} == "string" && ${s} && ${s} == +${s})`).assign(c,n._`+${s}`);case"integer":return void o.elseIf(n._`${a} === "boolean" || ${s} === null
|
|
252
258
|
|| (${a} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(c,n._`+${s}`);case"boolean":return void o.elseIf(n._`${s} === "false" || ${s} === 0 || ${s} === null`).assign(c,!1).elseIf(n._`${s} === "true" || ${s} === 1`).assign(c,!0);case"null":return o.elseIf(n._`${s} === "" || ${s} === 0 || ${s} === false`),void o.assign(c,null);case"array":o.elseIf(n._`${a} === "string" || ${a} === "number"
|
|
253
|
-
|| ${a} === "boolean" || ${s} === null`).assign(c,n._`[${s}]`)}}o.else(),u(e),o.endIf(),o.if(n._`${c} !== undefined`,()=>{o.assign(s,c),function({gen:e,parentData:t,parentDataProperty:r},o){e.if(n._`${t} !== undefined`,()=>e.assign(n._`${t}[${r}]`,o))}(e,c)})}(e,r,c):u(e)})}return p};const l=new Set(["string","number","integer","boolean","null"]);function c(e,t,r,o=s.Correct){const i=o===s.Correct?n.operators.EQ:n.operators.NEQ;let a;switch(e){case"null":return n._`${t} ${i} null`;case"array":a=n._`Array.isArray(${t})`;break;case"object":a=n._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":a=l(n._`!(${t} % 1) && !isNaN(${t})`);break;case"number":a=l();break;default:return n._`typeof ${t} ${i} ${e}`}return o===s.Correct?a:(0,n.not)(a);function l(e=n.nil){return(0,n.and)(n._`typeof ${t} == "number"`,e,r?n._`isFinite(${t})`:n.nil)}}function d(e,t,r,s){if(1===e.length)return c(e[0],t,r,s);let i;const a=(0,o.toHash)(e);if(a.array&&a.object){const e=n._`typeof ${t} != "object"`;i=a.null?e:n._`!${t} || ${e}`,delete a.null,delete a.array,delete a.object}else i=n.nil;a.number&&delete a.integer;for(const o in a)i=(0,n.and)(i,c(o,t,r,s));return i}Pt.checkDataType=c,Pt.checkDataTypes=d;const p={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?n._`{type: ${e}}`:n._`{type: ${t}}`};function u(e){const t=function(e){const{gen:t,data:r,schema:n}=e,s=(0,o.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:s,schemaValue:s,parentSchema:n,params:{},it:e}}(e);(0,r.reportError)(t,p)}return Pt.reportTypeError=u,Pt}var Mt,qt={};function zt(){if(Mt)return qt;Mt=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.assignDefaults=void 0;const e=gt(),t=bt();function r(r,n,o){const{gen:s,compositeRule:i,data:a,opts:l}=r;if(void 0===o)return;const c=e._`${a}${(0,e.getProperty)(n)}`;if(i)return void(0,t.checkStrictMode)(r,`default is ignored for: ${c}`);let d=e._`${c} === undefined`;"empty"===l.useDefaults&&(d=e._`${d} || ${c} === null || ${c} === ""`),s.if(d,e._`${c} = ${(0,e.stringify)(o)}`)}return qt.assignDefaults=function(e,t){const{properties:n,items:o}=e.schema;if("object"===t&&n)for(const s in n)r(e,s,n[s].default);else"array"===t&&Array.isArray(o)&&o.forEach((t,n)=>r(e,n,t.default))},qt}var Ut,Lt,Dt={},Bt={};function Ht(){if(Ut)return Bt;Ut=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.validateUnion=Bt.validateArray=Bt.usePattern=Bt.callValidateCode=Bt.schemaProperties=Bt.allSchemaProperties=Bt.noPropertyInData=Bt.propertyInData=Bt.isOwnProperty=Bt.hasPropFunc=Bt.reportMissingProp=Bt.checkMissingProp=Bt.checkReportMissingProp=void 0;const e=gt(),t=bt(),r=kt(),n=bt();function o(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:e._`Object.prototype.hasOwnProperty`})}function s(t,r,n){return e._`${o(t)}.call(${r}, ${n})`}function i(t,r,n,o){const i=e._`${r}${(0,e.getProperty)(n)} === undefined`;return o?(0,e.or)(i,(0,e.not)(s(t,r,n))):i}function a(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}Bt.checkReportMissingProp=function(t,r){const{gen:n,data:o,it:s}=t;n.if(i(n,o,r,s.opts.ownProperties),()=>{t.setParams({missingProperty:e._`${r}`},!0),t.error()})},Bt.checkMissingProp=function({gen:t,data:r,it:{opts:n}},o,s){return(0,e.or)(...o.map(o=>(0,e.and)(i(t,r,o,n.ownProperties),e._`${s} = ${o}`)))},Bt.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},Bt.hasPropFunc=o,Bt.isOwnProperty=s,Bt.propertyInData=function(t,r,n,o){const i=e._`${r}${(0,e.getProperty)(n)} !== undefined`;return o?e._`${i} && ${s(t,r,n)}`:i},Bt.noPropertyInData=i,Bt.allSchemaProperties=a,Bt.schemaProperties=function(e,r){return a(r).filter(n=>!(0,t.alwaysValidSchema)(e,r[n]))},Bt.callValidateCode=function({schemaCode:t,data:n,it:{gen:o,topSchemaRef:s,schemaPath:i,errorPath:a},it:l},c,d,p){const u=p?e._`${t}, ${n}, ${s}${i}`:n,f=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,a)],[r.default.parentData,l.parentData],[r.default.parentDataProperty,l.parentDataProperty],[r.default.rootData,r.default.rootData]];l.opts.dynamicRef&&f.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const h=e._`${u}, ${o.object(...f)}`;return d!==e.nil?e._`${c}.call(${d}, ${h})`:e._`${c}(${h})`};const l=e._`new RegExp`;return Bt.usePattern=function({gen:t,it:{opts:r}},o){const s=r.unicodeRegExp?"u":"",{regExp:i}=r.code,a=i(o,s);return t.scopeValue("pattern",{key:a.toString(),ref:a,code:e._`${"new RegExp"===i.code?l:(0,n.useFunc)(t,i)}(${o}, ${s})`})},Bt.validateArray=function(r){const{gen:n,data:o,keyword:s,it:i}=r,a=n.name("valid");if(i.allErrors){const e=n.let("valid",!0);return l(()=>n.assign(e,!1)),e}return n.var(a,!0),l(()=>n.break()),a;function l(i){const l=n.const("len",e._`${o}.length`);n.forRange("i",0,l,o=>{r.subschema({keyword:s,dataProp:o,dataPropType:t.Type.Num},a),n.if((0,e.not)(a),i)})}},Bt.validateUnion=function(r){const{gen:n,schema:o,keyword:s,it:i}=r;if(!Array.isArray(o))throw new Error("ajv implementation error");if(o.some(e=>(0,t.alwaysValidSchema)(i,e))&&!i.opts.unevaluated)return;const a=n.let("valid",!1),l=n.name("_valid");n.block(()=>o.forEach((t,o)=>{const i=r.subschema({keyword:s,schemaProp:o,compositeRule:!0},l);n.assign(a,e._`${a} || ${l}`);r.mergeValidEvaluated(i,l)||n.if((0,e.not)(a))})),r.result(a,()=>r.reset(),()=>r.error(!0))},Bt}function Ft(){if(Lt)return Dt;Lt=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.validateKeywordUsage=Dt.validSchemaType=Dt.funcKeywordCode=Dt.macroKeywordCode=void 0;const e=gt(),t=kt(),r=Ht(),n=St();function o(t){const{gen:r,data:n,it:o}=t;r.if(o.parentData,()=>r.assign(n,e._`${o.parentData}[${o.parentDataProperty}]`))}function s(t,r,n){if(void 0===n)throw new Error(`keyword "${r}" failed to compile`);return t.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:(0,e.stringify)(n)})}return Dt.macroKeywordCode=function(t,r){const{gen:n,keyword:o,schema:i,parentSchema:a,it:l}=t,c=r.macro.call(l.self,i,a,l),d=s(n,o,c);!1!==l.opts.validateSchema&&l.self.validateSchema(c,!0);const p=n.name("valid");t.subschema({schema:c,schemaPath:e.nil,errSchemaPath:`${l.errSchemaPath}/${o}`,topSchemaRef:d,compositeRule:!0},p),t.pass(p,()=>t.error(!0))},Dt.funcKeywordCode=function(i,a){var l;const{gen:c,keyword:d,schema:p,parentSchema:u,$data:f,it:h}=i;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,a);const m=!f&&a.compile?a.compile.call(h.self,p,u,h):a.validate,g=s(c,d,m),y=c.let("valid");function v(n=(a.async?e._`await `:e.nil)){const o=h.opts.passContext?t.default.this:t.default.self,s=!("compile"in a&&!f||!1===a.schema);c.assign(y,e._`${n}${(0,r.callValidateCode)(i,g,o,s)}`,a.modifying)}function b(t){var r;c.if((0,e.not)(null!==(r=a.valid)&&void 0!==r?r:y),t)}i.block$data(y,function(){if(!1===a.errors)v(),a.modifying&&o(i),b(()=>i.error());else{const r=a.async?function(){const t=c.let("ruleErrs",null);return c.try(()=>v(e._`await `),r=>c.assign(y,!1).if(e._`${r} instanceof ${h.ValidationError}`,()=>c.assign(t,e._`${r}.errors`),()=>c.throw(r))),t}():function(){const t=e._`${g}.errors`;return c.assign(t,null),v(e.nil),t}();a.modifying&&o(i),b(()=>function(r,o){const{gen:s}=r;s.if(e._`Array.isArray(${o})`,()=>{s.assign(t.default.vErrors,e._`${t.default.vErrors} === null ? ${o} : ${t.default.vErrors}.concat(${o})`).assign(t.default.errors,e._`${t.default.vErrors}.length`),(0,n.extendErrors)(r)},()=>r.error())}(i,r))}}),i.ok(null!==(l=a.valid)&&void 0!==l?l:y)},Dt.validSchemaType=function(e,t,r=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e)},Dt.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw new Error("ajv implementation error");const i=o.dependencies;if(null==i?void 0:i.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(o.validateSchema){if(!o.validateSchema(e[s])){const e=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},Dt}var Vt,Jt={};function Wt(){if(Vt)return Jt;Vt=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.extendSubschemaMode=Jt.extendSubschemaData=Jt.getSubschema=void 0;const e=gt(),t=bt();return Jt.getSubschema=function(r,{keyword:n,schemaProp:o,schema:s,schemaPath:i,errSchemaPath:a,topSchemaRef:l}){if(void 0!==n&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==n){const s=r.schema[n];return void 0===o?{schema:s,schemaPath:e._`${r.schemaPath}${(0,e.getProperty)(n)}`,errSchemaPath:`${r.errSchemaPath}/${n}`}:{schema:s[o],schemaPath:e._`${r.schemaPath}${(0,e.getProperty)(n)}${(0,e.getProperty)(o)}`,errSchemaPath:`${r.errSchemaPath}/${n}/${(0,t.escapeFragment)(o)}`}}if(void 0!==s){if(void 0===i||void 0===a||void 0===l)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:i,topSchemaRef:l,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},Jt.extendSubschemaData=function(r,n,{dataProp:o,dataPropType:s,data:i,dataTypes:a,propertyName:l}){if(void 0!==i&&void 0!==o)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=n;if(void 0!==o){const{errorPath:i,dataPathArr:a,opts:l}=n;d(c.let("data",e._`${n.data}${(0,e.getProperty)(o)}`,!0)),r.errorPath=e.str`${i}${(0,t.getErrorPath)(o,s,l.jsPropertySyntax)}`,r.parentDataProperty=e._`${o}`,r.dataPathArr=[...a,r.parentDataProperty]}if(void 0!==i){d(i instanceof e.Name?i:c.let("data",i,!0)),void 0!==l&&(r.propertyName=l)}function d(e){r.data=e,r.dataLevel=n.dataLevel+1,r.dataTypes=[],n.definedProperties=new Set,r.parentData=n.data,r.dataNames=[...n.dataNames,e]}a&&(r.dataTypes=a)},Jt.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:s}){void 0!==n&&(e.compositeRule=n),void 0!==o&&(e.createErrors=o),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r},Jt}var Gt,Kt,Zt={};function Qt(){return Kt?Gt:(Kt=1,Gt=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!==o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(s=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!==o--;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;0!==o--;){var i=s[o];if(!e(t[i],r[i]))return!1}return!0}return t!=t&&r!=r})}var Yt,Xt,er,tr={exports:{}};function rr(){if(Yt)return tr.exports;Yt=1;var e=tr.exports=function(e,r,n){"function"==typeof r&&(n=r,r={}),t(r,"function"==typeof(n=r.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function t(n,o,s,i,a,l,c,d,p,u){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var f in o(i,a,l,c,d,p,u),i){var h=i[f];if(Array.isArray(h)){if(f in e.arrayKeywords)for(var m=0;m<h.length;m++)t(n,o,s,h[m],a+"/"+f+"/"+m,l,a,f,i,m)}else if(f in e.propsKeywords){if(h&&"object"==typeof h)for(var g in h)t(n,o,s,h[g],a+"/"+f+"/"+r(g),l,a,f,i,g)}else(f in e.keywords||n.allKeys&&!(f in e.skipKeywords))&&t(n,o,s,h,a+"/"+f,l,a,f,i)}s(i,a,l,c,d,p,u)}}function r(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}return e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},tr.exports}function nr(){if(Xt)return Zt;Xt=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.getSchemaRefs=Zt.resolveUrl=Zt.normalizeId=Zt._getFullPath=Zt.getFullPath=Zt.inlineRef=void 0;const e=bt(),t=Qt(),r=rr(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);Zt.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!s(e):!!t&&i(e)<=t)};const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(e){for(const t in e){if(o.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(s))return!0;if("object"==typeof r&&s(r))return!0}return!1}function i(t){let r=0;for(const o in t){if("$ref"===o)return 1/0;if(r++,!n.has(o)&&("object"==typeof t[o]&&(0,e.eachItem)(t[o],e=>r+=i(e)),r===1/0))return 1/0}return r}function a(e,t="",r){!1!==r&&(t=d(t));const n=e.parse(t);return l(e,n)}function l(e,t){return e.serialize(t).split("#")[0]+"#"}Zt.getFullPath=a,Zt._getFullPath=l;const c=/#\/?$/;function d(e){return e?e.replace(c,""):""}Zt.normalizeId=d,Zt.resolveUrl=function(e,t,r){return r=d(r),e.resolve(t,r)};const p=/^[a-z_][-a-z0-9._]*$/i;return Zt.getSchemaRefs=function(e,n){if("boolean"==typeof e)return{};const{schemaId:o,uriResolver:s}=this.opts,i=d(e[o]||n),l={"":i},c=a(s,i,!1),u={},f=new Set;return r(e,{allKeys:!0},(e,t,r,n)=>{if(void 0===n)return;const s=c+t;let i=l[n];function a(t){const r=this.opts.uriResolver.resolve;if(t=d(i?r(i,t):t),f.has(t))throw m(t);f.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?h(e,n.schema,t):t!==d(s)&&("#"===t[0]?(h(e,u[t],t),u[t]=e):this.refs[t]=s),t}function g(e){if("string"==typeof e){if(!p.test(e))throw new Error(`invalid anchor "${e}"`);a.call(this,`#${e}`)}}"string"==typeof e[o]&&(i=a.call(this,e[o])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),l[t]=i}),u;function h(e,r,n){if(void 0!==r&&!t(e,r))throw m(n)}function m(e){return new Error(`reference "${e}" resolves to more than one schema`)}},Zt}function or(){if(er)return it;er=1,Object.defineProperty(it,"__esModule",{value:!0}),it.getData=it.KeywordCxt=it.validateFunctionCode=void 0;const e=jt(),t=Nt(),r=Rt(),n=Nt(),o=zt(),s=Ft(),i=Wt(),a=gt(),l=kt(),c=nr(),d=bt(),p=St();function u({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},s){o.code.es5?e.func(t,a._`${l.default.data}, ${l.default.valCxt}`,n.$async,()=>{e.code(a._`"use strict"; ${f(r,o)}`),function(e,t){e.if(l.default.valCxt,()=>{e.var(l.default.instancePath,a._`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,a._`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,a._`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,a._`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,a._`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{e.var(l.default.instancePath,a._`""`),e.var(l.default.parentData,a._`undefined`),e.var(l.default.parentDataProperty,a._`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,a._`{}`)})}(e,o),e.code(s)}):e.func(t,a._`${l.default.data}, ${function(e){return a._`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?a._`, ${l.default.dynamicAnchors}={}`:a.nil}}={}`}(o)}`,n.$async,()=>e.code(f(r,o)).code(s))}function f(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?a._`/*# sourceURL=${r} */`:a.nil}function h(t,r){g(t)&&(y(t),m(t))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&b(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,c.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const s=n.const("_errs",l.default.errors);v(e,s),n.var(t,a._`${s} === ${l.default.errors}`)}(t,r):(0,e.boolOrEmptySchema)(t,r)}function m({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function g(e){return"boolean"!=typeof e.schema}function y(e){(0,d.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function v(e,r){if(e.opts.jtd)return $(e,[],!1,r);const n=(0,t.getSchemaTypes)(e.schema);$(e,n,!(0,t.coerceAndCheckDataType)(e,n),r)}function b({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){const s=r.$comment;if(!0===o.$comment)e.code(a._`${l.default.self}.logger.log(${s})`);else if("function"==typeof o.$comment){const r=a.str`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(a._`${l.default.self}.opts.$comment(${s}, ${r}, ${o}.schema)`)}}function $(e,t,o,s){const{gen:i,schema:c,data:p,allErrors:u,opts:f,self:h}=e,{RULES:m}=h;function g(d){(0,r.shouldUseGroup)(c,d)&&(d.type?(i.if((0,n.checkDataType)(d.type,p,f.strictNumbers)),x(e,d),1===t.length&&t[0]===d.type&&o&&(i.else(),(0,n.reportTypeError)(e)),i.endIf()):x(e,d),u||i.if(a._`${l.default.errors} === ${s||0}`))}!c.$ref||!f.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(c,m)?(f.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach(t=>{_(e.dataTypes,t)||k(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function(e,t){const r=[];for(const n of e.dataTypes)_(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&k(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const n=e.self.RULES.all;for(const o in n){const s=n[o];if("object"==typeof s&&(0,r.shouldUseRule)(e.schema,s)){const{type:r}=s.definition;r.length&&!r.some(e=>w(t,e))&&k(e,`missing type "${r.join(",")}" for keyword "${o}"`)}}}(e,e.dataTypes)}(e,t),i.block(()=>{for(const e of m.rules)g(e);g(m.post)})):i.block(()=>j(e,"$ref",m.all.$ref.definition))}function x(e,t){const{gen:n,schema:s,opts:{useDefaults:i}}=e;i&&(0,o.assignDefaults)(e,t.type),n.block(()=>{for(const n of t.rules)(0,r.shouldUseRule)(s,n)&&j(e,n.keyword,n.definition,t.type)})}function w(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function _(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function k(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}it.validateFunctionCode=function(t){g(t)&&(y(t),m(t))?function(e){const{schema:t,opts:r,gen:n}=e;u(e,()=>{r.$comment&&t.$comment&&b(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,d.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(l.default.vErrors,null),n.let(l.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",a._`${r}.evaluated`),t.if(a._`${e.evaluated}.dynamicProps`,()=>t.assign(a._`${e.evaluated}.props`,a._`undefined`)),t.if(a._`${e.evaluated}.dynamicItems`,()=>t.assign(a._`${e.evaluated}.items`,a._`undefined`))}(e),v(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:s}=e;r.$async?t.if(a._`${l.default.errors} === 0`,()=>t.return(l.default.data),()=>t.throw(a._`new ${o}(${l.default.vErrors})`)):(t.assign(a._`${n}.errors`,l.default.vErrors),s.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof a.Name&&e.assign(a._`${t}.props`,r);n instanceof a.Name&&e.assign(a._`${t}.items`,n)}(e),t.return(a._`${l.default.errors} === 0`))}(e)})}(t):u(t,()=>(0,e.topBoolOrEmptySchema)(t))};class S{constructor(e,t,r){if((0,s.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",E(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",l.default.errors))}result(e,t,r){this.failResult((0,a.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,a.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(a._`${t} !== undefined && (${(0,a.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?p.reportExtraError:p.reportError)(this,this.def.error,t)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=a.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=a.nil,t=a.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:o,def:s}=this;r.if((0,a.or)(a._`${n} === undefined`,t)),e!==a.nil&&r.assign(e,!0),(o.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==a.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:o,it:s}=this;return(0,a.or)(function(){if(r.length){if(!(t instanceof a.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return a._`${(0,n.checkDataTypes)(e,t,s.opts.strictNumbers,n.DataType.Wrong)}`}return a.nil}(),function(){if(o.validateSchema){const r=e.scopeValue("validate$data",{ref:o.validateSchema});return a._`!${r}(${t})`}return a.nil}())}subschema(e,t){const r=(0,i.getSubschema)(this.it,e);(0,i.extendSubschemaData)(r,this.it,e),(0,i.extendSubschemaMode)(r,e);const n={...this.it,...r,items:void 0,props:void 0};return h(n,t),n}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=d.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=d.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,()=>this.mergeEvaluated(e,a.Name)),!0}}function j(e,t,r,n){const o=new S(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,s.funcKeywordCode)(o,r):"macro"in r?(0,s.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,s.funcKeywordCode)(o,r)}it.KeywordCxt=S;const O=/^\/(?:[^~]|~0|~1)*$/,P=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function E(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,s;if(""===e)return l.default.rootData;if("/"===e[0]){if(!O.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,s=l.default.rootData}else{const i=P.exec(e);if(!i)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+i[1];if(o=i[2],"#"===o){if(a>=t)throw new Error(p("property/index",a));return n[t-a]}if(a>t)throw new Error(p("data",a));if(s=r[t-a],!o)return s}let i=s;const c=o.split("/");for(const l of c)l&&(s=a._`${s}${(0,a.getProperty)((0,d.unescapeJsonPointer)(l))}`,i=a._`${i} && ${s}`);return i;function p(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}return it.getData=E,it}var sr,ir={};function ar(){if(sr)return ir;sr=1,Object.defineProperty(ir,"__esModule",{value:!0});class e extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}return ir.default=e,ir}var lr,cr={};function dr(){if(lr)return cr;lr=1,Object.defineProperty(cr,"__esModule",{value:!0});const e=nr();class t extends Error{constructor(t,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,e.resolveUrl)(t,r,n),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(t,this.missingRef))}}return cr.default=t,cr}var pr,ur={};function fr(){if(pr)return ur;pr=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.resolveSchema=ur.getCompilingSchema=ur.resolveRef=ur.compileSchema=ur.SchemaEnv=void 0;const e=gt(),t=ar(),r=kt(),n=nr(),o=bt(),s=or();class i{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,n.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function a(o){const i=c.call(this,o);if(i)return i;const a=(0,n.getFullPath)(this.opts.uriResolver,o.root.baseId),{es5:l,lines:d}=this.opts.code,{ownProperties:p}=this.opts,u=new e.CodeGen(this.scope,{es5:l,lines:d,ownProperties:p});let f;o.$async&&(f=u.scopeValue("Error",{ref:t.default,code:e._`require("ajv/dist/runtime/validation_error").default`}));const h=u.scopeName("validate");o.validateName=h;const m={gen:u,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:u.scopeValue("schema",!0===this.opts.code.source?{ref:o.schema,code:(0,e.stringify)(o.schema)}:{ref:o.schema}),validateName:h,ValidationError:f,schema:o.schema,schemaEnv:o,rootId:a,baseId:o.baseId||a,schemaPath:e.nil,errSchemaPath:o.schemaPath||(this.opts.jtd?"":"#"),errorPath:e._`""`,opts:this.opts,self:this};let g;try{this._compilations.add(o),(0,s.validateFunctionCode)(m),u.optimize(this.opts.code.optimize);const t=u.toString();g=`${u.scopeRefs(r.default.scope)}return ${t}`,this.opts.code.process&&(g=this.opts.code.process(g,o));const n=new Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(h,{ref:n}),n.errors=null,n.schema=o.schema,n.schemaEnv=o,o.$async&&(n.$async=!0),!0===this.opts.code.source&&(n.source={validateName:h,validateCode:t,scopeValues:u._values}),this.opts.unevaluated){const{props:t,items:r}=m;n.evaluated={props:t instanceof e.Name?void 0:t,items:r instanceof e.Name?void 0:r,dynamicProps:t instanceof e.Name,dynamicItems:r instanceof e.Name},n.source&&(n.source.evaluated=(0,e.stringify)(n.evaluated))}return o.validate=n,o}catch(cp){throw delete o.validate,delete o.validateName,g&&this.logger.error("Error compiling schema, function code:",g),cp}finally{this._compilations.delete(o)}}function l(e){return(0,n.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:a.call(this,e)}function c(e){for(const t of this._compilations)if(d(t,e))return t}function d(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function p(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||u.call(this,e,t)}function u(e,t){const r=this.opts.uriResolver.parse(t),o=(0,n._getFullPath)(this.opts.uriResolver,r);let s=(0,n.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===s)return h.call(this,r,e);const l=(0,n.normalizeId)(o),c=this.refs[l]||this.schemas[l];if("string"==typeof c){const t=u.call(this,e,c);if("object"!=typeof(null==t?void 0:t.schema))return;return h.call(this,r,t)}if("object"==typeof(null==c?void 0:c.schema)){if(c.validate||a.call(this,c),l===(0,n.normalizeId)(t)){const{schema:t}=c,{schemaId:r}=this.opts,o=t[r];return o&&(s=(0,n.resolveUrl)(this.opts.uriResolver,s,o)),new i({schema:t,schemaId:r,root:e,baseId:s})}return h.call(this,r,c)}}ur.SchemaEnv=i,ur.compileSchema=a,ur.resolveRef=function(e,t,r){var o;r=(0,n.resolveUrl)(this.opts.uriResolver,t,r);const s=e.refs[r];if(s)return s;let a=p.call(this,e,r);if(void 0===a){const n=null===(o=e.localRefs)||void 0===o?void 0:o[r],{schemaId:s}=this.opts;n&&(a=new i({schema:n,schemaId:s,root:e,baseId:t}))}return void 0!==a?e.refs[r]=l.call(this,a):void 0},ur.getCompilingSchema=c,ur.resolveSchema=u;const f=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function h(e,{baseId:t,schema:r,root:s}){var a;if("/"!==(null===(a=e.fragment)||void 0===a?void 0:a[0]))return;for(const i of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,o.unescapeFragment)(i)];if(void 0===e)return;const s="object"==typeof(r=e)&&r[this.opts.schemaId];!f.has(i)&&s&&(t=(0,n.resolveUrl)(this.opts.uriResolver,t,s))}let l;if("boolean"!=typeof r&&r.$ref&&!(0,o.schemaHasRulesButRef)(r,this.RULES)){const e=(0,n.resolveUrl)(this.opts.uriResolver,t,r.$ref);l=u.call(this,s,e)}const{schemaId:c}=this.opts;return l=l||new i({schema:r,schemaId:c,root:s,baseId:t}),l.schema!==l.root.schema?l:void 0}return ur}const hr={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var mr,gr,yr,vr,br,$r,xr,wr={},_r={exports:{}};function kr(){if(gr)return mr;gr=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(e){let t="",r=0,n=0;for(n=0;n<e.length;n++)if(r=e[n].charCodeAt(0),48!==r){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(r=e[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(e){return e.length=0,!0}function s(e,t,n){if(e.length){const o=r(e);if(""===o)return n.error=!0,!1;t.push(o),e.length=0}return!0}function i(e){if(function(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}(e,":")<2)return{host:e,isIPV6:!1};const t=function(e){let t=0;const n={error:!1,address:"",zone:""},i=[],a=[];let l=!1,c=!1,d=s;for(let r=0;r<e.length;r++){const s=e[r];if("["!==s&&"]"!==s)if(":"!==s)if("%"===s){if(!d(a,i,n))break;d=o}else a.push(s);else{if(!0===l&&(c=!0),!d(a,i,n))break;if(++t>7){n.error=!0;break}r>0&&":"===e[r-1]&&(l=!0),i.push(":")}}return a.length&&(d===o?n.zone=a.join(""):c?i.push(a.join("")):i.push(r(a))),n.address=i.join(""),n}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,r=t.address;return t.zone&&(e+="%"+t.zone,r+="%25"+t.zone),{host:e,isIPV6:!0,escapedHost:r}}}return mr={nonSimpleDomain:n,recomposeAuthority:function(e){const r=[];if(void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host){let n=unescape(e.host);if(!t(n)){const t=i(n);n=!0===t.isIPV6?`[${t.escapedHost}]`:e.host}r.push(n)}return"number"!=typeof e.port&&"string"!=typeof e.port||(r.push(":"),r.push(String(e.port))),r.length?r.join(""):void 0},normalizeComponentEncoding:function(e,t){const r=!0!==t?escape:unescape;return void 0!==e.scheme&&(e.scheme=r(e.scheme)),void 0!==e.userinfo&&(e.userinfo=r(e.userinfo)),void 0!==e.host&&(e.host=r(e.host)),void 0!==e.path&&(e.path=r(e.path)),void 0!==e.query&&(e.query=r(e.query)),void 0!==e.fragment&&(e.fragment=r(e.fragment)),e},removeDotSegments:function(e){let t=e;const r=[];let n=-1,o=0;for(;o=t.length;){if(1===o){if("."===t)break;if("/"===t){r.push("/");break}r.push(t);break}if(2===o){if("."===t[0]){if("."===t[1])break;if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&("."===t[1]||"/"===t[1])){r.push("/");break}}else if(3===o&&"/.."===t){0!==r.length&&r.pop(),r.push("/");break}if("."===t[0]){if("."===t[1]){if("/"===t[2]){t=t.slice(3);continue}}else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&"."===t[1]){if("/"===t[2]){t=t.slice(2);continue}if("."===t[2]&&"/"===t[3]){t=t.slice(3),0!==r.length&&r.pop();continue}}if(-1===(n=t.indexOf("/",1))){r.push(t);break}r.push(t.slice(0,n)),t=t.slice(n)}return r.join("")},isIPv4:t,isUUID:e,normalizeIPv6:i,stringArrayToHexStripped:r}}function Sr(){if(br)return _r.exports;br=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:o,nonSimpleDomain:s}=kr(),{SCHEMES:i,getSchemeHandler:a}=function(){if(vr)return yr;vr=1;const{isUUID:e}=kr(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(e){return!0===e.secure||!1!==e.secure&&!!e.scheme&&!(3!==e.scheme.length||"w"!==e.scheme[0]&&"W"!==e.scheme[0]||"s"!==e.scheme[1]&&"S"!==e.scheme[1]||"s"!==e.scheme[2]&&"S"!==e.scheme[2])}function o(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function s(e){const t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const i={scheme:"http",domainHost:!0,parse:o,serialize:s},a={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(n(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},l={http:i,https:{scheme:"https",domainHost:i.domainHost,parse:o,serialize:s},ws:a,wss:{scheme:"wss",domainHost:a.domainHost,parse:a.parse,serialize:a.serialize},urn:{scheme:"urn",parse:function(e,r){if(!e.path)return e.error="URN can not be parsed",e;const n=e.path.match(t);if(n){const t=r.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];const o=c(`${t}:${r.nid||e.nid}`);e.path=void 0,o&&(e=o.parse(e,r))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){if(void 0===e.nid)throw new Error("URN without nid cannot be serialized");const r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),o=c(`${r}:${t.nid||n}`);o&&(e=o.serialize(e,t));const s=e,i=e.nss;return s.path=`${n||t.nid}:${i}`,t.skipEscape=!0,s},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(t,r){const n=t;return n.uuid=n.nss,n.nss=void 0,r.tolerant||n.uuid&&e(n.uuid)||(n.error=n.error||"UUID is not valid."),n},serialize:function(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t},skipNormalize:!0}};function c(e){return e&&(l[e]||l[e.toLowerCase()])||void 0}return Object.setPrototypeOf(l,null),yr={wsIsSecure:n,SCHEMES:l,isValidSchemeName:function(e){return-1!==r.indexOf(e)},getSchemeHandler:c}}();function l(e,r,n,o){const s={};return o||(e=p(c(e,n),n),r=p(c(r,n),n)),!(n=n||{}).tolerant&&r.scheme?(s.scheme=r.scheme,s.userinfo=r.userinfo,s.host=r.host,s.port=r.port,s.path=t(r.path||""),s.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(s.userinfo=r.userinfo,s.host=r.host,s.port=r.port,s.path=t(r.path||""),s.query=r.query):(r.path?("/"===r.path[0]?s.path=t(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?s.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:s.path=r.path:s.path="/"+r.path,s.path=t(s.path)),s.query=r.query):(s.path=e.path,void 0!==r.query?s.query=r.query:s.query=e.query),s.userinfo=e.userinfo,s.host=e.host,s.port=e.port),s.scheme=e.scheme),s.fragment=r.fragment,s}function c(e,n){const o={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},s=Object.assign({},n),i=[],l=a(s.scheme||o.scheme);l&&l.serialize&&l.serialize(o,s),void 0!==o.path&&(s.skipEscape?o.path=unescape(o.path):(o.path=escape(o.path),void 0!==o.scheme&&(o.path=o.path.split("%3A").join(":")))),"suffix"!==s.reference&&o.scheme&&i.push(o.scheme,":");const c=r(o);if(void 0!==c&&("suffix"!==s.reference&&i.push("//"),i.push(c),o.path&&"/"!==o.path[0]&&i.push("/")),void 0!==o.path){let e=o.path;s.absolutePath||l&&l.absolutePath||(e=t(e)),void 0===c&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),i.push(e)}return void 0!==o.query&&i.push("?",o.query),void 0!==o.fragment&&i.push("#",o.fragment),i.join("")}const d=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function p(t,r){const n=Object.assign({},r),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let l=!1;"suffix"===n.reference&&(t=n.scheme?n.scheme+":"+t:"//"+t);const c=t.match(d);if(c){if(i.scheme=c[1],i.userinfo=c[3],i.host=c[4],i.port=parseInt(c[5],10),i.path=c[6]||"",i.query=c[7],i.fragment=c[8],isNaN(i.port)&&(i.port=c[5]),i.host){if(!1===o(i.host)){const t=e(i.host);i.host=t.host.toLowerCase(),l=t.isIPV6}else l=!0}void 0!==i.scheme||void 0!==i.userinfo||void 0!==i.host||void 0!==i.port||void 0!==i.query||i.path?void 0===i.scheme?i.reference="relative":void 0===i.fragment?i.reference="absolute":i.reference="uri":i.reference="same-document",n.reference&&"suffix"!==n.reference&&n.reference!==i.reference&&(i.error=i.error||"URI is not a "+n.reference+" reference.");const r=a(n.scheme||i.scheme);if(!(n.unicodeSupport||r&&r.unicodeSupport)&&i.host&&(n.domainHost||r&&r.domainHost)&&!1===l&&s(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(cp){i.error=i.error||"Host's domain name can not be converted to ASCII: "+cp}(!r||r&&!r.skipNormalize)&&(-1!==t.indexOf("%")&&(void 0!==i.scheme&&(i.scheme=unescape(i.scheme)),void 0!==i.host&&(i.host=unescape(i.host))),i.path&&(i.path=escape(unescape(i.path))),i.fragment&&(i.fragment=encodeURI(decodeURIComponent(i.fragment)))),r&&r.parse&&r.parse(i,n)}else i.error=i.error||"URI can not be parsed.";return i}const u={SCHEMES:i,normalize:function(e,t){return"string"==typeof e?e=c(p(e,t),t):"object"==typeof e&&(e=p(c(e,t),t)),e},resolve:function(e,t,r){const n=r?Object.assign({scheme:"null"},r):{scheme:"null"},o=l(p(e,n),p(t,n),n,!0);return n.skipEscape=!0,c(o,n)},resolveComponent:l,equal:function(e,t,r){return"string"==typeof e?(e=unescape(e),e=c(n(p(e,r),!0),{...r,skipEscape:!0})):"object"==typeof e&&(e=c(n(e,!0),{...r,skipEscape:!0})),"string"==typeof t?(t=unescape(t),t=c(n(p(t,r),!0),{...r,skipEscape:!0})):"object"==typeof t&&(t=c(n(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:c,parse:p};return _r.exports=u,_r.exports.default=u,_r.exports.fastUri=u,_r.exports}function jr(){if($r)return wr;$r=1,Object.defineProperty(wr,"__esModule",{value:!0});const e=Sr();return e.code='require("ajv/dist/runtime/uri").default',wr.default=e,wr}function Or(){return xr||(xr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=or();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=gt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=ar(),o=dr(),s=Tt(),i=fr(),a=gt(),l=nr(),c=Nt(),d=bt(),p=hr,u=jr(),f=(e,t)=>new RegExp(e,t);f.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function v(e){var t,r,n,o,s,i,a,l,c,d,p,h,m,g,y,v,b,$,x,w,_,k,S,j,O;const P=e.strict,E=null===(t=e.code)||void 0===t?void 0:t.optimize,T=!0===E||void 0===E?1:E||0,A=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:f,C=null!==(o=e.uriResolver)&&void 0!==o?o:u.default;return{strictSchema:null===(i=null!==(s=e.strictSchema)&&void 0!==s?s:P)||void 0===i||i,strictNumbers:null===(l=null!==(a=e.strictNumbers)&&void 0!==a?a:P)||void 0===l||l,strictTypes:null!==(d=null!==(c=e.strictTypes)&&void 0!==c?c:P)&&void 0!==d?d:"log",strictTuples:null!==(h=null!==(p=e.strictTuples)&&void 0!==p?p:P)&&void 0!==h?h:"log",strictRequired:null!==(g=null!==(m=e.strictRequired)&&void 0!==m?m:P)&&void 0!==g&&g,code:e.code?{...e.code,optimize:T,regExp:A}:{optimize:T,regExp:A},loopRequired:null!==(y=e.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(b=e.meta)||void 0===b||b,messages:null===($=e.messages)||void 0===$||$,inlineRefs:null===(x=e.inlineRefs)||void 0===x||x,schemaId:null!==(w=e.schemaId)&&void 0!==w?w:"$id",addUsedSchema:null===(_=e.addUsedSchema)||void 0===_||_,validateSchema:null===(k=e.validateSchema)||void 0===k||k,validateFormats:null===(S=e.validateFormats)||void 0===S||S,unicodeRegExp:null===(j=e.unicodeRegExp)||void 0===j||j,int32range:null===(O=e.int32range)||void 0===O||O,uriResolver:C}}class b{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...v(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:m,es5:t,lines:r}),this.logger=function(e){if(!1===e)return j;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,s.getRules)(),$.call(this,g,e,"NOT SUPPORTED"),$.call(this,y,e,"DEPRECATED","warn"),this._metaOpts=S.call(this),e.formats&&_.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&k.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),w.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=p;"id"===r&&(n={...p},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await s.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||i.call(this,r)}async function s(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function i(e){try{return this._compileSchemaEnv(e)}catch(cp){if(!(cp instanceof o.default))throw cp;return a.call(this,cp),await l.call(this,cp.missingSchema),i.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function l(e){const r=await c.call(this,e);this.refs[e]||await s.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=(0,l.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=x.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new i.SchemaEnv({schema:{},schemaId:r});if(t=i.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=x.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,l.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(P.call(this,r,t),!t)return(0,d.eachItem)(r,e=>E.call(this,e)),this;A.call(this,t);const n={...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)};return(0,d.eachItem)(r,0===n.type.length?e=>E.call(this,e,n):e=>n.type.forEach(t=>E.call(this,e,n,t))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex(t=>t.keyword===e);t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map(e=>`${r}${e.instancePath} ${e.message}`).reduce((e,r)=>e+t+r):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,s=o[e];n&&s&&(o[e]=I(s))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let s;const{schemaId:a}=this.opts;if("object"==typeof e)s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(void 0!==c)return c;r=(0,l.normalizeId)(s||r);const d=l.getSchemaRefs.call(this,e,r);return c=new i.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:r,localRefs:d}),this._cache.set(c.schema,c),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=c),n&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):i.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,e)}finally{this.opts=t}}}function $(e,t,r,n="error"){for(const o in e){const s=o;s in t&&this.logger[n](`${r}: option ${o}. ${e[s]}`)}}function x(e){return e=(0,l.normalizeId)(e),this.schemas[e]||this.refs[e]}function w(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function _(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function k(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function S(){const e={...this.opts};for(const t of h)delete e[t];return e}b.ValidationError=n.default,b.MissingRefError=o.default,e.default=b;const j={log(){},warn(){},error(){}};const O=/^[a-z_$][a-z0-9_$:-]*$/i;function P(e,t){const{RULES:r}=this;if((0,d.eachItem)(e,e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!O.test(e))throw new Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function E(e,t,r){var n;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let i=o?s.post:s.rules.find(({type:e})=>e===r);if(i||(i={type:r,rules:[]},s.rules.push(i)),s.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)}};t.before?T.call(this,i,a,t.before):i.rules.push(a),s.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach(e=>this.addKeyword(e))}function T(e,t,r){const n=e.rules.findIndex(e=>e.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function A(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=I(t)),e.validateSchema=this.compile(t,!0))}const C={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function I(e){return{anyOf:[e,C]}}}(st)),st}var Pr,Er,Tr={},Ar={},Cr={};function Ir(){if(Pr)return Cr;Pr=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.callRef=Cr.getValidate=void 0;const e=dr(),t=Ht(),r=gt(),n=kt(),o=fr(),s=bt(),i={keyword:"$ref",schemaType:"string",code(t){const{gen:n,schema:s,it:i}=t,{baseId:c,schemaEnv:d,validateName:p,opts:u,self:f}=i,{root:h}=d;if(("#"===s||"#/"===s)&&c===h.baseId)return function(){if(d===h)return l(t,p,d,d.$async);const e=n.scopeValue("root",{ref:h});return l(t,r._`${e}.validate`,h,h.$async)}();const m=o.resolveRef.call(f,h,c,s);if(void 0===m)throw new e.default(i.opts.uriResolver,c,s);return m instanceof o.SchemaEnv?function(e){const r=a(t,e);l(t,r,e,e.$async)}(m):function(e){const o=n.scopeValue("schema",!0===u.code.source?{ref:e,code:(0,r.stringify)(e)}:{ref:e}),i=n.name("valid"),a=t.subschema({schema:e,dataTypes:[],schemaPath:r.nil,topSchemaRef:o,errSchemaPath:s},i);t.mergeEvaluated(a),t.ok(i)}(m)}};function a(e,t){const{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):r._`${n.scopeValue("wrapper",{ref:t})}.validate`}function l(e,o,i,a){const{gen:l,it:c}=e,{allErrors:d,schemaEnv:p,opts:u}=c,f=u.passContext?n.default.this:r.nil;function h(e){const t=r._`${e}.errors`;l.assign(n.default.vErrors,r._`${n.default.vErrors} === null ? ${t} : ${n.default.vErrors}.concat(${t})`),l.assign(n.default.errors,r._`${n.default.vErrors}.length`)}function m(e){var t;if(!c.opts.unevaluated)return;const n=null===(t=null==i?void 0:i.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(n&&!n.dynamicProps)void 0!==n.props&&(c.props=s.mergeEvaluated.props(l,n.props,c.props));else{const t=l.var("props",r._`${e}.evaluated.props`);c.props=s.mergeEvaluated.props(l,t,c.props,r.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=s.mergeEvaluated.items(l,n.items,c.items));else{const t=l.var("items",r._`${e}.evaluated.items`);c.items=s.mergeEvaluated.items(l,t,c.items,r.Name)}}a?function(){if(!p.$async)throw new Error("async schema referenced by sync schema");const n=l.let("valid");l.try(()=>{l.code(r._`await ${(0,t.callValidateCode)(e,o,f)}`),m(o),d||l.assign(n,!0)},e=>{l.if(r._`!(${e} instanceof ${c.ValidationError})`,()=>l.throw(e)),h(e),d||l.assign(n,!1)}),e.ok(n)}():e.result((0,t.callValidateCode)(e,o,f),()=>m(o),()=>h(o))}return Cr.getValidate=a,Cr.callRef=l,Cr.default=i,Cr}var Rr,Nr={},Mr={};var qr,zr={};var Ur,Lr={};function Dr(){if(Ur)return Lr;Ur=1,Object.defineProperty(Lr,"__esModule",{value:!0});const e=gt(),t={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:t})=>e.str`must be multiple of ${t}`,params:({schemaCode:t})=>e._`{multipleOf: ${t}}`},code(t){const{gen:r,data:n,schemaCode:o,it:s}=t,i=s.opts.multipleOfPrecision,a=r.let("res"),l=i?e._`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:e._`${a} !== parseInt(${a})`;t.fail$data(e._`(${o} === 0 || (${a} = ${n}/${o}, ${l}))`)}};return Lr.default=t,Lr}var Br,Hr,Fr={},Vr={};function Jr(){if(Br)return Vr;function e(e){const t=e.length;let r,n=0,o=0;for(;o<t;)n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),56320==(64512&r)&&o++);return n}return Br=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Vr}function Wr(){if(Hr)return Fr;Hr=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=gt(),t=bt(),r=Jr(),n={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:r}){const n="maxLength"===t?"more":"fewer";return e.str`must NOT have ${n} than ${r} characters`},params:({schemaCode:t})=>e._`{limit: ${t}}`},code(n){const{keyword:o,data:s,schemaCode:i,it:a}=n,l="maxLength"===o?e.operators.GT:e.operators.LT,c=!1===a.opts.unicode?e._`${s}.length`:e._`${(0,t.useFunc)(n.gen,r.default)}(${s})`;n.fail$data(e._`${c} ${l} ${i}`)}};return Fr.default=n,Fr}var Gr,Kr={};function Zr(){if(Gr)return Kr;Gr=1,Object.defineProperty(Kr,"__esModule",{value:!0});const e=Ht(),t=bt(),r=gt(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>r.str`must match pattern "${e}"`,params:({schemaCode:e})=>r._`{pattern: ${e}}`},code(n){const{gen:o,data:s,$data:i,schema:a,schemaCode:l,it:c}=n,d=c.opts.unicodeRegExp?"u":"";if(i){const{regExp:e}=c.opts.code,i="new RegExp"===e.code?r._`new RegExp`:(0,t.useFunc)(o,e),a=o.let("valid");o.try(()=>o.assign(a,r._`${i}(${l}, ${d}).test(${s})`),()=>o.assign(a,!1)),n.fail$data(r._`!${a}`)}else{const t=(0,e.usePattern)(n,a);n.fail$data(r._`!${t}.test(${s})`)}}};return Kr.default=n,Kr}var Qr,Yr={};function Xr(){if(Qr)return Yr;Qr=1,Object.defineProperty(Yr,"__esModule",{value:!0});const e=gt(),t={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:r}){const n="maxProperties"===t?"more":"fewer";return e.str`must NOT have ${n} than ${r} properties`},params:({schemaCode:t})=>e._`{limit: ${t}}`},code(t){const{keyword:r,data:n,schemaCode:o}=t,s="maxProperties"===r?e.operators.GT:e.operators.LT;t.fail$data(e._`Object.keys(${n}).length ${s} ${o}`)}};return Yr.default=t,Yr}var en,tn={};function rn(){if(en)return tn;en=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=Ht(),t=gt(),r=bt(),n={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>t.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>t._`{missingProperty: ${e}}`},code(n){const{gen:o,schema:s,schemaCode:i,data:a,$data:l,it:c}=n,{opts:d}=c;if(!l&&0===s.length)return;const p=s.length>=d.loopRequired;if(c.allErrors?function(){if(p||l)n.block$data(t.nil,u);else for(const t of s)(0,e.checkReportMissingProp)(n,t)}():function(){const r=o.let("missing");if(p||l){const s=o.let("valid",!0);n.block$data(s,()=>function(r,s){n.setParams({missingProperty:r}),o.forOf(r,i,()=>{o.assign(s,(0,e.propertyInData)(o,a,r,d.ownProperties)),o.if((0,t.not)(s),()=>{n.error(),o.break()})},t.nil)}(r,s)),n.ok(s)}else o.if((0,e.checkMissingProp)(n,s,r)),(0,e.reportMissingProp)(n,r),o.else()}(),d.strictRequired){const e=n.parentSchema.properties,{definedProperties:t}=n.it;for(const n of s)if(void 0===(null==e?void 0:e[n])&&!t.has(n)){const e=`required property "${n}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(c,e,c.opts.strictRequired)}}function u(){o.forOf("prop",i,t=>{n.setParams({missingProperty:t}),o.if((0,e.noPropertyInData)(o,a,t,d.ownProperties),()=>n.error())})}}};return tn.default=n,tn}var nn,on={};function sn(){if(nn)return on;nn=1,Object.defineProperty(on,"__esModule",{value:!0});const e=gt(),t={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:r}){const n="maxItems"===t?"more":"fewer";return e.str`must NOT have ${n} than ${r} items`},params:({schemaCode:t})=>e._`{limit: ${t}}`},code(t){const{keyword:r,data:n,schemaCode:o}=t,s="maxItems"===r?e.operators.GT:e.operators.LT;t.fail$data(e._`${n}.length ${s} ${o}`)}};return on.default=t,on}var an,ln,cn={},dn={};function pn(){if(an)return dn;an=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=Qt();return e.code='require("ajv/dist/runtime/equal").default',dn.default=e,dn}function un(){if(ln)return cn;ln=1,Object.defineProperty(cn,"__esModule",{value:!0});const e=Nt(),t=gt(),r=bt(),n=pn(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:r}})=>t.str`must NOT have duplicate items (items ## ${r} and ${e} are identical)`,params:({params:{i:e,j:r}})=>t._`{i: ${e}, j: ${r}}`},code(o){const{gen:s,data:i,$data:a,schema:l,parentSchema:c,schemaCode:d,it:p}=o;if(!a&&!l)return;const u=s.let("valid"),f=c.items?(0,e.getSchemaTypes)(c.items):[];function h(r,n){const a=s.name("item"),l=(0,e.checkDataTypes)(f,a,p.opts.strictNumbers,e.DataType.Wrong),c=s.const("indices",t._`{}`);s.for(t._`;${r}--;`,()=>{s.let(a,t._`${i}[${r}]`),s.if(l,t._`continue`),f.length>1&&s.if(t._`typeof ${a} == "string"`,t._`${a} += "_"`),s.if(t._`typeof ${c}[${a}] == "number"`,()=>{s.assign(n,t._`${c}[${a}]`),o.error(),s.assign(u,!1).break()}).code(t._`${c}[${a}] = ${r}`)})}function m(e,a){const l=(0,r.useFunc)(s,n.default),c=s.name("outer");s.label(c).for(t._`;${e}--;`,()=>s.for(t._`${a} = ${e}; ${a}--;`,()=>s.if(t._`${l}(${i}[${e}], ${i}[${a}])`,()=>{o.error(),s.assign(u,!1).break(c)})))}o.block$data(u,function(){const e=s.let("i",t._`${i}.length`),r=s.let("j");o.setParams({i:e,j:r}),s.assign(u,!0),s.if(t._`${e} > 1`,()=>(f.length>0&&!f.some(e=>"object"===e||"array"===e)?h:m)(e,r))},t._`${d} === false`),o.ok(u)}};return cn.default=o,cn}var fn,hn={};function mn(){if(fn)return hn;fn=1,Object.defineProperty(hn,"__esModule",{value:!0});const e=gt(),t=bt(),r=pn(),n={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:t})=>e._`{allowedValue: ${t}}`},code(n){const{gen:o,data:s,$data:i,schemaCode:a,schema:l}=n;i||l&&"object"==typeof l?n.fail$data(e._`!${(0,t.useFunc)(o,r.default)}(${s}, ${a})`):n.fail(e._`${l} !== ${s}`)}};return hn.default=n,hn}var gn,yn,vn={};function bn(){if(gn)return vn;gn=1,Object.defineProperty(vn,"__esModule",{value:!0});const e=gt(),t=bt(),r=pn(),n={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:t})=>e._`{allowedValues: ${t}}`},code(n){const{gen:o,data:s,$data:i,schema:a,schemaCode:l,it:c}=n;if(!i&&0===a.length)throw new Error("enum must have non-empty array");const d=a.length>=c.opts.loopEnum;let p;const u=()=>null!=p?p:p=(0,t.useFunc)(o,r.default);let f;if(d||i)f=o.let("valid"),n.block$data(f,function(){o.assign(f,!1),o.forOf("v",l,t=>o.if(e._`${u()}(${s}, ${t})`,()=>o.assign(f,!0).break()))});else{if(!Array.isArray(a))throw new Error("ajv implementation error");const t=o.const("vSchema",l);f=(0,e.or)(...a.map((r,n)=>function(t,r){const n=a[r];return"object"==typeof n&&null!==n?e._`${u()}(${s}, ${t}[${r}])`:e._`${s} === ${n}`}(t,n)))}n.pass(f)}};return vn.default=n,vn}function $n(){if(yn)return Nr;yn=1,Object.defineProperty(Nr,"__esModule",{value:!0});const e=function(){if(Rr)return Mr;Rr=1,Object.defineProperty(Mr,"__esModule",{value:!0});const e=Or(),t=gt().operators,r={maximum:{exclusive:"exclusiveMaximum",ops:[{okStr:"<=",ok:t.LTE,fail:t.GT},{okStr:"<",ok:t.LT,fail:t.GTE}]},minimum:{exclusive:"exclusiveMinimum",ops:[{okStr:">=",ok:t.GTE,fail:t.LT},{okStr:">",ok:t.GT,fail:t.LTE}]}},n={message:t=>e.str`must be ${s(t).okStr} ${t.schemaCode}`,params:t=>e._`{comparison: ${s(t).okStr}, limit: ${t.schemaCode}}`},o={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(t){const{data:r,schemaCode:n}=t;t.fail$data(e._`${r} ${s(t).fail} ${n} || isNaN(${r})`)}};function s(e){var t;const n=e.keyword,o=(null===(t=e.parentSchema)||void 0===t?void 0:t[r[n].exclusive])?1:0;return r[n].ops[o]}return Mr.default=o,Mr}(),t=function(){if(qr)return zr;qr=1,Object.defineProperty(zr,"__esModule",{value:!0});const e={exclusiveMaximum:"maximum",exclusiveMinimum:"minimum"},t={keyword:Object.keys(e),type:"number",schemaType:"boolean",code({keyword:t,parentSchema:r}){const n=e[t];if(void 0===r[n])throw new Error(`${t} can only be used with ${n}`)}};return zr.default=t,zr}(),r=Dr(),n=Wr(),o=Zr(),s=Xr(),i=rn(),a=sn(),l=un(),c=mn(),d=bn(),p=[e.default,t.default,r.default,n.default,o.default,s.default,i.default,a.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,d.default];return Nr.default=p,Nr}var xn,wn={},_n={};function kn(){if(xn)return _n;xn=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.validateAdditionalItems=void 0;const e=gt(),t=bt(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:t}})=>e.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>e._`{limit: ${t}}`},code(e){const{parentSchema:r,it:o}=e,{items:s}=r;Array.isArray(s)?n(e,s):(0,t.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas')}};function n(r,n){const{gen:o,schema:s,data:i,keyword:a,it:l}=r;l.items=!0;const c=o.const("len",e._`${i}.length`);if(!1===s)r.setParams({len:n.length}),r.pass(e._`${c} <= ${n.length}`);else if("object"==typeof s&&!(0,t.alwaysValidSchema)(l,s)){const s=o.var("valid",e._`${c} <= ${n.length}`);o.if((0,e.not)(s),()=>function(s){o.forRange("i",n.length,c,n=>{r.subschema({keyword:a,dataProp:n,dataPropType:t.Type.Num},s),l.allErrors||o.if((0,e.not)(s),()=>o.break())})}(s)),r.ok(s)}}return _n.validateAdditionalItems=n,_n.default=r,_n}var Sn,jn,On={},Pn={};function En(){if(Sn)return Pn;Sn=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.validateTuple=void 0;const e=gt(),t=bt(),r=Ht(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:n,it:s}=e;if(Array.isArray(n))return o(e,"additionalItems",n);s.items=!0,(0,t.alwaysValidSchema)(s,n)||e.ok((0,r.validateArray)(e))}};function o(r,n,o=r.schema){const{gen:s,parentSchema:i,data:a,keyword:l,it:c}=r;!function(e){const{opts:r,errSchemaPath:s}=c,i=o.length,a=i===e.minItems&&(i===e.maxItems||!1===e[n]);if(r.strictTuples&&!a){const e=`"${l}" is ${i}-tuple, but minItems or maxItems/${n} are not specified or different at path "${s}"`;(0,t.checkStrictMode)(c,e,r.strictTuples)}}(i),c.opts.unevaluated&&o.length&&!0!==c.items&&(c.items=t.mergeEvaluated.items(s,o.length,c.items));const d=s.name("valid"),p=s.const("len",e._`${a}.length`);o.forEach((n,o)=>{(0,t.alwaysValidSchema)(c,n)||(s.if(e._`${p} > ${o}`,()=>r.subschema({keyword:l,schemaProp:o,dataProp:o},d)),r.ok(d))})}return Pn.validateTuple=o,Pn.default=n,Pn}function Tn(){if(jn)return On;jn=1,Object.defineProperty(On,"__esModule",{value:!0});const e=En(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,e.validateTuple)(t,"items")};return On.default=t,On}var An,Cn={};function In(){if(An)return Cn;An=1,Object.defineProperty(Cn,"__esModule",{value:!0});const e=gt(),t=bt(),r=Ht(),n=kn(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:t}})=>e.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>e._`{limit: ${t}}`},code(e){const{schema:o,parentSchema:s,it:i}=e,{prefixItems:a}=s;i.items=!0,(0,t.alwaysValidSchema)(i,o)||(a?(0,n.validateAdditionalItems)(e,a):e.ok((0,r.validateArray)(e)))}};return Cn.default=o,Cn}var Rn,Nn={};function Mn(){if(Rn)return Nn;Rn=1,Object.defineProperty(Nn,"__esModule",{value:!0});const e=gt(),t=bt(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:t,max:r}})=>void 0===r?e.str`must contain at least ${t} valid item(s)`:e.str`must contain at least ${t} and no more than ${r} valid item(s)`,params:({params:{min:t,max:r}})=>void 0===r?e._`{minContains: ${t}}`:e._`{minContains: ${t}, maxContains: ${r}}`},code(r){const{gen:n,schema:o,parentSchema:s,data:i,it:a}=r;let l,c;const{minContains:d,maxContains:p}=s;a.opts.next?(l=void 0===d?1:d,c=p):l=1;const u=n.const("len",e._`${i}.length`);if(r.setParams({min:l,max:c}),void 0===c&&0===l)return void(0,t.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&l>c)return(0,t.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void r.fail();if((0,t.alwaysValidSchema)(a,o)){let t=e._`${u} >= ${l}`;return void 0!==c&&(t=e._`${t} && ${u} <= ${c}`),void r.pass(t)}a.items=!0;const f=n.name("valid");function h(){const t=n.name("_valid"),r=n.let("count",0);m(t,()=>n.if(t,()=>function(t){n.code(e._`${t}++`),void 0===c?n.if(e._`${t} >= ${l}`,()=>n.assign(f,!0).break()):(n.if(e._`${t} > ${c}`,()=>n.assign(f,!1).break()),1===l?n.assign(f,!0):n.if(e._`${t} >= ${l}`,()=>n.assign(f,!0)))}(r)))}function m(e,o){n.forRange("i",0,u,n=>{r.subschema({keyword:"contains",dataProp:n,dataPropType:t.Type.Num,compositeRule:!0},e),o()})}void 0===c&&1===l?m(f,()=>n.if(f,()=>n.break())):0===l?(n.let(f,!0),void 0!==c&&n.if(e._`${i}.length > 0`,h)):(n.let(f,!1),h()),r.result(f,()=>r.reset())}};return Nn.default=r,Nn}var qn,zn={};function Un(){return qn||(qn=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=gt(),r=bt(),n=Ht();e.error={message:({params:{property:e,depsCount:r,deps:n}})=>{const o=1===r?"property":"properties";return t.str`must have ${o} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:r,deps:n,missingProperty:o}})=>t._`{property: ${e},
|
|
259
|
+
|| ${a} === "boolean" || ${s} === null`).assign(c,n._`[${s}]`)}}o.else(),u(e),o.endIf(),o.if(n._`${c} !== undefined`,()=>{o.assign(s,c),function({gen:e,parentData:t,parentDataProperty:r},o){e.if(n._`${t} !== undefined`,()=>e.assign(n._`${t}[${r}]`,o))}(e,c)})}(e,r,c):u(e)})}return p};const l=new Set(["string","number","integer","boolean","null"]);function c(e,t,r,o=s.Correct){const i=o===s.Correct?n.operators.EQ:n.operators.NEQ;let a;switch(e){case"null":return n._`${t} ${i} null`;case"array":a=n._`Array.isArray(${t})`;break;case"object":a=n._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":a=l(n._`!(${t} % 1) && !isNaN(${t})`);break;case"number":a=l();break;default:return n._`typeof ${t} ${i} ${e}`}return o===s.Correct?a:(0,n.not)(a);function l(e=n.nil){return(0,n.and)(n._`typeof ${t} == "number"`,e,r?n._`isFinite(${t})`:n.nil)}}function d(e,t,r,s){if(1===e.length)return c(e[0],t,r,s);let i;const a=(0,o.toHash)(e);if(a.array&&a.object){const e=n._`typeof ${t} != "object"`;i=a.null?e:n._`!${t} || ${e}`,delete a.null,delete a.array,delete a.object}else i=n.nil;a.number&&delete a.integer;for(const o in a)i=(0,n.and)(i,c(o,t,r,s));return i}Et.checkDataType=c,Et.checkDataTypes=d;const p={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?n._`{type: ${e}}`:n._`{type: ${t}}`};function u(e){const t=function(e){const{gen:t,data:r,schema:n}=e,s=(0,o.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:s,schemaValue:s,parentSchema:n,params:{},it:e}}(e);(0,r.reportError)(t,p)}return Et.reportTypeError=u,Et}var qt,zt={};function Lt(){if(qt)return zt;qt=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.assignDefaults=void 0;const e=yt(),t=$t();function r(r,n,o){const{gen:s,compositeRule:i,data:a,opts:l}=r;if(void 0===o)return;const c=e._`${a}${(0,e.getProperty)(n)}`;if(i)return void(0,t.checkStrictMode)(r,`default is ignored for: ${c}`);let d=e._`${c} === undefined`;"empty"===l.useDefaults&&(d=e._`${d} || ${c} === null || ${c} === ""`),s.if(d,e._`${c} = ${(0,e.stringify)(o)}`)}return zt.assignDefaults=function(e,t){const{properties:n,items:o}=e.schema;if("object"===t&&n)for(const s in n)r(e,s,n[s].default);else"array"===t&&Array.isArray(o)&&o.forEach((t,n)=>r(e,n,t.default))},zt}var Ut,Dt,Bt={},Ht={};function Ft(){if(Ut)return Ht;Ut=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.validateUnion=Ht.validateArray=Ht.usePattern=Ht.callValidateCode=Ht.schemaProperties=Ht.allSchemaProperties=Ht.noPropertyInData=Ht.propertyInData=Ht.isOwnProperty=Ht.hasPropFunc=Ht.reportMissingProp=Ht.checkMissingProp=Ht.checkReportMissingProp=void 0;const e=yt(),t=$t(),r=St(),n=$t();function o(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:e._`Object.prototype.hasOwnProperty`})}function s(t,r,n){return e._`${o(t)}.call(${r}, ${n})`}function i(t,r,n,o){const i=e._`${r}${(0,e.getProperty)(n)} === undefined`;return o?(0,e.or)(i,(0,e.not)(s(t,r,n))):i}function a(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}Ht.checkReportMissingProp=function(t,r){const{gen:n,data:o,it:s}=t;n.if(i(n,o,r,s.opts.ownProperties),()=>{t.setParams({missingProperty:e._`${r}`},!0),t.error()})},Ht.checkMissingProp=function({gen:t,data:r,it:{opts:n}},o,s){return(0,e.or)(...o.map(o=>(0,e.and)(i(t,r,o,n.ownProperties),e._`${s} = ${o}`)))},Ht.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},Ht.hasPropFunc=o,Ht.isOwnProperty=s,Ht.propertyInData=function(t,r,n,o){const i=e._`${r}${(0,e.getProperty)(n)} !== undefined`;return o?e._`${i} && ${s(t,r,n)}`:i},Ht.noPropertyInData=i,Ht.allSchemaProperties=a,Ht.schemaProperties=function(e,r){return a(r).filter(n=>!(0,t.alwaysValidSchema)(e,r[n]))},Ht.callValidateCode=function({schemaCode:t,data:n,it:{gen:o,topSchemaRef:s,schemaPath:i,errorPath:a},it:l},c,d,p){const u=p?e._`${t}, ${n}, ${s}${i}`:n,h=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,a)],[r.default.parentData,l.parentData],[r.default.parentDataProperty,l.parentDataProperty],[r.default.rootData,r.default.rootData]];l.opts.dynamicRef&&h.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const f=e._`${u}, ${o.object(...h)}`;return d!==e.nil?e._`${c}.call(${d}, ${f})`:e._`${c}(${f})`};const l=e._`new RegExp`;return Ht.usePattern=function({gen:t,it:{opts:r}},o){const s=r.unicodeRegExp?"u":"",{regExp:i}=r.code,a=i(o,s);return t.scopeValue("pattern",{key:a.toString(),ref:a,code:e._`${"new RegExp"===i.code?l:(0,n.useFunc)(t,i)}(${o}, ${s})`})},Ht.validateArray=function(r){const{gen:n,data:o,keyword:s,it:i}=r,a=n.name("valid");if(i.allErrors){const e=n.let("valid",!0);return l(()=>n.assign(e,!1)),e}return n.var(a,!0),l(()=>n.break()),a;function l(i){const l=n.const("len",e._`${o}.length`);n.forRange("i",0,l,o=>{r.subschema({keyword:s,dataProp:o,dataPropType:t.Type.Num},a),n.if((0,e.not)(a),i)})}},Ht.validateUnion=function(r){const{gen:n,schema:o,keyword:s,it:i}=r;if(!Array.isArray(o))throw new Error("ajv implementation error");if(o.some(e=>(0,t.alwaysValidSchema)(i,e))&&!i.opts.unevaluated)return;const a=n.let("valid",!1),l=n.name("_valid");n.block(()=>o.forEach((t,o)=>{const i=r.subschema({keyword:s,schemaProp:o,compositeRule:!0},l);n.assign(a,e._`${a} || ${l}`);r.mergeValidEvaluated(i,l)||n.if((0,e.not)(a))})),r.result(a,()=>r.reset(),()=>r.error(!0))},Ht}function Vt(){if(Dt)return Bt;Dt=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.validateKeywordUsage=Bt.validSchemaType=Bt.funcKeywordCode=Bt.macroKeywordCode=void 0;const e=yt(),t=St(),r=Ft(),n=Ot();function o(t){const{gen:r,data:n,it:o}=t;r.if(o.parentData,()=>r.assign(n,e._`${o.parentData}[${o.parentDataProperty}]`))}function s(t,r,n){if(void 0===n)throw new Error(`keyword "${r}" failed to compile`);return t.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:(0,e.stringify)(n)})}return Bt.macroKeywordCode=function(t,r){const{gen:n,keyword:o,schema:i,parentSchema:a,it:l}=t,c=r.macro.call(l.self,i,a,l),d=s(n,o,c);!1!==l.opts.validateSchema&&l.self.validateSchema(c,!0);const p=n.name("valid");t.subschema({schema:c,schemaPath:e.nil,errSchemaPath:`${l.errSchemaPath}/${o}`,topSchemaRef:d,compositeRule:!0},p),t.pass(p,()=>t.error(!0))},Bt.funcKeywordCode=function(i,a){var l;const{gen:c,keyword:d,schema:p,parentSchema:u,$data:h,it:f}=i;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(f,a);const m=!h&&a.compile?a.compile.call(f.self,p,u,f):a.validate,g=s(c,d,m),y=c.let("valid");function v(n=(a.async?e._`await `:e.nil)){const o=f.opts.passContext?t.default.this:t.default.self,s=!("compile"in a&&!h||!1===a.schema);c.assign(y,e._`${n}${(0,r.callValidateCode)(i,g,o,s)}`,a.modifying)}function b(t){var r;c.if((0,e.not)(null!==(r=a.valid)&&void 0!==r?r:y),t)}i.block$data(y,function(){if(!1===a.errors)v(),a.modifying&&o(i),b(()=>i.error());else{const r=a.async?function(){const t=c.let("ruleErrs",null);return c.try(()=>v(e._`await `),r=>c.assign(y,!1).if(e._`${r} instanceof ${f.ValidationError}`,()=>c.assign(t,e._`${r}.errors`),()=>c.throw(r))),t}():function(){const t=e._`${g}.errors`;return c.assign(t,null),v(e.nil),t}();a.modifying&&o(i),b(()=>function(r,o){const{gen:s}=r;s.if(e._`Array.isArray(${o})`,()=>{s.assign(t.default.vErrors,e._`${t.default.vErrors} === null ? ${o} : ${t.default.vErrors}.concat(${o})`).assign(t.default.errors,e._`${t.default.vErrors}.length`),(0,n.extendErrors)(r)},()=>r.error())}(i,r))}}),i.ok(null!==(l=a.valid)&&void 0!==l?l:y)},Bt.validSchemaType=function(e,t,r=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e)},Bt.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw new Error("ajv implementation error");const i=o.dependencies;if(null==i?void 0:i.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(o.validateSchema){if(!o.validateSchema(e[s])){const e=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},Bt}var Gt,Jt={};function Wt(){if(Gt)return Jt;Gt=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.extendSubschemaMode=Jt.extendSubschemaData=Jt.getSubschema=void 0;const e=yt(),t=$t();return Jt.getSubschema=function(r,{keyword:n,schemaProp:o,schema:s,schemaPath:i,errSchemaPath:a,topSchemaRef:l}){if(void 0!==n&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==n){const s=r.schema[n];return void 0===o?{schema:s,schemaPath:e._`${r.schemaPath}${(0,e.getProperty)(n)}`,errSchemaPath:`${r.errSchemaPath}/${n}`}:{schema:s[o],schemaPath:e._`${r.schemaPath}${(0,e.getProperty)(n)}${(0,e.getProperty)(o)}`,errSchemaPath:`${r.errSchemaPath}/${n}/${(0,t.escapeFragment)(o)}`}}if(void 0!==s){if(void 0===i||void 0===a||void 0===l)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:i,topSchemaRef:l,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},Jt.extendSubschemaData=function(r,n,{dataProp:o,dataPropType:s,data:i,dataTypes:a,propertyName:l}){if(void 0!==i&&void 0!==o)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=n;if(void 0!==o){const{errorPath:i,dataPathArr:a,opts:l}=n;d(c.let("data",e._`${n.data}${(0,e.getProperty)(o)}`,!0)),r.errorPath=e.str`${i}${(0,t.getErrorPath)(o,s,l.jsPropertySyntax)}`,r.parentDataProperty=e._`${o}`,r.dataPathArr=[...a,r.parentDataProperty]}if(void 0!==i){d(i instanceof e.Name?i:c.let("data",i,!0)),void 0!==l&&(r.propertyName=l)}function d(e){r.data=e,r.dataLevel=n.dataLevel+1,r.dataTypes=[],n.definedProperties=new Set,r.parentData=n.data,r.dataNames=[...n.dataNames,e]}a&&(r.dataTypes=a)},Jt.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:s}){void 0!==n&&(e.compositeRule=n),void 0!==o&&(e.createErrors=o),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r},Jt}var Kt,Zt,Yt={};function Qt(){return Zt?Kt:(Zt=1,Kt=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!==o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(s=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!==o--;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;0!==o--;){var i=s[o];if(!e(t[i],r[i]))return!1}return!0}return t!=t&&r!=r})}var Xt,er,tr,rr={exports:{}};function nr(){if(Xt)return rr.exports;Xt=1;var e=rr.exports=function(e,r,n){"function"==typeof r&&(n=r,r={}),t(r,"function"==typeof(n=r.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function t(n,o,s,i,a,l,c,d,p,u){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var h in o(i,a,l,c,d,p,u),i){var f=i[h];if(Array.isArray(f)){if(h in e.arrayKeywords)for(var m=0;m<f.length;m++)t(n,o,s,f[m],a+"/"+h+"/"+m,l,a,h,i,m)}else if(h in e.propsKeywords){if(f&&"object"==typeof f)for(var g in f)t(n,o,s,f[g],a+"/"+h+"/"+r(g),l,a,h,i,g)}else(h in e.keywords||n.allKeys&&!(h in e.skipKeywords))&&t(n,o,s,f,a+"/"+h,l,a,h,i)}s(i,a,l,c,d,p,u)}}function r(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}return e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},rr.exports}function or(){if(er)return Yt;er=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.getSchemaRefs=Yt.resolveUrl=Yt.normalizeId=Yt._getFullPath=Yt.getFullPath=Yt.inlineRef=void 0;const e=$t(),t=Qt(),r=nr(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);Yt.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!s(e):!!t&&i(e)<=t)};const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(e){for(const t in e){if(o.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(s))return!0;if("object"==typeof r&&s(r))return!0}return!1}function i(t){let r=0;for(const o in t){if("$ref"===o)return 1/0;if(r++,!n.has(o)&&("object"==typeof t[o]&&(0,e.eachItem)(t[o],e=>r+=i(e)),r===1/0))return 1/0}return r}function a(e,t="",r){!1!==r&&(t=d(t));const n=e.parse(t);return l(e,n)}function l(e,t){return e.serialize(t).split("#")[0]+"#"}Yt.getFullPath=a,Yt._getFullPath=l;const c=/#\/?$/;function d(e){return e?e.replace(c,""):""}Yt.normalizeId=d,Yt.resolveUrl=function(e,t,r){return r=d(r),e.resolve(t,r)};const p=/^[a-z_][-a-z0-9._]*$/i;return Yt.getSchemaRefs=function(e,n){if("boolean"==typeof e)return{};const{schemaId:o,uriResolver:s}=this.opts,i=d(e[o]||n),l={"":i},c=a(s,i,!1),u={},h=new Set;return r(e,{allKeys:!0},(e,t,r,n)=>{if(void 0===n)return;const s=c+t;let i=l[n];function a(t){const r=this.opts.uriResolver.resolve;if(t=d(i?r(i,t):t),h.has(t))throw m(t);h.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?f(e,n.schema,t):t!==d(s)&&("#"===t[0]?(f(e,u[t],t),u[t]=e):this.refs[t]=s),t}function g(e){if("string"==typeof e){if(!p.test(e))throw new Error(`invalid anchor "${e}"`);a.call(this,`#${e}`)}}"string"==typeof e[o]&&(i=a.call(this,e[o])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),l[t]=i}),u;function f(e,r,n){if(void 0!==r&&!t(e,r))throw m(n)}function m(e){return new Error(`reference "${e}" resolves to more than one schema`)}},Yt}function sr(){if(tr)return at;tr=1,Object.defineProperty(at,"__esModule",{value:!0}),at.getData=at.KeywordCxt=at.validateFunctionCode=void 0;const e=jt(),t=Mt(),r=Nt(),n=Mt(),o=Lt(),s=Vt(),i=Wt(),a=yt(),l=St(),c=or(),d=$t(),p=Ot();function u({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},s){o.code.es5?e.func(t,a._`${l.default.data}, ${l.default.valCxt}`,n.$async,()=>{e.code(a._`"use strict"; ${h(r,o)}`),function(e,t){e.if(l.default.valCxt,()=>{e.var(l.default.instancePath,a._`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,a._`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,a._`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,a._`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,a._`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{e.var(l.default.instancePath,a._`""`),e.var(l.default.parentData,a._`undefined`),e.var(l.default.parentDataProperty,a._`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,a._`{}`)})}(e,o),e.code(s)}):e.func(t,a._`${l.default.data}, ${function(e){return a._`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?a._`, ${l.default.dynamicAnchors}={}`:a.nil}}={}`}(o)}`,n.$async,()=>e.code(h(r,o)).code(s))}function h(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?a._`/*# sourceURL=${r} */`:a.nil}function f(t,r){g(t)&&(y(t),m(t))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&b(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,c.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const s=n.const("_errs",l.default.errors);v(e,s),n.var(t,a._`${s} === ${l.default.errors}`)}(t,r):(0,e.boolOrEmptySchema)(t,r)}function m({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function g(e){return"boolean"!=typeof e.schema}function y(e){(0,d.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function v(e,r){if(e.opts.jtd)return $(e,[],!1,r);const n=(0,t.getSchemaTypes)(e.schema);$(e,n,!(0,t.coerceAndCheckDataType)(e,n),r)}function b({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){const s=r.$comment;if(!0===o.$comment)e.code(a._`${l.default.self}.logger.log(${s})`);else if("function"==typeof o.$comment){const r=a.str`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(a._`${l.default.self}.opts.$comment(${s}, ${r}, ${o}.schema)`)}}function $(e,t,o,s){const{gen:i,schema:c,data:p,allErrors:u,opts:h,self:f}=e,{RULES:m}=f;function g(d){(0,r.shouldUseGroup)(c,d)&&(d.type?(i.if((0,n.checkDataType)(d.type,p,h.strictNumbers)),x(e,d),1===t.length&&t[0]===d.type&&o&&(i.else(),(0,n.reportTypeError)(e)),i.endIf()):x(e,d),u||i.if(a._`${l.default.errors} === ${s||0}`))}!c.$ref||!h.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(c,m)?(h.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach(t=>{_(e.dataTypes,t)||k(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function(e,t){const r=[];for(const n of e.dataTypes)_(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&k(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const n=e.self.RULES.all;for(const o in n){const s=n[o];if("object"==typeof s&&(0,r.shouldUseRule)(e.schema,s)){const{type:r}=s.definition;r.length&&!r.some(e=>w(t,e))&&k(e,`missing type "${r.join(",")}" for keyword "${o}"`)}}}(e,e.dataTypes)}(e,t),i.block(()=>{for(const e of m.rules)g(e);g(m.post)})):i.block(()=>O(e,"$ref",m.all.$ref.definition))}function x(e,t){const{gen:n,schema:s,opts:{useDefaults:i}}=e;i&&(0,o.assignDefaults)(e,t.type),n.block(()=>{for(const n of t.rules)(0,r.shouldUseRule)(s,n)&&O(e,n.keyword,n.definition,t.type)})}function w(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function _(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function k(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}at.validateFunctionCode=function(t){g(t)&&(y(t),m(t))?function(e){const{schema:t,opts:r,gen:n}=e;u(e,()=>{r.$comment&&t.$comment&&b(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,d.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(l.default.vErrors,null),n.let(l.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",a._`${r}.evaluated`),t.if(a._`${e.evaluated}.dynamicProps`,()=>t.assign(a._`${e.evaluated}.props`,a._`undefined`)),t.if(a._`${e.evaluated}.dynamicItems`,()=>t.assign(a._`${e.evaluated}.items`,a._`undefined`))}(e),v(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:s}=e;r.$async?t.if(a._`${l.default.errors} === 0`,()=>t.return(l.default.data),()=>t.throw(a._`new ${o}(${l.default.vErrors})`)):(t.assign(a._`${n}.errors`,l.default.vErrors),s.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof a.Name&&e.assign(a._`${t}.props`,r);n instanceof a.Name&&e.assign(a._`${t}.items`,n)}(e),t.return(a._`${l.default.errors} === 0`))}(e)})}(t):u(t,()=>(0,e.topBoolOrEmptySchema)(t))};class S{constructor(e,t,r){if((0,s.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",E(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",l.default.errors))}result(e,t,r){this.failResult((0,a.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,a.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(a._`${t} !== undefined && (${(0,a.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?p.reportExtraError:p.reportError)(this,this.def.error,t)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=a.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=a.nil,t=a.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:o,def:s}=this;r.if((0,a.or)(a._`${n} === undefined`,t)),e!==a.nil&&r.assign(e,!0),(o.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==a.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:o,it:s}=this;return(0,a.or)(function(){if(r.length){if(!(t instanceof a.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return a._`${(0,n.checkDataTypes)(e,t,s.opts.strictNumbers,n.DataType.Wrong)}`}return a.nil}(),function(){if(o.validateSchema){const r=e.scopeValue("validate$data",{ref:o.validateSchema});return a._`!${r}(${t})`}return a.nil}())}subschema(e,t){const r=(0,i.getSubschema)(this.it,e);(0,i.extendSubschemaData)(r,this.it,e),(0,i.extendSubschemaMode)(r,e);const n={...this.it,...r,items:void 0,props:void 0};return f(n,t),n}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=d.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=d.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,()=>this.mergeEvaluated(e,a.Name)),!0}}function O(e,t,r,n){const o=new S(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,s.funcKeywordCode)(o,r):"macro"in r?(0,s.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,s.funcKeywordCode)(o,r)}at.KeywordCxt=S;const j=/^\/(?:[^~]|~0|~1)*$/,P=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function E(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,s;if(""===e)return l.default.rootData;if("/"===e[0]){if(!j.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,s=l.default.rootData}else{const i=P.exec(e);if(!i)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+i[1];if(o=i[2],"#"===o){if(a>=t)throw new Error(p("property/index",a));return n[t-a]}if(a>t)throw new Error(p("data",a));if(s=r[t-a],!o)return s}let i=s;const c=o.split("/");for(const l of c)l&&(s=a._`${s}${(0,a.getProperty)((0,d.unescapeJsonPointer)(l))}`,i=a._`${i} && ${s}`);return i;function p(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}return at.getData=E,at}var ir,ar={};function lr(){if(ir)return ar;ir=1,Object.defineProperty(ar,"__esModule",{value:!0});class e extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}return ar.default=e,ar}var cr,dr={};function pr(){if(cr)return dr;cr=1,Object.defineProperty(dr,"__esModule",{value:!0});const e=or();class t extends Error{constructor(t,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,e.resolveUrl)(t,r,n),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(t,this.missingRef))}}return dr.default=t,dr}var ur,hr={};function fr(){if(ur)return hr;ur=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.resolveSchema=hr.getCompilingSchema=hr.resolveRef=hr.compileSchema=hr.SchemaEnv=void 0;const e=yt(),t=lr(),r=St(),n=or(),o=$t(),s=sr();class i{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,n.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function a(o){const i=c.call(this,o);if(i)return i;const a=(0,n.getFullPath)(this.opts.uriResolver,o.root.baseId),{es5:l,lines:d}=this.opts.code,{ownProperties:p}=this.opts,u=new e.CodeGen(this.scope,{es5:l,lines:d,ownProperties:p});let h;o.$async&&(h=u.scopeValue("Error",{ref:t.default,code:e._`require("ajv/dist/runtime/validation_error").default`}));const f=u.scopeName("validate");o.validateName=f;const m={gen:u,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:u.scopeValue("schema",!0===this.opts.code.source?{ref:o.schema,code:(0,e.stringify)(o.schema)}:{ref:o.schema}),validateName:f,ValidationError:h,schema:o.schema,schemaEnv:o,rootId:a,baseId:o.baseId||a,schemaPath:e.nil,errSchemaPath:o.schemaPath||(this.opts.jtd?"":"#"),errorPath:e._`""`,opts:this.opts,self:this};let g;try{this._compilations.add(o),(0,s.validateFunctionCode)(m),u.optimize(this.opts.code.optimize);const t=u.toString();g=`${u.scopeRefs(r.default.scope)}return ${t}`,this.opts.code.process&&(g=this.opts.code.process(g,o));const n=new Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(f,{ref:n}),n.errors=null,n.schema=o.schema,n.schemaEnv=o,o.$async&&(n.$async=!0),!0===this.opts.code.source&&(n.source={validateName:f,validateCode:t,scopeValues:u._values}),this.opts.unevaluated){const{props:t,items:r}=m;n.evaluated={props:t instanceof e.Name?void 0:t,items:r instanceof e.Name?void 0:r,dynamicProps:t instanceof e.Name,dynamicItems:r instanceof e.Name},n.source&&(n.source.evaluated=(0,e.stringify)(n.evaluated))}return o.validate=n,o}catch(y){throw delete o.validate,delete o.validateName,g&&this.logger.error("Error compiling schema, function code:",g),y}finally{this._compilations.delete(o)}}function l(e){return(0,n.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:a.call(this,e)}function c(e){for(const t of this._compilations)if(d(t,e))return t}function d(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function p(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||u.call(this,e,t)}function u(e,t){const r=this.opts.uriResolver.parse(t),o=(0,n._getFullPath)(this.opts.uriResolver,r);let s=(0,n.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===s)return f.call(this,r,e);const l=(0,n.normalizeId)(o),c=this.refs[l]||this.schemas[l];if("string"==typeof c){const t=u.call(this,e,c);if("object"!=typeof(null==t?void 0:t.schema))return;return f.call(this,r,t)}if("object"==typeof(null==c?void 0:c.schema)){if(c.validate||a.call(this,c),l===(0,n.normalizeId)(t)){const{schema:t}=c,{schemaId:r}=this.opts,o=t[r];return o&&(s=(0,n.resolveUrl)(this.opts.uriResolver,s,o)),new i({schema:t,schemaId:r,root:e,baseId:s})}return f.call(this,r,c)}}hr.SchemaEnv=i,hr.compileSchema=a,hr.resolveRef=function(e,t,r){var o;r=(0,n.resolveUrl)(this.opts.uriResolver,t,r);const s=e.refs[r];if(s)return s;let a=p.call(this,e,r);if(void 0===a){const n=null===(o=e.localRefs)||void 0===o?void 0:o[r],{schemaId:s}=this.opts;n&&(a=new i({schema:n,schemaId:s,root:e,baseId:t}))}return void 0!==a?e.refs[r]=l.call(this,a):void 0},hr.getCompilingSchema=c,hr.resolveSchema=u;const h=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function f(e,{baseId:t,schema:r,root:s}){var a;if("/"!==(null===(a=e.fragment)||void 0===a?void 0:a[0]))return;for(const i of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,o.unescapeFragment)(i)];if(void 0===e)return;const s="object"==typeof(r=e)&&r[this.opts.schemaId];!h.has(i)&&s&&(t=(0,n.resolveUrl)(this.opts.uriResolver,t,s))}let l;if("boolean"!=typeof r&&r.$ref&&!(0,o.schemaHasRulesButRef)(r,this.RULES)){const e=(0,n.resolveUrl)(this.opts.uriResolver,t,r.$ref);l=u.call(this,s,e)}const{schemaId:c}=this.opts;return l=l||new i({schema:r,schemaId:c,root:s,baseId:t}),l.schema!==l.root.schema?l:void 0}return hr}const mr={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var gr,yr,vr,br,$r,xr,wr,_r={},kr={exports:{}};function Sr(){if(yr)return gr;yr=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(e){let t="",r=0,n=0;for(n=0;n<e.length;n++)if(r=e[n].charCodeAt(0),48!==r){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(r=e[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(e){return e.length=0,!0}function s(e,t,n){if(e.length){const o=r(e);if(""===o)return n.error=!0,!1;t.push(o),e.length=0}return!0}function i(e){if(function(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}(e,":")<2)return{host:e,isIPV6:!1};const t=function(e){let t=0;const n={error:!1,address:"",zone:""},i=[],a=[];let l=!1,c=!1,d=s;for(let r=0;r<e.length;r++){const s=e[r];if("["!==s&&"]"!==s)if(":"!==s)if("%"===s){if(!d(a,i,n))break;d=o}else a.push(s);else{if(!0===l&&(c=!0),!d(a,i,n))break;if(++t>7){n.error=!0;break}r>0&&":"===e[r-1]&&(l=!0),i.push(":")}}return a.length&&(d===o?n.zone=a.join(""):c?i.push(a.join("")):i.push(r(a))),n.address=i.join(""),n}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,r=t.address;return t.zone&&(e+="%"+t.zone,r+="%25"+t.zone),{host:e,isIPV6:!0,escapedHost:r}}}return gr={nonSimpleDomain:n,recomposeAuthority:function(e){const r=[];if(void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host){let n=unescape(e.host);if(!t(n)){const t=i(n);n=!0===t.isIPV6?`[${t.escapedHost}]`:e.host}r.push(n)}return"number"!=typeof e.port&&"string"!=typeof e.port||(r.push(":"),r.push(String(e.port))),r.length?r.join(""):void 0},normalizeComponentEncoding:function(e,t){const r=!0!==t?escape:unescape;return void 0!==e.scheme&&(e.scheme=r(e.scheme)),void 0!==e.userinfo&&(e.userinfo=r(e.userinfo)),void 0!==e.host&&(e.host=r(e.host)),void 0!==e.path&&(e.path=r(e.path)),void 0!==e.query&&(e.query=r(e.query)),void 0!==e.fragment&&(e.fragment=r(e.fragment)),e},removeDotSegments:function(e){let t=e;const r=[];let n=-1,o=0;for(;o=t.length;){if(1===o){if("."===t)break;if("/"===t){r.push("/");break}r.push(t);break}if(2===o){if("."===t[0]){if("."===t[1])break;if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&("."===t[1]||"/"===t[1])){r.push("/");break}}else if(3===o&&"/.."===t){0!==r.length&&r.pop(),r.push("/");break}if("."===t[0]){if("."===t[1]){if("/"===t[2]){t=t.slice(3);continue}}else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&"."===t[1]){if("/"===t[2]){t=t.slice(2);continue}if("."===t[2]&&"/"===t[3]){t=t.slice(3),0!==r.length&&r.pop();continue}}if(-1===(n=t.indexOf("/",1))){r.push(t);break}r.push(t.slice(0,n)),t=t.slice(n)}return r.join("")},isIPv4:t,isUUID:e,normalizeIPv6:i,stringArrayToHexStripped:r}}function Or(){if($r)return kr.exports;$r=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:o,nonSimpleDomain:s}=Sr(),{SCHEMES:i,getSchemeHandler:a}=function(){if(br)return vr;br=1;const{isUUID:e}=Sr(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(e){return!0===e.secure||!1!==e.secure&&!!e.scheme&&!(3!==e.scheme.length||"w"!==e.scheme[0]&&"W"!==e.scheme[0]||"s"!==e.scheme[1]&&"S"!==e.scheme[1]||"s"!==e.scheme[2]&&"S"!==e.scheme[2])}function o(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function s(e){const t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const i={scheme:"http",domainHost:!0,parse:o,serialize:s},a={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(n(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},l={http:i,https:{scheme:"https",domainHost:i.domainHost,parse:o,serialize:s},ws:a,wss:{scheme:"wss",domainHost:a.domainHost,parse:a.parse,serialize:a.serialize},urn:{scheme:"urn",parse:function(e,r){if(!e.path)return e.error="URN can not be parsed",e;const n=e.path.match(t);if(n){const t=r.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];const o=c(`${t}:${r.nid||e.nid}`);e.path=void 0,o&&(e=o.parse(e,r))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){if(void 0===e.nid)throw new Error("URN without nid cannot be serialized");const r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),o=c(`${r}:${t.nid||n}`);o&&(e=o.serialize(e,t));const s=e,i=e.nss;return s.path=`${n||t.nid}:${i}`,t.skipEscape=!0,s},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(t,r){const n=t;return n.uuid=n.nss,n.nss=void 0,r.tolerant||n.uuid&&e(n.uuid)||(n.error=n.error||"UUID is not valid."),n},serialize:function(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t},skipNormalize:!0}};function c(e){return e&&(l[e]||l[e.toLowerCase()])||void 0}return Object.setPrototypeOf(l,null),vr={wsIsSecure:n,SCHEMES:l,isValidSchemeName:function(e){return-1!==r.indexOf(e)},getSchemeHandler:c}}();function l(e,r,n,o){const s={};return o||(e=p(c(e,n),n),r=p(c(r,n),n)),!(n=n||{}).tolerant&&r.scheme?(s.scheme=r.scheme,s.userinfo=r.userinfo,s.host=r.host,s.port=r.port,s.path=t(r.path||""),s.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(s.userinfo=r.userinfo,s.host=r.host,s.port=r.port,s.path=t(r.path||""),s.query=r.query):(r.path?("/"===r.path[0]?s.path=t(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?s.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:s.path=r.path:s.path="/"+r.path,s.path=t(s.path)),s.query=r.query):(s.path=e.path,void 0!==r.query?s.query=r.query:s.query=e.query),s.userinfo=e.userinfo,s.host=e.host,s.port=e.port),s.scheme=e.scheme),s.fragment=r.fragment,s}function c(e,n){const o={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},s=Object.assign({},n),i=[],l=a(s.scheme||o.scheme);l&&l.serialize&&l.serialize(o,s),void 0!==o.path&&(s.skipEscape?o.path=unescape(o.path):(o.path=escape(o.path),void 0!==o.scheme&&(o.path=o.path.split("%3A").join(":")))),"suffix"!==s.reference&&o.scheme&&i.push(o.scheme,":");const c=r(o);if(void 0!==c&&("suffix"!==s.reference&&i.push("//"),i.push(c),o.path&&"/"!==o.path[0]&&i.push("/")),void 0!==o.path){let e=o.path;s.absolutePath||l&&l.absolutePath||(e=t(e)),void 0===c&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),i.push(e)}return void 0!==o.query&&i.push("?",o.query),void 0!==o.fragment&&i.push("#",o.fragment),i.join("")}const d=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function p(t,r){const n=Object.assign({},r),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let l=!1;"suffix"===n.reference&&(t=n.scheme?n.scheme+":"+t:"//"+t);const c=t.match(d);if(c){if(i.scheme=c[1],i.userinfo=c[3],i.host=c[4],i.port=parseInt(c[5],10),i.path=c[6]||"",i.query=c[7],i.fragment=c[8],isNaN(i.port)&&(i.port=c[5]),i.host){if(!1===o(i.host)){const t=e(i.host);i.host=t.host.toLowerCase(),l=t.isIPV6}else l=!0}void 0!==i.scheme||void 0!==i.userinfo||void 0!==i.host||void 0!==i.port||void 0!==i.query||i.path?void 0===i.scheme?i.reference="relative":void 0===i.fragment?i.reference="absolute":i.reference="uri":i.reference="same-document",n.reference&&"suffix"!==n.reference&&n.reference!==i.reference&&(i.error=i.error||"URI is not a "+n.reference+" reference.");const r=a(n.scheme||i.scheme);if(!(n.unicodeSupport||r&&r.unicodeSupport)&&i.host&&(n.domainHost||r&&r.domainHost)&&!1===l&&s(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(p){i.error=i.error||"Host's domain name can not be converted to ASCII: "+p}(!r||r&&!r.skipNormalize)&&(-1!==t.indexOf("%")&&(void 0!==i.scheme&&(i.scheme=unescape(i.scheme)),void 0!==i.host&&(i.host=unescape(i.host))),i.path&&(i.path=escape(unescape(i.path))),i.fragment&&(i.fragment=encodeURI(decodeURIComponent(i.fragment)))),r&&r.parse&&r.parse(i,n)}else i.error=i.error||"URI can not be parsed.";return i}const u={SCHEMES:i,normalize:function(e,t){return"string"==typeof e?e=c(p(e,t),t):"object"==typeof e&&(e=p(c(e,t),t)),e},resolve:function(e,t,r){const n=r?Object.assign({scheme:"null"},r):{scheme:"null"},o=l(p(e,n),p(t,n),n,!0);return n.skipEscape=!0,c(o,n)},resolveComponent:l,equal:function(e,t,r){return"string"==typeof e?(e=unescape(e),e=c(n(p(e,r),!0),{...r,skipEscape:!0})):"object"==typeof e&&(e=c(n(e,!0),{...r,skipEscape:!0})),"string"==typeof t?(t=unescape(t),t=c(n(p(t,r),!0),{...r,skipEscape:!0})):"object"==typeof t&&(t=c(n(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:c,parse:p};return kr.exports=u,kr.exports.default=u,kr.exports.fastUri=u,kr.exports}function jr(){if(xr)return _r;xr=1,Object.defineProperty(_r,"__esModule",{value:!0});const e=Or();return e.code='require("ajv/dist/runtime/uri").default',_r.default=e,_r}function Pr(){return wr||(wr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=sr();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=yt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=lr(),o=pr(),s=At(),i=fr(),a=yt(),l=or(),c=Mt(),d=$t(),p=mr,u=jr(),h=(e,t)=>new RegExp(e,t);h.code="new RegExp";const f=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function v(e){var t,r,n,o,s,i,a,l,c,d,p,f,m,g,y,v,b,$,x,w,_,k,S,O,j;const P=e.strict,E=null===(t=e.code)||void 0===t?void 0:t.optimize,T=!0===E||void 0===E?1:E||0,A=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:h,C=null!==(o=e.uriResolver)&&void 0!==o?o:u.default;return{strictSchema:null===(i=null!==(s=e.strictSchema)&&void 0!==s?s:P)||void 0===i||i,strictNumbers:null===(l=null!==(a=e.strictNumbers)&&void 0!==a?a:P)||void 0===l||l,strictTypes:null!==(d=null!==(c=e.strictTypes)&&void 0!==c?c:P)&&void 0!==d?d:"log",strictTuples:null!==(f=null!==(p=e.strictTuples)&&void 0!==p?p:P)&&void 0!==f?f:"log",strictRequired:null!==(g=null!==(m=e.strictRequired)&&void 0!==m?m:P)&&void 0!==g&&g,code:e.code?{...e.code,optimize:T,regExp:A}:{optimize:T,regExp:A},loopRequired:null!==(y=e.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(b=e.meta)||void 0===b||b,messages:null===($=e.messages)||void 0===$||$,inlineRefs:null===(x=e.inlineRefs)||void 0===x||x,schemaId:null!==(w=e.schemaId)&&void 0!==w?w:"$id",addUsedSchema:null===(_=e.addUsedSchema)||void 0===_||_,validateSchema:null===(k=e.validateSchema)||void 0===k||k,validateFormats:null===(S=e.validateFormats)||void 0===S||S,unicodeRegExp:null===(O=e.unicodeRegExp)||void 0===O||O,int32range:null===(j=e.int32range)||void 0===j||j,uriResolver:C}}class b{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...v(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:m,es5:t,lines:r}),this.logger=function(e){if(!1===e)return O;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,s.getRules)(),$.call(this,g,e,"NOT SUPPORTED"),$.call(this,y,e,"DEPRECATED","warn"),this._metaOpts=S.call(this),e.formats&&_.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&k.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),w.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=p;"id"===r&&(n={...p},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await s.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||i.call(this,r)}async function s(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function i(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return a.call(this,t),await l.call(this,t.missingSchema),i.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function l(e){const r=await c.call(this,e);this.refs[e]||await s.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=(0,l.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=x.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new i.SchemaEnv({schema:{},schemaId:r});if(t=i.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=x.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,l.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(P.call(this,r,t),!t)return(0,d.eachItem)(r,e=>E.call(this,e)),this;A.call(this,t);const n={...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)};return(0,d.eachItem)(r,0===n.type.length?e=>E.call(this,e,n):e=>n.type.forEach(t=>E.call(this,e,n,t))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex(t=>t.keyword===e);t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map(e=>`${r}${e.instancePath} ${e.message}`).reduce((e,r)=>e+t+r):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,s=o[e];n&&s&&(o[e]=I(s))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let s;const{schemaId:a}=this.opts;if("object"==typeof e)s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(void 0!==c)return c;r=(0,l.normalizeId)(s||r);const d=l.getSchemaRefs.call(this,e,r);return c=new i.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:r,localRefs:d}),this._cache.set(c.schema,c),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=c),n&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):i.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,e)}finally{this.opts=t}}}function $(e,t,r,n="error"){for(const o in e){const s=o;s in t&&this.logger[n](`${r}: option ${o}. ${e[s]}`)}}function x(e){return e=(0,l.normalizeId)(e),this.schemas[e]||this.refs[e]}function w(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function _(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function k(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function S(){const e={...this.opts};for(const t of f)delete e[t];return e}b.ValidationError=n.default,b.MissingRefError=o.default,e.default=b;const O={log(){},warn(){},error(){}};const j=/^[a-z_$][a-z0-9_$:-]*$/i;function P(e,t){const{RULES:r}=this;if((0,d.eachItem)(e,e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!j.test(e))throw new Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function E(e,t,r){var n;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let i=o?s.post:s.rules.find(({type:e})=>e===r);if(i||(i={type:r,rules:[]},s.rules.push(i)),s.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)}};t.before?T.call(this,i,a,t.before):i.rules.push(a),s.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach(e=>this.addKeyword(e))}function T(e,t,r){const n=e.rules.findIndex(e=>e.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function A(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=I(t)),e.validateSchema=this.compile(t,!0))}const C={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function I(e){return{anyOf:[e,C]}}}(it)),it}var Er,Tr,Ar={},Cr={},Ir={};function Rr(){if(Er)return Ir;Er=1,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.callRef=Ir.getValidate=void 0;const e=pr(),t=Ft(),r=yt(),n=St(),o=fr(),s=$t(),i={keyword:"$ref",schemaType:"string",code(t){const{gen:n,schema:s,it:i}=t,{baseId:c,schemaEnv:d,validateName:p,opts:u,self:h}=i,{root:f}=d;if(("#"===s||"#/"===s)&&c===f.baseId)return function(){if(d===f)return l(t,p,d,d.$async);const e=n.scopeValue("root",{ref:f});return l(t,r._`${e}.validate`,f,f.$async)}();const m=o.resolveRef.call(h,f,c,s);if(void 0===m)throw new e.default(i.opts.uriResolver,c,s);return m instanceof o.SchemaEnv?function(e){const r=a(t,e);l(t,r,e,e.$async)}(m):function(e){const o=n.scopeValue("schema",!0===u.code.source?{ref:e,code:(0,r.stringify)(e)}:{ref:e}),i=n.name("valid"),a=t.subschema({schema:e,dataTypes:[],schemaPath:r.nil,topSchemaRef:o,errSchemaPath:s},i);t.mergeEvaluated(a),t.ok(i)}(m)}};function a(e,t){const{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):r._`${n.scopeValue("wrapper",{ref:t})}.validate`}function l(e,o,i,a){const{gen:l,it:c}=e,{allErrors:d,schemaEnv:p,opts:u}=c,h=u.passContext?n.default.this:r.nil;function f(e){const t=r._`${e}.errors`;l.assign(n.default.vErrors,r._`${n.default.vErrors} === null ? ${t} : ${n.default.vErrors}.concat(${t})`),l.assign(n.default.errors,r._`${n.default.vErrors}.length`)}function m(e){var t;if(!c.opts.unevaluated)return;const n=null===(t=null==i?void 0:i.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(n&&!n.dynamicProps)void 0!==n.props&&(c.props=s.mergeEvaluated.props(l,n.props,c.props));else{const t=l.var("props",r._`${e}.evaluated.props`);c.props=s.mergeEvaluated.props(l,t,c.props,r.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=s.mergeEvaluated.items(l,n.items,c.items));else{const t=l.var("items",r._`${e}.evaluated.items`);c.items=s.mergeEvaluated.items(l,t,c.items,r.Name)}}a?function(){if(!p.$async)throw new Error("async schema referenced by sync schema");const n=l.let("valid");l.try(()=>{l.code(r._`await ${(0,t.callValidateCode)(e,o,h)}`),m(o),d||l.assign(n,!0)},e=>{l.if(r._`!(${e} instanceof ${c.ValidationError})`,()=>l.throw(e)),f(e),d||l.assign(n,!1)}),e.ok(n)}():e.result((0,t.callValidateCode)(e,o,h),()=>m(o),()=>f(o))}return Ir.getValidate=a,Ir.callRef=l,Ir.default=i,Ir}var Nr,Mr={},qr={};var zr,Lr={};var Ur,Dr={};function Br(){if(Ur)return Dr;Ur=1,Object.defineProperty(Dr,"__esModule",{value:!0});const e=yt(),t={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:t})=>e.str`must be multiple of ${t}`,params:({schemaCode:t})=>e._`{multipleOf: ${t}}`},code(t){const{gen:r,data:n,schemaCode:o,it:s}=t,i=s.opts.multipleOfPrecision,a=r.let("res"),l=i?e._`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:e._`${a} !== parseInt(${a})`;t.fail$data(e._`(${o} === 0 || (${a} = ${n}/${o}, ${l}))`)}};return Dr.default=t,Dr}var Hr,Fr,Vr={},Gr={};function Jr(){if(Hr)return Gr;function e(e){const t=e.length;let r,n=0,o=0;for(;o<t;)n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),56320==(64512&r)&&o++);return n}return Hr=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Gr}function Wr(){if(Fr)return Vr;Fr=1,Object.defineProperty(Vr,"__esModule",{value:!0});const e=yt(),t=$t(),r=Jr(),n={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:r}){const n="maxLength"===t?"more":"fewer";return e.str`must NOT have ${n} than ${r} characters`},params:({schemaCode:t})=>e._`{limit: ${t}}`},code(n){const{keyword:o,data:s,schemaCode:i,it:a}=n,l="maxLength"===o?e.operators.GT:e.operators.LT,c=!1===a.opts.unicode?e._`${s}.length`:e._`${(0,t.useFunc)(n.gen,r.default)}(${s})`;n.fail$data(e._`${c} ${l} ${i}`)}};return Vr.default=n,Vr}var Kr,Zr={};function Yr(){if(Kr)return Zr;Kr=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=Ft(),t=$t(),r=yt(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>r.str`must match pattern "${e}"`,params:({schemaCode:e})=>r._`{pattern: ${e}}`},code(n){const{gen:o,data:s,$data:i,schema:a,schemaCode:l,it:c}=n,d=c.opts.unicodeRegExp?"u":"";if(i){const{regExp:e}=c.opts.code,i="new RegExp"===e.code?r._`new RegExp`:(0,t.useFunc)(o,e),a=o.let("valid");o.try(()=>o.assign(a,r._`${i}(${l}, ${d}).test(${s})`),()=>o.assign(a,!1)),n.fail$data(r._`!${a}`)}else{const t=(0,e.usePattern)(n,a);n.fail$data(r._`!${t}.test(${s})`)}}};return Zr.default=n,Zr}var Qr,Xr={};function en(){if(Qr)return Xr;Qr=1,Object.defineProperty(Xr,"__esModule",{value:!0});const e=yt(),t={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:r}){const n="maxProperties"===t?"more":"fewer";return e.str`must NOT have ${n} than ${r} properties`},params:({schemaCode:t})=>e._`{limit: ${t}}`},code(t){const{keyword:r,data:n,schemaCode:o}=t,s="maxProperties"===r?e.operators.GT:e.operators.LT;t.fail$data(e._`Object.keys(${n}).length ${s} ${o}`)}};return Xr.default=t,Xr}var tn,rn={};function nn(){if(tn)return rn;tn=1,Object.defineProperty(rn,"__esModule",{value:!0});const e=Ft(),t=yt(),r=$t(),n={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>t.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>t._`{missingProperty: ${e}}`},code(n){const{gen:o,schema:s,schemaCode:i,data:a,$data:l,it:c}=n,{opts:d}=c;if(!l&&0===s.length)return;const p=s.length>=d.loopRequired;if(c.allErrors?function(){if(p||l)n.block$data(t.nil,u);else for(const t of s)(0,e.checkReportMissingProp)(n,t)}():function(){const r=o.let("missing");if(p||l){const s=o.let("valid",!0);n.block$data(s,()=>function(r,s){n.setParams({missingProperty:r}),o.forOf(r,i,()=>{o.assign(s,(0,e.propertyInData)(o,a,r,d.ownProperties)),o.if((0,t.not)(s),()=>{n.error(),o.break()})},t.nil)}(r,s)),n.ok(s)}else o.if((0,e.checkMissingProp)(n,s,r)),(0,e.reportMissingProp)(n,r),o.else()}(),d.strictRequired){const e=n.parentSchema.properties,{definedProperties:t}=n.it;for(const n of s)if(void 0===(null==e?void 0:e[n])&&!t.has(n)){const e=`required property "${n}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(c,e,c.opts.strictRequired)}}function u(){o.forOf("prop",i,t=>{n.setParams({missingProperty:t}),o.if((0,e.noPropertyInData)(o,a,t,d.ownProperties),()=>n.error())})}}};return rn.default=n,rn}var on,sn={};function an(){if(on)return sn;on=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=yt(),t={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:r}){const n="maxItems"===t?"more":"fewer";return e.str`must NOT have ${n} than ${r} items`},params:({schemaCode:t})=>e._`{limit: ${t}}`},code(t){const{keyword:r,data:n,schemaCode:o}=t,s="maxItems"===r?e.operators.GT:e.operators.LT;t.fail$data(e._`${n}.length ${s} ${o}`)}};return sn.default=t,sn}var ln,cn,dn={},pn={};function un(){if(ln)return pn;ln=1,Object.defineProperty(pn,"__esModule",{value:!0});const e=Qt();return e.code='require("ajv/dist/runtime/equal").default',pn.default=e,pn}function hn(){if(cn)return dn;cn=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=Mt(),t=yt(),r=$t(),n=un(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:r}})=>t.str`must NOT have duplicate items (items ## ${r} and ${e} are identical)`,params:({params:{i:e,j:r}})=>t._`{i: ${e}, j: ${r}}`},code(o){const{gen:s,data:i,$data:a,schema:l,parentSchema:c,schemaCode:d,it:p}=o;if(!a&&!l)return;const u=s.let("valid"),h=c.items?(0,e.getSchemaTypes)(c.items):[];function f(r,n){const a=s.name("item"),l=(0,e.checkDataTypes)(h,a,p.opts.strictNumbers,e.DataType.Wrong),c=s.const("indices",t._`{}`);s.for(t._`;${r}--;`,()=>{s.let(a,t._`${i}[${r}]`),s.if(l,t._`continue`),h.length>1&&s.if(t._`typeof ${a} == "string"`,t._`${a} += "_"`),s.if(t._`typeof ${c}[${a}] == "number"`,()=>{s.assign(n,t._`${c}[${a}]`),o.error(),s.assign(u,!1).break()}).code(t._`${c}[${a}] = ${r}`)})}function m(e,a){const l=(0,r.useFunc)(s,n.default),c=s.name("outer");s.label(c).for(t._`;${e}--;`,()=>s.for(t._`${a} = ${e}; ${a}--;`,()=>s.if(t._`${l}(${i}[${e}], ${i}[${a}])`,()=>{o.error(),s.assign(u,!1).break(c)})))}o.block$data(u,function(){const e=s.let("i",t._`${i}.length`),r=s.let("j");o.setParams({i:e,j:r}),s.assign(u,!0),s.if(t._`${e} > 1`,()=>(h.length>0&&!h.some(e=>"object"===e||"array"===e)?f:m)(e,r))},t._`${d} === false`),o.ok(u)}};return dn.default=o,dn}var fn,mn={};function gn(){if(fn)return mn;fn=1,Object.defineProperty(mn,"__esModule",{value:!0});const e=yt(),t=$t(),r=un(),n={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:t})=>e._`{allowedValue: ${t}}`},code(n){const{gen:o,data:s,$data:i,schemaCode:a,schema:l}=n;i||l&&"object"==typeof l?n.fail$data(e._`!${(0,t.useFunc)(o,r.default)}(${s}, ${a})`):n.fail(e._`${l} !== ${s}`)}};return mn.default=n,mn}var yn,vn,bn={};function $n(){if(yn)return bn;yn=1,Object.defineProperty(bn,"__esModule",{value:!0});const e=yt(),t=$t(),r=un(),n={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:t})=>e._`{allowedValues: ${t}}`},code(n){const{gen:o,data:s,$data:i,schema:a,schemaCode:l,it:c}=n;if(!i&&0===a.length)throw new Error("enum must have non-empty array");const d=a.length>=c.opts.loopEnum;let p;const u=()=>null!=p?p:p=(0,t.useFunc)(o,r.default);let h;if(d||i)h=o.let("valid"),n.block$data(h,function(){o.assign(h,!1),o.forOf("v",l,t=>o.if(e._`${u()}(${s}, ${t})`,()=>o.assign(h,!0).break()))});else{if(!Array.isArray(a))throw new Error("ajv implementation error");const t=o.const("vSchema",l);h=(0,e.or)(...a.map((r,n)=>function(t,r){const n=a[r];return"object"==typeof n&&null!==n?e._`${u()}(${s}, ${t}[${r}])`:e._`${s} === ${n}`}(t,n)))}n.pass(h)}};return bn.default=n,bn}function xn(){if(vn)return Mr;vn=1,Object.defineProperty(Mr,"__esModule",{value:!0});const e=function(){if(Nr)return qr;Nr=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=Pr(),t=yt().operators,r={maximum:{exclusive:"exclusiveMaximum",ops:[{okStr:"<=",ok:t.LTE,fail:t.GT},{okStr:"<",ok:t.LT,fail:t.GTE}]},minimum:{exclusive:"exclusiveMinimum",ops:[{okStr:">=",ok:t.GTE,fail:t.LT},{okStr:">",ok:t.GT,fail:t.LTE}]}},n={message:t=>e.str`must be ${s(t).okStr} ${t.schemaCode}`,params:t=>e._`{comparison: ${s(t).okStr}, limit: ${t.schemaCode}}`},o={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(t){const{data:r,schemaCode:n}=t;t.fail$data(e._`${r} ${s(t).fail} ${n} || isNaN(${r})`)}};function s(e){var t;const n=e.keyword,o=(null===(t=e.parentSchema)||void 0===t?void 0:t[r[n].exclusive])?1:0;return r[n].ops[o]}return qr.default=o,qr}(),t=function(){if(zr)return Lr;zr=1,Object.defineProperty(Lr,"__esModule",{value:!0});const e={exclusiveMaximum:"maximum",exclusiveMinimum:"minimum"},t={keyword:Object.keys(e),type:"number",schemaType:"boolean",code({keyword:t,parentSchema:r}){const n=e[t];if(void 0===r[n])throw new Error(`${t} can only be used with ${n}`)}};return Lr.default=t,Lr}(),r=Br(),n=Wr(),o=Yr(),s=en(),i=nn(),a=an(),l=hn(),c=gn(),d=$n(),p=[e.default,t.default,r.default,n.default,o.default,s.default,i.default,a.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,d.default];return Mr.default=p,Mr}var wn,_n={},kn={};function Sn(){if(wn)return kn;wn=1,Object.defineProperty(kn,"__esModule",{value:!0}),kn.validateAdditionalItems=void 0;const e=yt(),t=$t(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:t}})=>e.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>e._`{limit: ${t}}`},code(e){const{parentSchema:r,it:o}=e,{items:s}=r;Array.isArray(s)?n(e,s):(0,t.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas')}};function n(r,n){const{gen:o,schema:s,data:i,keyword:a,it:l}=r;l.items=!0;const c=o.const("len",e._`${i}.length`);if(!1===s)r.setParams({len:n.length}),r.pass(e._`${c} <= ${n.length}`);else if("object"==typeof s&&!(0,t.alwaysValidSchema)(l,s)){const s=o.var("valid",e._`${c} <= ${n.length}`);o.if((0,e.not)(s),()=>function(s){o.forRange("i",n.length,c,n=>{r.subschema({keyword:a,dataProp:n,dataPropType:t.Type.Num},s),l.allErrors||o.if((0,e.not)(s),()=>o.break())})}(s)),r.ok(s)}}return kn.validateAdditionalItems=n,kn.default=r,kn}var On,jn,Pn={},En={};function Tn(){if(On)return En;On=1,Object.defineProperty(En,"__esModule",{value:!0}),En.validateTuple=void 0;const e=yt(),t=$t(),r=Ft(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:n,it:s}=e;if(Array.isArray(n))return o(e,"additionalItems",n);s.items=!0,(0,t.alwaysValidSchema)(s,n)||e.ok((0,r.validateArray)(e))}};function o(r,n,o=r.schema){const{gen:s,parentSchema:i,data:a,keyword:l,it:c}=r;!function(e){const{opts:r,errSchemaPath:s}=c,i=o.length,a=i===e.minItems&&(i===e.maxItems||!1===e[n]);if(r.strictTuples&&!a){const e=`"${l}" is ${i}-tuple, but minItems or maxItems/${n} are not specified or different at path "${s}"`;(0,t.checkStrictMode)(c,e,r.strictTuples)}}(i),c.opts.unevaluated&&o.length&&!0!==c.items&&(c.items=t.mergeEvaluated.items(s,o.length,c.items));const d=s.name("valid"),p=s.const("len",e._`${a}.length`);o.forEach((n,o)=>{(0,t.alwaysValidSchema)(c,n)||(s.if(e._`${p} > ${o}`,()=>r.subschema({keyword:l,schemaProp:o,dataProp:o},d)),r.ok(d))})}return En.validateTuple=o,En.default=n,En}function An(){if(jn)return Pn;jn=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=Tn(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,e.validateTuple)(t,"items")};return Pn.default=t,Pn}var Cn,In={};function Rn(){if(Cn)return In;Cn=1,Object.defineProperty(In,"__esModule",{value:!0});const e=yt(),t=$t(),r=Ft(),n=Sn(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:t}})=>e.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>e._`{limit: ${t}}`},code(e){const{schema:o,parentSchema:s,it:i}=e,{prefixItems:a}=s;i.items=!0,(0,t.alwaysValidSchema)(i,o)||(a?(0,n.validateAdditionalItems)(e,a):e.ok((0,r.validateArray)(e)))}};return In.default=o,In}var Nn,Mn={};function qn(){if(Nn)return Mn;Nn=1,Object.defineProperty(Mn,"__esModule",{value:!0});const e=yt(),t=$t(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:t,max:r}})=>void 0===r?e.str`must contain at least ${t} valid item(s)`:e.str`must contain at least ${t} and no more than ${r} valid item(s)`,params:({params:{min:t,max:r}})=>void 0===r?e._`{minContains: ${t}}`:e._`{minContains: ${t}, maxContains: ${r}}`},code(r){const{gen:n,schema:o,parentSchema:s,data:i,it:a}=r;let l,c;const{minContains:d,maxContains:p}=s;a.opts.next?(l=void 0===d?1:d,c=p):l=1;const u=n.const("len",e._`${i}.length`);if(r.setParams({min:l,max:c}),void 0===c&&0===l)return void(0,t.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&l>c)return(0,t.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void r.fail();if((0,t.alwaysValidSchema)(a,o)){let t=e._`${u} >= ${l}`;return void 0!==c&&(t=e._`${t} && ${u} <= ${c}`),void r.pass(t)}a.items=!0;const h=n.name("valid");function f(){const t=n.name("_valid"),r=n.let("count",0);m(t,()=>n.if(t,()=>function(t){n.code(e._`${t}++`),void 0===c?n.if(e._`${t} >= ${l}`,()=>n.assign(h,!0).break()):(n.if(e._`${t} > ${c}`,()=>n.assign(h,!1).break()),1===l?n.assign(h,!0):n.if(e._`${t} >= ${l}`,()=>n.assign(h,!0)))}(r)))}function m(e,o){n.forRange("i",0,u,n=>{r.subschema({keyword:"contains",dataProp:n,dataPropType:t.Type.Num,compositeRule:!0},e),o()})}void 0===c&&1===l?m(h,()=>n.if(h,()=>n.break())):0===l?(n.let(h,!0),void 0!==c&&n.if(e._`${i}.length > 0`,f)):(n.let(h,!1),f()),r.result(h,()=>r.reset())}};return Mn.default=r,Mn}var zn,Ln={};function Un(){return zn||(zn=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=yt(),r=$t(),n=Ft();e.error={message:({params:{property:e,depsCount:r,deps:n}})=>{const o=1===r?"property":"properties";return t.str`must have ${o} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:r,deps:n,missingProperty:o}})=>t._`{property: ${e},
|
|
254
260
|
missingProperty: ${o},
|
|
255
261
|
depsCount: ${r},
|
|
256
|
-
deps: ${n}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);s(e,t),i(e,r)}};function s(e,r=e.schema){const{gen:o,data:s,it:i}=e;if(0===Object.keys(r).length)return;const a=o.let("missing");for(const l in r){const c=r[l];if(0===c.length)continue;const d=(0,n.propertyInData)(o,s,l,i.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),i.allErrors?o.if(d,()=>{for(const t of c)(0,n.checkReportMissingProp)(e,t)}):(o.if(t._`${d} && (${(0,n.checkMissingProp)(e,c,a)})`),(0,n.reportMissingProp)(e,a),o.else())}}function i(e,t=e.schema){const{gen:o,data:s,keyword:i,it:a}=e,l=o.name("valid");for(const c in t)(0,r.alwaysValidSchema)(a,t[c])||(o.if((0,n.propertyInData)(o,s,c,a.opts.ownProperties),()=>{const t=e.subschema({keyword:i,schemaProp:c},l);e.mergeValidEvaluated(t,l)},()=>o.var(l,!0)),e.ok(l))}e.validatePropertyDeps=s,e.validateSchemaDeps=i,e.default=o}(zn)),zn}var Ln,Dn={};function Bn(){if(Ln)return Dn;Ln=1,Object.defineProperty(Dn,"__esModule",{value:!0});const e=gt(),t=bt(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>e._`{propertyName: ${t.propertyName}}`},code(r){const{gen:n,schema:o,data:s,it:i}=r;if((0,t.alwaysValidSchema)(i,o))return;const a=n.name("valid");n.forIn("key",s,t=>{r.setParams({propertyName:t}),r.subschema({keyword:"propertyNames",data:t,dataTypes:["string"],propertyName:t,compositeRule:!0},a),n.if((0,e.not)(a),()=>{r.error(!0),i.allErrors||n.break()})}),r.ok(a)}};return Dn.default=r,Dn}var Hn,Fn={};function Vn(){if(Hn)return Fn;Hn=1,Object.defineProperty(Fn,"__esModule",{value:!0});const e=Ht(),t=gt(),r=kt(),n=bt(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>t._`{additionalProperty: ${e.additionalProperty}}`},code(o){const{gen:s,schema:i,parentSchema:a,data:l,errsCount:c,it:d}=o;if(!c)throw new Error("ajv implementation error");const{allErrors:p,opts:u}=d;if(d.props=!0,"all"!==u.removeAdditional&&(0,n.alwaysValidSchema)(d,i))return;const f=(0,e.allSchemaProperties)(a.properties),h=(0,e.allSchemaProperties)(a.patternProperties);function m(e){s.code(t._`delete ${l}[${e}]`)}function g(e){if("all"===u.removeAdditional||u.removeAdditional&&!1===i)m(e);else{if(!1===i)return o.setParams({additionalProperty:e}),o.error(),void(p||s.break());if("object"==typeof i&&!(0,n.alwaysValidSchema)(d,i)){const r=s.name("valid");"failing"===u.removeAdditional?(y(e,r,!1),s.if((0,t.not)(r),()=>{o.reset(),m(e)})):(y(e,r),p||s.if((0,t.not)(r),()=>s.break()))}}}function y(e,t,r){const s={keyword:"additionalProperties",dataProp:e,dataPropType:n.Type.Str};!1===r&&Object.assign(s,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(s,t)}s.forIn("key",l,r=>{f.length||h.length?s.if(function(r){let i;if(f.length>8){const t=(0,n.schemaRefOrVal)(d,a.properties,"properties");i=(0,e.isOwnProperty)(s,t,r)}else i=f.length?(0,t.or)(...f.map(e=>t._`${r} === ${e}`)):t.nil;return h.length&&(i=(0,t.or)(i,...h.map(n=>t._`${(0,e.usePattern)(o,n)}.test(${r})`))),(0,t.not)(i)}(r),()=>g(r)):g(r)}),o.ok(t._`${c} === ${r.default.errors}`)}};return Fn.default=o,Fn}var Jn,Wn={};function Gn(){if(Jn)return Wn;Jn=1,Object.defineProperty(Wn,"__esModule",{value:!0});const e=or(),t=Ht(),r=bt(),n=Vn(),o={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:s,schema:i,parentSchema:a,data:l,it:c}=o;"all"===c.opts.removeAdditional&&void 0===a.additionalProperties&&n.default.code(new e.KeywordCxt(c,n.default,"additionalProperties"));const d=(0,t.allSchemaProperties)(i);for(const e of d)c.definedProperties.add(e);c.opts.unevaluated&&d.length&&!0!==c.props&&(c.props=r.mergeEvaluated.props(s,(0,r.toHash)(d),c.props));const p=d.filter(e=>!(0,r.alwaysValidSchema)(c,i[e]));if(0===p.length)return;const u=s.name("valid");for(const e of p)f(e)?h(e):(s.if((0,t.propertyInData)(s,l,e,c.opts.ownProperties)),h(e),c.allErrors||s.else().var(u,!0),s.endIf()),o.it.definedProperties.add(e),o.ok(u);function f(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==i[e].default}function h(e){o.subschema({keyword:"properties",schemaProp:e,dataProp:e},u)}}};return Wn.default=o,Wn}var Kn,Zn={};function Qn(){if(Kn)return Zn;Kn=1,Object.defineProperty(Zn,"__esModule",{value:!0});const e=Ht(),t=gt(),r=bt(),n=bt(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:s,schema:i,data:a,parentSchema:l,it:c}=o,{opts:d}=c,p=(0,e.allSchemaProperties)(i),u=p.filter(e=>(0,r.alwaysValidSchema)(c,i[e]));if(0===p.length||u.length===p.length&&(!c.opts.unevaluated||!0===c.props))return;const f=d.strictSchema&&!d.allowMatchingProperties&&l.properties,h=s.name("valid");!0===c.props||c.props instanceof t.Name||(c.props=(0,n.evaluatedPropsToName)(s,c.props));const{props:m}=c;function g(e){for(const t in f)new RegExp(e).test(t)&&(0,r.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function y(r){s.forIn("key",a,i=>{s.if(t._`${(0,e.usePattern)(o,r)}.test(${i})`,()=>{const e=u.includes(r);e||o.subschema({keyword:"patternProperties",schemaProp:r,dataProp:i,dataPropType:n.Type.Str},h),c.opts.unevaluated&&!0!==m?s.assign(t._`${m}[${i}]`,!0):e||c.allErrors||s.if((0,t.not)(h),()=>s.break())})})}!function(){for(const e of p)f&&g(e),c.allErrors?y(e):(s.var(h,!0),y(e),s.if(h))}()}};return Zn.default=o,Zn}var Yn,Xn={};function eo(){if(Yn)return Xn;Yn=1,Object.defineProperty(Xn,"__esModule",{value:!0});const e=bt(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:r,schema:n,it:o}=t;if((0,e.alwaysValidSchema)(o,n))return void t.fail();const s=r.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),t.failResult(s,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};return Xn.default=t,Xn}var to,ro={};function no(){if(to)return ro;to=1,Object.defineProperty(ro,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ht().validateUnion,error:{message:"must match a schema in anyOf"}};return ro.default=e,ro}var oo,so={};function io(){if(oo)return so;oo=1,Object.defineProperty(so,"__esModule",{value:!0});const e=gt(),t=bt(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>e._`{passingSchemas: ${t.passing}}`},code(r){const{gen:n,schema:o,parentSchema:s,it:i}=r;if(!Array.isArray(o))throw new Error("ajv implementation error");if(i.opts.discriminator&&s.discriminator)return;const a=o,l=n.let("valid",!1),c=n.let("passing",null),d=n.name("_valid");r.setParams({passing:c}),n.block(function(){a.forEach((o,s)=>{let a;(0,t.alwaysValidSchema)(i,o)?n.var(d,!0):a=r.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},d),s>0&&n.if(e._`${d} && ${l}`).assign(l,!1).assign(c,e._`[${c}, ${s}]`).else(),n.if(d,()=>{n.assign(l,!0),n.assign(c,s),a&&r.mergeEvaluated(a,e.Name)})})}),r.result(l,()=>r.reset(),()=>r.error(!0))}};return so.default=r,so}var ao,lo={};function co(){if(ao)return lo;ao=1,Object.defineProperty(lo,"__esModule",{value:!0});const e=bt(),t={keyword:"allOf",schemaType:"array",code(t){const{gen:r,schema:n,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");const s=r.name("valid");n.forEach((r,n)=>{if((0,e.alwaysValidSchema)(o,r))return;const i=t.subschema({keyword:"allOf",schemaProp:n},s);t.ok(s),t.mergeEvaluated(i)})}};return lo.default=t,lo}var po,uo={};function fo(){if(po)return uo;po=1,Object.defineProperty(uo,"__esModule",{value:!0});const e=gt(),t=bt(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:t})=>e.str`must match "${t.ifClause}" schema`,params:({params:t})=>e._`{failingKeyword: ${t.ifClause}}`},code(r){const{gen:o,parentSchema:s,it:i}=r;void 0===s.then&&void 0===s.else&&(0,t.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const a=n(i,"then"),l=n(i,"else");if(!a&&!l)return;const c=o.let("valid",!0),d=o.name("_valid");if(function(){const e=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);r.mergeEvaluated(e)}(),r.reset(),a&&l){const e=o.let("ifClause");r.setParams({ifClause:e}),o.if(d,p("then",e),p("else",e))}else a?o.if(d,p("then")):o.if((0,e.not)(d),p("else"));function p(t,n){return()=>{const s=r.subschema({keyword:t},d);o.assign(c,d),r.mergeValidEvaluated(s,c),n?o.assign(n,e._`${t}`):r.setParams({ifClause:t})}}r.pass(c,()=>r.error(!0))}};function n(e,r){const n=e.schema[r];return void 0!==n&&!(0,t.alwaysValidSchema)(e,n)}return uo.default=r,uo}var ho,mo,go={};function yo(){if(ho)return go;ho=1,Object.defineProperty(go,"__esModule",{value:!0});const e=bt(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:r,it:n}){void 0===r.if&&(0,e.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};return go.default=t,go}function vo(){if(mo)return wn;mo=1,Object.defineProperty(wn,"__esModule",{value:!0});const e=kn(),t=Tn(),r=En(),n=In(),o=Mn(),s=Un(),i=Bn(),a=Vn(),l=Gn(),c=Qn(),d=eo(),p=no(),u=io(),f=co(),h=fo(),m=yo();return wn.default=function(g=!1){const y=[d.default,p.default,u.default,f.default,h.default,m.default,i.default,a.default,s.default,l.default,c.default];return g?y.push(t.default,n.default):y.push(e.default,r.default),y.push(o.default),y},wn}var bo,$o,xo,wo={},_o={};function ko(){if(bo)return _o;bo=1,Object.defineProperty(_o,"__esModule",{value:!0});const e=gt(),t={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>e.str`must match format "${t}"`,params:({schemaCode:t})=>e._`{format: ${t}}`},code(t,r){const{gen:n,data:o,$data:s,schema:i,schemaCode:a,it:l}=t,{opts:c,errSchemaPath:d,schemaEnv:p,self:u}=l;c.validateFormats&&(s?function(){const s=n.scopeValue("formats",{ref:u.formats,code:c.code.formats}),i=n.const("fDef",e._`${s}[${a}]`),l=n.let("fType"),d=n.let("format");n.if(e._`typeof ${i} == "object" && !(${i} instanceof RegExp)`,()=>n.assign(l,e._`${i}.type || "string"`).assign(d,e._`${i}.validate`),()=>n.assign(l,e._`"string"`).assign(d,i)),t.fail$data((0,e.or)(!1===c.strictSchema?e.nil:e._`${a} && !${d}`,function(){const t=p.$async?e._`(${i}.async ? await ${d}(${o}) : ${d}(${o}))`:e._`${d}(${o})`,n=e._`(typeof ${d} == "function" ? ${t} : ${d}.test(${o}))`;return e._`${d} && ${d} !== true && ${l} === ${r} && !${n}`}()))}():function(){const s=u.formats[i];if(!s)return void function(){if(!1===c.strictSchema)return void u.logger.warn(e());throw new Error(e());function e(){return`unknown format "${i}" ignored in schema at path "${d}"`}}();if(!0===s)return;const[a,l,f]=function(t){const r=t instanceof RegExp?(0,e.regexpCode)(t):c.code.formats?e._`${c.code.formats}${(0,e.getProperty)(i)}`:void 0,o=n.scopeValue("formats",{key:i,ref:t,code:r});if("object"==typeof t&&!(t instanceof RegExp))return[t.type||"string",t.validate,e._`${o}.validate`];return["string",t,o]}(s);a===r&&t.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!p.$async)throw new Error("async format in sync schema");return e._`await ${f}(${o})`}return"function"==typeof l?e._`${f}(${o})`:e._`${f}.test(${o})`}())}())}};return _o.default=t,_o}function So(){if($o)return wo;$o=1,Object.defineProperty(wo,"__esModule",{value:!0});const e=[ko().default];return wo.default=e,wo}function jo(){if(xo)return Tr;xo=1,Object.defineProperty(Tr,"__esModule",{value:!0});const e=function(){if(Er)return Ar;Er=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=["$schema","id","$defs",{keyword:"$comment"},"definitions",Ir().default];return Ar.default=e,Ar}(),t=$n(),r=vo(),n=So(),o=[e.default,t.default,r.default(),n.default,["title","description","default"]];return Tr.default=o,Tr}var Oo,Po,Eo={},To={};function Ao(){return Oo||(Oo=1,Object.defineProperty(To,"__esModule",{value:!0}),To.DiscrError=void 0,(t=e||(To.DiscrError=e={})).Tag="tag",t.Mapping="mapping"),To;var e,t}function Co(){if(Po)return Eo;Po=1,Object.defineProperty(Eo,"__esModule",{value:!0});const e=gt(),t=Ao(),r=fr(),n=dr(),o=bt(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:r}})=>e===t.DiscrError.Tag?`tag "${r}" must be string`:`value of tag "${r}" must be in oneOf`,params:({params:{discrError:t,tag:r,tagName:n}})=>e._`{error: ${t}, tag: ${n}, tagValue: ${r}}`},code(s){const{gen:i,data:a,schema:l,parentSchema:c,it:d}=s,{oneOf:p}=c;if(!d.opts.discriminator)throw new Error("discriminator: requires discriminator option");const u=l.propertyName;if("string"!=typeof u)throw new Error("discriminator: requires propertyName");if(l.mapping)throw new Error("discriminator: mapping is not supported");if(!p)throw new Error("discriminator: requires oneOf keyword");const f=i.let("valid",!1),h=i.const("tag",e._`${a}${(0,e.getProperty)(u)}`);function m(t){const r=i.name("valid"),n=s.subschema({keyword:"oneOf",schemaProp:t},r);return s.mergeEvaluated(n,e.Name),r}i.if(e._`typeof ${h} == "string"`,()=>function(){const a=function(){var e;const t={},s=a(c);let i=!0;for(let c=0;c<p.length;c++){let t=p[c];if((null==t?void 0:t.$ref)&&!(0,o.schemaHasRulesButRef)(t,d.self.RULES)){const e=t.$ref;if(t=r.resolveRef.call(d.self,d.schemaEnv.root,d.baseId,e),t instanceof r.SchemaEnv&&(t=t.schema),void 0===t)throw new n.default(d.opts.uriResolver,d.baseId,e)}const f=null===(e=null==t?void 0:t.properties)||void 0===e?void 0:e[u];if("object"!=typeof f)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);i=i&&(s||a(t)),l(f,c)}if(!i)throw new Error(`discriminator: "${u}" must be required`);return t;function a({required:e}){return Array.isArray(e)&&e.includes(u)}function l(e,t){if(e.const)f(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`);for(const r of e.enum)f(r,t)}}function f(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${u}" values must be unique strings`);t[e]=r}}();i.if(!1);for(const t in a)i.elseIf(e._`${h} === ${t}`),i.assign(f,m(a[t]));i.else(),s.error(!1,{discrError:t.DiscrError.Mapping,tag:h,tagName:u}),i.endIf()}(),()=>s.error(!1,{discrError:t.DiscrError.Tag,tag:h,tagName:u})),s.ok(f)}};return Eo.default=s,Eo}const Io={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}};var Ro;var No,Mo,qo={exports:{}},zo={},Uo={},Lo={};function Do(){if(No)return Lo;No=1,Object.defineProperty(Lo,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Lo.default=e,Lo}function Bo(){if(Mo)return Uo;Mo=1,Object.defineProperty(Uo,"__esModule",{value:!0});const e=Do(),t=Ir(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Uo.default=r,Uo}var Ho,Fo,Vo={},Jo={};function Wo(){if(Ho)return Jo;Ho=1,Object.defineProperty(Jo,"__esModule",{value:!0});const e=gt(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:t,schemaCode:n})=>e.str`must be ${r[t].okStr} ${n}`,params:({keyword:t,schemaCode:n})=>e._`{comparison: ${r[t].okStr}, limit: ${n}}`},o={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(t){const{keyword:n,data:o,schemaCode:s}=t;t.fail$data(e._`${o} ${r[n].fail} ${s} || isNaN(${o})`)}};return Jo.default=o,Jo}function Go(){if(Fo)return Vo;Fo=1,Object.defineProperty(Vo,"__esModule",{value:!0});const e=Wo(),t=Dr(),r=Wr(),n=Zr(),o=Xr(),s=rn(),i=sn(),a=un(),l=mn(),c=bn(),d=[e.default,t.default,r.default,n.default,o.default,s.default,i.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,c.default];return Vo.default=d,Vo}var Ko,Zo={},Qo={};function Yo(){if(Ko)return Qo;Ko=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.dynamicAnchor=void 0;const e=gt(),t=kt(),r=fr(),n=Ir(),o={keyword:"$dynamicAnchor",schemaType:"string",code:e=>s(e,e.schema)};function s(o,s){const{gen:i,it:a}=o;a.schemaEnv.root.dynamicAnchors[s]=!0;const l=e._`${t.default.dynamicAnchors}${(0,e.getProperty)(s)}`,c="#"===a.errSchemaPath?a.validateName:function(e){const{schemaEnv:t,schema:o,self:s}=e.it,{root:i,baseId:a,localRefs:l,meta:c}=t.root,{schemaId:d}=s.opts,p=new r.SchemaEnv({schema:o,schemaId:d,root:i,baseId:a,localRefs:l,meta:c});return r.compileSchema.call(s,p),(0,n.getValidate)(e,p)}(o);i.if(e._`!${l}`,()=>i.assign(l,c))}return Qo.dynamicAnchor=s,Qo.default=o,Qo}var Xo,es={};function ts(){if(Xo)return es;Xo=1,Object.defineProperty(es,"__esModule",{value:!0}),es.dynamicRef=void 0;const e=gt(),t=kt(),r=Ir(),n={keyword:"$dynamicRef",schemaType:"string",code:e=>o(e,e.schema)};function o(n,o){const{gen:s,keyword:i,it:a}=n;if("#"!==o[0])throw new Error(`"${i}" only supports hash fragment reference`);const l=o.slice(1);if(a.allErrors)c();else{const e=s.let("valid",!1);c(e),n.ok(e)}function c(r){if(a.schemaEnv.root.dynamicAnchors[l]){const n=s.let("_v",e._`${t.default.dynamicAnchors}${(0,e.getProperty)(l)}`);s.if(n,d(n,r),d(a.validateName,r))}else d(a.validateName,r)()}function d(e,t){return t?()=>s.block(()=>{(0,r.callRef)(n,e),s.let(t,!0)}):()=>(0,r.callRef)(n,e)}}return es.dynamicRef=o,es.default=n,es}var rs,ns={};function os(){if(rs)return ns;rs=1,Object.defineProperty(ns,"__esModule",{value:!0});const e=Yo(),t=bt(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0,e.dynamicAnchor)(r,""):(0,t.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored")}};return ns.default=r,ns}var ss,is,as={};function ls(){if(ss)return as;ss=1,Object.defineProperty(as,"__esModule",{value:!0});const e=ts(),t={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,e.dynamicRef)(t,t.schema)};return as.default=t,as}function cs(){if(is)return Zo;is=1,Object.defineProperty(Zo,"__esModule",{value:!0});const e=Yo(),t=ts(),r=os(),n=ls(),o=[e.default,t.default,r.default,n.default];return Zo.default=o,Zo}var ds,ps={},us={};function fs(){if(ds)return us;ds=1,Object.defineProperty(us,"__esModule",{value:!0});const e=Un(),t={keyword:"dependentRequired",type:"object",schemaType:"object",error:e.error,code:t=>(0,e.validatePropertyDeps)(t)};return us.default=t,us}var hs,ms={};function gs(){if(hs)return ms;hs=1,Object.defineProperty(ms,"__esModule",{value:!0});const e=Un(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,e.validateSchemaDeps)(t)};return ms.default=t,ms}var ys,vs,bs={};function $s(){if(ys)return bs;ys=1,Object.defineProperty(bs,"__esModule",{value:!0});const e=bt(),t={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:r,it:n}){void 0===r.contains&&(0,e.checkStrictMode)(n,`"${t}" without "contains" is ignored`)}};return bs.default=t,bs}function xs(){if(vs)return ps;vs=1,Object.defineProperty(ps,"__esModule",{value:!0});const e=fs(),t=gs(),r=$s(),n=[e.default,t.default,r.default];return ps.default=n,ps}var ws,_s={},ks={};function Ss(){if(ws)return ks;ws=1,Object.defineProperty(ks,"__esModule",{value:!0});const e=gt(),t=bt(),r=kt(),n={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:t})=>e._`{unevaluatedProperty: ${t.unevaluatedProperty}}`},code(n){const{gen:o,schema:s,data:i,errsCount:a,it:l}=n;if(!a)throw new Error("ajv implementation error");const{allErrors:c,props:d}=l;function p(r){if(!1===s)return n.setParams({unevaluatedProperty:r}),n.error(),void(c||o.break());if(!(0,t.alwaysValidSchema)(l,s)){const s=o.name("valid");n.subschema({keyword:"unevaluatedProperties",dataProp:r,dataPropType:t.Type.Str},s),c||o.if((0,e.not)(s),()=>o.break())}}d instanceof e.Name?o.if(e._`${d} !== true`,()=>o.forIn("key",i,t=>o.if(function(t,r){return e._`!${t} || !${t}[${r}]`}(d,t),()=>p(t)))):!0!==d&&o.forIn("key",i,t=>void 0===d?p(t):o.if(function(t,r){const n=[];for(const o in t)!0===t[o]&&n.push(e._`${r} !== ${o}`);return(0,e.and)(...n)}(d,t),()=>p(t))),l.props=!0,n.ok(e._`${a} === ${r.default.errors}`)}};return ks.default=n,ks}var js,Os,Ps={};function Es(){if(js)return Ps;js=1,Object.defineProperty(Ps,"__esModule",{value:!0});const e=gt(),t=bt(),r={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:t}})=>e.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>e._`{limit: ${t}}`},code(r){const{gen:n,schema:o,data:s,it:i}=r,a=i.items||0;if(!0===a)return;const l=n.const("len",e._`${s}.length`);if(!1===o)r.setParams({len:a}),r.fail(e._`${l} > ${a}`);else if("object"==typeof o&&!(0,t.alwaysValidSchema)(i,o)){const o=n.var("valid",e._`${l} <= ${a}`);n.if((0,e.not)(o),()=>function(o,s){n.forRange("i",s,l,s=>{r.subschema({keyword:"unevaluatedItems",dataProp:s,dataPropType:t.Type.Num},o),i.allErrors||n.if((0,e.not)(o),()=>n.break())})}(o,a)),r.ok(o)}i.items=!0}};return Ps.default=r,Ps}function Ts(){if(Os)return _s;Os=1,Object.defineProperty(_s,"__esModule",{value:!0});const e=Ss(),t=Es(),r=[e.default,t.default];return _s.default=r,_s}var As,Cs,Is={};function Rs(){return As||(As=1,Object.defineProperty(Is,"__esModule",{value:!0}),Is.contentVocabulary=Is.metadataVocabulary=void 0,Is.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Is.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Is}function Ns(){if(Cs)return zo;Cs=1,Object.defineProperty(zo,"__esModule",{value:!0});const e=Bo(),t=Go(),r=vo(),n=cs(),o=xs(),s=Ts(),i=So(),a=Rs(),l=[n.default,e.default,t.default,(0,r.default)(!0),i.default,a.metadataVocabulary,a.contentVocabulary,o.default,s.default];return zo.default=l,zo}var Ms={};const qs={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}},zs={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}},Us={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}},Ls={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}},Ds={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}},Bs={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}},Hs={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}},Fs={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}};var Vs,Js;function Ws(){if(Vs)return Ms;Vs=1,Object.defineProperty(Ms,"__esModule",{value:!0});const e=qs,t=zs,r=Us,n=Ls,o=Ds,s=Bs,i=Hs,a=Fs,l=["/properties"];return Ms.default=function(c){return[e,t,r,n,o,d(this,s),i,d(this,a)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function d(e,t){return c?e.$dataMetaSchema(t,l):t}},Ms}function Gs(){return Js||(Js=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const r=Or(),n=Ns(),o=Co(),s=Ws(),i="https://json-schema.org/draft/2020-12/schema";class a extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:e,meta:t}=this.opts;t&&(s.default.call(this,e),this.refs["http://json-schema.org/schema"]=i)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}t.Ajv2020=a,e.exports=t=a,e.exports.Ajv2020=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var l=or();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=gt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var d=ar();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var p=dr();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}(qo,qo.exports)),qo.exports}var Ks={exports:{}};const Zs={id:"https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v1.2/apiDeclaration.json#",$schema:"http://json-schema.org/draft-04/schema#",type:"object",required:["swaggerVersion","basePath","apis"],properties:{swaggerVersion:{enum:["1.2"]},apiVersion:{type:"string"},basePath:{type:"string",format:"uri",pattern:"^https?://"},resourcePath:{type:"string",format:"uri",pattern:"^/"},apis:{type:"array",items:{$ref:"#/definitions/apiObject"}},models:{type:"object",additionalProperties:{$ref:"modelsObject.json#"}},produces:{$ref:"#/definitions/mimeTypeArray"},consumes:{$ref:"#/definitions/mimeTypeArray"},authorizations:{$ref:"authorizationObject.json#"}},additionalProperties:!1,definitions:{apiObject:{type:"object",required:["path","operations"],properties:{path:{type:"string",format:"uri-template",pattern:"^/"},description:{type:"string"},operations:{type:"array",items:{$ref:"operationObject.json#"}}},additionalProperties:!1},mimeTypeArray:{type:"array",items:{type:"string",format:"mime-type"},uniqueItems:!0}}},Qs={title:"A JSON Schema for Swagger 2.0 API.",id:"http://swagger.io/v2/schema.json#",$schema:"http://json-schema.org/draft-04/schema#",type:"object",required:["swagger","info","paths"],additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{swagger:{type:"string",enum:["2.0"],description:"The Swagger version of this document."},info:{$ref:"#/definitions/info"},host:{type:"string",pattern:"^[^{}/ :\\\\]+(?::\\d+)?$",description:"The host (name or ip) of the API. Example: 'swagger.io'"},basePath:{type:"string",pattern:"^/",description:"The base path to the API. Example: '/api'."},schemes:{$ref:"#/definitions/schemesList"},consumes:{description:"A list of MIME types accepted by the API.",allOf:[{$ref:"#/definitions/mediaTypeList"}]},produces:{description:"A list of MIME types the API can produce.",allOf:[{$ref:"#/definitions/mediaTypeList"}]},paths:{$ref:"#/definitions/paths"},definitions:{$ref:"#/definitions/definitions"},parameters:{$ref:"#/definitions/parameterDefinitions"},responses:{$ref:"#/definitions/responseDefinitions"},security:{$ref:"#/definitions/security"},securityDefinitions:{$ref:"#/definitions/securityDefinitions"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:!0},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:JSON.parse('{"info":{"type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed."},"termsOfService":{"type":"string","description":"The terms of service for the API."},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}}},"contact":{"type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"license":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"paths":{"type":"object","description":"Relative paths to the individual endpoints. They must be relative to the \'basePath\'.","patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"},"^/":{"$ref":"#/definitions/pathItem"}},"additionalProperties":false},"definitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"description":"One or more JSON objects describing the schemas being consumed and produced by the API."},"parameterDefinitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/parameter"},"description":"One or more JSON representations for parameters"},"responseDefinitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/response"},"description":"One or more JSON representations for responses"},"externalDocs":{"type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"examples":{"type":"object","additionalProperties":true},"mimeType":{"type":"string","description":"The MIME type of the HTTP message."},"operation":{"type":"object","required":["responses"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"tags":{"type":"array","items":{"type":"string"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the operation."},"description":{"type":"string","description":"A longer description of the operation, GitHub Flavored Markdown is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string","description":"A unique identifier of the operation."},"produces":{"description":"A list of MIME types the API can produce.","allOf":[{"$ref":"#/definitions/mediaTypeList"}]},"consumes":{"description":"A list of MIME types the API can consume.","allOf":[{"$ref":"#/definitions/mediaTypeList"}]},"parameters":{"$ref":"#/definitions/parametersList"},"responses":{"$ref":"#/definitions/responses"},"schemes":{"$ref":"#/definitions/schemesList"},"deprecated":{"type":"boolean","default":false},"security":{"$ref":"#/definitions/security"}}},"pathItem":{"type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"$ref":{"type":"string"},"get":{"$ref":"#/definitions/operation"},"put":{"$ref":"#/definitions/operation"},"post":{"$ref":"#/definitions/operation"},"delete":{"$ref":"#/definitions/operation"},"options":{"$ref":"#/definitions/operation"},"head":{"$ref":"#/definitions/operation"},"patch":{"$ref":"#/definitions/operation"},"parameters":{"$ref":"#/definitions/parametersList"}}},"responses":{"type":"object","description":"Response objects names can either be any valid HTTP status code or \'default\'.","minProperties":1,"additionalProperties":false,"patternProperties":{"^([0-9]{3})$|^(default)$":{"$ref":"#/definitions/responseValue"},"^x-":{"$ref":"#/definitions/vendorExtension"}},"not":{"type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}}},"responseValue":{"oneOf":[{"$ref":"#/definitions/response"},{"$ref":"#/definitions/jsonReference"}]},"response":{"type":"object","required":["description"],"properties":{"description":{"type":"string"},"schema":{"oneOf":[{"$ref":"#/definitions/schema"},{"$ref":"#/definitions/fileSchema"}]},"headers":{"$ref":"#/definitions/headers"},"examples":{"$ref":"#/definitions/examples"}},"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"headers":{"type":"object","additionalProperties":{"$ref":"#/definitions/header"}},"header":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"type":"string","enum":["string","number","integer","boolean","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormat"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"vendorExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"bodyParameter":{"type":"object","required":["name","in","schema"],"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["body"]},"required":{"type":"boolean","description":"Determines whether or not this parameter is required or optional.","default":false},"schema":{"$ref":"#/definitions/schema"}},"additionalProperties":false},"headerParameterSubSchema":{"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"required":{"type":"boolean","description":"Determines whether or not this parameter is required or optional.","default":false},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["header"]},"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"type":{"type":"string","enum":["string","number","boolean","integer","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormat"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}}},"queryParameterSubSchema":{"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"required":{"type":"boolean","description":"Determines whether or not this parameter is required or optional.","default":false},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["query"]},"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"allowEmptyValue":{"type":"boolean","default":false,"description":"allows sending a parameter by name only or with an empty value."},"type":{"type":"string","enum":["string","number","boolean","integer","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormatWithMulti"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}}},"formDataParameterSubSchema":{"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"required":{"type":"boolean","description":"Determines whether or not this parameter is required or optional.","default":false},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["formData"]},"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"allowEmptyValue":{"type":"boolean","default":false,"description":"allows sending a parameter by name only or with an empty value."},"type":{"type":"string","enum":["string","number","boolean","integer","array","file"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormatWithMulti"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}}},"pathParameterSubSchema":{"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"required":["required"],"properties":{"required":{"type":"boolean","enum":[true],"description":"Determines whether or not this parameter is required or optional."},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["path"]},"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"type":{"type":"string","enum":["string","number","boolean","integer","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormat"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}}},"nonBodyParameter":{"type":"object","required":["name","in","type"],"oneOf":[{"$ref":"#/definitions/headerParameterSubSchema"},{"$ref":"#/definitions/formDataParameterSubSchema"},{"$ref":"#/definitions/queryParameterSubSchema"},{"$ref":"#/definitions/pathParameterSubSchema"}]},"parameter":{"oneOf":[{"$ref":"#/definitions/bodyParameter"},{"$ref":"#/definitions/nonBodyParameter"}]},"schema":{"type":"object","description":"A deterministic version of a JSON Schema object.","patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"$ref":{"type":"string"},"format":{"type":"string"},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"multipleOf":{"$ref":"http://json-schema.org/draft-04/schema#/properties/multipleOf"},"maximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/maximum"},"exclusiveMaximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},"minimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/minimum"},"exclusiveMinimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},"maxLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"pattern":{"$ref":"http://json-schema.org/draft-04/schema#/properties/pattern"},"maxItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"uniqueItems":{"$ref":"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},"maxProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"required":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/stringArray"},"enum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/enum"},"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"type":{"$ref":"http://json-schema.org/draft-04/schema#/properties/type"},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"discriminator":{"type":"string"},"readOnly":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/xml"},"externalDocs":{"$ref":"#/definitions/externalDocs"},"example":{}},"additionalProperties":false},"fileSchema":{"type":"object","description":"A deterministic version of a JSON Schema object.","patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"required":["type"],"properties":{"format":{"type":"string"},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"required":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/stringArray"},"type":{"type":"string","enum":["file"]},"readOnly":{"type":"boolean","default":false},"externalDocs":{"$ref":"#/definitions/externalDocs"},"example":{}},"additionalProperties":false},"primitivesItems":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","enum":["string","number","integer","boolean","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormat"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"security":{"type":"array","items":{"$ref":"#/definitions/securityRequirement"},"uniqueItems":true},"securityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"xml":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"namespace":{"type":"string"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"securityDefinitions":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/basicAuthenticationSecurity"},{"$ref":"#/definitions/apiKeySecurity"},{"$ref":"#/definitions/oauth2ImplicitSecurity"},{"$ref":"#/definitions/oauth2PasswordSecurity"},{"$ref":"#/definitions/oauth2ApplicationSecurity"},{"$ref":"#/definitions/oauth2AccessCodeSecurity"}]}},"basicAuthenticationSecurity":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"type":"string","enum":["basic"]},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"apiKeySecurity":{"type":"object","additionalProperties":false,"required":["type","name","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query"]},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2ImplicitSecurity":{"type":"object","additionalProperties":false,"required":["type","flow","authorizationUrl"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flow":{"type":"string","enum":["implicit"]},"scopes":{"$ref":"#/definitions/oauth2Scopes"},"authorizationUrl":{"type":"string","format":"uri"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2PasswordSecurity":{"type":"object","additionalProperties":false,"required":["type","flow","tokenUrl"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flow":{"type":"string","enum":["password"]},"scopes":{"$ref":"#/definitions/oauth2Scopes"},"tokenUrl":{"type":"string","format":"uri"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2ApplicationSecurity":{"type":"object","additionalProperties":false,"required":["type","flow","tokenUrl"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flow":{"type":"string","enum":["application"]},"scopes":{"$ref":"#/definitions/oauth2Scopes"},"tokenUrl":{"type":"string","format":"uri"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2AccessCodeSecurity":{"type":"object","additionalProperties":false,"required":["type","flow","authorizationUrl","tokenUrl"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flow":{"type":"string","enum":["accessCode"]},"scopes":{"$ref":"#/definitions/oauth2Scopes"},"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2Scopes":{"type":"object","additionalProperties":{"type":"string"}},"mediaTypeList":{"type":"array","items":{"$ref":"#/definitions/mimeType"},"uniqueItems":true},"parametersList":{"type":"array","description":"The parameters needed to send a valid API call.","additionalItems":false,"items":{"oneOf":[{"$ref":"#/definitions/parameter"},{"$ref":"#/definitions/jsonReference"}]},"uniqueItems":true},"schemesList":{"type":"array","description":"The transfer protocol of the API.","items":{"type":"string","enum":["http","https","ws","wss"]},"uniqueItems":true},"collectionFormat":{"type":"string","enum":["csv","ssv","tsv","pipes"],"default":"csv"},"collectionFormatWithMulti":{"type":"string","enum":["csv","ssv","tsv","pipes","multi"],"default":"csv"},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"multipleOf":{"$ref":"http://json-schema.org/draft-04/schema#/properties/multipleOf"},"maximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/maximum"},"exclusiveMaximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},"minimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/minimum"},"exclusiveMinimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},"maxLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"pattern":{"$ref":"http://json-schema.org/draft-04/schema#/properties/pattern"},"maxItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"uniqueItems":{"$ref":"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},"enum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/enum"},"jsonReference":{"type":"object","required":["$ref"],"additionalProperties":false,"properties":{"$ref":{"type":"string"}}}}')},Ys={id:"https://spec.openapis.org/oas/3.0/schema/2019-04-02",$schema:"http://json-schema.org/draft-04/schema#",description:"Validation schema for OpenAPI Specification 3.0.X.",type:"object",required:["openapi","info","paths"],properties:{openapi:{type:"string",pattern:"^3\\.0\\.\\d(-.+)?$"},info:{$ref:"#/definitions/Info"},externalDocs:{$ref:"#/definitions/ExternalDocumentation"},servers:{type:"array",items:{$ref:"#/definitions/Server"}},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},tags:{type:"array",items:{$ref:"#/definitions/Tag"},uniqueItems:!0},paths:{$ref:"#/definitions/Paths"},components:{$ref:"#/definitions/Components"}},patternProperties:{"^x-":{}},additionalProperties:!1,definitions:JSON.parse('{"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"Info":{"type":"object","required":["title","version"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"termsOfService":{"type":"string","format":"uri-reference"},"contact":{"$ref":"#/definitions/Contact"},"license":{"$ref":"#/definitions/License"},"version":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Contact":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"email":{"type":"string","format":"email"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"License":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Server":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"description":{"type":"string"},"variables":{"type":"object","additionalProperties":{"$ref":"#/definitions/ServerVariable"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ServerVariable":{"type":"object","required":["default"],"properties":{"enum":{"type":"array","items":{"type":"string"}},"default":{"type":"string"},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Components":{"type":"object","properties":{"schemas":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}}},"responses":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Response"}]}}},"parameters":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Parameter"}]}}},"examples":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Example"}]}}},"requestBodies":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/RequestBody"}]}}},"headers":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Header"}]}}},"securitySchemes":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}},"links":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Link"}]}}},"callbacks":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Callback"}]}}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Schema":{"type":"object","properties":{"title":{"type":"string"},"multipleOf":{"type":"number","minimum":0,"exclusiveMinimum":true},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":{},"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":{},"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":{},"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/XML"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Response":{"type":"object","required":["description"],"properties":{"description":{"type":"string"},"headers":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Header"},{"$ref":"#/definitions/Reference"}]}},"content":{"type":"object","additionalProperties":{"$ref":"#/definitions/MediaType"}},"links":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Link"},{"$ref":"#/definitions/Reference"}]}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"MediaType":{"type":"object","properties":{"schema":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"example":{},"examples":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Example"},{"$ref":"#/definitions/Reference"}]}},"encoding":{"type":"object","additionalProperties":{"$ref":"#/definitions/Encoding"}}},"patternProperties":{"^x-":{}},"additionalProperties":false,"allOf":[{"$ref":"#/definitions/ExampleXORExamples"}]},"Example":{"type":"object","properties":{"summary":{"type":"string"},"description":{"type":"string"},"value":{},"externalValue":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Header":{"type":"object","properties":{"description":{"type":"string"},"required":{"type":"boolean","default":false},"deprecated":{"type":"boolean","default":false},"allowEmptyValue":{"type":"boolean","default":false},"style":{"type":"string","enum":["simple"],"default":"simple"},"explode":{"type":"boolean"},"allowReserved":{"type":"boolean","default":false},"schema":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"content":{"type":"object","additionalProperties":{"$ref":"#/definitions/MediaType"},"minProperties":1,"maxProperties":1},"example":{},"examples":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Example"},{"$ref":"#/definitions/Reference"}]}}},"patternProperties":{"^x-":{}},"additionalProperties":false,"allOf":[{"$ref":"#/definitions/ExampleXORExamples"},{"$ref":"#/definitions/SchemaXORContent"}]},"Paths":{"type":"object","patternProperties":{"^\\\\/":{"$ref":"#/definitions/PathItem"},"^x-":{}},"additionalProperties":false},"PathItem":{"type":"object","properties":{"$ref":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"servers":{"type":"array","items":{"$ref":"#/definitions/Server"}},"parameters":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Parameter"},{"$ref":"#/definitions/Reference"}]},"uniqueItems":true}},"patternProperties":{"^(get|put|post|delete|options|head|patch|trace)$":{"$ref":"#/definitions/Operation"},"^x-":{}},"additionalProperties":false},"Operation":{"type":"object","required":["responses"],"properties":{"tags":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"},"operationId":{"type":"string"},"parameters":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Parameter"},{"$ref":"#/definitions/Reference"}]},"uniqueItems":true},"requestBody":{"oneOf":[{"$ref":"#/definitions/RequestBody"},{"$ref":"#/definitions/Reference"}]},"responses":{"$ref":"#/definitions/Responses"},"callbacks":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Callback"},{"$ref":"#/definitions/Reference"}]}},"deprecated":{"type":"boolean","default":false},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"servers":{"type":"array","items":{"$ref":"#/definitions/Server"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Responses":{"type":"object","properties":{"default":{"oneOf":[{"$ref":"#/definitions/Response"},{"$ref":"#/definitions/Reference"}]}},"patternProperties":{"^[1-5](?:\\\\d{2}|XX)$":{"oneOf":[{"$ref":"#/definitions/Response"},{"$ref":"#/definitions/Reference"}]},"^x-":{}},"minProperties":1,"additionalProperties":false},"SecurityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"Tag":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ExampleXORExamples":{"description":"Example and examples are mutually exclusive","not":{"required":["example","examples"]}},"SchemaXORContent":{"description":"Schema and content are mutually exclusive, at least one is required","not":{"required":["schema","content"]},"oneOf":[{"required":["schema"]},{"required":["content"],"description":"Some properties are not allowed if content is present","allOf":[{"not":{"required":["style"]}},{"not":{"required":["explode"]}},{"not":{"required":["allowReserved"]}},{"not":{"required":["example"]}},{"not":{"required":["examples"]}}]}]},"Parameter":{"type":"object","properties":{"name":{"type":"string"},"in":{"type":"string"},"description":{"type":"string"},"required":{"type":"boolean","default":false},"deprecated":{"type":"boolean","default":false},"allowEmptyValue":{"type":"boolean","default":false},"style":{"type":"string"},"explode":{"type":"boolean"},"allowReserved":{"type":"boolean","default":false},"schema":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"content":{"type":"object","additionalProperties":{"$ref":"#/definitions/MediaType"},"minProperties":1,"maxProperties":1},"example":{},"examples":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Example"},{"$ref":"#/definitions/Reference"}]}}},"patternProperties":{"^x-":{}},"additionalProperties":false,"required":["name","in"],"allOf":[{"$ref":"#/definitions/ExampleXORExamples"},{"$ref":"#/definitions/SchemaXORContent"},{"$ref":"#/definitions/ParameterLocation"}]},"ParameterLocation":{"description":"Parameter location","oneOf":[{"description":"Parameter in path","required":["required"],"properties":{"in":{"enum":["path"]},"style":{"enum":["matrix","label","simple"],"default":"simple"},"required":{"enum":[true]}}},{"description":"Parameter in query","properties":{"in":{"enum":["query"]},"style":{"enum":["form","spaceDelimited","pipeDelimited","deepObject"],"default":"form"}}},{"description":"Parameter in header","properties":{"in":{"enum":["header"]},"style":{"enum":["simple"],"default":"simple"}}},{"description":"Parameter in cookie","properties":{"in":{"enum":["cookie"]},"style":{"enum":["form"],"default":"form"}}}]},"RequestBody":{"type":"object","required":["content"],"properties":{"description":{"type":"string"},"content":{"type":"object","additionalProperties":{"$ref":"#/definitions/MediaType"}},"required":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false},"SecurityScheme":{"oneOf":[{"$ref":"#/definitions/APIKeySecurityScheme"},{"$ref":"#/definitions/HTTPSecurityScheme"},{"$ref":"#/definitions/OAuth2SecurityScheme"},{"$ref":"#/definitions/OpenIdConnectSecurityScheme"}]},"APIKeySecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"HTTPSecurityScheme":{"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"bearerFormat":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-":{}},"additionalProperties":false,"oneOf":[{"description":"Bearer","properties":{"scheme":{"enum":["bearer"]}}},{"description":"Non Bearer","not":{"required":["bearerFormat"]},"properties":{"scheme":{"not":{"enum":["bearer"]}}}}]},"OAuth2SecurityScheme":{"type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flows":{"$ref":"#/definitions/OAuthFlows"},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"OpenIdConnectSecurityScheme":{"type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"openIdConnectUrl":{"type":"string","format":"uri-reference"},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"OAuthFlows":{"type":"object","properties":{"implicit":{"$ref":"#/definitions/ImplicitOAuthFlow"},"password":{"$ref":"#/definitions/PasswordOAuthFlow"},"clientCredentials":{"$ref":"#/definitions/ClientCredentialsFlow"},"authorizationCode":{"$ref":"#/definitions/AuthorizationCodeOAuthFlow"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ImplicitOAuthFlow":{"type":"object","required":["authorizationUrl","scopes"],"properties":{"authorizationUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"type":"object","additionalProperties":{"type":"string"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"PasswordOAuthFlow":{"type":"object","required":["tokenUrl"],"properties":{"tokenUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"type":"object","additionalProperties":{"type":"string"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ClientCredentialsFlow":{"type":"object","required":["tokenUrl"],"properties":{"tokenUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"type":"object","additionalProperties":{"type":"string"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"AuthorizationCodeOAuthFlow":{"type":"object","required":["authorizationUrl","tokenUrl"],"properties":{"authorizationUrl":{"type":"string","format":"uri-reference"},"tokenUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"type":"object","additionalProperties":{"type":"string"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Link":{"type":"object","properties":{"operationId":{"type":"string"},"operationRef":{"type":"string","format":"uri-reference"},"parameters":{"type":"object","additionalProperties":{}},"requestBody":{},"description":{"type":"string"},"server":{"$ref":"#/definitions/Server"}},"patternProperties":{"^x-":{}},"additionalProperties":false,"not":{"description":"Operation Id and Operation Ref are mutually exclusive","required":["operationId","operationRef"]}},"Callback":{"type":"object","additionalProperties":{"$ref":"#/definitions/PathItem"},"patternProperties":{"^x-":{}}},"Encoding":{"type":"object","properties":{"contentType":{"type":"string"},"headers":{"type":"object","additionalProperties":{"$ref":"#/definitions/Header"}},"style":{"type":"string","enum":["form","spaceDelimited","pipeDelimited","deepObject"]},"explode":{"type":"boolean"},"allowReserved":{"type":"boolean","default":false}},"additionalProperties":false}}')},Xs={$id:"https://spec.openapis.org/oas/3.1/schema/2021-04-15",$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{openapi:{type:"string",pattern:"^3\\.1\\.\\d+(-.+)?$"},info:{$ref:"#/$defs/info"},jsonSchemaDialect:{$ref:"#/$defs/uri",default:"https://spec.openapis.org/oas/3.1/dialect/base"},servers:{type:"array",items:{$ref:"#/$defs/server"}},paths:{$ref:"#/$defs/paths"},webhooks:{type:"object",additionalProperties:{$ref:"#/$defs/path-item-or-reference"}},components:{$ref:"#/$defs/components"},security:{type:"array",items:{$ref:"#/$defs/security-requirement"}},tags:{type:"array",items:{$ref:"#/$defs/tag"}},externalDocs:{$ref:"#/$defs/external-documentation"}},required:["openapi","info"],anyOf:[{required:["paths"]},{required:["components"]},{required:["webhooks"]}],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1,$defs:JSON.parse('{"info":{"type":"object","properties":{"title":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"termsOfService":{"type":"string"},"contact":{"$ref":"#/$defs/contact"},"license":{"$ref":"#/$defs/license"},"version":{"type":"string"}},"required":["title","version"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"contact":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"email":{"type":"string"}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"license":{"type":"object","properties":{"name":{"type":"string"},"identifier":{"type":"string"},"url":{"$ref":"#/$defs/uri"}},"required":["name"],"oneOf":[{"required":["identifier"]},{"required":["url"]}],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"server":{"type":"object","properties":{"url":{"$ref":"#/$defs/uri"},"description":{"type":"string"},"variables":{"type":"object","additionalProperties":{"$ref":"#/$defs/server-variable"}}},"required":["url"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"server-variable":{"type":"object","properties":{"enum":{"type":"array","items":{"type":"string"},"minItems":1},"default":{"type":"string"},"descriptions":{"type":"string"}},"required":["default"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"components":{"type":"object","properties":{"schemas":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"}},"responses":{"type":"object","additionalProperties":{"$ref":"#/$defs/response-or-reference"}},"parameters":{"type":"object","additionalProperties":{"$ref":"#/$defs/parameter-or-reference"}},"examples":{"type":"object","additionalProperties":{"$ref":"#/$defs/example-or-reference"}},"requestBodies":{"type":"object","additionalProperties":{"$ref":"#/$defs/request-body-or-reference"}},"headers":{"type":"object","additionalProperties":{"$ref":"#/$defs/header-or-reference"}},"securitySchemes":{"type":"object","additionalProperties":{"$ref":"#/$defs/security-scheme-or-reference"}},"links":{"type":"object","additionalProperties":{"$ref":"#/$defs/link-or-reference"}},"callbacks":{"type":"object","additionalProperties":{"$ref":"#/$defs/callbacks-or-reference"}},"pathItems":{"type":"object","additionalProperties":{"$ref":"#/$defs/path-item-or-reference"}}},"patternProperties":{"^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$":{"$comment":"Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected","propertyNames":{"pattern":"^[a-zA-Z0-9._-]+$"}}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"paths":{"type":"object","patternProperties":{"^/":{"$ref":"#/$defs/path-item"}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"path-item":{"type":"object","properties":{"summary":{"type":"string"},"description":{"type":"string"},"servers":{"type":"array","items":{"$ref":"#/$defs/server"}},"parameters":{"type":"array","items":{"$ref":"#/$defs/parameter-or-reference"}}},"patternProperties":{"^(get|put|post|delete|options|head|patch|trace)$":{"$ref":"#/$defs/operation"}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"path-item-or-reference":{"if":{"required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/path-item"}},"operation":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/$defs/external-documentation"},"operationId":{"type":"string"},"parameters":{"type":"array","items":{"$ref":"#/$defs/parameter-or-reference"}},"requestBody":{"$ref":"#/$defs/request-body-or-reference"},"responses":{"$ref":"#/$defs/responses"},"callbacks":{"type":"object","additionalProperties":{"$ref":"#/$defs/callbacks-or-reference"}},"deprecated":{"default":false,"type":"boolean"},"security":{"type":"array","items":{"$ref":"#/$defs/security-requirement"}},"servers":{"type":"array","items":{"$ref":"#/$defs/server"}}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"external-documentation":{"type":"object","properties":{"description":{"type":"string"},"url":{"$ref":"#/$defs/uri"}},"required":["url"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"parameter":{"type":"object","properties":{"name":{"type":"string"},"in":{"enum":["query","header","path","cookie"]},"description":{"type":"string"},"required":{"default":false,"type":"boolean"},"deprecated":{"default":false,"type":"boolean"},"allowEmptyValue":{"default":false,"type":"boolean"},"schema":{"$dynamicRef":"#meta"},"content":{"$ref":"#/$defs/content"}},"required":["in"],"oneOf":[{"required":["schema"]},{"required":["content"]}],"dependentSchemas":{"schema":{"properties":{"style":{"type":"string"},"explode":{"type":"boolean"},"allowReserved":{"default":false,"type":"boolean"}},"allOf":[{"$ref":"#/$defs/examples"},{"$ref":"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path"},{"$ref":"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header"},{"$ref":"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query"},{"$ref":"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie"},{"$ref":"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-form"}],"$defs":{"styles-for-path":{"if":{"properties":{"in":{"const":"path"}},"required":["in"]},"then":{"properties":{"style":{"default":"simple","enum":["matrix","label","simple"]},"required":{"const":true}},"required":["required"]}},"styles-for-header":{"if":{"properties":{"in":{"const":"header"}},"required":["in"]},"then":{"properties":{"style":{"default":"simple","enum":["simple"]}}}},"styles-for-query":{"if":{"properties":{"in":{"const":"query"}},"required":["in"]},"then":{"properties":{"style":{"default":"form","enum":["form","spaceDelimited","pipeDelimited","deepObject"]}}}},"styles-for-cookie":{"if":{"properties":{"in":{"const":"cookie"}},"required":["in"]},"then":{"properties":{"style":{"default":"form","enum":["form"]}}}},"styles-for-form":{"if":{"properties":{"style":{"const":"form"}},"required":["style"]},"then":{"properties":{"explode":{"default":true}}},"else":{"properties":{"explode":{"default":false}}}}}}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"parameter-or-reference":{"if":{"required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/parameter"}},"request-body":{"type":"object","properties":{"description":{"type":"string"},"content":{"$ref":"#/$defs/content"},"required":{"default":false,"type":"boolean"}},"required":["content"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"request-body-or-reference":{"if":{"required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/request-body"}},"content":{"type":"object","additionalProperties":{"$ref":"#/$defs/media-type"},"propertyNames":{"format":"media-range"}},"media-type":{"type":"object","properties":{"schema":{"$dynamicRef":"#meta"},"encoding":{"type":"object","additionalProperties":{"$ref":"#/$defs/encoding"}}},"allOf":[{"$ref":"#/$defs/specification-extensions"},{"$ref":"#/$defs/examples"}],"unevaluatedProperties":false},"encoding":{"type":"object","properties":{"contentType":{"type":"string","format":"media-range"},"headers":{"type":"object","additionalProperties":{"$ref":"#/$defs/header-or-reference"}},"style":{"default":"form","enum":["form","spaceDelimited","pipeDelimited","deepObject"]},"explode":{"type":"boolean"},"allowReserved":{"default":false,"type":"boolean"}},"allOf":[{"$ref":"#/$defs/specification-extensions"},{"$ref":"#/$defs/encoding/$defs/explode-default"}],"unevaluatedProperties":false,"$defs":{"explode-default":{"if":{"properties":{"style":{"const":"form"}},"required":["style"]},"then":{"properties":{"explode":{"default":true}}},"else":{"properties":{"explode":{"default":false}}}}}},"responses":{"type":"object","properties":{"default":{"$ref":"#/$defs/response-or-reference"}},"patternProperties":{"^[1-5][0-9X]{2}$":{"$ref":"#/$defs/response-or-reference"}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"response":{"type":"object","properties":{"description":{"type":"string"},"headers":{"type":"object","additionalProperties":{"$ref":"#/$defs/header-or-reference"}},"content":{"$ref":"#/$defs/content"},"links":{"type":"object","additionalProperties":{"$ref":"#/$defs/link-or-reference"}}},"required":["description"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"response-or-reference":{"if":{"required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/response"}},"callbacks":{"type":"object","$ref":"#/$defs/specification-extensions","additionalProperties":{"$ref":"#/$defs/path-item-or-reference"}},"callbacks-or-reference":{"if":{"required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/callbacks"}},"example":{"type":"object","properties":{"summary":{"type":"string"},"description":{"type":"string"},"value":true,"externalValue":{"$ref":"#/$defs/uri"}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"example-or-reference":{"if":{"required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/example"}},"link":{"type":"object","properties":{"operationRef":{"$ref":"#/$defs/uri"},"operationId":true,"parameters":{"$ref":"#/$defs/map-of-strings"},"requestBody":true,"description":{"type":"string"},"body":{"$ref":"#/$defs/server"}},"oneOf":[{"required":["operationRef"]},{"required":["operationId"]}],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"link-or-reference":{"if":{"required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/link"}},"header":{"type":"object","properties":{"description":{"type":"string"},"required":{"default":false,"type":"boolean"},"deprecated":{"default":false,"type":"boolean"},"allowEmptyValue":{"default":false,"type":"boolean"}},"dependentSchemas":{"schema":{"properties":{"style":{"default":"simple","enum":["simple"]},"explode":{"default":false,"type":"boolean"},"allowReserved":{"default":false,"type":"boolean"},"schema":{"$dynamicRef":"#meta"}},"$ref":"#/$defs/examples"},"content":{"properties":{"content":{"$ref":"#/$defs/content"}}}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"header-or-reference":{"if":{"required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/header"}},"tag":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/$defs/external-documentation"}},"required":["name"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"reference":{"type":"object","properties":{"$ref":{"$ref":"#/$defs/uri"},"summary":{"type":"string"},"description":{"type":"string"}},"unevaluatedProperties":false},"schema":{"$dynamicAnchor":"meta","type":["object","boolean"]},"security-scheme":{"type":"object","properties":{"type":{"enum":["apiKey","http","mutualTLS","oauth2","openIdConnect"]},"description":{"type":"string"}},"required":["type"],"allOf":[{"$ref":"#/$defs/specification-extensions"},{"$ref":"#/$defs/security-scheme/$defs/type-apikey"},{"$ref":"#/$defs/security-scheme/$defs/type-http"},{"$ref":"#/$defs/security-scheme/$defs/type-http-bearer"},{"$ref":"#/$defs/security-scheme/$defs/type-oauth2"},{"$ref":"#/$defs/security-scheme/$defs/type-oidc"}],"unevaluatedProperties":false,"$defs":{"type-apikey":{"if":{"properties":{"type":{"const":"apiKey"}},"required":["type"]},"then":{"properties":{"name":{"type":"string"},"in":{"enum":["query","header","cookie"]}},"required":["name","in"]}},"type-http":{"if":{"properties":{"type":{"const":"http"}},"required":["type"]},"then":{"properties":{"scheme":{"type":"string"}},"required":["scheme"]}},"type-http-bearer":{"if":{"properties":{"type":{"const":"http"},"scheme":{"const":"bearer"}},"required":["type","scheme"]},"then":{"properties":{"bearerFormat":{"type":"string"}},"required":["scheme"]}},"type-oauth2":{"if":{"properties":{"type":{"const":"oauth2"}},"required":["type"]},"then":{"properties":{"flows":{"$ref":"#/$defs/oauth-flows"}},"required":["flows"]}},"type-oidc":{"if":{"properties":{"type":{"const":"openIdConnect"}},"required":["type"]},"then":{"properties":{"openIdConnectUrl":{"$ref":"#/$defs/uri"}},"required":["openIdConnectUrl"]}}}},"security-scheme-or-reference":{"if":{"required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/security-scheme"}},"oauth-flows":{"type":"object","properties":{"implicit":{"$ref":"#/$defs/oauth-flows/$defs/implicit"},"password":{"$ref":"#/$defs/oauth-flows/$defs/password"},"clientCredentials":{"$ref":"#/$defs/oauth-flows/$defs/client-credentials"},"authorizationCode":{"$ref":"#/$defs/oauth-flows/$defs/authorization-code"}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false,"$defs":{"implicit":{"type":"object","properties":{"authorizationUrl":{"type":"string"},"refreshUrl":{"type":"string"},"scopes":{"$ref":"#/$defs/map-of-strings"}},"required":["authorizationUrl","scopes"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"password":{"type":"object","properties":{"tokenUrl":{"type":"string"},"refreshUrl":{"type":"string"},"scopes":{"$ref":"#/$defs/map-of-strings"}},"required":["tokenUrl","scopes"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"client-credentials":{"type":"object","properties":{"tokenUrl":{"type":"string"},"refreshUrl":{"type":"string"},"scopes":{"$ref":"#/$defs/map-of-strings"}},"required":["tokenUrl","scopes"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"authorization-code":{"type":"object","properties":{"authorizationUrl":{"type":"string"},"tokenUrl":{"type":"string"},"refreshUrl":{"type":"string"},"scopes":{"$ref":"#/$defs/map-of-strings"}},"required":["authorizationUrl","tokenUrl","scopes"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false}}},"security-requirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"specification-extensions":{"patternProperties":{"^x-":true}},"examples":{"properties":{"example":true,"examples":{"type":"object","additionalProperties":{"$ref":"#/$defs/example-or-reference"}}}},"uri":{"type":"string","format":"uri"},"map-of-strings":{"type":"object","additionalProperties":{"type":"string"}}}')};var ei,ti,ri,ni,oi,si,ii;function ai(){if(ri)return ti;ri=1;const e=ze(),{ono:t}=rt,r=(Ro||(Ro=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=Or(),n=jo(),o=Co(),s=Io,i=["/properties"],a="http://json-schema.org/draft-04/schema";class l extends r.default{constructor(e={}){super({...e,schemaId:"id"})}_addVocabularies(){super._addVocabularies(),n.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(s,i):s;this.addMetaSchema(e,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.exports=t=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var c=Or();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var d=Or();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}})}(ot,ot.exports)),ot.exports),n=Gs(),{openapi:o}=(ei||(ei=1,s=Ks,i=Ks.exports,Object.defineProperty(i,"__esModule",{value:!0}),i.openapi=i.openapiV31=i.openapiV3=i.openapiV2=i.openapiV1=void 0,i.openapiV1=Zs,i.openapiV2=Qs,i.openapiV3=Ys,i.openapiV31=Xs,i.openapi={v1:i.openapiV1,v2:i.openapiV2,v3:i.openapiV3,v31:i.openapiV31},i.default=i.openapi,s.exports=Object.assign(s.exports.default,s.exports)),Ks.exports);var s,i;function a(e=!0){const t={allErrors:!0,strict:!1,validateFormats:!1};return e?new r(t):new n(t)}return ti=function(r){let n,s;if(r.swagger)s=o.v2,n=a();else if(r.openapi.startsWith("3.1")){s=o.v31;const e=s.$defs.schema;delete e.$dynamicAnchor,s.$defs.components.properties.schemas.additionalProperties=e,s.$defs.header.dependentSchemas.schema.properties.schema=e,s.$defs["media-type"].properties.schema=e,s.$defs.parameter.properties.schema=e,n=a(!1)}else s=o.v3,n=a();if(!n.validate(s,r)){let r=n.errors,o="Swagger schema validation failed.\n"+function(t,r){r=r||" ";let n="";for(let o of t)n+=e.format(`${r}#${o.instancePath.length?o.instancePath:"/"} ${o.message}\n`);return n}(r);throw t.syntax(r,{details:r},o)}}}function li(){if(ii)return si;ii=1;const e=ze(),{ono:t}=rt,r=oi?ni:(oi=1,ni=["get","put","post","delete","options","head","patch"]),n=["array","boolean","integer","number","string"],o=["array","boolean","integer","number","string","object","null",void 0];function s(e,n,o,s){for(let a of r){let r=n[a],c=o+"/"+a;if(r){let a=r.operationId;if(a){if(-1!==s.indexOf(a))throw t.syntax(`Validation failed. Duplicate operation id '${a}'`);s.push(a)}i(e,n,o,r,c);let d=Object.keys(r.responses||{});for(let e of d){l(e,r.responses[e]||{},c+"/responses/"+e)}}}}function i(r,s,i,l,p){let u=s.parameters||[],f=l.parameters||[];try{a(u)}catch(cp){throw t.syntax(cp,`Validation failed. ${i} has duplicate parameters`)}try{a(f)}catch(cp){throw t.syntax(cp,`Validation failed. ${p} has duplicate parameters`)}let h=u.reduce((e,t)=>(e.some(e=>e.in===t.in&&e.name===t.name)||e.push(t),e),f.slice());!function(e,r){let n=e.filter(e=>"body"===e.in),o=e.filter(e=>"formData"===e.in);if(n.length>1)throw t.syntax(`Validation failed. ${r} has ${n.length} body parameters. Only one is allowed.`);if(n.length>0&&o.length>0)throw t.syntax(`Validation failed. ${r} has body parameters and formData parameters. Only one or the other is allowed.`)}(h,p),function(r,n,o){let s=n.match(e.swaggerParamRegExp)||[];for(let e=0;e<s.length;e++)for(let r=e+1;r<s.length;r++)if(s[e]===s[r])throw t.syntax(`Validation failed. ${o} has multiple path placeholders named ${s[e]}`);r=r.filter(e=>"path"===e.in);for(let e of r){if(!0!==e.required)throw t.syntax(`Validation failed. Path parameters cannot be optional. Set required=true for the "${e.name}" parameter at ${o}`);let r=s.indexOf("{"+e.name+"}");if(-1===r)throw t.syntax(`Validation failed. ${o} has a path parameter named "${e.name}", but there is no corresponding {${e.name}} in the path string`);s.splice(r,1)}if(s.length>0)throw t.syntax(`Validation failed. ${o} is missing path parameter(s) for ${s}`)}(h,i,p),function(e,r,s,i){for(let a of e){let e,l,p=i+"/parameters/"+a.name;switch(a.in){case"body":e=a.schema,l=o;break;case"formData":e=a,l=n.concat("file");break;default:e=a,l=n}if(c(e,p,l),d(e,p),"file"===e.type){let e=/multipart\/(.*\+)?form-data/,n=/application\/(.*\+)?x-www-form-urlencoded/;if(!(s.consumes||r.consumes||[]).some(t=>e.test(t)||n.test(t)))throw t.syntax(`Validation failed. ${i} has a file parameter, so it must consume multipart/form-data or application/x-www-form-urlencoded`)}}}(h,r,l,p)}function a(e){for(let r=0;r<e.length-1;r++){let n=e[r];for(let o=r+1;o<e.length;o++){let r=e[o];if(n.name===r.name&&n.in===r.in)throw t.syntax(`Validation failed. Found multiple ${n.in} parameters named "${n.name}"`)}}}function l(e,r,s){if("default"!==e&&(e<100||e>599))throw t.syntax(`Validation failed. ${s} has an invalid response code (${e})`);let i=Object.keys(r.headers||{});for(let t of i){c(r.headers[t],s+"/headers/"+t,n)}if(r.schema){let e=o.concat("file");if(-1===e.indexOf(r.schema.type))throw t.syntax(`Validation failed. ${s} has an invalid response schema type (${r.schema.type})`);c(r.schema,s+"/schema",e)}}function c(e,r,n){if(-1===n.indexOf(e.type))throw t.syntax(`Validation failed. ${r} has an invalid type (${e.type})`);if("array"===e.type&&!e.items)throw t.syntax(`Validation failed. ${r} is an array, so it must include an "items" schema`)}function d(e,r){if((!Array.isArray(e.type)||e.type.includes("object"))&&(Array.isArray(e.type)||"object"===e.type)&&e.required&&Array.isArray(e.required)){let n={};!function e(t,r){if(t.properties)for(let n in t.properties)t.properties.hasOwnProperty(n)&&(r[n]=t.properties[n]);if(t.allOf)for(let n of t.allOf)e(n,r)}(e,n);for(let o of e.required)if(!n[o])throw t.syntax(`Validation failed. Property '${o}' listed as required but does not exist in '${r}'`)}}return si=function(e){if(e.openapi)return;let t=Object.keys(e.paths||{}),r=[];for(let o of t){let t=e.paths[o],n="/paths"+o;t&&0===o.indexOf("/")&&s(e,t,n,r)}let n=Object.keys(e.definitions||{});for(let o of n){d(e.definitions[o],"/definitions/"+o)}}}var ci={},di={},pi={},ui={},fi={},hi={};function mi(...e){return e.reduce((e,t)=>t.startsWith("/")||t.match(/^https?:\/\//)?t:e.replace(/\/?$/,"/")+t,"")}function gi(...e){return e.filter(Boolean).join("/").replace(/\/+/g,"/")}function yi(e){const t=e.lastIndexOf("/");return t>=0?e.substring(0,t):"."}function vi(e,t){const r=e.split("/").pop()??e;return t&&r.endsWith(t)?r.slice(0,-t.length):r}function bi(e){const t=vi(e),r=t.lastIndexOf(".");return r>0?t.substring(r):""}function $i(e){return e.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(e)||/^https?:\/\//.test(e)}const xi={resolve:mi,join:gi,dirname:yi,basename:vi,extname:bi,isAbsolute:$i,sep:"/"},wi={resolve:mi,join:gi,dirname:yi,basename:vi,extname:bi,isAbsolute:$i,posix:xi,sep:"/"},_i=i(Object.freeze(Object.defineProperty({__proto__:null,basename:vi,default:wi,dirname:yi,extname:bi,isAbsolute:$i,join:gi,posix:xi,resolve:mi,sep:"/"},Symbol.toStringTag,{value:"Module"})));var ki;function Si(){if(ki)return hi;ki=1;var e=hi&&hi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hi,"__esModule",{value:!0}),hi.default=function(e){var r,n,o,s;if(e.startsWith("\\\\?\\"))return e;return e.split(null==(n=null==(r=t.default)?void 0:r.win32)?void 0:n.sep).join((null==(s=null==(o=t.default)?void 0:o.posix)?void 0:s.sep)??"/")};const t=e(_i);return hi}var ji,Oi,Pi={};function Ei(){if(Oi)return fi;Oi=1;var e=fi&&fi.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=fi&&fi.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=fi&&fi.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n},n=fi&&fi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fi,"__esModule",{value:!0}),fi.parse=void 0,fi.resolve=h,fi.cwd=m,fi.getProtocol=g,fi.getExtension=function(e){const t=e.lastIndexOf(".");if(t>=0)return y(e.substr(t).toLowerCase());return""},fi.stripQuery=y,fi.getHash=v,fi.stripHash=b,fi.isHttp=function(e){const t=g(e);return"http"===t||"https"===t||void 0===t&&"undefined"!=typeof window},fi.isFileSystemPath=$,fi.fromFileSystemPath=function(e){var t;if((0,p.isWindows)()){const r=m(),n=e.toUpperCase(),i=(0,o.default)(r).toUpperCase(),a=n.includes(i),l=n.includes(i),c=(null==(t=s.win32)?void 0:t.isAbsolute(e))||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://");a||l||c||r.startsWith("http")||(e=(0,d.join)(r,e)),e=(0,o.default)(e)}e=encodeURI(e);for(const r of u)e=e.replace(r[0],r[1]);return e},fi.toFileSystemPath=function(e,t){e=decodeURI(e);for(let n=0;n<f.length;n+=2)e=e.replace(f[n],f[n+1]);let r="file://"===e.substr(0,7).toLowerCase();r&&(e="/"===e[7]?e.substr(8):e.substr(7),(0,p.isWindows)()&&"/"===e[1]&&(e=e[0]+":"+e.substr(1)),t?e="file:///"+e:(r=!1,e=(0,p.isWindows)()?e:"/"+e));(0,p.isWindows)()&&!r&&":\\"===(e=e.replace(i,"\\")).substr(1,2)&&(e=e[0].toUpperCase()+e.substr(1));return e},fi.safePointerToPath=function(e){if(e.length<=1||"#"!==e[0]||"/"!==e[1])return[];return e.slice(2).split("/").map(e=>decodeURIComponent(e).replace(l,"/").replace(c,"~"))},fi.relative=function(e,t){if(!$(e)||!$(t))return h(e,t);const r=s.default.dirname(b(e)),n=b(t);return s.default.relative(r,n)+v(t)};const o=n(Si()),s=r(_i),i=/\//g,a=/^(\w{2,}):\/\//i,l=/~1/g,c=/~0/g,d=_i,p=function(){if(ji)return Pi;ji=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.isWindows=void 0;const e=/^win/.test(globalThis.process?globalThis.process.platform:"");return Pi.isWindows=()=>e,Pi}(),u=[[/\?/g,"%3F"],[/#/g,"%23"]],f=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"];function h(e,t){var r;const n=new URL((0,o.default)(e),"resolve://"),s=new URL((0,o.default)(t),n),i=(null==(r=t.match(/(\s*)$/))?void 0:r[1])||"";if("resolve:"===s.protocol){const{pathname:e,search:t,hash:r}=s;return e+t+r+i}return s.toString()+i}function m(){if("undefined"!=typeof window)return location.href;const e=process.cwd(),t=e.slice(-1);return"/"===t||"\\"===t?e:e+"/"}function g(e){const t=a.exec(e||"");if(t)return t[1].toLowerCase()}function y(e){const t=e.indexOf("?");return t>=0&&(e=e.substr(0,t)),e}function v(e){if(!e)return"#";const t=e.indexOf("#");return t>=0?e.substring(t):"#"}function b(e){if(!e)return"";const t=e.indexOf("#");return t>=0&&(e=e.substring(0,t)),e}function $(e){if("undefined"!=typeof window||"undefined"!=typeof process&&process.browser)return!1;const t=g(e);return void 0===t||"file"===t}return fi.parse=e=>new URL(e),fi}var Ti,Ai,Ci,Ii,Ri={};function Ni(){if(Ti)return Ri;Ti=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.InvalidPointerError=Ri.TimeoutError=Ri.MissingPointerError=Ri.UnmatchedResolverError=Ri.ResolverError=Ri.UnmatchedParserError=Ri.ParserError=Ri.JSONParserErrorGroup=Ri.JSONParserError=void 0,Ri.isHandledError=function(e){return e instanceof r||e instanceof n},Ri.normalizeError=function(e){null===e.path&&(e.path=[]);return e};const e=rt,t=Ei();class r extends Error{constructor(t,r){super(),this.code="EUNKNOWN",this.name="JSONParserError",this.message=t,this.source=r,this.path=null,e.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}}Ri.JSONParserError=r;class n extends Error{constructor(r){super(),this.files=r,this.name="JSONParserErrorGroup",this.message=`${this.errors.length} error${this.errors.length>1?"s":""} occurred while reading '${(0,t.toFileSystemPath)(r.$refs._root$Ref.path)}'`,e.Ono.extend(this)}static getParserErrors(e){const t=[];for(const r of Object.values(e.$refs._$refs))r.errors&&t.push(...r.errors);return t}get errors(){return n.getParserErrors(this.files)}}Ri.JSONParserErrorGroup=n;Ri.ParserError=class extends r{constructor(e,t){super(`Error parsing ${t}: ${e}`,t),this.code="EPARSER",this.name="ParserError"}};Ri.UnmatchedParserError=class extends r{constructor(e){super(`Could not find parser for "${e}"`,e),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}};Ri.ResolverError=class extends r{constructor(e,t){super(e.message||`Error reading file "${t}"`,t),this.code="ERESOLVER",this.name="ResolverError","code"in e&&(this.ioErrorCode=String(e.code))}};Ri.UnmatchedResolverError=class extends r{constructor(e){super(`Could not find resolver for "${e}"`,e),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}};Ri.MissingPointerError=class extends r{constructor(e,r){super(`Token "${e}" does not exist.`,(0,t.stripHash)(r)),this.code="EUNMATCHEDRESOLVER",this.name="MissingPointerError"}};Ri.TimeoutError=class extends r{constructor(e){super(`Dereferencing timeout reached: ${e}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}};return Ri.InvalidPointerError=class extends r{constructor(e,r){super(`Invalid $ref pointer "${e}". Pointers must begin with "#/"`,(0,t.stripHash)(r)),this.code="EUNMATCHEDRESOLVER",this.name="InvalidPointerError"}},Ri}function Mi(){if(Ai)return ui;Ai=1;var e=ui&&ui.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=ui&&ui.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=ui&&ui.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n},n=ui&&ui.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ui,"__esModule",{value:!0});const o=n(qi()),s=r(Ei()),i=Ni(),a=/\//g,l=/~/g,c=/~1/g,d=/~0/g,p=e=>{try{return decodeURIComponent(e)}catch{return e}};class u{constructor(e,t,r){this.$ref=e,this.path=t,this.originalPath=r||t,this.value=void 0,this.circular=!1,this.indirections=0}resolve(e,t,r){const n=u.parse(this.path,this.originalPath);this.value=m(e);for(let o=0;o<n.length;o++){if(f(this,t,r)&&(this.path=u.join(this.path,n.slice(o))),"object"==typeof this.value&&null!==this.value&&!g(r)&&"$ref"in this.value)return this;const e=n[o];if(void 0===this.value[e]||null===this.value[e]&&o===n.length-1){let t=!1;for(let e=n.length-1;e>o;e--){const r=n.slice(o,e+1).join("/");if(void 0!==this.value[r]){this.value=this.value[r],o=e,t=!0;break}}if(t)continue;throw this.value=null,new i.MissingPointerError(e,decodeURI(this.originalPath))}this.value=this.value[e]}return(!this.value||this.value.$ref&&s.resolve(this.path,this.value.$ref)!==r)&&f(this,t,r),this}set(e,t,r){const n=u.parse(this.path);let o;if(0===n.length)return this.value=t,t;this.value=m(e);for(let s=0;s<n.length-1;s++)f(this,r),o=n[s],this.value&&void 0!==this.value[o]?this.value=this.value[o]:this.value=h(this,o,{});return f(this,r),o=n[n.length-1],h(this,o,t),e}static parse(e,t){const r=s.getHash(e).substring(1);if(!r)return[];const n=r.split("/");for(let o=0;o<n.length;o++)n[o]=p(n[o].replace(c,"/").replace(d,"~"));if(""!==n[0])throw new i.InvalidPointerError(n,void 0===t?e:t);return n.slice(1)}static join(e,t){-1===e.indexOf("#")&&(e+="#"),t=Array.isArray(t)?t:[t];for(let r=0;r<t.length;r++){const n=t[r];e+="/"+encodeURIComponent(n.replace(l,"~0").replace(a,"~1"))}return e}}function f(e,t,r){if(o.default.isAllowed$Ref(e.value,t)){const n=s.resolve(e.path,e.value.$ref);if(n!==e.path||g(r)){const r=e.$ref.$refs._resolve(n,e.path,t);return null!==r&&(e.indirections+=r.indirections+1,o.default.isExtended$Ref(e.value)?(e.value=o.default.dereference(e.value,r.value),!1):(e.$ref=r.$ref,e.path=r.path,e.value=r.value,!0))}e.circular=!0}}function h(e,t,r){if(!e.value||"object"!=typeof e.value)throw new i.JSONParserError(`Error assigning $ref pointer "${e.path}". \nCannot set "${t}" of a non-object.`);return"-"===t&&Array.isArray(e.value)?e.value.push(r):e.value[t]=r,r}function m(e){if((0,i.isHandledError)(e))throw e;return e}function g(e){return"string"==typeof e&&0==u.parse(e).length}return ui.default=u,ui}function qi(){if(Ci)return pi;Ci=1;var e=pi&&pi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pi,"__esModule",{value:!0});const t=e(Mi()),r=Ni(),n=Ei();class o{constructor(e){this.errors=[],this.$refs=e}addError(e){void 0===this.errors&&(this.errors=[]);const t=this.errors.map(({footprint:e})=>e);"errors"in e&&Array.isArray(e.errors)?this.errors.push(...e.errors.map(r.normalizeError).filter(({footprint:e})=>!t.includes(e))):"footprint"in e&&t.includes(e.footprint)||this.errors.push((0,r.normalizeError)(e))}exists(e,t){try{return this.resolve(e,t),!0}catch{return!1}}get(e,t){var r;return null==(r=this.resolve(e,t))?void 0:r.value}resolve(e,o,s,i){const a=new t.default(this,e,s);try{return a.resolve(this.value,o,i)}catch(l){if(!o||!o.continueOnError||!(0,r.isHandledError)(l))throw l;return null===l.path&&(l.path=(0,n.safePointerToPath)((0,n.getHash)(i))),l instanceof r.InvalidPointerError&&(l.source=decodeURI((0,n.stripHash)(i))),this.addError(l),null}}set(e,r){const n=new t.default(this,e);this.value=n.set(this.value,r)}static is$Ref(e){return Boolean(e)&&"object"==typeof e&&null!==e&&"$ref"in e&&"string"==typeof e.$ref&&e.$ref.length>0}static isExternal$Ref(e){return o.is$Ref(e)&&"#"!==e.$ref[0]}static isAllowed$Ref(e,t){var r;if(this.is$Ref(e)){if("#/"===e.$ref.substring(0,2)||"#"===e.$ref)return!0;if("#"!==e.$ref[0]&&(!t||(null==(r=t.resolve)?void 0:r.external)))return!0}}static isExtended$Ref(e){return o.is$Ref(e)&&Object.keys(e).length>1}static dereference(e,t){if(t&&"object"==typeof t&&o.isExtended$Ref(e)){const r={};for(const t of Object.keys(e))"$ref"!==t&&(r[t]=e[t]);for(const e of Object.keys(t))e in r||(r[e]=t[e]);return r}return t}}return pi.default=o,pi}var zi,Ui,Li={},Di={};function Bi(){if(Ui)return Li;Ui=1;var e=Li&&Li.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=Li&&Li.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Li&&Li.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n};Object.defineProperty(Li,"__esModule",{value:!0});const n=rt,o=r(Ei()),s=r(function(){if(zi)return Di;function e(e,t,r,n,o){const s=e[t];if("function"==typeof s)return s.apply(e,[r,n,o]);if(!n){if(s instanceof RegExp)return s.test(r.url);if("string"==typeof s)return s===r.extension;if(Array.isArray(s))return-1!==s.indexOf(r.extension)}return s}return zi=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.all=function(e){return Object.keys(e||{}).filter(t=>"object"==typeof e[t]).map(t=>(e[t].name=t,e[t]))},Di.filter=function(t,r,n){return t.filter(t=>!!e(t,r,n))},Di.sort=function(e){for(const t of e)t.order=t.order||Number.MAX_SAFE_INTEGER;return e.sort((e,t)=>e.order-t.order)},Di.run=async function(t,r,n,o){let s,i,a=0;return new Promise((l,c)=>{function d(){if(s=t[a++],!s)return c(i);try{const i=e(s,r,n,p,o);if(i&&"function"==typeof i.then)i.then(u,f);else if(void 0!==i)u(i);else if(a===t.length)throw new Error("No promise has been returned or callback has been called.")}catch(cp){f(cp)}}function p(e,t){e?f(e):u(t)}function u(e){l({plugin:s,result:e})}function f(e){i={plugin:s,error:e},d()}d()})},Di}()),i=Ni();return Li.default=async function(e,t,r){const a=e.indexOf("#");let l="";a>=0&&(l=e.substring(a),e=e.substring(0,a));const c=t._add(e),d={url:e,hash:l,extension:o.getExtension(e)};try{const e=await async function(e,t,r){let o=s.all(t.resolve);o=s.filter(o,"canRead",e),s.sort(o);try{return await s.run(o,"read",e,r)}catch(a){throw!a&&t.continueOnError?new i.UnmatchedResolverError(e.url):a&&"error"in a?a.error instanceof i.ResolverError?a.error:new i.ResolverError(a,e.url):n.ono.syntax(`Unable to resolve $ref pointer "${e.url}"`)}}(d,r,t);c.pathType=e.plugin.name,d.data=e.result;const o=await async function(e,t,r){const o=s.all(t.parse),a=s.filter(o,"canParse",e),l=a.length>0?a:o;s.sort(l);try{const t=await s.run(l,"parse",e,r);if(!t.plugin.allowEmpty&&(void 0===(c=t.result)||"object"==typeof c&&0===Object.keys(c).length||"string"==typeof c&&0===c.trim().length||Buffer.isBuffer(c)&&0===c.length))throw n.ono.syntax(`Error parsing "${e.url}" as ${t.plugin.name}. \nParsed value is empty`);return t}catch(d){throw!d&&t.continueOnError?new i.UnmatchedParserError(e.url):d&&d.message&&d.message.startsWith("Error parsing")?d:d&&"error"in d?d.error instanceof i.ParserError?d.error:new i.ParserError(d.error.message,e.url):n.ono.syntax(`Unable to parse ${e.url}`)}var c}(d,r,t);return c.value=o.result,o.result}catch(p){throw(0,i.isHandledError)(p)&&(c.value=p),p}},Li}var Hi,Fi={},Vi={},Ji={};var Wi,Gi,Ki,Zi,Qi,Yi,Xi,ea,ta,ra,na,oa,sa,ia,aa,la,ca,da,pa,ua,fa,ha,ma,ga,ya,va,ba,$a,xa,wa,_a,ka,Sa,ja,Oa,Pa,Ea,Ta,Aa,Ca,Ia,Ra,Na,Ma,qa={},za={},Ua={},La={};function Da(){if(Wi)return La;function e(e){return null==e}return Wi=1,La.isNothing=e,La.isObject=function(e){return"object"==typeof e&&null!==e},La.toArray=function(t){return Array.isArray(t)?t:e(t)?[]:[t]},La.repeat=function(e,t){var r,n="";for(r=0;r<t;r+=1)n+=e;return n},La.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},La.extend=function(e,t){var r,n,o,s;if(t)for(r=0,n=(s=Object.keys(t)).length;r<n;r+=1)e[o=s[r]]=t[o];return e},La}function Ba(){if(Ki)return Gi;function e(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+="\n\n"+e.mark.snippet),n+" "+r):n}function t(t,r){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=r,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}return Ki=1,t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=function(t){return this.name+": "+e(this,t)},Gi=t}function Ha(){if(Xi)return Yi;Xi=1;var e=Ba(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];return Yi=function(n,o){var s,i;if(o=o||{},Object.keys(o).forEach(function(r){if(-1===t.indexOf(r))throw new e('Unknown option "'+r+'" is met in definition of "'+n+'" YAML type.')}),this.options=o,this.tag=n,this.kind=o.kind||null,this.resolve=o.resolve||function(){return!0},this.construct=o.construct||function(e){return e},this.instanceOf=o.instanceOf||null,this.predicate=o.predicate||null,this.represent=o.represent||null,this.representName=o.representName||null,this.defaultStyle=o.defaultStyle||null,this.multi=o.multi||!1,this.styleAliases=(s=o.styleAliases||null,i={},null!==s&&Object.keys(s).forEach(function(e){s[e].forEach(function(t){i[String(t)]=e})}),i),-1===r.indexOf(this.kind))throw new e('Unknown kind "'+this.kind+'" is specified for "'+n+'" YAML type.')}}function Fa(){if(ta)return ea;ta=1;var e=Ba(),t=Ha();function r(e,t){var r=[];return e[t].forEach(function(e){var t=r.length;r.forEach(function(r,n){r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi&&(t=n)}),r[t]=e}),r}function n(e){return this.extend(e)}return n.prototype.extend=function(o){var s=[],i=[];if(o instanceof t)i.push(o);else if(Array.isArray(o))i=i.concat(o);else{if(!o||!Array.isArray(o.implicit)&&!Array.isArray(o.explicit))throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");o.implicit&&(s=s.concat(o.implicit)),o.explicit&&(i=i.concat(o.explicit))}s.forEach(function(r){if(!(r instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(r.loadKind&&"scalar"!==r.loadKind)throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(r.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(r){if(!(r instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(n.prototype);return a.implicit=(this.implicit||[]).concat(s),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=r(a,"implicit"),a.compiledExplicit=r(a,"explicit"),a.compiledTypeMap=function(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(e){e.multi?(r.multi[e.kind].push(e),r.multi.fallback.push(e)):r[e.kind][e.tag]=r.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(n);return r}(a.compiledImplicit,a.compiledExplicit),a},ea=n}function Va(){if(na)return ra;na=1;var e=Ha();return ra=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})}function Ja(){if(sa)return oa;sa=1;var e=Ha();return oa=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})}function Wa(){if(aa)return ia;aa=1;var e=Ha();return ia=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})}function Ga(){if(ca)return la;ca=1;var e=Fa();return la=new e({explicit:[Va(),Ja(),Wa()]})}function Ka(){if(pa)return da;pa=1;var e=Ha();return da=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})}function Za(){if(fa)return ua;fa=1;var e=Ha();return ua=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})}function Qa(){if(ma)return ha;ma=1;var e=Da(),t=Ha();function r(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function n(e){return 48<=e&&e<=55}function o(e){return 48<=e&&e<=57}return ha=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,s=e.length,i=0,a=!1;if(!s)return!1;if("-"!==(t=e[i])&&"+"!==t||(t=e[++i]),"0"===t){if(i+1===s)return!0;if("b"===(t=e[++i])){for(i++;i<s;i++)if("_"!==(t=e[i])){if("0"!==t&&"1"!==t)return!1;a=!0}return a&&"_"!==t}if("x"===t){for(i++;i<s;i++)if("_"!==(t=e[i])){if(!r(e.charCodeAt(i)))return!1;a=!0}return a&&"_"!==t}if("o"===t){for(i++;i<s;i++)if("_"!==(t=e[i])){if(!n(e.charCodeAt(i)))return!1;a=!0}return a&&"_"!==t}}if("_"===t)return!1;for(;i<s;i++)if("_"!==(t=e[i])){if(!o(e.charCodeAt(i)))return!1;a=!0}return!(!a||"_"===t)},construct:function(e){var t,r=e,n=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(t=r[0])&&"+"!==t||("-"===t&&(n=-1),t=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===t){if("b"===r[1])return n*parseInt(r.slice(2),2);if("x"===r[1])return n*parseInt(r.slice(2),16);if("o"===r[1])return n*parseInt(r.slice(2),8)}return n*parseInt(r,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!e.isNegativeZero(t)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})}function Ya(){if(ya)return ga;ya=1;var e=Da(),t=Ha(),r=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var n=/^[-+]?[0-9]+e/;return ga=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!r.test(e)||"_"===e[e.length-1])},construct:function(e){var t,r;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:r*parseFloat(t,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||e.isNegativeZero(t))},represent:function(t,r){var o;if(isNaN(t))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(t))return"-0.0";return o=t.toString(10),n.test(o)?o.replace("e",".e"):o},defaultStyle:"lowercase"})}function Xa(){return ba?va:(ba=1,va=Ga().extend({implicit:[Ka(),Za(),Qa(),Ya()]}))}function el(){return xa?$a:(xa=1,$a=Xa())}function tl(){if(_a)return wa;_a=1;var e=Ha(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");return wa=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==t.exec(e)||null!==r.exec(e))},construct:function(e){var n,o,s,i,a,l,c,d,p=0,u=null;if(null===(n=t.exec(e))&&(n=r.exec(e)),null===n)throw new Error("Date resolve error");if(o=+n[1],s=+n[2]-1,i=+n[3],!n[4])return new Date(Date.UTC(o,s,i));if(a=+n[4],l=+n[5],c=+n[6],n[7]){for(p=n[7].slice(0,3);p.length<3;)p+="0";p=+p}return n[9]&&(u=6e4*(60*+n[10]+ +(n[11]||0)),"-"===n[9]&&(u=-u)),d=new Date(Date.UTC(o,s,i,a,l,c,p)),u&&d.setTime(d.getTime()-u),d},instanceOf:Date,represent:function(e){return e.toISOString()}})}function rl(){if(Sa)return ka;Sa=1;var e=Ha();return ka=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})}function nl(){if(Oa)return ja;Oa=1;var e=Ha(),t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";return ja=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var r,n,o=0,s=e.length,i=t;for(n=0;n<s;n++)if(!((r=i.indexOf(e.charAt(n)))>64)){if(r<0)return!1;o+=6}return o%8==0},construct:function(e){var r,n,o=e.replace(/[\r\n=]/g,""),s=o.length,i=t,a=0,l=[];for(r=0;r<s;r++)r%4==0&&r&&(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|i.indexOf(o.charAt(r));return 0===(n=s%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var r,n,o="",s=0,i=e.length,a=t;for(r=0;r<i;r++)r%3==0&&r&&(o+=a[s>>18&63],o+=a[s>>12&63],o+=a[s>>6&63],o+=a[63&s]),s=(s<<8)+e[r];return 0===(n=i%3)?(o+=a[s>>18&63],o+=a[s>>12&63],o+=a[s>>6&63],o+=a[63&s]):2===n?(o+=a[s>>10&63],o+=a[s>>4&63],o+=a[s<<2&63],o+=a[64]):1===n&&(o+=a[s>>2&63],o+=a[s<<4&63],o+=a[64],o+=a[64]),o}})}function ol(){if(Ea)return Pa;Ea=1;var e=Ha(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;return Pa=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var n,o,s,i,a,l=[],c=e;for(n=0,o=c.length;n<o;n+=1){if(s=c[n],a=!1,"[object Object]"!==r.call(s))return!1;for(i in s)if(t.call(s,i)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==l.indexOf(i))return!1;l.push(i)}return!0},construct:function(e){return null!==e?e:[]}})}function sl(){if(Aa)return Ta;Aa=1;var e=Ha(),t=Object.prototype.toString;return Ta=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var r,n,o,s,i,a=e;for(i=new Array(a.length),r=0,n=a.length;r<n;r+=1){if(o=a[r],"[object Object]"!==t.call(o))return!1;if(1!==(s=Object.keys(o)).length)return!1;i[r]=[s[0],o[s[0]]]}return!0},construct:function(e){if(null===e)return[];var t,r,n,o,s,i=e;for(s=new Array(i.length),t=0,r=i.length;t<r;t+=1)n=i[t],o=Object.keys(n),s[t]=[o[0],n[o[0]]];return s}})}function il(){if(Ia)return Ca;Ia=1;var e=Ha(),t=Object.prototype.hasOwnProperty;return Ca=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var r,n=e;for(r in n)if(t.call(n,r)&&null!==n[r])return!1;return!0},construct:function(e){return null!==e?e:{}}})}function al(){return Na?Ra:(Na=1,Ra=el().extend({implicit:[tl(),rl()],explicit:[nl(),ol(),sl(),il()]}))}function ll(){if(Ma)return Ua;Ma=1;var e=Da(),t=Ba(),r=function(){if(Qi)return Zi;Qi=1;var e=Da();function t(e,t,r,n,o){var s="",i="",a=Math.floor(o/2)-1;return n-t>a&&(t=n-a+(s=" ... ").length),r-n>a&&(r=n+a-(i=" ...").length),{str:s+e.slice(t,r).replace(/\t/g,"→")+i,pos:n-t+s.length}}function r(t,r){return e.repeat(" ",r-t.length)+t}return Zi=function(n,o){if(o=Object.create(o||null),!n.buffer)return null;o.maxLength||(o.maxLength=79),"number"!=typeof o.indent&&(o.indent=1),"number"!=typeof o.linesBefore&&(o.linesBefore=3),"number"!=typeof o.linesAfter&&(o.linesAfter=2);for(var s,i=/\r?\n|\r|\0/g,a=[0],l=[],c=-1;s=i.exec(n.buffer);)l.push(s.index),a.push(s.index+s[0].length),n.position<=s.index&&c<0&&(c=a.length-2);c<0&&(c=a.length-1);var d,p,u="",f=Math.min(n.line+o.linesAfter,l.length).toString().length,h=o.maxLength-(o.indent+f+3);for(d=1;d<=o.linesBefore&&!(c-d<0);d++)p=t(n.buffer,a[c-d],l[c-d],n.position-(a[c]-a[c-d]),h),u=e.repeat(" ",o.indent)+r((n.line-d+1).toString(),f)+" | "+p.str+"\n"+u;for(p=t(n.buffer,a[c],l[c],n.position,h),u+=e.repeat(" ",o.indent)+r((n.line+1).toString(),f)+" | "+p.str+"\n",u+=e.repeat("-",o.indent+f+3+p.pos)+"^\n",d=1;d<=o.linesAfter&&!(c+d>=l.length);d++)p=t(n.buffer,a[c+d],l[c+d],n.position-(a[c]-a[c+d]),h),u+=e.repeat(" ",o.indent)+r((n.line+d+1).toString(),f)+" | "+p.str+"\n";return u.replace(/\n$/,"")}}(),n=al(),o=Object.prototype.hasOwnProperty,s=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,i=/[\x85\u2028\u2029]/,a=/[,\[\]\{\}]/,l=/^(?:!|!!|![a-z\-]+!)$/i,c=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function d(e){return Object.prototype.toString.call(e)}function p(e){return 10===e||13===e}function u(e){return 9===e||32===e}function f(e){return 9===e||32===e||10===e||13===e}function h(e){return 44===e||91===e||93===e||123===e||125===e}function m(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function g(e){return 120===e?2:117===e?4:85===e?8:0}function y(e){return 48<=e&&e<=57?e-48:-1}function v(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function b(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function $(e,t,r){"__proto__"===t?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}for(var x=new Array(256),w=new Array(256),_=0;_<256;_++)x[_]=v(_)?1:0,w[_]=v(_);function k(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||n,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function S(e,n){var o={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return o.snippet=r(o),new t(n,o)}function j(e,t){throw S(e,t)}function O(e,t){e.onWarning&&e.onWarning.call(null,S(e,t))}var P={YAML:function(e,t,r){var n,o,s;null!==e.version&&j(e,"duplication of %YAML directive"),1!==r.length&&j(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&j(e,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),s=parseInt(n[2],10),1!==o&&j(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=s<2,1!==s&&2!==s&&O(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var n,s;2!==r.length&&j(e,"TAG directive accepts exactly two arguments"),n=r[0],s=r[1],l.test(n)||j(e,"ill-formed tag handle (first argument) of the TAG directive"),o.call(e.tagMap,n)&&j(e,'there is a previously declared suffix for "'+n+'" tag handle'),c.test(s)||j(e,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch(i){j(e,"tag prefix is malformed: "+s)}e.tagMap[n]=s}};function E(e,t,r,n){var o,i,a,l;if(t<r){if(l=e.input.slice(t,r),n)for(o=0,i=l.length;o<i;o+=1)9===(a=l.charCodeAt(o))||32<=a&&a<=1114111||j(e,"expected valid JSON character");else s.test(l)&&j(e,"the stream contains non-printable characters");e.result+=l}}function T(t,r,n,s){var i,a,l,c;for(e.isObject(n)||j(t,"cannot merge mappings; the provided source object is unacceptable"),l=0,c=(i=Object.keys(n)).length;l<c;l+=1)a=i[l],o.call(r,a)||($(r,a,n[a]),s[a]=!0)}function A(e,t,r,n,s,i,a,l,c){var p,u;if(Array.isArray(s))for(p=0,u=(s=Array.prototype.slice.call(s)).length;p<u;p+=1)Array.isArray(s[p])&&j(e,"nested arrays are not supported inside keys"),"object"==typeof s&&"[object Object]"===d(s[p])&&(s[p]="[object Object]");if("object"==typeof s&&"[object Object]"===d(s)&&(s="[object Object]"),s=String(s),null===t&&(t={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(i))for(p=0,u=i.length;p<u;p+=1)T(e,t,i[p],r);else T(e,t,i,r);else e.json||o.call(r,s)||!o.call(t,s)||(e.line=a||e.line,e.lineStart=l||e.lineStart,e.position=c||e.position,j(e,"duplicated mapping key")),$(t,s,i),delete r[s];return t}function C(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):j(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function I(e,t,r){for(var n=0,o=e.input.charCodeAt(e.position);0!==o;){for(;u(o);)9===o&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&35===o)do{o=e.input.charCodeAt(++e.position)}while(10!==o&&13!==o&&0!==o);if(!p(o))break;for(C(e),o=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==r&&0!==n&&e.lineIndent<r&&O(e,"deficient indentation"),n}function R(e){var t,r=e.position;return!(45!==(t=e.input.charCodeAt(r))&&46!==t||t!==e.input.charCodeAt(r+1)||t!==e.input.charCodeAt(r+2)||(r+=3,0!==(t=e.input.charCodeAt(r))&&!f(t)))}function N(t,r){1===r?t.result+=" ":r>1&&(t.result+=e.repeat("\n",r-1))}function M(e,t){var r,n,o=e.tag,s=e.anchor,i=[],a=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),n=e.input.charCodeAt(e.position);0!==n&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),45===n)&&f(e.input.charCodeAt(e.position+1));)if(a=!0,e.position++,I(e,!0,-1)&&e.lineIndent<=t)i.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,U(e,t,3,!1,!0),i.push(e.result),I(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)j(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!a&&(e.tag=o,e.anchor=s,e.kind="sequence",e.result=i,!0)}function q(e){var t,r,n,s,i=!1,d=!1;if(33!==(s=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&j(e,"duplication of a tag property"),60===(s=e.input.charCodeAt(++e.position))?(i=!0,s=e.input.charCodeAt(++e.position)):33===s?(d=!0,r="!!",s=e.input.charCodeAt(++e.position)):r="!",t=e.position,i){do{s=e.input.charCodeAt(++e.position)}while(0!==s&&62!==s);e.position<e.length?(n=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):j(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==s&&!f(s);)33===s&&(d?j(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),l.test(r)||j(e,"named tag handle cannot contain such characters"),d=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),a.test(n)&&j(e,"tag suffix cannot contain flow indicator characters")}n&&!c.test(n)&&j(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch(p){j(e,"tag name is malformed: "+n)}return i?e.tag=n:o.call(e.tagMap,r)?e.tag=e.tagMap[r]+n:"!"===r?e.tag="!"+n:"!!"===r?e.tag="tag:yaml.org,2002:"+n:j(e,'undeclared tag handle "'+r+'"'),!0}function z(e){var t,r;if(38!==(r=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&j(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!f(r)&&!h(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&j(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function U(t,r,n,s,i){var a,l,c,d,v,$,_,k,S,O=1,P=!1,T=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=l=c=4===n||3===n,s&&I(t,!0,-1)&&(P=!0,t.lineIndent>r?O=1:t.lineIndent===r?O=0:t.lineIndent<r&&(O=-1)),1===O)for(;q(t)||z(t);)I(t,!0,-1)?(P=!0,c=a,t.lineIndent>r?O=1:t.lineIndent===r?O=0:t.lineIndent<r&&(O=-1)):c=!1;if(c&&(c=P||i),1!==O&&4!==n||(k=1===n||2===n?r:r+1,S=t.position-t.lineStart,1===O?c&&(M(t,S)||function(e,t,r){var n,o,s,i,a,l,c,d=e.tag,p=e.anchor,h={},m=Object.create(null),g=null,y=null,v=null,b=!1,$=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=h),c=e.input.charCodeAt(e.position);0!==c;){if(b||-1===e.firstTabInLine||(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),s=e.line,63!==c&&58!==c||!f(n)){if(i=e.line,a=e.lineStart,l=e.position,!U(e,r,2,!1,!0))break;if(e.line===s){for(c=e.input.charCodeAt(e.position);u(c);)c=e.input.charCodeAt(++e.position);if(58===c)f(c=e.input.charCodeAt(++e.position))||j(e,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(A(e,h,m,g,y,null,i,a,l),g=y=v=null),$=!0,b=!1,o=!1,g=e.tag,y=e.result;else{if(!$)return e.tag=d,e.anchor=p,!0;j(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!$)return e.tag=d,e.anchor=p,!0;j(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(b&&(A(e,h,m,g,y,null,i,a,l),g=y=v=null),$=!0,b=!0,o=!0):b?(b=!1,o=!0):j(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=n;if((e.line===s||e.lineIndent>t)&&(b&&(i=e.line,a=e.lineStart,l=e.position),U(e,t,4,!0,o)&&(b?y=e.result:v=e.result),b||(A(e,h,m,g,y,v,i,a,l),g=y=v=null),I(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&0!==c)j(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return b&&A(e,h,m,g,y,null,i,a,l),$&&(e.tag=d,e.anchor=p,e.kind="mapping",e.result=h),$}(t,S,k))||function(e,t){var r,n,o,s,i,a,l,c,d,p,u,h,m=!0,g=e.tag,y=e.anchor,v=Object.create(null);if(91===(h=e.input.charCodeAt(e.position)))i=93,c=!1,s=[];else{if(123!==h)return!1;i=125,c=!0,s={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=s),h=e.input.charCodeAt(++e.position);0!==h;){if(I(e,!0,t),(h=e.input.charCodeAt(e.position))===i)return e.position++,e.tag=g,e.anchor=y,e.kind=c?"mapping":"sequence",e.result=s,!0;m?44===h&&j(e,"expected the node content, but found ','"):j(e,"missed comma between flow collection entries"),u=null,a=l=!1,63===h&&f(e.input.charCodeAt(e.position+1))&&(a=l=!0,e.position++,I(e,!0,t)),r=e.line,n=e.lineStart,o=e.position,U(e,t,1,!1,!0),p=e.tag,d=e.result,I(e,!0,t),h=e.input.charCodeAt(e.position),!l&&e.line!==r||58!==h||(a=!0,h=e.input.charCodeAt(++e.position),I(e,!0,t),U(e,t,1,!1,!0),u=e.result),c?A(e,s,v,p,d,u,r,n,o):a?s.push(A(e,null,v,p,d,u,r,n,o)):s.push(d),I(e,!0,t),44===(h=e.input.charCodeAt(e.position))?(m=!0,h=e.input.charCodeAt(++e.position)):m=!1}j(e,"unexpected end of the stream within a flow collection")}(t,k)?T=!0:(l&&function(t,r){var n,o,s,i,a=1,l=!1,c=!1,d=r,f=0,h=!1;if(124===(i=t.input.charCodeAt(t.position)))o=!1;else{if(62!==i)return!1;o=!0}for(t.kind="scalar",t.result="";0!==i;)if(43===(i=t.input.charCodeAt(++t.position))||45===i)1===a?a=43===i?3:2:j(t,"repeat of a chomping mode identifier");else{if(!((s=y(i))>=0))break;0===s?j(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?j(t,"repeat of an indentation width identifier"):(d=r+s-1,c=!0)}if(u(i)){do{i=t.input.charCodeAt(++t.position)}while(u(i));if(35===i)do{i=t.input.charCodeAt(++t.position)}while(!p(i)&&0!==i)}for(;0!==i;){for(C(t),t.lineIndent=0,i=t.input.charCodeAt(t.position);(!c||t.lineIndent<d)&&32===i;)t.lineIndent++,i=t.input.charCodeAt(++t.position);if(!c&&t.lineIndent>d&&(d=t.lineIndent),p(i))f++;else{if(t.lineIndent<d){3===a?t.result+=e.repeat("\n",l?1+f:f):1===a&&l&&(t.result+="\n");break}for(o?u(i)?(h=!0,t.result+=e.repeat("\n",l?1+f:f)):h?(h=!1,t.result+=e.repeat("\n",f+1)):0===f?l&&(t.result+=" "):t.result+=e.repeat("\n",f):t.result+=e.repeat("\n",l?1+f:f),l=!0,c=!0,f=0,n=t.position;!p(i)&&0!==i;)i=t.input.charCodeAt(++t.position);E(t,n,t.position,!1)}}return!0}(t,k)||function(e,t){var r,n,o;if(39!==(r=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;0!==(r=e.input.charCodeAt(e.position));)if(39===r){if(E(e,n,e.position,!0),39!==(r=e.input.charCodeAt(++e.position)))return!0;n=e.position,e.position++,o=e.position}else p(r)?(E(e,n,o,!0),N(e,I(e,!1,t)),n=o=e.position):e.position===e.lineStart&&R(e)?j(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);j(e,"unexpected end of the stream within a single quoted scalar")}(t,k)||function(e,t){var r,n,o,s,i,a;if(34!==(a=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;0!==(a=e.input.charCodeAt(e.position));){if(34===a)return E(e,r,e.position,!0),e.position++,!0;if(92===a){if(E(e,r,e.position,!0),p(a=e.input.charCodeAt(++e.position)))I(e,!1,t);else if(a<256&&x[a])e.result+=w[a],e.position++;else if((i=g(a))>0){for(o=i,s=0;o>0;o--)(i=m(a=e.input.charCodeAt(++e.position)))>=0?s=(s<<4)+i:j(e,"expected hexadecimal character");e.result+=b(s),e.position++}else j(e,"unknown escape sequence");r=n=e.position}else p(a)?(E(e,r,n,!0),N(e,I(e,!1,t)),r=n=e.position):e.position===e.lineStart&&R(e)?j(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}j(e,"unexpected end of the stream within a double quoted scalar")}(t,k)?T=!0:!function(e){var t,r,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!f(n)&&!h(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&j(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),o.call(e.anchorMap,r)||j(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],I(e,!0,-1),!0}(t)?function(e,t,r){var n,o,s,i,a,l,c,d,m=e.kind,g=e.result;if(f(d=e.input.charCodeAt(e.position))||h(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d)return!1;if((63===d||45===d)&&(f(n=e.input.charCodeAt(e.position+1))||r&&h(n)))return!1;for(e.kind="scalar",e.result="",o=s=e.position,i=!1;0!==d;){if(58===d){if(f(n=e.input.charCodeAt(e.position+1))||r&&h(n))break}else if(35===d){if(f(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&R(e)||r&&h(d))break;if(p(d)){if(a=e.line,l=e.lineStart,c=e.lineIndent,I(e,!1,-1),e.lineIndent>=t){i=!0,d=e.input.charCodeAt(e.position);continue}e.position=s,e.line=a,e.lineStart=l,e.lineIndent=c;break}}i&&(E(e,o,s,!1),N(e,e.line-a),o=s=e.position,i=!1),u(d)||(s=e.position+1),d=e.input.charCodeAt(++e.position)}return E(e,o,s,!1),!!e.result||(e.kind=m,e.result=g,!1)}(t,k,1===n)&&(T=!0,null===t.tag&&(t.tag="?")):(T=!0,null===t.tag&&null===t.anchor||j(t,"alias node should not have any properties")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===O&&(T=c&&M(t,S))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&j(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),d=0,v=t.implicitTypes.length;d<v;d+=1)if((_=t.implicitTypes[d]).resolve(t.result)){t.result=_.construct(t.result),t.tag=_.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(o.call(t.typeMap[t.kind||"fallback"],t.tag))_=t.typeMap[t.kind||"fallback"][t.tag];else for(_=null,d=0,v=($=t.typeMap.multi[t.kind||"fallback"]).length;d<v;d+=1)if(t.tag.slice(0,$[d].tag.length)===$[d].tag){_=$[d];break}_||j(t,"unknown tag !<"+t.tag+">"),null!==t.result&&_.kind!==t.kind&&j(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+_.kind+'", not "'+t.kind+'"'),_.resolve(t.result,t.tag)?(t.result=_.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):j(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||T}function L(e){var t,r,n,s,a=e.position,l=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(s=e.input.charCodeAt(e.position))&&(I(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(l=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!f(s);)s=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&j(e,"directive name must not be less than one character in length");0!==s;){for(;u(s);)s=e.input.charCodeAt(++e.position);if(35===s){do{s=e.input.charCodeAt(++e.position)}while(0!==s&&!p(s));break}if(p(s))break;for(t=e.position;0!==s&&!f(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==s&&C(e),o.call(P,r)?P[r](e,r,n):O(e,'unknown document directive "'+r+'"')}I(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,I(e,!0,-1)):l&&j(e,"directives end mark is expected"),U(e,e.lineIndent-1,4,!1,!0),I(e,!0,-1),e.checkLineBreaks&&i.test(e.input.slice(a,e.position))&&O(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&R(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,I(e,!0,-1)):e.position<e.length-1&&j(e,"end of the stream or a document separator is expected")}function D(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var r=new k(e,t),n=e.indexOf("\0");for(-1!==n&&(r.position=n,j(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)L(r);return r.documents}return Ua.loadAll=function(e,t,r){null!==t&&"object"==typeof t&&void 0===r&&(r=t,t=null);var n=D(e,r);if("function"!=typeof t)return n;for(var o=0,s=n.length;o<s;o+=1)t(n[o])},Ua.load=function(e,r){var n=D(e,r);if(0!==n.length){if(1===n.length)return n[0];throw new t("expected a single document in the stream, but found more")}},Ua}var cl,dl,pl,ul={};function fl(){if(cl)return ul;cl=1;var e=Da(),t=Ba(),r=al(),n=Object.prototype.toString,o=Object.prototype.hasOwnProperty,s=65279,i={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},a=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],l=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function c(r){var n,o,s;if(n=r.toString(16).toUpperCase(),r<=255)o="x",s=2;else if(r<=65535)o="u",s=4;else{if(!(r<=4294967295))throw new t("code point within a string may not be greater than 0xFFFFFFFF");o="U",s=8}return"\\"+o+e.repeat("0",s-n.length)+n}function d(t){this.schema=t.schema||r,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=e.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=function(e,t){var r,n,s,i,a,l,c;if(null===t)return{};for(r={},s=0,i=(n=Object.keys(t)).length;s<i;s+=1)a=n[s],l=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(c=e.compiledTypeMap.fallback[a])&&o.call(c.styleAliases,l)&&(l=c.styleAliases[l]),r[a]=l;return r}(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function p(t,r){for(var n,o=e.repeat(" ",r),s=0,i=-1,a="",l=t.length;s<l;)-1===(i=t.indexOf("\n",s))?(n=t.slice(s),s=l):(n=t.slice(s,i+1),s=i+1),n.length&&"\n"!==n&&(a+=o),a+=n;return a}function u(t,r){return"\n"+e.repeat(" ",t.indent*r)}function f(e){return 32===e||9===e}function h(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==s||65536<=e&&e<=1114111}function m(e){return h(e)&&e!==s&&13!==e&&10!==e}function g(e,t,r){var n=m(e),o=n&&!f(e);return(r?n:n&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!o)||m(t)&&!f(t)&&35===e||58===t&&o}function y(e,t){var r,n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1))>=56320&&r<=57343?1024*(n-55296)+r-56320+65536:n}function v(e){return/^\n* /.test(e)}function b(e,t,r,n,o,i,a,l){var c,d,p=0,u=null,m=!1,b=!1,$=-1!==n,x=-1,w=h(d=y(e,0))&&d!==s&&!f(d)&&45!==d&&63!==d&&58!==d&&44!==d&&91!==d&&93!==d&&123!==d&&125!==d&&35!==d&&38!==d&&42!==d&&33!==d&&124!==d&&61!==d&&62!==d&&39!==d&&34!==d&&37!==d&&64!==d&&96!==d&&function(e){return!f(e)&&58!==e}(y(e,e.length-1));if(t||a)for(c=0;c<e.length;p>=65536?c+=2:c++){if(!h(p=y(e,c)))return 5;w=w&&g(p,u,l),u=p}else{for(c=0;c<e.length;p>=65536?c+=2:c++){if(10===(p=y(e,c)))m=!0,$&&(b=b||c-x-1>n&&" "!==e[x+1],x=c);else if(!h(p))return 5;w=w&&g(p,u,l),u=p}b=b||$&&c-x-1>n&&" "!==e[x+1]}return m||b?r>9&&v(e)?5:a?2===i?5:2:b?4:3:!w||a||o(e)?2===i?5:2:1}function $(e,r,n,o,s){e.dump=function(){if(0===r.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==a.indexOf(r)||l.test(r)))return 2===e.quotingType?'"'+r+'"':"'"+r+"'";var d=e.indent*Math.max(1,n),u=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-d),f=o||e.flowLevel>-1&&n>=e.flowLevel;switch(b(r,f,e.indent,u,function(t){return function(e,t){var r,n;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}(e,t)},e.quotingType,e.forceQuotes&&!o,s)){case 1:return r;case 2:return"'"+r.replace(/'/g,"''")+"'";case 3:return"|"+x(r,e.indent)+w(p(r,d));case 4:return">"+x(r,e.indent)+w(p(function(e,t){var r,n,o=/(\n+)([^\n]*)/g,s=(a=e.indexOf("\n"),a=-1!==a?a:e.length,o.lastIndex=a,_(e.slice(0,a),t)),i="\n"===e[0]||" "===e[0];var a;for(;n=o.exec(e);){var l=n[1],c=n[2];r=" "===c[0],s+=l+(i||r||""===c?"":"\n")+_(c,t),i=r}return s}(r,u),d));case 5:return'"'+function(e){for(var t,r="",n=0,o=0;o<e.length;n>=65536?o+=2:o++)n=y(e,o),!(t=i[n])&&h(n)?(r+=e[o],n>=65536&&(r+=e[o+1])):r+=t||c(n);return r}(r)+'"';default:throw new t("impossible error: invalid scalar style")}}()}function x(e,t){var r=v(e)?String(t):"",n="\n"===e[e.length-1];return r+(n&&("\n"===e[e.length-2]||"\n"===e)?"+":n?"":"-")+"\n"}function w(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function _(e,t){if(""===e||" "===e[0])return e;for(var r,n,o=/ [^ ]/g,s=0,i=0,a=0,l="";r=o.exec(e);)(a=r.index)-s>t&&(n=i>s?i:a,l+="\n"+e.slice(s,n),s=n+1),i=a;return l+="\n",e.length-s>t&&i>s?l+=e.slice(s,i)+"\n"+e.slice(i+1):l+=e.slice(s),l.slice(1)}function k(e,t,r,n){var o,s,i,a="",l=e.tag;for(o=0,s=r.length;o<s;o+=1)i=r[o],e.replacer&&(i=e.replacer.call(r,String(o),i)),(j(e,t+1,i,!0,!0,!1,!0)||void 0===i&&j(e,t+1,null,!0,!0,!1,!0))&&(n&&""===a||(a+=u(e,t)),e.dump&&10===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=l,e.dump=a||"[]"}function S(e,r,s){var i,a,l,c,d,p;for(l=0,c=(a=s?e.explicitTypes:e.implicitTypes).length;l<c;l+=1)if(((d=a[l]).instanceOf||d.predicate)&&(!d.instanceOf||"object"==typeof r&&r instanceof d.instanceOf)&&(!d.predicate||d.predicate(r))){if(s?d.multi&&d.representName?e.tag=d.representName(r):e.tag=d.tag:e.tag="?",d.represent){if(p=e.styleMap[d.tag]||d.defaultStyle,"[object Function]"===n.call(d.represent))i=d.represent(r,p);else{if(!o.call(d.represent,p))throw new t("!<"+d.tag+'> tag resolver accepts not "'+p+'" style');i=d.represent[p](r,p)}e.dump=i}return!0}return!1}function j(e,r,o,s,i,a,l){e.tag=null,e.dump=o,S(e,o,!1)||S(e,o,!0);var c,d=n.call(e.dump),p=s;s&&(s=e.flowLevel<0||e.flowLevel>r);var f,h,m="[object Object]"===d||"[object Array]"===d;if(m&&(h=-1!==(f=e.duplicates.indexOf(o))),(null!==e.tag&&"?"!==e.tag||h||2!==e.indent&&r>0)&&(i=!1),h&&e.usedDuplicates[f])e.dump="*ref_"+f;else{if(m&&h&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),"[object Object]"===d)s&&0!==Object.keys(e.dump).length?(!function(e,r,n,o){var s,i,a,l,c,d,p="",f=e.tag,h=Object.keys(n);if(!0===e.sortKeys)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new t("sortKeys must be a boolean or a function");for(s=0,i=h.length;s<i;s+=1)d="",o&&""===p||(d+=u(e,r)),l=n[a=h[s]],e.replacer&&(l=e.replacer.call(n,a,l)),j(e,r+1,a,!0,!0,!0)&&((c=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,c&&(d+=u(e,r)),j(e,r+1,l,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?d+=":":d+=": ",p+=d+=e.dump));e.tag=f,e.dump=p||"{}"}(e,r,e.dump,i),h&&(e.dump="&ref_"+f+e.dump)):(!function(e,t,r){var n,o,s,i,a,l="",c=e.tag,d=Object.keys(r);for(n=0,o=d.length;n<o;n+=1)a="",""!==l&&(a+=", "),e.condenseFlow&&(a+='"'),i=r[s=d[n]],e.replacer&&(i=e.replacer.call(r,s,i)),j(e,t,s,!1,!1)&&(e.dump.length>1024&&(a+="? "),a+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),j(e,t,i,!1,!1)&&(l+=a+=e.dump));e.tag=c,e.dump="{"+l+"}"}(e,r,e.dump),h&&(e.dump="&ref_"+f+" "+e.dump));else if("[object Array]"===d)s&&0!==e.dump.length?(e.noArrayIndent&&!l&&r>0?k(e,r-1,e.dump,i):k(e,r,e.dump,i),h&&(e.dump="&ref_"+f+e.dump)):(!function(e,t,r){var n,o,s,i="",a=e.tag;for(n=0,o=r.length;n<o;n+=1)s=r[n],e.replacer&&(s=e.replacer.call(r,String(n),s)),(j(e,t,s,!1,!1)||void 0===s&&j(e,t,null,!1,!1))&&(""!==i&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}(e,r,e.dump),h&&(e.dump="&ref_"+f+" "+e.dump));else{if("[object String]"!==d){if("[object Undefined]"===d)return!1;if(e.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+d)}"?"!==e.tag&&$(e,e.dump,r,a,p)}null!==e.tag&&"?"!==e.tag&&(c=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),c="!"===e.tag[0]?"!"+c:"tag:yaml.org,2002:"===c.slice(0,18)?"!!"+c.slice(18):"!<"+c+">",e.dump=c+" "+e.dump)}return!0}function O(e,t){var r,n,o=[],s=[];for(P(e,o,s),r=0,n=s.length;r<n;r+=1)t.duplicates.push(o[s[r]]);t.usedDuplicates=new Array(n)}function P(e,t,r){var n,o,s;if(null!==e&&"object"==typeof e)if(-1!==(o=t.indexOf(e)))-1===r.indexOf(o)&&r.push(o);else if(t.push(e),Array.isArray(e))for(o=0,s=e.length;o<s;o+=1)P(e[o],t,r);else for(o=0,s=(n=Object.keys(e)).length;o<s;o+=1)P(e[n[o]],t,r)}return ul.dump=function(e,t){var r=new d(t=t||{});r.noRefs||O(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),j(r,0,n,!0,!0)?r.dump+"\n":""},ul}function hl(){if(dl)return za;dl=1;var e=ll(),t=fl();function r(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}return za.Type=Ha(),za.Schema=Fa(),za.FAILSAFE_SCHEMA=Ga(),za.JSON_SCHEMA=Xa(),za.CORE_SCHEMA=el(),za.DEFAULT_SCHEMA=al(),za.load=e.load,za.loadAll=e.loadAll,za.dump=t.dump,za.YAMLException=Ba(),za.types={binary:nl(),float:Ya(),map:Wa(),null:Ka(),pairs:sl(),set:il(),timestamp:tl(),bool:Za(),int:Qa(),merge:rl(),omap:ol(),seq:Ja(),str:Va()},za.safeLoad=r("safeLoad","load"),za.safeLoadAll=r("safeLoadAll","loadAll"),za.safeDump=r("safeDump","dump"),za}var ml,gl={};var yl,vl={};var bl={};const $l=i(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var xl;var wl,_l,kl,Sl={};function jl(){if(wl)return Sl;wl=1;var e=Sl&&Sl.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=Sl&&Sl.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Sl&&Sl.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n};Object.defineProperty(Sl,"__esModule",{value:!0});const n=rt,o=r(Ei()),s=Ni();async function i(e,t,r){e=o.parse(e);const a=r||[];a.push(e.href);try{const r=await async function(e,t){let r,n;t.timeout&&(r=new AbortController,n=setTimeout(()=>r.abort(),t.timeout));const o=await fetch(e,{method:"GET",headers:t.headers||{},credentials:t.withCredentials?"include":"same-origin",signal:r?r.signal:null});n&&clearTimeout(n);return o}(e,t);if(r.status>=400)throw(0,n.ono)({status:r.status},`HTTP ERROR ${r.status}`);if(r.status>=300){if(!Number.isNaN(t.redirects)&&a.length>t.redirects)throw new s.ResolverError((0,n.ono)({status:r.status},`Error downloading ${a[0]}. \nToo many redirects: \n ${a.join(" \n ")}`));if("location"in r.headers&&r.headers.location){return i(o.resolve(e.href,r.headers.location),t,a)}throw(0,n.ono)({status:r.status},`HTTP ${r.status} redirect with no location header`)}if(r.body){const e=await r.arrayBuffer();return Buffer.from(e)}return Buffer.alloc(0)}catch(l){throw new s.ResolverError((0,n.ono)(l,`Error downloading ${e.href}`),e.href)}}return Sl.default={order:200,headers:null,timeout:6e4,redirects:5,withCredentials:!1,canRead:e=>o.isHttp(e.url),read(e){const t=o.parse(e.url);return"undefined"==typeof window||t.protocol||(t.protocol=o.parse(location.href).protocol),i(t,this)}},Sl}function Ol(){return _l||(_l=1,function(e){var t=Vi&&Vi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getNewOptions=e.getJsonSchemaRefParserDefaultOptions=void 0;const r=t(function(){if(Hi)return Ji;Hi=1,Object.defineProperty(Ji,"__esModule",{value:!0});const e=Ni();return Ji.default={order:100,allowEmpty:!0,canParse:".json",allowBOM:!0,async parse(t){let r=t.data;if(Buffer.isBuffer(r)&&(r=r.toString()),"string"!=typeof r)return r;if(0!==r.trim().length)try{return JSON.parse(r)}catch(cp){if(this.allowBOM)try{const e=r.indexOf("{");return r=r.slice(e),JSON.parse(r)}catch(n){throw new e.ParserError(n.message,t.url)}throw new e.ParserError(cp.message,t.url)}}},Ji}()),n=t(function(){if(pl)return qa;pl=1;var e=qa&&qa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qa,"__esModule",{value:!0});const t=Ni(),r=e(hl()),n=hl();return qa.default={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],async parse(e){let o=e.data;if(Buffer.isBuffer(o)&&(o=o.toString()),"string"!=typeof o)return o;try{return r.default.load(o,{schema:n.JSON_SCHEMA})}catch(cp){throw new t.ParserError((null==cp?void 0:cp.message)||"Parser Error",e.url)}}},qa}()),o=t(function(){if(ml)return gl;ml=1,Object.defineProperty(gl,"__esModule",{value:!0});const e=Ni(),t=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;return gl.default={order:300,allowEmpty:!0,encoding:"utf8",canParse:e=>("string"==typeof e.data||Buffer.isBuffer(e.data))&&t.test(e.url),parse(t){if("string"==typeof t.data)return t.data;if(Buffer.isBuffer(t.data))return t.data.toString(this.encoding);throw new e.ParserError("data is not text",t.url)}},gl}()),s=t(function(){if(yl)return vl;yl=1,Object.defineProperty(vl,"__esModule",{value:!0});const e=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;return vl.default={order:400,allowEmpty:!0,canParse:t=>Buffer.isBuffer(t.data)&&e.test(t.url),parse:e=>Buffer.isBuffer(e.data)?e.data:Buffer.from(e.data)},vl}()),i=t(function(){if(xl)return bl;xl=1;var e=bl&&bl.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=bl&&bl.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=bl&&bl.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n},n=bl&&bl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bl,"__esModule",{value:!0});const o=n($l),s=rt,i=r(Ei()),a=Ni();return bl.default={order:100,canRead:e=>i.isFileSystemPath(e.url),async read(e){let t;try{t=i.toFileSystemPath(e.url)}catch(r){throw new a.ResolverError(s.ono.uri(r,`Malformed URI: ${e.url}`),e.url)}try{return await o.default.promises.readFile(t)}catch(r){throw new a.ResolverError((0,s.ono)(r,`Error opening file "${t}"`),t)}}},bl}()),a=t(jl());e.getJsonSchemaRefParserDefaultOptions=()=>({parse:{json:{...r.default},yaml:{...n.default},text:{...o.default},binary:{...s.default}},resolve:{file:{...i.default},http:{...a.default},external:!0},continueOnError:!1,dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative"},mutateInputSchema:!0});function l(e,t){if(c(t)){const r=Object.keys(t).filter(e=>!["__proto__","constructor","prototype"].includes(e));for(let n=0;n<r.length;n++){const o=r[n],s=t[o],i=e[o];c(s)?e[o]=l(i||{},s):void 0!==s&&(e[o]=s)}}return e}function c(e){return e&&"object"==typeof e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}e.getNewOptions=t=>{const r=(0,e.getJsonSchemaRefParserDefaultOptions)();return t&&l(r,t),r}}(Vi)),Vi}var Pl,El={};function Tl(){if(Pl)return El;Pl=1;var e=El&&El.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=El&&El.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=El&&El.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n},n=El&&El.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(El,"__esModule",{value:!0});const o=n(qi()),s=n(Mi()),i=n(Bi()),a=r(Ei()),l=Ni();function c(e,t,r,n,d,p){d||(d=new Set);let u=[];if(e&&"object"==typeof e&&!ArrayBuffer.isView(e)&&!d.has(e)){d.add(e),o.default.isExternal$Ref(e)&&u.push(async function(e,t,r,n){var o;const s="root"===(null==(o=n.dereference)?void 0:o.externalReferenceResolution),d=a.resolve(s?a.cwd():t,e.$ref),p=a.stripHash(d),u=r._$refs[p];if(u)return Promise.resolve(u.value);try{const e=c(await(0,i.default)(d,r,n),p+"#",r,n,new Set,!0);return Promise.all(e)}catch(f){if(!(null==n?void 0:n.continueOnError)||!(0,l.isHandledError)(f))throw f;return r._$refs[p]&&(f.source=decodeURI(a.stripHash(t)),f.path=a.safePointerToPath(a.getHash(t))),[]}}(e,t,r,n));const p=Object.keys(e);for(const o of p){const i=s.default.join(t,o),a=e[o];u=u.concat(c(a,i,r,n,d))}}return u}return El.default=function(e,t){var r;if(!(null==(r=t.resolve)?void 0:r.external))return Promise.resolve();try{const r=c(e.schema,e.$refs._root$Ref.path+"#",e.$refs,t);return Promise.all(r)}catch(cp){return Promise.reject(cp)}},El}var Al,Cl={};function Il(){if(Al)return Cl;Al=1;var e=Cl&&Cl.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=Cl&&Cl.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Cl&&Cl.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n},n=Cl&&Cl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cl,"__esModule",{value:!0});const o=n(qi()),s=n(Mi()),i=r(Ei());function a(e,t,r,n,i,c,d,p){const u=null===t?e:e[t];if(u&&"object"==typeof u&&!ArrayBuffer.isView(u))if(o.default.isAllowed$Ref(u))l(e,t,r,n,i,c,d,p);else{const e=Object.keys(u).sort((e,t)=>"definitions"===e?-1:"definitions"===t?1:e.length-t.length);for(const t of e){const e=s.default.join(r,t),f=s.default.join(n,t),h=u[t];o.default.isAllowed$Ref(h)?l(u,t,r,f,i,c,d,p):a(u,t,e,f,i,c,d,p)}}}function l(e,t,r,n,l,c,d,p){const u=null===t?e:e[t],f=i.resolve(r,u.$ref),h=d._resolve(f,n,p);if(null===h)return;const m=s.default.parse(n).length,g=i.stripHash(h.path),y=i.getHash(h.path),v=g!==d._root$Ref.path,b=o.default.isExtended$Ref(u);l+=h.indirections;const $=function(e,t,r){for(const n of e)if(n&&n.parent===t&&n.key===r)return n;return}(c,e,t);if($){if(!(m<$.depth||l<$.indirections))return;!function(e,t){const r=e.indexOf(t);e.splice(r,1)}(c,$)}c.push({$ref:u,parent:e,key:t,pathFromRoot:n,depth:m,file:g,hash:y,value:h.value,circular:h.circular,extended:b,external:v,indirections:l}),$&&!v||a(h.value,null,h.path,n,l+1,c,d,p)}return Cl.default=function(e,t){const r=[];a(e,"schema",e.$refs._root$Ref.path+"#","#",0,r,e.$refs,t),function(e){let t,r,n;e.sort((e,t)=>{if(e.file!==t.file)return e.file<t.file?-1:1;if(e.hash!==t.hash)return e.hash<t.hash?-1:1;if(e.circular!==t.circular)return e.circular?-1:1;if(e.extended!==t.extended)return e.extended?1:-1;if(e.indirections!==t.indirections)return e.indirections-t.indirections;if(e.depth!==t.depth)return e.depth-t.depth;{const r=e.pathFromRoot.lastIndexOf("/definitions"),n=t.pathFromRoot.lastIndexOf("/definitions");return r!==n?n-r:e.pathFromRoot.length-t.pathFromRoot.length}});for(const i of e)i.external?i.file===t&&i.hash===r?i.$ref.$ref=n:i.file===t&&0===i.hash.indexOf(r+"/")?i.$ref.$ref=s.default.join(n,s.default.parse(i.hash.replace(r,"#"))):(t=i.file,r=i.hash,n=i.pathFromRoot,i.$ref=i.parent[i.key]=o.default.dereference(i.$ref,i.value),i.circular&&(i.$ref.$ref=i.pathFromRoot)):i.$ref.$ref=i.hash}(r)},Cl}var Rl,Nl={};var Ml,ql,zl,Ul,Ll,Dl,Bl,Hl,Fl,Vl,Jl,Wl={},Gl={};function Kl(){if(ql)return Wl;ql=1;var e=Wl&&Wl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wl,"__esModule",{value:!0}),Wl.default=function(e,r){return e?void r.then(function(r){(0,t.default)(function(){e(null,r)})},function(r){(0,t.default)(function(){e(r)})}):r};const t=e((Ml||(Ml=1,Object.defineProperty(Gl,"__esModule",{value:!0}),Gl.default="object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:"function"==typeof setImmediate?setImmediate:function(e){setTimeout(e,0)}),Gl));return Wl}function Zl(){return zl||(zl=1,function(e){var t=ci&&ci.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=ci&&ci.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=ci&&ci.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&t(n,e,o);return r(n,e),n},o=ci&&ci.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonSchemaRefParserDefaultOptions=e.jsonSchemaParserNormalizeArgs=e.dereferenceInternal=e.JSONParserErrorGroup=e.isHandledError=e.UnmatchedParserError=e.ParserError=e.ResolverError=e.MissingPointerError=e.InvalidPointerError=e.JSONParserError=e.UnmatchedResolverError=e.dereference=e.bundle=e.resolve=e.parse=e.$RefParser=void 0;const s=o(function(){if(Ii)return di;Ii=1;var e=di&&di.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=di&&di.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=di&&di.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n},n=di&&di.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(di,"__esModule",{value:!0});const o=rt,s=n(qi()),i=r(Ei()),a=n(Si());function l(e,t){let r=Object.keys(e);return(t=Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t)).length>0&&t[0]&&(r=r.filter(r=>t.includes(e[r].pathType))),r.map(t=>({encoded:t,decoded:"file"===e[t].pathType?i.toFileSystemPath(t,!0):t}))}return di.default=class{paths(...e){return l(this._$refs,e.flat()).map(e=>(0,a.default)(e.decoded))}values(...e){const t=this._$refs;return l(t,e.flat()).reduce((e,r)=>(e[(0,a.default)(r.decoded)]=t[r.encoded].value,e),{})}exists(e,t){try{return this._resolve(e,"",t),!0}catch{return!1}}get(e,t){return this._resolve(e,"",t).value}set(e,t){const r=i.resolve(this._root$Ref.path,e),n=i.stripHash(r),s=this._$refs[n];if(!s)throw(0,o.ono)(`Error resolving $ref pointer "${e}". \n"${n}" not found.`);s.set(r,t)}_get$Ref(e){e=i.resolve(this._root$Ref.path,e);const t=i.stripHash(e);return this._$refs[t]}_add(e){const t=i.stripHash(e),r=new s.default(this);return r.path=t,this._$refs[t]=r,this._root$Ref=this._root$Ref||r,r}_resolve(e,t,r){const n=i.resolve(this._root$Ref.path,e),s=i.stripHash(n),a=this._$refs[s];if(!a)throw(0,o.ono)(`Error resolving $ref pointer "${e}". \n"${s}" not found.`);return a.resolve(n,r,e,t)}constructor(){this._$refs={},this.toJSON=this.values,this.circular=!1,this._$refs={},this._root$Ref=null}},di}()),i=o(Bi()),a=o(function(){if(kl)return Fi;kl=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.normalizeArgs=t;const e=Ol();function t(t){let r,n,o,s;const i=Array.prototype.slice.call(t);"function"==typeof i[i.length-1]&&(s=i.pop()),"string"==typeof i[0]?(r=i[0],"object"==typeof i[2]?(n=i[1],o=i[2]):(n=void 0,o=i[1])):(r="",n=i[0],o=i[1]);try{o=(0,e.getNewOptions)(o)}catch(cp){console.error(`JSON Schema Ref Parser: Error normalizing options: ${cp}`)}return o.mutateInputSchema||"object"!=typeof n||(n=JSON.parse(JSON.stringify(n))),{path:r,schema:n,options:o,callback:s}}return Fi.default=t,Fi}());e.jsonSchemaParserNormalizeArgs=a.default;const l=o(Tl()),c=o(Il()),d=o(function(){if(Rl)return Nl;Rl=1;var e=Nl&&Nl.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=Nl&&Nl.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Nl&&Nl.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n},n=Nl&&Nl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nl,"__esModule",{value:!0});const o=n(qi()),s=n(Mi()),i=rt,a=r(Ei()),l=Ni();function c(e,t,r,n,i,a,u,f,h){var m;let g;const y={value:e,circular:!1};if(f&&f.timeoutMs&&Date.now()-h>f.timeoutMs)throw new l.TimeoutError(f.timeoutMs);const v=f.dereference||{},b=v.excludedPathMatcher||(()=>!1);if(("ignore"===(null==v?void 0:v.circular)||!i.has(e))&&e&&"object"==typeof e&&!ArrayBuffer.isView(e)&&!b(r)){if(n.add(e),i.add(e),o.default.isAllowed$Ref(e,f))g=d(e,t,r,n,i,a,u,f,h),y.circular=g.circular,y.value=g.value;else for(const l of Object.keys(e)){const $=s.default.join(t,l),x=s.default.join(r,l);if(b(x))continue;const w=e[l];let _=!1;o.default.isAllowed$Ref(w,f)?(g=d(w,$,x,n,i,a,u,f,h),_=g.circular,e[l]!==g.value&&(e[l]=g.value,null==(m=null==v?void 0:v.onDereference)||m.call(v,w.$ref,e[l],e,l))):n.has(w)?_=p($,u,f):(g=c(w,$,x,n,i,a,u,f,h),_=g.circular,e[l]!==g.value&&(e[l]=g.value)),y.circular=y.circular||_}n.delete(e)}return y}function d(e,t,r,n,s,i,l,d,u){var f,h;const m=o.default.isExternal$Ref(e)&&"root"===(null==(f=null==d?void 0:d.dereference)?void 0:f.externalReferenceResolution),g=a.resolve(m?a.cwd():t,e.$ref),y=i.get(g);if(y&&!y.circular){const t=Object.keys(e);if(t.length>1){const r={};for(const n of t)"$ref"===n||n in y.value||(r[n]=e[n]);return{circular:y.circular,value:Object.assign({},y.value,r)}}return y}const v=l._resolve(g,t,d);if(null===v)return{circular:!1,value:null};const b=v.circular;let $=b||n.has(v.value);$&&p(t,l,d);let x=o.default.dereference(e,v.value);if(!$){const e=c(x,v.path,r,n,s,i,l,d,u);$=e.circular,x=e.value}$&&!b&&"ignore"===(null==(h=d.dereference)?void 0:h.circular)&&(x=e),b&&(x.$ref=r);const w={circular:$,value:x};return 1===Object.keys(e).length&&i.set(g,w),w}function p(e,t,r){if(t.circular=!0,!r.dereference.circular)throw i.ono.reference(`Circular $ref pointer found at ${e}`);return!0}return Nl.default=function(e,t){const r=Date.now(),n=c(e.schema,e.$refs._root$Ref.path,"#",new Set,new Set,new Map,e.$refs,t,r);e.$refs.circular=n.circular,e.schema=n.value},Nl}());e.dereferenceInternal=d.default;const p=n(Ei()),u=Ni();Object.defineProperty(e,"JSONParserError",{enumerable:!0,get:function(){return u.JSONParserError}}),Object.defineProperty(e,"InvalidPointerError",{enumerable:!0,get:function(){return u.InvalidPointerError}}),Object.defineProperty(e,"MissingPointerError",{enumerable:!0,get:function(){return u.MissingPointerError}}),Object.defineProperty(e,"ResolverError",{enumerable:!0,get:function(){return u.ResolverError}}),Object.defineProperty(e,"ParserError",{enumerable:!0,get:function(){return u.ParserError}}),Object.defineProperty(e,"UnmatchedParserError",{enumerable:!0,get:function(){return u.UnmatchedParserError}}),Object.defineProperty(e,"UnmatchedResolverError",{enumerable:!0,get:function(){return u.UnmatchedResolverError}}),Object.defineProperty(e,"isHandledError",{enumerable:!0,get:function(){return u.isHandledError}}),Object.defineProperty(e,"JSONParserErrorGroup",{enumerable:!0,get:function(){return u.JSONParserErrorGroup}});const f=rt,h=o(Kl()),m=Ol();Object.defineProperty(e,"getJsonSchemaRefParserDefaultOptions",{enumerable:!0,get:function(){return m.getJsonSchemaRefParserDefaultOptions}});class g{constructor(){this.schema=null,this.$refs=new s.default}async parse(){const e=(0,a.default)(arguments);let t;if(!e.path&&!e.schema){const t=(0,f.ono)(`Expected a file path, URL, or object. Got ${e.path||e.schema}`);return(0,h.default)(e.callback,Promise.reject(t))}this.schema=null,this.$refs=new s.default;let r="http";if(p.isFileSystemPath(e.path))e.path=p.fromFileSystemPath(e.path),r="file";else if(!e.path&&e.schema&&"$id"in e.schema&&e.schema.$id){const t=p.parse(e.schema.$id),r="https:"===t.protocol?443:80;e.path=`${t.protocol}//${t.hostname}:${r}`}if(e.path=p.resolve(p.cwd(),e.path),e.schema&&"object"==typeof e.schema){const n=this.$refs._add(e.path);n.value=e.schema,n.pathType=r,t=Promise.resolve(e.schema)}else t=(0,i.default)(e.path,this.$refs,e.options);try{const r=await t;if(null===r||"object"!=typeof r||Buffer.isBuffer(r)){if(e.options.continueOnError)return this.schema=null,(0,h.default)(e.callback,Promise.resolve(this.schema));throw f.ono.syntax(`"${this.$refs._root$Ref.path||r}" is not a valid JSON Schema`)}return this.schema=r,(0,h.default)(e.callback,Promise.resolve(this.schema))}catch(n){return e.options.continueOnError&&(0,u.isHandledError)(n)?(this.$refs._$refs[p.stripHash(e.path)]&&this.$refs._$refs[p.stripHash(e.path)].addError(n),(0,h.default)(e.callback,Promise.resolve(null))):(0,h.default)(e.callback,Promise.reject(n))}}static parse(){const e=new g;return e.parse.apply(e,arguments)}async resolve(){const e=(0,a.default)(arguments);try{return await this.parse(e.path,e.schema,e.options),await(0,l.default)(this,e.options),y(this),(0,h.default)(e.callback,Promise.resolve(this.$refs))}catch(t){return(0,h.default)(e.callback,Promise.reject(t))}}static resolve(){const e=new g;return e.resolve.apply(e,arguments)}static bundle(){const e=new g;return e.bundle.apply(e,arguments)}async bundle(){const e=(0,a.default)(arguments);try{return await this.resolve(e.path,e.schema,e.options),(0,c.default)(this,e.options),y(this),(0,h.default)(e.callback,Promise.resolve(this.schema))}catch(t){return(0,h.default)(e.callback,Promise.reject(t))}}static dereference(){const e=new g;return e.dereference.apply(e,arguments)}async dereference(){const e=(0,a.default)(arguments);try{return await this.resolve(e.path,e.schema,e.options),(0,d.default)(this,e.options),y(this),(0,h.default)(e.callback,Promise.resolve(this.schema))}catch(t){return(0,h.default)(e.callback,Promise.reject(t))}}}function y(e){if(u.JSONParserErrorGroup.getParserErrors(e).length>0)throw new u.JSONParserErrorGroup(e)}e.$RefParser=g,e.default=g,e.parse=g.parse,e.resolve=g.resolve,e.bundle=g.bundle,e.dereference=g.dereference}(ci)),ci}function Ql(){if(Fl)return Hl;Fl=1;var e=Bl?Dl:(Bl=1,Dl="object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:"function"==typeof setImmediate?setImmediate:function(e){setTimeout(e,0)});return Hl=function(t,r){return t?void r.then(function(r){e(function(){t(null,r)})},function(r){e(function(){t(r)})}):r}}var Yl=function(){if(Jl)return Vl;Jl=1;const e=ai(),t=li(),{jsonSchemaParserNormalizeArgs:r}=Zl(),n=ze(),o=function(){if(Ll)return Ul;Ll=1;const{getJsonSchemaRefParserDefaultOptions:e}=Zl(),t=ai(),r=li();function n(e,t){if(o(t)){const r=Object.keys(t).filter(e=>!["__proto__","constructor","prototype"].includes(e));for(let s=0;s<r.length;s++){const i=r[s],a=t[i],l=e[i];o(a)?e[i]=n(l||{},a):void 0!==a&&(e[i]=a)}}return e}function o(e){return e&&"object"==typeof e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function s(t){const r=n(e(),s.defaults);return n(r,t)}return Ul=s,s.defaults={validate:{schema:t,spec:r}},Ul}(),s=Ql(),{ono:i}=rt,{$RefParser:a}=Zl(),{dereferenceInternal:l}=Zl(),c=["3.1.0","3.1.1"],d=[...c,"3.0.0","3.0.1","3.0.2","3.0.3","3.0.4"];class p extends a{async parse(e,t,a,l){let p=r(arguments);p.options=new o(p.options);try{let e=await super.parse(p.path,p.schema,p.options);if(e.swagger){if(void 0===e.swagger||void 0===e.info||void 0===e.paths)throw i.syntax(`${p.path||p.schema} is not a valid Swagger API definition`);if("number"==typeof e.swagger)throw i.syntax('Swagger version number must be a string (e.g. "2.0") not a number.');if("number"==typeof e.info.version)throw i.syntax('API version number must be a string (e.g. "1.0.0") not a number.');if("2.0"!==e.swagger)throw i.syntax(`Unrecognized Swagger version: ${e.swagger}. Expected 2.0`)}else{if(void 0===e.openapi||void 0===e.info)throw i.syntax(`${p.path||p.schema} is not a valid Openapi API definition`);if(void 0===e.paths){if(-1===c.indexOf(e.openapi))throw i.syntax(`${p.path||p.schema} is not a valid Openapi API definition`);if(void 0===e.webhooks)throw i.syntax(`${p.path||p.schema} is not a valid Openapi API definition`)}else{if("number"==typeof e.openapi)throw i.syntax('Openapi version number must be a string (e.g. "3.0.0") not a number.');if("number"==typeof e.info.version)throw i.syntax('API version number must be a string (e.g. "1.0.0") not a number.');if(-1===d.indexOf(e.openapi))throw i.syntax(`Unsupported OpenAPI version: ${e.openapi}. Swagger Parser only supports versions ${d.join(", ")}`)}n.fixOasRelativeServers(e,p.path)}return s(p.callback,Promise.resolve(e))}catch(u){return s(p.callback,Promise.reject(u))}}async validate(n,a,c,d){let p=this,u=r(arguments);u.options=new o(u.options);let f=u.options.dereference.circular;u.options.validate.schema&&(u.options.dereference.circular="ignore");try{if(await this.dereference(u.path,u.schema,u.options),u.options.dereference.circular=f,u.options.validate.schema&&(e(p.api),p.$refs.circular))if(!0===f)l(p,u.options);else if(!1===f)throw i.reference("The API contains circular references");return u.options.validate.spec&&t(p.api),s(u.callback,Promise.resolve(p.schema))}catch(h){return s(u.callback,Promise.reject(h))}}}Object.defineProperty(p.prototype,"api",{configurable:!0,enumerable:!0,get(){return this.schema}});const u=p;return u.validate=(...e)=>(new p).validate(...e),u.dereference=(...e)=>(new p).dereference(...e),u.bundle=(...e)=>(new p).bundle(...e),u.parse=(...e)=>(new p).parse(...e),u.resolve=(...e)=>(new p).resolve(...e),u.default=u,u.SwaggerParser=u,Vl=u}();const Xl=s(Yl),ec=["get","post","put","delete","patch","options","head","trace"];async function tc(e){return function(e){var t;const r=e.info,n=(e.servers??[]).map(rc),o=function(e){const t=[],r=e.components;if(!(null==r?void 0:r.securitySchemes))return t;for(const[n,o]of Object.entries(r.securitySchemes)){const e=o;t.push({key:n,type:e.type,name:e.name,in:e.in,scheme:e.scheme,bearerFormat:e.bearerFormat,description:e.description??""})}return t}(e),s=e.security??[],i=new Map,a=new Map;for(const m of e.tags??[])a.set(m.name,m.description??"");const l=[];let c=0;const d=e.paths??{};for(const[m,g]of Object.entries(d)){if(!g)continue;const e=g,r=e.parameters??[];for(const o of ec){const a=e[o];if(!a)continue;const d=a.operationId||`unnamed-${++c}-${o}-${m}`,p=(null==(t=a.tags)?void 0:t.length)?a.tags:["default"],u=nc(d,m,o,a,r,n,s);l.push(u);for(const e of p)i.has(e)||i.set(e,[]),i.get(e).push(u)}}const p=(e.tags??[]).map(e=>e.name),u=new Set,f=[];for(const m of p){u.add(m);const e=i.get(m);(null==e?void 0:e.length)&&f.push({name:m,description:a.get(m)??"",operations:e})}for(const[m,g]of i)!u.has(m)&&g.length&&f.push({name:m,description:a.get(m)??"",operations:g});const h=e.externalDocs?{url:e.externalDocs.url,description:e.externalDocs.description??""}:null;return{title:r.title,version:r.version,description:r.description??"",contact:r.contact?{name:r.contact.name,url:r.contact.url,email:r.contact.email}:null,license:r.license?{name:r.license.name,url:r.license.url}:null,termsOfService:r.termsOfService??"",servers:n,securitySchemes:o,globalSecurity:s,tagGroups:f,allOperations:l,externalDocs:h,raw:e}}(await Xl.dereference(e))}function rc(e){const t={};for(const[r,n]of Object.entries(e.variables??{}))t[r]={default:n.default,enum:n.enum,description:n.description??""};return{url:e.url,description:e.description??"",variables:t}}function nc(e,t,r,n,o,s,i){const a=new Map;for(const h of o)a.set(`${h.in}:${h.name}`,h);for(const h of n.parameters??[])a.set(`${h.in}:${h.name}`,h);const l=Array.from(a.values()).map(e=>{var t;return{name:e.name,in:e.in,required:e.required??!1,deprecated:e.deprecated??!1,description:e.description??"",schema:e.schema??null,example:e.example??(null==(t=e.schema)?void 0:t.example)??void 0}});let c=null;if(n.requestBody){const e=n.requestBody;c={required:e.required??!1,description:e.description??"",content:oc(e.content)}}const d=[];for(const[h,m]of Object.entries(n.responses??{})){const e=m,t={};for(const[r,n]of Object.entries(e.headers??{})){const e=n;t[r]={description:e.description??"",schema:e.schema??null}}d.push({statusCode:h,description:e.description??"",headers:t,content:e.content?oc(e.content):[]})}d.sort((e,t)=>"default"===e.statusCode?1:"default"===t.statusCode?-1:e.statusCode.localeCompare(t.statusCode));const p=[],u=n["x-codeSamples"]??n["x-code-samples"];if(Array.isArray(u))for(const h of u)h&&"object"==typeof h&&"lang"in h&&"source"in h&&p.push({lang:String(h.lang),label:String(h.label??h.lang),source:String(h.source)});const f=(n.servers??[]).map(rc);return{operationId:e,path:t,method:r,summary:n.summary??"",description:n.description??"",tags:n.tags??["default"],deprecated:n.deprecated??!1,parameters:l,requestBody:c,responses:d,security:n.security??i,servers:f.length>0?f:s,codeSamples:p}}function oc(e){return Object.entries(e).map(([e,t])=>({mediaType:e,schema:t.schema??null,example:t.example??void 0,examples:t.examples?Object.fromEntries(Object.entries(t.examples).map(([e,t])=>[e,t.value??t])):{}}))}const sc="KEYS",ic="VALUES",ac="";class lc{constructor(e,t){const r=e._tree,n=Array.from(r.keys());this.set=e,this._type=t,this._path=n.length>0?[{node:r,keys:n}]:[]}next(){const e=this.dive();return this.backtrack(),e}dive(){if(0===this._path.length)return{done:!0,value:void 0};const{node:e,keys:t}=cc(this._path);if(cc(t)===ac)return{done:!1,value:this.result()};const r=e.get(cc(t));return this._path.push({node:r,keys:Array.from(r.keys())}),this.dive()}backtrack(){if(0===this._path.length)return;const e=cc(this._path).keys;e.pop(),e.length>0||(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>cc(e)).filter(e=>e!==ac).join("")}value(){return cc(this._path).node.get(ac)}result(){switch(this._type){case ic:return this.value();case sc:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const cc=e=>e[e.length-1],dc=(e,t,r,n,o,s,i,a)=>{const l=s*i;e:for(const c of e.keys())if(c===ac){const t=o[l-1];t<=r&&n.set(a,[e.get(c),t])}else{let l=s;for(let e=0;e<c.length;++e,++l){const n=c[e],s=i*l,a=s-i;let d=o[s];const p=Math.max(0,l-r-1),u=Math.min(i-1,l+r);for(let e=p;e<u;++e){const r=n!==t[e],i=o[a+e]+ +r,l=o[a+e+1]+1,c=o[s+e]+1,p=o[s+e+1]=Math.min(i,l,c);p<d&&(d=p)}if(d>r)continue e}dc(e.get(c),t,r,n,o,l,i,a+c)}};class pc{constructor(e=new Map,t=""){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");const[t,r]=uc(this._tree,e.slice(this._prefix.length));if(void 0===t){const[t,n]=vc(r);for(const r of t.keys())if(r!==ac&&r.startsWith(n)){const o=new Map;return o.set(r.slice(n.length),t.get(r)),new pc(o,e)}}return new pc(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,mc(this._tree,e)}entries(){return new lc(this,"ENTRIES")}forEach(e){for(const[t,r]of this)e(t,r,this)}fuzzyGet(e,t){return((e,t,r)=>{const n=new Map;if(void 0===t)return n;const o=t.length+1,s=o+r,i=new Uint8Array(s*o).fill(r+1);for(let a=0;a<o;++a)i[a]=a;for(let a=1;a<s;++a)i[a*o]=a;return dc(e,t,r,n,i,1,o,""),n})(this._tree,e,t)}get(e){const t=fc(this._tree,e);return void 0!==t?t.get(ac):void 0}has(e){const t=fc(this._tree,e);return void 0!==t&&t.has(ac)}keys(){return new lc(this,sc)}set(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;return hc(this._tree,e).set(ac,t),this}get size(){if(this._size)return this._size;this._size=0;const e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;const r=hc(this._tree,e);return r.set(ac,t(r.get(ac))),this}fetch(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;const r=hc(this._tree,e);let n=r.get(ac);return void 0===n&&r.set(ac,n=t()),n}values(){return new lc(this,ic)}[Symbol.iterator](){return this.entries()}static from(e){const t=new pc;for(const[r,n]of e)t.set(r,n);return t}static fromObject(e){return pc.from(Object.entries(e))}}const uc=(e,t,r=[])=>{if(0===t.length||null==e)return[e,r];for(const n of e.keys())if(n!==ac&&t.startsWith(n))return r.push([e,n]),uc(e.get(n),t.slice(n.length),r);return r.push([e,t]),uc(void 0,"",r)},fc=(e,t)=>{if(0===t.length||null==e)return e;for(const r of e.keys())if(r!==ac&&t.startsWith(r))return fc(e.get(r),t.slice(r.length))},hc=(e,t)=>{const r=t.length;e:for(let n=0;e&&n<r;){for(const s of e.keys())if(s!==ac&&t[n]===s[0]){const o=Math.min(r-n,s.length);let i=1;for(;i<o&&t[n+i]===s[i];)++i;const a=e.get(s);if(i===s.length)e=a;else{const r=new Map;r.set(s.slice(i),a),e.set(t.slice(n,n+i),r),e.delete(s),e=r}n+=i;continue e}const o=new Map;return e.set(t.slice(n),o),o}return e},mc=(e,t)=>{const[r,n]=uc(e,t);if(void 0!==r)if(r.delete(ac),0===r.size)gc(n);else if(1===r.size){const[e,t]=r.entries().next().value;yc(n,e,t)}},gc=e=>{if(0===e.length)return;const[t,r]=vc(e);if(t.delete(r),0===t.size)gc(e.slice(0,-1));else if(1===t.size){const[r,n]=t.entries().next().value;r!==ac&&yc(e.slice(0,-1),r,n)}},yc=(e,t,r)=>{if(0===e.length)return;const[n,o]=vc(e);n.set(o+t,r),n.delete(o)},vc=e=>e[e.length-1],bc="or",$c="and",xc="and_not";class wc{constructor(e){if(null==(null==e?void 0:e.fields))throw new Error('MiniSearch: option "fields" must be provided');const t=null==e.autoVacuum||!0===e.autoVacuum?Cc:e.autoVacuum;this._options={...Oc,...e,autoVacuum:t,searchOptions:{...Pc,...e.searchOptions||{}},autoSuggestOptions:{...Ec,...e.autoSuggestOptions||{}}},this._index=new pc,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=Ac,this.addFields(this._options.fields)}add(e){const{extractField:t,stringifyField:r,tokenize:n,processTerm:o,fields:s,idField:i}=this._options,a=t(e,i);if(null==a)throw new Error(`MiniSearch: document does not have ID field "${i}"`);if(this._idToShortId.has(a))throw new Error(`MiniSearch: duplicate ID ${a}`);const l=this.addDocumentId(a);this.saveStoredFields(l,e);for(const c of s){const s=t(e,c);if(null==s)continue;const i=n(r(s,c),c),a=this._fieldIds[c],d=new Set(i).size;this.addFieldLength(l,a,this._documentCount-1,d);for(const e of i){const t=o(e,c);if(Array.isArray(t))for(const e of t)this.addTerm(a,l,e);else t&&this.addTerm(a,l,t)}}}addAll(e){for(const t of e)this.add(t)}addAllAsync(e,t={}){const{chunkSize:r=10}=t,n={chunk:[],promise:Promise.resolve()},{chunk:o,promise:s}=e.reduce(({chunk:e,promise:t},n,o)=>(e.push(n),(o+1)%r===0?{chunk:[],promise:t.then(()=>new Promise(e=>setTimeout(e,0))).then(()=>this.addAll(e))}:{chunk:e,promise:t}),n);return s.then(()=>this.addAll(o))}remove(e){const{tokenize:t,processTerm:r,extractField:n,stringifyField:o,fields:s,idField:i}=this._options,a=n(e,i);if(null==a)throw new Error(`MiniSearch: document does not have ID field "${i}"`);const l=this._idToShortId.get(a);if(null==l)throw new Error(`MiniSearch: cannot remove document with ID ${a}: it is not in the index`);for(const c of s){const s=n(e,c);if(null==s)continue;const i=t(o(s,c),c),a=this._fieldIds[c],d=new Set(i).size;this.removeFieldLength(l,a,this._documentCount,d);for(const e of i){const t=r(e,c);if(Array.isArray(t))for(const e of t)this.removeTerm(a,l,e);else t&&this.removeTerm(a,l,t)}}this._storedFields.delete(l),this._documentIds.delete(l),this._idToShortId.delete(a),this._fieldLength.delete(l),this._documentCount-=1}removeAll(e){if(e)for(const t of e)this.remove(t);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new pc,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){const t=this._idToShortId.get(e);if(null==t)throw new Error(`MiniSearch: cannot discard document with ID ${e}: it is not in the index`);this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEach((e,r)=>{this.removeFieldLength(t,r,this._documentCount,e)}),this._fieldLength.delete(t),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(!1===this._options.autoVacuum)return;const{minDirtFactor:e,minDirtCount:t,batchSize:r,batchWait:n}=this._options.autoVacuum;this.conditionalVacuum({batchSize:r,batchWait:n},{minDirtCount:t,minDirtFactor:e})}discardAll(e){const t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const t of e)this.discard(t)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){const{idField:t,extractField:r}=this._options,n=r(e,t);this.discard(n),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,null!=this._enqueuedVacuum||(this._enqueuedVacuum=this._currentVacuum.then(()=>{const t=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=Ac,this.performVacuuming(e,t)})),this._enqueuedVacuum):!1===this.vacuumConditionsMet(t)?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}async performVacuuming(e,t){const r=this._dirtCount;if(this.vacuumConditionsMet(t)){const t=e.batchSize||Tc.batchSize,n=e.batchWait||Tc.batchWait;let o=1;for(const[e,r]of this._index){for(const[e,t]of r)for(const[n]of t)this._documentIds.has(n)||(t.size<=1?r.delete(e):t.delete(n));0===this._index.get(e).size&&this._index.delete(e),o%t===0&&await new Promise(e=>setTimeout(e,n)),o+=1}this._dirtCount-=r}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(e){if(null==e)return!0;let{minDirtCount:t,minDirtFactor:r}=e;return t=t||Cc.minDirtCount,r=r||Cc.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=r}get isVacuuming(){return null!=this._currentVacuum}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){const t=this._idToShortId.get(e);if(null!=t)return this._storedFields.get(t)}search(e,t={}){const{searchOptions:r}=this._options,n={...r,...t},o=this.executeQuery(e,t),s=[];for(const[i,{score:a,terms:l,match:c}]of o){const e=l.length||1,t={id:this._documentIds.get(i),score:a*e,terms:Object.keys(c),queryTerms:l,match:c};Object.assign(t,this._storedFields.get(i)),(null==n.filter||n.filter(t))&&s.push(t)}return e===wc.wildcard&&null==n.boostDocument||s.sort(Nc),s}autoSuggest(e,t={}){t={...this._options.autoSuggestOptions,...t};const r=new Map;for(const{score:o,terms:s}of this.search(e,t)){const e=s.join(" "),t=r.get(e);null!=t?(t.score+=o,t.count+=1):r.set(e,{score:o,terms:s,count:1})}const n=[];for(const[o,{score:s,terms:i,count:a}]of r)n.push({suggestion:o,terms:i,score:s/a});return n.sort(Nc),n}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,t){if(null==t)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),t)}static async loadJSONAsync(e,t){if(null==t)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),t)}static getDefault(e){if(Oc.hasOwnProperty(e))return _c(Oc,e);throw new Error(`MiniSearch: unknown option "${e}"`)}static loadJS(e,t){const{index:r,documentIds:n,fieldLength:o,storedFields:s,serializationVersion:i}=e,a=this.instantiateMiniSearch(e,t);a._documentIds=qc(n),a._fieldLength=qc(o),a._storedFields=qc(s);for(const[l,c]of a._documentIds)a._idToShortId.set(c,l);for(const[l,c]of r){const e=new Map;for(const t of Object.keys(c)){let r=c[t];1===i&&(r=r.ds),e.set(parseInt(t,10),qc(r))}a._index.set(l,e)}return a}static async loadJSAsync(e,t){const{index:r,documentIds:n,fieldLength:o,storedFields:s,serializationVersion:i}=e,a=this.instantiateMiniSearch(e,t);a._documentIds=await zc(n),a._fieldLength=await zc(o),a._storedFields=await zc(s);for(const[c,d]of a._documentIds)a._idToShortId.set(d,c);let l=0;for(const[c,d]of r){const e=new Map;for(const t of Object.keys(d)){let r=d[t];1===i&&(r=r.ds),e.set(parseInt(t,10),await zc(r))}++l%1e3==0&&await Uc(0),a._index.set(c,e)}return a}static instantiateMiniSearch(e,t){const{documentCount:r,nextId:n,fieldIds:o,averageFieldLength:s,dirtCount:i,serializationVersion:a}=e;if(1!==a&&2!==a)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const l=new wc(t);return l._documentCount=r,l._nextId=n,l._idToShortId=new Map,l._fieldIds=o,l._avgFieldLength=s,l._dirtCount=i||0,l._index=new pc,l}executeQuery(e,t={}){if(e===wc.wildcard)return this.executeWildcardQuery(t);if("string"!=typeof e){const r={...t,...e,queries:void 0},n=e.queries.map(e=>this.executeQuery(e,r));return this.combineResults(n,r.combineWith)}const{tokenize:r,processTerm:n,searchOptions:o}=this._options,s={tokenize:r,processTerm:n,...o,...t},{tokenize:i,processTerm:a}=s,l=i(e).flatMap(e=>a(e)).filter(e=>!!e).map(jc(s)).map(e=>this.executeQuerySpec(e,s));return this.combineResults(l,s.combineWith)}executeQuerySpec(e,t){const r={...this._options.searchOptions,...t},n=(r.fields||this._options.fields).reduce((e,t)=>({...e,[t]:_c(r.boost,t)||1}),{}),{boostDocument:o,weights:s,maxFuzzy:i,bm25:a}=r,{fuzzy:l,prefix:c}={...Pc.weights,...s},d=this._index.get(e.term),p=this.termResults(e.term,e.term,1,e.termBoost,d,n,o,a);let u,f;if(e.prefix&&(u=this._index.atPrefix(e.term)),e.fuzzy){const t=!0===e.fuzzy?.2:e.fuzzy,r=t<1?Math.min(i,Math.round(e.term.length*t)):t;r&&(f=this._index.fuzzyGet(e.term,r))}if(u)for(const[h,m]of u){const t=h.length-e.term.length;if(!t)continue;null==f||f.delete(h);const r=c*h.length/(h.length+.3*t);this.termResults(e.term,h,r,e.termBoost,m,n,o,a,p)}if(f)for(const h of f.keys()){const[t,r]=f.get(h);if(!r)continue;const s=l*h.length/(h.length+r);this.termResults(e.term,h,s,e.termBoost,t,n,o,a,p)}return p}executeWildcardQuery(e){const t=new Map,r={...this._options.searchOptions,...e};for(const[n,o]of this._documentIds){const e=r.boostDocument?r.boostDocument(o,"",this._storedFields.get(n)):1;t.set(n,{score:e,terms:[],match:{}})}return t}combineResults(e,t=bc){if(0===e.length)return new Map;const r=t.toLowerCase(),n=kc[r];if(!n)throw new Error(`Invalid combination operator: ${t}`);return e.reduce(n)||new Map}toJSON(){const e=[];for(const[t,r]of this._index){const n={};for(const[e,t]of r)n[e]=Object.fromEntries(t);e.push([t,n])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,t,r,n,o,s,i,a,l=new Map){if(null==o)return l;for(const c of Object.keys(s)){const d=s[c],p=this._fieldIds[c],u=o.get(p);if(null==u)continue;let f=u.size;const h=this._avgFieldLength[p];for(const o of u.keys()){if(!this._documentIds.has(o)){this.removeTerm(p,o,t),f-=1;continue}const s=i?i(this._documentIds.get(o),t,this._storedFields.get(o)):1;if(!s)continue;const m=u.get(o),g=this._fieldLength.get(o)[p],y=r*n*d*s*Sc(m,f,this._documentCount,g,h,a),v=l.get(o);if(v){v.score+=y,Ic(v.terms,e);const r=_c(v.match,t);r?r.push(c):v.match[t]=[c]}else l.set(o,{score:y,terms:[e],match:{[t]:[c]}})}}return l}addTerm(e,t,r){const n=this._index.fetch(r,Mc);let o=n.get(e);if(null==o)o=new Map,o.set(t,1),n.set(e,o);else{const e=o.get(t);o.set(t,(e||0)+1)}}removeTerm(e,t,r){if(!this._index.has(r))return void this.warnDocumentChanged(t,e,r);const n=this._index.fetch(r,Mc),o=n.get(e);null==o||null==o.get(t)?this.warnDocumentChanged(t,e,r):o.get(t)<=1?o.size<=1?n.delete(e):o.delete(t):o.set(t,o.get(t)-1),0===this._index.get(r).size&&this._index.delete(r)}warnDocumentChanged(e,t,r){for(const n of Object.keys(this._fieldIds))if(this._fieldIds[n]===t)return void this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(e)} has changed before removal: term "${r}" was not present in field "${n}". Removing a document after it has changed can corrupt the index!`,"version_conflict")}addDocumentId(e){const t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;t<e.length;t++)this._fieldIds[e[t]]=t}addFieldLength(e,t,r,n){let o=this._fieldLength.get(e);null==o&&this._fieldLength.set(e,o=[]),o[t]=n;const s=(this._avgFieldLength[t]||0)*r+n;this._avgFieldLength[t]=s/(r+1)}removeFieldLength(e,t,r,n){if(1===r)return void(this._avgFieldLength[t]=0);const o=this._avgFieldLength[t]*r-n;this._avgFieldLength[t]=o/(r-1)}saveStoredFields(e,t){const{storeFields:r,extractField:n}=this._options;if(null==r||0===r.length)return;let o=this._storedFields.get(e);null==o&&this._storedFields.set(e,o={});for(const s of r){const e=n(t,s);void 0!==e&&(o[s]=e)}}}wc.wildcard=Symbol("*");const _c=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0,kc={[bc]:(e,t)=>{for(const r of t.keys()){const n=e.get(r);if(null==n)e.set(r,t.get(r));else{const{score:e,terms:o,match:s}=t.get(r);n.score=n.score+e,n.match=Object.assign(n.match,s),Rc(n.terms,o)}}return e},[$c]:(e,t)=>{const r=new Map;for(const n of t.keys()){const o=e.get(n);if(null==o)continue;const{score:s,terms:i,match:a}=t.get(n);Rc(o.terms,i),r.set(n,{score:o.score+s,terms:o.terms,match:Object.assign(o.match,a)})}return r},[xc]:(e,t)=>{for(const r of t.keys())e.delete(r);return e}},Sc=(e,t,r,n,o,s)=>{const{k:i,b:a,d:l}=s;return Math.log(1+(r-t+.5)/(t+.5))*(l+e*(i+1)/(e+i*(1-a+a*n/o)))},jc=e=>(t,r,n)=>({term:t,fuzzy:"function"==typeof e.fuzzy?e.fuzzy(t,r,n):e.fuzzy||!1,prefix:"function"==typeof e.prefix?e.prefix(t,r,n):!0===e.prefix,termBoost:"function"==typeof e.boostTerm?e.boostTerm(t,r,n):1}),Oc={idField:"id",extractField:(e,t)=>e[t],stringifyField:(e,t)=>e.toString(),tokenize:e=>e.split(Lc),processTerm:e=>e.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(e,t)=>{"function"==typeof(null===console||void 0===console?void 0:console[e])&&console[e](t)},autoVacuum:!0},Pc={combineWith:bc,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:{k:1.2,b:.7,d:.5}},Ec={combineWith:"and",prefix:(e,t,r)=>t===r.length-1},Tc={batchSize:1e3,batchWait:10},Ac={minDirtFactor:.1,minDirtCount:20},Cc={...Tc,...Ac},Ic=(e,t)=>{e.includes(t)||e.push(t)},Rc=(e,t)=>{for(const r of t)e.includes(r)||e.push(r)},Nc=({score:e},{score:t})=>t-e,Mc=()=>new Map,qc=e=>{const t=new Map;for(const r of Object.keys(e))t.set(parseInt(r,10),e[r]);return t},zc=async e=>{const t=new Map;let r=0;for(const n of Object.keys(e))t.set(parseInt(n,10),e[n]),++r%1e3==0&&await Uc(0);return t},Uc=e=>new Promise(t=>setTimeout(t,e)),Lc=/[\n\r\p{Z}\p{P}]+/u;class Dc{constructor(e){this._onHashChange=()=>this.handleCurrentRoute(),this._callback=e}init(){window.addEventListener("hashchange",this._onHashChange)}destroy(){window.removeEventListener("hashchange",this._onHashChange)}handleCurrentRoute(){const e=window.location.hash;if(!e)return;const t=e.match(/^#\/operation\/(.+)$/);t&&this._callback(decodeURIComponent(t[1]))}navigateTo(e){const t=`#/operation/${encodeURIComponent(e)}`;window.location.hash!==t?window.location.hash=t:this._callback(e)}static buildHash(e){return`#/operation/${encodeURIComponent(e)}`}}const Bc="speclens-theme";class Hc{constructor(e){this._preference="auto",this._mediaQuery=null,this._mediaListener=()=>this._apply(),this.resolved="light",this._host=e}init(e){const t=this._readStorage();this._preference=t??e,this._mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this._mediaQuery.addEventListener("change",this._mediaListener),this._apply()}destroy(){var e;null==(e=this._mediaQuery)||e.removeEventListener("change",this._mediaListener)}setTheme(e){this._preference=e,this._writeStorage(e),this._apply()}toggle(){const e="light"===this.resolved?"dark":"light";return this.setTheme(e),e}_apply(){var e;"auto"===this._preference?this.resolved=(null==(e=this._mediaQuery)?void 0:e.matches)?"dark":"light":this.resolved=this._preference,this._host.setAttribute("data-theme",this.resolved),this._host.requestUpdate()}_readStorage(){try{const e=localStorage.getItem(Bc);if("light"===e||"dark"===e||"auto"===e)return e}catch{}return null}_writeStorage(e){try{localStorage.setItem(Bc,e)}catch{}}}function Fc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Vc={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Jc(e){Vc=e}var Wc={exec:()=>null};function Gc(e,t=""){let r="string"==typeof e?e:e.source;const n={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(Kc.caret,"$1"),r=r.replace(e,o),n},getRegex:()=>new RegExp(r,t)};return n}var Kc={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Zc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Qc=/(?:[*+-]|\d{1,9}[.)])/,Yc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Xc=Gc(Yc).replace(/bull/g,Qc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ed=Gc(Yc).replace(/bull/g,Qc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),td=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rd=/(?!\s*\])(?:\\.|[^\[\]\\])+/,nd=Gc(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",rd).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),od=Gc(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Qc).getRegex(),sd="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",id=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ad=Gc("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",id).replace("tag",sd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ld=Gc(td).replace("hr",Zc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sd).getRegex(),cd={blockquote:Gc(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ld).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:nd,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Zc,html:ad,lheading:Xc,list:od,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:ld,table:Wc,text:/^[^\n]+/},dd=Gc("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Zc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sd).getRegex(),pd={...cd,lheading:ed,table:dd,paragraph:Gc(td).replace("hr",Zc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",dd).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sd).getRegex()},ud={...cd,html:Gc("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",id).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Wc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Gc(td).replace("hr",Zc).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Xc).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},fd=/^( {2,}|\\)\n(?!\s*$)/,hd=/[\p{P}\p{S}]/u,md=/[\s\p{P}\p{S}]/u,gd=/[^\s\p{P}\p{S}]/u,yd=Gc(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,md).getRegex(),vd=/(?!~)[\p{P}\p{S}]/u,bd=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,$d=Gc(bd,"u").replace(/punct/g,hd).getRegex(),xd=Gc(bd,"u").replace(/punct/g,vd).getRegex(),wd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",_d=Gc(wd,"gu").replace(/notPunctSpace/g,gd).replace(/punctSpace/g,md).replace(/punct/g,hd).getRegex(),kd=Gc(wd,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,vd).getRegex(),Sd=Gc("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,gd).replace(/punctSpace/g,md).replace(/punct/g,hd).getRegex(),jd=Gc(/\\(punct)/,"gu").replace(/punct/g,hd).getRegex(),Od=Gc(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Pd=Gc(id).replace("(?:--\x3e|$)","--\x3e").getRegex(),Ed=Gc("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Pd).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Td=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ad=Gc(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Td).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Cd=Gc(/^!?\[(label)\]\[(ref)\]/).replace("label",Td).replace("ref",rd).getRegex(),Id=Gc(/^!?\[(ref)\](?:\[\])?/).replace("ref",rd).getRegex(),Rd={_backpedal:Wc,anyPunctuation:jd,autolink:Od,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:fd,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:Wc,emStrongLDelim:$d,emStrongRDelimAst:_d,emStrongRDelimUnd:Sd,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:Ad,nolink:Id,punctuation:yd,reflink:Cd,reflinkSearch:Gc("reflink|nolink(?!\\()","g").replace("reflink",Cd).replace("nolink",Id).getRegex(),tag:Ed,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:Wc},Nd={...Rd,link:Gc(/^!?\[(label)\]\((.*?)\)/).replace("label",Td).getRegex(),reflink:Gc(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Td).getRegex()},Md={...Rd,emStrongRDelimAst:kd,emStrongLDelim:xd,url:Gc(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},qd={...Md,br:Gc(fd).replace("{2,}","*").getRegex(),text:Gc(Md.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},zd={normal:cd,gfm:pd,pedantic:ud},Ud={normal:Rd,gfm:Md,breaks:qd,pedantic:Nd},Ld={"&":"&","<":"<",">":">",'"':""","'":"'"},Dd=e=>Ld[e];function Bd(e,t){if(t){if(Kc.escapeTest.test(e))return e.replace(Kc.escapeReplace,Dd)}else if(Kc.escapeTestNoEncode.test(e))return e.replace(Kc.escapeReplaceNoEncode,Dd);return e}function Hd(e){try{e=encodeURI(e).replace(Kc.percentDecode,"%")}catch{return null}return e}function Fd(e,t){var r;const n=e.replace(Kc.findPipe,(e,t,r)=>{let n=!1,o=t;for(;--o>=0&&"\\"===r[o];)n=!n;return n?"|":" |"}).split(Kc.splitPipe);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!(null==(r=n.at(-1))?void 0:r.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(Kc.slashPipe,"|");return n}function Vd(e,t,r){const n=e.length;if(0===n)return"";let o=0;for(;o<n;){if(e.charAt(n-o-1)!==t)break;o++}return e.slice(0,n-o)}function Jd(e,t,r,n,o){const s=t.href,i=t.title||null,a=e[1].replace(o.other.outputLinkReplace,"$1");n.state.inLink=!0;const l={type:"!"===e[0].charAt(0)?"image":"link",raw:r,href:s,title:i,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,l}var Wd=class{constructor(e){o(this,"options"),o(this,"rules"),o(this,"lexer"),this.options=e||Vc}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Vd(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],r=function(e,t,r){const n=e.match(r.other.indentCodeCompensation);if(null===n)return t;const o=n[1];return t.split("\n").map(e=>{const t=e.match(r.other.beginningSpace);if(null===t)return e;const[n]=t;return n.length>=o.length?e.slice(o.length):e}).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){const t=Vd(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Vd(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=Vd(t[0],"\n").split("\n"),r="",n="";const o=[];for(;e.length>0;){let t=!1;const s=[];let i;for(i=0;i<e.length;i++)if(this.rules.other.blockquoteStart.test(e[i]))s.push(e[i]),t=!0;else{if(t)break;s.push(e[i])}e=e.slice(i);const a=s.join("\n"),l=a.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${a}`:a,n=n?`${n}\n${l}`:l;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=c,0===e.length)break;const d=o.at(-1);if("code"===(null==d?void 0:d.type))break;if("blockquote"===(null==d?void 0:d.type)){const t=d,s=t.raw+"\n"+e.join("\n"),i=this.blockquote(s);o[o.length-1]=i,r=r.substring(0,r.length-t.raw.length)+i.raw,n=n.substring(0,n.length-t.text.length)+i.text;break}if("list"===(null==d?void 0:d.type)){const t=d,s=t.raw+"\n"+e.join("\n"),i=this.list(s);o[o.length-1]=i,r=r.substring(0,r.length-d.raw.length)+i.raw,n=n.substring(0,n.length-t.raw.length)+i.raw,e=s.substring(o.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:o,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const n=r.length>1,o={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const s=this.rules.other.listItemRegex(r);let i=!1;for(;e;){let r=!1,n="",a="";if(!(t=s.exec(e)))break;if(this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),c=e.split("\n",1)[0],d=!l.trim(),p=0;if(this.options.pedantic?(p=2,a=l.trimStart()):d?p=t[1].length+1:(p=t[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,a=l.slice(p),p+=t[1].length),d&&this.rules.other.blankLine.test(c)&&(n+=c+"\n",e=e.substring(c.length+1),r=!0),!r){const t=this.rules.other.nextBulletRegex(p),r=this.rules.other.hrRegex(p),o=this.rules.other.fencesBeginRegex(p),s=this.rules.other.headingBeginRegex(p),i=this.rules.other.htmlBeginRegex(p);for(;e;){const u=e.split("\n",1)[0];let f;if(c=u,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),f=c):f=c.replace(this.rules.other.tabCharGlobal," "),o.test(c))break;if(s.test(c))break;if(i.test(c))break;if(t.test(c))break;if(r.test(c))break;if(f.search(this.rules.other.nonSpaceChar)>=p||!c.trim())a+="\n"+f.slice(p);else{if(d)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(o.test(l))break;if(s.test(l))break;if(r.test(l))break;a+="\n"+c}d||c.trim()||(d=!0),n+=u+"\n",e=e.substring(u.length+1),l=f.slice(p)}}o.loose||(i?o.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(i=!0));let u,f=null;this.options.gfm&&(f=this.rules.other.listIsTask.exec(a),f&&(u="[ ] "!==f[0],a=a.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:n,task:!!f,checked:u,loose:!1,text:a,tokens:[]}),o.raw+=n}const a=o.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e<o.items.length;e++)if(this.lexer.state.top=!1,o.items[e].tokens=this.lexer.blockTokens(o.items[e].text,[]),!o.loose){const t=o.items[e].tokens.filter(e=>"space"===e.type),r=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw));o.loose=r}if(o.loose)for(let e=0;e<o.items.length;e++)o.items[e].loose=!0;return o}}html(e){const t=this.rules.block.html.exec(e);if(t){return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:n}}}table(e){var t;const r=this.rules.block.table.exec(e);if(!r)return;if(!this.rules.other.tableDelimiter.test(r[2]))return;const n=Fd(r[1]),o=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(null==(t=r[3])?void 0:t.trim())?r[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===o.length){for(const e of o)this.rules.other.tableAlignRight.test(e)?i.align.push("right"):this.rules.other.tableAlignCenter.test(e)?i.align.push("center"):this.rules.other.tableAlignLeft.test(e)?i.align.push("left"):i.align.push(null);for(let e=0;e<n.length;e++)i.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:i.align[e]});for(const e of s)i.rows.push(Fd(e,i.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]})));return i}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=Vd(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let r=0;for(let n=0;n<e.length;n++)if("\\"===e[n])n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){const r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],n="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(r);e&&(r=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?r.slice(1):r.slice(1,-1)),Jd(t,{href:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const e=t[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return Jd(r,e,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!n)return;if(n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const r=[...n[0]].length-1;let o,s,i=r,a=0;const l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+r);null!=(n=l.exec(t));){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(s=[...o].length,n[3]||n[4]){i+=s;continue}if((n[5]||n[6])&&r%3&&!((r+s)%3)){a+=s;continue}if(i-=s,i>0)continue;s=Math.min(s,s+i+a);const t=[...n[0]][0].length,l=e.slice(0,r+n.index+t+s);if(Math.min(r,s)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(e),n=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return r&&n&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,r;return"@"===t[2]?(e=t[1],r="mailto:"+e):(e=t[1],r=e),{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e){var t;let r;if(r=this.rules.inline.url.exec(e)){let e,n;if("@"===r[2])e=r[0],n="mailto:"+e;else{let o;do{o=r[0],r[0]=(null==(t=this.rules.inline._backpedal.exec(r[0]))?void 0:t[0])??""}while(o!==r[0]);e=r[0],n="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},Gd=class e{constructor(e){o(this,"tokens"),o(this,"options"),o(this,"state"),o(this,"tokenizer"),o(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Vc,this.options.tokenizer=this.options.tokenizer||new Wd,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:Kc,block:zd.normal,inline:Ud.normal};this.options.pedantic?(t.block=zd.pedantic,t.inline=Ud.pedantic):this.options.gfm&&(t.block=zd.gfm,this.options.breaks?t.inline=Ud.breaks:t.inline=Ud.gfm),this.tokenizer.rules=t}static get rules(){return{block:zd,inline:Ud}}static lex(t,r){return new e(r).lex(t)}static lexInline(t,r){return new e(r).inlineTokens(t)}lex(e){e=e.replace(Kc.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],r=!1){var n,o,s;for(this.options.pedantic&&(e=e.replace(Kc.tabCharGlobal," ").replace(Kc.spaceLine,""));e;){let i;if(null==(o=null==(n=this.options.extensions)?void 0:n.block)?void 0:o.some(r=>!!(i=r.call({lexer:this},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);const r=t.at(-1);1===i.raw.length&&void 0!==r?r.raw+="\n":t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);const r=t.at(-1);"paragraph"===(null==r?void 0:r.type)||"text"===(null==r?void 0:r.type)?(r.raw+="\n"+i.raw,r.text+="\n"+i.text,this.inlineQueue.at(-1).src=r.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);const r=t.at(-1);"paragraph"===(null==r?void 0:r.type)||"text"===(null==r?void 0:r.type)?(r.raw+="\n"+i.raw,r.text+="\n"+i.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(null==(s=this.options.extensions)?void 0:s.startBlock){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startBlock.forEach(e=>{n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){const n=t.at(-1);r&&"paragraph"===(null==n?void 0:n.type)?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i),r=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);const r=t.at(-1);"text"===(null==r?void 0:r.type)?(r.raw+="\n"+i.raw,r.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i);continue}if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var r,n,o;let s=e,i=null;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(s));)e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.anyPunctuation.exec(s));)s=s.slice(0,i.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,l="";for(;e;){let i;if(a||(l=""),a=!1,null==(n=null==(r=this.options.extensions)?void 0:r.inline)?void 0:n.some(r=>!!(i=r.call({lexer:this},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)))continue;if(i=this.tokenizer.escape(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.tag(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.link(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length);const r=t.at(-1);"text"===i.type&&"text"===(null==r?void 0:r.type)?(r.raw+=i.raw,r.text+=i.text):t.push(i);continue}if(i=this.tokenizer.emStrong(e,s,l)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.codespan(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.br(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.del(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.autolink(e)){e=e.substring(i.raw.length),t.push(i);continue}if(!this.state.inLink&&(i=this.tokenizer.url(e))){e=e.substring(i.raw.length),t.push(i);continue}let c=e;if(null==(o=this.options.extensions)?void 0:o.startInline){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startInline.forEach(e=>{n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))}),t<1/0&&t>=0&&(c=e.substring(0,t+1))}if(i=this.tokenizer.inlineText(c)){e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(l=i.raw.slice(-1)),a=!0;const r=t.at(-1);"text"===(null==r?void 0:r.type)?(r.raw+=i.raw,r.text+=i.text):t.push(i);continue}if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}},Kd=class{constructor(e){o(this,"options"),o(this,"parser"),this.options=e||Vc}space(e){return""}code({text:e,lang:t,escaped:r}){var n;const o=null==(n=(t||"").match(Kc.notSpaceStart))?void 0:n[0],s=e.replace(Kc.endingNewline,"")+"\n";return o?'<pre><code class="language-'+Bd(o)+'">'+(r?s:Bd(s,!0))+"</code></pre>\n":"<pre><code>"+(r?s:Bd(s,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){const t=e.ordered,r=e.start;let n="";for(let s=0;s<e.items.length;s++){const t=e.items[s];n+=this.listitem(t)}const o=t?"ol":"ul";return"<"+o+(t&&1!==r?' start="'+r+'"':"")+">\n"+n+"</"+o+">\n"}listitem(e){var t;let r="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===(null==(t=e.tokens[0])?void 0:t.type)?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+Bd(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):r+=n+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",r="";for(let o=0;o<e.header.length;o++)r+=this.tablecell(e.header[o]);t+=this.tablerow({text:r});let n="";for(let o=0;o<e.rows.length;o++){const t=e.rows[o];r="";for(let e=0;e<t.length;e++)r+=this.tablecell(t[e]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+n+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Bd(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){const n=this.parser.parseInline(r),o=Hd(e);if(null===o)return n;let s='<a href="'+(e=o)+'"';return t&&(s+=' title="'+Bd(t)+'"'),s+=">"+n+"</a>",s}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));const o=Hd(e);if(null===o)return Bd(r);let s=`<img src="${e=o}" alt="${r}"`;return t&&(s+=` title="${Bd(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Bd(e.text)}},Zd=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},Qd=class e{constructor(e){o(this,"options"),o(this,"renderer"),o(this,"textRenderer"),this.options=e||Vc,this.options.renderer=this.options.renderer||new Kd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Zd}static parse(t,r){return new e(r).parse(t)}static parseInline(t,r){return new e(r).parseInline(t)}parse(e,t=!0){var r,n;let o="";for(let s=0;s<e.length;s++){const i=e[s];if(null==(n=null==(r=this.options.extensions)?void 0:r.renderers)?void 0:n[i.type]){const e=i,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){o+=t||"";continue}}const a=i;switch(a.type){case"space":o+=this.renderer.space(a);continue;case"hr":o+=this.renderer.hr(a);continue;case"heading":o+=this.renderer.heading(a);continue;case"code":o+=this.renderer.code(a);continue;case"table":o+=this.renderer.table(a);continue;case"blockquote":o+=this.renderer.blockquote(a);continue;case"list":o+=this.renderer.list(a);continue;case"html":o+=this.renderer.html(a);continue;case"paragraph":o+=this.renderer.paragraph(a);continue;case"text":{let r=a,n=this.renderer.text(r);for(;s+1<e.length&&"text"===e[s+1].type;)r=e[++s],n+="\n"+this.renderer.text(r);o+=t?this.renderer.paragraph({type:"paragraph",raw:n,text:n,tokens:[{type:"text",raw:n,text:n,escaped:!0}]}):n;continue}default:{const e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return o}parseInline(e,t=this.renderer){var r,n;let o="";for(let s=0;s<e.length;s++){const i=e[s];if(null==(n=null==(r=this.options.extensions)?void 0:r.renderers)?void 0:n[i.type]){const e=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){o+=e||"";continue}}const a=i;switch(a.type){case"escape":case"text":o+=t.text(a);break;case"html":o+=t.html(a);break;case"link":o+=t.link(a);break;case"image":o+=t.image(a);break;case"strong":o+=t.strong(a);break;case"em":o+=t.em(a);break;case"codespan":o+=t.codespan(a);break;case"br":o+=t.br(a);break;case"del":o+=t.del(a);break;default:{const e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return o}},Yd=(r=class{constructor(e){o(this,"options"),o(this,"block"),this.options=e||Vc}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Gd.lex:Gd.lexInline}provideParser(){return this.block?Qd.parse:Qd.parseInline}},o(r,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),r),Xd=new class{constructor(...e){o(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),o(this,"options",this.setOptions),o(this,"parse",this.parseMarkdown(!0)),o(this,"parseInline",this.parseMarkdown(!1)),o(this,"Parser",Qd),o(this,"Renderer",Kd),o(this,"TextRenderer",Zd),o(this,"Lexer",Gd),o(this,"Tokenizer",Wd),o(this,"Hooks",Yd),this.use(...e)}walkTokens(e,t){var r,n;let o=[];for(const s of e)switch(o=o.concat(t.call(this,s)),s.type){case"table":{const e=s;for(const r of e.header)o=o.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)o=o.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=s;o=o.concat(this.walkTokens(e.items,t));break}default:{const e=s;(null==(n=null==(r=this.defaults.extensions)?void 0:r.childTokens)?void 0:n[e.type])?this.defaults.extensions.childTokens[e.type].forEach(r=>{const n=e[r].flat(1/0);o=o.concat(this.walkTokens(n,t))}):e.tokens&&(o=o.concat(this.walkTokens(e.tokens,t)))}}return o}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{const r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const r=t.renderers[e.name];t.renderers[e.name]=r?function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=r.apply(this,t)),n}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),r.extensions=t),e.renderer){const t=this.defaults.renderer||new Kd(this.defaults);for(const r in e.renderer){if(!(r in t))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const n=r,o=e.renderer[n],s=t[n];t[n]=(...e)=>{let r=o.apply(t,e);return!1===r&&(r=s.apply(t,e)),r||""}}r.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new Wd(this.defaults);for(const r in e.tokenizer){if(!(r in t))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const n=r,o=e.tokenizer[n],s=t[n];t[n]=(...e)=>{let r=o.apply(t,e);return!1===r&&(r=s.apply(t,e)),r}}r.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new Yd;for(const r in e.hooks){if(!(r in t))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;const n=r,o=e.hooks[n],s=t[n];Yd.passThroughHooks.has(r)?t[n]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then(e=>s.call(t,e));const r=o.call(t,e);return s.call(t,r)}:t[n]=(...e)=>{let r=o.apply(t,e);return!1===r&&(r=s.apply(t,e)),r}}r.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Gd.lex(e,t??this.defaults)}parser(e,t){return Qd.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{const n={...r},o={...this.defaults,...n},s=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===n.async)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==t)return s(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const i=o.hooks?o.hooks.provideLexer():e?Gd.lex:Gd.lexInline,a=o.hooks?o.hooks.provideParser():e?Qd.parse:Qd.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(e=>i(e,o)).then(e=>o.hooks?o.hooks.processAllTokens(e):e).then(e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then(()=>e):e).then(e=>a(e,o)).then(e=>o.hooks?o.hooks.postprocess(e):e).catch(s);try{o.hooks&&(t=o.hooks.preprocess(t));let e=i(t,o);o.hooks&&(e=o.hooks.processAllTokens(e)),o.walkTokens&&this.walkTokens(e,o.walkTokens);let r=a(e,o);return o.hooks&&(r=o.hooks.postprocess(r)),r}catch(cp){return s(cp)}}}onError(e,t){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+Bd(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function ep(e,t){return Xd.parse(e,t)}ep.options=ep.setOptions=function(e){return Xd.setOptions(e),ep.defaults=Xd.defaults,Jc(ep.defaults),ep},ep.getDefaults=Fc,ep.defaults=Vc,ep.use=function(...e){return Xd.use(...e),ep.defaults=Xd.defaults,Jc(ep.defaults),ep},ep.walkTokens=function(e,t){return Xd.walkTokens(e,t)},ep.parseInline=Xd.parseInline,ep.Parser=Qd,ep.parser=Qd.parse,ep.Renderer=Kd,ep.TextRenderer=Zd,ep.Lexer=Gd,ep.lexer=Gd.lex,ep.Tokenizer=Wd,ep.Hooks=Yd,ep.parse=ep,ep.options,ep.setOptions,ep.use,ep.walkTokens,ep.parseInline,Qd.parse,Gd.lex;var tp=Object.defineProperty,rp=Object.getOwnPropertyDescriptor,np=(e,t,r,n)=>{for(var o,s=n>1?void 0:n?rp(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&tp(t,r,s),s};let op=class extends xe{constructor(){super(...arguments),this.spec=null,this.authOpen=!1}render(){return this.spec?ne`
|
|
262
|
+
deps: ${n}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);s(e,t),i(e,r)}};function s(e,r=e.schema){const{gen:o,data:s,it:i}=e;if(0===Object.keys(r).length)return;const a=o.let("missing");for(const l in r){const c=r[l];if(0===c.length)continue;const d=(0,n.propertyInData)(o,s,l,i.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),i.allErrors?o.if(d,()=>{for(const t of c)(0,n.checkReportMissingProp)(e,t)}):(o.if(t._`${d} && (${(0,n.checkMissingProp)(e,c,a)})`),(0,n.reportMissingProp)(e,a),o.else())}}function i(e,t=e.schema){const{gen:o,data:s,keyword:i,it:a}=e,l=o.name("valid");for(const c in t)(0,r.alwaysValidSchema)(a,t[c])||(o.if((0,n.propertyInData)(o,s,c,a.opts.ownProperties),()=>{const t=e.subschema({keyword:i,schemaProp:c},l);e.mergeValidEvaluated(t,l)},()=>o.var(l,!0)),e.ok(l))}e.validatePropertyDeps=s,e.validateSchemaDeps=i,e.default=o}(Ln)),Ln}var Dn,Bn={};function Hn(){if(Dn)return Bn;Dn=1,Object.defineProperty(Bn,"__esModule",{value:!0});const e=yt(),t=$t(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>e._`{propertyName: ${t.propertyName}}`},code(r){const{gen:n,schema:o,data:s,it:i}=r;if((0,t.alwaysValidSchema)(i,o))return;const a=n.name("valid");n.forIn("key",s,t=>{r.setParams({propertyName:t}),r.subschema({keyword:"propertyNames",data:t,dataTypes:["string"],propertyName:t,compositeRule:!0},a),n.if((0,e.not)(a),()=>{r.error(!0),i.allErrors||n.break()})}),r.ok(a)}};return Bn.default=r,Bn}var Fn,Vn={};function Gn(){if(Fn)return Vn;Fn=1,Object.defineProperty(Vn,"__esModule",{value:!0});const e=Ft(),t=yt(),r=St(),n=$t(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>t._`{additionalProperty: ${e.additionalProperty}}`},code(o){const{gen:s,schema:i,parentSchema:a,data:l,errsCount:c,it:d}=o;if(!c)throw new Error("ajv implementation error");const{allErrors:p,opts:u}=d;if(d.props=!0,"all"!==u.removeAdditional&&(0,n.alwaysValidSchema)(d,i))return;const h=(0,e.allSchemaProperties)(a.properties),f=(0,e.allSchemaProperties)(a.patternProperties);function m(e){s.code(t._`delete ${l}[${e}]`)}function g(e){if("all"===u.removeAdditional||u.removeAdditional&&!1===i)m(e);else{if(!1===i)return o.setParams({additionalProperty:e}),o.error(),void(p||s.break());if("object"==typeof i&&!(0,n.alwaysValidSchema)(d,i)){const r=s.name("valid");"failing"===u.removeAdditional?(y(e,r,!1),s.if((0,t.not)(r),()=>{o.reset(),m(e)})):(y(e,r),p||s.if((0,t.not)(r),()=>s.break()))}}}function y(e,t,r){const s={keyword:"additionalProperties",dataProp:e,dataPropType:n.Type.Str};!1===r&&Object.assign(s,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(s,t)}s.forIn("key",l,r=>{h.length||f.length?s.if(function(r){let i;if(h.length>8){const t=(0,n.schemaRefOrVal)(d,a.properties,"properties");i=(0,e.isOwnProperty)(s,t,r)}else i=h.length?(0,t.or)(...h.map(e=>t._`${r} === ${e}`)):t.nil;return f.length&&(i=(0,t.or)(i,...f.map(n=>t._`${(0,e.usePattern)(o,n)}.test(${r})`))),(0,t.not)(i)}(r),()=>g(r)):g(r)}),o.ok(t._`${c} === ${r.default.errors}`)}};return Vn.default=o,Vn}var Jn,Wn={};function Kn(){if(Jn)return Wn;Jn=1,Object.defineProperty(Wn,"__esModule",{value:!0});const e=sr(),t=Ft(),r=$t(),n=Gn(),o={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:s,schema:i,parentSchema:a,data:l,it:c}=o;"all"===c.opts.removeAdditional&&void 0===a.additionalProperties&&n.default.code(new e.KeywordCxt(c,n.default,"additionalProperties"));const d=(0,t.allSchemaProperties)(i);for(const e of d)c.definedProperties.add(e);c.opts.unevaluated&&d.length&&!0!==c.props&&(c.props=r.mergeEvaluated.props(s,(0,r.toHash)(d),c.props));const p=d.filter(e=>!(0,r.alwaysValidSchema)(c,i[e]));if(0===p.length)return;const u=s.name("valid");for(const e of p)h(e)?f(e):(s.if((0,t.propertyInData)(s,l,e,c.opts.ownProperties)),f(e),c.allErrors||s.else().var(u,!0),s.endIf()),o.it.definedProperties.add(e),o.ok(u);function h(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==i[e].default}function f(e){o.subschema({keyword:"properties",schemaProp:e,dataProp:e},u)}}};return Wn.default=o,Wn}var Zn,Yn={};function Qn(){if(Zn)return Yn;Zn=1,Object.defineProperty(Yn,"__esModule",{value:!0});const e=Ft(),t=yt(),r=$t(),n=$t(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:s,schema:i,data:a,parentSchema:l,it:c}=o,{opts:d}=c,p=(0,e.allSchemaProperties)(i),u=p.filter(e=>(0,r.alwaysValidSchema)(c,i[e]));if(0===p.length||u.length===p.length&&(!c.opts.unevaluated||!0===c.props))return;const h=d.strictSchema&&!d.allowMatchingProperties&&l.properties,f=s.name("valid");!0===c.props||c.props instanceof t.Name||(c.props=(0,n.evaluatedPropsToName)(s,c.props));const{props:m}=c;function g(e){for(const t in h)new RegExp(e).test(t)&&(0,r.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function y(r){s.forIn("key",a,i=>{s.if(t._`${(0,e.usePattern)(o,r)}.test(${i})`,()=>{const e=u.includes(r);e||o.subschema({keyword:"patternProperties",schemaProp:r,dataProp:i,dataPropType:n.Type.Str},f),c.opts.unevaluated&&!0!==m?s.assign(t._`${m}[${i}]`,!0):e||c.allErrors||s.if((0,t.not)(f),()=>s.break())})})}!function(){for(const e of p)h&&g(e),c.allErrors?y(e):(s.var(f,!0),y(e),s.if(f))}()}};return Yn.default=o,Yn}var Xn,eo={};function to(){if(Xn)return eo;Xn=1,Object.defineProperty(eo,"__esModule",{value:!0});const e=$t(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:r,schema:n,it:o}=t;if((0,e.alwaysValidSchema)(o,n))return void t.fail();const s=r.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),t.failResult(s,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};return eo.default=t,eo}var ro,no={};function oo(){if(ro)return no;ro=1,Object.defineProperty(no,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ft().validateUnion,error:{message:"must match a schema in anyOf"}};return no.default=e,no}var so,io={};function ao(){if(so)return io;so=1,Object.defineProperty(io,"__esModule",{value:!0});const e=yt(),t=$t(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>e._`{passingSchemas: ${t.passing}}`},code(r){const{gen:n,schema:o,parentSchema:s,it:i}=r;if(!Array.isArray(o))throw new Error("ajv implementation error");if(i.opts.discriminator&&s.discriminator)return;const a=o,l=n.let("valid",!1),c=n.let("passing",null),d=n.name("_valid");r.setParams({passing:c}),n.block(function(){a.forEach((o,s)=>{let a;(0,t.alwaysValidSchema)(i,o)?n.var(d,!0):a=r.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},d),s>0&&n.if(e._`${d} && ${l}`).assign(l,!1).assign(c,e._`[${c}, ${s}]`).else(),n.if(d,()=>{n.assign(l,!0),n.assign(c,s),a&&r.mergeEvaluated(a,e.Name)})})}),r.result(l,()=>r.reset(),()=>r.error(!0))}};return io.default=r,io}var lo,co={};function po(){if(lo)return co;lo=1,Object.defineProperty(co,"__esModule",{value:!0});const e=$t(),t={keyword:"allOf",schemaType:"array",code(t){const{gen:r,schema:n,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");const s=r.name("valid");n.forEach((r,n)=>{if((0,e.alwaysValidSchema)(o,r))return;const i=t.subschema({keyword:"allOf",schemaProp:n},s);t.ok(s),t.mergeEvaluated(i)})}};return co.default=t,co}var uo,ho={};function fo(){if(uo)return ho;uo=1,Object.defineProperty(ho,"__esModule",{value:!0});const e=yt(),t=$t(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:t})=>e.str`must match "${t.ifClause}" schema`,params:({params:t})=>e._`{failingKeyword: ${t.ifClause}}`},code(r){const{gen:o,parentSchema:s,it:i}=r;void 0===s.then&&void 0===s.else&&(0,t.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const a=n(i,"then"),l=n(i,"else");if(!a&&!l)return;const c=o.let("valid",!0),d=o.name("_valid");if(function(){const e=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);r.mergeEvaluated(e)}(),r.reset(),a&&l){const e=o.let("ifClause");r.setParams({ifClause:e}),o.if(d,p("then",e),p("else",e))}else a?o.if(d,p("then")):o.if((0,e.not)(d),p("else"));function p(t,n){return()=>{const s=r.subschema({keyword:t},d);o.assign(c,d),r.mergeValidEvaluated(s,c),n?o.assign(n,e._`${t}`):r.setParams({ifClause:t})}}r.pass(c,()=>r.error(!0))}};function n(e,r){const n=e.schema[r];return void 0!==n&&!(0,t.alwaysValidSchema)(e,n)}return ho.default=r,ho}var mo,go,yo={};function vo(){if(mo)return yo;mo=1,Object.defineProperty(yo,"__esModule",{value:!0});const e=$t(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:r,it:n}){void 0===r.if&&(0,e.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};return yo.default=t,yo}function bo(){if(go)return _n;go=1,Object.defineProperty(_n,"__esModule",{value:!0});const e=Sn(),t=An(),r=Tn(),n=Rn(),o=qn(),s=Un(),i=Hn(),a=Gn(),l=Kn(),c=Qn(),d=to(),p=oo(),u=ao(),h=po(),f=fo(),m=vo();return _n.default=function(g=!1){const y=[d.default,p.default,u.default,h.default,f.default,m.default,i.default,a.default,s.default,l.default,c.default];return g?y.push(t.default,n.default):y.push(e.default,r.default),y.push(o.default),y},_n}var $o,xo,wo,_o={},ko={};function So(){if($o)return ko;$o=1,Object.defineProperty(ko,"__esModule",{value:!0});const e=yt(),t={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>e.str`must match format "${t}"`,params:({schemaCode:t})=>e._`{format: ${t}}`},code(t,r){const{gen:n,data:o,$data:s,schema:i,schemaCode:a,it:l}=t,{opts:c,errSchemaPath:d,schemaEnv:p,self:u}=l;c.validateFormats&&(s?function(){const s=n.scopeValue("formats",{ref:u.formats,code:c.code.formats}),i=n.const("fDef",e._`${s}[${a}]`),l=n.let("fType"),d=n.let("format");n.if(e._`typeof ${i} == "object" && !(${i} instanceof RegExp)`,()=>n.assign(l,e._`${i}.type || "string"`).assign(d,e._`${i}.validate`),()=>n.assign(l,e._`"string"`).assign(d,i)),t.fail$data((0,e.or)(!1===c.strictSchema?e.nil:e._`${a} && !${d}`,function(){const t=p.$async?e._`(${i}.async ? await ${d}(${o}) : ${d}(${o}))`:e._`${d}(${o})`,n=e._`(typeof ${d} == "function" ? ${t} : ${d}.test(${o}))`;return e._`${d} && ${d} !== true && ${l} === ${r} && !${n}`}()))}():function(){const s=u.formats[i];if(!s)return void function(){if(!1===c.strictSchema)return void u.logger.warn(e());throw new Error(e());function e(){return`unknown format "${i}" ignored in schema at path "${d}"`}}();if(!0===s)return;const[a,l,h]=function(t){const r=t instanceof RegExp?(0,e.regexpCode)(t):c.code.formats?e._`${c.code.formats}${(0,e.getProperty)(i)}`:void 0,o=n.scopeValue("formats",{key:i,ref:t,code:r});if("object"==typeof t&&!(t instanceof RegExp))return[t.type||"string",t.validate,e._`${o}.validate`];return["string",t,o]}(s);a===r&&t.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!p.$async)throw new Error("async format in sync schema");return e._`await ${h}(${o})`}return"function"==typeof l?e._`${h}(${o})`:e._`${h}.test(${o})`}())}())}};return ko.default=t,ko}function Oo(){if(xo)return _o;xo=1,Object.defineProperty(_o,"__esModule",{value:!0});const e=[So().default];return _o.default=e,_o}function jo(){if(wo)return Ar;wo=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=function(){if(Tr)return Cr;Tr=1,Object.defineProperty(Cr,"__esModule",{value:!0});const e=["$schema","id","$defs",{keyword:"$comment"},"definitions",Rr().default];return Cr.default=e,Cr}(),t=xn(),r=bo(),n=Oo(),o=[e.default,t.default,r.default(),n.default,["title","description","default"]];return Ar.default=o,Ar}var Po,Eo,To={},Ao={};function Co(){return Po||(Po=1,Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.DiscrError=void 0,(t=e||(Ao.DiscrError=e={})).Tag="tag",t.Mapping="mapping"),Ao;var e,t}function Io(){if(Eo)return To;Eo=1,Object.defineProperty(To,"__esModule",{value:!0});const e=yt(),t=Co(),r=fr(),n=pr(),o=$t(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:r}})=>e===t.DiscrError.Tag?`tag "${r}" must be string`:`value of tag "${r}" must be in oneOf`,params:({params:{discrError:t,tag:r,tagName:n}})=>e._`{error: ${t}, tag: ${n}, tagValue: ${r}}`},code(s){const{gen:i,data:a,schema:l,parentSchema:c,it:d}=s,{oneOf:p}=c;if(!d.opts.discriminator)throw new Error("discriminator: requires discriminator option");const u=l.propertyName;if("string"!=typeof u)throw new Error("discriminator: requires propertyName");if(l.mapping)throw new Error("discriminator: mapping is not supported");if(!p)throw new Error("discriminator: requires oneOf keyword");const h=i.let("valid",!1),f=i.const("tag",e._`${a}${(0,e.getProperty)(u)}`);function m(t){const r=i.name("valid"),n=s.subschema({keyword:"oneOf",schemaProp:t},r);return s.mergeEvaluated(n,e.Name),r}i.if(e._`typeof ${f} == "string"`,()=>function(){const a=function(){var e;const t={},s=a(c);let i=!0;for(let c=0;c<p.length;c++){let t=p[c];if((null==t?void 0:t.$ref)&&!(0,o.schemaHasRulesButRef)(t,d.self.RULES)){const e=t.$ref;if(t=r.resolveRef.call(d.self,d.schemaEnv.root,d.baseId,e),t instanceof r.SchemaEnv&&(t=t.schema),void 0===t)throw new n.default(d.opts.uriResolver,d.baseId,e)}const h=null===(e=null==t?void 0:t.properties)||void 0===e?void 0:e[u];if("object"!=typeof h)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);i=i&&(s||a(t)),l(h,c)}if(!i)throw new Error(`discriminator: "${u}" must be required`);return t;function a({required:e}){return Array.isArray(e)&&e.includes(u)}function l(e,t){if(e.const)h(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`);for(const r of e.enum)h(r,t)}}function h(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${u}" values must be unique strings`);t[e]=r}}();i.if(!1);for(const t in a)i.elseIf(e._`${f} === ${t}`),i.assign(h,m(a[t]));i.else(),s.error(!1,{discrError:t.DiscrError.Mapping,tag:f,tagName:u}),i.endIf()}(),()=>s.error(!1,{discrError:t.DiscrError.Tag,tag:f,tagName:u})),s.ok(h)}};return To.default=s,To}const Ro={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}};var No;var Mo,qo,zo={exports:{}},Lo={},Uo={},Do={};function Bo(){if(Mo)return Do;Mo=1,Object.defineProperty(Do,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Do.default=e,Do}function Ho(){if(qo)return Uo;qo=1,Object.defineProperty(Uo,"__esModule",{value:!0});const e=Bo(),t=Rr(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Uo.default=r,Uo}var Fo,Vo,Go={},Jo={};function Wo(){if(Fo)return Jo;Fo=1,Object.defineProperty(Jo,"__esModule",{value:!0});const e=yt(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:t,schemaCode:n})=>e.str`must be ${r[t].okStr} ${n}`,params:({keyword:t,schemaCode:n})=>e._`{comparison: ${r[t].okStr}, limit: ${n}}`},o={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(t){const{keyword:n,data:o,schemaCode:s}=t;t.fail$data(e._`${o} ${r[n].fail} ${s} || isNaN(${o})`)}};return Jo.default=o,Jo}function Ko(){if(Vo)return Go;Vo=1,Object.defineProperty(Go,"__esModule",{value:!0});const e=Wo(),t=Br(),r=Wr(),n=Yr(),o=en(),s=nn(),i=an(),a=hn(),l=gn(),c=$n(),d=[e.default,t.default,r.default,n.default,o.default,s.default,i.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,c.default];return Go.default=d,Go}var Zo,Yo={},Qo={};function Xo(){if(Zo)return Qo;Zo=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.dynamicAnchor=void 0;const e=yt(),t=St(),r=fr(),n=Rr(),o={keyword:"$dynamicAnchor",schemaType:"string",code:e=>s(e,e.schema)};function s(o,s){const{gen:i,it:a}=o;a.schemaEnv.root.dynamicAnchors[s]=!0;const l=e._`${t.default.dynamicAnchors}${(0,e.getProperty)(s)}`,c="#"===a.errSchemaPath?a.validateName:function(e){const{schemaEnv:t,schema:o,self:s}=e.it,{root:i,baseId:a,localRefs:l,meta:c}=t.root,{schemaId:d}=s.opts,p=new r.SchemaEnv({schema:o,schemaId:d,root:i,baseId:a,localRefs:l,meta:c});return r.compileSchema.call(s,p),(0,n.getValidate)(e,p)}(o);i.if(e._`!${l}`,()=>i.assign(l,c))}return Qo.dynamicAnchor=s,Qo.default=o,Qo}var es,ts={};function rs(){if(es)return ts;es=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.dynamicRef=void 0;const e=yt(),t=St(),r=Rr(),n={keyword:"$dynamicRef",schemaType:"string",code:e=>o(e,e.schema)};function o(n,o){const{gen:s,keyword:i,it:a}=n;if("#"!==o[0])throw new Error(`"${i}" only supports hash fragment reference`);const l=o.slice(1);if(a.allErrors)c();else{const e=s.let("valid",!1);c(e),n.ok(e)}function c(r){if(a.schemaEnv.root.dynamicAnchors[l]){const n=s.let("_v",e._`${t.default.dynamicAnchors}${(0,e.getProperty)(l)}`);s.if(n,d(n,r),d(a.validateName,r))}else d(a.validateName,r)()}function d(e,t){return t?()=>s.block(()=>{(0,r.callRef)(n,e),s.let(t,!0)}):()=>(0,r.callRef)(n,e)}}return ts.dynamicRef=o,ts.default=n,ts}var ns,os={};function ss(){if(ns)return os;ns=1,Object.defineProperty(os,"__esModule",{value:!0});const e=Xo(),t=$t(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0,e.dynamicAnchor)(r,""):(0,t.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored")}};return os.default=r,os}var is,as,ls={};function cs(){if(is)return ls;is=1,Object.defineProperty(ls,"__esModule",{value:!0});const e=rs(),t={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,e.dynamicRef)(t,t.schema)};return ls.default=t,ls}function ds(){if(as)return Yo;as=1,Object.defineProperty(Yo,"__esModule",{value:!0});const e=Xo(),t=rs(),r=ss(),n=cs(),o=[e.default,t.default,r.default,n.default];return Yo.default=o,Yo}var ps,us={},hs={};function fs(){if(ps)return hs;ps=1,Object.defineProperty(hs,"__esModule",{value:!0});const e=Un(),t={keyword:"dependentRequired",type:"object",schemaType:"object",error:e.error,code:t=>(0,e.validatePropertyDeps)(t)};return hs.default=t,hs}var ms,gs={};function ys(){if(ms)return gs;ms=1,Object.defineProperty(gs,"__esModule",{value:!0});const e=Un(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,e.validateSchemaDeps)(t)};return gs.default=t,gs}var vs,bs,$s={};function xs(){if(vs)return $s;vs=1,Object.defineProperty($s,"__esModule",{value:!0});const e=$t(),t={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:r,it:n}){void 0===r.contains&&(0,e.checkStrictMode)(n,`"${t}" without "contains" is ignored`)}};return $s.default=t,$s}function ws(){if(bs)return us;bs=1,Object.defineProperty(us,"__esModule",{value:!0});const e=fs(),t=ys(),r=xs(),n=[e.default,t.default,r.default];return us.default=n,us}var _s,ks={},Ss={};function Os(){if(_s)return Ss;_s=1,Object.defineProperty(Ss,"__esModule",{value:!0});const e=yt(),t=$t(),r=St(),n={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:t})=>e._`{unevaluatedProperty: ${t.unevaluatedProperty}}`},code(n){const{gen:o,schema:s,data:i,errsCount:a,it:l}=n;if(!a)throw new Error("ajv implementation error");const{allErrors:c,props:d}=l;function p(r){if(!1===s)return n.setParams({unevaluatedProperty:r}),n.error(),void(c||o.break());if(!(0,t.alwaysValidSchema)(l,s)){const s=o.name("valid");n.subschema({keyword:"unevaluatedProperties",dataProp:r,dataPropType:t.Type.Str},s),c||o.if((0,e.not)(s),()=>o.break())}}d instanceof e.Name?o.if(e._`${d} !== true`,()=>o.forIn("key",i,t=>o.if(function(t,r){return e._`!${t} || !${t}[${r}]`}(d,t),()=>p(t)))):!0!==d&&o.forIn("key",i,t=>void 0===d?p(t):o.if(function(t,r){const n=[];for(const o in t)!0===t[o]&&n.push(e._`${r} !== ${o}`);return(0,e.and)(...n)}(d,t),()=>p(t))),l.props=!0,n.ok(e._`${a} === ${r.default.errors}`)}};return Ss.default=n,Ss}var js,Ps,Es={};function Ts(){if(js)return Es;js=1,Object.defineProperty(Es,"__esModule",{value:!0});const e=yt(),t=$t(),r={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:t}})=>e.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>e._`{limit: ${t}}`},code(r){const{gen:n,schema:o,data:s,it:i}=r,a=i.items||0;if(!0===a)return;const l=n.const("len",e._`${s}.length`);if(!1===o)r.setParams({len:a}),r.fail(e._`${l} > ${a}`);else if("object"==typeof o&&!(0,t.alwaysValidSchema)(i,o)){const o=n.var("valid",e._`${l} <= ${a}`);n.if((0,e.not)(o),()=>function(o,s){n.forRange("i",s,l,s=>{r.subschema({keyword:"unevaluatedItems",dataProp:s,dataPropType:t.Type.Num},o),i.allErrors||n.if((0,e.not)(o),()=>n.break())})}(o,a)),r.ok(o)}i.items=!0}};return Es.default=r,Es}function As(){if(Ps)return ks;Ps=1,Object.defineProperty(ks,"__esModule",{value:!0});const e=Os(),t=Ts(),r=[e.default,t.default];return ks.default=r,ks}var Cs,Is,Rs={};function Ns(){return Cs||(Cs=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.contentVocabulary=Rs.metadataVocabulary=void 0,Rs.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Rs.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Rs}function Ms(){if(Is)return Lo;Is=1,Object.defineProperty(Lo,"__esModule",{value:!0});const e=Ho(),t=Ko(),r=bo(),n=ds(),o=ws(),s=As(),i=Oo(),a=Ns(),l=[n.default,e.default,t.default,(0,r.default)(!0),i.default,a.metadataVocabulary,a.contentVocabulary,o.default,s.default];return Lo.default=l,Lo}var qs={};const zs={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}},Ls={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}},Us={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}},Ds={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}},Bs={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}},Hs={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}},Fs={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}},Vs={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}};var Gs,Js;function Ws(){if(Gs)return qs;Gs=1,Object.defineProperty(qs,"__esModule",{value:!0});const e=zs,t=Ls,r=Us,n=Ds,o=Bs,s=Hs,i=Fs,a=Vs,l=["/properties"];return qs.default=function(c){return[e,t,r,n,o,d(this,s),i,d(this,a)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function d(e,t){return c?e.$dataMetaSchema(t,l):t}},qs}function Ks(){return Js||(Js=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const r=Pr(),n=Ms(),o=Io(),s=Ws(),i="https://json-schema.org/draft/2020-12/schema";class a extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:e,meta:t}=this.opts;t&&(s.default.call(this,e),this.refs["http://json-schema.org/schema"]=i)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}t.Ajv2020=a,e.exports=t=a,e.exports.Ajv2020=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var l=sr();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=yt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var d=lr();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var p=pr();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}(zo,zo.exports)),zo.exports}var Zs={exports:{}};const Ys={id:"https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v1.2/apiDeclaration.json#",$schema:"http://json-schema.org/draft-04/schema#",type:"object",required:["swaggerVersion","basePath","apis"],properties:{swaggerVersion:{enum:["1.2"]},apiVersion:{type:"string"},basePath:{type:"string",format:"uri",pattern:"^https?://"},resourcePath:{type:"string",format:"uri",pattern:"^/"},apis:{type:"array",items:{$ref:"#/definitions/apiObject"}},models:{type:"object",additionalProperties:{$ref:"modelsObject.json#"}},produces:{$ref:"#/definitions/mimeTypeArray"},consumes:{$ref:"#/definitions/mimeTypeArray"},authorizations:{$ref:"authorizationObject.json#"}},additionalProperties:!1,definitions:{apiObject:{type:"object",required:["path","operations"],properties:{path:{type:"string",format:"uri-template",pattern:"^/"},description:{type:"string"},operations:{type:"array",items:{$ref:"operationObject.json#"}}},additionalProperties:!1},mimeTypeArray:{type:"array",items:{type:"string",format:"mime-type"},uniqueItems:!0}}},Qs={title:"A JSON Schema for Swagger 2.0 API.",id:"http://swagger.io/v2/schema.json#",$schema:"http://json-schema.org/draft-04/schema#",type:"object",required:["swagger","info","paths"],additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{swagger:{type:"string",enum:["2.0"],description:"The Swagger version of this document."},info:{$ref:"#/definitions/info"},host:{type:"string",pattern:"^[^{}/ :\\\\]+(?::\\d+)?$",description:"The host (name or ip) of the API. Example: 'swagger.io'"},basePath:{type:"string",pattern:"^/",description:"The base path to the API. Example: '/api'."},schemes:{$ref:"#/definitions/schemesList"},consumes:{description:"A list of MIME types accepted by the API.",allOf:[{$ref:"#/definitions/mediaTypeList"}]},produces:{description:"A list of MIME types the API can produce.",allOf:[{$ref:"#/definitions/mediaTypeList"}]},paths:{$ref:"#/definitions/paths"},definitions:{$ref:"#/definitions/definitions"},parameters:{$ref:"#/definitions/parameterDefinitions"},responses:{$ref:"#/definitions/responseDefinitions"},security:{$ref:"#/definitions/security"},securityDefinitions:{$ref:"#/definitions/securityDefinitions"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:!0},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:JSON.parse('{"info":{"type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed."},"termsOfService":{"type":"string","description":"The terms of service for the API."},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}}},"contact":{"type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"license":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"paths":{"type":"object","description":"Relative paths to the individual endpoints. They must be relative to the \'basePath\'.","patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"},"^/":{"$ref":"#/definitions/pathItem"}},"additionalProperties":false},"definitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"description":"One or more JSON objects describing the schemas being consumed and produced by the API."},"parameterDefinitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/parameter"},"description":"One or more JSON representations for parameters"},"responseDefinitions":{"type":"object","additionalProperties":{"$ref":"#/definitions/response"},"description":"One or more JSON representations for responses"},"externalDocs":{"type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"examples":{"type":"object","additionalProperties":true},"mimeType":{"type":"string","description":"The MIME type of the HTTP message."},"operation":{"type":"object","required":["responses"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"tags":{"type":"array","items":{"type":"string"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the operation."},"description":{"type":"string","description":"A longer description of the operation, GitHub Flavored Markdown is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string","description":"A unique identifier of the operation."},"produces":{"description":"A list of MIME types the API can produce.","allOf":[{"$ref":"#/definitions/mediaTypeList"}]},"consumes":{"description":"A list of MIME types the API can consume.","allOf":[{"$ref":"#/definitions/mediaTypeList"}]},"parameters":{"$ref":"#/definitions/parametersList"},"responses":{"$ref":"#/definitions/responses"},"schemes":{"$ref":"#/definitions/schemesList"},"deprecated":{"type":"boolean","default":false},"security":{"$ref":"#/definitions/security"}}},"pathItem":{"type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"$ref":{"type":"string"},"get":{"$ref":"#/definitions/operation"},"put":{"$ref":"#/definitions/operation"},"post":{"$ref":"#/definitions/operation"},"delete":{"$ref":"#/definitions/operation"},"options":{"$ref":"#/definitions/operation"},"head":{"$ref":"#/definitions/operation"},"patch":{"$ref":"#/definitions/operation"},"parameters":{"$ref":"#/definitions/parametersList"}}},"responses":{"type":"object","description":"Response objects names can either be any valid HTTP status code or \'default\'.","minProperties":1,"additionalProperties":false,"patternProperties":{"^([0-9]{3})$|^(default)$":{"$ref":"#/definitions/responseValue"},"^x-":{"$ref":"#/definitions/vendorExtension"}},"not":{"type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}}},"responseValue":{"oneOf":[{"$ref":"#/definitions/response"},{"$ref":"#/definitions/jsonReference"}]},"response":{"type":"object","required":["description"],"properties":{"description":{"type":"string"},"schema":{"oneOf":[{"$ref":"#/definitions/schema"},{"$ref":"#/definitions/fileSchema"}]},"headers":{"$ref":"#/definitions/headers"},"examples":{"$ref":"#/definitions/examples"}},"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"headers":{"type":"object","additionalProperties":{"$ref":"#/definitions/header"}},"header":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"type":"string","enum":["string","number","integer","boolean","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormat"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"vendorExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"bodyParameter":{"type":"object","required":["name","in","schema"],"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["body"]},"required":{"type":"boolean","description":"Determines whether or not this parameter is required or optional.","default":false},"schema":{"$ref":"#/definitions/schema"}},"additionalProperties":false},"headerParameterSubSchema":{"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"required":{"type":"boolean","description":"Determines whether or not this parameter is required or optional.","default":false},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["header"]},"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"type":{"type":"string","enum":["string","number","boolean","integer","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormat"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}}},"queryParameterSubSchema":{"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"required":{"type":"boolean","description":"Determines whether or not this parameter is required or optional.","default":false},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["query"]},"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"allowEmptyValue":{"type":"boolean","default":false,"description":"allows sending a parameter by name only or with an empty value."},"type":{"type":"string","enum":["string","number","boolean","integer","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormatWithMulti"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}}},"formDataParameterSubSchema":{"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"required":{"type":"boolean","description":"Determines whether or not this parameter is required or optional.","default":false},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["formData"]},"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"allowEmptyValue":{"type":"boolean","default":false,"description":"allows sending a parameter by name only or with an empty value."},"type":{"type":"string","enum":["string","number","boolean","integer","array","file"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormatWithMulti"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}}},"pathParameterSubSchema":{"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"required":["required"],"properties":{"required":{"type":"boolean","enum":[true],"description":"Determines whether or not this parameter is required or optional."},"in":{"type":"string","description":"Determines the location of the parameter.","enum":["path"]},"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"type":{"type":"string","enum":["string","number","boolean","integer","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormat"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}}},"nonBodyParameter":{"type":"object","required":["name","in","type"],"oneOf":[{"$ref":"#/definitions/headerParameterSubSchema"},{"$ref":"#/definitions/formDataParameterSubSchema"},{"$ref":"#/definitions/queryParameterSubSchema"},{"$ref":"#/definitions/pathParameterSubSchema"}]},"parameter":{"oneOf":[{"$ref":"#/definitions/bodyParameter"},{"$ref":"#/definitions/nonBodyParameter"}]},"schema":{"type":"object","description":"A deterministic version of a JSON Schema object.","patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"properties":{"$ref":{"type":"string"},"format":{"type":"string"},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"multipleOf":{"$ref":"http://json-schema.org/draft-04/schema#/properties/multipleOf"},"maximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/maximum"},"exclusiveMaximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},"minimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/minimum"},"exclusiveMinimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},"maxLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"pattern":{"$ref":"http://json-schema.org/draft-04/schema#/properties/pattern"},"maxItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"uniqueItems":{"$ref":"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},"maxProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"required":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/stringArray"},"enum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/enum"},"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"type":{"$ref":"http://json-schema.org/draft-04/schema#/properties/type"},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"discriminator":{"type":"string"},"readOnly":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/xml"},"externalDocs":{"$ref":"#/definitions/externalDocs"},"example":{}},"additionalProperties":false},"fileSchema":{"type":"object","description":"A deterministic version of a JSON Schema object.","patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}},"required":["type"],"properties":{"format":{"type":"string"},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"required":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/stringArray"},"type":{"type":"string","enum":["file"]},"readOnly":{"type":"boolean","default":false},"externalDocs":{"$ref":"#/definitions/externalDocs"},"example":{}},"additionalProperties":false},"primitivesItems":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","enum":["string","number","integer","boolean","array"]},"format":{"type":"string"},"items":{"$ref":"#/definitions/primitivesItems"},"collectionFormat":{"$ref":"#/definitions/collectionFormat"},"default":{"$ref":"#/definitions/default"},"maximum":{"$ref":"#/definitions/maximum"},"exclusiveMaximum":{"$ref":"#/definitions/exclusiveMaximum"},"minimum":{"$ref":"#/definitions/minimum"},"exclusiveMinimum":{"$ref":"#/definitions/exclusiveMinimum"},"maxLength":{"$ref":"#/definitions/maxLength"},"minLength":{"$ref":"#/definitions/minLength"},"pattern":{"$ref":"#/definitions/pattern"},"maxItems":{"$ref":"#/definitions/maxItems"},"minItems":{"$ref":"#/definitions/minItems"},"uniqueItems":{"$ref":"#/definitions/uniqueItems"},"enum":{"$ref":"#/definitions/enum"},"multipleOf":{"$ref":"#/definitions/multipleOf"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"security":{"type":"array","items":{"$ref":"#/definitions/securityRequirement"},"uniqueItems":true},"securityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"xml":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"namespace":{"type":"string"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"securityDefinitions":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/basicAuthenticationSecurity"},{"$ref":"#/definitions/apiKeySecurity"},{"$ref":"#/definitions/oauth2ImplicitSecurity"},{"$ref":"#/definitions/oauth2PasswordSecurity"},{"$ref":"#/definitions/oauth2ApplicationSecurity"},{"$ref":"#/definitions/oauth2AccessCodeSecurity"}]}},"basicAuthenticationSecurity":{"type":"object","additionalProperties":false,"required":["type"],"properties":{"type":{"type":"string","enum":["basic"]},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"apiKeySecurity":{"type":"object","additionalProperties":false,"required":["type","name","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query"]},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2ImplicitSecurity":{"type":"object","additionalProperties":false,"required":["type","flow","authorizationUrl"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flow":{"type":"string","enum":["implicit"]},"scopes":{"$ref":"#/definitions/oauth2Scopes"},"authorizationUrl":{"type":"string","format":"uri"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2PasswordSecurity":{"type":"object","additionalProperties":false,"required":["type","flow","tokenUrl"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flow":{"type":"string","enum":["password"]},"scopes":{"$ref":"#/definitions/oauth2Scopes"},"tokenUrl":{"type":"string","format":"uri"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2ApplicationSecurity":{"type":"object","additionalProperties":false,"required":["type","flow","tokenUrl"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flow":{"type":"string","enum":["application"]},"scopes":{"$ref":"#/definitions/oauth2Scopes"},"tokenUrl":{"type":"string","format":"uri"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2AccessCodeSecurity":{"type":"object","additionalProperties":false,"required":["type","flow","authorizationUrl","tokenUrl"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flow":{"type":"string","enum":["accessCode"]},"scopes":{"$ref":"#/definitions/oauth2Scopes"},"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"description":{"type":"string"}},"patternProperties":{"^x-":{"$ref":"#/definitions/vendorExtension"}}},"oauth2Scopes":{"type":"object","additionalProperties":{"type":"string"}},"mediaTypeList":{"type":"array","items":{"$ref":"#/definitions/mimeType"},"uniqueItems":true},"parametersList":{"type":"array","description":"The parameters needed to send a valid API call.","additionalItems":false,"items":{"oneOf":[{"$ref":"#/definitions/parameter"},{"$ref":"#/definitions/jsonReference"}]},"uniqueItems":true},"schemesList":{"type":"array","description":"The transfer protocol of the API.","items":{"type":"string","enum":["http","https","ws","wss"]},"uniqueItems":true},"collectionFormat":{"type":"string","enum":["csv","ssv","tsv","pipes"],"default":"csv"},"collectionFormatWithMulti":{"type":"string","enum":["csv","ssv","tsv","pipes","multi"],"default":"csv"},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"multipleOf":{"$ref":"http://json-schema.org/draft-04/schema#/properties/multipleOf"},"maximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/maximum"},"exclusiveMaximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},"minimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/minimum"},"exclusiveMinimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},"maxLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"pattern":{"$ref":"http://json-schema.org/draft-04/schema#/properties/pattern"},"maxItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"uniqueItems":{"$ref":"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},"enum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/enum"},"jsonReference":{"type":"object","required":["$ref"],"additionalProperties":false,"properties":{"$ref":{"type":"string"}}}}')},Xs={id:"https://spec.openapis.org/oas/3.0/schema/2019-04-02",$schema:"http://json-schema.org/draft-04/schema#",description:"Validation schema for OpenAPI Specification 3.0.X.",type:"object",required:["openapi","info","paths"],properties:{openapi:{type:"string",pattern:"^3\\.0\\.\\d(-.+)?$"},info:{$ref:"#/definitions/Info"},externalDocs:{$ref:"#/definitions/ExternalDocumentation"},servers:{type:"array",items:{$ref:"#/definitions/Server"}},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},tags:{type:"array",items:{$ref:"#/definitions/Tag"},uniqueItems:!0},paths:{$ref:"#/definitions/Paths"},components:{$ref:"#/definitions/Components"}},patternProperties:{"^x-":{}},additionalProperties:!1,definitions:JSON.parse('{"Reference":{"type":"object","required":["$ref"],"patternProperties":{"^\\\\$ref$":{"type":"string","format":"uri-reference"}}},"Info":{"type":"object","required":["title","version"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"termsOfService":{"type":"string","format":"uri-reference"},"contact":{"$ref":"#/definitions/Contact"},"license":{"$ref":"#/definitions/License"},"version":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Contact":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"email":{"type":"string","format":"email"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"License":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Server":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"description":{"type":"string"},"variables":{"type":"object","additionalProperties":{"$ref":"#/definitions/ServerVariable"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ServerVariable":{"type":"object","required":["default"],"properties":{"enum":{"type":"array","items":{"type":"string"}},"default":{"type":"string"},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Components":{"type":"object","properties":{"schemas":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}}},"responses":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Response"}]}}},"parameters":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Parameter"}]}}},"examples":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Example"}]}}},"requestBodies":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/RequestBody"}]}}},"headers":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Header"}]}}},"securitySchemes":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}},"links":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Link"}]}}},"callbacks":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/Callback"}]}}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Schema":{"type":"object","properties":{"title":{"type":"string"},"multipleOf":{"type":"number","minimum":0,"exclusiveMinimum":true},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"type":"integer","minimum":0},"minLength":{"type":"integer","minimum":0,"default":0},"pattern":{"type":"string","format":"regex"},"maxItems":{"type":"integer","minimum":0},"minItems":{"type":"integer","minimum":0,"default":0},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"type":"integer","minimum":0},"minProperties":{"type":"integer","minimum":0,"default":0},"required":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true},"enum":{"type":"array","items":{},"minItems":1,"uniqueItems":false},"type":{"type":"string","enum":["array","boolean","integer","number","object","string"]},"not":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"allOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}},"oneOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}},"anyOf":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}},"items":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"properties":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]}},"additionalProperties":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"},{"type":"boolean"}],"default":true},"description":{"type":"string"},"format":{"type":"string"},"default":{},"nullable":{"type":"boolean","default":false},"discriminator":{"$ref":"#/definitions/Discriminator"},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"example":{},"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"},"deprecated":{"type":"boolean","default":false},"xml":{"$ref":"#/definitions/XML"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Discriminator":{"type":"object","required":["propertyName"],"properties":{"propertyName":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}}}},"XML":{"type":"object","properties":{"name":{"type":"string"},"namespace":{"type":"string","format":"uri"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Response":{"type":"object","required":["description"],"properties":{"description":{"type":"string"},"headers":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Header"},{"$ref":"#/definitions/Reference"}]}},"content":{"type":"object","additionalProperties":{"$ref":"#/definitions/MediaType"}},"links":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Link"},{"$ref":"#/definitions/Reference"}]}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"MediaType":{"type":"object","properties":{"schema":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"example":{},"examples":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Example"},{"$ref":"#/definitions/Reference"}]}},"encoding":{"type":"object","additionalProperties":{"$ref":"#/definitions/Encoding"}}},"patternProperties":{"^x-":{}},"additionalProperties":false,"allOf":[{"$ref":"#/definitions/ExampleXORExamples"}]},"Example":{"type":"object","properties":{"summary":{"type":"string"},"description":{"type":"string"},"value":{},"externalValue":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Header":{"type":"object","properties":{"description":{"type":"string"},"required":{"type":"boolean","default":false},"deprecated":{"type":"boolean","default":false},"allowEmptyValue":{"type":"boolean","default":false},"style":{"type":"string","enum":["simple"],"default":"simple"},"explode":{"type":"boolean"},"allowReserved":{"type":"boolean","default":false},"schema":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"content":{"type":"object","additionalProperties":{"$ref":"#/definitions/MediaType"},"minProperties":1,"maxProperties":1},"example":{},"examples":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Example"},{"$ref":"#/definitions/Reference"}]}}},"patternProperties":{"^x-":{}},"additionalProperties":false,"allOf":[{"$ref":"#/definitions/ExampleXORExamples"},{"$ref":"#/definitions/SchemaXORContent"}]},"Paths":{"type":"object","patternProperties":{"^\\\\/":{"$ref":"#/definitions/PathItem"},"^x-":{}},"additionalProperties":false},"PathItem":{"type":"object","properties":{"$ref":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"servers":{"type":"array","items":{"$ref":"#/definitions/Server"}},"parameters":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Parameter"},{"$ref":"#/definitions/Reference"}]},"uniqueItems":true}},"patternProperties":{"^(get|put|post|delete|options|head|patch|trace)$":{"$ref":"#/definitions/Operation"},"^x-":{}},"additionalProperties":false},"Operation":{"type":"object","required":["responses"],"properties":{"tags":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"},"operationId":{"type":"string"},"parameters":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Parameter"},{"$ref":"#/definitions/Reference"}]},"uniqueItems":true},"requestBody":{"oneOf":[{"$ref":"#/definitions/RequestBody"},{"$ref":"#/definitions/Reference"}]},"responses":{"$ref":"#/definitions/Responses"},"callbacks":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Callback"},{"$ref":"#/definitions/Reference"}]}},"deprecated":{"type":"boolean","default":false},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"servers":{"type":"array","items":{"$ref":"#/definitions/Server"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Responses":{"type":"object","properties":{"default":{"oneOf":[{"$ref":"#/definitions/Response"},{"$ref":"#/definitions/Reference"}]}},"patternProperties":{"^[1-5](?:\\\\d{2}|XX)$":{"oneOf":[{"$ref":"#/definitions/Response"},{"$ref":"#/definitions/Reference"}]},"^x-":{}},"minProperties":1,"additionalProperties":false},"SecurityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"Tag":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/ExternalDocumentation"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ExternalDocumentation":{"type":"object","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ExampleXORExamples":{"description":"Example and examples are mutually exclusive","not":{"required":["example","examples"]}},"SchemaXORContent":{"description":"Schema and content are mutually exclusive, at least one is required","not":{"required":["schema","content"]},"oneOf":[{"required":["schema"]},{"required":["content"],"description":"Some properties are not allowed if content is present","allOf":[{"not":{"required":["style"]}},{"not":{"required":["explode"]}},{"not":{"required":["allowReserved"]}},{"not":{"required":["example"]}},{"not":{"required":["examples"]}}]}]},"Parameter":{"type":"object","properties":{"name":{"type":"string"},"in":{"type":"string"},"description":{"type":"string"},"required":{"type":"boolean","default":false},"deprecated":{"type":"boolean","default":false},"allowEmptyValue":{"type":"boolean","default":false},"style":{"type":"string"},"explode":{"type":"boolean"},"allowReserved":{"type":"boolean","default":false},"schema":{"oneOf":[{"$ref":"#/definitions/Schema"},{"$ref":"#/definitions/Reference"}]},"content":{"type":"object","additionalProperties":{"$ref":"#/definitions/MediaType"},"minProperties":1,"maxProperties":1},"example":{},"examples":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/definitions/Example"},{"$ref":"#/definitions/Reference"}]}}},"patternProperties":{"^x-":{}},"additionalProperties":false,"required":["name","in"],"allOf":[{"$ref":"#/definitions/ExampleXORExamples"},{"$ref":"#/definitions/SchemaXORContent"},{"$ref":"#/definitions/ParameterLocation"}]},"ParameterLocation":{"description":"Parameter location","oneOf":[{"description":"Parameter in path","required":["required"],"properties":{"in":{"enum":["path"]},"style":{"enum":["matrix","label","simple"],"default":"simple"},"required":{"enum":[true]}}},{"description":"Parameter in query","properties":{"in":{"enum":["query"]},"style":{"enum":["form","spaceDelimited","pipeDelimited","deepObject"],"default":"form"}}},{"description":"Parameter in header","properties":{"in":{"enum":["header"]},"style":{"enum":["simple"],"default":"simple"}}},{"description":"Parameter in cookie","properties":{"in":{"enum":["cookie"]},"style":{"enum":["form"],"default":"form"}}}]},"RequestBody":{"type":"object","required":["content"],"properties":{"description":{"type":"string"},"content":{"type":"object","additionalProperties":{"$ref":"#/definitions/MediaType"}},"required":{"type":"boolean","default":false}},"patternProperties":{"^x-":{}},"additionalProperties":false},"SecurityScheme":{"oneOf":[{"$ref":"#/definitions/APIKeySecurityScheme"},{"$ref":"#/definitions/HTTPSecurityScheme"},{"$ref":"#/definitions/OAuth2SecurityScheme"},{"$ref":"#/definitions/OpenIdConnectSecurityScheme"}]},"APIKeySecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"HTTPSecurityScheme":{"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"bearerFormat":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-":{}},"additionalProperties":false,"oneOf":[{"description":"Bearer","properties":{"scheme":{"enum":["bearer"]}}},{"description":"Non Bearer","not":{"required":["bearerFormat"]},"properties":{"scheme":{"not":{"enum":["bearer"]}}}}]},"OAuth2SecurityScheme":{"type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"flows":{"$ref":"#/definitions/OAuthFlows"},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"OpenIdConnectSecurityScheme":{"type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"openIdConnectUrl":{"type":"string","format":"uri-reference"},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"OAuthFlows":{"type":"object","properties":{"implicit":{"$ref":"#/definitions/ImplicitOAuthFlow"},"password":{"$ref":"#/definitions/PasswordOAuthFlow"},"clientCredentials":{"$ref":"#/definitions/ClientCredentialsFlow"},"authorizationCode":{"$ref":"#/definitions/AuthorizationCodeOAuthFlow"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ImplicitOAuthFlow":{"type":"object","required":["authorizationUrl","scopes"],"properties":{"authorizationUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"type":"object","additionalProperties":{"type":"string"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"PasswordOAuthFlow":{"type":"object","required":["tokenUrl"],"properties":{"tokenUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"type":"object","additionalProperties":{"type":"string"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"ClientCredentialsFlow":{"type":"object","required":["tokenUrl"],"properties":{"tokenUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"type":"object","additionalProperties":{"type":"string"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"AuthorizationCodeOAuthFlow":{"type":"object","required":["authorizationUrl","tokenUrl"],"properties":{"authorizationUrl":{"type":"string","format":"uri-reference"},"tokenUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"type":"object","additionalProperties":{"type":"string"}}},"patternProperties":{"^x-":{}},"additionalProperties":false},"Link":{"type":"object","properties":{"operationId":{"type":"string"},"operationRef":{"type":"string","format":"uri-reference"},"parameters":{"type":"object","additionalProperties":{}},"requestBody":{},"description":{"type":"string"},"server":{"$ref":"#/definitions/Server"}},"patternProperties":{"^x-":{}},"additionalProperties":false,"not":{"description":"Operation Id and Operation Ref are mutually exclusive","required":["operationId","operationRef"]}},"Callback":{"type":"object","additionalProperties":{"$ref":"#/definitions/PathItem"},"patternProperties":{"^x-":{}}},"Encoding":{"type":"object","properties":{"contentType":{"type":"string"},"headers":{"type":"object","additionalProperties":{"$ref":"#/definitions/Header"}},"style":{"type":"string","enum":["form","spaceDelimited","pipeDelimited","deepObject"]},"explode":{"type":"boolean"},"allowReserved":{"type":"boolean","default":false}},"additionalProperties":false}}')},ei={$id:"https://spec.openapis.org/oas/3.1/schema/2021-04-15",$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:{openapi:{type:"string",pattern:"^3\\.1\\.\\d+(-.+)?$"},info:{$ref:"#/$defs/info"},jsonSchemaDialect:{$ref:"#/$defs/uri",default:"https://spec.openapis.org/oas/3.1/dialect/base"},servers:{type:"array",items:{$ref:"#/$defs/server"}},paths:{$ref:"#/$defs/paths"},webhooks:{type:"object",additionalProperties:{$ref:"#/$defs/path-item-or-reference"}},components:{$ref:"#/$defs/components"},security:{type:"array",items:{$ref:"#/$defs/security-requirement"}},tags:{type:"array",items:{$ref:"#/$defs/tag"}},externalDocs:{$ref:"#/$defs/external-documentation"}},required:["openapi","info"],anyOf:[{required:["paths"]},{required:["components"]},{required:["webhooks"]}],$ref:"#/$defs/specification-extensions",unevaluatedProperties:!1,$defs:JSON.parse('{"info":{"type":"object","properties":{"title":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"termsOfService":{"type":"string"},"contact":{"$ref":"#/$defs/contact"},"license":{"$ref":"#/$defs/license"},"version":{"type":"string"}},"required":["title","version"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"contact":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"email":{"type":"string"}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"license":{"type":"object","properties":{"name":{"type":"string"},"identifier":{"type":"string"},"url":{"$ref":"#/$defs/uri"}},"required":["name"],"oneOf":[{"required":["identifier"]},{"required":["url"]}],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"server":{"type":"object","properties":{"url":{"$ref":"#/$defs/uri"},"description":{"type":"string"},"variables":{"type":"object","additionalProperties":{"$ref":"#/$defs/server-variable"}}},"required":["url"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"server-variable":{"type":"object","properties":{"enum":{"type":"array","items":{"type":"string"},"minItems":1},"default":{"type":"string"},"descriptions":{"type":"string"}},"required":["default"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"components":{"type":"object","properties":{"schemas":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"}},"responses":{"type":"object","additionalProperties":{"$ref":"#/$defs/response-or-reference"}},"parameters":{"type":"object","additionalProperties":{"$ref":"#/$defs/parameter-or-reference"}},"examples":{"type":"object","additionalProperties":{"$ref":"#/$defs/example-or-reference"}},"requestBodies":{"type":"object","additionalProperties":{"$ref":"#/$defs/request-body-or-reference"}},"headers":{"type":"object","additionalProperties":{"$ref":"#/$defs/header-or-reference"}},"securitySchemes":{"type":"object","additionalProperties":{"$ref":"#/$defs/security-scheme-or-reference"}},"links":{"type":"object","additionalProperties":{"$ref":"#/$defs/link-or-reference"}},"callbacks":{"type":"object","additionalProperties":{"$ref":"#/$defs/callbacks-or-reference"}},"pathItems":{"type":"object","additionalProperties":{"$ref":"#/$defs/path-item-or-reference"}}},"patternProperties":{"^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$":{"$comment":"Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected","propertyNames":{"pattern":"^[a-zA-Z0-9._-]+$"}}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"paths":{"type":"object","patternProperties":{"^/":{"$ref":"#/$defs/path-item"}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"path-item":{"type":"object","properties":{"summary":{"type":"string"},"description":{"type":"string"},"servers":{"type":"array","items":{"$ref":"#/$defs/server"}},"parameters":{"type":"array","items":{"$ref":"#/$defs/parameter-or-reference"}}},"patternProperties":{"^(get|put|post|delete|options|head|patch|trace)$":{"$ref":"#/$defs/operation"}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"path-item-or-reference":{"if":{"required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/path-item"}},"operation":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/$defs/external-documentation"},"operationId":{"type":"string"},"parameters":{"type":"array","items":{"$ref":"#/$defs/parameter-or-reference"}},"requestBody":{"$ref":"#/$defs/request-body-or-reference"},"responses":{"$ref":"#/$defs/responses"},"callbacks":{"type":"object","additionalProperties":{"$ref":"#/$defs/callbacks-or-reference"}},"deprecated":{"default":false,"type":"boolean"},"security":{"type":"array","items":{"$ref":"#/$defs/security-requirement"}},"servers":{"type":"array","items":{"$ref":"#/$defs/server"}}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"external-documentation":{"type":"object","properties":{"description":{"type":"string"},"url":{"$ref":"#/$defs/uri"}},"required":["url"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"parameter":{"type":"object","properties":{"name":{"type":"string"},"in":{"enum":["query","header","path","cookie"]},"description":{"type":"string"},"required":{"default":false,"type":"boolean"},"deprecated":{"default":false,"type":"boolean"},"allowEmptyValue":{"default":false,"type":"boolean"},"schema":{"$dynamicRef":"#meta"},"content":{"$ref":"#/$defs/content"}},"required":["in"],"oneOf":[{"required":["schema"]},{"required":["content"]}],"dependentSchemas":{"schema":{"properties":{"style":{"type":"string"},"explode":{"type":"boolean"},"allowReserved":{"default":false,"type":"boolean"}},"allOf":[{"$ref":"#/$defs/examples"},{"$ref":"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path"},{"$ref":"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header"},{"$ref":"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query"},{"$ref":"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie"},{"$ref":"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-form"}],"$defs":{"styles-for-path":{"if":{"properties":{"in":{"const":"path"}},"required":["in"]},"then":{"properties":{"style":{"default":"simple","enum":["matrix","label","simple"]},"required":{"const":true}},"required":["required"]}},"styles-for-header":{"if":{"properties":{"in":{"const":"header"}},"required":["in"]},"then":{"properties":{"style":{"default":"simple","enum":["simple"]}}}},"styles-for-query":{"if":{"properties":{"in":{"const":"query"}},"required":["in"]},"then":{"properties":{"style":{"default":"form","enum":["form","spaceDelimited","pipeDelimited","deepObject"]}}}},"styles-for-cookie":{"if":{"properties":{"in":{"const":"cookie"}},"required":["in"]},"then":{"properties":{"style":{"default":"form","enum":["form"]}}}},"styles-for-form":{"if":{"properties":{"style":{"const":"form"}},"required":["style"]},"then":{"properties":{"explode":{"default":true}}},"else":{"properties":{"explode":{"default":false}}}}}}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"parameter-or-reference":{"if":{"required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/parameter"}},"request-body":{"type":"object","properties":{"description":{"type":"string"},"content":{"$ref":"#/$defs/content"},"required":{"default":false,"type":"boolean"}},"required":["content"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"request-body-or-reference":{"if":{"required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/request-body"}},"content":{"type":"object","additionalProperties":{"$ref":"#/$defs/media-type"},"propertyNames":{"format":"media-range"}},"media-type":{"type":"object","properties":{"schema":{"$dynamicRef":"#meta"},"encoding":{"type":"object","additionalProperties":{"$ref":"#/$defs/encoding"}}},"allOf":[{"$ref":"#/$defs/specification-extensions"},{"$ref":"#/$defs/examples"}],"unevaluatedProperties":false},"encoding":{"type":"object","properties":{"contentType":{"type":"string","format":"media-range"},"headers":{"type":"object","additionalProperties":{"$ref":"#/$defs/header-or-reference"}},"style":{"default":"form","enum":["form","spaceDelimited","pipeDelimited","deepObject"]},"explode":{"type":"boolean"},"allowReserved":{"default":false,"type":"boolean"}},"allOf":[{"$ref":"#/$defs/specification-extensions"},{"$ref":"#/$defs/encoding/$defs/explode-default"}],"unevaluatedProperties":false,"$defs":{"explode-default":{"if":{"properties":{"style":{"const":"form"}},"required":["style"]},"then":{"properties":{"explode":{"default":true}}},"else":{"properties":{"explode":{"default":false}}}}}},"responses":{"type":"object","properties":{"default":{"$ref":"#/$defs/response-or-reference"}},"patternProperties":{"^[1-5][0-9X]{2}$":{"$ref":"#/$defs/response-or-reference"}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"response":{"type":"object","properties":{"description":{"type":"string"},"headers":{"type":"object","additionalProperties":{"$ref":"#/$defs/header-or-reference"}},"content":{"$ref":"#/$defs/content"},"links":{"type":"object","additionalProperties":{"$ref":"#/$defs/link-or-reference"}}},"required":["description"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"response-or-reference":{"if":{"required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/response"}},"callbacks":{"type":"object","$ref":"#/$defs/specification-extensions","additionalProperties":{"$ref":"#/$defs/path-item-or-reference"}},"callbacks-or-reference":{"if":{"required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/callbacks"}},"example":{"type":"object","properties":{"summary":{"type":"string"},"description":{"type":"string"},"value":true,"externalValue":{"$ref":"#/$defs/uri"}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"example-or-reference":{"if":{"required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/example"}},"link":{"type":"object","properties":{"operationRef":{"$ref":"#/$defs/uri"},"operationId":true,"parameters":{"$ref":"#/$defs/map-of-strings"},"requestBody":true,"description":{"type":"string"},"body":{"$ref":"#/$defs/server"}},"oneOf":[{"required":["operationRef"]},{"required":["operationId"]}],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"link-or-reference":{"if":{"required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/link"}},"header":{"type":"object","properties":{"description":{"type":"string"},"required":{"default":false,"type":"boolean"},"deprecated":{"default":false,"type":"boolean"},"allowEmptyValue":{"default":false,"type":"boolean"}},"dependentSchemas":{"schema":{"properties":{"style":{"default":"simple","enum":["simple"]},"explode":{"default":false,"type":"boolean"},"allowReserved":{"default":false,"type":"boolean"},"schema":{"$dynamicRef":"#meta"}},"$ref":"#/$defs/examples"},"content":{"properties":{"content":{"$ref":"#/$defs/content"}}}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"header-or-reference":{"if":{"required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/header"}},"tag":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/$defs/external-documentation"}},"required":["name"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"reference":{"type":"object","properties":{"$ref":{"$ref":"#/$defs/uri"},"summary":{"type":"string"},"description":{"type":"string"}},"unevaluatedProperties":false},"schema":{"$dynamicAnchor":"meta","type":["object","boolean"]},"security-scheme":{"type":"object","properties":{"type":{"enum":["apiKey","http","mutualTLS","oauth2","openIdConnect"]},"description":{"type":"string"}},"required":["type"],"allOf":[{"$ref":"#/$defs/specification-extensions"},{"$ref":"#/$defs/security-scheme/$defs/type-apikey"},{"$ref":"#/$defs/security-scheme/$defs/type-http"},{"$ref":"#/$defs/security-scheme/$defs/type-http-bearer"},{"$ref":"#/$defs/security-scheme/$defs/type-oauth2"},{"$ref":"#/$defs/security-scheme/$defs/type-oidc"}],"unevaluatedProperties":false,"$defs":{"type-apikey":{"if":{"properties":{"type":{"const":"apiKey"}},"required":["type"]},"then":{"properties":{"name":{"type":"string"},"in":{"enum":["query","header","cookie"]}},"required":["name","in"]}},"type-http":{"if":{"properties":{"type":{"const":"http"}},"required":["type"]},"then":{"properties":{"scheme":{"type":"string"}},"required":["scheme"]}},"type-http-bearer":{"if":{"properties":{"type":{"const":"http"},"scheme":{"const":"bearer"}},"required":["type","scheme"]},"then":{"properties":{"bearerFormat":{"type":"string"}},"required":["scheme"]}},"type-oauth2":{"if":{"properties":{"type":{"const":"oauth2"}},"required":["type"]},"then":{"properties":{"flows":{"$ref":"#/$defs/oauth-flows"}},"required":["flows"]}},"type-oidc":{"if":{"properties":{"type":{"const":"openIdConnect"}},"required":["type"]},"then":{"properties":{"openIdConnectUrl":{"$ref":"#/$defs/uri"}},"required":["openIdConnectUrl"]}}}},"security-scheme-or-reference":{"if":{"required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/security-scheme"}},"oauth-flows":{"type":"object","properties":{"implicit":{"$ref":"#/$defs/oauth-flows/$defs/implicit"},"password":{"$ref":"#/$defs/oauth-flows/$defs/password"},"clientCredentials":{"$ref":"#/$defs/oauth-flows/$defs/client-credentials"},"authorizationCode":{"$ref":"#/$defs/oauth-flows/$defs/authorization-code"}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false,"$defs":{"implicit":{"type":"object","properties":{"authorizationUrl":{"type":"string"},"refreshUrl":{"type":"string"},"scopes":{"$ref":"#/$defs/map-of-strings"}},"required":["authorizationUrl","scopes"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"password":{"type":"object","properties":{"tokenUrl":{"type":"string"},"refreshUrl":{"type":"string"},"scopes":{"$ref":"#/$defs/map-of-strings"}},"required":["tokenUrl","scopes"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"client-credentials":{"type":"object","properties":{"tokenUrl":{"type":"string"},"refreshUrl":{"type":"string"},"scopes":{"$ref":"#/$defs/map-of-strings"}},"required":["tokenUrl","scopes"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"authorization-code":{"type":"object","properties":{"authorizationUrl":{"type":"string"},"tokenUrl":{"type":"string"},"refreshUrl":{"type":"string"},"scopes":{"$ref":"#/$defs/map-of-strings"}},"required":["authorizationUrl","tokenUrl","scopes"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false}}},"security-requirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"specification-extensions":{"patternProperties":{"^x-":true}},"examples":{"properties":{"example":true,"examples":{"type":"object","additionalProperties":{"$ref":"#/$defs/example-or-reference"}}}},"uri":{"type":"string","format":"uri"},"map-of-strings":{"type":"object","additionalProperties":{"type":"string"}}}')};var ti,ri,ni,oi,si,ii,ai;function li(){if(ni)return ri;ni=1;const e=Le(),{ono:t}=nt,r=(No||(No=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=Pr(),n=jo(),o=Io(),s=Ro,i=["/properties"],a="http://json-schema.org/draft-04/schema";class l extends r.default{constructor(e={}){super({...e,schemaId:"id"})}_addVocabularies(){super._addVocabularies(),n.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(s,i):s;this.addMetaSchema(e,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.exports=t=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var c=Pr();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var d=Pr();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}})}(st,st.exports)),st.exports),n=Ks(),{openapi:o}=(ti||(ti=1,s=Zs,i=Zs.exports,Object.defineProperty(i,"__esModule",{value:!0}),i.openapi=i.openapiV31=i.openapiV3=i.openapiV2=i.openapiV1=void 0,i.openapiV1=Ys,i.openapiV2=Qs,i.openapiV3=Xs,i.openapiV31=ei,i.openapi={v1:i.openapiV1,v2:i.openapiV2,v3:i.openapiV3,v31:i.openapiV31},i.default=i.openapi,s.exports=Object.assign(s.exports.default,s.exports)),Zs.exports);var s,i;function a(e=!0){const t={allErrors:!0,strict:!1,validateFormats:!1};return e?new r(t):new n(t)}return ri=function(r){let n,s;if(r.swagger)s=o.v2,n=a();else if(r.openapi.startsWith("3.1")){s=o.v31;const e=s.$defs.schema;delete e.$dynamicAnchor,s.$defs.components.properties.schemas.additionalProperties=e,s.$defs.header.dependentSchemas.schema.properties.schema=e,s.$defs["media-type"].properties.schema=e,s.$defs.parameter.properties.schema=e,n=a(!1)}else s=o.v3,n=a();if(!n.validate(s,r)){let r=n.errors,o="Swagger schema validation failed.\n"+function(t,r){r=r||" ";let n="";for(let o of t)n+=e.format(`${r}#${o.instancePath.length?o.instancePath:"/"} ${o.message}\n`);return n}(r);throw t.syntax(r,{details:r},o)}}}function ci(){if(ai)return ii;ai=1;const e=Le(),{ono:t}=nt,r=si?oi:(si=1,oi=["get","put","post","delete","options","head","patch"]),n=["array","boolean","integer","number","string"],o=["array","boolean","integer","number","string","object","null",void 0];function s(e,n,o,s){for(let a of r){let r=n[a],c=o+"/"+a;if(r){let a=r.operationId;if(a){if(-1!==s.indexOf(a))throw t.syntax(`Validation failed. Duplicate operation id '${a}'`);s.push(a)}i(e,n,o,r,c);let d=Object.keys(r.responses||{});for(let e of d){l(e,r.responses[e]||{},c+"/responses/"+e)}}}}function i(r,s,i,l,p){let u=s.parameters||[],h=l.parameters||[];try{a(u)}catch(m){throw t.syntax(m,`Validation failed. ${i} has duplicate parameters`)}try{a(h)}catch(m){throw t.syntax(m,`Validation failed. ${p} has duplicate parameters`)}let f=u.reduce((e,t)=>(e.some(e=>e.in===t.in&&e.name===t.name)||e.push(t),e),h.slice());!function(e,r){let n=e.filter(e=>"body"===e.in),o=e.filter(e=>"formData"===e.in);if(n.length>1)throw t.syntax(`Validation failed. ${r} has ${n.length} body parameters. Only one is allowed.`);if(n.length>0&&o.length>0)throw t.syntax(`Validation failed. ${r} has body parameters and formData parameters. Only one or the other is allowed.`)}(f,p),function(r,n,o){let s=n.match(e.swaggerParamRegExp)||[];for(let e=0;e<s.length;e++)for(let r=e+1;r<s.length;r++)if(s[e]===s[r])throw t.syntax(`Validation failed. ${o} has multiple path placeholders named ${s[e]}`);r=r.filter(e=>"path"===e.in);for(let e of r){if(!0!==e.required)throw t.syntax(`Validation failed. Path parameters cannot be optional. Set required=true for the "${e.name}" parameter at ${o}`);let r=s.indexOf("{"+e.name+"}");if(-1===r)throw t.syntax(`Validation failed. ${o} has a path parameter named "${e.name}", but there is no corresponding {${e.name}} in the path string`);s.splice(r,1)}if(s.length>0)throw t.syntax(`Validation failed. ${o} is missing path parameter(s) for ${s}`)}(f,i,p),function(e,r,s,i){for(let a of e){let e,l,p=i+"/parameters/"+a.name;switch(a.in){case"body":e=a.schema,l=o;break;case"formData":e=a,l=n.concat("file");break;default:e=a,l=n}if(c(e,p,l),d(e,p),"file"===e.type){let e=/multipart\/(.*\+)?form-data/,n=/application\/(.*\+)?x-www-form-urlencoded/;if(!(s.consumes||r.consumes||[]).some(t=>e.test(t)||n.test(t)))throw t.syntax(`Validation failed. ${i} has a file parameter, so it must consume multipart/form-data or application/x-www-form-urlencoded`)}}}(f,r,l,p)}function a(e){for(let r=0;r<e.length-1;r++){let n=e[r];for(let o=r+1;o<e.length;o++){let r=e[o];if(n.name===r.name&&n.in===r.in)throw t.syntax(`Validation failed. Found multiple ${n.in} parameters named "${n.name}"`)}}}function l(e,r,s){if("default"!==e&&(e<100||e>599))throw t.syntax(`Validation failed. ${s} has an invalid response code (${e})`);let i=Object.keys(r.headers||{});for(let t of i){c(r.headers[t],s+"/headers/"+t,n)}if(r.schema){let e=o.concat("file");if(-1===e.indexOf(r.schema.type))throw t.syntax(`Validation failed. ${s} has an invalid response schema type (${r.schema.type})`);c(r.schema,s+"/schema",e)}}function c(e,r,n){if(-1===n.indexOf(e.type))throw t.syntax(`Validation failed. ${r} has an invalid type (${e.type})`);if("array"===e.type&&!e.items)throw t.syntax(`Validation failed. ${r} is an array, so it must include an "items" schema`)}function d(e,r){if((!Array.isArray(e.type)||e.type.includes("object"))&&(Array.isArray(e.type)||"object"===e.type)&&e.required&&Array.isArray(e.required)){let n={};!function e(t,r){if(t.properties)for(let n in t.properties)t.properties.hasOwnProperty(n)&&(r[n]=t.properties[n]);if(t.allOf)for(let n of t.allOf)e(n,r)}(e,n);for(let o of e.required)if(!n[o])throw t.syntax(`Validation failed. Property '${o}' listed as required but does not exist in '${r}'`)}}return ii=function(e){if(e.openapi)return;let t=Object.keys(e.paths||{}),r=[];for(let o of t){let t=e.paths[o],n="/paths"+o;t&&0===o.indexOf("/")&&s(e,t,n,r)}let n=Object.keys(e.definitions||{});for(let o of n){d(e.definitions[o],"/definitions/"+o)}}}var di={},pi={},ui={},hi={},fi={},mi={};function gi(...e){return e.reduce((e,t)=>t.startsWith("/")||t.match(/^https?:\/\//)?t:e.replace(/\/?$/,"/")+t,"")}function yi(...e){return e.filter(Boolean).join("/").replace(/\/+/g,"/")}function vi(e){const t=e.lastIndexOf("/");return t>=0?e.substring(0,t):"."}function bi(e,t){const r=e.split("/").pop()??e;return t&&r.endsWith(t)?r.slice(0,-t.length):r}function $i(e){const t=bi(e),r=t.lastIndexOf(".");return r>0?t.substring(r):""}function xi(e){return e.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(e)||/^https?:\/\//.test(e)}const wi={resolve:gi,join:yi,dirname:vi,basename:bi,extname:$i,isAbsolute:xi,sep:"/"},_i={resolve:gi,join:yi,dirname:vi,basename:bi,extname:$i,isAbsolute:xi,posix:wi,sep:"/"},ki=i(Object.freeze(Object.defineProperty({__proto__:null,basename:bi,default:_i,dirname:vi,extname:$i,isAbsolute:xi,join:yi,posix:wi,resolve:gi,sep:"/"},Symbol.toStringTag,{value:"Module"})));var Si;function Oi(){if(Si)return mi;Si=1;var e=mi&&mi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mi,"__esModule",{value:!0}),mi.default=function(e){var r,n,o,s;if(e.startsWith("\\\\?\\"))return e;return e.split(null==(n=null==(r=t.default)?void 0:r.win32)?void 0:n.sep).join((null==(s=null==(o=t.default)?void 0:o.posix)?void 0:s.sep)??"/")};const t=e(ki);return mi}var ji,Pi,Ei={};function Ti(){if(Pi)return fi;Pi=1;var e=fi&&fi.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=fi&&fi.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=fi&&fi.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n},n=fi&&fi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fi,"__esModule",{value:!0}),fi.parse=void 0,fi.resolve=f,fi.cwd=m,fi.getProtocol=g,fi.getExtension=function(e){const t=e.lastIndexOf(".");if(t>=0)return y(e.substr(t).toLowerCase());return""},fi.stripQuery=y,fi.getHash=v,fi.stripHash=b,fi.isHttp=function(e){const t=g(e);return"http"===t||"https"===t||void 0===t&&"undefined"!=typeof window},fi.isFileSystemPath=$,fi.fromFileSystemPath=function(e){var t;if((0,p.isWindows)()){const r=m(),n=e.toUpperCase(),i=(0,o.default)(r).toUpperCase(),a=n.includes(i),l=n.includes(i),c=(null==(t=s.win32)?void 0:t.isAbsolute(e))||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://");a||l||c||r.startsWith("http")||(e=(0,d.join)(r,e)),e=(0,o.default)(e)}e=encodeURI(e);for(const r of u)e=e.replace(r[0],r[1]);return e},fi.toFileSystemPath=function(e,t){e=decodeURI(e);for(let n=0;n<h.length;n+=2)e=e.replace(h[n],h[n+1]);let r="file://"===e.substr(0,7).toLowerCase();r&&(e="/"===e[7]?e.substr(8):e.substr(7),(0,p.isWindows)()&&"/"===e[1]&&(e=e[0]+":"+e.substr(1)),t?e="file:///"+e:(r=!1,e=(0,p.isWindows)()?e:"/"+e));(0,p.isWindows)()&&!r&&":\\"===(e=e.replace(i,"\\")).substr(1,2)&&(e=e[0].toUpperCase()+e.substr(1));return e},fi.safePointerToPath=function(e){if(e.length<=1||"#"!==e[0]||"/"!==e[1])return[];return e.slice(2).split("/").map(e=>decodeURIComponent(e).replace(l,"/").replace(c,"~"))},fi.relative=function(e,t){if(!$(e)||!$(t))return f(e,t);const r=s.default.dirname(b(e)),n=b(t);return s.default.relative(r,n)+v(t)};const o=n(Oi()),s=r(ki),i=/\//g,a=/^(\w{2,}):\/\//i,l=/~1/g,c=/~0/g,d=ki,p=function(){if(ji)return Ei;ji=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.isWindows=void 0;const e=/^win/.test(globalThis.process?globalThis.process.platform:"");return Ei.isWindows=()=>e,Ei}(),u=[[/\?/g,"%3F"],[/#/g,"%23"]],h=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"];function f(e,t){var r;const n=new URL((0,o.default)(e),"resolve://"),s=new URL((0,o.default)(t),n),i=(null==(r=t.match(/(\s*)$/))?void 0:r[1])||"";if("resolve:"===s.protocol){const{pathname:e,search:t,hash:r}=s;return e+t+r+i}return s.toString()+i}function m(){if("undefined"!=typeof window)return location.href;const e=process.cwd(),t=e.slice(-1);return"/"===t||"\\"===t?e:e+"/"}function g(e){const t=a.exec(e||"");if(t)return t[1].toLowerCase()}function y(e){const t=e.indexOf("?");return t>=0&&(e=e.substr(0,t)),e}function v(e){if(!e)return"#";const t=e.indexOf("#");return t>=0?e.substring(t):"#"}function b(e){if(!e)return"";const t=e.indexOf("#");return t>=0&&(e=e.substring(0,t)),e}function $(e){if("undefined"!=typeof window||"undefined"!=typeof process&&process.browser)return!1;const t=g(e);return void 0===t||"file"===t}return fi.parse=e=>new URL(e),fi}var Ai,Ci,Ii,Ri,Ni={};function Mi(){if(Ai)return Ni;Ai=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.InvalidPointerError=Ni.TimeoutError=Ni.MissingPointerError=Ni.UnmatchedResolverError=Ni.ResolverError=Ni.UnmatchedParserError=Ni.ParserError=Ni.JSONParserErrorGroup=Ni.JSONParserError=void 0,Ni.isHandledError=function(e){return e instanceof r||e instanceof n},Ni.normalizeError=function(e){null===e.path&&(e.path=[]);return e};const e=nt,t=Ti();class r extends Error{constructor(t,r){super(),this.code="EUNKNOWN",this.name="JSONParserError",this.message=t,this.source=r,this.path=null,e.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}}Ni.JSONParserError=r;class n extends Error{constructor(r){super(),this.files=r,this.name="JSONParserErrorGroup",this.message=`${this.errors.length} error${this.errors.length>1?"s":""} occurred while reading '${(0,t.toFileSystemPath)(r.$refs._root$Ref.path)}'`,e.Ono.extend(this)}static getParserErrors(e){const t=[];for(const r of Object.values(e.$refs._$refs))r.errors&&t.push(...r.errors);return t}get errors(){return n.getParserErrors(this.files)}}Ni.JSONParserErrorGroup=n;Ni.ParserError=class extends r{constructor(e,t){super(`Error parsing ${t}: ${e}`,t),this.code="EPARSER",this.name="ParserError"}};Ni.UnmatchedParserError=class extends r{constructor(e){super(`Could not find parser for "${e}"`,e),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}};Ni.ResolverError=class extends r{constructor(e,t){super(e.message||`Error reading file "${t}"`,t),this.code="ERESOLVER",this.name="ResolverError","code"in e&&(this.ioErrorCode=String(e.code))}};Ni.UnmatchedResolverError=class extends r{constructor(e){super(`Could not find resolver for "${e}"`,e),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}};Ni.MissingPointerError=class extends r{constructor(e,r){super(`Token "${e}" does not exist.`,(0,t.stripHash)(r)),this.code="EUNMATCHEDRESOLVER",this.name="MissingPointerError"}};Ni.TimeoutError=class extends r{constructor(e){super(`Dereferencing timeout reached: ${e}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}};return Ni.InvalidPointerError=class extends r{constructor(e,r){super(`Invalid $ref pointer "${e}". Pointers must begin with "#/"`,(0,t.stripHash)(r)),this.code="EUNMATCHEDRESOLVER",this.name="InvalidPointerError"}},Ni}function qi(){if(Ci)return hi;Ci=1;var e=hi&&hi.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=hi&&hi.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=hi&&hi.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n},n=hi&&hi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hi,"__esModule",{value:!0});const o=n(zi()),s=r(Ti()),i=Mi(),a=/\//g,l=/~/g,c=/~1/g,d=/~0/g,p=e=>{try{return decodeURIComponent(e)}catch{return e}};class u{constructor(e,t,r){this.$ref=e,this.path=t,this.originalPath=r||t,this.value=void 0,this.circular=!1,this.indirections=0}resolve(e,t,r){const n=u.parse(this.path,this.originalPath);this.value=m(e);for(let o=0;o<n.length;o++){if(h(this,t,r)&&(this.path=u.join(this.path,n.slice(o))),"object"==typeof this.value&&null!==this.value&&!g(r)&&"$ref"in this.value)return this;const e=n[o];if(void 0===this.value[e]||null===this.value[e]&&o===n.length-1){let t=!1;for(let e=n.length-1;e>o;e--){const r=n.slice(o,e+1).join("/");if(void 0!==this.value[r]){this.value=this.value[r],o=e,t=!0;break}}if(t)continue;throw this.value=null,new i.MissingPointerError(e,decodeURI(this.originalPath))}this.value=this.value[e]}return(!this.value||this.value.$ref&&s.resolve(this.path,this.value.$ref)!==r)&&h(this,t,r),this}set(e,t,r){const n=u.parse(this.path);let o;if(0===n.length)return this.value=t,t;this.value=m(e);for(let s=0;s<n.length-1;s++)h(this,r),o=n[s],this.value&&void 0!==this.value[o]?this.value=this.value[o]:this.value=f(this,o,{});return h(this,r),o=n[n.length-1],f(this,o,t),e}static parse(e,t){const r=s.getHash(e).substring(1);if(!r)return[];const n=r.split("/");for(let o=0;o<n.length;o++)n[o]=p(n[o].replace(c,"/").replace(d,"~"));if(""!==n[0])throw new i.InvalidPointerError(n,void 0===t?e:t);return n.slice(1)}static join(e,t){-1===e.indexOf("#")&&(e+="#"),t=Array.isArray(t)?t:[t];for(let r=0;r<t.length;r++){const n=t[r];e+="/"+encodeURIComponent(n.replace(l,"~0").replace(a,"~1"))}return e}}function h(e,t,r){if(o.default.isAllowed$Ref(e.value,t)){const n=s.resolve(e.path,e.value.$ref);if(n!==e.path||g(r)){const r=e.$ref.$refs._resolve(n,e.path,t);return null!==r&&(e.indirections+=r.indirections+1,o.default.isExtended$Ref(e.value)?(e.value=o.default.dereference(e.value,r.value),!1):(e.$ref=r.$ref,e.path=r.path,e.value=r.value,!0))}e.circular=!0}}function f(e,t,r){if(!e.value||"object"!=typeof e.value)throw new i.JSONParserError(`Error assigning $ref pointer "${e.path}". \nCannot set "${t}" of a non-object.`);return"-"===t&&Array.isArray(e.value)?e.value.push(r):e.value[t]=r,r}function m(e){if((0,i.isHandledError)(e))throw e;return e}function g(e){return"string"==typeof e&&0==u.parse(e).length}return hi.default=u,hi}function zi(){if(Ii)return ui;Ii=1;var e=ui&&ui.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ui,"__esModule",{value:!0});const t=e(qi()),r=Mi(),n=Ti();class o{constructor(e){this.errors=[],this.$refs=e}addError(e){void 0===this.errors&&(this.errors=[]);const t=this.errors.map(({footprint:e})=>e);"errors"in e&&Array.isArray(e.errors)?this.errors.push(...e.errors.map(r.normalizeError).filter(({footprint:e})=>!t.includes(e))):"footprint"in e&&t.includes(e.footprint)||this.errors.push((0,r.normalizeError)(e))}exists(e,t){try{return this.resolve(e,t),!0}catch{return!1}}get(e,t){var r;return null==(r=this.resolve(e,t))?void 0:r.value}resolve(e,o,s,i){const a=new t.default(this,e,s);try{return a.resolve(this.value,o,i)}catch(l){if(!o||!o.continueOnError||!(0,r.isHandledError)(l))throw l;return null===l.path&&(l.path=(0,n.safePointerToPath)((0,n.getHash)(i))),l instanceof r.InvalidPointerError&&(l.source=decodeURI((0,n.stripHash)(i))),this.addError(l),null}}set(e,r){const n=new t.default(this,e);this.value=n.set(this.value,r)}static is$Ref(e){return Boolean(e)&&"object"==typeof e&&null!==e&&"$ref"in e&&"string"==typeof e.$ref&&e.$ref.length>0}static isExternal$Ref(e){return o.is$Ref(e)&&"#"!==e.$ref[0]}static isAllowed$Ref(e,t){var r;if(this.is$Ref(e)){if("#/"===e.$ref.substring(0,2)||"#"===e.$ref)return!0;if("#"!==e.$ref[0]&&(!t||(null==(r=t.resolve)?void 0:r.external)))return!0}}static isExtended$Ref(e){return o.is$Ref(e)&&Object.keys(e).length>1}static dereference(e,t){if(t&&"object"==typeof t&&o.isExtended$Ref(e)){const r={};for(const t of Object.keys(e))"$ref"!==t&&(r[t]=e[t]);for(const e of Object.keys(t))e in r||(r[e]=t[e]);return r}return t}}return ui.default=o,ui}var Li,Ui,Di={},Bi={};function Hi(){if(Ui)return Di;Ui=1;var e=Di&&Di.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=Di&&Di.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Di&&Di.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n};Object.defineProperty(Di,"__esModule",{value:!0});const n=nt,o=r(Ti()),s=r(function(){if(Li)return Bi;function e(e,t,r,n,o){const s=e[t];if("function"==typeof s)return s.apply(e,[r,n,o]);if(!n){if(s instanceof RegExp)return s.test(r.url);if("string"==typeof s)return s===r.extension;if(Array.isArray(s))return-1!==s.indexOf(r.extension)}return s}return Li=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.all=function(e){return Object.keys(e||{}).filter(t=>"object"==typeof e[t]).map(t=>(e[t].name=t,e[t]))},Bi.filter=function(t,r,n){return t.filter(t=>!!e(t,r,n))},Bi.sort=function(e){for(const t of e)t.order=t.order||Number.MAX_SAFE_INTEGER;return e.sort((e,t)=>e.order-t.order)},Bi.run=async function(t,r,n,o){let s,i,a=0;return new Promise((l,c)=>{function d(){if(s=t[a++],!s)return c(i);try{const i=e(s,r,n,p,o);if(i&&"function"==typeof i.then)i.then(u,h);else if(void 0!==i)u(i);else if(a===t.length)throw new Error("No promise has been returned or callback has been called.")}catch(l){h(l)}}function p(e,t){e?h(e):u(t)}function u(e){l({plugin:s,result:e})}function h(e){i={plugin:s,error:e},d()}d()})},Bi}()),i=Mi();return Di.default=async function(e,t,r){const a=e.indexOf("#");let l="";a>=0&&(l=e.substring(a),e=e.substring(0,a));const c=t._add(e),d={url:e,hash:l,extension:o.getExtension(e)};try{const e=await async function(e,t,r){let o=s.all(t.resolve);o=s.filter(o,"canRead",e),s.sort(o);try{return await s.run(o,"read",e,r)}catch(a){throw!a&&t.continueOnError?new i.UnmatchedResolverError(e.url):a&&"error"in a?a.error instanceof i.ResolverError?a.error:new i.ResolverError(a,e.url):n.ono.syntax(`Unable to resolve $ref pointer "${e.url}"`)}}(d,r,t);c.pathType=e.plugin.name,d.data=e.result;const o=await async function(e,t,r){const o=s.all(t.parse),a=s.filter(o,"canParse",e),l=a.length>0?a:o;s.sort(l);try{const t=await s.run(l,"parse",e,r);if(!t.plugin.allowEmpty&&(void 0===(c=t.result)||"object"==typeof c&&0===Object.keys(c).length||"string"==typeof c&&0===c.trim().length||Buffer.isBuffer(c)&&0===c.length))throw n.ono.syntax(`Error parsing "${e.url}" as ${t.plugin.name}. \nParsed value is empty`);return t}catch(d){throw!d&&t.continueOnError?new i.UnmatchedParserError(e.url):d&&d.message&&d.message.startsWith("Error parsing")?d:d&&"error"in d?d.error instanceof i.ParserError?d.error:new i.ParserError(d.error.message,e.url):n.ono.syntax(`Unable to parse ${e.url}`)}var c}(d,r,t);return c.value=o.result,o.result}catch(p){throw(0,i.isHandledError)(p)&&(c.value=p),p}},Di}var Fi,Vi={},Gi={},Ji={};var Wi,Ki,Zi,Yi,Qi,Xi,ea,ta,ra,na,oa,sa,ia,aa,la,ca,da,pa,ua,ha,fa,ma,ga,ya,va,ba,$a,xa,wa,_a,ka,Sa,Oa,ja,Pa,Ea,Ta,Aa,Ca,Ia,Ra,Na,Ma,qa,za={},La={},Ua={},Da={};function Ba(){if(Wi)return Da;function e(e){return null==e}return Wi=1,Da.isNothing=e,Da.isObject=function(e){return"object"==typeof e&&null!==e},Da.toArray=function(t){return Array.isArray(t)?t:e(t)?[]:[t]},Da.repeat=function(e,t){var r,n="";for(r=0;r<t;r+=1)n+=e;return n},Da.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},Da.extend=function(e,t){var r,n,o,s;if(t)for(r=0,n=(s=Object.keys(t)).length;r<n;r+=1)e[o=s[r]]=t[o];return e},Da}function Ha(){if(Zi)return Ki;function e(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+="\n\n"+e.mark.snippet),n+" "+r):n}function t(t,r){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=r,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}return Zi=1,t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=function(t){return this.name+": "+e(this,t)},Ki=t}function Fa(){if(ea)return Xi;ea=1;var e=Ha(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];return Xi=function(n,o){var s,i;if(o=o||{},Object.keys(o).forEach(function(r){if(-1===t.indexOf(r))throw new e('Unknown option "'+r+'" is met in definition of "'+n+'" YAML type.')}),this.options=o,this.tag=n,this.kind=o.kind||null,this.resolve=o.resolve||function(){return!0},this.construct=o.construct||function(e){return e},this.instanceOf=o.instanceOf||null,this.predicate=o.predicate||null,this.represent=o.represent||null,this.representName=o.representName||null,this.defaultStyle=o.defaultStyle||null,this.multi=o.multi||!1,this.styleAliases=(s=o.styleAliases||null,i={},null!==s&&Object.keys(s).forEach(function(e){s[e].forEach(function(t){i[String(t)]=e})}),i),-1===r.indexOf(this.kind))throw new e('Unknown kind "'+this.kind+'" is specified for "'+n+'" YAML type.')}}function Va(){if(ra)return ta;ra=1;var e=Ha(),t=Fa();function r(e,t){var r=[];return e[t].forEach(function(e){var t=r.length;r.forEach(function(r,n){r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi&&(t=n)}),r[t]=e}),r}function n(e){return this.extend(e)}return n.prototype.extend=function(o){var s=[],i=[];if(o instanceof t)i.push(o);else if(Array.isArray(o))i=i.concat(o);else{if(!o||!Array.isArray(o.implicit)&&!Array.isArray(o.explicit))throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");o.implicit&&(s=s.concat(o.implicit)),o.explicit&&(i=i.concat(o.explicit))}s.forEach(function(r){if(!(r instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(r.loadKind&&"scalar"!==r.loadKind)throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(r.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(r){if(!(r instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(n.prototype);return a.implicit=(this.implicit||[]).concat(s),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=r(a,"implicit"),a.compiledExplicit=r(a,"explicit"),a.compiledTypeMap=function(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(e){e.multi?(r.multi[e.kind].push(e),r.multi.fallback.push(e)):r[e.kind][e.tag]=r.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(n);return r}(a.compiledImplicit,a.compiledExplicit),a},ta=n}function Ga(){if(oa)return na;oa=1;var e=Fa();return na=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})}function Ja(){if(ia)return sa;ia=1;var e=Fa();return sa=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})}function Wa(){if(la)return aa;la=1;var e=Fa();return aa=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})}function Ka(){if(da)return ca;da=1;var e=Va();return ca=new e({explicit:[Ga(),Ja(),Wa()]})}function Za(){if(ua)return pa;ua=1;var e=Fa();return pa=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})}function Ya(){if(fa)return ha;fa=1;var e=Fa();return ha=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})}function Qa(){if(ga)return ma;ga=1;var e=Ba(),t=Fa();function r(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function n(e){return 48<=e&&e<=55}function o(e){return 48<=e&&e<=57}return ma=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,s=e.length,i=0,a=!1;if(!s)return!1;if("-"!==(t=e[i])&&"+"!==t||(t=e[++i]),"0"===t){if(i+1===s)return!0;if("b"===(t=e[++i])){for(i++;i<s;i++)if("_"!==(t=e[i])){if("0"!==t&&"1"!==t)return!1;a=!0}return a&&"_"!==t}if("x"===t){for(i++;i<s;i++)if("_"!==(t=e[i])){if(!r(e.charCodeAt(i)))return!1;a=!0}return a&&"_"!==t}if("o"===t){for(i++;i<s;i++)if("_"!==(t=e[i])){if(!n(e.charCodeAt(i)))return!1;a=!0}return a&&"_"!==t}}if("_"===t)return!1;for(;i<s;i++)if("_"!==(t=e[i])){if(!o(e.charCodeAt(i)))return!1;a=!0}return!(!a||"_"===t)},construct:function(e){var t,r=e,n=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(t=r[0])&&"+"!==t||("-"===t&&(n=-1),t=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===t){if("b"===r[1])return n*parseInt(r.slice(2),2);if("x"===r[1])return n*parseInt(r.slice(2),16);if("o"===r[1])return n*parseInt(r.slice(2),8)}return n*parseInt(r,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!e.isNegativeZero(t)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})}function Xa(){if(va)return ya;va=1;var e=Ba(),t=Fa(),r=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var n=/^[-+]?[0-9]+e/;return ya=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!r.test(e)||"_"===e[e.length-1])},construct:function(e){var t,r;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:r*parseFloat(t,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||e.isNegativeZero(t))},represent:function(t,r){var o;if(isNaN(t))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(t))return"-0.0";return o=t.toString(10),n.test(o)?o.replace("e",".e"):o},defaultStyle:"lowercase"})}function el(){return $a?ba:($a=1,ba=Ka().extend({implicit:[Za(),Ya(),Qa(),Xa()]}))}function tl(){return wa?xa:(wa=1,xa=el())}function rl(){if(ka)return _a;ka=1;var e=Fa(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");return _a=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==t.exec(e)||null!==r.exec(e))},construct:function(e){var n,o,s,i,a,l,c,d,p=0,u=null;if(null===(n=t.exec(e))&&(n=r.exec(e)),null===n)throw new Error("Date resolve error");if(o=+n[1],s=+n[2]-1,i=+n[3],!n[4])return new Date(Date.UTC(o,s,i));if(a=+n[4],l=+n[5],c=+n[6],n[7]){for(p=n[7].slice(0,3);p.length<3;)p+="0";p=+p}return n[9]&&(u=6e4*(60*+n[10]+ +(n[11]||0)),"-"===n[9]&&(u=-u)),d=new Date(Date.UTC(o,s,i,a,l,c,p)),u&&d.setTime(d.getTime()-u),d},instanceOf:Date,represent:function(e){return e.toISOString()}})}function nl(){if(Oa)return Sa;Oa=1;var e=Fa();return Sa=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})}function ol(){if(Pa)return ja;Pa=1;var e=Fa(),t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";return ja=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var r,n,o=0,s=e.length,i=t;for(n=0;n<s;n++)if(!((r=i.indexOf(e.charAt(n)))>64)){if(r<0)return!1;o+=6}return o%8==0},construct:function(e){var r,n,o=e.replace(/[\r\n=]/g,""),s=o.length,i=t,a=0,l=[];for(r=0;r<s;r++)r%4==0&&r&&(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|i.indexOf(o.charAt(r));return 0===(n=s%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var r,n,o="",s=0,i=e.length,a=t;for(r=0;r<i;r++)r%3==0&&r&&(o+=a[s>>18&63],o+=a[s>>12&63],o+=a[s>>6&63],o+=a[63&s]),s=(s<<8)+e[r];return 0===(n=i%3)?(o+=a[s>>18&63],o+=a[s>>12&63],o+=a[s>>6&63],o+=a[63&s]):2===n?(o+=a[s>>10&63],o+=a[s>>4&63],o+=a[s<<2&63],o+=a[64]):1===n&&(o+=a[s>>2&63],o+=a[s<<4&63],o+=a[64],o+=a[64]),o}})}function sl(){if(Ta)return Ea;Ta=1;var e=Fa(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;return Ea=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var n,o,s,i,a,l=[],c=e;for(n=0,o=c.length;n<o;n+=1){if(s=c[n],a=!1,"[object Object]"!==r.call(s))return!1;for(i in s)if(t.call(s,i)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==l.indexOf(i))return!1;l.push(i)}return!0},construct:function(e){return null!==e?e:[]}})}function il(){if(Ca)return Aa;Ca=1;var e=Fa(),t=Object.prototype.toString;return Aa=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var r,n,o,s,i,a=e;for(i=new Array(a.length),r=0,n=a.length;r<n;r+=1){if(o=a[r],"[object Object]"!==t.call(o))return!1;if(1!==(s=Object.keys(o)).length)return!1;i[r]=[s[0],o[s[0]]]}return!0},construct:function(e){if(null===e)return[];var t,r,n,o,s,i=e;for(s=new Array(i.length),t=0,r=i.length;t<r;t+=1)n=i[t],o=Object.keys(n),s[t]=[o[0],n[o[0]]];return s}})}function al(){if(Ra)return Ia;Ra=1;var e=Fa(),t=Object.prototype.hasOwnProperty;return Ia=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var r,n=e;for(r in n)if(t.call(n,r)&&null!==n[r])return!1;return!0},construct:function(e){return null!==e?e:{}}})}function ll(){return Ma?Na:(Ma=1,Na=tl().extend({implicit:[rl(),nl()],explicit:[ol(),sl(),il(),al()]}))}function cl(){if(qa)return Ua;qa=1;var e=Ba(),t=Ha(),r=function(){if(Qi)return Yi;Qi=1;var e=Ba();function t(e,t,r,n,o){var s="",i="",a=Math.floor(o/2)-1;return n-t>a&&(t=n-a+(s=" ... ").length),r-n>a&&(r=n+a-(i=" ...").length),{str:s+e.slice(t,r).replace(/\t/g,"→")+i,pos:n-t+s.length}}function r(t,r){return e.repeat(" ",r-t.length)+t}return Yi=function(n,o){if(o=Object.create(o||null),!n.buffer)return null;o.maxLength||(o.maxLength=79),"number"!=typeof o.indent&&(o.indent=1),"number"!=typeof o.linesBefore&&(o.linesBefore=3),"number"!=typeof o.linesAfter&&(o.linesAfter=2);for(var s,i=/\r?\n|\r|\0/g,a=[0],l=[],c=-1;s=i.exec(n.buffer);)l.push(s.index),a.push(s.index+s[0].length),n.position<=s.index&&c<0&&(c=a.length-2);c<0&&(c=a.length-1);var d,p,u="",h=Math.min(n.line+o.linesAfter,l.length).toString().length,f=o.maxLength-(o.indent+h+3);for(d=1;d<=o.linesBefore&&!(c-d<0);d++)p=t(n.buffer,a[c-d],l[c-d],n.position-(a[c]-a[c-d]),f),u=e.repeat(" ",o.indent)+r((n.line-d+1).toString(),h)+" | "+p.str+"\n"+u;for(p=t(n.buffer,a[c],l[c],n.position,f),u+=e.repeat(" ",o.indent)+r((n.line+1).toString(),h)+" | "+p.str+"\n",u+=e.repeat("-",o.indent+h+3+p.pos)+"^\n",d=1;d<=o.linesAfter&&!(c+d>=l.length);d++)p=t(n.buffer,a[c+d],l[c+d],n.position-(a[c]-a[c+d]),f),u+=e.repeat(" ",o.indent)+r((n.line+d+1).toString(),h)+" | "+p.str+"\n";return u.replace(/\n$/,"")}}(),n=ll(),o=Object.prototype.hasOwnProperty,s=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,i=/[\x85\u2028\u2029]/,a=/[,\[\]\{\}]/,l=/^(?:!|!!|![a-z\-]+!)$/i,c=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function d(e){return Object.prototype.toString.call(e)}function p(e){return 10===e||13===e}function u(e){return 9===e||32===e}function h(e){return 9===e||32===e||10===e||13===e}function f(e){return 44===e||91===e||93===e||123===e||125===e}function m(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function g(e){return 120===e?2:117===e?4:85===e?8:0}function y(e){return 48<=e&&e<=57?e-48:-1}function v(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function b(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function $(e,t,r){"__proto__"===t?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}for(var x=new Array(256),w=new Array(256),_=0;_<256;_++)x[_]=v(_)?1:0,w[_]=v(_);function k(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||n,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function S(e,n){var o={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return o.snippet=r(o),new t(n,o)}function O(e,t){throw S(e,t)}function j(e,t){e.onWarning&&e.onWarning.call(null,S(e,t))}var P={YAML:function(e,t,r){var n,o,s;null!==e.version&&O(e,"duplication of %YAML directive"),1!==r.length&&O(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&O(e,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),s=parseInt(n[2],10),1!==o&&O(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=s<2,1!==s&&2!==s&&j(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var n,s;2!==r.length&&O(e,"TAG directive accepts exactly two arguments"),n=r[0],s=r[1],l.test(n)||O(e,"ill-formed tag handle (first argument) of the TAG directive"),o.call(e.tagMap,n)&&O(e,'there is a previously declared suffix for "'+n+'" tag handle'),c.test(s)||O(e,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch(i){O(e,"tag prefix is malformed: "+s)}e.tagMap[n]=s}};function E(e,t,r,n){var o,i,a,l;if(t<r){if(l=e.input.slice(t,r),n)for(o=0,i=l.length;o<i;o+=1)9===(a=l.charCodeAt(o))||32<=a&&a<=1114111||O(e,"expected valid JSON character");else s.test(l)&&O(e,"the stream contains non-printable characters");e.result+=l}}function T(t,r,n,s){var i,a,l,c;for(e.isObject(n)||O(t,"cannot merge mappings; the provided source object is unacceptable"),l=0,c=(i=Object.keys(n)).length;l<c;l+=1)a=i[l],o.call(r,a)||($(r,a,n[a]),s[a]=!0)}function A(e,t,r,n,s,i,a,l,c){var p,u;if(Array.isArray(s))for(p=0,u=(s=Array.prototype.slice.call(s)).length;p<u;p+=1)Array.isArray(s[p])&&O(e,"nested arrays are not supported inside keys"),"object"==typeof s&&"[object Object]"===d(s[p])&&(s[p]="[object Object]");if("object"==typeof s&&"[object Object]"===d(s)&&(s="[object Object]"),s=String(s),null===t&&(t={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(i))for(p=0,u=i.length;p<u;p+=1)T(e,t,i[p],r);else T(e,t,i,r);else e.json||o.call(r,s)||!o.call(t,s)||(e.line=a||e.line,e.lineStart=l||e.lineStart,e.position=c||e.position,O(e,"duplicated mapping key")),$(t,s,i),delete r[s];return t}function C(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):O(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function I(e,t,r){for(var n=0,o=e.input.charCodeAt(e.position);0!==o;){for(;u(o);)9===o&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&35===o)do{o=e.input.charCodeAt(++e.position)}while(10!==o&&13!==o&&0!==o);if(!p(o))break;for(C(e),o=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==r&&0!==n&&e.lineIndent<r&&j(e,"deficient indentation"),n}function R(e){var t,r=e.position;return!(45!==(t=e.input.charCodeAt(r))&&46!==t||t!==e.input.charCodeAt(r+1)||t!==e.input.charCodeAt(r+2)||(r+=3,0!==(t=e.input.charCodeAt(r))&&!h(t)))}function N(t,r){1===r?t.result+=" ":r>1&&(t.result+=e.repeat("\n",r-1))}function M(e,t){var r,n,o=e.tag,s=e.anchor,i=[],a=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),n=e.input.charCodeAt(e.position);0!==n&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,O(e,"tab characters must not be used in indentation")),45===n)&&h(e.input.charCodeAt(e.position+1));)if(a=!0,e.position++,I(e,!0,-1)&&e.lineIndent<=t)i.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,L(e,t,3,!1,!0),i.push(e.result),I(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)O(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!a&&(e.tag=o,e.anchor=s,e.kind="sequence",e.result=i,!0)}function q(e){var t,r,n,s,i=!1,d=!1;if(33!==(s=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&O(e,"duplication of a tag property"),60===(s=e.input.charCodeAt(++e.position))?(i=!0,s=e.input.charCodeAt(++e.position)):33===s?(d=!0,r="!!",s=e.input.charCodeAt(++e.position)):r="!",t=e.position,i){do{s=e.input.charCodeAt(++e.position)}while(0!==s&&62!==s);e.position<e.length?(n=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):O(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==s&&!h(s);)33===s&&(d?O(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),l.test(r)||O(e,"named tag handle cannot contain such characters"),d=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),a.test(n)&&O(e,"tag suffix cannot contain flow indicator characters")}n&&!c.test(n)&&O(e,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch(p){O(e,"tag name is malformed: "+n)}return i?e.tag=n:o.call(e.tagMap,r)?e.tag=e.tagMap[r]+n:"!"===r?e.tag="!"+n:"!!"===r?e.tag="tag:yaml.org,2002:"+n:O(e,'undeclared tag handle "'+r+'"'),!0}function z(e){var t,r;if(38!==(r=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&O(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!h(r)&&!f(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&O(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function L(t,r,n,s,i){var a,l,c,d,v,$,_,k,S,j=1,P=!1,T=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=l=c=4===n||3===n,s&&I(t,!0,-1)&&(P=!0,t.lineIndent>r?j=1:t.lineIndent===r?j=0:t.lineIndent<r&&(j=-1)),1===j)for(;q(t)||z(t);)I(t,!0,-1)?(P=!0,c=a,t.lineIndent>r?j=1:t.lineIndent===r?j=0:t.lineIndent<r&&(j=-1)):c=!1;if(c&&(c=P||i),1!==j&&4!==n||(k=1===n||2===n?r:r+1,S=t.position-t.lineStart,1===j?c&&(M(t,S)||function(e,t,r){var n,o,s,i,a,l,c,d=e.tag,p=e.anchor,f={},m=Object.create(null),g=null,y=null,v=null,b=!1,$=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=f),c=e.input.charCodeAt(e.position);0!==c;){if(b||-1===e.firstTabInLine||(e.position=e.firstTabInLine,O(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),s=e.line,63!==c&&58!==c||!h(n)){if(i=e.line,a=e.lineStart,l=e.position,!L(e,r,2,!1,!0))break;if(e.line===s){for(c=e.input.charCodeAt(e.position);u(c);)c=e.input.charCodeAt(++e.position);if(58===c)h(c=e.input.charCodeAt(++e.position))||O(e,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(A(e,f,m,g,y,null,i,a,l),g=y=v=null),$=!0,b=!1,o=!1,g=e.tag,y=e.result;else{if(!$)return e.tag=d,e.anchor=p,!0;O(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!$)return e.tag=d,e.anchor=p,!0;O(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(b&&(A(e,f,m,g,y,null,i,a,l),g=y=v=null),$=!0,b=!0,o=!0):b?(b=!1,o=!0):O(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=n;if((e.line===s||e.lineIndent>t)&&(b&&(i=e.line,a=e.lineStart,l=e.position),L(e,t,4,!0,o)&&(b?y=e.result:v=e.result),b||(A(e,f,m,g,y,v,i,a,l),g=y=v=null),I(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&0!==c)O(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return b&&A(e,f,m,g,y,null,i,a,l),$&&(e.tag=d,e.anchor=p,e.kind="mapping",e.result=f),$}(t,S,k))||function(e,t){var r,n,o,s,i,a,l,c,d,p,u,f,m=!0,g=e.tag,y=e.anchor,v=Object.create(null);if(91===(f=e.input.charCodeAt(e.position)))i=93,c=!1,s=[];else{if(123!==f)return!1;i=125,c=!0,s={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=s),f=e.input.charCodeAt(++e.position);0!==f;){if(I(e,!0,t),(f=e.input.charCodeAt(e.position))===i)return e.position++,e.tag=g,e.anchor=y,e.kind=c?"mapping":"sequence",e.result=s,!0;m?44===f&&O(e,"expected the node content, but found ','"):O(e,"missed comma between flow collection entries"),u=null,a=l=!1,63===f&&h(e.input.charCodeAt(e.position+1))&&(a=l=!0,e.position++,I(e,!0,t)),r=e.line,n=e.lineStart,o=e.position,L(e,t,1,!1,!0),p=e.tag,d=e.result,I(e,!0,t),f=e.input.charCodeAt(e.position),!l&&e.line!==r||58!==f||(a=!0,f=e.input.charCodeAt(++e.position),I(e,!0,t),L(e,t,1,!1,!0),u=e.result),c?A(e,s,v,p,d,u,r,n,o):a?s.push(A(e,null,v,p,d,u,r,n,o)):s.push(d),I(e,!0,t),44===(f=e.input.charCodeAt(e.position))?(m=!0,f=e.input.charCodeAt(++e.position)):m=!1}O(e,"unexpected end of the stream within a flow collection")}(t,k)?T=!0:(l&&function(t,r){var n,o,s,i,a=1,l=!1,c=!1,d=r,h=0,f=!1;if(124===(i=t.input.charCodeAt(t.position)))o=!1;else{if(62!==i)return!1;o=!0}for(t.kind="scalar",t.result="";0!==i;)if(43===(i=t.input.charCodeAt(++t.position))||45===i)1===a?a=43===i?3:2:O(t,"repeat of a chomping mode identifier");else{if(!((s=y(i))>=0))break;0===s?O(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?O(t,"repeat of an indentation width identifier"):(d=r+s-1,c=!0)}if(u(i)){do{i=t.input.charCodeAt(++t.position)}while(u(i));if(35===i)do{i=t.input.charCodeAt(++t.position)}while(!p(i)&&0!==i)}for(;0!==i;){for(C(t),t.lineIndent=0,i=t.input.charCodeAt(t.position);(!c||t.lineIndent<d)&&32===i;)t.lineIndent++,i=t.input.charCodeAt(++t.position);if(!c&&t.lineIndent>d&&(d=t.lineIndent),p(i))h++;else{if(t.lineIndent<d){3===a?t.result+=e.repeat("\n",l?1+h:h):1===a&&l&&(t.result+="\n");break}for(o?u(i)?(f=!0,t.result+=e.repeat("\n",l?1+h:h)):f?(f=!1,t.result+=e.repeat("\n",h+1)):0===h?l&&(t.result+=" "):t.result+=e.repeat("\n",h):t.result+=e.repeat("\n",l?1+h:h),l=!0,c=!0,h=0,n=t.position;!p(i)&&0!==i;)i=t.input.charCodeAt(++t.position);E(t,n,t.position,!1)}}return!0}(t,k)||function(e,t){var r,n,o;if(39!==(r=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;0!==(r=e.input.charCodeAt(e.position));)if(39===r){if(E(e,n,e.position,!0),39!==(r=e.input.charCodeAt(++e.position)))return!0;n=e.position,e.position++,o=e.position}else p(r)?(E(e,n,o,!0),N(e,I(e,!1,t)),n=o=e.position):e.position===e.lineStart&&R(e)?O(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);O(e,"unexpected end of the stream within a single quoted scalar")}(t,k)||function(e,t){var r,n,o,s,i,a;if(34!==(a=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;0!==(a=e.input.charCodeAt(e.position));){if(34===a)return E(e,r,e.position,!0),e.position++,!0;if(92===a){if(E(e,r,e.position,!0),p(a=e.input.charCodeAt(++e.position)))I(e,!1,t);else if(a<256&&x[a])e.result+=w[a],e.position++;else if((i=g(a))>0){for(o=i,s=0;o>0;o--)(i=m(a=e.input.charCodeAt(++e.position)))>=0?s=(s<<4)+i:O(e,"expected hexadecimal character");e.result+=b(s),e.position++}else O(e,"unknown escape sequence");r=n=e.position}else p(a)?(E(e,r,n,!0),N(e,I(e,!1,t)),r=n=e.position):e.position===e.lineStart&&R(e)?O(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}O(e,"unexpected end of the stream within a double quoted scalar")}(t,k)?T=!0:!function(e){var t,r,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!h(n)&&!f(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&O(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),o.call(e.anchorMap,r)||O(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],I(e,!0,-1),!0}(t)?function(e,t,r){var n,o,s,i,a,l,c,d,m=e.kind,g=e.result;if(h(d=e.input.charCodeAt(e.position))||f(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d)return!1;if((63===d||45===d)&&(h(n=e.input.charCodeAt(e.position+1))||r&&f(n)))return!1;for(e.kind="scalar",e.result="",o=s=e.position,i=!1;0!==d;){if(58===d){if(h(n=e.input.charCodeAt(e.position+1))||r&&f(n))break}else if(35===d){if(h(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&R(e)||r&&f(d))break;if(p(d)){if(a=e.line,l=e.lineStart,c=e.lineIndent,I(e,!1,-1),e.lineIndent>=t){i=!0,d=e.input.charCodeAt(e.position);continue}e.position=s,e.line=a,e.lineStart=l,e.lineIndent=c;break}}i&&(E(e,o,s,!1),N(e,e.line-a),o=s=e.position,i=!1),u(d)||(s=e.position+1),d=e.input.charCodeAt(++e.position)}return E(e,o,s,!1),!!e.result||(e.kind=m,e.result=g,!1)}(t,k,1===n)&&(T=!0,null===t.tag&&(t.tag="?")):(T=!0,null===t.tag&&null===t.anchor||O(t,"alias node should not have any properties")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===j&&(T=c&&M(t,S))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&O(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),d=0,v=t.implicitTypes.length;d<v;d+=1)if((_=t.implicitTypes[d]).resolve(t.result)){t.result=_.construct(t.result),t.tag=_.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(o.call(t.typeMap[t.kind||"fallback"],t.tag))_=t.typeMap[t.kind||"fallback"][t.tag];else for(_=null,d=0,v=($=t.typeMap.multi[t.kind||"fallback"]).length;d<v;d+=1)if(t.tag.slice(0,$[d].tag.length)===$[d].tag){_=$[d];break}_||O(t,"unknown tag !<"+t.tag+">"),null!==t.result&&_.kind!==t.kind&&O(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+_.kind+'", not "'+t.kind+'"'),_.resolve(t.result,t.tag)?(t.result=_.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):O(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||T}function U(e){var t,r,n,s,a=e.position,l=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(s=e.input.charCodeAt(e.position))&&(I(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(l=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!h(s);)s=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&O(e,"directive name must not be less than one character in length");0!==s;){for(;u(s);)s=e.input.charCodeAt(++e.position);if(35===s){do{s=e.input.charCodeAt(++e.position)}while(0!==s&&!p(s));break}if(p(s))break;for(t=e.position;0!==s&&!h(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==s&&C(e),o.call(P,r)?P[r](e,r,n):j(e,'unknown document directive "'+r+'"')}I(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,I(e,!0,-1)):l&&O(e,"directives end mark is expected"),L(e,e.lineIndent-1,4,!1,!0),I(e,!0,-1),e.checkLineBreaks&&i.test(e.input.slice(a,e.position))&&j(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&R(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,I(e,!0,-1)):e.position<e.length-1&&O(e,"end of the stream or a document separator is expected")}function D(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var r=new k(e,t),n=e.indexOf("\0");for(-1!==n&&(r.position=n,O(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)U(r);return r.documents}return Ua.loadAll=function(e,t,r){null!==t&&"object"==typeof t&&void 0===r&&(r=t,t=null);var n=D(e,r);if("function"!=typeof t)return n;for(var o=0,s=n.length;o<s;o+=1)t(n[o])},Ua.load=function(e,r){var n=D(e,r);if(0!==n.length){if(1===n.length)return n[0];throw new t("expected a single document in the stream, but found more")}},Ua}var dl,pl,ul,hl={};function fl(){if(dl)return hl;dl=1;var e=Ba(),t=Ha(),r=ll(),n=Object.prototype.toString,o=Object.prototype.hasOwnProperty,s=65279,i={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},a=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],l=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function c(r){var n,o,s;if(n=r.toString(16).toUpperCase(),r<=255)o="x",s=2;else if(r<=65535)o="u",s=4;else{if(!(r<=4294967295))throw new t("code point within a string may not be greater than 0xFFFFFFFF");o="U",s=8}return"\\"+o+e.repeat("0",s-n.length)+n}function d(t){this.schema=t.schema||r,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=e.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=function(e,t){var r,n,s,i,a,l,c;if(null===t)return{};for(r={},s=0,i=(n=Object.keys(t)).length;s<i;s+=1)a=n[s],l=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(c=e.compiledTypeMap.fallback[a])&&o.call(c.styleAliases,l)&&(l=c.styleAliases[l]),r[a]=l;return r}(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function p(t,r){for(var n,o=e.repeat(" ",r),s=0,i=-1,a="",l=t.length;s<l;)-1===(i=t.indexOf("\n",s))?(n=t.slice(s),s=l):(n=t.slice(s,i+1),s=i+1),n.length&&"\n"!==n&&(a+=o),a+=n;return a}function u(t,r){return"\n"+e.repeat(" ",t.indent*r)}function h(e){return 32===e||9===e}function f(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==s||65536<=e&&e<=1114111}function m(e){return f(e)&&e!==s&&13!==e&&10!==e}function g(e,t,r){var n=m(e),o=n&&!h(e);return(r?n:n&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!o)||m(t)&&!h(t)&&35===e||58===t&&o}function y(e,t){var r,n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1))>=56320&&r<=57343?1024*(n-55296)+r-56320+65536:n}function v(e){return/^\n* /.test(e)}function b(e,t,r,n,o,i,a,l){var c,d,p=0,u=null,m=!1,b=!1,$=-1!==n,x=-1,w=f(d=y(e,0))&&d!==s&&!h(d)&&45!==d&&63!==d&&58!==d&&44!==d&&91!==d&&93!==d&&123!==d&&125!==d&&35!==d&&38!==d&&42!==d&&33!==d&&124!==d&&61!==d&&62!==d&&39!==d&&34!==d&&37!==d&&64!==d&&96!==d&&function(e){return!h(e)&&58!==e}(y(e,e.length-1));if(t||a)for(c=0;c<e.length;p>=65536?c+=2:c++){if(!f(p=y(e,c)))return 5;w=w&&g(p,u,l),u=p}else{for(c=0;c<e.length;p>=65536?c+=2:c++){if(10===(p=y(e,c)))m=!0,$&&(b=b||c-x-1>n&&" "!==e[x+1],x=c);else if(!f(p))return 5;w=w&&g(p,u,l),u=p}b=b||$&&c-x-1>n&&" "!==e[x+1]}return m||b?r>9&&v(e)?5:a?2===i?5:2:b?4:3:!w||a||o(e)?2===i?5:2:1}function $(e,r,n,o,s){e.dump=function(){if(0===r.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==a.indexOf(r)||l.test(r)))return 2===e.quotingType?'"'+r+'"':"'"+r+"'";var d=e.indent*Math.max(1,n),u=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-d),h=o||e.flowLevel>-1&&n>=e.flowLevel;switch(b(r,h,e.indent,u,function(t){return function(e,t){var r,n;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}(e,t)},e.quotingType,e.forceQuotes&&!o,s)){case 1:return r;case 2:return"'"+r.replace(/'/g,"''")+"'";case 3:return"|"+x(r,e.indent)+w(p(r,d));case 4:return">"+x(r,e.indent)+w(p(function(e,t){var r,n,o=/(\n+)([^\n]*)/g,s=(a=e.indexOf("\n"),a=-1!==a?a:e.length,o.lastIndex=a,_(e.slice(0,a),t)),i="\n"===e[0]||" "===e[0];var a;for(;n=o.exec(e);){var l=n[1],c=n[2];r=" "===c[0],s+=l+(i||r||""===c?"":"\n")+_(c,t),i=r}return s}(r,u),d));case 5:return'"'+function(e){for(var t,r="",n=0,o=0;o<e.length;n>=65536?o+=2:o++)n=y(e,o),!(t=i[n])&&f(n)?(r+=e[o],n>=65536&&(r+=e[o+1])):r+=t||c(n);return r}(r)+'"';default:throw new t("impossible error: invalid scalar style")}}()}function x(e,t){var r=v(e)?String(t):"",n="\n"===e[e.length-1];return r+(n&&("\n"===e[e.length-2]||"\n"===e)?"+":n?"":"-")+"\n"}function w(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function _(e,t){if(""===e||" "===e[0])return e;for(var r,n,o=/ [^ ]/g,s=0,i=0,a=0,l="";r=o.exec(e);)(a=r.index)-s>t&&(n=i>s?i:a,l+="\n"+e.slice(s,n),s=n+1),i=a;return l+="\n",e.length-s>t&&i>s?l+=e.slice(s,i)+"\n"+e.slice(i+1):l+=e.slice(s),l.slice(1)}function k(e,t,r,n){var o,s,i,a="",l=e.tag;for(o=0,s=r.length;o<s;o+=1)i=r[o],e.replacer&&(i=e.replacer.call(r,String(o),i)),(O(e,t+1,i,!0,!0,!1,!0)||void 0===i&&O(e,t+1,null,!0,!0,!1,!0))&&(n&&""===a||(a+=u(e,t)),e.dump&&10===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=l,e.dump=a||"[]"}function S(e,r,s){var i,a,l,c,d,p;for(l=0,c=(a=s?e.explicitTypes:e.implicitTypes).length;l<c;l+=1)if(((d=a[l]).instanceOf||d.predicate)&&(!d.instanceOf||"object"==typeof r&&r instanceof d.instanceOf)&&(!d.predicate||d.predicate(r))){if(s?d.multi&&d.representName?e.tag=d.representName(r):e.tag=d.tag:e.tag="?",d.represent){if(p=e.styleMap[d.tag]||d.defaultStyle,"[object Function]"===n.call(d.represent))i=d.represent(r,p);else{if(!o.call(d.represent,p))throw new t("!<"+d.tag+'> tag resolver accepts not "'+p+'" style');i=d.represent[p](r,p)}e.dump=i}return!0}return!1}function O(e,r,o,s,i,a,l){e.tag=null,e.dump=o,S(e,o,!1)||S(e,o,!0);var c,d=n.call(e.dump),p=s;s&&(s=e.flowLevel<0||e.flowLevel>r);var h,f,m="[object Object]"===d||"[object Array]"===d;if(m&&(f=-1!==(h=e.duplicates.indexOf(o))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&r>0)&&(i=!1),f&&e.usedDuplicates[h])e.dump="*ref_"+h;else{if(m&&f&&!e.usedDuplicates[h]&&(e.usedDuplicates[h]=!0),"[object Object]"===d)s&&0!==Object.keys(e.dump).length?(!function(e,r,n,o){var s,i,a,l,c,d,p="",h=e.tag,f=Object.keys(n);if(!0===e.sortKeys)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new t("sortKeys must be a boolean or a function");for(s=0,i=f.length;s<i;s+=1)d="",o&&""===p||(d+=u(e,r)),l=n[a=f[s]],e.replacer&&(l=e.replacer.call(n,a,l)),O(e,r+1,a,!0,!0,!0)&&((c=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,c&&(d+=u(e,r)),O(e,r+1,l,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?d+=":":d+=": ",p+=d+=e.dump));e.tag=h,e.dump=p||"{}"}(e,r,e.dump,i),f&&(e.dump="&ref_"+h+e.dump)):(!function(e,t,r){var n,o,s,i,a,l="",c=e.tag,d=Object.keys(r);for(n=0,o=d.length;n<o;n+=1)a="",""!==l&&(a+=", "),e.condenseFlow&&(a+='"'),i=r[s=d[n]],e.replacer&&(i=e.replacer.call(r,s,i)),O(e,t,s,!1,!1)&&(e.dump.length>1024&&(a+="? "),a+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),O(e,t,i,!1,!1)&&(l+=a+=e.dump));e.tag=c,e.dump="{"+l+"}"}(e,r,e.dump),f&&(e.dump="&ref_"+h+" "+e.dump));else if("[object Array]"===d)s&&0!==e.dump.length?(e.noArrayIndent&&!l&&r>0?k(e,r-1,e.dump,i):k(e,r,e.dump,i),f&&(e.dump="&ref_"+h+e.dump)):(!function(e,t,r){var n,o,s,i="",a=e.tag;for(n=0,o=r.length;n<o;n+=1)s=r[n],e.replacer&&(s=e.replacer.call(r,String(n),s)),(O(e,t,s,!1,!1)||void 0===s&&O(e,t,null,!1,!1))&&(""!==i&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}(e,r,e.dump),f&&(e.dump="&ref_"+h+" "+e.dump));else{if("[object String]"!==d){if("[object Undefined]"===d)return!1;if(e.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+d)}"?"!==e.tag&&$(e,e.dump,r,a,p)}null!==e.tag&&"?"!==e.tag&&(c=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),c="!"===e.tag[0]?"!"+c:"tag:yaml.org,2002:"===c.slice(0,18)?"!!"+c.slice(18):"!<"+c+">",e.dump=c+" "+e.dump)}return!0}function j(e,t){var r,n,o=[],s=[];for(P(e,o,s),r=0,n=s.length;r<n;r+=1)t.duplicates.push(o[s[r]]);t.usedDuplicates=new Array(n)}function P(e,t,r){var n,o,s;if(null!==e&&"object"==typeof e)if(-1!==(o=t.indexOf(e)))-1===r.indexOf(o)&&r.push(o);else if(t.push(e),Array.isArray(e))for(o=0,s=e.length;o<s;o+=1)P(e[o],t,r);else for(o=0,s=(n=Object.keys(e)).length;o<s;o+=1)P(e[n[o]],t,r)}return hl.dump=function(e,t){var r=new d(t=t||{});r.noRefs||j(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),O(r,0,n,!0,!0)?r.dump+"\n":""},hl}function ml(){if(pl)return La;pl=1;var e=cl(),t=fl();function r(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}return La.Type=Fa(),La.Schema=Va(),La.FAILSAFE_SCHEMA=Ka(),La.JSON_SCHEMA=el(),La.CORE_SCHEMA=tl(),La.DEFAULT_SCHEMA=ll(),La.load=e.load,La.loadAll=e.loadAll,La.dump=t.dump,La.YAMLException=Ha(),La.types={binary:ol(),float:Xa(),map:Wa(),null:Za(),pairs:il(),set:al(),timestamp:rl(),bool:Ya(),int:Qa(),merge:nl(),omap:sl(),seq:Ja(),str:Ga()},La.safeLoad=r("safeLoad","load"),La.safeLoadAll=r("safeLoadAll","loadAll"),La.safeDump=r("safeDump","dump"),La}var gl,yl={};var vl,bl={};var $l={};const xl=i(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var wl;var _l,kl,Sl,Ol={};function jl(){if(_l)return Ol;_l=1;var e=Ol&&Ol.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=Ol&&Ol.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Ol&&Ol.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n};Object.defineProperty(Ol,"__esModule",{value:!0});const n=nt,o=r(Ti()),s=Mi();async function i(e,t,r){e=o.parse(e);const a=r||[];a.push(e.href);try{const r=await async function(e,t){let r,n;t.timeout&&(r=new AbortController,n=setTimeout(()=>r.abort(),t.timeout));const o=await fetch(e,{method:"GET",headers:t.headers||{},credentials:t.withCredentials?"include":"same-origin",signal:r?r.signal:null});n&&clearTimeout(n);return o}(e,t);if(r.status>=400)throw(0,n.ono)({status:r.status},`HTTP ERROR ${r.status}`);if(r.status>=300){if(!Number.isNaN(t.redirects)&&a.length>t.redirects)throw new s.ResolverError((0,n.ono)({status:r.status},`Error downloading ${a[0]}. \nToo many redirects: \n ${a.join(" \n ")}`));if("location"in r.headers&&r.headers.location){return i(o.resolve(e.href,r.headers.location),t,a)}throw(0,n.ono)({status:r.status},`HTTP ${r.status} redirect with no location header`)}if(r.body){const e=await r.arrayBuffer();return Buffer.from(e)}return Buffer.alloc(0)}catch(l){throw new s.ResolverError((0,n.ono)(l,`Error downloading ${e.href}`),e.href)}}return Ol.default={order:200,headers:null,timeout:6e4,redirects:5,withCredentials:!1,canRead:e=>o.isHttp(e.url),read(e){const t=o.parse(e.url);return"undefined"==typeof window||t.protocol||(t.protocol=o.parse(location.href).protocol),i(t,this)}},Ol}function Pl(){return kl||(kl=1,function(e){var t=Gi&&Gi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getNewOptions=e.getJsonSchemaRefParserDefaultOptions=void 0;const r=t(function(){if(Fi)return Ji;Fi=1,Object.defineProperty(Ji,"__esModule",{value:!0});const e=Mi();return Ji.default={order:100,allowEmpty:!0,canParse:".json",allowBOM:!0,async parse(t){let r=t.data;if(Buffer.isBuffer(r)&&(r=r.toString()),"string"!=typeof r)return r;if(0!==r.trim().length)try{return JSON.parse(r)}catch(n){if(this.allowBOM)try{const e=r.indexOf("{");return r=r.slice(e),JSON.parse(r)}catch(o){throw new e.ParserError(o.message,t.url)}throw new e.ParserError(n.message,t.url)}}},Ji}()),n=t(function(){if(ul)return za;ul=1;var e=za&&za.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(za,"__esModule",{value:!0});const t=Mi(),r=e(ml()),n=ml();return za.default={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],async parse(e){let o=e.data;if(Buffer.isBuffer(o)&&(o=o.toString()),"string"!=typeof o)return o;try{return r.default.load(o,{schema:n.JSON_SCHEMA})}catch(s){throw new t.ParserError((null==s?void 0:s.message)||"Parser Error",e.url)}}},za}()),o=t(function(){if(gl)return yl;gl=1,Object.defineProperty(yl,"__esModule",{value:!0});const e=Mi(),t=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;return yl.default={order:300,allowEmpty:!0,encoding:"utf8",canParse:e=>("string"==typeof e.data||Buffer.isBuffer(e.data))&&t.test(e.url),parse(t){if("string"==typeof t.data)return t.data;if(Buffer.isBuffer(t.data))return t.data.toString(this.encoding);throw new e.ParserError("data is not text",t.url)}},yl}()),s=t(function(){if(vl)return bl;vl=1,Object.defineProperty(bl,"__esModule",{value:!0});const e=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;return bl.default={order:400,allowEmpty:!0,canParse:t=>Buffer.isBuffer(t.data)&&e.test(t.url),parse:e=>Buffer.isBuffer(e.data)?e.data:Buffer.from(e.data)},bl}()),i=t(function(){if(wl)return $l;wl=1;var e=$l&&$l.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=$l&&$l.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=$l&&$l.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n},n=$l&&$l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($l,"__esModule",{value:!0});const o=n(xl),s=nt,i=r(Ti()),a=Mi();return $l.default={order:100,canRead:e=>i.isFileSystemPath(e.url),async read(e){let t;try{t=i.toFileSystemPath(e.url)}catch(r){throw new a.ResolverError(s.ono.uri(r,`Malformed URI: ${e.url}`),e.url)}try{return await o.default.promises.readFile(t)}catch(r){throw new a.ResolverError((0,s.ono)(r,`Error opening file "${t}"`),t)}}},$l}()),a=t(jl());e.getJsonSchemaRefParserDefaultOptions=()=>({parse:{json:{...r.default},yaml:{...n.default},text:{...o.default},binary:{...s.default}},resolve:{file:{...i.default},http:{...a.default},external:!0},continueOnError:!1,dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative"},mutateInputSchema:!0});function l(e,t){if(c(t)){const r=Object.keys(t).filter(e=>!["__proto__","constructor","prototype"].includes(e));for(let n=0;n<r.length;n++){const o=r[n],s=t[o],i=e[o];c(s)?e[o]=l(i||{},s):void 0!==s&&(e[o]=s)}}return e}function c(e){return e&&"object"==typeof e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}e.getNewOptions=t=>{const r=(0,e.getJsonSchemaRefParserDefaultOptions)();return t&&l(r,t),r}}(Gi)),Gi}var El,Tl={};function Al(){if(El)return Tl;El=1;var e=Tl&&Tl.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=Tl&&Tl.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Tl&&Tl.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n},n=Tl&&Tl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tl,"__esModule",{value:!0});const o=n(zi()),s=n(qi()),i=n(Hi()),a=r(Ti()),l=Mi();function c(e,t,r,n,d,p){d||(d=new Set);let u=[];if(e&&"object"==typeof e&&!ArrayBuffer.isView(e)&&!d.has(e)){d.add(e),o.default.isExternal$Ref(e)&&u.push(async function(e,t,r,n){var o;const s="root"===(null==(o=n.dereference)?void 0:o.externalReferenceResolution),d=a.resolve(s?a.cwd():t,e.$ref),p=a.stripHash(d),u=r._$refs[p];if(u)return Promise.resolve(u.value);try{const e=c(await(0,i.default)(d,r,n),p+"#",r,n,new Set,!0);return Promise.all(e)}catch(h){if(!(null==n?void 0:n.continueOnError)||!(0,l.isHandledError)(h))throw h;return r._$refs[p]&&(h.source=decodeURI(a.stripHash(t)),h.path=a.safePointerToPath(a.getHash(t))),[]}}(e,t,r,n));const p=Object.keys(e);for(const o of p){const i=s.default.join(t,o),a=e[o];u=u.concat(c(a,i,r,n,d))}}return u}return Tl.default=function(e,t){var r;if(!(null==(r=t.resolve)?void 0:r.external))return Promise.resolve();try{const r=c(e.schema,e.$refs._root$Ref.path+"#",e.$refs,t);return Promise.all(r)}catch(n){return Promise.reject(n)}},Tl}var Cl,Il={};function Rl(){if(Cl)return Il;Cl=1;var e=Il&&Il.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=Il&&Il.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Il&&Il.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n},n=Il&&Il.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Il,"__esModule",{value:!0});const o=n(zi()),s=n(qi()),i=r(Ti());function a(e,t,r,n,i,c,d,p){const u=null===t?e:e[t];if(u&&"object"==typeof u&&!ArrayBuffer.isView(u))if(o.default.isAllowed$Ref(u))l(e,t,r,n,i,c,d,p);else{const e=Object.keys(u).sort((e,t)=>"definitions"===e?-1:"definitions"===t?1:e.length-t.length);for(const t of e){const e=s.default.join(r,t),h=s.default.join(n,t),f=u[t];o.default.isAllowed$Ref(f)?l(u,t,r,h,i,c,d,p):a(u,t,e,h,i,c,d,p)}}}function l(e,t,r,n,l,c,d,p){const u=null===t?e:e[t],h=i.resolve(r,u.$ref),f=d._resolve(h,n,p);if(null===f)return;const m=s.default.parse(n).length,g=i.stripHash(f.path),y=i.getHash(f.path),v=g!==d._root$Ref.path,b=o.default.isExtended$Ref(u);l+=f.indirections;const $=function(e,t,r){for(const n of e)if(n&&n.parent===t&&n.key===r)return n;return}(c,e,t);if($){if(!(m<$.depth||l<$.indirections))return;!function(e,t){const r=e.indexOf(t);e.splice(r,1)}(c,$)}c.push({$ref:u,parent:e,key:t,pathFromRoot:n,depth:m,file:g,hash:y,value:f.value,circular:f.circular,extended:b,external:v,indirections:l}),$&&!v||a(f.value,null,f.path,n,l+1,c,d,p)}return Il.default=function(e,t){const r=[];a(e,"schema",e.$refs._root$Ref.path+"#","#",0,r,e.$refs,t),function(e){let t,r,n;e.sort((e,t)=>{if(e.file!==t.file)return e.file<t.file?-1:1;if(e.hash!==t.hash)return e.hash<t.hash?-1:1;if(e.circular!==t.circular)return e.circular?-1:1;if(e.extended!==t.extended)return e.extended?1:-1;if(e.indirections!==t.indirections)return e.indirections-t.indirections;if(e.depth!==t.depth)return e.depth-t.depth;{const r=e.pathFromRoot.lastIndexOf("/definitions"),n=t.pathFromRoot.lastIndexOf("/definitions");return r!==n?n-r:e.pathFromRoot.length-t.pathFromRoot.length}});for(const i of e)i.external?i.file===t&&i.hash===r?i.$ref.$ref=n:i.file===t&&0===i.hash.indexOf(r+"/")?i.$ref.$ref=s.default.join(n,s.default.parse(i.hash.replace(r,"#"))):(t=i.file,r=i.hash,n=i.pathFromRoot,i.$ref=i.parent[i.key]=o.default.dereference(i.$ref,i.value),i.circular&&(i.$ref.$ref=i.pathFromRoot)):i.$ref.$ref=i.hash}(r)},Il}var Nl,Ml={};var ql,zl,Ll,Ul,Dl,Bl,Hl,Fl,Vl,Gl,Jl,Wl={},Kl={};function Zl(){if(zl)return Wl;zl=1;var e=Wl&&Wl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wl,"__esModule",{value:!0}),Wl.default=function(e,r){return e?void r.then(function(r){(0,t.default)(function(){e(null,r)})},function(r){(0,t.default)(function(){e(r)})}):r};const t=e((ql||(ql=1,Object.defineProperty(Kl,"__esModule",{value:!0}),Kl.default="object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:"function"==typeof setImmediate?setImmediate:function(e){setTimeout(e,0)}),Kl));return Wl}function Yl(){return Ll||(Ll=1,function(e){var t=di&&di.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=di&&di.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=di&&di.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&t(n,e,o);return r(n,e),n},o=di&&di.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonSchemaRefParserDefaultOptions=e.jsonSchemaParserNormalizeArgs=e.dereferenceInternal=e.JSONParserErrorGroup=e.isHandledError=e.UnmatchedParserError=e.ParserError=e.ResolverError=e.MissingPointerError=e.InvalidPointerError=e.JSONParserError=e.UnmatchedResolverError=e.dereference=e.bundle=e.resolve=e.parse=e.$RefParser=void 0;const s=o(function(){if(Ri)return pi;Ri=1;var e=pi&&pi.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=pi&&pi.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=pi&&pi.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n},n=pi&&pi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pi,"__esModule",{value:!0});const o=nt,s=n(zi()),i=r(Ti()),a=n(Oi());function l(e,t){let r=Object.keys(e);return(t=Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t)).length>0&&t[0]&&(r=r.filter(r=>t.includes(e[r].pathType))),r.map(t=>({encoded:t,decoded:"file"===e[t].pathType?i.toFileSystemPath(t,!0):t}))}return pi.default=class{paths(...e){return l(this._$refs,e.flat()).map(e=>(0,a.default)(e.decoded))}values(...e){const t=this._$refs;return l(t,e.flat()).reduce((e,r)=>(e[(0,a.default)(r.decoded)]=t[r.encoded].value,e),{})}exists(e,t){try{return this._resolve(e,"",t),!0}catch{return!1}}get(e,t){return this._resolve(e,"",t).value}set(e,t){const r=i.resolve(this._root$Ref.path,e),n=i.stripHash(r),s=this._$refs[n];if(!s)throw(0,o.ono)(`Error resolving $ref pointer "${e}". \n"${n}" not found.`);s.set(r,t)}_get$Ref(e){e=i.resolve(this._root$Ref.path,e);const t=i.stripHash(e);return this._$refs[t]}_add(e){const t=i.stripHash(e),r=new s.default(this);return r.path=t,this._$refs[t]=r,this._root$Ref=this._root$Ref||r,r}_resolve(e,t,r){const n=i.resolve(this._root$Ref.path,e),s=i.stripHash(n),a=this._$refs[s];if(!a)throw(0,o.ono)(`Error resolving $ref pointer "${e}". \n"${s}" not found.`);return a.resolve(n,r,e,t)}constructor(){this._$refs={},this.toJSON=this.values,this.circular=!1,this._$refs={},this._root$Ref=null}},pi}()),i=o(Hi()),a=o(function(){if(Sl)return Vi;Sl=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.normalizeArgs=t;const e=Pl();function t(t){let r,n,o,s;const i=Array.prototype.slice.call(t);"function"==typeof i[i.length-1]&&(s=i.pop()),"string"==typeof i[0]?(r=i[0],"object"==typeof i[2]?(n=i[1],o=i[2]):(n=void 0,o=i[1])):(r="",n=i[0],o=i[1]);try{o=(0,e.getNewOptions)(o)}catch(a){console.error(`JSON Schema Ref Parser: Error normalizing options: ${a}`)}return o.mutateInputSchema||"object"!=typeof n||(n=JSON.parse(JSON.stringify(n))),{path:r,schema:n,options:o,callback:s}}return Vi.default=t,Vi}());e.jsonSchemaParserNormalizeArgs=a.default;const l=o(Al()),c=o(Rl()),d=o(function(){if(Nl)return Ml;Nl=1;var e=Ml&&Ml.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=Ml&&Ml.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Ml&&Ml.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n},n=Ml&&Ml.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ml,"__esModule",{value:!0});const o=n(zi()),s=n(qi()),i=nt,a=r(Ti()),l=Mi();function c(e,t,r,n,i,a,u,h,f){var m;let g;const y={value:e,circular:!1};if(h&&h.timeoutMs&&Date.now()-f>h.timeoutMs)throw new l.TimeoutError(h.timeoutMs);const v=h.dereference||{},b=v.excludedPathMatcher||(()=>!1);if(("ignore"===(null==v?void 0:v.circular)||!i.has(e))&&e&&"object"==typeof e&&!ArrayBuffer.isView(e)&&!b(r)){if(n.add(e),i.add(e),o.default.isAllowed$Ref(e,h))g=d(e,t,r,n,i,a,u,h,f),y.circular=g.circular,y.value=g.value;else for(const l of Object.keys(e)){const $=s.default.join(t,l),x=s.default.join(r,l);if(b(x))continue;const w=e[l];let _=!1;o.default.isAllowed$Ref(w,h)?(g=d(w,$,x,n,i,a,u,h,f),_=g.circular,e[l]!==g.value&&(e[l]=g.value,null==(m=null==v?void 0:v.onDereference)||m.call(v,w.$ref,e[l],e,l))):n.has(w)?_=p($,u,h):(g=c(w,$,x,n,i,a,u,h,f),_=g.circular,e[l]!==g.value&&(e[l]=g.value)),y.circular=y.circular||_}n.delete(e)}return y}function d(e,t,r,n,s,i,l,d,u){var h,f;const m=o.default.isExternal$Ref(e)&&"root"===(null==(h=null==d?void 0:d.dereference)?void 0:h.externalReferenceResolution),g=a.resolve(m?a.cwd():t,e.$ref),y=i.get(g);if(y&&!y.circular){const t=Object.keys(e);if(t.length>1){const r={};for(const n of t)"$ref"===n||n in y.value||(r[n]=e[n]);return{circular:y.circular,value:Object.assign({},y.value,r)}}return y}const v=l._resolve(g,t,d);if(null===v)return{circular:!1,value:null};const b=v.circular;let $=b||n.has(v.value);$&&p(t,l,d);let x=o.default.dereference(e,v.value);if(!$){const e=c(x,v.path,r,n,s,i,l,d,u);$=e.circular,x=e.value}$&&!b&&"ignore"===(null==(f=d.dereference)?void 0:f.circular)&&(x=e),b&&(x.$ref=r);const w={circular:$,value:x};return 1===Object.keys(e).length&&i.set(g,w),w}function p(e,t,r){if(t.circular=!0,!r.dereference.circular)throw i.ono.reference(`Circular $ref pointer found at ${e}`);return!0}return Ml.default=function(e,t){const r=Date.now(),n=c(e.schema,e.$refs._root$Ref.path,"#",new Set,new Set,new Map,e.$refs,t,r);e.$refs.circular=n.circular,e.schema=n.value},Ml}());e.dereferenceInternal=d.default;const p=n(Ti()),u=Mi();Object.defineProperty(e,"JSONParserError",{enumerable:!0,get:function(){return u.JSONParserError}}),Object.defineProperty(e,"InvalidPointerError",{enumerable:!0,get:function(){return u.InvalidPointerError}}),Object.defineProperty(e,"MissingPointerError",{enumerable:!0,get:function(){return u.MissingPointerError}}),Object.defineProperty(e,"ResolverError",{enumerable:!0,get:function(){return u.ResolverError}}),Object.defineProperty(e,"ParserError",{enumerable:!0,get:function(){return u.ParserError}}),Object.defineProperty(e,"UnmatchedParserError",{enumerable:!0,get:function(){return u.UnmatchedParserError}}),Object.defineProperty(e,"UnmatchedResolverError",{enumerable:!0,get:function(){return u.UnmatchedResolverError}}),Object.defineProperty(e,"isHandledError",{enumerable:!0,get:function(){return u.isHandledError}}),Object.defineProperty(e,"JSONParserErrorGroup",{enumerable:!0,get:function(){return u.JSONParserErrorGroup}});const h=nt,f=o(Zl()),m=Pl();Object.defineProperty(e,"getJsonSchemaRefParserDefaultOptions",{enumerable:!0,get:function(){return m.getJsonSchemaRefParserDefaultOptions}});class g{constructor(){this.schema=null,this.$refs=new s.default}async parse(){const e=(0,a.default)(arguments);let t;if(!e.path&&!e.schema){const t=(0,h.ono)(`Expected a file path, URL, or object. Got ${e.path||e.schema}`);return(0,f.default)(e.callback,Promise.reject(t))}this.schema=null,this.$refs=new s.default;let r="http";if(p.isFileSystemPath(e.path))e.path=p.fromFileSystemPath(e.path),r="file";else if(!e.path&&e.schema&&"$id"in e.schema&&e.schema.$id){const t=p.parse(e.schema.$id),r="https:"===t.protocol?443:80;e.path=`${t.protocol}//${t.hostname}:${r}`}if(e.path=p.resolve(p.cwd(),e.path),e.schema&&"object"==typeof e.schema){const n=this.$refs._add(e.path);n.value=e.schema,n.pathType=r,t=Promise.resolve(e.schema)}else t=(0,i.default)(e.path,this.$refs,e.options);try{const r=await t;if(null===r||"object"!=typeof r||Buffer.isBuffer(r)){if(e.options.continueOnError)return this.schema=null,(0,f.default)(e.callback,Promise.resolve(this.schema));throw h.ono.syntax(`"${this.$refs._root$Ref.path||r}" is not a valid JSON Schema`)}return this.schema=r,(0,f.default)(e.callback,Promise.resolve(this.schema))}catch(n){return e.options.continueOnError&&(0,u.isHandledError)(n)?(this.$refs._$refs[p.stripHash(e.path)]&&this.$refs._$refs[p.stripHash(e.path)].addError(n),(0,f.default)(e.callback,Promise.resolve(null))):(0,f.default)(e.callback,Promise.reject(n))}}static parse(){const e=new g;return e.parse.apply(e,arguments)}async resolve(){const e=(0,a.default)(arguments);try{return await this.parse(e.path,e.schema,e.options),await(0,l.default)(this,e.options),y(this),(0,f.default)(e.callback,Promise.resolve(this.$refs))}catch(t){return(0,f.default)(e.callback,Promise.reject(t))}}static resolve(){const e=new g;return e.resolve.apply(e,arguments)}static bundle(){const e=new g;return e.bundle.apply(e,arguments)}async bundle(){const e=(0,a.default)(arguments);try{return await this.resolve(e.path,e.schema,e.options),(0,c.default)(this,e.options),y(this),(0,f.default)(e.callback,Promise.resolve(this.schema))}catch(t){return(0,f.default)(e.callback,Promise.reject(t))}}static dereference(){const e=new g;return e.dereference.apply(e,arguments)}async dereference(){const e=(0,a.default)(arguments);try{return await this.resolve(e.path,e.schema,e.options),(0,d.default)(this,e.options),y(this),(0,f.default)(e.callback,Promise.resolve(this.schema))}catch(t){return(0,f.default)(e.callback,Promise.reject(t))}}}function y(e){if(u.JSONParserErrorGroup.getParserErrors(e).length>0)throw new u.JSONParserErrorGroup(e)}e.$RefParser=g,e.default=g,e.parse=g.parse,e.resolve=g.resolve,e.bundle=g.bundle,e.dereference=g.dereference}(di)),di}function Ql(){if(Vl)return Fl;Vl=1;var e=Hl?Bl:(Hl=1,Bl="object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:"function"==typeof setImmediate?setImmediate:function(e){setTimeout(e,0)});return Fl=function(t,r){return t?void r.then(function(r){e(function(){t(null,r)})},function(r){e(function(){t(r)})}):r}}var Xl=function(){if(Jl)return Gl;Jl=1;const e=li(),t=ci(),{jsonSchemaParserNormalizeArgs:r}=Yl(),n=Le(),o=function(){if(Dl)return Ul;Dl=1;const{getJsonSchemaRefParserDefaultOptions:e}=Yl(),t=li(),r=ci();function n(e,t){if(o(t)){const r=Object.keys(t).filter(e=>!["__proto__","constructor","prototype"].includes(e));for(let s=0;s<r.length;s++){const i=r[s],a=t[i],l=e[i];o(a)?e[i]=n(l||{},a):void 0!==a&&(e[i]=a)}}return e}function o(e){return e&&"object"==typeof e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function s(t){const r=n(e(),s.defaults);return n(r,t)}return Ul=s,s.defaults={validate:{schema:t,spec:r}},Ul}(),s=Ql(),{ono:i}=nt,{$RefParser:a}=Yl(),{dereferenceInternal:l}=Yl(),c=["3.1.0","3.1.1"],d=[...c,"3.0.0","3.0.1","3.0.2","3.0.3","3.0.4"];class p extends a{async parse(e,t,a,l){let p=r(arguments);p.options=new o(p.options);try{let e=await super.parse(p.path,p.schema,p.options);if(e.swagger){if(void 0===e.swagger||void 0===e.info||void 0===e.paths)throw i.syntax(`${p.path||p.schema} is not a valid Swagger API definition`);if("number"==typeof e.swagger)throw i.syntax('Swagger version number must be a string (e.g. "2.0") not a number.');if("number"==typeof e.info.version)throw i.syntax('API version number must be a string (e.g. "1.0.0") not a number.');if("2.0"!==e.swagger)throw i.syntax(`Unrecognized Swagger version: ${e.swagger}. Expected 2.0`)}else{if(void 0===e.openapi||void 0===e.info)throw i.syntax(`${p.path||p.schema} is not a valid Openapi API definition`);if(void 0===e.paths){if(-1===c.indexOf(e.openapi))throw i.syntax(`${p.path||p.schema} is not a valid Openapi API definition`);if(void 0===e.webhooks)throw i.syntax(`${p.path||p.schema} is not a valid Openapi API definition`)}else{if("number"==typeof e.openapi)throw i.syntax('Openapi version number must be a string (e.g. "3.0.0") not a number.');if("number"==typeof e.info.version)throw i.syntax('API version number must be a string (e.g. "1.0.0") not a number.');if(-1===d.indexOf(e.openapi))throw i.syntax(`Unsupported OpenAPI version: ${e.openapi}. Swagger Parser only supports versions ${d.join(", ")}`)}n.fixOasRelativeServers(e,p.path)}return s(p.callback,Promise.resolve(e))}catch(u){return s(p.callback,Promise.reject(u))}}async validate(n,a,c,d){let p=this,u=r(arguments);u.options=new o(u.options);let h=u.options.dereference.circular;u.options.validate.schema&&(u.options.dereference.circular="ignore");try{if(await this.dereference(u.path,u.schema,u.options),u.options.dereference.circular=h,u.options.validate.schema&&(e(p.api),p.$refs.circular))if(!0===h)l(p,u.options);else if(!1===h)throw i.reference("The API contains circular references");return u.options.validate.spec&&t(p.api),s(u.callback,Promise.resolve(p.schema))}catch(f){return s(u.callback,Promise.reject(f))}}}Object.defineProperty(p.prototype,"api",{configurable:!0,enumerable:!0,get(){return this.schema}});const u=p;return u.validate=(...e)=>(new p).validate(...e),u.dereference=(...e)=>(new p).dereference(...e),u.bundle=(...e)=>(new p).bundle(...e),u.parse=(...e)=>(new p).parse(...e),u.resolve=(...e)=>(new p).resolve(...e),u.default=u,u.SwaggerParser=u,Gl=u}();const ec=s(Xl),tc=["get","post","put","delete","patch","options","head","trace"];async function rc(e){return function(e){var t;const r=e.info,n=(e.servers??[]).map(nc),o=function(e){const t=[],r=e.components;if(!(null==r?void 0:r.securitySchemes))return t;for(const[n,o]of Object.entries(r.securitySchemes)){const e=o;t.push({key:n,type:e.type,name:e.name,in:e.in,scheme:e.scheme,bearerFormat:e.bearerFormat,description:e.description??""})}return t}(e),s=e.security??[],i=new Map,a=new Map;for(const m of e.tags??[])a.set(m.name,m.description??"");const l=[];let c=0;const d=e.paths??{};for(const[m,g]of Object.entries(d)){if(!g)continue;const e=g,r=e.parameters??[];for(const o of tc){const a=e[o];if(!a)continue;const d=a.operationId||`unnamed-${++c}-${o}-${m}`,p=(null==(t=a.tags)?void 0:t.length)?a.tags:["default"],u=oc(d,m,o,a,r,n,s);l.push(u);for(const e of p)i.has(e)||i.set(e,[]),i.get(e).push(u)}}const p=(e.tags??[]).map(e=>e.name),u=new Set,h=[];for(const m of p){u.add(m);const e=i.get(m);(null==e?void 0:e.length)&&h.push({name:m,description:a.get(m)??"",operations:e})}for(const[m,g]of i)!u.has(m)&&g.length&&h.push({name:m,description:a.get(m)??"",operations:g});const f=e.externalDocs?{url:e.externalDocs.url,description:e.externalDocs.description??""}:null;return{title:r.title,version:r.version,description:r.description??"",contact:r.contact?{name:r.contact.name,url:r.contact.url,email:r.contact.email}:null,license:r.license?{name:r.license.name,url:r.license.url}:null,termsOfService:r.termsOfService??"",servers:n,securitySchemes:o,globalSecurity:s,tagGroups:h,allOperations:l,externalDocs:f,raw:e}}(await ec.dereference(e))}function nc(e){const t={};for(const[r,n]of Object.entries(e.variables??{}))t[r]={default:n.default,enum:n.enum,description:n.description??""};return{url:e.url,description:e.description??"",variables:t}}function oc(e,t,r,n,o,s,i){const a=new Map;for(const f of o)a.set(`${f.in}:${f.name}`,f);for(const f of n.parameters??[])a.set(`${f.in}:${f.name}`,f);const l=Array.from(a.values()).map(e=>{var t;return{name:e.name,in:e.in,required:e.required??!1,deprecated:e.deprecated??!1,description:e.description??"",schema:e.schema??null,example:e.example??(null==(t=e.schema)?void 0:t.example)??void 0}});let c=null;if(n.requestBody){const e=n.requestBody;c={required:e.required??!1,description:e.description??"",content:sc(e.content)}}const d=[];for(const[f,m]of Object.entries(n.responses??{})){const e=m,t={};for(const[r,n]of Object.entries(e.headers??{})){const e=n;t[r]={description:e.description??"",schema:e.schema??null}}d.push({statusCode:f,description:e.description??"",headers:t,content:e.content?sc(e.content):[]})}d.sort((e,t)=>"default"===e.statusCode?1:"default"===t.statusCode?-1:e.statusCode.localeCompare(t.statusCode));const p=[],u=n["x-codeSamples"]??n["x-code-samples"];if(Array.isArray(u))for(const f of u)f&&"object"==typeof f&&"lang"in f&&"source"in f&&p.push({lang:String(f.lang),label:String(f.label??f.lang),source:String(f.source)});const h=(n.servers??[]).map(nc);return{operationId:e,path:t,method:r,summary:n.summary??"",description:n.description??"",tags:n.tags??["default"],deprecated:n.deprecated??!1,parameters:l,requestBody:c,responses:d,security:n.security??i,servers:h.length>0?h:s,codeSamples:p}}function sc(e){return Object.entries(e).map(([e,t])=>({mediaType:e,schema:t.schema??null,example:t.example??void 0,examples:t.examples?Object.fromEntries(Object.entries(t.examples).map(([e,t])=>[e,t.value??t])):{}}))}const ic="KEYS",ac="VALUES",lc="";class cc{constructor(e,t){const r=e._tree,n=Array.from(r.keys());this.set=e,this._type=t,this._path=n.length>0?[{node:r,keys:n}]:[]}next(){const e=this.dive();return this.backtrack(),e}dive(){if(0===this._path.length)return{done:!0,value:void 0};const{node:e,keys:t}=dc(this._path);if(dc(t)===lc)return{done:!1,value:this.result()};const r=e.get(dc(t));return this._path.push({node:r,keys:Array.from(r.keys())}),this.dive()}backtrack(){if(0===this._path.length)return;const e=dc(this._path).keys;e.pop(),e.length>0||(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>dc(e)).filter(e=>e!==lc).join("")}value(){return dc(this._path).node.get(lc)}result(){switch(this._type){case ac:return this.value();case ic:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const dc=e=>e[e.length-1],pc=(e,t,r,n,o,s,i,a)=>{const l=s*i;e:for(const c of e.keys())if(c===lc){const t=o[l-1];t<=r&&n.set(a,[e.get(c),t])}else{let l=s;for(let e=0;e<c.length;++e,++l){const n=c[e],s=i*l,a=s-i;let d=o[s];const p=Math.max(0,l-r-1),u=Math.min(i-1,l+r);for(let e=p;e<u;++e){const r=n!==t[e],i=o[a+e]+ +r,l=o[a+e+1]+1,c=o[s+e]+1,p=o[s+e+1]=Math.min(i,l,c);p<d&&(d=p)}if(d>r)continue e}pc(e.get(c),t,r,n,o,l,i,a+c)}};class uc{constructor(e=new Map,t=""){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");const[t,r]=hc(this._tree,e.slice(this._prefix.length));if(void 0===t){const[t,n]=bc(r);for(const r of t.keys())if(r!==lc&&r.startsWith(n)){const o=new Map;return o.set(r.slice(n.length),t.get(r)),new uc(o,e)}}return new uc(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,gc(this._tree,e)}entries(){return new cc(this,"ENTRIES")}forEach(e){for(const[t,r]of this)e(t,r,this)}fuzzyGet(e,t){return((e,t,r)=>{const n=new Map;if(void 0===t)return n;const o=t.length+1,s=o+r,i=new Uint8Array(s*o).fill(r+1);for(let a=0;a<o;++a)i[a]=a;for(let a=1;a<s;++a)i[a*o]=a;return pc(e,t,r,n,i,1,o,""),n})(this._tree,e,t)}get(e){const t=fc(this._tree,e);return void 0!==t?t.get(lc):void 0}has(e){const t=fc(this._tree,e);return void 0!==t&&t.has(lc)}keys(){return new cc(this,ic)}set(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;return mc(this._tree,e).set(lc,t),this}get size(){if(this._size)return this._size;this._size=0;const e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;const r=mc(this._tree,e);return r.set(lc,t(r.get(lc))),this}fetch(e,t){if("string"!=typeof e)throw new Error("key must be a string");this._size=void 0;const r=mc(this._tree,e);let n=r.get(lc);return void 0===n&&r.set(lc,n=t()),n}values(){return new cc(this,ac)}[Symbol.iterator](){return this.entries()}static from(e){const t=new uc;for(const[r,n]of e)t.set(r,n);return t}static fromObject(e){return uc.from(Object.entries(e))}}const hc=(e,t,r=[])=>{if(0===t.length||null==e)return[e,r];for(const n of e.keys())if(n!==lc&&t.startsWith(n))return r.push([e,n]),hc(e.get(n),t.slice(n.length),r);return r.push([e,t]),hc(void 0,"",r)},fc=(e,t)=>{if(0===t.length||null==e)return e;for(const r of e.keys())if(r!==lc&&t.startsWith(r))return fc(e.get(r),t.slice(r.length))},mc=(e,t)=>{const r=t.length;e:for(let n=0;e&&n<r;){for(const s of e.keys())if(s!==lc&&t[n]===s[0]){const o=Math.min(r-n,s.length);let i=1;for(;i<o&&t[n+i]===s[i];)++i;const a=e.get(s);if(i===s.length)e=a;else{const r=new Map;r.set(s.slice(i),a),e.set(t.slice(n,n+i),r),e.delete(s),e=r}n+=i;continue e}const o=new Map;return e.set(t.slice(n),o),o}return e},gc=(e,t)=>{const[r,n]=hc(e,t);if(void 0!==r)if(r.delete(lc),0===r.size)yc(n);else if(1===r.size){const[e,t]=r.entries().next().value;vc(n,e,t)}},yc=e=>{if(0===e.length)return;const[t,r]=bc(e);if(t.delete(r),0===t.size)yc(e.slice(0,-1));else if(1===t.size){const[r,n]=t.entries().next().value;r!==lc&&vc(e.slice(0,-1),r,n)}},vc=(e,t,r)=>{if(0===e.length)return;const[n,o]=bc(e);n.set(o+t,r),n.delete(o)},bc=e=>e[e.length-1],$c="or",xc="and",wc="and_not";class _c{constructor(e){if(null==(null==e?void 0:e.fields))throw new Error('MiniSearch: option "fields" must be provided');const t=null==e.autoVacuum||!0===e.autoVacuum?Ic:e.autoVacuum;this._options={...Pc,...e,autoVacuum:t,searchOptions:{...Ec,...e.searchOptions||{}},autoSuggestOptions:{...Tc,...e.autoSuggestOptions||{}}},this._index=new uc,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=Cc,this.addFields(this._options.fields)}add(e){const{extractField:t,stringifyField:r,tokenize:n,processTerm:o,fields:s,idField:i}=this._options,a=t(e,i);if(null==a)throw new Error(`MiniSearch: document does not have ID field "${i}"`);if(this._idToShortId.has(a))throw new Error(`MiniSearch: duplicate ID ${a}`);const l=this.addDocumentId(a);this.saveStoredFields(l,e);for(const c of s){const s=t(e,c);if(null==s)continue;const i=n(r(s,c),c),a=this._fieldIds[c],d=new Set(i).size;this.addFieldLength(l,a,this._documentCount-1,d);for(const e of i){const t=o(e,c);if(Array.isArray(t))for(const e of t)this.addTerm(a,l,e);else t&&this.addTerm(a,l,t)}}}addAll(e){for(const t of e)this.add(t)}addAllAsync(e,t={}){const{chunkSize:r=10}=t,n={chunk:[],promise:Promise.resolve()},{chunk:o,promise:s}=e.reduce(({chunk:e,promise:t},n,o)=>(e.push(n),(o+1)%r===0?{chunk:[],promise:t.then(()=>new Promise(e=>setTimeout(e,0))).then(()=>this.addAll(e))}:{chunk:e,promise:t}),n);return s.then(()=>this.addAll(o))}remove(e){const{tokenize:t,processTerm:r,extractField:n,stringifyField:o,fields:s,idField:i}=this._options,a=n(e,i);if(null==a)throw new Error(`MiniSearch: document does not have ID field "${i}"`);const l=this._idToShortId.get(a);if(null==l)throw new Error(`MiniSearch: cannot remove document with ID ${a}: it is not in the index`);for(const c of s){const s=n(e,c);if(null==s)continue;const i=t(o(s,c),c),a=this._fieldIds[c],d=new Set(i).size;this.removeFieldLength(l,a,this._documentCount,d);for(const e of i){const t=r(e,c);if(Array.isArray(t))for(const e of t)this.removeTerm(a,l,e);else t&&this.removeTerm(a,l,t)}}this._storedFields.delete(l),this._documentIds.delete(l),this._idToShortId.delete(a),this._fieldLength.delete(l),this._documentCount-=1}removeAll(e){if(e)for(const t of e)this.remove(t);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new uc,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){const t=this._idToShortId.get(e);if(null==t)throw new Error(`MiniSearch: cannot discard document with ID ${e}: it is not in the index`);this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEach((e,r)=>{this.removeFieldLength(t,r,this._documentCount,e)}),this._fieldLength.delete(t),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(!1===this._options.autoVacuum)return;const{minDirtFactor:e,minDirtCount:t,batchSize:r,batchWait:n}=this._options.autoVacuum;this.conditionalVacuum({batchSize:r,batchWait:n},{minDirtCount:t,minDirtFactor:e})}discardAll(e){const t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const t of e)this.discard(t)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){const{idField:t,extractField:r}=this._options,n=r(e,t);this.discard(n),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,null!=this._enqueuedVacuum||(this._enqueuedVacuum=this._currentVacuum.then(()=>{const t=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=Cc,this.performVacuuming(e,t)})),this._enqueuedVacuum):!1===this.vacuumConditionsMet(t)?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}async performVacuuming(e,t){const r=this._dirtCount;if(this.vacuumConditionsMet(t)){const t=e.batchSize||Ac.batchSize,n=e.batchWait||Ac.batchWait;let o=1;for(const[e,r]of this._index){for(const[e,t]of r)for(const[n]of t)this._documentIds.has(n)||(t.size<=1?r.delete(e):t.delete(n));0===this._index.get(e).size&&this._index.delete(e),o%t===0&&await new Promise(e=>setTimeout(e,n)),o+=1}this._dirtCount-=r}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(e){if(null==e)return!0;let{minDirtCount:t,minDirtFactor:r}=e;return t=t||Ic.minDirtCount,r=r||Ic.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=r}get isVacuuming(){return null!=this._currentVacuum}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){const t=this._idToShortId.get(e);if(null!=t)return this._storedFields.get(t)}search(e,t={}){const{searchOptions:r}=this._options,n={...r,...t},o=this.executeQuery(e,t),s=[];for(const[i,{score:a,terms:l,match:c}]of o){const e=l.length||1,t={id:this._documentIds.get(i),score:a*e,terms:Object.keys(c),queryTerms:l,match:c};Object.assign(t,this._storedFields.get(i)),(null==n.filter||n.filter(t))&&s.push(t)}return e===_c.wildcard&&null==n.boostDocument||s.sort(Mc),s}autoSuggest(e,t={}){t={...this._options.autoSuggestOptions,...t};const r=new Map;for(const{score:o,terms:s}of this.search(e,t)){const e=s.join(" "),t=r.get(e);null!=t?(t.score+=o,t.count+=1):r.set(e,{score:o,terms:s,count:1})}const n=[];for(const[o,{score:s,terms:i,count:a}]of r)n.push({suggestion:o,terms:i,score:s/a});return n.sort(Mc),n}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,t){if(null==t)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),t)}static async loadJSONAsync(e,t){if(null==t)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),t)}static getDefault(e){if(Pc.hasOwnProperty(e))return kc(Pc,e);throw new Error(`MiniSearch: unknown option "${e}"`)}static loadJS(e,t){const{index:r,documentIds:n,fieldLength:o,storedFields:s,serializationVersion:i}=e,a=this.instantiateMiniSearch(e,t);a._documentIds=zc(n),a._fieldLength=zc(o),a._storedFields=zc(s);for(const[l,c]of a._documentIds)a._idToShortId.set(c,l);for(const[l,c]of r){const e=new Map;for(const t of Object.keys(c)){let r=c[t];1===i&&(r=r.ds),e.set(parseInt(t,10),zc(r))}a._index.set(l,e)}return a}static async loadJSAsync(e,t){const{index:r,documentIds:n,fieldLength:o,storedFields:s,serializationVersion:i}=e,a=this.instantiateMiniSearch(e,t);a._documentIds=await Lc(n),a._fieldLength=await Lc(o),a._storedFields=await Lc(s);for(const[c,d]of a._documentIds)a._idToShortId.set(d,c);let l=0;for(const[c,d]of r){const e=new Map;for(const t of Object.keys(d)){let r=d[t];1===i&&(r=r.ds),e.set(parseInt(t,10),await Lc(r))}++l%1e3==0&&await Uc(0),a._index.set(c,e)}return a}static instantiateMiniSearch(e,t){const{documentCount:r,nextId:n,fieldIds:o,averageFieldLength:s,dirtCount:i,serializationVersion:a}=e;if(1!==a&&2!==a)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const l=new _c(t);return l._documentCount=r,l._nextId=n,l._idToShortId=new Map,l._fieldIds=o,l._avgFieldLength=s,l._dirtCount=i||0,l._index=new uc,l}executeQuery(e,t={}){if(e===_c.wildcard)return this.executeWildcardQuery(t);if("string"!=typeof e){const r={...t,...e,queries:void 0},n=e.queries.map(e=>this.executeQuery(e,r));return this.combineResults(n,r.combineWith)}const{tokenize:r,processTerm:n,searchOptions:o}=this._options,s={tokenize:r,processTerm:n,...o,...t},{tokenize:i,processTerm:a}=s,l=i(e).flatMap(e=>a(e)).filter(e=>!!e).map(jc(s)).map(e=>this.executeQuerySpec(e,s));return this.combineResults(l,s.combineWith)}executeQuerySpec(e,t){const r={...this._options.searchOptions,...t},n=(r.fields||this._options.fields).reduce((e,t)=>({...e,[t]:kc(r.boost,t)||1}),{}),{boostDocument:o,weights:s,maxFuzzy:i,bm25:a}=r,{fuzzy:l,prefix:c}={...Ec.weights,...s},d=this._index.get(e.term),p=this.termResults(e.term,e.term,1,e.termBoost,d,n,o,a);let u,h;if(e.prefix&&(u=this._index.atPrefix(e.term)),e.fuzzy){const t=!0===e.fuzzy?.2:e.fuzzy,r=t<1?Math.min(i,Math.round(e.term.length*t)):t;r&&(h=this._index.fuzzyGet(e.term,r))}if(u)for(const[f,m]of u){const t=f.length-e.term.length;if(!t)continue;null==h||h.delete(f);const r=c*f.length/(f.length+.3*t);this.termResults(e.term,f,r,e.termBoost,m,n,o,a,p)}if(h)for(const f of h.keys()){const[t,r]=h.get(f);if(!r)continue;const s=l*f.length/(f.length+r);this.termResults(e.term,f,s,e.termBoost,t,n,o,a,p)}return p}executeWildcardQuery(e){const t=new Map,r={...this._options.searchOptions,...e};for(const[n,o]of this._documentIds){const e=r.boostDocument?r.boostDocument(o,"",this._storedFields.get(n)):1;t.set(n,{score:e,terms:[],match:{}})}return t}combineResults(e,t=$c){if(0===e.length)return new Map;const r=t.toLowerCase(),n=Sc[r];if(!n)throw new Error(`Invalid combination operator: ${t}`);return e.reduce(n)||new Map}toJSON(){const e=[];for(const[t,r]of this._index){const n={};for(const[e,t]of r)n[e]=Object.fromEntries(t);e.push([t,n])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,t,r,n,o,s,i,a,l=new Map){if(null==o)return l;for(const c of Object.keys(s)){const d=s[c],p=this._fieldIds[c],u=o.get(p);if(null==u)continue;let h=u.size;const f=this._avgFieldLength[p];for(const o of u.keys()){if(!this._documentIds.has(o)){this.removeTerm(p,o,t),h-=1;continue}const s=i?i(this._documentIds.get(o),t,this._storedFields.get(o)):1;if(!s)continue;const m=u.get(o),g=this._fieldLength.get(o)[p],y=r*n*d*s*Oc(m,h,this._documentCount,g,f,a),v=l.get(o);if(v){v.score+=y,Rc(v.terms,e);const r=kc(v.match,t);r?r.push(c):v.match[t]=[c]}else l.set(o,{score:y,terms:[e],match:{[t]:[c]}})}}return l}addTerm(e,t,r){const n=this._index.fetch(r,qc);let o=n.get(e);if(null==o)o=new Map,o.set(t,1),n.set(e,o);else{const e=o.get(t);o.set(t,(e||0)+1)}}removeTerm(e,t,r){if(!this._index.has(r))return void this.warnDocumentChanged(t,e,r);const n=this._index.fetch(r,qc),o=n.get(e);null==o||null==o.get(t)?this.warnDocumentChanged(t,e,r):o.get(t)<=1?o.size<=1?n.delete(e):o.delete(t):o.set(t,o.get(t)-1),0===this._index.get(r).size&&this._index.delete(r)}warnDocumentChanged(e,t,r){for(const n of Object.keys(this._fieldIds))if(this._fieldIds[n]===t)return void this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(e)} has changed before removal: term "${r}" was not present in field "${n}". Removing a document after it has changed can corrupt the index!`,"version_conflict")}addDocumentId(e){const t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;t<e.length;t++)this._fieldIds[e[t]]=t}addFieldLength(e,t,r,n){let o=this._fieldLength.get(e);null==o&&this._fieldLength.set(e,o=[]),o[t]=n;const s=(this._avgFieldLength[t]||0)*r+n;this._avgFieldLength[t]=s/(r+1)}removeFieldLength(e,t,r,n){if(1===r)return void(this._avgFieldLength[t]=0);const o=this._avgFieldLength[t]*r-n;this._avgFieldLength[t]=o/(r-1)}saveStoredFields(e,t){const{storeFields:r,extractField:n}=this._options;if(null==r||0===r.length)return;let o=this._storedFields.get(e);null==o&&this._storedFields.set(e,o={});for(const s of r){const e=n(t,s);void 0!==e&&(o[s]=e)}}}_c.wildcard=Symbol("*");const kc=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0,Sc={[$c]:(e,t)=>{for(const r of t.keys()){const n=e.get(r);if(null==n)e.set(r,t.get(r));else{const{score:e,terms:o,match:s}=t.get(r);n.score=n.score+e,n.match=Object.assign(n.match,s),Nc(n.terms,o)}}return e},[xc]:(e,t)=>{const r=new Map;for(const n of t.keys()){const o=e.get(n);if(null==o)continue;const{score:s,terms:i,match:a}=t.get(n);Nc(o.terms,i),r.set(n,{score:o.score+s,terms:o.terms,match:Object.assign(o.match,a)})}return r},[wc]:(e,t)=>{for(const r of t.keys())e.delete(r);return e}},Oc=(e,t,r,n,o,s)=>{const{k:i,b:a,d:l}=s;return Math.log(1+(r-t+.5)/(t+.5))*(l+e*(i+1)/(e+i*(1-a+a*n/o)))},jc=e=>(t,r,n)=>({term:t,fuzzy:"function"==typeof e.fuzzy?e.fuzzy(t,r,n):e.fuzzy||!1,prefix:"function"==typeof e.prefix?e.prefix(t,r,n):!0===e.prefix,termBoost:"function"==typeof e.boostTerm?e.boostTerm(t,r,n):1}),Pc={idField:"id",extractField:(e,t)=>e[t],stringifyField:(e,t)=>e.toString(),tokenize:e=>e.split(Dc),processTerm:e=>e.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(e,t)=>{"function"==typeof(null===console||void 0===console?void 0:console[e])&&console[e](t)},autoVacuum:!0},Ec={combineWith:$c,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:{k:1.2,b:.7,d:.5}},Tc={combineWith:"and",prefix:(e,t,r)=>t===r.length-1},Ac={batchSize:1e3,batchWait:10},Cc={minDirtFactor:.1,minDirtCount:20},Ic={...Ac,...Cc},Rc=(e,t)=>{e.includes(t)||e.push(t)},Nc=(e,t)=>{for(const r of t)e.includes(r)||e.push(r)},Mc=({score:e},{score:t})=>t-e,qc=()=>new Map,zc=e=>{const t=new Map;for(const r of Object.keys(e))t.set(parseInt(r,10),e[r]);return t},Lc=async e=>{const t=new Map;let r=0;for(const n of Object.keys(e))t.set(parseInt(n,10),e[n]),++r%1e3==0&&await Uc(0);return t},Uc=e=>new Promise(t=>setTimeout(t,e)),Dc=/[\n\r\p{Z}\p{P}]+/u;function Bc(e,t){const r=new _c({fields:["operationId","summary","description","path","method","tags"],storeFields:["operationId","summary","path","method","tags"],searchOptions:{prefix:!0,fuzzy:.2,boost:{summary:3,operationId:2,tags:2,path:1.5}}}),n=e.map(e=>({id:e.operationId,operationId:e.operationId,summary:e.summary,description:e.description,path:e.path,method:e.method,tags:e.tags.join(" ")}));r.addAll(n);let o=null;if(null==t?void 0:t.length){o=new _c({fields:["title","category","content"],storeFields:["slug","title","category"],searchOptions:{prefix:!0,fuzzy:.2,boost:{title:3,category:1.5,content:1}}});const e=t.map(e=>({id:`guide-${e.slug}`,slug:e.slug,title:e.title,category:e.category||"General",content:e.content||""}));o.addAll(e)}return{search(e){if(!e.trim())return[];return[...r.search(e).map(e=>({type:"operation",operationId:e.operationId,path:e.path,method:e.method,summary:e.summary,tags:e.tags.split(" ").filter(Boolean),score:e.score})),...o?o.search(e).map(e=>({type:"guide",slug:e.slug,title:e.title,category:e.category,score:e.score})):[]].sort((e,t)=>t.score-e.score)},autoSuggest(e){if(!e.trim())return[];const t=r.autoSuggest(e).map(e=>e.suggestion),n=o?o.autoSuggest(e).map(e=>e.suggestion):[];return[...new Set([...t,...n])]}}}class Hc{constructor(e){this._onHashChange=()=>this.handleCurrentRoute(),this._callback=e}init(){window.addEventListener("hashchange",this._onHashChange)}destroy(){window.removeEventListener("hashchange",this._onHashChange)}handleCurrentRoute(){const e=window.location.hash;if(!e)return;const t=e.match(/^#\/operation\/(.+)$/);if(t)return void this._callback({type:"operation",id:decodeURIComponent(t[1])});const r=e.match(/^#\/guide\/(.+)$/);r&&this._callback({type:"guide",slug:decodeURIComponent(r[1])})}navigateTo(e){const t=`#/operation/${encodeURIComponent(e)}`;window.location.hash!==t?window.location.hash=t:this._callback({type:"operation",id:e})}navigateToGuide(e){const t=`#/guide/${encodeURIComponent(e)}`;window.location.hash!==t?window.location.hash=t:this._callback({type:"guide",slug:e})}static buildHash(e){return`#/operation/${encodeURIComponent(e)}`}static buildGuideHash(e){return`#/guide/${encodeURIComponent(e)}`}}function Fc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Vc={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Gc(e){Vc=e}var Jc={exec:()=>null};function Wc(e,t=""){let r="string"==typeof e?e:e.source;const n={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(Kc.caret,"$1"),r=r.replace(e,o),n},getRegex:()=>new RegExp(r,t)};return n}var Kc={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Zc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Yc=/(?:[*+-]|\d{1,9}[.)])/,Qc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Xc=Wc(Qc).replace(/bull/g,Yc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ed=Wc(Qc).replace(/bull/g,Yc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),td=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rd=/(?!\s*\])(?:\\.|[^\[\]\\])+/,nd=Wc(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",rd).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),od=Wc(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Yc).getRegex(),sd="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",id=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ad=Wc("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",id).replace("tag",sd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ld=Wc(td).replace("hr",Zc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sd).getRegex(),cd={blockquote:Wc(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ld).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:nd,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Zc,html:ad,lheading:Xc,list:od,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:ld,table:Jc,text:/^[^\n]+/},dd=Wc("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Zc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sd).getRegex(),pd={...cd,lheading:ed,table:dd,paragraph:Wc(td).replace("hr",Zc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",dd).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sd).getRegex()},ud={...cd,html:Wc("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",id).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Jc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Wc(td).replace("hr",Zc).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Xc).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},hd=/^( {2,}|\\)\n(?!\s*$)/,fd=/[\p{P}\p{S}]/u,md=/[\s\p{P}\p{S}]/u,gd=/[^\s\p{P}\p{S}]/u,yd=Wc(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,md).getRegex(),vd=/(?!~)[\p{P}\p{S}]/u,bd=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,$d=Wc(bd,"u").replace(/punct/g,fd).getRegex(),xd=Wc(bd,"u").replace(/punct/g,vd).getRegex(),wd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",_d=Wc(wd,"gu").replace(/notPunctSpace/g,gd).replace(/punctSpace/g,md).replace(/punct/g,fd).getRegex(),kd=Wc(wd,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,vd).getRegex(),Sd=Wc("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,gd).replace(/punctSpace/g,md).replace(/punct/g,fd).getRegex(),Od=Wc(/\\(punct)/,"gu").replace(/punct/g,fd).getRegex(),jd=Wc(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Pd=Wc(id).replace("(?:--\x3e|$)","--\x3e").getRegex(),Ed=Wc("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Pd).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Td=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ad=Wc(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Td).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Cd=Wc(/^!?\[(label)\]\[(ref)\]/).replace("label",Td).replace("ref",rd).getRegex(),Id=Wc(/^!?\[(ref)\](?:\[\])?/).replace("ref",rd).getRegex(),Rd={_backpedal:Jc,anyPunctuation:Od,autolink:jd,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:hd,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:Jc,emStrongLDelim:$d,emStrongRDelimAst:_d,emStrongRDelimUnd:Sd,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:Ad,nolink:Id,punctuation:yd,reflink:Cd,reflinkSearch:Wc("reflink|nolink(?!\\()","g").replace("reflink",Cd).replace("nolink",Id).getRegex(),tag:Ed,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:Jc},Nd={...Rd,link:Wc(/^!?\[(label)\]\((.*?)\)/).replace("label",Td).getRegex(),reflink:Wc(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Td).getRegex()},Md={...Rd,emStrongRDelimAst:kd,emStrongLDelim:xd,url:Wc(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},qd={...Md,br:Wc(hd).replace("{2,}","*").getRegex(),text:Wc(Md.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},zd={normal:cd,gfm:pd,pedantic:ud},Ld={normal:Rd,gfm:Md,breaks:qd,pedantic:Nd},Ud={"&":"&","<":"<",">":">",'"':""","'":"'"},Dd=e=>Ud[e];function Bd(e,t){if(t){if(Kc.escapeTest.test(e))return e.replace(Kc.escapeReplace,Dd)}else if(Kc.escapeTestNoEncode.test(e))return e.replace(Kc.escapeReplaceNoEncode,Dd);return e}function Hd(e){try{e=encodeURI(e).replace(Kc.percentDecode,"%")}catch{return null}return e}function Fd(e,t){var r;const n=e.replace(Kc.findPipe,(e,t,r)=>{let n=!1,o=t;for(;--o>=0&&"\\"===r[o];)n=!n;return n?"|":" |"}).split(Kc.splitPipe);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!(null==(r=n.at(-1))?void 0:r.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(Kc.slashPipe,"|");return n}function Vd(e,t,r){const n=e.length;if(0===n)return"";let o=0;for(;o<n;){if(e.charAt(n-o-1)!==t)break;o++}return e.slice(0,n-o)}function Gd(e,t,r,n,o){const s=t.href,i=t.title||null,a=e[1].replace(o.other.outputLinkReplace,"$1");n.state.inLink=!0;const l={type:"!"===e[0].charAt(0)?"image":"link",raw:r,href:s,title:i,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,l}var Jd=class{constructor(e){o(this,"options"),o(this,"rules"),o(this,"lexer"),this.options=e||Vc}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Vd(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],r=function(e,t,r){const n=e.match(r.other.indentCodeCompensation);if(null===n)return t;const o=n[1];return t.split("\n").map(e=>{const t=e.match(r.other.beginningSpace);if(null===t)return e;const[n]=t;return n.length>=o.length?e.slice(o.length):e}).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){const t=Vd(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Vd(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=Vd(t[0],"\n").split("\n"),r="",n="";const o=[];for(;e.length>0;){let t=!1;const s=[];let i;for(i=0;i<e.length;i++)if(this.rules.other.blockquoteStart.test(e[i]))s.push(e[i]),t=!0;else{if(t)break;s.push(e[i])}e=e.slice(i);const a=s.join("\n"),l=a.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${a}`:a,n=n?`${n}\n${l}`:l;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=c,0===e.length)break;const d=o.at(-1);if("code"===(null==d?void 0:d.type))break;if("blockquote"===(null==d?void 0:d.type)){const t=d,s=t.raw+"\n"+e.join("\n"),i=this.blockquote(s);o[o.length-1]=i,r=r.substring(0,r.length-t.raw.length)+i.raw,n=n.substring(0,n.length-t.text.length)+i.text;break}if("list"===(null==d?void 0:d.type)){const t=d,s=t.raw+"\n"+e.join("\n"),i=this.list(s);o[o.length-1]=i,r=r.substring(0,r.length-d.raw.length)+i.raw,n=n.substring(0,n.length-t.raw.length)+i.raw,e=s.substring(o.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:o,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const n=r.length>1,o={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const s=this.rules.other.listItemRegex(r);let i=!1;for(;e;){let r=!1,n="",a="";if(!(t=s.exec(e)))break;if(this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),c=e.split("\n",1)[0],d=!l.trim(),p=0;if(this.options.pedantic?(p=2,a=l.trimStart()):d?p=t[1].length+1:(p=t[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,a=l.slice(p),p+=t[1].length),d&&this.rules.other.blankLine.test(c)&&(n+=c+"\n",e=e.substring(c.length+1),r=!0),!r){const t=this.rules.other.nextBulletRegex(p),r=this.rules.other.hrRegex(p),o=this.rules.other.fencesBeginRegex(p),s=this.rules.other.headingBeginRegex(p),i=this.rules.other.htmlBeginRegex(p);for(;e;){const u=e.split("\n",1)[0];let h;if(c=u,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),h=c):h=c.replace(this.rules.other.tabCharGlobal," "),o.test(c))break;if(s.test(c))break;if(i.test(c))break;if(t.test(c))break;if(r.test(c))break;if(h.search(this.rules.other.nonSpaceChar)>=p||!c.trim())a+="\n"+h.slice(p);else{if(d)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(o.test(l))break;if(s.test(l))break;if(r.test(l))break;a+="\n"+c}d||c.trim()||(d=!0),n+=u+"\n",e=e.substring(u.length+1),l=h.slice(p)}}o.loose||(i?o.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(i=!0));let u,h=null;this.options.gfm&&(h=this.rules.other.listIsTask.exec(a),h&&(u="[ ] "!==h[0],a=a.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:n,task:!!h,checked:u,loose:!1,text:a,tokens:[]}),o.raw+=n}const a=o.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e<o.items.length;e++)if(this.lexer.state.top=!1,o.items[e].tokens=this.lexer.blockTokens(o.items[e].text,[]),!o.loose){const t=o.items[e].tokens.filter(e=>"space"===e.type),r=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw));o.loose=r}if(o.loose)for(let e=0;e<o.items.length;e++)o.items[e].loose=!0;return o}}html(e){const t=this.rules.block.html.exec(e);if(t){return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:n}}}table(e){var t;const r=this.rules.block.table.exec(e);if(!r)return;if(!this.rules.other.tableDelimiter.test(r[2]))return;const n=Fd(r[1]),o=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(null==(t=r[3])?void 0:t.trim())?r[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===o.length){for(const e of o)this.rules.other.tableAlignRight.test(e)?i.align.push("right"):this.rules.other.tableAlignCenter.test(e)?i.align.push("center"):this.rules.other.tableAlignLeft.test(e)?i.align.push("left"):i.align.push(null);for(let e=0;e<n.length;e++)i.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:i.align[e]});for(const e of s)i.rows.push(Fd(e,i.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]})));return i}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=Vd(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let r=0;for(let n=0;n<e.length;n++)if("\\"===e[n])n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){const r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],n="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(r);e&&(r=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?r.slice(1):r.slice(1,-1)),Gd(t,{href:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const e=t[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return Gd(r,e,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!n)return;if(n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const r=[...n[0]].length-1;let o,s,i=r,a=0;const l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+r);null!=(n=l.exec(t));){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(s=[...o].length,n[3]||n[4]){i+=s;continue}if((n[5]||n[6])&&r%3&&!((r+s)%3)){a+=s;continue}if(i-=s,i>0)continue;s=Math.min(s,s+i+a);const t=[...n[0]][0].length,l=e.slice(0,r+n.index+t+s);if(Math.min(r,s)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(e),n=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return r&&n&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,r;return"@"===t[2]?(e=t[1],r="mailto:"+e):(e=t[1],r=e),{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e){var t;let r;if(r=this.rules.inline.url.exec(e)){let e,n;if("@"===r[2])e=r[0],n="mailto:"+e;else{let o;do{o=r[0],r[0]=(null==(t=this.rules.inline._backpedal.exec(r[0]))?void 0:t[0])??""}while(o!==r[0]);e=r[0],n="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},Wd=class e{constructor(e){o(this,"tokens"),o(this,"options"),o(this,"state"),o(this,"tokenizer"),o(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Vc,this.options.tokenizer=this.options.tokenizer||new Jd,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:Kc,block:zd.normal,inline:Ld.normal};this.options.pedantic?(t.block=zd.pedantic,t.inline=Ld.pedantic):this.options.gfm&&(t.block=zd.gfm,this.options.breaks?t.inline=Ld.breaks:t.inline=Ld.gfm),this.tokenizer.rules=t}static get rules(){return{block:zd,inline:Ld}}static lex(t,r){return new e(r).lex(t)}static lexInline(t,r){return new e(r).inlineTokens(t)}lex(e){e=e.replace(Kc.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],r=!1){var n,o,s;for(this.options.pedantic&&(e=e.replace(Kc.tabCharGlobal," ").replace(Kc.spaceLine,""));e;){let i;if(null==(o=null==(n=this.options.extensions)?void 0:n.block)?void 0:o.some(r=>!!(i=r.call({lexer:this},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);const r=t.at(-1);1===i.raw.length&&void 0!==r?r.raw+="\n":t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);const r=t.at(-1);"paragraph"===(null==r?void 0:r.type)||"text"===(null==r?void 0:r.type)?(r.raw+="\n"+i.raw,r.text+="\n"+i.text,this.inlineQueue.at(-1).src=r.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);const r=t.at(-1);"paragraph"===(null==r?void 0:r.type)||"text"===(null==r?void 0:r.type)?(r.raw+="\n"+i.raw,r.text+="\n"+i.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(null==(s=this.options.extensions)?void 0:s.startBlock){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startBlock.forEach(e=>{n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){const n=t.at(-1);r&&"paragraph"===(null==n?void 0:n.type)?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i),r=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);const r=t.at(-1);"text"===(null==r?void 0:r.type)?(r.raw+="\n"+i.raw,r.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i);continue}if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var r,n,o;let s=e,i=null;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(s));)e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.anyPunctuation.exec(s));)s=s.slice(0,i.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,l="";for(;e;){let i;if(a||(l=""),a=!1,null==(n=null==(r=this.options.extensions)?void 0:r.inline)?void 0:n.some(r=>!!(i=r.call({lexer:this},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)))continue;if(i=this.tokenizer.escape(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.tag(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.link(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length);const r=t.at(-1);"text"===i.type&&"text"===(null==r?void 0:r.type)?(r.raw+=i.raw,r.text+=i.text):t.push(i);continue}if(i=this.tokenizer.emStrong(e,s,l)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.codespan(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.br(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.del(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.autolink(e)){e=e.substring(i.raw.length),t.push(i);continue}if(!this.state.inLink&&(i=this.tokenizer.url(e))){e=e.substring(i.raw.length),t.push(i);continue}let c=e;if(null==(o=this.options.extensions)?void 0:o.startInline){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startInline.forEach(e=>{n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))}),t<1/0&&t>=0&&(c=e.substring(0,t+1))}if(i=this.tokenizer.inlineText(c)){e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(l=i.raw.slice(-1)),a=!0;const r=t.at(-1);"text"===(null==r?void 0:r.type)?(r.raw+=i.raw,r.text+=i.text):t.push(i);continue}if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}},Kd=class{constructor(e){o(this,"options"),o(this,"parser"),this.options=e||Vc}space(e){return""}code({text:e,lang:t,escaped:r}){var n;const o=null==(n=(t||"").match(Kc.notSpaceStart))?void 0:n[0],s=e.replace(Kc.endingNewline,"")+"\n";return o?'<pre><code class="language-'+Bd(o)+'">'+(r?s:Bd(s,!0))+"</code></pre>\n":"<pre><code>"+(r?s:Bd(s,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){const t=e.ordered,r=e.start;let n="";for(let s=0;s<e.items.length;s++){const t=e.items[s];n+=this.listitem(t)}const o=t?"ol":"ul";return"<"+o+(t&&1!==r?' start="'+r+'"':"")+">\n"+n+"</"+o+">\n"}listitem(e){var t;let r="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===(null==(t=e.tokens[0])?void 0:t.type)?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+Bd(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):r+=n+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",r="";for(let o=0;o<e.header.length;o++)r+=this.tablecell(e.header[o]);t+=this.tablerow({text:r});let n="";for(let o=0;o<e.rows.length;o++){const t=e.rows[o];r="";for(let e=0;e<t.length;e++)r+=this.tablecell(t[e]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+n+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Bd(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){const n=this.parser.parseInline(r),o=Hd(e);if(null===o)return n;let s='<a href="'+(e=o)+'"';return t&&(s+=' title="'+Bd(t)+'"'),s+=">"+n+"</a>",s}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));const o=Hd(e);if(null===o)return Bd(r);let s=`<img src="${e=o}" alt="${r}"`;return t&&(s+=` title="${Bd(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Bd(e.text)}},Zd=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},Yd=class e{constructor(e){o(this,"options"),o(this,"renderer"),o(this,"textRenderer"),this.options=e||Vc,this.options.renderer=this.options.renderer||new Kd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Zd}static parse(t,r){return new e(r).parse(t)}static parseInline(t,r){return new e(r).parseInline(t)}parse(e,t=!0){var r,n;let o="";for(let s=0;s<e.length;s++){const i=e[s];if(null==(n=null==(r=this.options.extensions)?void 0:r.renderers)?void 0:n[i.type]){const e=i,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){o+=t||"";continue}}const a=i;switch(a.type){case"space":o+=this.renderer.space(a);continue;case"hr":o+=this.renderer.hr(a);continue;case"heading":o+=this.renderer.heading(a);continue;case"code":o+=this.renderer.code(a);continue;case"table":o+=this.renderer.table(a);continue;case"blockquote":o+=this.renderer.blockquote(a);continue;case"list":o+=this.renderer.list(a);continue;case"html":o+=this.renderer.html(a);continue;case"paragraph":o+=this.renderer.paragraph(a);continue;case"text":{let r=a,n=this.renderer.text(r);for(;s+1<e.length&&"text"===e[s+1].type;)r=e[++s],n+="\n"+this.renderer.text(r);o+=t?this.renderer.paragraph({type:"paragraph",raw:n,text:n,tokens:[{type:"text",raw:n,text:n,escaped:!0}]}):n;continue}default:{const e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return o}parseInline(e,t=this.renderer){var r,n;let o="";for(let s=0;s<e.length;s++){const i=e[s];if(null==(n=null==(r=this.options.extensions)?void 0:r.renderers)?void 0:n[i.type]){const e=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){o+=e||"";continue}}const a=i;switch(a.type){case"escape":case"text":o+=t.text(a);break;case"html":o+=t.html(a);break;case"link":o+=t.link(a);break;case"image":o+=t.image(a);break;case"strong":o+=t.strong(a);break;case"em":o+=t.em(a);break;case"codespan":o+=t.codespan(a);break;case"br":o+=t.br(a);break;case"del":o+=t.del(a);break;default:{const e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return o}},Qd=(r=class{constructor(e){o(this,"options"),o(this,"block"),this.options=e||Vc}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Wd.lex:Wd.lexInline}provideParser(){return this.block?Yd.parse:Yd.parseInline}},o(r,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),r),Xd=new class{constructor(...e){o(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),o(this,"options",this.setOptions),o(this,"parse",this.parseMarkdown(!0)),o(this,"parseInline",this.parseMarkdown(!1)),o(this,"Parser",Yd),o(this,"Renderer",Kd),o(this,"TextRenderer",Zd),o(this,"Lexer",Wd),o(this,"Tokenizer",Jd),o(this,"Hooks",Qd),this.use(...e)}walkTokens(e,t){var r,n;let o=[];for(const s of e)switch(o=o.concat(t.call(this,s)),s.type){case"table":{const e=s;for(const r of e.header)o=o.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)o=o.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=s;o=o.concat(this.walkTokens(e.items,t));break}default:{const e=s;(null==(n=null==(r=this.defaults.extensions)?void 0:r.childTokens)?void 0:n[e.type])?this.defaults.extensions.childTokens[e.type].forEach(r=>{const n=e[r].flat(1/0);o=o.concat(this.walkTokens(n,t))}):e.tokens&&(o=o.concat(this.walkTokens(e.tokens,t)))}}return o}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{const r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const r=t.renderers[e.name];t.renderers[e.name]=r?function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=r.apply(this,t)),n}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),r.extensions=t),e.renderer){const t=this.defaults.renderer||new Kd(this.defaults);for(const r in e.renderer){if(!(r in t))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const n=r,o=e.renderer[n],s=t[n];t[n]=(...e)=>{let r=o.apply(t,e);return!1===r&&(r=s.apply(t,e)),r||""}}r.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new Jd(this.defaults);for(const r in e.tokenizer){if(!(r in t))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const n=r,o=e.tokenizer[n],s=t[n];t[n]=(...e)=>{let r=o.apply(t,e);return!1===r&&(r=s.apply(t,e)),r}}r.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new Qd;for(const r in e.hooks){if(!(r in t))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;const n=r,o=e.hooks[n],s=t[n];Qd.passThroughHooks.has(r)?t[n]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then(e=>s.call(t,e));const r=o.call(t,e);return s.call(t,r)}:t[n]=(...e)=>{let r=o.apply(t,e);return!1===r&&(r=s.apply(t,e)),r}}r.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Wd.lex(e,t??this.defaults)}parser(e,t){return Yd.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{const n={...r},o={...this.defaults,...n},s=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===n.async)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==t)return s(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const i=o.hooks?o.hooks.provideLexer():e?Wd.lex:Wd.lexInline,a=o.hooks?o.hooks.provideParser():e?Yd.parse:Yd.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(e=>i(e,o)).then(e=>o.hooks?o.hooks.processAllTokens(e):e).then(e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then(()=>e):e).then(e=>a(e,o)).then(e=>o.hooks?o.hooks.postprocess(e):e).catch(s);try{o.hooks&&(t=o.hooks.preprocess(t));let e=i(t,o);o.hooks&&(e=o.hooks.processAllTokens(e)),o.walkTokens&&this.walkTokens(e,o.walkTokens);let r=a(e,o);return o.hooks&&(r=o.hooks.postprocess(r)),r}catch(l){return s(l)}}}onError(e,t){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+Bd(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function ep(e,t){return Xd.parse(e,t)}ep.options=ep.setOptions=function(e){return Xd.setOptions(e),ep.defaults=Xd.defaults,Gc(ep.defaults),ep},ep.getDefaults=Fc,ep.defaults=Vc,ep.use=function(...e){return Xd.use(...e),ep.defaults=Xd.defaults,Gc(ep.defaults),ep},ep.walkTokens=function(e,t){return Xd.walkTokens(e,t)},ep.parseInline=Xd.parseInline,ep.Parser=Yd,ep.parser=Yd.parse,ep.Renderer=Kd,ep.TextRenderer=Zd,ep.Lexer=Wd,ep.lexer=Wd.lex,ep.Tokenizer=Jd,ep.Hooks=Qd,ep.parse=ep,ep.options,ep.setOptions,ep.use,ep.walkTokens,ep.parseInline,Yd.parse,Wd.lex;const tp="speclens-theme";class rp{constructor(e){this._preference="auto",this._mediaQuery=null,this._mediaListener=()=>this._apply(),this.resolved="light",this._host=e}init(e){const t=this._readStorage();this._preference=t??e,this._mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this._mediaQuery.addEventListener("change",this._mediaListener),this._apply()}destroy(){var e;null==(e=this._mediaQuery)||e.removeEventListener("change",this._mediaListener)}setTheme(e){this._preference=e,this._writeStorage(e),this._apply()}toggle(){const e="light"===this.resolved?"dark":"light";return this.setTheme(e),e}_apply(){var e;"auto"===this._preference?this.resolved=(null==(e=this._mediaQuery)?void 0:e.matches)?"dark":"light":this.resolved=this._preference,this._host.setAttribute("data-theme",this.resolved),this._host.requestUpdate()}_readStorage(){try{const e=localStorage.getItem(tp);if("light"===e||"dark"===e||"auto"===e)return e}catch{}return null}_writeStorage(e){try{localStorage.setItem(tp,e)}catch{}}}function np(e){const t=[];if(t.push("I'm working with the following REST API endpoint and need help understanding how to use it correctly.\n"),t.push("## Endpoint"),t.push(`**${e.method.toUpperCase()} ${e.path}**`),e.summary&&t.push(`\n${e.summary}`),e.description&&t.push(`\n${e.description}`),e.parameters.length>0){t.push("\n## Parameters");for(const r of e.parameters){const e=[];r.required&&e.push("required"),r.deprecated&&e.push("deprecated");const n=r.schema?r.schema.type??"any":"any",o=r.schema?r.schema.enum:void 0;let s=`- **${r.name}** (${r.in}, ${n}${e.length?", "+e.join(", "):""})`;r.description&&(s+=`: ${r.description}`),(null==o?void 0:o.length)&&(s+=` — Allowed values: ${o.join(", ")}`),void 0!==r.example&&(s+=` — Example: \`${JSON.stringify(r.example)}\``),t.push(s)}}if(e.requestBody){t.push("\n## Request Body"+(e.requestBody.required?" (required)":"")),e.requestBody.description&&t.push(e.requestBody.description);for(const r of e.requestBody.content){if(t.push(`\nContent-Type: \`${r.mediaType}\``),r.schema){const e=JSON.stringify(r.schema,null,2);if(e.length<2e3)t.push("```json"),t.push(e),t.push("```");else{t.push("Schema: (large schema, key properties shown)");const e=r.schema.properties;if(e)for(const[r,n]of Object.entries(e)){const e=(null==n?void 0:n.type)??"object";t.push(`- ${r}: ${e}`)}}}void 0!==r.example&&t.push(`\nExample:\n\`\`\`json\n${JSON.stringify(r.example,null,2)}\n\`\`\``)}}if(e.responses.length>0){t.push("\n## Responses");for(const r of e.responses){t.push(`\n### ${r.statusCode}${r.description?" — "+r.description:""}`);for(const e of r.content)if(e.schema){const r=JSON.stringify(e.schema,null,2);r.length<1500?t.push(`\`${e.mediaType}\`\n\`\`\`json\n${r}\n\`\`\``):t.push(`\`${e.mediaType}\` — (large schema)`)}}}if(e.security.length>0){t.push("\n## Authentication");for(const r of e.security){const e=Object.entries(r).map(([e,t])=>t.length>0?`${e} (scopes: ${t.join(", ")})`:e);t.push(`- ${e.join(" + ")}`)}}t.push("\nPlease help me understand this endpoint, write an example request, and explain the expected response.");let r=t.join("\n");return r.length>6e3&&(r=r.slice(0,5997)+"..."),r}function op(e,t){const r=encodeURIComponent(e);switch(t){case"chatgpt":return`https://chatgpt.com/?q=${r}`;case"claude":return`https://claude.ai/new?q=${r}`}}var sp=Object.defineProperty,ip=Object.getOwnPropertyDescriptor,ap=(e,t,r,n)=>{for(var o,s=n>1?void 0:n?ip(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&sp(t,r,s),s};let lp=class extends xe{constructor(){super(...arguments),this.spec=null,this.authOpen=!1,this.activeTab="api",this.showTabs=!1}render(){return this.spec?ne`
|
|
257
263
|
<div class="header">
|
|
258
264
|
<button class="hamburger" @click=${()=>this.dispatchEvent(new CustomEvent("toggle-sidebar"))}>
|
|
259
265
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor">
|
|
@@ -262,12 +268,50 @@ const _e=e=>(t,r)=>{void 0!==r?r.addInitializer(()=>{customElements.define(e,t)}
|
|
|
262
268
|
</button>
|
|
263
269
|
|
|
264
270
|
<div class="title-area">
|
|
265
|
-
<
|
|
266
|
-
|
|
271
|
+
<slot name="logo">
|
|
272
|
+
<span class="title">${this.spec.title}</span>
|
|
273
|
+
<span class="version">${this.spec.version}</span>
|
|
274
|
+
</slot>
|
|
267
275
|
</div>
|
|
268
276
|
|
|
277
|
+
${this.showTabs?ne`
|
|
278
|
+
<nav class="nav-tabs">
|
|
279
|
+
<button
|
|
280
|
+
class="nav-tab ${"api"===this.activeTab?"active":""}"
|
|
281
|
+
@click=${()=>this._switchTab("api")}
|
|
282
|
+
>
|
|
283
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
284
|
+
<path d="M2 4h12M2 8h8M2 12h10"/>
|
|
285
|
+
</svg>
|
|
286
|
+
API Reference
|
|
287
|
+
</button>
|
|
288
|
+
<button
|
|
289
|
+
class="nav-tab ${"guides"===this.activeTab?"active":""}"
|
|
290
|
+
@click=${()=>this._switchTab("guides")}
|
|
291
|
+
>
|
|
292
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
293
|
+
<path d="M2 3h10a2 2 0 012 2v8a1 1 0 01-1 1H5a2 2 0 01-2-2V3z"/>
|
|
294
|
+
<path d="M2 3a2 2 0 012-2h6l4 4"/>
|
|
295
|
+
<path d="M5 9h6M5 12h4"/>
|
|
296
|
+
</svg>
|
|
297
|
+
Guides
|
|
298
|
+
</button>
|
|
299
|
+
</nav>
|
|
300
|
+
`:null}
|
|
301
|
+
|
|
269
302
|
<div class="spacer"></div>
|
|
270
303
|
|
|
304
|
+
<div class="search-wrapper">
|
|
305
|
+
<button class="search-trigger" @click=${()=>this.dispatchEvent(new CustomEvent("open-search"))}>
|
|
306
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
307
|
+
<circle cx="7" cy="7" r="4.5"/>
|
|
308
|
+
<path d="M10.5 10.5L14 14" stroke-linecap="round"/>
|
|
309
|
+
</svg>
|
|
310
|
+
<span class="search-placeholder">Search…</span>
|
|
311
|
+
<span class="search-shortcut">⌘K</span>
|
|
312
|
+
</button>
|
|
313
|
+
</div>
|
|
314
|
+
|
|
271
315
|
<div class="actions">
|
|
272
316
|
${this.spec.securitySchemes.length>0?ne`
|
|
273
317
|
<button
|
|
@@ -282,6 +326,8 @@ const _e=e=>(t,r)=>{void 0!==r?r.addInitializer(()=>{customElements.define(e,t)}
|
|
|
282
326
|
</button>
|
|
283
327
|
`:null}
|
|
284
328
|
|
|
329
|
+
<slot name="header-actions"></slot>
|
|
330
|
+
|
|
285
331
|
<button class="action-btn" @click=${()=>this.dispatchEvent(new CustomEvent("toggle-theme"))} title="Toggle theme">
|
|
286
332
|
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
287
333
|
<circle cx="9" cy="9" r="4"/>
|
|
@@ -290,7 +336,7 @@ const _e=e=>(t,r)=>{void 0!==r?r.addInitializer(()=>{customElements.define(e,t)}
|
|
|
290
336
|
</button>
|
|
291
337
|
</div>
|
|
292
338
|
</div>
|
|
293
|
-
`:ne``}};
|
|
339
|
+
`:ne``}_switchTab(e){e!==this.activeTab&&this.dispatchEvent(new CustomEvent("tab-change",{detail:e}))}};lp.styles=[Ee,b`
|
|
294
340
|
:host {
|
|
295
341
|
display: block;
|
|
296
342
|
position: sticky;
|
|
@@ -350,8 +396,115 @@ const _e=e=>(t,r)=>{void 0!==r?r.addInitializer(()=>{customElements.define(e,t)}
|
|
|
350
396
|
white-space: nowrap;
|
|
351
397
|
}
|
|
352
398
|
|
|
399
|
+
/* ── Nav Tabs ─────────────────────── */
|
|
400
|
+
.nav-tabs {
|
|
401
|
+
display: flex;
|
|
402
|
+
align-items: stretch;
|
|
403
|
+
align-self: stretch;
|
|
404
|
+
gap: 2px;
|
|
405
|
+
margin-left: var(--sl-spacing-lg);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.nav-tab {
|
|
409
|
+
position: relative;
|
|
410
|
+
display: flex;
|
|
411
|
+
align-items: center;
|
|
412
|
+
gap: 5px;
|
|
413
|
+
padding: 0 var(--sl-spacing-md);
|
|
414
|
+
font-size: var(--sl-font-size-sm);
|
|
415
|
+
font-weight: 600;
|
|
416
|
+
color: var(--sl-color-text-muted);
|
|
417
|
+
cursor: pointer;
|
|
418
|
+
border: none;
|
|
419
|
+
background: none;
|
|
420
|
+
transition: color var(--sl-transition-fast);
|
|
421
|
+
white-space: nowrap;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.nav-tab:hover {
|
|
425
|
+
color: var(--sl-color-text);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.nav-tab.active {
|
|
429
|
+
color: var(--sl-color-primary);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.nav-tab.active::after {
|
|
433
|
+
content: '';
|
|
434
|
+
position: absolute;
|
|
435
|
+
bottom: 0;
|
|
436
|
+
left: var(--sl-spacing-sm);
|
|
437
|
+
right: var(--sl-spacing-sm);
|
|
438
|
+
height: 2px;
|
|
439
|
+
background: var(--sl-color-primary);
|
|
440
|
+
border-radius: 2px 2px 0 0;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
@media (max-width: 768px) {
|
|
444
|
+
.nav-tabs {
|
|
445
|
+
margin-left: var(--sl-spacing-sm);
|
|
446
|
+
gap: 0;
|
|
447
|
+
}
|
|
448
|
+
.nav-tab { padding: 0 var(--sl-spacing-sm); font-size: var(--sl-font-size-xs); }
|
|
449
|
+
.nav-tab svg { display: none; }
|
|
450
|
+
}
|
|
451
|
+
|
|
353
452
|
.spacer { flex: 1; }
|
|
354
453
|
|
|
454
|
+
/* ── Search ────────────────────────── */
|
|
455
|
+
.search-wrapper {
|
|
456
|
+
position: relative;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.search-trigger {
|
|
460
|
+
display: flex;
|
|
461
|
+
align-items: center;
|
|
462
|
+
gap: 8px;
|
|
463
|
+
height: 34px;
|
|
464
|
+
padding: 0 12px;
|
|
465
|
+
border-radius: var(--sl-radius-md);
|
|
466
|
+
border: 1px solid var(--sl-color-border);
|
|
467
|
+
background: var(--sl-color-bg);
|
|
468
|
+
color: var(--sl-color-text-muted);
|
|
469
|
+
font-size: var(--sl-font-size-sm);
|
|
470
|
+
cursor: pointer;
|
|
471
|
+
transition: all var(--sl-transition-fast);
|
|
472
|
+
min-width: 200px;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.search-trigger:hover {
|
|
476
|
+
border-color: var(--sl-color-primary);
|
|
477
|
+
color: var(--sl-color-text-secondary);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.search-trigger .search-placeholder {
|
|
481
|
+
flex: 1;
|
|
482
|
+
text-align: left;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.search-shortcut {
|
|
486
|
+
font-size: 0.625rem;
|
|
487
|
+
padding: 1px 5px;
|
|
488
|
+
border-radius: 3px;
|
|
489
|
+
background: var(--sl-color-surface-raised);
|
|
490
|
+
border: 1px solid var(--sl-color-border);
|
|
491
|
+
color: var(--sl-color-text-muted);
|
|
492
|
+
font-family: var(--sl-font-mono);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
@media (max-width: 768px) {
|
|
496
|
+
.search-trigger {
|
|
497
|
+
min-width: 36px;
|
|
498
|
+
width: 36px;
|
|
499
|
+
padding: 0;
|
|
500
|
+
justify-content: center;
|
|
501
|
+
}
|
|
502
|
+
.search-trigger .search-placeholder,
|
|
503
|
+
.search-trigger .search-shortcut {
|
|
504
|
+
display: none;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
|
|
355
508
|
.actions {
|
|
356
509
|
display: flex;
|
|
357
510
|
align-items: center;
|
|
@@ -408,7 +561,7 @@ const _e=e=>(t,r)=>{void 0!==r?r.addInitializer(()=>{customElements.define(e,t)}
|
|
|
408
561
|
border-color: var(--sl-color-primary-hover);
|
|
409
562
|
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
|
|
410
563
|
}
|
|
411
|
-
`],
|
|
564
|
+
`],ap([Oe({type:Object})],lp.prototype,"spec",2),ap([Oe({type:Boolean})],lp.prototype,"authOpen",2),ap([Oe()],lp.prototype,"activeTab",2),ap([Oe({type:Boolean})],lp.prototype,"showTabs",2),lp=ap([_e("sl-header")],lp);var cp=Object.defineProperty,dp=Object.getOwnPropertyDescriptor,pp=(e,t,r,n)=>{for(var o,s=n>1?void 0:n?dp(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&cp(t,r,s),s};let up=class extends xe{constructor(){super(...arguments),this.tagGroups=[],this.activeOperationId="",this.open=!1,this.searchEngine=null,this.layout="page",this.securitySchemes=[],this._searchQuery="",this._searchResults=[]}focusSearch(){var e;null==(e=this._searchInput)||e.focus()}_handleSearchInput(e){this._searchQuery=e.target.value,this.searchEngine&&this._searchQuery.trim()?this._searchResults=this.searchEngine.search(this._searchQuery).filter(e=>"operation"===e.type).slice(0,30):this._searchResults=[]}_navigate(e){this._searchQuery="",this._searchResults=[],this.dispatchEvent(new CustomEvent("navigate",{detail:e})),this.dispatchEvent(new CustomEvent("close-sidebar"))}_navigateIntro(){this._searchQuery="",this._searchResults=[],this.dispatchEvent(new CustomEvent("navigate-intro")),this.dispatchEvent(new CustomEvent("close-sidebar"))}_isIntroActive(){return!this.activeOperationId}render(){const e=this._searchQuery.trim().length>0;return ne`
|
|
412
565
|
<div class="overlay" @click=${()=>this.dispatchEvent(new CustomEvent("close-sidebar"))}></div>
|
|
413
566
|
<nav class="sidebar">
|
|
414
567
|
<div class="search-box">
|
|
@@ -464,14 +617,21 @@ const _e=e=>(t,r)=>{void 0!==r?r.addInitializer(()=>{customElements.define(e,t)}
|
|
|
464
617
|
`)}
|
|
465
618
|
`}
|
|
466
619
|
</div>
|
|
620
|
+
|
|
621
|
+
${"embed"===this.layout&&this.securitySchemes.length>0?ne`
|
|
622
|
+
<button
|
|
623
|
+
class="sidebar-auth-btn"
|
|
624
|
+
@click=${()=>this.dispatchEvent(new CustomEvent("toggle-auth",{bubbles:!0,composed:!0}))}
|
|
625
|
+
>
|
|
626
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
627
|
+
<rect x="3" y="7" width="10" height="7" rx="1.5"/>
|
|
628
|
+
<path d="M5.5 7V5a2.5 2.5 0 015 0v2"/>
|
|
629
|
+
</svg>
|
|
630
|
+
Authorize
|
|
631
|
+
</button>
|
|
632
|
+
`:null}
|
|
467
633
|
</nav>
|
|
468
|
-
`}};
|
|
469
|
-
/**
|
|
470
|
-
* @license
|
|
471
|
-
* Copyright 2017 Google LLC
|
|
472
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
473
|
-
*/
|
|
474
|
-
var cp;lp.styles=[Pe,b`
|
|
634
|
+
`}};up.styles=[Ee,b`
|
|
475
635
|
:host {
|
|
476
636
|
display: block;
|
|
477
637
|
}
|
|
@@ -710,107 +870,456 @@ var cp;lp.styles=[Pe,b`
|
|
|
710
870
|
color: var(--sl-color-text-muted);
|
|
711
871
|
text-align: center;
|
|
712
872
|
}
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
873
|
+
|
|
874
|
+
/* ── Embed-mode auth button ───────────── */
|
|
875
|
+
.sidebar-auth-btn {
|
|
876
|
+
display: flex;
|
|
877
|
+
align-items: center;
|
|
878
|
+
gap: 8px;
|
|
879
|
+
margin: var(--sl-spacing-sm) var(--sl-spacing-md) var(--sl-spacing-md);
|
|
880
|
+
padding: 8px 14px;
|
|
881
|
+
border-radius: var(--sl-radius-md);
|
|
882
|
+
border: 1.5px solid var(--sl-color-border);
|
|
883
|
+
color: var(--sl-color-text-secondary);
|
|
884
|
+
background: transparent;
|
|
885
|
+
font-size: var(--sl-font-size-sm);
|
|
886
|
+
font-weight: 600;
|
|
887
|
+
cursor: pointer;
|
|
888
|
+
transition: all var(--sl-transition-fast);
|
|
889
|
+
flex-shrink: 0;
|
|
890
|
+
width: calc(100% - var(--sl-spacing-xl));
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
.sidebar-auth-btn:hover {
|
|
894
|
+
border-color: var(--sl-color-primary);
|
|
895
|
+
color: var(--sl-color-primary);
|
|
896
|
+
background: var(--sl-color-sidebar-active);
|
|
897
|
+
}
|
|
898
|
+
`],pp([Oe({type:Array})],up.prototype,"tagGroups",2),pp([Oe({type:String})],up.prototype,"activeOperationId",2),pp([Oe({type:Boolean,reflect:!0})],up.prototype,"open",2),pp([Oe({type:Object})],up.prototype,"searchEngine",2),pp([Oe()],up.prototype,"layout",2),pp([Oe({type:Array})],up.prototype,"securitySchemes",2),pp([je()],up.prototype,"_searchQuery",2),pp([je()],up.prototype,"_searchResults",2),pp([Pe(".search-input")],up.prototype,"_searchInput",2),up=pp([_e("sl-sidebar")],up);var hp=Object.defineProperty,fp=Object.getOwnPropertyDescriptor,mp=(e,t,r,n)=>{for(var o,s=n>1?void 0:n?fp(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&hp(t,r,s),s};let gp=class extends xe{constructor(){super(...arguments),this.searchEngine=null,this._query="",this._results=[],this._highlightIndex=0}firstUpdated(){var e;null==(e=this._input)||e.focus()}_handleInput(e){this._query=e.target.value,this._highlightIndex=0,this.searchEngine&&this._query.trim()?this._results=this.searchEngine.search(this._query).slice(0,20):this._results=[]}_handleKeyDown(e){switch(e.key){case"Escape":this.dispatchEvent(new CustomEvent("close"));break;case"ArrowDown":e.preventDefault(),this._highlightIndex=Math.min(this._highlightIndex+1,this._results.length-1);break;case"ArrowUp":e.preventDefault(),this._highlightIndex=Math.max(this._highlightIndex-1,0);break;case"Enter":this._results[this._highlightIndex]&&this._selectResult(this._results[this._highlightIndex])}}_selectResult(e){"operation"===e.type?this.dispatchEvent(new CustomEvent("select-operation",{detail:e.operationId})):this.dispatchEvent(new CustomEvent("select-guide",{detail:e.slug}))}_renderResult(e,t){return"operation"===e.type?ne`
|
|
899
|
+
<div
|
|
900
|
+
class="result-item ${t===this._highlightIndex?"highlighted":""}"
|
|
901
|
+
@click=${()=>this._selectResult(e)}
|
|
902
|
+
@mouseenter=${()=>this._highlightIndex=t}
|
|
903
|
+
>
|
|
904
|
+
<span class="method-badge method-${e.method}">${e.method}</span>
|
|
905
|
+
<div class="result-info">
|
|
906
|
+
<div class="result-path">${e.path}</div>
|
|
907
|
+
${e.summary?ne`<div class="result-summary">${e.summary}</div>`:null}
|
|
908
|
+
</div>
|
|
738
909
|
</div>
|
|
739
|
-
`
|
|
740
|
-
|
|
910
|
+
`:ne`
|
|
911
|
+
<div
|
|
912
|
+
class="result-item ${t===this._highlightIndex?"highlighted":""}"
|
|
913
|
+
@click=${()=>this._selectResult(e)}
|
|
914
|
+
@mouseenter=${()=>this._highlightIndex=t}
|
|
915
|
+
>
|
|
916
|
+
<span class="guide-badge">Guide</span>
|
|
917
|
+
<div class="result-info">
|
|
918
|
+
<div class="result-path">${e.title}</div>
|
|
919
|
+
<div class="result-summary">${e.category}</div>
|
|
920
|
+
</div>
|
|
921
|
+
</div>
|
|
922
|
+
`}render(){return ne`
|
|
923
|
+
<div class="overlay" @click=${()=>this.dispatchEvent(new CustomEvent("close"))}></div>
|
|
924
|
+
<div class="modal" @keydown=${this._handleKeyDown}>
|
|
925
|
+
<div class="input-wrapper">
|
|
926
|
+
<svg class="search-icon" width="18" height="18" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
927
|
+
<circle cx="7" cy="7" r="4.5"/>
|
|
928
|
+
<path d="M10.5 10.5L14 14" stroke-linecap="round"/>
|
|
929
|
+
</svg>
|
|
930
|
+
<input
|
|
931
|
+
type="text"
|
|
932
|
+
placeholder="Search endpoints, guides…"
|
|
933
|
+
.value=${this._query}
|
|
934
|
+
@input=${this._handleInput}
|
|
935
|
+
/>
|
|
936
|
+
<span class="esc-hint">Esc</span>
|
|
937
|
+
</div>
|
|
938
|
+
|
|
939
|
+
<div class="results">
|
|
940
|
+
${""===this._query.trim()?ne`
|
|
941
|
+
<div class="empty-state">Start typing to search…</div>
|
|
942
|
+
`:0===this._results.length?ne`
|
|
943
|
+
<div class="no-results">No results for "${this._query}"</div>
|
|
944
|
+
`:this._results.map((e,t)=>this._renderResult(e,t))}
|
|
945
|
+
</div>
|
|
946
|
+
</div>
|
|
947
|
+
`}};gp.styles=[Ee,b`
|
|
741
948
|
:host {
|
|
742
949
|
display: block;
|
|
950
|
+
position: fixed;
|
|
951
|
+
inset: 0;
|
|
952
|
+
z-index: 300;
|
|
743
953
|
}
|
|
744
954
|
|
|
745
|
-
.
|
|
746
|
-
|
|
955
|
+
.overlay {
|
|
956
|
+
position: absolute;
|
|
957
|
+
inset: 0;
|
|
958
|
+
background: var(--sl-color-overlay);
|
|
959
|
+
animation: sl-fade-in 150ms ease;
|
|
747
960
|
}
|
|
748
961
|
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
text-transform: uppercase;
|
|
753
|
-
letter-spacing: 0.04em;
|
|
754
|
-
color: var(--sl-color-text-muted);
|
|
755
|
-
margin-bottom: var(--sl-spacing-xs);
|
|
756
|
-
padding: var(--sl-spacing-xs) 0;
|
|
962
|
+
@keyframes sl-fade-in {
|
|
963
|
+
from { opacity: 0; }
|
|
964
|
+
to { opacity: 1; }
|
|
757
965
|
}
|
|
758
966
|
|
|
759
|
-
.
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
967
|
+
.modal {
|
|
968
|
+
position: absolute;
|
|
969
|
+
top: 15%;
|
|
970
|
+
left: 50%;
|
|
971
|
+
transform: translateX(-50%);
|
|
972
|
+
width: min(560px, calc(100vw - 2rem));
|
|
973
|
+
background: var(--sl-color-surface);
|
|
974
|
+
border-radius: var(--sl-radius-xl);
|
|
975
|
+
box-shadow: var(--sl-shadow-xl);
|
|
976
|
+
border: 1px solid var(--sl-color-border);
|
|
977
|
+
overflow: hidden;
|
|
978
|
+
animation: sl-slide-up 150ms ease;
|
|
767
979
|
}
|
|
768
980
|
|
|
769
|
-
|
|
770
|
-
|
|
981
|
+
@keyframes sl-slide-up {
|
|
982
|
+
from { opacity: 0; transform: translateX(-50%) translateY(8px); }
|
|
983
|
+
to { opacity: 1; transform: translateX(-50%) translateY(0); }
|
|
771
984
|
}
|
|
772
985
|
|
|
773
|
-
.
|
|
986
|
+
.input-wrapper {
|
|
774
987
|
display: flex;
|
|
775
|
-
|
|
776
|
-
gap:
|
|
988
|
+
align-items: center;
|
|
989
|
+
gap: var(--sl-spacing-sm);
|
|
990
|
+
padding: var(--sl-spacing-md) var(--sl-spacing-lg);
|
|
991
|
+
border-bottom: 1px solid var(--sl-color-border);
|
|
777
992
|
}
|
|
778
993
|
|
|
779
|
-
.
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
color: var(--sl-color-text);
|
|
783
|
-
word-break: break-all;
|
|
994
|
+
.search-icon {
|
|
995
|
+
color: var(--sl-color-text-muted);
|
|
996
|
+
flex-shrink: 0;
|
|
784
997
|
}
|
|
785
998
|
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
999
|
+
input {
|
|
1000
|
+
flex: 1;
|
|
1001
|
+
border: none;
|
|
1002
|
+
background: none;
|
|
1003
|
+
color: var(--sl-color-text);
|
|
1004
|
+
font-size: var(--sl-font-size-md);
|
|
1005
|
+
outline: none;
|
|
790
1006
|
}
|
|
791
1007
|
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
color: var(--sl-color-badge-deprecated);
|
|
795
|
-
font-weight: 600;
|
|
1008
|
+
input::placeholder {
|
|
1009
|
+
color: var(--sl-color-text-muted);
|
|
796
1010
|
}
|
|
797
1011
|
|
|
798
|
-
.
|
|
799
|
-
font-family: var(--sl-font-mono);
|
|
1012
|
+
.esc-hint {
|
|
800
1013
|
font-size: var(--sl-font-size-xs);
|
|
1014
|
+
padding: 2px 6px;
|
|
1015
|
+
border-radius: 3px;
|
|
1016
|
+
background: var(--sl-color-surface-raised);
|
|
1017
|
+
border: 1px solid var(--sl-color-border);
|
|
801
1018
|
color: var(--sl-color-text-muted);
|
|
802
|
-
|
|
1019
|
+
font-family: var(--sl-font-mono);
|
|
803
1020
|
}
|
|
804
1021
|
|
|
805
|
-
.
|
|
806
|
-
|
|
807
|
-
|
|
1022
|
+
.results {
|
|
1023
|
+
max-height: 400px;
|
|
1024
|
+
overflow-y: auto;
|
|
1025
|
+
padding: var(--sl-spacing-sm) 0;
|
|
808
1026
|
}
|
|
809
1027
|
|
|
810
|
-
.
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
1028
|
+
.result-item {
|
|
1029
|
+
display: flex;
|
|
1030
|
+
align-items: center;
|
|
1031
|
+
gap: var(--sl-spacing-sm);
|
|
1032
|
+
padding: var(--sl-spacing-sm) var(--sl-spacing-lg);
|
|
1033
|
+
cursor: pointer;
|
|
1034
|
+
transition: background var(--sl-transition-fast);
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
.result-item:hover,
|
|
1038
|
+
.result-item.highlighted {
|
|
1039
|
+
background: var(--sl-color-surface-raised);
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
.method-badge {
|
|
1043
|
+
display: inline-flex;
|
|
1044
|
+
align-items: center;
|
|
1045
|
+
justify-content: center;
|
|
1046
|
+
width: 48px;
|
|
1047
|
+
min-width: 48px;
|
|
1048
|
+
padding: 2px 0;
|
|
1049
|
+
border-radius: var(--sl-radius-sm);
|
|
1050
|
+
font-size: 0.625rem;
|
|
1051
|
+
font-weight: 700;
|
|
1052
|
+
font-family: var(--sl-font-mono);
|
|
1053
|
+
text-transform: uppercase;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
.method-get { background: var(--sl-color-get-bg); color: var(--sl-color-get); }
|
|
1057
|
+
.method-post { background: var(--sl-color-post-bg); color: var(--sl-color-post); }
|
|
1058
|
+
.method-put { background: var(--sl-color-put-bg); color: var(--sl-color-put); }
|
|
1059
|
+
.method-delete { background: var(--sl-color-delete-bg); color: var(--sl-color-delete); }
|
|
1060
|
+
.method-patch { background: var(--sl-color-patch-bg); color: var(--sl-color-patch); }
|
|
1061
|
+
.method-options,
|
|
1062
|
+
.method-head,
|
|
1063
|
+
.method-trace { background: var(--sl-color-options-bg); color: var(--sl-color-options); }
|
|
1064
|
+
|
|
1065
|
+
.result-info {
|
|
1066
|
+
min-width: 0;
|
|
1067
|
+
flex: 1;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
.result-path {
|
|
1071
|
+
font-family: var(--sl-font-mono);
|
|
1072
|
+
font-size: var(--sl-font-size-sm);
|
|
1073
|
+
color: var(--sl-color-text);
|
|
1074
|
+
overflow: hidden;
|
|
1075
|
+
text-overflow: ellipsis;
|
|
1076
|
+
white-space: nowrap;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
.result-summary {
|
|
1080
|
+
font-size: var(--sl-font-size-xs);
|
|
1081
|
+
color: var(--sl-color-text-muted);
|
|
1082
|
+
overflow: hidden;
|
|
1083
|
+
text-overflow: ellipsis;
|
|
1084
|
+
white-space: nowrap;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
.no-results {
|
|
1088
|
+
text-align: center;
|
|
1089
|
+
padding: var(--sl-spacing-xl);
|
|
1090
|
+
color: var(--sl-color-text-muted);
|
|
1091
|
+
font-size: var(--sl-font-size-sm);
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
.empty-state {
|
|
1095
|
+
text-align: center;
|
|
1096
|
+
padding: var(--sl-spacing-xl);
|
|
1097
|
+
color: var(--sl-color-text-muted);
|
|
1098
|
+
font-size: var(--sl-font-size-sm);
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
/* ── Guide result ───────────────────── */
|
|
1102
|
+
.guide-badge {
|
|
1103
|
+
display: inline-flex;
|
|
1104
|
+
align-items: center;
|
|
1105
|
+
justify-content: center;
|
|
1106
|
+
width: 48px;
|
|
1107
|
+
min-width: 48px;
|
|
1108
|
+
padding: 2px 0;
|
|
1109
|
+
border-radius: var(--sl-radius-sm);
|
|
1110
|
+
font-size: 0.625rem;
|
|
1111
|
+
font-weight: 700;
|
|
1112
|
+
text-transform: uppercase;
|
|
1113
|
+
background: var(--sl-color-bg-subtle);
|
|
1114
|
+
color: var(--sl-color-text-muted);
|
|
1115
|
+
border: 1px solid var(--sl-color-border);
|
|
1116
|
+
}
|
|
1117
|
+
`],mp([Oe({type:Object})],gp.prototype,"searchEngine",2),mp([je()],gp.prototype,"_query",2),mp([je()],gp.prototype,"_results",2),mp([je()],gp.prototype,"_highlightIndex",2),mp([Pe("input")],gp.prototype,"_input",2),gp=mp([_e("sl-search")],gp);var yp=Object.defineProperty,vp=Object.getOwnPropertyDescriptor,bp=(e,t,r,n)=>{for(var o,s=n>1?void 0:n?vp(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&yp(t,r,s),s};let $p=class extends xe{constructor(){super(...arguments),this.parameters=[]}_getType(e){if(!e)return"any";if("array"===e.type&&e.items){return`${e.items.type??"any"}[]`}return e.type??(e.oneOf?"oneOf":e.anyOf?"anyOf":"any")}_getEnum(e){return e?e.enum??[]:[]}render(){const e=new Map;for(const t of this.parameters)e.has(t.in)||e.set(t.in,[]),e.get(t.in).push(t);return ne`
|
|
1118
|
+
${["path","query","header","cookie"].filter(t=>e.has(t)).map(t=>ne`
|
|
1119
|
+
<div class="param-group">
|
|
1120
|
+
<div class="param-group-label">${t} parameters</div>
|
|
1121
|
+
${e.get(t).map(e=>ne`
|
|
1122
|
+
<div class="param-row">
|
|
1123
|
+
<div class="param-name-cell">
|
|
1124
|
+
<span class="param-name">${e.name}</span>
|
|
1125
|
+
${e.required?ne`<span class="param-required">required</span>`:null}
|
|
1126
|
+
${e.deprecated?ne`<span class="param-deprecated">deprecated</span>`:null}
|
|
1127
|
+
</div>
|
|
1128
|
+
<div class="param-type">${this._getType(e.schema)}</div>
|
|
1129
|
+
<div>
|
|
1130
|
+
<div class="param-desc" .innerHTML=${ep.parse(e.description||"")}></div>
|
|
1131
|
+
${void 0!==e.example?ne`
|
|
1132
|
+
<div class="param-example">Example: <code>${JSON.stringify(e.example)}</code></div>
|
|
1133
|
+
`:null}
|
|
1134
|
+
${this._getEnum(e.schema).length>0?ne`
|
|
1135
|
+
<div class="param-enum">
|
|
1136
|
+
${this._getEnum(e.schema).map(e=>ne`<span class="enum-value">${e}</span>`)}
|
|
1137
|
+
</div>
|
|
1138
|
+
`:null}
|
|
1139
|
+
</div>
|
|
1140
|
+
</div>
|
|
1141
|
+
`)}
|
|
1142
|
+
</div>
|
|
1143
|
+
`)}
|
|
1144
|
+
`}};$p.styles=[Ee,b`
|
|
1145
|
+
:host {
|
|
1146
|
+
display: block;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
.param-group {
|
|
1150
|
+
margin-bottom: var(--sl-spacing-md);
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
.param-group-label {
|
|
1154
|
+
font-size: var(--sl-font-size-xs);
|
|
1155
|
+
font-weight: 600;
|
|
1156
|
+
text-transform: uppercase;
|
|
1157
|
+
letter-spacing: 0.04em;
|
|
1158
|
+
color: var(--sl-color-text-muted);
|
|
1159
|
+
margin-bottom: var(--sl-spacing-xs);
|
|
1160
|
+
padding: var(--sl-spacing-xs) 0;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
.param-row {
|
|
1164
|
+
display: grid;
|
|
1165
|
+
grid-template-columns: 180px 100px 1fr;
|
|
1166
|
+
gap: var(--sl-spacing-sm);
|
|
1167
|
+
padding: var(--sl-spacing-sm) 0;
|
|
1168
|
+
border-bottom: 1px solid var(--sl-color-border);
|
|
1169
|
+
font-size: var(--sl-font-size-sm);
|
|
1170
|
+
align-items: start;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
.param-row:last-child {
|
|
1174
|
+
border-bottom: none;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
.param-name-cell {
|
|
1178
|
+
display: flex;
|
|
1179
|
+
flex-direction: column;
|
|
1180
|
+
gap: 2px;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
.param-name {
|
|
1184
|
+
font-family: var(--sl-font-mono);
|
|
1185
|
+
font-weight: 500;
|
|
1186
|
+
color: var(--sl-color-text);
|
|
1187
|
+
word-break: break-all;
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
.param-required {
|
|
1191
|
+
font-size: var(--sl-font-size-xs);
|
|
1192
|
+
color: var(--sl-color-badge-required);
|
|
1193
|
+
font-weight: 600;
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
.param-deprecated {
|
|
1197
|
+
font-size: var(--sl-font-size-xs);
|
|
1198
|
+
color: var(--sl-color-badge-deprecated);
|
|
1199
|
+
font-weight: 600;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
.param-type {
|
|
1203
|
+
font-family: var(--sl-font-mono);
|
|
1204
|
+
font-size: var(--sl-font-size-xs);
|
|
1205
|
+
color: var(--sl-color-text-muted);
|
|
1206
|
+
padding-top: 2px;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
.param-desc {
|
|
1210
|
+
color: var(--sl-color-text-secondary);
|
|
1211
|
+
line-height: 1.5;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
.param-desc p {
|
|
1215
|
+
margin: 0 0 var(--sl-spacing-xs) 0;
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
.param-desc p:last-child {
|
|
1219
|
+
margin-bottom: 0;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
.param-desc code {
|
|
1223
|
+
background: var(--sl-color-code-bg);
|
|
1224
|
+
padding: 1px 5px;
|
|
1225
|
+
border-radius: var(--sl-radius-sm);
|
|
1226
|
+
font-size: 0.85em;
|
|
1227
|
+
border: 1px solid var(--sl-color-border);
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
.param-desc pre {
|
|
1231
|
+
background: #0d1117;
|
|
1232
|
+
border: 1px solid #30363d;
|
|
1233
|
+
border-radius: var(--sl-radius-md);
|
|
1234
|
+
padding: var(--sl-spacing-sm) var(--sl-spacing-md);
|
|
1235
|
+
overflow-x: auto;
|
|
1236
|
+
margin: var(--sl-spacing-xs) 0;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
.param-desc pre code {
|
|
1240
|
+
background: none;
|
|
1241
|
+
border: none;
|
|
1242
|
+
padding: 0;
|
|
1243
|
+
color: #e6edf3;
|
|
1244
|
+
font-size: var(--sl-font-size-xs);
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
.param-desc table {
|
|
1248
|
+
width: 100%;
|
|
1249
|
+
border-collapse: separate;
|
|
1250
|
+
border-spacing: 0;
|
|
1251
|
+
border: 1px solid var(--sl-color-border);
|
|
1252
|
+
border-radius: var(--sl-radius-md);
|
|
1253
|
+
overflow: hidden;
|
|
1254
|
+
font-size: var(--sl-font-size-xs);
|
|
1255
|
+
margin: var(--sl-spacing-xs) 0;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
.param-desc th,
|
|
1259
|
+
.param-desc td {
|
|
1260
|
+
padding: var(--sl-spacing-xs) var(--sl-spacing-sm);
|
|
1261
|
+
text-align: left;
|
|
1262
|
+
border-bottom: 1px solid var(--sl-color-border);
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
.param-desc th {
|
|
1266
|
+
background: var(--sl-color-bg-subtle);
|
|
1267
|
+
font-weight: 600;
|
|
1268
|
+
border-bottom-width: 2px;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
.param-desc tr:last-child td {
|
|
1272
|
+
border-bottom: none;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
.param-desc blockquote {
|
|
1276
|
+
border-left: 3px solid var(--sl-color-primary);
|
|
1277
|
+
background: rgba(99,102,241,0.05);
|
|
1278
|
+
padding: var(--sl-spacing-xs) var(--sl-spacing-sm);
|
|
1279
|
+
margin: var(--sl-spacing-xs) 0;
|
|
1280
|
+
border-radius: 0 var(--sl-radius-sm) var(--sl-radius-sm) 0;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
.param-desc ul,
|
|
1284
|
+
.param-desc ol {
|
|
1285
|
+
padding-left: var(--sl-spacing-lg);
|
|
1286
|
+
margin: var(--sl-spacing-xs) 0;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
.param-desc li {
|
|
1290
|
+
margin-bottom: 2px;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
.param-desc a {
|
|
1294
|
+
color: var(--sl-color-primary);
|
|
1295
|
+
text-decoration: none;
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
.param-desc a:hover {
|
|
1299
|
+
text-decoration: underline;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
.param-desc h1,
|
|
1303
|
+
.param-desc h2,
|
|
1304
|
+
.param-desc h3,
|
|
1305
|
+
.param-desc h4,
|
|
1306
|
+
.param-desc h5,
|
|
1307
|
+
.param-desc h6 {
|
|
1308
|
+
margin: var(--sl-spacing-xs) 0 2px 0;
|
|
1309
|
+
font-weight: 600;
|
|
1310
|
+
line-height: 1.3;
|
|
1311
|
+
color: var(--sl-color-text);
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
.param-desc h3 { font-size: 0.95em; }
|
|
1315
|
+
.param-desc h4 { font-size: 0.9em; }
|
|
1316
|
+
.param-desc h5,
|
|
1317
|
+
.param-desc h6 { font-size: 0.85em; }
|
|
1318
|
+
|
|
1319
|
+
.param-example {
|
|
1320
|
+
font-size: var(--sl-font-size-xs);
|
|
1321
|
+
color: var(--sl-color-text-muted);
|
|
1322
|
+
margin-top: 2px;
|
|
814
1323
|
}
|
|
815
1324
|
|
|
816
1325
|
.param-example code {
|
|
@@ -842,7 +1351,7 @@ var cp;lp.styles=[Pe,b`
|
|
|
842
1351
|
gap: var(--sl-spacing-xs);
|
|
843
1352
|
}
|
|
844
1353
|
}
|
|
845
|
-
`],up([je({type:Array})],fp.prototype,"parameters",2),fp=up([_e("sl-parameters")],fp);const hp=Symbol("skip");function mp(e){return e<10?"0"+e:e}function gp(e,t){return t>e.length?e.repeat(Math.trunc(t/e.length)+1).substring(0,t):e}function yp(...e){const t=e=>e&&"object"==typeof e;return e.reduce((e,r)=>(Object.keys(r||{}).forEach(n=>{const o=e[n],s=r[n];t(o)&&t(s)?e[n]=yp(o,s):e[n]=s}),e),Array.isArray(e[e.length-1])?[]:{})}function vp(e){return{value:"object"===e?{}:"array"===e?[]:void 0}}function bp(e,t){t&&e.pop()}function $p(e,t={},r={}){var n,o;const{value:s}=e,{propertyName:i}=r,{name:a,prefix:l,namespace:c}=function(e){var t,r,n,o,s;return{name:(null==(t=null==e?void 0:e.xml)?void 0:t.name)||"",prefix:(null==(r=null==e?void 0:e.xml)?void 0:r.prefix)||"",namespace:(null==(n=null==e?void 0:e.xml)?void 0:n.namespace)||null,attribute:(null==(o=null==e?void 0:e.xml)?void 0:o.attribute)??!1,wrapped:(null==(s=null==e?void 0:e.xml)?void 0:s.wrapped)??!1}}(t),d=function(e){const t=null==e?void 0:e.xml;return(null==t?void 0:t.nodeType)?t.nodeType:!0===(null==t?void 0:t.attribute)?"attribute":!0===(null==t?void 0:t.wrapped)&&"array"===(null==e?void 0:e.type)?"element":(null==e?void 0:e.$ref)||(null==e?void 0:e.$dynamicRef)||"array"===(null==e?void 0:e.type)||(null==e?void 0:e.oneOf)||(null==e?void 0:e.anyOf)||(null==e?void 0:e.allOf)?"none":"element"}(t);let p=a||i?`${l?l+":":""}${a||i}`:null,u="object"==typeof s?Array.isArray(s)?[...s]:{...s}:s;switch(d){case"attribute":p&&(p=`$${p}`);break;case"text":p="#text";break;case"cdata":p="#cdata";break;case"none":"array"===t.type?(p=null,void 0!==t.example&&(p=(null==(o=null==(n=t.items)?void 0:n.xml)?void 0:o.name)||p)):p=null;break;default:"array"===t.type&&Array.isArray(u)&&(u={[p]:[...u]})}return c&&"text"!==d&&"cdata"!==d&&"none"!==d&&("object"==typeof u?u["$xmlns"+(l?":"+l:"")]=c:u={["$xmlns"+(l?":"+l:"")]:c,"#text":u}),{propertyName:p,value:u}}const xp={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",additionalItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",properties:"object",patternProperties:"object",dependencies:"object"};function wp(e){if(void 0!==e.type)return Array.isArray(e.type)?0===e.type.length?null:e.type[0]:e.type;const t=Object.keys(xp);for(var r=0;r<t.length;r++){let n=t[r],o=xp[n];if(void 0!==e[n])return o}return null}var _p,kp,Sp,jp;var Op=function(){if(jp)return Sp;jp=1;var e=function(){if(kp)return _p;kp=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString;return _p=function(r,n,o){if("[object Function]"!==t.call(n))throw new TypeError("iterator must be a function");var s=r.length;if(s===+s)for(var i=0;i<s;i++)n.call(o,r[i],i,r);else for(var a in r)e.call(r,a)&&n.call(o,r[a],a,r)}}();function t(e,r,n){if(3===arguments.length)return t.set(e,r,n);if(2===arguments.length)return t.get(e,r);var o=t.bind(t,e);for(var s in t)t.hasOwnProperty(s)&&(o[s]=t[s].bind(o,e));return o}return Sp=t,t.get=function(e,r){for(var n=Array.isArray(r)?r:t.parse(r),o=0;o<n.length;++o){var s=n[o];if("object"!=typeof e||!(s in e))throw new Error("Invalid reference token: "+s);e=e[s]}return e},t.set=function(e,r,n){var o=Array.isArray(r)?r:t.parse(r),s=o[0];if(0===o.length)throw Error("Can not set the root object");for(var i=0;i<o.length-1;++i){var a=o[i];"string"!=typeof a&&"number"!=typeof a&&(a=String(a)),"__proto__"!==a&&"constructor"!==a&&"prototype"!==a&&("-"===a&&Array.isArray(e)&&(a=e.length),s=o[i+1],a in e||(s.match(/^(\d+|-)$/)?e[a]=[]:e[a]={}),e=e[a])}return"-"===s&&Array.isArray(e)&&(s=e.length),e[s]=n,this},t.remove=function(e,r){var n=Array.isArray(r)?r:t.parse(r),o=n[n.length-1];if(void 0===o)throw new Error('Invalid JSON pointer for remove: "'+r+'"');var s=t.get(e,n.slice(0,-1));if(Array.isArray(s)){var i=+o;if(""===o&&isNaN(i))throw new Error('Invalid array index: "'+o+'"');Array.prototype.splice.call(s,i,1)}else delete s[o]},t.dict=function(e,r){var n={};return t.walk(e,function(e,t){n[t]=e},r),n},t.walk=function(r,n,o){var s=[];o=o||function(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t||"[object Array]"===t},function r(i){e(i,function(e,i){s.push(String(i)),o(e)?r(e):n(e,t.compile(s)),s.pop()})}(r)},t.has=function(e,r){try{t.get(e,r)}catch(cp){return!1}return!0},t.escape=function(e){return e.toString().replace(/~/g,"~0").replace(/\//g,"~1")},t.unescape=function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")},t.parse=function(e){if(""===e)return[];if("/"!==e.charAt(0))throw new Error("Invalid JSON pointer: "+e);return e.substring(1).split(/\//).map(t.unescape)},t.compile=function(e){return 0===e.length?"":"/"+e.map(t.escape).join("/")},Sp}();const Pp=s(Op);let Ep={},Tp=[];function Ap(e){let t;return void 0!==e.const?t=e.const:void 0!==e.examples&&e.examples.length?t=e.examples[0]:void 0!==e.enum&&e.enum.length?t=e.enum[0]:void 0!==e.default&&(t=e.default),t}function Cp(e){const t=Ap(e);if(void 0!==t)return{value:t,readOnly:e.readOnly,writeOnly:e.writeOnly,type:null}}function Ip(e,t,r,n){if(n){if(Tp.includes(e))return vp(wp(e));Tp.push(e)}if(n&&n.depth>t.maxSampleDepth)return bp(Tp,n),vp(wp(e));if(e.$ref){if(!r)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let o=decodeURIComponent(e.$ref);o.startsWith("#")&&(o=o.substring(1));const s=Pp.get(r,o);let i;if(!0!==Ep[o]){Ep[o]=!0;const e=Ip(s,t,r,n);if("xml"===t.format){const t=o.split("/").pop(),r={...n,propertyName:(null==n?void 0:n.propertyName)||t},{propertyName:a,value:l}=$p(e,s,r);i={...e,value:{[a||"root"]:l}}}else i=e;Ep[o]=!1}else{i=vp(wp(s))}return bp(Tp,n),i}if(void 0!==e.example)return bp(Tp,n),{value:e.example,readOnly:e.readOnly,writeOnly:e.writeOnly,type:e.type};if(void 0!==e.allOf)return bp(Tp,n),Cp(e)||function(e,t,r,n,o){let s=Ip(e,r,n);const i=[];for(let a of t){const{type:e,readOnly:t,writeOnly:l,value:c}=Ip({type:s.type,...a},r,n,{...o,isAllOfChild:!0});s.type&&e&&e!==s.type&&(console.warn("allOf: schemas with different types can't be merged"),s.type=e),s.type=s.type||e,s.readOnly=s.readOnly||t,s.writeOnly=s.writeOnly||l,null!=c&&i.push(c)}if("object"===s.type){s.value=yp(s.value||{},...i.filter(e=>"object"==typeof e));for(const e in s.value)s.value[e]===hp&&delete s.value[e];return s}{"array"===s.type&&(r.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));const e=i[i.length-1];return s.value=null!=e?e:s.value,s}}({...e,allOf:void 0},e.allOf,t,r,n);if(e.oneOf&&e.oneOf.length){e.anyOf&&(t.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),bp(Tp,n);return i(e,Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.oneOf[0]))}if(e.anyOf&&e.anyOf.length){bp(Tp,n);return i(e,Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.anyOf[0]))}if(e.if&&e.then){bp(Tp,n);const{if:o,then:s,...i}=e;return Ip(yp(i,o,s),t,r,n)}let o=Ap(e),s=null;if(void 0===o){o=null,s=e.type,Array.isArray(s)&&e.type.length>0&&(s=e.type[0]),s||(s=wp(e));let i=nu[s];i&&(o=i(e,t,r,n))}return bp(Tp,n),{value:o,readOnly:e.readOnly,writeOnly:e.writeOnly,type:s};function i(e,o){const s=Cp(e);if(void 0!==s)return s;const i=Ip({...e,oneOf:void 0,anyOf:void 0},t,r,n),a=Ip(o,t,r,n);if("object"==typeof i.value&&"object"==typeof a.value){const e=yp(i.value,a.value);return{...a,value:e}}return a}}function Rp(e){let t=0;if("number"!==e.type||"float"!==e.format&&"double"!==e.format||(t=.1),"boolean"==typeof e.exclusiveMinimum||"boolean"==typeof e.exclusiveMaximum){if(e.maximum&&e.minimum)return t=e.exclusiveMinimum?Math.floor(e.minimum)+1:e.minimum,(e.exclusiveMaximum&&t>=e.maximum||!e.exclusiveMaximum&&t>e.maximum)&&(t=(e.maximum+e.minimum)/2),t;if(e.minimum)return e.exclusiveMinimum?Math.floor(e.minimum)+1:e.minimum;if(e.maximum)return e.exclusiveMaximum?e.maximum>0?0:Math.floor(e.maximum)-1:e.maximum>0?0:e.maximum}else{if(e.minimum)return e.minimum;e.exclusiveMinimum?(t=Math.floor(e.exclusiveMinimum)+1,t===e.exclusiveMaximum&&(t=(t+Math.floor(e.exclusiveMaximum)-1)/2)):e.exclusiveMaximum?t=Math.floor(e.exclusiveMaximum)-1:e.maximum&&(t=e.maximum)}return t}function Np(e,t){return e}function Mp(e,t,r){let n=1;if(e)switch(e){case"?":n=0;break;case"*":n=Np(0);break;case"+":n=Np(1);break;default:throw new Error("Unknown quantifier symbol provided.")}else null!=t&&null!=r?n=Np(parseInt(t)):null!=t&&null==r&&(n=parseInt(t));return n}function qp({min:e,max:t,omitTime:r,omitDate:n}){let o=function(e,t,r){var n=r?"":e.getUTCFullYear()+"-"+mp(e.getUTCMonth()+1)+"-"+mp(e.getUTCDate());return t||(n+="T"+mp(e.getUTCHours())+":"+mp(e.getUTCMinutes())+":"+mp(e.getUTCSeconds())+"Z"),n}(new Date("2019-08-24T14:15:22.123Z"),r,n);return o.length<e&&console.warn(`Using minLength = ${e} is incorrect with format "date-time"`),t&&o.length>t&&console.warn(`Using maxLength = ${t} is incorrect with format "date-time"`),o}function zp(e,t,r,n,o=!1){if(n&&o)return function(e){var t;let r,n,o,s=!1;e instanceof RegExp&&(s=e.flags.includes("i"),e=(null==(t=(e=e.toString()).match(/\/(.+?)\//))?void 0:t[1])??"");const i=/([.A-Za-z0-9])(?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/;let a=(e=e.replace(/^(\^)?(.*?)(\$)?$/,"$2")).match(i);for(;null!=a;){const t=a[2],r=a[3];o=Mp(a[4],t,r),e=e.slice(0,a.index)+a[1].repeat(o)+e.slice(a.index+a[0].length),a=e.match(i)}const l=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,c=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(a=e.match(c);null!=a;){const t="^"===a[1],i="-"===a[2],d=a[4],p=a[5],u=a[6],f=[];let h=a[3],m=h.match(l);for(i&&f.push(45);null!=m;){if(-1===m[0].indexOf("-"))s&&isNaN(Number(m[0]))?(f.push(m[0].toUpperCase().charCodeAt(0)),f.push(m[0].toLowerCase().charCodeAt(0))):f.push(m[0].charCodeAt(0));else{const e=m[0].split("-").map(e=>e.charCodeAt(0));if(r=e[0],n=e[1],r>n)throw new Error("Character range provided is out of order.");for(let t=r;t<=n;t++)if(s&&isNaN(Number(String.fromCharCode(t)))){const e=String.fromCharCode(t);f.push(e.toUpperCase().charCodeAt(0)),f.push(e.toLowerCase().charCodeAt(0))}else f.push(t)}h=h.substring(m[0].length),m=h.match(l)}if(o=Mp(u,d,p),t){let e=-1;for(let t=48;t<=57;t++)e=f.indexOf(t),e>-1?f.splice(e,1):f.push(t);for(let t=65;t<=90;t++)e=f.indexOf(t),e>-1?f.splice(e,1):f.push(t);for(let t=97;t<=122;t++)e=f.indexOf(t),e>-1?f.splice(e,1):f.push(t)}const g=Array.from({length:o},()=>String.fromCharCode(f[Np(0)])).join("");a=(e=e.slice(0,a.index)+g+e.slice(a.index+a[0].length)).match(c)}const d=/(.)\{(\d+)\,(\d+)\}/;for(a=e.match(d);null!=a;){if(r=parseInt(a[2]),n=parseInt(a[3]),r>n)throw new Error("Numbers out of order in {} quantifier.");o=Np(r),e=e.slice(0,a.index)+a[1].repeat(o)+e.slice(a.index+a[0].length),a=e.match(d)}const p=/(.)\{(\d+)\}/;for(a=e.match(p);null!=a;)o=parseInt(a[2]),e=e.slice(0,a.index)+a[1].repeat(o)+e.slice(a.index+a[0].length),a=e.match(p);return e}(n);let s=gp("string",e);return t&&s.length>t&&(s=s.substring(0,t)),s}const Up={email:function(){return"user@example.com"},"idn-email":function(){return"пошта@укр.нет"},password:function(e,t){let r="pa$$word";return e>r.length&&(r+="_",r+=gp("qwerty!@#$%^123456",e-r.length).substring(0,e-r.length)),r},"date-time":function(e,t){return qp({min:e,max:t,omitTime:!1,omitDate:!1})},date:function(e,t){return qp({min:e,max:t,omitTime:!0,omitDate:!1})},time:function(e,t){return qp({min:e,max:t,omitTime:!1,omitDate:!0}).slice(1)},ipv4:function(){return"192.168.0.1"},ipv6:function(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"},hostname:function(){return"example.com"},"idn-hostname":function(){return"приклад.укр"},iri:function(){return"http://example.com/entity/1"},"iri-reference":function(){return"/entity/1"},uri:function(){return"http://example.com"},"uri-reference":function(){return"../dictionary"},"uri-template":function(){return"http://example.com/{endpoint}"},uuid:function(e,t,r){return a=function(e){var t=0;if(0==e.length)return t;for(var r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return t}(r||"id"),n=a,o=a,s=a,i=a,l=function(){var e=(n|=0)-((o|=0)<<27|o>>>5)|0;return n=o^((s|=0)<<17|s>>>15),o=s+(i|=0)|0,s=i+e|0,((i=n+e|0)>>>0)/4294967296},"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{var t=16*l()%16|0;return("x"==e?t:3&t|8).toString(16)});var n,o,s,i,a,l},default:zp,"json-pointer":function(){return"/json/pointer"},"relative-json-pointer":function(){return"1/relative/json/pointer"},regex:function(){return"/regex/"}};class Lp{constructor(e,t={}){this.pattern=e,this.separator=t.separator||".",this.segments=this._parse(e),this._hasDeepWildcard=this.segments.some(e=>"deep-wildcard"===e.type),this._hasAttributeCondition=this.segments.some(e=>void 0!==e.attrName),this._hasPositionSelector=this.segments.some(e=>void 0!==e.position)}_parse(e){const t=[];let r=0,n="";for(;r<e.length;)e[r]===this.separator?r+1<e.length&&e[r+1]===this.separator?(n.trim()&&(t.push(this._parseSegment(n.trim())),n=""),t.push({type:"deep-wildcard"}),r+=2):(n.trim()&&t.push(this._parseSegment(n.trim())),n="",r++):(n+=e[r],r++);return n.trim()&&t.push(this._parseSegment(n.trim())),t}_parseSegment(e){const t={type:"tag"};let r=null,n=e;const o=e.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(o&&(n=o[1]+o[3],o[2])){const e=o[2].slice(1,-1);e&&(r=e)}let s,i,a=n;if(n.includes("::")){const t=n.indexOf("::");if(s=n.substring(0,t).trim(),a=n.substring(t+2).trim(),!s)throw new Error(`Invalid namespace in pattern: ${e}`)}let l=null;if(a.includes(":")){const e=a.lastIndexOf(":"),t=a.substring(0,e).trim(),r=a.substring(e+1).trim();["first","last","odd","even"].includes(r)||/^nth\(\d+\)$/.test(r)?(i=t,l=r):i=a}else i=a;if(!i)throw new Error(`Invalid segment pattern: ${e}`);if(t.tag=i,s&&(t.namespace=s),r)if(r.includes("=")){const e=r.indexOf("=");t.attrName=r.substring(0,e).trim(),t.attrValue=r.substring(e+1).trim()}else t.attrName=r.trim();if(l){const e=l.match(/^nth\((\d+)\)$/);e?(t.position="nth",t.positionValue=parseInt(e[1],10)):t.position=l}return t}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}const Dp=new Set(["push","pop","reset","updateCurrent","restore"]);class Bp{constructor(e={}){this.separator=e.separator||".",this.path=[],this.siblingStacks=[]}push(e,t=null,r=null){if(this.path.length>0){this.path[this.path.length-1].values=void 0}const n=this.path.length;this.siblingStacks[n]||(this.siblingStacks[n]=new Map);const o=this.siblingStacks[n],s=r?`${r}:${e}`:e,i=o.get(s)||0;let a=0;for(const c of o.values())a+=c;o.set(s,i+1);const l={tag:e,position:a,counter:i};null!=r&&(l.namespace=r),null!=t&&(l.values=t),this.path.push(l)}pop(){if(0===this.path.length)return;const e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){const t=this.path[this.path.length-1];null!=e&&(t.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){var t;if(0===this.path.length)return;return null==(t=this.path[this.path.length-1].values)?void 0:t[e]}hasAttr(e){if(0===this.path.length)return!1;const t=this.path[this.path.length-1];return void 0!==t.values&&e in t.values}getPosition(){return 0===this.path.length?-1:this.path[this.path.length-1].position??0}getCounter(){return 0===this.path.length?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,t=!0){const r=e||this.separator;return this.path.map(e=>t&&e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(r)}toArray(){return this.path.map(e=>e.tag)}reset(){this.path=[],this.siblingStacks=[]}matches(e){const t=e.segments;return 0!==t.length&&(e.hasDeepWildcard()?this._matchWithDeepWildcard(t):this._matchSimple(t))}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let t=0;t<e.length;t++){const r=e[t],n=this.path[t],o=t===this.path.length-1;if(!this._matchSegment(r,n,o))return!1}return!0}_matchWithDeepWildcard(e){let t=this.path.length-1,r=e.length-1;for(;r>=0&&t>=0;){const n=e[r];if("deep-wildcard"===n.type){if(r--,r<0)return!0;const n=e[r];let o=!1;for(let e=t;e>=0;e--){const s=e===this.path.length-1;if(this._matchSegment(n,this.path[e],s)){t=e-1,r--,o=!0;break}}if(!o)return!1}else{const e=t===this.path.length-1;if(!this._matchSegment(n,this.path[t],e))return!1;t--,r--}}return r<0}_matchSegment(e,t,r){if("*"!==e.tag&&e.tag!==t.tag)return!1;if(void 0!==e.namespace&&"*"!==e.namespace&&e.namespace!==t.namespace)return!1;if(void 0!==e.attrName){if(!r)return!1;if(!t.values||!(e.attrName in t.values))return!1;if(void 0!==e.attrValue){const r=t.values[e.attrName];if(String(r)!==String(e.attrValue))return!1}}if(void 0!==e.position){if(!r)return!1;const n=t.counter??0;if("first"===e.position&&0!==n)return!1;if("odd"===e.position&&n%2!=1)return!1;if("even"===e.position&&n%2!=0)return!1;if("nth"===e.position&&n!==e.positionValue)return!1}return!0}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>new Map(e))}}restore(e){this.path=e.path.map(e=>({...e})),this.siblingStacks=e.siblingStacks.map(e=>new Map(e))}readOnly(){return new Proxy(this,{get(e,t,r){if(Dp.has(t))return()=>{throw new TypeError(`Cannot call '${t}' on a read-only Matcher. Obtain a writable instance to mutate state.`)};const n=Reflect.get(e,t,r);return"path"===t||"siblingStacks"===t?Object.freeze(Array.isArray(n)?n.map(e=>e instanceof Map?Object.freeze(new Map(e)):Object.freeze({...e})):n):"function"==typeof n?n.bind(e):n},set(e,t){throw new TypeError(`Cannot set property '${String(t)}' on a read-only Matcher.`)},deleteProperty(e,t){throw new TypeError(`Cannot delete property '${String(t)}' from a read-only Matcher.`)}})}}function Hp(e,t){let r="";t.format&&t.indentBy.length>0&&(r="\n");const n=[];if(t.stopNodes&&Array.isArray(t.stopNodes))for(let o=0;o<t.stopNodes.length;o++){const e=t.stopNodes[o];"string"==typeof e?n.push(new Lp(e)):e instanceof Lp&&n.push(e)}return Fp(e,t,r,new Bp,n)}function Fp(e,t,r,n,o){let s="",i=!1;if(t.maxNestedTags&&n.getDepth()>t.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(e)){if(null!=e){let r=e.toString();return r=Qp(r,t),r}return""}for(let a=0;a<e.length;a++){const l=e[a],c=Gp(l);if(void 0===c)continue;const d=Vp(l[":@"],t);n.push(c,d);const p=Zp(n,o);if(c===t.textNodeName){let e=l[c];p||(e=t.tagValueProcessor(c,e),e=Qp(e,t)),i&&(s+=r),s+=e,i=!1,n.pop();continue}if(c===t.cdataPropName){i&&(s+=r),s+=`<![CDATA[${l[c][0][t.textNodeName]}]]>`,i=!1,n.pop();continue}if(c===t.commentPropName){s+=r+`\x3c!--${l[c][0][t.textNodeName]}--\x3e`,i=!0,n.pop();continue}if("?"===c[0]){const e=Kp(l[":@"],t,p),o="?xml"===c?"":r;let a=l[c][0][t.textNodeName];a=0!==a.length?" "+a:"",s+=o+`<${c}${a}${e}?>`,i=!0,n.pop();continue}let u=r;""!==u&&(u+=t.indentBy);const f=r+`<${c}${Kp(l[":@"],t,p)}`;let h;h=p?Jp(l[c],t):Fp(l[c],t,u,n,o),-1!==t.unpairedTags.indexOf(c)?t.suppressUnpairedNode?s+=f+">":s+=f+"/>":h&&0!==h.length||!t.suppressEmptyNode?h&&h.endsWith(">")?s+=f+`>${h}${r}</${c}>`:(s+=f+">",h&&""!==r&&(h.includes("/>")||h.includes("</"))?s+=r+t.indentBy+h+r:s+=h,s+=`</${c}>`):s+=f+"/>",i=!0,n.pop()}return s}function Vp(e,t){if(!e||t.ignoreAttributes)return null;const r={};let n=!1;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;r[o.startsWith(t.attributeNamePrefix)?o.substr(t.attributeNamePrefix.length):o]=e[o],n=!0}return n?r:null}function Jp(e,t){if(!Array.isArray(e))return null!=e?e.toString():"";let r="";for(let n=0;n<e.length;n++){const o=e[n],s=Gp(o);if(s===t.textNodeName)r+=o[s];else if(s===t.cdataPropName)r+=o[s][0][t.textNodeName];else if(s===t.commentPropName)r+=o[s][0][t.textNodeName];else{if(s&&"?"===s[0])continue;if(s){const e=Wp(o[":@"],t),n=Jp(o[s],t);n&&0!==n.length?r+=`<${s}${e}>${n}</${s}>`:r+=`<${s}${e}/>`}}}return r}function Wp(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let o=e[n];!0===o&&t.suppressBooleanAttributes?r+=` ${n.substr(t.attributeNamePrefix.length)}`:r+=` ${n.substr(t.attributeNamePrefix.length)}="${o}"`}return r}function Gp(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];if(Object.prototype.hasOwnProperty.call(e,n)&&":@"!==n)return n}}function Kp(e,t,r){let n="";if(e&&!t.ignoreAttributes)for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;let s;r?s=e[o]:(s=t.attributeValueProcessor(o,e[o]),s=Qp(s,t)),!0===s&&t.suppressBooleanAttributes?n+=` ${o.substr(t.attributeNamePrefix.length)}`:n+=` ${o.substr(t.attributeNamePrefix.length)}="${s}"`}return n}function Zp(e,t){if(!t||0===t.length)return!1;for(let r=0;r<t.length;r++)if(e.matches(t[r]))return!0;return!1}function Qp(e,t){if(e&&e.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const n=t.entities[r];e=e.replace(n.regex,n.val)}return e}const Yp={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function Xp(e){if(this.options=Object.assign({},Yp,e),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>"string"==typeof e&&e.startsWith("*.")?".."+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let r=0;r<this.options.stopNodes.length;r++){const e=this.options.stopNodes[r];"string"==typeof e?this.stopNodeExpressions.push(new Lp(e)):e instanceof Lp&&this.stopNodeExpressions.push(e)}var t;!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn="function"==typeof(t=this.options.ignoreAttributes)?t:Array.isArray(t)?e=>{for(const r of t){if("string"==typeof r&&e===r)return!0;if(r instanceof RegExp&&r.test(e))return!0}}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ru),this.processTextOrObjNode=eu,this.options.format?(this.indentate=tu,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function eu(e,t,r,n){const o=this.extractAttributes(e);n.push(t,o);if(this.checkStopNode(n)){const o=this.buildRawContent(e),s=this.buildAttributesForStopNode(e);return n.pop(),this.buildObjectNode(o,t,s,r)}const s=this.j2x(e,r+1,n);return n.pop(),void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,s.attrStr,r,n):this.buildObjectNode(s.val,t,s.attrStr,r)}function tu(e){return this.options.indentBy.repeat(e)}function ru(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}Xp.prototype.build=function(e){if(this.options.preserveOrder)return Hp(e,this.options);{Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e});const t=new Bp;return this.j2x(e,0,t).val}},Xp.prototype.j2x=function(e,t,r){let n="",o="";if(this.options.maxNestedTags&&r.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");const s=this.options.jPath?r.toString():r,i=this.checkStopNode(r);for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a))if(void 0===e[a])this.isAttribute(a)&&(o+="");else if(null===e[a])this.isAttribute(a)||a===this.options.cdataPropName?o+="":"?"===a[0]?o+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if(e[a]instanceof Date)o+=this.buildTextValNode(e[a],a,"",t,r);else if("object"!=typeof e[a]){const l=this.isAttribute(a);if(l&&!this.ignoreAttributesFn(l,s))n+=this.buildAttrPairStr(l,""+e[a],i);else if(!l)if(a===this.options.textNodeName){let t=this.options.tagValueProcessor(a,""+e[a]);o+=this.replaceEntitiesValue(t)}else{r.push(a);const n=this.checkStopNode(r);if(r.pop(),n){const r=""+e[a];o+=""===r?this.indentate(t)+"<"+a+this.closeTag(a)+this.tagEndChar:this.indentate(t)+"<"+a+">"+r+"</"+a+this.tagEndChar}else o+=this.buildTextValNode(e[a],a,"",t,r)}}else if(Array.isArray(e[a])){const n=e[a].length;let s="",i="";for(let l=0;l<n;l++){const n=e[a][l];if(void 0===n);else if(null===n)"?"===a[0]?o+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if("object"==typeof n)if(this.options.oneListGroup){r.push(a);const e=this.j2x(n,t+1,r);r.pop(),s+=e.val,this.options.attributesGroupName&&n.hasOwnProperty(this.options.attributesGroupName)&&(i+=e.attrStr)}else s+=this.processTextOrObjNode(n,a,t,r);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(a,n);e=this.replaceEntitiesValue(e),s+=e}else{r.push(a);const e=this.checkStopNode(r);if(r.pop(),e){const e=""+n;s+=""===e?this.indentate(t)+"<"+a+this.closeTag(a)+this.tagEndChar:this.indentate(t)+"<"+a+">"+e+"</"+a+this.tagEndChar}else s+=this.buildTextValNode(n,a,"",t,r)}}this.options.oneListGroup&&(s=this.buildObjectNode(s,a,i,t)),o+=s}else if(this.options.attributesGroupName&&a===this.options.attributesGroupName){const t=Object.keys(e[a]),r=t.length;for(let o=0;o<r;o++)n+=this.buildAttrPairStr(t[o],""+e[a][t[o]],i)}else o+=this.processTextOrObjNode(e[a],a,t,r);return{attrStr:n,val:o}},Xp.prototype.buildAttrPairStr=function(e,t,r){return r||(t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t)),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},Xp.prototype.extractAttributes=function(e){if(!e||"object"!=typeof e)return null;const t={};let r=!1;if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){const n=e[this.options.attributesGroupName];for(let e in n){if(!Object.prototype.hasOwnProperty.call(n,e))continue;t[e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e]=n[e],r=!0}}else for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;const o=this.isAttribute(n);o&&(t[o]=e[n],r=!0)}return r?t:null},Xp.prototype.buildRawContent=function(e){if("string"==typeof e)return e;if("object"!=typeof e||null===e)return String(e);if(void 0!==e[this.options.textNodeName])return e[this.options.textNodeName];let t="";for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if(this.isAttribute(r))continue;if(this.options.attributesGroupName&&r===this.options.attributesGroupName)continue;const n=e[r];if(r===this.options.textNodeName)t+=n;else if(Array.isArray(n)){for(let e of n)if("string"==typeof e||"number"==typeof e)t+=`<${r}>${e}</${r}>`;else if("object"==typeof e&&null!==e){const n=this.buildRawContent(e),o=this.buildAttributesForStopNode(e);t+=""===n?`<${r}${o}/>`:`<${r}${o}>${n}</${r}>`}}else if("object"==typeof n&&null!==n){const e=this.buildRawContent(n),o=this.buildAttributesForStopNode(n);t+=""===e?`<${r}${o}/>`:`<${r}${o}>${e}</${r}>`}else t+=`<${r}>${n}</${r}>`}return t},Xp.prototype.buildAttributesForStopNode=function(e){if(!e||"object"!=typeof e)return"";let t="";if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){const r=e[this.options.attributesGroupName];for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;const n=e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e,o=r[e];!0===o&&this.options.suppressBooleanAttributes?t+=" "+n:t+=" "+n+'="'+o+'"'}}else for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;const n=this.isAttribute(r);if(n){const o=e[r];!0===o&&this.options.suppressBooleanAttributes?t+=" "+n:t+=" "+n+'="'+o+'"'}}return t},Xp.prototype.buildObjectNode=function(e,t,r,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let o="</"+t+this.tagEndChar,s="";return"?"===t[0]&&(s="?",o=""),!r&&""!==r||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===s.length?this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(n)+"<"+t+r+s+this.tagEndChar+e+this.indentate(n)+o:this.indentate(n)+"<"+t+r+s+">"+e+o}},Xp.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},Xp.prototype.checkStopNode=function(e){if(!this.stopNodeExpressions||0===this.stopNodeExpressions.length)return!1;for(let t=0;t<this.stopNodeExpressions.length;t++)if(e.matches(this.stopNodeExpressions[t]))return!0;return!1},Xp.prototype.buildTextValNode=function(e,t,r,n,o){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(t,e);return o=this.replaceEntitiesValue(o),""===o?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+o+"</"+t+this.tagEndChar}},Xp.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];e=e.replace(r.regex,r.val)}return e};var nu={};const ou={skipReadOnly:!1,maxSampleDepth:15};function su(e,t,r){let n=Object.assign({},ou,t);Ep={},Tp=[];let o=Ip(e,n,r).value;return"xml"===(null==n?void 0:n.format)?function(e,t){var r;if(!e)throw new Error("Unknown format output for building XML.");return(Array.isArray(e)||Object.keys(e).length>1)&&(e={[(null==(r=null==t?void 0:t.xml)?void 0:r.name)||"root"]:e}),new Xp({ignoreAttributes:!1,format:!0,attributeNamePrefix:"$",textNodeName:"#text",cdataPropName:"#cdata"}).build(e)}(o,e):o}function iu(e,t){nu[e]=t}iu("array",function(e,t={},r,n){const o=n&&n.depth||1;let s=Math.min(null!=e.maxItems?e.maxItems:1/0,e.minItems||1);const i=e.prefixItems||e.items||e.contains;Array.isArray(i)&&(s=Math.max(s,i.length));let a=e=>Array.isArray(i)?i[e]||{}:i||{},l=[];if(!i)return l;for(let c=0;c<s;c++){let e=a(c),{value:s}=Ip(e,t,r,{depth:o+1});if("xml"===(null==t?void 0:t.format)){const{value:t,propertyName:r}=$p({value:s},e,n);r?((null==l?void 0:l[r])||(l={...l,[r]:[]}),l[r].push(t)):l={...l,...t}}else l.push(s)}if("xml"===(null==t?void 0:t.format)&&1===o){const{value:t,propertyName:r}=$p({value:null},e,n);r&&(l=t?Array.isArray(l)?{[r]:{...t,...l.map(e=>({"#text":{...e}}))}}:{[r]:{...l,...t}}:{[r]:l})}return l}),iu("boolean",function(e){return!0}),iu("integer",Rp),iu("number",Rp),iu("object",function(e,t={},r,n){let o={};const s=n&&n.depth||1;if(e&&"object"==typeof e.properties){const i=Array.isArray(e.required)?e.required:[],a={};for(const e of i)a[e]=!0;Object.keys(e.properties).forEach(i=>{if(t.skipNonRequired&&!a.hasOwnProperty(i))return;const l=Ip(e.properties[i],t,r,{propertyName:i,depth:s+1});if(t.skipReadOnly&&l.readOnly)(null==n?void 0:n.isAllOfChild)&&(o[i]=hp);else if(t.skipWriteOnly&&l.writeOnly)(null==n?void 0:n.isAllOfChild)&&(o[i]=hp);else if("xml"===(null==t?void 0:t.format)){const{propertyName:t,value:r}=$p(l,e.properties[i],{propertyName:i});t?o[t]=r:null!==r&&"object"==typeof r&&(o={...o,...r})}else o[i]=l.value})}if(e&&"object"==typeof e.additionalProperties){const n=e.additionalProperties["x-additionalPropertiesName"]||"property";o[`${String(n)}1`]=Ip(e.additionalProperties,t,r,{depth:s+1}).value,o[`${String(n)}2`]=Ip(e.additionalProperties,t,r,{depth:s+1}).value}if(e&&"object"==typeof e.properties&&void 0!==e.maxProperties&&Object.keys(o).length>e.maxProperties){const t={};let r=0;(Array.isArray(e.required)?e.required:[]).forEach(e=>{void 0!==o[e]&&(t[e]=o[e],r++)}),Object.keys(o).forEach(n=>{r<e.maxProperties&&!t.hasOwnProperty(n)&&(t[n]=o[n],r++)}),o=t}return o}),iu("string",function(e,t,r,n){let o=e.format||"default",s=Up[o]||zp,i=n&&n.propertyName;return s(e.minLength||0,e.maxLength,i,e.pattern,null==t?void 0:t.enablePatterns)});var au=Object.defineProperty,lu=Object.getOwnPropertyDescriptor,cu=(e,t,r,n)=>{for(var o,s=n>1?void 0:n?lu(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&au(t,r,s),s};let du=class extends xe{constructor(){super(...arguments),this.requestBody=null,this._activeMediaType=0}_getSample(e){if(!e)return"{}";try{const t=su(e);return JSON.stringify(t,null,2)}catch{return"{}"}}_copy(e){navigator.clipboard.writeText(e)}render(){if(!this.requestBody)return ne``;const e=this.requestBody,t=e.content[this._activeMediaType];if(!t)return ne``;const r=t.example?JSON.stringify(t.example,null,2):this._getSample(t.schema);return ne`
|
|
1354
|
+
`],bp([Oe({type:Array})],$p.prototype,"parameters",2),$p=bp([_e("sl-parameters")],$p);const xp=Symbol("skip");function wp(e){return e<10?"0"+e:e}function _p(e,t){return t>e.length?e.repeat(Math.trunc(t/e.length)+1).substring(0,t):e}function kp(...e){const t=e=>e&&"object"==typeof e;return e.reduce((e,r)=>(Object.keys(r||{}).forEach(n=>{const o=e[n],s=r[n];t(o)&&t(s)?e[n]=kp(o,s):e[n]=s}),e),Array.isArray(e[e.length-1])?[]:{})}function Sp(e){return{value:"object"===e?{}:"array"===e?[]:void 0}}function Op(e,t){t&&e.pop()}function jp(e,t={},r={}){var n,o;const{value:s}=e,{propertyName:i}=r,{name:a,prefix:l,namespace:c}=function(e){var t,r,n,o,s;return{name:(null==(t=null==e?void 0:e.xml)?void 0:t.name)||"",prefix:(null==(r=null==e?void 0:e.xml)?void 0:r.prefix)||"",namespace:(null==(n=null==e?void 0:e.xml)?void 0:n.namespace)||null,attribute:(null==(o=null==e?void 0:e.xml)?void 0:o.attribute)??!1,wrapped:(null==(s=null==e?void 0:e.xml)?void 0:s.wrapped)??!1}}(t),d=function(e){const t=null==e?void 0:e.xml;return(null==t?void 0:t.nodeType)?t.nodeType:!0===(null==t?void 0:t.attribute)?"attribute":!0===(null==t?void 0:t.wrapped)&&"array"===(null==e?void 0:e.type)?"element":(null==e?void 0:e.$ref)||(null==e?void 0:e.$dynamicRef)||"array"===(null==e?void 0:e.type)||(null==e?void 0:e.oneOf)||(null==e?void 0:e.anyOf)||(null==e?void 0:e.allOf)?"none":"element"}(t);let p=a||i?`${l?l+":":""}${a||i}`:null,u="object"==typeof s?Array.isArray(s)?[...s]:{...s}:s;switch(d){case"attribute":p&&(p=`$${p}`);break;case"text":p="#text";break;case"cdata":p="#cdata";break;case"none":"array"===t.type?(p=null,void 0!==t.example&&(p=(null==(o=null==(n=t.items)?void 0:n.xml)?void 0:o.name)||p)):p=null;break;default:"array"===t.type&&Array.isArray(u)&&(u={[p]:[...u]})}return c&&"text"!==d&&"cdata"!==d&&"none"!==d&&("object"==typeof u?u["$xmlns"+(l?":"+l:"")]=c:u={["$xmlns"+(l?":"+l:"")]:c,"#text":u}),{propertyName:p,value:u}}const Pp={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",additionalItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",properties:"object",patternProperties:"object",dependencies:"object"};function Ep(e){if(void 0!==e.type)return Array.isArray(e.type)?0===e.type.length?null:e.type[0]:e.type;const t=Object.keys(Pp);for(var r=0;r<t.length;r++){let n=t[r],o=Pp[n];if(void 0!==e[n])return o}return null}var Tp,Ap,Cp,Ip;var Rp=function(){if(Ip)return Cp;Ip=1;var e=function(){if(Ap)return Tp;Ap=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString;return Tp=function(r,n,o){if("[object Function]"!==t.call(n))throw new TypeError("iterator must be a function");var s=r.length;if(s===+s)for(var i=0;i<s;i++)n.call(o,r[i],i,r);else for(var a in r)e.call(r,a)&&n.call(o,r[a],a,r)}}();function t(e,r,n){if(3===arguments.length)return t.set(e,r,n);if(2===arguments.length)return t.get(e,r);var o=t.bind(t,e);for(var s in t)t.hasOwnProperty(s)&&(o[s]=t[s].bind(o,e));return o}return Cp=t,t.get=function(e,r){for(var n=Array.isArray(r)?r:t.parse(r),o=0;o<n.length;++o){var s=n[o];if("object"!=typeof e||!(s in e))throw new Error("Invalid reference token: "+s);e=e[s]}return e},t.set=function(e,r,n){var o=Array.isArray(r)?r:t.parse(r),s=o[0];if(0===o.length)throw Error("Can not set the root object");for(var i=0;i<o.length-1;++i){var a=o[i];"string"!=typeof a&&"number"!=typeof a&&(a=String(a)),"__proto__"!==a&&"constructor"!==a&&"prototype"!==a&&("-"===a&&Array.isArray(e)&&(a=e.length),s=o[i+1],a in e||(s.match(/^(\d+|-)$/)?e[a]=[]:e[a]={}),e=e[a])}return"-"===s&&Array.isArray(e)&&(s=e.length),e[s]=n,this},t.remove=function(e,r){var n=Array.isArray(r)?r:t.parse(r),o=n[n.length-1];if(void 0===o)throw new Error('Invalid JSON pointer for remove: "'+r+'"');var s=t.get(e,n.slice(0,-1));if(Array.isArray(s)){var i=+o;if(""===o&&isNaN(i))throw new Error('Invalid array index: "'+o+'"');Array.prototype.splice.call(s,i,1)}else delete s[o]},t.dict=function(e,r){var n={};return t.walk(e,function(e,t){n[t]=e},r),n},t.walk=function(r,n,o){var s=[];o=o||function(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t||"[object Array]"===t},function r(i){e(i,function(e,i){s.push(String(i)),o(e)?r(e):n(e,t.compile(s)),s.pop()})}(r)},t.has=function(e,r){try{t.get(e,r)}catch(n){return!1}return!0},t.escape=function(e){return e.toString().replace(/~/g,"~0").replace(/\//g,"~1")},t.unescape=function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")},t.parse=function(e){if(""===e)return[];if("/"!==e.charAt(0))throw new Error("Invalid JSON pointer: "+e);return e.substring(1).split(/\//).map(t.unescape)},t.compile=function(e){return 0===e.length?"":"/"+e.map(t.escape).join("/")},Cp}();const Np=s(Rp);let Mp={},qp=[];function zp(e){let t;return void 0!==e.const?t=e.const:void 0!==e.examples&&e.examples.length?t=e.examples[0]:void 0!==e.enum&&e.enum.length?t=e.enum[0]:void 0!==e.default&&(t=e.default),t}function Lp(e){const t=zp(e);if(void 0!==t)return{value:t,readOnly:e.readOnly,writeOnly:e.writeOnly,type:null}}function Up(e,t,r,n){if(n){if(qp.includes(e))return Sp(Ep(e));qp.push(e)}if(n&&n.depth>t.maxSampleDepth)return Op(qp,n),Sp(Ep(e));if(e.$ref){if(!r)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let o=decodeURIComponent(e.$ref);o.startsWith("#")&&(o=o.substring(1));const s=Np.get(r,o);let i;if(!0!==Mp[o]){Mp[o]=!0;const e=Up(s,t,r,n);if("xml"===t.format){const t=o.split("/").pop(),r={...n,propertyName:(null==n?void 0:n.propertyName)||t},{propertyName:a,value:l}=jp(e,s,r);i={...e,value:{[a||"root"]:l}}}else i=e;Mp[o]=!1}else{i=Sp(Ep(s))}return Op(qp,n),i}if(void 0!==e.example)return Op(qp,n),{value:e.example,readOnly:e.readOnly,writeOnly:e.writeOnly,type:e.type};if(void 0!==e.allOf)return Op(qp,n),Lp(e)||function(e,t,r,n,o){let s=Up(e,r,n);const i=[];for(let a of t){const{type:e,readOnly:t,writeOnly:l,value:c}=Up({type:s.type,...a},r,n,{...o,isAllOfChild:!0});s.type&&e&&e!==s.type&&(console.warn("allOf: schemas with different types can't be merged"),s.type=e),s.type=s.type||e,s.readOnly=s.readOnly||t,s.writeOnly=s.writeOnly||l,null!=c&&i.push(c)}if("object"===s.type){s.value=kp(s.value||{},...i.filter(e=>"object"==typeof e));for(const e in s.value)s.value[e]===xp&&delete s.value[e];return s}{"array"===s.type&&(r.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));const e=i[i.length-1];return s.value=null!=e?e:s.value,s}}({...e,allOf:void 0},e.allOf,t,r,n);if(e.oneOf&&e.oneOf.length){e.anyOf&&(t.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),Op(qp,n);return i(e,Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.oneOf[0]))}if(e.anyOf&&e.anyOf.length){Op(qp,n);return i(e,Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.anyOf[0]))}if(e.if&&e.then){Op(qp,n);const{if:o,then:s,...i}=e;return Up(kp(i,o,s),t,r,n)}let o=zp(e),s=null;if(void 0===o){o=null,s=e.type,Array.isArray(s)&&e.type.length>0&&(s=e.type[0]),s||(s=Ep(e));let i=du[s];i&&(o=i(e,t,r,n))}return Op(qp,n),{value:o,readOnly:e.readOnly,writeOnly:e.writeOnly,type:s};function i(e,o){const s=Lp(e);if(void 0!==s)return s;const i=Up({...e,oneOf:void 0,anyOf:void 0},t,r,n),a=Up(o,t,r,n);if("object"==typeof i.value&&"object"==typeof a.value){const e=kp(i.value,a.value);return{...a,value:e}}return a}}function Dp(e){let t=0;if("number"!==e.type||"float"!==e.format&&"double"!==e.format||(t=.1),"boolean"==typeof e.exclusiveMinimum||"boolean"==typeof e.exclusiveMaximum){if(e.maximum&&e.minimum)return t=e.exclusiveMinimum?Math.floor(e.minimum)+1:e.minimum,(e.exclusiveMaximum&&t>=e.maximum||!e.exclusiveMaximum&&t>e.maximum)&&(t=(e.maximum+e.minimum)/2),t;if(e.minimum)return e.exclusiveMinimum?Math.floor(e.minimum)+1:e.minimum;if(e.maximum)return e.exclusiveMaximum?e.maximum>0?0:Math.floor(e.maximum)-1:e.maximum>0?0:e.maximum}else{if(e.minimum)return e.minimum;e.exclusiveMinimum?(t=Math.floor(e.exclusiveMinimum)+1,t===e.exclusiveMaximum&&(t=(t+Math.floor(e.exclusiveMaximum)-1)/2)):e.exclusiveMaximum?t=Math.floor(e.exclusiveMaximum)-1:e.maximum&&(t=e.maximum)}return t}function Bp(e,t){return e}function Hp(e,t,r){let n=1;if(e)switch(e){case"?":n=0;break;case"*":n=Bp(0);break;case"+":n=Bp(1);break;default:throw new Error("Unknown quantifier symbol provided.")}else null!=t&&null!=r?n=Bp(parseInt(t)):null!=t&&null==r&&(n=parseInt(t));return n}function Fp({min:e,max:t,omitTime:r,omitDate:n}){let o=function(e,t,r){var n=r?"":e.getUTCFullYear()+"-"+wp(e.getUTCMonth()+1)+"-"+wp(e.getUTCDate());return t||(n+="T"+wp(e.getUTCHours())+":"+wp(e.getUTCMinutes())+":"+wp(e.getUTCSeconds())+"Z"),n}(new Date("2019-08-24T14:15:22.123Z"),r,n);return o.length<e&&console.warn(`Using minLength = ${e} is incorrect with format "date-time"`),t&&o.length>t&&console.warn(`Using maxLength = ${t} is incorrect with format "date-time"`),o}function Vp(e,t,r,n,o=!1){if(n&&o)return function(e){var t;let r,n,o,s=!1;e instanceof RegExp&&(s=e.flags.includes("i"),e=(null==(t=(e=e.toString()).match(/\/(.+?)\//))?void 0:t[1])??"");const i=/([.A-Za-z0-9])(?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/;let a=(e=e.replace(/^(\^)?(.*?)(\$)?$/,"$2")).match(i);for(;null!=a;){const t=a[2],r=a[3];o=Hp(a[4],t,r),e=e.slice(0,a.index)+a[1].repeat(o)+e.slice(a.index+a[0].length),a=e.match(i)}const l=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,c=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(a=e.match(c);null!=a;){const t="^"===a[1],i="-"===a[2],d=a[4],p=a[5],u=a[6],h=[];let f=a[3],m=f.match(l);for(i&&h.push(45);null!=m;){if(-1===m[0].indexOf("-"))s&&isNaN(Number(m[0]))?(h.push(m[0].toUpperCase().charCodeAt(0)),h.push(m[0].toLowerCase().charCodeAt(0))):h.push(m[0].charCodeAt(0));else{const e=m[0].split("-").map(e=>e.charCodeAt(0));if(r=e[0],n=e[1],r>n)throw new Error("Character range provided is out of order.");for(let t=r;t<=n;t++)if(s&&isNaN(Number(String.fromCharCode(t)))){const e=String.fromCharCode(t);h.push(e.toUpperCase().charCodeAt(0)),h.push(e.toLowerCase().charCodeAt(0))}else h.push(t)}f=f.substring(m[0].length),m=f.match(l)}if(o=Hp(u,d,p),t){let e=-1;for(let t=48;t<=57;t++)e=h.indexOf(t),e>-1?h.splice(e,1):h.push(t);for(let t=65;t<=90;t++)e=h.indexOf(t),e>-1?h.splice(e,1):h.push(t);for(let t=97;t<=122;t++)e=h.indexOf(t),e>-1?h.splice(e,1):h.push(t)}const g=Array.from({length:o},()=>String.fromCharCode(h[Bp(0)])).join("");a=(e=e.slice(0,a.index)+g+e.slice(a.index+a[0].length)).match(c)}const d=/(.)\{(\d+)\,(\d+)\}/;for(a=e.match(d);null!=a;){if(r=parseInt(a[2]),n=parseInt(a[3]),r>n)throw new Error("Numbers out of order in {} quantifier.");o=Bp(r),e=e.slice(0,a.index)+a[1].repeat(o)+e.slice(a.index+a[0].length),a=e.match(d)}const p=/(.)\{(\d+)\}/;for(a=e.match(p);null!=a;)o=parseInt(a[2]),e=e.slice(0,a.index)+a[1].repeat(o)+e.slice(a.index+a[0].length),a=e.match(p);return e}(n);let s=_p("string",e);return t&&s.length>t&&(s=s.substring(0,t)),s}const Gp={email:function(){return"user@example.com"},"idn-email":function(){return"пошта@укр.нет"},password:function(e,t){let r="pa$$word";return e>r.length&&(r+="_",r+=_p("qwerty!@#$%^123456",e-r.length).substring(0,e-r.length)),r},"date-time":function(e,t){return Fp({min:e,max:t,omitTime:!1,omitDate:!1})},date:function(e,t){return Fp({min:e,max:t,omitTime:!0,omitDate:!1})},time:function(e,t){return Fp({min:e,max:t,omitTime:!1,omitDate:!0}).slice(1)},ipv4:function(){return"192.168.0.1"},ipv6:function(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"},hostname:function(){return"example.com"},"idn-hostname":function(){return"приклад.укр"},iri:function(){return"http://example.com/entity/1"},"iri-reference":function(){return"/entity/1"},uri:function(){return"http://example.com"},"uri-reference":function(){return"../dictionary"},"uri-template":function(){return"http://example.com/{endpoint}"},uuid:function(e,t,r){return a=function(e){var t=0;if(0==e.length)return t;for(var r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return t}(r||"id"),n=a,o=a,s=a,i=a,l=function(){var e=(n|=0)-((o|=0)<<27|o>>>5)|0;return n=o^((s|=0)<<17|s>>>15),o=s+(i|=0)|0,s=i+e|0,((i=n+e|0)>>>0)/4294967296},"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{var t=16*l()%16|0;return("x"==e?t:3&t|8).toString(16)});var n,o,s,i,a,l},default:Vp,"json-pointer":function(){return"/json/pointer"},"relative-json-pointer":function(){return"1/relative/json/pointer"},regex:function(){return"/regex/"}};class Jp{constructor(e,t={}){this.pattern=e,this.separator=t.separator||".",this.segments=this._parse(e),this._hasDeepWildcard=this.segments.some(e=>"deep-wildcard"===e.type),this._hasAttributeCondition=this.segments.some(e=>void 0!==e.attrName),this._hasPositionSelector=this.segments.some(e=>void 0!==e.position)}_parse(e){const t=[];let r=0,n="";for(;r<e.length;)e[r]===this.separator?r+1<e.length&&e[r+1]===this.separator?(n.trim()&&(t.push(this._parseSegment(n.trim())),n=""),t.push({type:"deep-wildcard"}),r+=2):(n.trim()&&t.push(this._parseSegment(n.trim())),n="",r++):(n+=e[r],r++);return n.trim()&&t.push(this._parseSegment(n.trim())),t}_parseSegment(e){const t={type:"tag"};let r=null,n=e;const o=e.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(o&&(n=o[1]+o[3],o[2])){const e=o[2].slice(1,-1);e&&(r=e)}let s,i,a=n;if(n.includes("::")){const t=n.indexOf("::");if(s=n.substring(0,t).trim(),a=n.substring(t+2).trim(),!s)throw new Error(`Invalid namespace in pattern: ${e}`)}let l=null;if(a.includes(":")){const e=a.lastIndexOf(":"),t=a.substring(0,e).trim(),r=a.substring(e+1).trim();["first","last","odd","even"].includes(r)||/^nth\(\d+\)$/.test(r)?(i=t,l=r):i=a}else i=a;if(!i)throw new Error(`Invalid segment pattern: ${e}`);if(t.tag=i,s&&(t.namespace=s),r)if(r.includes("=")){const e=r.indexOf("=");t.attrName=r.substring(0,e).trim(),t.attrValue=r.substring(e+1).trim()}else t.attrName=r.trim();if(l){const e=l.match(/^nth\((\d+)\)$/);e?(t.position="nth",t.positionValue=parseInt(e[1],10)):t.position=l}return t}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}const Wp=new Set(["push","pop","reset","updateCurrent","restore"]);class Kp{constructor(e={}){this.separator=e.separator||".",this.path=[],this.siblingStacks=[]}push(e,t=null,r=null){if(this.path.length>0){this.path[this.path.length-1].values=void 0}const n=this.path.length;this.siblingStacks[n]||(this.siblingStacks[n]=new Map);const o=this.siblingStacks[n],s=r?`${r}:${e}`:e,i=o.get(s)||0;let a=0;for(const c of o.values())a+=c;o.set(s,i+1);const l={tag:e,position:a,counter:i};null!=r&&(l.namespace=r),null!=t&&(l.values=t),this.path.push(l)}pop(){if(0===this.path.length)return;const e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){const t=this.path[this.path.length-1];null!=e&&(t.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){var t;if(0===this.path.length)return;return null==(t=this.path[this.path.length-1].values)?void 0:t[e]}hasAttr(e){if(0===this.path.length)return!1;const t=this.path[this.path.length-1];return void 0!==t.values&&e in t.values}getPosition(){return 0===this.path.length?-1:this.path[this.path.length-1].position??0}getCounter(){return 0===this.path.length?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,t=!0){const r=e||this.separator;return this.path.map(e=>t&&e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(r)}toArray(){return this.path.map(e=>e.tag)}reset(){this.path=[],this.siblingStacks=[]}matches(e){const t=e.segments;return 0!==t.length&&(e.hasDeepWildcard()?this._matchWithDeepWildcard(t):this._matchSimple(t))}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let t=0;t<e.length;t++){const r=e[t],n=this.path[t],o=t===this.path.length-1;if(!this._matchSegment(r,n,o))return!1}return!0}_matchWithDeepWildcard(e){let t=this.path.length-1,r=e.length-1;for(;r>=0&&t>=0;){const n=e[r];if("deep-wildcard"===n.type){if(r--,r<0)return!0;const n=e[r];let o=!1;for(let e=t;e>=0;e--){const s=e===this.path.length-1;if(this._matchSegment(n,this.path[e],s)){t=e-1,r--,o=!0;break}}if(!o)return!1}else{const e=t===this.path.length-1;if(!this._matchSegment(n,this.path[t],e))return!1;t--,r--}}return r<0}_matchSegment(e,t,r){if("*"!==e.tag&&e.tag!==t.tag)return!1;if(void 0!==e.namespace&&"*"!==e.namespace&&e.namespace!==t.namespace)return!1;if(void 0!==e.attrName){if(!r)return!1;if(!t.values||!(e.attrName in t.values))return!1;if(void 0!==e.attrValue){const r=t.values[e.attrName];if(String(r)!==String(e.attrValue))return!1}}if(void 0!==e.position){if(!r)return!1;const n=t.counter??0;if("first"===e.position&&0!==n)return!1;if("odd"===e.position&&n%2!=1)return!1;if("even"===e.position&&n%2!=0)return!1;if("nth"===e.position&&n!==e.positionValue)return!1}return!0}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>new Map(e))}}restore(e){this.path=e.path.map(e=>({...e})),this.siblingStacks=e.siblingStacks.map(e=>new Map(e))}readOnly(){return new Proxy(this,{get(e,t,r){if(Wp.has(t))return()=>{throw new TypeError(`Cannot call '${t}' on a read-only Matcher. Obtain a writable instance to mutate state.`)};const n=Reflect.get(e,t,r);return"path"===t||"siblingStacks"===t?Object.freeze(Array.isArray(n)?n.map(e=>e instanceof Map?Object.freeze(new Map(e)):Object.freeze({...e})):n):"function"==typeof n?n.bind(e):n},set(e,t){throw new TypeError(`Cannot set property '${String(t)}' on a read-only Matcher.`)},deleteProperty(e,t){throw new TypeError(`Cannot delete property '${String(t)}' from a read-only Matcher.`)}})}}function Zp(e,t){let r="";t.format&&t.indentBy.length>0&&(r="\n");const n=[];if(t.stopNodes&&Array.isArray(t.stopNodes))for(let o=0;o<t.stopNodes.length;o++){const e=t.stopNodes[o];"string"==typeof e?n.push(new Jp(e)):e instanceof Jp&&n.push(e)}return Yp(e,t,r,new Kp,n)}function Yp(e,t,r,n,o){let s="",i=!1;if(t.maxNestedTags&&n.getDepth()>t.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(e)){if(null!=e){let r=e.toString();return r=ou(r,t),r}return""}for(let a=0;a<e.length;a++){const l=e[a],c=tu(l);if(void 0===c)continue;const d=Qp(l[":@"],t);n.push(c,d);const p=nu(n,o);if(c===t.textNodeName){let e=l[c];p||(e=t.tagValueProcessor(c,e),e=ou(e,t)),i&&(s+=r),s+=e,i=!1,n.pop();continue}if(c===t.cdataPropName){i&&(s+=r),s+=`<![CDATA[${l[c][0][t.textNodeName]}]]>`,i=!1,n.pop();continue}if(c===t.commentPropName){s+=r+`\x3c!--${l[c][0][t.textNodeName]}--\x3e`,i=!0,n.pop();continue}if("?"===c[0]){const e=ru(l[":@"],t,p),o="?xml"===c?"":r;let a=l[c][0][t.textNodeName];a=0!==a.length?" "+a:"",s+=o+`<${c}${a}${e}?>`,i=!0,n.pop();continue}let u=r;""!==u&&(u+=t.indentBy);const h=r+`<${c}${ru(l[":@"],t,p)}`;let f;f=p?Xp(l[c],t):Yp(l[c],t,u,n,o),-1!==t.unpairedTags.indexOf(c)?t.suppressUnpairedNode?s+=h+">":s+=h+"/>":f&&0!==f.length||!t.suppressEmptyNode?f&&f.endsWith(">")?s+=h+`>${f}${r}</${c}>`:(s+=h+">",f&&""!==r&&(f.includes("/>")||f.includes("</"))?s+=r+t.indentBy+f+r:s+=f,s+=`</${c}>`):s+=h+"/>",i=!0,n.pop()}return s}function Qp(e,t){if(!e||t.ignoreAttributes)return null;const r={};let n=!1;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;r[o.startsWith(t.attributeNamePrefix)?o.substr(t.attributeNamePrefix.length):o]=e[o],n=!0}return n?r:null}function Xp(e,t){if(!Array.isArray(e))return null!=e?e.toString():"";let r="";for(let n=0;n<e.length;n++){const o=e[n],s=tu(o);if(s===t.textNodeName)r+=o[s];else if(s===t.cdataPropName)r+=o[s][0][t.textNodeName];else if(s===t.commentPropName)r+=o[s][0][t.textNodeName];else{if(s&&"?"===s[0])continue;if(s){const e=eu(o[":@"],t),n=Xp(o[s],t);n&&0!==n.length?r+=`<${s}${e}>${n}</${s}>`:r+=`<${s}${e}/>`}}}return r}function eu(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let o=e[n];!0===o&&t.suppressBooleanAttributes?r+=` ${n.substr(t.attributeNamePrefix.length)}`:r+=` ${n.substr(t.attributeNamePrefix.length)}="${o}"`}return r}function tu(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];if(Object.prototype.hasOwnProperty.call(e,n)&&":@"!==n)return n}}function ru(e,t,r){let n="";if(e&&!t.ignoreAttributes)for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;let s;r?s=e[o]:(s=t.attributeValueProcessor(o,e[o]),s=ou(s,t)),!0===s&&t.suppressBooleanAttributes?n+=` ${o.substr(t.attributeNamePrefix.length)}`:n+=` ${o.substr(t.attributeNamePrefix.length)}="${s}"`}return n}function nu(e,t){if(!t||0===t.length)return!1;for(let r=0;r<t.length;r++)if(e.matches(t[r]))return!0;return!1}function ou(e,t){if(e&&e.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const n=t.entities[r];e=e.replace(n.regex,n.val)}return e}const su={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function iu(e){if(this.options=Object.assign({},su,e),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>"string"==typeof e&&e.startsWith("*.")?".."+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let r=0;r<this.options.stopNodes.length;r++){const e=this.options.stopNodes[r];"string"==typeof e?this.stopNodeExpressions.push(new Jp(e)):e instanceof Jp&&this.stopNodeExpressions.push(e)}var t;!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn="function"==typeof(t=this.options.ignoreAttributes)?t:Array.isArray(t)?e=>{for(const r of t){if("string"==typeof r&&e===r)return!0;if(r instanceof RegExp&&r.test(e))return!0}}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=cu),this.processTextOrObjNode=au,this.options.format?(this.indentate=lu,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function au(e,t,r,n){const o=this.extractAttributes(e);n.push(t,o);if(this.checkStopNode(n)){const o=this.buildRawContent(e),s=this.buildAttributesForStopNode(e);return n.pop(),this.buildObjectNode(o,t,s,r)}const s=this.j2x(e,r+1,n);return n.pop(),void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,s.attrStr,r,n):this.buildObjectNode(s.val,t,s.attrStr,r)}function lu(e){return this.options.indentBy.repeat(e)}function cu(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}iu.prototype.build=function(e){if(this.options.preserveOrder)return Zp(e,this.options);{Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e});const t=new Kp;return this.j2x(e,0,t).val}},iu.prototype.j2x=function(e,t,r){let n="",o="";if(this.options.maxNestedTags&&r.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");const s=this.options.jPath?r.toString():r,i=this.checkStopNode(r);for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a))if(void 0===e[a])this.isAttribute(a)&&(o+="");else if(null===e[a])this.isAttribute(a)||a===this.options.cdataPropName?o+="":"?"===a[0]?o+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if(e[a]instanceof Date)o+=this.buildTextValNode(e[a],a,"",t,r);else if("object"!=typeof e[a]){const l=this.isAttribute(a);if(l&&!this.ignoreAttributesFn(l,s))n+=this.buildAttrPairStr(l,""+e[a],i);else if(!l)if(a===this.options.textNodeName){let t=this.options.tagValueProcessor(a,""+e[a]);o+=this.replaceEntitiesValue(t)}else{r.push(a);const n=this.checkStopNode(r);if(r.pop(),n){const r=""+e[a];o+=""===r?this.indentate(t)+"<"+a+this.closeTag(a)+this.tagEndChar:this.indentate(t)+"<"+a+">"+r+"</"+a+this.tagEndChar}else o+=this.buildTextValNode(e[a],a,"",t,r)}}else if(Array.isArray(e[a])){const n=e[a].length;let s="",i="";for(let l=0;l<n;l++){const n=e[a][l];if(void 0===n);else if(null===n)"?"===a[0]?o+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if("object"==typeof n)if(this.options.oneListGroup){r.push(a);const e=this.j2x(n,t+1,r);r.pop(),s+=e.val,this.options.attributesGroupName&&n.hasOwnProperty(this.options.attributesGroupName)&&(i+=e.attrStr)}else s+=this.processTextOrObjNode(n,a,t,r);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(a,n);e=this.replaceEntitiesValue(e),s+=e}else{r.push(a);const e=this.checkStopNode(r);if(r.pop(),e){const e=""+n;s+=""===e?this.indentate(t)+"<"+a+this.closeTag(a)+this.tagEndChar:this.indentate(t)+"<"+a+">"+e+"</"+a+this.tagEndChar}else s+=this.buildTextValNode(n,a,"",t,r)}}this.options.oneListGroup&&(s=this.buildObjectNode(s,a,i,t)),o+=s}else if(this.options.attributesGroupName&&a===this.options.attributesGroupName){const t=Object.keys(e[a]),r=t.length;for(let o=0;o<r;o++)n+=this.buildAttrPairStr(t[o],""+e[a][t[o]],i)}else o+=this.processTextOrObjNode(e[a],a,t,r);return{attrStr:n,val:o}},iu.prototype.buildAttrPairStr=function(e,t,r){return r||(t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t)),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},iu.prototype.extractAttributes=function(e){if(!e||"object"!=typeof e)return null;const t={};let r=!1;if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){const n=e[this.options.attributesGroupName];for(let e in n){if(!Object.prototype.hasOwnProperty.call(n,e))continue;t[e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e]=n[e],r=!0}}else for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;const o=this.isAttribute(n);o&&(t[o]=e[n],r=!0)}return r?t:null},iu.prototype.buildRawContent=function(e){if("string"==typeof e)return e;if("object"!=typeof e||null===e)return String(e);if(void 0!==e[this.options.textNodeName])return e[this.options.textNodeName];let t="";for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if(this.isAttribute(r))continue;if(this.options.attributesGroupName&&r===this.options.attributesGroupName)continue;const n=e[r];if(r===this.options.textNodeName)t+=n;else if(Array.isArray(n)){for(let e of n)if("string"==typeof e||"number"==typeof e)t+=`<${r}>${e}</${r}>`;else if("object"==typeof e&&null!==e){const n=this.buildRawContent(e),o=this.buildAttributesForStopNode(e);t+=""===n?`<${r}${o}/>`:`<${r}${o}>${n}</${r}>`}}else if("object"==typeof n&&null!==n){const e=this.buildRawContent(n),o=this.buildAttributesForStopNode(n);t+=""===e?`<${r}${o}/>`:`<${r}${o}>${e}</${r}>`}else t+=`<${r}>${n}</${r}>`}return t},iu.prototype.buildAttributesForStopNode=function(e){if(!e||"object"!=typeof e)return"";let t="";if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){const r=e[this.options.attributesGroupName];for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;const n=e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e,o=r[e];!0===o&&this.options.suppressBooleanAttributes?t+=" "+n:t+=" "+n+'="'+o+'"'}}else for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;const n=this.isAttribute(r);if(n){const o=e[r];!0===o&&this.options.suppressBooleanAttributes?t+=" "+n:t+=" "+n+'="'+o+'"'}}return t},iu.prototype.buildObjectNode=function(e,t,r,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let o="</"+t+this.tagEndChar,s="";return"?"===t[0]&&(s="?",o=""),!r&&""!==r||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===s.length?this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(n)+"<"+t+r+s+this.tagEndChar+e+this.indentate(n)+o:this.indentate(n)+"<"+t+r+s+">"+e+o}},iu.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},iu.prototype.checkStopNode=function(e){if(!this.stopNodeExpressions||0===this.stopNodeExpressions.length)return!1;for(let t=0;t<this.stopNodeExpressions.length;t++)if(e.matches(this.stopNodeExpressions[t]))return!0;return!1},iu.prototype.buildTextValNode=function(e,t,r,n,o){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(t,e);return o=this.replaceEntitiesValue(o),""===o?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+o+"</"+t+this.tagEndChar}},iu.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];e=e.replace(r.regex,r.val)}return e};var du={};const pu={skipReadOnly:!1,maxSampleDepth:15};function uu(e,t,r){let n=Object.assign({},pu,t);Mp={},qp=[];let o=Up(e,n,r).value;return"xml"===(null==n?void 0:n.format)?function(e,t){var r;if(!e)throw new Error("Unknown format output for building XML.");return(Array.isArray(e)||Object.keys(e).length>1)&&(e={[(null==(r=null==t?void 0:t.xml)?void 0:r.name)||"root"]:e}),new iu({ignoreAttributes:!1,format:!0,attributeNamePrefix:"$",textNodeName:"#text",cdataPropName:"#cdata"}).build(e)}(o,e):o}function hu(e,t){du[e]=t}hu("array",function(e,t={},r,n){const o=n&&n.depth||1;let s=Math.min(null!=e.maxItems?e.maxItems:1/0,e.minItems||1);const i=e.prefixItems||e.items||e.contains;Array.isArray(i)&&(s=Math.max(s,i.length));let a=e=>Array.isArray(i)?i[e]||{}:i||{},l=[];if(!i)return l;for(let c=0;c<s;c++){let e=a(c),{value:s}=Up(e,t,r,{depth:o+1});if("xml"===(null==t?void 0:t.format)){const{value:t,propertyName:r}=jp({value:s},e,n);r?((null==l?void 0:l[r])||(l={...l,[r]:[]}),l[r].push(t)):l={...l,...t}}else l.push(s)}if("xml"===(null==t?void 0:t.format)&&1===o){const{value:t,propertyName:r}=jp({value:null},e,n);r&&(l=t?Array.isArray(l)?{[r]:{...t,...l.map(e=>({"#text":{...e}}))}}:{[r]:{...l,...t}}:{[r]:l})}return l}),hu("boolean",function(e){return!0}),hu("integer",Dp),hu("number",Dp),hu("object",function(e,t={},r,n){let o={};const s=n&&n.depth||1;if(e&&"object"==typeof e.properties){const i=Array.isArray(e.required)?e.required:[],a={};for(const e of i)a[e]=!0;Object.keys(e.properties).forEach(i=>{if(t.skipNonRequired&&!a.hasOwnProperty(i))return;const l=Up(e.properties[i],t,r,{propertyName:i,depth:s+1});if(t.skipReadOnly&&l.readOnly)(null==n?void 0:n.isAllOfChild)&&(o[i]=xp);else if(t.skipWriteOnly&&l.writeOnly)(null==n?void 0:n.isAllOfChild)&&(o[i]=xp);else if("xml"===(null==t?void 0:t.format)){const{propertyName:t,value:r}=jp(l,e.properties[i],{propertyName:i});t?o[t]=r:null!==r&&"object"==typeof r&&(o={...o,...r})}else o[i]=l.value})}if(e&&"object"==typeof e.additionalProperties){const n=e.additionalProperties["x-additionalPropertiesName"]||"property";o[`${String(n)}1`]=Up(e.additionalProperties,t,r,{depth:s+1}).value,o[`${String(n)}2`]=Up(e.additionalProperties,t,r,{depth:s+1}).value}if(e&&"object"==typeof e.properties&&void 0!==e.maxProperties&&Object.keys(o).length>e.maxProperties){const t={};let r=0;(Array.isArray(e.required)?e.required:[]).forEach(e=>{void 0!==o[e]&&(t[e]=o[e],r++)}),Object.keys(o).forEach(n=>{r<e.maxProperties&&!t.hasOwnProperty(n)&&(t[n]=o[n],r++)}),o=t}return o}),hu("string",function(e,t,r,n){let o=e.format||"default",s=Gp[o]||Vp,i=n&&n.propertyName;return s(e.minLength||0,e.maxLength,i,e.pattern,null==t?void 0:t.enablePatterns)});var fu=Object.defineProperty,mu=Object.getOwnPropertyDescriptor,gu=(e,t,r,n)=>{for(var o,s=n>1?void 0:n?mu(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&fu(t,r,s),s};let yu=class extends xe{constructor(){super(...arguments),this.requestBody=null,this._activeMediaType=0}_getSample(e){if(!e)return"{}";try{const t=uu(e);return JSON.stringify(t,null,2)}catch{return"{}"}}_copy(e){navigator.clipboard.writeText(e)}render(){if(!this.requestBody)return ne``;const e=this.requestBody,t=e.content[this._activeMediaType];if(!t)return ne``;const r=t.example?JSON.stringify(t.example,null,2):this._getSample(t.schema);return ne`
|
|
846
1355
|
${e.description?ne`<div class="desc">${e.description}</div>`:null}
|
|
847
1356
|
|
|
848
1357
|
${e.content.length>1?ne`
|
|
@@ -870,7 +1379,7 @@ var cp;lp.styles=[Pe,b`
|
|
|
870
1379
|
<sl-schema .schema=${t.schema}></sl-schema>
|
|
871
1380
|
</div>
|
|
872
1381
|
`:null}
|
|
873
|
-
`}};
|
|
1382
|
+
`}};yu.styles=[Ee,b`
|
|
874
1383
|
:host {
|
|
875
1384
|
display: block;
|
|
876
1385
|
}
|
|
@@ -963,18 +1472,18 @@ var cp;lp.styles=[Pe,b`
|
|
|
963
1472
|
letter-spacing: 0.04em;
|
|
964
1473
|
margin-bottom: var(--sl-spacing-sm);
|
|
965
1474
|
}
|
|
966
|
-
`],
|
|
1475
|
+
`],gu([Oe({type:Object})],yu.prototype,"requestBody",2),gu([je()],yu.prototype,"_activeMediaType",2),yu=gu([_e("sl-request-body")],yu);
|
|
967
1476
|
/**
|
|
968
1477
|
* @license
|
|
969
1478
|
* Copyright 2017 Google LLC
|
|
970
1479
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
971
1480
|
*/
|
|
972
|
-
const
|
|
1481
|
+
const vu=2;class bu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}
|
|
973
1482
|
/**
|
|
974
1483
|
* @license
|
|
975
1484
|
* Copyright 2017 Google LLC
|
|
976
1485
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
977
|
-
*/class
|
|
1486
|
+
*/class $u extends bu{constructor(e){if(super(e),this.it=ie,e.type!==vu)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===ie||null==e)return this._t=void 0,this.it=e;if(e===se)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}$u.directiveName="unsafeHTML",$u.resultType=1;const xu=(wu=$u,(...e)=>({_$litDirective$:wu,values:e}));var wu,_u=Object.defineProperty,ku=Object.getOwnPropertyDescriptor,Su=(e,t,r,n)=>{for(var o,s=n>1?void 0:n?ku(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&_u(t,r,s),s};let Ou=class extends xe{constructor(){super(...arguments),this.responses=[],this._activeTab=0}_esc(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}_highlightJson(e){const t=[[/^"(?:[^"\\]|\\.)*"(?=\s*:)/,"hl-key"],[/^"(?:[^"\\]|\\.)*"/,"hl-str"],[/^\b(?:true|false|null)\b/,"hl-kw"],[/^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/,"hl-num"]];let r="",n=e;for(;n.length>0;){let e=!1;for(const[o,s]of t){const t=o.exec(n);if(t&&0===t.index){r+=`<span class="${s}">${this._esc(t[0])}</span>`,n=n.slice(t[0].length),e=!0;break}}e||(r+=this._esc(n[0]),n=n.slice(1))}return r}_getStatusClass(e){return"default"===e?"status-default":e.startsWith("2")?"status-2xx":e.startsWith("3")?"status-3xx":e.startsWith("4")?"status-4xx":e.startsWith("5")?"status-5xx":"status-default"}_getExample(e){const t=e.content[0];if(!t)return null;if(t.example)return JSON.stringify(t.example,null,2);if(Object.keys(t.examples).length>0){const e=Object.values(t.examples)[0];return JSON.stringify(e,null,2)}if(t.schema)try{const e=uu(t.schema);return JSON.stringify(e,null,2)}catch{return null}return null}render(){var e;if(0===this.responses.length)return ne``;const t=this.responses[this._activeTab];if(!t)return ne``;const r=this._getExample(t),n=Object.entries(t.headers),o=null==(e=t.content[0])?void 0:e.mediaType;return ne`
|
|
978
1487
|
<div class="status-tabs">
|
|
979
1488
|
${this.responses.map((e,t)=>ne`
|
|
980
1489
|
<button
|
|
@@ -1005,11 +1514,11 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
1005
1514
|
<span class="example-label">Response Example</span>
|
|
1006
1515
|
${o?ne`<span class="media-type-badge">${o}</span>`:null}
|
|
1007
1516
|
</div>
|
|
1008
|
-
<pre><code>${
|
|
1517
|
+
<pre><code>${xu(this._highlightJson(r))}</code></pre>
|
|
1009
1518
|
</div>
|
|
1010
1519
|
`:null}
|
|
1011
1520
|
</div>
|
|
1012
|
-
`}};
|
|
1521
|
+
`}};Ou.styles=[Ee,b`
|
|
1013
1522
|
:host {
|
|
1014
1523
|
display: block;
|
|
1015
1524
|
}
|
|
@@ -1148,7 +1657,7 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
1148
1657
|
.hl-str { color: #ce9178; }
|
|
1149
1658
|
.hl-num { color: #b5cea8; }
|
|
1150
1659
|
.hl-kw { color: #569cd6; }
|
|
1151
|
-
`],vu([je({type:Array})],bu.prototype,"responses",2),vu([Oe()],bu.prototype,"_activeTab",2),bu=vu([_e("sl-responses")],bu);const $u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:window,{FormData:xu,Blob:wu,File:_u}=$u,ku="\r\n",Su="-".repeat(2),ju=Symbol.toStringTag,Ou=(e,t,r)=>{let n="";return n+=`${Su}${e}${ku}`,n+=`Content-Disposition: form-data; name="${t}"`,"string"!=typeof r&&"blob"!==r.name&&(n+=`; filename="${r.name}"${ku}`,n+=`Content-Type: ${r.type||"application/octet-stream"}`),`${n}${ku.repeat(2)}`},Pu=async function*(e,t){for(const[r,n]of e)yield Ou(t,r,n),"string"==typeof n?yield n:yield await n.text(),yield ku;yield(e=>`${Su}${e}${Su}${ku.repeat(1)}`)(t)},Eu=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),Tu=(e,t)=>{const r=Eu(e,t);if(r)return e[r]},Au=(e,t)=>Boolean(Eu(e,t)),Cu=["application/json","application/x-json","text/json","text/x-json","+json"],Iu=(e,t)=>{if(void 0===t.value)return e;const r=e[t.name];return void 0===r?(e[t.name]=t.value,e):Array.isArray(r)?(r.push(t.value),e):(e[t.name]=[r,t.value],e)};function Ru(e){return new URLSearchParams(Object.entries(e).map(([e,t])=>Array.isArray(t)?t.map(t=>[e,t]):[[e,t]]).flat(1))}class Nu extends URL{get path(){return this.pathname+this.search}}class Mu{constructor({indent:e,join:t}={}){this.postProcessors=[],this.code=[],this.indentationCharacter="",this.lineJoin="\n",this.indentLine=(e,t=0)=>`${this.indentationCharacter.repeat(t)}${e}`,this.unshift=(e,t)=>{const r=this.indentLine(e,t);this.code.unshift(r)},this.push=(e,t)=>{const r=this.indentLine(e,t);this.code.push(r)},this.blank=()=>{this.code.push("")},this.join=()=>{const e=this.code.join(this.lineJoin);return this.postProcessors.reduce((e,t)=>t(e),e)},this.addPostProcessor=e=>{this.postProcessors=[...this.postProcessors,e]},this.indentationCharacter=e||"",this.lineJoin=null!=t?t:"\n"}}function qu(e,t={}){const{delimiter:r='"',escapeChar:n="\\",escapeNewlines:o=!0}=t;return[...e.toString()].map(e=>"\b"===e?`${n}b`:"\t"===e?`${n}t`:"\n"===e?o?`${n}n`:e:"\f"===e?`${n}f`:"\r"===e?o?`${n}r`:e:e===n?n+n:e===r?n+r:e<" "||e>"~"?JSON.stringify(e).slice(1,-1):e).join("")}const zu=e=>qu(e,{delimiter:"'"}),Uu=e=>qu(e,{delimiter:'"'}),Lu={info:{key:"c",title:"C",extname:".c",default:"libcurl"},clientsById:{libcurl:{info:{key:"libcurl",title:"Libcurl",link:"http://curl.haxx.se/libcurl",description:"Simple REST and HTTP API Client for C"},convert:({method:e,fullUrl:t,headersObj:r,allHeaders:n,postData:o})=>{const{push:s,blank:i,join:a}=new Mu;s("CURL *hnd = curl_easy_init();"),i(),s(`curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "${e.toUpperCase()}");`),s(`curl_easy_setopt(hnd, CURLOPT_URL, "${t}");`);const l=Object.keys(r);return l.length&&(i(),s("struct curl_slist *headers = NULL;"),l.forEach(e=>{s(`headers = curl_slist_append(headers, "${e}: ${Uu(r[e])}");`)}),s("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")),n.cookie&&(i(),s(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${n.cookie}");`)),(null==o?void 0:o.text)&&(i(),s(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(o.text)});`)),i(),s("CURLcode ret = curl_easy_perform(hnd);"),a()}}}};class Du{constructor(e){this.name="",this.toString=()=>`:${this.name}`,this.name=e}}let Bu=class{constructor(e){this.path="",this.toString=()=>`(clojure.java.io/file "${this.path}")`,this.path=e}};const Hu=e=>void 0===e?null:null===e?"null":e.constructor.name.toLowerCase(),Fu=e=>"object"===Hu(e)&&0===Object.keys(e).length,Vu=e=>(Object.keys(e).filter(t=>Fu(e[t])).forEach(t=>{delete e[t]}),e),Ju=(e,t)=>{const r=" ".repeat(e);return t.replace(/\n/g,`\n${r}`)},Wu=e=>{switch(Hu(e)){case"string":return`"${e.replace(/"/g,'\\"')}"`;case"file":case"keyword":default:return e.toString();case"null":return"nil";case"regexp":return`#"${e.source}"`;case"object":{const t=Object.keys(e).reduce((t,r)=>`${t}:${r} ${Ju(r.length+2,Wu(e[r]))}\n `,"").trim();return`{${Ju(1,t)}}`}case"array":{const t=e.reduce((e,t)=>`${e} ${Wu(t)}`,"").trim();return`[${Ju(1,t)}]`}}},Gu={info:{key:"clojure",title:"Clojure",extname:".clj",default:"clj_http"},clientsById:{clj_http:{info:{key:"clj_http",title:"clj-http",link:"https://github.com/dakrone/clj-http",description:"An idiomatic clojure http client wrapping the apache client."},convert:({queryObj:e,method:t,postData:r,url:n,allHeaders:o},s)=>{const{push:i,join:a}=new Mu({indent:null==s?void 0:s.indent});if(t=t.toLowerCase(),!["get","post","put","delete","patch","head","options"].includes(t))return i("Method not supported"),a();const l={headers:o,"query-params":e};switch(null==r?void 0:r.mimeType){case"application/json":{l["content-type"]=new Du("json"),l["form-params"]=r.jsonObj;const e=Eu(l.headers,"content-type");e&&delete l.headers[e]}break;case"application/x-www-form-urlencoded":{l["form-params"]=r.paramsObj;const e=Eu(l.headers,"content-type");e&&delete l.headers[e]}break;case"text/plain":{l.body=r.text;const e=Eu(l.headers,"content-type");e&&delete l.headers[e]}break;case"multipart/form-data":if(r.params){l.multipart=r.params.map(e=>e.fileName&&!e.value?{name:e.name,content:new Bu(e.fileName)}:{name:e.name,content:e.value});const e=Eu(l.headers,"content-type");e&&delete l.headers[e]}}if("application/json"===Tu(l.headers,"accept")){l.accept=new Du("json");const e=Eu(l.headers,"accept");e&&delete l.headers[e]}if(i("(require '[clj-http.client :as client])\n"),Fu(Vu(l)))i(`(client/${t} "${n}")`);else{const e=11+t.length+n.length;i(`(client/${t} "${n}" ${Ju(e,Wu(Vu(l)))})`)}return a()}}}},Ku={info:{key:"csharp",title:"C#",extname:".cs",default:"restsharp"},clientsById:{httpclient:{info:{key:"httpclient",title:"HttpClient",link:"https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient",description:".NET Standard HTTP Client"},convert:({allHeaders:e,postData:t,method:r,fullUrl:n},o)=>{var s,i;const a={indent:" ",...o},{push:l,join:c}=new Mu({indent:a.indent});l("using System.Net.Http.Headers;");let d="";const p=Boolean(e.cookie),u=(e=>{let t=Tu(e,"accept-encoding");if(!t)return[];const r={gzip:"DecompressionMethods.GZip",deflate:"DecompressionMethods.Deflate"},n=[];return"string"==typeof t&&(t=[t]),t.forEach(e=>{e.split(",").forEach(e=>{const t=/\s*([^;\s]+)/.exec(e);if(t){const e=r[t[1]];e&&n.push(e)}})}),n})(e);(p||u.length)&&(d="clientHandler",l("var clientHandler = new HttpClientHandler"),l("{"),p&&l("UseCookies = false,",1),u.length&&l(`AutomaticDecompression = ${u.join(" | ")},`,1),l("};")),l(`var client = new HttpClient(${d});`),l("var request = new HttpRequestMessage"),l("{");r=(r=r.toUpperCase())&&["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"].includes(r)?`HttpMethod.${r[0]}${r.substring(1).toLowerCase()}`:`new HttpMethod("${r}")`,l(`Method = ${r},`,1),l(`RequestUri = new Uri("${n}"),`,1);const f=Object.keys(e).filter(e=>{switch(e.toLowerCase()){case"content-type":case"content-length":case"accept-encoding":return!1;default:return!0}});if(f.length&&(l("Headers =",1),l("{",1),f.forEach(t=>{l(`{ "${t}", "${Uu(e[t])}" },`,2)}),l("},",1)),null==t?void 0:t.text){const e=t.mimeType;switch(e){case"application/x-www-form-urlencoded":l("Content = new FormUrlEncodedContent(new Dictionary<string, string>",1),l("{",1),null===(s=t.params)||void 0===s||s.forEach(e=>{l(`{ "${e.name}", "${e.value}" },`,2)}),l("}),",1);break;case"multipart/form-data":l("Content = new MultipartFormDataContent",1),l("{",1),null===(i=t.params)||void 0===i||i.forEach(e=>{l(`new StringContent(${JSON.stringify(e.value||"")})`,2),l("{",2),l("Headers =",3),l("{",3),e.contentType&&l(`ContentType = new MediaTypeHeaderValue("${e.contentType}"),`,4),l('ContentDisposition = new ContentDispositionHeaderValue("form-data")',4),l("{",4),l(`Name = "${e.name}",`,5),e.fileName&&l(`FileName = "${e.fileName}",`,5),l("}",4),l("}",3),l("},",2)}),l("},",1);break;default:l(`Content = new StringContent(${JSON.stringify((null==t?void 0:t.text)||"")})`,1),l("{",1),l("Headers =",2),l("{",2),l(`ContentType = new MediaTypeHeaderValue("${e}")`,3),l("}",2),l("}",1)}}return l("};"),l("using (var response = await client.SendAsync(request))"),l("{"),l("response.EnsureSuccessStatusCode();",1),l("var body = await response.Content.ReadAsStringAsync();",1),l("Console.WriteLine(body);",1),l("}"),c()}},restsharp:{info:{key:"restsharp",title:"RestSharp",link:"http://restsharp.org/",description:"Simple REST and HTTP API Client for .NET"},convert:({allHeaders:e,method:t,fullUrl:r,headersObj:n,cookies:o,postData:s})=>{const{push:i,join:a}=new Mu;if(!["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"].includes(t.toUpperCase()))return"Method not supported";if(i(`var client = new RestClient("${r}");`),i(`var request = new RestRequest(Method.${t.toUpperCase()});`),Object.keys(n).forEach(e=>{i(`request.AddHeader("${e}", "${Uu(n[e])}");`)}),null==o||o.forEach(({name:e,value:t})=>{i(`request.AddCookie("${e}", "${t}");`)}),null==s?void 0:s.text){const t=Tu(e,"content-type"),r=JSON.stringify(s.text);i(`request.AddParameter("${t}", ${r}, ParameterType.RequestBody);`)}return i("IRestResponse response = client.Execute(request);"),a()}}}},Zu={info:{key:"go",title:"Go",extname:".go",default:"native"},clientsById:{native:{info:{key:"native",title:"NewRequest",link:"http://golang.org/pkg/net/http/#NewRequest",description:"Golang HTTP client request"},convert:({postData:e,method:t,allHeaders:r,fullUrl:n},o={})=>{const{blank:s,push:i,join:a}=new Mu({indent:"\t"}),{showBoilerplate:l=!0,checkErrors:c=!1,printBody:d=!0,timeout:p=-1,insecureSkipVerify:u=!1}=o,f=c?"err":"_",h=l?1:0,m=()=>{c&&(i("if err != nil {",h),i("panic(err)",h+1),i("}",h))};l&&(i("package main"),s(),i("import ("),i('"fmt"',h),p>0&&i('"time"',h),u&&i('"crypto/tls"',h),(null==e?void 0:e.text)&&i('"strings"',h),i('"net/http"',h),d&&i('"io"',h),i(")"),s(),i("func main() {"),s()),u&&(i("insecureTransport := http.DefaultTransport.(*http.Transport).Clone()",h),i("insecureTransport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}",h));const g=p>0,y=g||u,v=y?"client":"http.DefaultClient";return y&&(i("client := http.Client{",h),g&&i(`Timeout: time.Duration(${p} * time.Second),`,h+1),u&&i("Transport: insecureTransport,",h+1),i("}",h),s()),i(`url := "${n}"`,h),s(),(null==e?void 0:e.text)?(i(`payload := strings.NewReader(${JSON.stringify(e.text)})`,h),s(),i(`req, ${f} := http.NewRequest("${t}", url, payload)`,h),s()):(i(`req, ${f} := http.NewRequest("${t}", url, nil)`,h),s()),m(),Object.keys(r).length&&(Object.keys(r).forEach(e=>{i(`req.Header.Add("${e}", "${Uu(r[e])}")`,h)}),s()),i(`res, ${f} := ${v}.Do(req)`,h),m(),d&&(s(),i("defer res.Body.Close()",h),i(`body, ${f} := io.ReadAll(res.Body)`,h),m()),s(),i("fmt.Println(res)",h),d&&i("fmt.Println(string(body))",h),l&&(s(),i("}")),a()}}}},Qu={info:{key:"http",title:"HTTP",extname:null,default:"1.1"},clientsById:{"http1.1":{info:{key:"http1.1",title:"HTTP/1.1",link:"https://tools.ietf.org/html/rfc7230",description:"HTTP/1.1 request string in accordance with RFC 7230"},convert:({method:e,fullUrl:t,uriObj:r,httpVersion:n,allHeaders:o,postData:s},i)=>{const a={absoluteURI:!1,autoContentLength:!0,autoHost:!0,...i},{blank:l,push:c,join:d}=new Mu({indent:"",join:"\r\n"}),p=a.absoluteURI?t:r.path;c(`${e} ${p} ${n}`);const u=Object.keys(o);u.forEach(e=>{const t=e.toLowerCase().replace(/(^|-)(\w)/g,e=>e.toUpperCase());c(`${t}: ${o[e]}`)}),a.autoHost&&!u.includes("host")&&c(`Host: ${r.host}`),a.autoContentLength&&(null==s?void 0:s.text)&&!u.includes("content-length")&&c(`Content-Length: ${s.text.length}`),l();return`${d()}\r\n${(null==s?void 0:s.text)||""}`}}}},Yu={info:{key:"java",title:"Java",extname:".java",default:"unirest"},clientsById:{asynchttp:{info:{key:"asynchttp",title:"AsyncHttp",link:"https://github.com/AsyncHttpClient/async-http-client",description:"Asynchronous Http and WebSocket Client library for Java"},convert:({method:e,allHeaders:t,postData:r,fullUrl:n},o)=>{const s={indent:" ",...o},{blank:i,push:a,join:l}=new Mu({indent:s.indent});return a("AsyncHttpClient client = new DefaultAsyncHttpClient();"),a(`client.prepare("${e.toUpperCase()}", "${n}")`),Object.keys(t).forEach(e=>{a(`.setHeader("${e}", "${Uu(t[e])}")`,1)}),(null==r?void 0:r.text)&&a(`.setBody(${JSON.stringify(r.text)})`,1),a(".execute()",1),a(".toCompletableFuture()",1),a(".thenAccept(System.out::println)",1),a(".join();",1),i(),a("client.close();"),l()}},nethttp:{info:{key:"nethttp",title:"java.net.http",link:"https://openjdk.java.net/groups/net/httpclient/intro.html",description:"Java Standardized HTTP Client API"},convert:({allHeaders:e,fullUrl:t,method:r,postData:n},o)=>{const s={indent:" ",...o},{push:i,join:a}=new Mu({indent:s.indent});return i("HttpRequest request = HttpRequest.newBuilder()"),i(`.uri(URI.create("${t}"))`,2),Object.keys(e).forEach(t=>{i(`.header("${t}", "${Uu(e[t])}")`,2)}),(null==n?void 0:n.text)?i(`.method("${r.toUpperCase()}", HttpRequest.BodyPublishers.ofString(${JSON.stringify(n.text)}))`,2):i(`.method("${r.toUpperCase()}", HttpRequest.BodyPublishers.noBody())`,2),i(".build();",2),i("HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"),i("System.out.println(response.body());"),a()}},okhttp:{info:{key:"okhttp",title:"OkHttp",link:"http://square.github.io/okhttp/",description:"An HTTP Request Client Library"},convert:({postData:e,method:t,fullUrl:r,allHeaders:n},o)=>{const s={indent:" ",...o},{push:i,blank:a,join:l}=new Mu({indent:s.indent});return i("OkHttpClient client = new OkHttpClient();"),a(),(null==e?void 0:e.text)&&(e.boundary?i(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`):i(`MediaType mediaType = MediaType.parse("${e.mimeType}");`),i(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)),i("Request request = new Request.Builder()"),i(`.url("${r}")`,1),["GET","POST","PUT","DELETE","PATCH","HEAD"].includes(t.toUpperCase())?["POST","PUT","DELETE","PATCH"].includes(t.toUpperCase())?(null==e?void 0:e.text)?i(`.${t.toLowerCase()}(body)`,1):i(`.${t.toLowerCase()}(null)`,1):i(`.${t.toLowerCase()}()`,1):(null==e?void 0:e.text)?i(`.method("${t.toUpperCase()}", body)`,1):i(`.method("${t.toUpperCase()}", null)`,1),Object.keys(n).forEach(e=>{i(`.addHeader("${e}", "${Uu(n[e])}")`,1)}),i(".build();",1),a(),i("Response response = client.newCall(request).execute();"),l()}},unirest:{info:{key:"unirest",title:"Unirest",link:"http://unirest.io/java.html",description:"Lightweight HTTP Request Client Library"},convert:({method:e,allHeaders:t,postData:r,fullUrl:n},o)=>{const s={indent:" ",...o},{join:i,push:a}=new Mu({indent:s.indent});return["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"].includes(e.toUpperCase())?a(`HttpResponse<String> response = Unirest.${e.toLowerCase()}("${n}")`):a(`HttpResponse<String> response = Unirest.customMethod("${e.toUpperCase()}","${n}")`),Object.keys(t).forEach(e=>{a(`.header("${e}", "${Uu(t[e])}")`,1)}),(null==r?void 0:r.text)&&a(`.body(${JSON.stringify(r.text)})`,1),a(".asString();",1),i()}}}};var Xu,ef,tf,rf;var nf,of,sf,af={};const lf=s(function(){if(sf)return of;sf=1;const e=ef?Xu:(ef=1,Xu=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)}),t=rf?tf:(rf=1,tf=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}),r=(nf||(nf=1,Object.defineProperty(af,"__esModule",{value:!0}),af.default=e=>Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))),af).default;return of=(n,o,s)=>{const i=[];return function n(o,s,a){let l;(s=s||{}).indent=s.indent||"\t",a=a||"",l=void 0===s.inlineCharacterLimit?{newLine:"\n",newLineOrSpace:"\n",pad:a,indent:a+s.indent}:{newLine:"@@__STRINGIFY_OBJECT_NEW_LINE__@@",newLineOrSpace:"@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",pad:"@@__STRINGIFY_OBJECT_PAD__@@",indent:"@@__STRINGIFY_OBJECT_INDENT__@@"};const c=e=>{if(void 0===s.inlineCharacterLimit)return e;const t=e.replace(new RegExp(l.newLine,"g"),"").replace(new RegExp(l.newLineOrSpace,"g")," ").replace(new RegExp(l.pad+"|"+l.indent,"g"),"");return t.length<=s.inlineCharacterLimit?t:e.replace(new RegExp(l.newLine+"|"+l.newLineOrSpace,"g"),"\n").replace(new RegExp(l.pad,"g"),a).replace(new RegExp(l.indent,"g"),a+s.indent)};if(-1!==i.indexOf(o))return'"[Circular]"';if(null==o||"number"==typeof o||"boolean"==typeof o||"function"==typeof o||"symbol"==typeof o||e(o))return String(o);if(o instanceof Date)return`new Date('${o.toISOString()}')`;if(Array.isArray(o)){if(0===o.length)return"[]";i.push(o);const e="["+l.newLine+o.map((e,t)=>{const r=o.length-1===t?l.newLine:","+l.newLineOrSpace;let i=n(e,s,a+s.indent);return s.transform&&(i=s.transform(o,t,i)),l.indent+i+r}).join("")+l.pad+"]";return i.pop(),c(e)}if(t(o)){let e=Object.keys(o).concat(r(o));if(s.filter&&(e=e.filter(e=>s.filter(o,e))),0===e.length)return"{}";i.push(o);const t="{"+l.newLine+e.map((t,r)=>{const i=e.length-1===r?l.newLine:","+l.newLineOrSpace,c="symbol"==typeof t,d=!c&&/^[a-z$_][a-z$_0-9]*$/i.test(t),p=c||d?t:n(t,s);let u=n(o[t],s,a+s.indent);return s.transform&&(u=s.transform(o,t,u)),l.indent+String(p)+": "+u+i}).join("")+l.pad+"}";return i.pop(),c(t)}return o=String(o).replace(/[\r\n]/g,e=>"\n"===e?"\\n":"\\r"),!1===s.singleQuotes?`"${o=o.replace(/"/g,'\\"')}"`:`'${o=o.replace(/\\?'/g,"\\'")}'`}(n,o,s)}}()),cf={info:{key:"javascript",title:"JavaScript",extname:".js",default:"xhr"},clientsById:{xhr:{info:{key:"xhr",title:"XMLHttpRequest",link:"https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest",description:"W3C Standard API that provides scripted client functionality"},convert:({postData:e,allHeaders:t,method:r,fullUrl:n},o)=>{var s;const i={indent:" ",cors:!0,...o},{blank:a,push:l,join:c}=new Mu({indent:i.indent});switch(null==e?void 0:e.mimeType){case"application/json":l(`const data = JSON.stringify(${lf(e.jsonObj,{indent:i.indent})});`),a();break;case"multipart/form-data":if(!e.params)break;if(l("const data = new FormData();"),e.params.forEach(e=>{l(`data.append('${e.name}', '${e.value||e.fileName||""}');`)}),Au(t,"content-type")&&(null===(s=Tu(t,"content-type"))||void 0===s?void 0:s.includes("boundary"))){const e=Eu(t,"content-type");e&&delete t[e]}a();break;default:l(`const data = ${(null==e?void 0:e.text)?`'${e.text}'`:"null"};`),a()}return l("const xhr = new XMLHttpRequest();"),i.cors&&l("xhr.withCredentials = true;"),a(),l("xhr.addEventListener('readystatechange', function () {"),l("if (this.readyState === this.DONE) {",1),l("console.log(this.responseText);",2),l("}",1),l("});"),a(),l(`xhr.open('${r}', '${n}');`),Object.keys(t).forEach(e=>{l(`xhr.setRequestHeader('${e}', '${zu(t[e])}');`)}),a(),l("xhr.send(data);"),c()}},axios:{info:{key:"axios",title:"Axios",link:"https://github.com/axios/axios",description:"Promise based HTTP client for the browser and node.js"},convert:({allHeaders:e,method:t,url:r,queryObj:n,postData:o},s)=>{const i={indent:" ",...s},{blank:a,push:l,join:c,addPostProcessor:d}=new Mu({indent:i.indent});l("import axios from 'axios';"),a();const p={method:t,url:r};switch(Object.keys(n).length&&(p.params=n),Object.keys(e).length&&(p.headers=e),null==o?void 0:o.mimeType){case"application/x-www-form-urlencoded":o.params&&(l("const encodedParams = new URLSearchParams();"),o.params.forEach(e=>{l(`encodedParams.set('${e.name}', '${e.value}');`)}),a(),p.data="encodedParams,",d(e=>e.replace(/'encodedParams,'/,"encodedParams,")));break;case"application/json":o.jsonObj&&(p.data=o.jsonObj);break;case"multipart/form-data":if(!o.params)break;l("const form = new FormData();"),o.params.forEach(e=>{l(`form.append('${e.name}', '${e.value||e.fileName||""}');`)}),a(),p.data="[form]";break;default:(null==o?void 0:o.text)&&(p.data=o.text)}const u=lf(p,{indent:" ",inlineCharacterLimit:80}).replace('"[form]"',"form");return l(`const options = ${u};`),a(),l("try {"),l("const { data } = await axios.request(options);",1),l("console.log(data);",1),l("} catch (error) {"),l("console.error(error);",1),l("}"),c()}},fetch:{info:{key:"fetch",title:"fetch",link:"https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch",description:"Perform asynchronous HTTP requests with the Fetch API"},convert:({method:e,allHeaders:t,postData:r,fullUrl:n},o)=>{const s={indent:" ",credentials:null,...o},{blank:i,join:a,push:l}=new Mu({indent:s.indent}),c={method:e};switch(Object.keys(t).length&&(c.headers=t),null!==s.credentials&&(c.credentials=s.credentials),l(`const url = '${n}';`),null==r?void 0:r.mimeType){case"application/x-www-form-urlencoded":c.body=r.paramsObj?r.paramsObj:r.text;break;case"application/json":c.body=JSON.stringify(r.jsonObj);break;case"multipart/form-data":if(!r.params)break;const e=Eu(t,"content-type");e&&delete t[e],l("const form = new FormData();"),r.params.forEach(e=>{l(`form.append('${e.name}', '${e.value||e.fileName||""}');`)}),i();break;default:(null==r?void 0:r.text)&&(c.body=r.text)}return c.headers&&!Object.keys(c.headers).length&&delete c.headers,l(`const options = ${lf(c,{indent:s.indent,inlineCharacterLimit:80,transform:(e,t,n)=>"body"===t&&r&&"application/x-www-form-urlencoded"===r.mimeType?`new URLSearchParams(${n})`:n})};`),i(),(null==r?void 0:r.params)&&"multipart/form-data"===r.mimeType&&(l("options.body = form;"),i()),l("try {"),l("const response = await fetch(url, options);",1),l("const data = await response.json();",1),l("console.log(data);",1),l("} catch (error) {"),l("console.error(error);",1),l("}"),a()}},jquery:{info:{key:"jquery",title:"jQuery",link:"http://api.jquery.com/jquery.ajax/",description:"Perform an asynchronous HTTP (Ajax) requests with jQuery"},convert:({fullUrl:e,method:t,allHeaders:r,postData:n},o)=>{var s;const i={indent:" ",...o},{blank:a,push:l,join:c}=new Mu({indent:i.indent}),d={async:!0,crossDomain:!0,url:e,method:t,headers:r};switch(null==n?void 0:n.mimeType){case"application/x-www-form-urlencoded":d.data=n.paramsObj?n.paramsObj:n.text;break;case"application/json":d.processData=!1,d.data=n.text;break;case"multipart/form-data":if(!n.params)break;if(l("const form = new FormData();"),n.params.forEach(e=>{l(`form.append('${e.name}', '${e.value||e.fileName||""}');`)}),d.processData=!1,d.contentType=!1,d.mimeType="multipart/form-data",d.data="[form]",Au(r,"content-type")&&(null===(s=Tu(r,"content-type"))||void 0===s?void 0:s.includes("boundary"))){const e=Eu(r,"content-type");e&&delete d.headers[e]}a();break;default:(null==n?void 0:n.text)&&(d.data=n.text)}const p=lf(d,{indent:i.indent}).replace("'[form]'","form");return l(`const settings = ${p};`),a(),l("$.ajax(settings).done(function (response) {"),l("console.log(response);",1),l("});"),c()}}}},df={info:{key:"kotlin",title:"Kotlin",extname:".kt",default:"okhttp"},clientsById:{okhttp:{info:{key:"okhttp",title:"OkHttp",link:"http://square.github.io/okhttp/",description:"An HTTP Request Client Library"},convert:({postData:e,fullUrl:t,method:r,allHeaders:n},o)=>{const s={indent:" ",...o},{blank:i,join:a,push:l}=new Mu({indent:s.indent});return l("val client = OkHttpClient()"),i(),(null==e?void 0:e.text)&&(e.boundary?l(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`):l(`val mediaType = MediaType.parse("${e.mimeType}")`),l(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)),l("val request = Request.Builder()"),l(`.url("${t}")`,1),["GET","POST","PUT","DELETE","PATCH","HEAD"].includes(r.toUpperCase())?["POST","PUT","DELETE","PATCH"].includes(r.toUpperCase())?(null==e?void 0:e.text)?l(`.${r.toLowerCase()}(body)`,1):l(`.${r.toLowerCase()}(null)`,1):l(`.${r.toLowerCase()}()`,1):(null==e?void 0:e.text)?l(`.method("${r.toUpperCase()}", body)`,1):l(`.method("${r.toUpperCase()}", null)`,1),Object.keys(n).forEach(e=>{l(`.addHeader("${e}", "${Uu(n[e])}")`,1)}),l(".build()",1),i(),l("val response = client.newCall(request).execute()"),a()}}}},pf={info:{key:"node",title:"Node.js",extname:".js",default:"native"},clientsById:{native:{info:{key:"native",title:"HTTP",link:"http://nodejs.org/api/http.html#http_http_request_options_callback",description:"Node.js native HTTP interface"},convert:({uriObj:e,method:t,allHeaders:r,postData:n},o={})=>{const{indent:s=" ",insecureSkipVerify:i=!1}=o,{blank:a,join:l,push:c,unshift:d}=new Mu({indent:s}),p={method:t,hostname:e.hostname,port:""===e.port?null:e.port,path:e.path,headers:r,...i?{rejectUnauthorized:!1}:{}};switch(c(`const http = require('${e.protocol.replace(":","")}');`),a(),c(`const options = ${lf(p,{indent:s})};`),a(),c("const req = http.request(options, function (res) {"),c("const chunks = [];",1),a(),c("res.on('data', function (chunk) {",1),c("chunks.push(chunk);",2),c("});",1),a(),c("res.on('end', function () {",1),c("const body = Buffer.concat(chunks);",2),c("console.log(body.toString());",2),c("});",1),c("});"),a(),null==n?void 0:n.mimeType){case"application/x-www-form-urlencoded":n.paramsObj&&(d("const qs = require('querystring');"),c(`req.write(qs.stringify(${lf(n.paramsObj,{indent:" ",inlineCharacterLimit:80})}));`));break;case"application/json":n.jsonObj&&c(`req.write(JSON.stringify(${lf(n.jsonObj,{indent:" ",inlineCharacterLimit:80})}));`);break;default:(null==n?void 0:n.text)&&c(`req.write(${lf(n.text,{indent:s})});`)}return c("req.end();"),l()}},request:{info:{key:"request",title:"Request",link:"https://github.com/request/request",description:"Simplified HTTP request client"},convert:({method:e,url:t,queryObj:r,postData:n,headersObj:o,cookies:s},i)=>{const a={indent:" ",...i};let l=!1;const{push:c,blank:d,join:p,unshift:u}=new Mu({indent:a.indent});c("const request = require('request');"),d();const f={method:e,url:t};switch(Object.keys(r).length&&(f.qs=r),Object.keys(o).length&&(f.headers=o),null==n?void 0:n.mimeType){case"application/x-www-form-urlencoded":f.form=n.paramsObj;break;case"application/json":n.jsonObj&&(f.body=n.jsonObj,f.json=!0);break;case"multipart/form-data":if(!n.params)break;f.formData={},n.params.forEach(e=>{if(!e.fileName&&!e.fileName&&!e.contentType)return void(f.formData[e.name]=e.value);let t={};e.fileName?(l=!0,t={value:`fs.createReadStream(${e.fileName})`,options:{filename:e.fileName,contentType:e.contentType?e.contentType:null}}):e.value&&(t.value=e.value),f.formData[e.name]=t});break;default:(null==n?void 0:n.text)&&(f.body=n.text)}return s.length&&(f.jar="JAR",c("const jar = request.jar();"),s.forEach(e=>{c(`jar.setCookie(request.cookie('${encodeURIComponent(e.name)}=${encodeURIComponent(e.value)}'), '${t}');`)}),d()),l&&u("const fs = require('fs');"),c(`const options = ${lf(f,{indent:" ",inlineCharacterLimit:80})};`),d(),c("request(options, function (error, response, body) {"),c("if (error) throw new Error(error);",1),d(),c("console.log(body);",1),c("});"),p().replace("'JAR'","jar").replace(/'fs\.createReadStream\((.*)\)'/,"fs.createReadStream('$1')")}},unirest:{info:{key:"unirest",title:"Unirest",link:"http://unirest.io/nodejs.html",description:"Lightweight HTTP Request Client Library"},convert:({method:e,url:t,cookies:r,queryObj:n,postData:o,headersObj:s},i)=>{const a={indent:" ",...i};let l=!1;const{addPostProcessor:c,blank:d,join:p,push:u,unshift:f}=new Mu({indent:a.indent});switch(u("const unirest = require('unirest');"),d(),u(`const req = unirest('${e}', '${t}');`),d(),r.length&&(u("const CookieJar = unirest.jar();"),r.forEach(e=>{u(`CookieJar.add('${encodeURIComponent(e.name)}=${encodeURIComponent(e.value)}', '${t}');`)}),u("req.jar(CookieJar);"),d()),Object.keys(n).length&&(u(`req.query(${lf(n,{indent:a.indent})});`),d()),Object.keys(s).length&&(u(`req.headers(${lf(s,{indent:a.indent})});`),d()),null==o?void 0:o.mimeType){case"application/x-www-form-urlencoded":o.paramsObj&&(u(`req.form(${lf(o.paramsObj,{indent:a.indent})});`),d());break;case"application/json":o.jsonObj&&(u("req.type('json');"),u(`req.send(${lf(o.jsonObj,{indent:a.indent})});`),d());break;case"multipart/form-data":{if(!o.params)break;const e=[];o.params.forEach(t=>{const r={};t.fileName&&!t.value?(l=!0,r.body=`fs.createReadStream('${t.fileName}')`,c(e=>e.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/,"fs.createReadStream('$1')"))):t.value&&(r.body=t.value),r.body&&(t.contentType&&(r["content-type"]=t.contentType),e.push(r))}),u(`req.multipart(${lf(e,{indent:a.indent})});`),d();break}default:(null==o?void 0:o.text)&&(u(`req.send(${lf(o.text,{indent:a.indent})});`),d())}return l&&f("const fs = require('fs');"),u("req.end(function (res) {"),u("if (res.error) throw new Error(res.error);",1),d(),u("console.log(res.body);",1),u("});"),p()}},axios:{info:{key:"axios",title:"Axios",link:"https://github.com/axios/axios",description:"Promise based HTTP client for the browser and node.js"},convert:({method:e,url:t,queryObj:r,allHeaders:n,postData:o},s)=>{const i={indent:" ",...s},{blank:a,join:l,push:c,addPostProcessor:d}=new Mu({indent:i.indent});c("const axios = require('axios').default;");const p={method:e,url:t};switch(Object.keys(r).length&&(p.params=r),Object.keys(n).length&&(p.headers=n),null==o?void 0:o.mimeType){case"application/x-www-form-urlencoded":o.params&&(c("const { URLSearchParams } = require('url');"),a(),c("const encodedParams = new URLSearchParams();"),o.params.forEach(e=>{c(`encodedParams.set('${e.name}', '${e.value}');`)}),a(),p.data="encodedParams,",d(e=>e.replace(/'encodedParams,'/,"encodedParams,")));break;case"application/json":a(),o.jsonObj&&(p.data=o.jsonObj);break;default:a(),(null==o?void 0:o.text)&&(p.data=o.text)}const u=lf(p,{indent:" ",inlineCharacterLimit:80});return c(`const options = ${u};`),a(),c("try {"),c("const { data } = await axios.request(options);",1),c("console.log(data);",1),c("} catch (error) {"),c("console.error(error);",1),c("}"),l()}},fetch:{info:{key:"fetch",title:"Fetch",link:"https://github.com/bitinn/node-fetch",description:"Simplified HTTP node-fetch client"},convert:({method:e,fullUrl:t,postData:r,headersObj:n,cookies:o},s)=>{var i;const a={indent:" ",...s};let l=!1;const{blank:c,push:d,join:p,unshift:u}=new Mu({indent:a.indent});d("const fetch = require('node-fetch');"),c();const f={method:e};switch(Object.keys(n).length&&(f.headers=n),null==r?void 0:r.mimeType){case"application/x-www-form-urlencoded":u("const { URLSearchParams } = require('url');"),d("const encodedParams = new URLSearchParams();"),null===(i=r.params)||void 0===i||i.forEach(e=>{d(`encodedParams.set('${e.name}', '${e.value}');`)}),c(),f.body="encodedParams";break;case"application/json":r.jsonObj&&(f.body=JSON.stringify(r.jsonObj));break;case"multipart/form-data":if(!r.params)break;const e=Eu(n,"content-type");e&&delete n[e],u("const FormData = require('form-data');"),d("const formData = new FormData();"),r.params.forEach(e=>{e.fileName||e.fileName||e.contentType?e.fileName&&(l=!0,d(`formData.append('${e.name}', fs.createReadStream('${e.fileName}'));`)):d(`formData.append('${e.name}', '${e.value}');`)}),c();break;default:(null==r?void 0:r.text)&&(f.body=r.text)}if(o.length){const e=o.map(e=>`${encodeURIComponent(e.name)}=${encodeURIComponent(e.value)}`).join("; ");f.headers||(f.headers={}),f.headers.cookie=e}d(`const url = '${t}';`),f.headers&&!Object.keys(f.headers).length&&delete f.headers;const h=lf(f,{indent:" ",inlineCharacterLimit:80});return d(`const options = ${h};`),l&&u("const fs = require('fs');"),(null==r?void 0:r.params)&&"multipart/form-data"===r.mimeType&&d("options.body = formData;"),c(),d("try {"),d("const response = await fetch(url, options);",1),d("const data = await response.json();",1),d("console.log(data);",1),d("} catch (error) {"),d("console.error(error);",1),d("}"),p().replace(/'encodedParams'/,"encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/,'fs.createReadStream("$1")')}}}},uf=(e,t,r,n)=>{const o=`${e} *${t} = `;return`${o}${ff(r,n?o.length:void 0)};`},ff=(e,t)=>{const r=void 0===t?", ":`,\n ${" ".repeat(t)}`;switch(Object.prototype.toString.call(e)){case"[object Number]":return`@${e}`;case"[object Array]":return`@[ ${e.map(e=>ff(e)).join(r)} ]`;case"[object Object]":{const t=[];for(const r in e)t.push(`@"${r}": ${ff(e[r])}`);return`@{ ${t.join(r)} }`}case"[object Boolean]":return e?"@YES":"@NO";default:return null==e?"":`@"${e.toString().replace(/"/g,'\\"')}"`}},hf={info:{key:"objc",title:"Objective-C",extname:".m",default:"nsurlsession"},clientsById:{nsurlsession:{info:{key:"nsurlsession",title:"NSURLSession",link:"https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLSession_class/index.html",description:"Foundation's NSURLSession request"},convert:({allHeaders:e,postData:t,method:r,fullUrl:n},o)=>{var s;const i={indent:" ",pretty:!0,timeout:10,...o},{push:a,join:l,blank:c}=new Mu({indent:i.indent}),d={hasHeaders:!1,hasBody:!1};if(a("#import <Foundation/Foundation.h>"),Object.keys(e).length&&(d.hasHeaders=!0,c(),a(uf("NSDictionary","headers",e,i.pretty))),t&&(t.text||t.jsonObj||t.params))switch(d.hasBody=!0,t.mimeType){case"application/x-www-form-urlencoded":if(null===(s=t.params)||void 0===s?void 0:s.length){c();const[e,...r]=t.params;a(`NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"${e.name}=${e.value}" dataUsingEncoding:NSUTF8StringEncoding]];`),r.forEach(({name:e,value:t})=>{a(`[postData appendData:[@"&${e}=${t}" dataUsingEncoding:NSUTF8StringEncoding]];`)})}else d.hasBody=!1;break;case"application/json":t.jsonObj&&(a(uf("NSDictionary","parameters",t.jsonObj,i.pretty)),c(),a("NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];"));break;case"multipart/form-data":a(uf("NSArray","parameters",t.params||[],i.pretty)),a(`NSString *boundary = @"${t.boundary}";`),c(),a("NSError *error;"),a("NSMutableString *body = [NSMutableString string];"),a("for (NSDictionary *param in parameters) {"),a('[body appendFormat:@"--%@\\r\\n", boundary];',1),a('if (param[@"fileName"]) {',1),a('[body appendFormat:@"Content-Disposition:form-data; name=\\"%@\\"; filename=\\"%@\\"\\r\\n", param[@"name"], param[@"fileName"]];',2),a('[body appendFormat:@"Content-Type: %@\\r\\n\\r\\n", param[@"contentType"]];',2),a('[body appendFormat:@"%@", [NSString stringWithContentsOfFile:param[@"fileName"] encoding:NSUTF8StringEncoding error:&error]];',2),a("if (error) {",2),a('NSLog(@"%@", error);',3),a("}",2),a("} else {",1),a('[body appendFormat:@"Content-Disposition:form-data; name=\\"%@\\"\\r\\n\\r\\n", param[@"name"]];',2),a('[body appendFormat:@"%@", param[@"value"]];',2),a("}",1),a("}"),a('[body appendFormat:@"\\r\\n--%@--\\r\\n", boundary];'),a("NSData *postData = [body dataUsingEncoding:NSUTF8StringEncoding];");break;default:c(),a(`NSData *postData = [[NSData alloc] initWithData:[@"${t.text}" dataUsingEncoding:NSUTF8StringEncoding]];`)}return c(),a(`NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"${n}"]`),a(" cachePolicy:NSURLRequestUseProtocolCachePolicy"),a(` timeoutInterval:${i.timeout.toFixed(1)}];`),a(`[request setHTTPMethod:@"${r}"];`),d.hasHeaders&&a("[request setAllHTTPHeaderFields:headers];"),d.hasBody&&a("[request setHTTPBody:postData];"),c(),a("NSURLSession *session = [NSURLSession sharedSession];"),a("NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request"),a(" completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {"),a(" if (error) {",1),a(' NSLog(@"%@", error);',2),a(" } else {",1),a(" NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;",2),a(' NSLog(@"%@", httpResponse);',2),a(" }",1),a(" }];"),a("[dataTask resume];"),l()}}}},mf={info:{key:"ocaml",title:"OCaml",extname:".ml",default:"cohttp"},clientsById:{cohttp:{info:{key:"cohttp",title:"CoHTTP",link:"https://github.com/mirage/ocaml-cohttp",description:"Cohttp is a very lightweight HTTP server using Lwt or Async for OCaml"},convert:({fullUrl:e,allHeaders:t,postData:r,method:n},o)=>{const s={indent:" ",...o},{push:i,blank:a,join:l}=new Mu({indent:s.indent});i("open Cohttp_lwt_unix"),i("open Cohttp"),i("open Lwt"),a(),i(`let uri = Uri.of_string "${e}" in`);const c=Object.keys(t);1===c.length?i(`let headers = Header.add (Header.init ()) "${c[0]}" "${Uu(t[c[0]])}" in`):c.length>1&&(i("let headers = Header.add_list (Header.init ()) ["),c.forEach(e=>{i(`("${e}", "${Uu(t[e])}");`,1)}),i("] in")),(null==r?void 0:r.text)&&i(`let body = Cohttp_lwt_body.of_string ${JSON.stringify(r.text)} in`),a();const d=c.length?"~headers ":"",p=(null==r?void 0:r.text)?"~body ":"",u=["get","post","head","delete","patch","put","options"].includes(n.toLowerCase())?`\`${n.toUpperCase()}`:`(Code.method_of_string "${n}")`;return i(`Client.call ${d}${p}${u} uri`),i(">>= fun (res, body_stream) ->"),i("(* Do stuff with the result *)",1),l()}}}},gf=(e,t,r)=>{switch(r=r||"",t=t||"",Object.prototype.toString.call(e)){case"[object Null]":case"[object Undefined]":default:return"null";case"[object String]":return`'${qu(e,{delimiter:"'",escapeNewlines:!1})}'`;case"[object Number]":return e.toString();case"[object Array]":{const n=e.map(e=>gf(e,`${t}${t}`,t)).join(`,\n${t}`);return`[\n${t}${n}\n${r}]`}case"[object Object]":{const n=[];for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.push(`${gf(r,t)} => ${gf(e[r],`${t}${t}`,t)}`);return`[\n${t}${n.join(`,\n${t}`)}\n${r}]`}}},yf=["ACL","BASELINE_CONTROL","CHECKIN","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LABEL","LOCK","MERGE","MKACTIVITY","MKCOL","MKWORKSPACE","MOVE","OPTIONS","POST","PROPFIND","PROPPATCH","PUT","REPORT","TRACE","UNCHECKOUT","UNLOCK","UPDATE","VERSION_CONTROL"],vf={info:{key:"php",title:"PHP",extname:".php",default:"curl"},clientsById:{curl:{info:{key:"curl",title:"cURL",link:"http://php.net/manual/en/book.curl.php",description:"PHP with ext-curl"},convert:({uriObj:e,postData:t,fullUrl:r,method:n,httpVersion:o,cookies:s,headersObj:i},a={})=>{const{closingTag:l=!1,indent:c=" ",maxRedirects:d=10,namedErrors:p=!1,noTags:u=!1,shortTags:f=!1,timeout:h=30}=a,{push:m,blank:g,join:y}=new Mu({indent:c});u||(m(f?"<?":"<?php"),g()),m("$curl = curl_init();"),g();const v=[{escape:!0,name:"CURLOPT_PORT",value:""===e.port?null:e.port},{escape:!0,name:"CURLOPT_URL",value:r},{escape:!1,name:"CURLOPT_RETURNTRANSFER",value:"true"},{escape:!0,name:"CURLOPT_ENCODING",value:""},{escape:!1,name:"CURLOPT_MAXREDIRS",value:d},{escape:!1,name:"CURLOPT_TIMEOUT",value:h},{escape:!1,name:"CURLOPT_HTTP_VERSION",value:"HTTP/1.0"===o?"CURL_HTTP_VERSION_1_0":"CURL_HTTP_VERSION_1_1"},{escape:!0,name:"CURLOPT_CUSTOMREQUEST",value:n},{escape:!(null==t?void 0:t.jsonObj),name:"CURLOPT_POSTFIELDS",value:t?t.jsonObj?`json_encode(${gf(t.jsonObj,c.repeat(2),c)})`:t.text:void 0}];m("curl_setopt_array($curl, [");const b=new Mu({indent:c,join:`\n${c}`});v.forEach(({value:e,name:t,escape:r})=>{null!=e&&b.push(`${t} => ${r?JSON.stringify(e):e},`)});const $=s.map(e=>`${encodeURIComponent(e.name)}=${encodeURIComponent(e.value)}`);$.length&&b.push(`CURLOPT_COOKIE => "${$.join("; ")}",`);const x=Object.keys(i).sort().map(e=>`"${e}: ${Uu(i[e])}"`);return x.length&&(b.push("CURLOPT_HTTPHEADER => ["),b.push(x.join(`,\n${c}${c}`),1),b.push("],")),m(b.join(),1),m("]);"),g(),m("$response = curl_exec($curl);"),m("$err = curl_error($curl);"),g(),m("curl_close($curl);"),g(),m("if ($err) {"),m(p?'echo array_flip(get_defined_constants(true)["curl"])[$err];':'echo "cURL Error #:" . $err;',1),m("} else {"),m("echo $response;",1),m("}"),!u&&l&&(g(),m("?>")),y()}},guzzle:{info:{key:"guzzle",title:"Guzzle",link:"http://docs.guzzlephp.org/en/stable/",description:"PHP with Guzzle"},convert:({postData:e,fullUrl:t,method:r,cookies:n,headersObj:o},s)=>{var i;const a={closingTag:!1,indent:" ",noTags:!1,shortTags:!1,...s},{push:l,blank:c,join:d}=new Mu({indent:a.indent}),{code:p,push:u,join:f}=new Mu({indent:a.indent});switch(a.noTags||(l(a.shortTags?"<?":"<?php"),c()),null==e?void 0:e.mimeType){case"application/x-www-form-urlencoded":u(`'form_params' => ${gf(e.paramsObj,a.indent+a.indent,a.indent)},`,1);break;case"multipart/form-data":{const t=[];if(e.params&&e.params.forEach(function(e){if(e.fileName){const r={name:e.name,filename:e.fileName,contents:e.value};e.contentType&&(r.headers={"Content-Type":e.contentType}),t.push(r)}else e.value&&t.push({name:e.name,contents:e.value})}),t.length&&(u(`'multipart' => ${gf(t,a.indent+a.indent,a.indent)}`,1),Au(o,"content-type")&&(null===(i=Tu(o,"content-type"))||void 0===i?void 0:i.indexOf("boundary")))){const e=Eu(o,"content-type");e&&delete o[e]}break}default:(null==e?void 0:e.text)&&u(`'body' => ${gf(e.text)},`,1)}const h=Object.keys(o).sort().map(function(e){return`${a.indent}${a.indent}'${e}' => '${zu(o[e])}',`}),m=n.map(e=>`${encodeURIComponent(e.name)}=${encodeURIComponent(e.value)}`).join("; ");return m.length&&h.push(`${a.indent}${a.indent}'cookie' => '${zu(m)}',`),h.length&&(u("'headers' => [",1),u(h.join("\n")),u("],",1)),l("$client = new \\GuzzleHttp\\Client();"),c(),p.length?(l(`$response = $client->request('${r}', '${t}', [`),l(f()),l("]);")):l(`$response = $client->request('${r}', '${t}');`),c(),l("echo $response->getBody();"),!a.noTags&&a.closingTag&&(c(),l("?>")),d()}},http1:{info:{key:"http1",title:"HTTP v1",link:"http://php.net/manual/en/book.http.php",description:"PHP with pecl/http v1"},convert:({method:e,url:t,postData:r,queryObj:n,headersObj:o,cookiesObj:s},i={})=>{const{closingTag:a=!1,indent:l=" ",noTags:c=!1,shortTags:d=!1}=i,{push:p,blank:u,join:f}=new Mu({indent:l});switch(c||(p(d?"<?":"<?php"),u()),yf.includes(e.toUpperCase())||p(`HttpRequest::methodRegister('${e}');`),p("$request = new HttpRequest();"),p(`$request->setUrl(${gf(t)});`),yf.includes(e.toUpperCase())?p(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`):p(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`),u(),Object.keys(n).length&&(p(`$request->setQueryData(${gf(n,l)});`),u()),Object.keys(o).length&&(p(`$request->setHeaders(${gf(o,l)});`),u()),Object.keys(s).length&&(p(`$request->setCookies(${gf(s,l)});`),u()),null==r?void 0:r.mimeType){case"application/x-www-form-urlencoded":p(`$request->setContentType(${gf(r.mimeType)});`),p(`$request->setPostFields(${gf(r.paramsObj,l)});`),u();break;case"application/json":p(`$request->setContentType(${gf(r.mimeType)});`),p(`$request->setBody(json_encode(${gf(r.jsonObj,l)}));`),u();break;default:(null==r?void 0:r.text)&&(p(`$request->setBody(${gf(r.text)});`),u())}return p("try {"),p("$response = $request->send();",1),u(),p("echo $response->getBody();",1),p("} catch (HttpException $ex) {"),p("echo $ex;",1),p("}"),!c&&a&&(u(),p("?>")),f()}},http2:{info:{key:"http2",title:"HTTP v2",link:"http://devel-m6w6.rhcloud.com/mdref/http",description:"PHP with pecl/http v2"},convert:({postData:e,headersObj:t,method:r,queryObj:n,cookiesObj:o,url:s},i={})=>{var a;const{closingTag:l=!1,indent:c=" ",noTags:d=!1,shortTags:p=!1}=i,{push:u,blank:f,join:h}=new Mu({indent:c});let m=!1;switch(d||(u(p?"<?":"<?php"),f()),u("$client = new http\\Client;"),u("$request = new http\\Client\\Request;"),f(),null==e?void 0:e.mimeType){case"application/x-www-form-urlencoded":u("$body = new http\\Message\\Body;"),u(`$body->append(new http\\QueryString(${gf(e.paramsObj,c)}));`),f(),m=!0;break;case"multipart/form-data":{if(!e.params)break;const r=[],n={};e.params.forEach(({name:e,fileName:t,value:o,contentType:s})=>{t?r.push({name:e,type:s,file:t,data:o}):o&&(n[e]=o)});const o=Object.keys(n).length?gf(n,c):"null",s=r.length?gf(r,c):"null";if(u("$body = new http\\Message\\Body;"),u(`$body->addForm(${o}, ${s});`),Au(t,"content-type")&&(null===(a=Tu(t,"content-type"))||void 0===a?void 0:a.indexOf("boundary"))){const e=Eu(t,"content-type");e&&delete t[e]}f(),m=!0;break}case"application/json":u("$body = new http\\Message\\Body;"),u(`$body->append(json_encode(${gf(e.jsonObj,c)}));`),m=!0;break;default:(null==e?void 0:e.text)&&(u("$body = new http\\Message\\Body;"),u(`$body->append(${gf(e.text)});`),f(),m=!0)}return u(`$request->setRequestUrl(${gf(s)});`),u(`$request->setRequestMethod(${gf(r)});`),m&&(u("$request->setBody($body);"),f()),Object.keys(n).length&&(u(`$request->setQuery(new http\\QueryString(${gf(n,c)}));`),f()),Object.keys(t).length&&(u(`$request->setHeaders(${gf(t,c)});`),f()),Object.keys(o).length&&(f(),u(`$client->setCookies(${gf(o,c)});`),f()),u("$client->enqueue($request)->send();"),u("$response = $client->getResponse();"),f(),u("echo $response->getBody();"),!d&&l&&(f(),u("?>")),h()}}}},bf=e=>({method:t,headersObj:r,cookies:n,uriObj:o,fullUrl:s,postData:i,allHeaders:a})=>{const{push:l,join:c}=new Mu;if(!["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"].includes(t.toUpperCase()))return"Method not supported";const d=[],p=Object.keys(r);return p.length&&(l("$headers=@{}"),p.forEach(e=>{"connection"!==e&&l(`$headers.Add("${e}", "${qu(r[e],{escapeChar:"`"})}")`)}),d.push("-Headers $headers")),n.length&&(l("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"),n.forEach(e=>{l("$cookie = New-Object System.Net.Cookie"),l(`$cookie.Name = '${e.name}'`),l(`$cookie.Value = '${e.value}'`),l(`$cookie.Domain = '${o.host}'`),l("$session.Cookies.Add($cookie)")}),d.push("-WebSession $session")),(null==i?void 0:i.text)&&(d.push(`-ContentType '${qu(Tu(a,"content-type"),{delimiter:"'",escapeChar:"`"})}'`),d.push(`-Body '${i.text}'`)),l(`$response = ${e} -Uri '${s}' -Method ${t} ${d.join(" ")}`),c()},$f={info:{key:"restmethod",title:"Invoke-RestMethod",link:"https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Utility/Invoke-RestMethod",description:"Powershell Invoke-RestMethod client"},convert:bf("Invoke-RestMethod")},xf={info:{key:"webrequest",title:"Invoke-WebRequest",link:"https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Utility/Invoke-WebRequest",description:"Powershell Invoke-WebRequest client"},convert:bf("Invoke-WebRequest")};function wf(e,t,r,n,o){const s=n.repeat(o),i=n.repeat(o-1),a=r?`,\n${s}`:", ",l="object"===e?"{":"[",c="object"===e?"}":"]";return r?`${l}\n${s}${t.join(a)}\n${i}${c}`:"object"===e&&t.length>0?`${l} ${t.join(a)} ${c}`:`${l}${t.join(a)}${c}`}const _f=(e,t,r)=>{switch(r=void 0===r?1:r+1,Object.prototype.toString.call(e)){case"[object Number]":return e;case"[object Array]":{let n=!1;return wf("array",e.map(e=>("[object Object]"===Object.prototype.toString.call(e)&&(n=Object.keys(e).length>1),_f(e,t,r))),n,t.indent,r)}case"[object Object]":{const n=[];for(const o in e)n.push(`"${o}": ${_f(e[o],t,r)}`);return wf("object",n,t.pretty&&n.length>1,t.indent,r)}case"[object Null]":return"None";case"[object Boolean]":return e?"True":"False";default:return null==e?"":`"${e.toString().replace(/"/g,'\\"')}"`}},kf=["HEAD","GET","POST","PUT","PATCH","DELETE","OPTIONS"],Sf=(e="")=>/^[a-z0-9-_/.@%^=:]+$/i.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`,jf={"http1.0":"0","url ":"",cookie:"b",data:"d",form:"F",globoff:"g",header:"H",insecure:"k",request:"X"},Of=(e,t)=>t.repeat(e),Pf=(e,t,r,n)=>{const o=Of(n,r),s=Of(n-1,r),i=t?`,\n${o}`:", ";return t?`[\n${o}${e.join(i)}\n${s}]`:`[${e.join(i)}]`},Ef=(e,t,r)=>`let ${e} = ${Tf(t,r)}`,Tf=(e,t,r)=>{switch(r=void 0===r?1:r+1,Object.prototype.toString.call(e)){case"[object Number]":return e;case"[object Array]":{let n=!1;const o=e.map(e=>("[object Object]"===Object.prototype.toString.call(e)&&(n=Object.keys(e).length>1),Tf(e,t,r)));return Pf(o,n,t.indent,r)}case"[object Object]":{const n=[];for(const o in e)n.push(`"${o}": ${Tf(e[o],t,r)}`);return Pf(n,t.pretty&&n.length>1,t.indent,r)}case"[object Boolean]":return e.toString();default:return null==e?"":`"${e.toString().replace(/"/g,'\\"')}"`}},Af={c:Lu,clojure:Gu,csharp:Ku,go:Zu,http:Qu,java:Yu,javascript:cf,kotlin:df,node:pf,objc:hf,ocaml:mf,php:vf,powershell:{info:{key:"powershell",title:"Powershell",extname:".ps1",default:"webrequest"},clientsById:{webrequest:xf,restmethod:$f}},python:{info:{key:"python",title:"Python",extname:".py",default:"python3"},clientsById:{python3:{info:{key:"python3",title:"http.client",link:"https://docs.python.org/3/library/http.client.html",description:"Python3 HTTP Client"},convert:({uriObj:{path:e,protocol:t,host:r},postData:n,allHeaders:o,method:s},i={})=>{const{insecureSkipVerify:a=!1}=i,{push:l,blank:c,join:d}=new Mu;if(l("import http.client"),a&&l("import ssl"),c(),"https:"===t){l(`conn = http.client.HTTPSConnection("${r}"${a?", context = ssl._create_unverified_context()":""})`),c()}else l(`conn = http.client.HTTPConnection("${r}")`),c();const p=JSON.stringify(null==n?void 0:n.text);p&&(l(`payload = ${p}`),c());const u=o,f=Object.keys(u).length;if(1===f)for(const h in u)l(`headers = { '${h}': "${Uu(u[h])}" }`),c();else if(f>1){let e=1;l("headers = {");for(const t in u)e++!==f?l(` '${t}': "${Uu(u[t])}",`):l(` '${t}': "${Uu(u[t])}"`);l("}"),c()}return l(p&&f?`conn.request("${s}", "${e}", payload, headers)`:p&&!f?`conn.request("${s}", "${e}", payload)`:!p&&f?`conn.request("${s}", "${e}", headers=headers)`:`conn.request("${s}", "${e}")`),c(),l("res = conn.getresponse()"),l("data = res.read()"),c(),l('print(data.decode("utf-8"))'),d()}},requests:{info:{key:"requests",title:"Requests",link:"http://docs.python-requests.org/en/latest/api/#requests.request",description:"Requests HTTP library"},convert:({queryObj:e,url:t,postData:r,allHeaders:n,method:o},s)=>{const i={indent:" ",pretty:!0,...s},{push:a,blank:l,join:c}=new Mu({indent:i.indent});let d;a("import requests"),l(),a(`url = "${t}"`),l(),Object.keys(e).length&&(d=`querystring = ${JSON.stringify(e)}`,a(d),l());const p=n;let u={};const f={};let h=!1,m=!1,g=!1;switch(null==r?void 0:r.mimeType){case"application/json":r.jsonObj&&(a(`payload = ${_f(r.jsonObj,i)}`),g=!0,m=!0);break;case"multipart/form-data":if(!r.params)break;if(u={},r.params.forEach(e=>{e.fileName?(f[e.name]=`open('${e.fileName}', 'rb')`,h=!0):(u[e.name]=e.value,m=!0)}),h){a(`files = ${_f(f,i)}`),m&&a(`payload = ${_f(u,i)}`);const e=Eu(p,"content-type");e&&delete p[e]}else{const e=JSON.stringify(r.text);e&&(a(`payload = ${e}`),m=!0)}break;default:{if(!r)break;if("application/x-www-form-urlencoded"===r.mimeType&&r.paramsObj){a(`payload = ${_f(r.paramsObj,i)}`),m=!0;break}const e=JSON.stringify(r.text);e&&(a(`payload = ${e}`),m=!0)}}const y=Object.keys(p).length;if(0===y&&(m||h))l();else if(1===y)for(const b in p)a(`headers = {"${b}": "${Uu(p[b])}"}`),l();else if(y>1){let e=1;a("headers = {");for(const t in p)a(e!==y?`"${t}": "${Uu(p[t])}",`:`"${t}": "${Uu(p[t])}"`,1),e+=1;a("}"),l()}let v=kf.includes(o)?`response = requests.${o.toLowerCase()}(url`:`response = requests.request("${o}", url`;return m&&(v+=g?", json=payload":", data=payload"),h&&(v+=", files=files"),y>0&&(v+=", headers=headers"),d&&(v+=", params=querystring"),v+=")",a(v),l(),a("print(response.json())"),c()}}}},r:{info:{key:"r",title:"R",extname:".r",default:"httr"},clientsById:{httr:{info:{key:"httr",title:"httr",link:"https://cran.r-project.org/web/packages/httr/vignettes/quickstart.html",description:"httr: Tools for Working with URLs and HTTP"},convert:({url:e,queryObj:t,queryString:r,postData:n,allHeaders:o,method:s},i={})=>{var a,l;const{push:c,blank:d,join:p}=new Mu({indent:null!==(a=i.indent)&&void 0!==a?a:" "});c("library(httr)"),d(),c(`url <- "${e}"`),d();const u=t;delete t.key;const f=Object.entries(u),h=f.length;if(1===h){const e=f[0];c(`queryString <- list(${e[0]} = "${e[1]}")`),d()}else h>1&&(c("queryString <- list("),f.forEach(([e,t],r)=>{c(`${e} = "${t}"${r!==h-1?",":""}`,1)}),c(")"),d());const m=JSON.stringify(null==n?void 0:n.text);if(m&&(c(`payload <- ${m}`),d()),n&&(n.text||n.jsonObj||n.params))switch(n.mimeType){case"application/x-www-form-urlencoded":c('encode <- "form"'),d();break;case"application/json":c('encode <- "json"'),d();break;case"multipart/form-data":c('encode <- "multipart"'),d();break;default:c('encode <- "raw"'),d()}const g=Tu(o,"cookie"),y=Tu(o,"accept"),v=g?`set_cookies(\`${String(g).replace(/;/g,'", `').replace(/` /g,"`").replace(/[=]/g,'` = "')}")`:void 0,b=y?`accept("${Uu(y)}")`:void 0,$=`content_type("${Uu(null!==(l=null==n?void 0:n.mimeType)&&void 0!==l?l:"application/octet-stream")}")`,x=Object.entries(o).filter(([e])=>!["cookie","accept","content-type"].includes(e.toLowerCase())).map(([e,t])=>`'${e}' = '${zu(t)}'`).join(", "),w=x?`add_headers(${x})`:void 0;let _=`response <- VERB("${s}", url`;m&&(_+=", body = payload"),r.length&&(_+=", query = queryString");const k=[w,$,b,v].filter(e=>!!e).join(", ");return k&&(_+=`, ${k}`),n&&(n.text||n.jsonObj||n.params)&&(_+=", encode = encode"),_+=")",c(_),d(),c('content(response, "text")'),p()}}}},ruby:{info:{key:"ruby",title:"Ruby",extname:".rb",default:"native"},clientsById:{native:{info:{key:"native",title:"net::http",link:"http://ruby-doc.org/stdlib-2.2.1/libdoc/net/http/rdoc/Net/HTTP.html",description:"Ruby HTTP client"},convert:({uriObj:e,method:t,fullUrl:r,postData:n,allHeaders:o},s={})=>{const{insecureSkipVerify:i=!1}=s,{push:a,blank:l,join:c}=new Mu;a("require 'uri'"),a("require 'net/http'"),l();const d=t.toUpperCase(),p=d.charAt(0)+d.substring(1).toLowerCase();["GET","POST","HEAD","DELETE","PATCH","PUT","OPTIONS","COPY","LOCK","UNLOCK","MOVE","TRACE"].includes(d)||(a(`class Net::HTTP::${p} < Net::HTTPRequest`),a(` METHOD = '${d.toUpperCase()}'`),a(` REQUEST_HAS_BODY = '${(null==n?void 0:n.text)?"true":"false"}'`),a(" RESPONSE_HAS_BODY = true"),a("end"),l()),a(`url = URI("${r}")`),l(),a("http = Net::HTTP.new(url.host, url.port)"),"https:"===e.protocol&&(a("http.use_ssl = true"),i&&a("http.verify_mode = OpenSSL::SSL::VERIFY_NONE")),l(),a(`request = Net::HTTP::${p}.new(url)`);const u=Object.keys(o);return u.length&&u.forEach(e=>{a(`request["${e}"] = '${zu(o[e])}'`)}),(null==n?void 0:n.text)&&a(`request.body = ${JSON.stringify(n.text)}`),l(),a("response = http.request(request)"),a("puts response.read_body"),c()}}}},shell:{info:{key:"shell",title:"Shell",extname:".sh",default:"curl"},clientsById:{curl:{info:{key:"curl",title:"cURL",link:"http://curl.haxx.se/",description:"cURL is a command line tool and library for transferring data with URL syntax"},convert:({fullUrl:e,method:t,httpVersion:r,headersObj:n,allHeaders:o,postData:s},i={})=>{var a;const{binary:l=!1,globOff:c=!1,indent:d=" ",insecureSkipVerify:p=!1,prettifyJson:u=!1,short:f=!1}=i,{push:h,join:m}=new Mu({..."string"==typeof d?{indent:d}:{},join:!1!==d?` \\\n${d}`:" "}),g=(e=>t=>{if(e){const e=jf[t];return e?`-${e}`:""}return`--${t}`})(f);let y=Sf(e);if(h(`curl ${g("request")} ${t}`),c&&(y=unescape(y),h(g("globoff"))),h(`${g("url ")}${y}`),p&&h(g("insecure")),"HTTP/1.0"===r&&h(g("http1.0")),Tu(o,"accept-encoding")&&h("--compressed"),"multipart/form-data"===(null==s?void 0:s.mimeType)){const e=Eu(n,"content-type");if(e){const t=n[e];if(e&&t){const r=t.replace(/; boundary.+?(?=(;|$))/,"");n[e]=r,o[e]=r}}}switch(Object.keys(n).sort().forEach(e=>{const t=`${e}: ${n[e]}`;h(`${g("header")} ${Sf(t)}`)}),o.cookie&&h(`${g("cookie")} ${Sf(o.cookie)}`),null==s?void 0:s.mimeType){case"multipart/form-data":null===(a=s.params)||void 0===a||a.forEach(e=>{let t="";t=e.fileName?`${e.name}=@${e.fileName}`:`${e.name}=${e.value}`,h(`${g("form")} ${Sf(t)}`)});break;case"application/x-www-form-urlencoded":s.params?s.params.forEach(e=>{const t=e.name,r=encodeURIComponent(e.name),n=r!==t;h(`${l?"--data-binary":"--data"+(n?"-urlencode":"")} ${Sf(`${n?r:t}=${e.value}`)}`)}):h(`${l?"--data-binary":g("data")} ${Sf(s.text)}`);break;default:{if(!s)break;if(!s.text)break;const e=l?"--data-binary":g("data");let t=!1;if(v=s.mimeType,Cu.some(e=>v.includes(e))){if(s.text.length>2&&u)try{const r=JSON.parse(s.text);t=!0;const n=JSON.stringify(r,void 0,d);s.text.indexOf("'")>0?h(`${e} @- <<EOF\n${n}\nEOF`):h(`${e} '\n${n}\n'`)}catch(b){}}t||h(`${e} ${Sf(s.text)}`)}}var v;return m()}},httpie:{info:{key:"httpie",title:"HTTPie",link:"http://httpie.org/",description:"a CLI, cURL-like tool for humans"},convert:({allHeaders:e,postData:t,queryObj:r,fullUrl:n,method:o,url:s},i)=>{const a={body:!1,cert:!1,headers:!1,indent:" ",pretty:!1,print:!1,queryParams:!1,short:!1,style:!1,timeout:!1,verbose:!1,verify:!1,...i},{push:l,join:c,unshift:d}=new Mu({indent:a.indent,join:!1!==a.indent?` \\\n${a.indent}`:" "});let p=!1;const u=[];a.headers&&u.push(a.short?"-h":"--headers"),a.body&&u.push(a.short?"-b":"--body"),a.verbose&&u.push(a.short?"-v":"--verbose"),a.print&&u.push(`${a.short?"-p":"--print"}=${a.print}`),a.verify&&u.push(`--verify=${a.verify}`),a.cert&&u.push(`--cert=${a.cert}`),a.pretty&&u.push(`--pretty=${a.pretty}`),a.style&&u.push(`--style=${a.style}`),a.timeout&&u.push(`--timeout=${a.timeout}`),a.queryParams&&Object.keys(r).forEach(e=>{const t=r[e];Array.isArray(t)?t.forEach(t=>{l(`${e}==${Sf(t)}`)}):l(`${e}==${Sf(t)}`)}),Object.keys(e).sort().forEach(t=>{l(`${t}:${Sf(e[t])}`)}),"application/x-www-form-urlencoded"===(null==t?void 0:t.mimeType)?t.params&&t.params.length&&(u.push(a.short?"-f":"--form"),t.params.forEach(e=>{l(`${e.name}=${Sf(e.value)}`)})):p=!0;if(d(`http ${u.length?`${u.join(" ")} `:""}${o} ${s=Sf(a.queryParams?s:n)}`),p&&(null==t?void 0:t.text)){d(`echo ${Sf(t.text)} | `)}return c()}},wget:{info:{key:"wget",title:"Wget",link:"https://www.gnu.org/software/wget/",description:"a free software package for retrieving files using HTTP, HTTPS"},convert:({method:e,postData:t,allHeaders:r,fullUrl:n},o)=>{const s={indent:" ",short:!1,verbose:!1,...o},{push:i,join:a}=new Mu({indent:s.indent,join:!1!==s.indent?` \\\n${s.indent}`:" "});var l;return s.verbose?i("wget "+(s.short?"-v":"--verbose")):i("wget "+(s.short?"-q":"--quiet")),i(`--method ${Sf(e)}`),Object.keys(r).forEach(e=>{const t=`${e}: ${r[e]}`;i(`--header ${Sf(t)}`)}),(null==t?void 0:t.text)&&i(`--body-data ${l=Sf(t.text),l.replace(/\r/g,"\\r").replace(/\n/g,"\\n")}`),i(s.short?"-O":"--output-document"),i(`- ${Sf(n)}`),a()}}}},swift:{info:{key:"swift",title:"Swift",extname:".swift",default:"nsurlsession"},clientsById:{nsurlsession:{info:{key:"nsurlsession",title:"NSURLSession",link:"https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLSession_class/index.html",description:"Foundation's NSURLSession request"},convert:({allHeaders:e,postData:t,fullUrl:r,method:n},o)=>{var s;const i={indent:" ",pretty:!0,timeout:"10",...o},{push:a,blank:l,join:c}=new Mu({indent:i.indent}),d={hasHeaders:!1,hasBody:!1};if(a("import Foundation"),Object.keys(e).length&&(d.hasHeaders=!0,l(),a(Ef("headers",e,i))),t&&(t.text||t.jsonObj||t.params))switch(d.hasBody=!0,t.mimeType){case"application/x-www-form-urlencoded":if(l(),null===(s=t.params)||void 0===s?void 0:s.length){const[e,...r]=t.params;a(`let postData = NSMutableData(data: "${e.name}=${e.value}".data(using: String.Encoding.utf8)!)`),r.forEach(({name:e,value:t})=>{a(`postData.append("&${e}=${t}".data(using: String.Encoding.utf8)!)`)})}else d.hasBody=!1;break;case"application/json":t.jsonObj&&(a(`${Ef("parameters",t.jsonObj,i)} as [String : Any]`),l(),a("let postData = JSONSerialization.data(withJSONObject: parameters, options: [])"));break;case"multipart/form-data":a(Ef("parameters",t.params,i)),l(),a(`let boundary = "${t.boundary}"`),l(),a('var body = ""'),a("var error: NSError? = nil"),a("for param in parameters {"),a('let paramName = param["name"]!',1),a('body += "--\\(boundary)\\r\\n"',1),a('body += "Content-Disposition:form-data; name=\\"\\(paramName)\\""',1),a('if let filename = param["fileName"] {',1),a('let contentType = param["content-type"]!',2),a("let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)",2),a("if (error != nil) {",2),a("print(error as Any)",3),a("}",2),a('body += "; filename=\\"\\(filename)\\"\\r\\n"',2),a('body += "Content-Type: \\(contentType)\\r\\n\\r\\n"',2),a("body += fileContent",2),a('} else if let paramValue = param["value"] {',1),a('body += "\\r\\n\\r\\n\\(paramValue)"',2),a("}",1),a("}");break;default:l(),a(`let postData = NSData(data: "${t.text}".data(using: String.Encoding.utf8)!)`)}return l(),a(`let request = NSMutableURLRequest(url: NSURL(string: "${r}")! as URL,`),a(" cachePolicy: .useProtocolCachePolicy,"),a(` timeoutInterval: ${parseInt(i.timeout,10).toFixed(1)})`),a(`request.httpMethod = "${n}"`),d.hasHeaders&&a("request.allHTTPHeaderFields = headers"),d.hasBody&&a("request.httpBody = postData as Data"),l(),a("let session = URLSession.shared"),a("let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in"),a("if (error != nil) {",1),a("print(error as Any)",2),a("} else {",1),a("let httpResponse = response as? HTTPURLResponse",2),a("print(httpResponse)",2),a("}",1),a("})"),l(),a("dataTask.resume()"),c()}}}}};class Cf{constructor(e){let t=[];var r;t="object"==typeof(r=e)&&"log"in r&&"object"==typeof r.log&&"entries"in r.log&&Array.isArray(r.log.entries)?e.log.entries:[{request:e}],this.requests=Promise.all(t.map(({request:e})=>{var t;const r={bodySize:0,headersSize:0,headers:[],cookies:[],httpVersion:"HTTP/1.1",queryString:[],postData:{mimeType:(null===(t=e.postData)||void 0===t?void 0:t.mimeType)||"application/octet-stream"},...e};return this.prepare(r)}))}async prepare(e){var t,r,n,o;const s={...e,fullUrl:"",queryObj:{},headersObj:{},cookiesObj:{},allHeaders:{}};if(s.queryString&&s.queryString.length&&(s.queryObj=s.queryString.reduce(Iu,{})),s.headers&&s.headers.length){const e=/^HTTP\/2/;s.headersObj=s.headers.reduce((t,{name:r,value:n})=>{const o=e.exec(s.httpVersion)?r.toLocaleLowerCase():r;return{...t,[o]:n}},{})}s.cookies&&s.cookies.length&&(s.cookiesObj=s.cookies.reduceRight((e,{name:t,value:r})=>({...e,[t]:r}),{}));const i=null===(t=s.cookies)||void 0===t?void 0:t.map(({name:e,value:t})=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`);switch((null==i?void 0:i.length)&&(s.allHeaders.cookie=i.join("; ")),null===(r=s.postData)||void 0===r?void 0:r.mimeType){case"multipart/mixed":case"multipart/related":case"multipart/form-data":case"multipart/alternative":if(s.postData.text="",s.postData.mimeType="multipart/form-data",null===(n=s.postData)||void 0===n?void 0:n.params){const e=new xu,t="---011000010111000001101001";null===(o=s.postData)||void 0===o||o.params.forEach(t=>{const r=t.name,n=t.value||"",o=t.fileName;var s;"object"==typeof(s=n)&&"function"==typeof s.arrayBuffer&&"string"==typeof s.type&&"function"==typeof s.stream&&"function"==typeof s.constructor&&/^(Blob|File)$/.test(s[ju])?e.append(r,n,o):e.append(r,new wu([n],{type:t.contentType}),o?function(e){const t=e.split("/");return t[t.length-1]}(o):o)});const{postData:r}=s;for await(const o of Pu(e,t))r.text+=o;s.postData.boundary=t;const n=Eu(s.headersObj,"content-type")||"content-type";s.headersObj[n]=`multipart/form-data; boundary=${t}`}break;case"application/x-www-form-urlencoded":s.postData.params?(s.postData.paramsObj=s.postData.params.reduce(Iu,{}),s.postData.text=Ru(s.postData.paramsObj).toString()):s.postData.text="";break;case"text/json":case"text/x-json":case"application/json":case"application/x-json":if(s.postData.mimeType="application/json",s.postData.text)try{s.postData.jsonObj=JSON.parse(s.postData.text)}catch(cp){s.postData.mimeType="text/plain"}}const a={...s.allHeaders,...s.headersObj},l=new URL(s.url),c=Object.fromEntries(l.searchParams);s.queryObj={...s.queryObj,...c};const d=Ru(s.queryObj),p=new URL(s.url);return p.search=d.toString(),l.search="",{...s,allHeaders:a,fullUrl:p.toString(),url:l.toString(),uriObj:new Nu(p.toString())}}async convert(e,t,r){!r&&t&&(r=t);const n=Af[e];if(!n)return null;const{convert:o}=n.clientsById[t||n.info.default],s=(await this.requests).map(e=>o(e,r));return 1===s.length?s[0]:s}}var If=Object.defineProperty,Rf=Object.getOwnPropertyDescriptor,Nf=(e,t,r,n)=>{for(var o,s=n>1?void 0:n?Rf(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&If(t,r,s),s};const Mf=[{id:"curl",label:"cURL",target:"shell",client:"curl"},{id:"javascript",label:"JavaScript",target:"javascript",client:"fetch"},{id:"python",label:"Python",target:"python",client:"requests"},{id:"node",label:"Node.js",target:"node",client:"fetch"},{id:"go",label:"Go",target:"go",client:"native"},{id:"java",label:"Java",target:"java",client:"okhttp"},{id:"php",label:"PHP",target:"php",client:"guzzle"},{id:"ruby",label:"Ruby",target:"ruby",client:"native"},{id:"csharp",label:"C#",target:"csharp",client:"httpclient"}],qf={curl:oe`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
1660
|
+
`],Su([Oe({type:Array})],Ou.prototype,"responses",2),Su([je()],Ou.prototype,"_activeTab",2),Ou=Su([_e("sl-responses")],Ou);const ju="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:window,{FormData:Pu,Blob:Eu,File:Tu}=ju,Au="\r\n",Cu="-".repeat(2),Iu=Symbol.toStringTag,Ru=(e,t,r)=>{let n="";return n+=`${Cu}${e}${Au}`,n+=`Content-Disposition: form-data; name="${t}"`,"string"!=typeof r&&"blob"!==r.name&&(n+=`; filename="${r.name}"${Au}`,n+=`Content-Type: ${r.type||"application/octet-stream"}`),`${n}${Au.repeat(2)}`},Nu=async function*(e,t){for(const[r,n]of e)yield Ru(t,r,n),"string"==typeof n?yield n:yield await n.text(),yield Au;yield(e=>`${Cu}${e}${Cu}${Au.repeat(1)}`)(t)},Mu=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),qu=(e,t)=>{const r=Mu(e,t);if(r)return e[r]},zu=(e,t)=>Boolean(Mu(e,t)),Lu=["application/json","application/x-json","text/json","text/x-json","+json"],Uu=(e,t)=>{if(void 0===t.value)return e;const r=e[t.name];return void 0===r?(e[t.name]=t.value,e):Array.isArray(r)?(r.push(t.value),e):(e[t.name]=[r,t.value],e)};function Du(e){return new URLSearchParams(Object.entries(e).map(([e,t])=>Array.isArray(t)?t.map(t=>[e,t]):[[e,t]]).flat(1))}class Bu extends URL{get path(){return this.pathname+this.search}}class Hu{constructor({indent:e,join:t}={}){this.postProcessors=[],this.code=[],this.indentationCharacter="",this.lineJoin="\n",this.indentLine=(e,t=0)=>`${this.indentationCharacter.repeat(t)}${e}`,this.unshift=(e,t)=>{const r=this.indentLine(e,t);this.code.unshift(r)},this.push=(e,t)=>{const r=this.indentLine(e,t);this.code.push(r)},this.blank=()=>{this.code.push("")},this.join=()=>{const e=this.code.join(this.lineJoin);return this.postProcessors.reduce((e,t)=>t(e),e)},this.addPostProcessor=e=>{this.postProcessors=[...this.postProcessors,e]},this.indentationCharacter=e||"",this.lineJoin=null!=t?t:"\n"}}function Fu(e,t={}){const{delimiter:r='"',escapeChar:n="\\",escapeNewlines:o=!0}=t;return[...e.toString()].map(e=>"\b"===e?`${n}b`:"\t"===e?`${n}t`:"\n"===e?o?`${n}n`:e:"\f"===e?`${n}f`:"\r"===e?o?`${n}r`:e:e===n?n+n:e===r?n+r:e<" "||e>"~"?JSON.stringify(e).slice(1,-1):e).join("")}const Vu=e=>Fu(e,{delimiter:"'"}),Gu=e=>Fu(e,{delimiter:'"'}),Ju={info:{key:"c",title:"C",extname:".c",default:"libcurl"},clientsById:{libcurl:{info:{key:"libcurl",title:"Libcurl",link:"http://curl.haxx.se/libcurl",description:"Simple REST and HTTP API Client for C"},convert:({method:e,fullUrl:t,headersObj:r,allHeaders:n,postData:o})=>{const{push:s,blank:i,join:a}=new Hu;s("CURL *hnd = curl_easy_init();"),i(),s(`curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "${e.toUpperCase()}");`),s(`curl_easy_setopt(hnd, CURLOPT_URL, "${t}");`);const l=Object.keys(r);return l.length&&(i(),s("struct curl_slist *headers = NULL;"),l.forEach(e=>{s(`headers = curl_slist_append(headers, "${e}: ${Gu(r[e])}");`)}),s("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")),n.cookie&&(i(),s(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${n.cookie}");`)),(null==o?void 0:o.text)&&(i(),s(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(o.text)});`)),i(),s("CURLcode ret = curl_easy_perform(hnd);"),a()}}}};class Wu{constructor(e){this.name="",this.toString=()=>`:${this.name}`,this.name=e}}let Ku=class{constructor(e){this.path="",this.toString=()=>`(clojure.java.io/file "${this.path}")`,this.path=e}};const Zu=e=>void 0===e?null:null===e?"null":e.constructor.name.toLowerCase(),Yu=e=>"object"===Zu(e)&&0===Object.keys(e).length,Qu=e=>(Object.keys(e).filter(t=>Yu(e[t])).forEach(t=>{delete e[t]}),e),Xu=(e,t)=>{const r=" ".repeat(e);return t.replace(/\n/g,`\n${r}`)},eh=e=>{switch(Zu(e)){case"string":return`"${e.replace(/"/g,'\\"')}"`;case"file":case"keyword":default:return e.toString();case"null":return"nil";case"regexp":return`#"${e.source}"`;case"object":{const t=Object.keys(e).reduce((t,r)=>`${t}:${r} ${Xu(r.length+2,eh(e[r]))}\n `,"").trim();return`{${Xu(1,t)}}`}case"array":{const t=e.reduce((e,t)=>`${e} ${eh(t)}`,"").trim();return`[${Xu(1,t)}]`}}},th={info:{key:"clojure",title:"Clojure",extname:".clj",default:"clj_http"},clientsById:{clj_http:{info:{key:"clj_http",title:"clj-http",link:"https://github.com/dakrone/clj-http",description:"An idiomatic clojure http client wrapping the apache client."},convert:({queryObj:e,method:t,postData:r,url:n,allHeaders:o},s)=>{const{push:i,join:a}=new Hu({indent:null==s?void 0:s.indent});if(t=t.toLowerCase(),!["get","post","put","delete","patch","head","options"].includes(t))return i("Method not supported"),a();const l={headers:o,"query-params":e};switch(null==r?void 0:r.mimeType){case"application/json":{l["content-type"]=new Wu("json"),l["form-params"]=r.jsonObj;const e=Mu(l.headers,"content-type");e&&delete l.headers[e]}break;case"application/x-www-form-urlencoded":{l["form-params"]=r.paramsObj;const e=Mu(l.headers,"content-type");e&&delete l.headers[e]}break;case"text/plain":{l.body=r.text;const e=Mu(l.headers,"content-type");e&&delete l.headers[e]}break;case"multipart/form-data":if(r.params){l.multipart=r.params.map(e=>e.fileName&&!e.value?{name:e.name,content:new Ku(e.fileName)}:{name:e.name,content:e.value});const e=Mu(l.headers,"content-type");e&&delete l.headers[e]}}if("application/json"===qu(l.headers,"accept")){l.accept=new Wu("json");const e=Mu(l.headers,"accept");e&&delete l.headers[e]}if(i("(require '[clj-http.client :as client])\n"),Yu(Qu(l)))i(`(client/${t} "${n}")`);else{const e=11+t.length+n.length;i(`(client/${t} "${n}" ${Xu(e,eh(Qu(l)))})`)}return a()}}}},rh={info:{key:"csharp",title:"C#",extname:".cs",default:"restsharp"},clientsById:{httpclient:{info:{key:"httpclient",title:"HttpClient",link:"https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient",description:".NET Standard HTTP Client"},convert:({allHeaders:e,postData:t,method:r,fullUrl:n},o)=>{var s,i;const a={indent:" ",...o},{push:l,join:c}=new Hu({indent:a.indent});l("using System.Net.Http.Headers;");let d="";const p=Boolean(e.cookie),u=(e=>{let t=qu(e,"accept-encoding");if(!t)return[];const r={gzip:"DecompressionMethods.GZip",deflate:"DecompressionMethods.Deflate"},n=[];return"string"==typeof t&&(t=[t]),t.forEach(e=>{e.split(",").forEach(e=>{const t=/\s*([^;\s]+)/.exec(e);if(t){const e=r[t[1]];e&&n.push(e)}})}),n})(e);(p||u.length)&&(d="clientHandler",l("var clientHandler = new HttpClientHandler"),l("{"),p&&l("UseCookies = false,",1),u.length&&l(`AutomaticDecompression = ${u.join(" | ")},`,1),l("};")),l(`var client = new HttpClient(${d});`),l("var request = new HttpRequestMessage"),l("{");r=(r=r.toUpperCase())&&["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"].includes(r)?`HttpMethod.${r[0]}${r.substring(1).toLowerCase()}`:`new HttpMethod("${r}")`,l(`Method = ${r},`,1),l(`RequestUri = new Uri("${n}"),`,1);const h=Object.keys(e).filter(e=>{switch(e.toLowerCase()){case"content-type":case"content-length":case"accept-encoding":return!1;default:return!0}});if(h.length&&(l("Headers =",1),l("{",1),h.forEach(t=>{l(`{ "${t}", "${Gu(e[t])}" },`,2)}),l("},",1)),null==t?void 0:t.text){const e=t.mimeType;switch(e){case"application/x-www-form-urlencoded":l("Content = new FormUrlEncodedContent(new Dictionary<string, string>",1),l("{",1),null===(s=t.params)||void 0===s||s.forEach(e=>{l(`{ "${e.name}", "${e.value}" },`,2)}),l("}),",1);break;case"multipart/form-data":l("Content = new MultipartFormDataContent",1),l("{",1),null===(i=t.params)||void 0===i||i.forEach(e=>{l(`new StringContent(${JSON.stringify(e.value||"")})`,2),l("{",2),l("Headers =",3),l("{",3),e.contentType&&l(`ContentType = new MediaTypeHeaderValue("${e.contentType}"),`,4),l('ContentDisposition = new ContentDispositionHeaderValue("form-data")',4),l("{",4),l(`Name = "${e.name}",`,5),e.fileName&&l(`FileName = "${e.fileName}",`,5),l("}",4),l("}",3),l("},",2)}),l("},",1);break;default:l(`Content = new StringContent(${JSON.stringify((null==t?void 0:t.text)||"")})`,1),l("{",1),l("Headers =",2),l("{",2),l(`ContentType = new MediaTypeHeaderValue("${e}")`,3),l("}",2),l("}",1)}}return l("};"),l("using (var response = await client.SendAsync(request))"),l("{"),l("response.EnsureSuccessStatusCode();",1),l("var body = await response.Content.ReadAsStringAsync();",1),l("Console.WriteLine(body);",1),l("}"),c()}},restsharp:{info:{key:"restsharp",title:"RestSharp",link:"http://restsharp.org/",description:"Simple REST and HTTP API Client for .NET"},convert:({allHeaders:e,method:t,fullUrl:r,headersObj:n,cookies:o,postData:s})=>{const{push:i,join:a}=new Hu;if(!["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"].includes(t.toUpperCase()))return"Method not supported";if(i(`var client = new RestClient("${r}");`),i(`var request = new RestRequest(Method.${t.toUpperCase()});`),Object.keys(n).forEach(e=>{i(`request.AddHeader("${e}", "${Gu(n[e])}");`)}),null==o||o.forEach(({name:e,value:t})=>{i(`request.AddCookie("${e}", "${t}");`)}),null==s?void 0:s.text){const t=qu(e,"content-type"),r=JSON.stringify(s.text);i(`request.AddParameter("${t}", ${r}, ParameterType.RequestBody);`)}return i("IRestResponse response = client.Execute(request);"),a()}}}},nh={info:{key:"go",title:"Go",extname:".go",default:"native"},clientsById:{native:{info:{key:"native",title:"NewRequest",link:"http://golang.org/pkg/net/http/#NewRequest",description:"Golang HTTP client request"},convert:({postData:e,method:t,allHeaders:r,fullUrl:n},o={})=>{const{blank:s,push:i,join:a}=new Hu({indent:"\t"}),{showBoilerplate:l=!0,checkErrors:c=!1,printBody:d=!0,timeout:p=-1,insecureSkipVerify:u=!1}=o,h=c?"err":"_",f=l?1:0,m=()=>{c&&(i("if err != nil {",f),i("panic(err)",f+1),i("}",f))};l&&(i("package main"),s(),i("import ("),i('"fmt"',f),p>0&&i('"time"',f),u&&i('"crypto/tls"',f),(null==e?void 0:e.text)&&i('"strings"',f),i('"net/http"',f),d&&i('"io"',f),i(")"),s(),i("func main() {"),s()),u&&(i("insecureTransport := http.DefaultTransport.(*http.Transport).Clone()",f),i("insecureTransport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}",f));const g=p>0,y=g||u,v=y?"client":"http.DefaultClient";return y&&(i("client := http.Client{",f),g&&i(`Timeout: time.Duration(${p} * time.Second),`,f+1),u&&i("Transport: insecureTransport,",f+1),i("}",f),s()),i(`url := "${n}"`,f),s(),(null==e?void 0:e.text)?(i(`payload := strings.NewReader(${JSON.stringify(e.text)})`,f),s(),i(`req, ${h} := http.NewRequest("${t}", url, payload)`,f),s()):(i(`req, ${h} := http.NewRequest("${t}", url, nil)`,f),s()),m(),Object.keys(r).length&&(Object.keys(r).forEach(e=>{i(`req.Header.Add("${e}", "${Gu(r[e])}")`,f)}),s()),i(`res, ${h} := ${v}.Do(req)`,f),m(),d&&(s(),i("defer res.Body.Close()",f),i(`body, ${h} := io.ReadAll(res.Body)`,f),m()),s(),i("fmt.Println(res)",f),d&&i("fmt.Println(string(body))",f),l&&(s(),i("}")),a()}}}},oh={info:{key:"http",title:"HTTP",extname:null,default:"1.1"},clientsById:{"http1.1":{info:{key:"http1.1",title:"HTTP/1.1",link:"https://tools.ietf.org/html/rfc7230",description:"HTTP/1.1 request string in accordance with RFC 7230"},convert:({method:e,fullUrl:t,uriObj:r,httpVersion:n,allHeaders:o,postData:s},i)=>{const a={absoluteURI:!1,autoContentLength:!0,autoHost:!0,...i},{blank:l,push:c,join:d}=new Hu({indent:"",join:"\r\n"}),p=a.absoluteURI?t:r.path;c(`${e} ${p} ${n}`);const u=Object.keys(o);u.forEach(e=>{const t=e.toLowerCase().replace(/(^|-)(\w)/g,e=>e.toUpperCase());c(`${t}: ${o[e]}`)}),a.autoHost&&!u.includes("host")&&c(`Host: ${r.host}`),a.autoContentLength&&(null==s?void 0:s.text)&&!u.includes("content-length")&&c(`Content-Length: ${s.text.length}`),l();return`${d()}\r\n${(null==s?void 0:s.text)||""}`}}}},sh={info:{key:"java",title:"Java",extname:".java",default:"unirest"},clientsById:{asynchttp:{info:{key:"asynchttp",title:"AsyncHttp",link:"https://github.com/AsyncHttpClient/async-http-client",description:"Asynchronous Http and WebSocket Client library for Java"},convert:({method:e,allHeaders:t,postData:r,fullUrl:n},o)=>{const s={indent:" ",...o},{blank:i,push:a,join:l}=new Hu({indent:s.indent});return a("AsyncHttpClient client = new DefaultAsyncHttpClient();"),a(`client.prepare("${e.toUpperCase()}", "${n}")`),Object.keys(t).forEach(e=>{a(`.setHeader("${e}", "${Gu(t[e])}")`,1)}),(null==r?void 0:r.text)&&a(`.setBody(${JSON.stringify(r.text)})`,1),a(".execute()",1),a(".toCompletableFuture()",1),a(".thenAccept(System.out::println)",1),a(".join();",1),i(),a("client.close();"),l()}},nethttp:{info:{key:"nethttp",title:"java.net.http",link:"https://openjdk.java.net/groups/net/httpclient/intro.html",description:"Java Standardized HTTP Client API"},convert:({allHeaders:e,fullUrl:t,method:r,postData:n},o)=>{const s={indent:" ",...o},{push:i,join:a}=new Hu({indent:s.indent});return i("HttpRequest request = HttpRequest.newBuilder()"),i(`.uri(URI.create("${t}"))`,2),Object.keys(e).forEach(t=>{i(`.header("${t}", "${Gu(e[t])}")`,2)}),(null==n?void 0:n.text)?i(`.method("${r.toUpperCase()}", HttpRequest.BodyPublishers.ofString(${JSON.stringify(n.text)}))`,2):i(`.method("${r.toUpperCase()}", HttpRequest.BodyPublishers.noBody())`,2),i(".build();",2),i("HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"),i("System.out.println(response.body());"),a()}},okhttp:{info:{key:"okhttp",title:"OkHttp",link:"http://square.github.io/okhttp/",description:"An HTTP Request Client Library"},convert:({postData:e,method:t,fullUrl:r,allHeaders:n},o)=>{const s={indent:" ",...o},{push:i,blank:a,join:l}=new Hu({indent:s.indent});return i("OkHttpClient client = new OkHttpClient();"),a(),(null==e?void 0:e.text)&&(e.boundary?i(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`):i(`MediaType mediaType = MediaType.parse("${e.mimeType}");`),i(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)),i("Request request = new Request.Builder()"),i(`.url("${r}")`,1),["GET","POST","PUT","DELETE","PATCH","HEAD"].includes(t.toUpperCase())?["POST","PUT","DELETE","PATCH"].includes(t.toUpperCase())?(null==e?void 0:e.text)?i(`.${t.toLowerCase()}(body)`,1):i(`.${t.toLowerCase()}(null)`,1):i(`.${t.toLowerCase()}()`,1):(null==e?void 0:e.text)?i(`.method("${t.toUpperCase()}", body)`,1):i(`.method("${t.toUpperCase()}", null)`,1),Object.keys(n).forEach(e=>{i(`.addHeader("${e}", "${Gu(n[e])}")`,1)}),i(".build();",1),a(),i("Response response = client.newCall(request).execute();"),l()}},unirest:{info:{key:"unirest",title:"Unirest",link:"http://unirest.io/java.html",description:"Lightweight HTTP Request Client Library"},convert:({method:e,allHeaders:t,postData:r,fullUrl:n},o)=>{const s={indent:" ",...o},{join:i,push:a}=new Hu({indent:s.indent});return["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"].includes(e.toUpperCase())?a(`HttpResponse<String> response = Unirest.${e.toLowerCase()}("${n}")`):a(`HttpResponse<String> response = Unirest.customMethod("${e.toUpperCase()}","${n}")`),Object.keys(t).forEach(e=>{a(`.header("${e}", "${Gu(t[e])}")`,1)}),(null==r?void 0:r.text)&&a(`.body(${JSON.stringify(r.text)})`,1),a(".asString();",1),i()}}}};var ih,ah,lh,ch;var dh,ph,uh,hh={};const fh=s(function(){if(uh)return ph;uh=1;const e=ah?ih:(ah=1,ih=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)}),t=ch?lh:(ch=1,lh=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}),r=(dh||(dh=1,Object.defineProperty(hh,"__esModule",{value:!0}),hh.default=e=>Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))),hh).default;return ph=(n,o,s)=>{const i=[];return function n(o,s,a){let l;(s=s||{}).indent=s.indent||"\t",a=a||"",l=void 0===s.inlineCharacterLimit?{newLine:"\n",newLineOrSpace:"\n",pad:a,indent:a+s.indent}:{newLine:"@@__STRINGIFY_OBJECT_NEW_LINE__@@",newLineOrSpace:"@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",pad:"@@__STRINGIFY_OBJECT_PAD__@@",indent:"@@__STRINGIFY_OBJECT_INDENT__@@"};const c=e=>{if(void 0===s.inlineCharacterLimit)return e;const t=e.replace(new RegExp(l.newLine,"g"),"").replace(new RegExp(l.newLineOrSpace,"g")," ").replace(new RegExp(l.pad+"|"+l.indent,"g"),"");return t.length<=s.inlineCharacterLimit?t:e.replace(new RegExp(l.newLine+"|"+l.newLineOrSpace,"g"),"\n").replace(new RegExp(l.pad,"g"),a).replace(new RegExp(l.indent,"g"),a+s.indent)};if(-1!==i.indexOf(o))return'"[Circular]"';if(null==o||"number"==typeof o||"boolean"==typeof o||"function"==typeof o||"symbol"==typeof o||e(o))return String(o);if(o instanceof Date)return`new Date('${o.toISOString()}')`;if(Array.isArray(o)){if(0===o.length)return"[]";i.push(o);const e="["+l.newLine+o.map((e,t)=>{const r=o.length-1===t?l.newLine:","+l.newLineOrSpace;let i=n(e,s,a+s.indent);return s.transform&&(i=s.transform(o,t,i)),l.indent+i+r}).join("")+l.pad+"]";return i.pop(),c(e)}if(t(o)){let e=Object.keys(o).concat(r(o));if(s.filter&&(e=e.filter(e=>s.filter(o,e))),0===e.length)return"{}";i.push(o);const t="{"+l.newLine+e.map((t,r)=>{const i=e.length-1===r?l.newLine:","+l.newLineOrSpace,c="symbol"==typeof t,d=!c&&/^[a-z$_][a-z$_0-9]*$/i.test(t),p=c||d?t:n(t,s);let u=n(o[t],s,a+s.indent);return s.transform&&(u=s.transform(o,t,u)),l.indent+String(p)+": "+u+i}).join("")+l.pad+"}";return i.pop(),c(t)}return o=String(o).replace(/[\r\n]/g,e=>"\n"===e?"\\n":"\\r"),!1===s.singleQuotes?`"${o=o.replace(/"/g,'\\"')}"`:`'${o=o.replace(/\\?'/g,"\\'")}'`}(n,o,s)}}()),mh={info:{key:"javascript",title:"JavaScript",extname:".js",default:"xhr"},clientsById:{xhr:{info:{key:"xhr",title:"XMLHttpRequest",link:"https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest",description:"W3C Standard API that provides scripted client functionality"},convert:({postData:e,allHeaders:t,method:r,fullUrl:n},o)=>{var s;const i={indent:" ",cors:!0,...o},{blank:a,push:l,join:c}=new Hu({indent:i.indent});switch(null==e?void 0:e.mimeType){case"application/json":l(`const data = JSON.stringify(${fh(e.jsonObj,{indent:i.indent})});`),a();break;case"multipart/form-data":if(!e.params)break;if(l("const data = new FormData();"),e.params.forEach(e=>{l(`data.append('${e.name}', '${e.value||e.fileName||""}');`)}),zu(t,"content-type")&&(null===(s=qu(t,"content-type"))||void 0===s?void 0:s.includes("boundary"))){const e=Mu(t,"content-type");e&&delete t[e]}a();break;default:l(`const data = ${(null==e?void 0:e.text)?`'${e.text}'`:"null"};`),a()}return l("const xhr = new XMLHttpRequest();"),i.cors&&l("xhr.withCredentials = true;"),a(),l("xhr.addEventListener('readystatechange', function () {"),l("if (this.readyState === this.DONE) {",1),l("console.log(this.responseText);",2),l("}",1),l("});"),a(),l(`xhr.open('${r}', '${n}');`),Object.keys(t).forEach(e=>{l(`xhr.setRequestHeader('${e}', '${Vu(t[e])}');`)}),a(),l("xhr.send(data);"),c()}},axios:{info:{key:"axios",title:"Axios",link:"https://github.com/axios/axios",description:"Promise based HTTP client for the browser and node.js"},convert:({allHeaders:e,method:t,url:r,queryObj:n,postData:o},s)=>{const i={indent:" ",...s},{blank:a,push:l,join:c,addPostProcessor:d}=new Hu({indent:i.indent});l("import axios from 'axios';"),a();const p={method:t,url:r};switch(Object.keys(n).length&&(p.params=n),Object.keys(e).length&&(p.headers=e),null==o?void 0:o.mimeType){case"application/x-www-form-urlencoded":o.params&&(l("const encodedParams = new URLSearchParams();"),o.params.forEach(e=>{l(`encodedParams.set('${e.name}', '${e.value}');`)}),a(),p.data="encodedParams,",d(e=>e.replace(/'encodedParams,'/,"encodedParams,")));break;case"application/json":o.jsonObj&&(p.data=o.jsonObj);break;case"multipart/form-data":if(!o.params)break;l("const form = new FormData();"),o.params.forEach(e=>{l(`form.append('${e.name}', '${e.value||e.fileName||""}');`)}),a(),p.data="[form]";break;default:(null==o?void 0:o.text)&&(p.data=o.text)}const u=fh(p,{indent:" ",inlineCharacterLimit:80}).replace('"[form]"',"form");return l(`const options = ${u};`),a(),l("try {"),l("const { data } = await axios.request(options);",1),l("console.log(data);",1),l("} catch (error) {"),l("console.error(error);",1),l("}"),c()}},fetch:{info:{key:"fetch",title:"fetch",link:"https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch",description:"Perform asynchronous HTTP requests with the Fetch API"},convert:({method:e,allHeaders:t,postData:r,fullUrl:n},o)=>{const s={indent:" ",credentials:null,...o},{blank:i,join:a,push:l}=new Hu({indent:s.indent}),c={method:e};switch(Object.keys(t).length&&(c.headers=t),null!==s.credentials&&(c.credentials=s.credentials),l(`const url = '${n}';`),null==r?void 0:r.mimeType){case"application/x-www-form-urlencoded":c.body=r.paramsObj?r.paramsObj:r.text;break;case"application/json":c.body=JSON.stringify(r.jsonObj);break;case"multipart/form-data":if(!r.params)break;const e=Mu(t,"content-type");e&&delete t[e],l("const form = new FormData();"),r.params.forEach(e=>{l(`form.append('${e.name}', '${e.value||e.fileName||""}');`)}),i();break;default:(null==r?void 0:r.text)&&(c.body=r.text)}return c.headers&&!Object.keys(c.headers).length&&delete c.headers,l(`const options = ${fh(c,{indent:s.indent,inlineCharacterLimit:80,transform:(e,t,n)=>"body"===t&&r&&"application/x-www-form-urlencoded"===r.mimeType?`new URLSearchParams(${n})`:n})};`),i(),(null==r?void 0:r.params)&&"multipart/form-data"===r.mimeType&&(l("options.body = form;"),i()),l("try {"),l("const response = await fetch(url, options);",1),l("const data = await response.json();",1),l("console.log(data);",1),l("} catch (error) {"),l("console.error(error);",1),l("}"),a()}},jquery:{info:{key:"jquery",title:"jQuery",link:"http://api.jquery.com/jquery.ajax/",description:"Perform an asynchronous HTTP (Ajax) requests with jQuery"},convert:({fullUrl:e,method:t,allHeaders:r,postData:n},o)=>{var s;const i={indent:" ",...o},{blank:a,push:l,join:c}=new Hu({indent:i.indent}),d={async:!0,crossDomain:!0,url:e,method:t,headers:r};switch(null==n?void 0:n.mimeType){case"application/x-www-form-urlencoded":d.data=n.paramsObj?n.paramsObj:n.text;break;case"application/json":d.processData=!1,d.data=n.text;break;case"multipart/form-data":if(!n.params)break;if(l("const form = new FormData();"),n.params.forEach(e=>{l(`form.append('${e.name}', '${e.value||e.fileName||""}');`)}),d.processData=!1,d.contentType=!1,d.mimeType="multipart/form-data",d.data="[form]",zu(r,"content-type")&&(null===(s=qu(r,"content-type"))||void 0===s?void 0:s.includes("boundary"))){const e=Mu(r,"content-type");e&&delete d.headers[e]}a();break;default:(null==n?void 0:n.text)&&(d.data=n.text)}const p=fh(d,{indent:i.indent}).replace("'[form]'","form");return l(`const settings = ${p};`),a(),l("$.ajax(settings).done(function (response) {"),l("console.log(response);",1),l("});"),c()}}}},gh={info:{key:"kotlin",title:"Kotlin",extname:".kt",default:"okhttp"},clientsById:{okhttp:{info:{key:"okhttp",title:"OkHttp",link:"http://square.github.io/okhttp/",description:"An HTTP Request Client Library"},convert:({postData:e,fullUrl:t,method:r,allHeaders:n},o)=>{const s={indent:" ",...o},{blank:i,join:a,push:l}=new Hu({indent:s.indent});return l("val client = OkHttpClient()"),i(),(null==e?void 0:e.text)&&(e.boundary?l(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`):l(`val mediaType = MediaType.parse("${e.mimeType}")`),l(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)),l("val request = Request.Builder()"),l(`.url("${t}")`,1),["GET","POST","PUT","DELETE","PATCH","HEAD"].includes(r.toUpperCase())?["POST","PUT","DELETE","PATCH"].includes(r.toUpperCase())?(null==e?void 0:e.text)?l(`.${r.toLowerCase()}(body)`,1):l(`.${r.toLowerCase()}(null)`,1):l(`.${r.toLowerCase()}()`,1):(null==e?void 0:e.text)?l(`.method("${r.toUpperCase()}", body)`,1):l(`.method("${r.toUpperCase()}", null)`,1),Object.keys(n).forEach(e=>{l(`.addHeader("${e}", "${Gu(n[e])}")`,1)}),l(".build()",1),i(),l("val response = client.newCall(request).execute()"),a()}}}},yh={info:{key:"node",title:"Node.js",extname:".js",default:"native"},clientsById:{native:{info:{key:"native",title:"HTTP",link:"http://nodejs.org/api/http.html#http_http_request_options_callback",description:"Node.js native HTTP interface"},convert:({uriObj:e,method:t,allHeaders:r,postData:n},o={})=>{const{indent:s=" ",insecureSkipVerify:i=!1}=o,{blank:a,join:l,push:c,unshift:d}=new Hu({indent:s}),p={method:t,hostname:e.hostname,port:""===e.port?null:e.port,path:e.path,headers:r,...i?{rejectUnauthorized:!1}:{}};switch(c(`const http = require('${e.protocol.replace(":","")}');`),a(),c(`const options = ${fh(p,{indent:s})};`),a(),c("const req = http.request(options, function (res) {"),c("const chunks = [];",1),a(),c("res.on('data', function (chunk) {",1),c("chunks.push(chunk);",2),c("});",1),a(),c("res.on('end', function () {",1),c("const body = Buffer.concat(chunks);",2),c("console.log(body.toString());",2),c("});",1),c("});"),a(),null==n?void 0:n.mimeType){case"application/x-www-form-urlencoded":n.paramsObj&&(d("const qs = require('querystring');"),c(`req.write(qs.stringify(${fh(n.paramsObj,{indent:" ",inlineCharacterLimit:80})}));`));break;case"application/json":n.jsonObj&&c(`req.write(JSON.stringify(${fh(n.jsonObj,{indent:" ",inlineCharacterLimit:80})}));`);break;default:(null==n?void 0:n.text)&&c(`req.write(${fh(n.text,{indent:s})});`)}return c("req.end();"),l()}},request:{info:{key:"request",title:"Request",link:"https://github.com/request/request",description:"Simplified HTTP request client"},convert:({method:e,url:t,queryObj:r,postData:n,headersObj:o,cookies:s},i)=>{const a={indent:" ",...i};let l=!1;const{push:c,blank:d,join:p,unshift:u}=new Hu({indent:a.indent});c("const request = require('request');"),d();const h={method:e,url:t};switch(Object.keys(r).length&&(h.qs=r),Object.keys(o).length&&(h.headers=o),null==n?void 0:n.mimeType){case"application/x-www-form-urlencoded":h.form=n.paramsObj;break;case"application/json":n.jsonObj&&(h.body=n.jsonObj,h.json=!0);break;case"multipart/form-data":if(!n.params)break;h.formData={},n.params.forEach(e=>{if(!e.fileName&&!e.fileName&&!e.contentType)return void(h.formData[e.name]=e.value);let t={};e.fileName?(l=!0,t={value:`fs.createReadStream(${e.fileName})`,options:{filename:e.fileName,contentType:e.contentType?e.contentType:null}}):e.value&&(t.value=e.value),h.formData[e.name]=t});break;default:(null==n?void 0:n.text)&&(h.body=n.text)}return s.length&&(h.jar="JAR",c("const jar = request.jar();"),s.forEach(e=>{c(`jar.setCookie(request.cookie('${encodeURIComponent(e.name)}=${encodeURIComponent(e.value)}'), '${t}');`)}),d()),l&&u("const fs = require('fs');"),c(`const options = ${fh(h,{indent:" ",inlineCharacterLimit:80})};`),d(),c("request(options, function (error, response, body) {"),c("if (error) throw new Error(error);",1),d(),c("console.log(body);",1),c("});"),p().replace("'JAR'","jar").replace(/'fs\.createReadStream\((.*)\)'/,"fs.createReadStream('$1')")}},unirest:{info:{key:"unirest",title:"Unirest",link:"http://unirest.io/nodejs.html",description:"Lightweight HTTP Request Client Library"},convert:({method:e,url:t,cookies:r,queryObj:n,postData:o,headersObj:s},i)=>{const a={indent:" ",...i};let l=!1;const{addPostProcessor:c,blank:d,join:p,push:u,unshift:h}=new Hu({indent:a.indent});switch(u("const unirest = require('unirest');"),d(),u(`const req = unirest('${e}', '${t}');`),d(),r.length&&(u("const CookieJar = unirest.jar();"),r.forEach(e=>{u(`CookieJar.add('${encodeURIComponent(e.name)}=${encodeURIComponent(e.value)}', '${t}');`)}),u("req.jar(CookieJar);"),d()),Object.keys(n).length&&(u(`req.query(${fh(n,{indent:a.indent})});`),d()),Object.keys(s).length&&(u(`req.headers(${fh(s,{indent:a.indent})});`),d()),null==o?void 0:o.mimeType){case"application/x-www-form-urlencoded":o.paramsObj&&(u(`req.form(${fh(o.paramsObj,{indent:a.indent})});`),d());break;case"application/json":o.jsonObj&&(u("req.type('json');"),u(`req.send(${fh(o.jsonObj,{indent:a.indent})});`),d());break;case"multipart/form-data":{if(!o.params)break;const e=[];o.params.forEach(t=>{const r={};t.fileName&&!t.value?(l=!0,r.body=`fs.createReadStream('${t.fileName}')`,c(e=>e.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/,"fs.createReadStream('$1')"))):t.value&&(r.body=t.value),r.body&&(t.contentType&&(r["content-type"]=t.contentType),e.push(r))}),u(`req.multipart(${fh(e,{indent:a.indent})});`),d();break}default:(null==o?void 0:o.text)&&(u(`req.send(${fh(o.text,{indent:a.indent})});`),d())}return l&&h("const fs = require('fs');"),u("req.end(function (res) {"),u("if (res.error) throw new Error(res.error);",1),d(),u("console.log(res.body);",1),u("});"),p()}},axios:{info:{key:"axios",title:"Axios",link:"https://github.com/axios/axios",description:"Promise based HTTP client for the browser and node.js"},convert:({method:e,url:t,queryObj:r,allHeaders:n,postData:o},s)=>{const i={indent:" ",...s},{blank:a,join:l,push:c,addPostProcessor:d}=new Hu({indent:i.indent});c("const axios = require('axios').default;");const p={method:e,url:t};switch(Object.keys(r).length&&(p.params=r),Object.keys(n).length&&(p.headers=n),null==o?void 0:o.mimeType){case"application/x-www-form-urlencoded":o.params&&(c("const { URLSearchParams } = require('url');"),a(),c("const encodedParams = new URLSearchParams();"),o.params.forEach(e=>{c(`encodedParams.set('${e.name}', '${e.value}');`)}),a(),p.data="encodedParams,",d(e=>e.replace(/'encodedParams,'/,"encodedParams,")));break;case"application/json":a(),o.jsonObj&&(p.data=o.jsonObj);break;default:a(),(null==o?void 0:o.text)&&(p.data=o.text)}const u=fh(p,{indent:" ",inlineCharacterLimit:80});return c(`const options = ${u};`),a(),c("try {"),c("const { data } = await axios.request(options);",1),c("console.log(data);",1),c("} catch (error) {"),c("console.error(error);",1),c("}"),l()}},fetch:{info:{key:"fetch",title:"Fetch",link:"https://github.com/bitinn/node-fetch",description:"Simplified HTTP node-fetch client"},convert:({method:e,fullUrl:t,postData:r,headersObj:n,cookies:o},s)=>{var i;const a={indent:" ",...s};let l=!1;const{blank:c,push:d,join:p,unshift:u}=new Hu({indent:a.indent});d("const fetch = require('node-fetch');"),c();const h={method:e};switch(Object.keys(n).length&&(h.headers=n),null==r?void 0:r.mimeType){case"application/x-www-form-urlencoded":u("const { URLSearchParams } = require('url');"),d("const encodedParams = new URLSearchParams();"),null===(i=r.params)||void 0===i||i.forEach(e=>{d(`encodedParams.set('${e.name}', '${e.value}');`)}),c(),h.body="encodedParams";break;case"application/json":r.jsonObj&&(h.body=JSON.stringify(r.jsonObj));break;case"multipart/form-data":if(!r.params)break;const e=Mu(n,"content-type");e&&delete n[e],u("const FormData = require('form-data');"),d("const formData = new FormData();"),r.params.forEach(e=>{e.fileName||e.fileName||e.contentType?e.fileName&&(l=!0,d(`formData.append('${e.name}', fs.createReadStream('${e.fileName}'));`)):d(`formData.append('${e.name}', '${e.value}');`)}),c();break;default:(null==r?void 0:r.text)&&(h.body=r.text)}if(o.length){const e=o.map(e=>`${encodeURIComponent(e.name)}=${encodeURIComponent(e.value)}`).join("; ");h.headers||(h.headers={}),h.headers.cookie=e}d(`const url = '${t}';`),h.headers&&!Object.keys(h.headers).length&&delete h.headers;const f=fh(h,{indent:" ",inlineCharacterLimit:80});return d(`const options = ${f};`),l&&u("const fs = require('fs');"),(null==r?void 0:r.params)&&"multipart/form-data"===r.mimeType&&d("options.body = formData;"),c(),d("try {"),d("const response = await fetch(url, options);",1),d("const data = await response.json();",1),d("console.log(data);",1),d("} catch (error) {"),d("console.error(error);",1),d("}"),p().replace(/'encodedParams'/,"encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/,'fs.createReadStream("$1")')}}}},vh=(e,t,r,n)=>{const o=`${e} *${t} = `;return`${o}${bh(r,n?o.length:void 0)};`},bh=(e,t)=>{const r=void 0===t?", ":`,\n ${" ".repeat(t)}`;switch(Object.prototype.toString.call(e)){case"[object Number]":return`@${e}`;case"[object Array]":return`@[ ${e.map(e=>bh(e)).join(r)} ]`;case"[object Object]":{const t=[];for(const r in e)t.push(`@"${r}": ${bh(e[r])}`);return`@{ ${t.join(r)} }`}case"[object Boolean]":return e?"@YES":"@NO";default:return null==e?"":`@"${e.toString().replace(/"/g,'\\"')}"`}},$h={info:{key:"objc",title:"Objective-C",extname:".m",default:"nsurlsession"},clientsById:{nsurlsession:{info:{key:"nsurlsession",title:"NSURLSession",link:"https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLSession_class/index.html",description:"Foundation's NSURLSession request"},convert:({allHeaders:e,postData:t,method:r,fullUrl:n},o)=>{var s;const i={indent:" ",pretty:!0,timeout:10,...o},{push:a,join:l,blank:c}=new Hu({indent:i.indent}),d={hasHeaders:!1,hasBody:!1};if(a("#import <Foundation/Foundation.h>"),Object.keys(e).length&&(d.hasHeaders=!0,c(),a(vh("NSDictionary","headers",e,i.pretty))),t&&(t.text||t.jsonObj||t.params))switch(d.hasBody=!0,t.mimeType){case"application/x-www-form-urlencoded":if(null===(s=t.params)||void 0===s?void 0:s.length){c();const[e,...r]=t.params;a(`NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"${e.name}=${e.value}" dataUsingEncoding:NSUTF8StringEncoding]];`),r.forEach(({name:e,value:t})=>{a(`[postData appendData:[@"&${e}=${t}" dataUsingEncoding:NSUTF8StringEncoding]];`)})}else d.hasBody=!1;break;case"application/json":t.jsonObj&&(a(vh("NSDictionary","parameters",t.jsonObj,i.pretty)),c(),a("NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];"));break;case"multipart/form-data":a(vh("NSArray","parameters",t.params||[],i.pretty)),a(`NSString *boundary = @"${t.boundary}";`),c(),a("NSError *error;"),a("NSMutableString *body = [NSMutableString string];"),a("for (NSDictionary *param in parameters) {"),a('[body appendFormat:@"--%@\\r\\n", boundary];',1),a('if (param[@"fileName"]) {',1),a('[body appendFormat:@"Content-Disposition:form-data; name=\\"%@\\"; filename=\\"%@\\"\\r\\n", param[@"name"], param[@"fileName"]];',2),a('[body appendFormat:@"Content-Type: %@\\r\\n\\r\\n", param[@"contentType"]];',2),a('[body appendFormat:@"%@", [NSString stringWithContentsOfFile:param[@"fileName"] encoding:NSUTF8StringEncoding error:&error]];',2),a("if (error) {",2),a('NSLog(@"%@", error);',3),a("}",2),a("} else {",1),a('[body appendFormat:@"Content-Disposition:form-data; name=\\"%@\\"\\r\\n\\r\\n", param[@"name"]];',2),a('[body appendFormat:@"%@", param[@"value"]];',2),a("}",1),a("}"),a('[body appendFormat:@"\\r\\n--%@--\\r\\n", boundary];'),a("NSData *postData = [body dataUsingEncoding:NSUTF8StringEncoding];");break;default:c(),a(`NSData *postData = [[NSData alloc] initWithData:[@"${t.text}" dataUsingEncoding:NSUTF8StringEncoding]];`)}return c(),a(`NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"${n}"]`),a(" cachePolicy:NSURLRequestUseProtocolCachePolicy"),a(` timeoutInterval:${i.timeout.toFixed(1)}];`),a(`[request setHTTPMethod:@"${r}"];`),d.hasHeaders&&a("[request setAllHTTPHeaderFields:headers];"),d.hasBody&&a("[request setHTTPBody:postData];"),c(),a("NSURLSession *session = [NSURLSession sharedSession];"),a("NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request"),a(" completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {"),a(" if (error) {",1),a(' NSLog(@"%@", error);',2),a(" } else {",1),a(" NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;",2),a(' NSLog(@"%@", httpResponse);',2),a(" }",1),a(" }];"),a("[dataTask resume];"),l()}}}},xh={info:{key:"ocaml",title:"OCaml",extname:".ml",default:"cohttp"},clientsById:{cohttp:{info:{key:"cohttp",title:"CoHTTP",link:"https://github.com/mirage/ocaml-cohttp",description:"Cohttp is a very lightweight HTTP server using Lwt or Async for OCaml"},convert:({fullUrl:e,allHeaders:t,postData:r,method:n},o)=>{const s={indent:" ",...o},{push:i,blank:a,join:l}=new Hu({indent:s.indent});i("open Cohttp_lwt_unix"),i("open Cohttp"),i("open Lwt"),a(),i(`let uri = Uri.of_string "${e}" in`);const c=Object.keys(t);1===c.length?i(`let headers = Header.add (Header.init ()) "${c[0]}" "${Gu(t[c[0]])}" in`):c.length>1&&(i("let headers = Header.add_list (Header.init ()) ["),c.forEach(e=>{i(`("${e}", "${Gu(t[e])}");`,1)}),i("] in")),(null==r?void 0:r.text)&&i(`let body = Cohttp_lwt_body.of_string ${JSON.stringify(r.text)} in`),a();const d=c.length?"~headers ":"",p=(null==r?void 0:r.text)?"~body ":"",u=["get","post","head","delete","patch","put","options"].includes(n.toLowerCase())?`\`${n.toUpperCase()}`:`(Code.method_of_string "${n}")`;return i(`Client.call ${d}${p}${u} uri`),i(">>= fun (res, body_stream) ->"),i("(* Do stuff with the result *)",1),l()}}}},wh=(e,t,r)=>{switch(r=r||"",t=t||"",Object.prototype.toString.call(e)){case"[object Null]":case"[object Undefined]":default:return"null";case"[object String]":return`'${Fu(e,{delimiter:"'",escapeNewlines:!1})}'`;case"[object Number]":return e.toString();case"[object Array]":{const n=e.map(e=>wh(e,`${t}${t}`,t)).join(`,\n${t}`);return`[\n${t}${n}\n${r}]`}case"[object Object]":{const n=[];for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.push(`${wh(r,t)} => ${wh(e[r],`${t}${t}`,t)}`);return`[\n${t}${n.join(`,\n${t}`)}\n${r}]`}}},_h=["ACL","BASELINE_CONTROL","CHECKIN","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LABEL","LOCK","MERGE","MKACTIVITY","MKCOL","MKWORKSPACE","MOVE","OPTIONS","POST","PROPFIND","PROPPATCH","PUT","REPORT","TRACE","UNCHECKOUT","UNLOCK","UPDATE","VERSION_CONTROL"],kh={info:{key:"php",title:"PHP",extname:".php",default:"curl"},clientsById:{curl:{info:{key:"curl",title:"cURL",link:"http://php.net/manual/en/book.curl.php",description:"PHP with ext-curl"},convert:({uriObj:e,postData:t,fullUrl:r,method:n,httpVersion:o,cookies:s,headersObj:i},a={})=>{const{closingTag:l=!1,indent:c=" ",maxRedirects:d=10,namedErrors:p=!1,noTags:u=!1,shortTags:h=!1,timeout:f=30}=a,{push:m,blank:g,join:y}=new Hu({indent:c});u||(m(h?"<?":"<?php"),g()),m("$curl = curl_init();"),g();const v=[{escape:!0,name:"CURLOPT_PORT",value:""===e.port?null:e.port},{escape:!0,name:"CURLOPT_URL",value:r},{escape:!1,name:"CURLOPT_RETURNTRANSFER",value:"true"},{escape:!0,name:"CURLOPT_ENCODING",value:""},{escape:!1,name:"CURLOPT_MAXREDIRS",value:d},{escape:!1,name:"CURLOPT_TIMEOUT",value:f},{escape:!1,name:"CURLOPT_HTTP_VERSION",value:"HTTP/1.0"===o?"CURL_HTTP_VERSION_1_0":"CURL_HTTP_VERSION_1_1"},{escape:!0,name:"CURLOPT_CUSTOMREQUEST",value:n},{escape:!(null==t?void 0:t.jsonObj),name:"CURLOPT_POSTFIELDS",value:t?t.jsonObj?`json_encode(${wh(t.jsonObj,c.repeat(2),c)})`:t.text:void 0}];m("curl_setopt_array($curl, [");const b=new Hu({indent:c,join:`\n${c}`});v.forEach(({value:e,name:t,escape:r})=>{null!=e&&b.push(`${t} => ${r?JSON.stringify(e):e},`)});const $=s.map(e=>`${encodeURIComponent(e.name)}=${encodeURIComponent(e.value)}`);$.length&&b.push(`CURLOPT_COOKIE => "${$.join("; ")}",`);const x=Object.keys(i).sort().map(e=>`"${e}: ${Gu(i[e])}"`);return x.length&&(b.push("CURLOPT_HTTPHEADER => ["),b.push(x.join(`,\n${c}${c}`),1),b.push("],")),m(b.join(),1),m("]);"),g(),m("$response = curl_exec($curl);"),m("$err = curl_error($curl);"),g(),m("curl_close($curl);"),g(),m("if ($err) {"),m(p?'echo array_flip(get_defined_constants(true)["curl"])[$err];':'echo "cURL Error #:" . $err;',1),m("} else {"),m("echo $response;",1),m("}"),!u&&l&&(g(),m("?>")),y()}},guzzle:{info:{key:"guzzle",title:"Guzzle",link:"http://docs.guzzlephp.org/en/stable/",description:"PHP with Guzzle"},convert:({postData:e,fullUrl:t,method:r,cookies:n,headersObj:o},s)=>{var i;const a={closingTag:!1,indent:" ",noTags:!1,shortTags:!1,...s},{push:l,blank:c,join:d}=new Hu({indent:a.indent}),{code:p,push:u,join:h}=new Hu({indent:a.indent});switch(a.noTags||(l(a.shortTags?"<?":"<?php"),c()),null==e?void 0:e.mimeType){case"application/x-www-form-urlencoded":u(`'form_params' => ${wh(e.paramsObj,a.indent+a.indent,a.indent)},`,1);break;case"multipart/form-data":{const t=[];if(e.params&&e.params.forEach(function(e){if(e.fileName){const r={name:e.name,filename:e.fileName,contents:e.value};e.contentType&&(r.headers={"Content-Type":e.contentType}),t.push(r)}else e.value&&t.push({name:e.name,contents:e.value})}),t.length&&(u(`'multipart' => ${wh(t,a.indent+a.indent,a.indent)}`,1),zu(o,"content-type")&&(null===(i=qu(o,"content-type"))||void 0===i?void 0:i.indexOf("boundary")))){const e=Mu(o,"content-type");e&&delete o[e]}break}default:(null==e?void 0:e.text)&&u(`'body' => ${wh(e.text)},`,1)}const f=Object.keys(o).sort().map(function(e){return`${a.indent}${a.indent}'${e}' => '${Vu(o[e])}',`}),m=n.map(e=>`${encodeURIComponent(e.name)}=${encodeURIComponent(e.value)}`).join("; ");return m.length&&f.push(`${a.indent}${a.indent}'cookie' => '${Vu(m)}',`),f.length&&(u("'headers' => [",1),u(f.join("\n")),u("],",1)),l("$client = new \\GuzzleHttp\\Client();"),c(),p.length?(l(`$response = $client->request('${r}', '${t}', [`),l(h()),l("]);")):l(`$response = $client->request('${r}', '${t}');`),c(),l("echo $response->getBody();"),!a.noTags&&a.closingTag&&(c(),l("?>")),d()}},http1:{info:{key:"http1",title:"HTTP v1",link:"http://php.net/manual/en/book.http.php",description:"PHP with pecl/http v1"},convert:({method:e,url:t,postData:r,queryObj:n,headersObj:o,cookiesObj:s},i={})=>{const{closingTag:a=!1,indent:l=" ",noTags:c=!1,shortTags:d=!1}=i,{push:p,blank:u,join:h}=new Hu({indent:l});switch(c||(p(d?"<?":"<?php"),u()),_h.includes(e.toUpperCase())||p(`HttpRequest::methodRegister('${e}');`),p("$request = new HttpRequest();"),p(`$request->setUrl(${wh(t)});`),_h.includes(e.toUpperCase())?p(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`):p(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`),u(),Object.keys(n).length&&(p(`$request->setQueryData(${wh(n,l)});`),u()),Object.keys(o).length&&(p(`$request->setHeaders(${wh(o,l)});`),u()),Object.keys(s).length&&(p(`$request->setCookies(${wh(s,l)});`),u()),null==r?void 0:r.mimeType){case"application/x-www-form-urlencoded":p(`$request->setContentType(${wh(r.mimeType)});`),p(`$request->setPostFields(${wh(r.paramsObj,l)});`),u();break;case"application/json":p(`$request->setContentType(${wh(r.mimeType)});`),p(`$request->setBody(json_encode(${wh(r.jsonObj,l)}));`),u();break;default:(null==r?void 0:r.text)&&(p(`$request->setBody(${wh(r.text)});`),u())}return p("try {"),p("$response = $request->send();",1),u(),p("echo $response->getBody();",1),p("} catch (HttpException $ex) {"),p("echo $ex;",1),p("}"),!c&&a&&(u(),p("?>")),h()}},http2:{info:{key:"http2",title:"HTTP v2",link:"http://devel-m6w6.rhcloud.com/mdref/http",description:"PHP with pecl/http v2"},convert:({postData:e,headersObj:t,method:r,queryObj:n,cookiesObj:o,url:s},i={})=>{var a;const{closingTag:l=!1,indent:c=" ",noTags:d=!1,shortTags:p=!1}=i,{push:u,blank:h,join:f}=new Hu({indent:c});let m=!1;switch(d||(u(p?"<?":"<?php"),h()),u("$client = new http\\Client;"),u("$request = new http\\Client\\Request;"),h(),null==e?void 0:e.mimeType){case"application/x-www-form-urlencoded":u("$body = new http\\Message\\Body;"),u(`$body->append(new http\\QueryString(${wh(e.paramsObj,c)}));`),h(),m=!0;break;case"multipart/form-data":{if(!e.params)break;const r=[],n={};e.params.forEach(({name:e,fileName:t,value:o,contentType:s})=>{t?r.push({name:e,type:s,file:t,data:o}):o&&(n[e]=o)});const o=Object.keys(n).length?wh(n,c):"null",s=r.length?wh(r,c):"null";if(u("$body = new http\\Message\\Body;"),u(`$body->addForm(${o}, ${s});`),zu(t,"content-type")&&(null===(a=qu(t,"content-type"))||void 0===a?void 0:a.indexOf("boundary"))){const e=Mu(t,"content-type");e&&delete t[e]}h(),m=!0;break}case"application/json":u("$body = new http\\Message\\Body;"),u(`$body->append(json_encode(${wh(e.jsonObj,c)}));`),m=!0;break;default:(null==e?void 0:e.text)&&(u("$body = new http\\Message\\Body;"),u(`$body->append(${wh(e.text)});`),h(),m=!0)}return u(`$request->setRequestUrl(${wh(s)});`),u(`$request->setRequestMethod(${wh(r)});`),m&&(u("$request->setBody($body);"),h()),Object.keys(n).length&&(u(`$request->setQuery(new http\\QueryString(${wh(n,c)}));`),h()),Object.keys(t).length&&(u(`$request->setHeaders(${wh(t,c)});`),h()),Object.keys(o).length&&(h(),u(`$client->setCookies(${wh(o,c)});`),h()),u("$client->enqueue($request)->send();"),u("$response = $client->getResponse();"),h(),u("echo $response->getBody();"),!d&&l&&(h(),u("?>")),f()}}}},Sh=e=>({method:t,headersObj:r,cookies:n,uriObj:o,fullUrl:s,postData:i,allHeaders:a})=>{const{push:l,join:c}=new Hu;if(!["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"].includes(t.toUpperCase()))return"Method not supported";const d=[],p=Object.keys(r);return p.length&&(l("$headers=@{}"),p.forEach(e=>{"connection"!==e&&l(`$headers.Add("${e}", "${Fu(r[e],{escapeChar:"`"})}")`)}),d.push("-Headers $headers")),n.length&&(l("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"),n.forEach(e=>{l("$cookie = New-Object System.Net.Cookie"),l(`$cookie.Name = '${e.name}'`),l(`$cookie.Value = '${e.value}'`),l(`$cookie.Domain = '${o.host}'`),l("$session.Cookies.Add($cookie)")}),d.push("-WebSession $session")),(null==i?void 0:i.text)&&(d.push(`-ContentType '${Fu(qu(a,"content-type"),{delimiter:"'",escapeChar:"`"})}'`),d.push(`-Body '${i.text}'`)),l(`$response = ${e} -Uri '${s}' -Method ${t} ${d.join(" ")}`),c()},Oh={info:{key:"restmethod",title:"Invoke-RestMethod",link:"https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Utility/Invoke-RestMethod",description:"Powershell Invoke-RestMethod client"},convert:Sh("Invoke-RestMethod")},jh={info:{key:"webrequest",title:"Invoke-WebRequest",link:"https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Utility/Invoke-WebRequest",description:"Powershell Invoke-WebRequest client"},convert:Sh("Invoke-WebRequest")};function Ph(e,t,r,n,o){const s=n.repeat(o),i=n.repeat(o-1),a=r?`,\n${s}`:", ",l="object"===e?"{":"[",c="object"===e?"}":"]";return r?`${l}\n${s}${t.join(a)}\n${i}${c}`:"object"===e&&t.length>0?`${l} ${t.join(a)} ${c}`:`${l}${t.join(a)}${c}`}const Eh=(e,t,r)=>{switch(r=void 0===r?1:r+1,Object.prototype.toString.call(e)){case"[object Number]":return e;case"[object Array]":{let n=!1;return Ph("array",e.map(e=>("[object Object]"===Object.prototype.toString.call(e)&&(n=Object.keys(e).length>1),Eh(e,t,r))),n,t.indent,r)}case"[object Object]":{const n=[];for(const o in e)n.push(`"${o}": ${Eh(e[o],t,r)}`);return Ph("object",n,t.pretty&&n.length>1,t.indent,r)}case"[object Null]":return"None";case"[object Boolean]":return e?"True":"False";default:return null==e?"":`"${e.toString().replace(/"/g,'\\"')}"`}},Th=["HEAD","GET","POST","PUT","PATCH","DELETE","OPTIONS"],Ah=(e="")=>/^[a-z0-9-_/.@%^=:]+$/i.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`,Ch={"http1.0":"0","url ":"",cookie:"b",data:"d",form:"F",globoff:"g",header:"H",insecure:"k",request:"X"},Ih=(e,t)=>t.repeat(e),Rh=(e,t,r,n)=>{const o=Ih(n,r),s=Ih(n-1,r),i=t?`,\n${o}`:", ";return t?`[\n${o}${e.join(i)}\n${s}]`:`[${e.join(i)}]`},Nh=(e,t,r)=>`let ${e} = ${Mh(t,r)}`,Mh=(e,t,r)=>{switch(r=void 0===r?1:r+1,Object.prototype.toString.call(e)){case"[object Number]":return e;case"[object Array]":{let n=!1;const o=e.map(e=>("[object Object]"===Object.prototype.toString.call(e)&&(n=Object.keys(e).length>1),Mh(e,t,r)));return Rh(o,n,t.indent,r)}case"[object Object]":{const n=[];for(const o in e)n.push(`"${o}": ${Mh(e[o],t,r)}`);return Rh(n,t.pretty&&n.length>1,t.indent,r)}case"[object Boolean]":return e.toString();default:return null==e?"":`"${e.toString().replace(/"/g,'\\"')}"`}},qh={c:Ju,clojure:th,csharp:rh,go:nh,http:oh,java:sh,javascript:mh,kotlin:gh,node:yh,objc:$h,ocaml:xh,php:kh,powershell:{info:{key:"powershell",title:"Powershell",extname:".ps1",default:"webrequest"},clientsById:{webrequest:jh,restmethod:Oh}},python:{info:{key:"python",title:"Python",extname:".py",default:"python3"},clientsById:{python3:{info:{key:"python3",title:"http.client",link:"https://docs.python.org/3/library/http.client.html",description:"Python3 HTTP Client"},convert:({uriObj:{path:e,protocol:t,host:r},postData:n,allHeaders:o,method:s},i={})=>{const{insecureSkipVerify:a=!1}=i,{push:l,blank:c,join:d}=new Hu;if(l("import http.client"),a&&l("import ssl"),c(),"https:"===t){l(`conn = http.client.HTTPSConnection("${r}"${a?", context = ssl._create_unverified_context()":""})`),c()}else l(`conn = http.client.HTTPConnection("${r}")`),c();const p=JSON.stringify(null==n?void 0:n.text);p&&(l(`payload = ${p}`),c());const u=o,h=Object.keys(u).length;if(1===h)for(const f in u)l(`headers = { '${f}': "${Gu(u[f])}" }`),c();else if(h>1){let e=1;l("headers = {");for(const t in u)e++!==h?l(` '${t}': "${Gu(u[t])}",`):l(` '${t}': "${Gu(u[t])}"`);l("}"),c()}return l(p&&h?`conn.request("${s}", "${e}", payload, headers)`:p&&!h?`conn.request("${s}", "${e}", payload)`:!p&&h?`conn.request("${s}", "${e}", headers=headers)`:`conn.request("${s}", "${e}")`),c(),l("res = conn.getresponse()"),l("data = res.read()"),c(),l('print(data.decode("utf-8"))'),d()}},requests:{info:{key:"requests",title:"Requests",link:"http://docs.python-requests.org/en/latest/api/#requests.request",description:"Requests HTTP library"},convert:({queryObj:e,url:t,postData:r,allHeaders:n,method:o},s)=>{const i={indent:" ",pretty:!0,...s},{push:a,blank:l,join:c}=new Hu({indent:i.indent});let d;a("import requests"),l(),a(`url = "${t}"`),l(),Object.keys(e).length&&(d=`querystring = ${JSON.stringify(e)}`,a(d),l());const p=n;let u={};const h={};let f=!1,m=!1,g=!1;switch(null==r?void 0:r.mimeType){case"application/json":r.jsonObj&&(a(`payload = ${Eh(r.jsonObj,i)}`),g=!0,m=!0);break;case"multipart/form-data":if(!r.params)break;if(u={},r.params.forEach(e=>{e.fileName?(h[e.name]=`open('${e.fileName}', 'rb')`,f=!0):(u[e.name]=e.value,m=!0)}),f){a(`files = ${Eh(h,i)}`),m&&a(`payload = ${Eh(u,i)}`);const e=Mu(p,"content-type");e&&delete p[e]}else{const e=JSON.stringify(r.text);e&&(a(`payload = ${e}`),m=!0)}break;default:{if(!r)break;if("application/x-www-form-urlencoded"===r.mimeType&&r.paramsObj){a(`payload = ${Eh(r.paramsObj,i)}`),m=!0;break}const e=JSON.stringify(r.text);e&&(a(`payload = ${e}`),m=!0)}}const y=Object.keys(p).length;if(0===y&&(m||f))l();else if(1===y)for(const b in p)a(`headers = {"${b}": "${Gu(p[b])}"}`),l();else if(y>1){let e=1;a("headers = {");for(const t in p)a(e!==y?`"${t}": "${Gu(p[t])}",`:`"${t}": "${Gu(p[t])}"`,1),e+=1;a("}"),l()}let v=Th.includes(o)?`response = requests.${o.toLowerCase()}(url`:`response = requests.request("${o}", url`;return m&&(v+=g?", json=payload":", data=payload"),f&&(v+=", files=files"),y>0&&(v+=", headers=headers"),d&&(v+=", params=querystring"),v+=")",a(v),l(),a("print(response.json())"),c()}}}},r:{info:{key:"r",title:"R",extname:".r",default:"httr"},clientsById:{httr:{info:{key:"httr",title:"httr",link:"https://cran.r-project.org/web/packages/httr/vignettes/quickstart.html",description:"httr: Tools for Working with URLs and HTTP"},convert:({url:e,queryObj:t,queryString:r,postData:n,allHeaders:o,method:s},i={})=>{var a,l;const{push:c,blank:d,join:p}=new Hu({indent:null!==(a=i.indent)&&void 0!==a?a:" "});c("library(httr)"),d(),c(`url <- "${e}"`),d();const u=t;delete t.key;const h=Object.entries(u),f=h.length;if(1===f){const e=h[0];c(`queryString <- list(${e[0]} = "${e[1]}")`),d()}else f>1&&(c("queryString <- list("),h.forEach(([e,t],r)=>{c(`${e} = "${t}"${r!==f-1?",":""}`,1)}),c(")"),d());const m=JSON.stringify(null==n?void 0:n.text);if(m&&(c(`payload <- ${m}`),d()),n&&(n.text||n.jsonObj||n.params))switch(n.mimeType){case"application/x-www-form-urlencoded":c('encode <- "form"'),d();break;case"application/json":c('encode <- "json"'),d();break;case"multipart/form-data":c('encode <- "multipart"'),d();break;default:c('encode <- "raw"'),d()}const g=qu(o,"cookie"),y=qu(o,"accept"),v=g?`set_cookies(\`${String(g).replace(/;/g,'", `').replace(/` /g,"`").replace(/[=]/g,'` = "')}")`:void 0,b=y?`accept("${Gu(y)}")`:void 0,$=`content_type("${Gu(null!==(l=null==n?void 0:n.mimeType)&&void 0!==l?l:"application/octet-stream")}")`,x=Object.entries(o).filter(([e])=>!["cookie","accept","content-type"].includes(e.toLowerCase())).map(([e,t])=>`'${e}' = '${Vu(t)}'`).join(", "),w=x?`add_headers(${x})`:void 0;let _=`response <- VERB("${s}", url`;m&&(_+=", body = payload"),r.length&&(_+=", query = queryString");const k=[w,$,b,v].filter(e=>!!e).join(", ");return k&&(_+=`, ${k}`),n&&(n.text||n.jsonObj||n.params)&&(_+=", encode = encode"),_+=")",c(_),d(),c('content(response, "text")'),p()}}}},ruby:{info:{key:"ruby",title:"Ruby",extname:".rb",default:"native"},clientsById:{native:{info:{key:"native",title:"net::http",link:"http://ruby-doc.org/stdlib-2.2.1/libdoc/net/http/rdoc/Net/HTTP.html",description:"Ruby HTTP client"},convert:({uriObj:e,method:t,fullUrl:r,postData:n,allHeaders:o},s={})=>{const{insecureSkipVerify:i=!1}=s,{push:a,blank:l,join:c}=new Hu;a("require 'uri'"),a("require 'net/http'"),l();const d=t.toUpperCase(),p=d.charAt(0)+d.substring(1).toLowerCase();["GET","POST","HEAD","DELETE","PATCH","PUT","OPTIONS","COPY","LOCK","UNLOCK","MOVE","TRACE"].includes(d)||(a(`class Net::HTTP::${p} < Net::HTTPRequest`),a(` METHOD = '${d.toUpperCase()}'`),a(` REQUEST_HAS_BODY = '${(null==n?void 0:n.text)?"true":"false"}'`),a(" RESPONSE_HAS_BODY = true"),a("end"),l()),a(`url = URI("${r}")`),l(),a("http = Net::HTTP.new(url.host, url.port)"),"https:"===e.protocol&&(a("http.use_ssl = true"),i&&a("http.verify_mode = OpenSSL::SSL::VERIFY_NONE")),l(),a(`request = Net::HTTP::${p}.new(url)`);const u=Object.keys(o);return u.length&&u.forEach(e=>{a(`request["${e}"] = '${Vu(o[e])}'`)}),(null==n?void 0:n.text)&&a(`request.body = ${JSON.stringify(n.text)}`),l(),a("response = http.request(request)"),a("puts response.read_body"),c()}}}},shell:{info:{key:"shell",title:"Shell",extname:".sh",default:"curl"},clientsById:{curl:{info:{key:"curl",title:"cURL",link:"http://curl.haxx.se/",description:"cURL is a command line tool and library for transferring data with URL syntax"},convert:({fullUrl:e,method:t,httpVersion:r,headersObj:n,allHeaders:o,postData:s},i={})=>{var a;const{binary:l=!1,globOff:c=!1,indent:d=" ",insecureSkipVerify:p=!1,prettifyJson:u=!1,short:h=!1}=i,{push:f,join:m}=new Hu({..."string"==typeof d?{indent:d}:{},join:!1!==d?` \\\n${d}`:" "}),g=(e=>t=>{if(e){const e=Ch[t];return e?`-${e}`:""}return`--${t}`})(h);let y=Ah(e);if(f(`curl ${g("request")} ${t}`),c&&(y=unescape(y),f(g("globoff"))),f(`${g("url ")}${y}`),p&&f(g("insecure")),"HTTP/1.0"===r&&f(g("http1.0")),qu(o,"accept-encoding")&&f("--compressed"),"multipart/form-data"===(null==s?void 0:s.mimeType)){const e=Mu(n,"content-type");if(e){const t=n[e];if(e&&t){const r=t.replace(/; boundary.+?(?=(;|$))/,"");n[e]=r,o[e]=r}}}switch(Object.keys(n).sort().forEach(e=>{const t=`${e}: ${n[e]}`;f(`${g("header")} ${Ah(t)}`)}),o.cookie&&f(`${g("cookie")} ${Ah(o.cookie)}`),null==s?void 0:s.mimeType){case"multipart/form-data":null===(a=s.params)||void 0===a||a.forEach(e=>{let t="";t=e.fileName?`${e.name}=@${e.fileName}`:`${e.name}=${e.value}`,f(`${g("form")} ${Ah(t)}`)});break;case"application/x-www-form-urlencoded":s.params?s.params.forEach(e=>{const t=e.name,r=encodeURIComponent(e.name),n=r!==t;f(`${l?"--data-binary":"--data"+(n?"-urlencode":"")} ${Ah(`${n?r:t}=${e.value}`)}`)}):f(`${l?"--data-binary":g("data")} ${Ah(s.text)}`);break;default:{if(!s)break;if(!s.text)break;const e=l?"--data-binary":g("data");let t=!1;if(v=s.mimeType,Lu.some(e=>v.includes(e))){if(s.text.length>2&&u)try{const r=JSON.parse(s.text);t=!0;const n=JSON.stringify(r,void 0,d);s.text.indexOf("'")>0?f(`${e} @- <<EOF\n${n}\nEOF`):f(`${e} '\n${n}\n'`)}catch(b){}}t||f(`${e} ${Ah(s.text)}`)}}var v;return m()}},httpie:{info:{key:"httpie",title:"HTTPie",link:"http://httpie.org/",description:"a CLI, cURL-like tool for humans"},convert:({allHeaders:e,postData:t,queryObj:r,fullUrl:n,method:o,url:s},i)=>{const a={body:!1,cert:!1,headers:!1,indent:" ",pretty:!1,print:!1,queryParams:!1,short:!1,style:!1,timeout:!1,verbose:!1,verify:!1,...i},{push:l,join:c,unshift:d}=new Hu({indent:a.indent,join:!1!==a.indent?` \\\n${a.indent}`:" "});let p=!1;const u=[];a.headers&&u.push(a.short?"-h":"--headers"),a.body&&u.push(a.short?"-b":"--body"),a.verbose&&u.push(a.short?"-v":"--verbose"),a.print&&u.push(`${a.short?"-p":"--print"}=${a.print}`),a.verify&&u.push(`--verify=${a.verify}`),a.cert&&u.push(`--cert=${a.cert}`),a.pretty&&u.push(`--pretty=${a.pretty}`),a.style&&u.push(`--style=${a.style}`),a.timeout&&u.push(`--timeout=${a.timeout}`),a.queryParams&&Object.keys(r).forEach(e=>{const t=r[e];Array.isArray(t)?t.forEach(t=>{l(`${e}==${Ah(t)}`)}):l(`${e}==${Ah(t)}`)}),Object.keys(e).sort().forEach(t=>{l(`${t}:${Ah(e[t])}`)}),"application/x-www-form-urlencoded"===(null==t?void 0:t.mimeType)?t.params&&t.params.length&&(u.push(a.short?"-f":"--form"),t.params.forEach(e=>{l(`${e.name}=${Ah(e.value)}`)})):p=!0;if(d(`http ${u.length?`${u.join(" ")} `:""}${o} ${s=Ah(a.queryParams?s:n)}`),p&&(null==t?void 0:t.text)){d(`echo ${Ah(t.text)} | `)}return c()}},wget:{info:{key:"wget",title:"Wget",link:"https://www.gnu.org/software/wget/",description:"a free software package for retrieving files using HTTP, HTTPS"},convert:({method:e,postData:t,allHeaders:r,fullUrl:n},o)=>{const s={indent:" ",short:!1,verbose:!1,...o},{push:i,join:a}=new Hu({indent:s.indent,join:!1!==s.indent?` \\\n${s.indent}`:" "});var l;return s.verbose?i("wget "+(s.short?"-v":"--verbose")):i("wget "+(s.short?"-q":"--quiet")),i(`--method ${Ah(e)}`),Object.keys(r).forEach(e=>{const t=`${e}: ${r[e]}`;i(`--header ${Ah(t)}`)}),(null==t?void 0:t.text)&&i(`--body-data ${l=Ah(t.text),l.replace(/\r/g,"\\r").replace(/\n/g,"\\n")}`),i(s.short?"-O":"--output-document"),i(`- ${Ah(n)}`),a()}}}},swift:{info:{key:"swift",title:"Swift",extname:".swift",default:"nsurlsession"},clientsById:{nsurlsession:{info:{key:"nsurlsession",title:"NSURLSession",link:"https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLSession_class/index.html",description:"Foundation's NSURLSession request"},convert:({allHeaders:e,postData:t,fullUrl:r,method:n},o)=>{var s;const i={indent:" ",pretty:!0,timeout:"10",...o},{push:a,blank:l,join:c}=new Hu({indent:i.indent}),d={hasHeaders:!1,hasBody:!1};if(a("import Foundation"),Object.keys(e).length&&(d.hasHeaders=!0,l(),a(Nh("headers",e,i))),t&&(t.text||t.jsonObj||t.params))switch(d.hasBody=!0,t.mimeType){case"application/x-www-form-urlencoded":if(l(),null===(s=t.params)||void 0===s?void 0:s.length){const[e,...r]=t.params;a(`let postData = NSMutableData(data: "${e.name}=${e.value}".data(using: String.Encoding.utf8)!)`),r.forEach(({name:e,value:t})=>{a(`postData.append("&${e}=${t}".data(using: String.Encoding.utf8)!)`)})}else d.hasBody=!1;break;case"application/json":t.jsonObj&&(a(`${Nh("parameters",t.jsonObj,i)} as [String : Any]`),l(),a("let postData = JSONSerialization.data(withJSONObject: parameters, options: [])"));break;case"multipart/form-data":a(Nh("parameters",t.params,i)),l(),a(`let boundary = "${t.boundary}"`),l(),a('var body = ""'),a("var error: NSError? = nil"),a("for param in parameters {"),a('let paramName = param["name"]!',1),a('body += "--\\(boundary)\\r\\n"',1),a('body += "Content-Disposition:form-data; name=\\"\\(paramName)\\""',1),a('if let filename = param["fileName"] {',1),a('let contentType = param["content-type"]!',2),a("let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)",2),a("if (error != nil) {",2),a("print(error as Any)",3),a("}",2),a('body += "; filename=\\"\\(filename)\\"\\r\\n"',2),a('body += "Content-Type: \\(contentType)\\r\\n\\r\\n"',2),a("body += fileContent",2),a('} else if let paramValue = param["value"] {',1),a('body += "\\r\\n\\r\\n\\(paramValue)"',2),a("}",1),a("}");break;default:l(),a(`let postData = NSData(data: "${t.text}".data(using: String.Encoding.utf8)!)`)}return l(),a(`let request = NSMutableURLRequest(url: NSURL(string: "${r}")! as URL,`),a(" cachePolicy: .useProtocolCachePolicy,"),a(` timeoutInterval: ${parseInt(i.timeout,10).toFixed(1)})`),a(`request.httpMethod = "${n}"`),d.hasHeaders&&a("request.allHTTPHeaderFields = headers"),d.hasBody&&a("request.httpBody = postData as Data"),l(),a("let session = URLSession.shared"),a("let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in"),a("if (error != nil) {",1),a("print(error as Any)",2),a("} else {",1),a("let httpResponse = response as? HTTPURLResponse",2),a("print(httpResponse)",2),a("}",1),a("})"),l(),a("dataTask.resume()"),c()}}}}};class zh{constructor(e){let t=[];var r;t="object"==typeof(r=e)&&"log"in r&&"object"==typeof r.log&&"entries"in r.log&&Array.isArray(r.log.entries)?e.log.entries:[{request:e}],this.requests=Promise.all(t.map(({request:e})=>{var t;const r={bodySize:0,headersSize:0,headers:[],cookies:[],httpVersion:"HTTP/1.1",queryString:[],postData:{mimeType:(null===(t=e.postData)||void 0===t?void 0:t.mimeType)||"application/octet-stream"},...e};return this.prepare(r)}))}async prepare(e){var t,r,n,o;const s={...e,fullUrl:"",queryObj:{},headersObj:{},cookiesObj:{},allHeaders:{}};if(s.queryString&&s.queryString.length&&(s.queryObj=s.queryString.reduce(Uu,{})),s.headers&&s.headers.length){const e=/^HTTP\/2/;s.headersObj=s.headers.reduce((t,{name:r,value:n})=>{const o=e.exec(s.httpVersion)?r.toLocaleLowerCase():r;return{...t,[o]:n}},{})}s.cookies&&s.cookies.length&&(s.cookiesObj=s.cookies.reduceRight((e,{name:t,value:r})=>({...e,[t]:r}),{}));const i=null===(t=s.cookies)||void 0===t?void 0:t.map(({name:e,value:t})=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`);switch((null==i?void 0:i.length)&&(s.allHeaders.cookie=i.join("; ")),null===(r=s.postData)||void 0===r?void 0:r.mimeType){case"multipart/mixed":case"multipart/related":case"multipart/form-data":case"multipart/alternative":if(s.postData.text="",s.postData.mimeType="multipart/form-data",null===(n=s.postData)||void 0===n?void 0:n.params){const e=new Pu,t="---011000010111000001101001";null===(o=s.postData)||void 0===o||o.params.forEach(t=>{const r=t.name,n=t.value||"",o=t.fileName;var s;"object"==typeof(s=n)&&"function"==typeof s.arrayBuffer&&"string"==typeof s.type&&"function"==typeof s.stream&&"function"==typeof s.constructor&&/^(Blob|File)$/.test(s[Iu])?e.append(r,n,o):e.append(r,new Eu([n],{type:t.contentType}),o?function(e){const t=e.split("/");return t[t.length-1]}(o):o)});const{postData:r}=s;for await(const o of Nu(e,t))r.text+=o;s.postData.boundary=t;const n=Mu(s.headersObj,"content-type")||"content-type";s.headersObj[n]=`multipart/form-data; boundary=${t}`}break;case"application/x-www-form-urlencoded":s.postData.params?(s.postData.paramsObj=s.postData.params.reduce(Uu,{}),s.postData.text=Du(s.postData.paramsObj).toString()):s.postData.text="";break;case"text/json":case"text/x-json":case"application/json":case"application/x-json":if(s.postData.mimeType="application/json",s.postData.text)try{s.postData.jsonObj=JSON.parse(s.postData.text)}catch(u){s.postData.mimeType="text/plain"}}const a={...s.allHeaders,...s.headersObj},l=new URL(s.url),c=Object.fromEntries(l.searchParams);s.queryObj={...s.queryObj,...c};const d=Du(s.queryObj),p=new URL(s.url);return p.search=d.toString(),l.search="",{...s,allHeaders:a,fullUrl:p.toString(),url:l.toString(),uriObj:new Bu(p.toString())}}async convert(e,t,r){!r&&t&&(r=t);const n=qh[e];if(!n)return null;const{convert:o}=n.clientsById[t||n.info.default],s=(await this.requests).map(e=>o(e,r));return 1===s.length?s[0]:s}}var Lh=Object.defineProperty,Uh=Object.getOwnPropertyDescriptor,Dh=(e,t,r,n)=>{for(var o,s=n>1?void 0:n?Uh(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&Lh(t,r,s),s};const Bh=[{id:"curl",label:"cURL",target:"shell",client:"curl"},{id:"javascript",label:"JavaScript",target:"javascript",client:"fetch"},{id:"python",label:"Python",target:"python",client:"requests"},{id:"node",label:"Node.js",target:"node",client:"fetch"},{id:"go",label:"Go",target:"go",client:"native"},{id:"java",label:"Java",target:"java",client:"okhttp"},{id:"php",label:"PHP",target:"php",client:"guzzle"},{id:"ruby",label:"Ruby",target:"ruby",client:"native"},{id:"csharp",label:"C#",target:"csharp",client:"httpclient"}],Hh={curl:oe`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
1152
1661
|
<rect x="1" y="2" width="14" height="12" rx="2"/>
|
|
1153
1662
|
<path d="M4 7l3 2-3 2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1154
1663
|
<path d="M9 11h3" stroke-linecap="round"/>
|
|
@@ -1183,9 +1692,9 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
1183
1692
|
</svg>`,csharp:oe`<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
|
|
1184
1693
|
<rect width="16" height="16" rx="2" fill="currentColor" opacity="0.15"/>
|
|
1185
1694
|
<text x="2" y="12.5" font-size="10" font-weight="700" font-family="system-ui" fill="currentColor">C#</text>
|
|
1186
|
-
</svg>`},zf=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),Uf=/^'(?:[^'\\]|\\.)*'/,Lf=/^"(?:[^"\\]|\\.)*"/,Df=/^\/\*[\s\S]*?\*\//,Bf=/^\/\/[^\n]*/,Hf=/^#[^\n]*/,Ff=/^\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b/,Vf=/^[a-zA-Z_$][\w$]*(?=\s*\()/,Jf=/^\b[A-Z][a-zA-Z0-9_]*\b/,Wf=e=>new RegExp("^\\b("+e+")\\b"),Gf={curl:[[Hf,"hl-cmt"],[Uf,"hl-str"],[Lf,"hl-str"],[/^https?:\/\/[^\s'">) \\]+/,"hl-url"],[/^--?[a-zA-Z][\w-]*/,"hl-flag"],[Wf("curl|wget|echo|export|set|bash|sh|cat|grep|env|printf"),"hl-kw"],[/^\$\{?[A-Za-z_]\w*\}?/,"hl-var"],[Ff,"hl-num"]],javascript:[[Df,"hl-cmt"],[Bf,"hl-cmt"],[/^`(?:[^`\\]|\\.)*`/,"hl-str"],[Uf,"hl-str"],[Lf,"hl-str"],[Wf("const|let|var|function|return|async|await|if|else|for|while|class|new|import|from|export|default|try|catch|finally|throw|of|in|typeof|instanceof|null|undefined|true|false|this|switch|case|break|continue|delete|void|do|yield|static|super|extends"),"hl-kw"],[Wf("console|JSON|Promise|fetch|Response|Request|URL|Headers|Object|Array|String|Number|Boolean|Math|Date|Error|require|module|exports|process|Buffer|globalThis"),"hl-type"],[Ff,"hl-num"],[Vf,"hl-fn"]],python:[[/^"""[\s\S]*?"""/,"hl-str"],[/^'''[\s\S]*?'''/,"hl-str"],[Hf,"hl-cmt"],[/^[fFrRbB]?'(?:[^'\\]|\\.)*'/,"hl-str"],[/^[fFrRbB]?"(?:[^"\\]|\\.)*"/,"hl-str"],[Wf("import|from|def|class|return|if|elif|else|for|while|with|as|try|except|finally|raise|pass|break|continue|and|or|not|in|is|None|True|False|lambda|yield|global|nonlocal|del|assert|async|await"),"hl-kw"],[Wf("print|len|range|str|int|float|bool|list|dict|tuple|set|requests|json|os|sys|re|super|type|object|Exception|ValueError|TypeError|AttributeError"),"hl-type"],[Ff,"hl-num"],[Vf,"hl-fn"],[Jf,"hl-cls"]],go:[[Df,"hl-cmt"],[Bf,"hl-cmt"],[/^`[^`]*`/,"hl-str"],[Lf,"hl-str"],[Wf("package|import|func|var|const|type|struct|interface|return|if|else|for|range|go|defer|select|case|default|break|continue|switch|map|chan|make|new|nil|true|false|append|len|cap|delete|copy|close|panic|recover"),"hl-kw"],[Wf("string|int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float32|float64|bool|byte|rune|error|any|uintptr"),"hl-type"],[Ff,"hl-num"],[Vf,"hl-fn"],[Jf,"hl-cls"]],java:[[Df,"hl-cmt"],[Bf,"hl-cmt"],[Lf,"hl-str"],[Wf("public|private|protected|static|final|abstract|class|interface|enum|extends|implements|return|if|else|for|while|do|try|catch|finally|throw|throws|new|this|super|import|package|void|null|true|false|instanceof|switch|case|default|break|continue|synchronized|volatile"),"hl-kw"],[Wf("String|Integer|Long|Double|Float|Boolean|Object|List|Map|Set|ArrayList|HashMap|HttpClient|HttpRequest|HttpResponse|Response|Request|URI|URL|System|Math|Arrays|Collections|Optional|Stream|StringBuilder"),"hl-type"],[/^@[a-zA-Z]+/,"hl-att"],[/^\b\d+(?:\.\d+)?[LlDdFf]?\b/,"hl-num"],[Vf,"hl-fn"],[Jf,"hl-cls"]],php:[[Df,"hl-cmt"],[/^(?:\/\/|#)[^\n]*/,"hl-cmt"],[Uf,"hl-str"],[Lf,"hl-str"],[Wf("use|namespace|class|interface|trait|extends|implements|public|private|protected|static|final|function|return|if|else|elseif|for|foreach|while|do|switch|case|default|break|continue|try|catch|finally|throw|new|echo|print|null|true|false|NULL|TRUE|FALSE|array|match|fn|yield|readonly|enum"),"hl-kw"],[/^\$[a-zA-Z_][a-zA-Z0-9_]*/,"hl-var"],[Ff,"hl-num"],[Vf,"hl-fn"],[Jf,"hl-cls"]],ruby:[[Hf,"hl-cmt"],[Uf,"hl-str"],[Lf,"hl-str"],[Wf("require|require_relative|include|extend|def|class|module|end|if|elsif|else|unless|while|until|for|do|return|yield|begin|rescue|ensure|raise|then|when|case|nil|true|false|self|super|puts|print|p|pp|lambda|proc|attr_accessor|attr_reader|attr_writer"),"hl-kw"],[/^:[a-zA-Z_][a-zA-Z0-9_?!]*/,"hl-sym"],[/^@{1,2}[a-zA-Z_][a-zA-Z0-9_]*/,"hl-var"],[Ff,"hl-num"],[/^[a-zA-Z_][a-zA-Z0-9_?!]*(?=\s*\()/,"hl-fn"],[Jf,"hl-cls"]],csharp:[[Df,"hl-cmt"],[Bf,"hl-cmt"],[/^@"[^"]*"/,"hl-str"],[Lf,"hl-str"],[Wf("using|namespace|class|interface|struct|enum|record|abstract|sealed|override|virtual|partial|public|private|protected|internal|static|readonly|const|new|return|if|else|for|foreach|while|do|switch|case|default|break|continue|try|catch|finally|throw|this|base|null|true|false|var|dynamic|async|await|in|out|ref|params|is|as|typeof|sizeof|nameof"),"hl-kw"],[Wf("string|int|long|double|float|decimal|bool|byte|char|object|void|Task|List|Dictionary|HashSet|IEnumerable|HttpClient|HttpResponseMessage|StringContent|Uri|Console|Math|String|Array|Exception"),"hl-type"],[/^\b\d+(?:\.\d+)?(?:[mMlLdDfFuU])?\b/,"hl-num"],[Vf,"hl-fn"],[Jf,"hl-cls"]],json:[[/^"(?:[^"\\]|\\.)*"(?=\s*:)/,"hl-key"],[Lf,"hl-str"],[Wf("true|false|null"),"hl-kw"],[/^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/,"hl-num"]]},Kf={node:"javascript",shell:"curl",bash:"curl",sh:"curl",js:"javascript",ts:"javascript",typescript:"javascript",py:"python",golang:"go",rb:"ruby","c#":"csharp",cs:"csharp",dotnet:"csharp"};let Zf=class extends xe{constructor(){super(...arguments),this.servers=[],this.authState={apiKeys:{},bearerTokens:{}},this.securitySchemes=[],this._activeTab=0,this._snippets=new Map,this._copied=!1,this._overflowStart=1/0,this._moreOpen=!1,this._allTabs=[],this._tabNaturalWidths=[],this._prevOperation=null,this._dropdownPortal=null,this._docClickHandler=null}disconnectedCallback(){var e;super.disconnectedCallback(),null==(e=this._ro)||e.disconnect(),this._ro=void 0,this._closeDropdownPortal()}async willUpdate(){this.operation&&(this._allTabs=[...Mf.map(e=>({id:e.id,label:e.label,isSpec:!1})),...this.operation.codeSamples.map(e=>({id:`spec:${e.lang}`,label:e.label,isSpec:!0}))],0===this._snippets.size&&await this._generateSnippets())}updated(e){e.has("operation")&&this.operation!==this._prevOperation&&(this._prevOperation=this.operation,this._tabNaturalWidths=[],this._overflowStart=1/0);(0===this._tabNaturalWidths.length||this._tabNaturalWidths.length!==this._allTabs.length)&&this._allTabs.length>0&&(this._tabNaturalWidths=[],requestAnimationFrame(()=>this._measureTabWidths()))}_measureTabWidths(){var e,t;const r=null==(e=this.shadowRoot)?void 0:e.querySelector(".tabs-measure");if(!r)return;const n=Array.from(r.querySelectorAll(".tab"));if(this._tabNaturalWidths=n.map(e=>e.getBoundingClientRect().width),!this._ro){const e=null==(t=this.shadowRoot)?void 0:t.querySelector(".tabs");e&&(this._ro=new ResizeObserver(()=>this._recomputeOverflow()),this._ro.observe(e))}this._recomputeOverflow()}_recomputeOverflow(){var e;const t=null==(e=this.shadowRoot)?void 0:e.querySelector(".tabs");if(!t||0===this._tabNaturalWidths.length)return;const r=t.getBoundingClientRect().width;if(this._tabNaturalWidths.reduce((e,t)=>e+t,0)<=r)return void(this._overflowStart!==this._tabNaturalWidths.length&&(this._overflowStart=this._tabNaturalWidths.length));const n=r-80;let o=0,s=0;for(let i=0;i<this._tabNaturalWidths.length;i++){if(o+=this._tabNaturalWidths[i],o>n){s=i;break}s=i+1}s!==this._overflowStart&&(this._overflowStart=s)}_toggleMore(e){e.stopPropagation(),this._dropdownPortal?this._closeDropdownPortal():this._openDropdownPortal(e.currentTarget)}_openDropdownPortal(e){this._closeDropdownPortal();const t=e.getBoundingClientRect(),r=document.createElement("div");Object.assign(r.style,{position:"fixed",top:`${t.bottom+4}px`,right:`${Math.round(window.innerWidth-t.right)}px`,zIndex:"2147483647",background:"#1c2128",border:"1px solid #30363d",borderRadius:"6px",padding:"4px",minWidth:"148px",boxShadow:"0 8px 24px rgba(0,0,0,0.5)",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:"0.75rem"}),this._allTabs.slice(this._overflowStart).forEach((e,t)=>{const n=this._overflowStart+t,o=n===this._activeTab,s=document.createElement("button");s.textContent=e.label+(e.isSpec?" ✦":""),Object.assign(s.style,{display:"block",width:"100%",padding:"6px 10px",borderRadius:"4px",fontSize:"0.75rem",fontWeight:"500",color:o?"#e6edf3":"#8b949e",whiteSpace:"nowrap",cursor:"pointer",background:o?"rgba(88,166,255,0.12)":"transparent",border:"none",textAlign:"left",boxSizing:"border-box",fontFamily:"inherit"}),s.addEventListener("mouseenter",()=>{n!==this._activeTab&&(s.style.color="#e6edf3",s.style.background="rgba(255,255,255,0.06)")}),s.addEventListener("mouseleave",()=>{n!==this._activeTab&&(s.style.color="#8b949e",s.style.background="transparent")}),s.addEventListener("click",e=>{e.stopPropagation(),this._activeTab=n,this._copied=!1,this._closeDropdownPortal()}),r.appendChild(s)}),document.body.appendChild(r),this._dropdownPortal=r,this._moreOpen=!0;const n=e=>{"scroll"!==e.type&&r.contains(e.target)||this._closeDropdownPortal()};setTimeout(()=>{document.addEventListener("click",n,{capture:!0}),document.addEventListener("scroll",n,{capture:!0,once:!0}),this._docClickHandler=n},0)}_closeDropdownPortal(){this._dropdownPortal&&(this._dropdownPortal.remove(),this._dropdownPortal=null),this._docClickHandler&&(document.removeEventListener("click",this._docClickHandler,{capture:!0}),document.removeEventListener("scroll",this._docClickHandler,{capture:!0}),this._docClickHandler=null),this._moreOpen&&(this._moreOpen=!1)}_onRootClick(e){}async _generateSnippets(){const e=this._buildHar(),t=new Map;for(const r of this.operation.codeSamples)t.set(`spec:${r.lang}`,r.source);try{const r=new Cf(e);for(const e of Mf)try{const n=await r.convert(e.target,e.client);n&&"string"==typeof n?t.set(e.id,n):Array.isArray(n)&&n.length>0&&t.set(e.id,n[0])}catch{t.set(e.id,`// Failed to generate ${e.label} snippet`)}}catch{for(const e of Mf)t.set(e.id,"// Failed to generate snippet")}this._snippets=t}_buildHar(){const e=(this.operation.servers.length>0?this.operation.servers:this.servers)[0];let t=(null==e?void 0:e.url)??"";if(e)for(const[l,c]of Object.entries(e.variables))t=t.replace(`{${l}}`,c.default);let r=this.operation.path;for(const l of this.operation.parameters.filter(e=>"path"===e.in)){const e=void 0!==l.example?String(l.example):`{${l.name}}`;r=r.replace(`{${l.name}}`,e)}const n=`${t}${r}`,o=this.operation.parameters.filter(e=>"query"===e.in&&void 0!==e.example).map(e=>({name:e.name,value:String(e.example)})),s=[],i=this.operation.security[0];if(i)for(const l of Object.keys(i)){const e=this.securitySchemes.find(e=>e.key===l);if(e)if("apiKey"===e.type&&e.name){const t=this.authState.apiKeys[l]||"<YOUR_API_KEY>";"header"===e.in?s.push({name:e.name,value:t}):"query"===e.in&&o.push({name:e.name,value:t})}else if("http"===e.type){if("bearer"===e.scheme){const e=this.authState.bearerTokens[l]||"<YOUR_TOKEN>";s.push({name:"Authorization",value:`Bearer ${e}`})}else if("basic"===e.scheme){const e=this.authState.apiKeys[l]||"username:password";s.push({name:"Authorization",value:`Basic ${btoa(e)}`})}}else if("oauth2"===e.type||"openIdConnect"===e.type){const e=this.authState.bearerTokens[l]||"<YOUR_ACCESS_TOKEN>";s.push({name:"Authorization",value:`Bearer ${e}`})}}for(const l of this.operation.parameters.filter(e=>"header"===e.in))void 0!==l.example&&s.push({name:l.name,value:String(l.example)});let a;if(this.operation.requestBody){const e=this.operation.requestBody.content[0];if(e){s.push({name:"Content-Type",value:e.mediaType});let t="{}";if(e.example)t=JSON.stringify(e.example);else if(e.schema)try{t=JSON.stringify(su(e.schema))}catch{}a={mimeType:e.mediaType,text:t}}}return{method:this.operation.method.toUpperCase(),url:n,httpVersion:"HTTP/1.1",cookies:[],headers:s,queryString:o,postData:a,headersSize:-1,bodySize:-1}}async _copy(){const e=this._allTabs[this._activeTab];if(!e)return;const t=this._snippets.get(e.id)??"";await navigator.clipboard.writeText(t),this._copied=!0,setTimeout(()=>{this._copied=!1},2e3)}_getIcon(e){if(e.startsWith("spec:"))return oe`<svg class="tab-icon" width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
1695
|
+
</svg>`},Fh=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),Vh=/^'(?:[^'\\]|\\.)*'/,Gh=/^"(?:[^"\\]|\\.)*"/,Jh=/^\/\*[\s\S]*?\*\//,Wh=/^\/\/[^\n]*/,Kh=/^#[^\n]*/,Zh=/^\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b/,Yh=/^[a-zA-Z_$][\w$]*(?=\s*\()/,Qh=/^\b[A-Z][a-zA-Z0-9_]*\b/,Xh=e=>new RegExp("^\\b("+e+")\\b"),ef={curl:[[Kh,"hl-cmt"],[Vh,"hl-str"],[Gh,"hl-str"],[/^https?:\/\/[^\s'">) \\]+/,"hl-url"],[/^--?[a-zA-Z][\w-]*/,"hl-flag"],[Xh("curl|wget|echo|export|set|bash|sh|cat|grep|env|printf"),"hl-kw"],[/^\$\{?[A-Za-z_]\w*\}?/,"hl-var"],[Zh,"hl-num"]],javascript:[[Jh,"hl-cmt"],[Wh,"hl-cmt"],[/^`(?:[^`\\]|\\.)*`/,"hl-str"],[Vh,"hl-str"],[Gh,"hl-str"],[Xh("const|let|var|function|return|async|await|if|else|for|while|class|new|import|from|export|default|try|catch|finally|throw|of|in|typeof|instanceof|null|undefined|true|false|this|switch|case|break|continue|delete|void|do|yield|static|super|extends"),"hl-kw"],[Xh("console|JSON|Promise|fetch|Response|Request|URL|Headers|Object|Array|String|Number|Boolean|Math|Date|Error|require|module|exports|process|Buffer|globalThis"),"hl-type"],[Zh,"hl-num"],[Yh,"hl-fn"]],python:[[/^"""[\s\S]*?"""/,"hl-str"],[/^'''[\s\S]*?'''/,"hl-str"],[Kh,"hl-cmt"],[/^[fFrRbB]?'(?:[^'\\]|\\.)*'/,"hl-str"],[/^[fFrRbB]?"(?:[^"\\]|\\.)*"/,"hl-str"],[Xh("import|from|def|class|return|if|elif|else|for|while|with|as|try|except|finally|raise|pass|break|continue|and|or|not|in|is|None|True|False|lambda|yield|global|nonlocal|del|assert|async|await"),"hl-kw"],[Xh("print|len|range|str|int|float|bool|list|dict|tuple|set|requests|json|os|sys|re|super|type|object|Exception|ValueError|TypeError|AttributeError"),"hl-type"],[Zh,"hl-num"],[Yh,"hl-fn"],[Qh,"hl-cls"]],go:[[Jh,"hl-cmt"],[Wh,"hl-cmt"],[/^`[^`]*`/,"hl-str"],[Gh,"hl-str"],[Xh("package|import|func|var|const|type|struct|interface|return|if|else|for|range|go|defer|select|case|default|break|continue|switch|map|chan|make|new|nil|true|false|append|len|cap|delete|copy|close|panic|recover"),"hl-kw"],[Xh("string|int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float32|float64|bool|byte|rune|error|any|uintptr"),"hl-type"],[Zh,"hl-num"],[Yh,"hl-fn"],[Qh,"hl-cls"]],java:[[Jh,"hl-cmt"],[Wh,"hl-cmt"],[Gh,"hl-str"],[Xh("public|private|protected|static|final|abstract|class|interface|enum|extends|implements|return|if|else|for|while|do|try|catch|finally|throw|throws|new|this|super|import|package|void|null|true|false|instanceof|switch|case|default|break|continue|synchronized|volatile"),"hl-kw"],[Xh("String|Integer|Long|Double|Float|Boolean|Object|List|Map|Set|ArrayList|HashMap|HttpClient|HttpRequest|HttpResponse|Response|Request|URI|URL|System|Math|Arrays|Collections|Optional|Stream|StringBuilder"),"hl-type"],[/^@[a-zA-Z]+/,"hl-att"],[/^\b\d+(?:\.\d+)?[LlDdFf]?\b/,"hl-num"],[Yh,"hl-fn"],[Qh,"hl-cls"]],php:[[Jh,"hl-cmt"],[/^(?:\/\/|#)[^\n]*/,"hl-cmt"],[Vh,"hl-str"],[Gh,"hl-str"],[Xh("use|namespace|class|interface|trait|extends|implements|public|private|protected|static|final|function|return|if|else|elseif|for|foreach|while|do|switch|case|default|break|continue|try|catch|finally|throw|new|echo|print|null|true|false|NULL|TRUE|FALSE|array|match|fn|yield|readonly|enum"),"hl-kw"],[/^\$[a-zA-Z_][a-zA-Z0-9_]*/,"hl-var"],[Zh,"hl-num"],[Yh,"hl-fn"],[Qh,"hl-cls"]],ruby:[[Kh,"hl-cmt"],[Vh,"hl-str"],[Gh,"hl-str"],[Xh("require|require_relative|include|extend|def|class|module|end|if|elsif|else|unless|while|until|for|do|return|yield|begin|rescue|ensure|raise|then|when|case|nil|true|false|self|super|puts|print|p|pp|lambda|proc|attr_accessor|attr_reader|attr_writer"),"hl-kw"],[/^:[a-zA-Z_][a-zA-Z0-9_?!]*/,"hl-sym"],[/^@{1,2}[a-zA-Z_][a-zA-Z0-9_]*/,"hl-var"],[Zh,"hl-num"],[/^[a-zA-Z_][a-zA-Z0-9_?!]*(?=\s*\()/,"hl-fn"],[Qh,"hl-cls"]],csharp:[[Jh,"hl-cmt"],[Wh,"hl-cmt"],[/^@"[^"]*"/,"hl-str"],[Gh,"hl-str"],[Xh("using|namespace|class|interface|struct|enum|record|abstract|sealed|override|virtual|partial|public|private|protected|internal|static|readonly|const|new|return|if|else|for|foreach|while|do|switch|case|default|break|continue|try|catch|finally|throw|this|base|null|true|false|var|dynamic|async|await|in|out|ref|params|is|as|typeof|sizeof|nameof"),"hl-kw"],[Xh("string|int|long|double|float|decimal|bool|byte|char|object|void|Task|List|Dictionary|HashSet|IEnumerable|HttpClient|HttpResponseMessage|StringContent|Uri|Console|Math|String|Array|Exception"),"hl-type"],[/^\b\d+(?:\.\d+)?(?:[mMlLdDfFuU])?\b/,"hl-num"],[Yh,"hl-fn"],[Qh,"hl-cls"]],json:[[/^"(?:[^"\\]|\\.)*"(?=\s*:)/,"hl-key"],[Gh,"hl-str"],[Xh("true|false|null"),"hl-kw"],[/^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/,"hl-num"]]},tf={node:"javascript",shell:"curl",bash:"curl",sh:"curl",js:"javascript",ts:"javascript",typescript:"javascript",py:"python",golang:"go",rb:"ruby","c#":"csharp",cs:"csharp",dotnet:"csharp"};let rf=class extends xe{constructor(){super(...arguments),this.servers=[],this.authState={apiKeys:{},bearerTokens:{}},this.securitySchemes=[],this._activeTab=0,this._snippets=new Map,this._copied=!1,this._overflowStart=1/0,this._moreOpen=!1,this._allTabs=[],this._tabNaturalWidths=[],this._prevOperation=null,this._dropdownPortal=null,this._docClickHandler=null}disconnectedCallback(){var e;super.disconnectedCallback(),null==(e=this._ro)||e.disconnect(),this._ro=void 0,this._closeDropdownPortal()}async willUpdate(){this.operation&&(this._allTabs=[...Bh.map(e=>({id:e.id,label:e.label,isSpec:!1})),...this.operation.codeSamples.map(e=>({id:`spec:${e.lang}`,label:e.label,isSpec:!0}))],0===this._snippets.size&&await this._generateSnippets())}updated(e){e.has("operation")&&this.operation!==this._prevOperation&&(this._prevOperation=this.operation,this._tabNaturalWidths=[],this._overflowStart=1/0);(0===this._tabNaturalWidths.length||this._tabNaturalWidths.length!==this._allTabs.length)&&this._allTabs.length>0&&(this._tabNaturalWidths=[],requestAnimationFrame(()=>this._measureTabWidths()))}_measureTabWidths(){var e,t;const r=null==(e=this.shadowRoot)?void 0:e.querySelector(".tabs-measure");if(!r)return;const n=Array.from(r.querySelectorAll(".tab"));if(this._tabNaturalWidths=n.map(e=>e.getBoundingClientRect().width),!this._ro){const e=null==(t=this.shadowRoot)?void 0:t.querySelector(".tabs");e&&(this._ro=new ResizeObserver(()=>this._recomputeOverflow()),this._ro.observe(e))}this._recomputeOverflow()}_recomputeOverflow(){var e;const t=null==(e=this.shadowRoot)?void 0:e.querySelector(".tabs");if(!t||0===this._tabNaturalWidths.length)return;const r=t.getBoundingClientRect().width;if(this._tabNaturalWidths.reduce((e,t)=>e+t,0)<=r)return void(this._overflowStart!==this._tabNaturalWidths.length&&(this._overflowStart=this._tabNaturalWidths.length));const n=r-80;let o=0,s=0;for(let i=0;i<this._tabNaturalWidths.length;i++){if(o+=this._tabNaturalWidths[i],o>n){s=i;break}s=i+1}s!==this._overflowStart&&(this._overflowStart=s)}_toggleMore(e){e.stopPropagation(),this._dropdownPortal?this._closeDropdownPortal():this._openDropdownPortal(e.currentTarget)}_openDropdownPortal(e){this._closeDropdownPortal();const t=e.getBoundingClientRect(),r=document.createElement("div");Object.assign(r.style,{position:"fixed",top:`${t.bottom+4}px`,right:`${Math.round(window.innerWidth-t.right)}px`,zIndex:"2147483647",background:"#1c2128",border:"1px solid #30363d",borderRadius:"6px",padding:"4px",minWidth:"148px",boxShadow:"0 8px 24px rgba(0,0,0,0.5)",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:"0.75rem"}),this._allTabs.slice(this._overflowStart).forEach((e,t)=>{const n=this._overflowStart+t,o=n===this._activeTab,s=document.createElement("button");s.textContent=e.label+(e.isSpec?" ✦":""),Object.assign(s.style,{display:"block",width:"100%",padding:"6px 10px",borderRadius:"4px",fontSize:"0.75rem",fontWeight:"500",color:o?"#e6edf3":"#8b949e",whiteSpace:"nowrap",cursor:"pointer",background:o?"rgba(88,166,255,0.12)":"transparent",border:"none",textAlign:"left",boxSizing:"border-box",fontFamily:"inherit"}),s.addEventListener("mouseenter",()=>{n!==this._activeTab&&(s.style.color="#e6edf3",s.style.background="rgba(255,255,255,0.06)")}),s.addEventListener("mouseleave",()=>{n!==this._activeTab&&(s.style.color="#8b949e",s.style.background="transparent")}),s.addEventListener("click",e=>{e.stopPropagation(),this._activeTab=n,this._copied=!1,this._closeDropdownPortal()}),r.appendChild(s)}),document.body.appendChild(r),this._dropdownPortal=r,this._moreOpen=!0;const n=e=>{"scroll"!==e.type&&r.contains(e.target)||this._closeDropdownPortal()};setTimeout(()=>{document.addEventListener("click",n,{capture:!0}),document.addEventListener("scroll",n,{capture:!0,once:!0}),this._docClickHandler=n},0)}_closeDropdownPortal(){this._dropdownPortal&&(this._dropdownPortal.remove(),this._dropdownPortal=null),this._docClickHandler&&(document.removeEventListener("click",this._docClickHandler,{capture:!0}),document.removeEventListener("scroll",this._docClickHandler,{capture:!0}),this._docClickHandler=null),this._moreOpen&&(this._moreOpen=!1)}_onRootClick(e){}async _generateSnippets(){const e=this._buildHar(),t=new Map;for(const r of this.operation.codeSamples)t.set(`spec:${r.lang}`,r.source);try{const r=new zh(e);for(const e of Bh)try{const n=await r.convert(e.target,e.client);n&&"string"==typeof n?t.set(e.id,n):Array.isArray(n)&&n.length>0&&t.set(e.id,n[0])}catch{t.set(e.id,`// Failed to generate ${e.label} snippet`)}}catch{for(const e of Bh)t.set(e.id,"// Failed to generate snippet")}this._snippets=t}_buildHar(){const e=(this.operation.servers.length>0?this.operation.servers:this.servers)[0];let t=(null==e?void 0:e.url)??"";if(e)for(const[l,c]of Object.entries(e.variables))t=t.replace(`{${l}}`,c.default);let r=this.operation.path;for(const l of this.operation.parameters.filter(e=>"path"===e.in)){const e=void 0!==l.example?String(l.example):`{${l.name}}`;r=r.replace(`{${l.name}}`,e)}const n=`${t}${r}`,o=this.operation.parameters.filter(e=>"query"===e.in&&void 0!==e.example).map(e=>({name:e.name,value:String(e.example)})),s=[],i=this.operation.security[0];if(i)for(const l of Object.keys(i)){const e=this.securitySchemes.find(e=>e.key===l);if(e)if("apiKey"===e.type&&e.name){const t=this.authState.apiKeys[l]||"<YOUR_API_KEY>";"header"===e.in?s.push({name:e.name,value:t}):"query"===e.in&&o.push({name:e.name,value:t})}else if("http"===e.type){if("bearer"===e.scheme){const e=this.authState.bearerTokens[l]||"<YOUR_TOKEN>";s.push({name:"Authorization",value:`Bearer ${e}`})}else if("basic"===e.scheme){const e=this.authState.apiKeys[l]||"username:password";s.push({name:"Authorization",value:`Basic ${btoa(e)}`})}}else if("oauth2"===e.type||"openIdConnect"===e.type){const e=this.authState.bearerTokens[l]||"<YOUR_ACCESS_TOKEN>";s.push({name:"Authorization",value:`Bearer ${e}`})}}for(const l of this.operation.parameters.filter(e=>"header"===e.in))void 0!==l.example&&s.push({name:l.name,value:String(l.example)});let a;if(this.operation.requestBody){const e=this.operation.requestBody.content[0];if(e){s.push({name:"Content-Type",value:e.mediaType});let t="{}";if(e.example)t=JSON.stringify(e.example);else if(e.schema)try{t=JSON.stringify(uu(e.schema))}catch{}a={mimeType:e.mediaType,text:t}}}return{method:this.operation.method.toUpperCase(),url:n,httpVersion:"HTTP/1.1",cookies:[],headers:s,queryString:o,postData:a,headersSize:-1,bodySize:-1}}async _copy(){const e=this._allTabs[this._activeTab];if(!e)return;const t=this._snippets.get(e.id)??"";await navigator.clipboard.writeText(t),this._copied=!0,setTimeout(()=>{this._copied=!1},2e3)}_getIcon(e){if(e.startsWith("spec:"))return oe`<svg class="tab-icon" width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
1187
1696
|
<path d="M5 4L1 8l4 4M11 4l4 4-4 4" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1188
|
-
</svg>`;const t=
|
|
1697
|
+
</svg>`;const t=Hh[e];return t?ne`<span class="tab-icon">${t}</span>`:null}_highlightCode(e,t){return function(e,t){const r=ef[tf[t]??t]??ef.json;let n="",o=e;for(;o.length>0;){let e=!1;for(const[t,s]of r){const r=t.exec(o);if(r&&0===r.index){n+=`<span class="${s}">${Fh(r[0])}</span>`,o=o.slice(r[0].length),e=!0;break}}e||(n+=Fh(o[0]),o=o.slice(1))}return n}(e,t.startsWith("spec:")?t.slice(5).toLowerCase():t)}render(){if(!this.operation||0===this._allTabs.length)return ne``;const e=this._allTabs[this._activeTab],t=e?this._snippets.get(e.id)??"Loading…":"",r=this._overflowStart<this._allTabs.length;return ne`
|
|
1189
1698
|
<div class="code-samples">
|
|
1190
1699
|
<div class="tabs">
|
|
1191
1700
|
<!-- Hidden proxy: all tabs at natural size, used only for measurement -->
|
|
@@ -1220,10 +1729,10 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
1220
1729
|
<button class="copy-btn ${this._copied?"copied":""}" @click=${this._copy}>
|
|
1221
1730
|
${this._copied?"✓ Copied":"Copy"}
|
|
1222
1731
|
</button>
|
|
1223
|
-
<pre><code>${
|
|
1732
|
+
<pre><code>${xu(this._highlightCode(t,(null==e?void 0:e.id)??""))}</code></pre>
|
|
1224
1733
|
</div>
|
|
1225
1734
|
</div>
|
|
1226
|
-
`}};
|
|
1735
|
+
`}};rf.styles=[Ee,b`
|
|
1227
1736
|
:host {
|
|
1228
1737
|
display: block;
|
|
1229
1738
|
}
|
|
@@ -1441,7 +1950,7 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
1441
1950
|
.hl-sym { color: #c586c0; }
|
|
1442
1951
|
.hl-att { color: #c586c0; }
|
|
1443
1952
|
.hl-key { color: #9cdcfe; }
|
|
1444
|
-
`],
|
|
1953
|
+
`],Dh([Oe({type:Object})],rf.prototype,"operation",2),Dh([Oe({type:Array})],rf.prototype,"servers",2),Dh([Oe({type:Object})],rf.prototype,"authState",2),Dh([Oe({type:Array})],rf.prototype,"securitySchemes",2),Dh([je()],rf.prototype,"_activeTab",2),Dh([je()],rf.prototype,"_snippets",2),Dh([je()],rf.prototype,"_copied",2),Dh([je()],rf.prototype,"_overflowStart",2),Dh([je()],rf.prototype,"_moreOpen",2),rf=Dh([_e("sl-code-samples")],rf);var nf=Object.defineProperty,of=Object.getOwnPropertyDescriptor,sf=(e,t,r,n)=>{for(var o,s=n>1?void 0:n?of(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&nf(t,r,s),s};let af=class extends xe{constructor(){super(...arguments),this.schema=null,this.depth=0,this._expanded=new Set,this._seen=new WeakSet}_toggleProp(e){const t=new Set(this._expanded);t.has(e)?t.delete(e):t.add(e),this._expanded=t}_renderType(e){return"array"===e.type&&e.items?`${e.items.type??"any"}[]`:e.type??(e.oneOf?"oneOf":e.anyOf?"anyOf":e.allOf?"allOf":"any")}_isExpandable(e){var t;return!("object"!==e.type||!e.properties)||("array"===e.type&&"object"===(null==(t=e.items)?void 0:t.type)||!!(e.allOf||e.oneOf||e.anyOf))}_renderProperty(e,t,r,n){const o=`${n}:${e}`,s=this._expanded.has(o),i=this._isExpandable(t),a=20*n,l=[];if(void 0!==t.minimum&&l.push(`min: ${t.minimum}`),void 0!==t.maximum&&l.push(`max: ${t.maximum}`),void 0!==t.minLength&&l.push(`minLen: ${t.minLength}`),void 0!==t.maxLength&&l.push(`maxLen: ${t.maxLength}`),t.pattern&&l.push(`pattern: ${t.pattern}`),t.format&&l.push(t.format),"object"==typeof t&&null!==t){if(this._seen.has(t))return ne`
|
|
1445
1954
|
<div class="schema-row nested" style="--sl-indent: ${a}px">
|
|
1446
1955
|
<div class="prop-name">${e}</div>
|
|
1447
1956
|
<div class="type-info"><span class="type-badge">[circular]</span></div>
|
|
@@ -1517,7 +2026,7 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
1517
2026
|
<div class="prop-desc">${this.schema.description??""}</div>
|
|
1518
2027
|
</div>
|
|
1519
2028
|
</div>
|
|
1520
|
-
`}};
|
|
2029
|
+
`}};af.styles=[Ee,b`
|
|
1521
2030
|
:host {
|
|
1522
2031
|
display: block;
|
|
1523
2032
|
font-size: var(--sl-font-size-sm);
|
|
@@ -1651,13 +2160,35 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
1651
2160
|
font-style: italic;
|
|
1652
2161
|
border-bottom: 1px solid var(--sl-color-border);
|
|
1653
2162
|
}
|
|
1654
|
-
`],
|
|
2163
|
+
`],sf([Oe({type:Object})],af.prototype,"schema",2),sf([Oe({type:Number})],af.prototype,"depth",2),sf([je()],af.prototype,"_expanded",2),af=sf([_e("sl-schema")],af);var lf=Object.defineProperty,cf=Object.getOwnPropertyDescriptor,df=(e,t,r,n)=>{for(var o,s=n>1?void 0:n?cf(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&lf(t,r,s),s};let pf=class extends xe{constructor(){super(...arguments),this.servers=[],this.securitySchemes=[],this.authState={apiKeys:{},bearerTokens:{}},this.proxyUrl="",this.hideTryIt=!1,this.hideCodeSamples=!1,this.hideAskAi=!1,this.activeOperationId="",this._expanded=!1,this._routeCopied=!1,this._aiMenuOpen=!1,this._aiMenuRect=null}willUpdate(e){var t;e.has("activeOperationId")&&this.activeOperationId&&this.activeOperationId===(null==(t=this.operation)?void 0:t.operationId)&&(this._expanded=!0)}_toggle(){this._expanded=!this._expanded}_copyLink(e){e.stopPropagation();const t=`${window.location.origin}${window.location.pathname}#/operation/${encodeURIComponent(this.operation.operationId)}`;navigator.clipboard.writeText(t)}_openTryIt(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("try-it",{detail:this.operation,bubbles:!0,composed:!0}))}_copyRoute(e){e.stopPropagation(),navigator.clipboard.writeText(this.operation.path),this._routeCopied=!0,setTimeout(()=>{this._routeCopied=!1},1500)}_toggleAiMenu(e){if(e.stopPropagation(),this._aiMenuOpen||(this._aiMenuRect=e.currentTarget.getBoundingClientRect()),this._aiMenuOpen=!this._aiMenuOpen,this._aiMenuOpen){const e=t=>{const r=t.composedPath(),n=this.renderRoot.querySelector(".ask-ai-wrapper"),o=this.renderRoot.querySelector(".ai-menu");r.includes(n)||r.includes(o)||(this._aiMenuOpen=!1,document.removeEventListener("click",e,!0))};requestAnimationFrame(()=>document.addEventListener("click",e,!0))}}_openAi(e,t){t.stopPropagation(),this._aiMenuOpen=!1;const r=op(np(this.operation),e);window.open(r,"_blank","noopener,noreferrer")}render(){const e=this.operation;return e?ne`
|
|
1655
2164
|
<div class="operation">
|
|
1656
2165
|
<div class="op-header" @click=${this._toggle}>
|
|
1657
2166
|
<span class="method-badge method-${e.method}">${e.method}</span>
|
|
1658
2167
|
<span class="op-path">${e.path}</span>
|
|
2168
|
+
<button class="copy-route-btn" style=${this._routeCopied?"opacity:1":""} @click=${this._copyRoute} title="Copy route path">
|
|
2169
|
+
${this._routeCopied?ne`
|
|
2170
|
+
<svg class="copied-check" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2">
|
|
2171
|
+
<path d="M3 8.5l3.5 3.5 6.5-7" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2172
|
+
</svg>
|
|
2173
|
+
`:ne`
|
|
2174
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
2175
|
+
<rect x="5" y="5" width="8" height="8" rx="1"/>
|
|
2176
|
+
<path d="M3 11V3h8"/>
|
|
2177
|
+
</svg>
|
|
2178
|
+
`}
|
|
2179
|
+
</button>
|
|
1659
2180
|
<span class="op-summary">${e.summary}</span>
|
|
1660
2181
|
${e.deprecated?ne`<span class="badge-deprecated">Deprecated</span>`:null}
|
|
2182
|
+
${this.hideAskAi?null:ne`
|
|
2183
|
+
<div class="ask-ai-wrapper" style=${this._aiMenuOpen?"opacity:1":""}>
|
|
2184
|
+
<button class="ask-ai-btn" @click=${this._toggleAiMenu}>
|
|
2185
|
+
<svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor">
|
|
2186
|
+
<path d="M8 1l1.5 3.5L13 6l-3.5 1.5L8 11 6.5 7.5 3 6l3.5-1.5L8 1zM3 11l.75 1.75L5.5 13.5l-1.75.75L3 16l-.75-1.75L.5 13.5l1.75-.75L3 11zM12.5 10l.75 1.75 1.75.75-1.75.75-.75 1.75-.75-1.75L10 12.5l1.75-.75.75-1.75z"/>
|
|
2187
|
+
</svg>
|
|
2188
|
+
Ask AI
|
|
2189
|
+
</button>
|
|
2190
|
+
</div>
|
|
2191
|
+
`}
|
|
1661
2192
|
${this.hideTryIt?null:ne`
|
|
1662
2193
|
<button class="try-it-btn" @click=${this._openTryIt}>
|
|
1663
2194
|
<svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor">
|
|
@@ -1730,7 +2261,23 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
1730
2261
|
</div>
|
|
1731
2262
|
`:null}
|
|
1732
2263
|
</div>
|
|
1733
|
-
|
|
2264
|
+
${this._aiMenuOpen&&this._aiMenuRect?ne`
|
|
2265
|
+
<div class="ai-menu" style="top:${this._aiMenuRect.bottom+4}px;right:${window.innerWidth-this._aiMenuRect.right}px">
|
|
2266
|
+
<button class="ai-menu-item" @click=${e=>this._openAi("chatgpt",e)}>
|
|
2267
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
|
|
2268
|
+
<path d="M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.141-.081 4.779-2.758a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.677l5.815 3.355-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667zm2.01-3.023l-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135l-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.795.795 0 0 0-.393.681zm1.097-2.365l2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.612-1.5z"/>
|
|
2269
|
+
</svg>
|
|
2270
|
+
ChatGPT
|
|
2271
|
+
</button>
|
|
2272
|
+
<button class="ai-menu-item" @click=${e=>this._openAi("claude",e)}>
|
|
2273
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
|
|
2274
|
+
<path d="M13.827 3.52h-3.654L5 20.48h3.213l1.436-4.115h4.847l1.367 4.115H19L13.827 3.52zm-3.192 10.6 1.85-5.3 1.744 5.3h-3.594z"/>
|
|
2275
|
+
</svg>
|
|
2276
|
+
Claude
|
|
2277
|
+
</button>
|
|
2278
|
+
</div>
|
|
2279
|
+
`:null}
|
|
2280
|
+
`:ne``}};pf.styles=[Ee,b`
|
|
1734
2281
|
:host {
|
|
1735
2282
|
display: block;
|
|
1736
2283
|
margin-bottom: var(--sl-spacing-lg);
|
|
@@ -1961,19 +2508,116 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
1961
2508
|
color: var(--sl-color-text);
|
|
1962
2509
|
}
|
|
1963
2510
|
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
2511
|
+
/* ── Copy Route Button ───────────────── */
|
|
2512
|
+
.copy-route-btn {
|
|
2513
|
+
padding: 4px 6px;
|
|
2514
|
+
border-radius: var(--sl-radius-sm);
|
|
2515
|
+
color: var(--sl-color-text-muted);
|
|
2516
|
+
opacity: 0;
|
|
2517
|
+
transition: opacity var(--sl-transition-fast);
|
|
2518
|
+
flex-shrink: 0;
|
|
2519
|
+
display: inline-flex;
|
|
2520
|
+
align-items: center;
|
|
2521
|
+
}
|
|
2522
|
+
|
|
2523
|
+
.op-header:hover .copy-route-btn {
|
|
2524
|
+
opacity: 1;
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
.copy-route-btn:hover {
|
|
2528
|
+
background: var(--sl-color-surface-raised);
|
|
2529
|
+
color: var(--sl-color-text);
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
.copy-route-btn .copied-check {
|
|
2533
|
+
color: var(--sl-color-success, #22c55e);
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2536
|
+
/* ── Ask AI Button ───────────────────── */
|
|
2537
|
+
.ask-ai-wrapper {
|
|
2538
|
+
flex-shrink: 0;
|
|
2539
|
+
opacity: 0;
|
|
2540
|
+
transition: opacity var(--sl-transition-fast);
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
.op-header:hover .ask-ai-wrapper {
|
|
2544
|
+
opacity: 1;
|
|
2545
|
+
}
|
|
2546
|
+
|
|
2547
|
+
.ask-ai-btn {
|
|
2548
|
+
display: inline-flex;
|
|
2549
|
+
align-items: center;
|
|
2550
|
+
gap: 5px;
|
|
2551
|
+
padding: 4px 12px;
|
|
2552
|
+
border-radius: var(--sl-radius-md);
|
|
2553
|
+
font-size: var(--sl-font-size-xs);
|
|
2554
|
+
font-weight: 600;
|
|
2555
|
+
color: var(--sl-color-text-muted);
|
|
2556
|
+
border: 1px solid var(--sl-color-border);
|
|
2557
|
+
background: transparent;
|
|
2558
|
+
cursor: pointer;
|
|
2559
|
+
transition: all var(--sl-transition-fast);
|
|
2560
|
+
white-space: nowrap;
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2563
|
+
.ask-ai-btn:hover {
|
|
2564
|
+
background: var(--sl-color-surface-raised);
|
|
2565
|
+
color: var(--sl-color-text);
|
|
2566
|
+
border-color: var(--sl-color-text-muted);
|
|
2567
|
+
}
|
|
2568
|
+
|
|
2569
|
+
.ai-menu {
|
|
2570
|
+
position: fixed;
|
|
2571
|
+
z-index: 9999;
|
|
2572
|
+
min-width: 150px;
|
|
2573
|
+
background: var(--sl-color-surface);
|
|
2574
|
+
border: 1px solid var(--sl-color-border);
|
|
2575
|
+
border-radius: var(--sl-radius-md);
|
|
2576
|
+
box-shadow: var(--sl-shadow-md);
|
|
2577
|
+
padding: 4px 0;
|
|
2578
|
+
animation: sl-menu-in 120ms ease;
|
|
2579
|
+
}
|
|
2580
|
+
|
|
2581
|
+
@keyframes sl-menu-in {
|
|
2582
|
+
from { opacity: 0; transform: translateY(-4px); }
|
|
2583
|
+
to { opacity: 1; transform: translateY(0); }
|
|
2584
|
+
}
|
|
2585
|
+
|
|
2586
|
+
.ai-menu-item {
|
|
2587
|
+
display: flex;
|
|
2588
|
+
align-items: center;
|
|
2589
|
+
gap: 8px;
|
|
2590
|
+
width: 100%;
|
|
2591
|
+
padding: 8px 14px;
|
|
2592
|
+
font-size: var(--sl-font-size-sm);
|
|
2593
|
+
color: var(--sl-color-text);
|
|
2594
|
+
cursor: pointer;
|
|
2595
|
+
transition: background var(--sl-transition-fast);
|
|
2596
|
+
white-space: nowrap;
|
|
2597
|
+
text-align: left;
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
.ai-menu-item:hover {
|
|
2601
|
+
background: var(--sl-color-bg-subtle);
|
|
2602
|
+
}
|
|
2603
|
+
|
|
2604
|
+
.ai-menu-item svg {
|
|
2605
|
+
flex-shrink: 0;
|
|
2606
|
+
}
|
|
2607
|
+
|
|
2608
|
+
@media (max-width: 900px) {
|
|
2609
|
+
.op-body {
|
|
2610
|
+
grid-template-columns: 1fr;
|
|
2611
|
+
}
|
|
2612
|
+
.op-code-panel {
|
|
2613
|
+
border-left: none;
|
|
2614
|
+
border-top: 1px solid var(--sl-color-border);
|
|
1971
2615
|
}
|
|
1972
2616
|
.op-code-sticky {
|
|
1973
2617
|
position: static;
|
|
1974
2618
|
}
|
|
1975
2619
|
}
|
|
1976
|
-
`],
|
|
2620
|
+
`],df([Oe({type:Object})],pf.prototype,"operation",2),df([Oe({type:Array})],pf.prototype,"servers",2),df([Oe({type:Array})],pf.prototype,"securitySchemes",2),df([Oe({type:Object})],pf.prototype,"authState",2),df([Oe({type:String})],pf.prototype,"proxyUrl",2),df([Oe({type:Boolean,attribute:"hide-try-it"})],pf.prototype,"hideTryIt",2),df([Oe({type:Boolean,attribute:"hide-code-samples"})],pf.prototype,"hideCodeSamples",2),df([Oe({type:Boolean,attribute:"hide-ask-ai"})],pf.prototype,"hideAskAi",2),df([Oe({type:String})],pf.prototype,"activeOperationId",2),df([je()],pf.prototype,"_expanded",2),df([je()],pf.prototype,"_routeCopied",2),df([je()],pf.prototype,"_aiMenuOpen",2),df([je()],pf.prototype,"_aiMenuRect",2),pf=df([_e("sl-operation")],pf);var uf=Object.defineProperty,hf=Object.getOwnPropertyDescriptor,ff=(e,t,r,n)=>{for(var o,s=n>1?void 0:n?hf(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&uf(t,r,s),s};let mf=class extends xe{constructor(){super(...arguments),this.servers=[],this.securitySchemes=[],this.authState={apiKeys:{},bearerTokens:{}},this.proxyUrl="",this._paramValues={},this._bodyValue="",this._formFields={},this._selectedServer=0,this._response=null,this._loading=!1,this._error=null,this._showResponseHeaders=!1,this._initialized=!1}willUpdate(){!this._initialized&&this.operation&&(this._initDefaults(),this._initialized=!0)}_initDefaults(){const e={};for(const t of this.operation.parameters)void 0!==t.example&&(e[`${t.in}:${t.name}`]=String(t.example));if(this._paramValues=e,this.operation.requestBody){const e=this.operation.requestBody.content[0];if(e&&this._isFormMediaType(e.mediaType)&&e.schema){const t=e.schema.properties??{},r={};for(const[e,n]of Object.entries(t))void 0!==n.example?r[e]=String(n.example):void 0!==n.default&&(r[e]=String(n.default));this._formFields=r}else if(null==e?void 0:e.schema)try{const t=uu(e.schema);this._bodyValue=JSON.stringify(t,null,2)}catch{this._bodyValue="{}"}}}_isFormMediaType(e){return"multipart/form-data"===e||"application/x-www-form-urlencoded"===e}_isFormBody(){var e,t;const r=(null==(t=null==(e=this.operation.requestBody)?void 0:e.content[0])?void 0:t.mediaType)??"";return this._isFormMediaType(r)}_buildUrl(){const e=this.operation.servers.length>0?this.operation.servers:this.servers,t=e[this._selectedServer]??e[0];if(!t)return this.operation.path;let r=t.url.replace(/\/+$/,"");for(const[s,i]of Object.entries(t.variables))r=r.replace(`{${s}}`,i.default);let n=this.operation.path;for(const s of this.operation.parameters.filter(e=>"path"===e.in)){const e=this._paramValues[`path:${s.name}`]??"";n=n.replace(`{${s.name}}`,encodeURIComponent(e))}const o=this.operation.parameters.filter(e=>"query"===e.in).map(e=>{const t=this._paramValues[`query:${e.name}`];return t?`${encodeURIComponent(e.name)}=${encodeURIComponent(t)}`:null}).filter(Boolean);return`${r}${n}${o.length>0?`?${o.join("&")}`:""}`}_buildHeaders(){const e={};for(const t of this.operation.parameters.filter(e=>"header"===e.in)){const r=this._paramValues[`header:${t.name}`];r&&(e[t.name]=r)}for(const t of this.operation.security)for(const r of Object.keys(t)){const t=this.securitySchemes.find(e=>e.key===r);if(t){if("apiKey"===t.type&&"header"===t.in&&t.name){const n=this.authState.apiKeys[r];n&&(e[t.name]=n)}if("http"===t.type){const n=this.authState.bearerTokens[r];n&&("bearer"===t.scheme?e.Authorization=`Bearer ${n}`:"basic"===t.scheme&&(e.Authorization=`Basic ${btoa(n)}`))}}}if(this.operation.requestBody){const t=this.operation.requestBody.content[0];t&&"multipart/form-data"!==t.mediaType&&(e["Content-Type"]=t.mediaType)}return e}async _send(){var e;this._loading=!0,this._error=null,this._response=null;const t=this._buildUrl(),r=this._buildHeaders(),n=this.operation.requestBody&&["post","put","patch"].includes(this.operation.method),o=this.proxyUrl?`${this.proxyUrl}${encodeURIComponent(t)}`:t;let s;if(n){const t=(null==(e=this.operation.requestBody.content[0])?void 0:e.mediaType)??"";if("multipart/form-data"===t){const e=new FormData;for(const[t,r]of Object.entries(this._formFields))r instanceof File?e.append(t,r,r.name):""!==r.trim()&&e.append(t,r);s=e}else if("application/x-www-form-urlencoded"===t){const e=new URLSearchParams;for(const[t,r]of Object.entries(this._formFields))"string"==typeof r&&""!==r.trim()&&e.append(t,r);s=e}else s=this._bodyValue}const i=performance.now();try{const e=await fetch(o,{method:this.operation.method.toUpperCase(),headers:r,body:s}),t=Math.round(performance.now()-i),n=await e.text(),a={};e.headers.forEach((e,t)=>{a[t]=e}),this._response={status:e.status,statusText:e.statusText,headers:a,body:n,time:t}}catch(a){const e=a instanceof Error?a.message:String(a);this._error=e}finally{this._loading=!1}}_getStatusClass(e){return e<300?"status-2xx":e<400?"status-3xx":e<500?"status-4xx":"status-5xx"}_formatBody(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}_renderFormFields(){const e=this.operation.requestBody.content[0],t=e.mediaType,r="multipart/form-data"===t,n=e.schema,o=(null==n?void 0:n.properties)??{},s=(null==n?void 0:n.required)??[],i=Object.entries(o);return ne`
|
|
1977
2621
|
<div class="form-section">
|
|
1978
2622
|
<div class="form-label">
|
|
1979
2623
|
Request Body
|
|
@@ -2113,7 +2757,7 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
2113
2757
|
</div>
|
|
2114
2758
|
`:null}
|
|
2115
2759
|
</div>
|
|
2116
|
-
`}};
|
|
2760
|
+
`}};mf.styles=[Ee,b`
|
|
2117
2761
|
:host {
|
|
2118
2762
|
display: block;
|
|
2119
2763
|
}
|
|
@@ -2371,7 +3015,7 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
2371
3015
|
0%, 100% { opacity: 0.3; }
|
|
2372
3016
|
50% { opacity: 1; }
|
|
2373
3017
|
}
|
|
2374
|
-
`],
|
|
3018
|
+
`],ff([Oe({type:Object})],mf.prototype,"operation",2),ff([Oe({type:Array})],mf.prototype,"servers",2),ff([Oe({type:Array})],mf.prototype,"securitySchemes",2),ff([Oe({type:Object})],mf.prototype,"authState",2),ff([Oe({type:String})],mf.prototype,"proxyUrl",2),ff([je()],mf.prototype,"_paramValues",2),ff([je()],mf.prototype,"_bodyValue",2),ff([je()],mf.prototype,"_formFields",2),ff([je()],mf.prototype,"_selectedServer",2),ff([je()],mf.prototype,"_response",2),ff([je()],mf.prototype,"_loading",2),ff([je()],mf.prototype,"_error",2),ff([je()],mf.prototype,"_showResponseHeaders",2),ff([je()],mf.prototype,"_initialized",2),mf=ff([_e("sl-try-it")],mf);var gf=Object.defineProperty,yf=Object.getOwnPropertyDescriptor,vf=(e,t,r,n)=>{for(var o,s=n>1?void 0:n?yf(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&gf(t,r,s),s};let bf=class extends xe{constructor(){super(...arguments),this.securitySchemes=[],this.authState={apiKeys:{},bearerTokens:{}},this._localState={apiKeys:{},bearerTokens:{}},this._showTokens=new Set}willUpdate(){0===Object.keys(this._localState.apiKeys).length&&0===Object.keys(this._localState.bearerTokens).length&&(this._localState={...this.authState})}_updateApiKey(e,t){this._localState={...this._localState,apiKeys:{...this._localState.apiKeys,[e]:t}},this._emit()}_updateBearerToken(e,t){this._localState={...this._localState,bearerTokens:{...this._localState.bearerTokens,[e]:t}},this._emit()}_emit(){this.dispatchEvent(new CustomEvent("auth-update",{detail:this._localState}))}_toggleShow(e){const t=new Set(this._showTokens);t.has(e)?t.delete(e):t.add(e),this._showTokens=t}_close(){this.dispatchEvent(new CustomEvent("close-auth"))}_renderScheme(e){const t=e=>ne`
|
|
2375
3019
|
<svg width="15" height="15" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
|
|
2376
3020
|
${e?ne`<path d="M1 8s2.5-5 7-5 7 5 7 5-2.5 5-7 5-7-5-7-5z"/><circle cx="8" cy="8" r="2"/>`:ne`<path d="M1 1l14 14M6.7 6.7A2 2 0 0010.3 10.3M3.4 3.4A7 7 0 001 8s2.5 5 7 5a7 7 0 003.6-1"/><path d="M8 3c4.4 0 7 5 7 5a12.8 12.8 0 01-1.7 2.3"/>`}
|
|
2377
3021
|
</svg>
|
|
@@ -2476,7 +3120,7 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
2476
3120
|
</div>
|
|
2477
3121
|
</div>
|
|
2478
3122
|
</div>
|
|
2479
|
-
`}};
|
|
3123
|
+
`}};bf.styles=[Ee,b`
|
|
2480
3124
|
:host {
|
|
2481
3125
|
display: block;
|
|
2482
3126
|
position: fixed;
|
|
@@ -2851,26 +3495,444 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
2851
3495
|
background: var(--sl-color-primary-hover);
|
|
2852
3496
|
box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
|
|
2853
3497
|
}
|
|
2854
|
-
`],
|
|
3498
|
+
`],vf([Oe({type:Array})],bf.prototype,"securitySchemes",2),vf([Oe({type:Object})],bf.prototype,"authState",2),vf([je()],bf.prototype,"_localState",2),vf([je()],bf.prototype,"_showTokens",2),bf=vf([_e("sl-auth")],bf);var $f=Object.defineProperty,xf=Object.getOwnPropertyDescriptor,wf=(e,t,r,n)=>{for(var o,s=n>1?void 0:n?xf(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&$f(t,r,s),s};let _f=class extends xe{constructor(){super(...arguments),this.categories=[],this.activeGuideSlug="",this.open=!1,this._collapsedCategories=new Set}_toggleCategory(e){this._collapsedCategories.has(e)?this._collapsedCategories.delete(e):this._collapsedCategories.add(e),this.requestUpdate()}_navigateGuide(e){this.dispatchEvent(new CustomEvent("navigate-guide",{detail:e})),this.dispatchEvent(new CustomEvent("close-sidebar"))}render(){return ne`
|
|
3499
|
+
<div class="overlay" @click=${()=>this.dispatchEvent(new CustomEvent("close-sidebar"))}></div>
|
|
3500
|
+
<nav class="sidebar">
|
|
3501
|
+
<div class="nav-list">
|
|
3502
|
+
${this.categories.map(e=>{const t=this._collapsedCategories.has(e.name);return ne`
|
|
3503
|
+
<div class="category">
|
|
3504
|
+
<div
|
|
3505
|
+
class="category-header ${t?"collapsed":""}"
|
|
3506
|
+
@click=${()=>this._toggleCategory(e.name)}
|
|
3507
|
+
>
|
|
3508
|
+
<span>${e.name}</span>
|
|
3509
|
+
<svg class="chevron" width="12" height="12" viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
3510
|
+
<path d="M3 4.5l3 3 3-3"/>
|
|
3511
|
+
</svg>
|
|
3512
|
+
</div>
|
|
3513
|
+
<div class="category-guides ${t?"collapsed":""}">
|
|
3514
|
+
${e.guides.map(e=>ne`
|
|
3515
|
+
<a
|
|
3516
|
+
class="guide-link ${e.slug===this.activeGuideSlug?"active":""}"
|
|
3517
|
+
@click=${()=>this._navigateGuide(e.slug)}
|
|
3518
|
+
>
|
|
3519
|
+
<svg class="guide-icon" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round">
|
|
3520
|
+
<path d="M4 2h8a1 1 0 011 1v10a1 1 0 01-1 1H4a1 1 0 01-1-1V3a1 1 0 011-1z"/>
|
|
3521
|
+
<path d="M6 5h4M6 8h4M6 11h2"/>
|
|
3522
|
+
</svg>
|
|
3523
|
+
<span class="guide-title">${e.title}</span>
|
|
3524
|
+
</a>
|
|
3525
|
+
`)}
|
|
3526
|
+
</div>
|
|
3527
|
+
</div>
|
|
3528
|
+
`})}
|
|
3529
|
+
</div>
|
|
3530
|
+
</nav>
|
|
3531
|
+
`}};_f.styles=[Ee,b`
|
|
3532
|
+
:host {
|
|
3533
|
+
display: block;
|
|
3534
|
+
}
|
|
3535
|
+
|
|
3536
|
+
.sidebar {
|
|
3537
|
+
position: sticky;
|
|
3538
|
+
top: var(--sl-header-height);
|
|
3539
|
+
width: var(--sl-sidebar-width);
|
|
3540
|
+
height: calc(100vh - var(--sl-header-height));
|
|
3541
|
+
overflow-y: auto;
|
|
3542
|
+
overflow-x: hidden;
|
|
3543
|
+
background: var(--sl-color-sidebar-bg);
|
|
3544
|
+
border-right: 1px solid var(--sl-color-border);
|
|
3545
|
+
padding: 0;
|
|
3546
|
+
flex-shrink: 0;
|
|
3547
|
+
scrollbar-width: thin;
|
|
3548
|
+
scrollbar-color: var(--sl-color-border) transparent;
|
|
3549
|
+
display: flex;
|
|
3550
|
+
flex-direction: column;
|
|
3551
|
+
}
|
|
3552
|
+
|
|
3553
|
+
.sidebar::-webkit-scrollbar {
|
|
3554
|
+
width: 4px;
|
|
3555
|
+
}
|
|
3556
|
+
.sidebar::-webkit-scrollbar-thumb {
|
|
3557
|
+
background: var(--sl-color-border);
|
|
3558
|
+
border-radius: 2px;
|
|
3559
|
+
}
|
|
3560
|
+
|
|
3561
|
+
.overlay {
|
|
3562
|
+
display: none;
|
|
3563
|
+
}
|
|
3564
|
+
|
|
3565
|
+
@media (max-width: 768px) {
|
|
3566
|
+
.sidebar {
|
|
3567
|
+
position: fixed;
|
|
3568
|
+
top: 0;
|
|
3569
|
+
left: 0;
|
|
3570
|
+
height: 100vh;
|
|
3571
|
+
z-index: 200;
|
|
3572
|
+
transform: translateX(-100%);
|
|
3573
|
+
transition: transform var(--sl-transition-base);
|
|
3574
|
+
box-shadow: var(--sl-shadow-xl);
|
|
3575
|
+
}
|
|
3576
|
+
|
|
3577
|
+
:host([open]) .sidebar {
|
|
3578
|
+
transform: translateX(0);
|
|
3579
|
+
}
|
|
3580
|
+
|
|
3581
|
+
.overlay {
|
|
3582
|
+
display: block;
|
|
3583
|
+
position: fixed;
|
|
3584
|
+
inset: 0;
|
|
3585
|
+
background: var(--sl-color-overlay);
|
|
3586
|
+
z-index: 199;
|
|
3587
|
+
opacity: 0;
|
|
3588
|
+
pointer-events: none;
|
|
3589
|
+
transition: opacity var(--sl-transition-base);
|
|
3590
|
+
}
|
|
3591
|
+
|
|
3592
|
+
:host([open]) .overlay {
|
|
3593
|
+
opacity: 1;
|
|
3594
|
+
pointer-events: auto;
|
|
3595
|
+
}
|
|
3596
|
+
}
|
|
3597
|
+
|
|
3598
|
+
/* ── Nav ───────────────────────────── */
|
|
3599
|
+
.nav-list {
|
|
3600
|
+
flex: 1;
|
|
3601
|
+
overflow-y: auto;
|
|
3602
|
+
padding: var(--sl-spacing-sm) 0 var(--sl-spacing-md);
|
|
3603
|
+
scrollbar-width: thin;
|
|
3604
|
+
scrollbar-color: var(--sl-color-border) transparent;
|
|
3605
|
+
}
|
|
3606
|
+
|
|
3607
|
+
.nav-list::-webkit-scrollbar {
|
|
3608
|
+
width: 4px;
|
|
3609
|
+
}
|
|
3610
|
+
.nav-list::-webkit-scrollbar-thumb {
|
|
3611
|
+
background: var(--sl-color-border);
|
|
3612
|
+
border-radius: 2px;
|
|
3613
|
+
}
|
|
3614
|
+
|
|
3615
|
+
.category {
|
|
3616
|
+
margin-bottom: var(--sl-spacing-xs);
|
|
3617
|
+
}
|
|
3618
|
+
|
|
3619
|
+
.category-header {
|
|
3620
|
+
display: flex;
|
|
3621
|
+
align-items: center;
|
|
3622
|
+
justify-content: space-between;
|
|
3623
|
+
padding: var(--sl-spacing-sm) var(--sl-spacing-lg);
|
|
3624
|
+
font-size: var(--sl-font-size-xs);
|
|
3625
|
+
font-weight: 600;
|
|
3626
|
+
text-transform: uppercase;
|
|
3627
|
+
letter-spacing: 0.05em;
|
|
3628
|
+
color: var(--sl-color-text-muted);
|
|
3629
|
+
cursor: pointer;
|
|
3630
|
+
user-select: none;
|
|
3631
|
+
transition: color var(--sl-transition-fast);
|
|
3632
|
+
}
|
|
3633
|
+
|
|
3634
|
+
.category-header:hover {
|
|
3635
|
+
color: var(--sl-color-text);
|
|
3636
|
+
}
|
|
3637
|
+
|
|
3638
|
+
.category-header .chevron {
|
|
3639
|
+
transition: transform var(--sl-transition-fast);
|
|
3640
|
+
}
|
|
3641
|
+
|
|
3642
|
+
.category-header.collapsed .chevron {
|
|
3643
|
+
transform: rotate(-90deg);
|
|
3644
|
+
}
|
|
3645
|
+
|
|
3646
|
+
.category-guides {
|
|
3647
|
+
overflow: hidden;
|
|
3648
|
+
}
|
|
3649
|
+
|
|
3650
|
+
.category-guides.collapsed {
|
|
3651
|
+
display: none;
|
|
3652
|
+
}
|
|
3653
|
+
|
|
3654
|
+
.guide-link {
|
|
3655
|
+
display: flex;
|
|
3656
|
+
align-items: center;
|
|
3657
|
+
gap: var(--sl-spacing-sm);
|
|
3658
|
+
padding: 7px var(--sl-spacing-lg) 7px calc(var(--sl-spacing-lg) + 4px);
|
|
3659
|
+
font-size: var(--sl-font-size-sm);
|
|
3660
|
+
color: var(--sl-color-text-secondary);
|
|
3661
|
+
cursor: pointer;
|
|
3662
|
+
transition: all var(--sl-transition-fast);
|
|
3663
|
+
text-decoration: none;
|
|
3664
|
+
border-left: 2px solid transparent;
|
|
3665
|
+
}
|
|
3666
|
+
|
|
3667
|
+
.guide-link:hover {
|
|
3668
|
+
background: var(--sl-color-sidebar-hover);
|
|
3669
|
+
color: var(--sl-color-text);
|
|
3670
|
+
text-decoration: none;
|
|
3671
|
+
}
|
|
3672
|
+
|
|
3673
|
+
.guide-link.active {
|
|
3674
|
+
background: var(--sl-color-sidebar-active);
|
|
3675
|
+
color: var(--sl-color-primary);
|
|
3676
|
+
border-left-color: var(--sl-color-primary);
|
|
3677
|
+
}
|
|
3678
|
+
|
|
3679
|
+
.guide-icon {
|
|
3680
|
+
flex-shrink: 0;
|
|
3681
|
+
color: var(--sl-color-text-muted);
|
|
3682
|
+
}
|
|
3683
|
+
|
|
3684
|
+
.guide-link.active .guide-icon {
|
|
3685
|
+
color: var(--sl-color-primary);
|
|
3686
|
+
}
|
|
3687
|
+
|
|
3688
|
+
.guide-title {
|
|
3689
|
+
overflow: hidden;
|
|
3690
|
+
text-overflow: ellipsis;
|
|
3691
|
+
white-space: nowrap;
|
|
3692
|
+
}
|
|
3693
|
+
`],wf([Oe({type:Array})],_f.prototype,"categories",2),wf([Oe({type:String})],_f.prototype,"activeGuideSlug",2),wf([Oe({type:Boolean,reflect:!0})],_f.prototype,"open",2),wf([je()],_f.prototype,"_collapsedCategories",2),_f=wf([_e("sl-guide-sidebar")],_f);var kf=Object.defineProperty,Sf=Object.getOwnPropertyDescriptor,Of=(e,t,r,n)=>{for(var o,s=n>1?void 0:n?Sf(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&kf(t,r,s),s};let jf=class extends xe{constructor(){super(...arguments),this.guide=null}render(){return this.guide?ne`
|
|
3694
|
+
<div class="guide-header">
|
|
3695
|
+
<h1 class="guide-title">${this.guide.title}</h1>
|
|
3696
|
+
${this.guide.category?ne`<div class="guide-category">${this.guide.category}</div>`:null}
|
|
3697
|
+
</div>
|
|
3698
|
+
<div class="guide-content" .innerHTML=${this.guide.htmlContent}></div>
|
|
3699
|
+
`:ne`
|
|
3700
|
+
<div class="empty">
|
|
3701
|
+
<div class="empty-icon">📖</div>
|
|
3702
|
+
<div class="empty-text">Select a guide from the sidebar to get started.</div>
|
|
3703
|
+
</div>
|
|
3704
|
+
`}};jf.styles=[Ee,b`
|
|
3705
|
+
:host {
|
|
3706
|
+
display: block;
|
|
3707
|
+
flex: 1;
|
|
3708
|
+
min-width: 0;
|
|
3709
|
+
padding: var(--sl-spacing-xl) var(--sl-spacing-2xl);
|
|
3710
|
+
max-width: 900px;
|
|
3711
|
+
margin: 0 auto;
|
|
3712
|
+
}
|
|
3713
|
+
|
|
3714
|
+
.guide-header {
|
|
3715
|
+
margin-bottom: var(--sl-spacing-2xl);
|
|
3716
|
+
padding-bottom: var(--sl-spacing-xl);
|
|
3717
|
+
border-bottom: 1px solid var(--sl-color-border);
|
|
3718
|
+
}
|
|
3719
|
+
|
|
3720
|
+
.guide-title {
|
|
3721
|
+
font-size: var(--sl-font-size-2xl);
|
|
3722
|
+
font-weight: 800;
|
|
3723
|
+
color: var(--sl-color-text);
|
|
3724
|
+
margin: 0;
|
|
3725
|
+
line-height: 1.3;
|
|
3726
|
+
}
|
|
3727
|
+
|
|
3728
|
+
.guide-category {
|
|
3729
|
+
font-size: var(--sl-font-size-sm);
|
|
3730
|
+
color: var(--sl-color-text-muted);
|
|
3731
|
+
margin-top: var(--sl-spacing-xs);
|
|
3732
|
+
}
|
|
3733
|
+
|
|
3734
|
+
/* ── Prose styles (mirroring sl-intro-desc) ── */
|
|
3735
|
+
|
|
3736
|
+
.guide-content {
|
|
3737
|
+
font-size: var(--sl-font-size-base);
|
|
3738
|
+
color: var(--sl-color-text-secondary);
|
|
3739
|
+
line-height: 1.7;
|
|
3740
|
+
}
|
|
3741
|
+
|
|
3742
|
+
.guide-content p {
|
|
3743
|
+
margin: 0 0 var(--sl-spacing-md) 0;
|
|
3744
|
+
}
|
|
3745
|
+
.guide-content p:last-child {
|
|
3746
|
+
margin-bottom: 0;
|
|
3747
|
+
}
|
|
3748
|
+
|
|
3749
|
+
.guide-content h1,
|
|
3750
|
+
.guide-content h2,
|
|
3751
|
+
.guide-content h3,
|
|
3752
|
+
.guide-content h4,
|
|
3753
|
+
.guide-content h5,
|
|
3754
|
+
.guide-content h6 {
|
|
3755
|
+
color: var(--sl-color-text);
|
|
3756
|
+
font-weight: 700;
|
|
3757
|
+
margin: var(--sl-spacing-xl) 0 var(--sl-spacing-sm) 0;
|
|
3758
|
+
line-height: 1.3;
|
|
3759
|
+
}
|
|
3760
|
+
.guide-content h1 { font-size: 1.6rem; border-bottom: 2px solid var(--sl-color-border); padding-bottom: var(--sl-spacing-sm); }
|
|
3761
|
+
.guide-content h2 { font-size: 1.3rem; border-bottom: 1px solid var(--sl-color-border); padding-bottom: var(--sl-spacing-xs); }
|
|
3762
|
+
.guide-content h3 { font-size: 1.1rem; }
|
|
3763
|
+
.guide-content h4 { font-size: 1rem; }
|
|
3764
|
+
.guide-content h1:first-child,
|
|
3765
|
+
.guide-content h2:first-child,
|
|
3766
|
+
.guide-content h3:first-child {
|
|
3767
|
+
margin-top: 0;
|
|
3768
|
+
}
|
|
3769
|
+
|
|
3770
|
+
.guide-content code {
|
|
3771
|
+
background: var(--sl-color-code-bg);
|
|
3772
|
+
padding: 2px 7px;
|
|
3773
|
+
border-radius: var(--sl-radius-sm);
|
|
3774
|
+
font-size: 0.85em;
|
|
3775
|
+
font-family: var(--sl-font-mono);
|
|
3776
|
+
border: 1px solid var(--sl-color-border);
|
|
3777
|
+
}
|
|
3778
|
+
|
|
3779
|
+
.guide-content pre {
|
|
3780
|
+
background: #0d1117;
|
|
3781
|
+
border: 1px solid #30363d;
|
|
3782
|
+
border-radius: var(--sl-radius-md);
|
|
3783
|
+
padding: var(--sl-spacing-md);
|
|
3784
|
+
overflow-x: auto;
|
|
3785
|
+
margin: var(--sl-spacing-md) 0;
|
|
3786
|
+
line-height: 1.6;
|
|
3787
|
+
}
|
|
3788
|
+
.guide-content pre code {
|
|
3789
|
+
background: none;
|
|
3790
|
+
border: none;
|
|
3791
|
+
padding: 0;
|
|
3792
|
+
border-radius: 0;
|
|
3793
|
+
color: #e6edf3;
|
|
3794
|
+
font-size: var(--sl-font-size-sm);
|
|
3795
|
+
font-family: var(--sl-font-mono);
|
|
3796
|
+
}
|
|
3797
|
+
|
|
3798
|
+
.guide-content a {
|
|
3799
|
+
color: var(--sl-color-primary);
|
|
3800
|
+
text-decoration: none;
|
|
3801
|
+
font-weight: 500;
|
|
3802
|
+
transition: all var(--sl-transition-fast);
|
|
3803
|
+
}
|
|
3804
|
+
.guide-content a:hover {
|
|
3805
|
+
text-decoration: underline;
|
|
3806
|
+
}
|
|
3807
|
+
|
|
3808
|
+
.guide-content table {
|
|
3809
|
+
width: 100%;
|
|
3810
|
+
border-collapse: separate;
|
|
3811
|
+
border-spacing: 0;
|
|
3812
|
+
border: 1px solid var(--sl-color-border);
|
|
3813
|
+
border-radius: var(--sl-radius-md);
|
|
3814
|
+
overflow: hidden;
|
|
3815
|
+
margin: var(--sl-spacing-md) 0;
|
|
3816
|
+
font-size: var(--sl-font-size-sm);
|
|
3817
|
+
}
|
|
3818
|
+
.guide-content thead {
|
|
3819
|
+
background: var(--sl-color-bg-subtle);
|
|
3820
|
+
}
|
|
3821
|
+
.guide-content th {
|
|
3822
|
+
text-align: left;
|
|
3823
|
+
padding: var(--sl-spacing-sm) var(--sl-spacing-md);
|
|
3824
|
+
font-weight: 600;
|
|
3825
|
+
color: var(--sl-color-text);
|
|
3826
|
+
border-bottom: 2px solid var(--sl-color-border);
|
|
3827
|
+
}
|
|
3828
|
+
.guide-content td {
|
|
3829
|
+
padding: var(--sl-spacing-sm) var(--sl-spacing-md);
|
|
3830
|
+
border-bottom: 1px solid var(--sl-color-border);
|
|
3831
|
+
color: var(--sl-color-text-secondary);
|
|
3832
|
+
}
|
|
3833
|
+
.guide-content tr:last-child td {
|
|
3834
|
+
border-bottom: none;
|
|
3835
|
+
}
|
|
3836
|
+
.guide-content tbody tr:hover {
|
|
3837
|
+
background: var(--sl-color-bg-subtle);
|
|
3838
|
+
}
|
|
3839
|
+
|
|
3840
|
+
.guide-content blockquote {
|
|
3841
|
+
border-left: 3px solid var(--sl-color-primary);
|
|
3842
|
+
background: rgba(99, 102, 241, 0.05);
|
|
3843
|
+
margin: var(--sl-spacing-md) 0;
|
|
3844
|
+
padding: var(--sl-spacing-sm) var(--sl-spacing-lg);
|
|
3845
|
+
border-radius: 0 var(--sl-radius-md) var(--sl-radius-md) 0;
|
|
3846
|
+
color: var(--sl-color-text-secondary);
|
|
3847
|
+
}
|
|
3848
|
+
.guide-content blockquote p {
|
|
3849
|
+
margin-bottom: var(--sl-spacing-xs);
|
|
3850
|
+
}
|
|
3851
|
+
|
|
3852
|
+
.guide-content ul,
|
|
3853
|
+
.guide-content ol {
|
|
3854
|
+
margin: var(--sl-spacing-sm) 0;
|
|
3855
|
+
padding-left: var(--sl-spacing-xl);
|
|
3856
|
+
}
|
|
3857
|
+
.guide-content li {
|
|
3858
|
+
margin-bottom: var(--sl-spacing-xs);
|
|
3859
|
+
}
|
|
3860
|
+
.guide-content li strong {
|
|
3861
|
+
color: var(--sl-color-text);
|
|
3862
|
+
}
|
|
3863
|
+
|
|
3864
|
+
.guide-content hr {
|
|
3865
|
+
border: none;
|
|
3866
|
+
height: 1px;
|
|
3867
|
+
background: var(--sl-color-border);
|
|
3868
|
+
margin: var(--sl-spacing-xl) 0;
|
|
3869
|
+
}
|
|
3870
|
+
|
|
3871
|
+
.guide-content img {
|
|
3872
|
+
max-width: 100%;
|
|
3873
|
+
height: auto;
|
|
3874
|
+
border-radius: var(--sl-radius-md);
|
|
3875
|
+
margin: var(--sl-spacing-sm) 0;
|
|
3876
|
+
}
|
|
3877
|
+
|
|
3878
|
+
/* ── Empty state ───────────────────── */
|
|
3879
|
+
.empty {
|
|
3880
|
+
display: flex;
|
|
3881
|
+
flex-direction: column;
|
|
3882
|
+
align-items: center;
|
|
3883
|
+
justify-content: center;
|
|
3884
|
+
min-height: 40vh;
|
|
3885
|
+
gap: var(--sl-spacing-md);
|
|
3886
|
+
color: var(--sl-color-text-muted);
|
|
3887
|
+
text-align: center;
|
|
3888
|
+
}
|
|
3889
|
+
|
|
3890
|
+
.empty-icon {
|
|
3891
|
+
font-size: 2rem;
|
|
3892
|
+
}
|
|
3893
|
+
|
|
3894
|
+
.empty-text {
|
|
3895
|
+
font-size: var(--sl-font-size-base);
|
|
3896
|
+
}
|
|
3897
|
+
|
|
3898
|
+
@media (max-width: 768px) {
|
|
3899
|
+
:host {
|
|
3900
|
+
padding: var(--sl-spacing-md);
|
|
3901
|
+
}
|
|
3902
|
+
}
|
|
3903
|
+
`],Of([Oe({type:Object})],jf.prototype,"guide",2),jf=Of([_e("sl-guide-view")],jf);var Pf=Object.defineProperty,Ef=Object.getOwnPropertyDescriptor,Tf=(e,t,r,n)=>{for(var o,s=n>1?void 0:n?Ef(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(s=(n?o(t,r,s):o(s))||s);return n&&s&&Pf(t,r,s),s};e.SpecLensElement=class extends xe{constructor(){super(...arguments),this.specUrl="",this.proxyUrl="",this.theme="auto",this.hideTryIt=!1,this.hideCodeSamples=!1,this.hideAskAi=!1,this.layout="page",this.guidesUrl="",this.config={},this._spec=null,this._loading=!1,this._error=null,this._sidebarOpen=!1,this._authOpen=!1,this._activeOperationId="",this._navigateToId="",this._authState={apiKeys:{},bearerTokens:{}},this._tryItOperation=null,this._activeTab="api",this._guideCategories=[],this._loadedGuides=new Map,this._activeGuideSlug="",this._searchOpen=!1,this._tryItAiMenuOpen=!1,this._tryItAiMenuRect=null,this._search=null,this._router=null,this._themeManager=null,this._observer=null,this._handleKeyDown=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key&&(e.preventDefault(),this._searchOpen=!0)}}get _hasGuides(){return this._guideCategories.length>0}connectedCallback(){super.connectedCallback(),this._themeManager=new rp(this),this._themeManager.init(this.theme),this._router=new Hc(e=>{"operation"===e.type?(this._activeTab="api",this._activeOperationId=e.id,this._navigateToId=e.id,this._scrollToOperation(e.id)):"guide"===e.type&&(this._activeTab="guides",this._activeGuideSlug=e.slug)}),this._router.init(),document.addEventListener("keydown",this._handleKeyDown)}disconnectedCallback(){var e,t,r;super.disconnectedCallback(),null==(e=this._router)||e.destroy(),null==(t=this._themeManager)||t.destroy(),null==(r=this._observer)||r.disconnect(),document.removeEventListener("keydown",this._handleKeyDown)}willUpdate(e){var t;(e.has("specUrl")||e.has("config"))&&this._loadSpec(),(e.has("guidesUrl")||e.has("config"))&&this._loadGuides(),e.has("theme")&&(null==(t=this._themeManager)||t.setTheme(this.theme))}async _loadSpec(){var e,t;const r=(null==(e=this.config)?void 0:e.spec)||this.specUrl;if(r){this._loading=!0,this._error=null,this._spec=null;try{const e=await rc(r);this._spec=e,this._search=Bc(e.allOperations),this._loading=!1,await this.updateComplete,null==(t=this._router)||t.handleCurrentRoute(),this._setupScrollTracking()}catch(n){this._loading=!1,this._error=n instanceof Error?n.message:String(n)}}}_setupScrollTracking(){var e;null==(e=this._observer)||e.disconnect(),this._observer=new IntersectionObserver(e=>{for(const t of e)if(t.isIntersecting){const e=t.target.id;"introduction"===e?this._activeOperationId="":e.startsWith("op-")&&(this._activeOperationId=e.replace("op-",""))}},{root:null,rootMargin:"-20% 0px -70% 0px",threshold:0});const t=this.renderRoot.querySelector("#introduction");t&&this._observer.observe(t);this.renderRoot.querySelectorAll('[id^="op-"]').forEach(e=>this._observer.observe(e))}_scrollToOperation(e){if(!e)return;const t=this.renderRoot.querySelector(`#op-${CSS.escape(e)}`);null==t||t.scrollIntoView({behavior:"smooth",block:"start"})}_scrollToIntro(){this._activeOperationId="";const e=this.renderRoot.querySelector("#introduction");null==e||e.scrollIntoView({behavior:"smooth",block:"start"})}_handleThemeToggle(){var e;const t=(null==(e=this._themeManager)?void 0:e.toggle())??"auto";this.theme=t}_handleAuthUpdate(e){this._authState=e.detail}_handleTryIt(e){this._tryItOperation=e.detail}_toggleTryItAiMenu(e){if(this._tryItAiMenuOpen||(this._tryItAiMenuRect=e.currentTarget.getBoundingClientRect()),this._tryItAiMenuOpen=!this._tryItAiMenuOpen,this._tryItAiMenuOpen){const e=t=>{const r=t.composedPath(),n=this.renderRoot.querySelector(".try-it-ask-ai-wrapper"),o=this.renderRoot.querySelector(".try-it-ai-menu");r.includes(n)||r.includes(o)||(this._tryItAiMenuOpen=!1,document.removeEventListener("click",e,!0))};requestAnimationFrame(()=>document.addEventListener("click",e,!0))}}_openTryItAi(e){if(this._tryItAiMenuOpen=!1,!this._tryItOperation)return;const t=op(np(this._tryItOperation),e);window.open(t,"_blank","noopener,noreferrer")}setTheme(e){this.theme=e}async _loadGuides(){var e,t;const r=null==(e=this.config)?void 0:e.guides,n=this.guidesUrl||(null==(t=this.config)?void 0:t.guidesUrl);if(!(null==r?void 0:r.length)&&!n)return this._guideCategories=[],void(this._loadedGuides=new Map);try{const{categories:e,loaded:t}=await async function(e,t){let r=[];if(t){const e=await fetch(t);if(!e.ok)throw new Error(`Failed to load guides manifest: ${e.status}`);r=await e.json()}if(null==e?void 0:e.length){const t=new Map;for(const e of r)t.set(e.slug,e);for(const r of e)t.set(r.slug,r);r=Array.from(t.values())}if(!r.length)return{categories:[],loaded:new Map};const n=new Map;await Promise.all(r.map(async e=>{let t=e.content??"";if(!t&&e.url){const r=await fetch(e.url);r.ok&&(t=await r.text())}const r=t?(await ep.parse(t)).replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").replace(/<iframe\b[^>]*>.*?<\/iframe>/gi,"").replace(/<object\b[^>]*>.*?<\/object>/gi,"").replace(/<embed\b[^>]*>/gi,"").replace(/\bon\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,"").replace(/href\s*=\s*"javascript:[^"]*"/gi,'href="#"').replace(/href\s*=\s*'javascript:[^']*'/gi,"href='#'"):"";n.set(e.slug,{...e,htmlContent:r})}));const o=new Map;for(const i of r){const e=i.category||"General";o.has(e)||o.set(e,[]),o.get(e).push(i)}const s=[];for(const[i,a]of o)a.sort((e,t)=>(e.order??1/0)-(t.order??1/0)),s.push({name:i,guides:a});return{categories:s,loaded:n}}(r,n);if(this._guideCategories=e,this._loadedGuides=t,this._spec){const t=e.flatMap(e=>e.guides);this._search=Bc(this._spec.allOperations,t)}}catch(o){console.warn("[SpecLens] Failed to load guides:",o)}}_handleTabChange(e){var t;if(this._activeTab=e.detail,"api"===e.detail)this._activeOperationId?window.location.hash=`#/operation/${encodeURIComponent(this._activeOperationId)}`:history.replaceState(null,"",window.location.pathname);else if("guides"===e.detail&&!this._activeGuideSlug&&this._guideCategories.length){const e=this._guideCategories[0].guides[0];e&&(null==(t=this._router)||t.navigateToGuide(e.slug))}}_handleGuideNavigate(e){var t;null==(t=this._router)||t.navigateToGuide(e.detail)}_handleSearchSelectOperation(e){var t;this._searchOpen=!1,this._activeTab="api",null==(t=this._router)||t.navigateTo(e.detail)}_handleSearchSelectGuide(e){var t;this._searchOpen=!1,this._activeTab="guides",null==(t=this._router)||t.navigateToGuide(e.detail)}render(){var e,t;return ne`
|
|
2855
3904
|
<div class="sl-root" data-theme=${(null==(e=this._themeManager)?void 0:e.resolved)??"light"}>
|
|
2856
3905
|
${this._spec?ne`
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
3906
|
+
${"page"===this.layout?ne`
|
|
3907
|
+
<sl-header
|
|
3908
|
+
.spec=${this._spec}
|
|
3909
|
+
.authOpen=${this._authOpen}
|
|
3910
|
+
.activeTab=${this._activeTab}
|
|
3911
|
+
.showTabs=${this._hasGuides}
|
|
3912
|
+
@toggle-theme=${this._handleThemeToggle}
|
|
3913
|
+
@toggle-sidebar=${()=>this._sidebarOpen=!this._sidebarOpen}
|
|
3914
|
+
@toggle-auth=${()=>this._authOpen=!this._authOpen}
|
|
3915
|
+
@tab-change=${this._handleTabChange}
|
|
3916
|
+
@open-search=${()=>this._searchOpen=!0}
|
|
3917
|
+
>
|
|
3918
|
+
<slot name="logo" slot="logo"></slot>
|
|
3919
|
+
<slot name="header-actions" slot="header-actions"></slot>
|
|
3920
|
+
</sl-header>
|
|
3921
|
+
`:null}
|
|
2864
3922
|
|
|
3923
|
+
${"api"===this._activeTab?ne`
|
|
2865
3924
|
<div class="sl-body">
|
|
2866
3925
|
<sl-sidebar
|
|
2867
3926
|
.tagGroups=${this._spec.tagGroups}
|
|
2868
3927
|
.activeOperationId=${this._activeOperationId}
|
|
2869
3928
|
.open=${this._sidebarOpen}
|
|
2870
3929
|
.searchEngine=${this._search}
|
|
3930
|
+
.layout=${this.layout}
|
|
3931
|
+
.securitySchemes=${this._spec.securitySchemes}
|
|
2871
3932
|
@navigate=${e=>{var t;return null==(t=this._router)?void 0:t.navigateTo(e.detail)}}
|
|
2872
3933
|
@navigate-intro=${()=>this._scrollToIntro()}
|
|
2873
3934
|
@close-sidebar=${()=>this._sidebarOpen=!1}
|
|
3935
|
+
@toggle-auth=${()=>this._authOpen=!this._authOpen}
|
|
2874
3936
|
></sl-sidebar>
|
|
2875
3937
|
|
|
2876
3938
|
<main class="sl-main">
|
|
@@ -2925,6 +3987,7 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
2925
3987
|
.activeOperationId=${this._navigateToId}
|
|
2926
3988
|
?hide-try-it=${this.hideTryIt||(null==(r=this.config)?void 0:r.hideTryIt)}
|
|
2927
3989
|
?hide-code-samples=${this.hideCodeSamples||(null==(n=this.config)?void 0:n.hideCodeSamples)}
|
|
3990
|
+
?hide-ask-ai=${this.hideAskAi}
|
|
2928
3991
|
@try-it=${this._handleTryIt}
|
|
2929
3992
|
></sl-operation>
|
|
2930
3993
|
`})}
|
|
@@ -2932,6 +3995,22 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
2932
3995
|
`)}
|
|
2933
3996
|
</main>
|
|
2934
3997
|
</div>
|
|
3998
|
+
`:null}
|
|
3999
|
+
|
|
4000
|
+
${"guides"===this._activeTab&&this._hasGuides?ne`
|
|
4001
|
+
<div class="sl-body">
|
|
4002
|
+
<sl-guide-sidebar
|
|
4003
|
+
.categories=${this._guideCategories}
|
|
4004
|
+
.activeGuideSlug=${this._activeGuideSlug}
|
|
4005
|
+
.open=${this._sidebarOpen}
|
|
4006
|
+
@navigate-guide=${this._handleGuideNavigate}
|
|
4007
|
+
@close-sidebar=${()=>this._sidebarOpen=!1}
|
|
4008
|
+
></sl-guide-sidebar>
|
|
4009
|
+
<sl-guide-view
|
|
4010
|
+
.guide=${this._loadedGuides.get(this._activeGuideSlug)??null}
|
|
4011
|
+
></sl-guide-view>
|
|
4012
|
+
</div>
|
|
4013
|
+
`:null}
|
|
2935
4014
|
|
|
2936
4015
|
${this._authOpen&&this._spec.securitySchemes.length>0?ne`
|
|
2937
4016
|
<sl-auth
|
|
@@ -2949,6 +4028,16 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
2949
4028
|
<div class="try-it-header">
|
|
2950
4029
|
<span class="method-badge method-${this._tryItOperation.method}">${this._tryItOperation.method}</span>
|
|
2951
4030
|
<span class="try-it-path">${this._tryItOperation.path}</span>
|
|
4031
|
+
${this.hideAskAi?null:ne`
|
|
4032
|
+
<div class="try-it-ask-ai-wrapper">
|
|
4033
|
+
<button class="try-it-ask-ai-btn" @click=${this._toggleTryItAiMenu}>
|
|
4034
|
+
<svg width="12" height="12" viewBox="0 0 16 16" fill="currentColor">
|
|
4035
|
+
<path d="M8 1l1.5 3.5L13 6l-3.5 1.5L8 11 6.5 7.5 3 6l3.5-1.5L8 1zM3 11l.75 1.75L5.5 13.5l-1.75.75L3 16l-.75-1.75L.5 13.5l1.75-.75L3 11zM12.5 10l.75 1.75 1.75.75-1.75.75-.75 1.75-.75-1.75L10 12.5l1.75-.75.75-1.75z"/>
|
|
4036
|
+
</svg>
|
|
4037
|
+
Ask AI
|
|
4038
|
+
</button>
|
|
4039
|
+
</div>
|
|
4040
|
+
`}
|
|
2952
4041
|
<button class="try-it-close" @click=${()=>this._tryItOperation=null}>
|
|
2953
4042
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
2954
4043
|
<path d="M4 4l8 8M12 4l-8 8" stroke-linecap="round"/>
|
|
@@ -2966,6 +4055,22 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
2966
4055
|
</div>
|
|
2967
4056
|
</div>
|
|
2968
4057
|
</div>
|
|
4058
|
+
${this._tryItAiMenuOpen&&this._tryItAiMenuRect?ne`
|
|
4059
|
+
<div class="try-it-ai-menu" style="top:${this._tryItAiMenuRect.bottom+4}px;right:${window.innerWidth-this._tryItAiMenuRect.right}px">
|
|
4060
|
+
<button class="try-it-ai-menu-item" @click=${()=>this._openTryItAi("chatgpt")}>
|
|
4061
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
|
|
4062
|
+
<path d="M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.141-.081 4.779-2.758a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.677l5.815 3.355-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667zm2.01-3.023l-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135l-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.795.795 0 0 0-.393.681zm1.097-2.365l2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.612-1.5z"/>
|
|
4063
|
+
</svg>
|
|
4064
|
+
ChatGPT
|
|
4065
|
+
</button>
|
|
4066
|
+
<button class="try-it-ai-menu-item" @click=${()=>this._openTryItAi("claude")}>
|
|
4067
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
|
|
4068
|
+
<path d="M13.827 3.52h-3.654L5 20.48h3.213l1.436-4.115h4.847l1.367 4.115H19L13.827 3.52zm-3.192 10.6 1.85-5.3 1.744 5.3h-3.594z"/>
|
|
4069
|
+
</svg>
|
|
4070
|
+
Claude
|
|
4071
|
+
</button>
|
|
4072
|
+
</div>
|
|
4073
|
+
`:null}
|
|
2969
4074
|
`:null}
|
|
2970
4075
|
`:null}
|
|
2971
4076
|
|
|
@@ -2983,8 +4088,17 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
2983
4088
|
<div class="sl-error-detail">${this._error}</div>
|
|
2984
4089
|
</div>
|
|
2985
4090
|
`:null}
|
|
4091
|
+
|
|
4092
|
+
${this._searchOpen?ne`
|
|
4093
|
+
<sl-search
|
|
4094
|
+
.searchEngine=${this._search}
|
|
4095
|
+
@close=${()=>this._searchOpen=!1}
|
|
4096
|
+
@select-operation=${this._handleSearchSelectOperation}
|
|
4097
|
+
@select-guide=${this._handleSearchSelectGuide}
|
|
4098
|
+
></sl-search>
|
|
4099
|
+
`:null}
|
|
2986
4100
|
</div>
|
|
2987
|
-
`}},e.SpecLensElement.styles=[
|
|
4101
|
+
`}},e.SpecLensElement.styles=[Ee,Te,Ae,b`
|
|
2988
4102
|
:host {
|
|
2989
4103
|
display: block;
|
|
2990
4104
|
font-family: var(--sl-font-family);
|
|
@@ -3493,10 +4607,85 @@ const pu=2;class uu{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r)
|
|
|
3493
4607
|
padding: 0;
|
|
3494
4608
|
}
|
|
3495
4609
|
|
|
4610
|
+
/* ── Ask AI in Try-It modal ──────────── */
|
|
4611
|
+
.try-it-ask-ai-wrapper {
|
|
4612
|
+
position: relative;
|
|
4613
|
+
flex-shrink: 0;
|
|
4614
|
+
}
|
|
4615
|
+
|
|
4616
|
+
.try-it-ask-ai-btn {
|
|
4617
|
+
display: inline-flex;
|
|
4618
|
+
align-items: center;
|
|
4619
|
+
gap: 5px;
|
|
4620
|
+
padding: 4px 12px;
|
|
4621
|
+
border-radius: var(--sl-radius-md);
|
|
4622
|
+
font-size: var(--sl-font-size-xs);
|
|
4623
|
+
font-weight: 600;
|
|
4624
|
+
color: var(--sl-color-text-muted);
|
|
4625
|
+
border: 1px solid var(--sl-color-border);
|
|
4626
|
+
background: transparent;
|
|
4627
|
+
cursor: pointer;
|
|
4628
|
+
transition: all var(--sl-transition-fast);
|
|
4629
|
+
white-space: nowrap;
|
|
4630
|
+
}
|
|
4631
|
+
|
|
4632
|
+
.try-it-ask-ai-btn:hover {
|
|
4633
|
+
background: var(--sl-color-surface-raised);
|
|
4634
|
+
color: var(--sl-color-text);
|
|
4635
|
+
border-color: var(--sl-color-text-muted);
|
|
4636
|
+
}
|
|
4637
|
+
|
|
4638
|
+
.try-it-ai-menu {
|
|
4639
|
+
position: fixed;
|
|
4640
|
+
z-index: 9999;
|
|
4641
|
+
min-width: 150px;
|
|
4642
|
+
background: var(--sl-color-surface);
|
|
4643
|
+
border: 1px solid var(--sl-color-border);
|
|
4644
|
+
border-radius: var(--sl-radius-md);
|
|
4645
|
+
box-shadow: var(--sl-shadow-md);
|
|
4646
|
+
padding: 4px 0;
|
|
4647
|
+
animation: sl-menu-in 120ms ease;
|
|
4648
|
+
}
|
|
4649
|
+
|
|
4650
|
+
@keyframes sl-menu-in {
|
|
4651
|
+
from { opacity: 0; transform: translateY(-4px); }
|
|
4652
|
+
to { opacity: 1; transform: translateY(0); }
|
|
4653
|
+
}
|
|
4654
|
+
|
|
4655
|
+
.try-it-ai-menu-item {
|
|
4656
|
+
display: flex;
|
|
4657
|
+
align-items: center;
|
|
4658
|
+
gap: 8px;
|
|
4659
|
+
width: 100%;
|
|
4660
|
+
padding: 8px 14px;
|
|
4661
|
+
font-size: var(--sl-font-size-sm);
|
|
4662
|
+
color: var(--sl-color-text);
|
|
4663
|
+
cursor: pointer;
|
|
4664
|
+
transition: background var(--sl-transition-fast);
|
|
4665
|
+
white-space: nowrap;
|
|
4666
|
+
text-align: left;
|
|
4667
|
+
background: none;
|
|
4668
|
+
border: none;
|
|
4669
|
+
}
|
|
4670
|
+
|
|
4671
|
+
.try-it-ai-menu-item:hover {
|
|
4672
|
+
background: var(--sl-color-bg-subtle);
|
|
4673
|
+
}
|
|
4674
|
+
|
|
4675
|
+
.try-it-ai-menu-item svg {
|
|
4676
|
+
flex-shrink: 0;
|
|
4677
|
+
}
|
|
4678
|
+
|
|
3496
4679
|
@media (max-width: 768px) {
|
|
3497
4680
|
.sl-main {
|
|
3498
4681
|
padding: var(--sl-spacing-md);
|
|
3499
4682
|
}
|
|
3500
4683
|
}
|
|
3501
|
-
|
|
4684
|
+
|
|
4685
|
+
/* ── Embed mode ──────────────────────── */
|
|
4686
|
+
:host([layout="embed"]) {
|
|
4687
|
+
--sl-header-height: 0px;
|
|
4688
|
+
min-height: unset;
|
|
4689
|
+
}
|
|
4690
|
+
`],Tf([Oe({attribute:"spec-url"})],e.SpecLensElement.prototype,"specUrl",2),Tf([Oe({attribute:"proxy-url"})],e.SpecLensElement.prototype,"proxyUrl",2),Tf([Oe({attribute:"theme",reflect:!0})],e.SpecLensElement.prototype,"theme",2),Tf([Oe({type:Boolean,attribute:"hide-try-it"})],e.SpecLensElement.prototype,"hideTryIt",2),Tf([Oe({type:Boolean,attribute:"hide-code-samples"})],e.SpecLensElement.prototype,"hideCodeSamples",2),Tf([Oe({type:Boolean,attribute:"hide-ask-ai"})],e.SpecLensElement.prototype,"hideAskAi",2),Tf([Oe({reflect:!0,attribute:"layout"})],e.SpecLensElement.prototype,"layout",2),Tf([Oe({attribute:"guides-url"})],e.SpecLensElement.prototype,"guidesUrl",2),Tf([je()],e.SpecLensElement.prototype,"_spec",2),Tf([je()],e.SpecLensElement.prototype,"_loading",2),Tf([je()],e.SpecLensElement.prototype,"_error",2),Tf([je()],e.SpecLensElement.prototype,"_sidebarOpen",2),Tf([je()],e.SpecLensElement.prototype,"_authOpen",2),Tf([je()],e.SpecLensElement.prototype,"_activeOperationId",2),Tf([je()],e.SpecLensElement.prototype,"_navigateToId",2),Tf([je()],e.SpecLensElement.prototype,"_authState",2),Tf([je()],e.SpecLensElement.prototype,"_tryItOperation",2),Tf([je()],e.SpecLensElement.prototype,"_activeTab",2),Tf([je()],e.SpecLensElement.prototype,"_guideCategories",2),Tf([je()],e.SpecLensElement.prototype,"_loadedGuides",2),Tf([je()],e.SpecLensElement.prototype,"_activeGuideSlug",2),Tf([je()],e.SpecLensElement.prototype,"_searchOpen",2),Tf([je()],e.SpecLensElement.prototype,"_tryItAiMenuOpen",2),Tf([je()],e.SpecLensElement.prototype,"_tryItAiMenuRect",2),e.SpecLensElement=Tf([_e("spec-lens")],e.SpecLensElement),void 0===globalThis.Buffer&&(globalThis.Buffer=h.Buffer),customElements.get("spec-lens")||customElements.define("spec-lens",e.SpecLensElement);const Af={init(e,t){const r=document.querySelector(e);if(!r)throw new Error(`[SpecLens] Container not found: ${e}`);const n=document.createElement("spec-lens");return t.specUrl&&n.setAttribute("spec-url",t.specUrl),t.theme&&"auto"!==t.theme&&n.setAttribute("theme",t.theme),t.proxyUrl&&n.setAttribute("proxy-url",t.proxyUrl),t.hideTryIt&&n.setAttribute("hide-try-it",""),t.hideCodeSamples&&n.setAttribute("hide-code-samples",""),t.guidesUrl&&n.setAttribute("guides-url",t.guidesUrl),n.config=t,r.appendChild(n),n}};return e.SpecLens=Af,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e}({});
|
|
3502
4691
|
//# sourceMappingURL=speclens.iife.js.map
|