@stacksjs/buddy 0.70.10 → 0.70.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-1e89wpt6.js +2 -0
- package/dist/chunk-2htrvvzn.js +3 -0
- package/dist/chunk-2nrg08kz.js +2 -0
- package/dist/chunk-4v1a15ke.js +5 -0
- package/dist/chunk-68apz1e2.js +2 -0
- package/dist/chunk-6v69415e.js +2 -0
- package/dist/chunk-8nb3z33p.js +2 -0
- package/dist/chunk-992fz6fq.js +3 -0
- package/dist/chunk-9j2yq17h.js +15 -0
- package/dist/chunk-9jthaaph.js +2 -0
- package/dist/chunk-am6xbcgg.js +2 -0
- package/dist/chunk-at17xh96.js +1 -0
- package/dist/chunk-cdr3xnz9.js +2 -0
- package/dist/chunk-cptthhq1.js +2 -0
- package/dist/chunk-cqrmkpzz.js +8 -0
- package/dist/chunk-d9bheak7.js +35 -0
- package/dist/chunk-f0ftye71.js +3 -0
- package/dist/chunk-fvdx05dx.js +25 -0
- package/dist/{chunk-bgqy98qw.js → chunk-hjdz5p2e.js} +1 -1
- package/dist/chunk-m05w5c0s.js +2 -0
- package/dist/chunk-mvkb5fc3.js +2 -0
- package/dist/chunk-nec9r4e3.js +240 -0
- package/dist/chunk-rewjb3gf.js +10 -0
- package/dist/chunk-s6kch47s.js +6 -0
- package/dist/{chunk-5eh2tfep.js → chunk-sgrntkej.js} +2 -2
- package/dist/{chunk-5x7y4ng3.js → chunk-whp9hjd8.js} +2 -2
- package/dist/chunk-x0ahr107.js +33 -0
- package/dist/chunk-x46hz7dc.js +10 -0
- package/dist/{chunk-tx5yb9wb.js → chunk-z4zm45jz.js} +1 -1
- package/dist/chunk-z8qfv6vv.js +5410 -0
- package/dist/chunk-zxq24dtw.js +2 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +45 -45
- package/dist/chunk-2xrqj8ap.js +0 -2
- package/dist/chunk-5vhayxpk.js +0 -25
- package/dist/chunk-5yawz4bx.js +0 -2
- package/dist/chunk-7kc7thq5.js +0 -4699
- package/dist/chunk-7mjm5rg8.js +0 -35
- package/dist/chunk-8acb2bq0.js +0 -1
- package/dist/chunk-9gzvq5jq.js +0 -2
- package/dist/chunk-e1kefb68.js +0 -2
- package/dist/chunk-fds99vbx.js +0 -2
- package/dist/chunk-jky37dv1.js +0 -5
- package/dist/chunk-mzgfvbmm.js +0 -2
- package/dist/chunk-tv4f0d0g.js +0 -2
- package/dist/chunk-v3a5yzn6.js +0 -3
- package/dist/chunk-vrd8j1ky.js +0 -3
- package/dist/chunk-ww48v0ap.js +0 -10
- package/dist/chunk-wz2wxp9f.js +0 -6
- package/dist/chunk-y4k8k1by.js +0 -3
- package/dist/chunk-yatzvt36.js +0 -2
- package/dist/chunk-yv49ttdw.js +0 -10
- package/dist/chunk-z80nypa9.js +0 -1
- package/dist/chunk-zm0j2nyb.js +0 -1
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ga as U,Ha as m}from"./chunk-6v69415e.js";import"./chunk-2pj0cr49.js";/*!
|
|
3
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*
|
|
6
|
+
* Redistribution and use in source and binary forms, with or without
|
|
7
|
+
* modification, are permitted provided that the following conditions are met:
|
|
8
|
+
*
|
|
9
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
* list of conditions and the following disclaimer.
|
|
11
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
* this list of conditions and the following disclaimer in the
|
|
13
|
+
* documentation and/or other materials provided with the distribution.
|
|
14
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
15
|
+
* may be used to endorse or promote products derived from this software without
|
|
16
|
+
* specific prior written permission.
|
|
17
|
+
*
|
|
18
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
19
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
20
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
22
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
23
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
24
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
25
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
26
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
27
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28
|
+
*/function A(k,z){let j=k.slice(0,z).split(/\r\n|\n|\r/g);return[j.length,j.pop().length+1]}function d(k,z,j){let J=k.split(/\r\n|\n|\r/g),K="",Z=(Math.log10(z+1)|0)+1;for(let Q=z-1;Q<=z+1;Q++){let q=J[Q-1];q&&(K+=Q.toString().padEnd(Z," "),K+=": ",K+=q,K+=`
|
|
29
|
+
`,Q===z&&(K+=" ".repeat(Z+j+2),K+=`^
|
|
30
|
+
`))}return K}class x extends Error{line;column;codeblock;constructor(k,z){let[j,J]=A(z.toml,z.ptr),K=d(z.toml,j,J);super(`Invalid TOML document: ${k}
|
|
31
|
+
|
|
32
|
+
${K}`,z),this.line=j,this.column=J,this.codeblock=K}}/*!
|
|
33
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
34
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
+
*
|
|
36
|
+
* Redistribution and use in source and binary forms, with or without
|
|
37
|
+
* modification, are permitted provided that the following conditions are met:
|
|
38
|
+
*
|
|
39
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
40
|
+
* list of conditions and the following disclaimer.
|
|
41
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
42
|
+
* this list of conditions and the following disclaimer in the
|
|
43
|
+
* documentation and/or other materials provided with the distribution.
|
|
44
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
45
|
+
* may be used to endorse or promote products derived from this software without
|
|
46
|
+
* specific prior written permission.
|
|
47
|
+
*
|
|
48
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
49
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
50
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
51
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
52
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
53
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
54
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
55
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
56
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
57
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
58
|
+
*/function M(k,z=0,j=k.length){let J=k.indexOf(`
|
|
59
|
+
`,z);return k[J-1]==="\r"&&J--,J<=j?J:-1}function G(k,z){for(let j=z;j<k.length;j++){let J=k[j];if(J===`
|
|
60
|
+
`)return j;if(J==="\r"&&k[j+1]===`
|
|
61
|
+
`)return j+1;if(J<" "&&J!=="\t"||J==="\x7F")throw new x("control characters are not allowed in comments",{toml:k,ptr:z})}return k.length}function V(k,z,j,J){let K;for(;(K=k[z])===" "||K==="\t"||!j&&(K===`
|
|
62
|
+
`||K==="\r"&&k[z+1]===`
|
|
63
|
+
`);)z++;return J||K!=="#"?z:V(k,G(k,z),j)}function P(k,z,j,J,K=!1){if(!J)return z=M(k,z),z<0?k.length:z;for(let Z=z;Z<k.length;Z++){let Q=k[Z];if(Q==="#")Z=M(k,Z);else{if(Q===j)return Z+1;if(Q===J)return Z;if(K&&(Q===`
|
|
64
|
+
`||Q==="\r"&&k[Z+1]===`
|
|
65
|
+
`))return Z}}throw new x("cannot find end of structure",{toml:k,ptr:z})}function C(k,z){let j=k[z],J=j===k[z+1]&&k[z+1]===k[z+2]?k.slice(z,z+3):j;z+=J.length-1;do z=k.indexOf(J,++z);while(z>-1&&j!=="'"&&k[z-1]==="\\"&&k[z-2]!=="\\");return z>-1&&(z+=J.length,J.length>1&&(k[z]===j&&z++,k[z]===j&&z++)),z}/*!
|
|
66
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
67
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
68
|
+
*
|
|
69
|
+
* Redistribution and use in source and binary forms, with or without
|
|
70
|
+
* modification, are permitted provided that the following conditions are met:
|
|
71
|
+
*
|
|
72
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
73
|
+
* list of conditions and the following disclaimer.
|
|
74
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
75
|
+
* this list of conditions and the following disclaimer in the
|
|
76
|
+
* documentation and/or other materials provided with the distribution.
|
|
77
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
78
|
+
* may be used to endorse or promote products derived from this software without
|
|
79
|
+
* specific prior written permission.
|
|
80
|
+
*
|
|
81
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
82
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
83
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
84
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
85
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
86
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
87
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
88
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
89
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
90
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
91
|
+
*/var s=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i;class v extends Date{#z=!1;#J=!1;#k=null;constructor(k){let z=!0,j=!0,J="Z";if(typeof k=="string"){let K=k.match(s);K?(K[1]||(z=!1,k=`0000-01-01T${k}`),j=!!K[2],K[2]&&+K[2]>23?k="":(J=K[3]||null,k=k.toUpperCase(),!J&&j&&(k+="Z"))):k=""}super(k),isNaN(this.getTime())||(this.#z=z,this.#J=j,this.#k=J)}isDateTime(){return this.#z&&this.#J}isLocal(){return!this.#z||!this.#J||!this.#k}isDate(){return this.#z&&!this.#J}isTime(){return this.#J&&!this.#z}isValid(){return this.#z||this.#J}toISOString(){let k=super.toISOString();if(this.isDate())return k.slice(0,10);if(this.isTime())return k.slice(11,23);if(this.#k===null)return k.slice(0,-1);if(this.#k==="Z")return k;let z=+this.#k.slice(1,3)*60+ +this.#k.slice(4,6);return z=this.#k[0]==="-"?z:-z,new Date(this.getTime()-z*60000).toISOString().slice(0,-1)+this.#k}static wrapAsOffsetDateTime(k,z="Z"){let j=new v(k);return j.#k=z,j}static wrapAsLocalDateTime(k){let z=new v(k);return z.#k=null,z}static wrapAsLocalDate(k){let z=new v(k);return z.#J=!1,z.#k=null,z}static wrapAsLocalTime(k){let z=new v(k);return z.#z=!1,z.#k=null,z}}/*!
|
|
92
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
93
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
94
|
+
*
|
|
95
|
+
* Redistribution and use in source and binary forms, with or without
|
|
96
|
+
* modification, are permitted provided that the following conditions are met:
|
|
97
|
+
*
|
|
98
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
99
|
+
* list of conditions and the following disclaimer.
|
|
100
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
101
|
+
* this list of conditions and the following disclaimer in the
|
|
102
|
+
* documentation and/or other materials provided with the distribution.
|
|
103
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
104
|
+
* may be used to endorse or promote products derived from this software without
|
|
105
|
+
* specific prior written permission.
|
|
106
|
+
*
|
|
107
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
108
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
109
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
110
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
111
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
112
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
113
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
114
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
115
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
116
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
117
|
+
*/var S=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,R=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,O=/^[+-]?0[0-9_]/,T=/^[0-9a-f]{4,8}$/i,w={b:"\b",t:"\t",n:`
|
|
118
|
+
`,f:"\f",r:"\r",'"':'"',"\\":"\\"};function L(k,z=0,j=k.length){let J=k[z]==="'",K=k[z++]===k[z]&&k[z]===k[z+1];K&&(j-=2,k[z+=2]==="\r"&&z++,k[z]===`
|
|
119
|
+
`&&z++);let Z=0,Q,q="",_=z;for(;z<j-1;){let $=k[z++];if($===`
|
|
120
|
+
`||$==="\r"&&k[z]===`
|
|
121
|
+
`){if(!K)throw new x("newlines are not allowed in strings",{toml:k,ptr:z-1})}else if($<" "&&$!=="\t"||$==="\x7F")throw new x("control characters are not allowed in strings",{toml:k,ptr:z-1});if(Q){if(Q=!1,$==="u"||$==="U"){let X=k.slice(z,z+=$==="u"?4:8);if(!T.test(X))throw new x("invalid unicode escape",{toml:k,ptr:Z});try{q+=String.fromCodePoint(parseInt(X,16))}catch{throw new x("invalid unicode escape",{toml:k,ptr:Z})}}else if(K&&($===`
|
|
122
|
+
`||$===" "||$==="\t"||$==="\r")){if(z=V(k,z-1,!0),k[z]!==`
|
|
123
|
+
`&&k[z]!=="\r")throw new x("invalid escape: only line-ending whitespace may be escaped",{toml:k,ptr:Z});z=V(k,z)}else if($ in w)q+=w[$];else throw new x("unrecognized escape sequence",{toml:k,ptr:Z});_=z}else!J&&$==="\\"&&(Z=z-1,Q=!0,q+=k.slice(_,Z))}return q+k.slice(_,j-1)}function u(k,z,j){if(k==="true")return!0;if(k==="false")return!1;if(k==="-inf")return-1/0;if(k==="inf"||k==="+inf")return 1/0;if(k==="nan"||k==="+nan"||k==="-nan")return NaN;if(k==="-0")return 0;let J;if((J=S.test(k))||R.test(k)){if(O.test(k))throw new x("leading zeroes are not allowed",{toml:z,ptr:j});let Z=+k.replace(/_/g,"");if(isNaN(Z))throw new x("invalid number",{toml:z,ptr:j});if(J&&!Number.isSafeInteger(Z))throw new x("integer value cannot be represented losslessly",{toml:z,ptr:j});return Z}let K=new v(k);if(!K.isValid())throw new x("invalid value",{toml:z,ptr:j});return K}/*!
|
|
124
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
125
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
126
|
+
*
|
|
127
|
+
* Redistribution and use in source and binary forms, with or without
|
|
128
|
+
* modification, are permitted provided that the following conditions are met:
|
|
129
|
+
*
|
|
130
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
131
|
+
* list of conditions and the following disclaimer.
|
|
132
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
133
|
+
* this list of conditions and the following disclaimer in the
|
|
134
|
+
* documentation and/or other materials provided with the distribution.
|
|
135
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
136
|
+
* may be used to endorse or promote products derived from this software without
|
|
137
|
+
* specific prior written permission.
|
|
138
|
+
*
|
|
139
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
140
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
141
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
142
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
143
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
144
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
145
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
146
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
147
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
148
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
149
|
+
*/function E(k,z,j,J){let K=k.slice(z,j),Z=K.indexOf("#");Z>-1&&(G(k,Z),K=K.slice(0,Z));let Q=K.trimEnd();if(!J){let q=K.indexOf(`
|
|
150
|
+
`,Q.length);if(q>-1)throw new x("newlines are not allowed in inline tables",{toml:k,ptr:z+q})}return[Q,Z]}function b(k,z,j,J){if(J===0)throw new x("document contains excessively nested structures. aborting.",{toml:k,ptr:z});let K=k[z];if(K==="["||K==="{"){let[q,_]=K==="["?f(k,z,J):a(k,z,J),$=P(k,_,",",j);if(j==="}"){let X=M(k,_,$);if(X>-1)throw new x("newlines are not allowed in inline tables",{toml:k,ptr:X})}return[q,$]}let Z;if(K==='"'||K==="'"){Z=C(k,z);let q=L(k,z,Z);if(j){if(Z=V(k,Z,j!=="]"),k[Z]&&k[Z]!==","&&k[Z]!==j&&k[Z]!==`
|
|
151
|
+
`&&k[Z]!=="\r")throw new x("unexpected character encountered",{toml:k,ptr:Z});Z+=+(k[Z]===",")}return[q,Z]}Z=P(k,z,",",j);let Q=E(k,z,Z-+(k[Z-1]===","),j==="]");if(!Q[0])throw new x("incomplete key-value declaration: no value specified",{toml:k,ptr:z});return j&&Q[1]>-1&&(Z=V(k,z+Q[1]),Z+=+(k[Z]===",")),[u(Q[0],k,z),Z]}/*!
|
|
152
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
153
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
154
|
+
*
|
|
155
|
+
* Redistribution and use in source and binary forms, with or without
|
|
156
|
+
* modification, are permitted provided that the following conditions are met:
|
|
157
|
+
*
|
|
158
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
159
|
+
* list of conditions and the following disclaimer.
|
|
160
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
161
|
+
* this list of conditions and the following disclaimer in the
|
|
162
|
+
* documentation and/or other materials provided with the distribution.
|
|
163
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
164
|
+
* may be used to endorse or promote products derived from this software without
|
|
165
|
+
* specific prior written permission.
|
|
166
|
+
*
|
|
167
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
168
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
169
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
170
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
171
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
172
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
173
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
174
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
175
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
176
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
177
|
+
*/var I=/^[a-zA-Z0-9-_]+[ \t]*$/;function g(k,z,j="="){let J=z-1,K=[],Z=k.indexOf(j,z);if(Z<0)throw new x("incomplete key-value: cannot find end of key",{toml:k,ptr:z});do{let Q=k[z=++J];if(Q!==" "&&Q!=="\t")if(Q==='"'||Q==="'"){if(Q===k[z+1]&&Q===k[z+2])throw new x("multiline strings are not allowed in keys",{toml:k,ptr:z});let q=C(k,z);if(q<0)throw new x("unfinished string encountered",{toml:k,ptr:z});J=k.indexOf(".",q);let _=k.slice(q,J<0||J>Z?Z:J),$=M(_);if($>-1)throw new x("newlines are not allowed in keys",{toml:k,ptr:z+J+$});if(_.trimStart())throw new x("found extra tokens after the string part",{toml:k,ptr:q});if(Z<q&&(Z=k.indexOf(j,q),Z<0))throw new x("incomplete key-value: cannot find end of key",{toml:k,ptr:z});K.push(L(k,z,q))}else{J=k.indexOf(".",z);let q=k.slice(z,J<0||J>Z?Z:J);if(!I.test(q))throw new x("only letter, numbers, dashes and underscores are allowed in keys",{toml:k,ptr:z});K.push(q.trimEnd())}}while(J+1&&J<Z);return[K,V(k,Z+1,!0,!0)]}function a(k,z,j){let J={},K=new Set,Z,Q=0;for(z++;(Z=k[z++])!=="}"&&Z;){if(Z===`
|
|
178
|
+
`)throw new x("newlines are not allowed in inline tables",{toml:k,ptr:z-1});if(Z==="#")throw new x("inline tables cannot contain comments",{toml:k,ptr:z-1});if(Z===",")throw new x("expected key-value, found comma",{toml:k,ptr:z-1});if(Z!==" "&&Z!=="\t"){let q,_=J,$=!1,[X,h]=g(k,z-1);for(let y=0;y<X.length;y++){if(y&&(_=$?_[q]:_[q]={}),q=X[y],($=Object.hasOwn(_,q))&&(typeof _[q]!="object"||K.has(_[q])))throw new x("trying to redefine an already defined value",{toml:k,ptr:z});!$&&q==="__proto__"&&Object.defineProperty(_,q,{enumerable:!0,configurable:!0,writable:!0})}if($)throw new x("trying to redefine an already defined value",{toml:k,ptr:z});let[F,N]=b(k,h,"}",j-1);K.add(F),_[q]=F,z=N,Q=k[z-1]===","?z-1:0}}if(Q)throw new x("trailing commas are not allowed in inline tables",{toml:k,ptr:Q});if(!Z)throw new x("unfinished table encountered",{toml:k,ptr:z});return[J,z]}function f(k,z,j){let J=[],K;for(z++;(K=k[z++])!=="]"&&K;){if(K===",")throw new x("expected value, found comma",{toml:k,ptr:z-1});if(K==="#")z=G(k,z);else if(K!==" "&&K!=="\t"&&K!==`
|
|
179
|
+
`&&K!=="\r"){let Z=b(k,z-1,"]",j-1);J.push(Z[0]),z=Z[1]}}if(!K)throw new x("unfinished array encountered",{toml:k,ptr:z});return[J,z]}/*!
|
|
180
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
181
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
182
|
+
*
|
|
183
|
+
* Redistribution and use in source and binary forms, with or without
|
|
184
|
+
* modification, are permitted provided that the following conditions are met:
|
|
185
|
+
*
|
|
186
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
187
|
+
* list of conditions and the following disclaimer.
|
|
188
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
189
|
+
* this list of conditions and the following disclaimer in the
|
|
190
|
+
* documentation and/or other materials provided with the distribution.
|
|
191
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
192
|
+
* may be used to endorse or promote products derived from this software without
|
|
193
|
+
* specific prior written permission.
|
|
194
|
+
*
|
|
195
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
196
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
197
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
198
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
199
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
200
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
201
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
202
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
203
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
204
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
205
|
+
*/function H(k,z,j,J){let K=z,Z=j,Q,q=!1,_;for(let $=0;$<k.length;$++){if($){if(K=q?K[Q]:K[Q]={},Z=(_=Z[Q]).c,J===0&&(_.t===1||_.t===2))return null;if(_.t===2){let X=K.length-1;K=K[X],Z=Z[X].c}}if(Q=k[$],(q=Object.hasOwn(K,Q))&&Z[Q]?.t===0&&Z[Q]?.d)return null;q||(Q==="__proto__"&&(Object.defineProperty(K,Q,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(Z,Q,{enumerable:!0,configurable:!0,writable:!0})),Z[Q]={t:$<k.length-1&&J===2?3:J,d:!1,i:0,c:{}})}if(_=Z[Q],_.t!==J&&!(J===1&&_.t===3)||(J===2&&(_.d||(_.d=!0,K[Q]=[]),K[Q].push(K={}),_.c[_.i++]=_={t:1,d:!1,i:0,c:{}}),_.d))return null;if(_.d=!0,J===1)K=q?K[Q]:K[Q]={};else if(J===0&&q)return null;return[Q,K,_.c]}function c(k,z){let j=z?.maxDepth??1000,J={},K={},Z=J,Q=K;for(let q=V(k,0);q<k.length;){if(k[q]==="["){let _=k[++q]==="[",$=g(k,q+=+_,"]");if(_){if(k[$[1]-1]!=="]")throw new x("expected end of table declaration",{toml:k,ptr:$[1]-1});$[1]++}let X=H($[0],J,K,_?2:1);if(!X)throw new x("trying to redefine an already defined table or value",{toml:k,ptr:q});Q=X[2],Z=X[1],q=$[1]}else{let _=g(k,q),$=H(_[0],Z,Q,0);if(!$)throw new x("trying to redefine an already defined table or value",{toml:k,ptr:q});let X=b(k,_[1],void 0,j);$[1][$[0]]=X[0],q=X[1]}if(q=V(k,q,!0),k[q]&&k[q]!==`
|
|
206
|
+
`&&k[q]!=="\r")throw new x("each key-value declaration must be followed by an end-of-line",{toml:k,ptr:q});q=V(k,q)}return J}/*!
|
|
207
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
208
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
209
|
+
*
|
|
210
|
+
* Redistribution and use in source and binary forms, with or without
|
|
211
|
+
* modification, are permitted provided that the following conditions are met:
|
|
212
|
+
*
|
|
213
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
214
|
+
* list of conditions and the following disclaimer.
|
|
215
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
216
|
+
* this list of conditions and the following disclaimer in the
|
|
217
|
+
* documentation and/or other materials provided with the distribution.
|
|
218
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
219
|
+
* may be used to endorse or promote products derived from this software without
|
|
220
|
+
* specific prior written permission.
|
|
221
|
+
*
|
|
222
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
223
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
224
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
225
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
226
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
227
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
228
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
229
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
230
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
231
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
232
|
+
*/var D=/^[a-z0-9-_]+$/i;function W(k){let z=typeof k;if(z==="object"){if(Array.isArray(k))return"array";if(k instanceof Date)return"date"}return z}function l(k){for(let z=0;z<k.length;z++)if(W(k[z])!=="object")return!1;return k.length!=0}function p(k){return JSON.stringify(k).replace(/\x7f/g,"\\u007f")}function B(k,z,j){if(j===0)throw new Error("Could not stringify the object: maximum object depth exceeded");if(z==="number")return isNaN(k)?"nan":k===1/0?"inf":k===-1/0?"-inf":k.toString();if(z==="bigint"||z==="boolean")return k.toString();if(z==="string")return p(k);if(z==="date"){if(isNaN(k.getTime()))throw new TypeError("cannot serialize invalid date");return k.toISOString()}if(z==="object")return o(k,j);if(z==="array")return r(k,j)}function o(k,z){let j=Object.keys(k);if(j.length===0)return"{}";let J="{ ";for(let K=0;K<j.length;K++){let Z=j[K];K&&(J+=", "),J+=D.test(Z)?Z:p(Z),J+=" = ",J+=B(k[Z],W(k[Z]),z-1)}return J+" }"}function r(k,z){if(k.length===0)return"[]";let j="[ ";for(let J=0;J<k.length;J++){if(J&&(j+=", "),k[J]===null||k[J]===void 0)throw new TypeError("arrays cannot contain null or undefined values");j+=B(k[J],W(k[J]),z-1)}return j+" ]"}function i(k,z,j){if(j===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let J="";for(let K=0;K<k.length;K++)J+=`[[${z}]]
|
|
233
|
+
`,J+=Y(k[K],z,j),J+=`
|
|
234
|
+
|
|
235
|
+
`;return J}function Y(k,z,j){if(j===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let J="",K="",Z=Object.keys(k);for(let Q=0;Q<Z.length;Q++){let q=Z[Q];if(k[q]!==null&&k[q]!==void 0){let _=W(k[q]);if(_==="symbol"||_==="function")throw new TypeError(`cannot serialize values of type '${_}'`);let $=D.test(q)?q:p(q);if(_==="array"&&l(k[q]))K+=i(k[q],z?`${z}.${$}`:$,j-1);else if(_==="object"){let X=z?`${z}.${$}`:$;K+=`[${X}]
|
|
236
|
+
`,K+=Y(k[q],X,j-1),K+=`
|
|
237
|
+
|
|
238
|
+
`}else J+=$,J+=" = ",J+=B(k[q],_,j),J+=`
|
|
239
|
+
`}}return`${J}
|
|
240
|
+
${K}`.trim()}function t(k,z){if(W(k)!=="object")throw new TypeError("stringify can only be called with an object");let j=z?.maxDepth??1000;return Y(k,"",j)}function e(k){let z=c(k);return U(k,z,{preserveIndentation:!1}),z}function k0(k){let z=m(k,{}),j=t(k);return z.whitespace.start+j+z.whitespace.end}export{k0 as stringifyTOML,e as parseTOML};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{Lc as u6}from"./chunk-sgrntkej.js";import{Tc as U,Wc as N}from"./chunk-2pj0cr49.js";var l=U((Ew,M0)=>{var{defineProperty:u,getOwnPropertyDescriptor:l6,getOwnPropertyNames:d6}=Object,i6=Object.prototype.hasOwnProperty,y=($,w)=>u($,"name",{value:w,configurable:!0}),p6=($,w)=>{for(var z in w)u($,z,{get:w[z],enumerable:!0})},_6=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of d6(w))if(!i6.call($,Z)&&Z!==z)u($,Z,{get:()=>w[Z],enumerable:!(L=l6(w,Z))||L.enumerable})}return $},a6=($)=>_6(u({},"__esModule",{value:!0}),$),A0={};p6(A0,{Field:()=>s6,Fields:()=>r6,HttpRequest:()=>t6,HttpResponse:()=>o6,IHttpRequest:()=>R0.HttpRequest,getHttpHandlerExtensionConfiguration:()=>n6,isValidHostname:()=>I0,resolveHttpHandlerRuntimeConfig:()=>m6});M0.exports=a6(A0);var n6=y(($)=>{return{setHttpHandler(w){$.httpHandler=w},httpHandler(){return $.httpHandler},updateHttpClientConfig(w,z){$.httpHandler?.updateHttpClientConfig(w,z)},httpHandlerConfigs(){return $.httpHandler.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),m6=y(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),R0=u6(),s6=class{static{y(this,"Field")}constructor({name:$,kind:w=R0.FieldPosition.HEADER,values:z=[]}){this.name=$,this.kind=w,this.values=z}add($){this.values.push($)}set($){this.values=$}remove($){this.values=this.values.filter((w)=>w!==$)}toString(){return this.values.map(($)=>$.includes(",")||$.includes(" ")?`"${$}"`:$).join(", ")}get(){return this.values}},r6=class{constructor({fields:$=[],encoding:w="utf-8"}){this.entries={},$.forEach(this.setField.bind(this)),this.encoding=w}static{y(this,"Fields")}setField($){this.entries[$.name.toLowerCase()]=$}getField($){return this.entries[$.toLowerCase()]}removeField($){delete this.entries[$.toLowerCase()]}getByType($){return Object.values(this.entries).filter((w)=>w.kind===$)}},t6=class ${static{y(this,"HttpRequest")}constructor(w){this.method=w.method||"GET",this.hostname=w.hostname||"localhost",this.port=w.port,this.query=w.query||{},this.headers=w.headers||{},this.body=w.body,this.protocol=w.protocol?w.protocol.slice(-1)!==":"?`${w.protocol}:`:w.protocol:"https:",this.path=w.path?w.path.charAt(0)!=="/"?`/${w.path}`:w.path:"/",this.username=w.username,this.password=w.password,this.fragment=w.fragment}static clone(w){let z=new $({...w,headers:{...w.headers}});if(z.query)z.query=N0(z.query);return z}static isInstance(w){if(!w)return!1;let z=w;return"method"in z&&"protocol"in z&&"hostname"in z&&"path"in z&&typeof z.query==="object"&&typeof z.headers==="object"}clone(){return $.clone(this)}};function N0($){return Object.keys($).reduce((w,z)=>{let L=$[z];return{...w,[z]:Array.isArray(L)?[...L]:L}},{})}y(N0,"cloneQuery");var o6=class{static{y(this,"HttpResponse")}constructor($){this.statusCode=$.statusCode,this.reason=$.reason,this.headers=$.headers||{},this.body=$.body}static isInstance($){if(!$)return!1;let w=$;return typeof w.statusCode==="number"&&typeof w.headers==="object"}};function I0($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)}y(I0,"isValidHostname")});var x0=U((gw,S0)=>{var{defineProperty:d,getOwnPropertyDescriptor:e6,getOwnPropertyNames:$4}=Object,w4=Object.prototype.hasOwnProperty,w0=($,w)=>d($,"name",{value:w,configurable:!0}),z4=($,w)=>{for(var z in w)d($,z,{get:w[z],enumerable:!0})},Z4=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of $4(w))if(!w4.call($,Z)&&Z!==z)d($,Z,{get:()=>w[Z],enumerable:!(L=e6(w,Z))||L.enumerable})}return $},L4=($)=>Z4(d({},"__esModule",{value:!0}),$),O0={};z4(O0,{escapeUri:()=>b0,escapeUriPath:()=>K4});S0.exports=L4(O0);var b0=w0(($)=>encodeURIComponent($).replace(/[!'()*]/g,Y4),"escapeUri"),Y4=w0(($)=>`%${$.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),K4=w0(($)=>$.split("/").map(b0).join("/"),"escapeUriPath")});var Z0=U((uw,k0)=>{var{defineProperty:i,getOwnPropertyDescriptor:Q4,getOwnPropertyNames:X4}=Object,G4=Object.prototype.hasOwnProperty,B4=($,w)=>i($,"name",{value:w,configurable:!0}),F4=($,w)=>{for(var z in w)i($,z,{get:w[z],enumerable:!0})},U4=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of X4(w))if(!G4.call($,Z)&&Z!==z)i($,Z,{get:()=>w[Z],enumerable:!(L=Q4(w,Z))||L.enumerable})}return $},V4=($)=>U4(i({},"__esModule",{value:!0}),$),T0={};F4(T0,{buildQueryString:()=>y0});k0.exports=V4(T0);var z0=x0();function y0($){let w=[];for(let z of Object.keys($).sort()){let L=$[z];if(z=z0.escapeUri(z),Array.isArray(L))for(let Z=0,Q=L.length;Z<Q;Z++)w.push(`${z}=${z0.escapeUri(L[Z])}`);else{let Z=z;if(L||typeof L==="string")Z+=`=${z0.escapeUri(L)}`;w.push(Z)}}return w.join("&")}B4(y0,"buildQueryString")});var m0=U((lw,n0)=>{var{create:h4,defineProperty:q,getOwnPropertyDescriptor:W4,getOwnPropertyNames:J4,getPrototypeOf:j4}=Object,D4=Object.prototype.hasOwnProperty,V=($,w)=>q($,"name",{value:w,configurable:!0}),v4=($,w)=>{for(var z in w)q($,z,{get:w[z],enumerable:!0})},q0=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of J4(w))if(!D4.call($,Z)&&Z!==z)q($,Z,{get:()=>w[Z],enumerable:!(L=W4(w,Z))||L.enumerable})}return $},C4=($,w,z)=>(z=$!=null?h4(j4($)):{},q0(w||!$||!$.__esModule?q(z,"default",{value:$,enumerable:!0}):z,$)),H4=($)=>q0(q({},"__esModule",{value:!0}),$),g0={};v4(g0,{DEFAULT_REQUEST_TIMEOUT:()=>_0,NodeHttp2Handler:()=>T4,NodeHttpHandler:()=>O4,streamCollector:()=>k4});n0.exports=H4(g0);var u0=l(),l0=Z0(),L0=N("node:http"),Y0=N("node:https"),A4=["ECONNRESET","EPIPE","ETIMEDOUT"],d0=V(($)=>{let w={};for(let z of Object.keys($)){let L=$[z];w[z]=Array.isArray(L)?L.join(","):L}return w},"getTransformedHeaders"),H={setTimeout:($,w)=>setTimeout($,w),clearTimeout:($)=>clearTimeout($)},f0=1000,R4=V(($,w,z=0)=>{if(!z)return-1;let L=V((Z)=>{let Q=H.setTimeout(()=>{$.destroy(),w(Object.assign(new Error(`Socket timed out without establishing a connection within ${z} ms`),{name:"TimeoutError"}))},z-Z),Y=V((K)=>{if(K?.connecting)K.on("connect",()=>{H.clearTimeout(Q)});else H.clearTimeout(Q)},"doWithSocket");if($.socket)Y($.socket);else $.on("socket",Y)},"registerTimeout");if(z<2000)return L(0),0;return H.setTimeout(L.bind(null,f0),f0)},"setConnectionTimeout"),N4=3000,I4=V(($,{keepAlive:w,keepAliveMsecs:z},L=N4)=>{if(w!==!0)return-1;let Z=V(()=>{if($.socket)$.socket.setKeepAlive(w,z||0);else $.on("socket",(Q)=>{Q.setKeepAlive(w,z||0)})},"registerListener");if(L===0)return Z(),0;return H.setTimeout(Z,L)},"setSocketKeepAlive"),E0=3000,M4=V(($,w,z=_0)=>{let L=V((Z)=>{let Q=z-Z,Y=V(()=>{$.destroy(),w(Object.assign(new Error(`Connection timed out after ${z} ms`),{name:"TimeoutError"}))},"onTimeout");if($.socket)$.socket.setTimeout(Q,Y),$.on("close",()=>$.socket?.removeListener("timeout",Y));else $.setTimeout(Q,Y)},"registerTimeout");if(0<z&&z<6000)return L(0),0;return H.setTimeout(L.bind(null,z===0?0:E0),E0)},"setSocketTimeout"),i0=N("node:stream"),P0=6000;async function K0($,w,z=P0){let L=w.headers??{},Z=L.Expect||L.expect,Q=-1,Y=!0;if(Z==="100-continue")Y=await Promise.race([new Promise((K)=>{Q=Number(H.setTimeout(()=>K(!0),Math.max(P0,z)))}),new Promise((K)=>{$.on("continue",()=>{H.clearTimeout(Q),K(!0)}),$.on("response",()=>{H.clearTimeout(Q),K(!1)}),$.on("error",()=>{H.clearTimeout(Q),K(!1)})})]);if(Y)p0($,w.body)}V(K0,"writeRequestBody");function p0($,w){if(w instanceof i0.Readable){w.pipe($);return}if(w){if(Buffer.isBuffer(w)||typeof w==="string"){$.end(w);return}let z=w;if(typeof z==="object"&&z.buffer&&typeof z.byteOffset==="number"&&typeof z.byteLength==="number"){$.end(Buffer.from(z.buffer,z.byteOffset,z.byteLength));return}$.end(Buffer.from(w));return}$.end()}V(p0,"writeBody");var _0=0,O4=class ${constructor(w){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((z,L)=>{if(typeof w==="function")w().then((Z)=>{z(this.resolveDefaultConfig(Z))}).catch(L);else z(this.resolveDefaultConfig(w))})}static{V(this,"NodeHttpHandler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}static checkSocketUsage(w,z,L=console){let{sockets:Z,requests:Q,maxSockets:Y}=w;if(typeof Y!=="number"||Y===1/0)return z;let K=15000;if(Date.now()-K<z)return z;if(Z&&Q)for(let X in Z){let G=Z[X]?.length??0,F=Q[X]?.length??0;if(G>=Y&&F>=2*Y)return L?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${G} and ${F} additional requests are enqueued.
|
|
2
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return z}resolveDefaultConfig(w){let{requestTimeout:z,connectionTimeout:L,socketTimeout:Z,socketAcquisitionWarningTimeout:Q,httpAgent:Y,httpsAgent:K}=w||{},X=!0,G=50;return{connectionTimeout:L,requestTimeout:z??Z,socketAcquisitionWarningTimeout:Q,httpAgent:(()=>{if(Y instanceof L0.Agent||typeof Y?.destroy==="function")return Y;return new L0.Agent({keepAlive:!0,maxSockets:50,...Y})})(),httpsAgent:(()=>{if(K instanceof Y0.Agent||typeof K?.destroy==="function")return K;return new Y0.Agent({keepAlive:!0,maxSockets:50,...K})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(w,{abortSignal:z}={}){if(!this.config)this.config=await this.configProvider;return new Promise((L,Z)=>{let Q=void 0,Y=[],K=V(async(B)=>{await Q,Y.forEach(H.clearTimeout),L(B)},"resolve"),X=V(async(B)=>{await Q,Y.forEach(H.clearTimeout),Z(B)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(z?.aborted){let B=new Error("Request aborted");B.name="AbortError",X(B);return}let G=w.protocol==="https:",F=G?this.config.httpsAgent:this.config.httpAgent;Y.push(H.setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(F,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let v=l0.buildQueryString(w.query||{}),D=void 0;if(w.username!=null||w.password!=null){let B=w.username??"",W=w.password??"";D=`${B}:${W}`}let j=w.path;if(v)j+=`?${v}`;if(w.fragment)j+=`#${w.fragment}`;let C=w.hostname??"";if(C[0]==="["&&C.endsWith("]"))C=w.hostname.slice(1,-1);else C=w.hostname;let x={headers:w.headers,host:C,method:w.method,path:j,port:w.port,agent:F,auth:D},h=(G?Y0.request:L0.request)(x,(B)=>{let W=new u0.HttpResponse({statusCode:B.statusCode||-1,reason:B.statusMessage,headers:d0(B.headers),body:B});K({response:W})});if(h.on("error",(B)=>{if(A4.includes(B.code))X(Object.assign(B,{name:"TimeoutError"}));else X(B)}),z){let B=V(()=>{h.destroy();let W=new Error("Request aborted");W.name="AbortError",X(W)},"onAbort");if(typeof z.addEventListener==="function"){let W=z;W.addEventListener("abort",B,{once:!0}),h.once("close",()=>W.removeEventListener("abort",B))}else z.onabort=B}Y.push(R4(h,X,this.config.connectionTimeout)),Y.push(M4(h,X,this.config.requestTimeout));let A=x.agent;if(typeof A==="object"&&"keepAlive"in A)Y.push(I4(h,{keepAlive:A.keepAlive,keepAliveMsecs:A.keepAliveMsecs}));Q=K0(h,w,this.config.requestTimeout).catch((B)=>{return Y.forEach(H.clearTimeout),Z(B)})})}updateHttpClientConfig(w,z){this.config=void 0,this.configProvider=this.configProvider.then((L)=>{return{...L,[w]:z}})}httpHandlerConfigs(){return this.config??{}}},c0=N("node:http2"),b4=C4(N("node:http2")),S4=class{constructor($){this.sessions=[],this.sessions=$??[]}static{V(this,"NodeHttp2ConnectionPool")}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast($){this.sessions.push($)}contains($){return this.sessions.includes($)}remove($){this.sessions=this.sessions.filter((w)=>w!==$)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy($){for(let w of this.sessions)if(w===$){if(!w.destroyed)w.destroy()}}},x4=class{constructor($){if(this.sessionCache=new Map,this.config=$,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}static{V(this,"NodeHttp2ConnectionManager")}lease($,w){let z=this.getUrlString($),L=this.sessionCache.get(z);if(L){let K=L.poll();if(K&&!this.config.disableConcurrency)return K}let Z=b4.default.connect(z);if(this.config.maxConcurrency)Z.settings({maxConcurrentStreams:this.config.maxConcurrency},(K)=>{if(K)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+$.destination.toString())});Z.unref();let Q=V(()=>{Z.destroy(),this.deleteSession(z,Z)},"destroySessionCb");if(Z.on("goaway",Q),Z.on("error",Q),Z.on("frameError",Q),Z.on("close",()=>this.deleteSession(z,Z)),w.requestTimeout)Z.setTimeout(w.requestTimeout,Q);let Y=this.sessionCache.get(z)||new S4;return Y.offerLast(Z),this.sessionCache.set(z,Y),Z}deleteSession($,w){let z=this.sessionCache.get($);if(!z)return;if(!z.contains(w))return;z.remove(w),this.sessionCache.set($,z)}release($,w){let z=this.getUrlString($);this.sessionCache.get(z)?.offerLast(w)}destroy(){for(let[$,w]of this.sessionCache){for(let z of w){if(!z.destroyed)z.destroy();w.remove(z)}this.sessionCache.delete($)}}setMaxConcurrentStreams($){if($&&$<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=$}setDisableConcurrentStreams($){this.config.disableConcurrency=$}getUrlString($){return $.destination.toString()}},T4=class ${constructor(w){this.metadata={handlerProtocol:"h2"},this.connectionManager=new x4({}),this.configProvider=new Promise((z,L)=>{if(typeof w==="function")w().then((Z)=>{z(Z||{})}).catch(L);else z(w||{})})}static{V(this,"NodeHttp2Handler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}destroy(){this.connectionManager.destroy()}async handle(w,{abortSignal:z}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}let{requestTimeout:L,disableConcurrentStreams:Z}=this.config;return new Promise((Q,Y)=>{let K=!1,X=void 0,G=V(async(J)=>{await X,Q(J)},"resolve"),F=V(async(J)=>{await X,Y(J)},"reject");if(z?.aborted){K=!0;let J=new Error("Request aborted");J.name="AbortError",F(J);return}let{hostname:v,method:D,port:j,protocol:C,query:x}=w,T="";if(w.username!=null||w.password!=null){let J=w.username??"",I=w.password??"";T=`${J}:${I}@`}let h=`${C}//${T}${v}${j?`:${j}`:""}`,A={destination:new URL(h)},B=this.connectionManager.lease(A,{requestTimeout:this.config?.sessionTimeout,disableConcurrentStreams:Z||!1}),W=V((J)=>{if(Z)this.destroySession(B);K=!0,F(J)},"rejectWithDestroy"),E=l0.buildQueryString(x||{}),$0=w.path;if(E)$0+=`?${E}`;if(w.fragment)$0+=`#${w.fragment}`;let R=B.request({...w.headers,[c0.constants.HTTP2_HEADER_PATH]:$0,[c0.constants.HTTP2_HEADER_METHOD]:D});if(B.ref(),R.on("response",(J)=>{let I=new u0.HttpResponse({statusCode:J[":status"]||-1,headers:d0(J),body:R});if(K=!0,G({response:I}),Z)B.close(),this.connectionManager.deleteSession(h,B)}),L)R.setTimeout(L,()=>{R.close();let J=new Error(`Stream timed out because of no activity for ${L} ms`);J.name="TimeoutError",W(J)});if(z){let J=V(()=>{R.close();let I=new Error("Request aborted");I.name="AbortError",W(I)},"onAbort");if(typeof z.addEventListener==="function"){let I=z;I.addEventListener("abort",J,{once:!0}),R.once("close",()=>I.removeEventListener("abort",J))}else z.onabort=J}R.on("frameError",(J,I,g6)=>{W(new Error(`Frame type id ${J} in stream id ${g6} has failed with code ${I}.`))}),R.on("error",W),R.on("aborted",()=>{W(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${R.rstCode}.`))}),R.on("close",()=>{if(B.unref(),Z)B.destroy();if(!K)W(new Error("Unexpected error: http2 request did not get a response"))}),X=K0(R,w,L)})}updateHttpClientConfig(w,z){this.config=void 0,this.configProvider=this.configProvider.then((L)=>{return{...L,[w]:z}})}httpHandlerConfigs(){return this.config??{}}destroySession(w){if(!w.destroyed)w.destroy()}},y4=class extends i0.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}static{V(this,"Collector")}_write($,w,z){this.bufferedBytes.push($),z()}},k4=V(($)=>{if(f4($))return a0($);return new Promise((w,z)=>{let L=new y4;$.pipe(L),$.on("error",(Z)=>{L.end(),z(Z)}),L.on("error",z),L.on("finish",function(){let Z=new Uint8Array(Buffer.concat(this.bufferedBytes));w(Z)})})},"streamCollector"),f4=V(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");async function a0($){let w=[],z=$.getReader(),L=!1,Z=0;while(!L){let{done:K,value:X}=await z.read();if(X)w.push(X),Z+=X.length;L=K}let Q=new Uint8Array(Z),Y=0;for(let K of w)Q.set(K,Y),Y+=K.length;return Q}V(a0,"collectReadableStream")});var t0=U((_w,r0)=>{var{defineProperty:p,getOwnPropertyDescriptor:E4,getOwnPropertyNames:P4}=Object,c4=Object.prototype.hasOwnProperty,q4=($,w)=>p($,"name",{value:w,configurable:!0}),g4=($,w)=>{for(var z in w)p($,z,{get:w[z],enumerable:!0})},u4=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of P4(w))if(!c4.call($,Z)&&Z!==z)p($,Z,{get:()=>w[Z],enumerable:!(L=E4(w,Z))||L.enumerable})}return $},l4=($)=>u4(p({},"__esModule",{value:!0}),$),s0={};g4(s0,{isArrayBuffer:()=>d4});r0.exports=l4(s0);var d4=q4(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var g=U((aw,$1)=>{var{defineProperty:_,getOwnPropertyDescriptor:i4,getOwnPropertyNames:p4}=Object,_4=Object.prototype.hasOwnProperty,o0=($,w)=>_($,"name",{value:w,configurable:!0}),a4=($,w)=>{for(var z in w)_($,z,{get:w[z],enumerable:!0})},n4=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of p4(w))if(!_4.call($,Z)&&Z!==z)_($,Z,{get:()=>w[Z],enumerable:!(L=i4(w,Z))||L.enumerable})}return $},m4=($)=>n4(_({},"__esModule",{value:!0}),$),e0={};a4(e0,{fromArrayBuffer:()=>r4,fromString:()=>t4});$1.exports=m4(e0);var s4=t0(),Q0=N("node:buffer"),r4=o0(($,w=0,z=$.byteLength-w)=>{if(!s4.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return Q0.Buffer.from($,w,z)},"fromArrayBuffer"),t4=o0(($,w)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return w?Q0.Buffer.from($,w):Q0.Buffer.from($)},"fromString")});var Z1=U((w1)=>{Object.defineProperty(w1,"__esModule",{value:!0});w1.fromBase64=void 0;var o4=g(),e4=/^[A-Za-z0-9+/]*={0,2}$/,$$=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!e4.exec($))throw new TypeError("Invalid base64 string.");let w=o4.fromString($,"base64");return new Uint8Array(w.buffer,w.byteOffset,w.byteLength)};w1.fromBase64=$$});var n=U((mw,Q1)=>{var{defineProperty:a,getOwnPropertyDescriptor:w$,getOwnPropertyNames:z$}=Object,Z$=Object.prototype.hasOwnProperty,X0=($,w)=>a($,"name",{value:w,configurable:!0}),L$=($,w)=>{for(var z in w)a($,z,{get:w[z],enumerable:!0})},Y$=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of z$(w))if(!Z$.call($,Z)&&Z!==z)a($,Z,{get:()=>w[Z],enumerable:!(L=w$(w,Z))||L.enumerable})}return $},K$=($)=>Y$(a({},"__esModule",{value:!0}),$),L1={};L$(L1,{fromUtf8:()=>K1,toUint8Array:()=>Q$,toUtf8:()=>X$});Q1.exports=K$(L1);var Y1=g(),K1=X0(($)=>{let w=Y1.fromString($,"utf8");return new Uint8Array(w.buffer,w.byteOffset,w.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Q$=X0(($)=>{if(typeof $==="string")return K1($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),X$=X0(($)=>{if(typeof $==="string")return $;if(typeof $!=="object"||typeof $.byteOffset!=="number"||typeof $.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return Y1.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var B1=U((X1)=>{Object.defineProperty(X1,"__esModule",{value:!0});X1.toBase64=void 0;var G$=g(),B$=n(),F$=($)=>{let w;if(typeof $==="string")w=B$.fromUtf8($);else w=$;if(typeof w!=="object"||typeof w.byteOffset!=="number"||typeof w.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return G$.fromArrayBuffer(w.buffer,w.byteOffset,w.byteLength).toString("base64")};X1.toBase64=F$});var P=U((rw,m)=>{var{defineProperty:F1,getOwnPropertyDescriptor:U$,getOwnPropertyNames:V$}=Object,h$=Object.prototype.hasOwnProperty,G0=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of V$(w))if(!h$.call($,Z)&&Z!==z)F1($,Z,{get:()=>w[Z],enumerable:!(L=U$(w,Z))||L.enumerable})}return $},U1=($,w,z)=>(G0($,w,"default"),z&&G0(z,w,"default")),W$=($)=>G0(F1({},"__esModule",{value:!0}),$),B0={};m.exports=W$(B0);U1(B0,Z1(),m.exports);U1(B0,B1(),m.exports)});var F0=U((h1)=>{Object.defineProperty(h1,"__esModule",{value:!0});h1.ChecksumStream=void 0;var J$=P(),j$=N("node:stream");class V1 extends j$.Duplex{constructor({expectedChecksum:$,checksum:w,source:z,checksumSourceLocation:L,base64Encoder:Z}){var Q,Y;super();if(typeof z.pipe==="function")this.source=z;else throw new Error(`@smithy/util-stream: unsupported source type ${(Y=(Q=z===null||z===void 0?void 0:z.constructor)===null||Q===void 0?void 0:Q.name)!==null&&Y!==void 0?Y:z} in ChecksumStream.`);this.base64Encoder=Z!==null&&Z!==void 0?Z:J$.toBase64,this.expectedChecksum=$,this.checksum=w,this.checksumSourceLocation=L,this.source.pipe(this)}_read($){}_write($,w,z){try{this.checksum.update($),this.push($)}catch(L){return z(L)}return z()}async _final($){try{let w=await this.checksum.digest(),z=this.base64Encoder(w);if(this.expectedChecksum!==z)return $(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${z}" in response header "${this.checksumSourceLocation}".`))}catch(w){return $(w)}return this.push(null),$()}}h1.ChecksumStream=V1});var k=U((J1)=>{Object.defineProperty(J1,"__esModule",{value:!0});J1.isBlob=J1.isReadableStream=void 0;var D$=($)=>{var w;return typeof ReadableStream==="function"&&(((w=$===null||$===void 0?void 0:$.constructor)===null||w===void 0?void 0:w.name)===ReadableStream.name||$ instanceof ReadableStream)};J1.isReadableStream=D$;var v$=($)=>{var w;return typeof Blob==="function"&&(((w=$===null||$===void 0?void 0:$.constructor)===null||w===void 0?void 0:w.name)===Blob.name||$ instanceof Blob)};J1.isBlob=v$});var H1=U((v1)=>{Object.defineProperty(v1,"__esModule",{value:!0});v1.ChecksumStream=void 0;var H$=typeof ReadableStream==="function"?ReadableStream:function(){};class D1 extends H${}v1.ChecksumStream=D1});var N1=U((A1)=>{Object.defineProperty(A1,"__esModule",{value:!0});A1.createChecksumStream=void 0;var A$=P(),R$=k(),N$=H1(),I$=({expectedChecksum:$,checksum:w,source:z,checksumSourceLocation:L,base64Encoder:Z})=>{var Q,Y;if(!R$.isReadableStream(z))throw new Error(`@smithy/util-stream: unsupported source type ${(Y=(Q=z===null||z===void 0?void 0:z.constructor)===null||Q===void 0?void 0:Q.name)!==null&&Y!==void 0?Y:z} in ChecksumStream.`);let K=Z!==null&&Z!==void 0?Z:A$.toBase64;if(typeof TransformStream!=="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let X=new TransformStream({start(){},async transform(F,v){w.update(F),v.enqueue(F)},async flush(F){let v=await w.digest(),D=K(v);if($!==D){let j=new Error(`Checksum mismatch: expected "${$}" but received "${D}" in response header "${L}".`);F.error(j)}else F.terminate()}});z.pipeThrough(X);let G=X.readable;return Object.setPrototypeOf(G,N$.ChecksumStream.prototype),G};A1.createChecksumStream=I$});var O1=U((I1)=>{Object.defineProperty(I1,"__esModule",{value:!0});I1.createChecksumStream=void 0;var M$=k(),O$=F0(),b$=N1();function S$($){if(typeof ReadableStream==="function"&&M$.isReadableStream($.source))return b$.createChecksumStream($);return new O$.ChecksumStream($)}I1.createChecksumStream=S$});var U0=U((S1)=>{Object.defineProperty(S1,"__esModule",{value:!0});S1.ByteArrayCollector=void 0;class b1{constructor($){this.allocByteArray=$,this.byteLength=0,this.byteArrays=[]}push($){this.byteArrays.push($),this.byteLength+=$.byteLength}flush(){if(this.byteArrays.length===1){let z=this.byteArrays[0];return this.reset(),z}let $=this.allocByteArray(this.byteLength),w=0;for(let z=0;z<this.byteArrays.length;++z){let L=this.byteArrays[z];$.set(L,w),w+=L.byteLength}return this.reset(),$}reset(){this.byteArrays=[],this.byteLength=0}}S1.ByteArrayCollector=b1});var P1=U((f1)=>{Object.defineProperty(f1,"__esModule",{value:!0});f1.modeOf=f1.sizeOf=f1.flush=f1.merge=f1.createBufferedReadable=f1.createBufferedReadableStream=void 0;var x$=U0();function T1($,w,z){let L=$.getReader(),Z=!1,Q=0,Y=["",new x$.ByteArrayCollector((G)=>new Uint8Array(G))],K=-1,X=async(G)=>{let{value:F,done:v}=await L.read(),D=F;if(v){if(K!==-1){let j=s(Y,K);if(c(j)>0)G.enqueue(j)}G.close()}else{let j=k1(D,!1);if(K!==j){if(K>=0)G.enqueue(s(Y,K));K=j}if(K===-1){G.enqueue(D);return}let C=c(D);Q+=C;let x=c(Y[K]);if(C>=w&&x===0)G.enqueue(D);else{let T=y1(Y,K,D);if(!Z&&Q>w*2)Z=!0,z===null||z===void 0||z.warn(`@smithy/util-stream - stream chunk size ${C} is below threshold of ${w}, automatically buffering.`);if(T>=w)G.enqueue(s(Y,K));else await X(G)}}};return new ReadableStream({pull:X})}f1.createBufferedReadableStream=T1;f1.createBufferedReadable=T1;function y1($,w,z){switch(w){case 0:return $[0]+=z,c($[0]);case 1:case 2:return $[w].push(z),c($[w])}}f1.merge=y1;function s($,w){switch(w){case 0:let z=$[0];return $[0]="",z;case 1:case 2:return $[w].flush()}throw new Error(`@smithy/util-stream - invalid index ${w} given to flush()`)}f1.flush=s;function c($){var w,z;return(z=(w=$===null||$===void 0?void 0:$.byteLength)!==null&&w!==void 0?w:$===null||$===void 0?void 0:$.length)!==null&&z!==void 0?z:0}f1.sizeOf=c;function k1($,w=!0){if(w&&typeof Buffer!=="undefined"&&$ instanceof Buffer)return 2;if($ instanceof Uint8Array)return 1;if(typeof $==="string")return 0;return-1}f1.modeOf=k1});var u1=U((q1)=>{Object.defineProperty(q1,"__esModule",{value:!0});q1.createBufferedReadable=void 0;var P$=N("node:stream"),c1=U0(),S=P1(),c$=k();function q$($,w,z){if(c$.isReadableStream($))return S.createBufferedReadableStream($,w,z);let L=new P$.Readable({read(){}}),Z=!1,Q=0,Y=["",new c1.ByteArrayCollector((X)=>new Uint8Array(X)),new c1.ByteArrayCollector((X)=>Buffer.from(new Uint8Array(X)))],K=-1;return $.on("data",(X)=>{let G=S.modeOf(X,!0);if(K!==G){if(K>=0)L.push(S.flush(Y,K));K=G}if(K===-1){L.push(X);return}let F=S.sizeOf(X);Q+=F;let v=S.sizeOf(Y[K]);if(F>=w&&v===0)L.push(X);else{let D=S.merge(Y,K,X);if(!Z&&Q>w*2)Z=!0,z===null||z===void 0||z.warn(`@smithy/util-stream - stream chunk size ${F} is below threshold of ${w}, automatically buffering.`);if(D>=w)L.push(S.flush(Y,K))}}),$.on("end",()=>{if(K!==-1){let X=S.flush(Y,K);if(S.sizeOf(X)>0)L.push(X)}L.push(null)}),L}q1.createBufferedReadable=q$});var i1=U((l1)=>{Object.defineProperty(l1,"__esModule",{value:!0});l1.getAwsChunkedEncodingStream=void 0;var g$=N("node:stream"),u$=($,w)=>{let{base64Encoder:z,bodyLengthChecker:L,checksumAlgorithmFn:Z,checksumLocationName:Q,streamHasher:Y}=w,K=z!==void 0&&Z!==void 0&&Q!==void 0&&Y!==void 0,X=K?Y(Z,$):void 0,G=new g$.Readable({read:()=>{}});return $.on("data",(F)=>{let v=L(F)||0;G.push(`${v.toString(16)}\r
|
|
4
|
+
`),G.push(F),G.push(`\r
|
|
5
|
+
`)}),$.on("end",async()=>{if(G.push(`0\r
|
|
6
|
+
`),K){let F=z(await X);G.push(`${Q}:${F}\r
|
|
7
|
+
`),G.push(`\r
|
|
8
|
+
`)}G.push(null)}),G};l1.getAwsChunkedEncodingStream=u$});var a1=U((p1)=>{Object.defineProperty(p1,"__esModule",{value:!0});p1.headStream=void 0;async function l$($,w){var z;let L=0,Z=[],Q=$.getReader(),Y=!1;while(!Y){let{done:G,value:F}=await Q.read();if(F)Z.push(F),L+=(z=F===null||F===void 0?void 0:F.byteLength)!==null&&z!==void 0?z:0;if(L>=w)break;Y=G}Q.releaseLock();let K=new Uint8Array(Math.min(w,L)),X=0;for(let G of Z){if(G.byteLength>K.byteLength-X){K.set(G.subarray(0,K.byteLength-X),X);break}else K.set(G,X);X+=G.length}return K}p1.headStream=l$});var r1=U((m1)=>{Object.defineProperty(m1,"__esModule",{value:!0});m1.headStream=void 0;var d$=N("node:stream"),i$=a1(),p$=k(),_$=($,w)=>{if(p$.isReadableStream($))return i$.headStream($,w);return new Promise((z,L)=>{let Z=new n1;Z.limit=w,$.pipe(Z),$.on("error",(Q)=>{Z.end(),L(Q)}),Z.on("error",L),Z.on("finish",function(){let Q=new Uint8Array(Buffer.concat(this.buffers));z(Q)})})};m1.headStream=_$;class n1 extends d$.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write($,w,z){var L;if(this.buffers.push($),this.bytesBuffered+=(L=$.byteLength)!==null&&L!==void 0?L:0,this.bytesBuffered>=this.limit){let Z=this.bytesBuffered-this.limit,Q=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=Q.subarray(0,Q.byteLength-Z),this.emit("finish")}z()}}});var L6=U((X8,Z6)=>{var{defineProperty:t,getOwnPropertyDescriptor:a$,getOwnPropertyNames:n$}=Object,m$=Object.prototype.hasOwnProperty,M=($,w)=>t($,"name",{value:w,configurable:!0}),s$=($,w)=>{for(var z in w)t($,z,{get:w[z],enumerable:!0})},r$=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of n$(w))if(!m$.call($,Z)&&Z!==z)t($,Z,{get:()=>w[Z],enumerable:!(L=a$(w,Z))||L.enumerable})}return $},t$=($)=>r$(t({},"__esModule",{value:!0}),$),o1={};s$(o1,{FetchHttpHandler:()=>e$,keepAliveSupport:()=>r,streamCollector:()=>ww});Z6.exports=t$(o1);var t1=l(),o$=Z0();function V0($,w){return new Request($,w)}M(V0,"createRequest");function e1($=0){return new Promise((w,z)=>{if($)setTimeout(()=>{let L=new Error(`Request did not complete within ${$} ms`);L.name="TimeoutError",z(L)},$)})}M(e1,"requestTimeout");var r={supported:void 0},e$=class ${static{M(this,"FetchHttpHandler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}constructor(w){if(typeof w==="function")this.configProvider=w().then((z)=>z||{});else this.config=w??{},this.configProvider=Promise.resolve(this.config);if(r.supported===void 0)r.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in V0("https://[::1]"))}destroy(){}async handle(w,{abortSignal:z}={}){if(!this.config)this.config=await this.configProvider;let L=this.config.requestTimeout,Z=this.config.keepAlive===!0,Q=this.config.credentials;if(z?.aborted){let h=new Error("Request aborted");return h.name="AbortError",Promise.reject(h)}let Y=w.path,K=o$.buildQueryString(w.query||{});if(K)Y+=`?${K}`;if(w.fragment)Y+=`#${w.fragment}`;let X="";if(w.username!=null||w.password!=null){let h=w.username??"",A=w.password??"";X=`${h}:${A}@`}let{port:G,method:F}=w,v=`${w.protocol}//${X}${w.hostname}${G?`:${G}`:""}${Y}`,D=F==="GET"||F==="HEAD"?void 0:w.body,j={body:D,headers:new Headers(w.headers),method:F,credentials:Q};if(this.config?.cache)j.cache=this.config.cache;if(D)j.duplex="half";if(typeof AbortController!=="undefined")j.signal=z;if(r.supported)j.keepalive=Z;if(typeof this.config.requestInit==="function")Object.assign(j,this.config.requestInit(w));let C=M(()=>{},"removeSignalEventListener"),x=V0(v,j),T=[fetch(x).then((h)=>{let A=h.headers,B={};for(let E of A.entries())B[E[0]]=E[1];if(h.body==null)return h.blob().then((E)=>({response:new t1.HttpResponse({headers:B,reason:h.statusText,statusCode:h.status,body:E})}));return{response:new t1.HttpResponse({headers:B,reason:h.statusText,statusCode:h.status,body:h.body})}}),e1(L)];if(z)T.push(new Promise((h,A)=>{let B=M(()=>{let W=new Error("Request aborted");W.name="AbortError",A(W)},"onAbort");if(typeof z.addEventListener==="function"){let W=z;W.addEventListener("abort",B,{once:!0}),C=M(()=>W.removeEventListener("abort",B),"removeSignalEventListener")}else z.onabort=B}));return Promise.race(T).finally(C)}updateHttpClientConfig(w,z){this.config=void 0,this.configProvider=this.configProvider.then((L)=>{return L[w]=z,L})}httpHandlerConfigs(){return this.config??{}}},$w=P(),ww=M(async($)=>{if(typeof Blob==="function"&&$ instanceof Blob||$.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==void 0)return new Uint8Array(await $.arrayBuffer());return $6($)}return w6($)},"streamCollector");async function $6($){let w=await z6($),z=$w.fromBase64(w);return new Uint8Array(z)}M($6,"collectBlob");async function w6($){let w=[],z=$.getReader(),L=!1,Z=0;while(!L){let{done:K,value:X}=await z.read();if(X)w.push(X),Z+=X.length;L=K}let Q=new Uint8Array(Z),Y=0;for(let K of w)Q.set(K,Y),Y+=K.length;return Q}M(w6,"collectStream");function z6($){return new Promise((w,z)=>{let L=new FileReader;L.onloadend=()=>{if(L.readyState!==2)return z(new Error("Reader aborted too early"));let Z=L.result??"",Q=Z.indexOf(","),Y=Q>-1?Q+1:Z.length;w(Z.substring(Y))},L.onabort=()=>z(new Error("Read aborted")),L.onerror=()=>z(L.error),L.readAsDataURL($)})}M(z6,"readToBase64")});var F6=U((G8,B6)=>{var{defineProperty:o,getOwnPropertyDescriptor:zw,getOwnPropertyNames:Zw}=Object,Lw=Object.prototype.hasOwnProperty,Y6=($,w)=>o($,"name",{value:w,configurable:!0}),Yw=($,w)=>{for(var z in w)o($,z,{get:w[z],enumerable:!0})},Kw=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of Zw(w))if(!Lw.call($,Z)&&Z!==z)o($,Z,{get:()=>w[Z],enumerable:!(L=zw(w,Z))||L.enumerable})}return $},Qw=($)=>Kw(o({},"__esModule",{value:!0}),$),K6={};Yw(K6,{fromHex:()=>X6,toHex:()=>G6});B6.exports=Qw(K6);var Q6={},h0={};for(let $=0;$<256;$++){let w=$.toString(16).toLowerCase();if(w.length===1)w=`0${w}`;Q6[$]=w,h0[w]=$}function X6($){if($.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let w=new Uint8Array($.length/2);for(let z=0;z<$.length;z+=2){let L=$.slice(z,z+2).toLowerCase();if(L in h0)w[z/2]=h0[L];else throw new Error(`Cannot decode unrecognized sequence ${L} as hexadecimal`)}return w}Y6(X6,"fromHex");function G6($){let w="";for(let z=0;z<$.byteLength;z++)w+=Q6[$[z]];return w}Y6(G6,"toHex")});var j6=U((W6)=>{Object.defineProperty(W6,"__esModule",{value:!0});W6.sdkStreamMixin=void 0;var Xw=L6(),Gw=P(),Bw=F6(),Fw=n(),U6=k(),V6="The stream has already been transformed.",Uw=($)=>{var w,z;if(!h6($)&&!U6.isReadableStream($)){let Y=((z=(w=$===null||$===void 0?void 0:$.__proto__)===null||w===void 0?void 0:w.constructor)===null||z===void 0?void 0:z.name)||$;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${Y}`)}let L=!1,Z=async()=>{if(L)throw new Error(V6);return L=!0,await Xw.streamCollector($)},Q=(Y)=>{if(typeof Y.stream!=="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
|
|
9
|
+
If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return Y.stream()};return Object.assign($,{transformToByteArray:Z,transformToString:async(Y)=>{let K=await Z();if(Y==="base64")return Gw.toBase64(K);else if(Y==="hex")return Bw.toHex(K);else if(Y===void 0||Y==="utf8"||Y==="utf-8")return Fw.toUtf8(K);else if(typeof TextDecoder==="function")return new TextDecoder(Y).decode(K);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(L)throw new Error(V6);if(L=!0,h6($))return Q($);else if(U6.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};W6.sdkStreamMixin=Uw;var h6=($)=>typeof Blob==="function"&&$ instanceof Blob});var H6=U((v6)=>{Object.defineProperty(v6,"__esModule",{value:!0});v6.sdkStreamMixin=void 0;var Vw=m0(),hw=g(),W0=N("node:stream"),Ww=j6(),D6="The stream has already been transformed.",Jw=($)=>{var w,z;if(!($ instanceof W0.Readable))try{return Ww.sdkStreamMixin($)}catch(Q){let Y=((z=(w=$===null||$===void 0?void 0:$.__proto__)===null||w===void 0?void 0:w.constructor)===null||z===void 0?void 0:z.name)||$;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${Y}`)}let L=!1,Z=async()=>{if(L)throw new Error(D6);return L=!0,await Vw.streamCollector($)};return Object.assign($,{transformToByteArray:Z,transformToString:async(Q)=>{let Y=await Z();if(Q===void 0||Buffer.isEncoding(Q))return hw.fromArrayBuffer(Y.buffer,Y.byteOffset,Y.byteLength).toString(Q);else return new TextDecoder(Q).decode(Y)},transformToWebStream:()=>{if(L)throw new Error(D6);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof W0.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return L=!0,W0.Readable.toWeb($)}})};v6.sdkStreamMixin=Jw});var N6=U((A6)=>{Object.defineProperty(A6,"__esModule",{value:!0});A6.splitStream=void 0;async function jw($){if(typeof $.stream==="function")$=$.stream();return $.tee()}A6.splitStream=jw});var S6=U((O6)=>{Object.defineProperty(O6,"__esModule",{value:!0});O6.splitStream=void 0;var I6=N("node:stream"),Dw=N6(),M6=k();async function vw($){if(M6.isReadableStream($)||M6.isBlob($))return Dw.splitStream($);let w=new I6.PassThrough,z=new I6.PassThrough;return $.pipe(w),$.pipe(z),[w,z]}O6.splitStream=vw});var f6=U((h8,b)=>{var{defineProperty:e,getOwnPropertyDescriptor:Cw,getOwnPropertyNames:Hw}=Object,Aw=Object.prototype.hasOwnProperty,D0=($,w)=>e($,"name",{value:w,configurable:!0}),Rw=($,w)=>{for(var z in w)e($,z,{get:w[z],enumerable:!0})},J0=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of Hw(w))if(!Aw.call($,Z)&&Z!==z)e($,Z,{get:()=>w[Z],enumerable:!(L=Cw(w,Z))||L.enumerable})}return $},f=($,w,z)=>(J0($,w,"default"),z&&J0(z,w,"default")),Nw=($)=>J0(e({},"__esModule",{value:!0}),$),O={};Rw(O,{Uint8ArrayBlobAdapter:()=>j0});b.exports=Nw(O);var x6=P(),T6=n();function y6($,w="utf-8"){if(w==="base64")return x6.toBase64($);return T6.toUtf8($)}D0(y6,"transformToString");function k6($,w){if(w==="base64")return j0.mutate(x6.fromBase64($));return j0.mutate(T6.fromUtf8($))}D0(k6,"transformFromString");var j0=class $ extends Uint8Array{static{D0(this,"Uint8ArrayBlobAdapter")}static fromString(w,z="utf-8"){switch(typeof w){case"string":return k6(w,z);default:throw new Error(`Unsupported conversion from ${typeof w} to Uint8ArrayBlobAdapter.`)}}static mutate(w){return Object.setPrototypeOf(w,$.prototype),w}transformToString(w="utf-8"){return y6(this,w)}};f(O,F0(),b.exports);f(O,O1(),b.exports);f(O,u1(),b.exports);f(O,i1(),b.exports);f(O,r1(),b.exports);f(O,H6(),b.exports);f(O,S6(),b.exports);f(O,k(),b.exports)});var fw=U((W8,q6)=>{var{defineProperty:H0,getOwnPropertyDescriptor:Iw,getOwnPropertyNames:Mw}=Object,Ow=Object.prototype.hasOwnProperty,bw=($,w)=>{for(var z in w)H0($,z,{get:w[z],enumerable:!0})},Sw=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of Mw(w))if(!Ow.call($,Z)&&Z!==z)H0($,Z,{get:()=>w[Z],enumerable:!(L=Iw(w,Z))||L.enumerable})}return $},xw=($)=>Sw(H0({},"__esModule",{value:!0}),$),E6={};bw(E6,{RequestBuilder:()=>c6,collectBody:()=>Tw,extendedEncodeURIComponent:()=>C0,requestBuilder:()=>kw,resolvedPath:()=>P6});q6.exports=xw(E6);var v0=f6(),Tw=async($=new Uint8Array,w)=>{if($ instanceof Uint8Array)return v0.Uint8ArrayBlobAdapter.mutate($);if(!$)return v0.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let z=w.streamCollector($);return v0.Uint8ArrayBlobAdapter.mutate(await z)};function C0($){return encodeURIComponent($).replace(/[!'()*]/g,function(w){return"%"+w.charCodeAt(0).toString(16).toUpperCase()})}var yw=l(),P6=($,w,z,L,Z,Q)=>{if(w!=null&&w[z]!==void 0){let Y=L();if(Y.length<=0)throw new Error("Empty value provided for input HTTP label: "+z+".");$=$.replace(Z,Q?Y.split("/").map((K)=>C0(K)).join("/"):C0(Y))}else throw new Error("No value provided for input HTTP label: "+z+".");return $};function kw($,w){return new c6($,w)}var c6=class{constructor($,w){this.input=$,this.context=w,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:$,protocol:w="https",port:z,path:L}=await this.context.endpoint();this.path=L;for(let Z of this.resolvePathStack)Z(this.path);return new yw.HttpRequest({protocol:w,hostname:this.hostname||$,port:z,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn($){return this.hostname=$,this}bp($){return this.resolvePathStack.push((w)=>{this.path=`${w?.endsWith("/")?w.slice(0,-1):w||""}`+$}),this}p($,w,z,L){return this.resolvePathStack.push((Z)=>{this.path=P6(Z,this.input,$,w,z,L)}),this}h($){return this.headers=$,this}q($){return this.query=$,this}b($){return this.body=$,this}m($){return this.method=$,this}}});
|
|
10
|
+
export{l as sc,t0 as tc,g as uc,n as vc,P as wc,x0 as xc,Z0 as yc,m0 as zc,F6 as Ac,f6 as Bc,fw as Cc};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Kb as g,Wb as w,jc as x}from"./chunk-4v1a15ke.js";import{Bc as b}from"./chunk-rewjb3gf.js";import"./chunk-sgrntkej.js";import{Pc as v}from"./chunk-hjdz5p2e.js";import{Qc as i}from"./chunk-cptthhq1.js";import{Rc as n}from"./chunk-2pj0cr49.js";var E=n(v(),1);var d=n(i(),1);import _ from"node:fs/promises";var C=n(i(),1);var u="169.254.170.2",A="169.254.170.23",O="[fd00:ec2::23]",S=(e,a)=>{if(e.protocol==="https:")return;if(e.hostname===u||e.hostname===A||e.hostname===O)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;let c=e.hostname.split("."),r=(t)=>{let s=parseInt(t,10);return 0<=s&&s<=255};if(c[0]==="127"&&r(c[1])&&r(c[2])&&r(c[3])&&c.length===4)return}throw new C.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
3
|
+
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
4
|
+
- ECS container host 169.254.170.2
|
|
5
|
+
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:a})};var o=n(i(),1);var I=n(b(),1);function P(e){return new g({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((a,[c,r])=>{return a[c]=r,a},{}),fragment:e.hash})}async function K(e,a){let r=await I.sdkStreamMixin(e.body).transformToString();if(e.statusCode===200){let t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new o.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:a});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:w(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new o.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:a}),{Code:t.Code,Message:t.Message})}throw new o.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:a})}var T=(e,a,c)=>{return async()=>{for(let r=0;r<a;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,c))}return await e()}};var B="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",D="http://169.254.170.2",M="AWS_CONTAINER_CREDENTIALS_FULL_URI",N="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",j="AWS_CONTAINER_AUTHORIZATION_TOKEN",H=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let a,c=e.awsContainerCredentialsRelativeUri??process.env[B],r=e.awsContainerCredentialsFullUri??process.env[M],t=e.awsContainerAuthorizationToken??process.env[j],s=e.awsContainerAuthorizationTokenFile??process.env[N],m=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console.warn:e.logger.warn;if(c&&r)m("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),m("awsContainerCredentialsFullUri will take precedence.");if(t&&s)m("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),m("awsContainerAuthorizationToken will take precedence.");if(r)a=r;else if(c)a=`${D}${c}`;else throw new d.CredentialsProviderError(`No HTTP credential provider host provided.
|
|
6
|
+
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let y=new URL(a);S(y,e.logger);let R=new x({requestTimeout:e.timeout??1000,connectionTimeout:e.timeout??1000});return T(async()=>{let f=P(y);if(t)f.headers.Authorization=t;else if(s)f.headers.Authorization=(await _.readFile(s)).toString();try{let h=await R.handle(f);return K(h.response).then((p)=>E.setCredentialFeature(p,"CREDENTIALS_HTTP","z"))}catch(h){throw new d.CredentialsProviderError(String(h),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000)};export{H as fromHttp};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Tc as D}from"./chunk-2pj0cr49.js";var S=D((y,w)=>{var{defineProperty:G,getOwnPropertyDescriptor:v,getOwnPropertyNames:O}=Object,x=Object.prototype.hasOwnProperty,Q=(b,j)=>G(b,"name",{value:j,configurable:!0}),U=(b,j)=>{for(var z in j)G(b,z,{get:j[z],enumerable:!0})},K=(b,j,z,V)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let B of O(j))if(!x.call(b,B)&&B!==z)G(b,B,{get:()=>j[B],enumerable:!(V=v(j,B))||V.enumerable})}return b},q=(b)=>K(G({},"__esModule",{value:!0}),b),W={};U(W,{AlgorithmId:()=>J,EndpointURLScheme:()=>X,FieldPosition:()=>M,HttpApiKeyAuthLocation:()=>$,HttpAuthLocation:()=>Z,IniSectionType:()=>N,RequestHandlerProtocol:()=>Y,SMITHY_CONTEXT_KEY:()=>R,getDefaultClientConfiguration:()=>T,resolveDefaultRuntimeConfig:()=>k});w.exports=q(W);var Z=((b)=>{return b.HEADER="header",b.QUERY="query",b})(Z||{}),$=((b)=>{return b.HEADER="header",b.QUERY="query",b})($||{}),X=((b)=>{return b.HTTP="http",b.HTTPS="https",b})(X||{}),J=((b)=>{return b.MD5="md5",b.CRC32="crc32",b.CRC32C="crc32c",b.SHA1="sha1",b.SHA256="sha256",b})(J||{}),E=Q((b)=>{let j=[];if(b.sha256!==void 0)j.push({algorithmId:()=>"sha256",checksumConstructor:()=>b.sha256});if(b.md5!=null)j.push({algorithmId:()=>"md5",checksumConstructor:()=>b.md5});return{
|
|
2
|
-
export{S as
|
|
1
|
+
import{Tc as D}from"./chunk-2pj0cr49.js";var S=D((y,w)=>{var{defineProperty:G,getOwnPropertyDescriptor:v,getOwnPropertyNames:O}=Object,x=Object.prototype.hasOwnProperty,Q=(b,j)=>G(b,"name",{value:j,configurable:!0}),U=(b,j)=>{for(var z in j)G(b,z,{get:j[z],enumerable:!0})},K=(b,j,z,V)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let B of O(j))if(!x.call(b,B)&&B!==z)G(b,B,{get:()=>j[B],enumerable:!(V=v(j,B))||V.enumerable})}return b},q=(b)=>K(G({},"__esModule",{value:!0}),b),W={};U(W,{AlgorithmId:()=>J,EndpointURLScheme:()=>X,FieldPosition:()=>M,HttpApiKeyAuthLocation:()=>$,HttpAuthLocation:()=>Z,IniSectionType:()=>N,RequestHandlerProtocol:()=>Y,SMITHY_CONTEXT_KEY:()=>R,getDefaultClientConfiguration:()=>T,resolveDefaultRuntimeConfig:()=>k});w.exports=q(W);var Z=((b)=>{return b.HEADER="header",b.QUERY="query",b})(Z||{}),$=((b)=>{return b.HEADER="header",b.QUERY="query",b})($||{}),X=((b)=>{return b.HTTP="http",b.HTTPS="https",b})(X||{}),J=((b)=>{return b.MD5="md5",b.CRC32="crc32",b.CRC32C="crc32c",b.SHA1="sha1",b.SHA256="sha256",b})(J||{}),E=Q((b)=>{let j=[];if(b.sha256!==void 0)j.push({algorithmId:()=>"sha256",checksumConstructor:()=>b.sha256});if(b.md5!=null)j.push({algorithmId:()=>"md5",checksumConstructor:()=>b.md5});return{addChecksumAlgorithm(z){j.push(z)},checksumAlgorithms(){return j}}},"getChecksumConfiguration"),F=Q((b)=>{let j={};return b.checksumAlgorithms().forEach((z)=>{j[z.algorithmId()]=z.checksumConstructor()}),j},"resolveChecksumRuntimeConfig"),T=Q((b)=>{return E(b)},"getDefaultClientConfiguration"),k=Q((b)=>{return F(b)},"resolveDefaultRuntimeConfig"),M=((b)=>{return b[b.HEADER=0]="HEADER",b[b.TRAILER=1]="TRAILER",b})(M||{}),R="__smithy_context",N=((b)=>{return b.PROFILE="profile",b.SSO_SESSION="sso-session",b.SERVICES="services",b})(N||{}),Y=((b)=>{return b.HTTP_0_9="http/0.9",b.HTTP_1_0="http/1.0",b.TDS_8_0="tds/8.0",b})(Y||{})});
|
|
2
|
+
export{S as Lc};
|
|
@@ -15,9 +15,9 @@ Defaulting to 2020, but this will stop working in the future.`);z.ecmaVersion=11
|
|
|
15
15
|
`;break;default:_+=String.fromCharCode(Z);break}if(this.options.locations)++this.curLine,this.lineStart=this.pos;z=this.pos}else++this.pos}};M.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(R.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":if(this.input[this.pos+1]===`
|
|
16
16
|
`)++this.pos;case`
|
|
17
17
|
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};M.readEscapedChar=function(_){var z=this.input.charCodeAt(++this.pos);switch(++this.pos,z){case 110:return`
|
|
18
|
-
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return c(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:if(this.options.locations)this.lineStart=this.pos,++this.curLine;return"";case 56:case 57:if(this.strict)this.invalidStringToken(this.pos-1,"Invalid escape sequence");if(_){var Z=this.pos-1;this.invalidStringToken(Z,"Invalid escape sequence in template string")}default:if(z>=48&&z<=55){var O=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],Q=parseInt(O,8);if(Q>255)O=O.slice(0,-1),Q=parseInt(O,8);if(this.pos+=O.length-1,z=this.input.charCodeAt(this.pos),(O!=="0"||z===56||z===57)&&(this.strict||_))this.invalidStringToken(this.pos-1-O.length,_?"Octal literal in template string":"Octal literal in strict mode");return String.fromCharCode(Q)}if(O0(z)){if(this.options.locations)this.lineStart=this.pos,++this.curLine;return""}return String.fromCharCode(z)}};M.readHexChar=function(_){var z=this.pos,Z=this.readInt(16,_);if(Z===null)this.invalidStringToken(z,"Bad character escape sequence");return Z};M.readWord1=function(){this.containsEsc=!1;var _="",z=!0,Z=this.pos,O=this.options.ecmaVersion>=6;while(this.pos<this.input.length){var Q=this.fullCharCodeAtPos();if(Z0(Q,O))this.pos+=Q<=65535?1:2;else if(Q===92){this.containsEsc=!0,_+=this.input.slice(Z,this.pos);var j=this.pos;if(this.input.charCodeAt(++this.pos)!==117)this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX");++this.pos;var H=this.readCodePoint();if(!(z?p:Z0)(H,O))this.invalidStringToken(j,"Invalid Unicode escape");_+=c(H),Z=this.pos}else break;z=!1}return _+this.input.slice(Z,this.pos)};M.readWord=function(){var _=this.readWord1(),z=R.name;if(this.keywords.test(_))z=q1[_];return this.finishToken(z,_)};var Iz="8.14.1";L.acorn={Parser:L,version:Iz,defaultOptions:Y1,Position:q0,SourceLocation:b0,getLineInfo:q2,Node:g0,TokenType:N,tokTypes:R,keywordTypes:q1,TokContext:g,tokContexts:w,isIdentifierChar:Z0,isIdentifierStart:p,Token:N1,isNewLine:O0,lineBreak:k,lineBreakG:Oz,nonASCIIwhitespace:X2};function bZ(_,z){return L.parse(_,z)}function d2(_,z){return L.tokenizer(_,z)}import{builtinModules as y1,createRequire as ZO}from"module";import pz,{realpathSync as cz,statSync as S1,promises as dz}from"fs";var xZ=String.fromCharCode;var bz=/\/$|\/\?|\/#/,kz=/^\.?\//;function xz(_="",z){if(!z)return _.endsWith("/");return bz.test(_)}function hz(_="",z){if(!z)return _.endsWith("/")?_:_+"/";if(xz(_,!0))return _||"/";let Z=_,O="",Q=_.indexOf("#");if(Q>=0){if(Z=_.slice(0,Q),O=_.slice(Q),!Z)return O}let[j,...H]=Z.split("?");return j+"/"+(H.length>0?`?${H.join("?")}`:"")+O}function gz(_){return _&&_!=="/"}function U1(_,...z){let Z=_||"";for(let O of z.filter((Q)=>gz(Q)))if(Z){let Q=O.replace(kz,"");Z=hz(Z)+Q}else Z=O;return Z}var hZ=Symbol.for("ufo:protocolRelative");var uz=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;var w1=function(_){return uz.test(_)};import{fileURLToPath as U,URL as P,pathToFileURL as p0}from"url";import s from"assert";import t from"process";import f1,{dirname as WO}from"path";import iz from"v8";import{format as oz,inspect as E1}from"util";var j_=new Set(y1);function D1(_){return _.replace(/\\/g,"/")}function o(_,z,Z){let O=[];for(let Q of z.matchAll(_))O.push({...Z,...Q.groups,code:Q[0],start:Q.index,end:(Q.index||0)+Q[0].length});return O}function nz(_){return(_||"").replace(/(\/\/[^\n]*\n|\/\*.*\*\/)/g,"").replace(/\s+/g," ")}function rz(_){let z=_.replace(/{([^}]*)}/,""),Z=z.match(/\* as \s*(\S*)/)?.[1],O=z.split(",").find((Q)=>!/[*{}]/.test(Q))?.trim()||void 0;return{namespacedImport:Z,defaultImport:O}}var sz={}.hasOwnProperty,az=/^([A-Z][a-z\d]*)+$/,tz=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),E={};function C1(_,z="and"){return _.length<3?_.join(` ${z} `):`${_.slice(0,-1).join(", ")}, ${z} ${_[_.length-1]}`}var H_=new Map,ez="__node_internal_",i2;E.ERR_INVALID_ARG_TYPE=h("ERR_INVALID_ARG_TYPE",(_,z,Z)=>{if(s(typeof _==="string","'name' must be a string"),!Array.isArray(z))z=[z];let O="The ";if(_.endsWith(" argument"))O+=`${_} `;else{let $=_.includes(".")?"property":"argument";O+=`"${_}" ${$} `}O+="must be ";let Q=[],j=[],H=[];for(let $ of z)if(s(typeof $==="string","All expected entries have to be of type string"),tz.has($))Q.push($.toLowerCase());else if(az.exec($)===null)s($!=="object",'The value "object" should be written as "Object"'),H.push($);else j.push($);if(j.length>0){let $=Q.indexOf("object");if($!==-1)Q.slice($,1),j.push("Object")}if(Q.length>0){if(O+=`${Q.length>1?"one of type":"of type"} ${C1(Q,"or")}`,j.length>0||H.length>0)O+=" or "}if(j.length>0){if(O+=`an instance of ${C1(j,"or")}`,H.length>0)O+=" or "}if(H.length>0)if(H.length>1)O+=`one of ${C1(H,"or")}`;else{if(H[0].toLowerCase()!==H[0])O+="an ";O+=`${H[0]}`}return O+=`. Received ${Q6(Z)}`,O},TypeError);E.ERR_INVALID_MODULE_SPECIFIER=h("ERR_INVALID_MODULE_SPECIFIER",(_,z,Z=void 0)=>{return`Invalid module "${_}" ${z}${Z?` imported from ${Z}`:""}`},TypeError);E.ERR_INVALID_PACKAGE_CONFIG=h("ERR_INVALID_PACKAGE_CONFIG",(_,z,Z)=>{return`Invalid package config ${_}${z?` while importing ${z}`:""}${Z?`. ${Z}`:""}`},Error);E.ERR_INVALID_PACKAGE_TARGET=h("ERR_INVALID_PACKAGE_TARGET",(_,z,Z,O=!1,Q=void 0)=>{let j=typeof Z==="string"&&!O&&Z.length>0&&!Z.startsWith("./");if(z===".")return s(O===!1),`Invalid "exports" main target ${JSON.stringify(Z)} defined in the package config ${_}package.json${Q?` imported from ${Q}`:""}${j?'; targets must start with "./"':""}`;return`Invalid "${O?"imports":"exports"}" target ${JSON.stringify(Z)} defined for '${z}' in the package config ${_}package.json${Q?` imported from ${Q}`:""}${j?'; targets must start with "./"':""}`},Error);E.ERR_MODULE_NOT_FOUND=h("ERR_MODULE_NOT_FOUND",(_,z,Z=!1)=>{return`Cannot find ${Z?"module":"package"} '${_}' imported from ${z}`},Error);E.ERR_NETWORK_IMPORT_DISALLOWED=h("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error);E.ERR_PACKAGE_IMPORT_NOT_DEFINED=h("ERR_PACKAGE_IMPORT_NOT_DEFINED",(_,z,Z)=>{return`Package import specifier "${_}" is not defined${z?` in package ${z}package.json`:""} imported from ${Z}`},TypeError);E.ERR_PACKAGE_PATH_NOT_EXPORTED=h("ERR_PACKAGE_PATH_NOT_EXPORTED",(_,z,Z=void 0)=>{if(z===".")return`No "exports" main defined in ${_}package.json${Z?` imported from ${Z}`:""}`;return`Package subpath '${z}' is not defined by "exports" in ${_}package.json${Z?` imported from ${Z}`:""}`},Error);E.ERR_UNSUPPORTED_DIR_IMPORT=h("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error);E.ERR_UNSUPPORTED_RESOLVE_REQUEST=h("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError);E.ERR_UNKNOWN_FILE_EXTENSION=h("ERR_UNKNOWN_FILE_EXTENSION",(_,z)=>{return`Unknown file extension "${_}" for ${z}`},TypeError);E.ERR_INVALID_ARG_VALUE=h("ERR_INVALID_ARG_VALUE",(_,z,Z="is invalid")=>{let O=E1(z);if(O.length>128)O=`${O.slice(0,128)}...`;return`The ${_.includes(".")?"property":"argument"} '${_}' ${Z}. Received ${O}`},TypeError);function h(_,z,Z){return H_.set(_,z),_6(Z,_)}function _6(_,z){return Z;function Z(...O){let Q=Error.stackTraceLimit;if(v1())Error.stackTraceLimit=0;let j=new _;if(v1())Error.stackTraceLimit=Q;let H=O6(z,O,j);return Object.defineProperties(j,{message:{value:H,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${z}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),Z6(j),j.code=z,j}}function v1(){try{if(iz.startupSnapshot.isBuildingSnapshot())return!1}catch{}let _=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");if(_===void 0)return Object.isExtensible(Error);return sz.call(_,"writable")&&_.writable!==void 0?_.writable:_.set!==void 0}function z6(_){let z=ez+_.name;return Object.defineProperty(_,"name",{value:z}),_}var Z6=z6(function(_){let z=v1();if(z)i2=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY;if(Error.captureStackTrace(_),z)Error.stackTraceLimit=i2;return _});function O6(_,z,Z){let O=H_.get(_);if(s(O!==void 0,"expected `message` to be found"),typeof O==="function")return s(O.length<=z.length,`Code: ${_}; The provided arguments length (${z.length}) does not match the required ones (${O.length}).`),Reflect.apply(O,Z,z);let Q=/%[dfijoOs]/g,j=0;while(Q.exec(O)!==null)j++;if(s(j===z.length,`Code: ${_}; The provided arguments length (${z.length}) does not match the required ones (${j}).`),z.length===0)return O;return z.unshift(O),Reflect.apply(oz,null,z)}function Q6(_){if(_===null||_===void 0)return String(_);if(typeof _==="function"&&_.name)return`function ${_.name}`;if(typeof _==="object"){if(_.constructor&&_.constructor.name)return`an instance of ${_.constructor.name}`;return`${E1(_,{depth:-1})}`}let z=E1(_,{colors:!1});if(z.length>28)z=`${z.slice(0,25)}...`;return`type ${typeof _} (${z})`}var M0={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:j6}=E,o2=new Map;function R_(_,{base:z,specifier:Z}){let O=o2.get(_);if(O)return O;let Q;try{Q=pz.readFileSync(f1.toNamespacedPath(_),"utf8")}catch(H){let $=H;if($.code!=="ENOENT")throw $}let j={exists:!1,pjsonPath:_,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(Q!==void 0){let H;try{H=JSON.parse(Q)}catch($){let K=$,W=new j6(_,(z?`"${Z}" from `:"")+U(z||Z),K.message);throw W.cause=K,W}if(j.exists=!0,M0.call(H,"name")&&typeof H.name==="string")j.name=H.name;if(M0.call(H,"main")&&typeof H.main==="string")j.main=H.main;if(M0.call(H,"exports"))j.exports=H.exports;if(M0.call(H,"imports"))j.imports=H.imports;if(M0.call(H,"type")&&(H.type==="commonjs"||H.type==="module"))j.type=H.type}return o2.set(_,j),j}function I1(_){let z=new URL("package.json",_);while(!0){if(z.pathname.endsWith("node_modules/package.json"))break;let Q=R_(U(z),{specifier:_});if(Q.exists)return Q;let j=z;if(z=new URL("../package.json",z),z.pathname===j.pathname)break}return{pjsonPath:U(z),exists:!1,type:"none"}}function n2(_){return I1(_).type}var{ERR_UNKNOWN_FILE_EXTENSION:H6}=E,R6={}.hasOwnProperty,$6={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"};function K6(_){if(_&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(_))return"module";if(_==="application/json")return"json";return null}var r2={__proto__:null,"data:":W6,"file:":G6,"http:":s2,"https:":s2,"node:"(){return"builtin"}};function W6(_){let{1:z}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(_.pathname)||[null,null,null];return K6(z)}function Y6(_){let z=_.pathname,Z=z.length;while(Z--){let O=z.codePointAt(Z);if(O===47)return"";if(O===46)return z.codePointAt(Z-1)===47?"":z.slice(Z)}return""}function G6(_,z,Z){let O=Y6(_);if(O===".js"){let H=n2(_);if(H!=="none")return H;return"commonjs"}if(O===""){let H=n2(_);if(H==="none"||H==="commonjs")return"commonjs";return"module"}let Q=$6[O];if(Q)return Q;if(Z)return;let j=U(_);throw new H6(O,j)}function s2(){}function X6(_,z){let Z=_.protocol;if(!R6.call(r2,Z))return null;return r2[Z](_,z,!0)||null}var m0=RegExp.prototype[Symbol.replace],{ERR_NETWORK_IMPORT_DISALLOWED:XO,ERR_INVALID_MODULE_SPECIFIER:c0,ERR_INVALID_PACKAGE_CONFIG:$_,ERR_INVALID_PACKAGE_TARGET:F6,ERR_MODULE_NOT_FOUND:b1,ERR_PACKAGE_IMPORT_NOT_DEFINED:q6,ERR_PACKAGE_PATH_NOT_EXPORTED:A6,ERR_UNSUPPORTED_DIR_IMPORT:V6,ERR_UNSUPPORTED_RESOLVE_REQUEST:a2}=E,K_={}.hasOwnProperty,t2=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,e2=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,B6=/^\.|%|\\/,l0=/\*/g,M6=/%2f|%5c/i,__=new Set,J6=/[/\\]{2}/;function z_(_,z,Z,O,Q,j,H){if(t.noDeprecation)return;let $=U(O),K=J6.exec(H?_:z)!==null;t.emitWarning(`Use of deprecated ${K?"double slash":"leading or trailing slash matching"} resolving "${_}" for module request "${z}" ${z===Z?"":`matched to "${Z}" `}in the "${Q?"imports":"exports"}" field module resolution of the package at ${$}${j?` imported from ${U(j)}`:""}.`,"DeprecationWarning","DEP0166")}function Z_(_,z,Z,O){if(t.noDeprecation)return;if(X6(_,{parentURL:Z.href})!=="module")return;let j=U(_.href),H=U(new P(".",z)),$=U(Z);if(!O)t.emitWarning(`No "main" or "exports" field defined in the package.json for ${H} resolving the main entry point "${j.slice(H.length)}", imported from ${$}.
|
|
18
|
+
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return c(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:if(this.options.locations)this.lineStart=this.pos,++this.curLine;return"";case 56:case 57:if(this.strict)this.invalidStringToken(this.pos-1,"Invalid escape sequence");if(_){var Z=this.pos-1;this.invalidStringToken(Z,"Invalid escape sequence in template string")}default:if(z>=48&&z<=55){var O=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],Q=parseInt(O,8);if(Q>255)O=O.slice(0,-1),Q=parseInt(O,8);if(this.pos+=O.length-1,z=this.input.charCodeAt(this.pos),(O!=="0"||z===56||z===57)&&(this.strict||_))this.invalidStringToken(this.pos-1-O.length,_?"Octal literal in template string":"Octal literal in strict mode");return String.fromCharCode(Q)}if(O0(z)){if(this.options.locations)this.lineStart=this.pos,++this.curLine;return""}return String.fromCharCode(z)}};M.readHexChar=function(_){var z=this.pos,Z=this.readInt(16,_);if(Z===null)this.invalidStringToken(z,"Bad character escape sequence");return Z};M.readWord1=function(){this.containsEsc=!1;var _="",z=!0,Z=this.pos,O=this.options.ecmaVersion>=6;while(this.pos<this.input.length){var Q=this.fullCharCodeAtPos();if(Z0(Q,O))this.pos+=Q<=65535?1:2;else if(Q===92){this.containsEsc=!0,_+=this.input.slice(Z,this.pos);var j=this.pos;if(this.input.charCodeAt(++this.pos)!==117)this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX");++this.pos;var H=this.readCodePoint();if(!(z?p:Z0)(H,O))this.invalidStringToken(j,"Invalid Unicode escape");_+=c(H),Z=this.pos}else break;z=!1}return _+this.input.slice(Z,this.pos)};M.readWord=function(){var _=this.readWord1(),z=R.name;if(this.keywords.test(_))z=q1[_];return this.finishToken(z,_)};var Iz="8.14.1";L.acorn={Parser:L,version:Iz,defaultOptions:Y1,Position:q0,SourceLocation:b0,getLineInfo:q2,Node:g0,TokenType:N,tokTypes:R,keywordTypes:q1,TokContext:g,tokContexts:w,isIdentifierChar:Z0,isIdentifierStart:p,Token:N1,isNewLine:O0,lineBreak:k,lineBreakG:Oz,nonASCIIwhitespace:X2};function bZ(_,z){return L.parse(_,z)}function d2(_,z){return L.tokenizer(_,z)}import{builtinModules as y1,createRequire as ZO}from"node:module";import pz,{realpathSync as cz,statSync as S1,promises as dz}from"node:fs";var xZ=String.fromCharCode;var bz=/\/$|\/\?|\/#/,kz=/^\.?\//;function xz(_="",z){if(!z)return _.endsWith("/");return bz.test(_)}function hz(_="",z){if(!z)return _.endsWith("/")?_:_+"/";if(xz(_,!0))return _||"/";let Z=_,O="",Q=_.indexOf("#");if(Q>=0){if(Z=_.slice(0,Q),O=_.slice(Q),!Z)return O}let[j,...H]=Z.split("?");return j+"/"+(H.length>0?`?${H.join("?")}`:"")+O}function gz(_){return _&&_!=="/"}function U1(_,...z){let Z=_||"";for(let O of z.filter((Q)=>gz(Q)))if(Z){let Q=O.replace(kz,"");Z=hz(Z)+Q}else Z=O;return Z}var hZ=Symbol.for("ufo:protocolRelative");var uz=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;var w1=function(_){return uz.test(_)};import{fileURLToPath as U,URL as P,pathToFileURL as p0}from"node:url";import s from"node:assert";import t from"node:process";import f1,{dirname as WO}from"node:path";import iz from"node:v8";import{format as oz,inspect as E1}from"node:util";var j_=new Set(y1);function D1(_){return _.replace(/\\/g,"/")}function o(_,z,Z){let O=[];for(let Q of z.matchAll(_))O.push({...Z,...Q.groups,code:Q[0],start:Q.index,end:(Q.index||0)+Q[0].length});return O}function nz(_){return(_||"").replace(/(\/\/[^\n]*\n|\/\*.*\*\/)/g,"").replace(/\s+/g," ")}function rz(_){let z=_.replace(/{([^}]*)}/,""),Z=z.match(/\* as \s*(\S*)/)?.[1],O=z.split(",").find((Q)=>!/[*{}]/.test(Q))?.trim()||void 0;return{namespacedImport:Z,defaultImport:O}}var sz={}.hasOwnProperty,az=/^([A-Z][a-z\d]*)+$/,tz=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),E={};function C1(_,z="and"){return _.length<3?_.join(` ${z} `):`${_.slice(0,-1).join(", ")}, ${z} ${_[_.length-1]}`}var H_=new Map,ez="__node_internal_",i2;E.ERR_INVALID_ARG_TYPE=h("ERR_INVALID_ARG_TYPE",(_,z,Z)=>{if(s(typeof _==="string","'name' must be a string"),!Array.isArray(z))z=[z];let O="The ";if(_.endsWith(" argument"))O+=`${_} `;else{let $=_.includes(".")?"property":"argument";O+=`"${_}" ${$} `}O+="must be ";let Q=[],j=[],H=[];for(let $ of z)if(s(typeof $==="string","All expected entries have to be of type string"),tz.has($))Q.push($.toLowerCase());else if(az.exec($)===null)s($!=="object",'The value "object" should be written as "Object"'),H.push($);else j.push($);if(j.length>0){let $=Q.indexOf("object");if($!==-1)Q.slice($,1),j.push("Object")}if(Q.length>0){if(O+=`${Q.length>1?"one of type":"of type"} ${C1(Q,"or")}`,j.length>0||H.length>0)O+=" or "}if(j.length>0){if(O+=`an instance of ${C1(j,"or")}`,H.length>0)O+=" or "}if(H.length>0)if(H.length>1)O+=`one of ${C1(H,"or")}`;else{if(H[0].toLowerCase()!==H[0])O+="an ";O+=`${H[0]}`}return O+=`. Received ${Q6(Z)}`,O},TypeError);E.ERR_INVALID_MODULE_SPECIFIER=h("ERR_INVALID_MODULE_SPECIFIER",(_,z,Z=void 0)=>{return`Invalid module "${_}" ${z}${Z?` imported from ${Z}`:""}`},TypeError);E.ERR_INVALID_PACKAGE_CONFIG=h("ERR_INVALID_PACKAGE_CONFIG",(_,z,Z)=>{return`Invalid package config ${_}${z?` while importing ${z}`:""}${Z?`. ${Z}`:""}`},Error);E.ERR_INVALID_PACKAGE_TARGET=h("ERR_INVALID_PACKAGE_TARGET",(_,z,Z,O=!1,Q=void 0)=>{let j=typeof Z==="string"&&!O&&Z.length>0&&!Z.startsWith("./");if(z===".")return s(O===!1),`Invalid "exports" main target ${JSON.stringify(Z)} defined in the package config ${_}package.json${Q?` imported from ${Q}`:""}${j?'; targets must start with "./"':""}`;return`Invalid "${O?"imports":"exports"}" target ${JSON.stringify(Z)} defined for '${z}' in the package config ${_}package.json${Q?` imported from ${Q}`:""}${j?'; targets must start with "./"':""}`},Error);E.ERR_MODULE_NOT_FOUND=h("ERR_MODULE_NOT_FOUND",(_,z,Z=!1)=>{return`Cannot find ${Z?"module":"package"} '${_}' imported from ${z}`},Error);E.ERR_NETWORK_IMPORT_DISALLOWED=h("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error);E.ERR_PACKAGE_IMPORT_NOT_DEFINED=h("ERR_PACKAGE_IMPORT_NOT_DEFINED",(_,z,Z)=>{return`Package import specifier "${_}" is not defined${z?` in package ${z}package.json`:""} imported from ${Z}`},TypeError);E.ERR_PACKAGE_PATH_NOT_EXPORTED=h("ERR_PACKAGE_PATH_NOT_EXPORTED",(_,z,Z=void 0)=>{if(z===".")return`No "exports" main defined in ${_}package.json${Z?` imported from ${Z}`:""}`;return`Package subpath '${z}' is not defined by "exports" in ${_}package.json${Z?` imported from ${Z}`:""}`},Error);E.ERR_UNSUPPORTED_DIR_IMPORT=h("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error);E.ERR_UNSUPPORTED_RESOLVE_REQUEST=h("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError);E.ERR_UNKNOWN_FILE_EXTENSION=h("ERR_UNKNOWN_FILE_EXTENSION",(_,z)=>{return`Unknown file extension "${_}" for ${z}`},TypeError);E.ERR_INVALID_ARG_VALUE=h("ERR_INVALID_ARG_VALUE",(_,z,Z="is invalid")=>{let O=E1(z);if(O.length>128)O=`${O.slice(0,128)}...`;return`The ${_.includes(".")?"property":"argument"} '${_}' ${Z}. Received ${O}`},TypeError);function h(_,z,Z){return H_.set(_,z),_6(Z,_)}function _6(_,z){return Z;function Z(...O){let Q=Error.stackTraceLimit;if(v1())Error.stackTraceLimit=0;let j=new _;if(v1())Error.stackTraceLimit=Q;let H=O6(z,O,j);return Object.defineProperties(j,{message:{value:H,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${z}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),Z6(j),j.code=z,j}}function v1(){try{if(iz.startupSnapshot.isBuildingSnapshot())return!1}catch{}let _=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");if(_===void 0)return Object.isExtensible(Error);return sz.call(_,"writable")&&_.writable!==void 0?_.writable:_.set!==void 0}function z6(_){let z=ez+_.name;return Object.defineProperty(_,"name",{value:z}),_}var Z6=z6(function(_){let z=v1();if(z)i2=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY;if(Error.captureStackTrace(_),z)Error.stackTraceLimit=i2;return _});function O6(_,z,Z){let O=H_.get(_);if(s(O!==void 0,"expected `message` to be found"),typeof O==="function")return s(O.length<=z.length,`Code: ${_}; The provided arguments length (${z.length}) does not match the required ones (${O.length}).`),Reflect.apply(O,Z,z);let Q=/%[dfijoOs]/g,j=0;while(Q.exec(O)!==null)j++;if(s(j===z.length,`Code: ${_}; The provided arguments length (${z.length}) does not match the required ones (${j}).`),z.length===0)return O;return z.unshift(O),Reflect.apply(oz,null,z)}function Q6(_){if(_===null||_===void 0)return String(_);if(typeof _==="function"&&_.name)return`function ${_.name}`;if(typeof _==="object"){if(_.constructor&&_.constructor.name)return`an instance of ${_.constructor.name}`;return`${E1(_,{depth:-1})}`}let z=E1(_,{colors:!1});if(z.length>28)z=`${z.slice(0,25)}...`;return`type ${typeof _} (${z})`}var M0={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:j6}=E,o2=new Map;function R_(_,{base:z,specifier:Z}){let O=o2.get(_);if(O)return O;let Q;try{Q=pz.readFileSync(f1.toNamespacedPath(_),"utf8")}catch(H){let $=H;if($.code!=="ENOENT")throw $}let j={exists:!1,pjsonPath:_,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(Q!==void 0){let H;try{H=JSON.parse(Q)}catch($){let K=$,W=new j6(_,(z?`"${Z}" from `:"")+U(z||Z),K.message);throw W.cause=K,W}if(j.exists=!0,M0.call(H,"name")&&typeof H.name==="string")j.name=H.name;if(M0.call(H,"main")&&typeof H.main==="string")j.main=H.main;if(M0.call(H,"exports"))j.exports=H.exports;if(M0.call(H,"imports"))j.imports=H.imports;if(M0.call(H,"type")&&(H.type==="commonjs"||H.type==="module"))j.type=H.type}return o2.set(_,j),j}function I1(_){let z=new URL("package.json",_);while(!0){if(z.pathname.endsWith("node_modules/package.json"))break;let Q=R_(U(z),{specifier:_});if(Q.exists)return Q;let j=z;if(z=new URL("../package.json",z),z.pathname===j.pathname)break}return{pjsonPath:U(z),exists:!1,type:"none"}}function n2(_){return I1(_).type}var{ERR_UNKNOWN_FILE_EXTENSION:H6}=E,R6={}.hasOwnProperty,$6={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"};function K6(_){if(_&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(_))return"module";if(_==="application/json")return"json";return null}var r2={__proto__:null,"data:":W6,"file:":G6,"http:":s2,"https:":s2,"node:"(){return"builtin"}};function W6(_){let{1:z}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(_.pathname)||[null,null,null];return K6(z)}function Y6(_){let z=_.pathname,Z=z.length;while(Z--){let O=z.codePointAt(Z);if(O===47)return"";if(O===46)return z.codePointAt(Z-1)===47?"":z.slice(Z)}return""}function G6(_,z,Z){let O=Y6(_);if(O===".js"){let H=n2(_);if(H!=="none")return H;return"commonjs"}if(O===""){let H=n2(_);if(H==="none"||H==="commonjs")return"commonjs";return"module"}let Q=$6[O];if(Q)return Q;if(Z)return;let j=U(_);throw new H6(O,j)}function s2(){}function X6(_,z){let Z=_.protocol;if(!R6.call(r2,Z))return null;return r2[Z](_,z,!0)||null}var m0=RegExp.prototype[Symbol.replace],{ERR_NETWORK_IMPORT_DISALLOWED:XO,ERR_INVALID_MODULE_SPECIFIER:c0,ERR_INVALID_PACKAGE_CONFIG:$_,ERR_INVALID_PACKAGE_TARGET:F6,ERR_MODULE_NOT_FOUND:b1,ERR_PACKAGE_IMPORT_NOT_DEFINED:q6,ERR_PACKAGE_PATH_NOT_EXPORTED:A6,ERR_UNSUPPORTED_DIR_IMPORT:V6,ERR_UNSUPPORTED_RESOLVE_REQUEST:a2}=E,K_={}.hasOwnProperty,t2=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,e2=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,B6=/^\.|%|\\/,l0=/\*/g,M6=/%2f|%5c/i,__=new Set,J6=/[/\\]{2}/;function z_(_,z,Z,O,Q,j,H){if(t.noDeprecation)return;let $=U(O),K=J6.exec(H?_:z)!==null;t.emitWarning(`Use of deprecated ${K?"double slash":"leading or trailing slash matching"} resolving "${_}" for module request "${z}" ${z===Z?"":`matched to "${Z}" `}in the "${Q?"imports":"exports"}" field module resolution of the package at ${$}${j?` imported from ${U(j)}`:""}.`,"DeprecationWarning","DEP0166")}function Z_(_,z,Z,O){if(t.noDeprecation)return;if(X6(_,{parentURL:Z.href})!=="module")return;let j=U(_.href),H=U(new P(".",z)),$=U(Z);if(!O)t.emitWarning(`No "main" or "exports" field defined in the package.json for ${H} resolving the main entry point "${j.slice(H.length)}", imported from ${$}.
|
|
19
19
|
Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151");else if(f1.resolve(H,O)!==j)t.emitWarning(`Package ${H} has a "main" field set to "${O}", excluding the full filename and extension to the resolved file at "${j.slice(H.length)}", imported from ${$}.
|
|
20
|
-
Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function W_(_){try{return S1(_)}catch{}}function L1(_){let z=S1(_,{throwIfNoEntry:!1}),Z=z?z.isFile():void 0;return Z===null||Z===void 0?!1:Z}function N6(_,z,Z){let O;if(z.main!==void 0){if(O=new P(z.main,_),L1(O))return O;let H=[`./${z.main}.js`,`./${z.main}.json`,`./${z.main}.node`,`./${z.main}/index.js`,`./${z.main}/index.json`,`./${z.main}/index.node`],$=-1;while(++$<H.length){if(O=new P(H[$],_),L1(O))break;O=void 0}if(O)return Z_(O,_,Z,z.main),O}let Q=["./index.js","./index.json","./index.node"],j=-1;while(++j<Q.length){if(O=new P(Q[j],_),L1(O))break;O=void 0}if(O)return Z_(O,_,Z,z.main),O;throw new b1(U(new P(".",_)),U(Z))}function U6(_,z,Z){if(M6.exec(_.pathname)!==null)throw new c0(_.pathname,'must not include encoded "/" or "\\" characters',U(z));let O;try{O=U(_)}catch(j){let H=j;throw Object.defineProperty(H,"input",{value:String(_)}),Object.defineProperty(H,"module",{value:String(z)}),H}let Q=W_(O.endsWith("/")?O.slice(-1):O);if(Q&&Q.isDirectory()){let j=new V6(O,U(z));throw j.url=String(_),j}if(!Q||!Q.isFile()){let j=new b1(O||_.pathname,z&&U(z),!0);throw j.url=String(_),j}{let j=cz(O),{search:H,hash:$}=_;_=p0(j+(O.endsWith(f1.sep)?"/":"")),_.search=H,_.hash=$}return _}function w6(_,z,Z){return new q6(_,z&&U(new P(".",z)),U(Z))}function P1(_,z,Z){return new A6(U(new P(".",z)),_,Z&&U(Z))}function C6(_,z,Z,O,Q){let j=`request is not a valid match in pattern "${z}" for the "${O?"imports":"exports"}" resolution of ${U(Z)}`;throw new c0(_,j,Q&&U(Q))}function J0(_,z,Z,O,Q){return z=typeof z==="object"&&z!==null?JSON.stringify(z,null,""):`${z}`,new F6(U(new P(".",Z)),_,z,O,Q&&U(Q))}function L6(_,z,Z,O,Q,j,H,$,K){if(z!==""&&!j&&_[_.length-1]!=="/")throw J0(Z,_,O,H,Q);if(!_.startsWith("./")){if(H&&!_.startsWith("../")&&!_.startsWith("/")){let V=!1;try{new P(_),V=!0}catch{}if(!V){let q=j?m0.call(l0,_,()=>z):_+z;return G_(q,O,K)}}throw J0(Z,_,O,H,Q)}if(t2.exec(_.slice(2))!==null)if(e2.exec(_.slice(2))===null){if(!$){let V=j?Z.replace("*",()=>z):Z+z,q=j?m0.call(l0,_,()=>z):_;z_(q,V,Z,O,H,Q,!0)}}else throw J0(Z,_,O,H,Q);let W=new P(_,O),Y=W.pathname,G=new P(".",O).pathname;if(!Y.startsWith(G))throw J0(Z,_,O,H,Q);if(z==="")return W;if(t2.exec(z)!==null){let V=j?Z.replace("*",()=>z):Z+z;if(e2.exec(z)===null){if(!$){let q=j?m0.call(l0,_,()=>z):_;z_(q,V,Z,O,H,Q,!1)}}else C6(V,Z,O,H,Q)}if(j)return new P(m0.call(l0,W.href,()=>z));return new P(z,W)}function P6(_){let z=Number(_);if(`${z}`!==_)return!1;return z>=0&&z<4294967295}function R0(_,z,Z,O,Q,j,H,$,K){if(typeof z==="string")return L6(z,Z,O,_,Q,j,H,$,K);if(Array.isArray(z)){let W=z;if(W.length===0)return null;let Y,G=-1;while(++G<W.length){let V=W[G],q;try{q=R0(_,V,Z,O,Q,j,H,$,K)}catch(C){let B=C;if(Y=B,B.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw C}if(q===void 0)continue;if(q===null){Y=null;continue}return q}if(Y===void 0||Y===null)return null;throw Y}if(typeof z==="object"&&z!==null){let W=Object.getOwnPropertyNames(z),Y=-1;while(++Y<W.length){let G=W[Y];if(P6(G))throw new $_(U(_),Q,'"exports" cannot contain numeric property keys.')}Y=-1;while(++Y<W.length){let G=W[Y];if(G==="default"||K&&K.has(G)){let V=z[G],q=R0(_,V,Z,O,Q,j,H,$,K);if(q===void 0)continue;return q}}return null}if(z===null)return null;throw J0(O,z,_,H,Q)}function T6(_,z,Z){if(typeof _==="string"||Array.isArray(_))return!0;if(typeof _!=="object"||_===null)return!1;let O=Object.getOwnPropertyNames(_),Q=!1,j=0,H=-1;while(++H<O.length){let $=O[H],K=$===""||$[0]!==".";if(j++===0)Q=K;else if(Q!==K)throw new $_(U(z),Z,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return Q}function E6(_,z,Z){if(t.noDeprecation)return;let O=U(z);if(__.has(O+"|"+_))return;__.add(O+"|"+_),t.emitWarning(`Use of deprecated trailing slash pattern mapping "${_}" in the "exports" field module resolution of the package at ${O}${Z?` imported from ${U(Z)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155")}function O_(_,z,Z,O,Q){let j=Z.exports;if(T6(j,_,O))j={".":j};if(K_.call(j,z)&&!z.includes("*")&&!z.endsWith("/")){let Y=j[z],G=R0(_,Y,"",z,O,!1,!1,!1,Q);if(G===null||G===void 0)throw P1(z,_,O);return G}let H="",$="",K=Object.getOwnPropertyNames(j),W=-1;while(++W<K.length){let Y=K[W],G=Y.indexOf("*");if(G!==-1&&z.startsWith(Y.slice(0,G))){if(z.endsWith("/"))E6(z,_,O);let V=Y.slice(G+1);if(z.length>=Y.length&&z.endsWith(V)&&Y_(H,Y)===1&&Y.lastIndexOf("*")===G)H=Y,$=z.slice(G,z.length-V.length)}}if(H){let Y=j[H],G=R0(_,Y,$,H,O,!0,!1,z.endsWith("/"),Q);if(G===null||G===void 0)throw P1(z,_,O);return G}throw P1(z,_,O)}function Y_(_,z){let Z=_.indexOf("*"),O=z.indexOf("*"),Q=Z===-1?_.length:Z+1,j=O===-1?z.length:O+1;if(Q>j)return-1;if(j>Q)return 1;if(Z===-1)return 1;if(O===-1)return-1;if(_.length>z.length)return-1;if(z.length>_.length)return 1;return 0}function D6(_,z,Z){if(_==="#"||_.startsWith("#/")||_.endsWith("/"))throw new c0(_,"is not a valid internal imports specifier name",U(z));let O,Q=I1(z);if(Q.exists){O=p0(Q.pjsonPath);let j=Q.imports;if(j)if(K_.call(j,_)&&!_.includes("*")){let H=R0(O,j[_],"",_,z,!1,!0,!1,Z);if(H!==null&&H!==void 0)return H}else{let H="",$="",K=Object.getOwnPropertyNames(j),W=-1;while(++W<K.length){let Y=K[W],G=Y.indexOf("*");if(G!==-1&&_.startsWith(Y.slice(0,-1))){let V=Y.slice(G+1);if(_.length>=Y.length&&_.endsWith(V)&&Y_(H,Y)===1&&Y.lastIndexOf("*")===G)H=Y,$=_.slice(G,_.length-V.length)}}if(H){let Y=j[H],G=R0(O,Y,$,H,z,!0,!0,!1,Z);if(G!==null&&G!==void 0)return G}}}throw w6(_,O,z)}function v6(_,z){let Z=_.indexOf("/"),O=!0,Q=!1;if(_[0]==="@")if(Q=!0,Z===-1||_.length===0)O=!1;else Z=_.indexOf("/",Z+1);let j=Z===-1?_:_.slice(0,Z);if(B6.exec(j)!==null)O=!1;if(!O)throw new c0(_,"is not a valid package name",U(z));let H="."+(Z===-1?"":_.slice(Z));return{packageName:j,packageSubpath:H,isScoped:Q}}function G_(_,z,Z){if(y1.includes(_))return new P("node:"+_);let{packageName:O,packageSubpath:Q,isScoped:j}=v6(_,z),H=I1(z);if(H.exists){let Y=p0(H.pjsonPath);if(H.name===O&&H.exports!==void 0&&H.exports!==null)return O_(Y,Q,H,z,Z)}let $=new P("./node_modules/"+O+"/package.json",z),K=U($),W;do{let Y=W_(K.slice(0,-13));if(!Y||!Y.isDirectory()){W=K,$=new P((j?"../../../../node_modules/":"../../../node_modules/")+O+"/package.json",$),K=U($);continue}let G=R_(K,{base:z,specifier:_});if(G.exports!==void 0&&G.exports!==null)return O_($,Q,G,z,Z);if(Q===".")return N6($,G,z);return new P(Q,$)}while(K.length!==W.length);throw new b1(O,U(z),!1)}function y6(_){if(_[0]==="."){if(_.length===1||_[1]==="/")return!0;if(_[1]==="."&&(_.length===2||_[2]==="/"))return!0}return!1}function S6(_){if(_==="")return!1;if(_[0]==="/")return!0;return y6(_)}function f6(_,z,Z,O){let Q=z.protocol,H=Q==="data:"||Q==="http:"||Q==="https:",$;if(S6(_))try{$=new P(_,z)}catch(K){let W=new a2(_,z);throw W.cause=K,W}else if(Q==="file:"&&_[0]==="#")$=D6(_,z,Z);else try{$=new P(_)}catch(K){if(H&&!y1.includes(_)){let W=new a2(_,z);throw W.cause=K,W}$=G_(_,z,Z)}if(s($!==void 0,"expected to be defined"),$.protocol!=="file:")return $;return U6($,z)}function N0(_){if(typeof _==="string"&&!_.startsWith("file://"))return D1(_);return D1(U(_))}function T1(_){return p0(N0(_)).toString()}function I6(_){if(typeof _!=="string")_=_.toString();if(/(node|data|http|https|file):/.test(_))return _;if(j_.has(_))return"node:"+_;return"file://"+encodeURI(D1(_))}async function b6(_){return await dz.readFile(N0(_),"utf8")}var k6=new Set(["node","import"]),x6=[".mjs",".cjs",".js",".json"],h6=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function Q_(_,z,Z){try{return f6(_,z,Z)}catch(O){if(!h6.has(O?.code))throw O}}function g6(_,z={}){if(typeof _!=="string")if(_ instanceof URL)_=N0(_);else throw new TypeError("input must be a `string` or `URL`");if(/(node|data|http|https):/.test(_))return _;if(j_.has(_))return"node:"+_;if(_.startsWith("file://"))_=N0(_);if(w1(_))try{if(S1(_).isFile())return T1(_)}catch(H){if(H?.code!=="ENOENT")throw H}let Z=z.conditions?new Set(z.conditions):k6,O=(Array.isArray(z.url)?z.url:[z.url]).filter(Boolean).map((H)=>new URL(I6(H.toString())));if(O.length===0)O.push(new URL(T1(process.cwd())));let Q=[...O];for(let H of O)if(H.protocol==="file:")Q.push(new URL("./",H),new URL(U1(H.pathname,"_index.js"),H),new URL("node_modules",H));let j;for(let H of Q){if(j=Q_(_,H,Z),j)break;for(let $ of["","/index"]){for(let K of z.extensions||x6)if(j=Q_(U1(_,$)+K,H,Z),j)break;if(j)break}if(j)break}if(!j){let H=new Error(`Cannot find module ${_} imported from ${Q.join(", ")}`);throw H.code="ERR_MODULE_NOT_FOUND",H}return T1(j)}function X_(_,z){return g6(_,z)}function FO(_,z){try{return Promise.resolve(X_(_,z))}catch(Z){return Promise.reject(Z)}}function k1(_,z){return N0(X_(_,z))}function u6(_,z){try{return Promise.resolve(k1(_,z))}catch(Z){return Promise.reject(Z)}}var m6=/(?<=\s|^|;|\})import\s*([\s"']*(?<imports>[\p{L}\p{M}\w\t\n\r $*,/{}@.]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gmu;var l6=/\bexport\s+(?<declaration>(async function\s*\*?|function\s*\*?|let|const enum|const|enum|var|class))\s+\*?(?<name>[\w$]+)(?<extraNames>.*,\s*[\s\w:[\]{}]*[\w$\]}]+)*/g,p6=/\bexport\s+(?<declaration>(interface|type|declare (async function|function|let|const enum|const|enum|var|class)))\s+(?<name>[\w$]+)/g,c6=/\bexport\s*{(?<exports>[^}]+?)[\s,]*}(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][^\n;]*)?/g,d6=/\bexport\s+type\s*{(?<exports>[^}]+?)[\s,]*}(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][^\n;]*)?/g,i6=/\bexport\s+(let|var|const)\s+(?:{(?<exports1>[^}]+?)[\s,]*}|\[(?<exports2>[^\]]+?)[\s,]*])\s+=/gm,o6=/\bexport\s*(\*)(\s*as\s+(?<name>[\w$]+)\s+)?\s*(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][^\n;]*)?/g,n6=/\bexport\s+default\s+(async function|function|class|true|false|\W|\d)|\bexport\s+default\s+(?<defaultName>.*)/g,x1=/^\s*?type\s/;function F_(_){return h1(g1(_,"import"),o(m6,_,{type:"static"}))}function q_(_){let z=nz(_.imports),Z={},O=z.match(/{([^}]*)}/)?.[1]?.split(",")||[];for(let H of O){let $=H.match(/^\s*(\S*) as (\S*)\s*$/),K=$?.[1]||H.trim(),W=$?.[2]||K;if(K&&!x1.test(K))Z[K]=W}let{namespacedImport:Q,defaultImport:j}=rz(z);return{..._,defaultImport:j,namespacedImport:Q,namedImports:Z}}function r6(_){let z=o(l6,_,{type:"declaration"});for(let K of z){let W=K.extraNames;if(W){let Y=o(/({.*?})|(\[.*?])|(,\s*(?<name>\w+))/g,W,{}).map((G)=>G.name).filter(Boolean);K.names=[K.name,...Y]}delete K.extraNames}let Z=V_(o(c6,_,{type:"named"})),O=o(i6,_,{type:"named"});for(let K of O)K.exports=K.exports1||K.exports2,K.names=K.exports.replace(/^\r?\n?/,"").split(/\s*,\s*/g).filter((W)=>!x1.test(W)).map((W)=>W.replace(/^.*?\s*:\s*/,"").replace(/\s*=\s*.*$/,"").trim());let Q=o(n6,_,{type:"default",name:"default"}),j=o(o6,_,{type:"star"}),H=A_([...z,...Z,...O,...Q,...j]);if(H.length===0)return[];let $=g1(_,"export");if($&&$.length===0)return[];return h1($,H).filter((K,W,Y)=>{let G=Y[W+1];return!G||K.type!==G.type||!K.name||K.name!==G.name})}function qO(_){let z=o(p6,_,{type:"declaration"}),Z=V_(o(d6,_,{type:"named"})),O=A_([...z,...Z]);if(O.length===0)return[];let Q=g1(_,"export");if(Q&&Q.length===0)return[];return h1(Q,O).filter((j,H,$)=>{let K=$[H+1];return!K||j.type!==K.type||!j.name||j.name!==K.name})}function A_(_){for(let z of _){if(!z.name&&z.names&&z.names.length===1)z.name=z.names[0];if(z.name==="default"&&z.type!=="default")z._type=z.type,z.type="default";if(!z.names&&z.name)z.names=[z.name];if(z.type==="declaration"&&z.declaration)z.declarationType=z.declaration.replace(/^declare\s*/,"")}return _}function V_(_){for(let z of _)z.names=z.exports.replace(/^\r?\n?/,"").split(/\s*,\s*/g).filter((Z)=>!x1.test(Z)).map((Z)=>Z.replace(/^.*?\sas\s/,"").trim());return _}async function s6(_,z){let Z=await u6(_,z),O=await b6(Z),Q=r6(O),j=new Set(Q.flatMap((H)=>H.names).filter(Boolean));for(let H of Q){if(H.type!=="star"||!H.specifier)continue;let $=await s6(H.specifier,{...z,url:Z});for(let K of $)j.add(K)}return[...j]}function h1(_,z){return z.filter((Z)=>{return!_||_.some((O)=>{return Z.start<=O.start&&Z.end>=O.end})})}function g1(_,z){try{return a6(_,z)}catch{}}function a6(_,z){let Z=d2(_,{ecmaVersion:"latest",sourceType:"module",allowHashBang:!0,allowAwaitOutsideFunction:!0,allowImportExportEverywhere:!0}),O=[];for(let Q of Z)if(Q.type.label===z)O.push({start:Q.start,end:Q.end});return O}var t6=/([\s;]|^)(import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m,e6=/([\s;]|^)(module.exports\b|exports\.\w|require\s*\(|global\.\w)/m,u1=/\/\*.+?\*\/|\/\/.*(?=[nr])/g;function _Z(_,z={}){if(z.stripComments)_=_.replace(u1,"");return t6.test(_)}function zZ(_,z={}){if(z.stripComments)_=_.replace(u1,"");return e6.test(_)}function AO(_,z={}){if(z.stripComments)_=_.replace(u1,"");let Z=_Z(_,{}),O=zZ(_,{});return{hasESM:Z,hasCJS:O,isMixed:Z&&O}}var w_=QZ(U_(),1);function jZ(_,z){let Z=z?.fillChar??" ",O=" ",Q="",j=z?.filter??(()=>!0),H=[];for(let $ of w_.default(_,{jsx:!1})){if(H.push($),$.type==="SingleLineComment"){Q+=" ".repeat($.value.length);continue}if($.type==="MultiLineComment"){Q+=$.value.replace(/[^\n]/g," ");continue}if($.type==="StringLiteral"){if(!$.closed){Q+=$.value;continue}let K=$.value.slice(1,-1);if(j(K)){Q+=$.value[0]+Z.repeat(K.length)+$.value[$.value.length-1];continue}}if($.type==="NoSubstitutionTemplate"){let K=$.value.slice(1,-1);if(j(K)){Q+=`\`${K.replace(/[^\n]/g,Z)}\``;continue}}if($.type==="RegularExpressionLiteral"){let K=$.value;if(j(K)){Q+=K.replace(/\/(.*)\/(\w?)$/g,(W,Y,G)=>`/${Z.repeat(Y.length)}/${G}`);continue}}if($.type==="TemplateHead"){let K=$.value.slice(1,-2);if(j(K)){Q+=`\`${K.replace(/[^\n]/g,Z)}\${`;continue}}if($.type==="TemplateTail"){let K=$.value.slice(0,-2);if(j(K)){Q+=`}${K.replace(/[^\n]/g,Z)}\``;continue}}if($.type==="TemplateMiddle"){let K=$.value.slice(1,-2);if(j(K)){Q+=`}${K.replace(/[^\n]/g,Z)}\${`;continue}}Q+=$.value}return{result:Q,tokens:H}}function C_(_,z){return HZ(_,z).result}function HZ(_,z){return jZ(_,z)}import{basename as L_}from"path";import RZ from"process";var TO=[/\b(import|export)\b([\w$*{},\s]+?)\bfrom\s*["']/g,/\bfunction\s*([\w$]+)\s*\(/g,/\bclass\s*([\w$]+)\s*\{/g,/\b(?:const|let|var)\s+?(\[.*?\]|\{.*?\}|.+?)\s*?[=;\n]/gs],EO=/^.*\sas\s+/,DO=/[,[\]{}\n]|\b(?:import|export)\b/g,vO=/(^|\.\.\.|(?:\bcase|\?)\s+|[^\w$/)]|\bextends\s+)([\w$]+)\s*(?=[.()[\]}:;?+\-*&|`<>,\n]|\b(?:instanceof|in)\b|$|(?<=extends\s+\w+)\s+\{)/g,$Z=/\/\S*?(?<!\\)(?<!\[[^\]]*)\/[gimsuy]*/g;function KZ(_,z){return C_(_,z).replace($Z,'new RegExp("")')}function yO(_){return _}var WZ=/^[a-z$_][\w$]*$/i;function L0(_){let z="";for(let Z=Object.entries(_),O=Z.length,Q=0;Q<O;Q++){let[j,H]=Z[Q];if(z+=WZ.test(j)?j:JSON.stringify(j),z+=`: ${JSON.stringify(String(H))}`,Q+1!==O)z+=", "}return`{ ${z} }`}function Q1(_,z=!1){let Z=P_(_);return Object.entries(Z).flatMap(([O,Q])=>{let j=[],H=Array.from(Q).filter(($)=>{if(!$.name||$.as===""){let K;if(z)K=`require('${O}');`;else{if(K=`import '${O}'`,$.with)K+=` with ${L0($.with)}`;K+=";"}return j.push(K),!1}else if($.name==="default"||$.name==="="){let K;if(z)K=$.name==="="?`const ${$.as} = require('${O}');`:`const { default: ${$.as} } = require('${O}');`;else{if(K=`import ${$.as} from '${O}'`,$.with)K+=` with ${L0($.with)}`;K+=";"}return j.push(K),!1}else if($.name==="*"){let K;if(z)K=`const ${$.as} = require('${O}');`;else{if(K=`import * as ${$.as} from '${O}'`,$.with)K+=` with ${L0($.with)}`;K+=";"}return j.push(K),!1}else if(!z&&$.with)return j.push(`import { ${O1($)} } from '${O}' with ${L0($.with)};`),!1;return!0});if(H.length){let $=H.map((K)=>O1(K,z));j.push(z?`const { ${$.join(", ")} } = require('${O}');`:`import { ${$.join(", ")} } from '${O}';`)}return j}).join(`
|
|
20
|
+
Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function W_(_){try{return S1(_)}catch{}}function L1(_){let z=S1(_,{throwIfNoEntry:!1}),Z=z?z.isFile():void 0;return Z===null||Z===void 0?!1:Z}function N6(_,z,Z){let O;if(z.main!==void 0){if(O=new P(z.main,_),L1(O))return O;let H=[`./${z.main}.js`,`./${z.main}.json`,`./${z.main}.node`,`./${z.main}/index.js`,`./${z.main}/index.json`,`./${z.main}/index.node`],$=-1;while(++$<H.length){if(O=new P(H[$],_),L1(O))break;O=void 0}if(O)return Z_(O,_,Z,z.main),O}let Q=["./index.js","./index.json","./index.node"],j=-1;while(++j<Q.length){if(O=new P(Q[j],_),L1(O))break;O=void 0}if(O)return Z_(O,_,Z,z.main),O;throw new b1(U(new P(".",_)),U(Z))}function U6(_,z,Z){if(M6.exec(_.pathname)!==null)throw new c0(_.pathname,'must not include encoded "/" or "\\" characters',U(z));let O;try{O=U(_)}catch(j){let H=j;throw Object.defineProperty(H,"input",{value:String(_)}),Object.defineProperty(H,"module",{value:String(z)}),H}let Q=W_(O.endsWith("/")?O.slice(-1):O);if(Q&&Q.isDirectory()){let j=new V6(O,U(z));throw j.url=String(_),j}if(!Q||!Q.isFile()){let j=new b1(O||_.pathname,z&&U(z),!0);throw j.url=String(_),j}{let j=cz(O),{search:H,hash:$}=_;_=p0(j+(O.endsWith(f1.sep)?"/":"")),_.search=H,_.hash=$}return _}function w6(_,z,Z){return new q6(_,z&&U(new P(".",z)),U(Z))}function P1(_,z,Z){return new A6(U(new P(".",z)),_,Z&&U(Z))}function C6(_,z,Z,O,Q){let j=`request is not a valid match in pattern "${z}" for the "${O?"imports":"exports"}" resolution of ${U(Z)}`;throw new c0(_,j,Q&&U(Q))}function J0(_,z,Z,O,Q){return z=typeof z==="object"&&z!==null?JSON.stringify(z,null,""):`${z}`,new F6(U(new P(".",Z)),_,z,O,Q&&U(Q))}function L6(_,z,Z,O,Q,j,H,$,K){if(z!==""&&!j&&_[_.length-1]!=="/")throw J0(Z,_,O,H,Q);if(!_.startsWith("./")){if(H&&!_.startsWith("../")&&!_.startsWith("/")){let V=!1;try{new P(_),V=!0}catch{}if(!V){let q=j?m0.call(l0,_,()=>z):_+z;return G_(q,O,K)}}throw J0(Z,_,O,H,Q)}if(t2.exec(_.slice(2))!==null)if(e2.exec(_.slice(2))===null){if(!$){let V=j?Z.replace("*",()=>z):Z+z,q=j?m0.call(l0,_,()=>z):_;z_(q,V,Z,O,H,Q,!0)}}else throw J0(Z,_,O,H,Q);let W=new P(_,O),Y=W.pathname,G=new P(".",O).pathname;if(!Y.startsWith(G))throw J0(Z,_,O,H,Q);if(z==="")return W;if(t2.exec(z)!==null){let V=j?Z.replace("*",()=>z):Z+z;if(e2.exec(z)===null){if(!$){let q=j?m0.call(l0,_,()=>z):_;z_(q,V,Z,O,H,Q,!1)}}else C6(V,Z,O,H,Q)}if(j)return new P(m0.call(l0,W.href,()=>z));return new P(z,W)}function P6(_){let z=Number(_);if(`${z}`!==_)return!1;return z>=0&&z<4294967295}function R0(_,z,Z,O,Q,j,H,$,K){if(typeof z==="string")return L6(z,Z,O,_,Q,j,H,$,K);if(Array.isArray(z)){let W=z;if(W.length===0)return null;let Y,G=-1;while(++G<W.length){let V=W[G],q;try{q=R0(_,V,Z,O,Q,j,H,$,K)}catch(C){let B=C;if(Y=B,B.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw C}if(q===void 0)continue;if(q===null){Y=null;continue}return q}if(Y===void 0||Y===null)return null;throw Y}if(typeof z==="object"&&z!==null){let W=Object.getOwnPropertyNames(z),Y=-1;while(++Y<W.length){let G=W[Y];if(P6(G))throw new $_(U(_),Q,'"exports" cannot contain numeric property keys.')}Y=-1;while(++Y<W.length){let G=W[Y];if(G==="default"||K&&K.has(G)){let V=z[G],q=R0(_,V,Z,O,Q,j,H,$,K);if(q===void 0)continue;return q}}return null}if(z===null)return null;throw J0(O,z,_,H,Q)}function T6(_,z,Z){if(typeof _==="string"||Array.isArray(_))return!0;if(typeof _!=="object"||_===null)return!1;let O=Object.getOwnPropertyNames(_),Q=!1,j=0,H=-1;while(++H<O.length){let $=O[H],K=$===""||$[0]!==".";if(j++===0)Q=K;else if(Q!==K)throw new $_(U(z),Z,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return Q}function E6(_,z,Z){if(t.noDeprecation)return;let O=U(z);if(__.has(O+"|"+_))return;__.add(O+"|"+_),t.emitWarning(`Use of deprecated trailing slash pattern mapping "${_}" in the "exports" field module resolution of the package at ${O}${Z?` imported from ${U(Z)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155")}function O_(_,z,Z,O,Q){let j=Z.exports;if(T6(j,_,O))j={".":j};if(K_.call(j,z)&&!z.includes("*")&&!z.endsWith("/")){let Y=j[z],G=R0(_,Y,"",z,O,!1,!1,!1,Q);if(G===null||G===void 0)throw P1(z,_,O);return G}let H="",$="",K=Object.getOwnPropertyNames(j),W=-1;while(++W<K.length){let Y=K[W],G=Y.indexOf("*");if(G!==-1&&z.startsWith(Y.slice(0,G))){if(z.endsWith("/"))E6(z,_,O);let V=Y.slice(G+1);if(z.length>=Y.length&&z.endsWith(V)&&Y_(H,Y)===1&&Y.lastIndexOf("*")===G)H=Y,$=z.slice(G,z.length-V.length)}}if(H){let Y=j[H],G=R0(_,Y,$,H,O,!0,!1,z.endsWith("/"),Q);if(G===null||G===void 0)throw P1(z,_,O);return G}throw P1(z,_,O)}function Y_(_,z){let Z=_.indexOf("*"),O=z.indexOf("*"),Q=Z===-1?_.length:Z+1,j=O===-1?z.length:O+1;if(Q>j)return-1;if(j>Q)return 1;if(Z===-1)return 1;if(O===-1)return-1;if(_.length>z.length)return-1;if(z.length>_.length)return 1;return 0}function D6(_,z,Z){if(_==="#"||_.startsWith("#/")||_.endsWith("/"))throw new c0(_,"is not a valid internal imports specifier name",U(z));let O,Q=I1(z);if(Q.exists){O=p0(Q.pjsonPath);let j=Q.imports;if(j)if(K_.call(j,_)&&!_.includes("*")){let H=R0(O,j[_],"",_,z,!1,!0,!1,Z);if(H!==null&&H!==void 0)return H}else{let H="",$="",K=Object.getOwnPropertyNames(j),W=-1;while(++W<K.length){let Y=K[W],G=Y.indexOf("*");if(G!==-1&&_.startsWith(Y.slice(0,-1))){let V=Y.slice(G+1);if(_.length>=Y.length&&_.endsWith(V)&&Y_(H,Y)===1&&Y.lastIndexOf("*")===G)H=Y,$=_.slice(G,_.length-V.length)}}if(H){let Y=j[H],G=R0(O,Y,$,H,z,!0,!0,!1,Z);if(G!==null&&G!==void 0)return G}}}throw w6(_,O,z)}function v6(_,z){let Z=_.indexOf("/"),O=!0,Q=!1;if(_[0]==="@")if(Q=!0,Z===-1||_.length===0)O=!1;else Z=_.indexOf("/",Z+1);let j=Z===-1?_:_.slice(0,Z);if(B6.exec(j)!==null)O=!1;if(!O)throw new c0(_,"is not a valid package name",U(z));let H="."+(Z===-1?"":_.slice(Z));return{packageName:j,packageSubpath:H,isScoped:Q}}function G_(_,z,Z){if(y1.includes(_))return new P("node:"+_);let{packageName:O,packageSubpath:Q,isScoped:j}=v6(_,z),H=I1(z);if(H.exists){let Y=p0(H.pjsonPath);if(H.name===O&&H.exports!==void 0&&H.exports!==null)return O_(Y,Q,H,z,Z)}let $=new P("./node_modules/"+O+"/package.json",z),K=U($),W;do{let Y=W_(K.slice(0,-13));if(!Y||!Y.isDirectory()){W=K,$=new P((j?"../../../../node_modules/":"../../../node_modules/")+O+"/package.json",$),K=U($);continue}let G=R_(K,{base:z,specifier:_});if(G.exports!==void 0&&G.exports!==null)return O_($,Q,G,z,Z);if(Q===".")return N6($,G,z);return new P(Q,$)}while(K.length!==W.length);throw new b1(O,U(z),!1)}function y6(_){if(_[0]==="."){if(_.length===1||_[1]==="/")return!0;if(_[1]==="."&&(_.length===2||_[2]==="/"))return!0}return!1}function S6(_){if(_==="")return!1;if(_[0]==="/")return!0;return y6(_)}function f6(_,z,Z,O){let Q=z.protocol,H=Q==="data:"||Q==="http:"||Q==="https:",$;if(S6(_))try{$=new P(_,z)}catch(K){let W=new a2(_,z);throw W.cause=K,W}else if(Q==="file:"&&_[0]==="#")$=D6(_,z,Z);else try{$=new P(_)}catch(K){if(H&&!y1.includes(_)){let W=new a2(_,z);throw W.cause=K,W}$=G_(_,z,Z)}if(s($!==void 0,"expected to be defined"),$.protocol!=="file:")return $;return U6($,z)}function N0(_){if(typeof _==="string"&&!_.startsWith("file://"))return D1(_);return D1(U(_))}function T1(_){return p0(N0(_)).toString()}function I6(_){if(typeof _!=="string")_=_.toString();if(/(node|data|http|https|file):/.test(_))return _;if(j_.has(_))return"node:"+_;return"file://"+encodeURI(D1(_))}async function b6(_){return await dz.readFile(N0(_),"utf8")}var k6=new Set(["node","import"]),x6=[".mjs",".cjs",".js",".json"],h6=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function Q_(_,z,Z){try{return f6(_,z,Z)}catch(O){if(!h6.has(O?.code))throw O}}function g6(_,z={}){if(typeof _!=="string")if(_ instanceof URL)_=N0(_);else throw new TypeError("input must be a `string` or `URL`");if(/(node|data|http|https):/.test(_))return _;if(j_.has(_))return"node:"+_;if(_.startsWith("file://"))_=N0(_);if(w1(_))try{if(S1(_).isFile())return T1(_)}catch(H){if(H?.code!=="ENOENT")throw H}let Z=z.conditions?new Set(z.conditions):k6,O=(Array.isArray(z.url)?z.url:[z.url]).filter(Boolean).map((H)=>new URL(I6(H.toString())));if(O.length===0)O.push(new URL(T1(process.cwd())));let Q=[...O];for(let H of O)if(H.protocol==="file:")Q.push(new URL("./",H),new URL(U1(H.pathname,"_index.js"),H),new URL("node_modules",H));let j;for(let H of Q){if(j=Q_(_,H,Z),j)break;for(let $ of["","/index"]){for(let K of z.extensions||x6)if(j=Q_(U1(_,$)+K,H,Z),j)break;if(j)break}if(j)break}if(!j){let H=new Error(`Cannot find module ${_} imported from ${Q.join(", ")}`);throw H.code="ERR_MODULE_NOT_FOUND",H}return T1(j)}function X_(_,z){return g6(_,z)}function FO(_,z){try{return Promise.resolve(X_(_,z))}catch(Z){return Promise.reject(Z)}}function k1(_,z){return N0(X_(_,z))}function u6(_,z){try{return Promise.resolve(k1(_,z))}catch(Z){return Promise.reject(Z)}}var m6=/(?<=\s|^|;|\})import\s*([\s"']*(?<imports>[\p{L}\p{M}\w\t\n\r $*,/{}@.]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gmu;var l6=/\bexport\s+(?<declaration>(async function\s*\*?|function\s*\*?|let|const enum|const|enum|var|class))\s+\*?(?<name>[\w$]+)(?<extraNames>.*,\s*[\s\w:[\]{}]*[\w$\]}]+)*/g,p6=/\bexport\s+(?<declaration>(interface|type|declare (async function|function|let|const enum|const|enum|var|class)))\s+(?<name>[\w$]+)/g,c6=/\bexport\s*{(?<exports>[^}]+?)[\s,]*}(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][^\n;]*)?/g,d6=/\bexport\s+type\s*{(?<exports>[^}]+?)[\s,]*}(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][^\n;]*)?/g,i6=/\bexport\s+(let|var|const)\s+(?:{(?<exports1>[^}]+?)[\s,]*}|\[(?<exports2>[^\]]+?)[\s,]*])\s+=/gm,o6=/\bexport\s*(\*)(\s*as\s+(?<name>[\w$]+)\s+)?\s*(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][^\n;]*)?/g,n6=/\bexport\s+default\s+(async function|function|class|true|false|\W|\d)|\bexport\s+default\s+(?<defaultName>.*)/g,x1=/^\s*?type\s/;function F_(_){return h1(g1(_,"import"),o(m6,_,{type:"static"}))}function q_(_){let z=nz(_.imports),Z={},O=z.match(/{([^}]*)}/)?.[1]?.split(",")||[];for(let H of O){let $=H.match(/^\s*(\S*) as (\S*)\s*$/),K=$?.[1]||H.trim(),W=$?.[2]||K;if(K&&!x1.test(K))Z[K]=W}let{namespacedImport:Q,defaultImport:j}=rz(z);return{..._,defaultImport:j,namespacedImport:Q,namedImports:Z}}function r6(_){let z=o(l6,_,{type:"declaration"});for(let K of z){let W=K.extraNames;if(W){let Y=o(/({.*?})|(\[.*?])|(,\s*(?<name>\w+))/g,W,{}).map((G)=>G.name).filter(Boolean);K.names=[K.name,...Y]}delete K.extraNames}let Z=V_(o(c6,_,{type:"named"})),O=o(i6,_,{type:"named"});for(let K of O)K.exports=K.exports1||K.exports2,K.names=K.exports.replace(/^\r?\n?/,"").split(/\s*,\s*/g).filter((W)=>!x1.test(W)).map((W)=>W.replace(/^.*?\s*:\s*/,"").replace(/\s*=\s*.*$/,"").trim());let Q=o(n6,_,{type:"default",name:"default"}),j=o(o6,_,{type:"star"}),H=A_([...z,...Z,...O,...Q,...j]);if(H.length===0)return[];let $=g1(_,"export");if($&&$.length===0)return[];return h1($,H).filter((K,W,Y)=>{let G=Y[W+1];return!G||K.type!==G.type||!K.name||K.name!==G.name})}function qO(_){let z=o(p6,_,{type:"declaration"}),Z=V_(o(d6,_,{type:"named"})),O=A_([...z,...Z]);if(O.length===0)return[];let Q=g1(_,"export");if(Q&&Q.length===0)return[];return h1(Q,O).filter((j,H,$)=>{let K=$[H+1];return!K||j.type!==K.type||!j.name||j.name!==K.name})}function A_(_){for(let z of _){if(!z.name&&z.names&&z.names.length===1)z.name=z.names[0];if(z.name==="default"&&z.type!=="default")z._type=z.type,z.type="default";if(!z.names&&z.name)z.names=[z.name];if(z.type==="declaration"&&z.declaration)z.declarationType=z.declaration.replace(/^declare\s*/,"")}return _}function V_(_){for(let z of _)z.names=z.exports.replace(/^\r?\n?/,"").split(/\s*,\s*/g).filter((Z)=>!x1.test(Z)).map((Z)=>Z.replace(/^.*?\sas\s/,"").trim());return _}async function s6(_,z){let Z=await u6(_,z),O=await b6(Z),Q=r6(O),j=new Set(Q.flatMap((H)=>H.names).filter(Boolean));for(let H of Q){if(H.type!=="star"||!H.specifier)continue;let $=await s6(H.specifier,{...z,url:Z});for(let K of $)j.add(K)}return[...j]}function h1(_,z){return z.filter((Z)=>{return!_||_.some((O)=>{return Z.start<=O.start&&Z.end>=O.end})})}function g1(_,z){try{return a6(_,z)}catch{}}function a6(_,z){let Z=d2(_,{ecmaVersion:"latest",sourceType:"module",allowHashBang:!0,allowAwaitOutsideFunction:!0,allowImportExportEverywhere:!0}),O=[];for(let Q of Z)if(Q.type.label===z)O.push({start:Q.start,end:Q.end});return O}var t6=/([\s;]|^)(import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m,e6=/([\s;]|^)(module.exports\b|exports\.\w|require\s*\(|global\.\w)/m,u1=/\/\*.+?\*\/|\/\/.*(?=[nr])/g;function _Z(_,z={}){if(z.stripComments)_=_.replace(u1,"");return t6.test(_)}function zZ(_,z={}){if(z.stripComments)_=_.replace(u1,"");return e6.test(_)}function AO(_,z={}){if(z.stripComments)_=_.replace(u1,"");let Z=_Z(_,{}),O=zZ(_,{});return{hasESM:Z,hasCJS:O,isMixed:Z&&O}}var w_=QZ(U_(),1);function jZ(_,z){let Z=z?.fillChar??" ",O=" ",Q="",j=z?.filter??(()=>!0),H=[];for(let $ of w_.default(_,{jsx:!1})){if(H.push($),$.type==="SingleLineComment"){Q+=" ".repeat($.value.length);continue}if($.type==="MultiLineComment"){Q+=$.value.replace(/[^\n]/g," ");continue}if($.type==="StringLiteral"){if(!$.closed){Q+=$.value;continue}let K=$.value.slice(1,-1);if(j(K)){Q+=$.value[0]+Z.repeat(K.length)+$.value[$.value.length-1];continue}}if($.type==="NoSubstitutionTemplate"){let K=$.value.slice(1,-1);if(j(K)){Q+=`\`${K.replace(/[^\n]/g,Z)}\``;continue}}if($.type==="RegularExpressionLiteral"){let K=$.value;if(j(K)){Q+=K.replace(/\/(.*)\/(\w?)$/g,(W,Y,G)=>`/${Z.repeat(Y.length)}/${G}`);continue}}if($.type==="TemplateHead"){let K=$.value.slice(1,-2);if(j(K)){Q+=`\`${K.replace(/[^\n]/g,Z)}\${`;continue}}if($.type==="TemplateTail"){let K=$.value.slice(0,-2);if(j(K)){Q+=`}${K.replace(/[^\n]/g,Z)}\``;continue}}if($.type==="TemplateMiddle"){let K=$.value.slice(1,-2);if(j(K)){Q+=`}${K.replace(/[^\n]/g,Z)}\${`;continue}}Q+=$.value}return{result:Q,tokens:H}}function C_(_,z){return HZ(_,z).result}function HZ(_,z){return jZ(_,z)}import{basename as L_}from"node:path";import RZ from"node:process";var TO=[/\b(import|export)\b([\w$*{},\s]+?)\bfrom\s*["']/g,/\bfunction\s*([\w$]+)\s*\(/g,/\bclass\s*([\w$]+)\s*\{/g,/\b(?:const|let|var)\s+?(\[.*?\]|\{.*?\}|.+?)\s*?[=;\n]/gs],EO=/^.*\sas\s+/,DO=/[,[\]{}\n]|\b(?:import|export)\b/g,vO=/(^|\.\.\.|(?:\bcase|\?)\s+|[^\w$/)]|\bextends\s+)([\w$]+)\s*(?=[.()[\]}:;?+\-*&|`<>,\n]|\b(?:instanceof|in)\b|$|(?<=extends\s+\w+)\s+\{)/g,$Z=/\/\S*?(?<!\\)(?<!\[[^\]]*)\/[gimsuy]*/g;function KZ(_,z){return C_(_,z).replace($Z,'new RegExp("")')}function yO(_){return _}var WZ=/^[a-z$_][\w$]*$/i;function L0(_){let z="";for(let Z=Object.entries(_),O=Z.length,Q=0;Q<O;Q++){let[j,H]=Z[Q];if(z+=WZ.test(j)?j:JSON.stringify(j),z+=`: ${JSON.stringify(String(H))}`,Q+1!==O)z+=", "}return`{ ${z} }`}function Q1(_,z=!1){let Z=P_(_);return Object.entries(Z).flatMap(([O,Q])=>{let j=[],H=Array.from(Q).filter(($)=>{if(!$.name||$.as===""){let K;if(z)K=`require('${O}');`;else{if(K=`import '${O}'`,$.with)K+=` with ${L0($.with)}`;K+=";"}return j.push(K),!1}else if($.name==="default"||$.name==="="){let K;if(z)K=$.name==="="?`const ${$.as} = require('${O}');`:`const { default: ${$.as} } = require('${O}');`;else{if(K=`import ${$.as} from '${O}'`,$.with)K+=` with ${L0($.with)}`;K+=";"}return j.push(K),!1}else if($.name==="*"){let K;if(z)K=`const ${$.as} = require('${O}');`;else{if(K=`import * as ${$.as} from '${O}'`,$.with)K+=` with ${L0($.with)}`;K+=";"}return j.push(K),!1}else if(!z&&$.with)return j.push(`import { ${O1($)} } from '${O}' with ${L0($.with)};`),!1;return!0});if(H.length){let $=H.map((K)=>O1(K,z));j.push(z?`const { ${$.join(", ")} } = require('${O}');`:`import { ${$.join(", ")} } from '${O}';`)}return j}).join(`
|
|
21
21
|
`)}function SO(_,z){let Z=new Map,O=new Set;return _.filter((Q)=>!Q.disabled).forEach((Q,j)=>{if(Q.declarationType==="enum"||Q.declarationType==="class")return;let H=Q.as??Q.name;if(!Z.has(H)){Z.set(H,j);return}let $=_[Z.get(H)];if($.from===Q.from){O.add(j);return}let K=($.priority||1)-(Q.priority||1);if(K===0)z(`Duplicated imports "${H}", the one from "${$.from}" has been ignored and "${Q.from}" is used`);if(K<=0)O.add(Z.get(H)),Z.set(H,j);else O.add(j)}),_.filter((Q,j)=>!O.has(j))}function fO(_,z,Z=!1){let O=P_(_,Z);return Object.entries(O).flatMap(([Q,j])=>{if(FZ(Q))Q=Q.replace(/\.[a-z]+$/i,"");if(z&&l(Q)){if(Q=H1(z,Q),!Q.match(/^[./]/))Q=`./${Q}`}let H=[],$=Array.from(j).filter((K)=>{if(K.name==="*")return H.push(`export * as ${K.as} from '${Q}';`),!1;return!0});if($.length)H.push(`export { ${$.map((K)=>O1(K,!1)).join(", ")} } from '${Q}';`);return H}).join(`
|
|
22
22
|
`)}function p1(_){return _.replace(/\.[a-z]+$/i,"")}function YZ(_,z){return _.map((Z)=>{let O=z?.resolvePath?.(Z)||p1(Z.typeFrom||Z.from),Q="";if(Z.with)Q+=`import('${O}', { with: ${L0(Z.with)} })`;else Q+=`import('${O}')`;if(Z.name!=="*"&&Z.name!=="=")Q+=`['${Z.name}']`;return`const ${Z.as}: typeof ${Q}`}).sort()}function IO(_,z){let Z=YZ(_,z),{exportHelper:O=!0}=z||{},Q="";if(O)Q+=`export {}
|
|
23
23
|
`;return Q+=`declare global {
|