@fern-api/swift-dynamic-snippets 0.1.0 → 0.25.4

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.
Files changed (93) hide show
  1. package/dist/index.cjs +39 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.cts +145 -0
  4. package/dist/index.d.ts +145 -0
  5. package/dist/index.js +39 -0
  6. package/dist/index.js.map +1 -0
  7. package/package.json +11 -12
  8. package/cjs/Config.cjs +0 -12
  9. package/cjs/Config.cjs.map +0 -1
  10. package/cjs/Config.d.cts +0 -4
  11. package/cjs/DynamicSnippetsGenerator.cjs +0 -23
  12. package/cjs/DynamicSnippetsGenerator.cjs.map +0 -1
  13. package/cjs/DynamicSnippetsGenerator.d.cts +0 -18
  14. package/cjs/EndpointSnippetGenerator.cjs +0 -12
  15. package/cjs/EndpointSnippetGenerator.cjs.map +0 -1
  16. package/cjs/EndpointSnippetGenerator.d.cts +0 -54
  17. package/cjs/context/DynamicSnippetsGeneratorContext.cjs +0 -23
  18. package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +0 -1
  19. package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +0 -4
  20. package/cjs/context/DynamicTypeLiteralMapper.cjs +0 -23
  21. package/cjs/context/DynamicTypeLiteralMapper.cjs.map +0 -1
  22. package/cjs/context/DynamicTypeLiteralMapper.d.cts +0 -4
  23. package/cjs/context/DynamicTypeMapper.cjs +0 -23
  24. package/cjs/context/DynamicTypeMapper.cjs.map +0 -1
  25. package/cjs/context/DynamicTypeMapper.d.cts +0 -4
  26. package/cjs/context/FilePropertyMapper.cjs +0 -12
  27. package/cjs/context/FilePropertyMapper.cjs.map +0 -1
  28. package/cjs/context/FilePropertyMapper.d.cts +0 -4
  29. package/cjs/context/index.cjs +0 -23
  30. package/cjs/context/index.cjs.map +0 -1
  31. package/cjs/context/index.d.cts +0 -4
  32. package/cjs/index-DS-GXEiz.d.cts +0 -89
  33. package/cjs/index.cjs +0 -35
  34. package/cjs/index.cjs.map +0 -1
  35. package/cjs/index.d.cts +0 -7
  36. package/cjs/util/pascal-case.cjs +0 -23
  37. package/cjs/util/pascal-case.cjs.map +0 -1
  38. package/cjs/util/pascal-case.d.cts +0 -3
  39. package/esm/Config.d.ts +0 -4
  40. package/esm/Config.js +0 -2
  41. package/esm/Config.js.map +0 -1
  42. package/esm/DynamicSnippetsGenerator.d.ts +0 -18
  43. package/esm/DynamicSnippetsGenerator.js +0 -2
  44. package/esm/DynamicSnippetsGenerator.js.map +0 -1
  45. package/esm/EndpointSnippetGenerator.d.ts +0 -54
  46. package/esm/EndpointSnippetGenerator.js +0 -2
  47. package/esm/EndpointSnippetGenerator.js.map +0 -1
  48. package/esm/chunk-243PMR4C.js +0 -2
  49. package/esm/chunk-243PMR4C.js.map +0 -1
  50. package/esm/chunk-4YR7VIA5.js +0 -2
  51. package/esm/chunk-4YR7VIA5.js.map +0 -1
  52. package/esm/chunk-7GLUP3NF.js +0 -2
  53. package/esm/chunk-7GLUP3NF.js.map +0 -1
  54. package/esm/chunk-BGT34OGK.js +0 -15
  55. package/esm/chunk-BGT34OGK.js.map +0 -1
  56. package/esm/chunk-F6NGJ242.js +0 -2
  57. package/esm/chunk-F6NGJ242.js.map +0 -1
  58. package/esm/chunk-JBDWOK23.js +0 -2
  59. package/esm/chunk-JBDWOK23.js.map +0 -1
  60. package/esm/chunk-NEAKFXXW.js +0 -2
  61. package/esm/chunk-NEAKFXXW.js.map +0 -1
  62. package/esm/chunk-NH2Q3QVN.js +0 -2
  63. package/esm/chunk-NH2Q3QVN.js.map +0 -1
  64. package/esm/chunk-P4BOVZKM.js +0 -2
  65. package/esm/chunk-P4BOVZKM.js.map +0 -1
  66. package/esm/chunk-PKOEJ7HU.js +0 -12
  67. package/esm/chunk-PKOEJ7HU.js.map +0 -1
  68. package/esm/chunk-QKXS634U.js +0 -2
  69. package/esm/chunk-QKXS634U.js.map +0 -1
  70. package/esm/chunk-T6A4SG7G.js +0 -2
  71. package/esm/chunk-T6A4SG7G.js.map +0 -1
  72. package/esm/context/DynamicSnippetsGeneratorContext.d.ts +0 -4
  73. package/esm/context/DynamicSnippetsGeneratorContext.js +0 -2
  74. package/esm/context/DynamicSnippetsGeneratorContext.js.map +0 -1
  75. package/esm/context/DynamicTypeLiteralMapper.d.ts +0 -4
  76. package/esm/context/DynamicTypeLiteralMapper.js +0 -2
  77. package/esm/context/DynamicTypeLiteralMapper.js.map +0 -1
  78. package/esm/context/DynamicTypeMapper.d.ts +0 -4
  79. package/esm/context/DynamicTypeMapper.js +0 -2
  80. package/esm/context/DynamicTypeMapper.js.map +0 -1
  81. package/esm/context/FilePropertyMapper.d.ts +0 -4
  82. package/esm/context/FilePropertyMapper.js +0 -2
  83. package/esm/context/FilePropertyMapper.js.map +0 -1
  84. package/esm/context/index.d.ts +0 -4
  85. package/esm/context/index.js +0 -2
  86. package/esm/context/index.js.map +0 -1
  87. package/esm/index-DS-GXEiz.d.ts +0 -89
  88. package/esm/index.d.ts +0 -7
  89. package/esm/index.js +0 -14
  90. package/esm/index.js.map +0 -1
  91. package/esm/util/pascal-case.d.ts +0 -3
  92. package/esm/util/pascal-case.js +0 -2
  93. package/esm/util/pascal-case.js.map +0 -1
