@powerlines/plugin-env 0.16.60 → 0.16.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -16
- package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -3
- package/dist/_virtual/{rolldown_runtime.mjs → _rolldown/runtime.mjs} +2 -3
- package/dist/babel/index.cjs +1 -0
- package/dist/babel/plugin.cjs +20 -19
- package/dist/babel/plugin.d.cts +0 -1
- package/dist/babel/plugin.d.cts.map +1 -1
- package/dist/babel/plugin.d.mts +0 -1
- package/dist/babel/plugin.d.mts.map +1 -1
- package/dist/babel/plugin.mjs +3 -3
- package/dist/babel/plugin.mjs.map +1 -1
- package/dist/components/docs.cjs +26 -25
- package/dist/components/docs.d.cts.map +1 -1
- package/dist/components/docs.d.mts.map +1 -1
- package/dist/components/docs.mjs +1 -1
- package/dist/components/env-builtin.cjs +155 -153
- package/dist/components/env-builtin.d.cts +0 -1
- package/dist/components/env-builtin.d.cts.map +1 -1
- package/dist/components/env-builtin.d.mts +0 -1
- package/dist/components/env-builtin.d.mts.map +1 -1
- package/dist/components/env-builtin.mjs +1 -1
- package/dist/components/index.cjs +1 -0
- package/dist/helpers/automd-generator.cjs +4 -3
- package/dist/helpers/automd-generator.d.cts +2 -3
- package/dist/helpers/automd-generator.d.cts.map +1 -1
- package/dist/helpers/automd-generator.d.mts +2 -3
- package/dist/helpers/automd-generator.d.mts.map +1 -1
- package/dist/helpers/automd-generator.mjs +1 -1
- package/dist/helpers/automd-generator.mjs.map +1 -1
- package/dist/helpers/create-reflection-resource.cjs +1 -0
- package/dist/helpers/create-reflection-resource.d.cts +0 -1
- package/dist/helpers/create-reflection-resource.d.cts.map +1 -1
- package/dist/helpers/create-reflection-resource.d.mts +0 -1
- package/dist/helpers/create-reflection-resource.d.mts.map +1 -1
- package/dist/helpers/create-reflection-resource.mjs.map +1 -1
- package/dist/helpers/docs-helper.cjs +4 -2
- package/dist/helpers/docs-helper.d.cts +0 -1
- package/dist/helpers/docs-helper.d.cts.map +1 -1
- package/dist/helpers/docs-helper.d.mts +0 -1
- package/dist/helpers/docs-helper.d.mts.map +1 -1
- package/dist/helpers/docs-helper.mjs +1 -1
- package/dist/helpers/docs-helper.mjs.map +1 -1
- package/dist/helpers/index.cjs +1 -0
- package/dist/helpers/load.cjs +19 -17
- package/dist/helpers/load.d.cts +0 -1
- package/dist/helpers/load.d.cts.map +1 -1
- package/dist/helpers/load.d.mts +0 -1
- package/dist/helpers/load.d.mts.map +1 -1
- package/dist/helpers/load.mjs +2 -2
- package/dist/helpers/load.mjs.map +1 -1
- package/dist/helpers/persistence.cjs +59 -58
- package/dist/helpers/persistence.d.cts +0 -1
- package/dist/helpers/persistence.d.cts.map +1 -1
- package/dist/helpers/persistence.d.mts +0 -1
- package/dist/helpers/persistence.d.mts.map +1 -1
- package/dist/helpers/persistence.mjs +15 -15
- package/dist/helpers/persistence.mjs.map +1 -1
- package/dist/helpers/reflect.cjs +40 -39
- package/dist/helpers/reflect.d.cts.map +1 -1
- package/dist/helpers/reflect.d.mts.map +1 -1
- package/dist/helpers/reflect.mjs +2 -2
- package/dist/helpers/reflect.mjs.map +1 -1
- package/dist/helpers/source-file-env.cjs +8 -7
- package/dist/helpers/source-file-env.d.cts.map +1 -1
- package/dist/helpers/source-file-env.d.mts.map +1 -1
- package/dist/helpers/source-file-env.mjs.map +1 -1
- package/dist/helpers/template-helpers.cjs +6 -5
- package/dist/helpers/template-helpers.d.cts +0 -1
- package/dist/helpers/template-helpers.d.cts.map +1 -1
- package/dist/helpers/template-helpers.d.mts +0 -1
- package/dist/helpers/template-helpers.d.mts.map +1 -1
- package/dist/helpers/template-helpers.mjs.map +1 -1
- package/dist/index.cjs +49 -49
- package/dist/index.d.cts +0 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +0 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +5 -6
- package/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.cjs +7 -7
- package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs +6 -6
- package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.cjs +6 -6
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs +6 -6
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.cjs +3 -3
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs +3 -3
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.cjs +655 -655
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs +655 -655
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.cjs +179 -179
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.mjs +179 -179
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.cjs +188 -188
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs +188 -188
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.cjs +297 -297
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs +297 -297
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.cjs +8 -8
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs +8 -8
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.cjs +3 -3
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.mjs +4 -4
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.cjs +3 -3
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs +3 -3
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.cjs +2 -2
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.mjs +2 -2
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.mjs.map +1 -1
- package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.cjs +5 -5
- package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.mjs +4 -4
- package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.mjs.map +1 -1
- package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.cjs +2 -2
- package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.mjs +1 -1
- package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.mjs.map +1 -1
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.cjs +18 -18
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs +2 -2
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.cjs +1 -1
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs +1 -1
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.cjs +1308 -1311
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +1294 -1297
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs.map +1 -1
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs +2194 -2194
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs +2193 -2193
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs.map +1 -1
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.cjs +3 -3
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs +2 -2
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs +3 -3
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +2 -2
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs.map +1 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.cjs +2 -2
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs +1 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.cjs +34 -34
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs +33 -33
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs.map +1 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.cjs +221 -223
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs +220 -222
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs.map +1 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs +2 -2
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.mjs +1 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.cjs +2 -2
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs +1 -1
- package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.cjs +3 -3
- package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.mjs +5 -5
- package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.cjs +1 -1
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.cjs +6 -6
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs +5 -5
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.cjs +10 -10
- package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs +16 -16
- package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.cjs +412 -412
- package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs +189 -189
- package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs.map +1 -1
- package/dist/types/index.cjs +1 -0
- package/dist/types/plugin.cjs +20 -19
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/plugin.mjs.map +1 -1
- package/dist/types/runtime.cjs +1 -0
- package/dist/types/runtime.d.cts.map +1 -1
- package/dist/types/runtime.d.mts.map +1 -1
- package/dist/types/runtime.mjs.map +1 -1
- package/package.json +45 -26
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/parse-type-definition.cjs +0 -37
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/parse-type-definition.mjs +0 -38
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/parse-type-definition.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/to-array.cjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/to-array.mjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/to-array.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/index.cjs +0 -3
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/index.mjs +0 -5
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +0 -6
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +0 -7
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-collection.cjs +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-collection.mjs +0 -3
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +0 -19
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +0 -20
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +0 -63
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +0 -64
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +0 -17
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-parent-path.cjs +0 -32
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-parent-path.mjs +0 -33
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-parent-path.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-type.cjs +0 -28
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-type.mjs +0 -29
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-type.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.cjs +0 -122
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.mjs +0 -123
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/regex.cjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/regex.mjs +0 -9
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/regex.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/slash.cjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/slash.mjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/slash.mjs.map +0 -1
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs +0 -43
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs +0 -43
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs.map +0 -1
package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.cjs
CHANGED
|
@@ -27,27 +27,27 @@
|
|
|
27
27
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
28
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
29
29
|
*/
|
|
30
|
-
function e(e
|
|
31
|
-
let n
|
|
32
|
-
return [n
|
|
30
|
+
function e(e, t) {
|
|
31
|
+
let n = e.slice(0, t).split(/\r\n|\n|\r/g);
|
|
32
|
+
return [n.length, n.pop().length + 1];
|
|
33
33
|
}
|
|
34
|
-
function t(e
|
|
35
|
-
let r
|
|
36
|
-
for (let e
|
|
37
|
-
let o
|
|
38
|
-
o
|
|
39
|
-
`, e
|
|
34
|
+
function t(e, t, n) {
|
|
35
|
+
let r = e.split(/\r\n|\n|\r/g), i = ``, a = (Math.log10(t + 1) | 0) + 1;
|
|
36
|
+
for (let e = t - 1; e <= t + 1; e++) {
|
|
37
|
+
let o = r[e - 1];
|
|
38
|
+
o && (i += e.toString().padEnd(a, ` `), i += `: `, i += o, i += `
|
|
39
|
+
`, e === t && (i += ` `.repeat(a + n + 2), i += `^
|
|
40
40
|
`));
|
|
41
41
|
}
|
|
42
|
-
return i
|
|
42
|
+
return i;
|
|
43
43
|
}
|
|
44
44
|
var n = class extends Error {
|
|
45
45
|
line;
|
|
46
46
|
column;
|
|
47
47
|
codeblock;
|
|
48
|
-
constructor(n
|
|
49
|
-
let [i
|
|
50
|
-
super(`Invalid TOML document: ${n
|
|
48
|
+
constructor(n, r) {
|
|
49
|
+
let [i, a] = e(r.toml, r.ptr), o = t(r.toml, i, a);
|
|
50
|
+
super(`Invalid TOML document: ${n}\n\n${o}`, r), this.line = i, this.column = a, this.codeblock = o;
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
/*!
|
|
@@ -77,59 +77,59 @@ var n = class extends Error {
|
|
|
77
77
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
78
78
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
79
79
|
*/
|
|
80
|
-
function r(e
|
|
81
|
-
let n
|
|
82
|
-
for (; e
|
|
83
|
-
return --n
|
|
80
|
+
function r(e, t) {
|
|
81
|
+
let n = 0;
|
|
82
|
+
for (; e[t - ++n] === `\\`;);
|
|
83
|
+
return --n && n % 2;
|
|
84
84
|
}
|
|
85
|
-
function i(e
|
|
86
|
-
let r
|
|
87
|
-
`, t
|
|
88
|
-
return e
|
|
85
|
+
function i(e, t = 0, n = e.length) {
|
|
86
|
+
let r = e.indexOf(`
|
|
87
|
+
`, t);
|
|
88
|
+
return e[r - 1] === `\r` && r--, r <= n ? r : -1;
|
|
89
89
|
}
|
|
90
|
-
function a(e
|
|
91
|
-
for (let r
|
|
92
|
-
let i
|
|
93
|
-
if (i
|
|
94
|
-
`) return r
|
|
95
|
-
if (i
|
|
96
|
-
`) return r
|
|
97
|
-
if (i
|
|
98
|
-
toml: e
|
|
99
|
-
ptr: t
|
|
90
|
+
function a(e, t) {
|
|
91
|
+
for (let r = t; r < e.length; r++) {
|
|
92
|
+
let i = e[r];
|
|
93
|
+
if (i === `
|
|
94
|
+
`) return r;
|
|
95
|
+
if (i === `\r` && e[r + 1] === `
|
|
96
|
+
`) return r + 1;
|
|
97
|
+
if (i < ` ` && i !== ` ` || i === ``) throw new n(`control characters are not allowed in comments`, {
|
|
98
|
+
toml: e,
|
|
99
|
+
ptr: t
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
|
-
return e
|
|
102
|
+
return e.length;
|
|
103
103
|
}
|
|
104
|
-
function o(e
|
|
105
|
-
let i
|
|
106
|
-
for (; (i
|
|
107
|
-
` || i
|
|
108
|
-
`);) t
|
|
109
|
-
return r
|
|
104
|
+
function o(e, t, n, r) {
|
|
105
|
+
let i;
|
|
106
|
+
for (; (i = e[t]) === ` ` || i === ` ` || !n && (i === `
|
|
107
|
+
` || i === `\r` && e[t + 1] === `
|
|
108
|
+
`);) t++;
|
|
109
|
+
return r || i !== `#` ? t : o(e, a(e, t), n);
|
|
110
110
|
}
|
|
111
|
-
function s(e
|
|
112
|
-
if (!a
|
|
113
|
-
for (let n
|
|
114
|
-
let t
|
|
115
|
-
if (t
|
|
116
|
-
else if (t
|
|
117
|
-
else if (t
|
|
118
|
-
` || t
|
|
119
|
-
`)) return n
|
|
111
|
+
function s(e, t, r, a, o = !1) {
|
|
112
|
+
if (!a) return t = i(e, t), t < 0 ? e.length : t;
|
|
113
|
+
for (let n = t; n < e.length; n++) {
|
|
114
|
+
let t = e[n];
|
|
115
|
+
if (t === `#`) n = i(e, n);
|
|
116
|
+
else if (t === r) return n + 1;
|
|
117
|
+
else if (t === a || o && (t === `
|
|
118
|
+
` || t === `\r` && e[n + 1] === `
|
|
119
|
+
`)) return n;
|
|
120
120
|
}
|
|
121
121
|
throw new n(`cannot find end of structure`, {
|
|
122
|
-
toml: e
|
|
123
|
-
ptr: t
|
|
122
|
+
toml: e,
|
|
123
|
+
ptr: t
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
-
function c(e
|
|
127
|
-
let n
|
|
128
|
-
t
|
|
126
|
+
function c(e, t) {
|
|
127
|
+
let n = e[t], i = n === e[t + 1] && e[t + 1] === e[t + 2] ? e.slice(t, t + 3) : n;
|
|
128
|
+
t += i.length - 1;
|
|
129
129
|
do
|
|
130
|
-
t
|
|
131
|
-
while (t
|
|
132
|
-
return t
|
|
130
|
+
t = e.indexOf(i, ++t);
|
|
131
|
+
while (t > -1 && n !== `'` && r(e, t));
|
|
132
|
+
return t > -1 && (t += i.length, i.length > 1 && (e[t] === n && t++, e[t] === n && t++)), t;
|
|
133
133
|
}
|
|
134
134
|
/*!
|
|
135
135
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
@@ -159,17 +159,17 @@ function c(e$1, t$1) {
|
|
|
159
159
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
160
160
|
*/
|
|
161
161
|
let l = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
|
162
|
-
var u = class e
|
|
162
|
+
var u = class e extends Date {
|
|
163
163
|
#e = !1;
|
|
164
164
|
#t = !1;
|
|
165
165
|
#n = null;
|
|
166
|
-
constructor(e
|
|
167
|
-
let t
|
|
168
|
-
if (typeof e
|
|
169
|
-
let i
|
|
170
|
-
i
|
|
166
|
+
constructor(e) {
|
|
167
|
+
let t = !0, n = !0, r = `Z`;
|
|
168
|
+
if (typeof e == `string`) {
|
|
169
|
+
let i = e.match(l);
|
|
170
|
+
i ? (i[1] || (t = !1, e = `0000-01-01T${e}`), n = !!i[2], n && e[10] === ` ` && (e = e.replace(` `, `T`)), i[2] && +i[2] > 23 ? e = `` : (r = i[3] || null, e = e.toUpperCase(), !r && n && (e += `Z`))) : e = ``;
|
|
171
171
|
}
|
|
172
|
-
super(e
|
|
172
|
+
super(e), isNaN(this.getTime()) || (this.#e = t, this.#t = n, this.#n = r);
|
|
173
173
|
}
|
|
174
174
|
isDateTime() {
|
|
175
175
|
return this.#e && this.#t;
|
|
@@ -187,29 +187,29 @@ var u = class e$1 extends Date {
|
|
|
187
187
|
return this.#e || this.#t;
|
|
188
188
|
}
|
|
189
189
|
toISOString() {
|
|
190
|
-
let e
|
|
191
|
-
if (this.isDate()) return e
|
|
192
|
-
if (this.isTime()) return e
|
|
193
|
-
if (this.#n === null) return e
|
|
194
|
-
if (this.#n === `Z`) return e
|
|
195
|
-
let t
|
|
196
|
-
return t
|
|
190
|
+
let e = super.toISOString();
|
|
191
|
+
if (this.isDate()) return e.slice(0, 10);
|
|
192
|
+
if (this.isTime()) return e.slice(11, 23);
|
|
193
|
+
if (this.#n === null) return e.slice(0, -1);
|
|
194
|
+
if (this.#n === `Z`) return e;
|
|
195
|
+
let t = this.#n.slice(1, 3) * 60 + +this.#n.slice(4, 6);
|
|
196
|
+
return t = this.#n[0] === `-` ? t : -t, (/* @__PURE__ */ new Date(this.getTime() - t * 6e4)).toISOString().slice(0, -1) + this.#n;
|
|
197
197
|
}
|
|
198
|
-
static wrapAsOffsetDateTime(t
|
|
199
|
-
let r
|
|
200
|
-
return r
|
|
198
|
+
static wrapAsOffsetDateTime(t, n = `Z`) {
|
|
199
|
+
let r = new e(t);
|
|
200
|
+
return r.#n = n, r;
|
|
201
201
|
}
|
|
202
|
-
static wrapAsLocalDateTime(t
|
|
203
|
-
let n
|
|
204
|
-
return n
|
|
202
|
+
static wrapAsLocalDateTime(t) {
|
|
203
|
+
let n = new e(t);
|
|
204
|
+
return n.#n = null, n;
|
|
205
205
|
}
|
|
206
|
-
static wrapAsLocalDate(t
|
|
207
|
-
let n
|
|
208
|
-
return n
|
|
206
|
+
static wrapAsLocalDate(t) {
|
|
207
|
+
let n = new e(t);
|
|
208
|
+
return n.#t = !1, n.#n = null, n;
|
|
209
209
|
}
|
|
210
|
-
static wrapAsLocalTime(t
|
|
211
|
-
let n
|
|
212
|
-
return n
|
|
210
|
+
static wrapAsLocalTime(t) {
|
|
211
|
+
let n = new e(t);
|
|
212
|
+
return n.#e = !1, n.#n = null, n;
|
|
213
213
|
}
|
|
214
214
|
};
|
|
215
215
|
/*!
|
|
@@ -250,91 +250,91 @@ let d = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/, f = /^[+
|
|
|
250
250
|
"\"": `"`,
|
|
251
251
|
"\\": `\\`
|
|
252
252
|
};
|
|
253
|
-
function g(e
|
|
254
|
-
let i
|
|
255
|
-
a
|
|
256
|
-
` && t
|
|
257
|
-
let s
|
|
258
|
-
for (; t
|
|
259
|
-
let r
|
|
260
|
-
if (r
|
|
261
|
-
` || r
|
|
253
|
+
function g(e, t = 0, r = e.length) {
|
|
254
|
+
let i = e[t] === `'`, a = e[t++] === e[t] && e[t] === e[t + 1];
|
|
255
|
+
a && (r -= 2, e[t += 2] === `\r` && t++, e[t] === `
|
|
256
|
+
` && t++);
|
|
257
|
+
let s = 0, c, l = ``, u = t;
|
|
258
|
+
for (; t < r - 1;) {
|
|
259
|
+
let r = e[t++];
|
|
260
|
+
if (r === `
|
|
261
|
+
` || r === `\r` && e[t] === `
|
|
262
262
|
`) {
|
|
263
|
-
if (!a
|
|
264
|
-
toml: e
|
|
265
|
-
ptr: t
|
|
263
|
+
if (!a) throw new n(`newlines are not allowed in strings`, {
|
|
264
|
+
toml: e,
|
|
265
|
+
ptr: t - 1
|
|
266
266
|
});
|
|
267
|
-
} else if (r
|
|
268
|
-
toml: e
|
|
269
|
-
ptr: t
|
|
267
|
+
} else if (r < ` ` && r !== ` ` || r === ``) throw new n(`control characters are not allowed in strings`, {
|
|
268
|
+
toml: e,
|
|
269
|
+
ptr: t - 1
|
|
270
270
|
});
|
|
271
|
-
if (c
|
|
272
|
-
if (c
|
|
273
|
-
let i
|
|
274
|
-
if (!m.test(i
|
|
275
|
-
toml: e
|
|
276
|
-
ptr: s
|
|
271
|
+
if (c) {
|
|
272
|
+
if (c = !1, r === `x` || r === `u` || r === `U`) {
|
|
273
|
+
let i = e.slice(t, t += r === `x` ? 2 : r === `u` ? 4 : 8);
|
|
274
|
+
if (!m.test(i)) throw new n(`invalid unicode escape`, {
|
|
275
|
+
toml: e,
|
|
276
|
+
ptr: s
|
|
277
277
|
});
|
|
278
278
|
try {
|
|
279
|
-
l
|
|
279
|
+
l += String.fromCodePoint(parseInt(i, 16));
|
|
280
280
|
} catch {
|
|
281
281
|
throw new n(`invalid unicode escape`, {
|
|
282
|
-
toml: e
|
|
283
|
-
ptr: s
|
|
282
|
+
toml: e,
|
|
283
|
+
ptr: s
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
} else if (a
|
|
287
|
-
` || r
|
|
288
|
-
if (t
|
|
289
|
-
` && e
|
|
290
|
-
toml: e
|
|
291
|
-
ptr: s
|
|
286
|
+
} else if (a && (r === `
|
|
287
|
+
` || r === ` ` || r === ` ` || r === `\r`)) {
|
|
288
|
+
if (t = o(e, t - 1, !0), e[t] !== `
|
|
289
|
+
` && e[t] !== `\r`) throw new n(`invalid escape: only line-ending whitespace may be escaped`, {
|
|
290
|
+
toml: e,
|
|
291
|
+
ptr: s
|
|
292
292
|
});
|
|
293
|
-
t
|
|
294
|
-
} else if (r
|
|
293
|
+
t = o(e, t);
|
|
294
|
+
} else if (r in h) l += h[r];
|
|
295
295
|
else throw new n(`unrecognized escape sequence`, {
|
|
296
|
-
toml: e
|
|
297
|
-
ptr: s
|
|
296
|
+
toml: e,
|
|
297
|
+
ptr: s
|
|
298
298
|
});
|
|
299
|
-
u
|
|
300
|
-
} else !i
|
|
299
|
+
u = t;
|
|
300
|
+
} else !i && r === `\\` && (s = t - 1, c = !0, l += e.slice(u, s));
|
|
301
301
|
}
|
|
302
|
-
return l
|
|
302
|
+
return l + e.slice(u, r - 1);
|
|
303
303
|
}
|
|
304
|
-
function _(e
|
|
305
|
-
if (e
|
|
306
|
-
if (e
|
|
307
|
-
if (e
|
|
308
|
-
if (e
|
|
309
|
-
if (e
|
|
310
|
-
if (e
|
|
311
|
-
let a
|
|
312
|
-
if (a
|
|
313
|
-
if (p.test(e
|
|
314
|
-
toml: t
|
|
315
|
-
ptr: r
|
|
304
|
+
function _(e, t, r, i) {
|
|
305
|
+
if (e === `true`) return !0;
|
|
306
|
+
if (e === `false`) return !1;
|
|
307
|
+
if (e === `-inf`) return -Infinity;
|
|
308
|
+
if (e === `inf` || e === `+inf`) return Infinity;
|
|
309
|
+
if (e === `nan` || e === `+nan` || e === `-nan`) return NaN;
|
|
310
|
+
if (e === `-0`) return i ? 0n : 0;
|
|
311
|
+
let a = d.test(e);
|
|
312
|
+
if (a || f.test(e)) {
|
|
313
|
+
if (p.test(e)) throw new n(`leading zeroes are not allowed`, {
|
|
314
|
+
toml: t,
|
|
315
|
+
ptr: r
|
|
316
316
|
});
|
|
317
|
-
e
|
|
318
|
-
let o
|
|
319
|
-
if (isNaN(o
|
|
320
|
-
toml: t
|
|
321
|
-
ptr: r
|
|
317
|
+
e = e.replace(/_/g, ``);
|
|
318
|
+
let o = +e;
|
|
319
|
+
if (isNaN(o)) throw new n(`invalid number`, {
|
|
320
|
+
toml: t,
|
|
321
|
+
ptr: r
|
|
322
322
|
});
|
|
323
|
-
if (a
|
|
324
|
-
if ((a
|
|
325
|
-
toml: t
|
|
326
|
-
ptr: r
|
|
323
|
+
if (a) {
|
|
324
|
+
if ((a = !Number.isSafeInteger(o)) && !i) throw new n(`integer value cannot be represented losslessly`, {
|
|
325
|
+
toml: t,
|
|
326
|
+
ptr: r
|
|
327
327
|
});
|
|
328
|
-
(a
|
|
328
|
+
(a || i === !0) && (o = BigInt(e));
|
|
329
329
|
}
|
|
330
|
-
return o
|
|
330
|
+
return o;
|
|
331
331
|
}
|
|
332
|
-
let o
|
|
333
|
-
if (!o
|
|
334
|
-
toml: t
|
|
335
|
-
ptr: r
|
|
332
|
+
let o = new u(e);
|
|
333
|
+
if (!o.isValid()) throw new n(`invalid value`, {
|
|
334
|
+
toml: t,
|
|
335
|
+
ptr: r
|
|
336
336
|
});
|
|
337
|
-
return o
|
|
337
|
+
return o;
|
|
338
338
|
}
|
|
339
339
|
/*!
|
|
340
340
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
@@ -363,48 +363,48 @@ function _(e$1, t$1, r$1, i$1) {
|
|
|
363
363
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
364
364
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
365
365
|
*/
|
|
366
|
-
function v(e
|
|
367
|
-
let r
|
|
368
|
-
return i
|
|
366
|
+
function v(e, t, n) {
|
|
367
|
+
let r = e.slice(t, n), i = r.indexOf(`#`);
|
|
368
|
+
return i > -1 && (a(e, i), r = r.slice(0, i)), [r.trimEnd(), i];
|
|
369
369
|
}
|
|
370
|
-
function y(e
|
|
371
|
-
if (i
|
|
372
|
-
toml: e
|
|
373
|
-
ptr: t
|
|
370
|
+
function y(e, t, r, i, a) {
|
|
371
|
+
if (i === 0) throw new n(`document contains excessively nested structures. aborting.`, {
|
|
372
|
+
toml: e,
|
|
373
|
+
ptr: t
|
|
374
374
|
});
|
|
375
|
-
let l
|
|
376
|
-
if (l
|
|
377
|
-
let [s
|
|
378
|
-
if (r
|
|
379
|
-
if (c
|
|
380
|
-
else if (e
|
|
381
|
-
toml: e
|
|
382
|
-
ptr: c
|
|
375
|
+
let l = e[t];
|
|
376
|
+
if (l === `[` || l === `{`) {
|
|
377
|
+
let [s, c] = l === `[` ? C(e, t, i, a) : S(e, t, i, a);
|
|
378
|
+
if (r) {
|
|
379
|
+
if (c = o(e, c), e[c] === `,`) c++;
|
|
380
|
+
else if (e[c] !== r) throw new n(`expected comma or end of structure`, {
|
|
381
|
+
toml: e,
|
|
382
|
+
ptr: c
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
|
-
return [s
|
|
385
|
+
return [s, c];
|
|
386
386
|
}
|
|
387
|
-
let u
|
|
388
|
-
if (l
|
|
389
|
-
u
|
|
390
|
-
let i
|
|
391
|
-
if (r
|
|
392
|
-
if (u
|
|
393
|
-
` && e
|
|
394
|
-
toml: e
|
|
395
|
-
ptr: u
|
|
387
|
+
let u;
|
|
388
|
+
if (l === `"` || l === `'`) {
|
|
389
|
+
u = c(e, t);
|
|
390
|
+
let i = g(e, t, u);
|
|
391
|
+
if (r) {
|
|
392
|
+
if (u = o(e, u), e[u] && e[u] !== `,` && e[u] !== r && e[u] !== `
|
|
393
|
+
` && e[u] !== `\r`) throw new n(`unexpected character encountered`, {
|
|
394
|
+
toml: e,
|
|
395
|
+
ptr: u
|
|
396
396
|
});
|
|
397
|
-
u
|
|
397
|
+
u += +(e[u] === `,`);
|
|
398
398
|
}
|
|
399
|
-
return [i
|
|
399
|
+
return [i, u];
|
|
400
400
|
}
|
|
401
|
-
u
|
|
402
|
-
let d
|
|
403
|
-
if (!d
|
|
404
|
-
toml: e
|
|
405
|
-
ptr: t
|
|
401
|
+
u = s(e, t, `,`, r);
|
|
402
|
+
let d = v(e, t, u - +(e[u - 1] === `,`));
|
|
403
|
+
if (!d[0]) throw new n(`incomplete key-value declaration: no value specified`, {
|
|
404
|
+
toml: e,
|
|
405
|
+
ptr: t
|
|
406
406
|
});
|
|
407
|
-
return r
|
|
407
|
+
return r && d[1] > -1 && (u = o(e, t + d[1]), u += +(e[u] === `,`)), [_(d[0], e, t, a), u];
|
|
408
408
|
}
|
|
409
409
|
/*!
|
|
410
410
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
@@ -434,102 +434,102 @@ function y(e$1, t$1, r$1, i$1, a$1) {
|
|
|
434
434
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
435
435
|
*/
|
|
436
436
|
let b = /^[a-zA-Z0-9-_]+[ \t]*$/;
|
|
437
|
-
function x(e
|
|
438
|
-
let a
|
|
439
|
-
if (l
|
|
440
|
-
toml: e
|
|
441
|
-
ptr: t
|
|
437
|
+
function x(e, t, r = `=`) {
|
|
438
|
+
let a = t - 1, s = [], l = e.indexOf(r, t);
|
|
439
|
+
if (l < 0) throw new n(`incomplete key-value: cannot find end of key`, {
|
|
440
|
+
toml: e,
|
|
441
|
+
ptr: t
|
|
442
442
|
});
|
|
443
443
|
do {
|
|
444
|
-
let o
|
|
445
|
-
if (o
|
|
446
|
-
if (o
|
|
447
|
-
toml: e
|
|
448
|
-
ptr: t
|
|
444
|
+
let o = e[t = ++a];
|
|
445
|
+
if (o !== ` ` && o !== ` `) if (o === `"` || o === `'`) {
|
|
446
|
+
if (o === e[t + 1] && o === e[t + 2]) throw new n(`multiline strings are not allowed in keys`, {
|
|
447
|
+
toml: e,
|
|
448
|
+
ptr: t
|
|
449
449
|
});
|
|
450
|
-
let u
|
|
451
|
-
if (u
|
|
452
|
-
toml: e
|
|
453
|
-
ptr: t
|
|
450
|
+
let u = c(e, t);
|
|
451
|
+
if (u < 0) throw new n(`unfinished string encountered`, {
|
|
452
|
+
toml: e,
|
|
453
|
+
ptr: t
|
|
454
454
|
});
|
|
455
|
-
a
|
|
456
|
-
let d
|
|
457
|
-
if (f
|
|
458
|
-
toml: e
|
|
459
|
-
ptr: t
|
|
455
|
+
a = e.indexOf(`.`, u);
|
|
456
|
+
let d = e.slice(u, a < 0 || a > l ? l : a), f = i(d);
|
|
457
|
+
if (f > -1) throw new n(`newlines are not allowed in keys`, {
|
|
458
|
+
toml: e,
|
|
459
|
+
ptr: t + a + f
|
|
460
460
|
});
|
|
461
|
-
if (d
|
|
462
|
-
toml: e
|
|
463
|
-
ptr: u
|
|
461
|
+
if (d.trimStart()) throw new n(`found extra tokens after the string part`, {
|
|
462
|
+
toml: e,
|
|
463
|
+
ptr: u
|
|
464
464
|
});
|
|
465
|
-
if (l
|
|
466
|
-
toml: e
|
|
467
|
-
ptr: t
|
|
465
|
+
if (l < u && (l = e.indexOf(r, u), l < 0)) throw new n(`incomplete key-value: cannot find end of key`, {
|
|
466
|
+
toml: e,
|
|
467
|
+
ptr: t
|
|
468
468
|
});
|
|
469
|
-
s
|
|
469
|
+
s.push(g(e, t, u));
|
|
470
470
|
} else {
|
|
471
|
-
a
|
|
472
|
-
let r
|
|
473
|
-
if (!b.test(r
|
|
474
|
-
toml: e
|
|
475
|
-
ptr: t
|
|
471
|
+
a = e.indexOf(`.`, t);
|
|
472
|
+
let r = e.slice(t, a < 0 || a > l ? l : a);
|
|
473
|
+
if (!b.test(r)) throw new n(`only letter, numbers, dashes and underscores are allowed in keys`, {
|
|
474
|
+
toml: e,
|
|
475
|
+
ptr: t
|
|
476
476
|
});
|
|
477
|
-
s
|
|
477
|
+
s.push(r.trimEnd());
|
|
478
478
|
}
|
|
479
|
-
} while (a
|
|
480
|
-
return [s
|
|
479
|
+
} while (a + 1 && a < l);
|
|
480
|
+
return [s, o(e, l + 1, !0, !0)];
|
|
481
481
|
}
|
|
482
|
-
function S(e
|
|
483
|
-
let o
|
|
484
|
-
for (t
|
|
485
|
-
toml: e
|
|
486
|
-
ptr: t
|
|
482
|
+
function S(e, t, r, i) {
|
|
483
|
+
let o = {}, s = /* @__PURE__ */ new Set(), c;
|
|
484
|
+
for (t++; (c = e[t++]) !== `}` && c;) if (c === `,`) throw new n(`expected value, found comma`, {
|
|
485
|
+
toml: e,
|
|
486
|
+
ptr: t - 1
|
|
487
487
|
});
|
|
488
|
-
else if (c
|
|
489
|
-
else if (c
|
|
490
|
-
` && c
|
|
491
|
-
let a
|
|
492
|
-
for (let r
|
|
493
|
-
if (r
|
|
494
|
-
toml: e
|
|
495
|
-
ptr: t
|
|
488
|
+
else if (c === `#`) t = a(e, t);
|
|
489
|
+
else if (c !== ` ` && c !== ` ` && c !== `
|
|
490
|
+
` && c !== `\r`) {
|
|
491
|
+
let a, c = o, l = !1, [u, d] = x(e, t - 1);
|
|
492
|
+
for (let r = 0; r < u.length; r++) {
|
|
493
|
+
if (r && (c = l ? c[a] : c[a] = {}), a = u[r], (l = Object.hasOwn(c, a)) && (typeof c[a] != `object` || s.has(c[a]))) throw new n(`trying to redefine an already defined value`, {
|
|
494
|
+
toml: e,
|
|
495
|
+
ptr: t
|
|
496
496
|
});
|
|
497
|
-
!l
|
|
497
|
+
!l && a === `__proto__` && Object.defineProperty(c, a, {
|
|
498
498
|
enumerable: !0,
|
|
499
499
|
configurable: !0,
|
|
500
500
|
writable: !0
|
|
501
501
|
});
|
|
502
502
|
}
|
|
503
|
-
if (l
|
|
504
|
-
toml: e
|
|
505
|
-
ptr: t
|
|
503
|
+
if (l) throw new n(`trying to redefine an already defined value`, {
|
|
504
|
+
toml: e,
|
|
505
|
+
ptr: t
|
|
506
506
|
});
|
|
507
|
-
let [f
|
|
508
|
-
s
|
|
507
|
+
let [f, p] = y(e, d, `}`, r - 1, i);
|
|
508
|
+
s.add(f), c[a] = f, t = p;
|
|
509
509
|
}
|
|
510
|
-
if (!c
|
|
511
|
-
toml: e
|
|
512
|
-
ptr: t
|
|
510
|
+
if (!c) throw new n(`unfinished table encountered`, {
|
|
511
|
+
toml: e,
|
|
512
|
+
ptr: t
|
|
513
513
|
});
|
|
514
|
-
return [o
|
|
514
|
+
return [o, t];
|
|
515
515
|
}
|
|
516
|
-
function C(e
|
|
517
|
-
let o
|
|
518
|
-
for (t
|
|
519
|
-
toml: e
|
|
520
|
-
ptr: t
|
|
516
|
+
function C(e, t, r, i) {
|
|
517
|
+
let o = [], s;
|
|
518
|
+
for (t++; (s = e[t++]) !== `]` && s;) if (s === `,`) throw new n(`expected value, found comma`, {
|
|
519
|
+
toml: e,
|
|
520
|
+
ptr: t - 1
|
|
521
521
|
});
|
|
522
|
-
else if (s
|
|
523
|
-
else if (s
|
|
524
|
-
` && s
|
|
525
|
-
let n
|
|
526
|
-
o
|
|
522
|
+
else if (s === `#`) t = a(e, t);
|
|
523
|
+
else if (s !== ` ` && s !== ` ` && s !== `
|
|
524
|
+
` && s !== `\r`) {
|
|
525
|
+
let n = y(e, t - 1, `]`, r - 1, i);
|
|
526
|
+
o.push(n[0]), t = n[1];
|
|
527
527
|
}
|
|
528
|
-
if (!s
|
|
529
|
-
toml: e
|
|
530
|
-
ptr: t
|
|
528
|
+
if (!s) throw new n(`unfinished array encountered`, {
|
|
529
|
+
toml: e,
|
|
530
|
+
ptr: t
|
|
531
531
|
});
|
|
532
|
-
return [o
|
|
532
|
+
return [o, t];
|
|
533
533
|
}
|
|
534
534
|
/*!
|
|
535
535
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
@@ -558,81 +558,81 @@ function C(e$1, t$1, r$1, i$1) {
|
|
|
558
558
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
559
559
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
560
560
|
*/
|
|
561
|
-
function w(e
|
|
562
|
-
let i
|
|
563
|
-
for (let t
|
|
564
|
-
if (t
|
|
565
|
-
if (i
|
|
566
|
-
if (c
|
|
567
|
-
let e
|
|
568
|
-
i
|
|
561
|
+
function w(e, t, n, r) {
|
|
562
|
+
let i = t, a = n, o, s = !1, c;
|
|
563
|
+
for (let t = 0; t < e.length; t++) {
|
|
564
|
+
if (t) {
|
|
565
|
+
if (i = s ? i[o] : i[o] = {}, a = (c = a[o]).c, r === 0 && (c.t === 1 || c.t === 2)) return null;
|
|
566
|
+
if (c.t === 2) {
|
|
567
|
+
let e = i.length - 1;
|
|
568
|
+
i = i[e], a = a[e].c;
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
|
-
if (o
|
|
572
|
-
s
|
|
571
|
+
if (o = e[t], (s = Object.hasOwn(i, o)) && a[o]?.t === 0 && a[o]?.d) return null;
|
|
572
|
+
s || (o === `__proto__` && (Object.defineProperty(i, o, {
|
|
573
573
|
enumerable: !0,
|
|
574
574
|
configurable: !0,
|
|
575
575
|
writable: !0
|
|
576
|
-
}), Object.defineProperty(a
|
|
576
|
+
}), Object.defineProperty(a, o, {
|
|
577
577
|
enumerable: !0,
|
|
578
578
|
configurable: !0,
|
|
579
579
|
writable: !0
|
|
580
|
-
})), a
|
|
581
|
-
t: t
|
|
580
|
+
})), a[o] = {
|
|
581
|
+
t: t < e.length - 1 && r === 2 ? 3 : r,
|
|
582
582
|
d: !1,
|
|
583
583
|
i: 0,
|
|
584
584
|
c: {}
|
|
585
585
|
});
|
|
586
586
|
}
|
|
587
|
-
if (c
|
|
587
|
+
if (c = a[o], c.t !== r && !(r === 1 && c.t === 3) || (r === 2 && (c.d || (c.d = !0, i[o] = []), i[o].push(i = {}), c.c[c.i++] = c = {
|
|
588
588
|
t: 1,
|
|
589
589
|
d: !1,
|
|
590
590
|
i: 0,
|
|
591
591
|
c: {}
|
|
592
|
-
}), c
|
|
593
|
-
if (c
|
|
594
|
-
else if (r
|
|
592
|
+
}), c.d)) return null;
|
|
593
|
+
if (c.d = !0, r === 1) i = s ? i[o] : i[o] = {};
|
|
594
|
+
else if (r === 0 && s) return null;
|
|
595
595
|
return [
|
|
596
|
-
o
|
|
597
|
-
i
|
|
598
|
-
c
|
|
596
|
+
o,
|
|
597
|
+
i,
|
|
598
|
+
c.c
|
|
599
599
|
];
|
|
600
600
|
}
|
|
601
|
-
function T(e
|
|
602
|
-
let i
|
|
603
|
-
for (let l
|
|
604
|
-
if (e
|
|
605
|
-
let t
|
|
606
|
-
if (t
|
|
607
|
-
if (e
|
|
608
|
-
toml: e
|
|
609
|
-
ptr: r
|
|
601
|
+
function T(e, { maxDepth: t = 1e3, integersAsBigInt: r } = {}) {
|
|
602
|
+
let i = {}, a = {}, s = i, c = a;
|
|
603
|
+
for (let l = o(e, 0); l < e.length;) {
|
|
604
|
+
if (e[l] === `[`) {
|
|
605
|
+
let t = e[++l] === `[`, r = x(e, l += +t, `]`);
|
|
606
|
+
if (t) {
|
|
607
|
+
if (e[r[1] - 1] !== `]`) throw new n(`expected end of table declaration`, {
|
|
608
|
+
toml: e,
|
|
609
|
+
ptr: r[1] - 1
|
|
610
610
|
});
|
|
611
|
-
r
|
|
611
|
+
r[1]++;
|
|
612
612
|
}
|
|
613
|
-
let o
|
|
614
|
-
if (!o
|
|
615
|
-
toml: e
|
|
616
|
-
ptr: l
|
|
613
|
+
let o = w(r[0], i, a, t ? 2 : 1);
|
|
614
|
+
if (!o) throw new n(`trying to redefine an already defined table or value`, {
|
|
615
|
+
toml: e,
|
|
616
|
+
ptr: l
|
|
617
617
|
});
|
|
618
|
-
c
|
|
618
|
+
c = o[2], s = o[1], l = r[1];
|
|
619
619
|
} else {
|
|
620
|
-
let i
|
|
621
|
-
if (!a
|
|
622
|
-
toml: e
|
|
623
|
-
ptr: l
|
|
620
|
+
let i = x(e, l), a = w(i[0], s, c, 0);
|
|
621
|
+
if (!a) throw new n(`trying to redefine an already defined table or value`, {
|
|
622
|
+
toml: e,
|
|
623
|
+
ptr: l
|
|
624
624
|
});
|
|
625
|
-
let o
|
|
626
|
-
a
|
|
625
|
+
let o = y(e, i[1], void 0, t, r);
|
|
626
|
+
a[1][a[0]] = o[0], l = o[1];
|
|
627
627
|
}
|
|
628
|
-
if (l
|
|
629
|
-
` && e
|
|
630
|
-
toml: e
|
|
631
|
-
ptr: l
|
|
628
|
+
if (l = o(e, l, !0), e[l] && e[l] !== `
|
|
629
|
+
` && e[l] !== `\r`) throw new n(`each key-value declaration must be followed by an end-of-line`, {
|
|
630
|
+
toml: e,
|
|
631
|
+
ptr: l
|
|
632
632
|
});
|
|
633
|
-
l
|
|
633
|
+
l = o(e, l);
|
|
634
634
|
}
|
|
635
|
-
return i
|
|
635
|
+
return i;
|
|
636
636
|
}
|
|
637
637
|
|
|
638
638
|
//#endregion
|