@@ -1,4 +0,0 @@
1
- export { D as DynamicSnippetsGeneratorContext, F as FilePropertyInfo, c as FilePropertyMapper } from '../index-DS-GXEiz.cjs';
2
- import '@fern-api/browser-compatible-base-generator';
3
- import '@fern-api/dynamic-ir-sdk';
4
- import '@fern-api/swift-codegen';
@@ -1,89 +0,0 @@
1
- import { AbstractDynamicSnippetsGeneratorContext, FernGeneratorExec, Options } from '@fern-api/browser-compatible-base-generator';
2
- import { FernIr } from '@fern-api/dynamic-ir-sdk';
3
- import { swift, BaseSwiftCustomConfigSchema } from '@fern-api/swift-codegen';
4
-
5
- declare namespace DynamicTypeLiteralMapper {
6
- interface Args {
7
- typeReference: FernIr.dynamic.TypeReference;
8
- value: unknown;
9
- as?: ConvertedAs;
10
- }
11
- type ConvertedAs = "mapKey" | "mapValue";
12
- }
13
- declare class DynamicTypeLiteralMapper {
14
- private context;
15
- constructor({ context }: {
16
- context: DynamicSnippetsGeneratorContext;
17
- });
18
- convert(args: DynamicTypeLiteralMapper.Args): swift.Expression;
19
- private convertList;
20
- private convertMap;
21
- private convertNamed;
22
- private convertNullable;
23
- private convertDiscriminatedUnion;
24
- private convertDiscriminatedUnionProperties;
25
- private getBaseFields;
26
- private convertEnum;
27
- private getEnumValue;
28
- private convertObject;
29
- private convertUndiscriminatedUnion;
30
- private findMatchingUndiscriminatedUnionType;
31
- private convertUnknown;
32
- private convertPrimitive;
33
- private getValueAsNumber;
34
- private getValueAsBoolean;
35
- }
36
-
37
- declare namespace DynamicTypeMapper {
38
- interface Args {
39
- typeReference: FernIr.dynamic.TypeReference;
40
- }
41
- }
42
- declare class DynamicTypeMapper {
43
- private context;
44
- constructor({ context }: {
45
- context: DynamicSnippetsGeneratorContext;
46
- });
47
- convert(args: DynamicTypeMapper.Args): swift.Type;
48
- private convertNamed;
49
- private convertLiteral;
50
- private convertUnknown;
51
- private convertPrimitive;
52
- }
53
-
54
- interface FilePropertyInfo {
55
- fileFields: swift.FunctionArgument[];
56
- bodyPropertyFields: swift.FunctionArgument[];
57
- }
58
- declare class FilePropertyMapper {
59
- private context;
60
- constructor({ context }: {
61
- context: DynamicSnippetsGeneratorContext;
62
- });
63
- getFilePropertyInfo({ body, value }: {
64
- body: FernIr.dynamic.FileUploadRequestBody;
65
- value: unknown;
66
- }): FilePropertyInfo;
67
- private getSingleFileProperty;
68
- private getArrayFileProperty;
69
- private getBodyProperty;
70
- }
71
-
72
- declare class DynamicSnippetsGeneratorContext extends AbstractDynamicSnippetsGeneratorContext {
73
- ir: FernIr.dynamic.DynamicIntermediateRepresentation;
74
- customConfig: BaseSwiftCustomConfigSchema | undefined;
75
- dynamicTypeMapper: DynamicTypeMapper;
76
- dynamicTypeLiteralMapper: DynamicTypeLiteralMapper;
77
- filePropertyMapper: FilePropertyMapper;
78
- constructor({ ir, config, options }: {
79
- ir: FernIr.dynamic.DynamicIntermediateRepresentation;
80
- config: FernGeneratorExec.GeneratorConfig;
81
- options?: Options;
82
- });
83
- clone(): DynamicSnippetsGeneratorContext;
84
- getModuleName(): string;
85
- getRootClientClassName(): string;
86
- private getApiName;
87
- }
88
-
89
- export { DynamicSnippetsGeneratorContext as D, type FilePropertyInfo as F, DynamicTypeLiteralMapper as a, DynamicTypeMapper as b, FilePropertyMapper as c };
package/cjs/index.cjs DELETED
@@ -1,35 +0,0 @@
1
- "use strict";var gf=Object.create;var Be=Object.defineProperty,vf=Object.defineProperties,wf=Object.getOwnPropertyDescriptor,bf=Object.getOwnPropertyDescriptors,Ef=Object.getOwnPropertyNames,cr=Object.getOwnPropertySymbols,Sf=Object.getPrototypeOf,ft=Object.prototype.hasOwnProperty,On=Object.prototype.propertyIsEnumerable;var ut=(t,e,r)=>e in t?Be(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Fn=(t,e)=>{for(var r in e||(e={}))ft.call(e,r)&&ut(t,r,e[r]);if(cr)for(var r of cr(e))On.call(e,r)&&ut(t,r,e[r]);return t},Cn=(t,e)=>vf(t,bf(e));var qn=t=>typeof t=="symbol"?t:t+"",Nn=(t,e)=>{var r={};for(var n in t)ft.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&cr)for(var n of cr(t))e.indexOf(n)<0&&On.call(t,n)&&(r[n]=t[n]);return r};var he=(t,e)=>()=>(t&&(e=t(t=0)),e);var d=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Un=(t,e)=>{for(var r in e)Be(t,r,{get:e[r],enumerable:!0})},Bn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Ef(e))!ft.call(t,o)&&o!==r&&Be(t,o,{get:()=>e[o],enumerable:!(n=wf(e,o))||n.enumerable});return t};var Af=(t,e,r)=>(r=t!=null?gf(Sf(t)):{},Bn(e||!t||!t.__esModule?Be(r,"default",{value:t,enumerable:!0}):r,t)),Mn=t=>Bn(Be({},"__esModule",{value:!0}),t);var E=(t,e,r)=>ut(t,typeof e!="symbol"?e+"":e,r);function _n(){throw new Error("setTimeout has not been defined")}function $n(){throw new Error("clearTimeout has not been defined")}function Ln(t){if(Z===setTimeout)return setTimeout(t,0);if((Z===_n||!Z)&&setTimeout)return Z=setTimeout,setTimeout(t,0);try{return Z(t,0)}catch(e){try{return Z.call(null,t,0)}catch(r){return Z.call(this,t,0)}}}function Rf(t){if(Q===clearTimeout)return clearTimeout(t);if((Q===$n||!Q)&&clearTimeout)return Q=clearTimeout,clearTimeout(t);try{return Q(t)}catch(e){try{return Q.call(null,t)}catch(r){return Q.call(this,t)}}}function Tf(){!ge||!ae||(ge=!1,ae.length?G=ae.concat(G):dr=-1,G.length&&kn())}function kn(){if(!ge){var t=Ln(Tf);ge=!0;for(var e=G.length;e;){for(ae=G,G=[];++dr<e;)ae&&ae[dr].run();dr=-1,e=G.length}ae=null,ge=!1,Rf(t)}}function If(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];G.push(new Wn(t,e)),G.length===1&&!ge&&Ln(kn)}function Wn(t,e){this.fun=t,this.array=e}function se(){}function Gf(t){throw new Error("process.binding is not supported")}function zf(){return"/"}function Vf(t){throw new Error("process.chdir is not supported")}function Yf(){return 0}function Jf(t){var e=Hf.call(xe)*.001,r=Math.floor(e),n=Math.floor(e%1*1e9);return t&&(r=r-t[0],n=n-t[1],n<0&&(r--,n+=1e9)),[r,n]}function Zf(){var t=new Date,e=t-Kf;return e/1e3}var Z,Q,G,ge,ae,dr,Pf,Of,Ff,Cf,qf,Nf,Uf,Bf,Mf,Df,_f,$f,Lf,kf,Wf,jf,xe,Hf,Kf,c,Dn,a=he(()=>{"use strict";Z=_n,Q=$n;typeof globalThis.setTimeout=="function"&&(Z=setTimeout);typeof globalThis.clearTimeout=="function"&&(Q=clearTimeout);G=[],ge=!1,dr=-1;Wn.prototype.run=function(){this.fun.apply(null,this.array)};Pf="browser",Of="browser",Ff=!0,Cf={},qf=[],Nf="",Uf={},Bf={},Mf={};Df=se,_f=se,$f=se,Lf=se,kf=se,Wf=se,jf=se;xe=globalThis.performance||{},Hf=xe.now||xe.mozNow||xe.msNow||xe.oNow||xe.webkitNow||function(){return new Date().getTime()};Kf=new Date;c={nextTick:If,title:Pf,browser:Ff,env:Cf,argv:qf,version:Nf,versions:Uf,on:Df,addListener:_f,once:$f,off:Lf,removeListener:kf,removeAllListeners:Wf,emit:jf,binding:Gf,cwd:zf,chdir:Vf,umask:Yf,hrtime:Jf,platform:Of,release:Bf,config:Mf,uptime:Zf},Dn={};Object.keys(Dn).forEach(t=>{let e=t.split("."),r=c;for(let n=0;n<e.length;n++){let o=e[n];n===e.length-1?r[o]=Dn[t]:r=r[o]||(r[o]={})}})});function Vn(){lt=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)M[e]=t[e],B[t.charCodeAt(e)]=e;B[45]=62,B[95]=63}function Xf(t){lt||Vn();var e,r,n,o,i,u,p=t.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i=t[p-2]==="="?2:t[p-1]==="="?1:0,u=new Qf(p*3/4-i),n=i>0?p-4:p;var l=0;for(e=0,r=0;e<n;e+=4,r+=3)o=B[t.charCodeAt(e)]<<18|B[t.charCodeAt(e+1)]<<12|B[t.charCodeAt(e+2)]<<6|B[t.charCodeAt(e+3)],u[l++]=o>>16&255,u[l++]=o>>8&255,u[l++]=o&255;return i===2?(o=B[t.charCodeAt(e)]<<2|B[t.charCodeAt(e+1)]>>4,u[l++]=o&255):i===1&&(o=B[t.charCodeAt(e)]<<10|B[t.charCodeAt(e+1)]<<4|B[t.charCodeAt(e+2)]>>2,u[l++]=o>>8&255,u[l++]=o&255),u}function ep(t){return M[t>>18&63]+M[t>>12&63]+M[t>>6&63]+M[t&63]}function rp(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16)+(t[i+1]<<8)+t[i+2],o.push(ep(n));return o.join("")}function jn(t){lt||Vn();for(var e,r=t.length,n=r%3,o="",i=[],u=16383,p=0,l=r-n;p<l;p+=u)i.push(rp(t,p,p+u>l?l:p+u));return n===1?(e=t[r-1],o+=M[e>>2],o+=M[e<<4&63],o+="=="):n===2&&(e=(t[r-2]<<8)+t[r-1],o+=M[e>>10],o+=M[e>>4&63],o+=M[e<<2&63],o+="="),i.push(o),i.join("")}function mr(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function z(t,e){if(mr()<e)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=f.prototype):(t===null&&(t=new f(e)),t.length=e),t}function f(t,e,r){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(t,e,r);if(typeof t=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return ct(this,t)}return Yn(this,t,e,r)}function Yn(t,e,r,n){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer?op(t,e,r,n):typeof e=="string"?np(t,e,r):ip(t,e)}function Hn(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function tp(t,e,r,n){return Hn(e),e<=0?z(t,e):r!==void 0?typeof n=="string"?z(t,e).fill(r,n):z(t,e).fill(r):z(t,e)}function ct(t,e){if(Hn(e),t=z(t,e<0?0:dt(e)|0),!f.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function np(t,e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!f.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=Jn(e,r)|0;t=z(t,n);var o=t.write(e,r);return o!==n&&(t=t.slice(0,o)),t}function pt(t,e){var r=e.length<0?0:dt(e.length)|0;t=z(t,r);for(var n=0;n<r;n+=1)t[n]=e[n]&255;return t}function op(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return r===void 0&&n===void 0?e=new Uint8Array(e):n===void 0?e=new Uint8Array(e,r):e=new Uint8Array(e,r,n),f.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=f.prototype):t=pt(t,e),t}function ip(t,e){if(D(e)){var r=dt(e.length)|0;return t=z(t,r),t.length===0||e.copy(t,0,0,r),t}if(e){if(typeof ArrayBuffer!="undefined"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||Ap(e.length)?z(t,0):pt(t,e);if(e.type==="Buffer"&&Array.isArray(e.data))return pt(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function dt(t){if(t>=mr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+mr().toString(16)+" bytes");return t|0}function D(t){return!!(t!=null&&t._isBuffer)}function Jn(t,e){if(D(t))return t.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var r=t.length;if(r===0)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return yr(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return to(t).length;default:if(n)return yr(t).length;e=(""+e).toLowerCase(),n=!0}}function ap(t,e,r){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return hp(this,e,r);case"utf8":case"utf-8":return Qn(this,e,r);case"ascii":return mp(this,e,r);case"latin1":case"binary":return yp(this,e,r);case"base64":return cp(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xp(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function ue(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Kn(t,e,r,n,o){if(t.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0)if(o)r=0;else return-1;if(typeof e=="string"&&(e=f.from(e,n)),D(e))return e.length===0?-1:Gn(t,e,r,n,o);if(typeof e=="number")return e=e&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Gn(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function Gn(t,e,r,n,o){var i=1,u=t.length,p=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return-1;i=2,u/=2,p/=2,r/=2}function l(S,I){return i===1?S[I]:S.readUInt16BE(I*i)}var y;if(o){var h=-1;for(y=r;y<u;y++)if(l(t,y)===l(e,h===-1?0:y-h)){if(h===-1&&(h=y),y-h+1===p)return h*i}else h!==-1&&(y-=y-h),h=-1}else for(r+p>u&&(r=u-p),y=r;y>=0;y--){for(var m=!0,g=0;g<p;g++)if(l(t,y+g)!==l(e,g)){m=!1;break}if(m)return y}return-1}function sp(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n),n>o&&(n=o)):n=o;var i=e.length;if(i%2!==0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var u=0;u<n;++u){var p=parseInt(e.substr(u*2,2),16);if(isNaN(p))return u;t[r+u]=p}return u}function up(t,e,r,n){return gr(yr(e,t.length-r),t,r,n)}function Zn(t,e,r,n){return gr(Ep(e),t,r,n)}function fp(t,e,r,n){return Zn(t,e,r,n)}function pp(t,e,r,n){return gr(to(e),t,r,n)}function lp(t,e,r,n){return gr(Sp(e,t.length-r),t,r,n)}function cp(t,e,r){return e===0&&r===t.length?jn(t):jn(t.slice(e,r))}function Qn(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i=t[o],u=null,p=i>239?4:i>223?3:i>191?2:1;if(o+p<=r){var l,y,h,m;switch(p){case 1:i<128&&(u=i);break;case 2:l=t[o+1],(l&192)===128&&(m=(i&31)<<6|l&63,m>127&&(u=m));break;case 3:l=t[o+1],y=t[o+2],(l&192)===128&&(y&192)===128&&(m=(i&15)<<12|(l&63)<<6|y&63,m>2047&&(m<55296||m>57343)&&(u=m));break;case 4:l=t[o+1],y=t[o+2],h=t[o+3],(l&192)===128&&(y&192)===128&&(h&192)===128&&(m=(i&15)<<18|(l&63)<<12|(y&63)<<6|h&63,m>65535&&m<1114112&&(u=m))}}u===null?(u=65533,p=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),o+=p}return dp(n)}function dp(t){var e=t.length;if(e<=zn)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=zn));return r}function mp(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]&127);return n}function yp(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function hp(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=bp(t[i]);return o}function xp(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+n[i+1]*256);return o}function P(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function N(t,e,r,n,o,i){if(!D(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function hr(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>(n?o:1-o)*8}function xr(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>(n?o:3-o)*8&255}function Xn(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function eo(t,e,r,n,o){return o||Xn(t,e,r,4,34028234663852886e22,-34028234663852886e22),oo(t,e,r,n,23,4),r+4}function ro(t,e,r,n,o){return o||Xn(t,e,r,8,17976931348623157e292,-17976931348623157e292),oo(t,e,r,n,52,8),r+8}function vp(t){if(t=wp(t).replace(gp,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function wp(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function bp(t){return t<16?"0"+t.toString(16):t.toString(16)}function yr(t,e){e=e||1/0;for(var r,n=t.length,o=null,i=[],u=0;u<n;++u){if(r=t.charCodeAt(u),r>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}else if(u+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function Ep(t){for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function Sp(t,e){for(var r,n,o,i=[],u=0;u<t.length&&!((e-=2)<0);++u)r=t.charCodeAt(u),n=r>>8,o=r%256,i.push(o),i.push(n);return i}function to(t){return Xf(vp(t))}function gr(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function Ap(t){return t!==t}function Rp(t){return t!=null&&(!!t._isBuffer||no(t)||Tp(t))}function no(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Tp(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&no(t.slice(0,0))}function vr(t,e,r,n,o){var i,u,p=o*8-n-1,l=(1<<p)-1,y=l>>1,h=-7,m=r?o-1:0,g=r?-1:1,S=t[e+m];for(m+=g,i=S&(1<<-h)-1,S>>=-h,h+=p;h>0;i=i*256+t[e+m],m+=g,h-=8);for(u=i&(1<<-h)-1,i>>=-h,h+=n;h>0;u=u*256+t[e+m],m+=g,h-=8);if(i===0)i=1-y;else{if(i===l)return u?NaN:(S?-1:1)*(1/0);u=u+Math.pow(2,n),i=i-y}return(S?-1:1)*u*Math.pow(2,i-n)}function oo(t,e,r,n,o,i){var u,p,l,y=i*8-o-1,h=(1<<y)-1,m=h>>1,g=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=n?0:i-1,I=n?1:-1,T=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(p=isNaN(e)?1:0,u=h):(u=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-u))<1&&(u--,l*=2),u+m>=1?e+=g/l:e+=g*Math.pow(2,1-m),e*l>=2&&(u++,l/=2),u+m>=h?(p=0,u=h):u+m>=1?(p=(e*l-1)*Math.pow(2,o),u=u+m):(p=e*Math.pow(2,m-1)*Math.pow(2,o),u=0));o>=8;t[r+S]=p&255,S+=I,p/=256,o-=8);for(u=u<<o|p,y+=o;y>0;t[r+S]=u&255,S+=I,u/=256,y-=8);t[r+S-I]|=T*128}var M,B,Qf,lt,zn,gp,io=he(()=>{"use strict";a();s();M=[],B=[],Qf=typeof Uint8Array!="undefined"?Uint8Array:Array,lt=!1;f.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;f.poolSize=8192;f._augment=function(t){return t.__proto__=f.prototype,t};f.from=function(t,e,r){return Yn(null,t,e,r)};f.kMaxLength=mr();f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]);f.alloc=function(t,e,r){return tp(null,t,e,r)};f.allocUnsafe=function(t){return ct(null,t)};f.allocUnsafeSlow=function(t){return ct(null,t)};f.isBuffer=Rp;f.compare=function(e,r){if(!D(e)||!D(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,o=r.length,i=0,u=Math.min(n,o);i<u;++i)if(e[i]!==r[i]){n=e[i],o=r[i];break}return n<o?-1:o<n?1:0};f.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}};f.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return f.alloc(0);var n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var o=f.allocUnsafe(r),i=0;for(n=0;n<e.length;++n){var u=e[n];if(!D(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(o,i),i+=u.length}return o};f.byteLength=Jn;f.prototype._isBuffer=!0;f.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<e;r+=2)ue(this,r,r+1);return this};f.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<e;r+=4)ue(this,r,r+3),ue(this,r+1,r+2);return this};f.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<e;r+=8)ue(this,r,r+7),ue(this,r+1,r+6),ue(this,r+2,r+5),ue(this,r+3,r+4);return this};f.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?Qn(this,0,e):ap.apply(this,arguments)};f.prototype.equals=function(e){if(!D(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:f.compare(this,e)===0};f.prototype.compare=function(e,r,n,o,i){if(!D(e))throw new TypeError("Argument must be a Buffer");if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),o===void 0&&(o=0),i===void 0&&(i=this.length),r<0||n>e.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&r>=n)return 0;if(o>=i)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,o>>>=0,i>>>=0,this===e)return 0;for(var u=i-o,p=n-r,l=Math.min(u,p),y=this.slice(o,i),h=e.slice(r,n),m=0;m<l;++m)if(y[m]!==h[m]){u=y[m],p=h[m];break}return u<p?-1:p<u?1:0};f.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};f.prototype.indexOf=function(e,r,n){return Kn(this,e,r,n,!0)};f.prototype.lastIndexOf=function(e,r,n){return Kn(this,e,r,n,!1)};f.prototype.write=function(e,r,n,o){if(r===void 0)o="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")o=r,n=this.length,r=0;else if(isFinite(r))r=r|0,isFinite(n)?(n=n|0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-r;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var u=!1;;)switch(o){case"hex":return sp(this,e,r,n);case"utf8":case"utf-8":return up(this,e,r,n);case"ascii":return Zn(this,e,r,n);case"latin1":case"binary":return fp(this,e,r,n);case"base64":return pp(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return lp(this,e,r,n);default:if(u)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),u=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};zn=4096;f.prototype.slice=function(e,r){var n=this.length;e=~~e,r=r===void 0?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var o;if(f.TYPED_ARRAY_SUPPORT)o=this.subarray(e,r),o.__proto__=f.prototype;else{var i=r-e;o=new f(i,void 0);for(var u=0;u<i;++u)o[u]=this[u+e]}return o};f.prototype.readUIntLE=function(e,r,n){e=e|0,r=r|0,n||P(e,r,this.length);for(var o=this[e],i=1,u=0;++u<r&&(i*=256);)o+=this[e+u]*i;return o};f.prototype.readUIntBE=function(e,r,n){e=e|0,r=r|0,n||P(e,r,this.length);for(var o=this[e+--r],i=1;r>0&&(i*=256);)o+=this[e+--r]*i;return o};f.prototype.readUInt8=function(e,r){return r||P(e,1,this.length),this[e]};f.prototype.readUInt16LE=function(e,r){return r||P(e,2,this.length),this[e]|this[e+1]<<8};f.prototype.readUInt16BE=function(e,r){return r||P(e,2,this.length),this[e]<<8|this[e+1]};f.prototype.readUInt32LE=function(e,r){return r||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};f.prototype.readUInt32BE=function(e,r){return r||P(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};f.prototype.readIntLE=function(e,r,n){e=e|0,r=r|0,n||P(e,r,this.length);for(var o=this[e],i=1,u=0;++u<r&&(i*=256);)o+=this[e+u]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o};f.prototype.readIntBE=function(e,r,n){e=e|0,r=r|0,n||P(e,r,this.length);for(var o=r,i=1,u=this[e+--o];o>0&&(i*=256);)u+=this[e+--o]*i;return i*=128,u>=i&&(u-=Math.pow(2,8*r)),u};f.prototype.readInt8=function(e,r){return r||P(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};f.prototype.readInt16LE=function(e,r){r||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};f.prototype.readInt16BE=function(e,r){r||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};f.prototype.readInt32LE=function(e,r){return r||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};f.prototype.readInt32BE=function(e,r){return r||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};f.prototype.readFloatLE=function(e,r){return r||P(e,4,this.length),vr(this,e,!0,23,4)};f.prototype.readFloatBE=function(e,r){return r||P(e,4,this.length),vr(this,e,!1,23,4)};f.prototype.readDoubleLE=function(e,r){return r||P(e,8,this.length),vr(this,e,!0,52,8)};f.prototype.readDoubleBE=function(e,r){return r||P(e,8,this.length),vr(this,e,!1,52,8)};f.prototype.writeUIntLE=function(e,r,n,o){if(e=+e,r=r|0,n=n|0,!o){var i=Math.pow(2,8*n)-1;N(this,e,r,n,i,0)}var u=1,p=0;for(this[r]=e&255;++p<n&&(u*=256);)this[r+p]=e/u&255;return r+n};f.prototype.writeUIntBE=function(e,r,n,o){if(e=+e,r=r|0,n=n|0,!o){var i=Math.pow(2,8*n)-1;N(this,e,r,n,i,0)}var u=n-1,p=1;for(this[r+u]=e&255;--u>=0&&(p*=256);)this[r+u]=e/p&255;return r+n};f.prototype.writeUInt8=function(e,r,n){return e=+e,r=r|0,n||N(this,e,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=e&255,r+1};f.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r|0,n||N(this,e,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):hr(this,e,r,!0),r+2};f.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r|0,n||N(this,e,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):hr(this,e,r,!1),r+2};f.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r|0,n||N(this,e,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255):xr(this,e,r,!0),r+4};f.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r|0,n||N(this,e,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):xr(this,e,r,!1),r+4};f.prototype.writeIntLE=function(e,r,n,o){if(e=+e,r=r|0,!o){var i=Math.pow(2,8*n-1);N(this,e,r,n,i-1,-i)}var u=0,p=1,l=0;for(this[r]=e&255;++u<n&&(p*=256);)e<0&&l===0&&this[r+u-1]!==0&&(l=1),this[r+u]=(e/p>>0)-l&255;return r+n};f.prototype.writeIntBE=function(e,r,n,o){if(e=+e,r=r|0,!o){var i=Math.pow(2,8*n-1);N(this,e,r,n,i-1,-i)}var u=n-1,p=1,l=0;for(this[r+u]=e&255;--u>=0&&(p*=256);)e<0&&l===0&&this[r+u+1]!==0&&(l=1),this[r+u]=(e/p>>0)-l&255;return r+n};f.prototype.writeInt8=function(e,r,n){return e=+e,r=r|0,n||N(this,e,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=e&255,r+1};f.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r|0,n||N(this,e,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):hr(this,e,r,!0),r+2};f.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r|0,n||N(this,e,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):hr(this,e,r,!1),r+2};f.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r|0,n||N(this,e,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):xr(this,e,r,!0),r+4};f.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r|0,n||N(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),f.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255):xr(this,e,r,!1),r+4};f.prototype.writeFloatLE=function(e,r,n){return eo(this,e,r,!0,n)};f.prototype.writeFloatBE=function(e,r,n){return eo(this,e,r,!1,n)};f.prototype.writeDoubleLE=function(e,r,n){return ro(this,e,r,!0,n)};f.prototype.writeDoubleBE=function(e,r,n){return ro(this,e,r,!1,n)};f.prototype.copy=function(e,r,n,o){if(n||(n=0),!o&&o!==0&&(o=this.length),r>=e.length&&(r=e.length),r||(r=0),o>0&&o<n&&(o=n),o===n||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-r<o-n&&(o=e.length-r+n);var i=o-n,u;if(this===e&&n<r&&r<o)for(u=i-1;u>=0;--u)e[u+r]=this[u+n];else if(i<1e3||!f.TYPED_ARRAY_SUPPORT)for(u=0;u<i;++u)e[u+r]=this[u+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),r);return i};f.prototype.fill=function(e,r,n,o){if(typeof e=="string"){if(typeof r=="string"?(o=r,r=0,n=this.length):typeof n=="string"&&(o=n,n=this.length),e.length===1){var i=e.charCodeAt(0);i<256&&(e=i)}if(o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!f.isEncoding(o))throw new TypeError("Unknown encoding: "+o)}else typeof e=="number"&&(e=e&255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var u;if(typeof e=="number")for(u=r;u<n;++u)this[u]=e;else{var p=D(e)?e:yr(new f(e,o).toString()),l=p.length;for(u=0;u<n-r;++u)this[u+r]=p[u%l]}return this};gp=/[^+\/0-9A-Za-z-_]/g});var s=he(()=>{"use strict";io()});var mt=d((kh,ao)=>{"use strict";a();s();ao.exports=Object});var uo=d((Gh,so)=>{"use strict";a();s();so.exports=Error});var po=d((Yh,fo)=>{"use strict";a();s();fo.exports=EvalError});var co=d((Kh,lo)=>{"use strict";a();s();lo.exports=RangeError});var yo=d((Xh,mo)=>{"use strict";a();s();mo.exports=ReferenceError});var yt=d((tx,ho)=>{"use strict";a();s();ho.exports=SyntaxError});var O=d((ix,xo)=>{"use strict";a();s();xo.exports=TypeError});var vo=d((ux,go)=>{"use strict";a();s();go.exports=URIError});var ht=d((lx,wo)=>{"use strict";a();s();wo.exports=Math.abs});var xt=d((mx,bo)=>{"use strict";a();s();bo.exports=Math.floor});var So=d((xx,Eo)=>{"use strict";a();s();Eo.exports=Math.max});var gt=d((wx,Ao)=>{"use strict";a();s();Ao.exports=Math.min});var To=d((Sx,Ro)=>{"use strict";a();s();Ro.exports=Math.pow});var Po=d((Tx,Io)=>{"use strict";a();s();Io.exports=Math.round});var wr=d((Ox,Oo)=>{"use strict";a();s();Oo.exports=Number.isNaN||function(e){return e!==e}});var Co=d((qx,Fo)=>{"use strict";a();s();var Ip=wr();Fo.exports=function(e){return Ip(e)||e===0?e:e<0?-1:1}});var No=d((Bx,qo)=>{"use strict";a();s();qo.exports=Object.getOwnPropertyDescriptor});var ve=d((_x,Uo)=>{"use strict";a();s();var br=No();if(br)try{br([],"length")}catch(t){br=null}Uo.exports=br});var Me=d((kx,Bo)=>{"use strict";a();s();var Er=Object.defineProperty||!1;if(Er)try{Er({},"a",{value:1})}catch(t){Er=!1}Bo.exports=Er});var vt=d((Gx,Mo)=>{"use strict";a();s();Mo.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(var i in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var u=Object.getOwnPropertySymbols(e);if(u.length!==1||u[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var p=Object.getOwnPropertyDescriptor(e,r);if(p.value!==o||p.enumerable!==!0)return!1}return!0}});var wt=d((Yx,_o)=>{"use strict";a();s();var Do=typeof Symbol!="undefined"&&Symbol,Pp=vt();_o.exports=function(){return typeof Do!="function"||typeof Symbol!="function"||typeof Do("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Pp()}});var bt=d((Kx,$o)=>{"use strict";a();s();$o.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var Et=d((Xx,Lo)=>{"use strict";a();s();var Op=mt();Lo.exports=Op.getPrototypeOf||null});var jo=d((t0,Wo)=>{"use strict";a();s();var Fp="Function.prototype.bind called on incompatible ",Cp=Object.prototype.toString,qp=Math.max,Np="[object Function]",ko=function(e,r){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var i=0;i<r.length;i+=1)n[i+e.length]=r[i];return n},Up=function(e,r){for(var n=[],o=r||0,i=0;o<e.length;o+=1,i+=1)n[i]=e[o];return n},Bp=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};Wo.exports=function(e){var r=this;if(typeof r!="function"||Cp.apply(r)!==Np)throw new TypeError(Fp+r);for(var n=Up(arguments,1),o,i=function(){if(this instanceof o){var h=r.apply(this,ko(n,arguments));return Object(h)===h?h:this}return r.apply(e,ko(n,arguments))},u=qp(0,r.length-n.length),p=[],l=0;l<u;l++)p[l]="$"+l;if(o=Function("binder","return function ("+Bp(p,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var y=function(){};y.prototype=r.prototype,o.prototype=new y,y.prototype=null}return o}});var we=d((i0,Go)=>{"use strict";a();s();var Mp=jo();Go.exports=Function.prototype.bind||Mp});var Sr=d((u0,zo)=>{"use strict";a();s();zo.exports=Function.prototype.call});var Ar=d((l0,Vo)=>{"use strict";a();s();Vo.exports=Function.prototype.apply});var Ho=d((m0,Yo)=>{"use strict";a();s();Yo.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var St=d((x0,Jo)=>{"use strict";a();s();var Dp=we(),_p=Ar(),$p=Sr(),Lp=Ho();Jo.exports=Lp||Dp.call($p,_p)});var Rr=d((w0,Ko)=>{"use strict";a();s();var kp=we(),Wp=O(),jp=Sr(),Gp=St();Ko.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new Wp("a function is required");return Gp(kp,jp,e)}});var ti=d((S0,ri)=>{"use strict";a();s();var zp=Rr(),Zo=ve(),Xo;try{Xo=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var At=!!Xo&&Zo&&Zo(Object.prototype,"__proto__"),ei=Object,Qo=ei.getPrototypeOf;ri.exports=At&&typeof At.get=="function"?zp([At.get]):typeof Qo=="function"?function(e){return Qo(e==null?e:ei(e))}:!1});var si=d((T0,ai)=>{"use strict";a();s();var ni=bt(),oi=Et(),ii=ti();ai.exports=ni?function(e){return ni(e)}:oi?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return oi(e)}:ii?function(e){return ii(e)}:null});var Rt=d((O0,ui)=>{"use strict";a();s();var Vp=Function.prototype.call,Yp=Object.prototype.hasOwnProperty,Hp=we();ui.exports=Hp.call(Vp,Yp)});var _=d((q0,mi)=>{"use strict";a();s();var w,Jp=mt(),Kp=uo(),Zp=po(),Qp=co(),Xp=yo(),Ae=yt(),Se=O(),el=vo(),rl=ht(),tl=xt(),nl=So(),ol=gt(),il=To(),al=Po(),sl=Co(),ci=Function,Tt=function(t){try{return ci('"use strict"; return ('+t+").constructor;")()}catch(e){}},De=ve(),ul=Me(),It=function(){throw new Se},fl=De?(function(){try{return arguments.callee,It}catch(t){try{return De(arguments,"callee").get}catch(e){return It}}})():It,be=wt()(),F=si(),pl=Et(),ll=bt(),di=Ar(),_e=Sr(),Ee={},cl=typeof Uint8Array=="undefined"||!F?w:F(Uint8Array),fe={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?w:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?w:ArrayBuffer,"%ArrayIteratorPrototype%":be&&F?F([][Symbol.iterator]()):w,"%AsyncFromSyncIteratorPrototype%":w,"%AsyncFunction%":Ee,"%AsyncGenerator%":Ee,"%AsyncGeneratorFunction%":Ee,"%AsyncIteratorPrototype%":Ee,"%Atomics%":typeof Atomics=="undefined"?w:Atomics,"%BigInt%":typeof BigInt=="undefined"?w:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?w:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?w:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?w:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Kp,"%eval%":eval,"%EvalError%":Zp,"%Float16Array%":typeof Float16Array=="undefined"?w:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?w:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?w:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?w:FinalizationRegistry,"%Function%":ci,"%GeneratorFunction%":Ee,"%Int8Array%":typeof Int8Array=="undefined"?w:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?w:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?w:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":be&&F?F(F([][Symbol.iterator]())):w,"%JSON%":typeof JSON=="object"?JSON:w,"%Map%":typeof Map=="undefined"?w:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!be||!F?w:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Jp,"%Object.getOwnPropertyDescriptor%":De,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?w:Promise,"%Proxy%":typeof Proxy=="undefined"?w:Proxy,"%RangeError%":Qp,"%ReferenceError%":Xp,"%Reflect%":typeof Reflect=="undefined"?w:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?w:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!be||!F?w:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?w:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":be&&F?F(""[Symbol.iterator]()):w,"%Symbol%":be?Symbol:w,"%SyntaxError%":Ae,"%ThrowTypeError%":fl,"%TypedArray%":cl,"%TypeError%":Se,"%Uint8Array%":typeof Uint8Array=="undefined"?w:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?w:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?w:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?w:Uint32Array,"%URIError%":el,"%WeakMap%":typeof WeakMap=="undefined"?w:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?w:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?w:WeakSet,"%Function.prototype.call%":_e,"%Function.prototype.apply%":di,"%Object.defineProperty%":ul,"%Object.getPrototypeOf%":pl,"%Math.abs%":rl,"%Math.floor%":tl,"%Math.max%":nl,"%Math.min%":ol,"%Math.pow%":il,"%Math.round%":al,"%Math.sign%":sl,"%Reflect.getPrototypeOf%":ll};if(F)try{null.error}catch(t){fi=F(F(t)),fe["%Error.prototype%"]=fi}var fi,dl=function t(e){var r;if(e==="%AsyncFunction%")r=Tt("async function () {}");else if(e==="%GeneratorFunction%")r=Tt("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Tt("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&F&&(r=F(o.prototype))}return fe[e]=r,r},pi={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},$e=we(),Tr=Rt(),ml=$e.call(_e,Array.prototype.concat),yl=$e.call(di,Array.prototype.splice),li=$e.call(_e,String.prototype.replace),Ir=$e.call(_e,String.prototype.slice),hl=$e.call(_e,RegExp.prototype.exec),xl=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,gl=/\\(\\)?/g,vl=function(e){var r=Ir(e,0,1),n=Ir(e,-1);if(r==="%"&&n!=="%")throw new Ae("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ae("invalid intrinsic syntax, expected opening `%`");var o=[];return li(e,xl,function(i,u,p,l){o[o.length]=p?li(l,gl,"$1"):u||i}),o},wl=function(e,r){var n=e,o;if(Tr(pi,n)&&(o=pi[n],n="%"+o[0]+"%"),Tr(fe,n)){var i=fe[n];if(i===Ee&&(i=dl(n)),typeof i=="undefined"&&!r)throw new Se("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new Ae("intrinsic "+e+" does not exist!")};mi.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Se("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Se('"allowMissing" argument must be a boolean');if(hl(/^%?[^%]*%?$/,e)===null)throw new Ae("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=vl(e),o=n.length>0?n[0]:"",i=wl("%"+o+"%",r),u=i.name,p=i.value,l=!1,y=i.alias;y&&(o=y[0],yl(n,ml([0,1],y)));for(var h=1,m=!0;h<n.length;h+=1){var g=n[h],S=Ir(g,0,1),I=Ir(g,-1);if((S==='"'||S==="'"||S==="`"||I==='"'||I==="'"||I==="`")&&S!==I)throw new Ae("property names with quotes must have matching quotes");if((g==="constructor"||!m)&&(l=!0),o+="."+g,u="%"+o+"%",Tr(fe,u))p=fe[u];else if(p!=null){if(!(g in p)){if(!r)throw new Se("base intrinsic for "+e+" exists, but the property is not available.");return}if(De&&h+1>=n.length){var T=De(p,g);m=!!T,m&&"get"in T&&!("originalValue"in T.get)?p=T.get:p=p[g]}else m=Tr(p,g),p=p[g];m&&!l&&(fe[u]=p)}}return p}});var Pr=d((B0,xi)=>{"use strict";a();s();var yi=Me(),bl=yt(),Re=O(),hi=ve();xi.exports=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Re("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Re("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Re("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Re("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Re("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Re("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,l=!!hi&&hi(e,r);if(yi)yi(e,r,{configurable:u===null&&l?l.configurable:!u,enumerable:o===null&&l?l.enumerable:!o,value:n,writable:i===null&&l?l.writable:!i});else if(p||!o&&!i&&!u)e[r]=n;else throw new bl("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var Or=d((_0,vi)=>{"use strict";a();s();var Pt=Me(),gi=function(){return!!Pt};gi.hasArrayLengthDefineBug=function(){if(!Pt)return null;try{return Pt([],"length",{value:1}).length!==1}catch(e){return!0}};vi.exports=gi});var Ai=d((k0,Si)=>{"use strict";a();s();var El=_(),wi=Pr(),Sl=Or()(),bi=ve(),Ei=O(),Al=El("%Math.floor%");Si.exports=function(e,r){if(typeof e!="function")throw new Ei("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Al(r)!==r)throw new Ei("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&bi){var u=bi(e,"length");u&&!u.configurable&&(o=!1),u&&!u.writable&&(i=!1)}return(o||i||!n)&&(Sl?wi(e,"length",r,!0,!0):wi(e,"length",r)),e}});var Ti=d((G0,Ri)=>{"use strict";a();s();var Rl=we(),Tl=Ar(),Il=St();Ri.exports=function(){return Il(Rl,Tl,arguments)}});var Cr=d((Y0,Fr)=>{"use strict";a();s();var Pl=Ai(),Ii=Me(),Ol=Rr(),Pi=Ti();Fr.exports=function(e){var r=Ol(arguments),n=e.length-(arguments.length-1);return Pl(r,1+(n>0?n:0),!0)};Ii?Ii(Fr.exports,"apply",{value:Pi}):Fr.exports.apply=Pi});var Ot=d((K0,Fi)=>{"use strict";a();s();var Oi=Object.prototype.toString;Fi.exports=function(e){var r=Oi.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Oi.call(e.callee)==="[object Function]"),n}});var $i=d((X0,_i)=>{"use strict";a();s();var Di;Object.keys||(Le=Object.prototype.hasOwnProperty,Ft=Object.prototype.toString,Ci=Ot(),Ct=Object.prototype.propertyIsEnumerable,qi=!Ct.call({toString:null},"toString"),Ni=Ct.call(function(){},"prototype"),ke=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],qr=function(t){var e=t.constructor;return e&&e.prototype===t},Ui={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Bi=(function(){if(typeof window=="undefined")return!1;for(var t in window)try{if(!Ui["$"+t]&&Le.call(window,t)&&window[t]!==null&&typeof window[t]=="object")try{qr(window[t])}catch(e){return!0}}catch(e){return!0}return!1})(),Mi=function(t){if(typeof window=="undefined"||!Bi)return qr(t);try{return qr(t)}catch(e){return!1}},Di=function(e){var r=e!==null&&typeof e=="object",n=Ft.call(e)==="[object Function]",o=Ci(e),i=r&&Ft.call(e)==="[object String]",u=[];if(!r&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var p=Ni&&n;if(i&&e.length>0&&!Le.call(e,0))for(var l=0;l<e.length;++l)u.push(String(l));if(o&&e.length>0)for(var y=0;y<e.length;++y)u.push(String(y));else for(var h in e)!(p&&h==="prototype")&&Le.call(e,h)&&u.push(String(h));if(qi)for(var m=Mi(e),g=0;g<ke.length;++g)!(m&&ke[g]==="constructor")&&Le.call(e,ke[g])&&u.push(ke[g]);return u});var Le,Ft,Ci,Ct,qi,Ni,ke,qr,Ui,Bi,Mi;_i.exports=Di});var ji=d((tg,Wi)=>{"use strict";a();s();var Fl=Array.prototype.slice,Cl=Ot(),Li=Object.keys,Nr=Li?function(e){return Li(e)}:$i(),ki=Object.keys;Nr.shim=function(){if(Object.keys){var e=(function(){var r=Object.keys(arguments);return r&&r.length===arguments.length})(1,2);e||(Object.keys=function(n){return Cl(n)?ki(Fl.call(n)):ki(n)})}else Object.keys=Nr;return Object.keys||Nr};Wi.exports=Nr});var Ur=d((ig,Yi)=>{"use strict";a();s();var ql=ji(),Nl=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Ul=Object.prototype.toString,Bl=Array.prototype.concat,Gi=Pr(),Ml=function(t){return typeof t=="function"&&Ul.call(t)==="[object Function]"},zi=Or()(),Dl=function(t,e,r,n){if(e in t){if(n===!0){if(t[e]===r)return}else if(!Ml(n)||!n())return}zi?Gi(t,e,r,!0):Gi(t,e,r)},Vi=function(t,e){var r=arguments.length>2?arguments[2]:{},n=ql(e);Nl&&(n=Bl.call(n,Object.getOwnPropertySymbols(e)));for(var o=0;o<n.length;o+=1)Dl(t,n[o],e[n[o]],r[n[o]])};Vi.supportsDescriptors=!!zi;Yi.exports=Vi});var $=d((ug,Ki)=>{"use strict";a();s();var Hi=_(),Ji=Rr(),_l=Ji([Hi("%String.prototype.indexOf%")]);Ki.exports=function(e,r){var n=Hi(e,!!r);return typeof n=="function"&&_l(e,".prototype.")>-1?Ji([n]):n}});var Xi=d((lg,Qi)=>{"use strict";a();s();var $l=_(),Zi=$l("%Array%"),Ll=!Zi.isArray&&$()("Object.prototype.toString");Qi.exports=Zi.isArray||function(e){return Ll(e)==="[object Array]"}});var qt=d((mg,ea)=>{"use strict";a();s();ea.exports=Xi()});var ta=d((xg,ra)=>{"use strict";a();s();var kl=_(),Wl=$(),jl=O(),Gl=qt(),zl=kl("%Reflect.apply%",!0)||Wl("Function.prototype.apply");ra.exports=function(e,r){var n=arguments.length>2?arguments[2]:[];if(!Gl(n))throw new jl("Assertion failed: optional `argumentsList`, if provided, must be a List");return zl(e,r,n)}});function na(){throw new Error("setTimeout has not been defined")}function oa(){throw new Error("clearTimeout has not been defined")}function ia(t){if(X===setTimeout)return setTimeout(t,0);if((X===na||!X)&&setTimeout)return X=setTimeout,setTimeout(t,0);try{return X(t,0)}catch(e){try{return X.call(null,t,0)}catch(r){return X.call(this,t,0)}}}function Vl(t){if(ee===clearTimeout)return clearTimeout(t);if((ee===oa||!ee)&&clearTimeout)return ee=clearTimeout,clearTimeout(t);try{return ee(t)}catch(e){try{return ee.call(null,t)}catch(r){return ee.call(this,t)}}}function Yl(){!Ie||!pe||(Ie=!1,pe.length?V=pe.concat(V):Br=-1,V.length&&aa())}function aa(){if(!Ie){var t=ia(Yl);Ie=!0;for(var e=V.length;e;){for(pe=V,V=[];++Br<e;)pe&&pe[Br].run();Br=-1,e=V.length}pe=null,Ie=!1,Vl(t)}}function Hl(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];V.push(new sa(t,e)),V.length===1&&!Ie&&ia(aa)}function sa(t,e){this.fun=t,this.array=e}function le(){}function lc(t){throw new Error("process.binding is not supported")}function cc(){return"/"}function dc(t){throw new Error("process.chdir is not supported")}function mc(){return 0}function hc(t){var e=yc.call(Te)*.001,r=Math.floor(e),n=Math.floor(e%1*1e9);return t&&(r=r-t[0],n=n-t[1],n<0&&(r--,n+=1e9)),[r,n]}function gc(){var t=new Date,e=t-xc;return e/1e3}var X,ee,V,Ie,pe,Br,Jl,Kl,Zl,Ql,Xl,ec,rc,tc,nc,oc,ic,ac,sc,uc,fc,pc,Te,yc,xc,vc,We,ua=he(()=>{"use strict";a();s();X=na,ee=oa;typeof globalThis.setTimeout=="function"&&(X=setTimeout);typeof globalThis.clearTimeout=="function"&&(ee=clearTimeout);V=[],Ie=!1,Br=-1;sa.prototype.run=function(){this.fun.apply(null,this.array)};Jl="browser",Kl="browser",Zl=!0,Ql={},Xl=[],ec="",rc={},tc={},nc={};oc=le,ic=le,ac=le,sc=le,uc=le,fc=le,pc=le;Te=globalThis.performance||{},yc=Te.now||Te.mozNow||Te.msNow||Te.oNow||Te.webkitNow||function(){return new Date().getTime()};xc=new Date;vc={nextTick:Hl,title:Jl,browser:Zl,env:Ql,argv:Xl,version:ec,versions:rc,on:oc,addListener:ic,once:ac,off:sc,removeListener:uc,removeAllListeners:fc,emit:pc,binding:lc,cwd:cc,chdir:dc,umask:mc,hrtime:hc,platform:Kl,release:tc,config:nc,uptime:gc},We=vc});var Nt,Ut,fa=he(()=>{"use strict";a();s();typeof Object.create=="function"?Nt=function(e,r){e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:Nt=function(e,r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e};Ut=Nt});var xa={};Un(xa,{_extend:()=>jt,debuglog:()=>pa,default:()=>Oc,deprecate:()=>$t,format:()=>$r,inherits:()=>Ut,inspect:()=>k,isArray:()=>Lt,isBoolean:()=>Lr,isBuffer:()=>ma,isDate:()=>_r,isError:()=>Ge,isFunction:()=>ze,isNull:()=>Ve,isNullOrUndefined:()=>la,isNumber:()=>kt,isObject:()=>ce,isPrimitive:()=>da,isRegExp:()=>je,isString:()=>Ye,isSymbol:()=>ca,isUndefined:()=>L,log:()=>ya});function $r(t){if(!Ye(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(k(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,i=String(t).replace(wc,function(p){if(p==="%%")return"%";if(r>=o)return p;switch(p){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return p}}),u=n[r];r<o;u=n[++r])Ve(u)||!ce(u)?i+=" "+u:i+=" "+k(u);return i}function $t(t,e){if(L(globalThis.process))return function(){return $t(t,e).apply(this,arguments)};if(We.noDeprecation===!0)return t;var r=!1;function n(){if(!r){if(We.throwDeprecation)throw new Error(e);We.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return n}function pa(t){if(L(Bt)&&(Bt=We.env.NODE_DEBUG||""),t=t.toUpperCase(),!Mr[t])if(new RegExp("\\b"+t+"\\b","i").test(Bt)){var e=0;Mr[t]=function(){var r=$r.apply(null,arguments);console.error("%s %d: %s",t,e,r)}}else Mr[t]=function(){};return Mr[t]}function k(t,e){var r={seen:[],stylize:Ec};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Lr(e)?r.showHidden=e:e&&jt(r,e),L(r.showHidden)&&(r.showHidden=!1),L(r.depth)&&(r.depth=2),L(r.colors)&&(r.colors=!1),L(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=bc),Dr(r,t,r.depth)}function bc(t,e){var r=k.styles[e];return r?"\x1B["+k.colors[r][0]+"m"+t+"\x1B["+k.colors[r][1]+"m":t}function Ec(t,e){return t}function Sc(t){var e={};return t.forEach(function(r,n){e[r]=!0}),e}function Dr(t,e,r){if(t.customInspect&&e&&ze(e.inspect)&&e.inspect!==k&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(r,t);return Ye(n)||(n=Dr(t,n,r)),n}var o=Ac(t,e);if(o)return o;var i=Object.keys(e),u=Sc(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(e)),Ge(e)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return Mt(e);if(i.length===0){if(ze(e)){var p=e.name?": "+e.name:"";return t.stylize("[Function"+p+"]","special")}if(je(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(_r(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Ge(e))return Mt(e)}var l="",y=!1,h=["{","}"];if(Lt(e)&&(y=!0,h=["[","]"]),ze(e)){var m=e.name?": "+e.name:"";l=" [Function"+m+"]"}if(je(e)&&(l=" "+RegExp.prototype.toString.call(e)),_r(e)&&(l=" "+Date.prototype.toUTCString.call(e)),Ge(e)&&(l=" "+Mt(e)),i.length===0&&(!y||e.length==0))return h[0]+l+h[1];if(r<0)return je(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var g;return y?g=Rc(t,e,r,u,i):g=i.map(function(S){return _t(t,e,r,u,S,y)}),t.seen.pop(),Tc(g,l,h)}function Ac(t,e){if(L(e))return t.stylize("undefined","undefined");if(Ye(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(kt(e))return t.stylize(""+e,"number");if(Lr(e))return t.stylize(""+e,"boolean");if(Ve(e))return t.stylize("null","null")}function Mt(t){return"["+Error.prototype.toString.call(t)+"]"}function Rc(t,e,r,n,o){for(var i=[],u=0,p=e.length;u<p;++u)ha(e,String(u))?i.push(_t(t,e,r,n,String(u),!0)):i.push("");return o.forEach(function(l){l.match(/^\d+$/)||i.push(_t(t,e,r,n,l,!0))}),i}function _t(t,e,r,n,o,i){var u,p,l;if(l=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]},l.get?l.set?p=t.stylize("[Getter/Setter]","special"):p=t.stylize("[Getter]","special"):l.set&&(p=t.stylize("[Setter]","special")),ha(n,o)||(u="["+o+"]"),p||(t.seen.indexOf(l.value)<0?(Ve(r)?p=Dr(t,l.value,null):p=Dr(t,l.value,r-1),p.indexOf(`
2
- `)>-1&&(i?p=p.split(`
3
- `).map(function(y){return" "+y}).join(`
4
- `).substr(2):p=`
5
- `+p.split(`
6
- `).map(function(y){return" "+y}).join(`
7
- `))):p=t.stylize("[Circular]","special")),L(u)){if(i&&o.match(/^\d+$/))return p;u=JSON.stringify(""+o),u.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=t.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=t.stylize(u,"string"))}return u+": "+p}function Tc(t,e,r){var n=0,o=t.reduce(function(i,u){return n++,u.indexOf(`
8
- `)>=0&&n++,i+u.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?r[0]+(e===""?"":e+`
9
- `)+" "+t.join(`,
10
- `)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function Lt(t){return Array.isArray(t)}function Lr(t){return typeof t=="boolean"}function Ve(t){return t===null}function la(t){return t==null}function kt(t){return typeof t=="number"}function Ye(t){return typeof t=="string"}function ca(t){return typeof t=="symbol"}function L(t){return t===void 0}function je(t){return ce(t)&&Wt(t)==="[object RegExp]"}function ce(t){return typeof t=="object"&&t!==null}function _r(t){return ce(t)&&Wt(t)==="[object Date]"}function Ge(t){return ce(t)&&(Wt(t)==="[object Error]"||t instanceof Error)}function ze(t){return typeof t=="function"}function da(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t=="undefined"}function ma(t){return f.isBuffer(t)}function Wt(t){return Object.prototype.toString.call(t)}function Dt(t){return t<10?"0"+t.toString(10):t.toString(10)}function Pc(){var t=new Date,e=[Dt(t.getHours()),Dt(t.getMinutes()),Dt(t.getSeconds())].join(":");return[t.getDate(),Ic[t.getMonth()],e].join(" ")}function ya(){console.log("%s - %s",Pc(),$r.apply(null,arguments))}function jt(t,e){if(!e||!ce(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}function ha(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var wc,Mr,Bt,Ic,Oc,ga=he(()=>{"use strict";a();s();ua();fa();wc=/%[sdj%]/g;Mr={};k.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};k.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};Ic=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Oc={inherits:Ut,_extend:jt,log:ya,isBuffer:ma,isPrimitive:da,isFunction:ze,isError:Ge,isDate:_r,isObject:ce,isRegExp:je,isUndefined:L,isSymbol:ca,isString:Ye,isNumber:kt,isNullOrUndefined:la,isNull:Ve,isBoolean:Lr,isArray:Lt,inspect:k,deprecate:$t,format:$r,debuglog:pa}});var va=d((Fg,kr)=>{"use strict";a();s();var de=(ga(),Mn(xa));if(de&&de.default){kr.exports=de.default;for(let t in de)kr.exports[t]=de[t]}else de&&(kr.exports=de)});var ba=d((Ng,wa)=>{"use strict";a();s();wa.exports=va().inspect});var Qe=d((Mg,ka)=>{"use strict";a();s();var Xt=typeof Map=="function"&&Map.prototype,Gt=Object.getOwnPropertyDescriptor&&Xt?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,jr=Xt&&Gt&&typeof Gt.get=="function"?Gt.get:null,Ea=Xt&&Map.prototype.forEach,en=typeof Set=="function"&&Set.prototype,zt=Object.getOwnPropertyDescriptor&&en?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Gr=en&&zt&&typeof zt.get=="function"?zt.get:null,Sa=en&&Set.prototype.forEach,Fc=typeof WeakMap=="function"&&WeakMap.prototype,Je=Fc?WeakMap.prototype.has:null,Cc=typeof WeakSet=="function"&&WeakSet.prototype,Ke=Cc?WeakSet.prototype.has:null,qc=typeof WeakRef=="function"&&WeakRef.prototype,Aa=qc?WeakRef.prototype.deref:null,Nc=Boolean.prototype.valueOf,Uc=Object.prototype.toString,Bc=Function.prototype.toString,Mc=String.prototype.match,rn=String.prototype.slice,re=String.prototype.replace,Dc=String.prototype.toUpperCase,Ra=String.prototype.toLowerCase,Ua=RegExp.prototype.test,Ta=Array.prototype.concat,W=Array.prototype.join,_c=Array.prototype.slice,Ia=Math.floor,Ht=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Vt=Object.getOwnPropertySymbols,Jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Pe=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ze=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Pe||!0)?Symbol.toStringTag:null,Ba=Object.prototype.propertyIsEnumerable,Pa=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Oa(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Ua.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Ia(-t):Ia(t);if(n!==t){var o=String(n),i=rn.call(e,o.length+1);return re.call(o,r,"$&_")+"."+re.call(re.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return re.call(e,r,"$&_")}var Kt=ba(),Fa=Kt.custom,Ca=_a(Fa)?Fa:null,Ma={__proto__:null,double:'"',single:"'"},$c={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};ka.exports=function t(e,r,n,o){var i=r||{};if(Y(i,"quoteStyle")&&!Y(Ma,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Y(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=Y(i,"customInspect")?i.customInspect:!0;if(typeof u!="boolean"&&u!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Y(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Y(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=i.numericSeparator;if(typeof e=="undefined")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return La(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return p?Oa(e,l):l}if(typeof e=="bigint"){var y=String(e)+"n";return p?Oa(e,y):y}var h=typeof i.depth=="undefined"?5:i.depth;if(typeof n=="undefined"&&(n=0),n>=h&&h>0&&typeof e=="object")return Zt(e)?"[Array]":"[Object]";var m=nd(i,n);if(typeof o=="undefined")o=[];else if($a(o,e)>=0)return"[Circular]";function g(ye,lr,xf){if(lr&&(o=_c.call(o),o.push(lr)),xf){var Pn={depth:i.depth};return Y(i,"quoteStyle")&&(Pn.quoteStyle=i.quoteStyle),t(ye,Pn,n+1,o)}return t(ye,i,n+1,o)}if(typeof e=="function"&&!qa(e)){var S=Hc(e),I=Wr(e,g);return"[Function"+(S?": "+S:" (anonymous)")+"]"+(I.length>0?" { "+W.call(I,", ")+" }":"")}if(_a(e)){var T=Pe?re.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Jt.call(e);return typeof e=="object"&&!Pe?He(T):T}if(ed(e)){for(var q="<"+Ra.call(String(e.nodeName)),U=e.attributes||[],j=0;j<U.length;j++)q+=" "+U[j].name+"="+Da(Lc(U[j].value),"double",i);return q+=">",e.childNodes&&e.childNodes.length&&(q+="..."),q+="</"+Ra.call(String(e.nodeName))+">",q}if(Zt(e)){if(e.length===0)return"[]";var ie=Wr(e,g);return m&&!td(ie)?"["+Qt(ie,m)+"]":"[ "+W.call(ie,", ")+" ]"}if(Wc(e)){var Ue=Wr(e,g);return!("cause"in Error.prototype)&&"cause"in e&&!Ba.call(e,"cause")?"{ ["+String(e)+"] "+W.call(Ta.call("[cause]: "+g(e.cause),Ue),", ")+" }":Ue.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+W.call(Ue,", ")+" }"}if(typeof e=="object"&&u){if(Ca&&typeof e[Ca]=="function"&&Kt)return Kt(e,{depth:h-n});if(u!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Jc(e)){var pr=[];return Ea&&Ea.call(e,function(ye,lr){pr.push(g(lr,e,!0)+" => "+g(ye,e))}),Na("Map",jr.call(e),pr,m)}if(Qc(e)){var Rn=[];return Sa&&Sa.call(e,function(ye){Rn.push(g(ye,e))}),Na("Set",Gr.call(e),Rn,m)}if(Kc(e))return Yt("WeakMap");if(Xc(e))return Yt("WeakSet");if(Zc(e))return Yt("WeakRef");if(Gc(e))return He(g(Number(e)));if(Vc(e))return He(g(Ht.call(e)));if(zc(e))return He(Nc.call(e));if(jc(e))return He(g(String(e)));if(typeof window!="undefined"&&e===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&e===globalThis||typeof globalThis!="undefined"&&e===globalThis)return"{ [object globalThis] }";if(!kc(e)&&!qa(e)){var it=Wr(e,g),Tn=Pa?Pa(e)===Object.prototype:e instanceof Object||e.constructor===Object,at=e instanceof Object?"":"null prototype",In=!Tn&&Ze&&Object(e)===e&&Ze in e?rn.call(te(e),8,-1):at?"Object":"",hf=Tn||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",st=hf+(In||at?"["+W.call(Ta.call([],In||[],at||[]),": ")+"] ":"");return it.length===0?st+"{}":m?st+"{"+Qt(it,m)+"}":st+"{ "+W.call(it,", ")+" }"}return String(e)};function Da(t,e,r){var n=r.quoteStyle||e,o=Ma[n];return o+t+o}function Lc(t){return re.call(String(t),/"/g,"&quot;")}function me(t){return!Ze||!(typeof t=="object"&&(Ze in t||typeof t[Ze]!="undefined"))}function Zt(t){return te(t)==="[object Array]"&&me(t)}function kc(t){return te(t)==="[object Date]"&&me(t)}function qa(t){return te(t)==="[object RegExp]"&&me(t)}function Wc(t){return te(t)==="[object Error]"&&me(t)}function jc(t){return te(t)==="[object String]"&&me(t)}function Gc(t){return te(t)==="[object Number]"&&me(t)}function zc(t){return te(t)==="[object Boolean]"&&me(t)}function _a(t){if(Pe)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Jt)return!1;try{return Jt.call(t),!0}catch(e){}return!1}function Vc(t){if(!t||typeof t!="object"||!Ht)return!1;try{return Ht.call(t),!0}catch(e){}return!1}var Yc=Object.prototype.hasOwnProperty||function(t){return t in this};function Y(t,e){return Yc.call(t,e)}function te(t){return Uc.call(t)}function Hc(t){if(t.name)return t.name;var e=Mc.call(Bc.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function $a(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function Jc(t){if(!jr||!t||typeof t!="object")return!1;try{jr.call(t);try{Gr.call(t)}catch(e){return!0}return t instanceof Map}catch(e){}return!1}function Kc(t){if(!Je||!t||typeof t!="object")return!1;try{Je.call(t,Je);try{Ke.call(t,Ke)}catch(e){return!0}return t instanceof WeakMap}catch(e){}return!1}function Zc(t){if(!Aa||!t||typeof t!="object")return!1;try{return Aa.call(t),!0}catch(e){}return!1}function Qc(t){if(!Gr||!t||typeof t!="object")return!1;try{Gr.call(t);try{jr.call(t)}catch(e){return!0}return t instanceof Set}catch(e){}return!1}function Xc(t){if(!Ke||!t||typeof t!="object")return!1;try{Ke.call(t,Ke);try{Je.call(t,Je)}catch(e){return!0}return t instanceof WeakSet}catch(e){}return!1}function ed(t){return!t||typeof t!="object"?!1:typeof HTMLElement!="undefined"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function La(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return La(rn.call(t,0,e.maxStringLength),e)+n}var o=$c[e.quoteStyle||"single"];o.lastIndex=0;var i=re.call(re.call(t,o,"\\$1"),/[\x00-\x1f]/g,rd);return Da(i,"single",e)}function rd(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+Dc.call(e.toString(16))}function He(t){return"Object("+t+")"}function Yt(t){return t+" { ? }"}function Na(t,e,r,n){var o=n?Qt(r,n):W.call(r,", ");return t+" ("+e+") {"+o+"}"}function td(t){for(var e=0;e<t.length;e++)if($a(t[e],`
11
- `)>=0)return!1;return!0}function nd(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=W.call(Array(t.indent+1)," ");else return null;return{base:r,prev:W.call(Array(e+1),r)}}function Qt(t,e){if(t.length===0)return"";var r=`
12
- `+e.prev+e.base;return r+W.call(t,","+r)+`
13
- `+e.prev}function Wr(t,e){var r=Zt(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=Y(t,o)?e(t[o],t):""}var i=typeof Vt=="function"?Vt(t):[],u;if(Pe){u={};for(var p=0;p<i.length;p++)u["$"+i[p]]=i[p]}for(var l in t)Y(t,l)&&(r&&String(Number(l))===l&&l<t.length||Pe&&u["$"+l]instanceof Symbol||(Ua.call(/[^\w$]/,l)?n.push(e(l,t)+": "+e(t[l],t)):n.push(l+": "+e(t[l],t))));if(typeof Vt=="function")for(var y=0;y<i.length;y++)Ba.call(t,i[y])&&n.push("["+e(i[y])+"]: "+e(t[i[y]],t));return n}});var zr=d(($g,Wa)=>{"use strict";a();s();Wa.exports=function(e){return typeof e=="string"||typeof e=="symbol"}});var Ga=d((Wg,ja)=>{"use strict";a();s();var od=O(),id=Qe(),ad=zr();ja.exports=function(e,r){if(!ad(r))throw new od("Assertion failed: P is not a Property Key, got "+id(r));return e[r]}});var Ha=d((zg,Ya)=>{"use strict";a();s();var Va=Function.prototype.toString,Oe=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,nn,Vr;if(typeof Oe=="function"&&typeof Object.defineProperty=="function")try{nn=Object.defineProperty({},"length",{get:function(){throw Vr}}),Vr={},Oe(function(){throw 42},null,nn)}catch(t){t!==Vr&&(Oe=null)}else Oe=null;var sd=/^\s*class\b/,on=function(e){try{var r=Va.call(e);return sd.test(r)}catch(n){return!1}},tn=function(e){try{return on(e)?!1:(Va.call(e),!0)}catch(r){return!1}},Yr=Object.prototype.toString,ud="[object Object]",fd="[object Function]",pd="[object GeneratorFunction]",ld="[object HTMLAllCollection]",cd="[object HTML document.all class]",dd="[object HTMLCollection]",md=typeof Symbol=="function"&&!!Symbol.toStringTag,yd=!(0 in[,]),an=function(){return!1};typeof document=="object"&&(za=document.all,Yr.call(za)===Yr.call(document.all)&&(an=function(e){if((yd||!e)&&(typeof e=="undefined"||typeof e=="object"))try{var r=Yr.call(e);return(r===ld||r===cd||r===dd||r===ud)&&e("")==null}catch(n){}return!1}));var za;Ya.exports=Oe?function(e){if(an(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Oe(e,null,nn)}catch(r){if(r!==Vr)return!1}return!on(e)&&tn(e)}:function(e){if(an(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(md)return tn(e);if(on(e))return!1;var r=Yr.call(e);return r!==fd&&r!==pd&&!/^\[object HTML/.test(r)?!1:tn(e)}});var sn=d((Hg,Ja)=>{"use strict";a();s();Ja.exports=Ha()});var Xa=d((Zg,Qa)=>{"use strict";a();s();var Ka=O(),hd=Ga(),xd=sn(),gd=zr(),Za=Qe();Qa.exports=function(e,r){if(!gd(r))throw new Ka("Assertion failed: P is not a Property Key");var n=hd(e,r);if(n!=null){if(!xd(n))throw new Ka(Za(r)+" is not a function: "+Za(n));return n}}});var rs=d((ev,es)=>{"use strict";a();s();var vd=wr();es.exports=function(e){return(typeof e=="number"||typeof e=="bigint")&&!vd(e)&&e!==1/0&&e!==-1/0}});var Hr=d((nv,ts)=>{"use strict";a();s();var wd=ht(),bd=xt(),Ed=wr(),Sd=rs();ts.exports=function(e){if(typeof e!="number"||Ed(e)||!Sd(e))return!1;var r=wd(e);return bd(r)===r}});var un=d((av,ns)=>{"use strict";a();s();ns.exports=function(e){return!!e&&(typeof e=="function"||typeof e=="object")}});var is=d((fv,os)=>{"use strict";a();s();var Ad=vt();os.exports=function(){return Ad()&&!!Symbol.toStringTag}});var cn=d((cv,ps)=>{"use strict";a();s();var as=$(),Rd=is()(),Td=Rt(),Id=ve(),ln;Rd?(ss=as("RegExp.prototype.exec"),fn={},Jr=function(){throw fn},pn={toString:Jr,valueOf:Jr},typeof Symbol.toPrimitive=="symbol"&&(pn[Symbol.toPrimitive]=Jr),ln=function(e){if(!e||typeof e!="object")return!1;var r=Id(e,"lastIndex"),n=r&&Td(r,"value");if(!n)return!1;try{ss(e,pn)}catch(o){return o===fn}}):(us=as("Object.prototype.toString"),fs="[object RegExp]",ln=function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:us(e)===fs});var ss,fn,Jr,pn,us,fs;ps.exports=ln});var dn=d((yv,ls)=>{"use strict";a();s();var Pd=$(),Od=cn(),Fd=Pd("RegExp.prototype.exec"),Cd=O();ls.exports=function(e){if(!Od(e))throw new Cd("`regex` must be a RegExp");return function(n){return Fd(e,n)!==null}}});var ms=d((gv,ds)=>{"use strict";a();s();var cs=O(),qd=Qe(),Nd=zr(),Ud=un();ds.exports=function(e,r){if(!Ud(e))throw new cs("Assertion failed: Type(O) is not Object");if(!Nd(r))throw new cs("Assertion failed: P is not a Property Key, got "+qd(r));return e[r]}});var hs=d((bv,ys)=>{"use strict";a();s();ys.exports=gt()});var yn=d((Av,xs)=>{"use strict";a();s();var Bd=$(),mn=O(),Md=Hr(),Dd=Bd("String.prototype.slice");xs.exports=function(e,r,n){if(typeof e!="string")throw new mn("Assertion failed: `string` must be a String");if(typeof r!="string")throw new mn("Assertion failed: `searchValue` must be a String");if(!Md(n)||n<0)throw new mn("Assertion failed: `fromIndex` must be a non-negative integer");var o=e.length;if(r===""&&n<=o)return n;for(var i=r.length,u=n;u<=o-i;u+=1){var p=Dd(e,u,u+i);if(p===r)return u}return"NOT-FOUND"}});var Kr=d((Iv,gs)=>{"use strict";a();s();var _d=O();gs.exports=function(e){if(e==null)throw new _d(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}});var ws=d((Fv,vs)=>{"use strict";a();s();var $d=_(),Ld=$d("%String%"),kd=O();vs.exports=function(e){if(typeof e=="symbol")throw new kd("Cannot convert a Symbol value to a string");return Ld(e)}});var hn=d((Nv,Ss)=>{"use strict";a();s();var Wd=Kr(),jd=ws(),Gd=$(),bs=Gd("String.prototype.replace"),Es=/^\s$/.test("\u180E"),zd=Es?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,Vd=Es?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;Ss.exports=function(){var e=jd(Wd(this));return bs(bs(e,zd,""),Vd,"")}});var xn=d((Mv,Rs)=>{"use strict";a();s();var Yd=hn(),As="\u200B",Fe="\u180E";Rs.exports=function(){return String.prototype.trim&&As.trim()===As&&Fe.trim()===Fe&&("_"+Fe).trim()==="_"+Fe&&(Fe+"_").trim()===Fe+"_"?String.prototype.trim:Yd}});var Ps=d(($v,Is)=>{"use strict";a();s();var Hd=Or()(),Ts=Pr(),Jd=xn();Is.exports=function(){var e=Jd();return String.prototype.trim!==e&&(Hd?Ts(String.prototype,"trim",e,!0):Ts(String.prototype,"trim",e)),e}});var qs=d((Wv,Cs)=>{"use strict";a();s();var Kd=Cr(),Zd=Ur(),Qd=Kr(),Xd=hn(),Os=xn(),em=Ps(),rm=Kd(Os()),Fs=function(e){return Qd(e),rm(e)};Zd(Fs,{getPolyfill:Os,implementation:Xd,shim:em});Cs.exports=Fs});var Ds=d((zv,Ms)=>{"use strict";a();s();var Bs=_(),tm=Bs("%RegExp%"),nm=O(),Ns=Bs("%parseInt%"),om=$(),Zr=dn(),Us=om("String.prototype.slice"),im=Zr(/^0b[01]+$/i),am=Zr(/^0o[0-7]+$/i),sm=Zr(/^[-+]0x[0-9a-f]+$/i),um=["\x85","\u200B","\uFFFE"].join(""),fm=new tm("["+um+"]","g"),pm=Zr(fm),lm=qs();Ms.exports=function t(e){if(typeof e!="string")throw new nm("Assertion failed: `argument` is not a String");if(im(e))return+Ns(Us(e,2),2);if(am(e))return+Ns(Us(e,2),8);if(pm(e)||sm(e))return NaN;var r=lm(e);return r!==e?t(r):+e}});var Ls=d((Hv,$s)=>{"use strict";a();s();var cm=O(),_s=Hr(),dm=$(),mm=dm("String.prototype.slice");$s.exports=function(e,r,n){if(typeof e!="string"||!_s(r)||arguments.length>2&&!_s(n))throw new cm("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return mm(e,r,arguments.length>2?n:e.length)}});var gn=d((Zv,ks)=>{"use strict";a();s();var ym=_(),hm=ym("%String%"),xm=O();ks.exports=function(e){if(typeof e=="symbol")throw new xm("Cannot convert a Symbol value to a string");return hm(e)}});var js=d((ew,Ws)=>{"use strict";a();s();Ws.exports=function(e,r){for(var n=0;n<e.length;n+=1)if(!r(e[n],n,e))return!1;return!0}});var zs=d((nw,Gs)=>{"use strict";a();s();var gm=$()("String.prototype.slice");Gs.exports=function(e,r){return e===r?!0:e.length>r.length?!1:gm(r,0,e.length)===e}});var Ys=d((aw,Vs)=>{"use strict";a();s();Vs.exports=function(e){return typeof e=="string"||typeof e=="undefined"}});var Qs=d((fw,Zs)=>{"use strict";a();s();var H=O(),vn=Qe(),vm=Hr(),Hs=un(),Ks=dn(),wm=ms(),bm=qt(),Em=hs(),Sm=yn(),Js=Ds(),J=Ls(),Am=gn(),Rm=js(),Xe=zs(),Tm=Ys(),Im=Ks(/^\$[0-9]/),Pm=Ks(/^\$[0-9][0-9]/);Zs.exports=function(e,r,n,o,i,u){if(typeof e!="string")throw new H("Assertion failed: `matched` must be a String");if(typeof r!="string")throw new H("Assertion failed: `str` must be a String");if(!vm(n)||n<0)throw new H("Assertion failed: `position` must be a nonnegative integer, got "+vn(n));if(!bm(o)||!Rm(o,Tm))throw new H("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+vn(o));if(typeof i!="undefined"&&!Hs(i))throw new H("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof u!="string")throw new H("Assertion failed: `replacementTemplate` must be a String");var p=r.length;if(n>p)throw new H("Assertion failed: position > stringLength, got "+vn(n));for(var l=u,y="";l!=="";){var h,m,g;if(Xe("$$",l))h="$$",m="$";else if(Xe("$`",l))h="$`",m=J(r,0,n);else if(Xe("$&",l))h="$&",m=e;else if(Xe("$'",l)){h="$'";var S=e.length,I=n+S;m=J(r,Em(I,p))}else if(Im(l)){var T=Pm(l)?2:1,q=J(l,1,1+T),U=Js(q);if(U<0||U>99)throw new H("Assertion failed: `index` must be >= 0 and <= 99");var j=o.length;U>j&&T===2&&(T=1,q=J(q,0,1),U=Js(q)),h=J(l,0,1+T),1<=U&&U<=j?(g=o[U-1],typeof g=="undefined"?m="":m=g):m=h}else if(Xe("$<",l)){var ie=Sm(l,">",0);if(!(ie>-1)||typeof i=="undefined")h="$<",m=h;else{h=J(l,0,ie+1);var Ue=J(l,2,ie);if(!Hs(i))throw new H("Assertion failed: Type(namedCaptures) is not Object");g=wm(i,Ue),typeof g=="undefined"?m="":m=Am(g)}}else h=J(l,0,1),m=h;var pr=h.length;l=J(l,pr),y+=m}return y}});var tu=d((cw,ru)=>{"use strict";a();s();var Xs=_(),eu=Cr(),Om=eu(Xs("String.prototype.indexOf"));ru.exports=function(e,r){var n=Xs(e,!!r);return typeof n=="function"&&Om(e,".prototype.")>-1?eu(n):n}});var bn=d((yw,au)=>{"use strict";a();s();var nu=ta(),Fm=Xa(),Cm=Qs(),qm=sn(),Nm=Kr(),Qr=gn(),ou=yn(),Um=_(),Xr=tu(),Bm=wt()(),Mm=cn(),Dm=Um("%Math.max%"),iu=O(),_m=Xr("Array.prototype.push"),wn=Xr("String.prototype.slice"),$m=Xr("String.prototype.indexOf"),Lm=Xr("String.prototype.replace");au.exports=function(e,r){var n=Nm(this),o=Mm(e);if(o&&$m(wn(e,e.source.length+2),"g")===-1)throw new iu("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(Bm&&Symbol.replace){if(e!=null){var i=Fm(e,Symbol.replace);if(typeof i!="undefined")return nu(i,e,[n,r])}}else if(o)return Lm(n,e,r);var u=Qr(n),p=Qr(e),l=qm(r);l||(r=Qr(r));for(var y=p.length,h=Dm(1,y),m=[],g=ou(u,p,0);g!=="NOT-FOUND";)_m(m,g),g=ou(u,p,g+h);for(var S=0,I="",T=0;T<m.length;T+=1){var q;if(l)q=Qr(nu(r,void 0,[p,m[T],u]));else{if(typeof r!="string")throw new iu("Assertion failed: `replaceValue` should be a string at this point");var U=[];q=Cm(p,u,m[T],U,void 0,r)}var j=wn(u,S,m[T]);I+=j+q,S=m[T]+y}return S<u.length&&(I+=wn(u,S)),I}});var En=d((gw,su)=>{"use strict";a();s();var km=bn();su.exports=function(){return String.prototype.replaceAll||km}});var fu=d((bw,uu)=>{"use strict";a();s();var Wm=Ur(),jm=En();uu.exports=function(){var e=jm();return Wm(String.prototype,{replaceAll:e},{replaceAll:function(){return String.prototype.replaceAll!==e}}),e}});var du=d((Aw,cu)=>{"use strict";a();s();var Gm=Cr(),zm=Ur(),pu=bn(),Vm=En(),Ym=fu(),lu=Gm(pu);zm(lu,{getPolyfill:Vm,implementation:pu,shim:Ym});cu.exports=lu});var Nh={};Un(Nh,{DynamicSnippetsGenerator:()=>ot,EndpointSnippetGenerator:()=>Ne});module.exports=Mn(Nh);a();s();var Z1=Af(du(),1);a();s();a();s();a();s();function A(t){throw new Error("Unexpected value: "+JSON.stringify(t))}a();s();a();s();a();s();a();s();a();s();a();s();var Hm=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,mu=Hm;var Jm=typeof self=="object"&&self&&self.Object===Object&&self,Km=mu||Jm||Function("return this")(),yu=Km;var Zm=yu.Symbol,K=Zm;a();s();var hu=Object.prototype,Qm=hu.hasOwnProperty,Xm=hu.toString,er=K?K.toStringTag:void 0;function ey(t){var e=Qm.call(t,er),r=t[er];try{t[er]=void 0;var n=!0}catch(i){}var o=Xm.call(t);return n&&(e?t[er]=r:delete t[er]),o}var xu=ey;a();s();var ry=Object.prototype,ty=ry.toString;function ny(t){return ty.call(t)}var gu=ny;var oy="[object Null]",iy="[object Undefined]",vu=K?K.toStringTag:void 0;function ay(t){return t==null?t===void 0?iy:oy:vu&&vu in Object(t)?xu(t):gu(t)}var wu=ay;a();s();function sy(t){return t!=null&&typeof t=="object"}var bu=sy;var uy="[object Symbol]";function fy(t){return typeof t=="symbol"||bu(t)&&wu(t)==uy}var Eu=fy;a();s();a();s();function py(t,e){for(var r=-1,n=t==null?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var Su=py;a();s();var ly=Array.isArray,Au=ly;var cy=1/0,Ru=K?K.prototype:void 0,Tu=Ru?Ru.toString:void 0;function Iu(t){if(typeof t=="string")return t;if(Au(t))return Su(t,Iu)+"";if(Eu(t))return Tu?Tu.call(t):"";var e=t+"";return e=="0"&&1/t==-cy?"-0":e}var Pu=Iu;a();s();function dy(t){return t==null?"":Pu(t)}var ne=dy;a();s();a();s();a();s();a();s();a();s();a();s();function my(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(o);++n<o;)i[n]=t[n+e];return i}var Ou=my;function yy(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:Ou(t,e,r)}var Fu=yy;a();s();var hy="\\ud800-\\udfff",xy="\\u0300-\\u036f",gy="\\ufe20-\\ufe2f",vy="\\u20d0-\\u20ff",wy=xy+gy+vy,by="\\ufe0e\\ufe0f",Ey="\\u200d",Sy=RegExp("["+Ey+hy+wy+by+"]");function Ay(t){return Sy.test(t)}var et=Ay;a();s();a();s();function Ry(t){return t.split("")}var Cu=Ry;a();s();var qu="\\ud800-\\udfff",Ty="\\u0300-\\u036f",Iy="\\ufe20-\\ufe2f",Py="\\u20d0-\\u20ff",Oy=Ty+Iy+Py,Fy="\\ufe0e\\ufe0f",Cy="["+qu+"]",Sn="["+Oy+"]",An="\\ud83c[\\udffb-\\udfff]",qy="(?:"+Sn+"|"+An+")",Nu="[^"+qu+"]",Uu="(?:\\ud83c[\\udde6-\\uddff]){2}",Bu="[\\ud800-\\udbff][\\udc00-\\udfff]",Ny="\\u200d",Mu=qy+"?",Du="["+Fy+"]?",Uy="(?:"+Ny+"(?:"+[Nu,Uu,Bu].join("|")+")"+Du+Mu+")*",By=Du+Mu+Uy,My="(?:"+[Nu+Sn+"?",Sn,Uu,Bu,Cy].join("|")+")",Dy=RegExp(An+"(?="+An+")|"+My+By,"g");function _y(t){return t.match(Dy)||[]}var _u=_y;function $y(t){return et(t)?_u(t):Cu(t)}var $u=$y;function Ly(t){return function(e){e=ne(e);var r=et(e)?$u(e):void 0,n=r?r[0]:e.charAt(0),o=r?Fu(r,1).join(""):e.slice(1);return n[t]()+o}}var Lu=Ly;var ky=Lu("toUpperCase"),rr=ky;function Wy(t){return rr(ne(t).toLowerCase())}var ku=Wy;a();s();a();s();function jy(t,e,r,n){var o=-1,i=t==null?0:t.length;for(n&&i&&(r=t[++o]);++o<i;)r=e(r,t[o],o,t);return r}var Wu=jy;a();s();a();s();a();s();function Gy(t){return function(e){return t==null?void 0:t[e]}}var ju=Gy;var zy={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Vy=ju(zy),Gu=Vy;var Yy=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Hy="\\u0300-\\u036f",Jy="\\ufe20-\\ufe2f",Ky="\\u20d0-\\u20ff",Zy=Hy+Jy+Ky,Qy="["+Zy+"]",Xy=RegExp(Qy,"g");function eh(t){return t=ne(t),t&&t.replace(Yy,Gu).replace(Xy,"")}var zu=eh;a();s();a();s();var rh=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function th(t){return t.match(rh)||[]}var Vu=th;a();s();var nh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function oh(t){return nh.test(t)}var Yu=oh;a();s();var Qu="\\ud800-\\udfff",ih="\\u0300-\\u036f",ah="\\ufe20-\\ufe2f",sh="\\u20d0-\\u20ff",uh=ih+ah+sh,Xu="\\u2700-\\u27bf",ef="a-z\\xdf-\\xf6\\xf8-\\xff",fh="\\xac\\xb1\\xd7\\xf7",ph="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",lh="\\u2000-\\u206f",ch=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rf="A-Z\\xc0-\\xd6\\xd8-\\xde",dh="\\ufe0e\\ufe0f",tf=fh+ph+lh+ch,nf="['\u2019]",Hu="["+tf+"]",mh="["+uh+"]",of="\\d+",yh="["+Xu+"]",af="["+ef+"]",sf="[^"+Qu+tf+of+Xu+ef+rf+"]",hh="\\ud83c[\\udffb-\\udfff]",xh="(?:"+mh+"|"+hh+")",gh="[^"+Qu+"]",uf="(?:\\ud83c[\\udde6-\\uddff]){2}",ff="[\\ud800-\\udbff][\\udc00-\\udfff]",Ce="["+rf+"]",vh="\\u200d",Ju="(?:"+af+"|"+sf+")",wh="(?:"+Ce+"|"+sf+")",Ku="(?:"+nf+"(?:d|ll|m|re|s|t|ve))?",Zu="(?:"+nf+"(?:D|LL|M|RE|S|T|VE))?",pf=xh+"?",lf="["+dh+"]?",bh="(?:"+vh+"(?:"+[gh,uf,ff].join("|")+")"+lf+pf+")*",Eh="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sh="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ah=lf+pf+bh,Rh="(?:"+[yh,uf,ff].join("|")+")"+Ah,Th=RegExp([Ce+"?"+af+"+"+Ku+"(?="+[Hu,Ce,"$"].join("|")+")",wh+"+"+Zu+"(?="+[Hu,Ce+Ju,"$"].join("|")+")",Ce+"?"+Ju+"+"+Ku,Ce+"+"+Zu,Sh,Eh,of,Rh].join("|"),"g");function Ih(t){return t.match(Th)||[]}var cf=Ih;function Ph(t,e,r){return t=ne(t),e=r?void 0:e,e===void 0?Yu(t)?cf(t):Vu(t):t.match(e)||[]}var df=Ph;var Oh="['\u2019]",Fh=RegExp(Oh,"g");function Ch(t){return function(e){return Wu(df(zu(e).replace(Fh,"")),t,"")}}var mf=Ch;var qh=mf(function(t,e,r){return e=e.toLowerCase(),t+(r?ku(e):e)}),tr=qh;a();s();function nr(t){return Object.keys(t)}a();s();a();s();a();s();var or=class{constructor(){E(this,"reporter");E(this,"snippet");E(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:e,snippet:r}){this.shouldUpdate({snippet:r,reporter:e.errors})&&(this.reporter=e.errors.clone(),this.snippet=r)}getResponseOrThrow({endpoint:e}){var r;if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw(r=this.err)!=null?r:new Error(`Failed to generate snippet for endpoint "${e.method} ${e.path}"`)}shouldUpdate({snippet:e,reporter:r}){var n,o;return this.reporter==null||this.reporter.size()>0&&r.size()===0?!0:e.length>((o=(n=this.snippet)==null?void 0:n.length)!=null?o:0)}};var ir=class{constructor(e){E(this,"context");this.context=e}async generate(e,r={}){let n=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(n.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let o=new or;for(let i of n){let u=this.context.clone(),p=this.createSnippetGenerator(u);try{let l=await p.generateSnippet({endpoint:i,request:e,options:r});if(u.errors.empty())return{snippet:l,errors:void 0};o.update({context:u,snippet:l})}catch(l){o.err==null&&(o.err=l)}}return o.getResponseOrThrow({endpoint:e.endpoint})}generateSync(e,r={}){let n=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(n.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let o=new or;for(let i of n){let u=this.context.clone(),p=this.createSnippetGenerator(u);try{let l=p.generateSnippetSync({endpoint:i,request:e,options:r});if(u.errors.empty())return{snippet:l,errors:void 0};o.update({context:u,snippet:l})}catch(l){o.err==null&&(o.err=l)}}return o.getResponseOrThrow({endpoint:e.endpoint})}};a();s();a();s();a();s();var ar=class{constructor(){E(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH|HEAD)\s(\/\S*)$/)}validate(e){return this.REFERENCE_REGEX.test(e)?{type:"valid"}:{type:"invalid"}}tryParse(e){if(this.validate(e).type==="invalid")return;let n=e.match(this.REFERENCE_REGEX);if(!(n==null||n[1]==null||n[2]==null))return{method:n[1],path:n[2]}}};a();s();var b={Critical:"CRITICAL",Warning:"WARNING"},sr=class t{constructor(){E(this,"errors");E(this,"path");this.errors=[],this.path=[]}add(e){this.errors.push(Cn(Fn({},e),{path:[...this.path]}))}scope(e){this.path.push(e)}unscope(){this.path.pop()}getBySeverity(e){return this.errors.filter(r=>r.severity===e)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let e=new t;return e.errors=[...this.errors],e.path=[...this.path],e}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(e=>({severity:e.severity,path:e.path!=null?this.pathToStringArray(e.path):void 0,message:e.message}))}pathToStringArray(e){let r=[];for(let n of e){if(typeof n=="string"){r.push(n);continue}r[r.length-1]+=`[${n.index}]`}return r}};var ur=class{constructor({ir:e,config:r,options:n={}}){E(this,"config");E(this,"options");E(this,"errors");E(this,"_ir");E(this,"httpEndpointReferenceParser");this._ir=e,this.config=r,this.options=n,this.errors=new sr,this.httpEndpointReferenceParser=new ar}associateQueryParametersByWireValue({parameters:e,values:r}){let n=[];for(let[o,i]of Object.entries(r)){this.errors.scope(o);try{let u=e.find(l=>l.name.wireValue===o);if(u==null)throw this.newParameterNotRecognizedError(o);let p=this.isListTypeReference(u.typeReference)&&!Array.isArray(i)?[i]:i;n.push({name:u.name,typeReference:u.typeReference,value:p})}finally{this.errors.unscope()}}return n}associateByWireValueOrDefault({parameters:e,values:r}){let n=[];for(let o of e){this.errors.scope(o.name.wireValue);try{let i=r[o.name.wireValue];if(i==null)if(o.typeReference.type==="primitive"&&o.typeReference.value==="STRING")i=`<${o.name.wireValue}>`;else{this.errors.add({severity:b.Critical,message:this.newParameterNotRecognizedError(o.name.wireValue).message});continue}n.push({name:o.name,typeReference:o.typeReference,value:i})}finally{this.errors.unscope()}}return n}associateByWireValue({parameters:e,values:r,ignoreMissingParameters:n}){let o=[];for(let[i,u]of Object.entries(r)){this.errors.scope(i);try{let p=e.find(l=>l.name.wireValue===i);if(p==null){if(n)continue;this.errors.add({severity:b.Critical,message:this.newParameterNotRecognizedError(i).message});continue}o.push({name:p.name,typeReference:p.typeReference,value:u})}finally{this.errors.unscope()}}return o}getExampleObjectProperties({parameters:e,snippetObject:r}){let n=typeof r=="object"&&r!==null&&!Array.isArray(r)?r:{},o=[];for(let i of e){let u=n[i.name.wireValue];u==null?i.typeReference.type==="nullable"&&o.push({name:i.name,typeReference:i.typeReference,value:null}):o.push({name:i.name,typeReference:i.typeReference,value:u})}return o}getSingleFileValue({property:e,record:r}){let n=r[e.wireValue];if(n!=null){if(typeof n!="string"){this.errors.add({severity:b.Critical,message:`Expected file value to be a string, got ${typeof n}`});return}return n}}getFileArrayValues({property:e,record:r}){let n=r[e.wireValue];if(n==null)return;if(!Array.isArray(n)){this.errors.add({severity:b.Critical,message:`Expected file array value to be an array of strings, got ${typeof n}`});return}let o=[];for(let i of n){if(typeof i!="string"){this.errors.add({severity:b.Critical,message:`Expected file array value to be an array of strings, got ${typeof i}`});return}o.push(i)}return o}getRecord(e){if(typeof e!="object"||Array.isArray(e)){this.errors.add({severity:b.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(e)?"array":typeof e}`});return}return e==null?{}:e}resolveNamedType({typeId:e}){let r=this._ir.types[e];if(r==null){this.errors.add({severity:b.Critical,message:`Type identified by "${e}" could not be found`});return}return r}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:r}){let n=this.getRecord(r);if(n==null)return;let o=e.discriminant.wireValue,i=n[o];if(i==null){this.errors.add({severity:b.Critical,message:this.newParameterNotRecognizedError(o).message});return}if(typeof i!="string"){this.errors.add({severity:b.Critical,message:`Expected discriminant value to be a string but got: ${typeof i}`});return}let u=e.types[i];if(u==null){this.errors.add({severity:b.Critical,message:`No type found for discriminant value "${i}"`});return}let y=n,{[o]:p}=y,l=Nn(y,[qn(o)]);return{singleDiscriminatedUnionType:u,discriminantValue:u.discriminantValue,value:l}}resolveEndpointOrThrow(e){let r=this.httpEndpointReferenceParser.tryParse(e);if(r==null)throw new Error(`Failed to parse endpoint reference "${e}"`);return this.resolveEndpointLocationOrThrow(r)}resolveEndpointLocation(e){let r=[];for(let n of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:n,parsedEndpoint:e})&&r.push(n);return r}resolveEndpointLocationOrThrow(e){let r=this.resolveEndpointLocation(e);if(r.length===0)throw new Error(`Failed to find endpoint identified by "${e.method} ${e.path}"`);return r}needsRequestParameter({request:e,inlinePathParameters:r,inlineFileProperties:n}){var o;return this.includePathParametersInWrappedRequest({request:e,inlinePathParameters:r})||e.queryParameters!=null&&e.queryParameters.length>0||e.headers!=null&&e.headers.length>0?!0:e.body!=null?this.includeRequestBodyInWrappedRequest({body:e.body,inlineFileProperties:n}):!((o=e.metadata)!=null&&o.onlyPathParameters)}includePathParametersInWrappedRequest({request:e,inlinePathParameters:r}){var n,o;return r&&((o=(n=e.metadata)==null?void 0:n.includePathParameters)!=null?o:!1)}isFileUploadRequestBody(e){switch(e.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:A(e)}}resolveEnvironmentName(e){if(this._ir.environments==null)return;let r=this._ir.environments.environments;switch(r.type){case"singleBaseUrl":{let n=r.environments.find(o=>o.id===e);return n==null?void 0:n.name}case"multipleBaseUrls":{let n=r.environments.find(o=>o.id===e);return n==null?void 0:n.name}default:A(r)}}isSingleEnvironmentID(e){return typeof e=="string"}isMultiEnvironmentValues(e){return typeof e=="object"}validateMultiEnvironmentUrlValues(e){if(this._ir.environments==null)return this.errors.add({severity:b.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let r=this._ir.environments.environments;switch(r.type){case"singleBaseUrl":return this.errors.add({severity:b.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let n=r.environments[0];if(n==null)return this.errors.add({severity:b.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let o=new Set(nr(n.urls));for(let i of nr(e))o.has(i)&&o.delete(i);return o.size>0?(this.errors.add({severity:b.Critical,message:`The provided environments are invalid; got: [${Object.keys(e).join(", ")}], expected: [${nr(n.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:e}){if(typeof e!="number"){this.errors.add({severity:b.Critical,message:this.newTypeMismatchError({expected:"number",value:e}).message});return}return e}getValueAsBoolean({value:e}){if(typeof e!="boolean"){this.errors.add({severity:b.Critical,message:this.newTypeMismatchError({expected:"boolean",value:e}).message});return}return e}getValueAsString({value:e}){if(typeof e!="string"){this.errors.add({severity:b.Critical,message:this.newTypeMismatchError({expected:"string",value:e}).message});return}return e}isOptional(e){switch(e.type){case"nullable":return this.isOptional(e.value);case"optional":return!0;case"named":{let r=this.resolveNamedType({typeId:e.value});return r==null?!1:r.type==="alias"?this.isNullable(r.typeReference):!1}}return!1}isNullable(e){switch(e.type){case"nullable":return!0;case"optional":return this.isNullable(e.value);case"named":{let r=this.resolveNamedType({typeId:e.value});return r==null?!1:r.type==="alias"?this.isNullable(r.typeReference):!1}}return!1}newAuthMismatchError({auth:e,values:r}){return new Error(`Expected auth type ${e.type}, got ${r.type}`)}newParameterNotRecognizedError(e){return new Error(`"${e}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:e,value:r}){return new Error(`Expected ${e}, got ${typeof r}`)}includeRequestBodyInWrappedRequest({body:e,inlineFileProperties:r}){switch(e.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:r});default:A(e)}}includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:r}){return this.fileUploadHasBodyProperties({fileUpload:e})||r&&this.fileUploadHasFileProperties({fileUpload:e})}fileUploadHasBodyProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:A(r)}})}fileUploadHasFileProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:A(r)}})}isListTypeReference(e){return e.type==="optional"?this.isListTypeReference(e.value):e.type==="list"||e.type==="set"}parsedEndpointMatches({endpoint:e,parsedEndpoint:r}){return e.location.method===r.method&&e.location.path===r.path}};a();s();var oe={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};a();s();a();s();function fr(t){return rr(tr(t))}a();s();var x=require("@fern-api/swift-codegen");a();s();var R=require("@fern-api/swift-codegen");var qe=class{constructor({context:e}){E(this,"context");this.context=e}convert(e){switch(e.typeReference.type){case"list":return R.swift.Type.array(this.convert({typeReference:e.typeReference.value}));case"literal":return this.convertLiteral({literal:e.typeReference.value});case"map":return R.swift.Type.dictionary(this.convert({typeReference:e.typeReference.key}),this.convert({typeReference:e.typeReference.value}));case"named":{let r=this.context.resolveNamedType({typeId:e.typeReference.value});return r==null?this.convertUnknown():this.convertNamed({named:r})}case"optional":return R.swift.Type.optional(this.convert({typeReference:e.typeReference.value}));case"nullable":return R.swift.Type.nullable(this.convert({typeReference:e.typeReference.value}));case"primitive":return this.convertPrimitive({primitive:e.typeReference.value});case"set":return R.swift.Type.jsonValue();case"unknown":return this.convertUnknown();default:A(e.typeReference)}}convertNamed({named:e}){switch(e.type){case"alias":return this.convert({typeReference:e.typeReference});case"enum":case"discriminatedUnion":case"object":case"undiscriminatedUnion":return R.swift.Type.custom(e.declaration.name.pascalCase.unsafeName);default:A(e)}}convertLiteral({literal:e}){switch(e.type){case"boolean":return R.swift.Type.bool();case"string":return R.swift.Type.custom(fr(e.value))}}convertUnknown(){return R.swift.Type.jsonValue()}convertPrimitive({primitive:e}){switch(e){case"INTEGER":return R.swift.Type.int();case"UINT":return R.swift.Type.int();case"LONG":return R.swift.Type.int64();case"UINT_64":return R.swift.Type.uint64();case"FLOAT":return R.swift.Type.float();case"DOUBLE":return R.swift.Type.double();case"BOOLEAN":return R.swift.Type.bool();case"STRING":return R.swift.Type.string();case"DATE":return R.swift.Type.date();case"DATE_TIME":return R.swift.Type.date();case"UUID":return R.swift.Type.uuid();case"BASE_64":return R.swift.Type.string();case"BIG_INTEGER":return R.swift.Type.string();default:A(e)}}};var rt=class{constructor({context:e}){E(this,"context");this.context=e}convert(e){switch(e.typeReference.type){case"list":return this.convertList({list:e.typeReference.value,value:e.value});case"literal":{if(e.typeReference.value.type==="string")return x.swift.Expression.enumCaseShorthand(x.LiteralEnum.generateEnumCaseLabel(e.typeReference.value.value));if(e.typeReference.value.type==="boolean")return x.swift.Expression.nop();A(e.typeReference.value);break}case"map":return this.convertMap({map:e.typeReference,value:e.value});case"named":{let r=this.context.resolveNamedType({typeId:e.typeReference.value});return r==null?x.swift.Expression.nop():this.convertNamed({named:r,value:e.value,as:e.as})}case"nullable":return this.convertNullable({nullable:e.typeReference,value:e.value,as:e.as});case"optional":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"primitive":return this.convertPrimitive({primitive:e.typeReference.value,value:e.value,as:e.as});case"set":return x.swift.Expression.nop();case"unknown":return this.convertUnknown(e.value);default:A(e.typeReference)}}convertList({list:e,value:r}){return Array.isArray(r)?x.swift.Expression.arrayLiteral({elements:r.map((n,o)=>{this.context.errors.scope({index:o});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}}),multiline:!0}):(this.context.errors.add({severity:b.Critical,message:`Expected array but got: ${typeof r}`}),x.swift.Expression.nop())}convertMap({map:e,value:r}){return typeof r!="object"||r==null?(this.context.errors.add({severity:b.Critical,message:`Expected object but got: ${r==null?"null":typeof r}`}),x.swift.Expression.nop()):x.swift.Expression.dictionaryLiteral({entries:Object.entries(r).map(([n,o])=>{this.context.errors.scope(n);try{return[this.convert({typeReference:e.key,value:n,as:"mapKey"}),this.convert({typeReference:e.value,value:o,as:"mapValue"})]}finally{this.context.errors.unscope()}}),multiline:!0})}convertNamed({named:e,value:r,as:n}){switch(e.type){case"alias":return this.convert({typeReference:e.typeReference,value:r,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:e,value:r});case"enum":return this.convertEnum({enum_:e,value:r});case"object":return this.convertObject({object_:e,value:r,as:n});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:e,value:r});default:A(e)}}convertNullable({nullable:e,value:r,as:n}){return r==null?x.swift.Expression.enumCaseShorthand("null"):x.swift.Expression.contextualMethodCall({methodName:"value",arguments_:[x.swift.functionArgument({value:this.convert({typeReference:e.value,value:r,as:n})})]})}convertDiscriminatedUnion({discriminatedUnion:e,value:r}){let n=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:r});if(n==null)return x.swift.Expression.nop();let o=n.singleDiscriminatedUnionType,i=this.convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:n,unionVariant:o});return i==null?x.swift.Expression.nop():x.swift.Expression.methodCall({target:x.swift.Expression.reference(e.declaration.name.pascalCase.unsafeName),methodName:x.EnumWithAssociatedValues.sanitizeToCamelCase(o.discriminantValue.name.camelCase.unsafeName),arguments_:[x.swift.functionArgument({value:x.swift.Expression.contextualMethodCall({methodName:"init",arguments_:i,multiline:!0})})],multiline:!0})}convertDiscriminatedUnionProperties({discriminatedUnionTypeInstance:e,unionVariant:r}){var o;let n=this.getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:r});switch(r.type){case"samePropertiesAsObject":{let i=this.context.resolveNamedType({typeId:r.typeId});if(i==null)return;let u=this.convertNamed({named:i,value:e.value});if(!u.isStructInitialization()){this.context.errors.add({severity:b.Critical,message:"Internal error; expected union value to be a struct"});return}let p=u.asStructInitializationOrThrow();return[...n,...(o=p.arguments_)!=null?o:[]]}case"singleProperty":try{this.context.errors.scope(r.discriminantValue.wireValue);let i=this.context.getRecord(e.value);return i==null?[...n]:[...n,x.swift.functionArgument({label:(0,x.sanitizeSelf)(x.EnumWithAssociatedValues.sanitizeToCamelCase(r.discriminantValue.name.camelCase.unsafeName)),value:this.convert({typeReference:r.typeReference,value:i[r.discriminantValue.wireValue]})})]}finally{this.context.errors.unscope()}case"noProperties":return n;default:A(r)}}getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:r}){var o;return this.context.getExampleObjectProperties({parameters:(o=r.properties)!=null?o:[],snippetObject:e.value}).map(i=>{this.context.errors.scope(i.name.wireValue);try{return x.swift.functionArgument({label:(0,x.sanitizeSelf)(i.name.name.camelCase.unsafeName),value:this.convert(i)})}finally{this.context.errors.unscope()}})}convertEnum({enum_:e,value:r}){let n=this.getEnumValue({enum_:e,value:r});return n==null?x.swift.Expression.nop():x.swift.Expression.enumCaseShorthand(n.name.camelCase.unsafeName)}getEnumValue({enum_:e,value:r}){if(typeof r!="string"){this.context.errors.add({severity:b.Critical,message:`Expected enum value string, got: ${typeof r}`});return}let n=e.values.find(o=>o.wireValue===r);if(n==null){this.context.errors.add({severity:b.Critical,message:`An enum value named "${r}" does not exist in this context`});return}return n}convertObject({object_:e,value:r,as:n}){return x.swift.Expression.structInitialization({unsafeName:e.declaration.name.pascalCase.unsafeName,arguments_:this.context.getExampleObjectProperties({parameters:e.properties,snippetObject:r}).map(o=>this.convert(o).isNop()?null:x.swift.functionArgument({label:(0,x.sanitizeSelf)(o.name.name.camelCase.unsafeName),value:this.convert(o)})).filter(o=>o!=null),multiline:!0})}convertUndiscriminatedUnion({undiscriminatedUnion:e,value:r}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:r});return n==null?x.swift.Expression.nop():n}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:r}){for(let n of e.types)try{let o=this.convert({typeReference:n,value:r}),u=new qe({context:this.context}).convert({typeReference:n});return x.swift.Expression.methodCall({target:x.swift.Expression.reference(e.declaration.name.pascalCase.unsafeName),methodName:u.toCaseName(),arguments_:[x.swift.functionArgument({value:o})],multiline:!0})}catch(o){continue}this.context.errors.add({severity:b.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof r}" value`})}convertUnknown(e){switch(typeof e){case"boolean":return x.swift.Expression.contextualMethodCall({methodName:"bool",arguments_:[x.swift.functionArgument({value:x.swift.Expression.boolLiteral(e)})]});case"string":return x.swift.Expression.contextualMethodCall({methodName:"string",arguments_:[x.swift.functionArgument({value:x.swift.Expression.stringLiteral(e)})]});case"number":return x.swift.Expression.contextualMethodCall({methodName:"number",arguments_:[x.swift.functionArgument({value:x.swift.Expression.numberLiteral(e)})]});case"object":return e===null?x.swift.Expression.enumCaseShorthand("null"):Array.isArray(e)?x.swift.Expression.contextualMethodCall({methodName:"array",arguments_:[x.swift.functionArgument({value:x.swift.Expression.arrayLiteral({elements:e.map(r=>this.convertUnknown(r)),multiline:!0})})]}):x.swift.Expression.contextualMethodCall({methodName:"object",arguments_:[x.swift.functionArgument({value:x.swift.Expression.dictionaryLiteral({entries:Object.entries(e).map(([r,n])=>[x.swift.Expression.stringLiteral(r),this.convertUnknown(n)]),multiline:!0})})]});default:throw new Error(`Internal error; unsupported unknown type: ${typeof e}`)}}convertPrimitive({primitive:e,value:r,as:n}){switch(e){case"INTEGER":case"UINT":case"LONG":case"UINT_64":case"FLOAT":case"DOUBLE":{let o=this.getValueAsNumber({value:r,as:n});return o==null?x.swift.Expression.nop():x.swift.Expression.numberLiteral(o)}case"BOOLEAN":{let o=this.getValueAsBoolean({value:r,as:n});return o==null?x.swift.Expression.nop():x.swift.Expression.boolLiteral(o)}case"STRING":{let o=this.context.getValueAsString({value:r});return o==null?x.swift.Expression.nop():x.swift.Expression.stringLiteral(o)}case"DATE":{let o=this.context.getValueAsString({value:r});return o==null?x.swift.Expression.nop():x.swift.Expression.calendarDateLiteral(o)}case"DATE_TIME":{let o=this.context.getValueAsString({value:r});if(o==null)return x.swift.Expression.nop();let i=new Date(o).getTime(),u=Math.round(i/1e3),l=new Date(u*1e3).toISOString().replace(/\.\d{3}Z$/,"Z");return x.swift.Expression.dateLiteral(l)}case"UUID":{let o=this.context.getValueAsString({value:r});return o==null?x.swift.Expression.nop():x.swift.Expression.uuidLiteral(o)}case"BASE_64":{let o=this.context.getValueAsString({value:r});return o==null?x.swift.Expression.nop():x.swift.Expression.stringLiteral(o)}case"BIG_INTEGER":return this.context.getValueAsString({value:r})==null?x.swift.Expression.nop():x.swift.Expression.nop();default:A(e)}}getValueAsNumber({value:e,as:r}){let n=r==="mapKey"&&typeof e=="string"?Number(e):e;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:e,as:r}){let n=(()=>{switch(r){case"mapKey":return e==="true"?!0:e==="false"?!1:e;case"mapValue":case void 0:return e;default:A(r)}})();return this.context.getValueAsBoolean({value:n})}};a();s();var C=require("@fern-api/swift-codegen");var tt=class{constructor({context:e}){E(this,"context");this.context=e}getFilePropertyInfo({body:e,value:r}){var i;let n={fileFields:[],bodyPropertyFields:[]},o=(i=this.context.getRecord(r))!=null?i:{};for(let u of e.properties)switch(u.type){case"file":{let p=C.swift.functionArgument({label:(0,C.sanitizeSelf)(u.name.camelCase.unsafeName),value:this.getSingleFileProperty({property:u,record:o})});n.fileFields.push(p);break}case"fileArray":{let p=C.swift.functionArgument({label:(0,C.sanitizeSelf)(u.name.camelCase.unsafeName),value:this.getArrayFileProperty({property:u,record:o})});n.fileFields.push(p);break}case"bodyProperty":{let p=C.swift.functionArgument({label:(0,C.sanitizeSelf)(u.name.name.camelCase.unsafeName),value:this.getBodyProperty({property:u,record:o})});n.bodyPropertyFields.push(p);break}default:A(u)}return n}getSingleFileProperty({property:e,record:r}){let n=this.context.getSingleFileValue({property:e,record:r});return C.swift.Expression.contextualMethodCall({methodName:"init",arguments_:[C.swift.functionArgument({label:"data",value:C.swift.Expression.dataLiteral(n!=null?n:"")})]})}getArrayFileProperty({property:e,record:r}){let n=this.context.getFileArrayValues({property:e,record:r});return C.swift.Expression.arrayLiteral({elements:(n!=null?n:[]).map(o=>C.swift.Expression.contextualMethodCall({methodName:"init",arguments_:[C.swift.functionArgument({label:"data",value:C.swift.Expression.dataLiteral(o)})]})),multiline:!0})}getBodyProperty({property:e,record:r}){let n=r[e.name.wireValue];return n==null?C.swift.Expression.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:n})}};var nt=class t extends ur{constructor({ir:r,config:n,options:o}){super({ir:r,config:n,options:o});E(this,"ir");E(this,"customConfig");E(this,"dynamicTypeMapper");E(this,"dynamicTypeLiteralMapper");E(this,"filePropertyMapper");this.ir=r,this.customConfig=n.customConfig!=null?n.customConfig:void 0,this.dynamicTypeMapper=new qe({context:this}),this.dynamicTypeLiteralMapper=new rt({context:this}),this.filePropertyMapper=new tt({context:this})}clone(){return new t({ir:this.ir,config:this.config,options:this.options})}getModuleName(){var r,n;return(n=(r=this.customConfig)==null?void 0:r.moduleName)!=null?n:fr(this.getApiName())}getRootClientClassName(){var r,n;return(n=(r=this.customConfig)==null?void 0:r.clientClassName)!=null?n:`${fr(this.getApiName())}Client`}getApiName(){return tr(this.config.workspaceName)}};a();s();var v=require("@fern-api/swift-codegen");var yf="client",Ne=class{constructor({context:e}){E(this,"context");this.context=e}async generateSnippet({endpoint:e,request:r,options:n}){return this.buildCodeBlock({endpoint:e,snippetRequest:r,options:n})}generateSnippetSync({endpoint:e,request:r,options:n}){return this.buildCodeBlock({endpoint:e,snippetRequest:r,options:n})}buildCodeBlock({endpoint:e,snippetRequest:r,options:n}){return[this.generateImportFoundationStatement(),this.generateImportModuleStatement(),v.swift.LineBreak.single(),this.generateMainFunctionDeclarationWithEndpointSnippet({endpoint:e,snippet:r}),v.swift.LineBreak.single(),this.generateMainFunctionInvocationStatement()].map(i=>i.toString()).join("")}generateImportFoundationStatement(){return v.swift.Statement.import("Foundation")}generateImportModuleStatement(){return v.swift.Statement.import(this.context.getModuleName())}generateMainFunctionDeclarationWithEndpointSnippet({endpoint:e,snippet:r}){return v.swift.Statement.functionDeclaration({unsafeName:"main",accessLevel:"private",async:!0,throws:!0,body:v.swift.CodeBlock.withStatements([this.generateRootClientInitializationStatement({auth:e.auth,snippet:r}),v.swift.LineBreak.single(),this.generateEndpointMethodCallStatement({endpoint:e,snippet:r})])})}generateRootClientInitializationStatement({auth:e,snippet:r,additionalArgs:n=[]}){let o=[],i=this.getRootClientBaseURLArg({snippet:r});i!=null&&o.push(i);let u=e?this.getRootClientAuthArgs({auth:e,snippet:r}):[];o.push(...u),o.push(...n);let p=o.filter(l=>!l.value.isNop());return v.swift.Statement.constantDeclaration({unsafeName:yf,value:v.swift.Expression.classInitialization({unsafeName:this.context.getRootClientClassName(),arguments_:p,multiline:p.length>1?!0:void 0})})}getRootClientBaseURLArg({snippet:e}){var r;return e.baseURL!=null&&e.environment!=null?(this.context.errors.add({severity:b.Critical,message:"Cannot specify both baseUrl and environment options"}),null):e.baseURL!=null?((r=this.context.ir.environments)==null?void 0:r.environments.type)==="multipleBaseUrls"?null:v.swift.functionArgument({label:"baseURL",value:v.swift.Expression.stringLiteral(e.baseURL)}):null}getRootClientAuthArgs({auth:e,snippet:r}){let n=[],o=r.auth;if(o==null)return n;switch(e.type){case"basic":if(o.type!=="basic"){this.context.errors.add({severity:b.Critical,message:this.context.newAuthMismatchError({auth:e,values:o}).message});break}n.push(v.swift.functionArgument({label:e.username.camelCase.unsafeName,value:v.swift.Expression.stringLiteral(o.username)}),v.swift.functionArgument({label:e.password.camelCase.unsafeName,value:v.swift.Expression.stringLiteral(o.password)}));break;case"bearer":if(o.type!=="bearer")return this.context.errors.add({severity:b.Critical,message:this.context.newAuthMismatchError({auth:e,values:o}).message}),n;n.push(v.swift.functionArgument({label:e.token.camelCase.unsafeName,value:v.swift.Expression.stringLiteral(o.token)}));break;case"header":if(o.type!=="header")return this.context.errors.add({severity:b.Critical,message:this.context.newAuthMismatchError({auth:e,values:o}).message}),n;n.push(v.swift.functionArgument({label:e.header.name.name.camelCase.unsafeName,value:this.context.dynamicTypeLiteralMapper.convert({typeReference:e.header.typeReference,value:o.value})}));break;case"oauth":return o.type!=="oauth"&&this.context.errors.add({severity:b.Critical,message:this.context.newAuthMismatchError({auth:e,values:o}).message}),n;case"inferred":return o.type!=="inferred"&&this.context.errors.add({severity:b.Critical,message:this.context.newAuthMismatchError({auth:e,values:o}).message}),n;default:A(e)}return n}generateEndpointMethodCallStatement({endpoint:e,snippet:r}){return v.swift.Statement.discardAssignment(this.generateEndpointMethodCallExpression({endpoint:e,snippet:r}))}generateEndpointMethodCallExpression({endpoint:e,snippet:r}){let n=this.getMethodArguments({endpoint:e,snippet:r}).filter(o=>!o.value.isNop());return v.swift.Expression.try(v.swift.Expression.await(v.swift.Expression.methodCall({target:v.swift.Expression.rawValue(yf),methodName:this.getMethodName({endpoint:e}),arguments_:n,multiline:n.length>1?!0:void 0})))}generateMainFunctionInvocationStatement(){return v.swift.Statement.expressionStatement(v.swift.Expression.try(v.swift.Expression.await(v.swift.Expression.functionCall({unsafeName:"main"}))))}getMethodName({endpoint:e}){return e.declaration.fernFilepath.allParts.length>0?`${`${e.declaration.fernFilepath.allParts.map(n=>n.camelCase.unsafeName).join(".")}`}.${e.declaration.name.camelCase.unsafeName}`:e.declaration.name.camelCase.unsafeName}getMethodArguments({endpoint:e,snippet:r}){switch(e.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:e.request,snippet:r});case"body":return this.getMethodArgsForBodyRequest({request:e.request,snippet:r});default:A(e.request)}}getMethodArgsForInlinedRequest({request:e,snippet:r}){let n=[];this.context.errors.scope(oe.PathParameters);let o=[];e.pathParameters!=null&&o.push(...this.getPathParameters({namedParameters:e.pathParameters,snippet:r})),this.context.errors.unscope(),n.push(...o),this.context.errors.scope(oe.QueryParameters);let i=[];e.queryParameters!=null&&i.push(...this.getQueryParameters({namedParameters:e.queryParameters,snippet:r})),this.context.errors.unscope(),n.push(...i),this.context.errors.scope(oe.RequestBody);let u=this.getFilePropertyInfo({request:e,snippet:r});return this.context.errors.unscope(),e.body!=null&&n.push(v.swift.functionArgument({label:"request",value:this.getInlinedRequestArg({request:e,snippet:r,filePropertyInfo:u})})),n}getPathParameters({namedParameters:e,snippet:r}){var n;return this.context.getExampleObjectProperties({parameters:e,snippetObject:(n=r.pathParameters)!=null?n:{}}).map(o=>v.swift.functionArgument({label:o.name.name.camelCase.unsafeName,value:this.context.dynamicTypeLiteralMapper.convert(o)}))}getQueryParameters({namedParameters:e,snippet:r}){var n;return this.context.getExampleObjectProperties({parameters:e,snippetObject:(n=r.queryParameters)!=null?n:{}}).map(o=>v.swift.functionArgument({label:o.name.name.camelCase.unsafeName,value:this.context.dynamicTypeLiteralMapper.convert(o)}))}getFilePropertyInfo({request:e,snippet:r}){return e.body==null||!this.context.isFileUploadRequestBody(e.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:e.body,value:r.requestBody})}getInlinedRequestArg({request:e,snippet:r,filePropertyInfo:n}){this.context.errors.scope(oe.RequestBody);let o=e.body!=null?this.getInlinedRequestBodyObjectFields({body:e.body,value:r.requestBody,filePropertyInfo:n}):[];this.context.errors.unscope();let i=o.filter(u=>!u.value.isNop());return v.swift.Expression.contextualMethodCall({methodName:"init",arguments_:i,multiline:i.length>1?!0:void 0})}getInlinedRequestBodyObjectFields({body:e,value:r,filePropertyInfo:n}){switch(e.type){case"fileUpload":return[...n.fileFields,...n.bodyPropertyFields];case"properties":return this.getInlinedRequestBodyPropertyObjectFields({parameters:e.value,value:r});case"referenced":return[this.getReferencedRequestBodyPropertyObjectField({body:e,value:r})];default:A(e)}}getInlinedRequestBodyPropertyObjectFields({parameters:e,value:r}){return this.context.getExampleObjectProperties({parameters:e,snippetObject:r}).map(n=>v.swift.functionArgument({label:n.name.name.camelCase.unsafeName,value:this.context.dynamicTypeLiteralMapper.convert(n)}))}getReferencedRequestBodyPropertyObjectField({body:e,value:r}){return v.swift.functionArgument({label:e.bodyKey.camelCase.unsafeName,value:this.getReferencedRequestBodyPropertyTypeLiteral({body:e.bodyType,value:r})})}getReferencedRequestBodyPropertyTypeLiteral({body:e,value:r}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:r});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:r});default:A(e)}}getBytesBodyRequestArg({value:e}){return typeof e!="string"?(this.context.errors.add({severity:b.Critical,message:`Expected bytes value to be a string, got ${typeof e}`}),v.swift.Expression.dataLiteral("data")):v.swift.Expression.dataLiteral(e)}getMethodArgsForBodyRequest({request:e,snippet:r}){var i,u;let n=[];this.context.errors.scope(oe.PathParameters);let o=[...(i=this.context.ir.pathParameters)!=null?i:[],...(u=e.pathParameters)!=null?u:[]];return o.length>0&&n.push(...this.getPathParameters({namedParameters:o,snippet:r})),this.context.errors.unscope(),this.context.errors.scope(oe.RequestBody),e.body!=null&&n.push(this.getBodyRequestArg({body:e.body,value:r.requestBody})),this.context.errors.unscope(),n}getBodyRequestArg({body:e,value:r}){switch(e.type){case"bytes":return v.swift.functionArgument({label:"request",value:this.getBytesBodyRequestArg({value:r})});case"typeReference":return v.swift.functionArgument({label:"request",value:this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:r})});default:A(e)}}};var ot=class extends ir{constructor({ir:e,config:r,options:n={}}){super(new nt({ir:e,config:r,options:n}))}async generate(e,r={}){return super.generate(e,r)}generateSync(e,r={}){return super.generateSync(e,r)}createSnippetGenerator(e){return new Ne({context:e})}};0&&(module.exports={DynamicSnippetsGenerator,EndpointSnippetGenerator});
14
- /*! Bundled license information:
15
-
16
- @esbuild-plugins/node-globals-polyfill/Buffer.js:
17
- (*!
18
- * The buffer module from node.js, for the browser.
19
- *
20
- * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
21
- * @license MIT
22
- *)
23
-
24
- lodash-es/lodash.js:
25
- (**
26
- * @license
27
- * Lodash (Custom Build) <https://lodash.com/>
28
- * Build: `lodash modularize exports="es" -o ./`
29
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
30
- * Released under MIT license <https://lodash.com/license>
31
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
32
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
33
- *)
34
- */
35
- //# sourceMappingURL=index.cjs.map